@nylas/react 1.0.2-canary.2 → 1.1.0-canary.3

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.
Files changed (129) hide show
  1. package/dist/add-circle-icon_22.entry-8d0ac489.cjs +1 -0
  2. package/dist/{add-circle-icon_18.entry-f86ae88d.js → add-circle-icon_22.entry-da31fa71.js} +627 -421
  3. package/dist/{archive-icon_7.entry-052ac074.cjs → archive-icon_7.entry-7aad8104.cjs} +1 -1
  4. package/dist/{archive-icon_7.entry-0e34d6e7.js → archive-icon_7.entry-bc2418f7.js} +20 -20
  5. package/dist/{arrow-icon.entry-93f21385.cjs → arrow-icon.entry-6eba68a9.cjs} +1 -1
  6. package/dist/arrow-icon.entry-9a932082.js +15 -0
  7. package/dist/{bold-icon_3.entry-88ce1d25.js → bold-icon_3.entry-5f7e3755.js} +8 -8
  8. package/dist/bold-icon_3.entry-db17d481.cjs +1 -0
  9. package/dist/{calendar-cancel-icon.entry-e9c692fa.js → calendar-cancel-icon.entry-1ff7845a.js} +5 -5
  10. package/dist/{calendar-cancel-icon.entry-574c8aa4.cjs → calendar-cancel-icon.entry-a5141f82.cjs} +1 -1
  11. package/dist/{calendar-check-icon_2.entry-b0476bca.cjs → calendar-check-icon_2.entry-c3add652.cjs} +1 -1
  12. package/dist/{calendar-check-icon_2.entry-d461c713.js → calendar-check-icon_2.entry-d7421059.js} +6 -6
  13. package/dist/{calendar-icon.entry-1ca202a4.js → calendar-icon.entry-4458997f.js} +5 -5
  14. package/dist/{calendar-icon.entry-98936e6d.cjs → calendar-icon.entry-445d624a.cjs} +1 -1
  15. package/dist/chevron-icon_3.entry-8961e6bb.cjs +1 -0
  16. package/dist/chevron-icon_3.entry-f7f3d487.js +117 -0
  17. package/dist/close-icon.entry-6dd5ff0a.js +15 -0
  18. package/dist/close-icon.entry-ebc527c5.cjs +1 -0
  19. package/dist/{constants-b6bf6671-49a0f1f2.js → constants-6ee60d6d-4cd16450.js} +1 -1
  20. package/dist/{constants-b6bf6671-27e2557d.cjs → constants-6ee60d6d-6c0540db.cjs} +1 -1
  21. package/dist/document-refresh-icon.entry-298b2133.cjs +1 -0
  22. package/dist/{document-refresh-icon.entry-faea08ce.js → document-refresh-icon.entry-bdc323b5.js} +5 -5
  23. package/dist/elements/index.d.ts +7 -0
  24. package/dist/{forward-icon_6.entry-c4b37cb1.cjs → forward-icon_6.entry-15208ea9.cjs} +2 -2
  25. package/dist/{forward-icon_6.entry-8da1f65d.js → forward-icon_6.entry-62759373.js} +63 -63
  26. package/dist/{globe-icon.entry-4720304b.js → globe-icon.entry-9e082178.js} +2 -2
  27. package/dist/{globe-icon.entry-90a0b9c9.cjs → globe-icon.entry-c8302bf5.cjs} +1 -1
  28. package/dist/google-logo-icon_3.entry-0c095209.js +258 -0
  29. package/dist/google-logo-icon_3.entry-f8433ff9.cjs +1 -0
  30. package/dist/index-0f3bd8df.js +1824 -0
  31. package/dist/index-7a55dc33.cjs +30 -0
  32. package/dist/index.d.ts +4 -2
  33. package/dist/index.es-2578c6a5-098d48d0.cjs +7 -0
  34. package/dist/{index-10914bc1-346f04fa.js → index.es-2578c6a5-71441142.js} +833 -933
  35. package/dist/{info-icon_2.entry-9307db18.js → info-icon_2.entry-73106882.js} +5 -5
  36. package/dist/{info-icon_2.entry-81e95048.cjs → info-icon_2.entry-ca224a3b.cjs} +1 -1
  37. package/dist/loading-icon.entry-012644b7.js +15 -0
  38. package/dist/loading-icon.entry-f9f5e66f.cjs +1 -0
  39. package/dist/mailbox-store-bb21512c-045c3ea0.cjs +1 -0
  40. package/dist/{mailbox-store-e721b17c-cf9a43dd.js → mailbox-store-bb21512c-615660ef.js} +125 -62
  41. package/dist/nylas-additional-participants.entry-a50ef8e2.cjs +1 -0
  42. package/dist/{nylas-additional-participants.entry-1653dec7.js → nylas-additional-participants.entry-db85836a.js} +13 -13
  43. package/dist/{nylas-booked-event-card_10.entry-aa971e8a.js → nylas-booked-event-card_10.entry-b49b2369.js} +26 -26
  44. package/dist/nylas-booked-event-card_10.entry-fccb783c.cjs +1 -0
  45. package/dist/nylas-form-card.entry-090a4d3b.js +56 -0
  46. package/dist/nylas-form-card.entry-f5230005.cjs +1 -0
  47. package/dist/nylas-if-state.entry-7924dde0.js +96 -0
  48. package/dist/nylas-if-state.entry-ff9c9a85.cjs +1 -0
  49. package/dist/{nylas-list-folders.entry-995fa819.js → nylas-list-folders.entry-9dd96530.js} +4 -4
  50. package/dist/{nylas-list-folders.entry-3b24d92d.cjs → nylas-list-folders.entry-dbfc2cf8.cjs} +1 -1
  51. package/dist/{nylas-list-threads.entry-fda42ded.cjs → nylas-list-threads.entry-6bcc0328.cjs} +1 -1
  52. package/dist/{nylas-list-threads.entry-21466eb3.js → nylas-list-threads.entry-b435eaae.js} +6 -6
  53. package/dist/nylas-login.entry-1623d309.cjs +1 -0
  54. package/dist/nylas-login.entry-97350c76.js +75 -0
  55. package/dist/{nylas-mailbox-pagination.entry-9dcd4901.cjs → nylas-mailbox-pagination.entry-1776eb16.cjs} +1 -1
  56. package/dist/{nylas-mailbox-pagination.entry-02d40186.js → nylas-mailbox-pagination.entry-ceef8be2.js} +3 -3
  57. package/dist/{nylas-mailbox-toolbar-button.entry-d1099fab.cjs → nylas-mailbox-toolbar-button.entry-7d3f79b9.cjs} +1 -1
  58. package/dist/{nylas-mailbox-toolbar-button.entry-dbad44b4.js → nylas-mailbox-toolbar-button.entry-e6b3d3a4.js} +10 -10
  59. package/dist/nylas-mailbox.entry-06d8014a.js +136 -0
  60. package/dist/nylas-mailbox.entry-ae8da6ff.cjs +1 -0
  61. package/dist/{nylas-provider.entry-bbee8c99.js → nylas-provider.entry-8b9c2b69.js} +50 -58
  62. package/dist/nylas-provider.entry-97c9e272.cjs +1 -0
  63. package/dist/nylas-scheduler-editor.entry-c3791787.js +2181 -0
  64. package/dist/nylas-scheduler-editor.entry-f6cf1cd9.cjs +7 -0
  65. package/dist/nylas-scheduling.entry-08ae840a.cjs +1 -0
  66. package/dist/{nylas-scheduling.entry-22b5ad07.js → nylas-scheduling.entry-6380509a.js} +39 -38
  67. package/dist/{nylas-threads-refresh.entry-05258b36.cjs → nylas-threads-refresh.entry-246e6d77.cjs} +1 -1
  68. package/dist/{nylas-threads-refresh.entry-414d8740.js → nylas-threads-refresh.entry-eaee86fb.js} +5 -5
  69. package/dist/nylas-threads-search.entry-42a2acb1.cjs +1 -0
  70. package/dist/{nylas-threads-search.entry-a19dc90f.js → nylas-threads-search.entry-7e12758e.js} +7 -7
  71. package/dist/{nylas-view-thread.entry-5da81e99.cjs → nylas-view-thread.entry-78e6927a.cjs} +1 -1
  72. package/dist/{nylas-view-thread.entry-38149162.js → nylas-view-thread.entry-b936e76a.js} +4 -4
  73. package/dist/{people-icon.entry-5c244c8d.js → people-icon.entry-5c8ee696.js} +5 -5
  74. package/dist/{people-icon.entry-4b682757.cjs → people-icon.entry-bcf848c0.cjs} +1 -1
  75. package/dist/play-icon_2.entry-356e63cc.js +25 -0
  76. package/dist/play-icon_2.entry-92e78f1b.cjs +1 -0
  77. package/dist/react.cjs +1 -1
  78. package/dist/react.js +84 -75
  79. package/dist/{refresh-icon.entry-63456c9a.js → refresh-icon.entry-77f0c377.js} +2 -2
  80. package/dist/{refresh-icon.entry-59fff3d4.cjs → refresh-icon.entry-bec053b6.cjs} +1 -1
  81. package/dist/{register-component-d056a880-f3003d6c.js → register-component-dc659dc3-0fdb18dc.js} +2 -2
  82. package/dist/{register-component-d056a880-2be11c56.cjs → register-component-dc659dc3-f58bf25b.cjs} +1 -1
  83. package/dist/scheduler-config-store-51ee4f42-ce3a9b0e.cjs +1 -0
  84. package/dist/scheduler-config-store-51ee4f42-e02895da.js +14 -0
  85. package/dist/{scheduler-store-0fbe642c-14466305.js → scheduler-store-72116723-3ba2480c.js} +3 -2
  86. package/dist/scheduler-store-72116723-db9d91f6.cjs +1 -0
  87. package/dist/time-period-selector.entry-decd251b.js +78 -0
  88. package/dist/time-period-selector.entry-f25fad77.cjs +1 -0
  89. package/dist/{translate-icon.entry-35999e70.js → translate-icon.entry-cac02c46.js} +2 -2
  90. package/dist/{translate-icon.entry-1784c18e.cjs → translate-icon.entry-dd5b707c.cjs} +1 -1
  91. package/dist/{warning-icon.entry-73de08c3.js → warning-icon.entry-370b9cf0.js} +4 -4
  92. package/dist/{warning-icon.entry-3a702d1d.cjs → warning-icon.entry-8af8a742.cjs} +1 -1
  93. package/package.json +3 -3
  94. package/dist/add-circle-icon_18.entry-b66b6343.cjs +0 -1
  95. package/dist/arrow-icon.entry-2afd9ea9.js +0 -15
  96. package/dist/auth-store-69ac49c7-5a0bbb90.cjs +0 -1
  97. package/dist/auth-store-69ac49c7-cbfda055.js +0 -66
  98. package/dist/bold-icon_3.entry-8f55a9e7.cjs +0 -1
  99. package/dist/chevron-icon_3.entry-830f52c2.js +0 -105
  100. package/dist/chevron-icon_3.entry-f7801467.cjs +0 -1
  101. package/dist/close-icon.entry-37e8361f.js +0 -15
  102. package/dist/close-icon.entry-8d6e9816.cjs +0 -1
  103. package/dist/document-refresh-icon.entry-fcb33921.cjs +0 -1
  104. package/dist/index-10914bc1-c8c3a2f3.cjs +0 -7
  105. package/dist/index-457dcf0b.cjs +0 -30
  106. package/dist/index-ce40ad47.js +0 -1570
  107. package/dist/loading-icon.entry-06d37ef0.cjs +0 -1
  108. package/dist/loading-icon.entry-dc518df4.js +0 -15
  109. package/dist/mailbox-store-e721b17c-4e97e07d.cjs +0 -1
  110. package/dist/nylas-additional-participants.entry-ff8bf378.cjs +0 -1
  111. package/dist/nylas-booked-event-card_10.entry-06bc3c51.cjs +0 -1
  112. package/dist/nylas-editor-tabs.entry-49b5a3ab.cjs +0 -1
  113. package/dist/nylas-editor-tabs.entry-9d0959bf.js +0 -181
  114. package/dist/nylas-form-card.entry-69d2095b.cjs +0 -1
  115. package/dist/nylas-form-card.entry-c4e78f88.js +0 -56
  116. package/dist/nylas-if-state_3.entry-2eb3f385.js +0 -293
  117. package/dist/nylas-if-state_3.entry-5baf6d6f.cjs +0 -1
  118. package/dist/nylas-provider.entry-78e2fa30.cjs +0 -1
  119. package/dist/nylas-scheduler-editor.entry-550d3c59.cjs +0 -1
  120. package/dist/nylas-scheduler-editor.entry-8f7ecf3b.js +0 -111
  121. package/dist/nylas-scheduling.entry-30a63738.cjs +0 -1
  122. package/dist/nylas-threads-search.entry-ff21fc65.cjs +0 -1
  123. package/dist/play-icon_2.entry-ccdc6b9c.cjs +0 -1
  124. package/dist/play-icon_2.entry-f36d6d55.js +0 -25
  125. package/dist/scheduler-config-store-4d035001-0256b40c.cjs +0 -1
  126. package/dist/scheduler-config-store-4d035001-db9dc78a.js +0 -33
  127. package/dist/scheduler-store-0fbe642c-410fdbf4.cjs +0 -1
  128. /package/dist/{utils-0cd66d04-89ab163d.js → utils-c00bdc3c-89ab163d.js} +0 -0
  129. /package/dist/{utils-0cd66d04-94b9c3b6.cjs → utils-c00bdc3c-94b9c3b6.cjs} +0 -0
@@ -1,19 +1,18 @@
1
- import { r as C, c as h, h as g, H as S, g as f } from "./index-ce40ad47.js";
2
- import { N as m, e as A } from "./index-10914bc1-346f04fa.js";
3
- import { d as a } from "./utils-0cd66d04-89ab163d.js";
4
- import { C as b, N as p } from "./auth-store-69ac49c7-cbfda055.js";
5
- import { C as v, H as P, N as _, a as N, b as w } from "./mailbox-store-e721b17c-cf9a43dd.js";
6
- import { C as I, N as x } from "./scheduler-store-0fbe642c-14466305.js";
7
- import { C as M, N as E } from "./scheduler-config-store-4d035001-db9dc78a.js";
1
+ import { r as C, c as a, h as g, H as S, g as m } from "./index-0f3bd8df.js";
2
+ import { N as f, e as b } from "./index.es-2578c6a5-71441142.js";
3
+ import { d as h } from "./utils-c00bdc3c-89ab163d.js";
4
+ import { C as p, a as A, H as v, N as P, b as _, c as N, d as w } from "./mailbox-store-bb21512c-615660ef.js";
5
+ import { C as x, N as I } from "./scheduler-store-72116723-3ba2480c.js";
6
+ import { C as M } from "./scheduler-config-store-51ee4f42-e02895da.js";
8
7
  import "react";
9
8
  import "react-dom";
10
9
  import "./_commonjsHelpers-57e89916-af061c86.js";
11
- class L {
12
- constructor(t, s, r, o, l, n, i = "https://api.us.nylas.com") {
13
- this.router = t, this.schedulerAPIURL = i, this.nylasAuth = s, this.nylasAuthStore = r, this.nylasMailboxStore = o, this.nylasSchedulerStore = l, this.nylasSchedulerConfigStore = n;
10
+ class E {
11
+ constructor(e, s, r, o, l, n, i = "https://api.us.nylas.com") {
12
+ this.router = e, this.schedulerAPIURL = i, this.nylasAuth = s, this.nylasAuthStore = r, this.nylasMailboxStore = o, this.nylasSchedulerStore = l, this.nylasSchedulerConfigStore = n;
14
13
  }
15
14
  init() {
16
- a("NylasConnector init");
15
+ h("NylasConnector init");
17
16
  }
18
17
  get authStore() {
19
18
  return this.nylasAuthStore;
@@ -28,7 +27,7 @@ class L {
28
27
  return this.nylasSchedulerConfigStore;
29
28
  }
30
29
  get auth() {
31
- return this._authConnector ? this._authConnector : (this._authConnector = new p(this.nylasAuth, this.nylasAuthStore), this._authConnector);
30
+ return this._authConnector ? this._authConnector : (this._authConnector = new P(this.nylasAuth, this.nylasAuthStore), this._authConnector);
32
31
  }
33
32
  get threads() {
34
33
  return this._threadConnector ? this._threadConnector : (this._threadConnector = new _(this.nylasAuth, this.nylasAuthStore, this.nylasMailboxStore, this.router), this._threadConnector);
@@ -40,18 +39,11 @@ class L {
40
39
  return this._foldersConnector ? this._foldersConnector : (this._foldersConnector = new w(this.nylasAuth, this.nylasAuthStore, this.nylasMailboxStore), this._foldersConnector);
41
40
  }
42
41
  get scheduler() {
43
- return this._schedulerAPIConnector ? this._schedulerAPIConnector : (this._schedulerAPIConnector = new x({
42
+ return this._schedulerAPIConnector ? this._schedulerAPIConnector : (this._schedulerAPIConnector = new I({
44
43
  schedulerAPIURL: this.schedulerAPIURL,
45
44
  schedulerStore: this.schedulerStore
46
45
  }), this._schedulerAPIConnector);
47
46
  }
48
- get schedulerConfig() {
49
- return this._schedulerConfigConnector ? this._schedulerConfigConnector : (this._schedulerConfigConnector = new E({
50
- nylasAuth: this.nylasAuth,
51
- nylasAuthStore: this.nylasAuthStore,
52
- nylasSchedulerConfigStore: this.nylasSchedulerConfigStore
53
- }), this._schedulerConfigConnector);
54
- }
55
47
  getAuth() {
56
48
  return this.nylasAuth;
57
49
  }
@@ -62,25 +54,25 @@ class L {
62
54
  await this.nylasAuth.logout(), this.resetStores();
63
55
  }
64
56
  }
65
- const R = ":host{display:contents}", T = R, U = class {
66
- constructor(e) {
67
- C(this, e), this.init = h(this, "init", 7), this.loggedIn = h(this, "loggedIn", 7), this.loggedOut = h(this, "loggedOut", 7), this.handleAuthChange = async (t) => {
68
- t ? this.loggedIn.emit(this.host) : this.loggedOut.emit(this.host);
57
+ const L = ":host{display:contents}", R = L, T = class {
58
+ constructor(t) {
59
+ C(this, t), this.init = a(this, "init", 7), this.loggedIn = a(this, "loggedIn", 7), this.loggedOut = a(this, "loggedOut", 7), this.handleAuthChange = async (e) => {
60
+ e ? this.loggedIn.emit(this.host) : this.loggedOut.emit(this.host);
69
61
  }, this.authConfig = void 0, this.eventOverrides = {}, this.automaticComponentRegistration = !0;
70
62
  }
71
63
  connectedCallback() {
72
- a("[nylas-provider] connectedCallback");
64
+ h("[nylas-provider] connectedCallback");
73
65
  }
74
66
  async componentWillLoad() {
75
67
  var n, i, c, u, d, y;
76
- a("[nylas-provider] componentWillLoad"), this.stores = {
77
- auth: b(),
78
- mailbox: v(),
79
- scheduler: I(),
68
+ h("[nylas-provider] componentWillLoad"), this.stores = {
69
+ auth: p(),
70
+ mailbox: A(),
71
+ scheduler: x(),
80
72
  schedulerConfig: M()
81
- }, this.baseProvider = new m(this.host, this.stores, this.automaticComponentRegistration, this.eventOverrides);
82
- const e = new P();
83
- this.nylasAuth = A({
73
+ }, this.baseProvider = new f(this.host, this.stores, this.automaticComponentRegistration, this.eventOverrides);
74
+ const t = new v();
75
+ this.nylasAuth = b({
84
76
  apiUri: "https://api.us.nylas.com",
85
77
  elementsApiUri: "https://elements.us.nylas.com",
86
78
  storageType: "indexeddb",
@@ -89,8 +81,8 @@ const R = ":host{display:contents}", T = R, U = class {
89
81
  redirectURI: "/",
90
82
  ...this.authConfig
91
83
  });
92
- const t = (n = this.baseProvider) == null ? void 0 : n.getStore("mailbox");
93
- if (!t)
84
+ const e = (n = this.baseProvider) == null ? void 0 : n.getStore("mailbox");
85
+ if (!e)
94
86
  throw new Error("The mailbox store is not set");
95
87
  const s = (i = this.baseProvider) == null ? void 0 : i.getStore("auth");
96
88
  if (!s)
@@ -101,24 +93,24 @@ const R = ":host{display:contents}", T = R, U = class {
101
93
  const o = (u = this.baseProvider) == null ? void 0 : u.getStore("schedulerConfig");
102
94
  if (!o)
103
95
  throw new Error("The scheduler config store is not set");
104
- this.nylasConnector = new L(e, this.nylasAuth, s, t, r, o), this.init.emit(this.host).defaultPrevented || await ((d = this.nylasConnector) == null ? void 0 : d.auth.validateSession()), this.handleAuthChange(s.state.isAuthenticated), (y = this.baseProvider) == null || y.componentWillLoad(this.nylasConnector);
96
+ this.nylasConnector = new E(t, this.nylasAuth, s, e, r, o), this.init.emit(this.host).defaultPrevented || await ((d = this.nylasConnector) == null ? void 0 : d.auth.validateSession()), this.handleAuthChange(s.state.isAuthenticated), (y = this.baseProvider) == null || y.componentWillLoad(this.nylasConnector);
105
97
  }
106
98
  componentDidLoad() {
107
- var t, s;
108
- const e = (t = this.baseProvider) == null ? void 0 : t.getStore("auth");
109
- e == null || e.onChange("isAuthenticated", this.handleAuthChange), (s = this.baseProvider) == null || s.componentDidLoad();
99
+ var e, s;
100
+ const t = (e = this.baseProvider) == null ? void 0 : e.getStore("auth");
101
+ t == null || t.onChange("isAuthenticated", this.handleAuthChange), (s = this.baseProvider) == null || s.componentDidLoad();
110
102
  }
111
103
  componentDisconnected() {
112
- var e;
113
- (e = this.baseProvider) == null || e.componentDisconnected();
114
- }
115
- async registerComponentHandler(e) {
116
104
  var t;
117
- (t = this.baseProvider) == null || t.registerComponent(e.detail);
105
+ (t = this.baseProvider) == null || t.componentDisconnected();
118
106
  }
119
- async unregisterComponentHandler(e) {
120
- var t;
121
- (t = this.baseProvider) == null || t.unregisterComponent(e.detail);
107
+ async registerComponentHandler(t) {
108
+ var e;
109
+ (e = this.baseProvider) == null || e.registerComponent(t.detail);
110
+ }
111
+ async unregisterComponentHandler(t) {
112
+ var e;
113
+ (e = this.baseProvider) == null || e.unregisterComponent(t.detail);
122
114
  }
123
115
  async getNylasAuth() {
124
116
  return this.nylasAuth;
@@ -127,29 +119,29 @@ const R = ":host{display:contents}", T = R, U = class {
127
119
  return this.nylasConnector;
128
120
  }
129
121
  async getMailboxStore() {
130
- var e;
131
- return (e = this.baseProvider) == null ? void 0 : e.getStore("mailbox");
122
+ var t;
123
+ return (t = this.baseProvider) == null ? void 0 : t.getStore("mailbox");
132
124
  }
133
125
  async getAuthStore() {
134
- var e;
135
- return (e = this.baseProvider) == null ? void 0 : e.getStore("auth");
126
+ var t;
127
+ return (t = this.baseProvider) == null ? void 0 : t.getStore("auth");
136
128
  }
137
129
  async getNylasSchedulerStore() {
138
- var e;
139
- return (e = this.baseProvider) == null ? void 0 : e.getStore("scheduler");
130
+ var t;
131
+ return (t = this.baseProvider) == null ? void 0 : t.getStore("scheduler");
140
132
  }
141
133
  async getNylasSchedulerConfigStore() {
142
- var e;
143
- return (e = this.baseProvider) == null ? void 0 : e.getStore("schedulerConfig");
134
+ var t;
135
+ return (t = this.baseProvider) == null ? void 0 : t.getStore("schedulerConfig");
144
136
  }
145
137
  render() {
146
- return g(S, { key: "c70dbacf5502b79a6306f27b969dd9a9f841f5a0" }, g("slot", { key: "031e85b2e755d2e4b7f925982a47e32daa5f8200" }));
138
+ return g(S, { key: "cf7646d512fe6614ad4a73ac63c3581f20af1ab2" }, g("slot", { key: "bf17dda1b22695e9862a549866fcd140b5d2e0db" }));
147
139
  }
148
140
  get host() {
149
- return f(this);
141
+ return m(this);
150
142
  }
151
143
  };
152
- U.style = T;
144
+ T.style = R;
153
145
  export {
154
- U as nylas_provider
146
+ T as nylas_provider
155
147
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-7a55dc33.cjs"),S=require("./index.es-2578c6a5-098d48d0.cjs"),l=require("./utils-c00bdc3c-94b9c3b6.cjs"),o=require("./mailbox-store-bb21512c-045c3ea0.cjs"),C=require("./scheduler-store-72116723-db9d91f6.cjs"),f=require("./scheduler-config-store-51ee4f42-ce3a9b0e.cjs");require("react");require("react-dom");require("./_commonjsHelpers-57e89916-4a3ae7d8.cjs");class m{constructor(t,s,n,i,c,h,a="https://api.us.nylas.com"){this.router=t,this.schedulerAPIURL=a,this.nylasAuth=s,this.nylasAuthStore=n,this.nylasMailboxStore=i,this.nylasSchedulerStore=c,this.nylasSchedulerConfigStore=h}init(){l.debug("NylasConnector init")}get authStore(){return this.nylasAuthStore}get mailboxStore(){return this.nylasMailboxStore}get schedulerStore(){return this.nylasSchedulerStore}get schedulerConfigStore(){return this.nylasSchedulerConfigStore}get auth(){return this._authConnector?this._authConnector:(this._authConnector=new o.NylasAuthConnector(this.nylasAuth,this.nylasAuthStore),this._authConnector)}get threads(){return this._threadConnector?this._threadConnector:(this._threadConnector=new o.NylasThreadsConnector(this.nylasAuth,this.nylasAuthStore,this.nylasMailboxStore,this.router),this._threadConnector)}get messages(){return this._messageConnector?this._messageConnector:(this._messageConnector=new o.NylasMessagesConnector(this.nylasAuth,this.nylasAuthStore,this.nylasMailboxStore),this._messageConnector)}get folders(){return this._foldersConnector?this._foldersConnector:(this._foldersConnector=new o.NylasFoldersConnector(this.nylasAuth,this.nylasAuthStore,this.nylasMailboxStore),this._foldersConnector)}get scheduler(){return this._schedulerAPIConnector?this._schedulerAPIConnector:(this._schedulerAPIConnector=new C.NylaSchedulerAPIConnector({schedulerAPIURL:this.schedulerAPIURL,schedulerStore:this.schedulerStore}),this._schedulerAPIConnector)}getAuth(){return this.nylasAuth}resetStores(){this.nylasAuthStore.reset(),this.nylasMailboxStore.reset()}async logout(){await this.nylasAuth.logout(),this.resetStores()}}const A=":host{display:contents}",v=A,b=class{constructor(e){r.registerInstance(this,e),this.init=r.createEvent(this,"init",7),this.loggedIn=r.createEvent(this,"loggedIn",7),this.loggedOut=r.createEvent(this,"loggedOut",7),this.handleAuthChange=async t=>{t?this.loggedIn.emit(this.host):this.loggedOut.emit(this.host)},this.authConfig=void 0,this.eventOverrides={},this.automaticComponentRegistration=!0}connectedCallback(){l.debug("[nylas-provider] connectedCallback")}async componentWillLoad(){var h,a,u,d,y,g;l.debug("[nylas-provider] componentWillLoad"),this.stores={auth:o.CreateNylasAuthStore(),mailbox:o.CreateNylasMailboxStore(),scheduler:C.CreateNylasSchedulerStore(),schedulerConfig:f.CreateNylasSchedulerConfigStore()},this.baseProvider=new S.NylasBaseProvider(this.host,this.stores,this.automaticComponentRegistration,this.eventOverrides);const e=new o.HashRouter;this.nylasAuth=S.es({apiUri:"https://api.us.nylas.com",elementsApiUri:"https://elements.us.nylas.com",storageType:"indexeddb",clientId:"YOUR_CLIENT_ID",defaultScopes:[],redirectURI:"/",...this.authConfig});const t=(h=this.baseProvider)==null?void 0:h.getStore("mailbox");if(!t)throw new Error("The mailbox store is not set");const s=(a=this.baseProvider)==null?void 0:a.getStore("auth");if(!s)throw new Error("The auth store is not set");const n=(u=this.baseProvider)==null?void 0:u.getStore("scheduler");if(!n)throw new Error("The scheduler store is not set");const i=(d=this.baseProvider)==null?void 0:d.getStore("schedulerConfig");if(!i)throw new Error("The scheduler config store is not set");this.nylasConnector=new m(e,this.nylasAuth,s,t,n,i),this.init.emit(this.host).defaultPrevented||await((y=this.nylasConnector)==null?void 0:y.auth.validateSession()),this.handleAuthChange(s.state.isAuthenticated),(g=this.baseProvider)==null||g.componentWillLoad(this.nylasConnector)}componentDidLoad(){var t,s;const e=(t=this.baseProvider)==null?void 0:t.getStore("auth");e==null||e.onChange("isAuthenticated",this.handleAuthChange),(s=this.baseProvider)==null||s.componentDidLoad()}componentDisconnected(){var e;(e=this.baseProvider)==null||e.componentDisconnected()}async registerComponentHandler(e){var t;(t=this.baseProvider)==null||t.registerComponent(e.detail)}async unregisterComponentHandler(e){var t;(t=this.baseProvider)==null||t.unregisterComponent(e.detail)}async getNylasAuth(){return this.nylasAuth}async getNylasConnector(){return this.nylasConnector}async getMailboxStore(){var e;return(e=this.baseProvider)==null?void 0:e.getStore("mailbox")}async getAuthStore(){var e;return(e=this.baseProvider)==null?void 0:e.getStore("auth")}async getNylasSchedulerStore(){var e;return(e=this.baseProvider)==null?void 0:e.getStore("scheduler")}async getNylasSchedulerConfigStore(){var e;return(e=this.baseProvider)==null?void 0:e.getStore("schedulerConfig")}render(){return r.h(r.Host,{key:"cf7646d512fe6614ad4a73ac63c3581f20af1ab2"},r.h("slot",{key:"bf17dda1b22695e9862a549866fcd140b5d2e0db"}))}get host(){return r.getElement(this)}};b.style=v;exports.nylas_provider=b;