@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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@social-mail/social-mail-client",
3
- "version": "1.8.282",
3
+ "version": "1.8.283",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -28,6 +28,8 @@ export default class MailboxListPage extends MasterDetailPage {
28
28
 
29
29
  private mailboxes: IMailbox[] = [];
30
30
 
31
+ private selectedItem: IMailbox = null;
32
+
31
33
  private version = 0;
32
34
 
33
35
  private domainID: number = 0;
@@ -36,6 +38,8 @@ export default class MailboxListPage extends MasterDetailPage {
36
38
 
37
39
  private channelsOnly = false;
38
40
 
41
+ private repeater: AtomRepeater;
42
+
39
43
  async init() {
40
44
 
41
45
  const user = SocialMailApp.user;
@@ -56,7 +60,12 @@ export default class MailboxListPage extends MasterDetailPage {
56
60
  <div>
57
61
  <AtomRepeater
58
62
  items={this.mailboxes}
63
+ presenter={Bind.presenter((c) => this.repeater = c)}
59
64
  data-layout="data-grid"
65
+ selectOnClick={true}
66
+ data-list-selection="default"
67
+ data-selection-updated-event="selection-updated"
68
+ selectedItem={Bind.oneWay(() => this.selectedItem)}
60
69
  { ... InfiniteRepeater.pagedItems((start) =>
61
70
  (c, e, cancelToken) => this.mailboxService.list({
62
71
  start,
@@ -112,9 +121,13 @@ export default class MailboxListPage extends MasterDetailPage {
112
121
  this.version++;
113
122
  }
114
123
 
115
- @Action({ onEvent: "open-settings"})
116
- async openSettings(mailbox: IMailbox) {
117
- this.openDetail(MailboxDetailPage, mailbox);
124
+ @Action({ onEvent: "selection-updated"})
125
+ async openSettings() {
126
+ const { selectedItem } = this.repeater;
127
+ if (!selectedItem) {
128
+ return;
129
+ }
130
+ this.openDetail(MailboxDetailPage, selectedItem);
118
131
  }
119
132
 
120
133
  @Action({ onEvent: "add-external-mailbox"})