@social-mail/social-mail-client 1.8.282 → 1.8.283

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.
@@ -45633,6 +45633,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dis
45633
45633
  super(...arguments);
45634
45634
  this.search = "";
45635
45635
  this.mailboxes = [];
45636
+ this.selectedItem = null;
45636
45637
  this.version = 0;
45637
45638
  this.domainID = 0;
45638
45639
  this.libraryOnly = false;
@@ -45665,7 +45666,12 @@ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dis
45665
45666
  }));
45666
45667
  this.renderer = XNode.create("div", null, XNode.create("div", null, XNode.create(AtomRepeater, Object.assign({
45667
45668
  items: this.mailboxes,
45668
- "data-layout": "data-grid"
45669
+ presenter: Bind.presenter(c => this.repeater = c),
45670
+ "data-layout": "data-grid",
45671
+ selectOnClick: true,
45672
+ "data-list-selection": "default",
45673
+ "data-selection-updated-event": "selection-updated",
45674
+ selectedItem: Bind.oneWay(() => this.selectedItem)
45669
45675
  }, InfiniteRepeater.pagedItems(start => (c, e, cancelToken) => this.mailboxService.list({
45670
45676
  start,
45671
45677
  cancelToken,
@@ -45713,9 +45719,15 @@ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dis
45713
45719
  this.version++;
45714
45720
  });
45715
45721
  }
45716
- openSettings(mailbox) {
45722
+ openSettings() {
45717
45723
  return __awaiter(this, void 0, void 0, function* () {
45718
- this.openDetail(MailboxDetailPage, mailbox);
45724
+ const {
45725
+ selectedItem
45726
+ } = this.repeater;
45727
+ if (!selectedItem) {
45728
+ return;
45729
+ }
45730
+ this.openDetail(MailboxDetailPage, selectedItem);
45719
45731
  });
45720
45732
  }
45721
45733
  addExternalMailbox() {
@@ -45729,8 +45741,8 @@ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dis
45729
45741
  onEvent: "add-mailbox"
45730
45742
  }), __metadata("design:type", Function), __metadata("design:paramtypes", []), __metadata("design:returntype", Promise)], MailboxListPage.prototype, "addMailbox", null);
45731
45743
  __decorate([Action({
45732
- onEvent: "open-settings"
45733
- }), __metadata("design:type", Function), __metadata("design:paramtypes", [Object]), __metadata("design:returntype", Promise)], MailboxListPage.prototype, "openSettings", null);
45744
+ onEvent: "selection-updated"
45745
+ }), __metadata("design:type", Function), __metadata("design:paramtypes", []), __metadata("design:returntype", Promise)], MailboxListPage.prototype, "openSettings", null);
45734
45746
  __decorate([Action({
45735
45747
  onEvent: "add-external-mailbox"
45736
45748
  }), __metadata("design:type", Function), __metadata("design:paramtypes", []), __metadata("design:returntype", Promise)], MailboxListPage.prototype, "addExternalMailbox", null);