@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.
@@ -17740,7 +17740,7 @@ System.register(["tslib", "@web-atoms/core/dist/di/DISingleton", "@web-atoms/cor
17740
17740
  if (!line.trim()) {
17741
17741
  continue;
17742
17742
  }
17743
- email.subject || (email.subject = line.substring(0, 80));
17743
+ email.subject || (email.subject = line.trim().substring(0, 80));
17744
17744
  break;
17745
17745
  }
17746
17746
  }
@@ -26207,7 +26207,18 @@ System.register(["tslib", "@web-atoms/core/dist/core/XNode", "@web-atoms/core/di
26207
26207
  this.render(XNode.create("div", null, XNode.create(MailHtmlEditor, {
26208
26208
  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, {
26209
26209
  alignment: "above"
26210
- }), XNode.create(Separator, null), XNode.create(AddLink, null), XNode.create(Unlink, null), XNode.create(Separator, null), XNode.create(ToggleEmoji, null))),
26210
+ }), XNode.create(Separator, null), XNode.create(AddLink, null), XNode.create(Unlink, null), XNode.create(Separator, null), XNode.create(ToggleEmoji, null)), XNode.create("input", {
26211
+ autofocus: true,
26212
+ "style-place-self": "stretch",
26213
+ "style-margin-left": "5px",
26214
+ "style-margin-right": "5px",
26215
+ "style-padding-left": "10px",
26216
+ "style-padding-right": "5px",
26217
+ "style-outline": "none",
26218
+ "style-border": "none",
26219
+ placeholder: "Subject ... ",
26220
+ value: Bind.sourceTwoWays(this, x => x.source.draft.subject)
26221
+ })),
26211
26222
  "data-element": "editor",
26212
26223
  "data-html-editor": "email-editor",
26213
26224
  presenter: Bind.presenter(c => this.editor = c),
@@ -26273,6 +26284,9 @@ System.register(["tslib", "@web-atoms/core/dist/core/XNode", "@web-atoms/core/di
26273
26284
  if (!((_a = this.editor) === null || _a === void 0 ? void 0 : _a.htmlTextContent)) {
26274
26285
  return;
26275
26286
  }
26287
+ if (this.prevSave) {
26288
+ yield this.prevSave;
26289
+ }
26276
26290
  (_b = this.draft) !== null && _b !== void 0 ? _b : this.draft = Email.create({
26277
26291
  attachments: []
26278
26292
  });
@@ -26282,7 +26296,8 @@ System.register(["tslib", "@web-atoms/core/dist/core/XNode", "@web-atoms/core/di
26282
26296
  } = this.editor.htmlTextContent;
26283
26297
  this.draft.htmlBody = html;
26284
26298
  this.draft.textBody = text;
26285
- yield this.save();
26299
+ this.prevSave = this.save();
26300
+ yield this.prevSave;
26286
26301
  });
26287
26302
  }
26288
26303
  onEmailUnscheduled(mce) {
@@ -26310,6 +26325,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/XNode", "@web-atoms/core/di
26310
26325
  this.draft.dateSent = DateTime.now.add(TimeSpan.fromSeconds(30));
26311
26326
  yield this.mailService.send(this.draft);
26312
26327
  this.draft = Email.create({
26328
+ subject: "",
26313
26329
  htmlBody: `<div contentEditable="true"><p></p><br/></div>`,
26314
26330
  attachments: []
26315
26331
  });