@selfcommunity/react-ui 0.7.0-alpha.82 → 0.7.0-alpha.83
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/NavigationToolbarMobile/NavigationToolbarMobile.d.ts +5 -0
- package/lib/cjs/components/NavigationToolbarMobile/NavigationToolbarMobile.d.ts.map +1 -1
- package/lib/cjs/components/NavigationToolbarMobile/NavigationToolbarMobile.js +7 -6
- package/lib/cjs/components/NavigationToolbarMobile/NavigationToolbarMobile.js.map +1 -1
- package/lib/cjs/components/PrivateMessageActionDrawer/PrivateMessageActionDrawer.d.ts +43 -0
- package/lib/cjs/components/PrivateMessageActionDrawer/PrivateMessageActionDrawer.d.ts.map +1 -0
- package/lib/cjs/components/PrivateMessageActionDrawer/PrivateMessageActionDrawer.js +74 -0
- package/lib/cjs/components/PrivateMessageActionDrawer/PrivateMessageActionDrawer.js.map +1 -0
- package/lib/cjs/components/PrivateMessageActionDrawer/Skeleton.d.ts +22 -0
- package/lib/cjs/components/PrivateMessageActionDrawer/Skeleton.d.ts.map +1 -0
- package/lib/cjs/components/PrivateMessageActionDrawer/Skeleton.js +38 -0
- package/lib/cjs/components/PrivateMessageActionDrawer/Skeleton.js.map +1 -0
- package/lib/cjs/components/PrivateMessageActionDrawer/index.d.ts +5 -0
- package/lib/cjs/components/PrivateMessageActionDrawer/index.d.ts.map +1 -0
- package/lib/cjs/components/PrivateMessageActionDrawer/index.js +11 -0
- package/lib/cjs/components/PrivateMessageActionDrawer/index.js.map +1 -0
- package/lib/cjs/components/PrivateMessageActionMenu/PrivateMessageActionMenu.d.ts +43 -0
- package/lib/cjs/components/PrivateMessageActionMenu/PrivateMessageActionMenu.d.ts.map +1 -0
- package/lib/cjs/components/PrivateMessageActionMenu/PrivateMessageActionMenu.js +74 -0
- package/lib/cjs/components/PrivateMessageActionMenu/PrivateMessageActionMenu.js.map +1 -0
- package/lib/cjs/components/PrivateMessageActionMenu/Skeleton.d.ts +23 -0
- package/lib/cjs/components/PrivateMessageActionMenu/Skeleton.d.ts.map +1 -0
- package/lib/cjs/components/PrivateMessageActionMenu/Skeleton.js +39 -0
- package/lib/cjs/components/PrivateMessageActionMenu/Skeleton.js.map +1 -0
- package/lib/cjs/components/PrivateMessageActionMenu/index.d.ts +5 -0
- package/lib/cjs/components/PrivateMessageActionMenu/index.d.ts.map +1 -0
- package/lib/cjs/components/PrivateMessageActionMenu/index.js +11 -0
- package/lib/cjs/components/PrivateMessageActionMenu/index.js.map +1 -0
- package/lib/cjs/components/PrivateMessageSnippetItem/PrivateMessageSnippetItem.d.ts.map +1 -1
- package/lib/cjs/components/PrivateMessageSnippetItem/PrivateMessageSnippetItem.js +2 -5
- package/lib/cjs/components/PrivateMessageSnippetItem/PrivateMessageSnippetItem.js.map +1 -1
- package/lib/cjs/components/PrivateMessageSnippets/PrivateMessageSnippets.js +5 -5
- package/lib/cjs/components/PrivateMessageSnippets/PrivateMessageSnippets.js.map +1 -1
- package/lib/cjs/components/PrivateMessageThread/PrivateMessageThread.d.ts +1 -3
- package/lib/cjs/components/PrivateMessageThread/PrivateMessageThread.d.ts.map +1 -1
- package/lib/cjs/components/PrivateMessageThread/PrivateMessageThread.js +4 -14
- package/lib/cjs/components/PrivateMessageThread/PrivateMessageThread.js.map +1 -1
- package/lib/cjs/components/PrivateMessageThreadItem/PrivateMessageThreadItem.d.ts.map +1 -1
- package/lib/cjs/components/PrivateMessageThreadItem/PrivateMessageThreadItem.js +6 -5
- package/lib/cjs/components/PrivateMessageThreadItem/PrivateMessageThreadItem.js.map +1 -1
- package/lib/cjs/index.d.ts +3 -1
- package/lib/cjs/index.d.ts.map +1 -1
- package/lib/cjs/index.js +9 -2
- package/lib/cjs/index.js.map +1 -1
- package/lib/esm/components/NavigationToolbarMobile/NavigationToolbarMobile.d.ts +5 -0
- package/lib/esm/components/NavigationToolbarMobile/NavigationToolbarMobile.d.ts.map +1 -1
- package/lib/esm/components/NavigationToolbarMobile/NavigationToolbarMobile.js +7 -6
- package/lib/esm/components/NavigationToolbarMobile/NavigationToolbarMobile.js.map +1 -1
- package/lib/esm/components/PrivateMessageActionDrawer/PrivateMessageActionDrawer.d.ts +43 -0
- package/lib/esm/components/PrivateMessageActionDrawer/PrivateMessageActionDrawer.d.ts.map +1 -0
- package/lib/esm/components/PrivateMessageActionDrawer/PrivateMessageActionDrawer.js +68 -0
- package/lib/esm/components/PrivateMessageActionDrawer/PrivateMessageActionDrawer.js.map +1 -0
- package/lib/esm/components/PrivateMessageActionDrawer/Skeleton.d.ts +22 -0
- package/lib/esm/components/PrivateMessageActionDrawer/Skeleton.d.ts.map +1 -0
- package/lib/esm/components/PrivateMessageActionDrawer/Skeleton.js +32 -0
- package/lib/esm/components/PrivateMessageActionDrawer/Skeleton.js.map +1 -0
- package/lib/esm/components/PrivateMessageActionDrawer/index.d.ts +5 -0
- package/lib/esm/components/PrivateMessageActionDrawer/index.d.ts.map +1 -0
- package/lib/esm/components/PrivateMessageActionDrawer/index.js +5 -0
- package/lib/esm/components/PrivateMessageActionDrawer/index.js.map +1 -0
- package/lib/esm/components/PrivateMessageActionMenu/PrivateMessageActionMenu.d.ts +43 -0
- package/lib/esm/components/PrivateMessageActionMenu/PrivateMessageActionMenu.d.ts.map +1 -0
- package/lib/esm/components/PrivateMessageActionMenu/PrivateMessageActionMenu.js +68 -0
- package/lib/esm/components/PrivateMessageActionMenu/PrivateMessageActionMenu.js.map +1 -0
- package/lib/esm/components/PrivateMessageActionMenu/Skeleton.d.ts +23 -0
- package/lib/esm/components/PrivateMessageActionMenu/Skeleton.d.ts.map +1 -0
- package/lib/esm/components/PrivateMessageActionMenu/Skeleton.js +33 -0
- package/lib/esm/components/PrivateMessageActionMenu/Skeleton.js.map +1 -0
- package/lib/esm/components/PrivateMessageActionMenu/index.d.ts +5 -0
- package/lib/esm/components/PrivateMessageActionMenu/index.d.ts.map +1 -0
- package/lib/esm/components/PrivateMessageActionMenu/index.js +5 -0
- package/lib/esm/components/PrivateMessageActionMenu/index.js.map +1 -0
- package/lib/esm/components/PrivateMessageSnippetItem/PrivateMessageSnippetItem.d.ts.map +1 -1
- package/lib/esm/components/PrivateMessageSnippetItem/PrivateMessageSnippetItem.js +4 -7
- package/lib/esm/components/PrivateMessageSnippetItem/PrivateMessageSnippetItem.js.map +1 -1
- package/lib/esm/components/PrivateMessageSnippets/PrivateMessageSnippets.js +5 -5
- package/lib/esm/components/PrivateMessageSnippets/PrivateMessageSnippets.js.map +1 -1
- package/lib/esm/components/PrivateMessageThread/PrivateMessageThread.d.ts +1 -3
- package/lib/esm/components/PrivateMessageThread/PrivateMessageThread.d.ts.map +1 -1
- package/lib/esm/components/PrivateMessageThread/PrivateMessageThread.js +5 -15
- package/lib/esm/components/PrivateMessageThread/PrivateMessageThread.js.map +1 -1
- package/lib/esm/components/PrivateMessageThreadItem/PrivateMessageThreadItem.d.ts.map +1 -1
- package/lib/esm/components/PrivateMessageThreadItem/PrivateMessageThreadItem.js +8 -7
- package/lib/esm/components/PrivateMessageThreadItem/PrivateMessageThreadItem.js.map +1 -1
- package/lib/esm/index.d.ts +3 -1
- package/lib/esm/index.d.ts.map +1 -1
- package/lib/esm/index.js +3 -1
- package/lib/esm/index.js.map +1 -1
- package/lib/umd/react-ui.js +2 -2
- package/lib/umd/react-ui.js.map +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import React from 'react';
|
|
13
|
+
import { styled } from '@mui/material/styles';
|
|
14
|
+
import { SwipeableDrawer, MenuItem, ListItemIcon } from '@mui/material';
|
|
15
|
+
import { FormattedMessage } from 'react-intl';
|
|
16
|
+
import Icon from '@mui/material/Icon';
|
|
17
|
+
import classNames from 'classnames';
|
|
18
|
+
import { useThemeProps } from '@mui/system';
|
|
19
|
+
const PREFIX = 'SCPrivateMessageActionDrawer';
|
|
20
|
+
const classes = {
|
|
21
|
+
root: `${PREFIX}-root`,
|
|
22
|
+
paper: `${PREFIX}-paper`,
|
|
23
|
+
item: `${PREFIX}-item`
|
|
24
|
+
};
|
|
25
|
+
const Root = styled(SwipeableDrawer, {
|
|
26
|
+
name: PREFIX,
|
|
27
|
+
slot: 'Root',
|
|
28
|
+
overridesResolver: (props, styles) => styles.root
|
|
29
|
+
})(({ theme }) => ({}));
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
> API documentation for the Community-JS PrivateMessageActionDrawer component. Learn about the available props and the CSS API.
|
|
33
|
+
|
|
34
|
+
#### Import
|
|
35
|
+
|
|
36
|
+
```jsx
|
|
37
|
+
import {PrivateMessageActionDrawer} from '@selfcommunity/react-ui';
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
#### Component Name
|
|
41
|
+
|
|
42
|
+
The name `SCPrivateMessageActionDrawer` can be used when providing style overrides in the theme.
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
#### CSS
|
|
46
|
+
|
|
47
|
+
|Rule Name|Global class|Description|
|
|
48
|
+
|---|---|---|
|
|
49
|
+
|root|.SCPrivateMessageActionDrawer-root|Styles applied to the root element.|
|
|
50
|
+
|paper|.SCPrivateMessageActionDrawer-paper|Styles applied to the paper element.|
|
|
51
|
+
|item|.SCPrivateMessageActionDrawer-item|Styles applied to the menu item element.|
|
|
52
|
+
|
|
53
|
+
* @param inProps
|
|
54
|
+
*/
|
|
55
|
+
export default function PrivateMessageActionDrawer(inProps) {
|
|
56
|
+
// PROPS
|
|
57
|
+
const props = useThemeProps({
|
|
58
|
+
props: inProps,
|
|
59
|
+
name: PREFIX
|
|
60
|
+
});
|
|
61
|
+
const { PaperProps = { className: classes.paper }, className, onMenuItemDeleteClick } = props, rest = __rest(props, ["PaperProps", "className", "onMenuItemDeleteClick"]);
|
|
62
|
+
return (React.createElement(Root, Object.assign({ className: classNames(classes.root, className), PaperProps: PaperProps }, rest),
|
|
63
|
+
React.createElement(MenuItem, { className: classes.item, onClick: onMenuItemDeleteClick },
|
|
64
|
+
React.createElement(ListItemIcon, null,
|
|
65
|
+
React.createElement(Icon, { fontSize: "small" }, "delete")),
|
|
66
|
+
React.createElement(FormattedMessage, { id: "ui.privateMessage.actionDrawer.item.delete", defaultMessage: "ui.privateMessage.actionDrawer.item.delete" }))));
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=PrivateMessageActionDrawer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PrivateMessageActionDrawer.js","sourceRoot":"","sources":["../../../../src/components/PrivateMessageActionDrawer/PrivateMessageActionDrawer.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,MAAM,EAAC,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAC,eAAe,EAAE,QAAQ,EAAE,YAAY,EAAuB,MAAM,eAAe,CAAC;AAC5F,OAAO,EAAC,gBAAgB,EAAC,MAAM,YAAY,CAAC;AAC5C,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAC,aAAa,EAAC,MAAM,aAAa,CAAC;AAE1C,MAAM,MAAM,GAAG,8BAA8B,CAAC;AAE9C,MAAM,OAAO,GAAG;IACd,IAAI,EAAE,GAAG,MAAM,OAAO;IACtB,KAAK,EAAE,GAAG,MAAM,QAAQ;IACxB,IAAI,EAAE,GAAG,MAAM,OAAO;CACvB,CAAC;AAEF,MAAM,IAAI,GAAG,MAAM,CAAC,eAAe,EAAE;IACnC,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,iBAAiB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI;CAClD,CAAC,CAAC,CAAC,EAAC,KAAK,EAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAkBtB;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,CAAC,OAAO,UAAU,0BAA0B,CAAC,OAAwC;IACzF,QAAQ;IACR,MAAM,KAAK,GAAoC,aAAa,CAAC;QAC3D,KAAK,EAAE,OAAO;QACd,IAAI,EAAE,MAAM;KACb,CAAC,CAAC;IACH,MAAM,EAAC,UAAU,GAAG,EAAC,SAAS,EAAE,OAAO,CAAC,KAAK,EAAC,EAAE,SAAS,EAAE,qBAAqB,KAAa,KAAK,EAAb,IAAI,UAAI,KAAK,EAA5F,oDAAoF,CAAQ,CAAC;IAEnG,OAAO,CACL,oBAAC,IAAI,kBAAC,SAAS,EAAE,UAAU,CAAC,OAAO,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE,UAAU,EAAE,UAAU,IAAM,IAAI;QACpF,oBAAC,QAAQ,IAAC,SAAS,EAAE,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE,qBAAqB;YAC/D,oBAAC,YAAY;gBACX,oBAAC,IAAI,IAAC,QAAQ,EAAC,OAAO,aAAc,CACvB;YACf,oBAAC,gBAAgB,IAAC,EAAE,EAAC,4CAA4C,EAAC,cAAc,EAAC,4CAA4C,GAAG,CACvH,CACN,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* > API documentation for the Community-JS PrivateMessageActionDrawer Skeleton component. Learn about the available props and the CSS API.
|
|
3
|
+
|
|
4
|
+
#### Import
|
|
5
|
+
|
|
6
|
+
```jsx
|
|
7
|
+
import {PrivateMessageActionDrawerSkeleton} from '@selfcommunity/react-ui';
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
#### Component Name
|
|
11
|
+
|
|
12
|
+
The name `SCPrivateMessageActionDrawerSkeleton` can be used when providing style overrides in the theme.
|
|
13
|
+
|
|
14
|
+
#### CSS
|
|
15
|
+
|
|
16
|
+
|Rule Name|Global class|Description|
|
|
17
|
+
|---|---|---|
|
|
18
|
+
|root|.SCPrivateMessageActionDrawerSkeleton-root|Styles applied to the root element.|
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
export default function PrivateMessageActionDrawerSkeleton(props: any): JSX.Element;
|
|
22
|
+
//# sourceMappingURL=Skeleton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Skeleton.d.ts","sourceRoot":"","sources":["../../../../src/components/PrivateMessageActionDrawer/Skeleton.tsx"],"names":[],"mappings":"AAWA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,OAAO,UAAU,kCAAkC,CAAC,KAAK,KAAA,GAAG,GAAG,CAAC,OAAO,CAE7E"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { styled } from '@mui/material/styles';
|
|
3
|
+
import GenericSkeleton from '../Skeleton/GenericSkeleton';
|
|
4
|
+
const PREFIX = 'SCPrivateMessageActionDrawerSkeleton';
|
|
5
|
+
const classes = {
|
|
6
|
+
root: `${PREFIX}-root`
|
|
7
|
+
};
|
|
8
|
+
const Root = styled(GenericSkeleton)(({ theme }) => ({}));
|
|
9
|
+
/**
|
|
10
|
+
* > API documentation for the Community-JS PrivateMessageActionDrawer Skeleton component. Learn about the available props and the CSS API.
|
|
11
|
+
|
|
12
|
+
#### Import
|
|
13
|
+
|
|
14
|
+
```jsx
|
|
15
|
+
import {PrivateMessageActionDrawerSkeleton} from '@selfcommunity/react-ui';
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
#### Component Name
|
|
19
|
+
|
|
20
|
+
The name `SCPrivateMessageActionDrawerSkeleton` can be used when providing style overrides in the theme.
|
|
21
|
+
|
|
22
|
+
#### CSS
|
|
23
|
+
|
|
24
|
+
|Rule Name|Global class|Description|
|
|
25
|
+
|---|---|---|
|
|
26
|
+
|root|.SCPrivateMessageActionDrawerSkeleton-root|Styles applied to the root element.|
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
29
|
+
export default function PrivateMessageActionDrawerSkeleton(props) {
|
|
30
|
+
return React.createElement(Root, Object.assign({ className: classes.root }, props));
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=Skeleton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Skeleton.js","sourceRoot":"","sources":["../../../../src/components/PrivateMessageActionDrawer/Skeleton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,MAAM,EAAC,MAAM,sBAAsB,CAAC;AAC5C,OAAO,eAAe,MAAM,6BAA6B,CAAC;AAE1D,MAAM,MAAM,GAAG,sCAAsC,CAAC;AAEtD,MAAM,OAAO,GAAG;IACd,IAAI,EAAE,GAAG,MAAM,OAAO;CACvB,CAAC;AAEF,MAAM,IAAI,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC,EAAC,KAAK,EAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACxD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,OAAO,UAAU,kCAAkC,CAAC,KAAK;IAC9D,OAAO,oBAAC,IAAI,kBAAC,SAAS,EAAE,OAAO,CAAC,IAAI,IAAM,KAAK,EAAI,CAAC;AACtD,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import PrivateMessageActionDrawer, { PrivateMessageActionDrawerProps } from './PrivateMessageActionDrawer';
|
|
2
|
+
import PrivateMessageActionDrawerSkeleton from './Skeleton';
|
|
3
|
+
export default PrivateMessageActionDrawer;
|
|
4
|
+
export { PrivateMessageActionDrawerProps, PrivateMessageActionDrawerSkeleton };
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/PrivateMessageActionDrawer/index.tsx"],"names":[],"mappings":"AAAA,OAAO,0BAA0B,EAAE,EAAC,+BAA+B,EAAC,MAAM,8BAA8B,CAAC;AACzG,OAAO,kCAAkC,MAAM,YAAY,CAAC;AAC5D,eAAe,0BAA0B,CAAC;AAC1C,OAAO,EAAC,+BAA+B,EAAE,kCAAkC,EAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/PrivateMessageActionDrawer/index.tsx"],"names":[],"mappings":"AAAA,OAAO,0BAA6D,MAAM,8BAA8B,CAAC;AACzG,OAAO,kCAAkC,MAAM,YAAY,CAAC;AAC5D,eAAe,0BAA0B,CAAC;AAC1C,OAAO,EAAkC,kCAAkC,EAAC,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { MenuProps } from '@mui/material';
|
|
2
|
+
export interface PrivateMessageActionMenuProps extends MenuProps {
|
|
3
|
+
/**
|
|
4
|
+
* Overrides or extends the styles applied to the component.
|
|
5
|
+
* @default null
|
|
6
|
+
*/
|
|
7
|
+
className?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Handles menu item callbacks on click
|
|
10
|
+
*/
|
|
11
|
+
onMenuItemDeleteClick?: () => void;
|
|
12
|
+
/**
|
|
13
|
+
* Any other properties
|
|
14
|
+
*/
|
|
15
|
+
[p: string]: any;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
> API documentation for the Community-JS PrivateMessageActionMenu component. Learn about the available props and the CSS API.
|
|
20
|
+
|
|
21
|
+
#### Import
|
|
22
|
+
|
|
23
|
+
```jsx
|
|
24
|
+
import {PrivateMessageActionMenu} from '@selfcommunity/react-ui';
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
#### Component Name
|
|
28
|
+
|
|
29
|
+
The name `SCPrivateMessageActionMenu` can be used when providing style overrides in the theme.
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
#### CSS
|
|
33
|
+
|
|
34
|
+
|Rule Name|Global class|Description|
|
|
35
|
+
|---|---|---|
|
|
36
|
+
|root|.SCPrivateMessageActionMenu-root|Styles applied to the root element.|
|
|
37
|
+
|paper|.SCPrivateMessageActionMenu-paper|Styles applied to the paper element.|
|
|
38
|
+
|item|.SCPrivateMessageActionMenu-item|Styles applied to the menu item element.|
|
|
39
|
+
|
|
40
|
+
* @param inProps
|
|
41
|
+
*/
|
|
42
|
+
export default function PrivateMessageActionMenu(inProps: PrivateMessageActionMenuProps): JSX.Element;
|
|
43
|
+
//# sourceMappingURL=PrivateMessageActionMenu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PrivateMessageActionMenu.d.ts","sourceRoot":"","sources":["../../../../src/components/PrivateMessageActionMenu/PrivateMessageActionMenu.tsx"],"names":[],"mappings":"AAEA,OAAO,EAA+B,SAAS,EAAC,MAAM,eAAe,CAAC;AAoBtE,MAAM,WAAW,6BAA8B,SAAQ,SAAS;IAC9D;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,qBAAqB,CAAC,EAAE,MAAM,IAAI,CAAC;IACnC;;OAEG;IACH,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAAC,OAAO,EAAE,6BAA6B,GAAG,GAAG,CAAC,OAAO,CAkBpG"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import React from 'react';
|
|
13
|
+
import { styled } from '@mui/material/styles';
|
|
14
|
+
import { Menu, MenuItem, ListItemIcon } from '@mui/material';
|
|
15
|
+
import { FormattedMessage } from 'react-intl';
|
|
16
|
+
import Icon from '@mui/material/Icon';
|
|
17
|
+
import classNames from 'classnames';
|
|
18
|
+
import { useThemeProps } from '@mui/system';
|
|
19
|
+
const PREFIX = 'SCPrivateMessageActionMenu';
|
|
20
|
+
const classes = {
|
|
21
|
+
root: `${PREFIX}-root`,
|
|
22
|
+
paper: `${PREFIX}-paper`,
|
|
23
|
+
item: `${PREFIX}-item`
|
|
24
|
+
};
|
|
25
|
+
const Root = styled(Menu, {
|
|
26
|
+
name: PREFIX,
|
|
27
|
+
slot: 'Root',
|
|
28
|
+
overridesResolver: (props, styles) => styles.root
|
|
29
|
+
})(({ theme }) => ({}));
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
> API documentation for the Community-JS PrivateMessageActionMenu component. Learn about the available props and the CSS API.
|
|
33
|
+
|
|
34
|
+
#### Import
|
|
35
|
+
|
|
36
|
+
```jsx
|
|
37
|
+
import {PrivateMessageActionMenu} from '@selfcommunity/react-ui';
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
#### Component Name
|
|
41
|
+
|
|
42
|
+
The name `SCPrivateMessageActionMenu` can be used when providing style overrides in the theme.
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
#### CSS
|
|
46
|
+
|
|
47
|
+
|Rule Name|Global class|Description|
|
|
48
|
+
|---|---|---|
|
|
49
|
+
|root|.SCPrivateMessageActionMenu-root|Styles applied to the root element.|
|
|
50
|
+
|paper|.SCPrivateMessageActionMenu-paper|Styles applied to the paper element.|
|
|
51
|
+
|item|.SCPrivateMessageActionMenu-item|Styles applied to the menu item element.|
|
|
52
|
+
|
|
53
|
+
* @param inProps
|
|
54
|
+
*/
|
|
55
|
+
export default function PrivateMessageActionMenu(inProps) {
|
|
56
|
+
// PROPS
|
|
57
|
+
const props = useThemeProps({
|
|
58
|
+
props: inProps,
|
|
59
|
+
name: PREFIX
|
|
60
|
+
});
|
|
61
|
+
const { PaperProps = { className: classes.paper }, className, onMenuItemDeleteClick } = props, rest = __rest(props, ["PaperProps", "className", "onMenuItemDeleteClick"]);
|
|
62
|
+
return (React.createElement(Root, Object.assign({ className: classNames(classes.root, className), PaperProps: PaperProps }, rest),
|
|
63
|
+
React.createElement(MenuItem, { className: classes.item, onClick: onMenuItemDeleteClick },
|
|
64
|
+
React.createElement(ListItemIcon, null,
|
|
65
|
+
React.createElement(Icon, { fontSize: "small" }, "delete")),
|
|
66
|
+
React.createElement(FormattedMessage, { id: "ui.privateMessage.actionMenu.item.delete", defaultMessage: "ui.privateMessage.actionMenu.item.delete" }))));
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=PrivateMessageActionMenu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PrivateMessageActionMenu.js","sourceRoot":"","sources":["../../../../src/components/PrivateMessageActionMenu/PrivateMessageActionMenu.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,MAAM,EAAC,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAC,IAAI,EAAE,QAAQ,EAAE,YAAY,EAAY,MAAM,eAAe,CAAC;AACtE,OAAO,EAAC,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AI,IAAC,QAAQ,EAAC,OAAO,aAAc,CACvB;YACf,oBAAC,gBAAgB,IAAC,EAAE,EAAC,0CAA0C,EAAC,cAAc,EAAC,0CAA0C,GAAG,CACnH,CACN,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* > API documentation for the Community-JS PrivateMessageActionMenu Skeleton component. Learn about the available props and the CSS API.
|
|
3
|
+
|
|
4
|
+
#### Import
|
|
5
|
+
|
|
6
|
+
```jsx
|
|
7
|
+
import {PrivateMessageActionMenuSkeleton} from '@selfcommunity/react-ui';
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
#### Component Name
|
|
11
|
+
|
|
12
|
+
The name `SCPrivateMessageActionMenuSkeleton` can be used when providing style overrides in the theme.
|
|
13
|
+
|
|
14
|
+
#### CSS
|
|
15
|
+
|
|
16
|
+
|Rule Name|Global class|Description|
|
|
17
|
+
|---|---|---|
|
|
18
|
+
|root|.SCPrivateMessageActionMenuSkeleton-root|Styles applied to the root element.|
|
|
19
|
+
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
export default function PrivateMessageActionMenuSkeleton(props: any): JSX.Element;
|
|
23
|
+
//# sourceMappingURL=Skeleton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Skeleton.d.ts","sourceRoot":"","sources":["../../../../src/components/PrivateMessageActionMenu/Skeleton.tsx"],"names":[],"mappings":"AAWA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,OAAO,UAAU,gCAAgC,CAAC,KAAK,KAAA,GAAG,GAAG,CAAC,OAAO,CAE3E"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { styled } from '@mui/material/styles';
|
|
3
|
+
import GenericSkeleton from '../Skeleton/GenericSkeleton';
|
|
4
|
+
const PREFIX = 'SCPrivateMessageActionMenuSkeleton';
|
|
5
|
+
const classes = {
|
|
6
|
+
root: `${PREFIX}-root`
|
|
7
|
+
};
|
|
8
|
+
const Root = styled(GenericSkeleton)(({ theme }) => ({}));
|
|
9
|
+
/**
|
|
10
|
+
* > API documentation for the Community-JS PrivateMessageActionMenu Skeleton component. Learn about the available props and the CSS API.
|
|
11
|
+
|
|
12
|
+
#### Import
|
|
13
|
+
|
|
14
|
+
```jsx
|
|
15
|
+
import {PrivateMessageActionMenuSkeleton} from '@selfcommunity/react-ui';
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
#### Component Name
|
|
19
|
+
|
|
20
|
+
The name `SCPrivateMessageActionMenuSkeleton` can be used when providing style overrides in the theme.
|
|
21
|
+
|
|
22
|
+
#### CSS
|
|
23
|
+
|
|
24
|
+
|Rule Name|Global class|Description|
|
|
25
|
+
|---|---|---|
|
|
26
|
+
|root|.SCPrivateMessageActionMenuSkeleton-root|Styles applied to the root element.|
|
|
27
|
+
|
|
28
|
+
*
|
|
29
|
+
*/
|
|
30
|
+
export default function PrivateMessageActionMenuSkeleton(props) {
|
|
31
|
+
return React.createElement(Root, Object.assign({ className: classes.root }, props));
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=Skeleton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Skeleton.js","sourceRoot":"","sources":["../../../../src/components/PrivateMessageActionMenu/Skeleton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,MAAM,EAAC,MAAM,sBAAsB,CAAC;AAC5C,OAAO,eAAe,MAAM,6BAA6B,CAAC;AAE1D,MAAM,MAAM,GAAG,oCAAoC,CAAC;AAEpD,MAAM,OAAO,GAAG;IACd,IAAI,EAAE,GAAG,MAAM,OAAO;CACvB,CAAC;AAEF,MAAM,IAAI,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC,EAAC,KAAK,EAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACxD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,OAAO,UAAU,gCAAgC,CAAC,KAAK;IAC5D,OAAO,oBAAC,IAAI,kBAAC,SAAS,EAAE,OAAO,CAAC,IAAI,IAAM,KAAK,EAAI,CAAC;AACtD,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import PrivateMessageActionMenu, { PrivateMessageActionMenuProps } from './PrivateMessageActionMenu';
|
|
2
|
+
import PrivateMessageActionMenuSkeleton from './Skeleton';
|
|
3
|
+
export default PrivateMessageActionMenu;
|
|
4
|
+
export { PrivateMessageActionMenuProps, PrivateMessageActionMenuSkeleton };
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/PrivateMessageActionMenu/index.tsx"],"names":[],"mappings":"AAAA,OAAO,wBAAwB,EAAE,EAAC,6BAA6B,EAAC,MAAM,4BAA4B,CAAC;AACnG,OAAO,gCAAgC,MAAM,YAAY,CAAC;AAC1D,eAAe,wBAAwB,CAAC;AACxC,OAAO,EAAC,6BAA6B,EAAE,gCAAgC,EAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/PrivateMessageActionMenu/index.tsx"],"names":[],"mappings":"AAAA,OAAO,wBAAyD,MAAM,4BAA4B,CAAC;AACnG,OAAO,gCAAgC,MAAM,YAAY,CAAC;AAC1D,eAAe,wBAAwB,CAAC;AACxC,OAAO,EAAgC,gCAAgC,EAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrivateMessageSnippetItem.d.ts","sourceRoot":"","sources":["../../../../src/components/PrivateMessageSnippetItem/PrivateMessageSnippetItem.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PrivateMessageSnippetItem.d.ts","sourceRoot":"","sources":["../../../../src/components/PrivateMessageSnippetItem/PrivateMessageSnippetItem.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAC,2BAA2B,EAAC,MAAM,sBAAsB,CAAC;AA0BjE,MAAM,WAAW,8BAA8B;IAC7C;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,OAAO,CAAC,EAAE,2BAA2B,CAAC;IACtC;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,OAAO,CAAC,EAAE;QACR,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;QACzB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;KAC1B,CAAC;IACF;;OAEG;IACH,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,CAAC,OAAO,UAAU,yBAAyB,CAAC,OAAO,EAAE,8BAA8B,GAAG,GAAG,CAAC,OAAO,CA0GtG"}
|
|
@@ -11,15 +11,16 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
11
11
|
};
|
|
12
12
|
import React, { useContext, useMemo } from 'react';
|
|
13
13
|
import { styled } from '@mui/material/styles';
|
|
14
|
-
import { Avatar, ListItemButton, ListItemAvatar, ListItemText, Typography, Chip, IconButton, useTheme,
|
|
14
|
+
import { Avatar, ListItemButton, ListItemAvatar, ListItemText, Typography, Chip, IconButton, useTheme, ListItem } from '@mui/material';
|
|
15
15
|
import PrivateMessageSnippetItemSkeleton from './Skeleton';
|
|
16
|
-
import {
|
|
16
|
+
import { useIntl } from 'react-intl';
|
|
17
17
|
import { SCUserContext, SCPreferences, useSCPreferences } from '@selfcommunity/react-core';
|
|
18
18
|
import Icon from '@mui/material/Icon';
|
|
19
19
|
import classNames from 'classnames';
|
|
20
20
|
import { useThemeProps } from '@mui/system';
|
|
21
21
|
import HiddenPlaceholder from '../../shared/HiddenPlaceholder';
|
|
22
22
|
import useMediaQuery from '@mui/material/useMediaQuery';
|
|
23
|
+
import PrivateMessageActionMenu from '../PrivateMessageActionMenu';
|
|
23
24
|
const PREFIX = 'SCPrivateMessageSnippetItem';
|
|
24
25
|
const classes = {
|
|
25
26
|
root: `${PREFIX}-root`,
|
|
@@ -113,11 +114,7 @@ export default function PrivateMessageSnippetItem(inProps) {
|
|
|
113
114
|
return (React.createElement(Root, Object.assign({ className: classNames(classes.root, className) }, rest, { secondaryAction: !isMobile && (React.createElement(React.Fragment, null,
|
|
114
115
|
React.createElement(IconButton, { size: "small", onClick: handleOpenMenu },
|
|
115
116
|
React.createElement(Icon, null, "more_vert")),
|
|
116
|
-
React.createElement(
|
|
117
|
-
React.createElement(MenuItem, { classes: { root: classes.menuItem }, onClick: handleMenuItemClick },
|
|
118
|
-
React.createElement(ListItemIcon, null,
|
|
119
|
-
React.createElement(Icon, { fontSize: "small" }, "delete")),
|
|
120
|
-
React.createElement(FormattedMessage, { id: "ui.privateMessage.snippetItem.menu.item.delete", defaultMessage: "ui.privateMessage.snippetItem.menu.item.delete" }))))), disablePadding: true }),
|
|
117
|
+
React.createElement(PrivateMessageActionMenu, { anchorEl: anchorEl, open: open, onClose: handleMenuClose, onMenuItemDeleteClick: handleMenuItemClick }))), disablePadding: true }),
|
|
121
118
|
React.createElement(ListItemButton, { onClick: actions.onItemClick },
|
|
122
119
|
React.createElement(ListItemAvatar, null, ((_a = scUserContext === null || scUserContext === void 0 ? void 0 : scUserContext.user) === null || _a === void 0 ? void 0 : _a.username) === message.receiver.username ? (React.createElement(Avatar, { alt: message.sender.username, src: message.sender.avatar })) : (React.createElement(Avatar, { alt: message.receiver.username, src: message.receiver.avatar }))),
|
|
123
120
|
React.createElement(ListItemText, { primary: React.createElement(React.Fragment, null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrivateMessageSnippetItem.js","sourceRoot":"","sources":["../../../../src/components/PrivateMessageSnippetItem/PrivateMessageSnippetItem.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAC,UAAU,EAAE,OAAO,EAAC,MAAM,OAAO,CAAC;AACjD,OAAO,EAAC,MAAM,EAAC,MAAM,sBAAsB,CAAC;AAC5C,OAAO,
|
|
1
|
+
{"version":3,"file":"PrivateMessageSnippetItem.js","sourceRoot":"","sources":["../../../../src/components/PrivateMessageSnippetItem/PrivateMessageSnippetItem.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAC,UAAU,EAAE,OAAO,EAAC,MAAM,OAAO,CAAC;AACjD,OAAO,EAAC,MAAM,EAAC,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAC,MAAM,EAAE,cAAc,EAAE,cAAc,EAAE,YAAY,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAC,MAAM,eAAe,CAAC;AACrI,OAAO,iCAAiC,MAAM,YAAY,CAAC;AAC3D,OAAO,EAAC,OAAO,EAAC,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAoB,aAAa,EAAE,aAAa,EAA4B,gBAAgB,EAAc,MAAM,2BAA2B,CAAC;AACnJ,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAC,aAAa,EAAC,MAAM,aAAa,CAAC;AAC1C,OAAO,iBAAiB,MAAM,gCAAgC,CAAC;AAC/D,OAAO,aAAa,MAAM,6BAA6B,CAAC;AACxD,OAAO,wBAAwB,MAAM,6BAA6B,CAAC;AAEnE,MAAM,MAAM,GAAG,6BAA6B,CAAC;AAE7C,MAAM,OAAO,GAAG;IACd,IAAI,EAAE,GAAG,MAAM,OAAO;IACtB,QAAQ,EAAE,GAAG,MAAM,WAAW;IAC9B,UAAU,EAAE,GAAG,MAAM,cAAc;IACnC,IAAI,EAAE,GAAG,MAAM,OAAO;IACtB,QAAQ,EAAE,GAAG,MAAM,YAAY;CAChC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O,CAAC,UAAU,EAAE,IAAI,EAAC,OAAO,EAAC,KAAK,EAAE,WAAW,CAAC,aAAa,CAAC,uBAAuB,CAAC,GAAI,CACjI;oBACD,oBAAC,UAAU,IAAC,KAAK,EAAC,WAAW,EAAC,SAAS,EAAE,OAAO,CAAC,IAAI,EAAE,SAAS,EAAC,MAAM,IAAE,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,eAAe,EAAE;wBACnH,OAAO,EAAE,MAAM;wBACf,GAAG,EAAE,SAAS;qBACf,CAAC,EAAE,CAAc,CACjB,EAEL,SAAS,EACP;oBACE,oBAAC,UAAU,IAAC,SAAS,EAAC,MAAM,EAAC,KAAK,EAAC,gBAAgB,EAAC,uBAAuB,EAAE,EAAC,MAAM,EAAE,MAAA,OAAO,CAAC,QAAQ,mCAAI,OAAO,CAAC,OAAO,EAAC,GAAI;oBAC7H,KAAK,IAAI,CACR,oBAAC,IAAI,IAAC,QAAQ,EAAC,OAAO,EAAC,KAAK,EAAC,WAAW,0BAEjC,CACR,CACA,GAEL,CACa,CACZ,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -189,18 +189,17 @@ export default function PrivateMessageSnippets(inProps) {
|
|
|
189
189
|
else if (snippetCallbacksData.onMessageChanges) {
|
|
190
190
|
//Updates snippet headline when a new message is sent or deleted
|
|
191
191
|
const newSnippets = [...snippets];
|
|
192
|
-
|
|
193
|
-
const inList = newSnippets.some((o) => o.receiver.id === snippetCallbacksData.onMessageChanges['message'].receiver.id);
|
|
192
|
+
const inList = newSnippets.some((o) => o.receiver.id === snippetCallbacksData.onMessageChanges.receiver.id);
|
|
194
193
|
if (inList) {
|
|
195
|
-
const index = newSnippets.findIndex((s) => s.receiver.id === snippetCallbacksData.onMessageChanges
|
|
194
|
+
const index = newSnippets.findIndex((s) => s.receiver.id === snippetCallbacksData.onMessageChanges.receiver.id);
|
|
196
195
|
if (index !== -1) {
|
|
197
|
-
newSnippets[index].headline = snippetCallbacksData.onMessageChanges
|
|
196
|
+
newSnippets[index].headline = snippetCallbacksData.onMessageChanges.message;
|
|
198
197
|
setSnippets(newSnippets);
|
|
199
198
|
}
|
|
200
199
|
}
|
|
201
200
|
else {
|
|
202
201
|
//Adds a new snippet when a new message is sent
|
|
203
|
-
setSnippets((prev) => [...prev, snippetCallbacksData.onMessageChanges
|
|
202
|
+
setSnippets((prev) => [...prev, snippetCallbacksData.onMessageChanges]);
|
|
204
203
|
}
|
|
205
204
|
}
|
|
206
205
|
}
|
|
@@ -215,6 +214,7 @@ export default function PrivateMessageSnippets(inProps) {
|
|
|
215
214
|
*/
|
|
216
215
|
const subscriber = (msg, data) => {
|
|
217
216
|
const res = data.data;
|
|
217
|
+
console.log(res);
|
|
218
218
|
updateSnippets(res.thread_id, res.notification_obj.snippet.headline, res.notification_obj.snippet.thread_status);
|
|
219
219
|
};
|
|
220
220
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrivateMessageSnippets.js","sourceRoot":"","sources":["../../../../src/components/PrivateMessageSnippets/PrivateMessageSnippets.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAC,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAClE,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;AAC/B,OAAO,EAAC,IAAI,EAAE,SAAS,EAAe,MAAM,6BAA6B,CAAC;AAC1E,OAAO,EAA8B,uBAAuB,EAAE,0BAA0B,EAAC,MAAM,sBAAsB,CAAC;AACtH,OAAO,8BAA8B,MAAM,YAAY,CAAC;AACxD,OAAO,yBAAyB,MAAM,8BAA8B,CAAC;AACrE,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC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O,CAAC,CAAC;QAClD,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,SAAS,yBAAyB,CAAC,oBAAoB;QACrD,0CAA0C;QAC1C,IAAI,oBAAoB,CAAC,qBAAqB,EAAE;YAC9C,kBAAkB,CAAC,oBAAoB,CAAC,qBAAqB,CAAC,CAAC;YAC/D,WAAW,EAAE,CAAC;SACf;aAAM,IAAI,oBAAoB,CAAC,gBAAgB,EAAE;YAChD,gEAAgE;YAChE,MAAM,WAAW,GAAG,CAAC,GAAG,QAAQ,CAAC,CAAC;YAClC,
|
|
1
|
+
{"version":3,"file":"PrivateMessageSnippets.js","sourceRoot":"","sources":["../../../../src/components/PrivateMessageSnippets/PrivateMessageSnippets.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAC,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAClE,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;AAC/B,OAAO,EAAC,IAAI,EAAE,SAAS,EAAe,MAAM,6BAA6B,CAAC;AAC1E,OAAO,EAA8B,uBAAuB,EAAE,0BAA0B,EAAC,MAAM,sBAAsB,CAAC;AACtH,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,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,iBAAiB,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAC,cAAc,EAAE,gBAAgB,EAAE,OAAO,EAAC,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C,SAAS,EAAE,OAAO,CAAC,IAAI,aAAe;wBAC5D,YAAY,EAAE,CACZ,oBAAC,UAAU,IAAC,SAAS,EAAE,OAAO,CAAC,KAAK,EAAE,QAAQ,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAC,OAAO;4BACzF,oBAAC,IAAI,gBAAa,CACP,CACd;qBACF,GACD;gBACF,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,QAAQ,IAAI,CAAC,CAAC,QAAQ,IAAI,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,KAAK,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,KAAK,QAAQ,CAAC,GAEtI,CACH,CAAC,CACG,CACK,CACT,CACR,CAAC;KACH;IACD,OAAO,oBAAC,iBAAiB,OAAG,CAAC;AAC/B,CAAC"}
|
|
@@ -29,7 +29,7 @@ export interface PrivateMessageThreadProps {
|
|
|
29
29
|
* @param data
|
|
30
30
|
* @default null
|
|
31
31
|
*/
|
|
32
|
-
onMessageSentOrDeleted?: (data: any
|
|
32
|
+
onMessageSentOrDeleted?: (data: any) => void;
|
|
33
33
|
/**
|
|
34
34
|
* Callback fired only when exiting a thread.
|
|
35
35
|
* @default null
|
|
@@ -72,8 +72,6 @@ export interface PrivateMessageThreadProps {
|
|
|
72
72
|
|newMessageHeaderIcon|.SCPrivateMessageThread-new-message-header-icon|Styles applied to the new message header icon element.|
|
|
73
73
|
|newMessageHeaderContent|.SCPrivateMessageThread-new-message-header-content|Styles applied to the new message header content.|
|
|
74
74
|
|subHeader|.SCPrivateMessageThread-subheader|Styles applied to thread list subheader element.|
|
|
75
|
-
|mobileHeader|.SCPrivateMessageThread-mobile-header|Styles applied to mobile header element.|
|
|
76
|
-
|mobileHeaderContent|.SCPrivateMessageThread-mobile-header-content|Styles applied to mobile header content.|
|
|
77
75
|
|sender|.SCPrivateMessageThread-sender|Styles applied to the sender element.|
|
|
78
76
|
|receiver|.SCPrivateMessageThread-receiver|Styles applied to the receiver element.|
|
|
79
77
|
|autocomplete|.SCPrivateMessageThread-autocomplete|Styles applied to new message user insertion autocomplete.|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrivateMessageThread.d.ts","sourceRoot":"","sources":["../../../../src/components/PrivateMessageThread/PrivateMessageThread.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAyE,0BAA0B,EAAC,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"PrivateMessageThread.d.ts","sourceRoot":"","sources":["../../../../src/components/PrivateMessageThread/PrivateMessageThread.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAyE,0BAA0B,EAAC,MAAM,sBAAsB,CAAC;AA8CxI,MAAM,WAAW,yBAAyB;IACxC;;;OAGG;IACH,OAAO,CAAC,EAAE,0BAA0B,GAAG,MAAM,CAAC;IAC9C;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;OAEG;IACH,eAAe,CAAC,EAAE;QAChB;;;;WAIG;QACH,sBAAsB,CAAC,EAAE,CAAC,IAAI,KAAA,KAAK,IAAI,CAAC;QACxC;;;WAGG;QACH,aAAa,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,KAAK,IAAI,CAAC;QACxC;;;WAGG;QACH,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,KAAK,IAAI,CAAC;KAC1C,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,CAoY5F"}
|
|
@@ -18,7 +18,7 @@ import { SCNotificationTopicType, SCNotificationTypologyType } from '@selfcommun
|
|
|
18
18
|
import PrivateMessageThreadItem from '../PrivateMessageThreadItem';
|
|
19
19
|
import _ from 'lodash';
|
|
20
20
|
import { defineMessages, FormattedMessage, useIntl } from 'react-intl';
|
|
21
|
-
import {
|
|
21
|
+
import { Box, CardContent, IconButton, List, ListSubheader, TextField, Typography, useMediaQuery, useTheme } from '@mui/material';
|
|
22
22
|
import ConfirmDialog from '../../shared/ConfirmDialog/ConfirmDialog';
|
|
23
23
|
import PrivateMessageEditor from '../PrivateMessageEditor';
|
|
24
24
|
import Autocomplete from '@mui/material/Autocomplete';
|
|
@@ -42,8 +42,6 @@ const classes = {
|
|
|
42
42
|
root: `${PREFIX}-root`,
|
|
43
43
|
subHeader: `${PREFIX}-subheader`,
|
|
44
44
|
section: `${PREFIX}-section`,
|
|
45
|
-
mobileHeader: `${PREFIX}-mobile-header`,
|
|
46
|
-
mobileHeaderContent: `${PREFIX}-mobile-header-content`,
|
|
47
45
|
emptyMessage: `${PREFIX}-empty-message`,
|
|
48
46
|
newMessageHeader: `${PREFIX}-new-message-header`,
|
|
49
47
|
newMessageHeaderContent: `${PREFIX}-new-message-header-content`,
|
|
@@ -83,8 +81,6 @@ const Root = styled(Widget, {
|
|
|
83
81
|
|newMessageHeaderIcon|.SCPrivateMessageThread-new-message-header-icon|Styles applied to the new message header icon element.|
|
|
84
82
|
|newMessageHeaderContent|.SCPrivateMessageThread-new-message-header-content|Styles applied to the new message header content.|
|
|
85
83
|
|subHeader|.SCPrivateMessageThread-subheader|Styles applied to thread list subheader element.|
|
|
86
|
-
|mobileHeader|.SCPrivateMessageThread-mobile-header|Styles applied to mobile header element.|
|
|
87
|
-
|mobileHeaderContent|.SCPrivateMessageThread-mobile-header-content|Styles applied to mobile header content.|
|
|
88
84
|
|sender|.SCPrivateMessageThread-sender|Styles applied to the sender element.|
|
|
89
85
|
|receiver|.SCPrivateMessageThread-receiver|Styles applied to the receiver element.|
|
|
90
86
|
|autocomplete|.SCPrivateMessageThread-autocomplete|Styles applied to new message user insertion autocomplete.|
|
|
@@ -177,7 +173,7 @@ export default function PrivateMessageThread(inProps) {
|
|
|
177
173
|
.then(() => {
|
|
178
174
|
const result = messageObjs.filter((m) => m.id !== deletingMsg.id);
|
|
179
175
|
setMessageObjs(result);
|
|
180
|
-
threadCallbacks.onMessageSentOrDeleted(result.length
|
|
176
|
+
threadCallbacks.onMessageSentOrDeleted(result.length >= 1 ? result.slice(-1)[0] : deletingMsg);
|
|
181
177
|
handleCloseDeleteDialog();
|
|
182
178
|
})
|
|
183
179
|
.catch((error) => {
|
|
@@ -215,7 +211,7 @@ export default function PrivateMessageThread(inProps) {
|
|
|
215
211
|
})
|
|
216
212
|
.then((res) => {
|
|
217
213
|
setMessageObjs((prev) => [...prev, res.data]);
|
|
218
|
-
threadCallbacks.onMessageSentOrDeleted(res.data
|
|
214
|
+
threadCallbacks.onMessageSentOrDeleted(res.data);
|
|
219
215
|
if (openNewMessage || newMessageThread) {
|
|
220
216
|
setNewMessageThread(false);
|
|
221
217
|
setRecipients([]);
|
|
@@ -339,19 +335,13 @@ export default function PrivateMessageThread(inProps) {
|
|
|
339
335
|
*/
|
|
340
336
|
function renderThread() {
|
|
341
337
|
return (React.createElement(CardContent, null,
|
|
342
|
-
isMobile && receiver && (React.createElement(Box, { className: classes.mobileHeader },
|
|
343
|
-
React.createElement(Box, { className: classes.mobileHeaderContent },
|
|
344
|
-
React.createElement(Icon, { onClick: () => threadCallbacks.onMessageBack('default') }, "chevron_left"),
|
|
345
|
-
React.createElement(Avatar, { alt: receiver.username, src: receiver.avatar }),
|
|
346
|
-
React.createElement(Typography, { variant: "body1", color: "inherit" }, receiver.username)),
|
|
347
|
-
React.createElement(Icon, { fontSize: "medium", onClick: threadCallbacks.onThreadDelete }, "delete"))),
|
|
348
|
-
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 })),
|
|
349
338
|
React.createElement(List, { subheader: React.createElement("li", null) }, Object.keys(formattedMessages).map((key, index) => (React.createElement("li", { key: key, className: classes.section },
|
|
350
339
|
React.createElement("ul", null,
|
|
351
340
|
React.createElement(ListSubheader, null,
|
|
352
341
|
React.createElement(Typography, { align: "center", className: classes.subHeader }, key)),
|
|
353
342
|
formattedMessages[key].map((msg, index) => (React.createElement(PrivateMessageThreadItem, { className: scUserContext['user'].id === 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: scUserContext['user'].id === msg.sender.id, onMenuIconClick: () => handleOpenDeleteDialog(msg) })))))))),
|
|
354
|
-
React.createElement(PrivateMessageEditor, { send: (m, f) => sendMessage(m, f), autoHide: !isFollower, onThreadChangeId: userObj })
|
|
343
|
+
React.createElement(PrivateMessageEditor, { send: (m, f) => sendMessage(m, f), autoHide: !isFollower, onThreadChangeId: userObj }),
|
|
344
|
+
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 }))));
|
|
355
345
|
}
|
|
356
346
|
/**
|
|
357
347
|
* Renders empty box (when there is no thread open) or new message box
|