@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.
@@ -34296,6 +34296,24 @@ System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "
34296
34296
  });
34297
34297
  }
34298
34298
  showComposeButton(email = null) {
34299
+ if (this.parameters.newRequest) {
34300
+ this.footerRenderer = () => XNode.create("div", null, XNode.create("div", {
34301
+ "data-layout": "vertical-flex-center-items"
34302
+ }, 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, {
34303
+ "data-click-event": "approve-sender",
34304
+ text: "Approve Sender"
34305
+ })));
34306
+ return;
34307
+ }
34308
+ if (this.parameters.blocked) {
34309
+ this.footerRenderer = () => XNode.create("div", null, XNode.create("div", {
34310
+ "data-layout": "vertical-flex-center-items"
34311
+ }, XNode.create("h5", null, "This sender is blocked by you."), XNode.create(AddIconTextButton, {
34312
+ "data-click-event": "approve-sender",
34313
+ text: "Unblock Sender"
34314
+ })));
34315
+ return;
34316
+ }
34299
34317
  if (email) {
34300
34318
  this.mailsRepeater.items.remove(email);
34301
34319
  }
@@ -34320,6 +34338,15 @@ System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "
34320
34338
  });
34321
34339
  };
34322
34340
  }
34341
+ approveSender() {
34342
+ return __awaiter(this, void 0, void 0, function* () {
34343
+ const es = this.resolve(EntityService);
34344
+ this.parameters.newRequest = false;
34345
+ this.parameters.blocked = false;
34346
+ yield es.save(this.parameters, c => c);
34347
+ this.showComposeButton();
34348
+ });
34349
+ }
34323
34350
  onClick(a, e) {
34324
34351
  var _a, _b, _c;
34325
34352
  return __awaiter(this, void 0, void 0, function* () {
@@ -34632,6 +34659,9 @@ System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "
34632
34659
  __decorate([Action({
34633
34660
  onEvent: "edit-draft"
34634
34661
  }), __metadata("design:type", Function), __metadata("design:paramtypes", [Object, Object]), __metadata("design:returntype", void 0)], ConversationPage.prototype, "startCompose", null);
34662
+ __decorate([Action({
34663
+ onEvent: "approve-sender"
34664
+ }), __metadata("design:type", Function), __metadata("design:paramtypes", []), __metadata("design:returntype", Promise)], ConversationPage.prototype, "approveSender", null);
34635
34665
  __decorate([Action({
34636
34666
  onEvent: "click"
34637
34667
  }), __metadata("design:type", Function), __metadata("design:paramtypes", [Object, PointerEvent]), __metadata("design:returntype", Promise)], ConversationPage.prototype, "onClick", null);