@selfcommunity/react-ui 0.7.0-alpha.94 → 0.7.0-alpha.95
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/PrivateMessageComponent/PrivateMessageComponent.d.ts +53 -0
- package/lib/cjs/components/PrivateMessageComponent/PrivateMessageComponent.d.ts.map +1 -0
- package/lib/cjs/components/PrivateMessageComponent/PrivateMessageComponent.js +460 -0
- package/lib/cjs/components/PrivateMessageComponent/PrivateMessageComponent.js.map +1 -0
- package/lib/cjs/components/PrivateMessageComponent/Skeleton.d.ts +34 -0
- package/lib/cjs/components/PrivateMessageComponent/Skeleton.d.ts.map +1 -0
- package/lib/cjs/components/PrivateMessageComponent/Skeleton.js +54 -0
- package/lib/cjs/components/PrivateMessageComponent/Skeleton.js.map +1 -0
- package/lib/cjs/components/PrivateMessageComponent/index.d.ts +5 -0
- package/lib/cjs/components/PrivateMessageComponent/index.d.ts.map +1 -0
- package/lib/cjs/components/PrivateMessageComponent/index.js +11 -0
- package/lib/cjs/components/PrivateMessageComponent/index.js.map +1 -0
- package/lib/cjs/components/PrivateMessageSnippetItem/Skeleton.d.ts.map +1 -1
- package/lib/cjs/components/PrivateMessageSnippetItem/Skeleton.js +2 -1
- package/lib/cjs/components/PrivateMessageSnippetItem/Skeleton.js.map +1 -1
- package/lib/cjs/components/PrivateMessageSnippets/PrivateMessageSnippets.d.ts.map +1 -1
- package/lib/cjs/components/PrivateMessageSnippets/PrivateMessageSnippets.js +0 -1
- package/lib/cjs/components/PrivateMessageSnippets/PrivateMessageSnippets.js.map +1 -1
- package/lib/cjs/components/PrivateMessageSnippets/Skeleton.d.ts +2 -0
- package/lib/cjs/components/PrivateMessageSnippets/Skeleton.d.ts.map +1 -1
- package/lib/cjs/components/PrivateMessageSnippets/Skeleton.js +8 -1
- package/lib/cjs/components/PrivateMessageSnippets/Skeleton.js.map +1 -1
- package/lib/cjs/components/PrivateMessageThread/PrivateMessageThread.d.ts +25 -11
- package/lib/cjs/components/PrivateMessageThread/PrivateMessageThread.d.ts.map +1 -1
- package/lib/cjs/components/PrivateMessageThread/PrivateMessageThread.js +17 -175
- package/lib/cjs/components/PrivateMessageThread/PrivateMessageThread.js.map +1 -1
- package/lib/cjs/components/PrivateMessageThread/Skeleton.d.ts.map +1 -1
- package/lib/cjs/components/PrivateMessageThread/Skeleton.js +1 -10
- package/lib/cjs/components/PrivateMessageThread/Skeleton.js.map +1 -1
- package/lib/cjs/index.d.ts +2 -1
- package/lib/cjs/index.d.ts.map +1 -1
- package/lib/cjs/index.js +5 -2
- package/lib/cjs/index.js.map +1 -1
- package/lib/esm/components/PrivateMessageComponent/PrivateMessageComponent.d.ts +53 -0
- package/lib/esm/components/PrivateMessageComponent/PrivateMessageComponent.d.ts.map +1 -0
- package/lib/esm/components/PrivateMessageComponent/PrivateMessageComponent.js +431 -0
- package/lib/esm/components/PrivateMessageComponent/PrivateMessageComponent.js.map +1 -0
- package/lib/esm/components/PrivateMessageComponent/Skeleton.d.ts +34 -0
- package/lib/esm/components/PrivateMessageComponent/Skeleton.d.ts.map +1 -0
- package/lib/esm/components/PrivateMessageComponent/Skeleton.js +48 -0
- package/lib/esm/components/PrivateMessageComponent/Skeleton.js.map +1 -0
- package/lib/esm/components/PrivateMessageComponent/index.d.ts +5 -0
- package/lib/esm/components/PrivateMessageComponent/index.d.ts.map +1 -0
- package/lib/esm/components/PrivateMessageComponent/index.js +5 -0
- package/lib/esm/components/PrivateMessageComponent/index.js.map +1 -0
- package/lib/esm/components/PrivateMessageSnippetItem/Skeleton.d.ts.map +1 -1
- package/lib/esm/components/PrivateMessageSnippetItem/Skeleton.js +2 -1
- package/lib/esm/components/PrivateMessageSnippetItem/Skeleton.js.map +1 -1
- package/lib/esm/components/PrivateMessageSnippets/PrivateMessageSnippets.d.ts.map +1 -1
- package/lib/esm/components/PrivateMessageSnippets/PrivateMessageSnippets.js +0 -1
- package/lib/esm/components/PrivateMessageSnippets/PrivateMessageSnippets.js.map +1 -1
- package/lib/esm/components/PrivateMessageSnippets/Skeleton.d.ts +2 -0
- package/lib/esm/components/PrivateMessageSnippets/Skeleton.d.ts.map +1 -1
- package/lib/esm/components/PrivateMessageSnippets/Skeleton.js +9 -2
- package/lib/esm/components/PrivateMessageSnippets/Skeleton.js.map +1 -1
- package/lib/esm/components/PrivateMessageThread/PrivateMessageThread.d.ts +25 -11
- package/lib/esm/components/PrivateMessageThread/PrivateMessageThread.d.ts.map +1 -1
- package/lib/esm/components/PrivateMessageThread/PrivateMessageThread.js +20 -178
- package/lib/esm/components/PrivateMessageThread/PrivateMessageThread.js.map +1 -1
- package/lib/esm/components/PrivateMessageThread/Skeleton.d.ts.map +1 -1
- package/lib/esm/components/PrivateMessageThread/Skeleton.js +1 -10
- package/lib/esm/components/PrivateMessageThread/Skeleton.js.map +1 -1
- package/lib/esm/index.d.ts +2 -1
- package/lib/esm/index.d.ts.map +1 -1
- package/lib/esm/index.js +2 -1
- package/lib/esm/index.js.map +1 -1
- package/lib/umd/react-ui.js +6 -6
- package/lib/umd/react-ui.js.LICENSE.txt +2 -2
- package/lib/umd/react-ui.js.map +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface PrivateMessageComponentSkeletonMap {
|
|
3
|
+
/**
|
|
4
|
+
* Overrides or extends the styles applied to the component.
|
|
5
|
+
* @default null
|
|
6
|
+
*/
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare type PrivateMessageComponentProps = React.PropsWithChildren<PrivateMessageComponentSkeletonMap>;
|
|
10
|
+
/**
|
|
11
|
+
* > API documentation for the Community-JS Private Messages Skeleton Template. Learn about the available props and the CSS API.
|
|
12
|
+
|
|
13
|
+
#### Import
|
|
14
|
+
|
|
15
|
+
```jsx
|
|
16
|
+
import {PrivateMessageComponentSkeleton} from '@selfcommunity/react-templates';
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
#### Component Name
|
|
20
|
+
|
|
21
|
+
The name `SCPrivateMessageComponentSkeleton` can be used when providing style overrides in the theme.
|
|
22
|
+
|
|
23
|
+
#### CSS
|
|
24
|
+
|
|
25
|
+
|Rule Name|Global class|Description|
|
|
26
|
+
|---|---|---|
|
|
27
|
+
|root|.SCPrivateMessageComponentSkeleton-root|Styles applied to the root element.|
|
|
28
|
+
|snippetsSection|.SCPrivateMessageComponentSkeleton-snippets-section|Styles applied to the snippets section|
|
|
29
|
+
|threadSection|.SCPrivateMessageComponentSkeleton-thread-section|Styles applied to the thread section|
|
|
30
|
+
*
|
|
31
|
+
*/
|
|
32
|
+
export default function PrivateMessageComponentSkeleton(props: PrivateMessageComponentProps): JSX.Element;
|
|
33
|
+
export {};
|
|
34
|
+
//# sourceMappingURL=Skeleton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Skeleton.d.ts","sourceRoot":"","sources":["../../../../src/components/PrivateMessageComponent/Skeleton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAoB1B,UAAU,kCAAkC;IAC1C;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AACD,oBAAY,4BAA4B,GAAG,KAAK,CAAC,iBAAiB,CAAC,kCAAkC,CAAC,CAAC;AACvG;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,OAAO,UAAU,+BAA+B,CAAC,KAAK,EAAE,4BAA4B,GAAG,GAAG,CAAC,OAAO,CAYxG"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { styled } from '@mui/material/styles';
|
|
3
|
+
import { Grid } from '@mui/material';
|
|
4
|
+
import PrivateMessageSnippetsSkeleton from '../PrivateMessageSnippets';
|
|
5
|
+
import PrivateMessageThreadSkeleton from '../PrivateMessageThread';
|
|
6
|
+
import classNames from 'classnames';
|
|
7
|
+
const PREFIX = 'SCPrivateMessageComponentSkeleton';
|
|
8
|
+
const classes = {
|
|
9
|
+
root: `${PREFIX}-root`,
|
|
10
|
+
snippetsSection: `${PREFIX}-snippets-section`,
|
|
11
|
+
threadSection: `${PREFIX}-thread-section`
|
|
12
|
+
};
|
|
13
|
+
const Root = styled(Grid, {
|
|
14
|
+
name: PREFIX,
|
|
15
|
+
slot: 'Root',
|
|
16
|
+
overridesResolver: (props, styles) => styles.root
|
|
17
|
+
})(() => ({}));
|
|
18
|
+
/**
|
|
19
|
+
* > API documentation for the Community-JS Private Messages Skeleton Template. Learn about the available props and the CSS API.
|
|
20
|
+
|
|
21
|
+
#### Import
|
|
22
|
+
|
|
23
|
+
```jsx
|
|
24
|
+
import {PrivateMessageComponentSkeleton} from '@selfcommunity/react-templates';
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
#### Component Name
|
|
28
|
+
|
|
29
|
+
The name `SCPrivateMessageComponentSkeleton` can be used when providing style overrides in the theme.
|
|
30
|
+
|
|
31
|
+
#### CSS
|
|
32
|
+
|
|
33
|
+
|Rule Name|Global class|Description|
|
|
34
|
+
|---|---|---|
|
|
35
|
+
|root|.SCPrivateMessageComponentSkeleton-root|Styles applied to the root element.|
|
|
36
|
+
|snippetsSection|.SCPrivateMessageComponentSkeleton-snippets-section|Styles applied to the snippets section|
|
|
37
|
+
|threadSection|.SCPrivateMessageComponentSkeleton-thread-section|Styles applied to the thread section|
|
|
38
|
+
*
|
|
39
|
+
*/
|
|
40
|
+
export default function PrivateMessageComponentSkeleton(props) {
|
|
41
|
+
const { className } = props;
|
|
42
|
+
return (React.createElement(Root, { container: true, className: classNames(classes.root, className) },
|
|
43
|
+
React.createElement(Grid, { item: true, xs: 12, md: 5, className: classes.snippetsSection },
|
|
44
|
+
React.createElement(PrivateMessageSnippetsSkeleton, null)),
|
|
45
|
+
React.createElement(Grid, { item: true, xs: 12, md: 7, className: classes.threadSection },
|
|
46
|
+
React.createElement(PrivateMessageThreadSkeleton, null))));
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=Skeleton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Skeleton.js","sourceRoot":"","sources":["../../../../src/components/PrivateMessageComponent/Skeleton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,MAAM,EAAC,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAC,IAAI,EAAC,MAAM,eAAe,CAAC;AACnC,OAAO,8BAA8B,MAAM,2BAA2B,CAAC;AACvE,OAAO,4BAA4B,MAAM,yBAAyB,CAAC;AACnE,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,MAAM,MAAM,GAAG,mCAAmC,CAAC;AAEnD,MAAM,OAAO,GAAG;IACd,IAAI,EAAE,GAAG,MAAM,OAAO;IACtB,eAAe,EAAE,GAAG,MAAM,mBAAmB;IAC7C,aAAa,EAAE,GAAG,MAAM,iBAAiB;CAC1C,CAAC;AACF,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,EAAE;IACxB,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,iBAAiB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI;CAClD,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAUf;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,OAAO,UAAU,+BAA+B,CAAC,KAAmC;IACzF,MAAM,EAAC,SAAS,EAAC,GAAG,KAAK,CAAC;IAC1B,OAAO,CACL,oBAAC,IAAI,IAAC,SAAS,QAAC,SAAS,EAAE,UAAU,CAAC,OAAO,CAAC,IAAI,EAAE,SAAS,CAAC;QAC5D,oBAAC,IAAI,IAAC,IAAI,QAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,SAAS,EAAE,OAAO,CAAC,eAAe;YAC1D,oBAAC,8BAA8B,OAAG,CAC7B;QACP,oBAAC,IAAI,IAAC,IAAI,QAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,SAAS,EAAE,OAAO,CAAC,aAAa;YACxD,oBAAC,4BAA4B,OAAG,CAC3B,CACF,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import PrivateMessageComponent, { PrivateMessageComponentProps } from './PrivateMessageComponent';
|
|
2
|
+
import PrivateMessageComponentSkeleton from './Skeleton';
|
|
3
|
+
export default PrivateMessageComponent;
|
|
4
|
+
export { PrivateMessageComponentProps, PrivateMessageComponentSkeleton };
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/PrivateMessageComponent/index.tsx"],"names":[],"mappings":"AAAA,OAAO,uBAAuB,EAAE,EAAC,4BAA4B,EAAC,MAAM,2BAA2B,CAAC;AAChG,OAAO,+BAA+B,MAAM,YAAY,CAAC;AACzD,eAAe,uBAAuB,CAAC;AACvC,OAAO,EAAC,4BAA4B,EAAE,+BAA+B,EAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/PrivateMessageComponent/index.tsx"],"names":[],"mappings":"AAAA,OAAO,uBAAuD,MAAM,2BAA2B,CAAC;AAChG,OAAO,+BAA+B,MAAM,YAAY,CAAC;AACzD,eAAe,uBAAuB,CAAC;AACvC,OAAO,EAA+B,+BAA+B,EAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Skeleton.d.ts","sourceRoot":"","sources":["../../../../src/components/PrivateMessageSnippetItem/Skeleton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Skeleton.d.ts","sourceRoot":"","sources":["../../../../src/components/PrivateMessageSnippetItem/Skeleton.tsx"],"names":[],"mappings":"AAsBA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,OAAO,UAAU,iCAAiC,CAAC,KAAK,KAAA,GAAG,GAAG,CAAC,OAAO,CAuB5E"}
|
|
@@ -7,6 +7,7 @@ import { styled } from '@mui/material/styles';
|
|
|
7
7
|
import Skeleton from '@mui/material/Skeleton';
|
|
8
8
|
import Widget from '../Widget';
|
|
9
9
|
import { useTheme } from '@mui/material';
|
|
10
|
+
import Icon from '@mui/material/Icon';
|
|
10
11
|
const PREFIX = 'SCPrivateMessageSnippetItemSkeleton';
|
|
11
12
|
const classes = {
|
|
12
13
|
root: `${PREFIX}-root`,
|
|
@@ -38,7 +39,7 @@ const Root = styled(Widget)(({ theme }) => ({
|
|
|
38
39
|
*/
|
|
39
40
|
export default function PrivateMessageSnippetItemSkeleton(props) {
|
|
40
41
|
const theme = useTheme();
|
|
41
|
-
const m = (React.createElement(ListItem, null,
|
|
42
|
+
const m = (React.createElement(ListItem, { secondaryAction: React.createElement(Icon, null, "more_vert") },
|
|
42
43
|
React.createElement(ListItemAvatar, null,
|
|
43
44
|
React.createElement(Skeleton, { animation: "wave", variant: "circular", width: theme.selfcommunity.user.avatar.sizeMedium, height: theme.selfcommunity.user.avatar.sizeMedium })),
|
|
44
45
|
React.createElement(ListItemText, { primary: React.createElement(Skeleton, { animation: "wave", height: 10, width: 120, style: { marginBottom: 10 } }), secondary: React.createElement(Skeleton, { animation: "wave", height: 10, width: 70, style: { marginBottom: 10 } }) })));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Skeleton.js","sourceRoot":"","sources":["../../../../src/components/PrivateMessageSnippetItem/Skeleton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,cAAc,MAAM,8BAA8B,CAAC;AAC1D,OAAO,YAAY,MAAM,4BAA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AAc;YACb,oBAAC,QAAQ,IACP,SAAS,EAAC,MAAM,EAChB,OAAO,EAAC,UAAU,EAClB,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,EACjD,MAAM,EAAE,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,GAClD,CACa;QACjB,oBAAC,YAAY,IACX,OAAO,EAAE,oBAAC,QAAQ,IAAC,SAAS,EAAC,MAAM,EAAC,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,EAAC,YAAY,EAAE,EAAE,EAAC,GAAI,EACzF,SAAS,EAAE,oBAAC,QAAQ,IAAC,SAAS,EAAC,MAAM,EAAC,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,EAAC,YAAY,EAAE,EAAE,EAAC,GAAI,GAC1F,CACO,CACZ,CAAC;IACF,OAAO,CACL,oBAAC,IAAI,kBAAC,SAAS,EAAE,OAAO,CAAC,IAAI,IAAM,KAAK;QACtC,oBAAC,IAAI,QAAE,CAAC,CAAQ,CACX,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrivateMessageSnippets.d.ts","sourceRoot":"","sources":["../../../../src/components/PrivateMessageSnippets/PrivateMessageSnippets.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAC,2BAA2B,EAAE,0BAA0B,EAAC,MAAM,sBAAsB,CAAC;AA+B7F,MAAM,WAAW,2BAA2B;IAC1C;;;OAGG;IACH,QAAQ,CAAC,EAAE,2BAA2B,EAAE,CAAC;IACzC;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,cAAc,CAAC,EAAE;QACf,cAAc,CAAC,EAAE,CAAC,GAAG,KAAA,KAAK,IAAI,CAAC;QAC/B,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;QAC/B,eAAe,CAAC,EAAE,CAAC,GAAG,KAAA,KAAK,IAAI,CAAC;KACjC,CAAC;IACF;;OAEG;IACH,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;IACjB;;;OAGG;IACH,SAAS,CAAC,EAAE,0BAA0B,CAAC;CACxC;AACD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAAC,OAAO,EAAE,2BAA2B,GAAG,GAAG,CAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"PrivateMessageSnippets.d.ts","sourceRoot":"","sources":["../../../../src/components/PrivateMessageSnippets/PrivateMessageSnippets.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAC,2BAA2B,EAAE,0BAA0B,EAAC,MAAM,sBAAsB,CAAC;AA+B7F,MAAM,WAAW,2BAA2B;IAC1C;;;OAGG;IACH,QAAQ,CAAC,EAAE,2BAA2B,EAAE,CAAC;IACzC;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,cAAc,CAAC,EAAE;QACf,cAAc,CAAC,EAAE,CAAC,GAAG,KAAA,KAAK,IAAI,CAAC;QAC/B,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;QAC/B,eAAe,CAAC,EAAE,CAAC,GAAG,KAAA,KAAK,IAAI,CAAC;KACjC,CAAC;IACF;;OAEG;IACH,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;IACjB;;;OAGG;IACH,SAAS,CAAC,EAAE,0BAA0B,CAAC;CACxC;AACD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAAC,OAAO,EAAE,2BAA2B,GAAG,GAAG,CAAC,OAAO,CA6GhG"}
|
|
@@ -74,7 +74,6 @@ export default function PrivateMessageSnippets(inProps) {
|
|
|
74
74
|
name: PREFIX
|
|
75
75
|
});
|
|
76
76
|
const { snippets = [], loading, autoHide = false, className = null, threadObj = null, snippetActions, clearSearch } = props, rest = __rest(props, ["snippets", "loading", "autoHide", "className", "threadObj", "snippetActions", "clearSearch"]);
|
|
77
|
-
console.log(threadObj);
|
|
78
77
|
// STATE
|
|
79
78
|
const [search, setSearch] = useState('');
|
|
80
79
|
// INTL
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrivateMessageSnippets.js","sourceRoot":"","sources":["../../../../src/components/PrivateMessageSnippets/PrivateMessageSnippets.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAC,SAAS,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AACjD,OAAO,EAAC,MAAM,EAAC,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAC,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,EAAC,MAAM,eAAe,CAAC;AACrF,OAAO,MAAM,MAAM,WAAW,CAAC;AAE/B,OAAO,8BAA8B,MAAM,YAAY,CAAC;AACxD,OAAO,yBAAyB,MAAM,8BAA8B,CAAC;AACrE,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAC,aAAa,EAAC,MAAM,aAAa,CAAC;AAC1C,OAAO,iBAAiB,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAC,cAAc,EAAE,gBAAgB,EAAE,OAAO,EAAC,MAAM,YAAY,CAAC;AAErE,MAAM,QAAQ,GAAG,cAAc,CAAC;IAC9B,WAAW,EAAE;QACX,EAAE,EAAE,kDAAkD;QACtD,cAAc,EAAE,kDAAkD;KACnE;CACF,CAAC,CAAC;AACH,MAAM,MAAM,GAAG,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O,CAAC,IAAI,aAAe;4BAC5D,YAAY,EAAE,CACZ,oBAAC,UAAU,IAAC,SAAS,EAAE,OAAO,CAAC,KAAK,EAAE,QAAQ,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAC,OAAO;gCACzF,oBAAC,IAAI,gBAAa,CACP,CACd;yBACF,GACD;oBACF,oBAAC,IAAI,QACF,gBAAgB,CAAC,GAAG,CAAC,CAAC,OAAoC,EAAE,EAAE,CAAC,CAC9D,oBAAC,yBAAyB,IACxB,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,OAAO,CAAC,EAAE,EACf,OAAO,EAAE,EAAC,WAAW,EAAE,GAAG,EAAE,CAAC,gBAAgB,CAAC,OAAO,CAAC,EAAE,WAAW,EAAE,GAAG,EAAE,CAAC,wBAAwB,CAAC,OAAO,CAAC,EAAC,EAC7G,QAAQ,EACN,OAAO,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,EAAE,CAAC,IAAI,OAAO,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,QAAQ,CAAC,EAAE,CAAC,GAElI,CACH,CAAC,CACG,CACN,CACJ,CACW,CACT,CACR,CAAC;KACH;IACD,OAAO,oBAAC,iBAAiB,OAAG,CAAC;AAC/B,CAAC"}
|
|
@@ -16,6 +16,8 @@
|
|
|
16
16
|
|Rule Name|Global class|Description|
|
|
17
17
|
|---|---|---|
|
|
18
18
|
|root|.SCPrivateMessageSnippetsSkeleton-root|Styles applied to the root element.|
|
|
19
|
+
|searchBar|.SCPrivateMessageSnippetsSkeleton-search-bar|Styles applied to the search bar element.|
|
|
20
|
+
|button|.SCPrivateMessageSnippetsSkeleton-button|Styles applied to the button element.|
|
|
19
21
|
|list|.SCPrivateMessageSnippetsSkeleton-list|Styles applied to the list element.|
|
|
20
22
|
*
|
|
21
23
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Skeleton.d.ts","sourceRoot":"","sources":["../../../../src/components/PrivateMessageSnippets/Skeleton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Skeleton.d.ts","sourceRoot":"","sources":["../../../../src/components/PrivateMessageSnippets/Skeleton.tsx"],"names":[],"mappings":"AAkBA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAC,OAAO,UAAU,8BAA8B,CAAC,KAAK,KAAA,GAAG,GAAG,CAAC,OAAO,CAgBzE"}
|
|
@@ -3,10 +3,12 @@ import Widget from '../Widget';
|
|
|
3
3
|
import List from '@mui/material/List';
|
|
4
4
|
import { styled } from '@mui/material/styles';
|
|
5
5
|
import PrivateMessageSnippetItemSkeleton from '../PrivateMessageSnippetItem/Skeleton';
|
|
6
|
-
import { CardContent } from '@mui/material';
|
|
6
|
+
import { Button, CardContent, Skeleton } from '@mui/material';
|
|
7
7
|
const PREFIX = 'SCPrivateMessageSnippetsSkeleton';
|
|
8
8
|
const classes = {
|
|
9
9
|
root: `${PREFIX}-root`,
|
|
10
|
+
searchBar: `${PREFIX}-search-bar`,
|
|
11
|
+
button: `${PREFIX}-button`,
|
|
10
12
|
list: `${PREFIX}-list`
|
|
11
13
|
};
|
|
12
14
|
const Root = styled(Widget)(({ theme }) => ({}));
|
|
@@ -28,12 +30,17 @@ const Root = styled(Widget)(({ theme }) => ({}));
|
|
|
28
30
|
|Rule Name|Global class|Description|
|
|
29
31
|
|---|---|---|
|
|
30
32
|
|root|.SCPrivateMessageSnippetsSkeleton-root|Styles applied to the root element.|
|
|
33
|
+
|searchBar|.SCPrivateMessageSnippetsSkeleton-search-bar|Styles applied to the search bar element.|
|
|
34
|
+
|button|.SCPrivateMessageSnippetsSkeleton-button|Styles applied to the button element.|
|
|
31
35
|
|list|.SCPrivateMessageSnippetsSkeleton-list|Styles applied to the list element.|
|
|
32
36
|
*
|
|
33
37
|
*/
|
|
34
38
|
export default function PrivateMessageSnippetsSkeleton(props) {
|
|
35
39
|
return (React.createElement(Root, Object.assign({ className: classes.root }, props),
|
|
36
40
|
React.createElement(CardContent, null,
|
|
37
|
-
React.createElement(
|
|
41
|
+
React.createElement(Button, { variant: "outlined", size: "medium", disabled: true, className: classes.button },
|
|
42
|
+
React.createElement(Skeleton, { height: 20, width: 100, variant: 'rectangular' })),
|
|
43
|
+
React.createElement(Skeleton, { height: 30, width: '100%', variant: 'rounded', className: classes.searchBar }),
|
|
44
|
+
React.createElement(List, { className: classes.list }, [...Array(5)].map((category, index) => (React.createElement(PrivateMessageSnippetItemSkeleton, { key: index, elevation: 0 })))))));
|
|
38
45
|
}
|
|
39
46
|
//# sourceMappingURL=Skeleton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Skeleton.js","sourceRoot":"","sources":["../../../../src/components/PrivateMessageSnippets/Skeleton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,EAAC,MAAM,EAAC,MAAM,sBAAsB,CAAC;AAC5C,OAAO,iCAAiC,MAAM,uCAAuC,CAAC;AACtF,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"Skeleton.js","sourceRoot":"","sources":["../../../../src/components/PrivateMessageSnippets/Skeleton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,EAAC,MAAM,EAAC,MAAM,sBAAsB,CAAC;AAC5C,OAAO,iCAAiC,MAAM,uCAAuC,CAAC;AACtF,OAAO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;AACJ,CAAC"}
|
|
@@ -1,10 +1,26 @@
|
|
|
1
|
-
import { SCPrivateMessageThreadType } from '@selfcommunity/types';
|
|
1
|
+
import { SCPrivateMessageFileType, SCPrivateMessageThreadType } from '@selfcommunity/types';
|
|
2
2
|
export interface PrivateMessageThreadProps {
|
|
3
3
|
/**
|
|
4
4
|
* Thread object or thread id
|
|
5
5
|
* default null
|
|
6
6
|
*/
|
|
7
7
|
threadObj?: SCPrivateMessageThreadType | any;
|
|
8
|
+
/**
|
|
9
|
+
* Thread receiver
|
|
10
|
+
*/
|
|
11
|
+
receiver?: any;
|
|
12
|
+
/**
|
|
13
|
+
* Thread recipients
|
|
14
|
+
*/
|
|
15
|
+
recipients?: any;
|
|
16
|
+
/**
|
|
17
|
+
* Loading state
|
|
18
|
+
*/
|
|
19
|
+
loadingMessageObjs?: boolean;
|
|
20
|
+
/***
|
|
21
|
+
* Thread messages
|
|
22
|
+
*/
|
|
23
|
+
messages?: SCPrivateMessageThreadType[];
|
|
8
24
|
/**
|
|
9
25
|
* Overrides or extends the styles applied to the component.
|
|
10
26
|
* @default null
|
|
@@ -20,21 +36,19 @@ export interface PrivateMessageThreadProps {
|
|
|
20
36
|
* @default false
|
|
21
37
|
*/
|
|
22
38
|
openNewMessage?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Opens new message screen
|
|
41
|
+
* @default false
|
|
42
|
+
*/
|
|
43
|
+
newMessageThread?: boolean;
|
|
23
44
|
/**
|
|
24
45
|
* Functions called on thread actions
|
|
25
46
|
*/
|
|
26
47
|
threadCallbacks?: {
|
|
27
|
-
/**
|
|
28
|
-
* Callback fired when a message is sent
|
|
29
|
-
* @param data
|
|
30
|
-
* @default null
|
|
31
|
-
*/
|
|
32
|
-
onMessageSentOrDeleted?: (data: any) => void;
|
|
33
|
-
/**
|
|
34
|
-
* Callback fired only when exiting a thread.
|
|
35
|
-
* @default null
|
|
36
|
-
*/
|
|
37
48
|
onMessageBack?: (dispatch: any) => void;
|
|
49
|
+
onMessageDelete?: (msg: SCPrivateMessageThreadType) => void;
|
|
50
|
+
onMessageSend?: (message: string, file: SCPrivateMessageFileType) => void;
|
|
51
|
+
onRecipientSelect?: (event: any, recipient: any) => void;
|
|
38
52
|
};
|
|
39
53
|
/**
|
|
40
54
|
* Any other properties
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrivateMessageThread.d.ts","sourceRoot":"","sources":["../../../../src/components/PrivateMessageThread/PrivateMessageThread.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PrivateMessageThread.d.ts","sourceRoot":"","sources":["../../../../src/components/PrivateMessageThread/PrivateMessageThread.tsx"],"names":[],"mappings":"AAYA,OAAO,EAAC,wBAAwB,EAAE,0BAA0B,EAAC,MAAM,sBAAsB,CAAC;AA2C1F,MAAM,WAAW,yBAAyB;IACxC;;;OAGG;IACH,SAAS,CAAC,EAAE,0BAA0B,GAAG,GAAG,CAAC;IAC7C;;OAEG;IACH,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf;;OAEG;IACH,UAAU,CAAC,EAAE,GAAG,CAAC;IACjB;;OAEG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;OAEG;IACH,QAAQ,CAAC,EAAE,0BAA0B,EAAE,CAAC;IACxC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;OAEG;IACH,eAAe,CAAC,EAAE;QAChB,aAAa,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,KAAK,IAAI,CAAC;QACxC,eAAe,CAAC,EAAE,CAAC,GAAG,EAAE,0BAA0B,KAAK,IAAI,CAAC;QAC5D,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,wBAAwB,KAAK,IAAI,CAAC;QAC1E,iBAAiB,CAAC,EAAE,CAAC,KAAK,KAAA,EAAE,SAAS,KAAA,KAAK,IAAI,CAAC;KAChD,CAAC;IACF;;OAEG;IACH,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;CAClB;AACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,OAAO,EAAE,yBAAyB,GAAG,GAAG,CAAC,OAAO,CA2N5F"}
|
|
@@ -9,29 +9,25 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
9
9
|
}
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
|
-
import React, { useContext, useEffect, useMemo, useState
|
|
12
|
+
import React, { useContext, useEffect, useMemo, useState } from 'react';
|
|
13
13
|
import { styled } from '@mui/material/styles';
|
|
14
14
|
import Widget from '../Widget';
|
|
15
|
-
import {
|
|
16
|
-
import { SCPreferences, SCPreferencesContext, SCUserContext
|
|
17
|
-
import { SCNotificationTopicType, SCNotificationTypologyType } from '@selfcommunity/types';
|
|
15
|
+
import { UserService } from '@selfcommunity/api-services';
|
|
16
|
+
import { SCPreferences, SCPreferencesContext, SCUserContext } from '@selfcommunity/react-core';
|
|
18
17
|
import PrivateMessageThreadItem from '../PrivateMessageThreadItem';
|
|
19
18
|
import _ from 'lodash';
|
|
20
19
|
import { defineMessages, FormattedMessage, useIntl } from 'react-intl';
|
|
21
20
|
import { Box, CardContent, IconButton, List, ListSubheader, TextField, Typography } from '@mui/material';
|
|
22
|
-
import ConfirmDialog from '../../shared/ConfirmDialog/ConfirmDialog';
|
|
23
21
|
import PrivateMessageEditor from '../PrivateMessageEditor';
|
|
24
22
|
import Autocomplete from '@mui/material/Autocomplete';
|
|
25
23
|
import classNames from 'classnames';
|
|
26
|
-
import { useSnackbar } from 'notistack';
|
|
27
|
-
import PubSub from 'pubsub-js';
|
|
28
24
|
import { useThemeProps } from '@mui/system';
|
|
29
25
|
import Icon from '@mui/material/Icon';
|
|
30
26
|
import PrivateMessageThreadSkeleton from './Skeleton';
|
|
31
27
|
import { SCOPE_SC_UI } from '../../constants/Errors';
|
|
32
28
|
import { Logger } from '@selfcommunity/utils';
|
|
33
29
|
import HiddenPlaceholder from '../../shared/HiddenPlaceholder';
|
|
34
|
-
const
|
|
30
|
+
const translMessages = defineMessages({
|
|
35
31
|
placeholder: {
|
|
36
32
|
id: 'ui.privateMessage.thread.newMessage.autocomplete.placeholder',
|
|
37
33
|
defaultMessage: 'ui.privateMessage.thread.newMessage.autocomplete.placeholder'
|
|
@@ -93,28 +89,19 @@ export default function PrivateMessageThread(inProps) {
|
|
|
93
89
|
props: inProps,
|
|
94
90
|
name: PREFIX
|
|
95
91
|
});
|
|
96
|
-
const { threadObj,
|
|
92
|
+
const { threadObj, messages, loadingMessageObjs, receiver, recipients, openNewMessage, threadCallbacks, newMessageThread, autoHide, className } = props, rest = __rest(props, ["threadObj", "messages", "loadingMessageObjs", "receiver", "recipients", "openNewMessage", "threadCallbacks", "newMessageThread", "autoHide", "className"]);
|
|
97
93
|
// CONTEXT
|
|
98
94
|
const scUserContext = useContext(SCUserContext);
|
|
99
|
-
const { enqueueSnackbar, closeSnackbar } = useSnackbar();
|
|
100
95
|
const scPreferencesContext = useContext(SCPreferencesContext);
|
|
101
96
|
const followEnabled = SCPreferences.CONFIGURATIONS_FOLLOW_ENABLED in scPreferencesContext.preferences &&
|
|
102
97
|
scPreferencesContext.preferences[SCPreferences.CONFIGURATIONS_FOLLOW_ENABLED].value;
|
|
103
98
|
// STATE
|
|
104
99
|
const scFollowersManager = scUserContext.managers.followers;
|
|
105
100
|
const [loading, setLoading] = useState(true);
|
|
106
|
-
const [messageObjs, setMessageObjs] = useState([]);
|
|
107
101
|
const [isHovered, setIsHovered] = useState({});
|
|
108
|
-
const [openDeleteMessageDialog, setOpenDeleteMessageDialog] = useState(false);
|
|
109
|
-
const [deletingMsg, setDeletingMsg] = useState(null);
|
|
110
102
|
const [followers, setFollowers] = useState([]);
|
|
111
|
-
const [recipients, setRecipients] = useState([]);
|
|
112
103
|
const [isFollower, setIsFollower] = useState(false);
|
|
113
|
-
const [receiver, setReceiver] = useState(null);
|
|
114
|
-
const [newMessageThread, setNewMessageThread] = useState(false);
|
|
115
104
|
const isNumber = typeof threadObj === 'number';
|
|
116
|
-
// REFS
|
|
117
|
-
const refreshSubscription = useRef(null);
|
|
118
105
|
const authUserId = scUserContext.user ? scUserContext.user.id : null;
|
|
119
106
|
// INTL
|
|
120
107
|
const intl = useIntl();
|
|
@@ -124,13 +111,14 @@ export default function PrivateMessageThread(inProps) {
|
|
|
124
111
|
day: 'numeric',
|
|
125
112
|
month: 'long'
|
|
126
113
|
});
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
return _.groupBy(messageObjs, format);
|
|
114
|
+
const formatMessages = (messages) => {
|
|
115
|
+
return _.groupBy(messages, format);
|
|
130
116
|
};
|
|
117
|
+
// CONST
|
|
131
118
|
const formattedMessages = useMemo(() => {
|
|
132
|
-
return formatMessages(
|
|
133
|
-
}, [
|
|
119
|
+
return formatMessages(messages);
|
|
120
|
+
}, [messages]);
|
|
121
|
+
// HANDLERS
|
|
134
122
|
const handleMouseEnter = (index) => {
|
|
135
123
|
setIsHovered((prevState) => {
|
|
136
124
|
return Object.assign(Object.assign({}, prevState), { [index]: true });
|
|
@@ -141,92 +129,6 @@ export default function PrivateMessageThread(inProps) {
|
|
|
141
129
|
return Object.assign(Object.assign({}, prevState), { [index]: false });
|
|
142
130
|
});
|
|
143
131
|
};
|
|
144
|
-
const handleCloseDeleteDialog = () => {
|
|
145
|
-
setOpenDeleteMessageDialog(false);
|
|
146
|
-
};
|
|
147
|
-
const handleOpenDeleteDialog = (msg) => {
|
|
148
|
-
setOpenDeleteMessageDialog(true);
|
|
149
|
-
setDeletingMsg(msg);
|
|
150
|
-
};
|
|
151
|
-
const selectRecipients = (event, recipient) => {
|
|
152
|
-
setRecipients(recipient);
|
|
153
|
-
};
|
|
154
|
-
/**
|
|
155
|
-
* Memoized message recipients ids
|
|
156
|
-
*/
|
|
157
|
-
const ids = useMemo(() => {
|
|
158
|
-
if (recipients !== null && openNewMessage) {
|
|
159
|
-
return recipients.map((u) => {
|
|
160
|
-
return parseInt(u.id, 10);
|
|
161
|
-
});
|
|
162
|
-
}
|
|
163
|
-
if (newMessageThread && !openNewMessage) {
|
|
164
|
-
return recipients;
|
|
165
|
-
}
|
|
166
|
-
}, [recipients]);
|
|
167
|
-
/**
|
|
168
|
-
* Handles the deletion of a single message
|
|
169
|
-
*/
|
|
170
|
-
function handleDelete() {
|
|
171
|
-
PrivateMessageService.deleteAMessage(deletingMsg.id)
|
|
172
|
-
.then(() => {
|
|
173
|
-
const result = messageObjs.filter((m) => m.id !== deletingMsg.id);
|
|
174
|
-
setMessageObjs(result);
|
|
175
|
-
threadCallbacks.onMessageSentOrDeleted(result.length >= 1 ? result.slice(-1)[0] : deletingMsg);
|
|
176
|
-
handleCloseDeleteDialog();
|
|
177
|
-
})
|
|
178
|
-
.catch((error) => {
|
|
179
|
-
console.log(error);
|
|
180
|
-
let _snackBar = enqueueSnackbar(React.createElement(FormattedMessage, { id: "ui.common.error", defaultMessage: "ui.common.error" }), {
|
|
181
|
-
variant: 'error',
|
|
182
|
-
onClick: () => {
|
|
183
|
-
closeSnackbar(_snackBar);
|
|
184
|
-
}
|
|
185
|
-
});
|
|
186
|
-
});
|
|
187
|
-
}
|
|
188
|
-
/**
|
|
189
|
-
* Sends a message
|
|
190
|
-
* @param message
|
|
191
|
-
* @param file
|
|
192
|
-
*/
|
|
193
|
-
function sendMessage(message, file) {
|
|
194
|
-
if (UserUtils.isBlocked(scUserContext.user)) {
|
|
195
|
-
enqueueSnackbar(React.createElement(FormattedMessage, { id: "ui.common.userBlocked", defaultMessage: "ui.common.userBlocked" }), {
|
|
196
|
-
variant: 'warning',
|
|
197
|
-
autoHideDuration: 3000
|
|
198
|
-
});
|
|
199
|
-
}
|
|
200
|
-
else {
|
|
201
|
-
http
|
|
202
|
-
.request({
|
|
203
|
-
url: Endpoints.SendMessage.url(),
|
|
204
|
-
method: Endpoints.SendMessage.method,
|
|
205
|
-
data: {
|
|
206
|
-
recipients: openNewMessage ? ids : [isNumber ? receiver.id : threadObj.receiver.id],
|
|
207
|
-
message: message,
|
|
208
|
-
file_uuid: file && !message ? file : null
|
|
209
|
-
}
|
|
210
|
-
})
|
|
211
|
-
.then((res) => {
|
|
212
|
-
setMessageObjs((prev) => [...prev, res.data]);
|
|
213
|
-
threadCallbacks.onMessageSentOrDeleted(res.data);
|
|
214
|
-
if (openNewMessage || newMessageThread) {
|
|
215
|
-
setNewMessageThread(false);
|
|
216
|
-
setRecipients([]);
|
|
217
|
-
}
|
|
218
|
-
})
|
|
219
|
-
.catch((error) => {
|
|
220
|
-
console.log(error);
|
|
221
|
-
let _snackBar = enqueueSnackbar(React.createElement(FormattedMessage, { id: "ui.common.error.messageError", defaultMessage: "ui.common.error.messageError" }), {
|
|
222
|
-
variant: 'error',
|
|
223
|
-
onClick: () => {
|
|
224
|
-
closeSnackbar(_snackBar);
|
|
225
|
-
}
|
|
226
|
-
});
|
|
227
|
-
});
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
132
|
/**
|
|
231
133
|
* Memoized fetchFollowers
|
|
232
134
|
*/
|
|
@@ -250,50 +152,11 @@ export default function PrivateMessageThread(inProps) {
|
|
|
250
152
|
});
|
|
251
153
|
}, []);
|
|
252
154
|
/**
|
|
253
|
-
* Fetches
|
|
254
|
-
*/
|
|
255
|
-
function fetchThread() {
|
|
256
|
-
const _threadObjId = isNumber ? threadObj : threadObj === null || threadObj === void 0 ? void 0 : threadObj.id;
|
|
257
|
-
http
|
|
258
|
-
.request({
|
|
259
|
-
url: Endpoints.GetAThread.url(),
|
|
260
|
-
method: Endpoints.GetAThread.method,
|
|
261
|
-
params: {
|
|
262
|
-
thread: _threadObjId
|
|
263
|
-
}
|
|
264
|
-
})
|
|
265
|
-
.then((res) => {
|
|
266
|
-
const data = res.data;
|
|
267
|
-
setMessageObjs(data.results);
|
|
268
|
-
if (data.results.length) {
|
|
269
|
-
if (data.results[0].receiver.id !== scUserContext.user.id) {
|
|
270
|
-
setReceiver(data.results[0].receiver);
|
|
271
|
-
}
|
|
272
|
-
else {
|
|
273
|
-
setReceiver(data.results[0].sender);
|
|
274
|
-
}
|
|
275
|
-
setNewMessageThread(false);
|
|
276
|
-
}
|
|
277
|
-
else {
|
|
278
|
-
setNewMessageThread(true);
|
|
279
|
-
setRecipients(_threadObjId);
|
|
280
|
-
}
|
|
281
|
-
setLoading(false);
|
|
282
|
-
})
|
|
283
|
-
.catch((error) => {
|
|
284
|
-
setLoading(false);
|
|
285
|
-
console.log(error);
|
|
286
|
-
Logger.error(SCOPE_SC_UI, { error });
|
|
287
|
-
});
|
|
288
|
-
}
|
|
289
|
-
/**
|
|
290
|
-
* On mount, fetches thread
|
|
291
|
-
* if openNewMessage is true, fetches user followers too.
|
|
155
|
+
* Fetches followers when a new message is selected
|
|
292
156
|
*/
|
|
293
157
|
useEffect(() => {
|
|
294
|
-
threadObj && fetchThread();
|
|
295
158
|
openNewMessage && fetchFollowers();
|
|
296
|
-
}, [
|
|
159
|
+
}, [openNewMessage, authUserId]);
|
|
297
160
|
/**
|
|
298
161
|
* Checks is thread receiver is a user follower
|
|
299
162
|
*/
|
|
@@ -302,39 +165,18 @@ export default function PrivateMessageThread(inProps) {
|
|
|
302
165
|
setIsFollower(scFollowersManager.isFollower(receiver));
|
|
303
166
|
}
|
|
304
167
|
});
|
|
305
|
-
/**
|
|
306
|
-
* When a ws notification arrives, update data
|
|
307
|
-
*/
|
|
308
|
-
useEffect(() => {
|
|
309
|
-
refreshSubscription.current = PubSub.subscribe(`${SCNotificationTopicType.INTERACTION}.${SCNotificationTypologyType.PRIVATE_MESSAGE}`, subscriber);
|
|
310
|
-
return () => {
|
|
311
|
-
PubSub.unsubscribe(refreshSubscription.current);
|
|
312
|
-
};
|
|
313
|
-
}, [messageObjs]);
|
|
314
|
-
/**
|
|
315
|
-
* Notification subscriber
|
|
316
|
-
*/
|
|
317
|
-
const subscriber = (msg, data) => {
|
|
318
|
-
const res = data.data;
|
|
319
|
-
const newMessages = [...messageObjs];
|
|
320
|
-
const index = newMessages.findIndex((m) => m.sender.id === res.notification_obj.message.sender.id);
|
|
321
|
-
if (index !== -1) {
|
|
322
|
-
setMessageObjs((prev) => [...prev, res.notification_obj.message]);
|
|
323
|
-
}
|
|
324
|
-
};
|
|
325
168
|
/**
|
|
326
169
|
* Renders thread component
|
|
327
170
|
* @return {JSX.Element}
|
|
328
171
|
*/
|
|
329
172
|
function renderThread() {
|
|
330
173
|
return (React.createElement(CardContent, null,
|
|
331
|
-
React.createElement(List, { subheader: React.createElement("li", null) }, Object.keys(formattedMessages).map((key
|
|
174
|
+
React.createElement(List, { subheader: React.createElement("li", null) }, Object.keys(formattedMessages).map((key) => (React.createElement("li", { key: key, className: classes.section },
|
|
332
175
|
React.createElement("ul", null,
|
|
333
176
|
React.createElement(ListSubheader, null,
|
|
334
177
|
React.createElement(Typography, { align: "center", className: classes.subHeader }, key)),
|
|
335
|
-
formattedMessages[key].map((msg
|
|
336
|
-
React.createElement(PrivateMessageEditor, { send:
|
|
337
|
-
openDeleteMessageDialog && (React.createElement(ConfirmDialog, { open: openDeleteMessageDialog, title: React.createElement(FormattedMessage, { id: "ui.privateMessage.thread.message.dialog.msg", defaultMessage: "ui.privateMessage.thread.message.dialog.msg" }), btnConfirm: React.createElement(FormattedMessage, { id: "ui.privateMessage.thread.message.dialog.confirm", defaultMessage: "ui.privateMessage.thread.message.dialog.confirm" }), onConfirm: () => handleDelete(), onClose: handleCloseDeleteDialog }))));
|
|
178
|
+
formattedMessages[key].map((msg) => (React.createElement(PrivateMessageThreadItem, { className: authUserId === msg.sender.id ? classes.sender : classes.receiver, message: msg, key: msg.id, mouseEvents: { onMouseEnter: () => handleMouseEnter(msg.id), onMouseLeave: () => handleMouseLeave(msg.id) }, isHovering: isHovered[msg.id], showMenuIcon: authUserId === msg.sender.id, onMenuIconClick: () => threadCallbacks.onMessageDelete(msg) })))))))),
|
|
179
|
+
React.createElement(PrivateMessageEditor, { send: threadCallbacks.onMessageSend, autoHide: !isFollower, onThreadChangeId: isNumber ? threadObj : threadObj === null || threadObj === void 0 ? void 0 : threadObj.id })));
|
|
338
180
|
}
|
|
339
181
|
/**
|
|
340
182
|
* Renders empty box (when there is no thread open) or new message box
|
|
@@ -347,17 +189,17 @@ export default function PrivateMessageThread(inProps) {
|
|
|
347
189
|
React.createElement(Icon, { className: classes.newMessageHeaderIcon }, "person"),
|
|
348
190
|
React.createElement(Typography, null,
|
|
349
191
|
React.createElement(FormattedMessage, { defaultMessage: "ui.privateMessage.thread.newMessage.to", id: "ui.privateMessage.thread.newMessage.to" })),
|
|
350
|
-
React.createElement(Autocomplete, { className: classes.autocomplete, multiple: !newMessageThread, limitTags: 3, freeSolo: true, options: followers, value: newMessageThread ? (isNumber ? threadObj : threadObj === null || threadObj === void 0 ? void 0 : threadObj.id) : recipients, getOptionLabel: (option) => (option ? option.username : '...'), renderInput: (params) => (React.createElement(TextField, Object.assign({}, params, { placeholder: `${intl.formatMessage(
|
|
192
|
+
React.createElement(Autocomplete, { className: classes.autocomplete, loading: loading, multiple: !newMessageThread, limitTags: 3, freeSolo: true, options: followers, value: newMessageThread ? (isNumber ? threadObj : threadObj === null || threadObj === void 0 ? void 0 : threadObj.receiver.id) : recipients, getOptionLabel: (option) => (option ? option.username : '...'), renderInput: (params) => (React.createElement(TextField, Object.assign({}, params, { placeholder: `${intl.formatMessage(translMessages.placeholder)}`, variant: "standard", InputProps: Object.assign(Object.assign({}, params.InputProps), { disableUnderline: true }) }))), onChange: threadCallbacks.onRecipientSelect, disabled: !followers })),
|
|
351
193
|
React.createElement(IconButton, { size: "small", onClick: threadCallbacks.onMessageBack },
|
|
352
194
|
React.createElement(Icon, { fontSize: "small" }, "close"))),
|
|
353
|
-
React.createElement(PrivateMessageEditor, { send:
|
|
195
|
+
React.createElement(PrivateMessageEditor, { send: threadCallbacks.onMessageSend, autoHide: !followers }))) : (React.createElement(Typography, { component: "span", className: classes.emptyMessage },
|
|
354
196
|
React.createElement(FormattedMessage, { id: "ui.privateMessage.thread.emptyBox.message", defaultMessage: "ui.privateMessage.thread.emptyBox.message" })))));
|
|
355
197
|
}
|
|
356
198
|
// Anonymous
|
|
357
199
|
if (!scUserContext.user) {
|
|
358
200
|
return React.createElement(HiddenPlaceholder, null);
|
|
359
201
|
}
|
|
360
|
-
if (
|
|
202
|
+
if (loadingMessageObjs && threadObj) {
|
|
361
203
|
return React.createElement(PrivateMessageThreadSkeleton, null);
|
|
362
204
|
}
|
|
363
205
|
/**
|
|
@@ -366,6 +208,6 @@ export default function PrivateMessageThread(inProps) {
|
|
|
366
208
|
if (!autoHide) {
|
|
367
209
|
return (React.createElement(Root, Object.assign({}, rest, { className: classNames(classes.root, className) }), threadObj && !newMessageThread ? renderThread() : renderNewOrNoMessageBox()));
|
|
368
210
|
}
|
|
369
|
-
return null;
|
|
211
|
+
return React.createElement(HiddenPlaceholder, null);
|
|
370
212
|
}
|
|
371
213
|
//# sourceMappingURL=PrivateMessageThread.js.map
|