@nylas/react 1.1.0-canary.3 → 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-da31fa71.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-bc2418f7.js → archive-icon_7.entry-24bac466.js} +21 -21
- package/dist/{archive-icon_7.entry-7aad8104.cjs → archive-icon_7.entry-6649ed76.cjs} +1 -1
- package/dist/{arrow-icon.entry-6eba68a9.cjs → arrow-icon.entry-1fffd526.cjs} +1 -1
- package/dist/{arrow-icon.entry-9a932082.js → arrow-icon.entry-82e59ce4.js} +4 -4
- package/dist/{bold-icon_3.entry-db17d481.cjs → bold-icon_3.entry-5a01fecf.cjs} +1 -1
- package/dist/{bold-icon_3.entry-5f7e3755.js → bold-icon_3.entry-72e585da.js} +4 -4
- package/dist/{calendar-cancel-icon.entry-a5141f82.cjs → calendar-cancel-icon.entry-0b52bdc9.cjs} +1 -1
- package/dist/{calendar-cancel-icon.entry-1ff7845a.js → calendar-cancel-icon.entry-247b530c.js} +5 -5
- package/dist/{calendar-check-icon_2.entry-c3add652.cjs → calendar-check-icon_2.entry-d7bb76c7.cjs} +1 -1
- package/dist/{calendar-check-icon_2.entry-d7421059.js → calendar-check-icon_2.entry-dbb2df49.js} +7 -7
- package/dist/{calendar-icon.entry-445d624a.cjs → calendar-icon.entry-911773c4.cjs} +1 -1
- package/dist/{calendar-icon.entry-4458997f.js → calendar-icon.entry-d64cb3d3.js} +2 -2
- package/dist/{chevron-icon_3.entry-8961e6bb.cjs → chevron-icon_3.entry-b72f4cdb.cjs} +1 -1
- package/dist/{chevron-icon_3.entry-f7f3d487.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-bdc323b5.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-62759373.js → forward-icon_6.entry-f054ad9d.js} +65 -67
- package/dist/{globe-icon.entry-9e082178.js → globe-icon.entry-2fde6ac4.js} +4 -4
- package/dist/{globe-icon.entry-c8302bf5.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-73106882.js → info-icon_2.entry-dbf3931a.js} +7 -7
- package/dist/{info-icon_2.entry-ca224a3b.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-615660ef.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-db85836a.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-b49b2369.js → nylas-booked-event-card_10.entry-ef767733.js} +8 -10
- package/dist/{nylas-form-card.entry-090a4d3b.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-7924dde0.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-9dd96530.js → nylas-list-folders.entry-55ce3403.js} +6 -8
- package/dist/{nylas-list-threads.entry-b435eaae.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-97350c76.js → nylas-login.entry-76358c2f.js} +3 -5
- package/dist/{nylas-mailbox-pagination.entry-ceef8be2.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-e6b3d3a4.js → nylas-mailbox-toolbar-button.entry-6b1b5b15.js} +16 -18
- package/dist/{nylas-mailbox.entry-06d8014a.js → nylas-mailbox.entry-97c503f2.js} +7 -9
- package/dist/nylas-mailbox.entry-e21a2f50.cjs +1 -0
- package/dist/{nylas-provider.entry-8b9c2b69.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-c3791787.js → nylas-scheduler-editor.entry-e326c9de.js} +333 -239
- package/dist/{nylas-scheduling.entry-6380509a.js → nylas-scheduling.entry-be0cc090.js} +6 -8
- package/dist/nylas-scheduling.entry-d88289db.cjs +1 -0
- package/dist/{nylas-threads-refresh.entry-eaee86fb.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-7e12758e.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-b936e76a.js → nylas-view-thread.entry-d2953ea8.js} +7 -9
- package/dist/{people-icon.entry-5c8ee696.js → people-icon.entry-4b598fde.js} +7 -7
- package/dist/{people-icon.entry-bcf848c0.cjs → people-icon.entry-73cfa6f5.cjs} +1 -1
- package/dist/play-icon_2.entry-1a487abb.cjs +1 -0
- package/dist/{play-icon_2.entry-356e63cc.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-bec053b6.cjs → refresh-icon.entry-42d543d0.cjs} +1 -1
- package/dist/{refresh-icon.entry-77f0c377.js → refresh-icon.entry-6aedfce6.js} +4 -4
- package/dist/register-component-cf5c8420-d3fb6bf9.cjs +1 -0
- package/dist/{register-component-dc659dc3-0fdb18dc.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-3ba2480c.js → scheduler-store-39d37291-4e8e9ff9.js} +5 -6
- package/dist/scheduler-store-39d37291-b66c052c.cjs +1 -0
- package/dist/{time-period-selector.entry-decd251b.js → time-period-selector.entry-f1e27a00.js} +6 -8
- package/dist/time-period-selector.entry-fb3d0178.cjs +1 -0
- package/dist/{translate-icon.entry-dd5b707c.cjs → translate-icon.entry-0d44b6cb.cjs} +1 -1
- package/dist/{translate-icon.entry-cac02c46.js → translate-icon.entry-3db947f5.js} +5 -5
- package/dist/{warning-icon.entry-8af8a742.cjs → warning-icon.entry-a20657e4.cjs} +1 -1
- package/dist/{warning-icon.entry-370b9cf0.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-8d0ac489.cjs +0 -1
- package/dist/close-icon.entry-6dd5ff0a.js +0 -15
- package/dist/close-icon.entry-ebc527c5.cjs +0 -1
- package/dist/document-refresh-icon.entry-298b2133.cjs +0 -1
- package/dist/focus-visible-e8093c16-f380b705.cjs +0 -1
- package/dist/forward-icon_6.entry-15208ea9.cjs +0 -3
- package/dist/google-logo-icon_3.entry-0c095209.js +0 -258
- package/dist/google-logo-icon_3.entry-f8433ff9.cjs +0 -1
- package/dist/index-0f3bd8df.js +0 -1824
- package/dist/index-7a55dc33.cjs +0 -30
- package/dist/loading-icon.entry-012644b7.js +0 -15
- package/dist/loading-icon.entry-f9f5e66f.cjs +0 -1
- package/dist/mailbox-store-bb21512c-045c3ea0.cjs +0 -1
- package/dist/nylas-additional-participants.entry-a50ef8e2.cjs +0 -1
- package/dist/nylas-booked-event-card_10.entry-fccb783c.cjs +0 -1
- package/dist/nylas-form-card.entry-f5230005.cjs +0 -1
- package/dist/nylas-if-state.entry-ff9c9a85.cjs +0 -1
- package/dist/nylas-list-folders.entry-dbfc2cf8.cjs +0 -1
- package/dist/nylas-list-threads.entry-6bcc0328.cjs +0 -1
- package/dist/nylas-login.entry-1623d309.cjs +0 -1
- package/dist/nylas-mailbox-pagination.entry-1776eb16.cjs +0 -1
- package/dist/nylas-mailbox-toolbar-button.entry-7d3f79b9.cjs +0 -1
- package/dist/nylas-mailbox.entry-ae8da6ff.cjs +0 -1
- package/dist/nylas-provider.entry-97c9e272.cjs +0 -1
- package/dist/nylas-scheduler-editor.entry-f6cf1cd9.cjs +0 -7
- package/dist/nylas-scheduling.entry-08ae840a.cjs +0 -1
- package/dist/nylas-threads-refresh.entry-246e6d77.cjs +0 -1
- package/dist/nylas-threads-search.entry-42a2acb1.cjs +0 -1
- package/dist/nylas-view-thread.entry-78e6927a.cjs +0 -1
- package/dist/play-icon_2.entry-92e78f1b.cjs +0 -1
- package/dist/register-component-dc659dc3-f58bf25b.cjs +0 -1
- package/dist/scheduler-config-store-51ee4f42-ce3a9b0e.cjs +0 -1
- package/dist/scheduler-config-store-51ee4f42-e02895da.js +0 -14
- package/dist/scheduler-store-72116723-db9d91f6.cjs +0 -1
- package/dist/time-period-selector.entry-f25fad77.cjs +0 -1
- package/dist/utils-c00bdc3c-89ab163d.js +0 -2111
- package/dist/utils-c00bdc3c-94b9c3b6.cjs +0 -8
|
@@ -1,258 +0,0 @@
|
|
|
1
|
-
import { r as S, h as t, c as N, H as A } from "./index-0f3bd8df.js";
|
|
2
|
-
import { R as Z } from "./register-component-dc659dc3-0fdb18dc.js";
|
|
3
|
-
import { d as y } from "./utils-c00bdc3c-89ab163d.js";
|
|
4
|
-
import "react";
|
|
5
|
-
import "react-dom";
|
|
6
|
-
import "./_commonjsHelpers-57e89916-af061c86.js";
|
|
7
|
-
const B = ".sc-google-logo-icon-h{display:flex}", j = B, J = class {
|
|
8
|
-
constructor(a) {
|
|
9
|
-
S(this, a), this.width = "24", this.height = "24";
|
|
10
|
-
}
|
|
11
|
-
render() {
|
|
12
|
-
return t("svg", { key: "054a6d1317c29eb0eed05c1f7d69611837b294f5", width: this.width, height: this.height, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, t("g", { key: "7a46687e247930c1200d1cdd0ef6c1463cec96ee", "clip-path": "url(#clip0_959_12452)" }, t("path", { key: "d64a97cc07c2e8094e71a79f03b96a2c495c9a28", 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: "00f94b17c43c5199a00537873106f5f4eeaaa9a7", 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: "9391a8453b0adb7908ab1d06888a0cfcf0a32999", 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: "57cc6b8f6edb5b0361468c8bb49d450d1f92727f", 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: "ddb9c74f9a608e22e21f39feca20be85612e3e0d" }, t("clipPath", { key: "4828256582d76ee2c0732552630581e5d756c7e5", id: "clip0_959_12452" }, t("rect", { key: "5331dc073a4dbe01fabb56ee0fae553a0100edd9", width: 24, height: 24, fill: "white" }))));
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
J.style = j;
|
|
16
|
-
const G = ".sc-microsoft-logo-icon-h{display:flex}", W = G, z = class {
|
|
17
|
-
constructor(a) {
|
|
18
|
-
S(this, a), this.width = "22", this.height = "22";
|
|
19
|
-
}
|
|
20
|
-
render() {
|
|
21
|
-
return t("svg", { key: "9c6a5f616c9e25067b87916d304b0cd32b00f083", width: this.width, height: this.height, viewBox: "0 0 22 22", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "bbe87ce62235b96d327cc0dd4dabc78f5273c034", d: "M0.043457 0.043457H10.4782V10.4782H0.043457V0.043457Z", fill: "#F35325" }), t("path", { key: "de6dd97b42e8103d81cad275c722b36e5b5233b5", d: "M11.5217 0.043457H21.9565V10.4782H11.5217V0.043457Z", fill: "#81BC06" }), t("path", { key: "b13b204df603dd53a9f4aba4af8a502a224ff580", d: "M0.043457 11.5217H10.4782V21.9565H0.043457V11.5217Z", fill: "#05A6F0" }), t("path", { key: "372e3c35aae7f712309a0d97c54f5e92741f6eb7", d: "M11.5217 11.5217H21.9565V21.9565H11.5217V11.5217Z", fill: "#FFBA08" }));
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
z.style = W;
|
|
25
|
-
function $({ id: a, formState: e, activeTab: n, calendars: i }) {
|
|
26
|
-
var s, o;
|
|
27
|
-
switch (n) {
|
|
28
|
-
case "eventInfo":
|
|
29
|
-
const d = e.title, c = e.description, b = parseInt(e.duration), f = e.location;
|
|
30
|
-
return t(
|
|
31
|
-
"div",
|
|
32
|
-
{ key: a },
|
|
33
|
-
t(
|
|
34
|
-
"nylas-event-info",
|
|
35
|
-
null,
|
|
36
|
-
t(
|
|
37
|
-
"div",
|
|
38
|
-
{ slot: "inputs" },
|
|
39
|
-
t("nylas-event-title", { name: "title", eventTitle: d, exportparts: "net, net__title, net__dropdown-content" }),
|
|
40
|
-
t("nylas-event-duration", { name: "duration", eventDurationMinutes: b, exportparts: "ned, ned__input, ned__dropdown, ned__dropdown-button, ned__dropdown-content" }),
|
|
41
|
-
t("nylas-location-component", { name: "location", eventLocation: f, exportparts: "nel, nel__location, nel__dropdown, nel__dropdown-button, nel__dropdown-content" }),
|
|
42
|
-
t("nylas-event-description", { name: "description", eventDescription: c, exportparts: "nedesc, nedesc__textarea" })
|
|
43
|
-
)
|
|
44
|
-
)
|
|
45
|
-
);
|
|
46
|
-
case "availability":
|
|
47
|
-
const l = e.availability, u = ((s = l == null ? void 0 : l[0]) == null ? void 0 : s.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone, p = (o = e.participants) == null ? void 0 : o.find((h) => h.is_organizer), r = (p == null ? void 0 : p.email) ?? "primary", m = e.calendarIds.length > 0 ? e.calendarIds : [r], _ = e.bookingCalendar == "primary" ? r : e.bookingCalendar;
|
|
48
|
-
return t(
|
|
49
|
-
"div",
|
|
50
|
-
{ key: a },
|
|
51
|
-
t("nylas-booking-calendar-picker", { name: "booking-calendar", calendars: i ?? [], defaultBookingCalendar: _, exportparts: "nbcp, nbcp__header, nbcp__input-label, nbcp__dropdown, nbcp__dropdown-button, nbcp__dropdown-content" }),
|
|
52
|
-
t("nylas-calendar-picker", { name: "calendars", calendars: i ?? [], defaultSelectedCalendars: m, organizerEmail: r, exportparts: "ncp ncp__header, ncp__dropdown, ncp__dropdown-button, ncp__dropdown-content" }),
|
|
53
|
-
t("nylas-availability-picker", { name: "availability", openHours: l, defaultTimezone: u, 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" })
|
|
54
|
-
);
|
|
55
|
-
case "bookingOptions":
|
|
56
|
-
return t(
|
|
57
|
-
"div",
|
|
58
|
-
{ key: a },
|
|
59
|
-
a == "new" && t("p", null, "Config"),
|
|
60
|
-
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" }),
|
|
61
|
-
t("nylas-custom-booking-flow", { name: "booking-type", bookingType: e.bookingType, exportparts: "ncbf, ncbf__header, ncbf__dropdown, ncbf__dropdown-button, ncbf__dropdown-content" }),
|
|
62
|
-
t(
|
|
63
|
-
"nylas-event-limits",
|
|
64
|
-
null,
|
|
65
|
-
t(
|
|
66
|
-
"div",
|
|
67
|
-
{ slot: "inputs" },
|
|
68
|
-
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" }),
|
|
69
|
-
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" })
|
|
70
|
-
)
|
|
71
|
-
)
|
|
72
|
-
);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
const q = '.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:flex-end;align-items:center;gap:1rem;height:80px;padding:0 1rem;border-top:1px solid var(--nylas-base-200)}.footer.sc-nylas-editor-tabs .unsaved-changes.sc-nylas-editor-tabs{color:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs .saved-changes.sc-nylas-editor-tabs{color:var(--nylas-success)}.footer.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 button.sc-nylas-editor-tabs:hover{background:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:active{background:var(--nylas-base-800)}.footer.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:disabled{background:var(--nylas-base-300);cursor:not-allowed}.footer.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}', K = q;
|
|
76
|
-
var Q = function(a, e, n, i) {
|
|
77
|
-
var s = arguments.length, o = s < 3 ? e : i === null ? i = Object.getOwnPropertyDescriptor(e, n) : i, d;
|
|
78
|
-
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
79
|
-
o = Reflect.decorate(a, e, n, i);
|
|
80
|
-
else
|
|
81
|
-
for (var c = a.length - 1; c >= 0; c--)
|
|
82
|
-
(d = a[c]) && (o = (s < 3 ? d(o) : s > 3 ? d(e, n, o) : d(e, n)) || o);
|
|
83
|
-
return s > 3 && o && Object.defineProperty(e, n, o), o;
|
|
84
|
-
}, x = function(a, e) {
|
|
85
|
-
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
86
|
-
return Reflect.metadata(a, e);
|
|
87
|
-
};
|
|
88
|
-
const E = class {
|
|
89
|
-
constructor(a) {
|
|
90
|
-
S(this, a), this.schedulerConfigChanged = N(this, "schedulerConfigChanged", 7), this.formSubmissionHandler = async (e) => {
|
|
91
|
-
var h, g, v, k, w, C, T, I, F, H, L, D, V, M, O, U;
|
|
92
|
-
e.preventDefault(), this.isLoading = !0, this.hasUnsavedChanges = !1, this.updateFormState();
|
|
93
|
-
const { title: n, description: i, duration: s, availability: o, calendarIds: d, bookingCalendar: c, location: b, bookingType: f, buffer: l, availableDaysInFuture: u, minCancellationNotice: p } = this.formState, r = (g = (h = this.config) == null ? void 0 : h.participants) == null ? void 0 : g.find((R) => R.is_organizer), m = {
|
|
94
|
-
...((v = this.config) == null ? void 0 : v.id) && { id: this.config.id },
|
|
95
|
-
version: ((k = this.config) == null ? void 0 : k.version) ?? "1.0.0",
|
|
96
|
-
availability: {
|
|
97
|
-
duration_minutes: s ? parseInt(s) : 0,
|
|
98
|
-
availability_rules: {
|
|
99
|
-
availability_method: ((T = (C = (w = this.config) == null ? void 0 : w.availability) == null ? void 0 : C.availability_rules) == null ? void 0 : T.availability_method) ?? "collective",
|
|
100
|
-
buffer: l || { before: 0, after: 0 },
|
|
101
|
-
default_open_hours: ((H = (F = (I = this.config) == null ? void 0 : I.availability) == null ? void 0 : F.availability_rules) == null ? void 0 : H.default_open_hours) ?? [],
|
|
102
|
-
round_robin_group_id: ((V = (D = (L = this.config) == null ? void 0 : L.availability) == null ? void 0 : D.availability_rules) == null ? void 0 : V.round_robin_group_id) ?? ""
|
|
103
|
-
}
|
|
104
|
-
},
|
|
105
|
-
participants: [
|
|
106
|
-
{
|
|
107
|
-
name: (r == null ? void 0 : r.name) ?? (r == null ? void 0 : r.email) ?? ((M = this.currentUser) == null ? void 0 : M.name) ?? ((O = this.currentUser) == null ? void 0 : O.email) ?? "",
|
|
108
|
-
email: (r == null ? void 0 : r.email) ?? ((U = this.currentUser) == null ? void 0 : U.email) ?? "",
|
|
109
|
-
is_organizer: !0,
|
|
110
|
-
availability: {
|
|
111
|
-
calendar_ids: d != null && d.length ? d : ["primary"],
|
|
112
|
-
open_hours: o ?? []
|
|
113
|
-
},
|
|
114
|
-
booking: {
|
|
115
|
-
calendar_id: c ?? "primary"
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
],
|
|
119
|
-
event_booking: {
|
|
120
|
-
title: (n == null ? void 0 : n.toString()) ?? "",
|
|
121
|
-
description: (i == null ? void 0 : i.toString()) ?? "",
|
|
122
|
-
location: (b == null ? void 0 : b.toString()) ?? "",
|
|
123
|
-
booking_type: (f == null ? void 0 : f.toString()) ?? "booking"
|
|
124
|
-
},
|
|
125
|
-
scheduler: {
|
|
126
|
-
available_days_in_future: u ?? 30,
|
|
127
|
-
min_cancellation_notice: p ?? 0
|
|
128
|
-
}
|
|
129
|
-
}, _ = (R) => {
|
|
130
|
-
this.isLoading = !1, this.changesSaved = !0, setTimeout(() => {
|
|
131
|
-
this.changesSaved = !1;
|
|
132
|
-
}, 5e3);
|
|
133
|
-
};
|
|
134
|
-
this.schedulerConfigChanged.emit({ config: m, resetLoadingState: _, action: this.action });
|
|
135
|
-
}, this.calendars = void 0, this.config = void 0, this.currentUser = void 0, this.action = "create", this.activeTab = "eventInfo", this.isLoading = !1, this.hasUnsavedChanges = !1, this.changesSaved = !1, this.formState = {};
|
|
136
|
-
}
|
|
137
|
-
configChangedHandler(a) {
|
|
138
|
-
y("[nylas-editor-tabs]", "configChangedHandler", a, this.config), this.formState = {
|
|
139
|
-
...this.getFormStateFromConfig(a)
|
|
140
|
-
}, a.id ? this.action = "update" : this.action = "create";
|
|
141
|
-
}
|
|
142
|
-
connectedCallback() {
|
|
143
|
-
y("[nylas-editor-tabs]", "connectedCallback");
|
|
144
|
-
}
|
|
145
|
-
componentWillLoad() {
|
|
146
|
-
y("[nylas-editor-tabs]", "componentWillLoad"), this.formState = this.getFormStateFromConfig(this.config);
|
|
147
|
-
}
|
|
148
|
-
componentDidLoad() {
|
|
149
|
-
y("[nylas-editor-tabs]", "componentDidLoad");
|
|
150
|
-
}
|
|
151
|
-
disconnectedCallback() {
|
|
152
|
-
y("[nylas-editor-tabs]", "disconnectedCallback");
|
|
153
|
-
}
|
|
154
|
-
handleValueChanged(a) {
|
|
155
|
-
y("[nylas-editor-tabs]", "handleValueChanged", a), this.formState = { ...this.formState, [a.detail.name]: a.detail.value }, this.hasUnsavedChanges = !0;
|
|
156
|
-
}
|
|
157
|
-
getFormStateFromConfig(a) {
|
|
158
|
-
var n, i, s, o, d, c, b, f, l, u, p, r, m, _, h, g, v, k, w;
|
|
159
|
-
const e = (n = a == null ? void 0 : a.participants) == null ? void 0 : n.find((C) => C.is_organizer);
|
|
160
|
-
return {
|
|
161
|
-
title: ((i = a == null ? void 0 : a.event_booking) == null ? void 0 : i.title) ?? "",
|
|
162
|
-
description: ((s = a == null ? void 0 : a.event_booking) == null ? void 0 : s.description) ?? "",
|
|
163
|
-
duration: ((d = (o = a == null ? void 0 : a.availability) == null ? void 0 : o.duration_minutes) == null ? void 0 : d.toString()) ?? "10",
|
|
164
|
-
availability: ((c = e == null ? void 0 : e.availability) == null ? void 0 : c.open_hours) ?? void 0,
|
|
165
|
-
calendarIds: ((b = e == null ? void 0 : e.availability) == null ? void 0 : b.calendar_ids) ?? [],
|
|
166
|
-
participants: (a == null ? void 0 : a.participants) ?? [],
|
|
167
|
-
bookingCalendar: ((f = e == null ? void 0 : e.booking) == null ? void 0 : f.calendar_id) ?? (e == null ? void 0 : e.email) ?? "",
|
|
168
|
-
location: ((u = (l = this.config) == null ? void 0 : l.event_booking) == null ? void 0 : u.location) ?? "",
|
|
169
|
-
bookingType: ((r = (p = this.config) == null ? void 0 : p.event_booking) == null ? void 0 : r.booking_type) ?? "booking",
|
|
170
|
-
buffer: ((h = (_ = (m = this.config) == null ? void 0 : m.availability) == null ? void 0 : _.availability_rules) == null ? void 0 : h.buffer) ?? { before: 0, after: 0 },
|
|
171
|
-
availableDaysInFuture: ((v = (g = this.config) == null ? void 0 : g.scheduler) == null ? void 0 : v.available_days_in_future) ?? 30,
|
|
172
|
-
minCancellationNotice: ((w = (k = this.config) == null ? void 0 : k.scheduler) == null ? void 0 : w.min_cancellation_notice) ?? 0
|
|
173
|
-
};
|
|
174
|
-
}
|
|
175
|
-
updateFormState() {
|
|
176
|
-
new FormData(this.formRef).forEach((e, n) => {
|
|
177
|
-
switch (n) {
|
|
178
|
-
case "title":
|
|
179
|
-
this.formState.title = e.toString();
|
|
180
|
-
break;
|
|
181
|
-
case "description":
|
|
182
|
-
this.formState.description = e.toString();
|
|
183
|
-
break;
|
|
184
|
-
case "duration":
|
|
185
|
-
this.formState.duration = e.toString();
|
|
186
|
-
break;
|
|
187
|
-
case "availability":
|
|
188
|
-
this.formState.availability = JSON.parse(e.toString());
|
|
189
|
-
break;
|
|
190
|
-
case "participants":
|
|
191
|
-
this.formState.participants = JSON.parse(e.toString());
|
|
192
|
-
break;
|
|
193
|
-
case "calendars":
|
|
194
|
-
this.formState.calendarIds = e.toString().split(",");
|
|
195
|
-
break;
|
|
196
|
-
case "booking-calendar":
|
|
197
|
-
this.formState.bookingCalendar = e.toString();
|
|
198
|
-
break;
|
|
199
|
-
case "location":
|
|
200
|
-
this.formState.location = e.toString();
|
|
201
|
-
break;
|
|
202
|
-
case "booking-type":
|
|
203
|
-
this.formState.bookingType = e.toString();
|
|
204
|
-
break;
|
|
205
|
-
case "buffer-time":
|
|
206
|
-
this.formState.buffer = JSON.parse(e.toString());
|
|
207
|
-
break;
|
|
208
|
-
case "limit-future-bookings":
|
|
209
|
-
this.formState.availableDaysInFuture = parseInt(e.toString());
|
|
210
|
-
break;
|
|
211
|
-
case "min-cancellation-notice":
|
|
212
|
-
this.formState.minCancellationNotice = parseInt(e.toString());
|
|
213
|
-
break;
|
|
214
|
-
}
|
|
215
|
-
}), this.formState = { ...this.formState };
|
|
216
|
-
}
|
|
217
|
-
setActiveTab(a, e) {
|
|
218
|
-
a.preventDefault(), this.updateFormState(), this.activeTab = e;
|
|
219
|
-
}
|
|
220
|
-
render() {
|
|
221
|
-
var a;
|
|
222
|
-
return y("[nylas-editor-tabs]", "render", this.formState), t(A, { key: "e26c05a424e53163d97bd14723151c73a870b8be" }, t("form", { key: "e5c3af66eebb0d133e8a6931d84aa12b5e07d329", onSubmit: this.formSubmissionHandler, class: "scheduler-editor", ref: (e) => this.formRef = e }, t("div", { key: "d24109dc87e9b18fb62bf684c25c08dfa58334ed", class: "form-contents" }, t("div", { key: "b74f053cbd15654c1d3d43af8a765607fdcd28d3", class: "tabs" }, t("button", { key: "ccf9034c5bf0194ad5db7ad29ddd46eb6846cfbb", class: { tab: !0, active: this.activeTab == "eventInfo" }, onClick: (e) => this.setActiveTab(e, "eventInfo") }, t("calendar-info-icon", { key: "6527d78a3d54f54baa6f7c4552937dbfe992ec96", width: "16", height: "16" }), "Event Info"), t("button", { key: "e561f4f7ab01629860f13812a14d0bdf92ad7d6b", class: { tab: !0, active: this.activeTab == "availability" }, onClick: (e) => this.setActiveTab(e, "availability") }, t("calendar-patterns-icon", { key: "dde4d0f70cdf0aad66e25e7b683372a0c9035398", width: "16", height: "16" }), "Availability"), t("button", { key: "8a8131ed4f2f07b6f9d228d9bc86667718f5766f", class: { tab: !0, active: this.activeTab == "bookingOptions" }, onClick: (e) => this.setActiveTab(e, "bookingOptions") }, t("flow-icon", { key: "1cc07a769eca6090749bc0c04ca3aa283864d925", width: "16", height: "16" }), "Booking Options")), t("div", { key: "2802d58acf7965856f6802b17794dc34cec424e7", class: "tab-content" }, t($, { key: "c965af9cecdd91977c8b036f504e33620443b7af", formState: this.formState, activeTab: this.activeTab, calendars: this.calendars, id: ((a = this.config) == null ? void 0 : a.id) ?? "new" }))), t("div", { key: "2faed468348afb67f0fc867de91c901c5c1546f5", class: "footer" }, t("p", { key: "d79a6e1562cd3ced4b84a01f8939d8d5c047979c", 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: "1e77a73ef49c9a17a3cdd7d9adcf49515765de7c", type: "submit", disabled: this.isLoading }, this.isLoading ? t("span", null, "Saving", t("loading-icon", null), " ") : this.action == "create" ? "Create" : "Save changes"))));
|
|
226
|
-
}
|
|
227
|
-
static get watchers() {
|
|
228
|
-
return {
|
|
229
|
-
config: ["configChangedHandler"]
|
|
230
|
-
};
|
|
231
|
-
}
|
|
232
|
-
};
|
|
233
|
-
Q([
|
|
234
|
-
Z({
|
|
235
|
-
name: "nylas-editor-tabs",
|
|
236
|
-
stateToProps: /* @__PURE__ */ new Map([
|
|
237
|
-
["schedulerConfig.calendars", "calendars"],
|
|
238
|
-
["schedulerConfig.config", "config"],
|
|
239
|
-
["schedulerConfig.currentUser", "currentUser"]
|
|
240
|
-
]),
|
|
241
|
-
eventToProps: {
|
|
242
|
-
schedulerConfigChanged: async (a, e) => {
|
|
243
|
-
const { resetLoadingState: n, action: i, config: s } = a.detail;
|
|
244
|
-
n && n(a), i === "update" ? await e.schedulerConfig.updateConfiguration(s) : await e.schedulerConfig.createConfiguration(s);
|
|
245
|
-
}
|
|
246
|
-
},
|
|
247
|
-
fireRegisterEvent: !0
|
|
248
|
-
}),
|
|
249
|
-
x("design:type", Function),
|
|
250
|
-
x("design:paramtypes", []),
|
|
251
|
-
x("design:returntype", void 0)
|
|
252
|
-
], E.prototype, "render", null);
|
|
253
|
-
E.style = K;
|
|
254
|
-
export {
|
|
255
|
-
J as google_logo_icon,
|
|
256
|
-
z as microsoft_logo_icon,
|
|
257
|
-
E as nylas_editor_tabs
|
|
258
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-7a55dc33.cjs"),A=require("./register-component-dc659dc3-f58bf25b.cjs"),y=require("./utils-c00bdc3c-94b9c3b6.cjs");require("react");require("react-dom");require("./_commonjsHelpers-57e89916-4a3ae7d8.cjs");const Z=".sc-google-logo-icon-h{display:flex}",j=Z,N=class{constructor(a){t.registerInstance(this,a),this.width="24",this.height="24"}render(){return t.h("svg",{key:"054a6d1317c29eb0eed05c1f7d69611837b294f5",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.h("g",{key:"7a46687e247930c1200d1cdd0ef6c1463cec96ee","clip-path":"url(#clip0_959_12452)"},t.h("path",{key:"d64a97cc07c2e8094e71a79f03b96a2c495c9a28",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.h("path",{key:"00f94b17c43c5199a00537873106f5f4eeaaa9a7",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.h("path",{key:"9391a8453b0adb7908ab1d06888a0cfcf0a32999",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.h("path",{key:"57cc6b8f6edb5b0361468c8bb49d450d1f92727f",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.h("defs",{key:"ddb9c74f9a608e22e21f39feca20be85612e3e0d"},t.h("clipPath",{key:"4828256582d76ee2c0732552630581e5d756c7e5",id:"clip0_959_12452"},t.h("rect",{key:"5331dc073a4dbe01fabb56ee0fae553a0100edd9",width:24,height:24,fill:"white"}))))}};N.style=j;const B=".sc-microsoft-logo-icon-h{display:flex}",q=B,R=class{constructor(a){t.registerInstance(this,a),this.width="22",this.height="22"}render(){return t.h("svg",{key:"9c6a5f616c9e25067b87916d304b0cd32b00f083",width:this.width,height:this.height,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.h("path",{key:"bbe87ce62235b96d327cc0dd4dabc78f5273c034",d:"M0.043457 0.043457H10.4782V10.4782H0.043457V0.043457Z",fill:"#F35325"}),t.h("path",{key:"de6dd97b42e8103d81cad275c722b36e5b5233b5",d:"M11.5217 0.043457H21.9565V10.4782H11.5217V0.043457Z",fill:"#81BC06"}),t.h("path",{key:"b13b204df603dd53a9f4aba4af8a502a224ff580",d:"M0.043457 11.5217H10.4782V21.9565H0.043457V11.5217Z",fill:"#05A6F0"}),t.h("path",{key:"372e3c35aae7f712309a0d97c54f5e92741f6eb7",d:"M11.5217 11.5217H21.9565V21.9565H11.5217V11.5217Z",fill:"#FFBA08"}))}};R.style=q;function J({id:a,formState:e,activeTab:n,calendars:i}){var s,o;switch(n){case"eventInfo":const d=e.title,c=e.description,b=parseInt(e.duration),h=e.location;return t.h("div",{key:a},t.h("nylas-event-info",null,t.h("div",{slot:"inputs"},t.h("nylas-event-title",{name:"title",eventTitle:d,exportparts:"net, net__title, net__dropdown-content"}),t.h("nylas-event-duration",{name:"duration",eventDurationMinutes:b,exportparts:"ned, ned__input, ned__dropdown, ned__dropdown-button, ned__dropdown-content"}),t.h("nylas-location-component",{name:"location",eventLocation:h,exportparts:"nel, nel__location, nel__dropdown, nel__dropdown-button, nel__dropdown-content"}),t.h("nylas-event-description",{name:"description",eventDescription:c,exportparts:"nedesc, nedesc__textarea"}))));case"availability":const l=e.availability,u=((s=l==null?void 0:l[0])==null?void 0:s.timezone)??Intl.DateTimeFormat().resolvedOptions().timeZone,f=(o=e.participants)==null?void 0:o.find(p=>p.is_organizer),r=(f==null?void 0:f.email)??"primary",g=e.calendarIds.length>0?e.calendarIds:[r],m=e.bookingCalendar=="primary"?r:e.bookingCalendar;return t.h("div",{key:a},t.h("nylas-booking-calendar-picker",{name:"booking-calendar",calendars:i??[],defaultBookingCalendar:m,exportparts:"nbcp, nbcp__header, nbcp__input-label, nbcp__dropdown, nbcp__dropdown-button, nbcp__dropdown-content"}),t.h("nylas-calendar-picker",{name:"calendars",calendars:i??[],defaultSelectedCalendars:g,organizerEmail:r,exportparts:"ncp ncp__header, ncp__dropdown, ncp__dropdown-button, ncp__dropdown-content"}),t.h("nylas-availability-picker",{name:"availability",openHours:l,defaultTimezone:u,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 t.h("div",{key:a},a=="new"&&t.h("p",null,"Config"),t.h("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"}),t.h("nylas-custom-booking-flow",{name:"booking-type",bookingType:e.bookingType,exportparts:"ncbf, ncbf__header, ncbf__dropdown, ncbf__dropdown-button, ncbf__dropdown-content"}),t.h("nylas-event-limits",null,t.h("div",{slot:"inputs"},t.h("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"}),t.h("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"}))))}}const G='.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:flex-end;align-items:center;gap:1rem;height:80px;padding:0 1rem;border-top:1px solid var(--nylas-base-200)}.footer.sc-nylas-editor-tabs .unsaved-changes.sc-nylas-editor-tabs{color:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs .saved-changes.sc-nylas-editor-tabs{color:var(--nylas-success)}.footer.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 button.sc-nylas-editor-tabs:hover{background:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:active{background:var(--nylas-base-800)}.footer.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:disabled{background:var(--nylas-base-300);cursor:not-allowed}.footer.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}',W=G;var z=function(a,e,n,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(a,e,n,i);else for(var c=a.length-1;c>=0;c--)(d=a[c])&&(o=(s<3?d(o):s>3?d(e,n,o):d(e,n))||o);return s>3&&o&&Object.defineProperty(e,n,o),o},x=function(a,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(a,e)};const S=class{constructor(a){t.registerInstance(this,a),this.schedulerConfigChanged=t.createEvent(this,"schedulerConfigChanged",7),this.formSubmissionHandler=async e=>{var p,_,v,k,w,C,I,T,F,L,D,H,V,M,O,U;e.preventDefault(),this.isLoading=!0,this.hasUnsavedChanges=!1,this.updateFormState();const{title:n,description:i,duration:s,availability:o,calendarIds:d,bookingCalendar:c,location:b,bookingType:h,buffer:l,availableDaysInFuture:u,minCancellationNotice:f}=this.formState,r=(_=(p=this.config)==null?void 0:p.participants)==null?void 0:_.find(E=>E.is_organizer),g={...((v=this.config)==null?void 0:v.id)&&{id:this.config.id},version:((k=this.config)==null?void 0:k.version)??"1.0.0",availability:{duration_minutes:s?parseInt(s):0,availability_rules:{availability_method:((I=(C=(w=this.config)==null?void 0:w.availability)==null?void 0:C.availability_rules)==null?void 0:I.availability_method)??"collective",buffer:l||{before:0,after:0},default_open_hours:((L=(F=(T=this.config)==null?void 0:T.availability)==null?void 0:F.availability_rules)==null?void 0:L.default_open_hours)??[],round_robin_group_id:((V=(H=(D=this.config)==null?void 0:D.availability)==null?void 0:H.availability_rules)==null?void 0:V.round_robin_group_id)??""}},participants:[{name:(r==null?void 0:r.name)??(r==null?void 0:r.email)??((M=this.currentUser)==null?void 0:M.name)??((O=this.currentUser)==null?void 0:O.email)??"",email:(r==null?void 0:r.email)??((U=this.currentUser)==null?void 0:U.email)??"",is_organizer:!0,availability:{calendar_ids:d!=null&&d.length?d:["primary"],open_hours:o??[]},booking:{calendar_id:c??"primary"}}],event_booking:{title:(n==null?void 0:n.toString())??"",description:(i==null?void 0:i.toString())??"",location:(b==null?void 0:b.toString())??"",booking_type:(h==null?void 0:h.toString())??"booking"},scheduler:{available_days_in_future:u??30,min_cancellation_notice:f??0}},m=E=>{this.isLoading=!1,this.changesSaved=!0,setTimeout(()=>{this.changesSaved=!1},5e3)};this.schedulerConfigChanged.emit({config:g,resetLoadingState:m,action:this.action})},this.calendars=void 0,this.config=void 0,this.currentUser=void 0,this.action="create",this.activeTab="eventInfo",this.isLoading=!1,this.hasUnsavedChanges=!1,this.changesSaved=!1,this.formState={}}configChangedHandler(a){y.debug("[nylas-editor-tabs]","configChangedHandler",a,this.config),this.formState={...this.getFormStateFromConfig(a)},a.id?this.action="update":this.action="create"}connectedCallback(){y.debug("[nylas-editor-tabs]","connectedCallback")}componentWillLoad(){y.debug("[nylas-editor-tabs]","componentWillLoad"),this.formState=this.getFormStateFromConfig(this.config)}componentDidLoad(){y.debug("[nylas-editor-tabs]","componentDidLoad")}disconnectedCallback(){y.debug("[nylas-editor-tabs]","disconnectedCallback")}handleValueChanged(a){y.debug("[nylas-editor-tabs]","handleValueChanged",a),this.formState={...this.formState,[a.detail.name]:a.detail.value},this.hasUnsavedChanges=!0}getFormStateFromConfig(a){var n,i,s,o,d,c,b,h,l,u,f,r,g,m,p,_,v,k,w;const e=(n=a==null?void 0:a.participants)==null?void 0:n.find(C=>C.is_organizer);return{title:((i=a==null?void 0:a.event_booking)==null?void 0:i.title)??"",description:((s=a==null?void 0:a.event_booking)==null?void 0:s.description)??"",duration:((d=(o=a==null?void 0:a.availability)==null?void 0:o.duration_minutes)==null?void 0:d.toString())??"10",availability:((c=e==null?void 0:e.availability)==null?void 0:c.open_hours)??void 0,calendarIds:((b=e==null?void 0:e.availability)==null?void 0:b.calendar_ids)??[],participants:(a==null?void 0:a.participants)??[],bookingCalendar:((h=e==null?void 0:e.booking)==null?void 0:h.calendar_id)??(e==null?void 0:e.email)??"",location:((u=(l=this.config)==null?void 0:l.event_booking)==null?void 0:u.location)??"",bookingType:((r=(f=this.config)==null?void 0:f.event_booking)==null?void 0:r.booking_type)??"booking",buffer:((p=(m=(g=this.config)==null?void 0:g.availability)==null?void 0:m.availability_rules)==null?void 0:p.buffer)??{before:0,after:0},availableDaysInFuture:((v=(_=this.config)==null?void 0:_.scheduler)==null?void 0:v.available_days_in_future)??30,minCancellationNotice:((w=(k=this.config)==null?void 0:k.scheduler)==null?void 0:w.min_cancellation_notice)??0}}updateFormState(){new FormData(this.formRef).forEach((e,n)=>{switch(n){case"title":this.formState.title=e.toString();break;case"description":this.formState.description=e.toString();break;case"duration":this.formState.duration=e.toString();break;case"availability":this.formState.availability=JSON.parse(e.toString());break;case"participants":this.formState.participants=JSON.parse(e.toString());break;case"calendars":this.formState.calendarIds=e.toString().split(",");break;case"booking-calendar":this.formState.bookingCalendar=e.toString();break;case"location":this.formState.location=e.toString();break;case"booking-type":this.formState.bookingType=e.toString();break;case"buffer-time":this.formState.buffer=JSON.parse(e.toString());break;case"limit-future-bookings":this.formState.availableDaysInFuture=parseInt(e.toString());break;case"min-cancellation-notice":this.formState.minCancellationNotice=parseInt(e.toString());break}}),this.formState={...this.formState}}setActiveTab(a,e){a.preventDefault(),this.updateFormState(),this.activeTab=e}render(){var a;return y.debug("[nylas-editor-tabs]","render",this.formState),t.h(t.Host,{key:"e26c05a424e53163d97bd14723151c73a870b8be"},t.h("form",{key:"e5c3af66eebb0d133e8a6931d84aa12b5e07d329",onSubmit:this.formSubmissionHandler,class:"scheduler-editor",ref:e=>this.formRef=e},t.h("div",{key:"d24109dc87e9b18fb62bf684c25c08dfa58334ed",class:"form-contents"},t.h("div",{key:"b74f053cbd15654c1d3d43af8a765607fdcd28d3",class:"tabs"},t.h("button",{key:"ccf9034c5bf0194ad5db7ad29ddd46eb6846cfbb",class:{tab:!0,active:this.activeTab=="eventInfo"},onClick:e=>this.setActiveTab(e,"eventInfo")},t.h("calendar-info-icon",{key:"6527d78a3d54f54baa6f7c4552937dbfe992ec96",width:"16",height:"16"}),"Event Info"),t.h("button",{key:"e561f4f7ab01629860f13812a14d0bdf92ad7d6b",class:{tab:!0,active:this.activeTab=="availability"},onClick:e=>this.setActiveTab(e,"availability")},t.h("calendar-patterns-icon",{key:"dde4d0f70cdf0aad66e25e7b683372a0c9035398",width:"16",height:"16"}),"Availability"),t.h("button",{key:"8a8131ed4f2f07b6f9d228d9bc86667718f5766f",class:{tab:!0,active:this.activeTab=="bookingOptions"},onClick:e=>this.setActiveTab(e,"bookingOptions")},t.h("flow-icon",{key:"1cc07a769eca6090749bc0c04ca3aa283864d925",width:"16",height:"16"}),"Booking Options")),t.h("div",{key:"2802d58acf7965856f6802b17794dc34cec424e7",class:"tab-content"},t.h(J,{key:"c965af9cecdd91977c8b036f504e33620443b7af",formState:this.formState,activeTab:this.activeTab,calendars:this.calendars,id:((a=this.config)==null?void 0:a.id)??"new"}))),t.h("div",{key:"2faed468348afb67f0fc867de91c901c5c1546f5",class:"footer"},t.h("p",{key:"d79a6e1562cd3ced4b84a01f8939d8d5c047979c",class:{"unsaved-changes":this.hasUnsavedChanges&&!this.changesSaved,"saved-changes":this.changesSaved}},this.hasUnsavedChanges&&!this.changesSaved?"Unsaved changes":this.changesSaved?"Changes saved!":""),t.h("button-component",{key:"1e77a73ef49c9a17a3cdd7d9adcf49515765de7c",type:"submit",disabled:this.isLoading},this.isLoading?t.h("span",null,"Saving",t.h("loading-icon",null)," "):this.action=="create"?"Create":"Save changes"))))}static get watchers(){return{config:["configChangedHandler"]}}};z([A.RegisterComponent({name:"nylas-editor-tabs",stateToProps:new Map([["schedulerConfig.calendars","calendars"],["schedulerConfig.config","config"],["schedulerConfig.currentUser","currentUser"]]),eventToProps:{schedulerConfigChanged:async(a,e)=>{const{resetLoadingState:n,action:i,config:s}=a.detail;n&&n(a),i==="update"?await e.schedulerConfig.updateConfiguration(s):await e.schedulerConfig.createConfiguration(s)}},fireRegisterEvent:!0}),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],S.prototype,"render",null);S.style=W;exports.google_logo_icon=N;exports.microsoft_logo_icon=R;exports.nylas_editor_tabs=S;
|