@social-mail/social-mail-client 1.2.145 → 1.2.147

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 (62) hide show
  1. package/dist/admin/AdminAppIndex.pack.js +304 -15
  2. package/dist/admin/AdminAppIndex.pack.js.map +1 -1
  3. package/dist/admin/AdminAppIndex.pack.min.js +109 -10
  4. package/dist/admin/AdminAppIndex.pack.min.js.map +1 -1
  5. package/dist/common/controls/email-recipients/EmailLabel.d.ts +5 -0
  6. package/dist/common/controls/email-recipients/EmailLabel.d.ts.map +1 -0
  7. package/dist/common/controls/email-recipients/EmailLabel.js +20 -0
  8. package/dist/common/controls/email-recipients/EmailLabel.js.map +1 -0
  9. package/dist/common/events/CommonEvents.d.ts +2 -0
  10. package/dist/common/events/CommonEvents.d.ts.map +1 -1
  11. package/dist/common/events/CommonEvents.js +3 -1
  12. package/dist/common/events/CommonEvents.js.map +1 -1
  13. package/dist/model/model.d.ts +1 -0
  14. package/dist/model/model.d.ts.map +1 -1
  15. package/dist/model/model.js.map +1 -1
  16. package/dist/public/channel/ChannelView.pack.js +3 -1
  17. package/dist/public/channel/ChannelView.pack.js.map +1 -1
  18. package/dist/public/channel/ChannelView.pack.min.js +1 -1
  19. package/dist/public/channel/ChannelView.pack.min.js.map +1 -1
  20. package/dist/site-editor/blocks/Billboard.d.ts +2 -0
  21. package/dist/site-editor/blocks/Billboard.d.ts.map +1 -0
  22. package/dist/site-editor/blocks/Billboard.js +92 -0
  23. package/dist/site-editor/blocks/Billboard.js.map +1 -0
  24. package/dist/site-editor/editor/HtmlPageEditor.d.ts.map +1 -1
  25. package/dist/site-editor/editor/HtmlPageEditor.js +5 -3
  26. package/dist/site-editor/editor/HtmlPageEditor.js.map +1 -1
  27. package/dist/site-editor/editor/SelectedElement.d.ts.map +1 -1
  28. package/dist/site-editor/editor/SelectedElement.js +4 -3
  29. package/dist/site-editor/editor/SelectedElement.js.map +1 -1
  30. package/dist/site-editor/properties/groups/TextPropertyEditor.d.ts.map +1 -1
  31. package/dist/site-editor/properties/groups/TextPropertyEditor.js +3 -0
  32. package/dist/site-editor/properties/groups/TextPropertyEditor.js.map +1 -1
  33. package/dist/site-editor/styler/StylerSet.d.ts +1 -0
  34. package/dist/site-editor/styler/StylerSet.d.ts.map +1 -1
  35. package/dist/site-editor/styler/properties/text/stylerText.d.ts +1 -0
  36. package/dist/site-editor/styler/properties/text/stylerText.d.ts.map +1 -1
  37. package/dist/site-editor/styler/properties/text/stylerText.js +48 -1
  38. package/dist/site-editor/styler/properties/text/stylerText.js.map +1 -1
  39. package/dist/tsconfig.tsbuildinfo +1 -1
  40. package/dist/web/AppIndex.pack.js +304 -15
  41. package/dist/web/AppIndex.pack.js.map +1 -1
  42. package/dist/web/AppIndex.pack.min.js +109 -10
  43. package/dist/web/AppIndex.pack.min.js.map +1 -1
  44. package/dist/web/page/mails/ConversationPage.d.ts +1 -0
  45. package/dist/web/page/mails/ConversationPage.d.ts.map +1 -1
  46. package/dist/web/page/mails/ConversationPage.js +29 -3
  47. package/dist/web/page/mails/ConversationPage.js.map +1 -1
  48. package/dist/web/page/mails/mini-compose/MiniComposeBox.d.ts +2 -0
  49. package/dist/web/page/mails/mini-compose/MiniComposeBox.d.ts.map +1 -1
  50. package/dist/web/page/mails/mini-compose/MiniComposeBox.js +93 -3
  51. package/dist/web/page/mails/mini-compose/MiniComposeBox.js.map +1 -1
  52. package/package.json +1 -1
  53. package/src/common/controls/email-recipients/EmailLabel.tsx +8 -0
  54. package/src/common/events/CommonEvents.ts +4 -0
  55. package/src/model/model.ts +1 -0
  56. package/src/site-editor/blocks/Billboard.tsx +80 -0
  57. package/src/site-editor/editor/HtmlPageEditor.tsx +2 -0
  58. package/src/site-editor/editor/SelectedElement.tsx +5 -3
  59. package/src/site-editor/properties/groups/TextPropertyEditor.tsx +4 -0
  60. package/src/site-editor/styler/properties/text/stylerText.ts +49 -1
  61. package/src/web/page/mails/ConversationPage.tsx +23 -0
  62. package/src/web/page/mails/mini-compose/MiniComposeBox.tsx +91 -1
@@ -73,5 +73,53 @@ export const stylerText = {
73
73
  "pre",
74
74
  "pre-line",
75
75
  "pre-wrap"
76
- ]))
76
+ ])),
77
+
78
+ stylerTextOutline: new StylerProperty("styler-text-outline", {
79
+ "thin": styled.css `
80
+ -webkit-text-fill-color: transparent;
81
+ -webkit-text-stroke-color: currentColor;
82
+ -webkit-text-stroke-width: thin;
83
+ `,
84
+ "medium": styled.css `
85
+ -webkit-text-fill-color: transparent;
86
+ -webkit-text-stroke-color: currentColor;
87
+ -webkit-text-stroke-width: medium;
88
+ `,
89
+ "thick": styled.css `
90
+ -webkit-text-fill-color: transparent;
91
+ -webkit-text-stroke-color: currentColor;
92
+ -webkit-text-stroke-width: thick;
93
+ `,
94
+ "size1px": styled.css `
95
+ -webkit-text-fill-color: transparent;
96
+ -webkit-text-stroke-color: currentColor;
97
+ -webkit-text-stroke-width: 1px;
98
+ `,
99
+ "size2px": styled.css `
100
+ -webkit-text-fill-color: transparent;
101
+ -webkit-text-stroke-color: currentColor;
102
+ -webkit-text-stroke-width: 2px;
103
+ `,
104
+ "size3px": styled.css `
105
+ -webkit-text-fill-color: transparent;
106
+ -webkit-text-stroke-color: currentColor;
107
+ -webkit-text-stroke-width: 3px;
108
+ `,
109
+ "size1rem": styled.css `
110
+ -webkit-text-fill-color: transparent;
111
+ -webkit-text-stroke-color: currentColor;
112
+ -webkit-text-stroke-width: 1rem;
113
+ `,
114
+ "size2rem": styled.css `
115
+ -webkit-text-fill-color: transparent;
116
+ -webkit-text-stroke-color: currentColor;
117
+ -webkit-text-stroke-width: 2rem;
118
+ `,
119
+ "size3rem": styled.css `
120
+ -webkit-text-fill-color: transparent;
121
+ -webkit-text-stroke-color: currentColor;
122
+ -webkit-text-stroke-width: 3rem;
123
+ `
124
+ })
77
125
  };
@@ -253,6 +253,12 @@ export default class ConversationPage extends ContentPage {
253
253
  <i
254
254
  data-click-event="reply-all-email"
255
255
  class="fa-solid fa-reply-all"
256
+ title="Reply All"
257
+ />
258
+ <i
259
+ data-click-event="forward-email"
260
+ class="fa-solid fa-share-all"
261
+ title="Forward"
256
262
  />
257
263
  </div> }
258
264
  {isSending && <div data-layout="command-row" style-padding-left="20px">
@@ -356,6 +362,22 @@ export default class ConversationPage extends ContentPage {
356
362
  await this.conversationService.stopEmail(thread);
357
363
  }
358
364
 
365
+ @Action({ onEvent: "forward-email"})
366
+ async forwardEmail(thread: IMailboxContactEmail, ce: CustomEvent) {
367
+ void InlinePopup.show(ce.target as HTMLElement, <div
368
+ data-click-event="none"
369
+ data-click-animate="none">
370
+ <MenuItem
371
+ eventClick={() => CommonEvents.onEmailForward.dispatchEvent(thread)}
372
+ label="As Inline Message"
373
+ />
374
+ <MenuItem
375
+ eventClick={() => CommonEvents.onEmailForwardAsAttachment.dispatchEvent(thread)}
376
+ label="As Attachment"
377
+ />
378
+ </div>, { alignment: "above"});
379
+ }
380
+
359
381
  @Action({ onEvent: "mail-options"})
360
382
  async mailOptions(thread: IMailboxContactEmail, ce: CustomEvent) {
361
383
  void InlinePopupControl.showPopup(ce.target as HTMLElement, <div
@@ -540,4 +562,5 @@ export default class ConversationPage extends ContentPage {
540
562
  await this.conversationService.delete(mce.email);
541
563
  this.mails.remove(mce);
542
564
  }
565
+
543
566
  }
@@ -31,6 +31,8 @@ import ToggleEmoji from "./ToggleEmoji";
31
31
  import Attach from "./Attach";
32
32
  import PopupService from "@web-atoms/core/dist/web/services/PopupService";
33
33
  import { CancelToken } from "@web-atoms/core/dist/core/types";
34
+ import DomToString from "@web-atoms/email-dom/dist/DomToString";
35
+ import EmailLabel from "../../../../common/controls/email-recipients/EmailLabel";
34
36
 
35
37
  const css = styled.css `
36
38
  display: grid;
@@ -70,7 +72,7 @@ const css = styled.css `
70
72
  `.installLocal();
71
73
 
72
74
  const defaultEmailBody = `<section style="background-color: white; color: black;">
73
- <section contentEditable="true">&nbsp;</br></section>
75
+ <section contentEditable="true">&nbsp;<br/></section>
74
76
  <footer data-social-mail-commands="emoji-bar"></footer>
75
77
  </section>`;
76
78
 
@@ -283,6 +285,94 @@ export default class MiniComposeBox extends AtomControl {
283
285
  this.draft = mce.email;
284
286
  }
285
287
 
288
+ @Action({ onEvent: CommonEvents.onEmailForward})
289
+ async onForwardEmail(mce: IMailboxContactEmail) {
290
+ if (this.draft?.emailID) {
291
+ await this.save(true);
292
+ this.draft = null;
293
+ }
294
+ this.ensureDraft();
295
+ const { email } = mce;
296
+ const { recipients } = email;
297
+ const to = recipients?.filter((x) => x.type === "to");
298
+ const cc = recipients?.filter((x) => x.type === "cc");
299
+ this.draft.htmlBody = DomToString(
300
+ <section
301
+ style="background-color: white; color: black;">
302
+ <section contentEditable="true">
303
+ {"\xa0"}
304
+ <br/>
305
+ </section>
306
+ <blockquote
307
+ contentEditable="false"
308
+ data-type="forwarded"
309
+ style="margin-inline-start: 20px; margin-inline-end: 0; border-left: solid 1px lightgray; padding-left: 10px;">
310
+ <summary><div>From: ${email.senderName} {`<${email.senderEmail.emailAddress}>`}</div>
311
+ <div>
312
+ { to?.length && <div>
313
+ <label style="margin-right:10px;">To:</label>
314
+ { ... to.map((x) => <EmailLabel recipient={x} />) }
315
+ </div> }
316
+ { cc?.length && <div>
317
+ <label style="margin-right:10px;">CC:</label>
318
+ { ... cc.map((x) => <EmailLabel recipient={x} />) }
319
+ </div>}
320
+ <div>
321
+ <label style="margin-right:10px;">Subject:</label>
322
+ <label>{email.subject}</label>
323
+ </div>
324
+ <div data-type="html-body">
325
+ {email.htmlBody}
326
+ </div>
327
+ </div>
328
+ </summary>
329
+ </blockquote>
330
+ <footer data-social-mail-commands="emoji-bar">
331
+ </footer>
332
+ </section>);
333
+
334
+ // copy all attachments..
335
+ this.editor.htmlContent = this.draft.htmlBody;
336
+
337
+ const attachments = mce.email.attachments;
338
+ if (attachments) {
339
+ for (const iterator of attachments) {
340
+ this.draft.attachments.add(AppFile.create({
341
+ ... iterator,
342
+ appFileID: void 0,
343
+ }));
344
+ }
345
+ }
346
+ await this.save(!!attachments);
347
+ }
348
+
349
+ @Action({ onEvent: CommonEvents.onEmailForwardAsAttachment})
350
+ async onForwardEmailAsAttachment(mce: IMailboxContactEmail) {
351
+ if (this.draft?.emailID) {
352
+ await this.save(true);
353
+ this.draft = null;
354
+ }
355
+ this.ensureDraft();
356
+ const { email, signedFileLogID } = mce;
357
+ const { mimeFileID } = email;
358
+
359
+ this.draft.htmlBody = DomToString(<section
360
+ style="background-color: white; color: black;">
361
+ <section contentEditable="true">
362
+ {"\xa0"}
363
+ <br/>
364
+ </section>
365
+ </section>);
366
+ this.editor.htmlContent = this.draft.htmlBody;
367
+
368
+ this.draft.attachments.add(AppFile.create({
369
+ name: "forwarded.eml",
370
+ sourceEmailLogID: mimeFileID ?? signedFileLogID,
371
+ contentType: "message/rfc822"
372
+ }));
373
+ await this.save(true);
374
+ }
375
+
286
376
  @Action({
287
377
  onEvent: "send-email"
288
378
  })