@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
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
import { r as S, h as t, c as y, d, s as V, H as N, g as U } from "./index-f9ba9aa8.js";
|
|
2
|
+
import { R as A } from "./register-component-cf5c8420-dc1bc0a4.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import "react-dom";
|
|
5
|
+
const W = ".sc-google-logo-icon-h{display:flex}", G = W, J = class {
|
|
6
|
+
constructor(a) {
|
|
7
|
+
S(this, a), this.width = "24", this.height = "24";
|
|
8
|
+
}
|
|
9
|
+
render() {
|
|
10
|
+
return t("svg", { key: "e71880e55c9352a0e1ee2ad058727601f35e3ce4", width: this.width, height: this.height, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, t("g", { key: "7fec6b17669641c93baae51ca32571112071fef7", "clip-path": "url(#clip0_959_12452)" }, t("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" }), t("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" }), t("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" }), t("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" })), t("defs", { key: "d139b2306583164474093240ab884fddbe240f16" }, t("clipPath", { key: "d54b7ab509f646be7407b61c0e6b49765f5325d7", id: "clip0_959_12452" }, t("rect", { key: "ac9a24a627127c049b291447ce1198424416f4ae", width: 24, height: 24, fill: "white" }))));
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
J.style = G;
|
|
14
|
+
const $ = ".sc-microsoft-logo-icon-h{display:flex}", q = $, K = class {
|
|
15
|
+
constructor(a) {
|
|
16
|
+
S(this, a), this.width = "22", this.height = "22";
|
|
17
|
+
}
|
|
18
|
+
render() {
|
|
19
|
+
return t("svg", { key: "48516ac28c70d446ba44e3b65252920c4e8d3b06", width: this.width, height: this.height, viewBox: "0 0 22 22", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "29c0f58e11eb99e946fd2dcb33ef603620305d9d", d: "M0.043457 0.043457H10.4782V10.4782H0.043457V0.043457Z", fill: "#F35325" }), t("path", { key: "6b5303ad19e48b6c0ad9842ee748dc7db17e2a68", d: "M11.5217 0.043457H21.9565V10.4782H11.5217V0.043457Z", fill: "#81BC06" }), t("path", { key: "278ce5362ac072c57040ad1bf944557f71809b5f", d: "M0.043457 11.5217H10.4782V21.9565H0.043457V11.5217Z", fill: "#05A6F0" }), t("path", { key: "9c2b9b9c87a902dd80cae38db0c46c94435903c2", d: "M11.5217 11.5217H21.9565V21.9565H11.5217V11.5217Z", fill: "#FFBA08" }));
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
K.style = q;
|
|
23
|
+
function Q({ id: a, formState: e, activeTab: n, calendars: s }) {
|
|
24
|
+
var o, i;
|
|
25
|
+
switch (n) {
|
|
26
|
+
case "eventInfo":
|
|
27
|
+
const r = e.title, c = e.description, f = parseInt(e.duration), u = e.location;
|
|
28
|
+
return t(
|
|
29
|
+
"div",
|
|
30
|
+
{ key: a },
|
|
31
|
+
t(
|
|
32
|
+
"nylas-event-info",
|
|
33
|
+
null,
|
|
34
|
+
t(
|
|
35
|
+
"div",
|
|
36
|
+
{ slot: "inputs" },
|
|
37
|
+
t("nylas-event-title", { name: "title", eventTitle: r, exportparts: "net, net__title, net__dropdown-content" }),
|
|
38
|
+
t("nylas-event-duration", { name: "duration", eventDurationMinutes: f, exportparts: "ned, ned__input, ned__dropdown, ned__dropdown-button, ned__dropdown-content" }),
|
|
39
|
+
t("nylas-location-component", { name: "location", eventLocation: u, exportparts: "nel, nel__location, nel__dropdown, nel__dropdown-button, nel__dropdown-content" }),
|
|
40
|
+
t("nylas-event-description", { name: "description", eventDescription: c, exportparts: "nedesc, nedesc__textarea" })
|
|
41
|
+
)
|
|
42
|
+
)
|
|
43
|
+
);
|
|
44
|
+
case "availability":
|
|
45
|
+
const b = e.availability, g = ((o = b == null ? void 0 : b[0]) == null ? void 0 : o.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone, h = (i = e.participants) == null ? void 0 : i.find((p) => p.is_organizer), l = (h == null ? void 0 : h.email) ?? "primary", m = e.calendarIds.length > 0 ? e.calendarIds : [l], v = e.bookingCalendar == "primary" ? l : e.bookingCalendar;
|
|
46
|
+
return t(
|
|
47
|
+
"div",
|
|
48
|
+
{ key: a },
|
|
49
|
+
t("nylas-booking-calendar-picker", { name: "booking-calendar", calendars: s ?? [], defaultBookingCalendar: v, exportparts: "nbcp, nbcp__header, nbcp__input-label, nbcp__dropdown, nbcp__dropdown-button, nbcp__dropdown-content" }),
|
|
50
|
+
t("nylas-calendar-picker", { name: "calendars", calendars: s ?? [], defaultSelectedCalendars: m, organizerEmail: l, exportparts: "ncp ncp__header, ncp__dropdown, ncp__dropdown-button, ncp__dropdown-content" }),
|
|
51
|
+
t("nylas-availability-picker", { name: "availability", openHours: b, defaultTimezone: g, 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" })
|
|
52
|
+
);
|
|
53
|
+
case "bookingOptions":
|
|
54
|
+
return t(
|
|
55
|
+
"div",
|
|
56
|
+
{ key: a },
|
|
57
|
+
a == "new" && t("p", null, "Config"),
|
|
58
|
+
t("nylas-buffer-time", { name: "buffer-time", buffer: e.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" }),
|
|
59
|
+
t("nylas-custom-booking-flow", { name: "booking-type", bookingType: e.bookingType, exportparts: "ncbf, ncbf__header, ncbf__dropdown, ncbf__dropdown-button, ncbf__dropdown-content" }),
|
|
60
|
+
t(
|
|
61
|
+
"nylas-event-limits",
|
|
62
|
+
null,
|
|
63
|
+
t(
|
|
64
|
+
"div",
|
|
65
|
+
{ slot: "inputs" },
|
|
66
|
+
t("nylas-limit-future-bookings", { name: "limit-future-bookings", availableDaysInFuture: e.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" }),
|
|
67
|
+
t("nylas-min-cancellation-notice", { name: "min-cancellation-notice", minCancellationNotice: e.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" })
|
|
68
|
+
)
|
|
69
|
+
)
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
const X = '.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}', Y = X;
|
|
74
|
+
var ee = function(a, e, n, s) {
|
|
75
|
+
var o = arguments.length, i = o < 3 ? e : s === null ? s = Object.getOwnPropertyDescriptor(e, n) : s, r;
|
|
76
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
77
|
+
i = Reflect.decorate(a, e, n, s);
|
|
78
|
+
else
|
|
79
|
+
for (var c = a.length - 1; c >= 0; c--)
|
|
80
|
+
(r = a[c]) && (i = (o < 3 ? r(i) : o > 3 ? r(e, n, i) : r(e, n)) || i);
|
|
81
|
+
return o > 3 && i && Object.defineProperty(e, n, i), i;
|
|
82
|
+
}, L = function(a, e) {
|
|
83
|
+
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
84
|
+
return Reflect.metadata(a, e);
|
|
85
|
+
};
|
|
86
|
+
const Z = class {
|
|
87
|
+
constructor(a) {
|
|
88
|
+
S(this, a), this.schedulerConfigChanged = y(this, "schedulerConfigChanged", 7), this.cancelButtonClick = y(this, "cancelButtonClick", 7), this.previewButtonClicked = y(this, "previewButtonClicked", 7), this.formSubmissionHandler = async (e) => {
|
|
89
|
+
var p, _, k, w, C, x, B, D, H, I, F, P, R, j, E, M;
|
|
90
|
+
e.preventDefault(), this.isLoading = !0, this.hasUnsavedChanges = !1, this.updateFormState();
|
|
91
|
+
const { title: n, description: s, duration: o, availability: i, calendarIds: r, bookingCalendar: c, location: f, bookingType: u, buffer: b, availableDaysInFuture: g, minCancellationNotice: h } = this.formState, l = (_ = (p = this.config) == null ? void 0 : p.participants) == null ? void 0 : _.find((O) => O.is_organizer), m = {
|
|
92
|
+
...((k = this.config) == null ? void 0 : k.id) && { id: this.config.id },
|
|
93
|
+
version: ((w = this.config) == null ? void 0 : w.version) ?? "1.0.0",
|
|
94
|
+
availability: {
|
|
95
|
+
duration_minutes: o ? parseInt(o) : 0,
|
|
96
|
+
availability_rules: {
|
|
97
|
+
availability_method: ((B = (x = (C = this.config) == null ? void 0 : C.availability) == null ? void 0 : x.availability_rules) == null ? void 0 : B.availability_method) ?? "collective",
|
|
98
|
+
buffer: b || { before: 0, after: 0 },
|
|
99
|
+
default_open_hours: ((I = (H = (D = this.config) == null ? void 0 : D.availability) == null ? void 0 : H.availability_rules) == null ? void 0 : I.default_open_hours) ?? [],
|
|
100
|
+
round_robin_group_id: ((R = (P = (F = this.config) == null ? void 0 : F.availability) == null ? void 0 : P.availability_rules) == null ? void 0 : R.round_robin_group_id) ?? ""
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
participants: [
|
|
104
|
+
{
|
|
105
|
+
name: (l == null ? void 0 : l.name) ?? (l == null ? void 0 : l.email) ?? ((j = this.currentUser) == null ? void 0 : j.name) ?? ((E = this.currentUser) == null ? void 0 : E.email) ?? "",
|
|
106
|
+
email: (l == null ? void 0 : l.email) ?? ((M = this.currentUser) == null ? void 0 : M.email) ?? "",
|
|
107
|
+
is_organizer: !0,
|
|
108
|
+
availability: {
|
|
109
|
+
calendar_ids: r != null && r.length ? r : ["primary"],
|
|
110
|
+
open_hours: i ?? []
|
|
111
|
+
},
|
|
112
|
+
booking: {
|
|
113
|
+
calendar_id: c && c !== "" ? c : "primary"
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
],
|
|
117
|
+
event_booking: {
|
|
118
|
+
title: (n == null ? void 0 : n.toString()) ?? "",
|
|
119
|
+
description: (s == null ? void 0 : s.toString()) ?? "",
|
|
120
|
+
location: (f == null ? void 0 : f.toString()) ?? "",
|
|
121
|
+
booking_type: (u == null ? void 0 : u.toString()) ?? "booking"
|
|
122
|
+
},
|
|
123
|
+
scheduler: {
|
|
124
|
+
available_days_in_future: g ?? 30,
|
|
125
|
+
min_cancellation_notice: h ?? 0
|
|
126
|
+
}
|
|
127
|
+
}, v = (O) => {
|
|
128
|
+
this.isLoading = !1, this.changesSaved = !0, setTimeout(() => {
|
|
129
|
+
this.changesSaved = !1;
|
|
130
|
+
}, 5e3);
|
|
131
|
+
};
|
|
132
|
+
this.schedulerConfigChanged.emit({ config: m, resetLoadingState: v, action: this.action });
|
|
133
|
+
}, 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 = {};
|
|
134
|
+
}
|
|
135
|
+
configChangedHandler(a) {
|
|
136
|
+
d("[nylas-editor-tabs]", "configChangedHandler", a, this.config), this.formState = {
|
|
137
|
+
...this.getFormStateFromConfig(a)
|
|
138
|
+
}, a.id ? this.action = "edit" : this.action = "create";
|
|
139
|
+
}
|
|
140
|
+
connectedCallback() {
|
|
141
|
+
d("[nylas-editor-tabs]", "connectedCallback");
|
|
142
|
+
}
|
|
143
|
+
componentWillLoad() {
|
|
144
|
+
d("[nylas-editor-tabs]", "componentWillLoad"), this.formState = this.getFormStateFromConfig(this.config);
|
|
145
|
+
}
|
|
146
|
+
componentDidLoad() {
|
|
147
|
+
d("[nylas-editor-tabs]", "componentDidLoad");
|
|
148
|
+
}
|
|
149
|
+
disconnectedCallback() {
|
|
150
|
+
d("[nylas-editor-tabs]", "disconnectedCallback");
|
|
151
|
+
}
|
|
152
|
+
handleValueChanged(a) {
|
|
153
|
+
d("[nylas-editor-tabs]", "handleValueChanged", a), this.formState = { ...this.formState, [a.detail.name]: a.detail.value }, this.hasUnsavedChanges = !0;
|
|
154
|
+
}
|
|
155
|
+
getFormStateFromConfig(a) {
|
|
156
|
+
var n, s, o, i, r, c, f, u, b, g, h, l, m, v, p, _, k, w, C;
|
|
157
|
+
const e = (n = a == null ? void 0 : a.participants) == null ? void 0 : n.find((x) => x.is_organizer);
|
|
158
|
+
return {
|
|
159
|
+
title: ((s = a == null ? void 0 : a.event_booking) == null ? void 0 : s.title) ?? "",
|
|
160
|
+
description: ((o = a == null ? void 0 : a.event_booking) == null ? void 0 : o.description) ?? "",
|
|
161
|
+
duration: ((r = (i = a == null ? void 0 : a.availability) == null ? void 0 : i.duration_minutes) == null ? void 0 : r.toString()) ?? "10",
|
|
162
|
+
availability: ((c = e == null ? void 0 : e.availability) == null ? void 0 : c.open_hours) ?? void 0,
|
|
163
|
+
calendarIds: ((f = e == null ? void 0 : e.availability) == null ? void 0 : f.calendar_ids) ?? [],
|
|
164
|
+
participants: (a == null ? void 0 : a.participants) ?? [],
|
|
165
|
+
bookingCalendar: ((u = e == null ? void 0 : e.booking) == null ? void 0 : u.calendar_id) ?? (e == null ? void 0 : e.email) ?? "",
|
|
166
|
+
location: ((g = (b = this.config) == null ? void 0 : b.event_booking) == null ? void 0 : g.location) ?? "",
|
|
167
|
+
bookingType: ((l = (h = this.config) == null ? void 0 : h.event_booking) == null ? void 0 : l.booking_type) ?? "booking",
|
|
168
|
+
buffer: ((p = (v = (m = this.config) == null ? void 0 : m.availability) == null ? void 0 : v.availability_rules) == null ? void 0 : p.buffer) ?? { before: 0, after: 0 },
|
|
169
|
+
availableDaysInFuture: ((k = (_ = this.config) == null ? void 0 : _.scheduler) == null ? void 0 : k.available_days_in_future) ?? 30,
|
|
170
|
+
minCancellationNotice: ((C = (w = this.config) == null ? void 0 : w.scheduler) == null ? void 0 : C.min_cancellation_notice) ?? 0
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
updateFormState() {
|
|
174
|
+
new FormData(this.formRef).forEach((e, n) => {
|
|
175
|
+
switch (n) {
|
|
176
|
+
case "title":
|
|
177
|
+
this.formState.title = e.toString();
|
|
178
|
+
break;
|
|
179
|
+
case "description":
|
|
180
|
+
this.formState.description = e.toString();
|
|
181
|
+
break;
|
|
182
|
+
case "duration":
|
|
183
|
+
this.formState.duration = e.toString();
|
|
184
|
+
break;
|
|
185
|
+
case "availability":
|
|
186
|
+
this.formState.availability = JSON.parse(e.toString());
|
|
187
|
+
break;
|
|
188
|
+
case "participants":
|
|
189
|
+
this.formState.participants = JSON.parse(e.toString());
|
|
190
|
+
break;
|
|
191
|
+
case "calendars":
|
|
192
|
+
this.formState.calendarIds = e.toString().split(",");
|
|
193
|
+
break;
|
|
194
|
+
case "booking-calendar":
|
|
195
|
+
this.formState.bookingCalendar = e.toString();
|
|
196
|
+
break;
|
|
197
|
+
case "location":
|
|
198
|
+
this.formState.location = e.toString();
|
|
199
|
+
break;
|
|
200
|
+
case "booking-type":
|
|
201
|
+
this.formState.bookingType = e.toString();
|
|
202
|
+
break;
|
|
203
|
+
case "buffer-time":
|
|
204
|
+
this.formState.buffer = JSON.parse(e.toString());
|
|
205
|
+
break;
|
|
206
|
+
case "limit-future-bookings":
|
|
207
|
+
this.formState.availableDaysInFuture = parseInt(e.toString());
|
|
208
|
+
break;
|
|
209
|
+
case "min-cancellation-notice":
|
|
210
|
+
this.formState.minCancellationNotice = parseInt(e.toString());
|
|
211
|
+
break;
|
|
212
|
+
}
|
|
213
|
+
}), this.formState = { ...this.formState };
|
|
214
|
+
}
|
|
215
|
+
setActiveTab(a, e) {
|
|
216
|
+
a.preventDefault(), this.updateFormState(), this.activeTab = e;
|
|
217
|
+
}
|
|
218
|
+
render() {
|
|
219
|
+
var a;
|
|
220
|
+
return d("[nylas-editor-tabs]", "render", this.formState), t(N, { key: "5a1e8ee246d47626dce5515c3ec4df3e6ae893a4" }, t("form", { key: "f49d1fa60f2724c5cae8c1328dfee945ae24f1e2", onSubmit: this.formSubmissionHandler, class: "scheduler-editor", ref: (e) => this.formRef = e }, t("div", { key: "f0b678836e12c3878128e4b810e5541f00ddee29", class: "form-contents" }, t("div", { key: "910dc155a6b7b01e300084fe405da0d0b0801847", class: "tabs" }, t("button", { key: "80ca54ac98ae0d3b2298ae62253ffcb9d3ae539d", class: { tab: !0, active: this.activeTab == "eventInfo" }, onClick: (e) => this.setActiveTab(e, "eventInfo") }, t("calendar-info-icon", { key: "842e45f308921afa7948f8408b84f95d7b802850", width: "16", height: "16" }), "Event Info"), t("button", { key: "7b79207240cbae5dcd554d448f68dc544f2e6c80", class: { tab: !0, active: this.activeTab == "availability" }, onClick: (e) => this.setActiveTab(e, "availability") }, t("calendar-patterns-icon", { key: "47b3d8cf7ee50eac7d377ab3faf35c27f1215e96", width: "16", height: "16" }), "Availability"), t("button", { key: "ffb175caa6ccc4ba377ee4947759d0561ebb089b", class: { tab: !0, active: this.activeTab == "bookingOptions" }, onClick: (e) => this.setActiveTab(e, "bookingOptions") }, t("flow-icon", { key: "fc3bec08bd5080e7b2ec7816bb3c021876c20d7c", width: "16", height: "16" }), "Booking Options")), t("div", { key: "80802e1388eb767bcea718907e75d5b4a2de3701", class: "tab-content" }, t(Q, { key: "5c5618341227447d2a41061f415e54d83efc354a", formState: this.formState, activeTab: this.activeTab, calendars: this.calendars, id: ((a = this.config) == null ? void 0 : a.id) ?? "new" }))), t("div", { key: "d315bad7ea2efe6699557a5e07b55053926a7517", class: "footer" }, t("div", { key: "4c92a480ee6d2f04d9fa36f3e870d414835406e1", class: "preview" }, this.schedulerPreviewLink !== "" && this.action === "edit" && t("button-component", { type: "button", disabled: this.isLoading, clickHandler: (e) => {
|
|
221
|
+
e.preventDefault(), this.previewButtonClicked.emit(this.host).defaultPrevented || window.open(V(this.schedulerPreviewLink, this.config), "_blank");
|
|
222
|
+
}, variant: "basic" }, "Preview")), t("div", { key: "22fdd2183dcc2c299d2fdacf0db8922a95a5692e", class: "buttons" }, t("p", { key: "63ea7b4d8362f409caec467a7bce22142ccc1b20", class: {
|
|
223
|
+
"unsaved-changes": this.hasUnsavedChanges && !this.changesSaved,
|
|
224
|
+
"saved-changes": this.changesSaved
|
|
225
|
+
} }, this.hasUnsavedChanges && !this.changesSaved ? "Unsaved changes" : this.changesSaved ? "Changes saved!" : ""), t("button-component", { key: "6ceded872ee5510234ff79bff3f0173a72314714", type: "button", disabled: this.isLoading, clickHandler: (e) => {
|
|
226
|
+
e.preventDefault(), this.cancelButtonClick.emit();
|
|
227
|
+
}, variant: "basic" }, "Cancel"), t("button-component", { key: "4f33ad6071f503837395d900b67fafc8605d8043", type: "submit", disabled: this.isLoading }, this.isLoading ? t("span", null, "Saving", t("loading-icon", null), " ") : this.action == "create" ? "Create" : "Save changes")))));
|
|
228
|
+
}
|
|
229
|
+
get host() {
|
|
230
|
+
return U(this);
|
|
231
|
+
}
|
|
232
|
+
static get watchers() {
|
|
233
|
+
return {
|
|
234
|
+
config: ["configChangedHandler"]
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
};
|
|
238
|
+
ee([
|
|
239
|
+
A({
|
|
240
|
+
name: "nylas-editor-tabs",
|
|
241
|
+
stateToProps: /* @__PURE__ */ new Map([
|
|
242
|
+
["schedulerConfig.calendars", "calendars"],
|
|
243
|
+
["schedulerConfig.config", "config"],
|
|
244
|
+
["schedulerConfig.currentUser", "currentUser"]
|
|
245
|
+
]),
|
|
246
|
+
eventToProps: {
|
|
247
|
+
schedulerConfigChanged: async (a, e) => {
|
|
248
|
+
const { resetLoadingState: n, action: s, config: o } = a.detail;
|
|
249
|
+
n && n(a), s === "edit" ? await e.schedulerConfig.updateConfiguration(o) : await e.schedulerConfig.createConfiguration(o);
|
|
250
|
+
},
|
|
251
|
+
cancelButtonClick: async (a, e) => {
|
|
252
|
+
e.schedulerConfigStore.state.action = null;
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
localPropsToProp: /* @__PURE__ */ new Map([["schedulerPreviewLink", "schedulerPreviewLink"]]),
|
|
256
|
+
fireRegisterEvent: !0
|
|
257
|
+
}),
|
|
258
|
+
L("design:type", Function),
|
|
259
|
+
L("design:paramtypes", []),
|
|
260
|
+
L("design:returntype", void 0)
|
|
261
|
+
], Z.prototype, "render", null);
|
|
262
|
+
Z.style = Y;
|
|
263
|
+
const te = ':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}', ae = te;
|
|
264
|
+
var ne = function(a, e, n, s) {
|
|
265
|
+
var o = arguments.length, i = o < 3 ? e : s === null ? s = Object.getOwnPropertyDescriptor(e, n) : s, r;
|
|
266
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
267
|
+
i = Reflect.decorate(a, e, n, s);
|
|
268
|
+
else
|
|
269
|
+
for (var c = a.length - 1; c >= 0; c--)
|
|
270
|
+
(r = a[c]) && (i = (o < 3 ? r(i) : o > 3 ? r(e, n, i) : r(e, n)) || i);
|
|
271
|
+
return o > 3 && i && Object.defineProperty(e, n, i), i;
|
|
272
|
+
}, T = function(a, e) {
|
|
273
|
+
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
274
|
+
return Reflect.metadata(a, e);
|
|
275
|
+
};
|
|
276
|
+
const z = class {
|
|
277
|
+
constructor(a) {
|
|
278
|
+
S(this, a), this.initListConfigurations = y(this, "initListConfigurations", 7), this.createButtonClick = y(this, "createButtonClick", 7), this.editButtonClick = y(this, "editButtonClick", 7), this.deleteButtonClick = y(this, "deleteButtonClick", 7), this.configurations = [], this.schedulerPreviewLink = "", this.state = "loading";
|
|
279
|
+
}
|
|
280
|
+
connectedCallback() {
|
|
281
|
+
d("[nylas-list-configurations]", "connectedCallback");
|
|
282
|
+
}
|
|
283
|
+
componentWillLoad() {
|
|
284
|
+
d("[nylas-list-configurations]", "componentWillLoad"), this.configurations && this.configurations.length > 0 && (this.state = "loaded");
|
|
285
|
+
}
|
|
286
|
+
componentDidLoad() {
|
|
287
|
+
d("[nylas-list-configurations]", "componentDidLoad"), this.initListConfigurations.emit(this.host);
|
|
288
|
+
}
|
|
289
|
+
disconnectedCallback() {
|
|
290
|
+
d("[nylas-list-configurations]", "disconnectedCallback");
|
|
291
|
+
}
|
|
292
|
+
async getState() {
|
|
293
|
+
return this.state;
|
|
294
|
+
}
|
|
295
|
+
async setState(a) {
|
|
296
|
+
this.state = a;
|
|
297
|
+
}
|
|
298
|
+
render() {
|
|
299
|
+
return t(N, { key: "c6579bd33e43be81caa460d87e99ed53f8123c6a" }, t("div", { key: "d3ff4fc25e34a2dab3820b774f52a845c37bb282", class: "nylas-list-configurations" }, t("div", { key: "fc6ff138be7cf63196217b7ef7524ae8f0a82c5c", class: "header" }, t("div", { key: "a518d44c645bfc5d5e8449119ebc4be7c475a5f3", class: "description" }, t("h2", { key: "a9d999a93c26ee3d9040dcae09306ecb7da43fb5" }, "All scheduling configurations"), t("p", { key: "6361799617ce1ccf7469cce6a0064d94d97701b0" }, "Create, edit and manage all your scheduling configurations.")), this.configurations && this.configurations.length > 0 && t("div", { class: "actions" }, t("button-component", { clickHandler: () => {
|
|
300
|
+
this.createButtonClick.emit(this.host);
|
|
301
|
+
} }, "Create new"))), t("div", { key: "3f26491b35427c4364bcc1c5e1cbffdfabd52d37", class: "configurations" }, t("table", { key: "ca8bf13b620b92cd4892b8dbf218988915ce4fc0" }, t("tr", { key: "09526ab48bbc988b0595f8060a184c340f1d43cc" }, t("th", { key: "7367e03d461f854eaf84e166d65471d356f44ee5" }, "Configuration event title"), t("th", { key: "f983dcae11fdd33e21f0f202eb9b43a7d409b714" }, "Duration"), t("th", { key: "828c60e134498a1db8bd31ce0311bb8a771cb435", class: "actions" }, "Actions")), this.state === "loading" && t("tr", { class: "no-configurations" }, t("td", { colSpan: 3 }, t("div", null, t("h3", null, "Loading..."), t("p", null, "Please wait while we fetch your configurations")))), this.state !== "loading" && (!this.configurations || this.configurations.length === 0) && t("tr", { class: "no-configurations" }, t("td", { colSpan: 3 }, t("div", null, t("calendar-icon", { width: "48", height: "48" }), t("h3", null, "No configurations found"), t("p", null, "Get started with creating your first scheduling page"), t("button-component", { clickHandler: () => {
|
|
302
|
+
this.createButtonClick.emit(this.host);
|
|
303
|
+
} }, "Create new")))), this.state !== "loading" && this.configurations.map((a) => t("tr", { key: a.id }, t("td", null, t("div", { class: "title" }, t("span", { class: "config-event-title" }, a.event_booking.title), t("span", { class: "config-event-description" }, a.event_booking.description))), t("td", null, t("div", null, a.availability.duration_minutes, " mins")), t("td", null, t("div", { class: "actions" }, t("button-component", { variant: "basic", clickHandler: (e) => {
|
|
304
|
+
e.preventDefault(), window.open(V(this.schedulerPreviewLink, a), "_blank");
|
|
305
|
+
} }, "Preview"), t("button-component", { variant: "basic", clickHandler: (e) => {
|
|
306
|
+
e.preventDefault(), this.editButtonClick.emit({ host: this.host, configuration: a });
|
|
307
|
+
} }, "Edit"), t("button-component", { variant: "basic", clickHandler: (e) => {
|
|
308
|
+
e.preventDefault(), this.deleteButtonClick.emit({ host: this.host, configuration: a });
|
|
309
|
+
} }, "Delete")))))))));
|
|
310
|
+
}
|
|
311
|
+
get host() {
|
|
312
|
+
return U(this);
|
|
313
|
+
}
|
|
314
|
+
};
|
|
315
|
+
ne([
|
|
316
|
+
A({
|
|
317
|
+
name: "nylas-list-configurations",
|
|
318
|
+
stateToProps: /* @__PURE__ */ new Map([["schedulerConfig.configurations", "configurations"]]),
|
|
319
|
+
localPropsToProp: /* @__PURE__ */ new Map([["schedulerPreviewLink", "schedulerPreviewLink"]]),
|
|
320
|
+
eventToProps: {
|
|
321
|
+
initListConfigurations: async (a, e) => {
|
|
322
|
+
const n = a.detail;
|
|
323
|
+
await n.setState("loading"), await e.schedulerConfig.getConfigurations(), await n.setState("loaded");
|
|
324
|
+
},
|
|
325
|
+
createButtonClick: async (a, e) => {
|
|
326
|
+
e.schedulerConfigStore.state.config = {}, e.schedulerConfigStore.state.action = "create";
|
|
327
|
+
},
|
|
328
|
+
deleteButtonClick: async (a, e) => {
|
|
329
|
+
const { configuration: n } = a.detail;
|
|
330
|
+
await e.schedulerConfig.deleteConfiguration(n.id);
|
|
331
|
+
},
|
|
332
|
+
editButtonClick: async (a, e) => {
|
|
333
|
+
const { configuration: n } = a.detail;
|
|
334
|
+
e.schedulerConfigStore.state.config = n, e.schedulerConfigStore.state.action = "edit";
|
|
335
|
+
}
|
|
336
|
+
},
|
|
337
|
+
fireRegisterEvent: !0
|
|
338
|
+
}),
|
|
339
|
+
T("design:type", Function),
|
|
340
|
+
T("design:paramtypes", []),
|
|
341
|
+
T("design:returntype", void 0)
|
|
342
|
+
], z.prototype, "render", null);
|
|
343
|
+
z.style = ae;
|
|
344
|
+
export {
|
|
345
|
+
J as google_logo_icon,
|
|
346
|
+
K as microsoft_logo_icon,
|
|
347
|
+
Z as nylas_editor_tabs,
|
|
348
|
+
z as nylas_list_configurations
|
|
349
|
+
};
|