@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.
@@ -47843,6 +47843,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dis
47843
47843
  super(...arguments);
47844
47844
  this.search = "";
47845
47845
  this.mailboxes = [];
47846
+ this.selectedItem = null;
47846
47847
  this.version = 0;
47847
47848
  this.domainID = 0;
47848
47849
  this.libraryOnly = false;
@@ -47875,7 +47876,12 @@ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dis
47875
47876
  }));
47876
47877
  this.renderer = XNode.create("div", null, XNode.create("div", null, XNode.create(AtomRepeater, Object.assign({
47877
47878
  items: this.mailboxes,
47878
- "data-layout": "data-grid"
47879
+ presenter: Bind.presenter(c => this.repeater = c),
47880
+ "data-layout": "data-grid",
47881
+ selectOnClick: true,
47882
+ "data-list-selection": "default",
47883
+ "data-selection-updated-event": "selection-updated",
47884
+ selectedItem: Bind.oneWay(() => this.selectedItem)
47879
47885
  }, InfiniteRepeater.pagedItems(start => (c, e, cancelToken) => this.mailboxService.list({
47880
47886
  start,
47881
47887
  cancelToken,
@@ -47923,9 +47929,15 @@ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dis
47923
47929
  this.version++;
47924
47930
  });
47925
47931
  }
47926
- openSettings(mailbox) {
47932
+ openSettings() {
47927
47933
  return __awaiter(this, void 0, void 0, function* () {
47928
- this.openDetail(MailboxDetailPage, mailbox);
47934
+ const {
47935
+ selectedItem
47936
+ } = this.repeater;
47937
+ if (!selectedItem) {
47938
+ return;
47939
+ }
47940
+ this.openDetail(MailboxDetailPage, selectedItem);
47929
47941
  });
47930
47942
  }
47931
47943
  addExternalMailbox() {
@@ -47939,8 +47951,8 @@ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dis
47939
47951
  onEvent: "add-mailbox"
47940
47952
  }), __metadata("design:type", Function), __metadata("design:paramtypes", []), __metadata("design:returntype", Promise)], MailboxListPage.prototype, "addMailbox", null);
47941
47953
  __decorate([Action({
47942
- onEvent: "open-settings"
47943
- }), __metadata("design:type", Function), __metadata("design:paramtypes", [Object]), __metadata("design:returntype", Promise)], MailboxListPage.prototype, "openSettings", null);
47954
+ onEvent: "selection-updated"
47955
+ }), __metadata("design:type", Function), __metadata("design:paramtypes", []), __metadata("design:returntype", Promise)], MailboxListPage.prototype, "openSettings", null);
47944
47956
  __decorate([Action({
47945
47957
  onEvent: "add-external-mailbox"
47946
47958
  }), __metadata("design:type", Function), __metadata("design:paramtypes", []), __metadata("design:returntype", Promise)], MailboxListPage.prototype, "addExternalMailbox", null);