@social-mail/social-mail-client 1.8.286 → 1.8.288

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.
Files changed (47) hide show
  1. package/dist/admin/AdminAppIndex.pack.js +200 -21
  2. package/dist/admin/AdminAppIndex.pack.js.map +1 -1
  3. package/dist/admin/AdminAppIndex.pack.local.css +1 -1
  4. package/dist/admin/AdminAppIndex.pack.local.css.map +1 -1
  5. package/dist/admin/AdminAppIndex.pack.min.js +1 -1
  6. package/dist/admin/AdminAppIndex.pack.min.js.map +1 -1
  7. package/dist/site-editor-app/SiteEditorApp.pack.js +200 -21
  8. package/dist/site-editor-app/SiteEditorApp.pack.js.map +1 -1
  9. package/dist/site-editor-app/SiteEditorApp.pack.local.css +1 -1
  10. package/dist/site-editor-app/SiteEditorApp.pack.local.css.map +1 -1
  11. package/dist/site-editor-app/SiteEditorApp.pack.min.js +1 -1
  12. package/dist/site-editor-app/SiteEditorApp.pack.min.js.map +1 -1
  13. package/dist/tsconfig.tsbuildinfo +1 -1
  14. package/dist/web/AppIndex.pack.js +200 -21
  15. package/dist/web/AppIndex.pack.js.map +1 -1
  16. package/dist/web/AppIndex.pack.local.css +1 -1
  17. package/dist/web/AppIndex.pack.local.css.map +1 -1
  18. package/dist/web/AppIndex.pack.min.js +1 -1
  19. package/dist/web/AppIndex.pack.min.js.map +1 -1
  20. package/dist/web/page/mails/ConversationPage.d.ts +2 -1
  21. package/dist/web/page/mails/ConversationPage.d.ts.map +1 -1
  22. package/dist/web/page/mails/ConversationPage.js +8 -10
  23. package/dist/web/page/mails/ConversationPage.js.map +1 -1
  24. package/dist/web/page/mails/commands/NewConversationRequest.d.ts +3 -0
  25. package/dist/web/page/mails/commands/NewConversationRequest.d.ts.map +1 -0
  26. package/dist/web/page/mails/commands/NewConversationRequest.js +34 -0
  27. package/dist/web/page/mails/commands/NewConversationRequest.js.map +1 -0
  28. package/dist/web/page/mails/commands/NewConversationRequest.local.css +2 -0
  29. package/dist/web/page/mails/commands/NewConversationRequest.local.css.map +1 -0
  30. package/dist/web/page/mails/commands/ReportConversationCommand.d.ts +3 -0
  31. package/dist/web/page/mails/commands/ReportConversationCommand.d.ts.map +1 -0
  32. package/dist/web/page/mails/commands/ReportConversationCommand.js +71 -0
  33. package/dist/web/page/mails/commands/ReportConversationCommand.js.map +1 -0
  34. package/dist/web/page/mails/commands/ReportEmailCommand.d.ts +2 -1
  35. package/dist/web/page/mails/commands/ReportEmailCommand.d.ts.map +1 -1
  36. package/dist/web/page/mails/commands/ReportEmailCommand.js +39 -8
  37. package/dist/web/page/mails/commands/ReportEmailCommand.js.map +1 -1
  38. package/dist/web/page/mails/contacts/MailboxContacts.d.ts.map +1 -1
  39. package/dist/web/page/mails/contacts/MailboxContacts.js +7 -2
  40. package/dist/web/page/mails/contacts/MailboxContacts.js.map +1 -1
  41. package/package.json +1 -1
  42. package/src/web/page/mails/ConversationPage.tsx +8 -16
  43. package/src/web/page/mails/commands/NewConversationRequest.local.css +18 -0
  44. package/src/web/page/mails/commands/NewConversationRequest.tsx +30 -0
  45. package/src/web/page/mails/commands/ReportConversationCommand.tsx +43 -0
  46. package/src/web/page/mails/commands/ReportEmailCommand.tsx +25 -5
  47. package/src/web/page/mails/contacts/MailboxContacts.tsx +7 -2
@@ -35,7 +35,9 @@ import WebHookListPage from "./web-hooks/WebHookListPage";
35
35
 
36
36
  import "./styles/conversation-page.local.css";
37
37
  import AtomPopover from "@web-atoms/web-controls/dist/basic/elements/AtomPopover";
38
- import ReportEmailCommand from "./commands/ReportEmailCommand";
38
+ import { ReportPhishingCommand, ReportSpamCommand } from "./commands/ReportEmailCommand";
39
+ import { ReportConversationPhishing, ReportConversationSpam } from "./commands/ReportConversationCommand";
40
+ import NewConversationRequest from "./commands/NewConversationRequest";
39
41
 
40
42
  const itemCss = "conversation-page-item-css";
41
43
 
@@ -61,6 +63,8 @@ export default class ConversationPage extends ContentPage {
61
63
 
62
64
  public keep = true;
63
65
 
66
+ public mailsRepeater: AtomRepeater;
67
+
64
68
  @InjectProperty
65
69
  private conversationService: ConversationService;
66
70
 
@@ -70,8 +74,6 @@ export default class ConversationPage extends ContentPage {
70
74
 
71
75
  private tags: ISearchItem[] = [];
72
76
 
73
- private mailsRepeater: AtomRepeater;
74
-
75
77
  async init() {
76
78
 
77
79
  this.element.className = css;
@@ -356,17 +358,7 @@ export default class ConversationPage extends ContentPage {
356
358
  showComposeButton(email = null) {
357
359
 
358
360
  if (this.parameters.newRequest || this.parameters.folderTagID === SocialMailApp.newFolderTagID) {
359
- this.footerRenderer = () => <div>
360
- <div data-layout="vertical-flex-center-items">
361
- <h5>This sender does not exist in your contacts, and this sender's emails will be restricted in future
362
- unless you approve the sender.
363
- </h5>
364
- <AddIconTextButton
365
- data-click-event="approve-sender"
366
- text="Approve Sender"
367
- />
368
- </div>
369
- </div>;
361
+ this.footerRenderer = () => <NewConversationRequest/>;
370
362
  return;
371
363
  }
372
364
 
@@ -528,8 +520,8 @@ export default class ConversationPage extends ContentPage {
528
520
  icon="fa-regular fa-clock-rotate-left"
529
521
  label="Delete Draft"
530
522
  />}
531
- <ReportEmailCommand
532
- />
523
+ <ReportSpamCommand/>
524
+ <ReportPhishingCommand/>
533
525
  </div>);
534
526
  }
535
527
 
@@ -0,0 +1,18 @@
1
+ .new-conversation-request {
2
+ & > div {
3
+ background-color: white;
4
+ display: flex;
5
+ flex-direction: column;
6
+ gap: 10px;
7
+ padding: 10px;
8
+ border-radius: 10px;
9
+
10
+ & h4, & h5, & h6 {
11
+ margin: 0;
12
+ }
13
+ & button[data-layout=reject-icon-button] {
14
+ background-color: white;
15
+ color: red;
16
+ }
17
+ }
18
+ }
@@ -0,0 +1,30 @@
1
+ import XNode from "@web-atoms/core/dist/core/XNode";
2
+ import { AddIconTextButton, DeleteIconTextButton } from "../../../../common/controls/buttons/IconButton";
3
+ import { ReportConversationSpam, ReportConversationPhishing } from "./ReportConversationCommand";
4
+
5
+ import "./NewConversationRequest.local.css";
6
+
7
+ export default function NewConversationRequest() {
8
+ return <div class="new-conversation-request">
9
+ <div>
10
+ <h5>This sender does not exist in your contacts, and this sender's emails will be restricted in future
11
+ unless you approve the sender.
12
+ </h5>
13
+ <div data-layout="flex-center">
14
+ <AddIconTextButton
15
+ data-click-event="approve-sender"
16
+ text="Approve Sender"
17
+ />
18
+ <DeleteIconTextButton
19
+ data-click-event="block-sender"
20
+ text="Block Sender"
21
+ />
22
+ </div>
23
+ <h6>If you believe this message contains spam or any harmful activity, we encourage you to please report them.</h6>
24
+ <div data-layout="flex-center">
25
+ <ReportConversationSpam/>
26
+ <ReportConversationPhishing/>
27
+ </div>
28
+ </div>
29
+ </div>;
30
+ }
@@ -0,0 +1,43 @@
1
+ import XNode from "@web-atoms/core/dist/core/XNode";
2
+ import UICommand from "../../../../common/ui-commands/UICommand";
3
+ import PageNavigator from "@web-atoms/web-controls/dist/PageNavigator";
4
+ import MiniComposePage from "../mini-compose/MiniComposePage";
5
+ import { Mailto } from "../../../../common/Mailto";
6
+ import { DeleteIconTextButton } from "../../../../common/controls/buttons/IconButton";
7
+ import type ConversationPage from "../ConversationPage";
8
+
9
+ UICommand.on<ConversationPage>("report-spam", async ({ control }) => {
10
+ PageNavigator.pushPage(MiniComposePage, {
11
+ mailto: Mailto.create({ to: "report@esocialmail.com", subject: "Spam Report", body: "Attached email contains #Spam." }),
12
+ thread: control.mailsRepeater.items[0],
13
+ asAttachment: true
14
+ });
15
+ });
16
+
17
+
18
+ UICommand.on<ConversationPage>("report-phishing", async ({ control }) => {
19
+ PageNavigator.pushPage(MiniComposePage, {
20
+ mailto: Mailto.create({ to: "report@esocialmail.com", subject: "Phishing Report", body: "Attached email contains #Phishing." }),
21
+ thread: control.mailsRepeater.items[0],
22
+ asAttachment: true
23
+ });
24
+ });
25
+
26
+ export function ReportConversationPhishing() {
27
+ return <DeleteIconTextButton
28
+ data-click-event="report-conversation-phishing"
29
+ icon="fad fa-shield-quartered"
30
+ data-color="red"
31
+ text="Report Phishing"
32
+ />;
33
+ }
34
+
35
+
36
+ export function ReportConversationSpam() {
37
+ return <DeleteIconTextButton
38
+ data-click-event="report-conversation-spam"
39
+ icon="fad fa-shield-quartered"
40
+ data-color="red"
41
+ text="Report Spam"
42
+ />;
43
+ }
@@ -4,20 +4,40 @@ import AtomRepeater from "@web-atoms/web-controls/dist/basic/AtomRepeater";
4
4
  import PageNavigator from "@web-atoms/web-controls/dist/PageNavigator";
5
5
  import MiniComposePage from "../mini-compose/MiniComposePage";
6
6
  import { MenuItem } from "@web-atoms/web-controls/dist/basic/PopupButton";
7
+ import { Mailto } from "../../../../common/Mailto";
7
8
 
8
- UICommand.on<AtomRepeater>("report-email", async ({ data, control }) => {
9
+ UICommand.on<AtomRepeater>("report-spam", async ({ data, control }) => {
9
10
  PageNavigator.pushPage(MiniComposePage, {
10
- mailto: "mailto:report@esocialmail.com",
11
+ mailto: Mailto.create({ to: "report@esocialmail.com", subject: "Spam Report", body: "Attached email contains #Spam." }),
11
12
  thread: data,
12
13
  asAttachment: true
13
14
  });
14
15
  });
15
16
 
16
- export default function ReportEmailCommand() {
17
+
18
+ UICommand.on<AtomRepeater>("report-phishing", async ({ data, control }) => {
19
+ PageNavigator.pushPage(MiniComposePage, {
20
+ mailto: Mailto.create({ to: "report@esocialmail.com", subject: "Phishing Report", body: "Attached email contains #Phishing." }),
21
+ thread: data,
22
+ asAttachment: true
23
+ });
24
+ });
25
+
26
+ export function ReportPhishingCommand() {
27
+ return <MenuItem
28
+ data-click-event="report-phishing"
29
+ icon="fad fa-shield-quartered"
30
+ data-color="red"
31
+ label="Report Phishing"
32
+ />;
33
+ }
34
+
35
+
36
+ export function ReportSpamCommand() {
17
37
  return <MenuItem
18
- data-click-event="report-email"
38
+ data-click-event="report-spam"
19
39
  icon="fad fa-shield-quartered"
20
40
  data-color="red"
21
- label="Report"
41
+ label="Report Spam"
22
42
  />;
23
43
  }
@@ -244,12 +244,17 @@ export default class MailsPage extends MasterDetailPage {
244
244
  }
245
245
  if (!this.selectedThread) {
246
246
  this.selectedThread = this.mails[0];
247
- return;
247
+ if (this.selectedThread) {
248
+ return this.mailSelected();
249
+ }
248
250
  }
249
251
  const st = this.mails.find((x) => x.mailboxID === this.selectedThread.mailboxID && x.emailAddressID === this.selectedThread.emailAddressID);
250
- if (st !== this.selectedThread) {
252
+ if (st && st !== this.selectedThread) {
251
253
  this.selectedThread = st;
254
+ } else {
255
+ this.selectedThread = this.mails[0];
252
256
  }
257
+ return this.mailSelected();
253
258
  }
254
259
 
255
260
  @Action({ onEvent: "mail-selected", defer: 100 })