@nylas/react 1.1.3 → 1.1.4
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_2.entry-6753bd65.js +25 -0
- package/dist/add-circle-icon_2.entry-cd9a7f37.cjs +1 -0
- package/dist/archive-icon.entry-434d1696.js +15 -0
- package/dist/archive-icon.entry-7cb1c265.cjs +1 -0
- package/dist/arrow-icon.entry-20b50784.js +15 -0
- package/dist/{arrow-icon.entry-2dfd8319.cjs → arrow-icon.entry-83c3105b.cjs} +1 -1
- package/dist/bold-icon.entry-0e3d84e1.cjs +1 -0
- package/dist/bold-icon.entry-34b18d0d.js +15 -0
- package/dist/{button-component_2.entry-27a504d9.cjs → button-component_2.entry-54101987.cjs} +1 -1
- package/dist/{button-component_2.entry-697bf5ac.js → button-component_2.entry-8a5e99da.js} +9 -9
- package/dist/{calendar-agenda-fill-icon_51.entry-a25262b3.cjs → calendar-agenda-fill-icon_51.entry-1920adc2.cjs} +2 -2
- package/dist/{calendar-agenda-fill-icon_51.entry-52b5bf31.js → calendar-agenda-fill-icon_51.entry-a351dca5.js} +87 -87
- package/dist/{calendar-cancel-icon.entry-c6e2eed6.cjs → calendar-cancel-icon.entry-00756264.cjs} +1 -1
- package/dist/{calendar-cancel-icon.entry-e6a433a2.js → calendar-cancel-icon.entry-f83e9b41.js} +2 -2
- package/dist/{calendar-check-icon_2.entry-d88307d6.js → calendar-check-icon_2.entry-1817540c.js} +7 -7
- package/dist/{calendar-check-icon_2.entry-45cad6f1.cjs → calendar-check-icon_2.entry-6ac948fc.cjs} +1 -1
- package/dist/{calendar-icon.entry-2badc962.js → calendar-icon.entry-362428bf.js} +4 -4
- package/dist/{calendar-icon.entry-b2fffd21.cjs → calendar-icon.entry-68e53f52.cjs} +1 -1
- package/dist/{checkbox-component_2.entry-5ab55050.js → checkbox-component_2.entry-0d7c1916.js} +3 -3
- package/dist/{checkbox-component_2.entry-3926b644.cjs → checkbox-component_2.entry-5ce9807d.cjs} +1 -1
- package/dist/{chevron-icon_3.entry-664fae5d.js → chevron-icon_3.entry-37c087a7.js} +6 -6
- package/dist/{chevron-icon_3.entry-1fe5d097.cjs → chevron-icon_3.entry-89c52603.cjs} +1 -1
- package/dist/{clock-icon_4.entry-f11f9dad.js → clock-icon_4.entry-2e78febe.js} +15 -15
- package/dist/{clock-icon_4.entry-efec2c08.cjs → clock-icon_4.entry-496058ef.cjs} +1 -1
- package/dist/{constants-50c3e067-33cf0ffe.js → constants-c31dccfe-04b9cd8a.js} +2 -2
- package/dist/{constants-50c3e067-5ec3f879.cjs → constants-c31dccfe-1a739653.cjs} +2 -2
- package/dist/{copy-icon.entry-70131e8e.js → copy-icon.entry-6d4e05b0.js} +7 -7
- package/dist/{copy-icon.entry-3965f206.cjs → copy-icon.entry-a1baee33.cjs} +1 -1
- package/dist/{delete-icon.entry-5d067fef.cjs → delete-icon.entry-e98b336e.cjs} +1 -1
- package/dist/{delete-icon.entry-e003695d.js → delete-icon.entry-ea06b42a.js} +5 -5
- package/dist/document-refresh-icon.entry-09750b52.cjs +1 -0
- package/dist/document-refresh-icon.entry-afae6621.js +15 -0
- package/dist/elements/index.d.ts +0 -11
- package/dist/feedbackSync-ab657d65-e650e46d.cjs +448 -0
- package/dist/feedbackSync-ab657d65-e8b7c001.js +6035 -0
- package/dist/folder-icon.entry-5c3f4e8f.cjs +1 -0
- package/dist/folder-icon.entry-6096fbf4.js +15 -0
- package/dist/forward-icon.entry-4089e3bb.cjs +1 -0
- package/dist/forward-icon.entry-da319c05.js +15 -0
- package/dist/{globe-icon.entry-6fc456c7.js → globe-icon.entry-59f4c2f9.js} +7 -7
- package/dist/{globe-icon.entry-8c3c9e48.cjs → globe-icon.entry-e8ca972e.cjs} +1 -1
- package/dist/{google-logo-icon_4.entry-d6e0c4c0.js → google-logo-icon_4.entry-d4b8926f.js} +39 -39
- package/dist/google-logo-icon_4.entry-e2001f83.cjs +1 -0
- package/dist/inbox-icon.entry-70dae5ec.js +15 -0
- package/dist/inbox-icon.entry-80ee9082.cjs +1 -0
- package/dist/{index-11f33e47.cjs → index-6b9d4b01.cjs} +30 -31
- package/dist/{index-a282e817.js → index-e475e0c0.js} +2547 -2622
- package/dist/index.d.ts +1 -1
- package/dist/{index.es-ab9affcc-18263b66.cjs → index.es-b475d61f-68a74a28.cjs} +5 -5
- package/dist/{index.es-ab9affcc-30461b18.js → index.es-b475d61f-bfa2cba2.js} +125 -131
- package/dist/{info-icon_2.entry-d20b975c.js → info-icon_2.entry-2bb60213.js} +5 -5
- package/dist/{info-icon_2.entry-e582ac10.cjs → info-icon_2.entry-f1b1dfba.cjs} +1 -1
- package/dist/{input-color-picker.entry-27f4288f.js → input-color-picker.entry-5ae45a9e.js} +3 -3
- package/dist/{input-color-picker.entry-c6a28671.cjs → input-color-picker.entry-b669f7fb.cjs} +1 -1
- package/dist/{input-component.entry-b6f1c417.js → input-component.entry-cb958501.js} +2 -2
- package/dist/{input-component.entry-744fcec1.cjs → input-component.entry-eeb95361.cjs} +1 -1
- package/dist/{input-dropdown.entry-f13234d7.cjs → input-dropdown.entry-0b458f68.cjs} +1 -1
- package/dist/{input-dropdown.entry-18744def.js → input-dropdown.entry-962605f8.js} +4 -4
- package/dist/italic-icon.entry-4a89e289.cjs +1 -0
- package/dist/italic-icon.entry-5be07509.js +15 -0
- package/dist/{multi-select-dropdown.entry-924809e1.js → multi-select-dropdown.entry-3084e1fc.js} +2 -2
- package/dist/{multi-select-dropdown.entry-dde671d7.cjs → multi-select-dropdown.entry-a66408a2.cjs} +1 -1
- package/dist/nylas-booked-event-card_12.entry-227ccf31.cjs +1 -0
- package/dist/{nylas-booked-event-card_12.entry-52c3111d.js → nylas-booked-event-card_12.entry-29e2a4b1.js} +64 -63
- package/dist/{nylas-form-card.entry-b0a2403f.js → nylas-form-card.entry-33b4c295.js} +11 -11
- package/dist/{nylas-form-card.entry-ab61fdc5.cjs → nylas-form-card.entry-8465eccf.cjs} +1 -1
- package/dist/{nylas-if-state.entry-523fdc6b.js → nylas-if-state.entry-9d96fc87.js} +2 -2
- package/dist/{nylas-if-state.entry-53883c36.cjs → nylas-if-state.entry-adb6103a.cjs} +1 -1
- package/dist/{nylas-login.entry-d9bf3974.js → nylas-login.entry-3f7c195e.js} +7 -7
- package/dist/{nylas-login.entry-05e1df3e.cjs → nylas-login.entry-78b968d1.cjs} +1 -1
- package/dist/nylas-provider.entry-19635620.js +264 -0
- package/dist/nylas-provider.entry-b918d0f6.cjs +1 -0
- package/dist/nylas-reminder-emails.entry-ec79b757.js +168 -0
- package/dist/nylas-reminder-emails.entry-ee76db24.cjs +4 -0
- package/dist/{nylas-reminder-time_2.entry-9589d5f2.js → nylas-reminder-time_2.entry-105de2d0.js} +42 -39
- package/dist/nylas-reminder-time_2.entry-83ecc1d4.cjs +1 -0
- package/dist/{nylas-scheduler-editor.entry-1a2f3ee0.cjs → nylas-scheduler-editor.entry-cfed7ae2.cjs} +2 -2
- package/dist/{nylas-scheduler-editor.entry-b434b526.js → nylas-scheduler-editor.entry-e848771f.js} +3 -3
- package/dist/{nylas-scheduling.entry-b71080c8.js → nylas-scheduling.entry-da987c02.js} +19 -19
- package/dist/nylas-scheduling.entry-e989cf9e.cjs +1 -0
- package/dist/{nylas-time-window-picker.entry-a6d1c648.cjs → nylas-time-window-picker.entry-1f76b577.cjs} +1 -1
- package/dist/{nylas-time-window-picker.entry-c1ee860a.js → nylas-time-window-picker.entry-3c6b29d9.js} +20 -20
- package/dist/{person-icon.entry-8833e3cc.js → person-icon.entry-79fcd9fb.js} +2 -2
- package/dist/{person-icon.entry-80c9022e.cjs → person-icon.entry-82bbb87c.cjs} +1 -1
- package/dist/play-icon.entry-3f357ea4.cjs +1 -0
- package/dist/play-icon.entry-97b40470.js +15 -0
- package/dist/react.cjs +1 -1
- package/dist/react.js +93 -104
- package/dist/{refresh-icon.entry-4d6791bd.js → refresh-icon.entry-1427a5e6.js} +4 -4
- package/dist/{refresh-icon.entry-d4cc16b7.cjs → refresh-icon.entry-7ce5ec90.cjs} +1 -1
- package/dist/{register-component-a7ea27ad-2343f3df.cjs → register-component-679c1308-b5a96acf.cjs} +1 -1
- package/dist/{register-component-a7ea27ad-fa2c4b17.js → register-component-679c1308-de697ecb.js} +1 -1
- package/dist/reply-all-icon.entry-cf8114db.cjs +1 -0
- package/dist/reply-all-icon.entry-f1165660.js +15 -0
- package/dist/reply-icon.entry-3a601cff.js +15 -0
- package/dist/reply-icon.entry-3db337c9.cjs +1 -0
- package/dist/{scheduler-config-store-2a3b403d-5176cd45.js → scheduler-config-store-2a3b403d-e5210f72.js} +1 -1
- package/dist/{scheduler-config-store-2a3b403d-2263f999.cjs → scheduler-config-store-2a3b403d-e6f5bcab.cjs} +1 -1
- package/dist/{scheduler-store-33ab8dea-a0b39d36.cjs → scheduler-store-908886c8-62d14677.cjs} +1 -1
- package/dist/{scheduler-store-33ab8dea-9801357a.js → scheduler-store-908886c8-b0f43cb9.js} +1 -1
- package/dist/sent-icon.entry-2c7bd48e.js +15 -0
- package/dist/sent-icon.entry-708b9a2b.cjs +1 -0
- package/dist/spam-icon.entry-3106ed3d.js +15 -0
- package/dist/spam-icon.entry-fa8b80c6.cjs +1 -0
- package/dist/star-icon.entry-88501c8b.cjs +1 -0
- package/dist/star-icon.entry-b15601ca.js +15 -0
- package/dist/stop-icon.entry-3475e257.cjs +1 -0
- package/dist/stop-icon.entry-f926a8db.js +15 -0
- package/dist/{textarea-component.entry-019e75d0.cjs → textarea-component.entry-683c2959.cjs} +1 -1
- package/dist/{textarea-component.entry-174089bc.js → textarea-component.entry-d1f4dd9a.js} +2 -2
- package/dist/{time-period-selector.entry-8466d0f2.cjs → time-period-selector.entry-8cfdf750.cjs} +1 -1
- package/dist/{time-period-selector.entry-62c854d1.js → time-period-selector.entry-e97f86fd.js} +4 -4
- package/dist/{translate-icon.entry-73f7127b.js → translate-icon.entry-09c5574f.js} +4 -4
- package/dist/{translate-icon.entry-7d5cf4b8.cjs → translate-icon.entry-5757c37c.cjs} +1 -1
- package/dist/trash-fill-icon.entry-470ec1ff.js +15 -0
- package/dist/trash-fill-icon.entry-4bbfabcc.cjs +1 -0
- package/dist/underline-icon.entry-6d729068.cjs +1 -0
- package/dist/underline-icon.entry-9fe74ba7.js +15 -0
- package/dist/{warning-icon.entry-92638eeb.cjs → warning-icon.entry-c1d48318.cjs} +1 -1
- package/dist/{warning-icon.entry-abf896c3.js → warning-icon.entry-d924f8f9.js} +5 -5
- package/package.json +2 -2
- package/dist/add-circle-icon_2.entry-b77120e5.cjs +0 -1
- package/dist/add-circle-icon_2.entry-fbc1e82b.js +0 -25
- package/dist/archive-icon_7.entry-30962e70.js +0 -75
- package/dist/archive-icon_7.entry-dd8c7642.cjs +0 -1
- package/dist/arrow-icon.entry-5b436054.js +0 -15
- package/dist/bold-icon_3.entry-5120a9c8.js +0 -35
- package/dist/bold-icon_3.entry-da2d1270.cjs +0 -1
- package/dist/document-refresh-icon.entry-30c974df.cjs +0 -1
- package/dist/document-refresh-icon.entry-b4e01cd4.js +0 -15
- package/dist/elements-dc5b338e-55823d00.js +0 -28031
- package/dist/elements-dc5b338e-6883a39e.cjs +0 -16516
- package/dist/feedbackSync-81d4c4d8-dd4d2e32.js +0 -11735
- package/dist/feedbackSync-81d4c4d8-f4e78902.cjs +0 -455
- package/dist/flow-40ff9cea-6f8c30e2.cjs +0 -9
- package/dist/flow-40ff9cea-ee70fdf5.js +0 -505
- package/dist/focus-visible-e8093c16-431bbe59.cjs +0 -1
- package/dist/focus-visible-e8093c16-f403fee8.js +0 -84
- package/dist/forward-icon_6.entry-3bb91d58.js +0 -953
- package/dist/forward-icon_6.entry-ceec2371.cjs +0 -3
- package/dist/google-logo-icon_4.entry-4eb16cd2.cjs +0 -1
- package/dist/mailbox-store-affca6de-9451094e.cjs +0 -1
- package/dist/mailbox-store-affca6de-d601dc6b.js +0 -380
- package/dist/nylas-booked-event-card_12.entry-d89c1f9d.cjs +0 -1
- package/dist/nylas-list-folders.entry-4ef6cb3d.cjs +0 -1
- package/dist/nylas-list-folders.entry-e37d069f.js +0 -120
- package/dist/nylas-list-threads.entry-3be623e9.cjs +0 -1
- package/dist/nylas-list-threads.entry-8ba62db8.js +0 -70
- package/dist/nylas-mailbox-pagination.entry-3dd05cf4.cjs +0 -1
- package/dist/nylas-mailbox-pagination.entry-50d9d9e3.js +0 -101
- package/dist/nylas-mailbox-toolbar-button.entry-9a77d137.js +0 -82
- package/dist/nylas-mailbox-toolbar-button.entry-d87b55de.cjs +0 -1
- package/dist/nylas-mailbox.entry-cb7d1031.js +0 -134
- package/dist/nylas-mailbox.entry-f7db9aa8.cjs +0 -1
- package/dist/nylas-provider.entry-1716bf48.cjs +0 -1
- package/dist/nylas-provider.entry-7aa46ea2.js +0 -145
- package/dist/nylas-reminder-emails.entry-88a862cd.cjs +0 -4
- package/dist/nylas-reminder-emails.entry-a86231b7.js +0 -129
- package/dist/nylas-reminder-time_2.entry-bc76d4ab.cjs +0 -1
- package/dist/nylas-scheduling.entry-59e5e8c1.cjs +0 -1
- package/dist/nylas-threads-refresh.entry-544ca90a.js +0 -74
- package/dist/nylas-threads-refresh.entry-7ada7b2d.cjs +0 -1
- package/dist/nylas-threads-search.entry-181ba46a.js +0 -69
- package/dist/nylas-threads-search.entry-f1cb19e4.cjs +0 -1
- package/dist/nylas-view-thread.entry-6ae8dd64.cjs +0 -1
- package/dist/nylas-view-thread.entry-c066f522.js +0 -203
- package/dist/play-icon_2.entry-801c85bc.cjs +0 -1
- package/dist/play-icon_2.entry-efca8f00.js +0 -25
|
@@ -1,203 +0,0 @@
|
|
|
1
|
-
import { r as k, c as p, d, h as a, t as M, F as m, H as x, g as E, s as D, a as S, v as g } from "./index-a282e817.js";
|
|
2
|
-
import { R as T } from "./register-component-a7ea27ad-fa2c4b17.js";
|
|
3
|
-
import "react";
|
|
4
|
-
import "react-dom";
|
|
5
|
-
function R(t, e, s, o, r) {
|
|
6
|
-
if (!o || !s || s.children.length > 0)
|
|
7
|
-
return;
|
|
8
|
-
d("[nylas-view-thread] Rendering email", { message: t, attachments: e, viewEmailElement: o });
|
|
9
|
-
const n = o.cloneNode(!0);
|
|
10
|
-
n.message = t.data, n.parent = r, s.appendChild(n);
|
|
11
|
-
}
|
|
12
|
-
const u = ({ viewEmailElement: t, message: e, attachments: s, onMessageClick: o, onShowContactDataClick: r, parent: n }) => {
|
|
13
|
-
var l, i, c, y, f, w, b;
|
|
14
|
-
return a(
|
|
15
|
-
m,
|
|
16
|
-
null,
|
|
17
|
-
a(
|
|
18
|
-
"div",
|
|
19
|
-
{ key: e.id, class: "message" },
|
|
20
|
-
a(
|
|
21
|
-
"div",
|
|
22
|
-
{ class: "sub-header", "data-id": e.data.id, onClick: o },
|
|
23
|
-
a("div", { class: "avatar" }, e.data.from && ((l = e.data.from[0]) == null ? void 0 : l.name) && ((c = (i = e.data.from[0]) == null ? void 0 : i.name[0]) == null ? void 0 : c.toUpperCase())),
|
|
24
|
-
a(
|
|
25
|
-
"div",
|
|
26
|
-
{ class: "from" },
|
|
27
|
-
a("span", { class: "name" }, e.data.from && ((y = e.data.from[0]) == null ? void 0 : y.name)),
|
|
28
|
-
" ",
|
|
29
|
-
a("span", { class: "email" }, e.data.from && ((f = e.data.from[0]) == null ? void 0 : f.email))
|
|
30
|
-
),
|
|
31
|
-
a(
|
|
32
|
-
"div",
|
|
33
|
-
{ class: "date" },
|
|
34
|
-
new Date(e.data.date * 1e3).toLocaleTimeString(void 0, {
|
|
35
|
-
timeStyle: "short"
|
|
36
|
-
}),
|
|
37
|
-
" ",
|
|
38
|
-
"(",
|
|
39
|
-
D(new Date(e.data.date * 1e3)),
|
|
40
|
-
")"
|
|
41
|
-
),
|
|
42
|
-
a(
|
|
43
|
-
"sp-button-group",
|
|
44
|
-
{ class: "buttons" },
|
|
45
|
-
a("nylas-summarize-message-button", { message: e.data })
|
|
46
|
-
),
|
|
47
|
-
e.collapse && a("div", { class: "snippet" }, e.data.snippet),
|
|
48
|
-
!e.collapse && e.data.to && a(
|
|
49
|
-
"div",
|
|
50
|
-
{ class: "to" },
|
|
51
|
-
a("span", null, "to"),
|
|
52
|
-
" ",
|
|
53
|
-
S(e.data.to),
|
|
54
|
-
" ",
|
|
55
|
-
a(
|
|
56
|
-
"button",
|
|
57
|
-
{ type: "button", value: e.data.id, onClick: r, class: {
|
|
58
|
-
expand: !0,
|
|
59
|
-
"expand--showContactData": e.showContactData
|
|
60
|
-
} },
|
|
61
|
-
a("chevron-icon", null)
|
|
62
|
-
)
|
|
63
|
-
)
|
|
64
|
-
),
|
|
65
|
-
e.showContactData && a(
|
|
66
|
-
"div",
|
|
67
|
-
{ class: "address-info" },
|
|
68
|
-
a("div", { class: "label" }, "From"),
|
|
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: "" })),
|
|
70
|
-
e.data.to && a(
|
|
71
|
-
m,
|
|
72
|
-
null,
|
|
73
|
-
a("div", { class: "label" }, "To"),
|
|
74
|
-
a("div", { class: "value" }, e.data.to.map((h) => a("div", null, g(h))))
|
|
75
|
-
),
|
|
76
|
-
typeof e.data.cc < "u" && e.data.cc.length > 0 && a(
|
|
77
|
-
m,
|
|
78
|
-
null,
|
|
79
|
-
a("div", { class: "label" }, "CC"),
|
|
80
|
-
a("div", { class: "value" }, e.data.cc.map((h) => a("div", null, g(h))))
|
|
81
|
-
)
|
|
82
|
-
),
|
|
83
|
-
!e.collapse && t && a("div", { key: e.id, ref: (h) => R(e, s, h, t, n) }),
|
|
84
|
-
!e.collapse && !t && a("nylas-view-email", { key: e.id, message: e.data, parent: n })
|
|
85
|
-
),
|
|
86
|
-
a("hr", null)
|
|
87
|
-
);
|
|
88
|
-
}, A = ':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}}', V = A;
|
|
89
|
-
var _ = function(t, e, s, o) {
|
|
90
|
-
var r = arguments.length, n = r < 3 ? e : o === null ? o = Object.getOwnPropertyDescriptor(e, s) : o, l;
|
|
91
|
-
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
92
|
-
n = Reflect.decorate(t, e, s, o);
|
|
93
|
-
else
|
|
94
|
-
for (var i = t.length - 1; i >= 0; i--)
|
|
95
|
-
(l = t[i]) && (n = (r < 3 ? l(n) : r > 3 ? l(e, s, n) : l(e, s)) || n);
|
|
96
|
-
return r > 3 && n && Object.defineProperty(e, s, n), n;
|
|
97
|
-
}, v = function(t, e) {
|
|
98
|
-
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
99
|
-
return Reflect.metadata(t, e);
|
|
100
|
-
};
|
|
101
|
-
const C = class {
|
|
102
|
-
constructor(t) {
|
|
103
|
-
k(this, t), this.threadSelected = p(this, "threadSelected", 7), this.showContactDataClicked = p(this, "showContactDataClicked", 7), this.messageClicked = p(this, "messageClicked", 7), this.nylasViewEmailElement = null, this.nylasComposerElement = null, this.onShowContactDataClick = (e) => {
|
|
104
|
-
e.stopPropagation();
|
|
105
|
-
const o = e.target.value, r = this.internalMessages.find((l) => l.data.id === o);
|
|
106
|
-
if (!r) {
|
|
107
|
-
d(`[nylas-view-thread] Could not find message ${o}`);
|
|
108
|
-
return;
|
|
109
|
-
}
|
|
110
|
-
this.showContactDataClicked.emit(r.data).defaultPrevented || (r.showContactData = !r.showContactData, this.internalMessages = [...this.internalMessages]), d(`[nylas-view-thread] show contact data clicked ${o} ${r.showContactData ? "collapsed" : "expanded"}`);
|
|
111
|
-
}, this.onMessageClick = (e) => {
|
|
112
|
-
var l;
|
|
113
|
-
const o = e.target.dataset.id, r = this.internalMessages.find((i) => i.data.id === o);
|
|
114
|
-
if (!r) {
|
|
115
|
-
d(`[nylas-view-thread] Could not find message ${o}`);
|
|
116
|
-
return;
|
|
117
|
-
}
|
|
118
|
-
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]), d(`[nylas-view-thread] message clicked ${o} ${r.collapse ? "collapsed" : "expanded"}`);
|
|
119
|
-
}, this.onShowAllEmailsClick = () => {
|
|
120
|
-
this.showAllEmails = !this.showAllEmails;
|
|
121
|
-
}, this.showComposerClick = () => {
|
|
122
|
-
this.showComposer = !this.showComposer;
|
|
123
|
-
}, this.draft = void 0, this.thread = void 0, this.messages = [], this.attachments = [], this.state = "loading", this.internalMessages = [], this.showAllEmails = !1, this.showComposer = !1;
|
|
124
|
-
}
|
|
125
|
-
connectedCallback() {
|
|
126
|
-
}
|
|
127
|
-
disconnectedCallback() {
|
|
128
|
-
}
|
|
129
|
-
async componentWillLoad() {
|
|
130
|
-
d("[nylas-view-thread] Component will load"), this.updateInternalMessages(this.messages);
|
|
131
|
-
const t = this.host.querySelector("template.nylas-view-email");
|
|
132
|
-
if (!t) {
|
|
133
|
-
d("[nylas-view-thread] Could not find template");
|
|
134
|
-
return;
|
|
135
|
-
}
|
|
136
|
-
const e = document.importNode(t.content, !0);
|
|
137
|
-
this.nylasViewEmailElement = e.querySelector("nylas-view-email");
|
|
138
|
-
const s = this.host.querySelector("template.nylas-composer");
|
|
139
|
-
if (!s) {
|
|
140
|
-
d("[nylas-view-thread] Could not find composer template");
|
|
141
|
-
return;
|
|
142
|
-
}
|
|
143
|
-
const o = document.importNode(s.content, !0);
|
|
144
|
-
this.nylasComposerElement = o.querySelector("nylas-composer");
|
|
145
|
-
}
|
|
146
|
-
async componentDidLoad() {
|
|
147
|
-
d("[nylas-view-thread] Component did load");
|
|
148
|
-
}
|
|
149
|
-
async threadChanged(t) {
|
|
150
|
-
d("[nylas-view-thread] Thread changed", { thread: t }), this.internalMessages = [], this.threadSelected.emit(t).defaultPrevented || d("[nylas-view-thread] Default event not prevented, initializing");
|
|
151
|
-
}
|
|
152
|
-
updateInternalMessages(t) {
|
|
153
|
-
d("[nylas-view-thread] Updating internal messages", { messages: t });
|
|
154
|
-
const e = t.sort((s, o) => s.date > o.date ? 1 : -1).map((s, o) => ({
|
|
155
|
-
id: s.id,
|
|
156
|
-
data: s,
|
|
157
|
-
collapse: o !== t.length - 1,
|
|
158
|
-
showContactData: !1
|
|
159
|
-
}));
|
|
160
|
-
this.internalMessages = e;
|
|
161
|
-
}
|
|
162
|
-
render() {
|
|
163
|
-
var r, n, l;
|
|
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];
|
|
165
|
-
return a(x, { key: "95ab8e5e5e9e8a986132a98e0ea325d9200702a9" }, a("sp-theme", { key: "6b51c27dcac47e5607a0f35401b53c66066d69b0", scale: "medium", color: "dark" }, a("div", { key: "28753bfffd987848a4e8308490423930395f0375", class: "view-thread" }, a("div", { key: "4b95425cc9a6a8e2c81d747852d9da5f07bd67b4", class: "header" }, a("div", { key: "d5960331681445ad3766b333a8195d951e74c6e6", class: "subject" }, (r = this.thread) == null ? void 0 : r.subject), a("div", { key: "3cbd5fe0ffb99ed1648cff0fd1af5b3ff30d0848", 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: "a95eb69dbc861e3473f7d5f9fda4ff4ef4f8fdd3", 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) => {
|
|
166
|
-
d("[nylas-view-thread] Send event", { message: i.detail.message, replyBody: i.detail.replyBody });
|
|
167
|
-
} })))));
|
|
168
|
-
}
|
|
169
|
-
get host() {
|
|
170
|
-
return E(this);
|
|
171
|
-
}
|
|
172
|
-
static get watchers() {
|
|
173
|
-
return {
|
|
174
|
-
thread: ["threadChanged"],
|
|
175
|
-
messages: ["updateInternalMessages"]
|
|
176
|
-
};
|
|
177
|
-
}
|
|
178
|
-
};
|
|
179
|
-
_([
|
|
180
|
-
T({
|
|
181
|
-
name: "nylas-view-thread",
|
|
182
|
-
stateToProps: /* @__PURE__ */ new Map([
|
|
183
|
-
["mailbox.selectedThread", "thread"],
|
|
184
|
-
["mailbox.messages", "messages"],
|
|
185
|
-
["mailbox.state", "state"]
|
|
186
|
-
]),
|
|
187
|
-
eventToProps: {
|
|
188
|
-
threadSelected: async (t, e) => {
|
|
189
|
-
d("[nylas-view-thread] Nylas init event. Fetching thread messages.", { event: t });
|
|
190
|
-
const s = t.detail;
|
|
191
|
-
s && s.id && await e.messages.getThreadMessages(s.id);
|
|
192
|
-
}
|
|
193
|
-
},
|
|
194
|
-
fireRegisterEvent: !0
|
|
195
|
-
}),
|
|
196
|
-
v("design:type", Function),
|
|
197
|
-
v("design:paramtypes", []),
|
|
198
|
-
v("design:returntype", void 0)
|
|
199
|
-
], C.prototype, "render", null);
|
|
200
|
-
C.style = V;
|
|
201
|
-
export {
|
|
202
|
-
C as nylas_view_thread
|
|
203
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-11f33e47.cjs");require("react");require("react-dom");const o=".sc-play-icon-h{display:flex}",n=o,s=class{constructor(e){t.registerInstance(this,e),this.width="15",this.height="15"}render(){return t.h("svg",{key:"aaf8436c2734b8050426adf588b82c23fd532517",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},t.h("path",{key:"0b5fe250458b42fa9f53fa465e5678d8784ba79c",d:"M21 12L3 21V3L21 12Z",stroke:"auto","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))}};s.style=n;const h=".sc-stop-icon-h{display:flex}",r=h,i=class{constructor(e){t.registerInstance(this,e),this.width="15",this.height="15"}render(){return t.h("svg",{key:"df57509ac31c75b5f8ea227a6356b588bbbe5e42",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},t.h("path",{key:"75d4a6c7f65327dd2107bd4051609ebc300daa17",d:"M4 4H20V20H4V4Z",stroke:"auto","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))}};i.style=r;exports.play_icon=s;exports.stop_icon=i;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { r as o, h as t } from "./index-a282e817.js";
|
|
2
|
-
import "react";
|
|
3
|
-
import "react-dom";
|
|
4
|
-
const e = ".sc-play-icon-h{display:flex}", i = e, h = class {
|
|
5
|
-
constructor(s) {
|
|
6
|
-
o(this, s), this.width = "15", this.height = "15";
|
|
7
|
-
}
|
|
8
|
-
render() {
|
|
9
|
-
return t("svg", { key: "aaf8436c2734b8050426adf588b82c23fd532517", width: this.width, height: this.height, viewBox: "0 0 24 24", fill: "auto", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "0b5fe250458b42fa9f53fa465e5678d8784ba79c", d: "M21 12L3 21V3L21 12Z", stroke: "auto", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }));
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
h.style = i;
|
|
13
|
-
const n = ".sc-stop-icon-h{display:flex}", c = n, r = class {
|
|
14
|
-
constructor(s) {
|
|
15
|
-
o(this, s), this.width = "15", this.height = "15";
|
|
16
|
-
}
|
|
17
|
-
render() {
|
|
18
|
-
return t("svg", { key: "df57509ac31c75b5f8ea227a6356b588bbbe5e42", width: this.width, height: this.height, viewBox: "0 0 24 24", fill: "auto", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "75d4a6c7f65327dd2107bd4051609ebc300daa17", d: "M4 4H20V20H4V4Z", stroke: "auto", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }));
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
r.style = c;
|
|
22
|
-
export {
|
|
23
|
-
h as play_icon,
|
|
24
|
-
r as stop_icon
|
|
25
|
-
};
|