@social-mail/social-mail-client 1.2.396 → 1.2.397

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.
@@ -43203,6 +43203,24 @@ System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "
43203
43203
  });
43204
43204
  }
43205
43205
  showComposeButton(email = null) {
43206
+ if (this.parameters.newRequest) {
43207
+ this.footerRenderer = () => XNode.create("div", null, XNode.create("div", {
43208
+ "data-layout": "vertical-flex-center-items"
43209
+ }, XNode.create("h5", null, "This sender does not exist in your contacts, and this sender's emails will be restricted in future unless you approve the sender."), XNode.create(AddIconTextButton, {
43210
+ "data-click-event": "approve-sender",
43211
+ text: "Approve Sender"
43212
+ })));
43213
+ return;
43214
+ }
43215
+ if (this.parameters.blocked) {
43216
+ this.footerRenderer = () => XNode.create("div", null, XNode.create("div", {
43217
+ "data-layout": "vertical-flex-center-items"
43218
+ }, XNode.create("h5", null, "This sender is blocked by you."), XNode.create(AddIconTextButton, {
43219
+ "data-click-event": "approve-sender",
43220
+ text: "Unblock Sender"
43221
+ })));
43222
+ return;
43223
+ }
43206
43224
  if (email) {
43207
43225
  this.mailsRepeater.items.remove(email);
43208
43226
  }
@@ -43227,6 +43245,15 @@ System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "
43227
43245
  });
43228
43246
  };
43229
43247
  }
43248
+ approveSender() {
43249
+ return __awaiter(this, void 0, void 0, function* () {
43250
+ const es = this.resolve(EntityService);
43251
+ this.parameters.newRequest = false;
43252
+ this.parameters.blocked = false;
43253
+ yield es.save(this.parameters, c => c);
43254
+ this.showComposeButton();
43255
+ });
43256
+ }
43230
43257
  onClick(a, e) {
43231
43258
  var _a, _b, _c;
43232
43259
  return __awaiter(this, void 0, void 0, function* () {
@@ -43539,6 +43566,9 @@ System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "
43539
43566
  __decorate([Action({
43540
43567
  onEvent: "edit-draft"
43541
43568
  }), __metadata("design:type", Function), __metadata("design:paramtypes", [Object, Object]), __metadata("design:returntype", void 0)], ConversationPage.prototype, "startCompose", null);
43569
+ __decorate([Action({
43570
+ onEvent: "approve-sender"
43571
+ }), __metadata("design:type", Function), __metadata("design:paramtypes", []), __metadata("design:returntype", Promise)], ConversationPage.prototype, "approveSender", null);
43542
43572
  __decorate([Action({
43543
43573
  onEvent: "click"
43544
43574
  }), __metadata("design:type", Function), __metadata("design:paramtypes", [Object, PointerEvent]), __metadata("design:returntype", Promise)], ConversationPage.prototype, "onClick", null);