@nylas/react 1.0.2-prealpha1 → 1.1.0-canary.11
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-71e60262.js +1755 -0
- package/dist/add-circle-icon_21.entry-95dda099.cjs +1 -0
- package/dist/{archive-icon_7.entry-84d70dbf.cjs → archive-icon_7.entry-24f31e46.cjs} +1 -1
- package/dist/{archive-icon_7.entry-91aaa1aa.js → archive-icon_7.entry-3c5e3ccf.js} +19 -19
- package/dist/{arrow-icon.entry-400a08fa.cjs → arrow-icon.entry-562eb541.cjs} +1 -1
- package/dist/{arrow-icon.entry-8b2e96a6.js → arrow-icon.entry-813bffe9.js} +2 -2
- package/dist/{bold-icon_3.entry-4b2798a8.js → bold-icon_3.entry-c0e7d524.js} +4 -4
- package/dist/{bold-icon_3.entry-9ad35153.cjs → bold-icon_3.entry-e8b034fe.cjs} +1 -1
- package/dist/{calendar-cancel-icon.entry-83ba884a.js → calendar-cancel-icon.entry-0b0219cb.js} +5 -5
- package/dist/{calendar-cancel-icon.entry-fcb66929.cjs → calendar-cancel-icon.entry-7d4fdb1b.cjs} +1 -1
- package/dist/calendar-check-icon_2.entry-6ecd2faa.js +25 -0
- package/dist/calendar-check-icon_2.entry-88025f63.cjs +1 -0
- package/dist/{calendar-icon.entry-8f38af4a.js → calendar-icon.entry-34d8ef69.js} +5 -5
- package/dist/{calendar-icon.entry-7bae38d7.cjs → calendar-icon.entry-b753520f.cjs} +1 -1
- package/dist/chevron-icon_3.entry-0aeb4cfa.cjs +1 -0
- package/dist/chevron-icon_3.entry-ae55fd65.js +117 -0
- package/dist/close-icon.entry-ae66c827.js +15 -0
- package/dist/close-icon.entry-c80da833.cjs +1 -0
- package/dist/{nylas-booked-event-card_10.entry-ed515326.cjs → constants-f34b9c6e-b9f975af.cjs} +6 -6
- package/dist/{nylas-booked-event-card_10.entry-7e66a648.js → constants-f34b9c6e-d0f5cd19.js} +1665 -2374
- package/dist/document-refresh-icon.entry-36405467.cjs +1 -0
- package/dist/{document-refresh-icon.entry-9083a2e9.js → document-refresh-icon.entry-7d370f85.js} +5 -5
- package/dist/elements/index.d.ts +32 -2
- package/dist/{elements-dc5b338e-81a0319c.cjs → elements-dc5b338e-0dbb4f67.cjs} +1 -1
- package/dist/{elements-dc5b338e-fb5dbfb5.js → elements-dc5b338e-524cb111.js} +1 -1
- package/dist/{focus-visible-e8093c16-28fc08a0.js → focus-visible-e8093c16-17ab1557.js} +5 -3
- package/dist/focus-visible-e8093c16-7e94a4f3.cjs +1 -0
- package/dist/{forward-icon_6.entry-b60fcb35.js → forward-icon_6.entry-384cc3c5.js} +83 -85
- package/dist/forward-icon_6.entry-a479b39e.cjs +3 -0
- package/dist/{globe-icon.entry-8325e73e.cjs → globe-icon.entry-0c848856.cjs} +1 -1
- package/dist/{globe-icon.entry-e3fd373f.js → globe-icon.entry-58b9f3fc.js} +4 -4
- package/dist/google-logo-icon_4.entry-3dce1b83.js +388 -0
- package/dist/google-logo-icon_4.entry-e1e63fd0.cjs +1 -0
- package/dist/index-20ea5b0c.js +4042 -0
- package/dist/index-33f74306.cjs +37 -0
- package/dist/index.d.ts +3 -1
- package/dist/{index-b30d446a-a90f84b2.js → index.es-be19d2df-c2fdca63.js} +945 -1041
- package/dist/index.es-be19d2df-f732308a.cjs +7 -0
- package/dist/info-icon_2.entry-98965833.js +34 -0
- package/dist/info-icon_2.entry-dd0a0633.cjs +1 -0
- package/dist/{loading-icon.entry-b2096d2b.cjs → loading-icon.entry-46821f18.cjs} +1 -1
- package/dist/{loading-icon.entry-27410cf8.js → loading-icon.entry-abd81cea.js} +2 -2
- package/dist/mailbox-store-76540d24-7bf14e45.cjs +1 -0
- package/dist/{mailbox-store-19f0c6c9-e3e8b4e5.js → mailbox-store-76540d24-dfb53045.js} +2 -2
- package/dist/nylas-additional-participants.entry-d35d7af5.cjs +1 -0
- package/dist/nylas-additional-participants.entry-f6ed34d6.js +81 -0
- package/dist/nylas-booked-event-card_10.entry-534e587c.cjs +1 -0
- package/dist/nylas-booked-event-card_10.entry-8efe8335.js +805 -0
- package/dist/nylas-custom-booking-flow.entry-0e7b605d.js +106 -0
- package/dist/nylas-custom-booking-flow.entry-12d09496.cjs +1 -0
- package/dist/nylas-form-card.entry-7dd86dde.js +54 -0
- package/dist/nylas-form-card.entry-94579d1d.cjs +1 -0
- package/dist/nylas-if-state.entry-32ea90ea.cjs +1 -0
- package/dist/nylas-if-state.entry-92cbc0b9.js +94 -0
- package/dist/nylas-list-folders.entry-8595a9b7.cjs +1 -0
- package/dist/{nylas-list-folders.entry-a5437201.js → nylas-list-folders.entry-cab222c9.js} +10 -11
- package/dist/nylas-list-threads.entry-3fef6316.cjs +1 -0
- package/dist/{nylas-list-threads.entry-fd6cda61.js → nylas-list-threads.entry-8e9294a3.js} +5 -6
- package/dist/nylas-login.entry-bc885e04.cjs +1 -0
- package/dist/nylas-login.entry-bd1d5b6f.js +73 -0
- package/dist/{nylas-mailbox-pagination.entry-988214bc.js → nylas-mailbox-pagination.entry-58657a09.js} +7 -8
- package/dist/nylas-mailbox-pagination.entry-74d3b376.cjs +1 -0
- package/dist/nylas-mailbox-toolbar-button.entry-8b73b9f4.cjs +1 -0
- package/dist/{nylas-mailbox-toolbar-button.entry-c720e22a.js → nylas-mailbox-toolbar-button.entry-d7817b46.js} +15 -16
- package/dist/nylas-mailbox.entry-0bddc2fd.js +134 -0
- package/dist/nylas-mailbox.entry-762f5062.cjs +1 -0
- package/dist/{nylas-provider.entry-70721009.js → nylas-provider.entry-2e24192d.js} +40 -29
- package/dist/nylas-provider.entry-f8ba7a6e.cjs +1 -0
- package/dist/nylas-scheduler-editor.entry-8189b099.js +2269 -0
- package/dist/nylas-scheduler-editor.entry-a642f833.cjs +7 -0
- package/dist/nylas-scheduling.entry-13087b5f.cjs +1 -0
- package/dist/nylas-scheduling.entry-3f170361.js +248 -0
- package/dist/nylas-threads-refresh.entry-3b9f57c3.cjs +1 -0
- package/dist/{nylas-threads-refresh.entry-b7f9e93f.js → nylas-threads-refresh.entry-f2967405.js} +4 -5
- package/dist/nylas-threads-search.entry-3e0b4fdc.cjs +1 -0
- package/dist/{nylas-threads-search.entry-95afea9c.js → nylas-threads-search.entry-e70bbf70.js} +4 -5
- package/dist/{nylas-view-thread.entry-165173b1.js → nylas-view-thread.entry-4f39f045.js} +10 -11
- package/dist/nylas-view-thread.entry-b23080b7.cjs +1 -0
- package/dist/people-icon.entry-15cd7d77.cjs +1 -0
- package/dist/people-icon.entry-7f3b95e9.js +15 -0
- package/dist/play-icon_2.entry-13065065.js +25 -0
- package/dist/play-icon_2.entry-2172886a.cjs +1 -0
- package/dist/react.cjs +1 -1
- package/dist/react.js +94 -62
- package/dist/{refresh-icon.entry-601cac89.cjs → refresh-icon.entry-61067a7f.cjs} +1 -1
- package/dist/{refresh-icon.entry-e48a338f.js → refresh-icon.entry-fbfa185e.js} +5 -5
- package/dist/register-component-83e24412-445c6ad9.cjs +1 -0
- package/dist/{register-component-152c6ad2-a06f58c2.js → register-component-83e24412-b666e56b.js} +37 -33
- package/dist/scheduler-config-store-ec3b6190-8bde49c6.cjs +1 -0
- package/dist/scheduler-config-store-ec3b6190-fa81c492.js +23 -0
- package/dist/scheduler-store-8ca9003d-57b3f7a7.cjs +1 -0
- package/dist/scheduler-store-8ca9003d-8da2c12d.js +321 -0
- package/dist/time-period-selector.entry-5e083fd3.js +76 -0
- package/dist/time-period-selector.entry-febf55eb.cjs +1 -0
- package/dist/translate-icon.entry-10db7d36.js +15 -0
- package/dist/translate-icon.entry-8ce0a713.cjs +1 -0
- package/dist/warning-icon.entry-470e449d.js +15 -0
- package/dist/warning-icon.entry-b8217553.cjs +1 -0
- package/package.json +7 -4
- package/dist/_commonjsHelpers-57e89916-4a3ae7d8.cjs +0 -1
- package/dist/_commonjsHelpers-57e89916-af061c86.js +0 -19
- package/dist/add-circle-icon.entry-2ccb238b.cjs +0 -1
- package/dist/add-circle-icon.entry-35d6aa07.js +0 -15
- package/dist/calendar-check-icon_3.entry-903e2d82.js +0 -35
- package/dist/calendar-check-icon_3.entry-a16ce05e.cjs +0 -1
- package/dist/chevron-icon.entry-58366662.cjs +0 -1
- package/dist/chevron-icon.entry-5e11cef5.js +0 -15
- package/dist/close-icon_2.entry-011d9cf4.js +0 -25
- package/dist/close-icon_2.entry-83088b9a.cjs +0 -1
- package/dist/document-refresh-icon.entry-071ffd66.cjs +0 -1
- package/dist/duration-bddc4a13-05d3e3e2.cjs +0 -1
- package/dist/duration-bddc4a13-179ce826.js +0 -41
- package/dist/focus-visible-e8093c16-f380b705.cjs +0 -1
- package/dist/forward-icon_6.entry-3345af84.cjs +0 -3
- package/dist/index-3b6f5cd5.cjs +0 -30
- package/dist/index-630f4e87.js +0 -1498
- package/dist/index-b30d446a-cbbef925.cjs +0 -7
- package/dist/mailbox-store-19f0c6c9-a0cbfa97.cjs +0 -1
- package/dist/nylas-if-state_3.entry-504be976.cjs +0 -1
- package/dist/nylas-if-state_3.entry-e96d01f1.js +0 -291
- package/dist/nylas-list-folders.entry-866361cc.cjs +0 -1
- package/dist/nylas-list-threads.entry-04989295.cjs +0 -1
- package/dist/nylas-mailbox-pagination.entry-e0bd4aef.cjs +0 -1
- package/dist/nylas-mailbox-toolbar-button.entry-3d772b26.cjs +0 -1
- package/dist/nylas-open-hours-picker.entry-6bdc7c73.js +0 -186
- package/dist/nylas-open-hours-picker.entry-881b6db7.cjs +0 -1
- package/dist/nylas-provider.entry-8d9a844b.cjs +0 -1
- package/dist/nylas-scheduler.entry-7321e18f.js +0 -230
- package/dist/nylas-scheduler.entry-e82977fb.cjs +0 -1
- package/dist/nylas-threads-refresh.entry-477e68e4.cjs +0 -1
- package/dist/nylas-threads-search.entry-c5854641.cjs +0 -1
- package/dist/nylas-view-thread.entry-8b72cbdb.cjs +0 -1
- package/dist/play-icon_2.entry-ed5877e3.js +0 -25
- package/dist/play-icon_2.entry-f23ed6c1.cjs +0 -1
- package/dist/register-component-152c6ad2-0df7215b.cjs +0 -1
- package/dist/scheduler-store-7d48e682-0c0c3991.js +0 -289
- package/dist/scheduler-store-7d48e682-674705ef.cjs +0 -1
- package/dist/search-icon_3.entry-292138c3.js +0 -101
- package/dist/search-icon_3.entry-8e555357.cjs +0 -1
- package/dist/utils-5074a070-ce33ee6b.js +0 -119
- package/dist/utils-5074a070-d5ba6add.cjs +0 -2
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { r as k, c as p, h as a, F as m, H as
|
|
2
|
-
import { R as
|
|
3
|
-
import { d, t as D, h as S, a as T, i as g } from "./utils-5074a070-ce33ee6b.js";
|
|
1
|
+
import { r as k, c as p, d, h as a, t as M, F as m, H as x, g as E, m as D, a as S, n as g } from "./index-20ea5b0c.js";
|
|
2
|
+
import { R as T } from "./register-component-83e24412-b666e56b.js";
|
|
4
3
|
import "react";
|
|
5
4
|
import "react-dom";
|
|
6
5
|
function R(t, e, s, o, r) {
|
|
@@ -11,7 +10,7 @@ function R(t, e, s, o, r) {
|
|
|
11
10
|
n.message = t.data, n.parent = r, s.appendChild(n);
|
|
12
11
|
}
|
|
13
12
|
const u = ({ viewEmailElement: t, message: e, attachments: s, onMessageClick: o, onShowContactDataClick: r, parent: n }) => {
|
|
14
|
-
var l, i, c, v,
|
|
13
|
+
var l, i, c, v, f, w, b;
|
|
15
14
|
return a(
|
|
16
15
|
m,
|
|
17
16
|
null,
|
|
@@ -27,7 +26,7 @@ const u = ({ viewEmailElement: t, message: e, attachments: s, onMessageClick: o,
|
|
|
27
26
|
{ class: "from" },
|
|
28
27
|
a("span", { class: "name" }, e.data.from && ((v = e.data.from[0]) == null ? void 0 : v.name)),
|
|
29
28
|
" ",
|
|
30
|
-
a("span", { class: "email" }, e.data.from && ((
|
|
29
|
+
a("span", { class: "email" }, e.data.from && ((f = e.data.from[0]) == null ? void 0 : f.email))
|
|
31
30
|
),
|
|
32
31
|
a(
|
|
33
32
|
"div",
|
|
@@ -37,7 +36,7 @@ const u = ({ viewEmailElement: t, message: e, attachments: s, onMessageClick: o,
|
|
|
37
36
|
}),
|
|
38
37
|
" ",
|
|
39
38
|
"(",
|
|
40
|
-
|
|
39
|
+
D(new Date(e.data.date * 1e3)),
|
|
41
40
|
")"
|
|
42
41
|
),
|
|
43
42
|
a(
|
|
@@ -51,7 +50,7 @@ const u = ({ viewEmailElement: t, message: e, attachments: s, onMessageClick: o,
|
|
|
51
50
|
{ class: "to" },
|
|
52
51
|
a("span", null, "to"),
|
|
53
52
|
" ",
|
|
54
|
-
|
|
53
|
+
S(e.data.to),
|
|
55
54
|
" ",
|
|
56
55
|
a(
|
|
57
56
|
"button",
|
|
@@ -67,7 +66,7 @@ const u = ({ viewEmailElement: t, message: e, attachments: s, onMessageClick: o,
|
|
|
67
66
|
"div",
|
|
68
67
|
{ class: "address-info" },
|
|
69
68
|
a("div", { class: "label" }, "From"),
|
|
70
|
-
a("div", { class: "value" }, g((
|
|
69
|
+
a("div", { class: "value" }, g((w = e.data) != null && w.from ? (b = e == null ? void 0 : e.data) == null ? void 0 : b.from[0] : { name: "", email: "" })),
|
|
71
70
|
e.data.to && a(
|
|
72
71
|
m,
|
|
73
72
|
null,
|
|
@@ -163,12 +162,12 @@ const C = class {
|
|
|
163
162
|
render() {
|
|
164
163
|
var r, n, l;
|
|
165
164
|
const t = this.internalMessages.length > 2 ? this.internalMessages[0] : null, e = this.internalMessages.slice(this.internalMessages.length - 2, this.internalMessages.length), s = this.internalMessages.slice(1, this.internalMessages.length - 2), o = this.internalMessages[this.internalMessages.length - 1];
|
|
166
|
-
return a(
|
|
165
|
+
return a(x, { key: "08d6981bb00f24f18212060a784da5ec7129197e" }, a("sp-theme", { key: "0f7f54486f61beb490fc96a0f84753868ef384aa", scale: "medium", color: "dark" }, a("div", { key: "9aad086eae2344a6d0d28b1fb4fb39921dcf53f0", class: "view-thread" }, a("div", { key: "fcef6cd0bfed78b7d6f9df5a2a8719a32b1e294f", class: "header" }, a("div", { key: "0673aebc8626e082deb3f0a9b9eb9c18a1841349", class: "subject" }, (r = this.thread) == null ? void 0 : r.subject), a("div", { key: "10ee64da01595dcb658f99b9a8d90c1fe9237816", class: "folders" }, (l = (n = this.thread) == null ? void 0 : n.folders) == null ? void 0 : l.map((i) => a("sp-tag", { size: "s" }, M(i.replace("CATEGORY_", "").replace("_", " ")))))), a("div", { key: "469007a98202e151206e4ac329956882f069b618", class: "messages" }, t && a(u, { message: t, attachments: this.attachments.filter((i) => i.messageId === t.id), onMessageClick: this.onMessageClick, onShowContactDataClick: this.onShowContactDataClick, parent: this.host, viewEmailElement: this.nylasViewEmailElement, composerElement: this.nylasComposerElement }), s.length > 0 && this.messages.length > 1 && !this.showAllEmails && e.length > 0 && a(m, null, a("div", { class: "show-more" }, a("button", { type: "button", onClick: this.onShowAllEmailsClick }, a("span", { class: "avatar" }, s.length), " ", a("span", { class: "sr-only" }, "Show ", s.length, " more emails"))), a("hr", null)), s.length > 0 && this.showAllEmails && this.messages.length > 2 && s.map((i) => a(u, { message: i, attachments: this.attachments.filter((c) => c.messageId === (t == null ? void 0 : t.id)), onMessageClick: this.onMessageClick, onShowContactDataClick: this.onShowContactDataClick, parent: this.host, viewEmailElement: this.nylasViewEmailElement, composerElement: this.nylasComposerElement })), e.length > 0 && e.map((i) => a(u, { message: i, attachments: this.attachments.filter((c) => c.messageId === (t == null ? void 0 : t.id)), onMessageClick: this.onMessageClick, onShowContactDataClick: this.onShowContactDataClick, parent: this.host, viewEmailElement: this.nylasViewEmailElement, composerElement: this.nylasComposerElement }))), !(this.showComposer && o) && a("div", { class: "reply-buttons" }, a("sp-button", { variant: "cta", type: "button", onClick: this.showComposerClick }, a("span", { slot: "icon" }, a("reply-icon", null)), a("span", null, "Reply")), a("sp-button", { variant: "cta", type: "button" }, a("span", { slot: "icon" }, a("reply-all-icon", null)), a("span", null, "Reply All")), a("sp-button", { variant: "cta", type: "button" }, a("span", { slot: "icon" }, a("forward-icon", null)), a("span", null, "Forward"))), this.showComposer && o && a("div", { class: "composer" }, a("nylas-composer", { message: o.data, onClose: this.showComposerClick, onSend: (i) => {
|
|
167
166
|
d("[nylas-view-thread] Send event", { message: i.detail.message, replyBody: i.detail.replyBody });
|
|
168
167
|
} })))));
|
|
169
168
|
}
|
|
170
169
|
get host() {
|
|
171
|
-
return
|
|
170
|
+
return E(this);
|
|
172
171
|
}
|
|
173
172
|
static get watchers() {
|
|
174
173
|
return {
|
|
@@ -178,7 +177,7 @@ const C = class {
|
|
|
178
177
|
}
|
|
179
178
|
};
|
|
180
179
|
_([
|
|
181
|
-
|
|
180
|
+
T({
|
|
182
181
|
name: "nylas-view-thread",
|
|
183
182
|
stateToProps: /* @__PURE__ */ new Map([
|
|
184
183
|
["mailbox.selectedThread", "thread"],
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-33f74306.cjs"),f=require("./register-component-83e24412-445c6ad9.cjs");require("react");require("react-dom");function w(t,a,s,o,r){if(!o||!s||s.children.length>0)return;e.debug("[nylas-view-thread] Rendering email",{message:t,attachments:a,viewEmailElement:o});const n=o.cloneNode(!0);n.message=t.data,n.parent=r,s.appendChild(n)}const c=({viewEmailElement:t,message:a,attachments:s,onMessageClick:o,onShowContactDataClick:r,parent:n})=>{var l,i,d,g,u,v,y;return e.h(e.Fragment,null,e.h("div",{key:a.id,class:"message"},e.h("div",{class:"sub-header","data-id":a.data.id,onClick:o},e.h("div",{class:"avatar"},a.data.from&&((l=a.data.from[0])==null?void 0:l.name)&&((d=(i=a.data.from[0])==null?void 0:i.name[0])==null?void 0:d.toUpperCase())),e.h("div",{class:"from"},e.h("span",{class:"name"},a.data.from&&((g=a.data.from[0])==null?void 0:g.name))," ",e.h("span",{class:"email"},a.data.from&&((u=a.data.from[0])==null?void 0:u.email))),e.h("div",{class:"date"},new Date(a.data.date*1e3).toLocaleTimeString(void 0,{timeStyle:"short"})," ","(",e.formatTimeAgo(new Date(a.data.date*1e3)),")"),e.h("sp-button-group",{class:"buttons"},e.h("nylas-summarize-message-button",{message:a.data})),a.collapse&&e.h("div",{class:"snippet"},a.data.snippet),!a.collapse&&a.data.to&&e.h("div",{class:"to"},e.h("span",null,"to")," ",e.formatParticipants(a.data.to)," ",e.h("button",{type:"button",value:a.data.id,onClick:r,class:{expand:!0,"expand--showContactData":a.showContactData}},e.h("chevron-icon",null)))),a.showContactData&&e.h("div",{class:"address-info"},e.h("div",{class:"label"},"From"),e.h("div",{class:"value"},e.formatRecipient((v=a.data)!=null&&v.from?(y=a==null?void 0:a.data)==null?void 0:y.from[0]:{name:"",email:""})),a.data.to&&e.h(e.Fragment,null,e.h("div",{class:"label"},"To"),e.h("div",{class:"value"},a.data.to.map(h=>e.h("div",null,e.formatRecipient(h))))),typeof a.data.cc<"u"&&a.data.cc.length>0&&e.h(e.Fragment,null,e.h("div",{class:"label"},"CC"),e.h("div",{class:"value"},a.data.cc.map(h=>e.h("div",null,e.formatRecipient(h)))))),!a.collapse&&t&&e.h("div",{key:a.id,ref:h=>w(a,s,h,t,n)}),!a.collapse&&!t&&e.h("nylas-view-email",{key:a.id,message:a.data,parent:n})),e.h("hr",null))},b=':host{display:block;font-size:inherit}.avatar{z-index:1;border-radius:100%;background-color:var(--nylas-color-primary-200);height:40px;width:40px;align-items:center;display:flex;justify-content:center;border:1px solid var(--nylas-color-primary-200)}.view-thread{display:grid;grid-auto-flow:row;width:100%}.view-thread .header{display:grid;grid-gap:1rem;align-items:center;margin-bottom:1rem}.view-thread .header .subject{font-size:1.25rem;font-weight:600;line-height:1.5rem}.view-thread .header .folders{display:grid;grid-auto-flow:column;grid-auto-columns:min-content;overflow-x:auto;gap:1rem}.view-thread .header .folders .folder{padding:0 0.5rem;font-size:0.9rem;color:var(--nylas-color-primary-900);background-color:var(--nylas-color-primary-300)}.view-thread .messages{display:grid;gap:1rem}.view-thread .messages hr{margin:0;width:100%;border:1px solid var(--nylas-color-primary-200)}.view-thread .messages hr:last-of-type{display:none}.view-thread .messages .message{display:grid;grid-auto-flow:row;gap:1rem}.view-thread .messages .message:last-of-type .sub-header{cursor:default}.view-thread .messages .message .sub-header{display:grid;grid-template:"avatar from date buttons" "avatar to to buttons";grid-column-gap:1rem;grid-template-columns:auto 1fr auto auto;cursor:pointer}.view-thread .messages .message .sub-header>*{pointer-events:none}.view-thread .messages .message .sub-header .avatar{grid-area:avatar}.view-thread .messages .message .sub-header .from{grid-area:from}.view-thread .messages .message .sub-header .from span.email{display:none;color:var(--nylas-color-primary-400);font-weight:600}.view-thread .messages .message .sub-header .buttons{grid-area:buttons;align-self:center}.view-thread .messages .message .sub-header .buttons *{pointer-events:all}.view-thread .messages .message .sub-header .date{grid-area:date;align-self:center;color:var(--nylas-color-primary-400)}.view-thread .messages .message .sub-header .snippet{width:90%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--nylas-color-primary-600)}.view-thread .messages .message .sub-header .to{grid-area:to;color:var(--nylas-color-primary-400)}.view-thread .messages .message .sub-header .to>span{color:var(--nylas-color-primary-400)}.view-thread .messages .message .sub-header .to button{border:0;background-color:transparent;cursor:pointer;pointer-events:all;padding:0;margin:0}.view-thread .messages .message .sub-header .to button>*{pointer-events:none}.view-thread .messages .message .sub-header .to button chevron-icon{display:inline-table;fill:var(--nylas-color-primary-400);width:15px;height:15px;vertical-align:middle}.view-thread .messages .message .sub-header .to button chevron-icon svg{width:15px;height:15px;transform:rotate(90deg)}.view-thread .messages .message .sub-header .to button.expand--showContactData chevron-icon svg{transform:rotate(270deg)}.view-thread .messages .message .address-info{display:grid;column-gap:1rem;row-gap:0.5rem;grid-template-columns:auto 1fr;grid-template-rows:1fr;padding:1rem 2rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-color-primary-200);align-items:flex-start;color:var(--nylas-color-primary-600)}.view-thread .messages .message .address-info .label{color:var(--nylas-color-primary-400);font-weight:600}.show-more{position:relative;display:flex;width:100%}.show-more .sr-only{display:none}.show-more button{position:relative;display:inline-flex;width:100%;padding:0;border:0;background-color:transparent;cursor:pointer;text-align:left;overflow:hidden}.show-more button span{border:1px solid var(--nylas-color-primary-400)}.show-more button:hover span{background-color:var(--nylas-color-primary-700)}.show-more button::after{border-top:1px solid rgba(100, 121, 143, 0.122);border-bottom:1px solid rgba(100, 121, 143, 0.122);content:"";height:4px;width:100%;position:absolute;top:50%}.loading{position:absolute;width:100%;height:100%;background-color:var(--loading__background-color);top:0;bottom:0;left:0;z-index:1;display:grid;justify-content:center;align-items:center;font-weight:600;overflow:hidden}.reply-buttons{display:grid;grid-auto-flow:column;grid-auto-columns:min-content;gap:1rem;margin-top:1rem}.reply-buttons 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)}.reply-buttons sp-button:hover{background-color:var(--nylas-color-primary-500)}.reply-buttons sp-button:disabled{background-color:var(--nylas-color-primary-200);color:var(--nylas-color-primary-600);cursor:not-allowed}.reply-buttons sp-button chevron-icon{display:inline-block}@media only screen and (min-width: 768px){.view-thread .messages .message .sub-header .from span.email{display:inline}}',C=b;var k=function(t,a,s,o){var r=arguments.length,n=r<3?a:o===null?o=Object.getOwnPropertyDescriptor(a,s):o,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(t,a,s,o);else for(var i=t.length-1;i>=0;i--)(l=t[i])&&(n=(r<3?l(n):r>3?l(a,s,n):l(a,s))||n);return r>3&&n&&Object.defineProperty(a,s,n),n},m=function(t,a){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,a)};const p=class{constructor(t){e.registerInstance(this,t),this.threadSelected=e.createEvent(this,"threadSelected",7),this.showContactDataClicked=e.createEvent(this,"showContactDataClicked",7),this.messageClicked=e.createEvent(this,"messageClicked",7),this.nylasViewEmailElement=null,this.nylasComposerElement=null,this.onShowContactDataClick=a=>{a.stopPropagation();const o=a.target.value,r=this.internalMessages.find(l=>l.data.id===o);if(!r){e.debug(`[nylas-view-thread] Could not find message ${o}`);return}this.showContactDataClicked.emit(r.data).defaultPrevented||(r.showContactData=!r.showContactData,this.internalMessages=[...this.internalMessages]),e.debug(`[nylas-view-thread] show contact data clicked ${o} ${r.showContactData?"collapsed":"expanded"}`)},this.onMessageClick=a=>{var l;const o=a.target.dataset.id,r=this.internalMessages.find(i=>i.data.id===o);if(!r){e.debug(`[nylas-view-thread] Could not find message ${o}`);return}this.messageClicked.emit(r.data).defaultPrevented||(r.id!==((l=this.internalMessages[this.internalMessages.length-1])==null?void 0:l.id)&&(r.collapse=!r.collapse,r.collapse&&(r.showContactData=!1)),this.internalMessages=[...this.internalMessages]),e.debug(`[nylas-view-thread] message clicked ${o} ${r.collapse?"collapsed":"expanded"}`)},this.onShowAllEmailsClick=()=>{this.showAllEmails=!this.showAllEmails},this.showComposerClick=()=>{this.showComposer=!this.showComposer},this.draft=void 0,this.thread=void 0,this.messages=[],this.attachments=[],this.state="loading",this.internalMessages=[],this.showAllEmails=!1,this.showComposer=!1}connectedCallback(){}disconnectedCallback(){}async componentWillLoad(){e.debug("[nylas-view-thread] Component will load"),this.updateInternalMessages(this.messages);const t=this.host.querySelector("template.nylas-view-email");if(!t){e.debug("[nylas-view-thread] Could not find template");return}const a=document.importNode(t.content,!0);this.nylasViewEmailElement=a.querySelector("nylas-view-email");const s=this.host.querySelector("template.nylas-composer");if(!s){e.debug("[nylas-view-thread] Could not find composer template");return}const o=document.importNode(s.content,!0);this.nylasComposerElement=o.querySelector("nylas-composer")}async componentDidLoad(){e.debug("[nylas-view-thread] Component did load")}async threadChanged(t){e.debug("[nylas-view-thread] Thread changed",{thread:t}),this.internalMessages=[],this.threadSelected.emit(t).defaultPrevented||e.debug("[nylas-view-thread] Default event not prevented, initializing")}updateInternalMessages(t){e.debug("[nylas-view-thread] Updating internal messages",{messages:t});const a=t.sort((s,o)=>s.date>o.date?1:-1).map((s,o)=>({id:s.id,data:s,collapse:o!==t.length-1,showContactData:!1}));this.internalMessages=a}render(){var r,n,l;const t=this.internalMessages.length>2?this.internalMessages[0]:null,a=this.internalMessages.slice(this.internalMessages.length-2,this.internalMessages.length),s=this.internalMessages.slice(1,this.internalMessages.length-2),o=this.internalMessages[this.internalMessages.length-1];return e.h(e.Host,{key:"08d6981bb00f24f18212060a784da5ec7129197e"},e.h("sp-theme",{key:"0f7f54486f61beb490fc96a0f84753868ef384aa",scale:"medium",color:"dark"},e.h("div",{key:"9aad086eae2344a6d0d28b1fb4fb39921dcf53f0",class:"view-thread"},e.h("div",{key:"fcef6cd0bfed78b7d6f9df5a2a8719a32b1e294f",class:"header"},e.h("div",{key:"0673aebc8626e082deb3f0a9b9eb9c18a1841349",class:"subject"},(r=this.thread)==null?void 0:r.subject),e.h("div",{key:"10ee64da01595dcb658f99b9a8d90c1fe9237816",class:"folders"},(l=(n=this.thread)==null?void 0:n.folders)==null?void 0:l.map(i=>e.h("sp-tag",{size:"s"},e.toTitleCase(i.replace("CATEGORY_","").replace("_"," ")))))),e.h("div",{key:"469007a98202e151206e4ac329956882f069b618",class:"messages"},t&&e.h(c,{message:t,attachments:this.attachments.filter(i=>i.messageId===t.id),onMessageClick:this.onMessageClick,onShowContactDataClick:this.onShowContactDataClick,parent:this.host,viewEmailElement:this.nylasViewEmailElement,composerElement:this.nylasComposerElement}),s.length>0&&this.messages.length>1&&!this.showAllEmails&&a.length>0&&e.h(e.Fragment,null,e.h("div",{class:"show-more"},e.h("button",{type:"button",onClick:this.onShowAllEmailsClick},e.h("span",{class:"avatar"},s.length)," ",e.h("span",{class:"sr-only"},"Show ",s.length," more emails"))),e.h("hr",null)),s.length>0&&this.showAllEmails&&this.messages.length>2&&s.map(i=>e.h(c,{message:i,attachments:this.attachments.filter(d=>d.messageId===(t==null?void 0:t.id)),onMessageClick:this.onMessageClick,onShowContactDataClick:this.onShowContactDataClick,parent:this.host,viewEmailElement:this.nylasViewEmailElement,composerElement:this.nylasComposerElement})),a.length>0&&a.map(i=>e.h(c,{message:i,attachments:this.attachments.filter(d=>d.messageId===(t==null?void 0:t.id)),onMessageClick:this.onMessageClick,onShowContactDataClick:this.onShowContactDataClick,parent:this.host,viewEmailElement:this.nylasViewEmailElement,composerElement:this.nylasComposerElement}))),!(this.showComposer&&o)&&e.h("div",{class:"reply-buttons"},e.h("sp-button",{variant:"cta",type:"button",onClick:this.showComposerClick},e.h("span",{slot:"icon"},e.h("reply-icon",null)),e.h("span",null,"Reply")),e.h("sp-button",{variant:"cta",type:"button"},e.h("span",{slot:"icon"},e.h("reply-all-icon",null)),e.h("span",null,"Reply All")),e.h("sp-button",{variant:"cta",type:"button"},e.h("span",{slot:"icon"},e.h("forward-icon",null)),e.h("span",null,"Forward"))),this.showComposer&&o&&e.h("div",{class:"composer"},e.h("nylas-composer",{message:o.data,onClose:this.showComposerClick,onSend:i=>{e.debug("[nylas-view-thread] Send event",{message:i.detail.message,replyBody:i.detail.replyBody})}})))))}get host(){return e.getElement(this)}static get watchers(){return{thread:["threadChanged"],messages:["updateInternalMessages"]}}};k([f.RegisterComponent({name:"nylas-view-thread",stateToProps:new Map([["mailbox.selectedThread","thread"],["mailbox.messages","messages"],["mailbox.state","state"]]),eventToProps:{threadSelected:async(t,a)=>{e.debug("[nylas-view-thread] Nylas init event. Fetching thread messages.",{event:t});const s=t.detail;s&&s.id&&await a.messages.getThreadMessages(s.id)}},fireRegisterEvent:!0}),m("design:type",Function),m("design:paramtypes",[]),m("design:returntype",void 0)],p.prototype,"render",null);p.style=C;exports.nylas_view_thread=p;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-33f74306.cjs");require("react");require("react-dom");const c=".sc-people-icon-h{display:flex}",a=c,t=class{constructor(i){e.registerInstance(this,i),this.width="20",this.height="20"}render(){return e.h("svg",{key:"8f73408ea9a46988a9f1a9f804fab7ddc87c64d1",xmlns:"http://www.w3.org/2000/svg",width:this.width,height:this.height,fill:"none",viewBox:"0 0 20 20"},e.h("path",{key:"d0a57fb5c109d50e01a113dd137edf66efccbb02",fill:"currentColor",d:"M11 10a2 2 0 0 1 2 2v1.5c0 2.054-2.088 3.5-5.5 3.5S2 15.554 2 13.5V12a2 2 0 0 1 2-2h7Zm0 1H4a1 1 0 0 0-1 1v1.5C3 14.907 4.579 16 7.5 16c2.921 0 4.5-1.093 4.5-2.5V12a1 1 0 0 0-1-1Zm5-1a2 2 0 0 1 2 2v.5c0 2.089-1.568 3.5-4.5 3.5-.141 0-.28-.003-.414-.01.208-.242.382-.502.522-.781l.097-.213h.039C15.976 14.931 17 13.96 17 12.5V12a1 1 0 0 0-1-1h-2.171a3 3 0 0 0-.594-1H16ZM7.5 2a3.5 3.5 0 1 1 0 7 3.5 3.5 0 0 1 0-7Zm7 2a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5Zm-7-1a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5Zm7 2a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Z"}))}};t.style=a;exports.people_icon=t;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { r as a, h as e } from "./index-20ea5b0c.js";
|
|
2
|
+
import "react";
|
|
3
|
+
import "react-dom";
|
|
4
|
+
const o = ".sc-people-icon-h{display:flex}", s = o, c = class {
|
|
5
|
+
constructor(t) {
|
|
6
|
+
a(this, t), this.width = "20", this.height = "20";
|
|
7
|
+
}
|
|
8
|
+
render() {
|
|
9
|
+
return e("svg", { key: "8f73408ea9a46988a9f1a9f804fab7ddc87c64d1", xmlns: "http://www.w3.org/2000/svg", width: this.width, height: this.height, fill: "none", viewBox: "0 0 20 20" }, e("path", { key: "d0a57fb5c109d50e01a113dd137edf66efccbb02", fill: "currentColor", d: "M11 10a2 2 0 0 1 2 2v1.5c0 2.054-2.088 3.5-5.5 3.5S2 15.554 2 13.5V12a2 2 0 0 1 2-2h7Zm0 1H4a1 1 0 0 0-1 1v1.5C3 14.907 4.579 16 7.5 16c2.921 0 4.5-1.093 4.5-2.5V12a1 1 0 0 0-1-1Zm5-1a2 2 0 0 1 2 2v.5c0 2.089-1.568 3.5-4.5 3.5-.141 0-.28-.003-.414-.01.208-.242.382-.502.522-.781l.097-.213h.039C15.976 14.931 17 13.96 17 12.5V12a1 1 0 0 0-1-1h-2.171a3 3 0 0 0-.594-1H16ZM7.5 2a3.5 3.5 0 1 1 0 7 3.5 3.5 0 0 1 0-7Zm7 2a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5Zm-7-1a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5Zm7 2a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Z" }));
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
c.style = s;
|
|
13
|
+
export {
|
|
14
|
+
c as people_icon
|
|
15
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { r as o, h as t } from "./index-20ea5b0c.js";
|
|
2
|
+
import "react";
|
|
3
|
+
import "react-dom";
|
|
4
|
+
const e = ".sc-play-icon-h{display:flex}", i = e, c = class {
|
|
5
|
+
constructor(s) {
|
|
6
|
+
o(this, s), this.width = "15", this.height = "15";
|
|
7
|
+
}
|
|
8
|
+
render() {
|
|
9
|
+
return t("svg", { key: "01461bf1925b9c4a5b755ee500c5c9d9ea9a4c9c", width: this.width, height: this.height, viewBox: "0 0 24 24", fill: "auto", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "c60c140ea197f53c9f5df04e3a2ef0e8736787c2", d: "M21 12L3 21V3L21 12Z", stroke: "auto", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }));
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
c.style = i;
|
|
13
|
+
const h = ".sc-stop-icon-h{display:flex}", n = h, r = class {
|
|
14
|
+
constructor(s) {
|
|
15
|
+
o(this, s), this.width = "15", this.height = "15";
|
|
16
|
+
}
|
|
17
|
+
render() {
|
|
18
|
+
return t("svg", { key: "f6149723fe23e788bd2a2b7fb075fb929222cb31", width: this.width, height: this.height, viewBox: "0 0 24 24", fill: "auto", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "4f6c453999391dae9f8271f341c9ffac4458fd79", d: "M4 4H20V20H4V4Z", stroke: "auto", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }));
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
r.style = n;
|
|
22
|
+
export {
|
|
23
|
+
c as play_icon,
|
|
24
|
+
r as stop_icon
|
|
25
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-33f74306.cjs");require("react");require("react-dom");const o=".sc-play-icon-h{display:flex}",c=o,s=class{constructor(e){t.registerInstance(this,e),this.width="15",this.height="15"}render(){return t.h("svg",{key:"01461bf1925b9c4a5b755ee500c5c9d9ea9a4c9c",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},t.h("path",{key:"c60c140ea197f53c9f5df04e3a2ef0e8736787c2",d:"M21 12L3 21V3L21 12Z",stroke:"auto","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))}};s.style=c;const n=".sc-stop-icon-h{display:flex}",h=n,i=class{constructor(e){t.registerInstance(this,e),this.width="15",this.height="15"}render(){return t.h("svg",{key:"f6149723fe23e788bd2a2b7fb075fb929222cb31",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},t.h("path",{key:"4f6c453999391dae9f8271f341c9ffac4458fd79",d:"M4 4H20V20H4V4Z",stroke:"auto","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))}};i.style=h;exports.play_icon=s;exports.stop_icon=i;
|
package/dist/react.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-33f74306.cjs");require("react");require("react-dom");exports.AddCircleIcon=o.AddCircleIcon;exports.ArchiveIcon=o.ArchiveIcon;exports.ArrowIcon=o.ArrowIcon;exports.BoldIcon=o.BoldIcon;exports.ButtonComponent=o.ButtonComponent;exports.CalendarCancelIcon=o.CalendarCancelIcon;exports.CalendarCheckIcon=o.CalendarCheckIcon;exports.CalendarIcon=o.CalendarIcon;exports.CalendarInfoIcon=o.CalendarInfoIcon;exports.CalendarPatternsIcon=o.CalendarPatternsIcon;exports.CheckmarkCircleIcon=o.CheckmarkCircleIcon;exports.ChevronIcon=o.ChevronIcon;exports.CloseIcon=o.CloseIcon;exports.DocumentRefreshIcon=o.DocumentRefreshIcon;exports.FlowIcon=o.FlowIcon;exports.FolderIcon=o.FolderIcon;exports.ForwardIcon=o.ForwardIcon;exports.GlobeIcon=o.GlobeIcon;exports.GoogleLogoIcon=o.GoogleLogoIcon;exports.InboxIcon=o.InboxIcon;exports.InfoIcon=o.InfoIcon;exports.ItalicIcon=o.ItalicIcon;exports.LoadingIcon=o.LoadingIcon;exports.LocationIcon=o.LocationIcon;exports.LocationOffIcon=o.LocationOffIcon;exports.MicrosoftLogoIcon=o.MicrosoftLogoIcon;exports.MultiSelectDropdown=o.MultiSelectDropdown;exports.NylasAdditionalParticipants=o.NylasAdditionalParticipants;exports.NylasAvailabilityPicker=o.NylasAvailabilityPicker;exports.NylasBookedEventCard=o.NylasBookedEventCard;exports.NylasBookingCalendarPicker=o.NylasBookingCalendarPicker;exports.NylasBookingForm=o.NylasBookingForm;exports.NylasBufferTime=o.NylasBufferTime;exports.NylasCalendarPicker=o.NylasCalendarPicker;exports.NylasCancelBookingForm=o.NylasCancelBookingForm;exports.NylasCancelledEventCard=o.NylasCancelledEventCard;exports.NylasComposer=o.NylasComposer;exports.NylasCustomBookingFlow=o.NylasCustomBookingFlow;exports.NylasDatePicker=o.NylasDatePicker;exports.NylasEditorTabs=o.NylasEditorTabs;exports.NylasEventDescription=o.NylasEventDescription;exports.NylasEventDuration=o.NylasEventDuration;exports.NylasEventInfo=o.NylasEventInfo;exports.NylasEventLimits=o.NylasEventLimits;exports.NylasEventTitle=o.NylasEventTitle;exports.NylasFormCard=o.NylasFormCard;exports.NylasIdentityRequestWrapper=o.NylasIdentityRequestWrapper;exports.NylasIfState=o.NylasIfState;exports.NylasLimitFutureBookings=o.NylasLimitFutureBookings;exports.NylasListConfigurations=o.NylasListConfigurations;exports.NylasListFolders=o.NylasListFolders;exports.NylasListThreads=o.NylasListThreads;exports.NylasLocaleSwitch=o.NylasLocaleSwitch;exports.NylasLocationComponent=o.NylasLocationComponent;exports.NylasLogin=o.NylasLogin;exports.NylasLogo=o.NylasLogo;exports.NylasMailbox=o.NylasMailbox;exports.NylasMailboxPagination=o.NylasMailboxPagination;exports.NylasMailboxToolbarButton=o.NylasMailboxToolbarButton;exports.NylasMinCancellationNotice=o.NylasMinCancellationNotice;exports.NylasNotification=o.NylasNotification;exports.NylasProvider=o.NylasProvider;exports.NylasSchedulerEditor=o.NylasSchedulerEditor;exports.NylasScheduling=o.NylasScheduling;exports.NylasSelectedEventCard=o.NylasSelectedEventCard;exports.NylasSummarizeMessageButton=o.NylasSummarizeMessageButton;exports.NylasThreadsRefresh=o.NylasThreadsRefresh;exports.NylasThreadsSearch=o.NylasThreadsSearch;exports.NylasTimeWindowPicker=o.NylasTimeWindowPicker;exports.NylasTimeslotPicker=o.NylasTimeslotPicker;exports.NylasViewEmail=o.NylasViewEmail;exports.NylasViewThread=o.NylasViewThread;exports.PeopleIcon=o.PeopleIcon;exports.PlayIcon=o.PlayIcon;exports.RefreshIcon=o.RefreshIcon;exports.ReplyAllIcon=o.ReplyAllIcon;exports.ReplyIcon=o.ReplyIcon;exports.SearchIcon=o.SearchIcon;exports.SelectDropdown=o.SelectDropdown;exports.SentIcon=o.SentIcon;exports.SpamIcon=o.SpamIcon;exports.StarIcon=o.StarIcon;exports.StopIcon=o.StopIcon;exports.TimePeriodSelector=o.TimePeriodSelector;exports.TooltipComponent=o.TooltipComponent;exports.TranslateIcon=o.TranslateIcon;exports.TrashIcon=o.TrashIcon;exports.UnderlineIcon=o.UnderlineIcon;exports.WarningIcon=o.WarningIcon;exports.applyPolyfills=o.applyPolyfills;exports.defineCustomElements=o.defineCustomElements;exports.setNonce=o.setNonce;exports.useNylasMailboxElement=o.useNylasMailboxElement;
|
package/dist/react.js
CHANGED
|
@@ -1,66 +1,98 @@
|
|
|
1
|
+
import { W as n, X as l, Y as i, Z as c, _ as t, $ as r, a0 as y, a1 as N, a2 as I, a3 as d, a4 as b, a5 as C, a6 as m, a7 as p, a8 as f, a9 as h, aa as g, ab as u, ac as S, ad as k, ae as T, af as L, ag as P, ah as E, ai as v, aj as B, ak as w, al as F, am as M, an as x, ao as A, ap as D, aq as R, ar as W, as as V, at as G, au as U, av as q, aw as z, ax as O, ay as X, az as Y, aA as Z, aB as _, aC as $, aD as j, N as H, aE as J, aF as K, aG as Q, aH as aa, aI as sa, aJ as oa, aK as ea, aL as na, aM as la, aN as ia, aO as ca, aP as ta, aQ as ra, aR as ya, aS as Na, aT as Ia, aU as da, aV as ba, aW as Ca, aX as ma, aY as pa, aZ as fa, a_ as ha, a$ as ga, b0 as ua, b1 as Sa, b2 as ka, b3 as Ta, b4 as La, b5 as Pa, b6 as Ea, b7 as va, b8 as Ba, b9 as wa, ba as Fa, bb as Ma, bc as xa, bd as Aa, be as Da, bf as Ra, bg as Wa, bh as Va, T as Ga, U as Ua, V as qa, S as za } from "./index-20ea5b0c.js";
|
|
1
2
|
import "react";
|
|
2
|
-
import { A as l, e as n, i as c, B as r, C as i, j as I, k as y, l as t, m as N, n as d, D as C, o as m, p as h, G as p, I as S, q as k, L as b, N as u, s as P, t as T, v as f, w as g, x as v, y as w, z as x, E as B, J as E, K as L, M, O as R, P as A, Q as F, R as D, S as V, T as z, U as G, V as O, W as U, X as W, Y as j, Z as q, _ as H, $ as J, a0 as K, a1 as Q, a2 as X, a3 as Y, a4 as Z, a5 as _, a6 as $, a7 as aa, a8 as sa, a9 as oa, aa as ea, ab as la, ac as na, ad as ca, ae as ra, b as ia, d as Ia, u as ya } from "./index-630f4e87.js";
|
|
3
3
|
import "react-dom";
|
|
4
4
|
export {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
y as
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
d as
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
p as
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
u as
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
B as
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
M as
|
|
34
|
-
|
|
35
|
-
A as
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
G as
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
aa as
|
|
56
|
-
sa as
|
|
57
|
-
oa as
|
|
58
|
-
ea as
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
ya as
|
|
5
|
+
n as AddCircleIcon,
|
|
6
|
+
l as ArchiveIcon,
|
|
7
|
+
i as ArrowIcon,
|
|
8
|
+
c as BoldIcon,
|
|
9
|
+
t as ButtonComponent,
|
|
10
|
+
r as CalendarCancelIcon,
|
|
11
|
+
y as CalendarCheckIcon,
|
|
12
|
+
N as CalendarIcon,
|
|
13
|
+
I as CalendarInfoIcon,
|
|
14
|
+
d as CalendarPatternsIcon,
|
|
15
|
+
b as CheckmarkCircleIcon,
|
|
16
|
+
C as ChevronIcon,
|
|
17
|
+
m as CloseIcon,
|
|
18
|
+
p as DocumentRefreshIcon,
|
|
19
|
+
f as FlowIcon,
|
|
20
|
+
h as FolderIcon,
|
|
21
|
+
g as ForwardIcon,
|
|
22
|
+
u as GlobeIcon,
|
|
23
|
+
S as GoogleLogoIcon,
|
|
24
|
+
k as InboxIcon,
|
|
25
|
+
T as InfoIcon,
|
|
26
|
+
L as ItalicIcon,
|
|
27
|
+
P as LoadingIcon,
|
|
28
|
+
E as LocationIcon,
|
|
29
|
+
v as LocationOffIcon,
|
|
30
|
+
B as MicrosoftLogoIcon,
|
|
31
|
+
w as MultiSelectDropdown,
|
|
32
|
+
F as NylasAdditionalParticipants,
|
|
33
|
+
M as NylasAvailabilityPicker,
|
|
34
|
+
x as NylasBookedEventCard,
|
|
35
|
+
A as NylasBookingCalendarPicker,
|
|
36
|
+
D as NylasBookingForm,
|
|
37
|
+
R as NylasBufferTime,
|
|
38
|
+
W as NylasCalendarPicker,
|
|
39
|
+
V as NylasCancelBookingForm,
|
|
40
|
+
G as NylasCancelledEventCard,
|
|
41
|
+
U as NylasComposer,
|
|
42
|
+
q as NylasCustomBookingFlow,
|
|
43
|
+
z as NylasDatePicker,
|
|
44
|
+
O as NylasEditorTabs,
|
|
45
|
+
X as NylasEventDescription,
|
|
46
|
+
Y as NylasEventDuration,
|
|
47
|
+
Z as NylasEventInfo,
|
|
48
|
+
_ as NylasEventLimits,
|
|
49
|
+
$ as NylasEventTitle,
|
|
50
|
+
j as NylasFormCard,
|
|
51
|
+
H as NylasIdentityRequestWrapper,
|
|
52
|
+
J as NylasIfState,
|
|
53
|
+
K as NylasLimitFutureBookings,
|
|
54
|
+
Q as NylasListConfigurations,
|
|
55
|
+
aa as NylasListFolders,
|
|
56
|
+
sa as NylasListThreads,
|
|
57
|
+
oa as NylasLocaleSwitch,
|
|
58
|
+
ea as NylasLocationComponent,
|
|
59
|
+
na as NylasLogin,
|
|
60
|
+
la as NylasLogo,
|
|
61
|
+
ia as NylasMailbox,
|
|
62
|
+
ca as NylasMailboxPagination,
|
|
63
|
+
ta as NylasMailboxToolbarButton,
|
|
64
|
+
ra as NylasMinCancellationNotice,
|
|
65
|
+
ya as NylasNotification,
|
|
66
|
+
Na as NylasProvider,
|
|
67
|
+
Ia as NylasSchedulerEditor,
|
|
68
|
+
da as NylasScheduling,
|
|
69
|
+
ba as NylasSelectedEventCard,
|
|
70
|
+
Ca as NylasSummarizeMessageButton,
|
|
71
|
+
ma as NylasThreadsRefresh,
|
|
72
|
+
pa as NylasThreadsSearch,
|
|
73
|
+
fa as NylasTimeWindowPicker,
|
|
74
|
+
ha as NylasTimeslotPicker,
|
|
75
|
+
ga as NylasViewEmail,
|
|
76
|
+
ua as NylasViewThread,
|
|
77
|
+
Sa as PeopleIcon,
|
|
78
|
+
ka as PlayIcon,
|
|
79
|
+
Ta as RefreshIcon,
|
|
80
|
+
La as ReplyAllIcon,
|
|
81
|
+
Pa as ReplyIcon,
|
|
82
|
+
Ea as SearchIcon,
|
|
83
|
+
va as SelectDropdown,
|
|
84
|
+
Ba as SentIcon,
|
|
85
|
+
wa as SpamIcon,
|
|
86
|
+
Fa as StarIcon,
|
|
87
|
+
Ma as StopIcon,
|
|
88
|
+
xa as TimePeriodSelector,
|
|
89
|
+
Aa as TooltipComponent,
|
|
90
|
+
Da as TranslateIcon,
|
|
91
|
+
Ra as TrashIcon,
|
|
92
|
+
Wa as UnderlineIcon,
|
|
93
|
+
Va as WarningIcon,
|
|
94
|
+
Ga as applyPolyfills,
|
|
95
|
+
Ua as defineCustomElements,
|
|
96
|
+
qa as setNonce,
|
|
97
|
+
za as useNylasMailboxElement
|
|
66
98
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-33f74306.cjs");require("react");require("react-dom");const t=".sc-refresh-icon-h{display:flex}",i=t,c=class{constructor(s){e.registerInstance(this,s),this.width="15",this.height="15"}render(){return e.h("svg",{key:"aee09fcff1a6eff44a8ab2dd03b53d016bd807f7",fill:"auto",width:this.width,height:this.height,viewBox:"0 0 32 32",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"ead150b54eb753b97fd36ef63a3d96545a92245a",d:"M15.544 28.080c-0.002-0.006-0.008-0.010-0.012-0.015l-2.873-4.489c-0.204-0.335-0.646-0.454-0.992-0.266l-0.256 0.157c-0.344 0.188-0.337 0.673-0.133 1.008l1.841 2.857c-0.157-0.035-0.316-0.063-0.471-0.103-3.224-0.843-5.953-3.026-7.485-5.988-1.448-2.797-1.72-5.99-0.766-8.992s3.118-5.452 5.915-6.899c0.476-0.247 0.662-0.832 0.416-1.308-0.246-0.477-0.832-0.663-1.308-0.416-3.258 1.686-5.763 4.54-6.874 8.036s-0.794 7.215 0.892 10.473c1.786 3.448 4.963 5.989 8.72 6.973 0.043 0.011 0.087 0.017 0.13 0.028l-2.541 1.288c-0.344 0.189-0.458 0.613-0.254 0.948l0.098 0.256c0.205 0.335 0.557 0.454 0.9 0.266l4.651-2.381c0.006-0.004 0.012-0.003 0.018-0.007l0.312-0.171c0.172-0.095 0.287-0.249 0.332-0.422 0.047-0.172 0.025-0.364-0.076-0.531zM28.559 10.025c-1.783-3.447-4.862-5.988-8.618-6.972-0.267-0.070-0.541-0.124-0.814-0.179l2.494-1.265c0.344-0.189 0.549-0.614 0.345-0.949l-0.099-0.255c-0.205-0.336-0.648-0.454-0.991-0.267l-4.651 2.381c-0.006 0.003-0.012 0.002-0.018 0.006l-0.312 0.171c-0.173 0.095-0.287 0.249-0.332 0.422-0.047 0.172-0.025 0.364 0.077 0.53l0.185 0.304c0.003 0.006 0.008 0.010 0.012 0.016l2.873 4.489c0.203 0.335 0.646 0.454 0.991 0.266l0.226-0.157c0.344-0.188 0.366-0.673 0.163-1.008l-1.85-2.87c0.407 0.063 0.811 0.138 1.207 0.242 3.226 0.845 5.856 3.027 7.387 5.986 1.448 2.797 1.72 5.99 0.765 8.991s-3.020 5.451-5.818 6.901c-0.476 0.247-0.662 0.831-0.415 1.308 0.172 0.332 0.511 0.524 0.863 0.524 0.15 0 0.302-0.035 0.446-0.109 3.259-1.686 5.664-4.54 6.776-8.035 1.111-3.497 0.794-7.217-0.893-10.473z"}))}};c.style=i;exports.refresh_icon=c;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { r as
|
|
1
|
+
import { r as s, h as c } from "./index-20ea5b0c.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import "react-dom";
|
|
4
|
-
const
|
|
5
|
-
constructor(
|
|
6
|
-
|
|
4
|
+
const t = ".sc-refresh-icon-h{display:flex}", l = t, h = class {
|
|
5
|
+
constructor(e) {
|
|
6
|
+
s(this, e), this.width = "15", this.height = "15";
|
|
7
7
|
}
|
|
8
8
|
render() {
|
|
9
|
-
return c("svg", { key: "
|
|
9
|
+
return c("svg", { key: "aee09fcff1a6eff44a8ab2dd03b53d016bd807f7", fill: "auto", width: this.width, height: this.height, viewBox: "0 0 32 32", version: "1.1", xmlns: "http://www.w3.org/2000/svg" }, c("path", { key: "ead150b54eb753b97fd36ef63a3d96545a92245a", d: "M15.544 28.080c-0.002-0.006-0.008-0.010-0.012-0.015l-2.873-4.489c-0.204-0.335-0.646-0.454-0.992-0.266l-0.256 0.157c-0.344 0.188-0.337 0.673-0.133 1.008l1.841 2.857c-0.157-0.035-0.316-0.063-0.471-0.103-3.224-0.843-5.953-3.026-7.485-5.988-1.448-2.797-1.72-5.99-0.766-8.992s3.118-5.452 5.915-6.899c0.476-0.247 0.662-0.832 0.416-1.308-0.246-0.477-0.832-0.663-1.308-0.416-3.258 1.686-5.763 4.54-6.874 8.036s-0.794 7.215 0.892 10.473c1.786 3.448 4.963 5.989 8.72 6.973 0.043 0.011 0.087 0.017 0.13 0.028l-2.541 1.288c-0.344 0.189-0.458 0.613-0.254 0.948l0.098 0.256c0.205 0.335 0.557 0.454 0.9 0.266l4.651-2.381c0.006-0.004 0.012-0.003 0.018-0.007l0.312-0.171c0.172-0.095 0.287-0.249 0.332-0.422 0.047-0.172 0.025-0.364-0.076-0.531zM28.559 10.025c-1.783-3.447-4.862-5.988-8.618-6.972-0.267-0.070-0.541-0.124-0.814-0.179l2.494-1.265c0.344-0.189 0.549-0.614 0.345-0.949l-0.099-0.255c-0.205-0.336-0.648-0.454-0.991-0.267l-4.651 2.381c-0.006 0.003-0.012 0.002-0.018 0.006l-0.312 0.171c-0.173 0.095-0.287 0.249-0.332 0.422-0.047 0.172-0.025 0.364 0.077 0.53l0.185 0.304c0.003 0.006 0.008 0.010 0.012 0.016l2.873 4.489c0.203 0.335 0.646 0.454 0.991 0.266l0.226-0.157c0.344-0.188 0.366-0.673 0.163-1.008l-1.85-2.87c0.407 0.063 0.811 0.138 1.207 0.242 3.226 0.845 5.856 3.027 7.387 5.986 1.448 2.797 1.72 5.99 0.765 8.991s-3.020 5.451-5.818 6.901c-0.476 0.247-0.662 0.831-0.415 1.308 0.172 0.332 0.511 0.524 0.863 0.524 0.15 0 0.302-0.035 0.446-0.109 3.259-1.686 5.664-4.54 6.776-8.035 1.111-3.497 0.794-7.217-0.893-10.473z" }));
|
|
10
10
|
}
|
|
11
11
|
};
|
|
12
12
|
h.style = l;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const s=require("./index-33f74306.cjs");function m(e,o,u="registerComponent"){return new CustomEvent(u,{bubbles:!0,composed:!0,detail:o})}function P(e,o,u="unregisterComponent"){return new CustomEvent(u,{bubbles:!0,composed:!0,detail:o})}function b(e){return(o,u)=>{const r=e.name;s.debug(`[${r}] Registering component ${r} being called on ${u}`);const l=o.componentWillLoad;if(!l){s.error(`[${r}] componentWillLoad lifecycle method in ${r} missing. Required for RegisterComponent decorator.`);return}const p=o.connectedCallback;if(!p){s.error(`[${r}] connectedCallback lifecycle method in ${r} missing. Required for RegisterComponent decorator.`);return}const a=o.disconnectedCallback;if(!a){s.error(`[${r}] disconnectedCallback lifecycle method in ${r} missing. Required for RegisterComponent decorator.`);return}if(e.storeToProps&&e.stateToProps){const n=Array.from(e.storeToProps.values()),t=Array.from(e.stateToProps.values()),i=n.filter(c=>t.includes(c));if(i.length>0){s.error(`[${r}] Overlapping prop keys detected in ${r} for storeToProps and stateToProps. Make sure to only define them once. Overlapping keys: ${i.join(", ")}`);return}}const d=new Map;e.eventToProps&&Object.keys(e.eventToProps).forEach(n=>{var t;d.set(n,(t=e.eventToProps)==null?void 0:t[n])}),o.connectedCallback=function(){s.debug(`[~${r}] connectedCallback called`);const n=p==null?void 0:p.call(this),t=s.getElement(this);return t.dataset.nylasId||(Object.defineProperty(t,"registerNylasComponent",{get(){return!0},enumerable:!0}),Object.defineProperty(t,"stateToProps",{get(){return e.stateToProps},enumerable:!0}),Object.defineProperty(t,"getStoresToProp",{get(){return e.getStoresToProp},enumerable:!0}),Object.defineProperty(t,"storeToProps",{get(){return e.storeToProps},enumerable:!0}),Object.defineProperty(t,"eventToProps",{get(){return d},enumerable:!0}),Object.defineProperty(t,"authToProp",{get(){return e.authToProp},enumerable:!0}),Object.defineProperty(t,"connectorToProp",{get(){return e.connectorToProp},enumerable:!0}),Object.defineProperty(t,"localPropsToProp",{get(){return e.localPropsToProp},enumerable:!0})),n},e.fireRegisterEvent&&(o.componentWillLoad=function(){const n=l==null?void 0:l.call(this),t=s.getElement(this),i={element:t,...e,eventToProps:d},c=m(o,i,e.registrationEventName);return t.dispatchEvent(c)&&s.debug(`[${r}] Component ${r} successfully fired registration event`),n},o.disconnectedCallback=function(){const n=a==null?void 0:a.call(this),t=s.getElement(this),i={element:t,...e,eventToProps:d},c=P(o,i,e.unregistrationEventName);return t.dispatchEvent(c)&&s.debug(`[${r}] Component ${r} successfully fired unregistration event`),n})}}exports.RegisterComponent=b;
|
package/dist/{register-component-152c6ad2-a06f58c2.js → register-component-83e24412-b666e56b.js}
RENAMED
|
@@ -1,51 +1,50 @@
|
|
|
1
|
-
import { d,
|
|
2
|
-
|
|
3
|
-
function b(e, r, i = "registerComponent") {
|
|
1
|
+
import { d, R as m, g as P } from "./index-20ea5b0c.js";
|
|
2
|
+
function b(e, o, i = "registerComponent") {
|
|
4
3
|
return new CustomEvent(i, {
|
|
5
4
|
bubbles: !0,
|
|
6
5
|
composed: !0,
|
|
7
|
-
detail:
|
|
6
|
+
detail: o
|
|
8
7
|
});
|
|
9
8
|
}
|
|
10
|
-
function
|
|
9
|
+
function T(e, o, i = "unregisterComponent") {
|
|
11
10
|
return new CustomEvent(i, {
|
|
12
11
|
bubbles: !0,
|
|
13
12
|
composed: !0,
|
|
14
|
-
detail:
|
|
13
|
+
detail: o
|
|
15
14
|
});
|
|
16
15
|
}
|
|
17
|
-
function
|
|
18
|
-
return (
|
|
19
|
-
const
|
|
20
|
-
d(`[${
|
|
21
|
-
const u =
|
|
16
|
+
function v(e) {
|
|
17
|
+
return (o, i) => {
|
|
18
|
+
const r = e.name;
|
|
19
|
+
d(`[${r}] Registering component ${r} being called on ${i}`);
|
|
20
|
+
const u = o.componentWillLoad;
|
|
22
21
|
if (!u) {
|
|
23
|
-
m(`[${
|
|
22
|
+
m(`[${r}] componentWillLoad lifecycle method in ${r} missing. Required for RegisterComponent decorator.`);
|
|
24
23
|
return;
|
|
25
24
|
}
|
|
26
|
-
const p =
|
|
25
|
+
const p = o.connectedCallback;
|
|
27
26
|
if (!p) {
|
|
28
|
-
m(`[${
|
|
27
|
+
m(`[${r}] connectedCallback lifecycle method in ${r} missing. Required for RegisterComponent decorator.`);
|
|
29
28
|
return;
|
|
30
29
|
}
|
|
31
|
-
const
|
|
32
|
-
if (!
|
|
33
|
-
m(`[${
|
|
30
|
+
const l = o.disconnectedCallback;
|
|
31
|
+
if (!l) {
|
|
32
|
+
m(`[${r}] disconnectedCallback lifecycle method in ${r} missing. Required for RegisterComponent decorator.`);
|
|
34
33
|
return;
|
|
35
34
|
}
|
|
36
35
|
if (e.storeToProps && e.stateToProps) {
|
|
37
36
|
const n = Array.from(e.storeToProps.values()), t = Array.from(e.stateToProps.values()), s = n.filter((c) => t.includes(c));
|
|
38
37
|
if (s.length > 0) {
|
|
39
|
-
m(`[${
|
|
38
|
+
m(`[${r}] Overlapping prop keys detected in ${r} for storeToProps and stateToProps. Make sure to only define them once. Overlapping keys: ${s.join(", ")}`);
|
|
40
39
|
return;
|
|
41
40
|
}
|
|
42
41
|
}
|
|
43
|
-
const
|
|
42
|
+
const a = /* @__PURE__ */ new Map();
|
|
44
43
|
e.eventToProps && Object.keys(e.eventToProps).forEach((n) => {
|
|
45
44
|
var t;
|
|
46
|
-
|
|
47
|
-
}),
|
|
48
|
-
d(`[~${
|
|
45
|
+
a.set(n, (t = e.eventToProps) == null ? void 0 : t[n]);
|
|
46
|
+
}), o.connectedCallback = function() {
|
|
47
|
+
d(`[~${r}] connectedCallback called`);
|
|
49
48
|
const n = p == null ? void 0 : p.call(this), t = P(this);
|
|
50
49
|
return t.dataset.nylasId || (Object.defineProperty(t, "registerNylasComponent", {
|
|
51
50
|
get() {
|
|
@@ -69,7 +68,7 @@ function y(e) {
|
|
|
69
68
|
enumerable: !0
|
|
70
69
|
}), Object.defineProperty(t, "eventToProps", {
|
|
71
70
|
get() {
|
|
72
|
-
return
|
|
71
|
+
return a;
|
|
73
72
|
},
|
|
74
73
|
enumerable: !0
|
|
75
74
|
}), Object.defineProperty(t, "authToProp", {
|
|
@@ -82,24 +81,29 @@ function y(e) {
|
|
|
82
81
|
return e.connectorToProp;
|
|
83
82
|
},
|
|
84
83
|
enumerable: !0
|
|
84
|
+
}), Object.defineProperty(t, "localPropsToProp", {
|
|
85
|
+
get() {
|
|
86
|
+
return e.localPropsToProp;
|
|
87
|
+
},
|
|
88
|
+
enumerable: !0
|
|
85
89
|
})), n;
|
|
86
|
-
}, e.fireRegisterEvent && (
|
|
90
|
+
}, e.fireRegisterEvent && (o.componentWillLoad = function() {
|
|
87
91
|
const n = u == null ? void 0 : u.call(this), t = P(this), s = {
|
|
88
92
|
element: t,
|
|
89
93
|
...e,
|
|
90
|
-
eventToProps:
|
|
91
|
-
}, c = b(
|
|
92
|
-
return t.dispatchEvent(c) && d(`[${
|
|
93
|
-
},
|
|
94
|
-
const n =
|
|
94
|
+
eventToProps: a
|
|
95
|
+
}, c = b(o, s, e.registrationEventName);
|
|
96
|
+
return t.dispatchEvent(c) && d(`[${r}] Component ${r} successfully fired registration event`), n;
|
|
97
|
+
}, o.disconnectedCallback = function() {
|
|
98
|
+
const n = l == null ? void 0 : l.call(this), t = P(this), s = {
|
|
95
99
|
element: t,
|
|
96
100
|
...e,
|
|
97
|
-
eventToProps:
|
|
98
|
-
}, c =
|
|
99
|
-
return t.dispatchEvent(c) && d(`[${
|
|
101
|
+
eventToProps: a
|
|
102
|
+
}, c = T(o, s, e.unregistrationEventName);
|
|
103
|
+
return t.dispatchEvent(c) && d(`[${r}] Component ${r} successfully fired unregistration event`), n;
|
|
100
104
|
});
|
|
101
105
|
};
|
|
102
106
|
}
|
|
103
107
|
export {
|
|
104
|
-
|
|
108
|
+
v as R
|
|
105
109
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const i=require("./index-33f74306.cjs");function c(n={}){const o={selectedConfiguration:{},configurations:[],calendars:[],currentUser:null,action:null,...n},e=i.createStore(o);function t(){e.set("selectedConfiguration",{...n.selectedConfiguration})}return e.onChange("action",async r=>{r||t()}),{...e,resetSelectedConfiguration:t}}exports.CreateNylasSchedulerConfigStore=c;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { e as i } from "./index-20ea5b0c.js";
|
|
2
|
+
function a(n = {}) {
|
|
3
|
+
const o = {
|
|
4
|
+
selectedConfiguration: {},
|
|
5
|
+
configurations: [],
|
|
6
|
+
calendars: [],
|
|
7
|
+
currentUser: null,
|
|
8
|
+
action: null,
|
|
9
|
+
...n
|
|
10
|
+
}, e = i(o);
|
|
11
|
+
function t() {
|
|
12
|
+
e.set("selectedConfiguration", { ...n.selectedConfiguration });
|
|
13
|
+
}
|
|
14
|
+
return e.onChange("action", async (r) => {
|
|
15
|
+
r || t();
|
|
16
|
+
}), {
|
|
17
|
+
...e,
|
|
18
|
+
resetSelectedConfiguration: t
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
a as C
|
|
23
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const v=require("./index-33f74306.cjs");exports.ErrorCategory=void 0;(function(o){o.Component="component",o.Api="api",o.Auth="auth"})(exports.ErrorCategory||(exports.ErrorCategory={}));var I;(function(o){o.endtime_not_in_future="endtime_not_in_future",o.no_booking_info="no_booking_info",o.no_timeslot_selected="no_timeslot_selected",o.no_timezone_selected="no_timezone_selected",o.no_booking_id="no_booking_id",o.invalid_start_time="invalid_start_time",o.invalid_end_time="invalid_end_time",o.invalid_timezone="invalid_timezone"})(I||(I={}));var b;(function(o){o.invalid_session="invalid_session",o.general_error="general_error",o.internal_error="internal_error",o.invalid_request_error="invalid_request_error",o.timeslot_not_available="timeslot_not_available"})(b||(b={}));class A{constructor(){this.component=e=>{const i=exports.ErrorCategory.Component,s=`${e} error`;return{endtime_not_in_future:(t='"endtime" can not be in the future')=>({title:s,message:t,category:i}),no_booking_info:(t="No booking info provided")=>({title:s,message:t,category:i}),no_timeslot_selected:(t="No timeslot selected")=>({title:s,message:t,category:i}),no_timezone_selected:(t="No timezone selected")=>({title:s,message:t,category:i}),no_booking_id:(t="No booking id provided")=>({title:s,message:t,category:i}),invalid_start_time:(t="Invalid start time")=>({title:s,message:t,category:i}),invalid_end_time:(t="Invalid end time")=>({title:s,message:t,category:i}),invalid_timezone:(t="Invalid timezone")=>({title:s,message:t,category:i})}},this.api=e=>{const i=exports.ErrorCategory.Api,s=`${e} error`;return{invalid_session:t=>({title:s,message:t,category:i}),general_error:t=>({title:s,message:t,category:i}),internal_error:t=>({title:s,message:t,category:i}),invalid_request_error:t=>({title:s,message:t,category:i}),timeslot_not_available:t=>({title:s,message:t,category:i})}}}}class z{constructor({schedulerAPIURL:e,schedulerStore:i,sessionId:s,configId:t}){this.errors=new A,this.schedulerStore=i,this.schedulerAPIURL=e,this.sessionId=s,this.configId=t}getHeaders(){return this.configId?{}:{Authorization:`Bearer ${this.sessionId}`}}async makeAPIRequest(e,i,s,t={}){try{const n=new URL(this.schedulerAPIURL);return n.pathname=e,await(await fetch(decodeURIComponent(n.toString()),{method:i,headers:{"Content-Type":"application/json",Origin:window.location.origin,...t},body:s})).json()}catch(n){return{error:{message:n.message,title:"API request failed",type:"api"}}}}selectDate(e){this.schedulerStore.set("selectedDate",e),this.schedulerStore.set("selectedTimeslot",null)}selectTime(e){this.schedulerStore.set("selectedTimeslot",e)}selectTimezone(e){this.schedulerStore.set("selectedTimezone",e)}toggleAdditionalData(e){this.schedulerStore.set("showBookingForm",e)}setParticipantName(e){const{bookingInfo:i}=this.schedulerStore.state;this.schedulerStore.set("bookingInfo",{...i,primaryParticipant:{...i==null?void 0:i.primaryParticipant,name:e}})}setParticipantEmail(e){const{bookingInfo:i}=this.schedulerStore.state;this.schedulerStore.set("bookingInfo",{...i,primaryParticipant:{...i==null?void 0:i.primaryParticipant,email:e}})}async resetStoreStateAndFetchAvailability(){const e=new Date,i=new Date(e.getFullYear(),e.getMonth(),1).getTime()/1e3,s=new Date(e.getFullYear(),e.getMonth()+1,1).getTime()/1e3,t=await this.getAvailability(i,s),n=this.schedulerStore.get("availability").find(a=>new Date(a.start_time)>new Date);let r=e;return n&&(r=n.start_time),this.schedulerStore.set("selectedDate",r),this.schedulerStore.set("eventInfo",null),this.schedulerStore.set("showBookingForm",!1),this.schedulerStore.set("selectedTimeslot",null),t}async setReschedule(e){const i=await this.resetStoreStateAndFetchAvailability();return this.schedulerStore.set("rescheduleBookingId",e),i}async setCancel(e){this.schedulerStore.set("cancelBookingId",e)}async resetCancel(){const e=await this.resetStoreStateAndFetchAvailability();return this.schedulerStore.set("cancelBookingId",""),this.schedulerStore.set("cancelledEventInfo",null),e}async bookTimeslot(e){var d;this.schedulerStore.set("isLoading",!0);const{selectedTimeslot:i,selectedTimezone:s,bookingInfo:t}=this.schedulerStore.state;if(!e&&!t)return{error:this.errors.component("Booking").no_booking_info()};const n=(e==null?void 0:e.timeslot)||i;if(!n)return{error:this.errors.component("Create Booking").no_timeslot_selected()};const r=e&&(e!=null&&e.timezone)?e==null?void 0:e.timezone:s;if(!r)return{error:this.errors.component("Create Booking").no_timezone_selected()};const a=e?e==null?void 0:e.primaryParticipant:t==null?void 0:t.primaryParticipant,c=e?(e==null?void 0:e.guests)||[]:(t==null?void 0:t.guests)||[],u=e?{...e==null?void 0:e.additionalFields,guests:c}:{...t==null?void 0:t.additionalFields,guests:c},S=this.getHeaders(),_=`/v3/scheduling/bookings${this.configId?`?configuration_id=${this.configId}`:""}`,l=await this.makeAPIRequest(decodeURIComponent(_),"POST",JSON.stringify({additional_fields:u,guest:{...a},start_time:n.start_time.getTime()/1e3,end_time:n.end_time.getTime()/1e3,timezone:r}),S);if("error"in l){this.schedulerStore.set("isLoading",!1);const h=(d=l.error)==null?void 0:d.type;let g=l.error;return h&&h in this.errors.api("Create Booking")&&(g=this.errors.api("Create Booking")[h]((g==null?void 0:g.message)||(g==null?void 0:g.title)||"Something went wrong")),{error:g}}return"data"in l&&this.schedulerStore.set("eventInfo",l==null?void 0:l.data),this.schedulerStore.set("isLoading",!1),l}async getUISettings(){var n;this.schedulerStore.set("isLoading",!0);const e=this.getHeaders(),s=`/v3/scheduling/ui-settings${this.configId?`?configuration_id=${this.configId}`:""}`,t=await this.makeAPIRequest(s,"GET",void 0,e);if("error"in t){this.schedulerStore.set("isLoading",!1);const r=(n=t.error)==null?void 0:n.type;let a=t.error;return r&&r in this.errors.api("Get UI Settings")&&(a=this.errors.api("Get UI Settings")[r]((a==null?void 0:a.message)||(a==null?void 0:a.title)||"Something went wrong")),{error:a}}return"data"in t&&this.schedulerStore.set("configSettings",t.data),this.schedulerStore.set("isLoading",!1),t}async getAvailability(e=0,i=0){var S,p,_;this.schedulerStore.set("isLoading",!0);const s=new URLSearchParams,t=new Date,n=t.getTime();if(i&&i<n/1e3)return this.schedulerStore.set("isLoading",!1),{error:this.errors.component("Get Availability").endtime_not_in_future()};if(!e){const l=new Date(t.getFullYear(),t.getMonth(),1);e=Math.floor(l.getTime()/1e3)}if(!i){const l=new Date(t.getFullYear(),t.getMonth()+1,0);i=Math.floor(l.getTime()/1e3)}s.append("start_time",encodeURIComponent(e.toString())),s.append("end_time",encodeURIComponent(i.toString())),this.configId&&s.append("configuration_id",encodeURIComponent(this.configId));const r=s.toString(),a=`/v3/scheduling/availability${r?`?${r}`:""}`,c=this.getHeaders(),u=await this.makeAPIRequest(decodeURIComponent(a),"GET",void 0,c);if("error"in u){this.schedulerStore.set("availability",[]),this.schedulerStore.set("isLoading",!1);const l=(S=u.error)==null?void 0:S.type;let d=u.error;return l&&l in this.errors.api("Get Availability")&&(d=this.errors.api("Get Availability")[l]((d==null?void 0:d.message)||(d==null?void 0:d.title)||"Something went wrong")),{error:d}}if("data"in u){const d=(((_=(p=u.data)==null?void 0:p.time_slots)==null?void 0:_.map(h=>({...h,start_time:new Date(h.start_time*1e3),end_time:new Date(h.end_time*1e3)})))||[]).filter(h=>h.start_time.getTime()>n);this.schedulerStore.set("availability",d)}return this.schedulerStore.set("isLoading",!1),u}async cancelBooking(e){var r;if(this.schedulerStore.set("isLoading",!0),!e)return{error:this.errors.component("Cancel Booking").no_booking_id()};const i=this.configId?`?configuration_id=${this.configId}`:"",s=`/v3/scheduling/bookings/${e}${i}`,t=this.getHeaders(),n=await this.makeAPIRequest(decodeURIComponent(s),"DELETE",JSON.stringify({action:"cancel"}),t);if("error"in n){this.schedulerStore.set("isLoading",!1);const a=(r=n.error)==null?void 0:r.type;let c=n.error;return a&&a in this.errors.api("Cancel Booking")&&(c=this.errors.api("Cancel Booking")[a]((c==null?void 0:c.message)||(c==null?void 0:c.title)||"Something went wrong")),{error:c}}return this.schedulerStore.set("cancelledEventInfo",{booking_id:e}),this.schedulerStore.set("isLoading",!1),n}async rescheduleBooking(e,i){var w;if(this.schedulerStore.set("isLoading",!0),!e)return{error:this.errors.component("Reschedule Booking").no_booking_id()};const s=this.errors.api("Reschedule Booking"),t=this.errors.component("Reschedule Booking"),{bookingInfo:n,selectedTimeslot:r,selectedTimezone:a}=this.schedulerStore.state,{startTime:c,endTime:u,timezone:S}=i,p=c||(r==null?void 0:r.start_time);if(!p)return{error:t.invalid_start_time('Please pass "startTime" in data or set "selectedTimeslot" in the defaultSchedulerState.')};const _=u||(r==null?void 0:r.end_time);if(!_)return{error:t.invalid_end_time('Please pass "endTime" in data or set "selectedTimeslot" in the defaultSchedulerState.')};const l=S||a;if(!l)return{error:t.invalid_timezone('Please pass "timezone" in data or set "selectedTimezone" in the defaultSchedulerState.')};const d=i?i==null?void 0:i.primaryParticipant:n==null?void 0:n.primaryParticipant,h=i?(i==null?void 0:i.guests)||[]:(n==null?void 0:n.guests)||[],g=i?{...i==null?void 0:i.additionalFields,guests:h}:{...n==null?void 0:n.additionalFields,guests:h},P=this.configId?`?configuration_id=${this.configId}`:"",k=`/v3/scheduling/bookings/${e}${P}`,T=this.getHeaders(),m=await this.makeAPIRequest(decodeURIComponent(k),"PATCH",JSON.stringify({start_time:p.getTime()/1e3,end_time:_.getTime()/1e3,time_zone:l,additional_fields:g,guest:{...d}}),T);if("error"in m){this.schedulerStore.set("isLoading",!1);const y=(w=m.error)==null?void 0:w.type;let f=m.error;y&&y in s&&(f=s[y]((f==null?void 0:f.message)||(f==null?void 0:f.title)||"Something went wrong"))}return"data"in m&&this.schedulerStore.set("eventInfo",m==null?void 0:m.data),this.schedulerStore.set("isLoading",!1),m}}function L(o={}){const e={selectedDate:null,selectedLanguage:navigator.language,selectedTimezone:Intl.DateTimeFormat().resolvedOptions().timeZone,selectedTimeslot:null,showBookingForm:!1,selectableDates:null,availability:[],state:"ready",eventInfo:null,cancelledEventInfo:null,isLoading:!1,nylasBranding:!0,...o};v.debug("[defaultNylasStoreState]: ",e);const i=v.createStore(e);return i.onChange("availability",s=>{v.debug("[availability]: ",s);const t=s.map(n=>n.start_time);v.debug("[selectableDates]: ",t),i.set("selectableDates",t)}),i.reset=()=>{for(const s in e){const t=e[s];i.set(s,t)}},i}exports.CreateNylasSchedulerStore=L;exports.NylaSchedulerAPIConnector=z;
|