@social-mail/social-mail-client 1.2.84 → 1.2.85

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.
@@ -21941,7 +21941,7 @@ System.register(["tslib", "@web-atoms/core/dist/di/DISingleton", "@web-atoms/cor
21941
21941
  if (!line.trim()) {
21942
21942
  continue;
21943
21943
  }
21944
- email.subject || (email.subject = line.substring(0, 80));
21944
+ email.subject || (email.subject = line.trim().substring(0, 80));
21945
21945
  break;
21946
21946
  }
21947
21947
  }
@@ -33524,7 +33524,18 @@ System.register(["tslib", "@web-atoms/core/dist/core/XNode", "@web-atoms/core/di
33524
33524
  this.render(XNode.create("div", null, XNode.create(MailHtmlEditor, {
33525
33525
  toolbar: () => XNode.create("div", null, XNode.create(Toolbar, null, XNode.create(Insert, null), XNode.create(Separator, null), XNode.create(Bold, null), XNode.create(Italic, null), XNode.create(Underline, null), XNode.create(StrikeThrough, null), XNode.create(Align, {
33526
33526
  alignment: "above"
33527
- }), XNode.create(Separator, null), XNode.create(AddLink, null), XNode.create(Unlink, null), XNode.create(Separator, null), XNode.create(ToggleEmoji, null))),
33527
+ }), XNode.create(Separator, null), XNode.create(AddLink, null), XNode.create(Unlink, null), XNode.create(Separator, null), XNode.create(ToggleEmoji, null)), XNode.create("input", {
33528
+ autofocus: true,
33529
+ "style-place-self": "stretch",
33530
+ "style-margin-left": "5px",
33531
+ "style-margin-right": "5px",
33532
+ "style-padding-left": "10px",
33533
+ "style-padding-right": "5px",
33534
+ "style-outline": "none",
33535
+ "style-border": "none",
33536
+ placeholder: "Subject ... ",
33537
+ value: Bind.sourceTwoWays(this, x => x.source.draft.subject)
33538
+ })),
33528
33539
  "data-element": "editor",
33529
33540
  "data-html-editor": "email-editor",
33530
33541
  presenter: Bind.presenter(c => this.editor = c),
@@ -33590,6 +33601,9 @@ System.register(["tslib", "@web-atoms/core/dist/core/XNode", "@web-atoms/core/di
33590
33601
  if (!((_a = this.editor) === null || _a === void 0 ? void 0 : _a.htmlTextContent)) {
33591
33602
  return;
33592
33603
  }
33604
+ if (this.prevSave) {
33605
+ yield this.prevSave;
33606
+ }
33593
33607
  (_b = this.draft) !== null && _b !== void 0 ? _b : this.draft = Email.create({
33594
33608
  attachments: []
33595
33609
  });
@@ -33599,7 +33613,8 @@ System.register(["tslib", "@web-atoms/core/dist/core/XNode", "@web-atoms/core/di
33599
33613
  } = this.editor.htmlTextContent;
33600
33614
  this.draft.htmlBody = html;
33601
33615
  this.draft.textBody = text;
33602
- yield this.save();
33616
+ this.prevSave = this.save();
33617
+ yield this.prevSave;
33603
33618
  });
33604
33619
  }
33605
33620
  onEmailUnscheduled(mce) {
@@ -33627,6 +33642,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/XNode", "@web-atoms/core/di
33627
33642
  this.draft.dateSent = DateTime.now.add(TimeSpan.fromSeconds(30));
33628
33643
  yield this.mailService.send(this.draft);
33629
33644
  this.draft = Email.create({
33645
+ subject: "",
33630
33646
  htmlBody: `<div contentEditable="true"><p></p><br/></div>`,
33631
33647
  attachments: []
33632
33648
  });