@social-mail/social-mail-client 1.0.68 → 1.0.69

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.
@@ -25843,6 +25843,9 @@ System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "
25843
25843
  "data-click-event": "reply-email",
25844
25844
  class: "fas fa-reply",
25845
25845
  title: "Reply"
25846
+ }), XNode.create("i", {
25847
+ "data-click-event": "reply-all-email",
25848
+ class: "fa-solid fa-reply-all"
25846
25849
  })));
25847
25850
  }
25848
25851
  })));
@@ -25875,22 +25878,39 @@ System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "
25875
25878
  }
25876
25879
  replyEmail({
25877
25880
  email
25878
- }) {
25881
+ }, ce) {
25879
25882
  var _a, _b;
25880
25883
  return __awaiter(this, void 0, void 0, function* () {
25881
25884
  const parse = JSON.parse(email.headers);
25882
- const emailAddressText = (_b = (_a = parse === null || parse === void 0 ? void 0 : parse.replyTo) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : this.parameters.emailAddress.emailAddress;
25885
+ const emailAddressText = ((_b = (_a = parse === null || parse === void 0 ? void 0 : parse.replyTo) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : this.parameters.emailAddress.emailAddress).toLocaleLowerCase();
25883
25886
  const name = email.senderName;
25884
25887
  const parentID = email.emailID;
25888
+ const recipients = [EmailRecipient.create({
25889
+ name,
25890
+ emailAddressText
25891
+ })];
25892
+ if (/all/i.test(ce.type)) {
25893
+ for (const {
25894
+ name: rName,
25895
+ emailAddress: {
25896
+ emailAddress
25897
+ }
25898
+ } of email.recipients) {
25899
+ if (recipients.some(er => er.emailAddress.emailAddress === emailAddress)) {
25900
+ continue;
25901
+ }
25902
+ recipients.push(EmailRecipient.create({
25903
+ name: rName,
25904
+ emailAddressText: emailAddress
25905
+ }));
25906
+ }
25907
+ }
25885
25908
  const child = Email.create({
25886
25909
  senderID: this.parameters.mailboxID,
25887
25910
  subject: "Re: " + email.subject,
25888
25911
  parentID,
25889
25912
  received: false,
25890
- recipients: [EmailRecipient.create({
25891
- name,
25892
- emailAddressText
25893
- })],
25913
+ recipients,
25894
25914
  htmlBody: `<div contentEditable="true"><p><br/><br/><br/><br/><br/></p></div>`
25895
25915
  });
25896
25916
  yield PageNavigator.pushPageForResult(ComposeMailPage, {
@@ -25908,8 +25928,8 @@ System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "
25908
25928
  onEvent: "open-logs"
25909
25929
  }), __metadata("design:type", Function), __metadata("design:paramtypes", [Object]), __metadata("design:returntype", Promise)], ConversationPage.prototype, "openLogs", null);
25910
25930
  __decorate([Action({
25911
- onEvent: "reply-email"
25912
- }), __metadata("design:type", Function), __metadata("design:paramtypes", [Object]), __metadata("design:returntype", Promise)], ConversationPage.prototype, "replyEmail", null);
25931
+ onEvent: ["reply-email", "reply-all-email"]
25932
+ }), __metadata("design:type", Function), __metadata("design:paramtypes", [Object, CustomEvent]), __metadata("design:returntype", Promise)], ConversationPage.prototype, "replyEmail", null);
25913
25933
  }
25914
25934
  };
25915
25935
  });