@pega/cosmos-react-social 3.0.0-dev.17.0 → 3.0.0-dev.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/Email/ContextMenuPopover.d.ts.map +1 -1
- package/lib/components/Email/ContextMenuPopover.js +8 -6
- package/lib/components/Email/ContextMenuPopover.js.map +1 -1
- package/lib/components/Email/Email.d.ts.map +1 -1
- package/lib/components/Email/Email.js +48 -30
- package/lib/components/Email/Email.js.map +1 -1
- package/lib/components/Email/Email.styles.d.ts.map +1 -1
- package/lib/components/Email/Email.styles.js +1 -2
- package/lib/components/Email/Email.styles.js.map +1 -1
- package/lib/components/Email/Email.types.d.ts +27 -7
- package/lib/components/Email/Email.types.d.ts.map +1 -1
- package/lib/components/Email/Email.types.js.map +1 -1
- package/lib/components/Email/EntityList.d.ts.map +1 -1
- package/lib/components/Email/EntityList.js +48 -30
- package/lib/components/Email/EntityList.js.map +1 -1
- package/lib/components/Feed/FeedPost.d.ts.map +1 -1
- package/lib/components/Feed/FeedPost.js +26 -6
- package/lib/components/Feed/FeedPost.js.map +1 -1
- package/lib/components/Feed/FeedPost.types.d.ts +4 -2
- package/lib/components/Feed/FeedPost.types.d.ts.map +1 -1
- package/lib/components/Feed/FeedPost.types.js.map +1 -1
- package/lib/components/Feed/FeedReply.d.ts.map +1 -1
- package/lib/components/Feed/FeedReply.js +26 -5
- package/lib/components/Feed/FeedReply.js.map +1 -1
- package/lib/components/Feed/FeedReply.types.d.ts +4 -2
- package/lib/components/Feed/FeedReply.types.d.ts.map +1 -1
- package/lib/components/Feed/FeedReply.types.js.map +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContextMenuPopover.d.ts","sourceRoot":"","sources":["../../../src/components/Email/ContextMenuPopover.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,
|
|
1
|
+
{"version":3,"file":"ContextMenuPopover.d.ts","sourceRoot":"","sources":["../../../src/components/Email/ContextMenuPopover.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAA2C,MAAM,OAAO,CAAC;AASnF,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAExD,QAAA,MAAM,kBAAkB,EAAE,iBAAiB,CAAC,uBAAuB,CAyElE,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { Popover, Menu, Text, useI18n } from '@pega/cosmos-react-core';
|
|
3
4
|
import { StyledEmailMoreInfoPopover, StyledContextMenuFieldSelector, StyledContextMenu } from './Email.styles';
|
|
4
|
-
const ContextMenuPopover = ({ cursorPosition, contextMenu, targetNode }) => {
|
|
5
|
-
const
|
|
5
|
+
const ContextMenuPopover = forwardRef(({ cursorPosition, contextMenu, targetNode, show }, ref) => {
|
|
6
|
+
const t = useI18n();
|
|
6
7
|
const selection = document.getSelection();
|
|
7
8
|
if (selection && !selection.toString() && targetNode) {
|
|
8
9
|
const range = document.createRange();
|
|
@@ -11,7 +12,8 @@ const ContextMenuPopover = ({ cursorPosition, contextMenu, targetNode }) => {
|
|
|
11
12
|
selection.addRange(range);
|
|
12
13
|
}
|
|
13
14
|
const { onItemClick, items } = contextMenu;
|
|
14
|
-
const onItemSelect = (contextMenuItemId) => {
|
|
15
|
+
const onItemSelect = (contextMenuItemId, e) => {
|
|
16
|
+
e.stopPropagation();
|
|
15
17
|
const selectedcontextMenuItem = items.find(({ id }) => id === contextMenuItemId);
|
|
16
18
|
if (selectedcontextMenuItem && selection) {
|
|
17
19
|
onItemClick({
|
|
@@ -42,7 +44,7 @@ const ContextMenuPopover = ({ cursorPosition, contextMenu, targetNode }) => {
|
|
|
42
44
|
toJSON: () => { }
|
|
43
45
|
};
|
|
44
46
|
}
|
|
45
|
-
}, placement: 'bottom', children: _jsx(StyledContextMenu, { children: _jsx(Menu, { ...contextMenu, header: _jsx(Text, { variant: 'h5', children:
|
|
46
|
-
};
|
|
47
|
+
}, show: show, placement: 'bottom', ref: ref, children: _jsx(StyledContextMenu, { children: _jsx(Menu, { ...contextMenu, header: _jsx(Text, { variant: 'h5', children: t('copy_to') }), items: itemsToRender, onItemClick: onItemSelect }) }) }));
|
|
48
|
+
});
|
|
47
49
|
export default ContextMenuPopover;
|
|
48
50
|
//# sourceMappingURL=ContextMenuPopover.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContextMenuPopover.js","sourceRoot":"","sources":["../../../src/components/Email/ContextMenuPopover.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"ContextMenuPopover.js","sourceRoot":"","sources":["../../../src/components/Email/ContextMenuPopover.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAiC,UAAU,EAAmB,MAAM,OAAO,CAAC;AAEnF,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAEvE,OAAO,EACL,0BAA0B,EAC1B,8BAA8B,EAC9B,iBAAiB,EAClB,MAAM,gBAAgB,CAAC;AAGxB,MAAM,kBAAkB,GAA+C,UAAU,CAC/E,CACE,EAAE,cAAc,EAAE,WAAW,EAAE,UAAU,EAAE,IAAI,EAA4C,EAC3F,GAAmC,EACnC,EAAE;IACF,MAAM,CAAC,GAAG,OAAO,EAAE,CAAC;IACpB,MAAM,SAAS,GAAG,QAAQ,CAAC,YAAY,EAAE,CAAC;IAE1C,IAAI,SAAS,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,UAAU,EAAE;QACpD,MAAM,KAAK,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAC;QACrC,KAAK,CAAC,kBAAkB,CAAC,UAAkB,CAAC,CAAC;QAC7C,SAAS,EAAE,eAAe,EAAE,CAAC;QAC7B,SAAS,CAAC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,CAAC;SACF,EACD,IAAI,EAAE,IAAI,EACV,SAAS,EAAC,QAAQ,EAClB,GAAG,EAAE,GAAG,YAER,KAAC,iBAAiB,cAChB,KAAC,IAAI,OACC,WAAW,EACf,MAAM,EAAE,KAAC,IAAI,IAAC,OAAO,EAAC,IAAI,YAAE,CAAC,CAAC,SAAS,CAAC,GAAQ,EAChD,KAAK,EAAE,aAAa,EACpB,WAAW,EAAE,YAAY,GACzB,GACgB,GACZ,CACX,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,kBAAkB,CAAC","sourcesContent":["import { FunctionComponent, MouseEvent, forwardRef, PropsWithoutRef } from 'react';\n\nimport { Popover, Menu, Text, useI18n } from '@pega/cosmos-react-core';\n\nimport {\n StyledEmailMoreInfoPopover,\n StyledContextMenuFieldSelector,\n StyledContextMenu\n} from './Email.styles';\nimport { ContextMenuPopoverProps } from './Email.types';\n\nconst ContextMenuPopover: FunctionComponent<ContextMenuPopoverProps> = forwardRef(\n (\n { cursorPosition, contextMenu, targetNode, show }: PropsWithoutRef<ContextMenuPopoverProps>,\n ref: ContextMenuPopoverProps['ref']\n ) => {\n const t = useI18n();\n const selection = document.getSelection();\n\n if (selection && !selection.toString() && targetNode) {\n const range = document.createRange();\n range.selectNodeContents(targetNode as Node);\n selection?.removeAllRanges();\n selection.addRange(range);\n }\n const { onItemClick, items } = contextMenu;\n const onItemSelect = (contextMenuItemId: string, e: MouseEvent) => {\n e.stopPropagation();\n const selectedcontextMenuItem = items.find(({ id }) => id === contextMenuItemId);\n\n if (selectedcontextMenuItem && selection) {\n onItemClick({\n fieldName: selectedcontextMenuItem.primary,\n fieldValue: selection.toString()\n });\n selection.removeAllRanges();\n }\n };\n\n const itemsToRender = items.map(item => {\n return {\n ...item,\n visual: item.selected ? (\n <StyledContextMenuFieldSelector selected />\n ) : (\n <StyledContextMenuFieldSelector />\n )\n };\n });\n\n return (\n <Popover\n as={StyledEmailMoreInfoPopover}\n target={{\n getBoundingClientRect: () => {\n const { x, y } = cursorPosition;\n return {\n width: 0,\n height: 0,\n top: y,\n right: x,\n bottom: y,\n left: x,\n x,\n y,\n toJSON: () => {}\n };\n }\n }}\n show={show}\n placement='bottom'\n ref={ref}\n >\n <StyledContextMenu>\n <Menu\n {...contextMenu}\n header={<Text variant='h5'>{t('copy_to')}</Text>}\n items={itemsToRender}\n onItemClick={onItemSelect}\n />\n </StyledContextMenu>\n </Popover>\n );\n }\n);\n\nexport default ContextMenuPopover;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Email.d.ts","sourceRoot":"","sources":["../../../src/components/Email/Email.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,iBAAiB,
|
|
1
|
+
{"version":3,"file":"Email.d.ts","sourceRoot":"","sources":["../../../src/components/Email/Email.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,iBAAiB,EASlB,MAAM,OAAO,CAAC;AAEf,OAAO,EACL,YAAY,EAuBb,MAAM,yBAAyB,CAAC;AAKjC,OAAO,EAAa,UAAU,EAAiC,MAAM,eAAe,CAAC;AA+CrF,QAAA,MAAM,KAAK,EAAE,iBAAiB,CAAC,UAAU,GAAG,YAAY,CAicvD,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createElement as _createElement } from "react";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
-
import { forwardRef, Fragment, useRef, useState, useMemo, useEffect } from 'react';
|
|
3
|
+
import { forwardRef, Fragment, useRef, useState, useMemo, useEffect, useImperativeHandle } from 'react';
|
|
4
4
|
import { Text, SummaryItem, Avatar, Flex, EmailDisplay, Button, Icon, Sentiment, useOuterEvent, Popover, useElement, CardContent, useI18n, FileDisplay, useBreakpoint, DateTimeDisplay, useConfiguration, MetaList, createStringMatcher, useScrollToggle } from '@pega/cosmos-react-core';
|
|
5
5
|
import { RichTextViewer } from '@pega/cosmos-react-rte';
|
|
6
6
|
import EmailEntity from './EmailEntity';
|
|
@@ -19,18 +19,53 @@ const Email = forwardRef((props, ref) => {
|
|
|
19
19
|
const [showForwardedContent, setShowForwardedContent] = useState(false);
|
|
20
20
|
const [emailMoreInfoPopover, setEmailMoreInfoPopover] = useElement(null);
|
|
21
21
|
const emailMoreInfoFields = [];
|
|
22
|
+
// Only way to set this is through imperative handle
|
|
23
|
+
const [contextMenuItems, setContextMenuItems] = useState([]);
|
|
24
|
+
const [contextMenuLoading, setContextMenuLoading] = useState(false);
|
|
25
|
+
useImperativeHandle(contextMenu?.handle, () => ({
|
|
26
|
+
setContextMenuItems: (ctxMenuItems) => {
|
|
27
|
+
setContextMenuItems(ctxMenuItems || []);
|
|
28
|
+
setContextMenuLoading(false);
|
|
29
|
+
}
|
|
30
|
+
}));
|
|
22
31
|
const headerRef = useRef(null);
|
|
23
32
|
const isSmallOrAbove = useBreakpoint('sm', { breakpointRef: headerRef });
|
|
24
33
|
const { locale } = useConfiguration();
|
|
25
|
-
const [currentTarget,
|
|
34
|
+
const [currentTarget, setCurrentTarget] = useState({
|
|
26
35
|
targetNode: null,
|
|
27
36
|
cursorPosition: {
|
|
28
37
|
x: 0,
|
|
29
38
|
y: 0
|
|
30
39
|
}
|
|
31
40
|
});
|
|
32
|
-
const [
|
|
41
|
+
const [popoverOpen, setPopoverOpen] = useState(false);
|
|
33
42
|
const { disableScroll, enableScroll } = useScrollToggle();
|
|
43
|
+
const [popoverEl, setPopoverEl] = useElement();
|
|
44
|
+
useOuterEvent('mousedown', [popoverEl], () => {
|
|
45
|
+
if (popoverOpen)
|
|
46
|
+
setPopoverOpen(false);
|
|
47
|
+
});
|
|
48
|
+
// Handler for right click on email body
|
|
49
|
+
const onContextMenu = (e) => {
|
|
50
|
+
e.preventDefault();
|
|
51
|
+
if (e.target instanceof HTMLElement && e.target.textContent?.trim()) {
|
|
52
|
+
setContextMenuItems([]);
|
|
53
|
+
setContextMenuLoading(true);
|
|
54
|
+
setPopoverOpen(true);
|
|
55
|
+
setCurrentTarget({
|
|
56
|
+
targetNode: e.target,
|
|
57
|
+
cursorPosition: {
|
|
58
|
+
x: e.pageX - window.scrollX,
|
|
59
|
+
y: e.pageY - window.scrollY
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
contextMenu?.onContextMenu(id, e);
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
const onItemClick = (selectedValue) => {
|
|
66
|
+
setPopoverOpen(false);
|
|
67
|
+
contextMenu?.onItemClick(selectedValue);
|
|
68
|
+
};
|
|
34
69
|
if (from) {
|
|
35
70
|
emailMoreInfoFields.push({
|
|
36
71
|
id: 'from',
|
|
@@ -116,7 +151,12 @@ const Email = forwardRef((props, ref) => {
|
|
|
116
151
|
const { cursorPosition, targetNode } = currentTarget;
|
|
117
152
|
renderedBody = (_jsxs(_Fragment, { children: [_jsx(RichTextViewer, { content: body, type: 'html', interactionRenderers: entityConfigs, "aria-label": t('unique_entities', [entityConfigs.length], {
|
|
118
153
|
count: entityConfigs.length
|
|
119
|
-
}), role: 'group' }), contextMenu &&
|
|
154
|
+
}), role: 'group' }), contextMenu && (_jsx(ContextMenuPopover, { cursorPosition: cursorPosition, contextMenu: {
|
|
155
|
+
...contextMenu,
|
|
156
|
+
items: contextMenuItems,
|
|
157
|
+
loading: contextMenuLoading,
|
|
158
|
+
onItemClick
|
|
159
|
+
}, targetNode: targetNode, show: popoverOpen, ref: setPopoverEl }))] }));
|
|
120
160
|
}
|
|
121
161
|
const emailMetaListItems = [
|
|
122
162
|
_jsxs(Text, { variant: 'secondary', children: [`${t('to')}: `, _jsx(EmailDisplayList, { emailUsers: to.slice(0, OVERFLOW_TO_EMAIL_COUNT), showShortName: true }), to.length > OVERFLOW_TO_EMAIL_COUNT &&
|
|
@@ -124,23 +164,15 @@ const Email = forwardRef((props, ref) => {
|
|
|
124
164
|
_jsxs(Text, { variant: 'secondary', children: [`${new Intl.DateTimeFormat(locale, { weekday: 'short' }).format(new Date(timeStamp))}, `, _jsx(DateTimeDisplay, { variant: 'datetime', format: 'short', value: timeStamp })] })
|
|
125
165
|
];
|
|
126
166
|
useEffect(() => {
|
|
127
|
-
if (
|
|
167
|
+
if (popoverOpen)
|
|
128
168
|
disableScroll();
|
|
129
169
|
else
|
|
130
170
|
enableScroll();
|
|
131
|
-
}, [
|
|
171
|
+
}, [popoverOpen]);
|
|
132
172
|
return (_jsxs(Flex, { as: StyledEmail, container: {
|
|
133
173
|
direction: 'column',
|
|
134
174
|
gap: 1
|
|
135
|
-
}, ref: ref, ...restProps,
|
|
136
|
-
? () => {
|
|
137
|
-
showPopover(false);
|
|
138
|
-
setcurrentTarget({
|
|
139
|
-
targetNode: null,
|
|
140
|
-
cursorPosition: { x: 0, y: 0 }
|
|
141
|
-
});
|
|
142
|
-
}
|
|
143
|
-
: undefined, children: [_jsx(SummaryItem, { as: StyledEmailHeader, visual: _jsx(Avatar, { ...from.avatarProps, name: from.fullName }), ref: headerRef, primary: _jsxs(Flex, { container: {
|
|
175
|
+
}, ref: ref, ...restProps, children: [_jsx(SummaryItem, { as: StyledEmailHeader, visual: _jsx(Avatar, { ...from.avatarProps, name: from.fullName }), ref: headerRef, primary: _jsxs(Flex, { container: {
|
|
144
176
|
gap: 1,
|
|
145
177
|
alignItems: 'center'
|
|
146
178
|
}, children: [_jsx(StyledFromEmailDisplay, { value: from.emailAddress, displayText: from.fullName, variant: 'text' }), sentiment && _jsx(Sentiment, { ...sentiment, labelHidden: true })] }), secondary: _jsxs(Flex, { container: {
|
|
@@ -158,21 +190,7 @@ const Email = forwardRef((props, ref) => {
|
|
|
158
190
|
direction: 'column',
|
|
159
191
|
gap: 2,
|
|
160
192
|
pad: [0, 2]
|
|
161
|
-
}, children: [subject && (_jsxs(Text, { variant: 'primary', children: [t('subject'), ": ", subject] })), _jsx(StyledEmailBody, { onContextMenu: contextMenu
|
|
162
|
-
? (e) => {
|
|
163
|
-
if (e.target instanceof HTMLElement && e.target.innerText.trim()) {
|
|
164
|
-
e.preventDefault();
|
|
165
|
-
showPopover(true);
|
|
166
|
-
setcurrentTarget({
|
|
167
|
-
targetNode: e.target,
|
|
168
|
-
cursorPosition: {
|
|
169
|
-
x: e.pageX - window.scrollX,
|
|
170
|
-
y: e.pageY - window.scrollY
|
|
171
|
-
}
|
|
172
|
-
});
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
: undefined, children: renderedBody }), forwardedContent && forwardedContent.length > 0 && (_jsxs(_Fragment, { children: [_jsx(StyledForwardedContentToggle, { variant: 'simple', icon: true, onClick: () => {
|
|
193
|
+
}, children: [subject && (_jsxs(Text, { variant: 'primary', children: [t('subject'), ": ", subject] })), _jsx(StyledEmailBody, { onContextMenu: contextMenu ? onContextMenu : undefined, children: renderedBody }), forwardedContent && forwardedContent.length > 0 && (_jsxs(_Fragment, { children: [_jsx(StyledForwardedContentToggle, { variant: 'simple', icon: true, onClick: () => {
|
|
176
194
|
setShowForwardedContent(prev => !prev);
|
|
177
195
|
}, label: showForwardedContent
|
|
178
196
|
? t('collapse_forwarded_message')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Email.js","sourceRoot":"","sources":["../../../src/components/Email/Email.tsx"],"names":[],"mappings":";;AAAA,OAAO,EACL,UAAU,EACV,QAAQ,EAIR,MAAM,EACN,QAAQ,EACR,OAAO,EACP,SAAS,EAEV,MAAM,OAAO,CAAC;AAEf,OAAO,EAEL,IAAI,EACJ,WAAW,EACX,MAAM,EACN,IAAI,EACJ,YAAY,EACZ,MAAM,EACN,IAAI,EAEJ,SAAS,EACT,aAAa,EACb,OAAO,EACP,UAAU,EACV,WAAW,EACX,OAAO,EACP,WAAW,EACX,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,QAAQ,EAER,mBAAmB,EACnB,eAAe,EAChB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC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AAI,IAAC,IAAI,EAAC,WAAW,GAAG,EACzB,yBAAO,CAAC,CAAC,WAAW,CAAC,GAAQ,IACxB,GACA,CACV,EACA,SAAS,IAAI,CACZ,KAAC,MAAM,IACL,OAAO,EAAC,QAAQ,EAChB,OAAO,EAAE,GAAG,EAAE;oCACZ,SAAS,CAAC,EAAE,CAAC,CAAC;gCAChB,CAAC,YAED,MAAC,IAAI,IACH,SAAS,EAAE;wCACT,GAAG,EAAE,CAAC;wCACN,UAAU,EAAE,QAAQ;qCACrB,aAED,KAAC,IAAI,IAAC,IAAI,EAAC,SAAS,GAAG,EACvB,yBAAO,CAAC,CAAC,SAAS,CAAC,GAAQ,IACtB,GACA,CACV,IACG,IACD,IACF,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,KAAK,CAAC","sourcesContent":["import {\n forwardRef,\n Fragment,\n FunctionComponent,\n PropsWithoutRef,\n ReactNode,\n useRef,\n useState,\n useMemo,\n useEffect,\n MouseEvent\n} from 'react';\n\nimport {\n ForwardProps,\n Text,\n SummaryItem,\n Avatar,\n Flex,\n EmailDisplay,\n Button,\n Icon,\n FieldValueListProps,\n Sentiment,\n useOuterEvent,\n Popover,\n useElement,\n CardContent,\n useI18n,\n FileDisplay,\n useBreakpoint,\n DateTimeDisplay,\n useConfiguration,\n MetaList,\n MetaListProps,\n createStringMatcher,\n useScrollToggle\n} from '@pega/cosmos-react-core';\nimport { RichTextViewer } from '@pega/cosmos-react-rte';\n\nimport EmailEntity from './EmailEntity';\nimport ContextMenuPopover from './ContextMenuPopover';\nimport { EmailUser, EmailProps, TargetProps } from './Email.types';\nimport {\n StyledEmail,\n StyledEmailDisplay,\n StyledEmailHeader,\n StyledFromEmailDisplay,\n StyledEmailMoreInfoButton,\n StyledEmailMoreInfoPopover,\n StyledEmailPrimaryFieldValueList,\n StyledEmailBody,\n StyledEmailSecondaryFieldValueList,\n StyledSuggestedRepliesButton,\n StyledSuggestedRepliesMenuButton,\n StyledForwardedContentToggle\n} from './Email.styles';\n\nconst EmailDisplayList = ({\n emailUsers,\n showEmailAddress,\n showShortName\n}: {\n emailUsers: EmailUser[];\n showEmailAddress?: boolean;\n showShortName?: boolean;\n}) => {\n return (\n <>\n {emailUsers.map(({ emailAddress, fullName, shortName }, i) => (\n <Fragment key={emailAddress}>\n {i === 0 ? '' : '; '}\n <EmailDisplay\n value={emailAddress}\n displayText={`${showShortName ? shortName : fullName}${\n showEmailAddress ? ` <${emailAddress}>` : ''\n }`}\n variant='text'\n as={StyledEmailDisplay}\n />\n </Fragment>\n ))}\n </>\n );\n};\n\nconst OVERFLOW_TO_EMAIL_COUNT = 2;\nconst OVERFLOW_EMAIL_SUGGESTION_COUNT = 2;\n\nconst Email: FunctionComponent<EmailProps & ForwardProps> = forwardRef(\n (props: PropsWithoutRef<EmailProps>, ref: EmailProps['ref']) => {\n const {\n id,\n from,\n to = [],\n cc = [],\n bcc = [],\n actions = [],\n timeStamp,\n sentiment,\n subject,\n body,\n forwardedContent,\n attachments = [],\n suggestions = [],\n entityHighlightMapping = [],\n onReply,\n onForward,\n onReplyAll,\n onSuggestionClick,\n contextMenu,\n ...restProps\n } = props;\n const t = useI18n();\n\n const [emailMoreInfoBtnRef, setEmailMoreInfoBtnRef] = useElement<HTMLButtonElement>(null);\n const [showEmailMoreInfo, setShowEmailMoreInfo] = useState(false);\n const [showForwardedContent, setShowForwardedContent] = useState(false);\n const [emailMoreInfoPopover, setEmailMoreInfoPopover] = useElement<HTMLDivElement>(null);\n const emailMoreInfoFields: FieldValueListProps['fields'] = [];\n\n const headerRef = useRef<HTMLDivElement>(null);\n const isSmallOrAbove = useBreakpoint('sm', { breakpointRef: headerRef });\n const { locale } = useConfiguration();\n const [currentTarget, setcurrentTarget] = useState<TargetProps>({\n targetNode: null,\n cursorPosition: {\n x: 0,\n y: 0\n }\n });\n const [open, showPopover] = useState(false);\n const { disableScroll, enableScroll } = useScrollToggle();\n\n if (from) {\n emailMoreInfoFields.push({\n id: 'from',\n name: t('from'),\n value: from.emailAddress\n });\n }\n\n if (to.length > 0) {\n emailMoreInfoFields.push({\n id: 'to',\n name: t('to'),\n value: <EmailDisplayList emailUsers={to} showEmailAddress />\n });\n }\n\n if (cc.length > 0) {\n emailMoreInfoFields.push({\n id: 'cc',\n name: 'CC',\n value: <EmailDisplayList emailUsers={cc} showEmailAddress />\n });\n }\n\n if (bcc.length > 0) {\n emailMoreInfoFields.push({\n id: 'BCC',\n name: 'BCC',\n value: <EmailDisplayList emailUsers={bcc} showEmailAddress />\n });\n }\n\n if (timeStamp) {\n emailMoreInfoFields.push({\n id: 'date',\n name: t('date'),\n value: (\n <Text>\n {`${new Intl.DateTimeFormat(locale, { weekday: 'short' }).format(\n new Date(timeStamp)\n )}, `}\n <DateTimeDisplay variant='datetime' format='short' value={timeStamp} />\n </Text>\n )\n });\n }\n\n useOuterEvent('mousedown', [emailMoreInfoPopover], () => {\n setShowEmailMoreInfo(false);\n });\n\n const secondaryFields: FieldValueListProps['fields'] = [];\n\n if (attachments.length > 0) {\n secondaryFields.push({\n id: 'attachments',\n name: '',\n value: (\n <Flex container={{ gap: 1, wrap: 'wrap' }}>\n {attachments.map(attachmentProps => (\n <FileDisplay {...attachmentProps} key={attachmentProps.value} />\n ))}\n </Flex>\n )\n });\n }\n\n if (suggestions.length > 0) {\n secondaryFields.push({\n id: 'suggested_replies',\n name: '',\n value: (\n <Flex container={{ wrap: 'wrap' }}>\n {suggestions\n .slice(0, OVERFLOW_EMAIL_SUGGESTION_COUNT)\n .map(({ id: suggestionId, title }) => (\n <StyledSuggestedRepliesButton\n variant='secondary'\n key={suggestionId}\n onClick={() => {\n onSuggestionClick?.(id, suggestionId);\n }}\n >\n {title}\n </StyledSuggestedRepliesButton>\n ))}\n {suggestions.length > OVERFLOW_EMAIL_SUGGESTION_COUNT && (\n <StyledSuggestedRepliesMenuButton\n text='Other responses'\n key='other_responses'\n variant='secondary'\n menu={{\n items: suggestions\n .slice(OVERFLOW_EMAIL_SUGGESTION_COUNT)\n .map(({ id: suggestionId, title }) => {\n return {\n primary: title,\n id: suggestionId,\n onClick: () => {\n onSuggestionClick?.(id, suggestionId);\n }\n };\n })\n }}\n />\n )}\n </Flex>\n )\n });\n }\n\n let renderedBody: ReactNode = body;\n\n const entityConfigs = useMemo(() => {\n return entityHighlightMapping.map(entity => {\n const regExp = createStringMatcher(entity.value, 'contains', 'gi');\n\n return {\n type: 'entity',\n regexPattern: regExp,\n component: () => <EmailEntity entity={entity} />\n };\n });\n }, [entityHighlightMapping]);\n\n // Apply entity highlighting only on string body\n if (typeof body === 'string') {\n const { cursorPosition, targetNode } = currentTarget;\n\n renderedBody = (\n <>\n <RichTextViewer\n content={body}\n type='html'\n interactionRenderers={entityConfigs}\n aria-label={t('unique_entities', [entityConfigs.length], {\n count: entityConfigs.length\n })}\n role='group'\n />\n\n {contextMenu && open && (\n <ContextMenuPopover\n cursorPosition={cursorPosition}\n contextMenu={contextMenu}\n targetNode={targetNode as Node}\n />\n )}\n </>\n );\n }\n\n const emailMetaListItems: MetaListProps['items'] = [\n <Text variant='secondary'>\n {`${t('to')}: `}\n <EmailDisplayList emailUsers={to.slice(0, OVERFLOW_TO_EMAIL_COUNT)} showShortName />\n {to.length > OVERFLOW_TO_EMAIL_COUNT &&\n `; +${t('more_count', [to.length - OVERFLOW_TO_EMAIL_COUNT])}`}\n </Text>,\n <Text variant='secondary'>\n {`${new Intl.DateTimeFormat(locale, { weekday: 'short' }).format(new Date(timeStamp))}, `}\n <DateTimeDisplay variant='datetime' format='short' value={timeStamp} />\n </Text>\n ];\n\n useEffect(() => {\n if (open) disableScroll();\n else enableScroll();\n }, [open]);\n\n return (\n <Flex\n as={StyledEmail}\n container={{\n direction: 'column',\n gap: 1\n }}\n ref={ref}\n {...restProps}\n onClick={\n open\n ? () => {\n showPopover(false);\n setcurrentTarget({\n targetNode: null,\n cursorPosition: { x: 0, y: 0 }\n });\n }\n : undefined\n }\n >\n <SummaryItem\n as={StyledEmailHeader}\n visual={<Avatar {...from.avatarProps} name={from.fullName} />}\n ref={headerRef}\n primary={\n <Flex\n container={{\n gap: 1,\n alignItems: 'center'\n }}\n >\n <StyledFromEmailDisplay\n value={from.emailAddress}\n displayText={from.fullName}\n variant='text'\n />\n {sentiment && <Sentiment {...sentiment} labelHidden />}\n </Flex>\n }\n secondary={\n <Flex\n container={{\n gap: 0,\n alignItems: 'start',\n direction: 'column'\n }}\n >\n <Flex\n container={{\n gap: 0,\n alignItems: 'start'\n }}\n >\n <MetaList items={isSmallOrAbove ? emailMetaListItems : [emailMetaListItems[0]]} />\n\n <Button\n icon\n variant='simple'\n as={StyledEmailMoreInfoButton}\n ref={setEmailMoreInfoBtnRef}\n onClick={() => {\n setShowEmailMoreInfo(true);\n }}\n label={t('show_more')}\n >\n <Icon name='arrow-micro-down' />\n </Button>\n <Popover\n as={StyledEmailMoreInfoPopover}\n show={showEmailMoreInfo}\n ref={setEmailMoreInfoPopover}\n target={emailMoreInfoBtnRef}\n placement='bottom'\n >\n <CardContent>\n <StyledEmailPrimaryFieldValueList fields={emailMoreInfoFields} />\n </CardContent>\n </Popover>\n </Flex>\n {!isSmallOrAbove && timeStamp && emailMetaListItems[1]}\n </Flex>\n }\n actions={\n <Flex\n container={{\n gap: 1\n }}\n >\n {actions}\n </Flex>\n }\n />\n <Flex\n container={{\n direction: 'column',\n gap: 2,\n pad: [0, 2]\n }}\n >\n {subject && (\n <Text variant='primary'>\n {t('subject')}: {subject}\n </Text>\n )}\n <StyledEmailBody\n onContextMenu={\n contextMenu\n ? (e: MouseEvent<HTMLDivElement>) => {\n if (e.target instanceof HTMLElement && e.target.innerText.trim()) {\n e.preventDefault();\n showPopover(true);\n setcurrentTarget({\n targetNode: e.target,\n cursorPosition: {\n x: e.pageX - window.scrollX,\n y: e.pageY - window.scrollY\n }\n });\n }\n }\n : undefined\n }\n >\n {renderedBody}\n </StyledEmailBody>\n {forwardedContent && forwardedContent.length > 0 && (\n <>\n <StyledForwardedContentToggle\n variant='simple'\n icon\n onClick={() => {\n setShowForwardedContent(prev => !prev);\n }}\n label={\n showForwardedContent\n ? t('collapse_forwarded_message')\n : t('expand_forwarded_message')\n }\n compact\n >\n <Icon name='more-alt' />\n </StyledForwardedContentToggle>\n {showForwardedContent && <RichTextViewer content={forwardedContent} type='html' />}\n </>\n )}\n </Flex>\n <Flex\n container={{\n direction: 'column',\n gap: 1,\n pad: [0, 2]\n }}\n >\n <StyledEmailSecondaryFieldValueList fields={secondaryFields} />\n <div>\n <Button\n variant='simple'\n onClick={() => {\n onReply?.(id);\n }}\n >\n <Flex\n container={{\n gap: 1,\n alignItems: 'center'\n }}\n >\n <Icon name='reply' />\n <span>{t('reply')}</span>\n </Flex>\n </Button>\n {onReplyAll && (\n <Button\n variant='simple'\n onClick={() => {\n onReplyAll(id);\n }}\n >\n <Flex\n container={{\n gap: 1,\n alignItems: 'center'\n }}\n >\n <Icon name='reply-all' />\n <span>{t('reply_all')}</span>\n </Flex>\n </Button>\n )}\n {onForward && (\n <Button\n variant='simple'\n onClick={() => {\n onForward(id);\n }}\n >\n <Flex\n container={{\n gap: 1,\n alignItems: 'center'\n }}\n >\n <Icon name='forward' />\n <span>{t('forward')}</span>\n </Flex>\n </Button>\n )}\n </div>\n </Flex>\n </Flex>\n );\n }\n);\n\nexport default Email;\n"]}
|
|
1
|
+
{"version":3,"file":"Email.js","sourceRoot":"","sources":["../../../src/components/Email/Email.tsx"],"names":[],"mappings":";;AAAA,OAAO,EACL,UAAU,EACV,QAAQ,EAIR,MAAM,EACN,QAAQ,EACR,OAAO,EACP,SAAS,EAET,mBAAmB,EACpB,MAAM,OAAO,CAAC;AAEf,OAAO,EAEL,IAAI,EACJ,WAAW,EACX,MAAM,EACN,IAAI,EACJ,YAAY,EACZ,MAAM,EACN,IAAI,EAEJ,SAAS,EACT,aAAa,EACb,OAAO,EACP,UAAU,EACV,WAAW,EACX,OAAO,EACP,WAAW,EACX,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,QAAQ,EAER,mBAAm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,EAAE;wCACT,GAAG,EAAE,CAAC;wCACN,UAAU,EAAE,QAAQ;qCACrB,aAED,KAAC,IAAI,IAAC,IAAI,EAAC,SAAS,GAAG,EACvB,yBAAO,CAAC,CAAC,SAAS,CAAC,GAAQ,IACtB,GACA,CACV,IACG,IACD,IACF,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,KAAK,CAAC","sourcesContent":["import {\n forwardRef,\n Fragment,\n FunctionComponent,\n PropsWithoutRef,\n ReactNode,\n useRef,\n useState,\n useMemo,\n useEffect,\n MouseEvent,\n useImperativeHandle\n} from 'react';\n\nimport {\n ForwardProps,\n Text,\n SummaryItem,\n Avatar,\n Flex,\n EmailDisplay,\n Button,\n Icon,\n FieldValueListProps,\n Sentiment,\n useOuterEvent,\n Popover,\n useElement,\n CardContent,\n useI18n,\n FileDisplay,\n useBreakpoint,\n DateTimeDisplay,\n useConfiguration,\n MetaList,\n MetaListProps,\n createStringMatcher,\n useScrollToggle\n} from '@pega/cosmos-react-core';\nimport { RichTextViewer } from '@pega/cosmos-react-rte';\n\nimport EmailEntity from './EmailEntity';\nimport ContextMenuPopover from './ContextMenuPopover';\nimport { EmailUser, EmailProps, TargetProps, ContextMenuProps } from './Email.types';\nimport {\n StyledEmail,\n StyledEmailDisplay,\n StyledEmailHeader,\n StyledFromEmailDisplay,\n StyledEmailMoreInfoButton,\n StyledEmailMoreInfoPopover,\n StyledEmailPrimaryFieldValueList,\n StyledEmailBody,\n StyledEmailSecondaryFieldValueList,\n StyledSuggestedRepliesButton,\n StyledSuggestedRepliesMenuButton,\n StyledForwardedContentToggle\n} from './Email.styles';\n\nconst EmailDisplayList = ({\n emailUsers,\n showEmailAddress,\n showShortName\n}: {\n emailUsers: EmailUser[];\n showEmailAddress?: boolean;\n showShortName?: boolean;\n}) => {\n return (\n <>\n {emailUsers.map(({ emailAddress, fullName, shortName }, i) => (\n <Fragment key={emailAddress}>\n {i === 0 ? '' : '; '}\n <EmailDisplay\n value={emailAddress}\n displayText={`${showShortName ? shortName : fullName}${\n showEmailAddress ? ` <${emailAddress}>` : ''\n }`}\n variant='text'\n as={StyledEmailDisplay}\n />\n </Fragment>\n ))}\n </>\n );\n};\n\nconst OVERFLOW_TO_EMAIL_COUNT = 2;\nconst OVERFLOW_EMAIL_SUGGESTION_COUNT = 2;\n\nconst Email: FunctionComponent<EmailProps & ForwardProps> = forwardRef(\n (props: PropsWithoutRef<EmailProps>, ref: EmailProps['ref']) => {\n const {\n id,\n from,\n to = [],\n cc = [],\n bcc = [],\n actions = [],\n timeStamp,\n sentiment,\n subject,\n body,\n forwardedContent,\n attachments = [],\n suggestions = [],\n entityHighlightMapping = [],\n onReply,\n onForward,\n onReplyAll,\n onSuggestionClick,\n contextMenu,\n ...restProps\n } = props;\n const t = useI18n();\n\n const [emailMoreInfoBtnRef, setEmailMoreInfoBtnRef] = useElement<HTMLButtonElement>(null);\n const [showEmailMoreInfo, setShowEmailMoreInfo] = useState(false);\n const [showForwardedContent, setShowForwardedContent] = useState(false);\n const [emailMoreInfoPopover, setEmailMoreInfoPopover] = useElement<HTMLDivElement>(null);\n const emailMoreInfoFields: FieldValueListProps['fields'] = [];\n // Only way to set this is through imperative handle\n const [contextMenuItems, setContextMenuItems] = useState<ContextMenuProps['items']>([]);\n const [contextMenuLoading, setContextMenuLoading] = useState<boolean>(false);\n\n useImperativeHandle(contextMenu?.handle, () => ({\n setContextMenuItems: (ctxMenuItems: ContextMenuProps['items']) => {\n setContextMenuItems(ctxMenuItems || []);\n setContextMenuLoading(false);\n }\n }));\n\n const headerRef = useRef<HTMLDivElement>(null);\n const isSmallOrAbove = useBreakpoint('sm', { breakpointRef: headerRef });\n const { locale } = useConfiguration();\n const [currentTarget, setCurrentTarget] = useState<TargetProps>({\n targetNode: null,\n cursorPosition: {\n x: 0,\n y: 0\n }\n });\n const [popoverOpen, setPopoverOpen] = useState(false);\n const { disableScroll, enableScroll } = useScrollToggle();\n const [popoverEl, setPopoverEl] = useElement<HTMLElement>();\n\n useOuterEvent('mousedown', [popoverEl], () => {\n if (popoverOpen) setPopoverOpen(false);\n });\n\n // Handler for right click on email body\n const onContextMenu = (e: MouseEvent<HTMLDivElement>) => {\n e.preventDefault();\n if (e.target instanceof HTMLElement && e.target.textContent?.trim()) {\n setContextMenuItems([]);\n setContextMenuLoading(true);\n setPopoverOpen(true);\n setCurrentTarget({\n targetNode: e.target,\n cursorPosition: {\n x: e.pageX - window.scrollX,\n y: e.pageY - window.scrollY\n }\n });\n contextMenu?.onContextMenu(id, e);\n }\n };\n\n const onItemClick: ContextMenuProps['onItemClick'] = (selectedValue: {\n fieldName: string;\n fieldValue: string;\n }) => {\n setPopoverOpen(false);\n contextMenu?.onItemClick(selectedValue);\n };\n\n if (from) {\n emailMoreInfoFields.push({\n id: 'from',\n name: t('from'),\n value: from.emailAddress\n });\n }\n\n if (to.length > 0) {\n emailMoreInfoFields.push({\n id: 'to',\n name: t('to'),\n value: <EmailDisplayList emailUsers={to} showEmailAddress />\n });\n }\n\n if (cc.length > 0) {\n emailMoreInfoFields.push({\n id: 'cc',\n name: 'CC',\n value: <EmailDisplayList emailUsers={cc} showEmailAddress />\n });\n }\n\n if (bcc.length > 0) {\n emailMoreInfoFields.push({\n id: 'BCC',\n name: 'BCC',\n value: <EmailDisplayList emailUsers={bcc} showEmailAddress />\n });\n }\n\n if (timeStamp) {\n emailMoreInfoFields.push({\n id: 'date',\n name: t('date'),\n value: (\n <Text>\n {`${new Intl.DateTimeFormat(locale, { weekday: 'short' }).format(\n new Date(timeStamp)\n )}, `}\n <DateTimeDisplay variant='datetime' format='short' value={timeStamp} />\n </Text>\n )\n });\n }\n\n useOuterEvent('mousedown', [emailMoreInfoPopover], () => {\n setShowEmailMoreInfo(false);\n });\n\n const secondaryFields: FieldValueListProps['fields'] = [];\n\n if (attachments.length > 0) {\n secondaryFields.push({\n id: 'attachments',\n name: '',\n value: (\n <Flex container={{ gap: 1, wrap: 'wrap' }}>\n {attachments.map(attachmentProps => (\n <FileDisplay {...attachmentProps} key={attachmentProps.value} />\n ))}\n </Flex>\n )\n });\n }\n\n if (suggestions.length > 0) {\n secondaryFields.push({\n id: 'suggested_replies',\n name: '',\n value: (\n <Flex container={{ wrap: 'wrap' }}>\n {suggestions\n .slice(0, OVERFLOW_EMAIL_SUGGESTION_COUNT)\n .map(({ id: suggestionId, title }) => (\n <StyledSuggestedRepliesButton\n variant='secondary'\n key={suggestionId}\n onClick={() => {\n onSuggestionClick?.(id, suggestionId);\n }}\n >\n {title}\n </StyledSuggestedRepliesButton>\n ))}\n {suggestions.length > OVERFLOW_EMAIL_SUGGESTION_COUNT && (\n <StyledSuggestedRepliesMenuButton\n text='Other responses'\n key='other_responses'\n variant='secondary'\n menu={{\n items: suggestions\n .slice(OVERFLOW_EMAIL_SUGGESTION_COUNT)\n .map(({ id: suggestionId, title }) => {\n return {\n primary: title,\n id: suggestionId,\n onClick: () => {\n onSuggestionClick?.(id, suggestionId);\n }\n };\n })\n }}\n />\n )}\n </Flex>\n )\n });\n }\n\n let renderedBody: ReactNode = body;\n\n const entityConfigs = useMemo(() => {\n return entityHighlightMapping.map(entity => {\n const regExp = createStringMatcher(entity.value, 'contains', 'gi');\n\n return {\n type: 'entity',\n regexPattern: regExp,\n component: () => <EmailEntity entity={entity} />\n };\n });\n }, [entityHighlightMapping]);\n\n // Apply entity highlighting only on string body\n if (typeof body === 'string') {\n const { cursorPosition, targetNode } = currentTarget;\n\n renderedBody = (\n <>\n <RichTextViewer\n content={body}\n type='html'\n interactionRenderers={entityConfigs}\n aria-label={t('unique_entities', [entityConfigs.length], {\n count: entityConfigs.length\n })}\n role='group'\n />\n\n {/* Don't render it if context menu is disabled */}\n {contextMenu && (\n <ContextMenuPopover\n cursorPosition={cursorPosition}\n contextMenu={{\n ...contextMenu,\n items: contextMenuItems,\n loading: contextMenuLoading,\n onItemClick\n }}\n targetNode={targetNode as Node}\n show={popoverOpen}\n ref={setPopoverEl}\n />\n )}\n </>\n );\n }\n\n const emailMetaListItems: MetaListProps['items'] = [\n <Text variant='secondary'>\n {`${t('to')}: `}\n <EmailDisplayList emailUsers={to.slice(0, OVERFLOW_TO_EMAIL_COUNT)} showShortName />\n {to.length > OVERFLOW_TO_EMAIL_COUNT &&\n `; +${t('more_count', [to.length - OVERFLOW_TO_EMAIL_COUNT])}`}\n </Text>,\n <Text variant='secondary'>\n {`${new Intl.DateTimeFormat(locale, { weekday: 'short' }).format(new Date(timeStamp))}, `}\n <DateTimeDisplay variant='datetime' format='short' value={timeStamp} />\n </Text>\n ];\n\n useEffect(() => {\n if (popoverOpen) disableScroll();\n else enableScroll();\n }, [popoverOpen]);\n\n return (\n <Flex\n as={StyledEmail}\n container={{\n direction: 'column',\n gap: 1\n }}\n ref={ref}\n {...restProps}\n >\n <SummaryItem\n as={StyledEmailHeader}\n visual={<Avatar {...from.avatarProps} name={from.fullName} />}\n ref={headerRef}\n primary={\n <Flex\n container={{\n gap: 1,\n alignItems: 'center'\n }}\n >\n <StyledFromEmailDisplay\n value={from.emailAddress}\n displayText={from.fullName}\n variant='text'\n />\n {sentiment && <Sentiment {...sentiment} labelHidden />}\n </Flex>\n }\n secondary={\n <Flex\n container={{\n gap: 0,\n alignItems: 'start',\n direction: 'column'\n }}\n >\n <Flex\n container={{\n gap: 0,\n alignItems: 'start'\n }}\n >\n <MetaList items={isSmallOrAbove ? emailMetaListItems : [emailMetaListItems[0]]} />\n\n <Button\n icon\n variant='simple'\n as={StyledEmailMoreInfoButton}\n ref={setEmailMoreInfoBtnRef}\n onClick={() => {\n setShowEmailMoreInfo(true);\n }}\n label={t('show_more')}\n >\n <Icon name='arrow-micro-down' />\n </Button>\n <Popover\n as={StyledEmailMoreInfoPopover}\n show={showEmailMoreInfo}\n ref={setEmailMoreInfoPopover}\n target={emailMoreInfoBtnRef}\n placement='bottom'\n >\n <CardContent>\n <StyledEmailPrimaryFieldValueList fields={emailMoreInfoFields} />\n </CardContent>\n </Popover>\n </Flex>\n {!isSmallOrAbove && timeStamp && emailMetaListItems[1]}\n </Flex>\n }\n actions={\n <Flex\n container={{\n gap: 1\n }}\n >\n {actions}\n </Flex>\n }\n />\n <Flex\n container={{\n direction: 'column',\n gap: 2,\n pad: [0, 2]\n }}\n >\n {subject && (\n <Text variant='primary'>\n {t('subject')}: {subject}\n </Text>\n )}\n {/* Attach the handler only when context menu enabled by providing the prop */}\n <StyledEmailBody onContextMenu={contextMenu ? onContextMenu : undefined}>\n {renderedBody}\n </StyledEmailBody>\n {forwardedContent && forwardedContent.length > 0 && (\n <>\n <StyledForwardedContentToggle\n variant='simple'\n icon\n onClick={() => {\n setShowForwardedContent(prev => !prev);\n }}\n label={\n showForwardedContent\n ? t('collapse_forwarded_message')\n : t('expand_forwarded_message')\n }\n compact\n >\n <Icon name='more-alt' />\n </StyledForwardedContentToggle>\n {showForwardedContent && <RichTextViewer content={forwardedContent} type='html' />}\n </>\n )}\n </Flex>\n <Flex\n container={{\n direction: 'column',\n gap: 1,\n pad: [0, 2]\n }}\n >\n <StyledEmailSecondaryFieldValueList fields={secondaryFields} />\n <div>\n <Button\n variant='simple'\n onClick={() => {\n onReply?.(id);\n }}\n >\n <Flex\n container={{\n gap: 1,\n alignItems: 'center'\n }}\n >\n <Icon name='reply' />\n <span>{t('reply')}</span>\n </Flex>\n </Button>\n {onReplyAll && (\n <Button\n variant='simple'\n onClick={() => {\n onReplyAll(id);\n }}\n >\n <Flex\n container={{\n gap: 1,\n alignItems: 'center'\n }}\n >\n <Icon name='reply-all' />\n <span>{t('reply_all')}</span>\n </Flex>\n </Button>\n )}\n {onForward && (\n <Button\n variant='simple'\n onClick={() => {\n onForward(id);\n }}\n >\n <Flex\n container={{\n gap: 1,\n alignItems: 'center'\n }}\n >\n <Icon name='forward' />\n <span>{t('forward')}</span>\n </Flex>\n </Button>\n )}\n </div>\n </Flex>\n </Flex>\n );\n }\n);\n\nexport default Email;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Email.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Email/Email.styles.ts"],"names":[],"mappings":";AAoBA,OAAO,EAAE,gBAAgB,EAAE,mCAAmC,EAAE,MAAM,eAAe,CAAC;AAEtF,eAAO,MAAM,yBAAyB,4GAIrC,CAAC;AAEF,eAAO,MAAM,iBAAiB,yGAY5B,CAAC;AAIH,eAAO,MAAM,4BAA4B,qOAUvC,CAAC;AAIH,eAAO,MAAM,gCAAgC,yOAU3C,CAAC;AAIH,eAAO,MAAM,eAAe,yGAAe,CAAC;AAE5C,eAAO,MAAM,sBAAsB,2OAMjC,CAAC;AAIH,eAAO,MAAM,kBAAkB,0GAE9B,CAAC;AAEF,eAAO,MAAM,gCAAgC,6OAE5C,CAAC;AAEF,eAAO,MAAM,kCAAkC,6OAY7C,CAAC;AAIH,eAAO,MAAM,0BAA0B,yGAEtC,CAAC;AAEF,eAAO,MAAM,wBAAwB,yGAInC,CAAC;AAEH,eAAO,MAAM,WAAW,yGAAe,CAAC;AAExC,eAAO,MAAM,iBAAiB,wHAc5B,CAAC;AAIH,eAAO,MAAM,gBAAgB,6OAU3B,CAAC;AAEH,eAAO,MAAM,4BAA4B,qOAExC,CAAC;AAIF,eAAO,MAAM,cAAc,yGAMzB,CAAC;AAIH,eAAO,MAAM,8BAA8B,0IAmB1C,CAAC;AAIF,eAAO,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"Email.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Email/Email.styles.ts"],"names":[],"mappings":";AAoBA,OAAO,EAAE,gBAAgB,EAAE,mCAAmC,EAAE,MAAM,eAAe,CAAC;AAEtF,eAAO,MAAM,yBAAyB,4GAIrC,CAAC;AAEF,eAAO,MAAM,iBAAiB,yGAY5B,CAAC;AAIH,eAAO,MAAM,4BAA4B,qOAUvC,CAAC;AAIH,eAAO,MAAM,gCAAgC,yOAU3C,CAAC;AAIH,eAAO,MAAM,eAAe,yGAAe,CAAC;AAE5C,eAAO,MAAM,sBAAsB,2OAMjC,CAAC;AAIH,eAAO,MAAM,kBAAkB,0GAE9B,CAAC;AAEF,eAAO,MAAM,gCAAgC,6OAE5C,CAAC;AAEF,eAAO,MAAM,kCAAkC,6OAY7C,CAAC;AAIH,eAAO,MAAM,0BAA0B,yGAEtC,CAAC;AAEF,eAAO,MAAM,wBAAwB,yGAInC,CAAC;AAEH,eAAO,MAAM,WAAW,yGAAe,CAAC;AAExC,eAAO,MAAM,iBAAiB,wHAc5B,CAAC;AAIH,eAAO,MAAM,gBAAgB,6OAU3B,CAAC;AAEH,eAAO,MAAM,4BAA4B,qOAExC,CAAC;AAIF,eAAO,MAAM,cAAc,yGAMzB,CAAC;AAIH,eAAO,MAAM,8BAA8B,0IAmB1C,CAAC;AAIF,eAAO,MAAM,iBAAiB,yGAM5B,CAAC;AAGH,eAAO,MAAM,UAAU,yGAKrB,CAAC;AAIH,eAAO,MAAM,YAAY,4GAMvB,CAAC;AAEH,eAAO,MAAM,mBAAmB;;SAgB9B,CAAC;AAIH,eAAO,MAAM,qBAAqB,4GAKhC,CAAC;AAIH,eAAO,MAAM,uBAAuB;2BAAuC,OAAO;SASjF,CAAC;AAEF,eAAO,MAAM,eAAe;2BAAuC,OAAO;SAUzE,CAAC"}
|
|
@@ -138,10 +138,9 @@ export const StyledContextMenuFieldSelector = styled.div(({ theme, selected }) =
|
|
|
138
138
|
});
|
|
139
139
|
StyledContextMenuFieldSelector.defaultProps = defaultThemeProp;
|
|
140
140
|
export const StyledContextMenu = styled.div(({ theme }) => {
|
|
141
|
-
const secondaryBackground = theme.base.palette['secondary-background'];
|
|
142
141
|
return css `
|
|
143
142
|
header {
|
|
144
|
-
background-color: ${
|
|
143
|
+
background-color: ${theme.base.palette['secondary-background']};
|
|
145
144
|
}
|
|
146
145
|
`;
|
|
147
146
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Email.styles.js","sourceRoot":"","sources":["../../../src/components/Email/Email.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GA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AA;;OAEF;KACF,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,GAAG,CACvC,CAAC,EAAE,qBAAqB,EAAE,KAAK,EAAE,EAAE,EAAE;IACnC,OAAO,GAAG,CAAA;QACN,qBAAqB;QACvB,GAAG,CAAA;;OAEF;oCAC6B,KAAK,CAAC,IAAI,CAAC,OAAO;KACjD,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\nimport { readableColor } from 'polished';\n\nimport {\n Button,\n calculateFontSize,\n defaultThemeProp,\n EmailDisplay,\n FieldValueList,\n MenuButton,\n StyledFieldName,\n StyledFieldValue,\n StyledSecondary,\n StyledSummaryItemActions,\n StyledVisual,\n tryCatch,\n readableHue,\n nlpColors\n} from '@pega/cosmos-react-core';\n\nimport { EmailEntityProps, StyledContextMenuFieldSelectorProps } from './Email.types';\n\nexport const StyledEmailMoreInfoButton = styled.button`\n min-height: 0.5rem;\n min-width: 0.5rem;\n flex-shrink: 0;\n`;\n\nexport const StyledEmailHeader = styled.div(({ theme }) => {\n return css`\n grid-column-gap: ${theme.base.spacing};\n border-bottom: 0.0625rem solid ${theme.base.palette['border-line']};\n padding: 0 0 calc(2 * ${theme.base.spacing}) calc(2 * ${theme.base.spacing});\n ${StyledVisual},${StyledSummaryItemActions} {\n align-self: flex-start;\n }\n ${StyledSecondary} {\n margin-top: calc(0.5 * ${theme.base.spacing});\n }\n `;\n});\n\nStyledEmailHeader.defaultProps = defaultThemeProp;\n\nexport const StyledSuggestedRepliesButton = styled(Button)(({ theme }) => {\n return css`\n & + & {\n margin-inline-start: 0;\n }\n margin-block-start: ${theme.base.spacing};\n :not(:last-child) {\n margin-inline-end: ${theme.base.spacing};\n }\n `;\n});\n\nStyledSuggestedRepliesButton.defaultProps = defaultThemeProp;\n\nexport const StyledSuggestedRepliesMenuButton = styled(MenuButton)(({ theme }) => {\n return css`\n &&& {\n margin-inline-start: 0;\n }\n margin-block-start: ${theme.base.spacing};\n :not(:last-child) {\n margin-inline-end: ${theme.base.spacing};\n }\n `;\n});\n\nStyledSuggestedRepliesMenuButton.defaultProps = defaultThemeProp;\n\nexport const StyledEmailBody = styled.div``;\n\nexport const StyledFromEmailDisplay = styled(EmailDisplay)(({ theme }) => {\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n return css`\n font-weight: ${theme.base['font-weight']['semi-bold']};\n font-size: ${fontSize.m};\n `;\n});\n\nStyledFromEmailDisplay.defaultProps = defaultThemeProp;\n\nexport const StyledEmailDisplay = styled.span`\n font-size: inherit;\n`;\n\nexport const StyledEmailPrimaryFieldValueList = styled(FieldValueList)`\n grid-template-columns: auto 1fr;\n`;\n\nexport const StyledEmailSecondaryFieldValueList = styled(FieldValueList)(({ theme }) => {\n return css`\n grid-template-columns: 1fr;\n gap: 0;\n padding: ${theme.base.spacing} 0;\n ${StyledFieldValue}:not(:last-child) {\n margin-bottom: calc(2 * ${theme.base.spacing});\n }\n ${StyledFieldName} {\n margin-bottom: calc(0.25 * ${theme.base.spacing});\n }\n `;\n});\n\nStyledEmailSecondaryFieldValueList.defaultProps = defaultThemeProp;\n\nexport const StyledEmailMoreInfoPopover = styled.div`\n max-width: 30rem;\n`;\n\nexport const StyledSecondarySeparator = styled.div(({ theme }) => {\n return css`\n margin: 0 calc(${theme.base.spacing} / 2);\n `;\n});\n\nexport const StyledEmail = styled.div``;\n\nexport const StyledEmailEntity = styled.mark<EmailEntityProps>(({ entity, theme }) => {\n const variant = entity.variant;\n const backgroundColor = readableHue(\n nlpColors[variant % nlpColors.length],\n theme.base.palette['primary-background']\n );\n const textColor = tryCatch(() => readableColor(backgroundColor));\n return css`\n border-radius: calc(${theme.base['border-radius']} / 3);\n padding: 0 calc(0.5 * ${theme.base.spacing});\n background-color: ${backgroundColor};\n color: ${textColor};\n display: inline-block;\n `;\n});\n\nStyledEmailEntity.defaultProps = defaultThemeProp;\n\nexport const StyledEntityList = styled(FieldValueList)(({ theme }) => {\n const textColor = tryCatch(() => readableColor(theme.base.palette['primary-background']));\n return css`\n ${StyledFieldName} {\n color: ${textColor};\n }\n ${StyledEmailEntity} {\n padding: calc(0.5 * ${theme.base.spacing});\n }\n `;\n});\n\nexport const StyledForwardedContentToggle = styled(Button)`\n align-self: flex-start;\n`;\n\nStyledEntityList.defaultProps = defaultThemeProp;\n\nexport const StyledLoadMore = styled.div(({ theme }) => {\n return css`\n margin: ${theme.base.spacing} 0;\n min-height: 2rem;\n min-width: 2rem;\n `;\n});\n\nStyledLoadMore.defaultProps = defaultThemeProp;\n\nexport const StyledContextMenuFieldSelector = styled.div<StyledContextMenuFieldSelectorProps>(\n ({ theme, selected }) => {\n const background = selected\n ? theme.base.colors.green.medium\n : theme.base.palette['primary-background'];\n const borderColor = selected\n ? theme.base.colors.green['extra-light']\n : theme.base.palette['primary-background'];\n return css`\n background-color: ${background};\n border: 0.0625rem solid ${borderColor};\n border-radius: 100%;\n display: inline-block;\n height: 0.625rem;\n width: 0.625rem;\n background-clip: content-box;\n padding: 0.0625rem;\n `;\n }\n);\n\nStyledContextMenuFieldSelector.defaultProps = defaultThemeProp;\n\nexport const StyledContextMenu = styled.div(({ theme }) => {\n const secondaryBackground = theme.base.palette['secondary-background'];\n\n return css`\n header {\n background-color: ${secondaryBackground};\n }\n `;\n});\nStyledContextMenu.defaultProps = defaultThemeProp;\n\nexport const StyledList = styled.div(() => {\n return css`\n position: sticky;\n top: inherit;\n `;\n});\n\nStyledList.defaultProps = defaultThemeProp;\n\nexport const StyledHeader = styled.header(() => {\n return css`\n position: sticky;\n top: var(--appshell-offset);\n height: 4rem;\n `;\n});\n\nexport const StyledGridContainer = styled.div<{\n showExpandedUtilities?: boolean;\n}>(({ theme, showExpandedUtilities }) => {\n return css`\n min-height: calc(100vh - var(--appshell-offset, 0rem));\n background-color: ${theme.base.palette['app-background']};\n top: calc(var(--appshell-offset) + var(--headerOffsetHeight));\n ${!showExpandedUtilities &&\n css`\n width: auto;\n `}\n\n ${StyledList} {\n height: calc(100vh - var(--appshell-offset) - var(--headerOffsetHeight));\n }\n `;\n});\n\nStyledGridContainer.defaultProps = defaultThemeProp;\n\nexport const StyledUtilitiesToggle = styled.button(({ theme }) => {\n return css`\n color: ${theme.base.palette['foreground-color']};\n align-self: flex-end;\n `;\n});\n\nStyledUtilitiesToggle.defaultProps = defaultThemeProp;\n\nexport const StyledExpandedUtilities = styled.div<{ showExpandedUtilities: boolean }>(\n ({ showExpandedUtilities }) => {\n return css`\n ${!showExpandedUtilities &&\n css`\n display: none;\n `}\n `;\n }\n);\n\nexport const StyledUtilities = styled.div<{ showExpandedUtilities: boolean }>(\n ({ showExpandedUtilities, theme }) => {\n return css`\n ${showExpandedUtilities &&\n css`\n width: 25rem;\n `}\n margin-inline-end: calc(2 * ${theme.base.spacing});\n `;\n }\n);\n\nStyledUtilities.defaultProps = defaultThemeProp;\n"]}
|
|
1
|
+
{"version":3,"file":"Email.styles.js","sourceRoot":"","sources":["../../../src/components/Email/Email.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EACL,MAAM,EACN,iBAAiB,EACjB,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,UAAU,EACV,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,wBAAwB,EACxB,YAAY,EACZ,QAAQ,EACR,WAAW,EACX,SAAS,EACV,MAAM,yBAAyB,CAAC;AAIjC,MAAM,CAAC,MAAM,yBAAyB,GAAG,MAAM,CAAC,MAAM,CAAA;;;;CAIrD,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACxD,OAAO,GAAG,CAAA;uBACW,KAAK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AAE,qBAAqB,EAAE,EAAE,EAAE;IACtC,OAAO,GAAG,CAAA;;wBAEY,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC;;MAEtD,CAAC,qBAAqB;QACxB,GAAG,CAAA;;KAEF;;MAEC,UAAU;;;GAGb,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,mBAAmB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAEpD,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IAC/D,OAAO,GAAG,CAAA;aACC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC;;GAEhD,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,qBAAqB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAEtD,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC,GAAG,CAC/C,CAAC,EAAE,qBAAqB,EAAE,EAAE,EAAE;IAC5B,OAAO,GAAG,CAAA;QACN,CAAC,qBAAqB;QACxB,GAAG,CAAA;;OAEF;KACF,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,GAAG,CACvC,CAAC,EAAE,qBAAqB,EAAE,KAAK,EAAE,EAAE,EAAE;IACnC,OAAO,GAAG,CAAA;QACN,qBAAqB;QACvB,GAAG,CAAA;;OAEF;oCAC6B,KAAK,CAAC,IAAI,CAAC,OAAO;KACjD,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\nimport { readableColor } from 'polished';\n\nimport {\n Button,\n calculateFontSize,\n defaultThemeProp,\n EmailDisplay,\n FieldValueList,\n MenuButton,\n StyledFieldName,\n StyledFieldValue,\n StyledSecondary,\n StyledSummaryItemActions,\n StyledVisual,\n tryCatch,\n readableHue,\n nlpColors\n} from '@pega/cosmos-react-core';\n\nimport { EmailEntityProps, StyledContextMenuFieldSelectorProps } from './Email.types';\n\nexport const StyledEmailMoreInfoButton = styled.button`\n min-height: 0.5rem;\n min-width: 0.5rem;\n flex-shrink: 0;\n`;\n\nexport const StyledEmailHeader = styled.div(({ theme }) => {\n return css`\n grid-column-gap: ${theme.base.spacing};\n border-bottom: 0.0625rem solid ${theme.base.palette['border-line']};\n padding: 0 0 calc(2 * ${theme.base.spacing}) calc(2 * ${theme.base.spacing});\n ${StyledVisual},${StyledSummaryItemActions} {\n align-self: flex-start;\n }\n ${StyledSecondary} {\n margin-top: calc(0.5 * ${theme.base.spacing});\n }\n `;\n});\n\nStyledEmailHeader.defaultProps = defaultThemeProp;\n\nexport const StyledSuggestedRepliesButton = styled(Button)(({ theme }) => {\n return css`\n & + & {\n margin-inline-start: 0;\n }\n margin-block-start: ${theme.base.spacing};\n :not(:last-child) {\n margin-inline-end: ${theme.base.spacing};\n }\n `;\n});\n\nStyledSuggestedRepliesButton.defaultProps = defaultThemeProp;\n\nexport const StyledSuggestedRepliesMenuButton = styled(MenuButton)(({ theme }) => {\n return css`\n &&& {\n margin-inline-start: 0;\n }\n margin-block-start: ${theme.base.spacing};\n :not(:last-child) {\n margin-inline-end: ${theme.base.spacing};\n }\n `;\n});\n\nStyledSuggestedRepliesMenuButton.defaultProps = defaultThemeProp;\n\nexport const StyledEmailBody = styled.div``;\n\nexport const StyledFromEmailDisplay = styled(EmailDisplay)(({ theme }) => {\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n return css`\n font-weight: ${theme.base['font-weight']['semi-bold']};\n font-size: ${fontSize.m};\n `;\n});\n\nStyledFromEmailDisplay.defaultProps = defaultThemeProp;\n\nexport const StyledEmailDisplay = styled.span`\n font-size: inherit;\n`;\n\nexport const StyledEmailPrimaryFieldValueList = styled(FieldValueList)`\n grid-template-columns: auto 1fr;\n`;\n\nexport const StyledEmailSecondaryFieldValueList = styled(FieldValueList)(({ theme }) => {\n return css`\n grid-template-columns: 1fr;\n gap: 0;\n padding: ${theme.base.spacing} 0;\n ${StyledFieldValue}:not(:last-child) {\n margin-bottom: calc(2 * ${theme.base.spacing});\n }\n ${StyledFieldName} {\n margin-bottom: calc(0.25 * ${theme.base.spacing});\n }\n `;\n});\n\nStyledEmailSecondaryFieldValueList.defaultProps = defaultThemeProp;\n\nexport const StyledEmailMoreInfoPopover = styled.div`\n max-width: 30rem;\n`;\n\nexport const StyledSecondarySeparator = styled.div(({ theme }) => {\n return css`\n margin: 0 calc(${theme.base.spacing} / 2);\n `;\n});\n\nexport const StyledEmail = styled.div``;\n\nexport const StyledEmailEntity = styled.mark<EmailEntityProps>(({ entity, theme }) => {\n const variant = entity.variant;\n const backgroundColor = readableHue(\n nlpColors[variant % nlpColors.length],\n theme.base.palette['primary-background']\n );\n const textColor = tryCatch(() => readableColor(backgroundColor));\n return css`\n border-radius: calc(${theme.base['border-radius']} / 3);\n padding: 0 calc(0.5 * ${theme.base.spacing});\n background-color: ${backgroundColor};\n color: ${textColor};\n display: inline-block;\n `;\n});\n\nStyledEmailEntity.defaultProps = defaultThemeProp;\n\nexport const StyledEntityList = styled(FieldValueList)(({ theme }) => {\n const textColor = tryCatch(() => readableColor(theme.base.palette['primary-background']));\n return css`\n ${StyledFieldName} {\n color: ${textColor};\n }\n ${StyledEmailEntity} {\n padding: calc(0.5 * ${theme.base.spacing});\n }\n `;\n});\n\nexport const StyledForwardedContentToggle = styled(Button)`\n align-self: flex-start;\n`;\n\nStyledEntityList.defaultProps = defaultThemeProp;\n\nexport const StyledLoadMore = styled.div(({ theme }) => {\n return css`\n margin: ${theme.base.spacing} 0;\n min-height: 2rem;\n min-width: 2rem;\n `;\n});\n\nStyledLoadMore.defaultProps = defaultThemeProp;\n\nexport const StyledContextMenuFieldSelector = styled.div<StyledContextMenuFieldSelectorProps>(\n ({ theme, selected }) => {\n const background = selected\n ? theme.base.colors.green.medium\n : theme.base.palette['primary-background'];\n const borderColor = selected\n ? theme.base.colors.green['extra-light']\n : theme.base.palette['primary-background'];\n return css`\n background-color: ${background};\n border: 0.0625rem solid ${borderColor};\n border-radius: 100%;\n display: inline-block;\n height: 0.625rem;\n width: 0.625rem;\n background-clip: content-box;\n padding: 0.0625rem;\n `;\n }\n);\n\nStyledContextMenuFieldSelector.defaultProps = defaultThemeProp;\n\nexport const StyledContextMenu = styled.div(({ theme }) => {\n return css`\n header {\n background-color: ${theme.base.palette['secondary-background']};\n }\n `;\n});\nStyledContextMenu.defaultProps = defaultThemeProp;\n\nexport const StyledList = styled.div(() => {\n return css`\n position: sticky;\n top: inherit;\n `;\n});\n\nStyledList.defaultProps = defaultThemeProp;\n\nexport const StyledHeader = styled.header(() => {\n return css`\n position: sticky;\n top: var(--appshell-offset);\n height: 4rem;\n `;\n});\n\nexport const StyledGridContainer = styled.div<{\n showExpandedUtilities?: boolean;\n}>(({ theme, showExpandedUtilities }) => {\n return css`\n min-height: calc(100vh - var(--appshell-offset, 0rem));\n background-color: ${theme.base.palette['app-background']};\n top: calc(var(--appshell-offset) + var(--headerOffsetHeight));\n ${!showExpandedUtilities &&\n css`\n width: auto;\n `}\n\n ${StyledList} {\n height: calc(100vh - var(--appshell-offset) - var(--headerOffsetHeight));\n }\n `;\n});\n\nStyledGridContainer.defaultProps = defaultThemeProp;\n\nexport const StyledUtilitiesToggle = styled.button(({ theme }) => {\n return css`\n color: ${theme.base.palette['foreground-color']};\n align-self: flex-end;\n `;\n});\n\nStyledUtilitiesToggle.defaultProps = defaultThemeProp;\n\nexport const StyledExpandedUtilities = styled.div<{ showExpandedUtilities: boolean }>(\n ({ showExpandedUtilities }) => {\n return css`\n ${!showExpandedUtilities &&\n css`\n display: none;\n `}\n `;\n }\n);\n\nexport const StyledUtilities = styled.div<{ showExpandedUtilities: boolean }>(\n ({ showExpandedUtilities, theme }) => {\n return css`\n ${showExpandedUtilities &&\n css`\n width: 25rem;\n `}\n margin-inline-end: calc(2 * ${theme.base.spacing});\n `;\n }\n);\n\nStyledUtilities.defaultProps = defaultThemeProp;\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ReactNode, Ref } from 'react';
|
|
2
|
-
import { BaseProps, AvatarProps, SentimentProps, FileDisplayProps, FileUploadItemProps, OmitStrict, MenuProps, MenuItemProps, TooltipProps, NoChildrenProp, EmptyStateProps, ProgressProps, PageTemplateProps } from '@pega/cosmos-react-core';
|
|
1
|
+
import { ReactNode, Ref, MouseEvent } from 'react';
|
|
2
|
+
import { BaseProps, AvatarProps, SentimentProps, FileDisplayProps, FileUploadItemProps, OmitStrict, MenuProps, MenuItemProps, TooltipProps, NoChildrenProp, EmptyStateProps, ProgressProps, PageTemplateProps, PopoverProps } from '@pega/cosmos-react-core';
|
|
3
3
|
import { RichTextEditorProps } from '@pega/cosmos-react-rte';
|
|
4
4
|
import { UtilitiesSummaryProps } from '@pega/cosmos-react-work/lib/components/CaseView/UtilitiesSummary';
|
|
5
5
|
export interface EmailTemplate {
|
|
@@ -26,13 +26,19 @@ export interface EntityHighlightMapping {
|
|
|
26
26
|
description?: TooltipProps['children'];
|
|
27
27
|
icon?: string;
|
|
28
28
|
}
|
|
29
|
-
export interface ContextMenuProps extends
|
|
29
|
+
export interface ContextMenuProps extends Pick<MenuProps, 'loading'> {
|
|
30
|
+
/** Callback triggered when a menu item is clicked */
|
|
30
31
|
onItemClick: (selectedValue: {
|
|
31
32
|
fieldName: string;
|
|
32
33
|
fieldValue: string;
|
|
33
34
|
}) => void;
|
|
34
|
-
|
|
35
|
+
/** Menu items */
|
|
35
36
|
items: MenuItemProps[];
|
|
37
|
+
/** Imperative handle */
|
|
38
|
+
handle: Ref<ContextMenuHandleValue>;
|
|
39
|
+
}
|
|
40
|
+
export interface ContextMenuHandleValue {
|
|
41
|
+
setContextMenuItems: (contextMenuItems: ContextMenuProps['items']) => void;
|
|
36
42
|
}
|
|
37
43
|
export interface EmailProps extends BaseProps, NoChildrenProp {
|
|
38
44
|
/** Ref to the element */
|
|
@@ -80,8 +86,14 @@ export interface EmailProps extends BaseProps, NoChildrenProp {
|
|
|
80
86
|
unRead?: boolean;
|
|
81
87
|
/** Attachments list */
|
|
82
88
|
attachments?: FileDisplayProps[];
|
|
83
|
-
/**
|
|
84
|
-
|
|
89
|
+
/**
|
|
90
|
+
* Context menu props. Context menu is disabled if it is not provided.
|
|
91
|
+
* To set the context menu items, use the setContextMenuItems method provided on handle
|
|
92
|
+
*/
|
|
93
|
+
contextMenu?: OmitStrict<ContextMenuProps, 'items' | 'loading'> & {
|
|
94
|
+
/** Callback on right click of content */
|
|
95
|
+
onContextMenu: (id: EmailProps['id'], e: MouseEvent) => void;
|
|
96
|
+
};
|
|
85
97
|
}
|
|
86
98
|
export interface EmailConversationProps extends BaseProps {
|
|
87
99
|
/** ref to the element */
|
|
@@ -275,6 +287,8 @@ export interface TargetProps {
|
|
|
275
287
|
}
|
|
276
288
|
export interface ContextMenuPopoverProps extends BaseProps, TargetProps {
|
|
277
289
|
contextMenu: ContextMenuProps;
|
|
290
|
+
show: PopoverProps['show'];
|
|
291
|
+
ref?: PopoverProps['ref'];
|
|
278
292
|
}
|
|
279
293
|
export interface EntityListProps extends BaseProps {
|
|
280
294
|
content: {
|
|
@@ -289,7 +303,13 @@ export interface EntityListProps extends BaseProps {
|
|
|
289
303
|
text: string;
|
|
290
304
|
};
|
|
291
305
|
ref?: Ref<HTMLDivElement>;
|
|
292
|
-
|
|
306
|
+
/**
|
|
307
|
+
* Context menu props. Context menu is disabled if it is not provided.
|
|
308
|
+
* To set the context menu items, use the setContextMenuItems method provided on handle
|
|
309
|
+
*/
|
|
310
|
+
contextMenu?: OmitStrict<ContextMenuProps, 'items' | 'loading'> & {
|
|
311
|
+
onContextMenu: (e: MouseEvent) => void;
|
|
312
|
+
};
|
|
293
313
|
}
|
|
294
314
|
export interface EmailManagerProps extends BaseProps {
|
|
295
315
|
/** Ref placed on the root */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Email.types.d.ts","sourceRoot":"","sources":["../../../src/components/Email/Email.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Email.types.d.ts","sourceRoot":"","sources":["../../../src/components/Email/Email.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnD,OAAO,EACL,SAAS,EACT,WAAW,EACX,cAAc,EACd,gBAAgB,EAChB,mBAAmB,EACnB,UAAU,EACV,SAAS,EACT,aAAa,EACb,YAAY,EACZ,cAAc,EACd,eAAe,EACf,aAAa,EACb,iBAAiB,EACjB,YAAY,EACb,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,qBAAqB,EAAE,MAAM,kEAAkE,CAAC;AAEzG,MAAM,WAAW,aAAa;IAC5B,qBAAqB;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,kBAAkB;IAClB,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,SAAS;IACxB,6BAA6B;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,4BAA4B;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,wBAAwB;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,+BAA+B;IAC/B,WAAW,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;CACpC;AAED,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,YAAY,CAAC,UAAU,CAAC,CAAC;IACvC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,SAAS,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I,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAC;QAAC,KAAK,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAA;KAAE,CAAC;IAChF,qDAAqD;IACrD,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,2CAA2C;IAC3C,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,wDAAwD;IACxD,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,uFAAuF;IACvF,qBAAqB,CAAC,EAAE,qBAAqB,CAAC,OAAO,CAAC,CAAC;IACvD,iDAAiD;IACjD,yBAAyB,CAAC,EAAE,OAAO,CAAC;CACrC;AAED,MAAM,WAAW,mCAAoC,SAAQ,SAAS;IACpE,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Email.types.js","sourceRoot":"","sources":["../../../src/components/Email/Email.types.ts"],"names":[],"mappings":"","sourcesContent":["import { ReactNode, Ref } from 'react';\n\nimport {\n BaseProps,\n AvatarProps,\n SentimentProps,\n FileDisplayProps,\n FileUploadItemProps,\n OmitStrict,\n MenuProps,\n MenuItemProps,\n TooltipProps,\n NoChildrenProp,\n EmptyStateProps,\n ProgressProps,\n PageTemplateProps\n} from '@pega/cosmos-react-core';\nimport { RichTextEditorProps } from '@pega/cosmos-react-rte';\nimport { UtilitiesSummaryProps } from '@pega/cosmos-react-work/lib/components/CaseView/UtilitiesSummary';\n\nexport interface EmailTemplate {\n /** Template title */\n title: string;\n /** Template id */\n id: string;\n}\n\nexport interface EmailUser {\n /** Short name of the User */\n shortName: string;\n /** Full name of the User */\n fullName: string;\n /** Email of the User */\n emailAddress: string;\n /** Avatar props of the User */\n avatarProps?: Partial<AvatarProps>;\n}\n\nexport interface EntityHighlightMapping {\n value: string;\n type: string;\n name: string;\n variant: number;\n description?: TooltipProps['children'];\n icon?: string;\n}\n\nexport interface ContextMenuProps\n extends OmitStrict<MenuProps, 'onItemClick' | 'header' | 'items'> {\n onItemClick: (selectedValue: { fieldName: string; fieldValue: string }) => void;\n heading: string;\n items: MenuItemProps[];\n}\nexport interface EmailProps extends BaseProps, NoChildrenProp {\n /** Ref to the element */\n ref?: Ref<HTMLDivElement>;\n /** Unique ID for this email record */\n id: string;\n /** Timestamp of this email as ISO8601 string, timestamp or native Date object. */\n timeStamp: Date | number | string;\n /** From email */\n from: EmailUser;\n /** To email */\n to: EmailUser[];\n /** Carbon copy of email users list */\n cc?: EmailUser[];\n /** Blind carbon copy of email users list */\n bcc?: EmailUser[];\n /** Sentiment */\n sentiment?: SentimentProps;\n /** Subject of the email */\n subject?: string;\n /** Body */\n body?: string;\n /** Forwarded content */\n forwardedContent?: string;\n /**\n * Entity highlight mapping\n * This requires body to be passed as a string with html tags\n */\n entityHighlightMapping?: EntityHighlightMapping[];\n /** onReply callback */\n onReply: (id: EmailProps['id']) => void;\n /** onForward Callback */\n onForward: (id: EmailProps['id']) => void;\n /** onReply callback */\n onReplyAll?: (id: EmailProps['id']) => void;\n /** List of suggestions */\n suggestions?: EmailTemplate[];\n /** Callback that triggers on click of tag */\n onSuggestionClick?: (id: EmailProps['id'], suggestionId: EmailTemplate['id']) => void;\n /** Actions region */\n actions?: ReactNode;\n /** Flag that indicates if email is unread\n * @default false\n */\n unRead?: boolean;\n /** Attachments list */\n attachments?: FileDisplayProps[];\n /** Items list in Popover */\n contextMenu?: ContextMenuProps;\n}\n\nexport interface EmailConversationProps extends BaseProps {\n /** ref to the element */\n ref?: Ref<HTMLLIElement>;\n /** Unique ID for this email conversation record */\n id: string;\n /** List of mails */\n emails: EmailProps[];\n /** Sender(s) of this email conversation */\n from: EmailUser;\n /** Recipient(s) of this email conversation */\n to: EmailUser[];\n /** Count of unread emails */\n unReadEmailCount?: number;\n /** Timestamp of this conversation as ISO8601 string, timestamp or native Date object. */\n timeStamp: Date | string | number;\n /** Flag that indicates if email conversation is expanded */\n isCollapsed?: boolean;\n /** Flag to set if conversation is spun off from forwarded email */\n isForwarded?: boolean;\n /** Callback when email conversation is collapsed */\n onCollapse?: () => void;\n /** Callback when email conversation is expanded */\n onExpand?: () => void;\n}\n\nexport type EmailResponseType = 'reply' | 'replyAll' | 'forward';\nexport type EmailComposerFieldType =\n | 'to'\n | 'cc'\n | 'bcc'\n | 'subject'\n | 'bodyContent'\n | 'attachments'\n | 'responseType'\n | 'selectedTemplateId';\n\nexport type EmailComposerValueType<T> = T extends 'to' | 'cc' | 'bcc'\n ? EmailUser['emailAddress'][]\n : T extends 'subject' | 'bodyContent'\n ? string\n : T extends 'selectedTemplateId'\n ? EmailTemplate['id']\n : T extends 'attachments'\n ? FileUploadItemProps[]\n : T extends 'responseType'\n ? EmailResponseType\n : never;\n\nexport interface EmailDirectRecipients {\n /** To address/addresses in case of reply response type on email. */\n reply: EmailUser['emailAddress'][];\n /** To address/addresses in case of replyAll response type on email. */\n replyAll: EmailUser['emailAddress'][];\n /** To address/addresses in case of forward response type on email. */\n forward?: EmailUser['emailAddress'][];\n}\n\nexport interface EmailComposerHandleValue {\n replaceBodyContent: (content: string) => void;\n activate: () => void;\n}\n\nexport interface EmailComposerProps\n extends Pick<EmailProps, 'suggestions' | 'onSuggestionClick'>,\n BaseProps,\n NoChildrenProp {\n /** Show loader until the background process completes */\n progress?: boolean | Pick<ProgressProps, 'message'>;\n /** Object containing full list of email participants. */\n participants: EmailUser[];\n /** Data for all fields of the composer */\n data: {\n /** Object to hold to address/addresses and field error */\n to?: {\n value: EmailUser['emailAddress'][];\n error?: string;\n };\n /** Object to hold Cc address/addresses and field error */\n cc?: {\n value: EmailUser['emailAddress'][];\n error?: string;\n };\n /** Object to hold Bcc address/addresses and field error */\n bcc?: {\n value: EmailUser['emailAddress'][];\n error?: string;\n };\n /** Object to hold the subject value and error */\n subject: {\n value: string;\n error?: string;\n };\n /** Object containing the default body content and error */\n bodyContent: {\n defaultValue: string;\n error?: string;\n };\n /** Selected template id */\n selectedTemplateId?: EmailTemplate['id'];\n /** List of attachments */\n attachments?: FileUploadItemProps[];\n /** Email response types */\n responseType?: EmailResponseType;\n };\n /** Callback when user clicks on the send button */\n onSend: () => void;\n /** Callback when image is added */\n onImageAdded?: RichTextEditorProps['onImageAdded'];\n /** Region to show more actions in footer */\n footerMoreActions?: ReactNode;\n /** Templates for drafting email */\n templates?: Pick<EmailTemplate, 'id' | 'title'>[];\n /** Callback when user clicks on cancel */\n onCancel: () => void;\n /**\n * Callback to handle external entry validation for to, cc and bcc fields while adding a new email to the list\n * If returned true considers the entry to be a valid entry\n */\n externalValidator?: (value: string) => boolean;\n /** Ref to the element */\n ref?: Ref<HTMLDivElement>;\n /** Imperative handle for composer */\n handle?: Ref<EmailComposerHandleValue>;\n /** Change handler to all fields */\n onChange: <T extends EmailComposerFieldType>(field: T, value: EmailComposerValueType<T>) => void;\n}\nexport interface EmailShellProps extends BaseProps {\n /** ref to the element */\n ref?: Ref<HTMLDivElement>;\n /** Region for header */\n headerProps?: {\n /** Region for actions */\n actions?: ReactNode;\n /** Subject of the email conversations list */\n subject?: string;\n };\n /** Email conversations */\n conversations?: EmailConversationProps[];\n /** Shows only one conversation at a time */\n autoCollapse?: boolean;\n}\n\nexport interface EmailSummaryItemProps extends BaseProps {\n /** Id of each summary item */\n id: string;\n /** List of from participant names of the conversations */\n activeParticipants: EmailUser[];\n /** Email body of last email in the email */\n message: string;\n /** Timestamp of the latest email */\n timeStamp: Date | string | number;\n /** Top topic of an email */\n topic?: string;\n /** Sentiment */\n sentiment?: SentimentProps;\n /** Urgency of an email */\n urgency?: number;\n /** Total number of unread emails in the email */\n unreadEmailCount?: number;\n /** Is the email currently active */\n active?: boolean;\n /** On click of email item */\n onSelect: (id: EmailSummaryItemProps['id']) => void;\n /** ref to the element */\n ref?: Ref<HTMLButtonElement>;\n}\n\nexport interface Filter {\n /** Sets DOM id for the control and associates label element via 'for' attribute. */\n id: string;\n /** Pass a string or a fragment with an Icon and string for the filter label. */\n label: ReactNode;\n /**\n * Disables the filter.\n * @default false\n */\n disabled?: boolean;\n /**\n * Sets on prop via onFilterChange.\n * @default false\n */\n on?: boolean;\n}\n\nexport interface EmailSummaryListProps extends BaseProps {\n /** List of email categories */\n categories: MenuProps['items'];\n /** Handles category change */\n onCategoryClick?: MenuItemProps['onClick'];\n /** List of EmailItems items */\n items: OmitStrict<EmailSummaryItemProps, 'onSelect' | 'active'>[];\n /** Total number of unread email count */\n unreadEmailCount?: number;\n /** A set of filters to apply to the email inbox. */\n filters?: Filter[];\n /** A callback that runs when a filter is clicked. */\n onFilterChange?: (filterId: Filter['id'], on: boolean) => void;\n /** onClick of list item */\n onItemClick: (id: EmailSummaryItemProps['id']) => void;\n /** Indicates if the data is being currently loading */\n loading?: boolean;\n /** Callback to fetch more rows */\n onLoadMore?: () => void;\n /** ref to the element */\n ref?: Ref<HTMLDivElement>;\n /** Empty message when there are no email summary items */\n emptyMessage?: EmptyStateProps['message'];\n}\n\nexport interface EmailEntityProps extends BaseProps {\n entity: EntityHighlightMapping;\n ref?: Ref<HTMLElement>;\n}\n\nexport interface TargetProps {\n cursorPosition: { x: number; y: number };\n targetNode: Node | null;\n}\n\nexport interface ContextMenuPopoverProps extends BaseProps, TargetProps {\n contextMenu: ContextMenuProps;\n}\n\nexport interface EntityListProps extends BaseProps {\n content: {\n name: string;\n value?: {\n id: string;\n entity: EntityHighlightMapping;\n }[];\n }[];\n\n header: {\n icon: string;\n text: string;\n };\n ref?: Ref<HTMLDivElement>;\n contextMenu?: ContextMenuProps;\n}\n\nexport interface EmailManagerProps extends BaseProps {\n /** Ref placed on the root */\n ref?: Ref<HTMLDivElement>;\n /** Header of the component */\n header?: { icon: PageTemplateProps['icon']; title: PageTemplateProps['title'] };\n /** A region to hold an EmailSummaryList component */\n list?: ReactNode;\n /** A region to hold an Emails component */\n content?: ReactNode;\n /** A region that is used to hold Utility components. */\n utilities?: ReactNode;\n /** The utilities summary array will be used to render the minimized utilities card. */\n utilitiesSummaryItems?: UtilitiesSummaryProps['items'];\n /** Collapses the utilities by default on load */\n defaultCollapsedUtilities?: boolean;\n}\n\nexport interface StyledContextMenuFieldSelectorProps extends BaseProps {\n selected?: boolean;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Email.types.js","sourceRoot":"","sources":["../../../src/components/Email/Email.types.ts"],"names":[],"mappings":"","sourcesContent":["import { ReactNode, Ref, MouseEvent } from 'react';\n\nimport {\n BaseProps,\n AvatarProps,\n SentimentProps,\n FileDisplayProps,\n FileUploadItemProps,\n OmitStrict,\n MenuProps,\n MenuItemProps,\n TooltipProps,\n NoChildrenProp,\n EmptyStateProps,\n ProgressProps,\n PageTemplateProps,\n PopoverProps\n} from '@pega/cosmos-react-core';\nimport { RichTextEditorProps } from '@pega/cosmos-react-rte';\nimport { UtilitiesSummaryProps } from '@pega/cosmos-react-work/lib/components/CaseView/UtilitiesSummary';\n\nexport interface EmailTemplate {\n /** Template title */\n title: string;\n /** Template id */\n id: string;\n}\n\nexport interface EmailUser {\n /** Short name of the User */\n shortName: string;\n /** Full name of the User */\n fullName: string;\n /** Email of the User */\n emailAddress: string;\n /** Avatar props of the User */\n avatarProps?: Partial<AvatarProps>;\n}\n\nexport interface EntityHighlightMapping {\n value: string;\n type: string;\n name: string;\n variant: number;\n description?: TooltipProps['children'];\n icon?: string;\n}\n\nexport interface ContextMenuProps extends Pick<MenuProps, 'loading'> {\n /** Callback triggered when a menu item is clicked */\n onItemClick: (selectedValue: { fieldName: string; fieldValue: string }) => void;\n /** Menu items */\n items: MenuItemProps[];\n /** Imperative handle */\n handle: Ref<ContextMenuHandleValue>;\n}\n\nexport interface ContextMenuHandleValue {\n setContextMenuItems: (contextMenuItems: ContextMenuProps['items']) => void;\n}\n\nexport interface EmailProps extends BaseProps, NoChildrenProp {\n /** Ref to the element */\n ref?: Ref<HTMLDivElement>;\n /** Unique ID for this email record */\n id: string;\n /** Timestamp of this email as ISO8601 string, timestamp or native Date object. */\n timeStamp: Date | number | string;\n /** From email */\n from: EmailUser;\n /** To email */\n to: EmailUser[];\n /** Carbon copy of email users list */\n cc?: EmailUser[];\n /** Blind carbon copy of email users list */\n bcc?: EmailUser[];\n /** Sentiment */\n sentiment?: SentimentProps;\n /** Subject of the email */\n subject?: string;\n /** Body */\n body?: string;\n /** Forwarded content */\n forwardedContent?: string;\n /**\n * Entity highlight mapping\n * This requires body to be passed as a string with html tags\n */\n entityHighlightMapping?: EntityHighlightMapping[];\n /** onReply callback */\n onReply: (id: EmailProps['id']) => void;\n /** onForward Callback */\n onForward: (id: EmailProps['id']) => void;\n /** onReply callback */\n onReplyAll?: (id: EmailProps['id']) => void;\n /** List of suggestions */\n suggestions?: EmailTemplate[];\n /** Callback that triggers on click of tag */\n onSuggestionClick?: (id: EmailProps['id'], suggestionId: EmailTemplate['id']) => void;\n /** Actions region */\n actions?: ReactNode;\n /** Flag that indicates if email is unread\n * @default false\n */\n unRead?: boolean;\n /** Attachments list */\n attachments?: FileDisplayProps[];\n /**\n * Context menu props. Context menu is disabled if it is not provided.\n * To set the context menu items, use the setContextMenuItems method provided on handle\n */\n contextMenu?: OmitStrict<ContextMenuProps, 'items' | 'loading'> & {\n /** Callback on right click of content */\n onContextMenu: (id: EmailProps['id'], e: MouseEvent) => void;\n };\n}\n\nexport interface EmailConversationProps extends BaseProps {\n /** ref to the element */\n ref?: Ref<HTMLLIElement>;\n /** Unique ID for this email conversation record */\n id: string;\n /** List of mails */\n emails: EmailProps[];\n /** Sender(s) of this email conversation */\n from: EmailUser;\n /** Recipient(s) of this email conversation */\n to: EmailUser[];\n /** Count of unread emails */\n unReadEmailCount?: number;\n /** Timestamp of this conversation as ISO8601 string, timestamp or native Date object. */\n timeStamp: Date | string | number;\n /** Flag that indicates if email conversation is expanded */\n isCollapsed?: boolean;\n /** Flag to set if conversation is spun off from forwarded email */\n isForwarded?: boolean;\n /** Callback when email conversation is collapsed */\n onCollapse?: () => void;\n /** Callback when email conversation is expanded */\n onExpand?: () => void;\n}\n\nexport type EmailResponseType = 'reply' | 'replyAll' | 'forward';\n\nexport type EmailComposerFieldType =\n | 'to'\n | 'cc'\n | 'bcc'\n | 'subject'\n | 'bodyContent'\n | 'attachments'\n | 'responseType'\n | 'selectedTemplateId';\n\nexport type EmailComposerValueType<T> = T extends 'to' | 'cc' | 'bcc'\n ? EmailUser['emailAddress'][]\n : T extends 'subject' | 'bodyContent'\n ? string\n : T extends 'selectedTemplateId'\n ? EmailTemplate['id']\n : T extends 'attachments'\n ? FileUploadItemProps[]\n : T extends 'responseType'\n ? EmailResponseType\n : never;\n\nexport interface EmailDirectRecipients {\n /** To address/addresses in case of reply response type on email. */\n reply: EmailUser['emailAddress'][];\n /** To address/addresses in case of replyAll response type on email. */\n replyAll: EmailUser['emailAddress'][];\n /** To address/addresses in case of forward response type on email. */\n forward?: EmailUser['emailAddress'][];\n}\n\nexport interface EmailComposerHandleValue {\n replaceBodyContent: (content: string) => void;\n activate: () => void;\n}\n\nexport interface EmailComposerProps\n extends Pick<EmailProps, 'suggestions' | 'onSuggestionClick'>,\n BaseProps,\n NoChildrenProp {\n /** Show loader until the background process completes */\n progress?: boolean | Pick<ProgressProps, 'message'>;\n /** Object containing full list of email participants. */\n participants: EmailUser[];\n /** Data for all fields of the composer */\n data: {\n /** Object to hold to address/addresses and field error */\n to?: {\n value: EmailUser['emailAddress'][];\n error?: string;\n };\n /** Object to hold Cc address/addresses and field error */\n cc?: {\n value: EmailUser['emailAddress'][];\n error?: string;\n };\n /** Object to hold Bcc address/addresses and field error */\n bcc?: {\n value: EmailUser['emailAddress'][];\n error?: string;\n };\n /** Object to hold the subject value and error */\n subject: {\n value: string;\n error?: string;\n };\n /** Object containing the default body content and error */\n bodyContent: {\n defaultValue: string;\n error?: string;\n };\n /** Selected template id */\n selectedTemplateId?: EmailTemplate['id'];\n /** List of attachments */\n attachments?: FileUploadItemProps[];\n /** Email response types */\n responseType?: EmailResponseType;\n };\n /** Callback when user clicks on the send button */\n onSend: () => void;\n /** Callback when image is added */\n onImageAdded?: RichTextEditorProps['onImageAdded'];\n /** Region to show more actions in footer */\n footerMoreActions?: ReactNode;\n /** Templates for drafting email */\n templates?: Pick<EmailTemplate, 'id' | 'title'>[];\n /** Callback when user clicks on cancel */\n onCancel: () => void;\n /**\n * Callback to handle external entry validation for to, cc and bcc fields while adding a new email to the list\n * If returned true considers the entry to be a valid entry\n */\n externalValidator?: (value: string) => boolean;\n /** Ref to the element */\n ref?: Ref<HTMLDivElement>;\n /** Imperative handle for composer */\n handle?: Ref<EmailComposerHandleValue>;\n /** Change handler to all fields */\n onChange: <T extends EmailComposerFieldType>(field: T, value: EmailComposerValueType<T>) => void;\n}\n\nexport interface EmailShellProps extends BaseProps {\n /** ref to the element */\n ref?: Ref<HTMLDivElement>;\n /** Region for header */\n headerProps?: {\n /** Region for actions */\n actions?: ReactNode;\n /** Subject of the email conversations list */\n subject?: string;\n };\n /** Email conversations */\n conversations?: EmailConversationProps[];\n /** Shows only one conversation at a time */\n autoCollapse?: boolean;\n}\n\nexport interface EmailSummaryItemProps extends BaseProps {\n /** Id of each summary item */\n id: string;\n /** List of from participant names of the conversations */\n activeParticipants: EmailUser[];\n /** Email body of last email in the email */\n message: string;\n /** Timestamp of the latest email */\n timeStamp: Date | string | number;\n /** Top topic of an email */\n topic?: string;\n /** Sentiment */\n sentiment?: SentimentProps;\n /** Urgency of an email */\n urgency?: number;\n /** Total number of unread emails in the email */\n unreadEmailCount?: number;\n /** Is the email currently active */\n active?: boolean;\n /** On click of email item */\n onSelect: (id: EmailSummaryItemProps['id']) => void;\n /** ref to the element */\n ref?: Ref<HTMLButtonElement>;\n}\n\nexport interface Filter {\n /** Sets DOM id for the control and associates label element via 'for' attribute. */\n id: string;\n /** Pass a string or a fragment with an Icon and string for the filter label. */\n label: ReactNode;\n /**\n * Disables the filter.\n * @default false\n */\n disabled?: boolean;\n /**\n * Sets on prop via onFilterChange.\n * @default false\n */\n on?: boolean;\n}\n\nexport interface EmailSummaryListProps extends BaseProps {\n /** List of email categories */\n categories: MenuProps['items'];\n /** Handles category change */\n onCategoryClick?: MenuItemProps['onClick'];\n /** List of EmailItems items */\n items: OmitStrict<EmailSummaryItemProps, 'onSelect' | 'active'>[];\n /** Total number of unread email count */\n unreadEmailCount?: number;\n /** A set of filters to apply to the email inbox. */\n filters?: Filter[];\n /** A callback that runs when a filter is clicked. */\n onFilterChange?: (filterId: Filter['id'], on: boolean) => void;\n /** onClick of list item */\n onItemClick: (id: EmailSummaryItemProps['id']) => void;\n /** Indicates if the data is being currently loading */\n loading?: boolean;\n /** Callback to fetch more rows */\n onLoadMore?: () => void;\n /** ref to the element */\n ref?: Ref<HTMLDivElement>;\n /** Empty message when there are no email summary items */\n emptyMessage?: EmptyStateProps['message'];\n}\n\nexport interface EmailEntityProps extends BaseProps {\n entity: EntityHighlightMapping;\n ref?: Ref<HTMLElement>;\n}\n\nexport interface TargetProps {\n cursorPosition: { x: number; y: number };\n targetNode: Node | null;\n}\n\nexport interface ContextMenuPopoverProps extends BaseProps, TargetProps {\n contextMenu: ContextMenuProps;\n show: PopoverProps['show'];\n ref?: PopoverProps['ref'];\n}\n\nexport interface EntityListProps extends BaseProps {\n content: {\n name: string;\n value?: {\n id: string;\n entity: EntityHighlightMapping;\n }[];\n }[];\n\n header: {\n icon: string;\n text: string;\n };\n ref?: Ref<HTMLDivElement>;\n /**\n * Context menu props. Context menu is disabled if it is not provided.\n * To set the context menu items, use the setContextMenuItems method provided on handle\n */\n contextMenu?: OmitStrict<ContextMenuProps, 'items' | 'loading'> & {\n onContextMenu: (e: MouseEvent) => void;\n };\n}\n\nexport interface EmailManagerProps extends BaseProps {\n /** Ref placed on the root */\n ref?: Ref<HTMLDivElement>;\n /** Header of the component */\n header?: { icon: PageTemplateProps['icon']; title: PageTemplateProps['title'] };\n /** A region to hold an EmailSummaryList component */\n list?: ReactNode;\n /** A region to hold an Emails component */\n content?: ReactNode;\n /** A region that is used to hold Utility components. */\n utilities?: ReactNode;\n /** The utilities summary array will be used to render the minimized utilities card. */\n utilitiesSummaryItems?: UtilitiesSummaryProps['items'];\n /** Collapses the utilities by default on load */\n defaultCollapsedUtilities?: boolean;\n}\n\nexport interface StyledContextMenuFieldSelectorProps extends BaseProps {\n selected?: boolean;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityList.d.ts","sourceRoot":"","sources":["../../../src/components/Email/EntityList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,
|
|
1
|
+
{"version":3,"file":"EntityList.d.ts","sourceRoot":"","sources":["../../../src/components/Email/EntityList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAMlB,MAAM,OAAO,CAAC;AAEf,OAAO,EACL,YAAY,EAUb,MAAM,yBAAyB,CAAC;AAKjC,OAAO,EAAoB,eAAe,EAAe,MAAM,eAAe,CAAC;AAE/E,QAAA,MAAM,UAAU,EAAE,iBAAiB,CAAC,eAAe,GAAG,YAAY,CAwGjE,CAAC;AAEF,eAAe,UAAU,CAAC"}
|