@nylas/react 1.1.0-canary.4 → 1.1.0-canary.5
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_22.entry-f699d91e.js → add-circle-icon_22.entry-9f634efd.js} +90 -92
- package/dist/add-circle-icon_22.entry-e7ec6c34.cjs +1 -0
- package/dist/{archive-icon_7.entry-40b7ef3b.js → archive-icon_7.entry-24bac466.js} +21 -21
- package/dist/{archive-icon_7.entry-e8630de9.cjs → archive-icon_7.entry-6649ed76.cjs} +1 -1
- package/dist/{arrow-icon.entry-ffa53114.cjs → arrow-icon.entry-1fffd526.cjs} +1 -1
- package/dist/{arrow-icon.entry-58246303.js → arrow-icon.entry-82e59ce4.js} +4 -4
- package/dist/{bold-icon_3.entry-106a4e77.cjs → bold-icon_3.entry-5a01fecf.cjs} +1 -1
- package/dist/{bold-icon_3.entry-f5f1643d.js → bold-icon_3.entry-72e585da.js} +4 -4
- package/dist/{calendar-cancel-icon.entry-6ae0fd0f.cjs → calendar-cancel-icon.entry-0b52bdc9.cjs} +1 -1
- package/dist/{calendar-cancel-icon.entry-75b15b19.js → calendar-cancel-icon.entry-247b530c.js} +5 -5
- package/dist/{calendar-check-icon_2.entry-c57f83f3.cjs → calendar-check-icon_2.entry-d7bb76c7.cjs} +1 -1
- package/dist/{calendar-check-icon_2.entry-57339318.js → calendar-check-icon_2.entry-dbb2df49.js} +7 -7
- package/dist/{calendar-icon.entry-492c2630.cjs → calendar-icon.entry-911773c4.cjs} +1 -1
- package/dist/{calendar-icon.entry-2069fec6.js → calendar-icon.entry-d64cb3d3.js} +2 -2
- package/dist/{chevron-icon_3.entry-878ff6df.cjs → chevron-icon_3.entry-b72f4cdb.cjs} +1 -1
- package/dist/{chevron-icon_3.entry-83df50c3.js → chevron-icon_3.entry-db9f8217.js} +11 -11
- package/dist/close-icon.entry-9d141bb4.js +15 -0
- package/dist/close-icon.entry-da590fa2.cjs +1 -0
- package/dist/{constants-6ee60d6d-6c0540db.cjs → constants-6ee60d6d-09ee73d9.cjs} +1 -1
- package/dist/{constants-6ee60d6d-4cd16450.js → constants-6ee60d6d-d5928e79.js} +1 -1
- package/dist/document-refresh-icon.entry-5e8cc2f0.cjs +1 -0
- package/dist/{document-refresh-icon.entry-09870b14.js → document-refresh-icon.entry-ee9632d7.js} +5 -5
- package/dist/elements/index.d.ts +1 -0
- package/dist/{elements-dc5b338e-81a0319c.cjs → elements-dc5b338e-29ef67ec.cjs} +1 -1
- package/dist/{elements-dc5b338e-fb5dbfb5.js → elements-dc5b338e-e87f79b6.js} +1 -1
- package/dist/focus-visible-e8093c16-61d506d2.cjs +1 -0
- package/dist/{focus-visible-e8093c16-28fc08a0.js → focus-visible-e8093c16-e7357f74.js} +5 -3
- package/dist/forward-icon_6.entry-cac8473a.cjs +3 -0
- package/dist/{forward-icon_6.entry-8bb201eb.js → forward-icon_6.entry-f054ad9d.js} +65 -67
- package/dist/{globe-icon.entry-d515cbfa.js → globe-icon.entry-2fde6ac4.js} +4 -4
- package/dist/{globe-icon.entry-a690028c.cjs → globe-icon.entry-bc484551.cjs} +1 -1
- package/dist/google-logo-icon_4.entry-a9848399.cjs +1 -0
- package/dist/google-logo-icon_4.entry-dca87e45.js +349 -0
- package/dist/index-22f7e49c.cjs +37 -0
- package/dist/index-f9ba9aa8.js +3971 -0
- package/dist/{index.es-2578c6a5-71441142.js → index.es-f57e612a-1d17c676.js} +516 -512
- package/dist/{index.es-2578c6a5-098d48d0.cjs → index.es-f57e612a-95ca3e17.cjs} +5 -5
- package/dist/{info-icon_2.entry-300ef196.js → info-icon_2.entry-dbf3931a.js} +7 -7
- package/dist/{info-icon_2.entry-e286aaa5.cjs → info-icon_2.entry-e67844eb.cjs} +1 -1
- package/dist/loading-icon.entry-4566cba8.cjs +1 -0
- package/dist/loading-icon.entry-ae4c2d7e.js +15 -0
- package/dist/{mailbox-store-bb21512c-649a374c.js → mailbox-store-47fc8a1a-2365f20f.js} +16 -17
- package/dist/mailbox-store-47fc8a1a-cd3516a7.cjs +1 -0
- package/dist/nylas-additional-participants.entry-7c568149.cjs +1 -0
- package/dist/{nylas-additional-participants.entry-4afba192.js → nylas-additional-participants.entry-e8426256.js} +12 -14
- package/dist/nylas-booked-event-card_10.entry-6a664889.cjs +1 -0
- package/dist/{nylas-booked-event-card_10.entry-1ebbe0c0.js → nylas-booked-event-card_10.entry-ef767733.js} +8 -10
- package/dist/{nylas-form-card.entry-7bc23695.js → nylas-form-card.entry-d8506b1f.js} +4 -6
- package/dist/nylas-form-card.entry-e44169b6.cjs +1 -0
- package/dist/nylas-if-state.entry-044c49d2.cjs +1 -0
- package/dist/{nylas-if-state.entry-3829cb3d.js → nylas-if-state.entry-98a336df.js} +2 -4
- package/dist/nylas-list-folders.entry-509f9be4.cjs +1 -0
- package/dist/{nylas-list-folders.entry-7347e78d.js → nylas-list-folders.entry-55ce3403.js} +6 -8
- package/dist/{nylas-list-threads.entry-432a8d8c.js → nylas-list-threads.entry-1f57382a.js} +5 -7
- package/dist/nylas-list-threads.entry-c36e2cf3.cjs +1 -0
- package/dist/nylas-login.entry-66f542b8.cjs +1 -0
- package/dist/{nylas-login.entry-5311f0a7.js → nylas-login.entry-76358c2f.js} +3 -5
- package/dist/{nylas-mailbox-pagination.entry-20150fb2.js → nylas-mailbox-pagination.entry-5562257a.js} +7 -9
- package/dist/nylas-mailbox-pagination.entry-89b0dd99.cjs +1 -0
- package/dist/nylas-mailbox-toolbar-button.entry-573e0429.cjs +1 -0
- package/dist/{nylas-mailbox-toolbar-button.entry-eec426d5.js → nylas-mailbox-toolbar-button.entry-6b1b5b15.js} +16 -18
- package/dist/{nylas-mailbox.entry-b6c758b9.js → nylas-mailbox.entry-97c503f2.js} +7 -9
- package/dist/nylas-mailbox.entry-e21a2f50.cjs +1 -0
- package/dist/{nylas-provider.entry-271cafd2.js → nylas-provider.entry-07e1e26a.js} +10 -12
- package/dist/nylas-provider.entry-61899957.cjs +1 -0
- package/dist/nylas-scheduler-editor.entry-60fe38ce.cjs +7 -0
- package/dist/{nylas-scheduler-editor.entry-b51ad4b1.js → nylas-scheduler-editor.entry-e326c9de.js} +329 -246
- package/dist/{nylas-scheduling.entry-0a8d1da8.js → nylas-scheduling.entry-be0cc090.js} +3 -5
- package/dist/nylas-scheduling.entry-d88289db.cjs +1 -0
- package/dist/{nylas-threads-refresh.entry-72dd854e.js → nylas-threads-refresh.entry-8201f8dd.js} +11 -13
- package/dist/nylas-threads-refresh.entry-c71ee775.cjs +1 -0
- package/dist/nylas-threads-search.entry-912a90a4.cjs +1 -0
- package/dist/{nylas-threads-search.entry-4750a187.js → nylas-threads-search.entry-fc477e01.js} +18 -20
- package/dist/nylas-view-thread.entry-af418ddb.cjs +1 -0
- package/dist/{nylas-view-thread.entry-c6adce43.js → nylas-view-thread.entry-d2953ea8.js} +7 -9
- package/dist/{people-icon.entry-342be0c8.js → people-icon.entry-4b598fde.js} +7 -7
- package/dist/{people-icon.entry-35252ca9.cjs → people-icon.entry-73cfa6f5.cjs} +1 -1
- package/dist/play-icon_2.entry-1a487abb.cjs +1 -0
- package/dist/{play-icon_2.entry-0787352c.js → play-icon_2.entry-d1c2f823.js} +5 -5
- package/dist/react.cjs +1 -1
- package/dist/react.js +68 -67
- package/dist/{refresh-icon.entry-ddbc5446.cjs → refresh-icon.entry-42d543d0.cjs} +1 -1
- package/dist/{refresh-icon.entry-8fbabfe7.js → refresh-icon.entry-6aedfce6.js} +4 -4
- package/dist/register-component-cf5c8420-d3fb6bf9.cjs +1 -0
- package/dist/{register-component-dc659dc3-e43e8fae.js → register-component-cf5c8420-dc1bc0a4.js} +37 -33
- package/dist/scheduler-config-store-6222c0ed-000f1a4f.js +18 -0
- package/dist/scheduler-config-store-6222c0ed-758621fb.cjs +1 -0
- package/dist/{scheduler-store-72116723-e5f87122.js → scheduler-store-39d37291-4e8e9ff9.js} +5 -6
- package/dist/scheduler-store-39d37291-b66c052c.cjs +1 -0
- package/dist/{time-period-selector.entry-333942a8.js → time-period-selector.entry-f1e27a00.js} +6 -8
- package/dist/time-period-selector.entry-fb3d0178.cjs +1 -0
- package/dist/{translate-icon.entry-cb19864c.cjs → translate-icon.entry-0d44b6cb.cjs} +1 -1
- package/dist/{translate-icon.entry-87a62108.js → translate-icon.entry-3db947f5.js} +5 -5
- package/dist/{warning-icon.entry-50755d91.cjs → warning-icon.entry-a20657e4.cjs} +1 -1
- package/dist/{warning-icon.entry-7a72e24a.js → warning-icon.entry-a8ea0fe0.js} +5 -5
- package/package.json +2 -2
- package/dist/_commonjsHelpers-57e89916-4a3ae7d8.cjs +0 -1
- package/dist/_commonjsHelpers-57e89916-af061c86.js +0 -19
- package/dist/add-circle-icon_22.entry-077661c3.cjs +0 -1
- package/dist/close-icon.entry-480c199d.js +0 -15
- package/dist/close-icon.entry-8015ca05.cjs +0 -1
- package/dist/document-refresh-icon.entry-06f7972b.cjs +0 -1
- package/dist/focus-visible-e8093c16-f380b705.cjs +0 -1
- package/dist/forward-icon_6.entry-eeecf2a2.cjs +0 -3
- package/dist/google-logo-icon_3.entry-2164cec1.js +0 -258
- package/dist/google-logo-icon_3.entry-b2b85284.cjs +0 -1
- package/dist/index-2b8437d6.cjs +0 -30
- package/dist/index-db0c5017.js +0 -1824
- package/dist/loading-icon.entry-6d8adaa4.js +0 -15
- package/dist/loading-icon.entry-dc40e97d.cjs +0 -1
- package/dist/mailbox-store-bb21512c-fc3c8c03.cjs +0 -1
- package/dist/nylas-additional-participants.entry-db05e510.cjs +0 -1
- package/dist/nylas-booked-event-card_10.entry-6b6fdfae.cjs +0 -1
- package/dist/nylas-form-card.entry-70b20571.cjs +0 -1
- package/dist/nylas-if-state.entry-ebeffe22.cjs +0 -1
- package/dist/nylas-list-folders.entry-191688f2.cjs +0 -1
- package/dist/nylas-list-threads.entry-44658578.cjs +0 -1
- package/dist/nylas-login.entry-db17a3d2.cjs +0 -1
- package/dist/nylas-mailbox-pagination.entry-9d3f5baa.cjs +0 -1
- package/dist/nylas-mailbox-toolbar-button.entry-6c0f7299.cjs +0 -1
- package/dist/nylas-mailbox.entry-d41401e0.cjs +0 -1
- package/dist/nylas-provider.entry-6173b721.cjs +0 -1
- package/dist/nylas-scheduler-editor.entry-0c75d39e.cjs +0 -7
- package/dist/nylas-scheduling.entry-081c8825.cjs +0 -1
- package/dist/nylas-threads-refresh.entry-c3509e6a.cjs +0 -1
- package/dist/nylas-threads-search.entry-16a59ef6.cjs +0 -1
- package/dist/nylas-view-thread.entry-27df3349.cjs +0 -1
- package/dist/play-icon_2.entry-f83fa92a.cjs +0 -1
- package/dist/register-component-dc659dc3-fb85ee68.cjs +0 -1
- package/dist/scheduler-config-store-51ee4f42-66f8c2ac.js +0 -14
- package/dist/scheduler-config-store-51ee4f42-d7d9c25d.cjs +0 -1
- package/dist/scheduler-store-72116723-ce4c7a69.cjs +0 -1
- package/dist/time-period-selector.entry-78d5b3c2.cjs +0 -1
- package/dist/utils-c00bdc3c-89ab163d.js +0 -2111
- package/dist/utils-c00bdc3c-94b9c3b6.cjs +0 -8
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { r as ne, h as g, c as We, H as $e, g as Rt,
|
|
2
|
-
import {
|
|
3
|
-
import { R as _n } from "./register-component-dc659dc3-e43e8fae.js";
|
|
4
|
-
import { c as wn } from "./_commonjsHelpers-57e89916-af061c86.js";
|
|
1
|
+
import { r as ne, h as g, c as We, d as T, H as $e, g as Rt, i as yn, n as bn, o as En, p as Tn, F as An, q as _n } from "./index-f9ba9aa8.js";
|
|
2
|
+
import { R as wn } from "./register-component-cf5c8420-dc1bc0a4.js";
|
|
5
3
|
import "react";
|
|
6
4
|
import "react-dom";
|
|
7
5
|
const vn = ".sc-forward-icon-h{display:flex}", Sn = vn, Cn = class {
|
|
@@ -9,7 +7,7 @@ const vn = ".sc-forward-icon-h{display:flex}", Sn = vn, Cn = class {
|
|
|
9
7
|
ne(this, t), this.width = "15", this.height = "15";
|
|
10
8
|
}
|
|
11
9
|
render() {
|
|
12
|
-
return g("svg", { key: "
|
|
10
|
+
return g("svg", { key: "6a4eb6d9a2531279db927e298081ac4da5428fca", fill: "auto", width: this.width, height: this.height, viewBox: "0 0 1920 1920", xmlns: "http://www.w3.org/2000/svg" }, g("path", { key: "ad2847c25e5d83df09cf22a76a198eb4e7f212f9", d: "m1246.246 64-90.496 90.496 477.952 477.952h-590.848C467.878 632.448.038 1100.416.038 1675.392v109.056h128v-109.056c0-504.576 410.368-914.944 914.816-914.944h590.848l-477.952 478.08 90.496 90.496 632.448-632.576L1246.246 64Z", "fill-rule": "evenodd" }));
|
|
13
11
|
}
|
|
14
12
|
};
|
|
15
13
|
Cn.style = Sn;
|
|
@@ -108,7 +106,7 @@ const Ln = ':host{display:grid;color:var(--nylas-color-primary-900)}.editor{posi
|
|
|
108
106
|
}), this.editorEl.focus();
|
|
109
107
|
}
|
|
110
108
|
render() {
|
|
111
|
-
return g($e, { key: "
|
|
109
|
+
return g($e, { key: "7537b7c56a1e609f88189c2c4deed986827eb193" }, g("sp-theme", { key: "efa28f8ed5585ec21b44ae5ec174aa10a9c92aba", scale: "medium", color: "dark" }, g("div", { key: "c7932bcedcb2b3cfa4e0900578cf2b749000125d", class: "editor", contentEditable: !0, ref: (t) => this.editorEl = t }, g("div", { key: "89c06c0e76d29ea6713dd44b2452e261d0d7d43b", class: "toolbar", ref: (t) => this.toolbarEl = t, contentEditable: !1 }, g("sp-button", { key: "beeb60448f03c8818925aeb13ab5231aa72f7526", quiet: !0, onClick: () => document.execCommand("bold") }, g("div", { key: "4e37be81a28ac4355f9d0d6d6c71b7b78cf41456", slot: "icon" }, g("bold-icon", { key: "56cf047799a6a5713310d5b095ca91e6004d6107" })), g("div", { key: "2fe47f8f364f7fb1016990f2aecec655e2e6eb30", slot: "label" }, "Bold")), g("sp-button", { key: "0416d13b88ccefd5005f4b97f7dded2118d37f43", quiet: !0, onClick: () => document.execCommand("underline") }, g("div", { key: "6d20e215eafbb91a17ce452a6b64295ab4ef2bb9", slot: "icon" }, g("underline-icon", { key: "b8d988fa168047ed213fbcceb53b24bf3f766d7a" })), g("div", { key: "bd05639007b3ea849501b995137ceda70aed20da", slot: "label" }, "Underline")), g("sp-button", { key: "9775c4787363cd4d21778f4c848c7f5a7564b507", quiet: !0, onClick: () => document.execCommand("italic") }, g("div", { key: "ca9d557028981c0fe209045e5d1748b19bbb5069", slot: "icon" }, g("italic-icon", { key: "1be5debba3572e83ab132a3e44d8fc1e799f6619" })), g("div", { key: "cccb70309840e20f558158e6ef9edf8fe0e52eed", slot: "label" }, "Italic")))), g("div", { key: "502854e008886de49ec435c1ebd73b48f2cc4c70", class: "buttons" }, g("sp-button", { key: "9663a709ca8794dc76dec379a39c52a6a754cb6e", onClick: this.sendComposer, class: "send" }, "Send"), g("sp-button", { key: "b0c7637932f2659c9115e74f1244db04992a69aa", onClick: this.closeComposer, class: "close" }, "Close"))));
|
|
112
110
|
}
|
|
113
111
|
get host() {
|
|
114
112
|
return Rt(this);
|
|
@@ -215,22 +213,22 @@ const kt = class {
|
|
|
215
213
|
return t.read().then(({ done: u, value: s }) => u ? o : (o.push(s), this.readChunk(t, o)));
|
|
216
214
|
}
|
|
217
215
|
render() {
|
|
218
|
-
return g($e, { key: "
|
|
216
|
+
return g($e, { key: "8c0687fd071081bfe39b324debeb165a966301c0" }, g("sp-theme", { key: "30328464c09cb718c83ffa123018ea2ade596774", scale: "medium", color: "dark" }, g("sp-button", { key: "b7f0095382095c2c69a664cfd848a7d44e3fee3a", label: "Summarize email", "icon-only": !0, onClickCapture: this.onClick, class: {
|
|
219
217
|
"summarize-button": !0,
|
|
220
218
|
stopped: this.state === "stopped",
|
|
221
219
|
loading: this.state === "loading",
|
|
222
220
|
playing: this.state === "playing"
|
|
223
|
-
} }, this.state === "stopped" && g("play-icon", null), this.state === "loading" && g("loading-icon", null), this.state === "playing" && g("stop-icon", null)), g("audio", { key: "
|
|
221
|
+
} }, this.state === "stopped" && g("play-icon", null), this.state === "loading" && g("loading-icon", null), this.state === "playing" && g("stop-icon", null)), g("audio", { key: "a5595d5d2a40baa947eece71ee22110d9225c879", ref: (t) => this.audioRef = t, autoPlay: !0, onPlaying: () => this.state = "playing", onPause: () => this.state = "stopped", onEnded: () => {
|
|
224
222
|
this.state = "stopped", T("[nylas-summarize-message-button] Audio ended");
|
|
225
223
|
} })));
|
|
226
224
|
}
|
|
227
225
|
};
|
|
228
226
|
xn([
|
|
229
|
-
|
|
227
|
+
wn({
|
|
230
228
|
name: "nylas-summarize-message-button",
|
|
231
229
|
eventToProps: {
|
|
232
230
|
summarize: async (t, o) => {
|
|
233
|
-
const { playAudio: u, updateState: s, abortController: m, message: a } = t.detail, f =
|
|
231
|
+
const { playAudio: u, updateState: s, abortController: m, message: a } = t.detail, f = _n(a.body || "");
|
|
234
232
|
await s("loading");
|
|
235
233
|
try {
|
|
236
234
|
const i = await o.messages.summarizeText(f), l = o.messages.textToSpeech(i, m);
|
|
@@ -331,7 +329,7 @@ var Nt = { exports: {} };
|
|
|
331
329
|
(function(t, o) {
|
|
332
330
|
(function(u, s) {
|
|
333
331
|
t.exports = s();
|
|
334
|
-
})(
|
|
332
|
+
})(yn, function() {
|
|
335
333
|
const {
|
|
336
334
|
entries: u,
|
|
337
335
|
setPrototypeOf: s,
|
|
@@ -351,66 +349,66 @@ var Nt = { exports: {} };
|
|
|
351
349
|
return c;
|
|
352
350
|
}), l || (l = function(c) {
|
|
353
351
|
return c;
|
|
354
|
-
}), _ || (_ = function(c,
|
|
355
|
-
return c.apply(
|
|
356
|
-
}), N || (N = function(c,
|
|
357
|
-
return new c(...
|
|
352
|
+
}), _ || (_ = function(c, b, h) {
|
|
353
|
+
return c.apply(b, h);
|
|
354
|
+
}), N || (N = function(c, b) {
|
|
355
|
+
return new c(...b);
|
|
358
356
|
});
|
|
359
357
|
const U = I(Array.prototype.forEach), de = I(Array.prototype.pop), G = I(Array.prototype.push), X = I(String.prototype.toLowerCase), oe = I(String.prototype.toString), Ee = I(String.prototype.match), W = I(String.prototype.replace), xt = I(String.prototype.indexOf), Dt = I(String.prototype.trim), O = I(RegExp.prototype.test), ie = Ot(TypeError);
|
|
360
|
-
function I(
|
|
358
|
+
function I(y) {
|
|
361
359
|
return function(c) {
|
|
362
|
-
for (var
|
|
360
|
+
for (var b = arguments.length, h = new Array(b > 1 ? b - 1 : 0), k = 1; k < b; k++)
|
|
363
361
|
h[k - 1] = arguments[k];
|
|
364
|
-
return _(
|
|
362
|
+
return _(y, c, h);
|
|
365
363
|
};
|
|
366
364
|
}
|
|
367
|
-
function Ot(
|
|
365
|
+
function Ot(y) {
|
|
368
366
|
return function() {
|
|
369
|
-
for (var c = arguments.length,
|
|
370
|
-
|
|
371
|
-
return N(
|
|
367
|
+
for (var c = arguments.length, b = new Array(c), h = 0; h < c; h++)
|
|
368
|
+
b[h] = arguments[h];
|
|
369
|
+
return N(y, b);
|
|
372
370
|
};
|
|
373
371
|
}
|
|
374
|
-
function p(
|
|
375
|
-
let
|
|
376
|
-
s && s(
|
|
372
|
+
function p(y, c) {
|
|
373
|
+
let b = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : X;
|
|
374
|
+
s && s(y, null);
|
|
377
375
|
let h = c.length;
|
|
378
376
|
for (; h--; ) {
|
|
379
377
|
let k = c[h];
|
|
380
378
|
if (typeof k == "string") {
|
|
381
|
-
const F =
|
|
379
|
+
const F = b(k);
|
|
382
380
|
F !== k && (m(c) || (c[h] = F), k = F);
|
|
383
381
|
}
|
|
384
|
-
|
|
382
|
+
y[k] = !0;
|
|
385
383
|
}
|
|
386
|
-
return
|
|
384
|
+
return y;
|
|
387
385
|
}
|
|
388
|
-
function It(
|
|
389
|
-
for (let c = 0; c <
|
|
390
|
-
f(
|
|
391
|
-
return
|
|
386
|
+
function It(y) {
|
|
387
|
+
for (let c = 0; c < y.length; c++)
|
|
388
|
+
f(y, c) === void 0 && (y[c] = null);
|
|
389
|
+
return y;
|
|
392
390
|
}
|
|
393
|
-
function $(
|
|
391
|
+
function $(y) {
|
|
394
392
|
const c = E(null);
|
|
395
|
-
for (const [
|
|
396
|
-
f(
|
|
393
|
+
for (const [b, h] of u(y))
|
|
394
|
+
f(y, b) !== void 0 && (Array.isArray(h) ? c[b] = It(h) : h && typeof h == "object" && h.constructor === Object ? c[b] = $(h) : c[b] = h);
|
|
397
395
|
return c;
|
|
398
396
|
}
|
|
399
|
-
function ue(
|
|
400
|
-
for (;
|
|
401
|
-
const h = f(
|
|
397
|
+
function ue(y, c) {
|
|
398
|
+
for (; y !== null; ) {
|
|
399
|
+
const h = f(y, c);
|
|
402
400
|
if (h) {
|
|
403
401
|
if (h.get)
|
|
404
402
|
return I(h.get);
|
|
405
403
|
if (typeof h.value == "function")
|
|
406
404
|
return I(h.value);
|
|
407
405
|
}
|
|
408
|
-
|
|
406
|
+
y = a(y);
|
|
409
407
|
}
|
|
410
|
-
function
|
|
408
|
+
function b(h) {
|
|
411
409
|
return console.warn("fallback value for", h), null;
|
|
412
410
|
}
|
|
413
|
-
return
|
|
411
|
+
return b;
|
|
414
412
|
}
|
|
415
413
|
const qe = i(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), Te = i(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Ae = i(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), Pt = i(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), _e = i(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), Ut = i(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Ye = i(["#text"]), je = i(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "pattern", "placeholder", "playsinline", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "xmlns", "slot"]), we = i(["accent-height", "accumulate", "additive", "alignment-baseline", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), Xe = i(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), fe = i(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), zt = l(/\{\{[\w\W]*|[\w\W]*\}\}/gm), Ft = l(/<%[\w\W]*|[\w\W]*%>/gm), Ht = l(/\${[\w\W]*}/gm), Bt = l(/^data-[\-\w.\u00B7-\uFFFF]/), Wt = l(/^aria-[\-\w]+$/), Ve = l(
|
|
416
414
|
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
|
|
@@ -433,12 +431,12 @@ var Nt = { exports: {} };
|
|
|
433
431
|
});
|
|
434
432
|
const qt = function() {
|
|
435
433
|
return typeof window > "u" ? null : window;
|
|
436
|
-
}, Yt = function(c,
|
|
434
|
+
}, Yt = function(c, b) {
|
|
437
435
|
if (typeof c != "object" || typeof c.createPolicy != "function")
|
|
438
436
|
return null;
|
|
439
437
|
let h = null;
|
|
440
438
|
const k = "data-tt-policy-suffix";
|
|
441
|
-
|
|
439
|
+
b && b.hasAttribute(k) && (h = b.getAttribute(k));
|
|
442
440
|
const F = "dompurify" + (h ? "#" + h : "");
|
|
443
441
|
try {
|
|
444
442
|
return c.createPolicy(F, {
|
|
@@ -454,27 +452,27 @@ var Nt = { exports: {} };
|
|
|
454
452
|
}
|
|
455
453
|
};
|
|
456
454
|
function Qe() {
|
|
457
|
-
let
|
|
455
|
+
let y = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : qt();
|
|
458
456
|
const c = (d) => Qe(d);
|
|
459
|
-
if (c.version = "3.0.8", c.removed = [], !
|
|
457
|
+
if (c.version = "3.0.8", c.removed = [], !y || !y.document || y.document.nodeType !== 9)
|
|
460
458
|
return c.isSupported = !1, c;
|
|
461
459
|
let {
|
|
462
|
-
document:
|
|
463
|
-
} =
|
|
464
|
-
const h =
|
|
460
|
+
document: b
|
|
461
|
+
} = y;
|
|
462
|
+
const h = b, k = h.currentScript, {
|
|
465
463
|
DocumentFragment: F,
|
|
466
464
|
HTMLTemplateElement: V,
|
|
467
465
|
Node: ve,
|
|
468
466
|
Element: Je,
|
|
469
467
|
NodeFilter: Se,
|
|
470
|
-
NamedNodeMap: Xt =
|
|
468
|
+
NamedNodeMap: Xt = y.NamedNodeMap || y.MozNamedAttrMap,
|
|
471
469
|
HTMLFormElement: Vt,
|
|
472
470
|
DOMParser: Zt,
|
|
473
471
|
trustedTypes: me
|
|
474
|
-
} =
|
|
472
|
+
} = y, pe = Je.prototype, Kt = ue(pe, "cloneNode"), Qt = ue(pe, "nextSibling"), Jt = ue(pe, "childNodes"), Ce = ue(pe, "parentNode");
|
|
475
473
|
if (typeof V == "function") {
|
|
476
|
-
const d =
|
|
477
|
-
d.content && d.content.ownerDocument && (
|
|
474
|
+
const d = b.createElement("template");
|
|
475
|
+
d.content && d.content.ownerDocument && (b = d.content.ownerDocument);
|
|
478
476
|
}
|
|
479
477
|
let M, ae = "";
|
|
480
478
|
const {
|
|
@@ -482,7 +480,7 @@ var Nt = { exports: {} };
|
|
|
482
480
|
createNodeIterator: en,
|
|
483
481
|
createDocumentFragment: tn,
|
|
484
482
|
getElementsByTagName: nn
|
|
485
|
-
} =
|
|
483
|
+
} = b, {
|
|
486
484
|
importNode: on
|
|
487
485
|
} = h;
|
|
488
486
|
let z = {};
|
|
@@ -528,13 +526,13 @@ var Nt = { exports: {} };
|
|
|
528
526
|
let dt = null;
|
|
529
527
|
const ut = p({}, ["audio", "video", "img", "source", "image", "track"]);
|
|
530
528
|
let Pe = null;
|
|
531
|
-
const ft = p({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]),
|
|
529
|
+
const ft = p({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), ye = "http://www.w3.org/1998/Math/MathML", be = "http://www.w3.org/2000/svg", H = "http://www.w3.org/1999/xhtml";
|
|
532
530
|
let ee = H, Ue = !1, ze = null;
|
|
533
|
-
const cn = p({}, [
|
|
531
|
+
const cn = p({}, [ye, be, H], oe);
|
|
534
532
|
let le = null;
|
|
535
533
|
const dn = ["application/xhtml+xml", "text/html"], un = "text/html";
|
|
536
534
|
let C = null, te = null;
|
|
537
|
-
const fn =
|
|
535
|
+
const fn = b.createElement("form"), mt = function(e) {
|
|
538
536
|
return e instanceof RegExp || e instanceof Function;
|
|
539
537
|
}, Fe = function() {
|
|
540
538
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
@@ -564,14 +562,14 @@ var Nt = { exports: {} };
|
|
|
564
562
|
M === void 0 && (M = Yt(me, k)), M !== null && typeof ae == "string" && (ae = M.createHTML(""));
|
|
565
563
|
i && i(e), te = e;
|
|
566
564
|
}
|
|
567
|
-
}, pt = p({}, ["mi", "mo", "mn", "ms", "mtext"]), ht = p({}, ["foreignobject", "desc", "title", "annotation-xml"]), mn = p({}, ["title", "style", "font", "a", "script"]), gt = p({}, [...Te, ...Ae, ...Pt]),
|
|
565
|
+
}, pt = p({}, ["mi", "mo", "mn", "ms", "mtext"]), ht = p({}, ["foreignobject", "desc", "title", "annotation-xml"]), mn = p({}, ["title", "style", "font", "a", "script"]), gt = p({}, [...Te, ...Ae, ...Pt]), yt = p({}, [..._e, ...Ut]), pn = function(e) {
|
|
568
566
|
let n = Ce(e);
|
|
569
567
|
(!n || !n.tagName) && (n = {
|
|
570
568
|
namespaceURI: ee,
|
|
571
569
|
tagName: "template"
|
|
572
570
|
});
|
|
573
571
|
const r = X(e.tagName), A = X(n.tagName);
|
|
574
|
-
return ze[e.namespaceURI] ? e.namespaceURI ===
|
|
572
|
+
return ze[e.namespaceURI] ? e.namespaceURI === be ? n.namespaceURI === H ? r === "svg" : n.namespaceURI === ye ? r === "svg" && (A === "annotation-xml" || pt[A]) : !!gt[r] : e.namespaceURI === ye ? n.namespaceURI === H ? r === "math" : n.namespaceURI === be ? r === "math" && ht[A] : !!yt[r] : e.namespaceURI === H ? n.namespaceURI === be && !ht[A] || n.namespaceURI === ye && !pt[A] ? !1 : !yt[r] && (mn[r] || !gt[r]) : !!(le === "application/xhtml+xml" && ze[e.namespaceURI]) : !1;
|
|
575
573
|
}, Y = function(e) {
|
|
576
574
|
G(c.removed, {
|
|
577
575
|
element: e
|
|
@@ -604,7 +602,7 @@ var Nt = { exports: {} };
|
|
|
604
602
|
n.setAttribute(e, "");
|
|
605
603
|
} catch {
|
|
606
604
|
}
|
|
607
|
-
},
|
|
605
|
+
}, bt = function(e) {
|
|
608
606
|
let n = null, r = null;
|
|
609
607
|
if (Oe)
|
|
610
608
|
e = "<remove></remove>" + e;
|
|
@@ -627,7 +625,7 @@ var Nt = { exports: {} };
|
|
|
627
625
|
}
|
|
628
626
|
}
|
|
629
627
|
const L = n.body || n.documentElement;
|
|
630
|
-
return e && r && L.insertBefore(
|
|
628
|
+
return e && r && L.insertBefore(b.createTextNode(r), L.childNodes[0] || null), ee === H ? nn.call(n, q ? "html" : "body")[0] : q ? n.documentElement : L;
|
|
631
629
|
}, Et = function(e) {
|
|
632
630
|
return en.call(
|
|
633
631
|
e.ownerDocument || e,
|
|
@@ -673,7 +671,7 @@ var Nt = { exports: {} };
|
|
|
673
671
|
element: e.cloneNode()
|
|
674
672
|
}), e.textContent = n)), B("afterSanitizeElements", e, null), !1);
|
|
675
673
|
}, _t = function(e, n, r) {
|
|
676
|
-
if (st && (n === "id" || n === "name") && (r in
|
|
674
|
+
if (st && (n === "id" || n === "name") && (r in b || r in fn))
|
|
677
675
|
return !1;
|
|
678
676
|
if (!(xe && !Ne[n] && O(an, n))) {
|
|
679
677
|
if (!(it && O(rn, n))) {
|
|
@@ -776,12 +774,12 @@ var Nt = { exports: {} };
|
|
|
776
774
|
throw ie("root node is forbidden and cannot be sanitized in-place");
|
|
777
775
|
}
|
|
778
776
|
} else if (d instanceof ve)
|
|
779
|
-
n =
|
|
777
|
+
n = bt("<!---->"), r = n.ownerDocument.importNode(d, !0), r.nodeType === 1 && r.nodeName === "BODY" || r.nodeName === "HTML" ? n = r : n.appendChild(r);
|
|
780
778
|
else {
|
|
781
779
|
if (!K && !Z && !q && // eslint-disable-next-line unicorn/prefer-includes
|
|
782
780
|
d.indexOf("<") === -1)
|
|
783
781
|
return M && ge ? M.createHTML(d) : d;
|
|
784
|
-
if (n =
|
|
782
|
+
if (n = bt(d), !n)
|
|
785
783
|
return K ? null : ge ? ae : "";
|
|
786
784
|
}
|
|
787
785
|
n && Oe && Y(n.firstChild);
|
|
@@ -837,7 +835,7 @@ const Bn = class {
|
|
|
837
835
|
var m;
|
|
838
836
|
this.state = "loading", this.styles = [], this.hoistedFontURLs = /* @__PURE__ */ new Map(), this.sanitizedBody = "", document.querySelectorAll(".nylas-view-email-font").forEach((a) => {
|
|
839
837
|
a.remove();
|
|
840
|
-
}), (this.message ?
|
|
838
|
+
}), (this.message ? bn(this.message) : En(o)) || (o = `<html><body>${Tn(o)}</body></html>`), this.htmlElement.innerHTML = o, this.detectDarkMode && zn(this.htmlElement), this.htmlElement.querySelectorAll("link").forEach((a) => {
|
|
841
839
|
if (console.debug(`[nylas-view-email] Hoisting link: ${a.getAttribute("href")}`), a.getAttribute("rel") === "stylesheet" && a.getAttribute("href")) {
|
|
842
840
|
const f = a.getAttribute("href");
|
|
843
841
|
if (f) {
|
|
@@ -914,7 +912,7 @@ const Bn = class {
|
|
|
914
912
|
});
|
|
915
913
|
}
|
|
916
914
|
render() {
|
|
917
|
-
return console.debug("[nylas-view-email] render", { hoistedFontURLs: this.hoistedFontURLs }), g($e, { key: "
|
|
915
|
+
return console.debug("[nylas-view-email] render", { hoistedFontURLs: this.hoistedFontURLs }), g($e, { key: "4f0a1e688ae465d65943adc7dabac9cad6c62fe8" }, this.state === "loading" && g("div", null, "Loading..."), this.state === "ready" && g(An, null, this.styles.map((t) => g("style", null, Ge.sanitize(t.innerHTML))), g("div", { class: "view-email", part: "view-email", innerHTML: this.sanitizedBody, ref: (t) => this.viewEmailElement = t })));
|
|
918
916
|
}
|
|
919
917
|
get host() {
|
|
920
918
|
return Rt(this);
|
|
@@ -932,7 +930,7 @@ const Wn = ".sc-reply-all-icon-h{display:flex}", Gn = Wn, $n = class {
|
|
|
932
930
|
ne(this, t), this.width = "15", this.height = "15";
|
|
933
931
|
}
|
|
934
932
|
render() {
|
|
935
|
-
return g("svg", { key: "
|
|
933
|
+
return g("svg", { key: "5473055eb158788f0e5c29e437f68bc42975f443", fill: "auto", width: this.width, height: this.height, viewBox: "0 0 1920 1920", xmlns: "http://www.w3.org/2000/svg" }, g("path", { key: "8a27d6646e2807edce6b308ebfaa17e7e71c7ce7", d: "m1030.975 188 81.249 81.249-429.228 429.228h300.747c516.223 0 936.257 420.034 936.257 936.257v98.028h-114.92v-98.028c0-452.901-368.436-821.337-821.337-821.337H682.996l429.228 429.229-81.25 81.248-567.936-567.937L1030.975 188Zm-463.038.011 81.249 81.25-486.688 486.688 486.688 486.688-81.249 81.249L0 755.949 567.937 188.01Z", "fill-rule": "evenodd" }));
|
|
936
934
|
}
|
|
937
935
|
};
|
|
938
936
|
$n.style = Gn;
|
|
@@ -941,7 +939,7 @@ const qn = ".sc-reply-icon-h{display:flex}", Yn = qn, jn = class {
|
|
|
941
939
|
ne(this, t), this.width = "15", this.height = "15";
|
|
942
940
|
}
|
|
943
941
|
render() {
|
|
944
|
-
return g("svg", { key: "
|
|
942
|
+
return g("svg", { key: "fe3dcd629d521170b57ee467fc46c2cded6b74da", fill: "auto", width: this.width, height: this.height, viewBox: "0 0 1920 1920", xmlns: "http://www.w3.org/2000/svg" }, g("path", { key: "8b71c92d370bd5038c286aeab7b145a9095f0f80", d: "M835.942 632.563H244.966l478.08-478.08-90.496-90.496L-.026 696.563 632.55 1329.14l90.496-90.496-478.08-478.08h590.976c504.448 0 914.816 410.368 914.816 914.816v109.184h128V1675.38c0-574.976-467.84-1042.816-1042.816-1042.816", "fill-rule": "evenodd" }));
|
|
945
943
|
}
|
|
946
944
|
};
|
|
947
945
|
jn.style = Yn;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { r as
|
|
1
|
+
import { r as t, h as C } from "./index-f9ba9aa8.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import "react-dom";
|
|
4
4
|
const o = ".sc-globe-icon-h{display:flex}", s = o, i = class {
|
|
5
|
-
constructor(
|
|
6
|
-
|
|
5
|
+
constructor(e) {
|
|
6
|
+
t(this, e), this.width = "16", this.height = "16";
|
|
7
7
|
}
|
|
8
8
|
render() {
|
|
9
|
-
return C("svg", { key: "
|
|
9
|
+
return C("svg", { key: "f8a5a34bee5e081a6232b4eb17c11d4761881966", xmlns: "http://www.w3.org/2000/svg", width: this.width, height: this.height, viewBox: "0 0 16 16", fill: "none" }, C("path", { key: "eedaeb8db7ba0f784c5c1837fbea8b3b951926f1", d: "M8 14C11.3137 14 14 11.3137 14 8C14 4.68629 11.3137 2 8 2C4.68629 2 2 4.68629 2 8C2 11.3137 4.68629 14 8 14ZM8 3C8.37372 3 8.87543 3.35608 9.31258 4.31781C9.4073 4.52619 9.49448 4.75446 9.57265 5H6.42735C6.50552 4.75446 6.5927 4.52619 6.68742 4.31781C7.12457 3.35608 7.62628 3 8 3ZM5.77705 3.90401C5.62614 4.23601 5.49428 4.6038 5.38411 5H3.99963C4.52341 4.30269 5.22525 3.74677 6.03766 3.39978C5.94287 3.56117 5.85596 3.7304 5.77705 3.90401ZM5.16299 6C5.05694 6.6275 5 7.30146 5 8C5 8.69854 5.05694 9.3725 5.16299 10H3.41604C3.14845 9.38754 3 8.7111 3 8C3 7.2889 3.14845 6.61246 3.41604 6H5.16299ZM5.38411 11C5.49428 11.3962 5.62614 11.764 5.77705 12.096C5.85596 12.2696 5.94287 12.4388 6.03766 12.6002C5.22525 12.2532 4.52341 11.6973 3.99963 11H5.38411ZM6.42735 11H9.57265C9.49448 11.2455 9.4073 11.4738 9.31258 11.6822C8.87543 12.6439 8.37372 13 8 13C7.62628 13 7.12457 12.6439 6.68742 11.6822C6.5927 11.4738 6.50552 11.2455 6.42735 11ZM9.82134 10H6.17866C6.06438 9.3892 6 8.71396 6 8C6 7.28604 6.06438 6.6108 6.17866 6H9.82134C9.93562 6.6108 10 7.28604 10 8C10 8.71396 9.93562 9.3892 9.82134 10ZM10.6159 11H12.0004C11.4766 11.6973 10.7747 12.2532 9.96234 12.6002C10.0571 12.4388 10.144 12.2696 10.2229 12.096C10.3739 11.764 10.5057 11.3962 10.6159 11ZM12.584 10H10.837C10.9431 9.3725 11 8.69854 11 8C11 7.30146 10.9431 6.6275 10.837 6H12.584C12.8516 6.61246 13 7.2889 13 8C13 8.7111 12.8516 9.38754 12.584 10ZM9.96234 3.39978C10.7747 3.74677 11.4766 4.30269 12.0004 5H10.6159C10.5057 4.6038 10.3739 4.23601 10.2229 3.90401C10.144 3.7304 10.0571 3.56117 9.96234 3.39978Z", fill: "currentColor" }));
|
|
10
10
|
}
|
|
11
11
|
};
|
|
12
12
|
i.style = s;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-22f7e49c.cjs");require("react");require("react-dom");const i=".sc-globe-icon-h{display:flex}",o=i,C=class{constructor(t){e.registerInstance(this,t),this.width="16",this.height="16"}render(){return e.h("svg",{key:"f8a5a34bee5e081a6232b4eb17c11d4761881966",xmlns:"http://www.w3.org/2000/svg",width:this.width,height:this.height,viewBox:"0 0 16 16",fill:"none"},e.h("path",{key:"eedaeb8db7ba0f784c5c1837fbea8b3b951926f1",d:"M8 14C11.3137 14 14 11.3137 14 8C14 4.68629 11.3137 2 8 2C4.68629 2 2 4.68629 2 8C2 11.3137 4.68629 14 8 14ZM8 3C8.37372 3 8.87543 3.35608 9.31258 4.31781C9.4073 4.52619 9.49448 4.75446 9.57265 5H6.42735C6.50552 4.75446 6.5927 4.52619 6.68742 4.31781C7.12457 3.35608 7.62628 3 8 3ZM5.77705 3.90401C5.62614 4.23601 5.49428 4.6038 5.38411 5H3.99963C4.52341 4.30269 5.22525 3.74677 6.03766 3.39978C5.94287 3.56117 5.85596 3.7304 5.77705 3.90401ZM5.16299 6C5.05694 6.6275 5 7.30146 5 8C5 8.69854 5.05694 9.3725 5.16299 10H3.41604C3.14845 9.38754 3 8.7111 3 8C3 7.2889 3.14845 6.61246 3.41604 6H5.16299ZM5.38411 11C5.49428 11.3962 5.62614 11.764 5.77705 12.096C5.85596 12.2696 5.94287 12.4388 6.03766 12.6002C5.22525 12.2532 4.52341 11.6973 3.99963 11H5.38411ZM6.42735 11H9.57265C9.49448 11.2455 9.4073 11.4738 9.31258 11.6822C8.87543 12.6439 8.37372 13 8 13C7.62628 13 7.12457 12.6439 6.68742 11.6822C6.5927 11.4738 6.50552 11.2455 6.42735 11ZM9.82134 10H6.17866C6.06438 9.3892 6 8.71396 6 8C6 7.28604 6.06438 6.6108 6.17866 6H9.82134C9.93562 6.6108 10 7.28604 10 8C10 8.71396 9.93562 9.3892 9.82134 10ZM10.6159 11H12.0004C11.4766 11.6973 10.7747 12.2532 9.96234 12.6002C10.0571 12.4388 10.144 12.2696 10.2229 12.096C10.3739 11.764 10.5057 11.3962 10.6159 11ZM12.584 10H10.837C10.9431 9.3725 11 8.69854 11 8C11 7.30146 10.9431 6.6275 10.837 6H12.584C12.8516 6.61246 13 7.2889 13 8C13 8.7111 12.8516 9.38754 12.584 10ZM9.96234 3.39978C10.7747 3.74677 11.4766 4.30269 12.0004 5H10.6159C10.5057 4.6038 10.3739 4.23601 10.2229 3.90401C10.144 3.7304 10.0571 3.56117 9.96234 3.39978Z",fill:"currentColor"}))}};C.style=o;exports.globe_icon=C;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-22f7e49c.cjs"),O=require("./register-component-cf5c8420-d3fb6bf9.cjs");require("react");require("react-dom");const U=".sc-google-logo-icon-h{display:flex}",A=U,V=class{constructor(a){e.registerInstance(this,a),this.width="24",this.height="24"}render(){return e.h("svg",{key:"e71880e55c9352a0e1ee2ad058727601f35e3ce4",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.h("g",{key:"7fec6b17669641c93baae51ca32571112071fef7","clip-path":"url(#clip0_959_12452)"},e.h("path",{key:"dc78e953321de09b2eb1a617d36757840fa3bc77",d:"M23.745 12.27C23.745 11.48 23.675 10.73 23.555 10H12.255V14.51H18.725C18.435 15.99 17.585 17.24 16.325 18.09V21.09H20.185C22.445 19 23.745 15.92 23.745 12.27Z",fill:"#4285F4"}),e.h("path",{key:"fd3fa31399c0daddb0666b5e5bfa22df37d707ed",d:"M12.255 24C15.495 24 18.205 22.92 20.185 21.09L16.325 18.09C15.245 18.81 13.875 19.25 12.255 19.25C9.12504 19.25 6.47505 17.14 5.52505 14.29H1.54504V17.38C3.51504 21.3 7.56504 24 12.255 24Z",fill:"#34A853"}),e.h("path",{key:"ba6682324108438a8d09fd8c2f485fd902ac7d1e",d:"M5.52501 14.2901C5.27501 13.5701 5.145 12.8001 5.145 12.0001C5.145 11.2001 5.28501 10.4301 5.52501 9.71012V6.62012H1.545C0.725004 8.24012 0.255005 10.0601 0.255005 12.0001C0.255005 13.9401 0.725004 15.7601 1.545 17.3801L5.52501 14.2901Z",fill:"#FBBC05"}),e.h("path",{key:"8f343c03d1881b1db41b2f259c58b0ad37256909",d:"M12.255 4.75C14.025 4.75 15.605 5.36 16.855 6.55L20.275 3.13C18.205 1.19 15.495 0 12.255 0C7.56504 0 3.51504 2.7 1.54504 6.62L5.52505 9.71C6.47505 6.86 9.12504 4.75 12.255 4.75Z",fill:"#EA4335"})),e.h("defs",{key:"d139b2306583164474093240ab884fddbe240f16"},e.h("clipPath",{key:"d54b7ab509f646be7407b61c0e6b49765f5325d7",id:"clip0_959_12452"},e.h("rect",{key:"ac9a24a627127c049b291447ce1198424416f4ae",width:24,height:24,fill:"white"}))))}};V.style=A;const Z=".sc-microsoft-logo-icon-h{display:flex}",q=Z,N=class{constructor(a){e.registerInstance(this,a),this.width="22",this.height="22"}render(){return e.h("svg",{key:"48516ac28c70d446ba44e3b65252920c4e8d3b06",width:this.width,height:this.height,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"29c0f58e11eb99e946fd2dcb33ef603620305d9d",d:"M0.043457 0.043457H10.4782V10.4782H0.043457V0.043457Z",fill:"#F35325"}),e.h("path",{key:"6b5303ad19e48b6c0ad9842ee748dc7db17e2a68",d:"M11.5217 0.043457H21.9565V10.4782H11.5217V0.043457Z",fill:"#81BC06"}),e.h("path",{key:"278ce5362ac072c57040ad1bf944557f71809b5f",d:"M0.043457 11.5217H10.4782V21.9565H0.043457V11.5217Z",fill:"#05A6F0"}),e.h("path",{key:"9c2b9b9c87a902dd80cae38db0c46c94435903c2",d:"M11.5217 11.5217H21.9565V21.9565H11.5217V11.5217Z",fill:"#FFBA08"}))}};N.style=q;function z({id:a,formState:t,activeTab:n,calendars:s}){var o,i;switch(n){case"eventInfo":const r=t.title,c=t.description,b=parseInt(t.duration),f=t.location;return e.h("div",{key:a},e.h("nylas-event-info",null,e.h("div",{slot:"inputs"},e.h("nylas-event-title",{name:"title",eventTitle:r,exportparts:"net, net__title, net__dropdown-content"}),e.h("nylas-event-duration",{name:"duration",eventDurationMinutes:b,exportparts:"ned, ned__input, ned__dropdown, ned__dropdown-button, ned__dropdown-content"}),e.h("nylas-location-component",{name:"location",eventLocation:f,exportparts:"nel, nel__location, nel__dropdown, nel__dropdown-button, nel__dropdown-content"}),e.h("nylas-event-description",{name:"description",eventDescription:c,exportparts:"nedesc, nedesc__textarea"}))));case"availability":const d=t.availability,p=((o=d==null?void 0:d[0])==null?void 0:o.timezone)??Intl.DateTimeFormat().resolvedOptions().timeZone,h=(i=t.participants)==null?void 0:i.find(u=>u.is_organizer),l=(h==null?void 0:h.email)??"primary",y=t.calendarIds.length>0?t.calendarIds:[l],g=t.bookingCalendar=="primary"?l:t.bookingCalendar;return e.h("div",{key:a},e.h("nylas-booking-calendar-picker",{name:"booking-calendar",calendars:s??[],defaultBookingCalendar:g,exportparts:"nbcp, nbcp__header, nbcp__input-label, nbcp__dropdown, nbcp__dropdown-button, nbcp__dropdown-content"}),e.h("nylas-calendar-picker",{name:"calendars",calendars:s??[],defaultSelectedCalendars:y,organizerEmail:l,exportparts:"ncp ncp__header, ncp__dropdown, ncp__dropdown-button, ncp__dropdown-content"}),e.h("nylas-availability-picker",{name:"availability",openHours:d,defaultTimezone:p,exportparts:"nap__header, nap__select-timezone, nap__select-timezone-button, nap__select-timezone-dropdown-content, nap__availability, nap__day, nap__time-ranges, nap__time-range, nap__add-time-range, nap__time-picker-container, nap__time-picker-input, nap__time-picker-times"}));case"bookingOptions":return e.h("div",{key:a},a=="new"&&e.h("p",null,"Config"),e.h("nylas-buffer-time",{name:"buffer-time",buffer:t.buffer,exportparts:"nbt, nbt__header, nbt__body, nbt__dropdown-before, nbt__dropdown-button-before, nbt__dropdown-content-before, nbt__dropdown-after, nbt__dropdown-button-after, nbt__dropdown-content-after, nbt__preview"}),e.h("nylas-custom-booking-flow",{name:"booking-type",bookingType:t.bookingType,exportparts:"ncbf, ncbf__header, ncbf__dropdown, ncbf__dropdown-button, ncbf__dropdown-content"}),e.h("nylas-event-limits",null,e.h("div",{slot:"inputs"},e.h("nylas-limit-future-bookings",{name:"limit-future-bookings",availableDaysInFuture:t.availableDaysInFuture,exportparts:"nlfb, nlfb__number-dropdown, nlfb__number-dropdown-button, nlfb__number-dropdown-content, nlfb__period-dropdown, nlfb__period-dropdown-button, nlfb__period-dropdown-content"}),e.h("nylas-min-cancellation-notice",{name:"min-cancellation-notice",minCancellationNotice:t.minCancellationNotice,exportparts:"nmcn, nmcn__number-dropdown, nmcn__number-dropdown-button, nmcn__number-dropdown-content, nmcn__period-dropdown, nmcn__period-dropdown-button, nmcn__period-dropdown-content"}))))}}const W='.sc-nylas-editor-tabs-h{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.scheduler-editor.sc-nylas-editor-tabs{display:flex;flex-direction:column}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs{display:grid;grid-template-columns:minmax(224px, 25%) 1fr}@media screen and (max-width: 768px){.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs{display:table-column-group}}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs{display:flex;flex-direction:column;border-right:1px solid var(--nylas-base-200);background-color:var(--nylas-base-25)}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.sc-nylas-editor-tabs{display:flex;align-items:center;gap:0.5rem;padding:0.5rem 1rem;color:var(--nylas-base-900);background:var(--nylas-base-0);border:none;height:56px;font-family:var(--nylas-font-family);font-size:16px;font-weight:500;line-height:24px;cursor:pointer}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.sc-nylas-editor-tabs:not(:first-of-type){margin-top:0.25rem}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.active.sc-nylas-editor-tabs{font-weight:600;background:var(--nylas-base-0);color:var(--nylas-primary);border-left:4px solid var(--nylas-primary);box-shadow:0px 1px 2px 0px rgba(0, 0, 0, 0.0588235294);box-shadow:0px 1px 3px 0px rgba(0, 0, 0, 0.1019607843)}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs{max-width:692px}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-info.sc-nylas-editor-tabs div[slot=inputs].sc-nylas-editor-tabs,.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-limits.sc-nylas-editor-tabs div[slot=inputs].sc-nylas-editor-tabs{display:flex;flex-direction:column;gap:1rem}.footer.sc-nylas-editor-tabs{display:flex;justify-content:space-between;align-items:center;gap:1rem;height:80px;padding:0 1rem;border-top:1px solid var(--nylas-base-200)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs{display:flex;justify-content:flex-end;align-items:center;justify-self:flex-end;gap:1rem}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs .unsaved-changes.sc-nylas-editor-tabs{color:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs .saved-changes.sc-nylas-editor-tabs{color:var(--nylas-success)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs{background:var(--nylas-primary);color:var(--nylas-base-0);height:48px;border:none;border-radius:var(--nylas-border-radius-2x);font-size:1rem;line-height:24px;padding:0 1rem;cursor:pointer;width:148px}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:hover{background:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:active{background:var(--nylas-base-800)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:disabled{background:var(--nylas-base-300);cursor:not-allowed}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs span.sc-nylas-editor-tabs{display:flex;align-items:center;justify-content:center;gap:0.5rem}',G=W;var J=function(a,t,n,s){var o=arguments.length,i=o<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(a,t,n,s);else for(var c=a.length-1;c>=0;c--)(r=a[c])&&(i=(o<3?r(i):o>3?r(t,n,i):r(t,n))||i);return o>3&&i&&Object.defineProperty(t,n,i),i},w=function(a,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(a,t)};const S=class{constructor(a){e.registerInstance(this,a),this.schedulerConfigChanged=e.createEvent(this,"schedulerConfigChanged",7),this.cancelButtonClick=e.createEvent(this,"cancelButtonClick",7),this.previewButtonClicked=e.createEvent(this,"previewButtonClicked",7),this.formSubmissionHandler=async t=>{var u,m,v,_,k,C,T,B,D,I,H,F,E,P,j,R;t.preventDefault(),this.isLoading=!0,this.hasUnsavedChanges=!1,this.updateFormState();const{title:n,description:s,duration:o,availability:i,calendarIds:r,bookingCalendar:c,location:b,bookingType:f,buffer:d,availableDaysInFuture:p,minCancellationNotice:h}=this.formState,l=(m=(u=this.config)==null?void 0:u.participants)==null?void 0:m.find(M=>M.is_organizer),y={...((v=this.config)==null?void 0:v.id)&&{id:this.config.id},version:((_=this.config)==null?void 0:_.version)??"1.0.0",availability:{duration_minutes:o?parseInt(o):0,availability_rules:{availability_method:((T=(C=(k=this.config)==null?void 0:k.availability)==null?void 0:C.availability_rules)==null?void 0:T.availability_method)??"collective",buffer:d||{before:0,after:0},default_open_hours:((I=(D=(B=this.config)==null?void 0:B.availability)==null?void 0:D.availability_rules)==null?void 0:I.default_open_hours)??[],round_robin_group_id:((E=(F=(H=this.config)==null?void 0:H.availability)==null?void 0:F.availability_rules)==null?void 0:E.round_robin_group_id)??""}},participants:[{name:(l==null?void 0:l.name)??(l==null?void 0:l.email)??((P=this.currentUser)==null?void 0:P.name)??((j=this.currentUser)==null?void 0:j.email)??"",email:(l==null?void 0:l.email)??((R=this.currentUser)==null?void 0:R.email)??"",is_organizer:!0,availability:{calendar_ids:r!=null&&r.length?r:["primary"],open_hours:i??[]},booking:{calendar_id:c&&c!==""?c:"primary"}}],event_booking:{title:(n==null?void 0:n.toString())??"",description:(s==null?void 0:s.toString())??"",location:(b==null?void 0:b.toString())??"",booking_type:(f==null?void 0:f.toString())??"booking"},scheduler:{available_days_in_future:p??30,min_cancellation_notice:h??0}},g=M=>{this.isLoading=!1,this.changesSaved=!0,setTimeout(()=>{this.changesSaved=!1},5e3)};this.schedulerConfigChanged.emit({config:y,resetLoadingState:g,action:this.action})},this.calendars=void 0,this.config=void 0,this.currentUser=void 0,this.schedulerPreviewLink="",this.action="create",this.activeTab="eventInfo",this.isLoading=!1,this.hasUnsavedChanges=!1,this.changesSaved=!1,this.formState={}}configChangedHandler(a){e.debug("[nylas-editor-tabs]","configChangedHandler",a,this.config),this.formState={...this.getFormStateFromConfig(a)},a.id?this.action="edit":this.action="create"}connectedCallback(){e.debug("[nylas-editor-tabs]","connectedCallback")}componentWillLoad(){e.debug("[nylas-editor-tabs]","componentWillLoad"),this.formState=this.getFormStateFromConfig(this.config)}componentDidLoad(){e.debug("[nylas-editor-tabs]","componentDidLoad")}disconnectedCallback(){e.debug("[nylas-editor-tabs]","disconnectedCallback")}handleValueChanged(a){e.debug("[nylas-editor-tabs]","handleValueChanged",a),this.formState={...this.formState,[a.detail.name]:a.detail.value},this.hasUnsavedChanges=!0}getFormStateFromConfig(a){var n,s,o,i,r,c,b,f,d,p,h,l,y,g,u,m,v,_,k;const t=(n=a==null?void 0:a.participants)==null?void 0:n.find(C=>C.is_organizer);return{title:((s=a==null?void 0:a.event_booking)==null?void 0:s.title)??"",description:((o=a==null?void 0:a.event_booking)==null?void 0:o.description)??"",duration:((r=(i=a==null?void 0:a.availability)==null?void 0:i.duration_minutes)==null?void 0:r.toString())??"10",availability:((c=t==null?void 0:t.availability)==null?void 0:c.open_hours)??void 0,calendarIds:((b=t==null?void 0:t.availability)==null?void 0:b.calendar_ids)??[],participants:(a==null?void 0:a.participants)??[],bookingCalendar:((f=t==null?void 0:t.booking)==null?void 0:f.calendar_id)??(t==null?void 0:t.email)??"",location:((p=(d=this.config)==null?void 0:d.event_booking)==null?void 0:p.location)??"",bookingType:((l=(h=this.config)==null?void 0:h.event_booking)==null?void 0:l.booking_type)??"booking",buffer:((u=(g=(y=this.config)==null?void 0:y.availability)==null?void 0:g.availability_rules)==null?void 0:u.buffer)??{before:0,after:0},availableDaysInFuture:((v=(m=this.config)==null?void 0:m.scheduler)==null?void 0:v.available_days_in_future)??30,minCancellationNotice:((k=(_=this.config)==null?void 0:_.scheduler)==null?void 0:k.min_cancellation_notice)??0}}updateFormState(){new FormData(this.formRef).forEach((t,n)=>{switch(n){case"title":this.formState.title=t.toString();break;case"description":this.formState.description=t.toString();break;case"duration":this.formState.duration=t.toString();break;case"availability":this.formState.availability=JSON.parse(t.toString());break;case"participants":this.formState.participants=JSON.parse(t.toString());break;case"calendars":this.formState.calendarIds=t.toString().split(",");break;case"booking-calendar":this.formState.bookingCalendar=t.toString();break;case"location":this.formState.location=t.toString();break;case"booking-type":this.formState.bookingType=t.toString();break;case"buffer-time":this.formState.buffer=JSON.parse(t.toString());break;case"limit-future-bookings":this.formState.availableDaysInFuture=parseInt(t.toString());break;case"min-cancellation-notice":this.formState.minCancellationNotice=parseInt(t.toString());break}}),this.formState={...this.formState}}setActiveTab(a,t){a.preventDefault(),this.updateFormState(),this.activeTab=t}render(){var a;return e.debug("[nylas-editor-tabs]","render",this.formState),e.h(e.Host,{key:"5a1e8ee246d47626dce5515c3ec4df3e6ae893a4"},e.h("form",{key:"f49d1fa60f2724c5cae8c1328dfee945ae24f1e2",onSubmit:this.formSubmissionHandler,class:"scheduler-editor",ref:t=>this.formRef=t},e.h("div",{key:"f0b678836e12c3878128e4b810e5541f00ddee29",class:"form-contents"},e.h("div",{key:"910dc155a6b7b01e300084fe405da0d0b0801847",class:"tabs"},e.h("button",{key:"80ca54ac98ae0d3b2298ae62253ffcb9d3ae539d",class:{tab:!0,active:this.activeTab=="eventInfo"},onClick:t=>this.setActiveTab(t,"eventInfo")},e.h("calendar-info-icon",{key:"842e45f308921afa7948f8408b84f95d7b802850",width:"16",height:"16"}),"Event Info"),e.h("button",{key:"7b79207240cbae5dcd554d448f68dc544f2e6c80",class:{tab:!0,active:this.activeTab=="availability"},onClick:t=>this.setActiveTab(t,"availability")},e.h("calendar-patterns-icon",{key:"47b3d8cf7ee50eac7d377ab3faf35c27f1215e96",width:"16",height:"16"}),"Availability"),e.h("button",{key:"ffb175caa6ccc4ba377ee4947759d0561ebb089b",class:{tab:!0,active:this.activeTab=="bookingOptions"},onClick:t=>this.setActiveTab(t,"bookingOptions")},e.h("flow-icon",{key:"fc3bec08bd5080e7b2ec7816bb3c021876c20d7c",width:"16",height:"16"}),"Booking Options")),e.h("div",{key:"80802e1388eb767bcea718907e75d5b4a2de3701",class:"tab-content"},e.h(z,{key:"5c5618341227447d2a41061f415e54d83efc354a",formState:this.formState,activeTab:this.activeTab,calendars:this.calendars,id:((a=this.config)==null?void 0:a.id)??"new"}))),e.h("div",{key:"d315bad7ea2efe6699557a5e07b55053926a7517",class:"footer"},e.h("div",{key:"4c92a480ee6d2f04d9fa36f3e870d414835406e1",class:"preview"},this.schedulerPreviewLink!==""&&this.action==="edit"&&e.h("button-component",{type:"button",disabled:this.isLoading,clickHandler:t=>{t.preventDefault(),this.previewButtonClicked.emit(this.host).defaultPrevented||window.open(e.parsePreviewLink(this.schedulerPreviewLink,this.config),"_blank")},variant:"basic"},"Preview")),e.h("div",{key:"22fdd2183dcc2c299d2fdacf0db8922a95a5692e",class:"buttons"},e.h("p",{key:"63ea7b4d8362f409caec467a7bce22142ccc1b20",class:{"unsaved-changes":this.hasUnsavedChanges&&!this.changesSaved,"saved-changes":this.changesSaved}},this.hasUnsavedChanges&&!this.changesSaved?"Unsaved changes":this.changesSaved?"Changes saved!":""),e.h("button-component",{key:"6ceded872ee5510234ff79bff3f0173a72314714",type:"button",disabled:this.isLoading,clickHandler:t=>{t.preventDefault(),this.cancelButtonClick.emit()},variant:"basic"},"Cancel"),e.h("button-component",{key:"4f33ad6071f503837395d900b67fafc8605d8043",type:"submit",disabled:this.isLoading},this.isLoading?e.h("span",null,"Saving",e.h("loading-icon",null)," "):this.action=="create"?"Create":"Save changes")))))}get host(){return e.getElement(this)}static get watchers(){return{config:["configChangedHandler"]}}};J([O.RegisterComponent({name:"nylas-editor-tabs",stateToProps:new Map([["schedulerConfig.calendars","calendars"],["schedulerConfig.config","config"],["schedulerConfig.currentUser","currentUser"]]),eventToProps:{schedulerConfigChanged:async(a,t)=>{const{resetLoadingState:n,action:s,config:o}=a.detail;n&&n(a),s==="edit"?await t.schedulerConfig.updateConfiguration(o):await t.schedulerConfig.createConfiguration(o)},cancelButtonClick:async(a,t)=>{t.schedulerConfigStore.state.action=null}},localPropsToProp:new Map([["schedulerPreviewLink","schedulerPreviewLink"]]),fireRegisterEvent:!0}),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],S.prototype,"render",null);S.style=G;const $=':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.header{display:flex;align-items:center;justify-content:space-between;margin-bottom:1rem}.header h2{margin:0;font-size:1.25rem;color:var(--nylas-base-900)}.header p{margin:0;font-size:1rem;color:var(--nylas-base-700)}.header .actions{justify-self:end}.configurations{border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}.configurations table{width:100%;border-spacing:0;border-collapse:collapse}.configurations table tr{border-bottom:1px solid var(--nylas-base-200)}.configurations table tr:last-of-type{border-bottom:0}.configurations table tr.no-configurations td>div{display:flex;height:100%;justify-content:center;align-items:center;flex-direction:column;padding:var(--nylas-border-radius-3x)}.configurations table tr.no-configurations td>div h3{margin:0 0 1rem 0;color:var(--nylas-base-700)}.configurations table tr.no-configurations td>div p{margin:0 0 1rem 0;color:var(--nylas-base-600)}.configurations table tr.no-configurations td>div calendar-icon{margin-bottom:1rem;color:var(--nylas-base-200)}.configurations table th,.configurations table td{text-align:left;padding:1rem}.configurations table .actions{text-align:right}.configurations table .actions{display:flex;justify-content:flex-end;gap:1rem}.configurations table .title{display:flex;flex-direction:column}.configurations table .title .config-event-title{font-weight:600}.configurations table .title .config-event-description{font-size:0.75rem}',K=$;var Q=function(a,t,n,s){var o=arguments.length,i=o<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(a,t,n,s);else for(var c=a.length-1;c>=0;c--)(r=a[c])&&(i=(o<3?r(i):o>3?r(t,n,i):r(t,n))||i);return o>3&&i&&Object.defineProperty(t,n,i),i},x=function(a,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(a,t)};const L=class{constructor(a){e.registerInstance(this,a),this.initListConfigurations=e.createEvent(this,"initListConfigurations",7),this.createButtonClick=e.createEvent(this,"createButtonClick",7),this.editButtonClick=e.createEvent(this,"editButtonClick",7),this.deleteButtonClick=e.createEvent(this,"deleteButtonClick",7),this.configurations=[],this.schedulerPreviewLink="",this.state="loading"}connectedCallback(){e.debug("[nylas-list-configurations]","connectedCallback")}componentWillLoad(){e.debug("[nylas-list-configurations]","componentWillLoad"),this.configurations&&this.configurations.length>0&&(this.state="loaded")}componentDidLoad(){e.debug("[nylas-list-configurations]","componentDidLoad"),this.initListConfigurations.emit(this.host)}disconnectedCallback(){e.debug("[nylas-list-configurations]","disconnectedCallback")}async getState(){return this.state}async setState(a){this.state=a}render(){return e.h(e.Host,{key:"c6579bd33e43be81caa460d87e99ed53f8123c6a"},e.h("div",{key:"d3ff4fc25e34a2dab3820b774f52a845c37bb282",class:"nylas-list-configurations"},e.h("div",{key:"fc6ff138be7cf63196217b7ef7524ae8f0a82c5c",class:"header"},e.h("div",{key:"a518d44c645bfc5d5e8449119ebc4be7c475a5f3",class:"description"},e.h("h2",{key:"a9d999a93c26ee3d9040dcae09306ecb7da43fb5"},"All scheduling configurations"),e.h("p",{key:"6361799617ce1ccf7469cce6a0064d94d97701b0"},"Create, edit and manage all your scheduling configurations.")),this.configurations&&this.configurations.length>0&&e.h("div",{class:"actions"},e.h("button-component",{clickHandler:()=>{this.createButtonClick.emit(this.host)}},"Create new"))),e.h("div",{key:"3f26491b35427c4364bcc1c5e1cbffdfabd52d37",class:"configurations"},e.h("table",{key:"ca8bf13b620b92cd4892b8dbf218988915ce4fc0"},e.h("tr",{key:"09526ab48bbc988b0595f8060a184c340f1d43cc"},e.h("th",{key:"7367e03d461f854eaf84e166d65471d356f44ee5"},"Configuration event title"),e.h("th",{key:"f983dcae11fdd33e21f0f202eb9b43a7d409b714"},"Duration"),e.h("th",{key:"828c60e134498a1db8bd31ce0311bb8a771cb435",class:"actions"},"Actions")),this.state==="loading"&&e.h("tr",{class:"no-configurations"},e.h("td",{colSpan:3},e.h("div",null,e.h("h3",null,"Loading..."),e.h("p",null,"Please wait while we fetch your configurations")))),this.state!=="loading"&&(!this.configurations||this.configurations.length===0)&&e.h("tr",{class:"no-configurations"},e.h("td",{colSpan:3},e.h("div",null,e.h("calendar-icon",{width:"48",height:"48"}),e.h("h3",null,"No configurations found"),e.h("p",null,"Get started with creating your first scheduling page"),e.h("button-component",{clickHandler:()=>{this.createButtonClick.emit(this.host)}},"Create new")))),this.state!=="loading"&&this.configurations.map(a=>e.h("tr",{key:a.id},e.h("td",null,e.h("div",{class:"title"},e.h("span",{class:"config-event-title"},a.event_booking.title),e.h("span",{class:"config-event-description"},a.event_booking.description))),e.h("td",null,e.h("div",null,a.availability.duration_minutes," mins")),e.h("td",null,e.h("div",{class:"actions"},e.h("button-component",{variant:"basic",clickHandler:t=>{t.preventDefault(),window.open(e.parsePreviewLink(this.schedulerPreviewLink,a),"_blank")}},"Preview"),e.h("button-component",{variant:"basic",clickHandler:t=>{t.preventDefault(),this.editButtonClick.emit({host:this.host,configuration:a})}},"Edit"),e.h("button-component",{variant:"basic",clickHandler:t=>{t.preventDefault(),this.deleteButtonClick.emit({host:this.host,configuration:a})}},"Delete")))))))))}get host(){return e.getElement(this)}};Q([O.RegisterComponent({name:"nylas-list-configurations",stateToProps:new Map([["schedulerConfig.configurations","configurations"]]),localPropsToProp:new Map([["schedulerPreviewLink","schedulerPreviewLink"]]),eventToProps:{initListConfigurations:async(a,t)=>{const n=a.detail;await n.setState("loading"),await t.schedulerConfig.getConfigurations(),await n.setState("loaded")},createButtonClick:async(a,t)=>{t.schedulerConfigStore.state.config={},t.schedulerConfigStore.state.action="create"},deleteButtonClick:async(a,t)=>{const{configuration:n}=a.detail;await t.schedulerConfig.deleteConfiguration(n.id)},editButtonClick:async(a,t)=>{const{configuration:n}=a.detail;t.schedulerConfigStore.state.config=n,t.schedulerConfigStore.state.action="edit"}},fireRegisterEvent:!0}),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],L.prototype,"render",null);L.style=K;exports.google_logo_icon=V;exports.microsoft_logo_icon=N;exports.nylas_editor_tabs=S;exports.nylas_list_configurations=L;
|