@nylas/react 1.0.2-canary.2 → 1.1.0-canary.10
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/dist/add-circle-icon_21.entry-125b87a0.js +1719 -0
- package/dist/add-circle-icon_21.entry-1a699a29.cjs +1 -0
- package/dist/{archive-icon_7.entry-0e34d6e7.js → archive-icon_7.entry-70efea56.js} +13 -13
- package/dist/{archive-icon_7.entry-052ac074.cjs → archive-icon_7.entry-a69d3d98.cjs} +1 -1
- package/dist/{arrow-icon.entry-93f21385.cjs → arrow-icon.entry-0a07d7cc.cjs} +1 -1
- package/dist/{arrow-icon.entry-2afd9ea9.js → arrow-icon.entry-c9230436.js} +1 -1
- package/dist/{bold-icon_3.entry-88ce1d25.js → bold-icon_3.entry-54ff7799.js} +7 -7
- package/dist/bold-icon_3.entry-f7df4331.cjs +1 -0
- package/dist/{calendar-cancel-icon.entry-574c8aa4.cjs → calendar-cancel-icon.entry-71cc68e2.cjs} +1 -1
- package/dist/{calendar-cancel-icon.entry-e9c692fa.js → calendar-cancel-icon.entry-e5157332.js} +1 -1
- package/dist/{calendar-check-icon_2.entry-b0476bca.cjs → calendar-check-icon_2.entry-f02bf0fe.cjs} +1 -1
- package/dist/{calendar-check-icon_2.entry-d461c713.js → calendar-check-icon_2.entry-f75ef95e.js} +1 -1
- package/dist/{calendar-icon.entry-1ca202a4.js → calendar-icon.entry-67aa69f5.js} +1 -1
- package/dist/{calendar-icon.entry-98936e6d.cjs → calendar-icon.entry-a164e957.cjs} +1 -1
- package/dist/chevron-icon_3.entry-7687ca7a.cjs +1 -0
- package/dist/chevron-icon_3.entry-81c68946.js +117 -0
- package/dist/{close-icon.entry-8d6e9816.cjs → close-icon.entry-147b4d47.cjs} +1 -1
- package/dist/{close-icon.entry-37e8361f.js → close-icon.entry-3325a08e.js} +1 -1
- package/dist/{constants-b6bf6671-49a0f1f2.js → constants-f34b9c6e-21ac1910.js} +11 -2
- package/dist/{constants-b6bf6671-27e2557d.cjs → constants-f34b9c6e-99030371.cjs} +2 -2
- package/dist/{document-refresh-icon.entry-faea08ce.js → document-refresh-icon.entry-1b076630.js} +1 -1
- package/dist/{document-refresh-icon.entry-fcb33921.cjs → document-refresh-icon.entry-dea23e07.cjs} +1 -1
- package/dist/elements/index.d.ts +8 -0
- package/dist/{elements-dc5b338e-81a0319c.cjs → elements-dc5b338e-83c23e9b.cjs} +1 -1
- package/dist/{elements-dc5b338e-fb5dbfb5.js → elements-dc5b338e-c69d1f8a.js} +1 -1
- package/dist/focus-visible-e8093c16-3082af2c.cjs +1 -0
- package/dist/{focus-visible-e8093c16-28fc08a0.js → focus-visible-e8093c16-a6aff071.js} +5 -3
- package/dist/{forward-icon_6.entry-8da1f65d.js → forward-icon_6.entry-55fce1ca.js} +9 -11
- package/dist/forward-icon_6.entry-59c7a975.cjs +3 -0
- package/dist/{globe-icon.entry-4720304b.js → globe-icon.entry-25145785.js} +1 -1
- package/dist/{globe-icon.entry-90a0b9c9.cjs → globe-icon.entry-904f180f.cjs} +1 -1
- package/dist/google-logo-icon_4.entry-1f7b9522.js +387 -0
- package/dist/google-logo-icon_4.entry-feb7a561.cjs +1 -0
- package/dist/index-5f0940e0.cjs +37 -0
- package/dist/index-fd39ea9d.js +4042 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.es-be19d2df-9ba9a7a6.cjs +7 -0
- package/dist/{index-10914bc1-346f04fa.js → index.es-be19d2df-ff4f0a10.js} +945 -1041
- package/dist/{info-icon_2.entry-9307db18.js → info-icon_2.entry-0e2105da.js} +3 -3
- package/dist/{info-icon_2.entry-81e95048.cjs → info-icon_2.entry-808e6516.cjs} +1 -1
- package/dist/loading-icon.entry-17efa7ca.cjs +1 -0
- package/dist/loading-icon.entry-a3b845bf.js +15 -0
- package/dist/{mailbox-store-e721b17c-cf9a43dd.js → mailbox-store-76540d24-5f0d1dff.js} +121 -59
- package/dist/mailbox-store-76540d24-ad0e366a.cjs +1 -0
- package/dist/{nylas-additional-participants.entry-1653dec7.js → nylas-additional-participants.entry-4120ea2e.js} +13 -15
- package/dist/nylas-additional-participants.entry-7e2446cb.cjs +1 -0
- package/dist/nylas-booked-event-card_10.entry-44812e35.cjs +1 -0
- package/dist/{nylas-booked-event-card_10.entry-aa971e8a.js → nylas-booked-event-card_10.entry-5e87b199.js} +294 -273
- package/dist/nylas-custom-booking-flow.entry-cbff44c8.js +106 -0
- package/dist/nylas-custom-booking-flow.entry-da5e66bb.cjs +1 -0
- package/dist/{nylas-form-card.entry-c4e78f88.js → nylas-form-card.entry-1c608edd.js} +13 -15
- package/dist/nylas-form-card.entry-2e629e36.cjs +1 -0
- package/dist/nylas-if-state.entry-2c0d8724.js +94 -0
- package/dist/nylas-if-state.entry-61771f3d.cjs +1 -0
- package/dist/{nylas-list-folders.entry-995fa819.js → nylas-list-folders.entry-d6e085b0.js} +6 -8
- package/dist/nylas-list-folders.entry-fa8e8ce9.cjs +1 -0
- package/dist/{nylas-list-threads.entry-21466eb3.js → nylas-list-threads.entry-4dd2de0a.js} +5 -7
- package/dist/nylas-list-threads.entry-99fc0baa.cjs +1 -0
- package/dist/nylas-login.entry-0ec0813c.cjs +1 -0
- package/dist/nylas-login.entry-6730e226.js +73 -0
- package/dist/{nylas-mailbox-pagination.entry-02d40186.js → nylas-mailbox-pagination.entry-5310880c.js} +7 -9
- package/dist/nylas-mailbox-pagination.entry-e3e52f42.cjs +1 -0
- package/dist/{nylas-mailbox-toolbar-button.entry-dbad44b4.js → nylas-mailbox-toolbar-button.entry-028075db.js} +15 -17
- package/dist/nylas-mailbox-toolbar-button.entry-4c377337.cjs +1 -0
- package/dist/nylas-mailbox.entry-87304850.cjs +1 -0
- package/dist/nylas-mailbox.entry-ab92780c.js +134 -0
- package/dist/nylas-provider.entry-3fb60fe4.cjs +1 -0
- package/dist/{nylas-provider.entry-bbee8c99.js → nylas-provider.entry-678a9fe7.js} +48 -58
- package/dist/nylas-scheduler-editor.entry-a0de0ae6.js +2269 -0
- package/dist/nylas-scheduler-editor.entry-cf19391e.cjs +7 -0
- package/dist/nylas-scheduling.entry-d8bb2648.cjs +1 -0
- package/dist/nylas-scheduling.entry-e38c3870.js +248 -0
- package/dist/nylas-threads-refresh.entry-79c8a061.cjs +1 -0
- package/dist/{nylas-threads-refresh.entry-414d8740.js → nylas-threads-refresh.entry-fcb2175f.js} +2 -4
- package/dist/{nylas-threads-search.entry-a19dc90f.js → nylas-threads-search.entry-7565bdf8.js} +13 -15
- package/dist/nylas-threads-search.entry-f2d5d0fb.cjs +1 -0
- package/dist/{nylas-view-thread.entry-38149162.js → nylas-view-thread.entry-1772e0c4.js} +10 -12
- package/dist/nylas-view-thread.entry-6a2ccece.cjs +1 -0
- package/dist/{people-icon.entry-4b682757.cjs → people-icon.entry-3218a267.cjs} +1 -1
- package/dist/{people-icon.entry-5c244c8d.js → people-icon.entry-bc2c70cf.js} +5 -5
- package/dist/play-icon_2.entry-450a7fa6.cjs +1 -0
- package/dist/play-icon_2.entry-b4dc4e6d.js +25 -0
- package/dist/react.cjs +1 -1
- package/dist/react.js +88 -78
- package/dist/{refresh-icon.entry-59fff3d4.cjs → refresh-icon.entry-030dda82.cjs} +1 -1
- package/dist/{refresh-icon.entry-63456c9a.js → refresh-icon.entry-d30c7264.js} +5 -5
- package/dist/register-component-83e24412-0b25de7f.cjs +1 -0
- package/dist/{register-component-d056a880-f3003d6c.js → register-component-83e24412-35c484c4.js} +37 -33
- package/dist/scheduler-config-store-ec3b6190-6d8cef0f.cjs +1 -0
- package/dist/scheduler-config-store-ec3b6190-d5edbae5.js +23 -0
- package/dist/scheduler-store-8ca9003d-38cca5ba.js +321 -0
- package/dist/scheduler-store-8ca9003d-c2aa3522.cjs +1 -0
- package/dist/time-period-selector.entry-b366ba86.js +76 -0
- package/dist/time-period-selector.entry-b3d04e93.cjs +1 -0
- package/dist/{translate-icon.entry-1784c18e.cjs → translate-icon.entry-03ab2513.cjs} +1 -1
- package/dist/{translate-icon.entry-35999e70.js → translate-icon.entry-b3c21ae9.js} +5 -5
- package/dist/warning-icon.entry-602d459b.js +15 -0
- package/dist/{warning-icon.entry-3a702d1d.cjs → warning-icon.entry-65ecfdf0.cjs} +1 -1
- package/package.json +3 -3
- package/dist/_commonjsHelpers-57e89916-4a3ae7d8.cjs +0 -1
- package/dist/_commonjsHelpers-57e89916-af061c86.js +0 -19
- package/dist/add-circle-icon_18.entry-b66b6343.cjs +0 -1
- package/dist/add-circle-icon_18.entry-f86ae88d.js +0 -1527
- package/dist/auth-store-69ac49c7-5a0bbb90.cjs +0 -1
- package/dist/auth-store-69ac49c7-cbfda055.js +0 -66
- package/dist/bold-icon_3.entry-8f55a9e7.cjs +0 -1
- package/dist/chevron-icon_3.entry-830f52c2.js +0 -105
- package/dist/chevron-icon_3.entry-f7801467.cjs +0 -1
- package/dist/focus-visible-e8093c16-f380b705.cjs +0 -1
- package/dist/forward-icon_6.entry-c4b37cb1.cjs +0 -3
- package/dist/index-10914bc1-c8c3a2f3.cjs +0 -7
- package/dist/index-457dcf0b.cjs +0 -30
- package/dist/index-ce40ad47.js +0 -1570
- package/dist/loading-icon.entry-06d37ef0.cjs +0 -1
- package/dist/loading-icon.entry-dc518df4.js +0 -15
- package/dist/mailbox-store-e721b17c-4e97e07d.cjs +0 -1
- package/dist/nylas-additional-participants.entry-ff8bf378.cjs +0 -1
- package/dist/nylas-booked-event-card_10.entry-06bc3c51.cjs +0 -1
- package/dist/nylas-editor-tabs.entry-49b5a3ab.cjs +0 -1
- package/dist/nylas-editor-tabs.entry-9d0959bf.js +0 -181
- package/dist/nylas-form-card.entry-69d2095b.cjs +0 -1
- package/dist/nylas-if-state_3.entry-2eb3f385.js +0 -293
- package/dist/nylas-if-state_3.entry-5baf6d6f.cjs +0 -1
- package/dist/nylas-list-folders.entry-3b24d92d.cjs +0 -1
- package/dist/nylas-list-threads.entry-fda42ded.cjs +0 -1
- package/dist/nylas-mailbox-pagination.entry-9dcd4901.cjs +0 -1
- package/dist/nylas-mailbox-toolbar-button.entry-d1099fab.cjs +0 -1
- package/dist/nylas-provider.entry-78e2fa30.cjs +0 -1
- package/dist/nylas-scheduler-editor.entry-550d3c59.cjs +0 -1
- package/dist/nylas-scheduler-editor.entry-8f7ecf3b.js +0 -111
- package/dist/nylas-scheduling.entry-22b5ad07.js +0 -236
- package/dist/nylas-scheduling.entry-30a63738.cjs +0 -1
- package/dist/nylas-threads-refresh.entry-05258b36.cjs +0 -1
- package/dist/nylas-threads-search.entry-ff21fc65.cjs +0 -1
- package/dist/nylas-view-thread.entry-5da81e99.cjs +0 -1
- package/dist/play-icon_2.entry-ccdc6b9c.cjs +0 -1
- package/dist/play-icon_2.entry-f36d6d55.js +0 -25
- package/dist/register-component-d056a880-2be11c56.cjs +0 -1
- package/dist/scheduler-config-store-4d035001-0256b40c.cjs +0 -1
- package/dist/scheduler-config-store-4d035001-db9dc78a.js +0 -33
- package/dist/scheduler-store-0fbe642c-14466305.js +0 -293
- package/dist/scheduler-store-0fbe642c-410fdbf4.cjs +0 -1
- package/dist/utils-0cd66d04-89ab163d.js +0 -2111
- package/dist/utils-0cd66d04-94b9c3b6.cjs +0 -8
- package/dist/warning-icon.entry-73de08c3.js +0 -15
|
@@ -1,25 +1,23 @@
|
|
|
1
|
-
import { r as
|
|
2
|
-
import { R as
|
|
3
|
-
import { d as c } from "./utils-0cd66d04-89ab163d.js";
|
|
1
|
+
import { r as f, d as c, h as l, H as y, g as u } from "./index-fd39ea9d.js";
|
|
2
|
+
import { R as m } from "./register-component-83e24412-35c484c4.js";
|
|
4
3
|
import "react";
|
|
5
4
|
import "react-dom";
|
|
6
|
-
|
|
7
|
-
const p = ":host{display:block}sp-button{border-radius:var(--nylas-border-radius);background-color:var(--nylas-color-primary-400);color:var(--nylas-color-primary-900);fill:var(--nylas-color-primary-900)}sp-button:hover{background-color:var(--nylas-color-primary-500)}sp-button:disabled{background-color:var(--nylas-color-primary-200);color:var(--nylas-color-primary-600);cursor:not-allowed}", h = p;
|
|
5
|
+
const h = ":host{display:block}sp-button{border-radius:var(--nylas-border-radius);background-color:var(--nylas-color-primary-400);color:var(--nylas-color-primary-900);fill:var(--nylas-color-primary-900)}sp-button:hover{background-color:var(--nylas-color-primary-500)}sp-button:disabled{background-color:var(--nylas-color-primary-200);color:var(--nylas-color-primary-600);cursor:not-allowed}", p = h;
|
|
8
6
|
var g = function(t, o, e, n) {
|
|
9
|
-
var r = arguments.length, a = r < 3 ? o : n === null ? n = Object.getOwnPropertyDescriptor(o, e) : n,
|
|
7
|
+
var r = arguments.length, a = r < 3 ? o : n === null ? n = Object.getOwnPropertyDescriptor(o, e) : n, s;
|
|
10
8
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
11
9
|
a = Reflect.decorate(t, o, e, n);
|
|
12
10
|
else
|
|
13
|
-
for (var
|
|
14
|
-
(
|
|
11
|
+
for (var i = t.length - 1; i >= 0; i--)
|
|
12
|
+
(s = t[i]) && (a = (r < 3 ? s(a) : r > 3 ? s(o, e, a) : s(o, e)) || a);
|
|
15
13
|
return r > 3 && a && Object.defineProperty(o, e, a), a;
|
|
16
14
|
}, d = function(t, o) {
|
|
17
15
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
18
16
|
return Reflect.metadata(t, o);
|
|
19
17
|
};
|
|
20
|
-
const
|
|
18
|
+
const b = class {
|
|
21
19
|
constructor(t) {
|
|
22
|
-
|
|
20
|
+
f(this, t), this.onClick = async () => {
|
|
23
21
|
const o = this.method;
|
|
24
22
|
if (c("[nylas-mailbox-toolbar-button] onClick", { method: o, mailboxConnector: this.mailboxConnector }), this.mailboxConnector && o) {
|
|
25
23
|
const e = this.callMethod(this.mailboxConnector, o);
|
|
@@ -40,8 +38,8 @@ const f = class {
|
|
|
40
38
|
callMethod(t, o) {
|
|
41
39
|
const e = o.split(".");
|
|
42
40
|
let n = t;
|
|
43
|
-
for (const
|
|
44
|
-
if (n = n[
|
|
41
|
+
for (const s of e.slice(0, -1))
|
|
42
|
+
if (n = n[s], !n)
|
|
45
43
|
return;
|
|
46
44
|
const r = e[e.length - 1], a = n[r];
|
|
47
45
|
if (typeof a == "function")
|
|
@@ -65,11 +63,11 @@ const f = class {
|
|
|
65
63
|
return l(y, { key: "2454ef2e4270d1642cabe57dacf53908fcdb34e6" }, l("sp-theme", { key: "97d71094fabc3466b87142dfdd1d0bb22659fd32", scale: "medium", color: "dark" }, l("sp-button", { onClick: this.onClick, disabled: t, key: e, "icon-only": this.iconOnly, label: this.renderByState(t) }, this.hasSlot("icon") && l("div", { slot: "icon", class: "slot" }, l("slot", { name: "icon" })), !this.iconOnly && this.renderByState(t))));
|
|
66
64
|
}
|
|
67
65
|
get host() {
|
|
68
|
-
return
|
|
66
|
+
return u(this);
|
|
69
67
|
}
|
|
70
68
|
};
|
|
71
69
|
g([
|
|
72
|
-
|
|
70
|
+
m({
|
|
73
71
|
name: "nylas-mailbox-toolbar-button",
|
|
74
72
|
connectorToProp: "mailboxConnector",
|
|
75
73
|
fireRegisterEvent: !0
|
|
@@ -77,8 +75,8 @@ g([
|
|
|
77
75
|
d("design:type", Function),
|
|
78
76
|
d("design:paramtypes", []),
|
|
79
77
|
d("design:returntype", void 0)
|
|
80
|
-
],
|
|
81
|
-
|
|
78
|
+
], b.prototype, "render", null);
|
|
79
|
+
b.style = p;
|
|
82
80
|
export {
|
|
83
|
-
|
|
81
|
+
b as nylas_mailbox_toolbar_button
|
|
84
82
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-5f0940e0.cjs"),u=require("./register-component-83e24412-0b25de7f.cjs");require("react");require("react-dom");const b=":host{display:block}sp-button{border-radius:var(--nylas-border-radius);background-color:var(--nylas-color-primary-400);color:var(--nylas-color-primary-900);fill:var(--nylas-color-primary-900)}sp-button:hover{background-color:var(--nylas-color-primary-500)}sp-button:disabled{background-color:var(--nylas-color-primary-200);color:var(--nylas-color-primary-600);cursor:not-allowed}",y=b;var f=function(t,o,e,n){var l=arguments.length,a=l<3?o:n===null?n=Object.getOwnPropertyDescriptor(o,e):n,i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,o,e,n);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(l<3?i(a):l>3?i(o,e,a):i(o,e))||a);return l>3&&a&&Object.defineProperty(o,e,a),a},c=function(t,o){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,o)};const d=class{constructor(t){r.registerInstance(this,t),this.onClick=async()=>{const o=this.method;if(r.debug("[nylas-mailbox-toolbar-button] onClick",{method:o,mailboxConnector:this.mailboxConnector}),this.mailboxConnector&&o){const e=this.callMethod(this.mailboxConnector,o);e&&await e()}},this.method=void 0,this.dataState=void 0,this.iconOnly=!1,this.mailboxConnector=void 0}connectedCallback(){}disconnectedCallback(){}async componentWillLoad(){r.debug("[nylas-if-state] Component will load")}async componentDidLoad(){r.debug("[nylas-if-state] Component did load")}callMethod(t,o){const e=o.split(".");let n=t;for(const i of e.slice(0,-1))if(n=n[i],!n)return;const l=e[e.length-1],a=n[l];if(typeof a=="function")return a.bind(n)}renderByState(t){return t?r.h("slot",{name:"loading"},"Loading..."):r.h("slot",null,"Click")}hasSlot(t){return!!this.host.querySelector(`[slot="${t}"]`)}render(){var n;let t=!1;const o=(n=this.mailboxConnector)==null?void 0:n.nylasMailboxStore;if(typeof o<"u"){const l=String(this.dataState);t=this.dataState?o.get(l)==="loading":!1}const e=t?"state-loading":"state-ready";return r.h(r.Host,{key:"2454ef2e4270d1642cabe57dacf53908fcdb34e6"},r.h("sp-theme",{key:"97d71094fabc3466b87142dfdd1d0bb22659fd32",scale:"medium",color:"dark"},r.h("sp-button",{onClick:this.onClick,disabled:t,key:e,"icon-only":this.iconOnly,label:this.renderByState(t)},this.hasSlot("icon")&&r.h("div",{slot:"icon",class:"slot"},r.h("slot",{name:"icon"})),!this.iconOnly&&this.renderByState(t))))}get host(){return r.getElement(this)}};f([u.RegisterComponent({name:"nylas-mailbox-toolbar-button",connectorToProp:"mailboxConnector",fireRegisterEvent:!0}),c("design:type",Function),c("design:paramtypes",[]),c("design:returntype",void 0)],d.prototype,"render",null);d.style=y;exports.nylas_mailbox_toolbar_button=d;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-5f0940e0.cjs"),m=require("./index.es-be19d2df-9ba9a7a6.cjs"),n=require("./mailbox-store-76540d24-ad0e366a.cjs");require("react");require("react-dom");class v{constructor(e,o,r,l){this.router=e,this.nylasAuth=o,this.nylasAuthStore=r,this.nylasMailboxStore=l}init(){s.debug("NylasMailboxConnector init")}get mailboxStore(){return this.nylasMailboxStore}get authStore(){return this.nylasAuthStore}get auth(){return this._authConnector?this._authConnector:(this._authConnector=new n.NylasAuthConnector(this.nylasAuth,this.nylasAuthStore),this._authConnector)}get threads(){return this._threadConnector?this._threadConnector:(this._threadConnector=new n.NylasThreadsConnector(this.nylasAuth,this.nylasAuthStore,this.nylasMailboxStore,this.router),this._threadConnector)}get messages(){return this._messageConnector?this._messageConnector:(this._messageConnector=new n.NylasMessagesConnector(this.nylasAuth,this.nylasAuthStore,this.nylasMailboxStore),this._messageConnector)}get folders(){return this._foldersConnector?this._foldersConnector:(this._foldersConnector=new n.NylasFoldersConnector(this.nylasAuth,this.nylasAuthStore,this.nylasMailboxStore),this._foldersConnector)}getAuth(){return this.nylasAuth}resetStores(){this.nylasMailboxStore.reset(),this.nylasAuthStore.reset()}async logout(){await this.nylasAuth.logout(),this.resetStores()}}const _=":host{display:contents}",p=_,x=class{constructor(t){s.registerInstance(this,t),this.init=s.createEvent(this,"init",7),this.loggedIn=s.createEvent(this,"loggedIn",7),this.loggedOut=s.createEvent(this,"loggedOut",7),this.handleAuthChange=async e=>{var o;e?this.loggedIn.emit(this.host):this.loggedOut.emit(this.host).defaultPrevented||await((o=this.nylasMailboxConnector)==null?void 0:o.logout())},this.automaticComponentRegistration=!0,this.eventOverrides={},this.authConfig=void 0,this.defaultAuthStoreState=void 0,this.defaultMailboxStoreState=void 0}connectedCallback(){s.debug("[nylas-mailbox] connectedCallback")}async componentWillLoad(){var r,l,u,c,y,g,b;this.stores={auth:n.CreateNylasAuthStore(this.defaultAuthStoreState),mailbox:n.CreateNylasMailboxStore(this.defaultMailboxStoreState)},this.baseProvider=new m.NylasBaseProvider(this.host,this.stores,this.automaticComponentRegistration,this.eventOverrides),this.router=new n.HashRouter,this.nylasAuth=m.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=(r=this.baseProvider)==null?void 0:r.getStore("auth");if(!t)throw new Error("Auth store is not defined");const e=(l=this.baseProvider)==null?void 0:l.getStore("mailbox");if(!e)throw new Error("Mailbox store is not defined");this.nylasMailboxConnector=new v(this.router,this.nylasAuth,t,e),this.init.emit(this.host).defaultPrevented||await((u=this.nylasMailboxConnector)==null?void 0:u.auth.validateSession()),(c=this.router)==null||c.addRouteChangeListener("/thread/:threadId",async(A,M,C)=>{var a,h;const d=C.threadId,i=await((a=this.nylasMailboxConnector)==null?void 0:a.threads.getThread(d));i&&((h=this.nylasMailboxConnector)==null||h.mailboxStore.set("selectedThread",i))}),(y=this.router)==null||y.addRouteChangeListener("/",async(A,M,C)=>{var i,a,h,S;if(!t.state.isAuthenticated)return;(i=this.nylasMailboxConnector)==null||i.threads.unSelectThread(),(a=this.nylasMailboxConnector)==null||a.folders.getFolders();const d=window.location.hash.split("?")[1];if(d){const f=new URLSearchParams(d).get("query");f&&await((h=this.nylasMailboxConnector)==null?void 0:h.threads.getThreads({search_query_native:f,page_token:void 0}))}else(S=this.nylasMailboxConnector)==null||S.threads.getThreads()}),(g=this.router)==null||g.init(),this.handleAuthChange(t.state.isAuthenticated),(b=this.baseProvider)==null||b.componentWillLoad(this.nylasMailboxConnector)}async componentDidLoad(){var e,o;const t=(e=this.baseProvider)==null?void 0:e.getStore("auth");if(!t)throw new Error("Auth store is not defined");t.onChange("isAuthenticated",this.handleAuthChange),(o=this.baseProvider)==null||o.componentDidLoad()}componentDisconnected(){var t;(t=this.baseProvider)==null||t.componentDisconnected()}async registerComponentHandler(t){var e;(e=this.baseProvider)==null||e.registerComponent(t.detail)}async unregisterComponentHandler(t){var e;(e=this.baseProvider)==null||e.unregisterComponent(t.detail)}async getMailboxStore(){var t;return(t=this.baseProvider)==null?void 0:t.getStore("mailbox")}async getAuthStore(){var t;return(t=this.baseProvider)==null?void 0:t.getStore("auth")}async getNylasAuth(){return this.nylasAuth}async getNylasMailboxConnector(){return this.nylasMailboxConnector}render(){return s.h(s.Host,{key:"662c4d3f763c5cf9db31c4d2ba26bcdf47ead164"},s.h("slot",{key:"5c2b75a569779dd2af6388648a4304721e82ba76"}))}get host(){return s.getElement(this)}};x.style=p;exports.nylas_mailbox=x;
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { r as p, c as l, d as S, h as f, H as M, g as _ } from "./index-fd39ea9d.js";
|
|
2
|
+
import { N as v, e as w } from "./index.es-be19d2df-ff4f0a10.js";
|
|
3
|
+
import { C as P, a as N, H as I, N as E, b as L, c as O, d as R } from "./mailbox-store-76540d24-5f0d1dff.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import "react-dom";
|
|
6
|
+
class T {
|
|
7
|
+
constructor(e, s, o, i) {
|
|
8
|
+
this.router = e, this.nylasAuth = s, this.nylasAuthStore = o, this.nylasMailboxStore = i;
|
|
9
|
+
}
|
|
10
|
+
init() {
|
|
11
|
+
S("NylasMailboxConnector init");
|
|
12
|
+
}
|
|
13
|
+
get mailboxStore() {
|
|
14
|
+
return this.nylasMailboxStore;
|
|
15
|
+
}
|
|
16
|
+
get authStore() {
|
|
17
|
+
return this.nylasAuthStore;
|
|
18
|
+
}
|
|
19
|
+
get auth() {
|
|
20
|
+
return this._authConnector ? this._authConnector : (this._authConnector = new E(this.nylasAuth, this.nylasAuthStore), this._authConnector);
|
|
21
|
+
}
|
|
22
|
+
get threads() {
|
|
23
|
+
return this._threadConnector ? this._threadConnector : (this._threadConnector = new L(this.nylasAuth, this.nylasAuthStore, this.nylasMailboxStore, this.router), this._threadConnector);
|
|
24
|
+
}
|
|
25
|
+
get messages() {
|
|
26
|
+
return this._messageConnector ? this._messageConnector : (this._messageConnector = new O(this.nylasAuth, this.nylasAuthStore, this.nylasMailboxStore), this._messageConnector);
|
|
27
|
+
}
|
|
28
|
+
get folders() {
|
|
29
|
+
return this._foldersConnector ? this._foldersConnector : (this._foldersConnector = new R(this.nylasAuth, this.nylasAuthStore, this.nylasMailboxStore), this._foldersConnector);
|
|
30
|
+
}
|
|
31
|
+
getAuth() {
|
|
32
|
+
return this.nylasAuth;
|
|
33
|
+
}
|
|
34
|
+
resetStores() {
|
|
35
|
+
this.nylasMailboxStore.reset(), this.nylasAuthStore.reset();
|
|
36
|
+
}
|
|
37
|
+
async logout() {
|
|
38
|
+
await this.nylasAuth.logout(), this.resetStores();
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
const H = ":host{display:contents}", k = H, D = class {
|
|
42
|
+
constructor(t) {
|
|
43
|
+
p(this, t), this.init = l(this, "init", 7), this.loggedIn = l(this, "loggedIn", 7), this.loggedOut = l(this, "loggedOut", 7), this.handleAuthChange = async (e) => {
|
|
44
|
+
var s;
|
|
45
|
+
e ? this.loggedIn.emit(this.host) : this.loggedOut.emit(this.host).defaultPrevented || await ((s = this.nylasMailboxConnector) == null ? void 0 : s.logout());
|
|
46
|
+
}, this.automaticComponentRegistration = !0, this.eventOverrides = {}, this.authConfig = void 0, this.defaultAuthStoreState = void 0, this.defaultMailboxStoreState = void 0;
|
|
47
|
+
}
|
|
48
|
+
connectedCallback() {
|
|
49
|
+
S("[nylas-mailbox] connectedCallback");
|
|
50
|
+
}
|
|
51
|
+
async componentWillLoad() {
|
|
52
|
+
var o, i, d, u, c, y, g;
|
|
53
|
+
this.stores = {
|
|
54
|
+
auth: P(this.defaultAuthStoreState),
|
|
55
|
+
mailbox: N(this.defaultMailboxStoreState)
|
|
56
|
+
}, this.baseProvider = new v(this.host, this.stores, this.automaticComponentRegistration, this.eventOverrides), this.router = new I(), this.nylasAuth = w({
|
|
57
|
+
apiUri: "https://api.us.nylas.com",
|
|
58
|
+
elementsApiUri: "https://elements.us.nylas.com",
|
|
59
|
+
storageType: "indexeddb",
|
|
60
|
+
clientId: "YOUR_CLIENT_ID",
|
|
61
|
+
defaultScopes: [],
|
|
62
|
+
redirectURI: "/",
|
|
63
|
+
...this.authConfig
|
|
64
|
+
});
|
|
65
|
+
const t = (o = this.baseProvider) == null ? void 0 : o.getStore("auth");
|
|
66
|
+
if (!t)
|
|
67
|
+
throw new Error("Auth store is not defined");
|
|
68
|
+
const e = (i = this.baseProvider) == null ? void 0 : i.getStore("mailbox");
|
|
69
|
+
if (!e)
|
|
70
|
+
throw new Error("Mailbox store is not defined");
|
|
71
|
+
this.nylasMailboxConnector = new T(this.router, this.nylasAuth, t, e), this.init.emit(this.host).defaultPrevented || await ((d = this.nylasMailboxConnector) == null ? void 0 : d.auth.validateSession()), (u = this.router) == null || u.addRouteChangeListener("/thread/:threadId", async (x, A, b) => {
|
|
72
|
+
var a, r;
|
|
73
|
+
const h = b.threadId, n = await ((a = this.nylasMailboxConnector) == null ? void 0 : a.threads.getThread(h));
|
|
74
|
+
n && ((r = this.nylasMailboxConnector) == null || r.mailboxStore.set("selectedThread", n));
|
|
75
|
+
}), (c = this.router) == null || c.addRouteChangeListener("/", async (x, A, b) => {
|
|
76
|
+
var n, a, r, C;
|
|
77
|
+
if (!t.state.isAuthenticated)
|
|
78
|
+
return;
|
|
79
|
+
(n = this.nylasMailboxConnector) == null || n.threads.unSelectThread(), (a = this.nylasMailboxConnector) == null || a.folders.getFolders();
|
|
80
|
+
const h = window.location.hash.split("?")[1];
|
|
81
|
+
if (h) {
|
|
82
|
+
const m = new URLSearchParams(h).get("query");
|
|
83
|
+
m && await ((r = this.nylasMailboxConnector) == null ? void 0 : r.threads.getThreads({
|
|
84
|
+
search_query_native: m,
|
|
85
|
+
page_token: void 0
|
|
86
|
+
}));
|
|
87
|
+
} else
|
|
88
|
+
(C = this.nylasMailboxConnector) == null || C.threads.getThreads();
|
|
89
|
+
}), (y = this.router) == null || y.init(), this.handleAuthChange(t.state.isAuthenticated), (g = this.baseProvider) == null || g.componentWillLoad(this.nylasMailboxConnector);
|
|
90
|
+
}
|
|
91
|
+
async componentDidLoad() {
|
|
92
|
+
var e, s;
|
|
93
|
+
const t = (e = this.baseProvider) == null ? void 0 : e.getStore("auth");
|
|
94
|
+
if (!t)
|
|
95
|
+
throw new Error("Auth store is not defined");
|
|
96
|
+
t.onChange("isAuthenticated", this.handleAuthChange), (s = this.baseProvider) == null || s.componentDidLoad();
|
|
97
|
+
}
|
|
98
|
+
componentDisconnected() {
|
|
99
|
+
var t;
|
|
100
|
+
(t = this.baseProvider) == null || t.componentDisconnected();
|
|
101
|
+
}
|
|
102
|
+
async registerComponentHandler(t) {
|
|
103
|
+
var e;
|
|
104
|
+
(e = this.baseProvider) == null || e.registerComponent(t.detail);
|
|
105
|
+
}
|
|
106
|
+
async unregisterComponentHandler(t) {
|
|
107
|
+
var e;
|
|
108
|
+
(e = this.baseProvider) == null || e.unregisterComponent(t.detail);
|
|
109
|
+
}
|
|
110
|
+
async getMailboxStore() {
|
|
111
|
+
var t;
|
|
112
|
+
return (t = this.baseProvider) == null ? void 0 : t.getStore("mailbox");
|
|
113
|
+
}
|
|
114
|
+
async getAuthStore() {
|
|
115
|
+
var t;
|
|
116
|
+
return (t = this.baseProvider) == null ? void 0 : t.getStore("auth");
|
|
117
|
+
}
|
|
118
|
+
async getNylasAuth() {
|
|
119
|
+
return this.nylasAuth;
|
|
120
|
+
}
|
|
121
|
+
async getNylasMailboxConnector() {
|
|
122
|
+
return this.nylasMailboxConnector;
|
|
123
|
+
}
|
|
124
|
+
render() {
|
|
125
|
+
return f(M, { key: "662c4d3f763c5cf9db31c4d2ba26bcdf47ead164" }, f("slot", { key: "5c2b75a569779dd2af6388648a4304721e82ba76" }));
|
|
126
|
+
}
|
|
127
|
+
get host() {
|
|
128
|
+
return _(this);
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
D.style = k;
|
|
132
|
+
export {
|
|
133
|
+
D as nylas_mailbox
|
|
134
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-5f0940e0.cjs"),g=require("./index.es-be19d2df-9ba9a7a6.cjs"),o=require("./mailbox-store-76540d24-ad0e366a.cjs"),S=require("./scheduler-store-8ca9003d-c2aa3522.cjs"),b=require("./scheduler-config-store-ec3b6190-6d8cef0f.cjs");require("react");require("react-dom");class f{constructor(t,r,n,i,l,h,a="https://api.us.nylas.com"){this.router=t,this.schedulerAPIURL=a,this.nylasAuth=r,this.nylasAuthStore=n,this.nylasMailboxStore=i,this.nylasSchedulerStore=l,this.nylasSchedulerConfigStore=h}init(){s.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 S.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 m=":host{display:contents}",A=m,C=class{constructor(e){s.registerInstance(this,e),this.init=s.createEvent(this,"init",7),this.loggedIn=s.createEvent(this,"loggedIn",7),this.loggedOut=s.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(){s.debug("[nylas-provider] connectedCallback")}async componentWillLoad(){var h,a,c,u,d,y;s.debug("[nylas-provider] componentWillLoad"),this.stores={auth:o.CreateNylasAuthStore(),mailbox:o.CreateNylasMailboxStore(),scheduler:S.CreateNylasSchedulerStore(),schedulerConfig:b.CreateNylasSchedulerConfigStore()},this.baseProvider=new g.NylasBaseProvider(this.host,this.stores,this.automaticComponentRegistration,this.eventOverrides);const e=new o.HashRouter;this.nylasAuth=g.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 r=(a=this.baseProvider)==null?void 0:a.getStore("auth");if(!r)throw new Error("The auth store is not set");const n=(c=this.baseProvider)==null?void 0:c.getStore("scheduler");if(!n)throw new Error("The scheduler store is not set");const i=(u=this.baseProvider)==null?void 0:u.getStore("schedulerConfig");if(!i)throw new Error("The scheduler config store is not set");this.nylasConnector=new f(e,this.nylasAuth,r,t,n,i),this.init.emit(this.host).defaultPrevented||await((d=this.nylasConnector)==null?void 0:d.auth.validateSession()),this.handleAuthChange(r.state.isAuthenticated),(y=this.baseProvider)==null||y.componentWillLoad(this.nylasConnector)}componentDidLoad(){var t,r;const e=(t=this.baseProvider)==null?void 0:t.getStore("auth");e==null||e.onChange("isAuthenticated",this.handleAuthChange),(r=this.baseProvider)==null||r.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 s.h(s.Host,{key:"782d47608825fb870d87153c8d43d778dc6c2b87"},s.h("slot",{key:"2b01537d9d4a0cf4c81ad0b77ce3e6d761f3e1db"}))}get host(){return s.getElement(this)}};C.style=A;exports.nylas_provider=C;
|
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
import { r as C, c as h, h as g, H as S, g as
|
|
2
|
-
import { N as
|
|
3
|
-
import {
|
|
4
|
-
import { C as
|
|
5
|
-
import { C as
|
|
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 h, d as a, h as g, H as S, g as m } from "./index-fd39ea9d.js";
|
|
2
|
+
import { N as b, e as f } from "./index.es-be19d2df-ff4f0a10.js";
|
|
3
|
+
import { C as A, a as p, H as v, N as P, b as _, c as N, d as w } from "./mailbox-store-76540d24-5f0d1dff.js";
|
|
4
|
+
import { C as x, N as I } from "./scheduler-store-8ca9003d-38cca5ba.js";
|
|
5
|
+
import { C as M } from "./scheduler-config-store-ec3b6190-d5edbae5.js";
|
|
8
6
|
import "react";
|
|
9
7
|
import "react-dom";
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
this.router = t, this.schedulerAPIURL = i, this.nylasAuth = s, this.nylasAuthStore = r, this.nylasMailboxStore = o, this.nylasSchedulerStore = l, this.nylasSchedulerConfigStore = n;
|
|
8
|
+
class E {
|
|
9
|
+
constructor(e, s, r, o, l, n, i = "https://api.us.nylas.com") {
|
|
10
|
+
this.router = e, this.schedulerAPIURL = i, this.nylasAuth = s, this.nylasAuthStore = r, this.nylasMailboxStore = o, this.nylasSchedulerStore = l, this.nylasSchedulerConfigStore = n;
|
|
14
11
|
}
|
|
15
12
|
init() {
|
|
16
13
|
a("NylasConnector init");
|
|
@@ -28,7 +25,7 @@ class L {
|
|
|
28
25
|
return this.nylasSchedulerConfigStore;
|
|
29
26
|
}
|
|
30
27
|
get auth() {
|
|
31
|
-
return this._authConnector ? this._authConnector : (this._authConnector = new
|
|
28
|
+
return this._authConnector ? this._authConnector : (this._authConnector = new P(this.nylasAuth, this.nylasAuthStore), this._authConnector);
|
|
32
29
|
}
|
|
33
30
|
get threads() {
|
|
34
31
|
return this._threadConnector ? this._threadConnector : (this._threadConnector = new _(this.nylasAuth, this.nylasAuthStore, this.nylasMailboxStore, this.router), this._threadConnector);
|
|
@@ -40,18 +37,11 @@ class L {
|
|
|
40
37
|
return this._foldersConnector ? this._foldersConnector : (this._foldersConnector = new w(this.nylasAuth, this.nylasAuthStore, this.nylasMailboxStore), this._foldersConnector);
|
|
41
38
|
}
|
|
42
39
|
get scheduler() {
|
|
43
|
-
return this._schedulerAPIConnector ? this._schedulerAPIConnector : (this._schedulerAPIConnector = new
|
|
40
|
+
return this._schedulerAPIConnector ? this._schedulerAPIConnector : (this._schedulerAPIConnector = new I({
|
|
44
41
|
schedulerAPIURL: this.schedulerAPIURL,
|
|
45
42
|
schedulerStore: this.schedulerStore
|
|
46
43
|
}), this._schedulerAPIConnector);
|
|
47
44
|
}
|
|
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
45
|
getAuth() {
|
|
56
46
|
return this.nylasAuth;
|
|
57
47
|
}
|
|
@@ -62,25 +52,25 @@ class L {
|
|
|
62
52
|
await this.nylasAuth.logout(), this.resetStores();
|
|
63
53
|
}
|
|
64
54
|
}
|
|
65
|
-
const
|
|
66
|
-
constructor(
|
|
67
|
-
C(this,
|
|
68
|
-
|
|
55
|
+
const L = ":host{display:contents}", R = L, T = class {
|
|
56
|
+
constructor(t) {
|
|
57
|
+
C(this, t), this.init = h(this, "init", 7), this.loggedIn = h(this, "loggedIn", 7), this.loggedOut = h(this, "loggedOut", 7), this.handleAuthChange = async (e) => {
|
|
58
|
+
e ? this.loggedIn.emit(this.host) : this.loggedOut.emit(this.host);
|
|
69
59
|
}, this.authConfig = void 0, this.eventOverrides = {}, this.automaticComponentRegistration = !0;
|
|
70
60
|
}
|
|
71
61
|
connectedCallback() {
|
|
72
62
|
a("[nylas-provider] connectedCallback");
|
|
73
63
|
}
|
|
74
64
|
async componentWillLoad() {
|
|
75
|
-
var n, i, c,
|
|
65
|
+
var n, i, c, d, u, y;
|
|
76
66
|
a("[nylas-provider] componentWillLoad"), this.stores = {
|
|
77
|
-
auth:
|
|
78
|
-
mailbox:
|
|
79
|
-
scheduler:
|
|
67
|
+
auth: A(),
|
|
68
|
+
mailbox: p(),
|
|
69
|
+
scheduler: x(),
|
|
80
70
|
schedulerConfig: M()
|
|
81
|
-
}, this.baseProvider = new
|
|
82
|
-
const
|
|
83
|
-
this.nylasAuth =
|
|
71
|
+
}, this.baseProvider = new b(this.host, this.stores, this.automaticComponentRegistration, this.eventOverrides);
|
|
72
|
+
const t = new v();
|
|
73
|
+
this.nylasAuth = f({
|
|
84
74
|
apiUri: "https://api.us.nylas.com",
|
|
85
75
|
elementsApiUri: "https://elements.us.nylas.com",
|
|
86
76
|
storageType: "indexeddb",
|
|
@@ -89,8 +79,8 @@ const R = ":host{display:contents}", T = R, U = class {
|
|
|
89
79
|
redirectURI: "/",
|
|
90
80
|
...this.authConfig
|
|
91
81
|
});
|
|
92
|
-
const
|
|
93
|
-
if (!
|
|
82
|
+
const e = (n = this.baseProvider) == null ? void 0 : n.getStore("mailbox");
|
|
83
|
+
if (!e)
|
|
94
84
|
throw new Error("The mailbox store is not set");
|
|
95
85
|
const s = (i = this.baseProvider) == null ? void 0 : i.getStore("auth");
|
|
96
86
|
if (!s)
|
|
@@ -98,27 +88,27 @@ const R = ":host{display:contents}", T = R, U = class {
|
|
|
98
88
|
const r = (c = this.baseProvider) == null ? void 0 : c.getStore("scheduler");
|
|
99
89
|
if (!r)
|
|
100
90
|
throw new Error("The scheduler store is not set");
|
|
101
|
-
const o = (
|
|
91
|
+
const o = (d = this.baseProvider) == null ? void 0 : d.getStore("schedulerConfig");
|
|
102
92
|
if (!o)
|
|
103
93
|
throw new Error("The scheduler config store is not set");
|
|
104
|
-
this.nylasConnector = new
|
|
94
|
+
this.nylasConnector = new E(t, this.nylasAuth, s, e, r, o), this.init.emit(this.host).defaultPrevented || await ((u = this.nylasConnector) == null ? void 0 : u.auth.validateSession()), this.handleAuthChange(s.state.isAuthenticated), (y = this.baseProvider) == null || y.componentWillLoad(this.nylasConnector);
|
|
105
95
|
}
|
|
106
96
|
componentDidLoad() {
|
|
107
|
-
var
|
|
108
|
-
const
|
|
109
|
-
|
|
97
|
+
var e, s;
|
|
98
|
+
const t = (e = this.baseProvider) == null ? void 0 : e.getStore("auth");
|
|
99
|
+
t == null || t.onChange("isAuthenticated", this.handleAuthChange), (s = this.baseProvider) == null || s.componentDidLoad();
|
|
110
100
|
}
|
|
111
101
|
componentDisconnected() {
|
|
112
|
-
var e;
|
|
113
|
-
(e = this.baseProvider) == null || e.componentDisconnected();
|
|
114
|
-
}
|
|
115
|
-
async registerComponentHandler(e) {
|
|
116
102
|
var t;
|
|
117
|
-
(t = this.baseProvider) == null || t.
|
|
103
|
+
(t = this.baseProvider) == null || t.componentDisconnected();
|
|
118
104
|
}
|
|
119
|
-
async
|
|
120
|
-
var
|
|
121
|
-
(
|
|
105
|
+
async registerComponentHandler(t) {
|
|
106
|
+
var e;
|
|
107
|
+
(e = this.baseProvider) == null || e.registerComponent(t.detail);
|
|
108
|
+
}
|
|
109
|
+
async unregisterComponentHandler(t) {
|
|
110
|
+
var e;
|
|
111
|
+
(e = this.baseProvider) == null || e.unregisterComponent(t.detail);
|
|
122
112
|
}
|
|
123
113
|
async getNylasAuth() {
|
|
124
114
|
return this.nylasAuth;
|
|
@@ -127,29 +117,29 @@ const R = ":host{display:contents}", T = R, U = class {
|
|
|
127
117
|
return this.nylasConnector;
|
|
128
118
|
}
|
|
129
119
|
async getMailboxStore() {
|
|
130
|
-
var
|
|
131
|
-
return (
|
|
120
|
+
var t;
|
|
121
|
+
return (t = this.baseProvider) == null ? void 0 : t.getStore("mailbox");
|
|
132
122
|
}
|
|
133
123
|
async getAuthStore() {
|
|
134
|
-
var
|
|
135
|
-
return (
|
|
124
|
+
var t;
|
|
125
|
+
return (t = this.baseProvider) == null ? void 0 : t.getStore("auth");
|
|
136
126
|
}
|
|
137
127
|
async getNylasSchedulerStore() {
|
|
138
|
-
var
|
|
139
|
-
return (
|
|
128
|
+
var t;
|
|
129
|
+
return (t = this.baseProvider) == null ? void 0 : t.getStore("scheduler");
|
|
140
130
|
}
|
|
141
131
|
async getNylasSchedulerConfigStore() {
|
|
142
|
-
var
|
|
143
|
-
return (
|
|
132
|
+
var t;
|
|
133
|
+
return (t = this.baseProvider) == null ? void 0 : t.getStore("schedulerConfig");
|
|
144
134
|
}
|
|
145
135
|
render() {
|
|
146
|
-
return g(S, { key: "
|
|
136
|
+
return g(S, { key: "782d47608825fb870d87153c8d43d778dc6c2b87" }, g("slot", { key: "2b01537d9d4a0cf4c81ad0b77ce3e6d761f3e1db" }));
|
|
147
137
|
}
|
|
148
138
|
get host() {
|
|
149
|
-
return
|
|
139
|
+
return m(this);
|
|
150
140
|
}
|
|
151
141
|
};
|
|
152
|
-
|
|
142
|
+
T.style = R;
|
|
153
143
|
export {
|
|
154
|
-
|
|
144
|
+
T as nylas_provider
|
|
155
145
|
};
|