@nylas/react 1.1.0 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/add-circle-icon_2.entry-611be49d.js +25 -0
- package/dist/add-circle-icon_2.entry-f1383568.cjs +1 -0
- package/dist/{archive-icon_7.entry-e3df60ed.cjs → archive-icon_7.entry-59cc6868.cjs} +1 -1
- package/dist/{archive-icon_7.entry-7411c224.js → archive-icon_7.entry-5e6ba9e7.js} +13 -13
- package/dist/arrow-icon.entry-9c19a803.js +15 -0
- package/dist/{arrow-icon.entry-280e18b0.cjs → arrow-icon.entry-a924df13.cjs} +1 -1
- package/dist/{bold-icon_3.entry-5963945c.js → bold-icon_3.entry-2935a3df.js} +6 -6
- package/dist/{bold-icon_3.entry-5dffbedd.cjs → bold-icon_3.entry-ffe02f93.cjs} +1 -1
- package/dist/{button-component_2.entry-237733b4.js → button-component_2.entry-93aa59a2.js} +5 -5
- package/dist/{button-component_2.entry-b29d2873.cjs → button-component_2.entry-b9d3f6a2.cjs} +1 -1
- package/dist/{calendar-agenda-fill-icon_48.entry-9afba869.js → calendar-agenda-fill-icon_48.entry-476bc4ef.js} +1550 -1399
- package/dist/calendar-agenda-fill-icon_48.entry-c4ea84b3.cjs +7 -0
- package/dist/{calendar-cancel-icon.entry-77ccf227.cjs → calendar-cancel-icon.entry-11bb8656.cjs} +1 -1
- package/dist/{calendar-cancel-icon.entry-780723a6.js → calendar-cancel-icon.entry-ee0acc54.js} +4 -4
- package/dist/{calendar-check-icon_2.entry-b37ac7f0.cjs → calendar-check-icon_2.entry-14548656.cjs} +1 -1
- package/dist/{calendar-check-icon_2.entry-2c89c230.js → calendar-check-icon_2.entry-54a82e1e.js} +9 -9
- package/dist/{calendar-icon.entry-ffc93569.cjs → calendar-icon.entry-1a17f887.cjs} +1 -1
- package/dist/{calendar-icon.entry-02dd3990.js → calendar-icon.entry-29f7003b.js} +5 -5
- package/dist/checkbox-component_2.entry-84a17232.cjs +1 -0
- package/dist/{checkbox-component_2.entry-ee9d0e6c.js → checkbox-component_2.entry-dfec10cb.js} +35 -12
- package/dist/chevron-icon_3.entry-5da08d02.cjs +1 -0
- package/dist/{chevron-icon_3.entry-f62e9ef1.js → chevron-icon_3.entry-826e81d4.js} +29 -15
- package/dist/{clock-icon_4.entry-766a1b23.js → clock-icon_4.entry-36d97f00.js} +13 -13
- package/dist/{clock-icon_4.entry-7dc2cc4a.cjs → clock-icon_4.entry-dafdd895.cjs} +1 -1
- package/dist/{constants-50c3e067-9f2a6372.cjs → constants-50c3e067-1fe54cf3.cjs} +1 -1
- package/dist/{constants-50c3e067-8a40a5fe.js → constants-50c3e067-fed7fb48.js} +1 -1
- package/dist/{copy-icon.entry-2a841508.js → copy-icon.entry-6d1a649d.js} +7 -7
- package/dist/{copy-icon.entry-e5251410.cjs → copy-icon.entry-eec265da.cjs} +1 -1
- package/dist/{delete-icon_2.entry-1a5c39dc.cjs → delete-icon_2.entry-160ba41e.cjs} +1 -1
- package/dist/{delete-icon_2.entry-64555a2f.js → delete-icon_2.entry-528a3879.js} +9 -9
- package/dist/{document-refresh-icon.entry-fdc7ddda.cjs → document-refresh-icon.entry-276704dc.cjs} +1 -1
- package/dist/document-refresh-icon.entry-6565f3b5.js +15 -0
- package/dist/elements/index.d.ts +1 -0
- package/dist/{elements-dc5b338e-2da1fe61.js → elements-dc5b338e-2d3857dc.js} +1 -1
- package/dist/{elements-dc5b338e-c8016c3d.cjs → elements-dc5b338e-b06b2857.cjs} +1 -1
- package/dist/{focus-visible-e8093c16-0a38a184.cjs → focus-visible-e8093c16-47e61336.cjs} +1 -1
- package/dist/{focus-visible-e8093c16-9d0c98c0.js → focus-visible-e8093c16-6f68eb89.js} +1 -1
- package/dist/{forward-icon_6.entry-390ef70a.js → forward-icon_6.entry-ed6ab66a.js} +9 -9
- package/dist/{forward-icon_6.entry-7238ef38.cjs → forward-icon_6.entry-fed8994d.cjs} +2 -2
- package/dist/{globe-icon.entry-8d106260.js → globe-icon.entry-154ccdb5.js} +5 -5
- package/dist/{globe-icon.entry-81f42f89.cjs → globe-icon.entry-95fc0408.cjs} +1 -1
- package/dist/{google-logo-icon_4.entry-aabd3886.js → google-logo-icon_4.entry-68cfa3fe.js} +245 -252
- package/dist/google-logo-icon_4.entry-afffb209.cjs +1 -0
- package/dist/index-1322d804.js +12842 -0
- package/dist/index-c4e817ef.cjs +82 -0
- package/dist/{index.es-c9454237-00ccd1e6.js → index.es-79f5b771-04cd3414.js} +1 -1
- package/dist/{index.es-c9454237-b64161d1.cjs → index.es-79f5b771-08cc349d.cjs} +1 -1
- package/dist/{info-icon_2.entry-b2e11336.cjs → info-icon_2.entry-2af880b8.cjs} +1 -1
- package/dist/{info-icon_2.entry-bb8ed71c.js → info-icon_2.entry-49261a0a.js} +5 -5
- package/dist/input-color-picker.entry-57adff77.cjs +1 -0
- package/dist/input-color-picker.entry-aefe0e26.js +48 -0
- package/dist/input-component.entry-09c3c9b6.cjs +1 -0
- package/dist/{input-component.entry-cb86170f.js → input-component.entry-d7c2724b.js} +19 -14
- package/dist/{input-dropdown.entry-a76c339e.js → input-dropdown.entry-e573ade0.js} +6 -6
- package/dist/input-dropdown.entry-e7d26273.cjs +1 -0
- package/dist/{mailbox-store-edc386fc-8bc7558b.js → mailbox-store-9c52a3fa-27f8f7e6.js} +2 -2
- package/dist/{mailbox-store-edc386fc-156b7236.cjs → mailbox-store-9c52a3fa-6b39645f.cjs} +1 -1
- package/dist/{multi-select-dropdown.entry-6b686695.js → multi-select-dropdown.entry-15cacb87.js} +11 -7
- package/dist/multi-select-dropdown.entry-46b2b1c9.cjs +1 -0
- package/dist/{nylas-booked-event-card_12.entry-e861bb16.js → nylas-booked-event-card_12.entry-3921071a.js} +233 -231
- package/dist/nylas-booked-event-card_12.entry-47c5381d.cjs +1 -0
- package/dist/{nylas-form-card.entry-b158d789.js → nylas-form-card.entry-ca835017.js} +15 -15
- package/dist/{nylas-form-card.entry-ca4a8746.cjs → nylas-form-card.entry-db3f0e3b.cjs} +1 -1
- package/dist/{nylas-if-state.entry-8e4d922c.js → nylas-if-state.entry-4159d41d.js} +8 -8
- package/dist/{nylas-if-state.entry-95fac42d.cjs → nylas-if-state.entry-5410607c.cjs} +1 -1
- package/dist/{nylas-list-folders.entry-8a22e0c8.cjs → nylas-list-folders.entry-0f143930.cjs} +1 -1
- package/dist/{nylas-list-folders.entry-83c39684.js → nylas-list-folders.entry-6b4a3d96.js} +3 -3
- package/dist/{nylas-list-threads.entry-7ea370e1.js → nylas-list-threads.entry-62108562.js} +3 -3
- package/dist/{nylas-list-threads.entry-54c582af.cjs → nylas-list-threads.entry-68b6f32b.cjs} +1 -1
- package/dist/{nylas-login.entry-9115fd81.js → nylas-login.entry-590e7fba.js} +7 -7
- package/dist/{nylas-login.entry-fb627e40.cjs → nylas-login.entry-f1d7bc7d.cjs} +1 -1
- package/dist/{nylas-mailbox-pagination.entry-04626d27.cjs → nylas-mailbox-pagination.entry-8377fdee.cjs} +1 -1
- package/dist/{nylas-mailbox-pagination.entry-3ff02cf9.js → nylas-mailbox-pagination.entry-ba1af8fb.js} +2 -2
- package/dist/{nylas-mailbox-toolbar-button.entry-f752e925.js → nylas-mailbox-toolbar-button.entry-4497acd0.js} +8 -8
- package/dist/{nylas-mailbox-toolbar-button.entry-8d00c789.cjs → nylas-mailbox-toolbar-button.entry-6a5d8387.cjs} +1 -1
- package/dist/{nylas-mailbox.entry-99c27b6c.js → nylas-mailbox.entry-917c22f5.js} +4 -4
- package/dist/{nylas-mailbox.entry-b3974f4e.cjs → nylas-mailbox.entry-a07652b4.cjs} +1 -1
- package/dist/{nylas-provider.entry-a3ad02a5.cjs → nylas-provider.entry-0e520ac3.cjs} +1 -1
- package/dist/{nylas-provider.entry-c206aa32.js → nylas-provider.entry-20c47b14.js} +8 -8
- package/dist/{nylas-reminder-emails.entry-414ce6fe.js → nylas-reminder-emails.entry-088ee120.js} +9 -9
- package/dist/{nylas-reminder-emails.entry-59c07bfe.cjs → nylas-reminder-emails.entry-69626e7f.cjs} +2 -2
- package/dist/{nylas-reminder-time_2.entry-197d83a0.js → nylas-reminder-time_2.entry-0357f280.js} +5 -5
- package/dist/{nylas-reminder-time_2.entry-d79dcd85.cjs → nylas-reminder-time_2.entry-b5c181db.cjs} +1 -1
- package/dist/{nylas-scheduler-editor.entry-7f389982.js → nylas-scheduler-editor.entry-6bb290ed.js} +66 -66
- package/dist/nylas-scheduler-editor.entry-d2c3bddc.cjs +2 -0
- package/dist/{nylas-scheduling.entry-4fa5381d.js → nylas-scheduling.entry-bc9c25c5.js} +126 -112
- package/dist/nylas-scheduling.entry-dc92d5e7.cjs +1 -0
- package/dist/{nylas-threads-refresh.entry-20602e7b.js → nylas-threads-refresh.entry-45d7d171.js} +4 -4
- package/dist/{nylas-threads-refresh.entry-56b53449.cjs → nylas-threads-refresh.entry-6636e7b1.cjs} +1 -1
- package/dist/{nylas-threads-search.entry-8872473c.js → nylas-threads-search.entry-4460aa9b.js} +16 -16
- package/dist/{nylas-threads-search.entry-8e0ec3ae.cjs → nylas-threads-search.entry-ae87695a.cjs} +1 -1
- package/dist/{nylas-time-window-picker.entry-ca47f721.cjs → nylas-time-window-picker.entry-1b449403.cjs} +1 -1
- package/dist/{nylas-time-window-picker.entry-9ac542b7.js → nylas-time-window-picker.entry-260f52a6.js} +18 -18
- package/dist/{nylas-view-thread.entry-dcd3d5be.js → nylas-view-thread.entry-5821630b.js} +9 -9
- package/dist/{nylas-view-thread.entry-1f758e43.cjs → nylas-view-thread.entry-5a9b353a.cjs} +1 -1
- package/dist/{person-icon.entry-63b28ace.cjs → person-icon.entry-b4ce06b7.cjs} +1 -1
- package/dist/{person-icon.entry-93130c05.js → person-icon.entry-ed6786db.js} +2 -2
- package/dist/{play-icon_2.entry-6a99c32d.js → play-icon_2.entry-261ea828.js} +8 -8
- package/dist/play-icon_2.entry-87fe39a9.cjs +1 -0
- package/dist/react.cjs +1 -1
- package/dist/react.js +100 -99
- package/dist/{refresh-icon.entry-b49792fc.cjs → refresh-icon.entry-21ac359d.cjs} +1 -1
- package/dist/{refresh-icon.entry-84783c91.js → refresh-icon.entry-87af05b0.js} +4 -4
- package/dist/{register-component-887199a9-b41dfa7a.js → register-component-ea95564d-843da1da.js} +1 -1
- package/dist/{register-component-887199a9-003f96c5.cjs → register-component-ea95564d-a64ee107.cjs} +1 -1
- package/dist/{scheduler-config-store-2a3b403d-73610089.js → scheduler-config-store-2a3b403d-8553b685.js} +1 -1
- package/dist/{scheduler-config-store-2a3b403d-a5e3433a.cjs → scheduler-config-store-2a3b403d-88840eb1.cjs} +1 -1
- package/dist/scheduler-store-9ff4914b-63dc472a.cjs +1 -0
- package/dist/{scheduler-store-fe281404-bddb1b6a.js → scheduler-store-9ff4914b-d1a624f8.js} +87 -82
- package/dist/textarea-component.entry-cbffb0b0.cjs +1 -0
- package/dist/{textarea-component.entry-40e959e5.js → textarea-component.entry-dad42f20.js} +10 -9
- package/dist/time-period-selector.entry-79c94da3.js +80 -0
- package/dist/time-period-selector.entry-e54d0989.cjs +1 -0
- package/dist/{translate-icon.entry-a2ed4f76.cjs → translate-icon.entry-8e9eeeba.cjs} +1 -1
- package/dist/{translate-icon.entry-92b83635.js → translate-icon.entry-ef6266c4.js} +4 -4
- package/dist/{warning-icon.entry-3ab9a59e.cjs → warning-icon.entry-34c85de2.cjs} +1 -1
- package/dist/{warning-icon.entry-19f721c3.js → warning-icon.entry-adf18211.js} +4 -4
- package/package.json +2 -2
- package/dist/add-circle-icon_2.entry-7165bd0e.js +0 -25
- package/dist/add-circle-icon_2.entry-f1ddca18.cjs +0 -1
- package/dist/arrow-icon.entry-38949317.js +0 -15
- package/dist/calendar-agenda-fill-icon_48.entry-d3830dbb.cjs +0 -7
- package/dist/checkbox-component_2.entry-00b6a1e9.cjs +0 -1
- package/dist/chevron-icon_3.entry-468abc26.cjs +0 -1
- package/dist/document-refresh-icon.entry-4bf6398b.js +0 -15
- package/dist/google-logo-icon_4.entry-fa2b8999.cjs +0 -1
- package/dist/index-53420959-5fc8ad2b.js +0 -5
- package/dist/index-53420959-fcf45780.cjs +0 -1
- package/dist/index-5ccfd9df.js +0 -7859
- package/dist/index-6d9eeb53-58c8980a.js +0 -4971
- package/dist/index-6d9eeb53-b2a6d09f.cjs +0 -41
- package/dist/index-eb33703c.cjs +0 -42
- package/dist/input-component.entry-378b1ccc.cjs +0 -1
- package/dist/input-dropdown.entry-98954c93.cjs +0 -1
- package/dist/multi-select-dropdown.entry-40b855e1.cjs +0 -1
- package/dist/nylas-booked-event-card_12.entry-9d693125.cjs +0 -1
- package/dist/nylas-scheduler-editor.entry-f1c6964a.cjs +0 -2
- package/dist/nylas-scheduling.entry-1a8bd6fc.cjs +0 -1
- package/dist/play-icon_2.entry-b67fb649.cjs +0 -1
- package/dist/scheduler-store-fe281404-c3e477f6.cjs +0 -1
- package/dist/textarea-component.entry-28c4bc05.cjs +0 -1
- package/dist/time-period-selector.entry-af71523a.cjs +0 -1
- package/dist/time-period-selector.entry-da5d8652.js +0 -93
|
@@ -1,287 +1,280 @@
|
|
|
1
|
-
import { r as Z, h as e, c as
|
|
2
|
-
import { R as
|
|
3
|
-
import { D as St } from "./constants-50c3e067-
|
|
1
|
+
import { r as Z, h as e, c as S, d as u, A as Ot, C as q, H as Lt, g as Tt, F as Nt } from "./index-1322d804.js";
|
|
2
|
+
import { R as Ft } from "./register-component-ea95564d-843da1da.js";
|
|
3
|
+
import { D as St } from "./constants-50c3e067-fed7fb48.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import "react-dom";
|
|
6
|
-
const
|
|
6
|
+
const Dt = ".sc-google-logo-icon-h{display:flex}", Rt = Dt, zt = class {
|
|
7
7
|
constructor(t) {
|
|
8
8
|
Z(this, t), this.width = "24", this.height = "24";
|
|
9
9
|
}
|
|
10
10
|
render() {
|
|
11
|
-
return e("svg", { key: "
|
|
11
|
+
return e("svg", { key: "de9cae8990d7d127aa9fdd595dec79e80c79a84d", width: this.width, height: this.height, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, e("g", { key: "58338fde3c58a0b0c4d0df6ebb92f387eeba3a29", "clip-path": "url(#clip0_959_12452)" }, e("path", { key: "5eff0b6de57b59c3b3bec455ef60294c135fd001", d: "M23.745 12.27C23.745 11.48 23.675 10.73 23.555 10H12.255V14.51H18.725C18.435 15.99 17.585 17.24 16.325 18.09V21.09H20.185C22.445 19 23.745 15.92 23.745 12.27Z", fill: "#4285F4" }), e("path", { key: "136b3c676f5f96bffb54d7ca2487b3c303835787", d: "M12.255 24C15.495 24 18.205 22.92 20.185 21.09L16.325 18.09C15.245 18.81 13.875 19.25 12.255 19.25C9.12504 19.25 6.47505 17.14 5.52505 14.29H1.54504V17.38C3.51504 21.3 7.56504 24 12.255 24Z", fill: "#34A853" }), e("path", { key: "d60273905016ff4377bcbc31775b28b39cce2b0e", d: "M5.52501 14.2901C5.27501 13.5701 5.145 12.8001 5.145 12.0001C5.145 11.2001 5.28501 10.4301 5.52501 9.71012V6.62012H1.545C0.725004 8.24012 0.255005 10.0601 0.255005 12.0001C0.255005 13.9401 0.725004 15.7601 1.545 17.3801L5.52501 14.2901Z", fill: "#FBBC05" }), e("path", { key: "e6e1d4406f2b76b934a5d35c9840ad3fb2a1fed0", d: "M12.255 4.75C14.025 4.75 15.605 5.36 16.855 6.55L20.275 3.13C18.205 1.19 15.495 0 12.255 0C7.56504 0 3.51504 2.7 1.54504 6.62L5.52505 9.71C6.47505 6.86 9.12504 4.75 12.255 4.75Z", fill: "#EA4335" })), e("defs", { key: "1c29b130c1afb95fec41a1bbb20988423982ee0c" }, e("clipPath", { key: "9aefb74a952ab05e9493b2b5a0b6b838311f066e", id: "clip0_959_12452" }, e("rect", { key: "c3c6ed00b1ef66992016c15520abdd4691ca21bf", width: 24, height: 24, fill: "white" }))));
|
|
12
12
|
}
|
|
13
13
|
};
|
|
14
|
-
|
|
15
|
-
const It = ".sc-microsoft-logo-icon-h{display:flex}",
|
|
14
|
+
zt.style = Rt;
|
|
15
|
+
const It = ".sc-microsoft-logo-icon-h{display:flex}", At = It, Mt = class {
|
|
16
16
|
constructor(t) {
|
|
17
17
|
Z(this, t), this.width = "22", this.height = "22";
|
|
18
18
|
}
|
|
19
19
|
render() {
|
|
20
|
-
return e("svg", { key: "
|
|
20
|
+
return e("svg", { key: "20d8f297cf0cc69b7c398b6d0c24ca60a5c67109", width: this.width, height: this.height, viewBox: "0 0 22 22", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, e("path", { key: "dc420eb9c73909acfc6731606b24d015a600f34e", d: "M0.043457 0.043457H10.4782V10.4782H0.043457V0.043457Z", fill: "#F35325" }), e("path", { key: "d22732be730bc90dcd3b415b9e5bba8de185ad87", d: "M11.5217 0.043457H21.9565V10.4782H11.5217V0.043457Z", fill: "#81BC06" }), e("path", { key: "8c8bff7ba92cad76967ccf67c7b3435d07193091", d: "M0.043457 11.5217H10.4782V21.9565H0.043457V11.5217Z", fill: "#05A6F0" }), e("path", { key: "51d0a3be2495c599aee6062c51fb4bd531fd4b5c", d: "M11.5217 11.5217H21.9565V21.9565H11.5217V11.5217Z", fill: "#FFBA08" }));
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
|
-
|
|
23
|
+
Mt.style = At;
|
|
24
24
|
var o;
|
|
25
25
|
(function(t) {
|
|
26
26
|
t.EventInfo = "eventInfo", t.Availability = "availability", t.BookingOptions = "bookingOptions", t.Communications = "communications", t.Participants = "participants", t.BookingForm = "bookingForm", t.PageStyles = "pageStyles";
|
|
27
27
|
})(o || (o = {}));
|
|
28
|
-
function Ut({ id: t, formState: a, activeTab: i,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
28
|
+
function Ut({ id: t, formState: a, activeTab: i }, s) {
|
|
29
|
+
return e(
|
|
30
|
+
Nt,
|
|
31
|
+
null,
|
|
32
|
+
e(
|
|
33
|
+
"div",
|
|
34
|
+
{ key: `event-info-${t}`, class: { hide: i !== o.EventInfo } },
|
|
35
|
+
e(
|
|
36
|
+
"nylas-event-info",
|
|
37
|
+
null,
|
|
36
38
|
e(
|
|
37
|
-
"
|
|
38
|
-
|
|
39
|
-
e(
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
e("nylas-event-duration", { name: "duration", eventDurationMinutes: _, exportparts: "ned, ned__dropdown, ned__dropdown-button, ned__dropdown-content, ned__input_dropdown, ned__input_dropdown-input, ned__input_dropdown-content" }),
|
|
44
|
-
e("nylas-event-location", { name: "location", eventLocation: x, eventConferencing: T, userProvider: d.provider, exportparts: "nel, nel__location, nel__dropdown, nel__dropdown-button, nel__dropdown-content" }),
|
|
45
|
-
e("nylas-event-description", { name: "description", eventDescription: y, exportparts: "nedesc, nedesc__textarea" })
|
|
46
|
-
)
|
|
39
|
+
"div",
|
|
40
|
+
{ slot: "inputs" },
|
|
41
|
+
e("nylas-event-title", { name: "title", exportparts: "net, net__title, net__dropdown-content" }),
|
|
42
|
+
e("nylas-event-duration", { name: "duration", exportparts: "ned, ned__dropdown, ned__dropdown-button, ned__dropdown-content, ned__input_dropdown, ned__input_dropdown-input, ned__input_dropdown-content" }),
|
|
43
|
+
e("nylas-event-location", { name: "location", exportparts: "nel, nel__location, nel__dropdown, nel__dropdown-button, nel__dropdown-content" }),
|
|
44
|
+
e("nylas-event-description", { name: "description", exportparts: "nedesc, nedesc__textarea" })
|
|
47
45
|
)
|
|
48
|
-
)
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
"nylas-custom-booking-flow",
|
|
65
|
-
null,
|
|
66
|
-
e(
|
|
67
|
-
"div",
|
|
68
|
-
{ slot: "inputs" },
|
|
69
|
-
e("nylas-booking-confirmation-type", { name: "confirmation-type", bookingType: a.bookingType, exportparts: "nbct, nbct__header, nbct__dropdown, nbct__dropdown-button, nbct__dropdown-content" }),
|
|
70
|
-
e("nylas-booking-confirmation-redirect", { name: "confirmation-redirect", redirectUrl: a.redirectUrl, exportparts: "nbcr, nbcr__header, nbcr__dropdown, nbcr__dropdown-button, nbcr__dropdown-content, nbcr__input-textfield" })
|
|
71
|
-
)
|
|
72
|
-
),
|
|
73
|
-
e("nylas-buffer-time", { name: "buffer-time", buffer: a.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" }),
|
|
74
|
-
e(
|
|
75
|
-
"nylas-event-limits",
|
|
76
|
-
null,
|
|
77
|
-
e(
|
|
78
|
-
"div",
|
|
79
|
-
{ slot: "inputs" },
|
|
80
|
-
e("nylas-min-booking-notice", { name: "min-booking-notice", minBookingNotice: a.minBookingNotice, exportparts: "nmbn, nmbn__number-dropdown, nmbn__number-dropdown-button, nmbn__number-dropdown-content, nmbn__period-dropdown, nmbn__period-dropdown-button, nmbn__period-dropdown-content" }),
|
|
81
|
-
e("nylas-limit-future-bookings", { name: "limit-future-bookings", availableDaysInFuture: a.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" }),
|
|
82
|
-
e("nylas-min-cancellation-notice", { name: "min-cancellation-notice", minCancellationNotice: a.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" }),
|
|
83
|
-
e("nylas-cancellation-policy", { name: "cancellation-policy", cancellationPolicy: a.cancellationPolicy, exportparts: "ncpolicy, ncpolicy__textarea" })
|
|
84
|
-
)
|
|
85
|
-
),
|
|
86
|
-
e("nylas-timeslot-interval", { name: "timeslot-interval", eventDurationMinutes: parseInt(a.duration), exportparts: "nti, nti__header, nti__input-label, nti__dropdown, nti__dropdown-button, nti__dropdown-content" }),
|
|
87
|
-
e("nylas-customize-booking-settings", { name: "customize-booking-settings", exportparts: "ncbs, ncbs__header, ncbs__settings, ncbs__settings-div, ncbs__additional_guests, ncbs__cancellation_options, ncbs__rescheduling_options" })
|
|
88
|
-
);
|
|
89
|
-
case o.Communications:
|
|
90
|
-
return e(
|
|
91
|
-
"div",
|
|
92
|
-
{ key: t },
|
|
46
|
+
)
|
|
47
|
+
),
|
|
48
|
+
e(
|
|
49
|
+
"div",
|
|
50
|
+
{ key: `availability-${t}`, class: { hide: i !== o.Availability } },
|
|
51
|
+
e("nylas-participant-booking-calendars", { participants: a.participants, name: "participant-booking-calendars" }),
|
|
52
|
+
e("nylas-connected-calendars", { participants: a.participants, name: "connected-calendars" }),
|
|
53
|
+
e("nylas-availability-picker", { name: "availability", 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
|
+
e(
|
|
56
|
+
"div",
|
|
57
|
+
{ key: `booking-options-${t}`, class: { hide: i !== o.BookingOptions } },
|
|
58
|
+
e("nylas-scheduling-method", { name: "availability-method", readOnly: !0, exportparts: "nsm, nsm__header, nsm__input-label, nsm__dropdown, nsm__dropdown-button, nsm__dropdown-content" }),
|
|
59
|
+
e(
|
|
60
|
+
"nylas-custom-booking-flow",
|
|
61
|
+
null,
|
|
93
62
|
e(
|
|
94
63
|
"div",
|
|
95
|
-
{
|
|
96
|
-
e("
|
|
97
|
-
e("
|
|
98
|
-
)
|
|
99
|
-
|
|
100
|
-
)
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
"div",
|
|
104
|
-
{ key: t },
|
|
105
|
-
e("nylas-additional-participants", { name: "participants", eventParticipants: a.participants, exportparts: "nap__title, nap__subtitle, nap__content, nap__input_group, nap__input_wrapper, nap__input, nap__remove-participant" }),
|
|
106
|
-
e("nylas-participants-custom-availability", { name: "participant-custom-availability", participants: a.participants, exportparts: "npca, npca__header, npca__content, npca__participant-container, npca__participant-title, npca__participant-toggle--container, npca__toggle-label, npca__toggle-input, npca__toggle-slider" })
|
|
107
|
-
);
|
|
108
|
-
case o.PageStyles:
|
|
109
|
-
return e(
|
|
110
|
-
"div",
|
|
64
|
+
{ slot: "inputs" },
|
|
65
|
+
e("nylas-booking-confirmation-type", { name: "confirmation-type", exportparts: "nbct, nbct__header, nbct__dropdown, nbct__dropdown-button, nbct__dropdown-content" }),
|
|
66
|
+
e("nylas-booking-confirmation-redirect", { name: "confirmation-redirect", exportparts: "nbcr, nbcr__header, nbcr__dropdown, nbcr__dropdown-button, nbcr__dropdown-content, nbcr__input-textfield" })
|
|
67
|
+
)
|
|
68
|
+
),
|
|
69
|
+
e("nylas-buffer-time", { name: "buffer-time", 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" }),
|
|
70
|
+
e(
|
|
71
|
+
"nylas-event-limits",
|
|
111
72
|
null,
|
|
112
|
-
e(
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
73
|
+
e(
|
|
74
|
+
"div",
|
|
75
|
+
{ slot: "inputs" },
|
|
76
|
+
e("nylas-min-booking-notice", { name: "min-booking-notice", exportparts: "nmbn, nmbn__number-dropdown, nmbn__number-dropdown-button, nmbn__number-dropdown-content, nmbn__period-dropdown, nmbn__period-dropdown-button, nmbn__period-dropdown-content" }),
|
|
77
|
+
e("nylas-limit-future-bookings", { name: "limit-future-bookings", exportparts: "nlfb, nlfb__number-dropdown, nlfb__number-dropdown-button, nlfb__number-dropdown-content, nlfb__period-dropdown, nlfb__period-dropdown-button, nlfb__period-dropdown-content" }),
|
|
78
|
+
e("nylas-min-cancellation-notice", { name: "min-cancellation-notice", exportparts: "nmcn, nmcn__number-dropdown, nmcn__number-dropdown-button, nmcn__number-dropdown-content, nmcn__period-dropdown, nmcn__period-dropdown-button, nmcn__period-dropdown-content" }),
|
|
79
|
+
e("nylas-cancellation-policy", { name: "cancellation-policy", exportparts: "ncpolicy, ncpolicy__textarea" })
|
|
80
|
+
)
|
|
81
|
+
),
|
|
82
|
+
e("nylas-timeslot-interval", { name: "timeslot-interval", exportparts: "nti, nti__header, nti__input-label, nti__dropdown, nti__dropdown-button, nti__dropdown-content" }),
|
|
83
|
+
e("nylas-customize-booking-settings", { name: "customize-booking-settings", exportparts: "ncbs, ncbs__header, ncbs__settings, ncbs__settings-div, ncbs__additional_guests, ncbs__cancellation_options, ncbs__rescheduling_options" })
|
|
84
|
+
),
|
|
85
|
+
e(
|
|
86
|
+
"div",
|
|
87
|
+
{ key: `communications-${t}`, class: { hide: i !== o.Communications } },
|
|
88
|
+
e(
|
|
119
89
|
"div",
|
|
120
|
-
{
|
|
121
|
-
e("
|
|
122
|
-
|
|
123
|
-
|
|
90
|
+
{ class: "tab-header" },
|
|
91
|
+
e("h3", null, "Event communications"),
|
|
92
|
+
e("p", null, "Set up automatic confirmation emails.")
|
|
93
|
+
),
|
|
94
|
+
e("nylas-confirmation-email", { name: "confirmation-email-template", exportparts: "nce, nce__tab-heading, nce__header, nce__body, nce__confirmation-email-toggle--container, nce__summary, nce__reminder-input_dropdown, nce__reminder-input_dropdown-input, nce__reminder-input_dropdown-content" })
|
|
95
|
+
),
|
|
96
|
+
e(
|
|
97
|
+
"div",
|
|
98
|
+
{ key: `participants-${t}`, class: { hide: i !== o.Participants } },
|
|
99
|
+
e("nylas-additional-participants", { name: "participants", exportparts: "nap__title, nap__subtitle, nap__content, nap__input_group, nap__input_wrapper, nap__input, nap__remove-participant" }),
|
|
100
|
+
e("nylas-participants-custom-availability", { participants: a.participants, name: "participant-custom-availability", exportparts: "npca, npca__header, npca__content, npca__participant-container, npca__participant-title, npca__participant-toggle--container, npca__toggle-label, npca__toggle-input, npca__toggle-slider" })
|
|
101
|
+
),
|
|
102
|
+
e(
|
|
103
|
+
"div",
|
|
104
|
+
{ key: `page-styles-${t}`, class: { hide: i !== o.PageStyles } },
|
|
105
|
+
e("nylas-custom-event-slug", { name: "custom-event-slug", exportparts: "nces, nces__body, nces__header, nces__drawer-toggle--container, nces__input-textfield" }),
|
|
106
|
+
e("nylas-page-name", { name: "page-name", exportparts: "npn, npn__body, npn__header, npn__drawer-toggle--container, npn__input-textfield" }),
|
|
107
|
+
e("nylas-page-styling", { name: "page-styling", exportparts: "nps, nps__header, nps__drawer-toggle--container, nps__body, nps__title-input-textfield, nps__company-logo-input-textfield, nps__color-picker, nps__color-picker-button, nps__color-picker-button-label, nps__color-picker-selected-label, nps__submit-button-label-input-textfield, nps__message-textarea" }, s)
|
|
108
|
+
),
|
|
109
|
+
e(
|
|
110
|
+
"div",
|
|
111
|
+
{ key: `booking-form-${t}`, class: { hide: i !== o.BookingForm } },
|
|
112
|
+
e("nylas-booking-form-config", { name: "additional-fields" })
|
|
113
|
+
)
|
|
114
|
+
);
|
|
124
115
|
}
|
|
125
|
-
const
|
|
126
|
-
var
|
|
127
|
-
var
|
|
116
|
+
const $t = '.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;height:inherit}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs{height:calc(100% - 80px);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;height:auto}}.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)}@media screen and (max-width: 768px){.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs{border-right:none}}.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.sc-nylas-editor-tabs:last-of-type{margin-bottom: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 .tabs.sc-nylas-editor-tabs .tab.hide.sc-nylas-editor-tabs{display:none}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs{max-width:692px;overflow-y:auto;overflow-x:hidden}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs .hide.sc-nylas-editor-tabs{display:none}.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,.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{width:inherit}.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}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs .tab-header.sc-nylas-editor-tabs{display:flex;flex-direction:column;margin:1rem 1rem 0.5rem;row-gap:4px}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs .tab-header.sc-nylas-editor-tabs h3.sc-nylas-editor-tabs{margin:0;font-size:1rem;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs .tab-header.sc-nylas-editor-tabs p.sc-nylas-editor-tabs{margin:0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.footer.sc-nylas-editor-tabs{display:flex;justify-content:space-between;align-items:center;gap:1rem;min-height:80px;padding:0 1rem;border-top:1px solid var(--nylas-base-200)}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs{flex-direction:column;height:auto}}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs .preview.sc-nylas-editor-tabs{margin-top:1rem;width:100%}}.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}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs{flex-direction:column-reverse;width:100%}}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.sc-nylas-editor-tabs{max-width:524px}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.unsaved-changes.sc-nylas-editor-tabs{color:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.saved-changes.sc-nylas-editor-tabs{color:var(--nylas-success)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.error.sc-nylas-editor-tabs{color:var(--nylas-error)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.error-full-width.sc-nylas-editor-tabs{max-width:660px}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button-component.sc-nylas-editor-tabs{width:100%}}.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}', jt = $t;
|
|
117
|
+
var Jt = function(t, a, i, s) {
|
|
118
|
+
var l = arguments.length, n = l < 3 ? a : s === null ? s = Object.getOwnPropertyDescriptor(a, i) : s, c;
|
|
128
119
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
129
120
|
n = Reflect.decorate(t, a, i, s);
|
|
130
121
|
else
|
|
131
|
-
for (var
|
|
132
|
-
(c = t[
|
|
133
|
-
return
|
|
122
|
+
for (var d = t.length - 1; d >= 0; d--)
|
|
123
|
+
(c = t[d]) && (n = (l < 3 ? c(n) : l > 3 ? c(a, i, n) : c(a, i)) || n);
|
|
124
|
+
return l > 3 && n && Object.defineProperty(a, i, n), n;
|
|
134
125
|
}, G = function(t, a) {
|
|
135
126
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
136
127
|
return Reflect.metadata(t, a);
|
|
137
128
|
};
|
|
138
129
|
const Pt = class {
|
|
139
130
|
constructor(t) {
|
|
140
|
-
Z(this, t), this.schedulerConfigChanged =
|
|
131
|
+
Z(this, t), this.schedulerConfigChanged = S(this, "schedulerConfigChanged", 7), this.cancelButtonClick = S(this, "cancelButtonClick", 7), this.formSubmitted = S(this, "formSubmitted", 7), this.previewButtonClicked = S(this, "previewButtonClicked", 7), this.schedulerEditorFormUpdated = S(this, "schedulerEditorFormUpdated", 7), this.setError = (a) => {
|
|
141
132
|
this.error = a.message;
|
|
142
133
|
}, this.formSubmissionHandler = async (a) => {
|
|
143
134
|
var K, Q, X, Y, tt, et, at, it, nt, st, ot, rt, lt, dt, ct, bt;
|
|
144
|
-
|
|
135
|
+
a.preventDefault();
|
|
136
|
+
const i = await this.formSubmitted.emit();
|
|
137
|
+
if (u("[nylas-editor-tabs]", "formSubmissionHandler", i), !this.formRef.checkValidity() || i.defaultPrevented) {
|
|
145
138
|
this.error = this.formRef.validationMessage || "Please fix the form errors.";
|
|
146
139
|
return;
|
|
147
140
|
}
|
|
148
141
|
this.isLoading = !0, this.hasUnsavedChanges = !1;
|
|
149
|
-
const
|
|
142
|
+
const l = this.updateFormState(), { title: n, description: c, duration: d, availability: h, bookingCalendar: f, location: L, bookingType: g, buffer: T, availableDaysInFuture: B, minCancellationNotice: H, minBookingNotice: O, cancellationPolicy: N, timeslotInterval: k, additionalGuestsHidden: D, hideCancellationOptions: R, hideReschedulingOptions: z, participants: w, participantOpenHours: p, additionalFields: I, participantCalendars: y, conferencing: A, participantBookingCalendars: m, reminders: M, emailTemplate: U, redirectUrl: $, availabilityMethod: F, slug: j, appearance: J, name: V } = l, b = ((Q = (K = this.selectedConfiguration) == null ? void 0 : K.participants) == null ? void 0 : Q.find((r) => r.is_organizer)) || (w == null ? void 0 : w.find((r) => r.is_organizer)), C = y && (b != null && b.email) ? y[b == null ? void 0 : b.email] : [], _ = ((X = b == null ? void 0 : b.booking) == null ? void 0 : X.calendar_id) || f, v = d ? parseInt(d) : 30, x = w && (w == null ? void 0 : w.length) > 0 ? w : [
|
|
150
143
|
{
|
|
151
144
|
name: (b == null ? void 0 : b.name) ?? ((Y = this.currentUser) == null ? void 0 : Y.name) ?? "",
|
|
152
145
|
email: (b == null ? void 0 : b.email) ?? ((tt = this.currentUser) == null ? void 0 : tt.email) ?? "",
|
|
153
146
|
is_organizer: !0,
|
|
154
|
-
timezone: (
|
|
147
|
+
timezone: (h == null ? void 0 : h.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
155
148
|
availability: {
|
|
156
|
-
calendar_ids:
|
|
149
|
+
calendar_ids: C.length ? C : ["primary"],
|
|
157
150
|
open_hours: []
|
|
158
151
|
},
|
|
159
152
|
booking: {
|
|
160
|
-
calendar_id:
|
|
153
|
+
calendar_id: f && f !== "" ? f : "primary"
|
|
161
154
|
}
|
|
162
155
|
}
|
|
163
|
-
],
|
|
156
|
+
], P = {
|
|
164
157
|
...((et = this.selectedConfiguration) == null ? void 0 : et.id) && { id: this.selectedConfiguration.id },
|
|
165
158
|
version: ((at = this.selectedConfiguration) == null ? void 0 : at.version) ?? "1.0.0",
|
|
166
159
|
slug: j,
|
|
167
|
-
name:
|
|
160
|
+
name: V,
|
|
168
161
|
availability: {
|
|
169
|
-
duration_minutes:
|
|
170
|
-
interval_minutes: (
|
|
171
|
-
round_to:
|
|
162
|
+
duration_minutes: v,
|
|
163
|
+
interval_minutes: (k == null ? void 0 : k.interval) ?? v,
|
|
164
|
+
round_to: k == null ? void 0 : k.roundTo,
|
|
172
165
|
availability_rules: {
|
|
173
|
-
availability_method:
|
|
166
|
+
availability_method: F || (((st = (nt = (it = this.selectedConfiguration) == null ? void 0 : it.availability) == null ? void 0 : nt.availability_rules) == null ? void 0 : st.availability_method) ?? "collective"),
|
|
174
167
|
buffer: T || { before: 0, after: 0 },
|
|
175
|
-
default_open_hours: (
|
|
168
|
+
default_open_hours: (h == null ? void 0 : h.openHours) ?? ((lt = (rt = (ot = this.selectedConfiguration) == null ? void 0 : ot.availability) == null ? void 0 : rt.availability_rules) == null ? void 0 : lt.default_open_hours) ?? St,
|
|
176
169
|
round_robin_group_id: ((bt = (ct = (dt = this.selectedConfiguration) == null ? void 0 : dt.availability) == null ? void 0 : ct.availability_rules) == null ? void 0 : bt.round_robin_group_id) ?? ""
|
|
177
170
|
}
|
|
178
171
|
},
|
|
179
172
|
participants: [
|
|
180
|
-
...
|
|
173
|
+
...x == null ? void 0 : x.map((r) => {
|
|
181
174
|
var ht, ut, pt, mt, yt, ft, gt, _t, vt, wt, kt, Ct, xt;
|
|
182
|
-
return
|
|
183
|
-
name:
|
|
184
|
-
email:
|
|
175
|
+
return r.is_organizer ? {
|
|
176
|
+
name: r.name ?? "",
|
|
177
|
+
email: r.email,
|
|
185
178
|
is_organizer: !0,
|
|
186
|
-
timezone: ((ut = (ht =
|
|
179
|
+
timezone: ((ut = (ht = p == null ? void 0 : p[r.email]) == null ? void 0 : ht[0]) == null ? void 0 : ut.timezone) ?? ((yt = (mt = (pt = r.availability) == null ? void 0 : pt.open_hours) == null ? void 0 : mt[0]) == null ? void 0 : yt.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
187
180
|
availability: {
|
|
188
|
-
calendar_ids:
|
|
189
|
-
open_hours: (
|
|
181
|
+
calendar_ids: y != null && y[r.email] ? y == null ? void 0 : y[r.email] : C != null && C.length ? C : ["primary"],
|
|
182
|
+
open_hours: (p == null ? void 0 : p[r.email]) ?? ((ft = r.availability) == null ? void 0 : ft.open_hours) ?? []
|
|
190
183
|
},
|
|
191
184
|
booking: {
|
|
192
|
-
calendar_id:
|
|
185
|
+
calendar_id: m != null && m[r.email] ? m == null ? void 0 : m[r.email] : _ || "primary"
|
|
193
186
|
}
|
|
194
187
|
} : {
|
|
195
|
-
...
|
|
196
|
-
timezone: ((_t = (gt =
|
|
197
|
-
availability:
|
|
198
|
-
calendar_ids: (
|
|
199
|
-
open_hours: (
|
|
188
|
+
...r,
|
|
189
|
+
timezone: ((_t = (gt = p == null ? void 0 : p[r.email]) == null ? void 0 : gt[0]) == null ? void 0 : _t.timezone) ?? ((kt = (wt = (vt = r.availability) == null ? void 0 : vt.open_hours) == null ? void 0 : wt[0]) == null ? void 0 : kt.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
190
|
+
availability: r.availability ? {
|
|
191
|
+
calendar_ids: (y == null ? void 0 : y[r.email]) ?? ((Ct = r.availability) == null ? void 0 : Ct.calendar_ids) ?? ["primary"],
|
|
192
|
+
open_hours: (p == null ? void 0 : p[r.email]) ?? ((xt = r.availability) == null ? void 0 : xt.open_hours) ?? []
|
|
200
193
|
} : void 0,
|
|
201
|
-
booking:
|
|
194
|
+
booking: m != null && m[r.email] ? { calendar_id: m == null ? void 0 : m[r.email] } : (r == null ? void 0 : r.booking) ?? void 0
|
|
202
195
|
};
|
|
203
196
|
})
|
|
204
197
|
],
|
|
205
198
|
event_booking: {
|
|
206
|
-
title: (
|
|
207
|
-
description: (
|
|
208
|
-
location: (
|
|
209
|
-
booking_type: (
|
|
210
|
-
timezone: (
|
|
211
|
-
conferencing:
|
|
212
|
-
reminders:
|
|
199
|
+
title: (n == null ? void 0 : n.toString()) ?? "",
|
|
200
|
+
description: (c == null ? void 0 : c.toString()) ?? "",
|
|
201
|
+
location: (L == null ? void 0 : L.toString()) ?? "",
|
|
202
|
+
booking_type: (g == null ? void 0 : g.toString()) ?? "booking",
|
|
203
|
+
timezone: (h == null ? void 0 : h.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
204
|
+
conferencing: A,
|
|
205
|
+
reminders: M
|
|
213
206
|
},
|
|
214
207
|
scheduler: {
|
|
215
|
-
cancellation_policy:
|
|
216
|
-
available_days_in_future:
|
|
217
|
-
min_cancellation_notice:
|
|
218
|
-
min_booking_notice:
|
|
219
|
-
hide_additional_guests:
|
|
220
|
-
hide_cancellation_options:
|
|
221
|
-
hide_rescheduling_options:
|
|
222
|
-
additional_fields:
|
|
223
|
-
email_template:
|
|
224
|
-
confirmation_redirect_url:
|
|
208
|
+
cancellation_policy: N ?? "",
|
|
209
|
+
available_days_in_future: B ?? 30,
|
|
210
|
+
min_cancellation_notice: H ?? 0,
|
|
211
|
+
min_booking_notice: O ?? 60,
|
|
212
|
+
hide_additional_guests: D ?? !1,
|
|
213
|
+
hide_cancellation_options: R ?? !1,
|
|
214
|
+
hide_rescheduling_options: z ?? !1,
|
|
215
|
+
additional_fields: I,
|
|
216
|
+
email_template: U,
|
|
217
|
+
confirmation_redirect_url: $
|
|
225
218
|
},
|
|
226
|
-
appearance:
|
|
227
|
-
},
|
|
228
|
-
this.isConfigRoundRobin(
|
|
229
|
-
const
|
|
219
|
+
appearance: J
|
|
220
|
+
}, Bt = Ot(P, this.selectedConfiguration), E = this.action === "create" ? Bt : P;
|
|
221
|
+
this.isConfigRoundRobin(E) && (E.participants = E.participants.map((r) => ({ ...r, is_organizer: void 0 })));
|
|
222
|
+
const Ht = (r) => {
|
|
230
223
|
this.isLoading = !1, this.changesSaved = !0, setTimeout(() => {
|
|
231
224
|
this.changesSaved = !1;
|
|
232
225
|
}, 5e3);
|
|
233
226
|
};
|
|
234
|
-
this.checkForClientSideErrors(
|
|
227
|
+
this.checkForClientSideErrors(E) || this.schedulerConfigChanged.emit({ config: E, resetLoadingState: Ht, setError: this.setError, action: this.action });
|
|
235
228
|
}, this.isConfigRoundRobin = (a) => {
|
|
236
|
-
var i, s,
|
|
237
|
-
return ((s = (i = a.availability) == null ? void 0 : i.availability_rules) == null ? void 0 : s.availability_method) === "max-availability" || ((n = (
|
|
229
|
+
var i, s, l, n;
|
|
230
|
+
return ((s = (i = a.availability) == null ? void 0 : i.availability_rules) == null ? void 0 : s.availability_method) === "max-availability" || ((n = (l = a.availability) == null ? void 0 : l.availability_rules) == null ? void 0 : n.availability_method) === "max-fairness";
|
|
238
231
|
}, this.checkForClientSideErrors = (a) => {
|
|
239
|
-
var
|
|
232
|
+
var d, h, f;
|
|
240
233
|
let i = !1, s = "";
|
|
241
|
-
const
|
|
242
|
-
return
|
|
243
|
-
const
|
|
244
|
-
if (
|
|
245
|
-
s += `Label is required for field of type ${
|
|
234
|
+
const l = (d = a.scheduler) == null ? void 0 : d.additional_fields, n = ((h = a.event_booking) == null ? void 0 : h.booking_type) === "organizer-confirmation", c = (f = a.scheduler) == null ? void 0 : f.organizer_confirmation_url;
|
|
235
|
+
return l && (s = "Booking form error: ", Object.entries(l).forEach((L) => {
|
|
236
|
+
const g = L[1];
|
|
237
|
+
if (g.label === "") {
|
|
238
|
+
s += `Label is required for field of type ${g.type}.`, i = !0;
|
|
246
239
|
return;
|
|
247
240
|
}
|
|
248
|
-
if (
|
|
249
|
-
for (const
|
|
250
|
-
if (
|
|
251
|
-
s += `Empty option detected inside ${
|
|
241
|
+
if (g.options) {
|
|
242
|
+
for (const T of g.options)
|
|
243
|
+
if (T === "") {
|
|
244
|
+
s += `Empty option detected inside ${g.label} of type ${g.type}.`, i = !0;
|
|
252
245
|
break;
|
|
253
246
|
}
|
|
254
247
|
}
|
|
255
|
-
})), i && (this.isLoading = !1, this.setError(new Error(s))), i;
|
|
248
|
+
})), n && !c && (s += "Organizer confirmation URL is required when using organizer confirmation booking type.", i = !0), i && (this.isLoading = !1, this.setError(new Error(s))), i;
|
|
256
249
|
}, this.calendars = void 0, this.selectedConfiguration = void 0, this.currentUser = void 0, this.schedulerPreviewLink = "", this.mode = "app", this.hideEditorTabs = [], this.action = "create", this.activeTab = o.EventInfo, this.isLoading = !1, this.hasUnsavedChanges = !1, this.changesSaved = !1, this.formState = {}, this.error = "";
|
|
257
250
|
}
|
|
258
251
|
configChangedHandler(t) {
|
|
259
|
-
|
|
252
|
+
u("[nylas-editor-tabs]", "configChangedHandler", t, this.selectedConfiguration), this.formState = {
|
|
260
253
|
...this.getFormStateFromConfig(t)
|
|
261
|
-
}, t.id ? this.action = "edit" : this.action = "create";
|
|
254
|
+
}, t != null && t.id ? this.action = "edit" : this.action = "create";
|
|
262
255
|
}
|
|
263
256
|
userChangedHandler(t) {
|
|
264
|
-
|
|
257
|
+
u("[nylas-editor-tabs]", "userChangedHandler", t), t && (this.formState = {
|
|
265
258
|
...this.getFormStateFromConfig(this.selectedConfiguration)
|
|
266
259
|
});
|
|
267
260
|
}
|
|
268
261
|
connectedCallback() {
|
|
269
|
-
|
|
262
|
+
u("[nylas-editor-tabs]", "connectedCallback");
|
|
270
263
|
}
|
|
271
264
|
componentWillLoad() {
|
|
272
|
-
|
|
265
|
+
u("[nylas-editor-tabs]", "componentWillLoad"), this.formState = this.getFormStateFromConfig(this.selectedConfiguration);
|
|
273
266
|
}
|
|
274
267
|
componentDidLoad() {
|
|
275
|
-
var a;
|
|
276
|
-
|
|
277
|
-
const t = (
|
|
268
|
+
var a, i;
|
|
269
|
+
u("[nylas-editor-tabs]", "componentDidLoad"), (a = this.selectedConfiguration) != null && a.id && this.configChangedHandler(this.selectedConfiguration);
|
|
270
|
+
const t = (i = this.host.querySelector("button.tab:not(.hide)")) == null ? void 0 : i.name;
|
|
278
271
|
t && (this.activeTab = t);
|
|
279
272
|
}
|
|
280
273
|
disconnectedCallback() {
|
|
281
|
-
|
|
274
|
+
u("[nylas-editor-tabs]", "disconnectedCallback");
|
|
282
275
|
}
|
|
283
276
|
handleValueChanged(t) {
|
|
284
|
-
|
|
277
|
+
u("[nylas-editor-tabs]", "handleValueChanged", t);
|
|
285
278
|
const { name: a, value: i } = t.detail;
|
|
286
279
|
this.setFormState(i, a), this.formState = { ...this.formState }, this.hasUnsavedChanges = !0, this.error = "", this.schedulerEditorFormUpdated.emit({
|
|
287
280
|
value: t.detail.value,
|
|
@@ -289,49 +282,49 @@ const Pt = class {
|
|
|
289
282
|
});
|
|
290
283
|
}
|
|
291
284
|
getFormStateFromConfig(t) {
|
|
292
|
-
var i, s,
|
|
293
|
-
let a = (i = t == null ? void 0 : t.participants) == null ? void 0 : i.find((
|
|
294
|
-
return !a && ((
|
|
295
|
-
var
|
|
296
|
-
return
|
|
285
|
+
var i, s, l, n, c, d, h, f, L, g, T, B, H, O, N, k, D, R, z, w, p, I, y, A, m, M, U, $, F, j, J, V, b, C;
|
|
286
|
+
let a = (i = t == null ? void 0 : t.participants) == null ? void 0 : i.find((_) => _.is_organizer);
|
|
287
|
+
return !a && ((l = (s = t == null ? void 0 : t.availability) == null ? void 0 : s.availability_rules) == null ? void 0 : l.availability_method) !== "collective" && (a = (n = t == null ? void 0 : t.participants) == null ? void 0 : n.find((_) => {
|
|
288
|
+
var v;
|
|
289
|
+
return _.email === ((v = this.currentUser) == null ? void 0 : v.email);
|
|
297
290
|
}), a && (a.is_organizer = !0)), t != null && t.appearance && console.info("Appearance settings have been returned from the given configuration; please remember to grab them from the configSettingsLoaded event and apply them as desired."), {
|
|
298
291
|
title: ((c = t == null ? void 0 : t.event_booking) == null ? void 0 : c.title) ?? "",
|
|
299
|
-
description: ((
|
|
300
|
-
duration: ((
|
|
292
|
+
description: ((d = t == null ? void 0 : t.event_booking) == null ? void 0 : d.description) ?? "",
|
|
293
|
+
duration: ((f = (h = t == null ? void 0 : t.availability) == null ? void 0 : h.duration_minutes) == null ? void 0 : f.toString()) ?? "30",
|
|
301
294
|
availability: {
|
|
302
|
-
timezone: ((
|
|
303
|
-
openHours: ((
|
|
295
|
+
timezone: ((L = t == null ? void 0 : t.event_booking) == null ? void 0 : L.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
296
|
+
openHours: ((T = (g = t == null ? void 0 : t.availability) == null ? void 0 : g.availability_rules) == null ? void 0 : T.default_open_hours) ?? St
|
|
304
297
|
},
|
|
305
|
-
additionalFields: ((
|
|
306
|
-
conferencing: ((
|
|
307
|
-
calendarIds: ((
|
|
298
|
+
additionalFields: ((B = t == null ? void 0 : t.scheduler) == null ? void 0 : B.additional_fields) ?? {},
|
|
299
|
+
conferencing: ((H = t == null ? void 0 : t.event_booking) == null ? void 0 : H.conferencing) ?? {},
|
|
300
|
+
calendarIds: ((O = a == null ? void 0 : a.availability) == null ? void 0 : O.calendar_ids) ?? [],
|
|
308
301
|
participants: (t == null ? void 0 : t.participants) ?? [],
|
|
309
|
-
bookingCalendar: ((
|
|
310
|
-
location: ((
|
|
302
|
+
bookingCalendar: ((N = a == null ? void 0 : a.booking) == null ? void 0 : N.calendar_id) ?? (a == null ? void 0 : a.email) ?? "",
|
|
303
|
+
location: ((k = t == null ? void 0 : t.event_booking) == null ? void 0 : k.location) ?? "",
|
|
311
304
|
bookingType: ((D = t == null ? void 0 : t.event_booking) == null ? void 0 : D.booking_type) ?? "booking",
|
|
312
|
-
buffer: ((
|
|
313
|
-
cancellationPolicy: ((
|
|
314
|
-
availableDaysInFuture: ((
|
|
315
|
-
minCancellationNotice: ((
|
|
316
|
-
minBookingNotice: ((
|
|
305
|
+
buffer: ((z = (R = t == null ? void 0 : t.availability) == null ? void 0 : R.availability_rules) == null ? void 0 : z.buffer) ?? { before: 0, after: 0 },
|
|
306
|
+
cancellationPolicy: ((w = t == null ? void 0 : t.scheduler) == null ? void 0 : w.cancellation_policy) ?? "",
|
|
307
|
+
availableDaysInFuture: ((p = t == null ? void 0 : t.scheduler) == null ? void 0 : p.available_days_in_future) ?? 30,
|
|
308
|
+
minCancellationNotice: ((I = t == null ? void 0 : t.scheduler) == null ? void 0 : I.min_cancellation_notice) ?? 0,
|
|
309
|
+
minBookingNotice: ((y = t == null ? void 0 : t.scheduler) == null ? void 0 : y.min_booking_notice) ?? 60,
|
|
317
310
|
timeslotInterval: {
|
|
318
|
-
interval: ((
|
|
319
|
-
roundTo: (
|
|
311
|
+
interval: ((A = t == null ? void 0 : t.availability) == null ? void 0 : A.interval_minutes) ?? ((m = t == null ? void 0 : t.availability) == null ? void 0 : m.duration_minutes),
|
|
312
|
+
roundTo: (M = t == null ? void 0 : t.availability) == null ? void 0 : M.round_to
|
|
320
313
|
},
|
|
321
|
-
additionalGuestsHidden: ((
|
|
322
|
-
hideCancellationOptions: ((
|
|
323
|
-
hideReschedulingOptions: ((
|
|
324
|
-
participantBookingCalendars: ((
|
|
325
|
-
var
|
|
326
|
-
return (
|
|
314
|
+
additionalGuestsHidden: ((U = t == null ? void 0 : t.scheduler) == null ? void 0 : U.hide_additional_guests) ?? !1,
|
|
315
|
+
hideCancellationOptions: (($ = t == null ? void 0 : t.scheduler) == null ? void 0 : $.hide_cancellation_options) ?? !1,
|
|
316
|
+
hideReschedulingOptions: ((F = t == null ? void 0 : t.scheduler) == null ? void 0 : F.hide_rescheduling_options) ?? !1,
|
|
317
|
+
participantBookingCalendars: ((j = t == null ? void 0 : t.participants) == null ? void 0 : j.reduce((_, v) => {
|
|
318
|
+
var x, P;
|
|
319
|
+
return (x = v.booking) != null && x.calendar_id && (_[v.email] = (P = v.booking) == null ? void 0 : P.calendar_id), _;
|
|
327
320
|
})) ?? {},
|
|
328
|
-
participantCalendars: ((J = t == null ? void 0 : t.participants) == null ? void 0 : J.reduce((
|
|
329
|
-
var
|
|
330
|
-
return
|
|
321
|
+
participantCalendars: ((J = t == null ? void 0 : t.participants) == null ? void 0 : J.reduce((_, v) => {
|
|
322
|
+
var x;
|
|
323
|
+
return _[v.email] = (x = v.availability) == null ? void 0 : x.calendar_ids, _;
|
|
331
324
|
}, {})) ?? {},
|
|
332
|
-
reminders: (
|
|
333
|
-
emailTemplate: (
|
|
334
|
-
redirectUrl: (
|
|
325
|
+
reminders: (V = t == null ? void 0 : t.event_booking) == null ? void 0 : V.reminders,
|
|
326
|
+
emailTemplate: (b = t == null ? void 0 : t.scheduler) == null ? void 0 : b.email_template,
|
|
327
|
+
redirectUrl: (C = t == null ? void 0 : t.scheduler) == null ? void 0 : C.confirmation_redirect_url,
|
|
335
328
|
slug: t == null ? void 0 : t.slug,
|
|
336
329
|
appearance: t == null ? void 0 : t.appearance,
|
|
337
330
|
name: t == null ? void 0 : t.name
|
|
@@ -442,19 +435,19 @@ const Pt = class {
|
|
|
442
435
|
}
|
|
443
436
|
render() {
|
|
444
437
|
var t, a;
|
|
445
|
-
return
|
|
438
|
+
return u("[nylas-editor-tabs]", "render", this.formState), e(Lt, { key: "93cdc21573797891ba852a7bfcff35b053982a0b" }, e("form", { key: "899b797e84cbd0064a59d20bca3ffc4a8aed688c", onSubmit: this.formSubmissionHandler, class: "scheduler-editor", ref: (i) => this.formRef = i, noValidate: !0 }, this.mode === "app" ? e("div", { class: "form-contents" }, e("div", { class: "tabs" }, e("button", { name: o.EventInfo, class: { tab: !0, active: this.activeTab == o.EventInfo, hide: this.hideTab(o.EventInfo) }, part: "editortab__event-info", onClick: (i) => this.setActiveTab(i, o.EventInfo) }, e("calendar-info-icon", { width: "16", height: "16" }), "Event info"), e("button", { name: o.Availability, class: { tab: !0, active: this.activeTab == o.Availability, hide: this.hideTab(o.Availability) }, part: "editortab__availability", onClick: (i) => this.setActiveTab(i, o.Availability) }, e("calendar-patterns-icon", { width: "16", height: "16" }), "Availability"), e("button", { name: o.Participants, class: { tab: !0, active: this.activeTab == o.Participants, hide: this.hideTab(o.Participants) }, part: "editortab__participants", onClick: (i) => this.setActiveTab(i, o.Participants) }, e("people-icon", { width: "16", height: "16" }), "Participants"), e("button", { name: o.BookingOptions, class: { tab: !0, active: this.activeTab == o.BookingOptions, hide: this.hideTab(o.BookingOptions) }, part: "editortab__booking-options", onClick: (i) => this.setActiveTab(i, o.BookingOptions) }, e("flow-icon", { width: "16", height: "16" }), "Booking options"), e("button", { name: o.BookingForm, class: { tab: !0, active: this.activeTab == "bookingForm", hide: this.hideTab(o.BookingForm) }, part: "editortab__booking-form", onClick: (i) => this.setActiveTab(i, o.BookingForm) }, this.activeTab == o.BookingForm ? e("calendar-agenda-fill-icon", { width: "16", height: "16" }) : e("calendar-agenda-icon", { width: "16", height: "16" }), "Booking form"), e("button", { name: o.Communications, class: { tab: !0, active: this.activeTab == "communications", hide: this.hideTab(o.Communications) }, onClick: (i) => this.setActiveTab(i, o.Communications) }, this.activeTab == o.Communications ? e("envelope-fill-icon", { width: "16", height: "16" }) : e("envelope-icon", { width: "16", height: "16" }), "Communications"), e("button", { name: o.PageStyles, class: { tab: !0, active: this.activeTab == "pageStyles", hide: this.hideTab(o.PageStyles) }, onClick: (i) => this.setActiveTab(i, o.PageStyles) }, this.activeTab == o.PageStyles ? e("paintbrush-fill-icon", { width: "16", height: "16" }) : e("paintbrush-icon", { width: "16", height: "16" }), "Page styles")), e("div", { class: "tab-content" }, e(Ut, { formState: this.formState, activeTab: this.activeTab, currentUser: this.currentUser, calendars: this.calendars, id: ((t = this.selectedConfiguration) == null ? void 0 : t.id) ?? "new" }))) : e("div", { class: "composable", key: (a = this.selectedConfiguration) == null ? void 0 : a.id }, e("slot", null)), e("div", { key: "70e7fc71286d9674cd2fd5327ef2c33222a17c65", class: "footer", part: "editor__footer" }, e("div", { key: "ee62868db743fadd7d5323cffd00498a3c12fb68", class: "preview", part: "editor__footer-preview" }, this.schedulerPreviewLink !== "" && this.action === "edit" && e("button-component", { type: "button", disabled: this.isLoading, clickHandler: (i) => {
|
|
446
439
|
i.preventDefault(), this.previewButtonClicked.emit(this.host).defaultPrevented || window.open(q(this.schedulerPreviewLink, this.selectedConfiguration), "_blank");
|
|
447
|
-
}, variant: "basic" }, "Preview")), e("div", { key: "
|
|
440
|
+
}, variant: "basic" }, "Preview")), e("div", { key: "6d2945eddb509a13948de8419171da2078df9bd5", class: "buttons", part: "editor__footer-buttons" }, e("p", { key: "3605d668cf634bfdf8ed2a7aa2525c3acd4c0099", class: {
|
|
448
441
|
"unsaved-changes": this.hasUnsavedChanges && !this.changesSaved,
|
|
449
442
|
"saved-changes": this.changesSaved,
|
|
450
443
|
error: this.error !== "",
|
|
451
444
|
"error-full-width": this.error !== "" && this.action === "create"
|
|
452
|
-
} }, this.error !== "" ? this.error : "", this.error == "" && this.hasUnsavedChanges && !this.changesSaved ? "Unsaved changes" : this.error == "" && this.changesSaved ? "Changes saved!" : ""), e("button-component", { key: "
|
|
445
|
+
} }, this.error !== "" ? this.error : "", this.error == "" && this.hasUnsavedChanges && !this.changesSaved ? "Unsaved changes" : this.error == "" && this.changesSaved ? "Changes saved!" : ""), e("button-component", { key: "226a96b3b7d1f6a41c4b66c025c500d7e930db78", type: "button", disabled: this.isLoading, clickHandler: (i) => {
|
|
453
446
|
i.preventDefault(), this.cancelButtonClick.emit(), this.error = "";
|
|
454
|
-
}, variant: "basic", part: "editor__footer-cancel" }, "Back"), e("button-component", { key: "
|
|
447
|
+
}, variant: "basic", part: "editor__footer-cancel" }, "Back"), e("button-component", { key: "a1a556eb5c15a8d958af4498cd86321d2a20b30a", type: "submit", disabled: this.isLoading, part: "editor__footer-cta" }, this.isLoading ? e("span", null, "Saving", e("loading-icon", null), " ") : this.action === "create" ? "Create" : "Save changes")))));
|
|
455
448
|
}
|
|
456
449
|
get host() {
|
|
457
|
-
return
|
|
450
|
+
return Tt(this);
|
|
458
451
|
}
|
|
459
452
|
static get watchers() {
|
|
460
453
|
return {
|
|
@@ -463,8 +456,8 @@ const Pt = class {
|
|
|
463
456
|
};
|
|
464
457
|
}
|
|
465
458
|
};
|
|
466
|
-
|
|
467
|
-
|
|
459
|
+
Jt([
|
|
460
|
+
Ft({
|
|
468
461
|
name: "nylas-editor-tabs",
|
|
469
462
|
stateToProps: /* @__PURE__ */ new Map([
|
|
470
463
|
["schedulerConfig.calendars", "calendars"],
|
|
@@ -474,29 +467,29 @@ jt([
|
|
|
474
467
|
]),
|
|
475
468
|
eventToProps: {
|
|
476
469
|
schedulerConfigChanged: async (t, a) => {
|
|
477
|
-
const { resetLoadingState: i, setError: s, action:
|
|
478
|
-
const [
|
|
479
|
-
!
|
|
470
|
+
const { resetLoadingState: i, setError: s, action: l, config: n } = t.detail, c = (d) => {
|
|
471
|
+
const [h, f] = d;
|
|
472
|
+
!h && f && s && s(f), i && i(t);
|
|
480
473
|
};
|
|
481
|
-
if (
|
|
482
|
-
const
|
|
483
|
-
c(
|
|
474
|
+
if (l === "edit") {
|
|
475
|
+
const d = await a.schedulerConfig.updateConfiguration(n);
|
|
476
|
+
c(d);
|
|
484
477
|
} else {
|
|
485
|
-
const
|
|
486
|
-
c(
|
|
478
|
+
const d = await a.schedulerConfig.createConfiguration(n);
|
|
479
|
+
c(d);
|
|
487
480
|
}
|
|
488
481
|
},
|
|
489
482
|
cancelButtonClick: async (t, a) => {
|
|
490
483
|
a.schedulerConfigStore.state.action = null;
|
|
491
484
|
},
|
|
492
485
|
previewButtonClicked: async (t, a) => {
|
|
493
|
-
|
|
486
|
+
u("[nylas-editor-tabs]", "previewButtonClicked", a);
|
|
494
487
|
},
|
|
495
488
|
formSubmitted: async (t, a) => {
|
|
496
|
-
|
|
489
|
+
u("[nylas-editor-tabs]", "formSubmitted", a);
|
|
497
490
|
},
|
|
498
491
|
schedulerEditorFormUpdated: async (t, a) => {
|
|
499
|
-
|
|
492
|
+
u("[nylas-editor-tabs]", "schedulerEditorFormUpdated", t);
|
|
500
493
|
}
|
|
501
494
|
},
|
|
502
495
|
localPropsToProp: /* @__PURE__ */ new Map([["schedulerPreviewLink", "schedulerPreviewLink"]]),
|
|
@@ -506,23 +499,23 @@ jt([
|
|
|
506
499
|
G("design:paramtypes", []),
|
|
507
500
|
G("design:returntype", void 0)
|
|
508
501
|
], Pt.prototype, "render", null);
|
|
509
|
-
Pt.style =
|
|
510
|
-
const
|
|
511
|
-
var
|
|
512
|
-
var
|
|
502
|
+
Pt.style = jt;
|
|
503
|
+
const Vt = ':host{display:grid;grid-auto-flow:row;width:100%;font-family:inherit;font-optical-sizing:auto;--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;gap:1rem}@media screen and (max-width: 768px){.header{flex-direction:column;gap:0.5rem;align-items:unset}}.header h2{margin:0;font-size:1.25rem;color:var(--nylas-base-900);font-weight:600}.header p{margin:0;font-size:1rem;color:var(--nylas-base-700)}.header .actions{justify-self:end}@media screen and (max-width: 768px){.header .actions{width:100%}}.configurations{border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);background:var(--nylas-base-0);height:100%;display:flex;flex-direction:column;position:relative;overflow-y:hidden}.configurations .table-container{overflow-y:auto;flex:1}.configurations .table-container table{width:100%;border-spacing:0;border-collapse:collapse;font-family:inherit;height:max-content}.configurations .table-container table.no-configurations{height:100%}.configurations .table-container table tr{color:var(--nylas-base-800);border-bottom:1px solid var(--nylas-base-200);font-family:inherit}.configurations .table-container table tr.hide{display:none}.configurations .table-container table th{font-weight:600;text-transform:uppercase;font-size:14px;line-height:20px}.configurations .table-container 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-container table tr.no-configurations td>div h3{margin:0 0 1rem 0;color:var(--nylas-base-700)}.configurations .table-container table tr.no-configurations td>div p{margin:0 0 1rem 0;color:var(--nylas-base-600)}.configurations .table-container table tr.no-configurations td>div calendar-icon{margin-bottom:1rem;color:var(--nylas-base-200)}.configurations .table-container table th,.configurations .table-container table td{text-align:left;padding:1rem;font-family:inherit}.configurations .table-container table .actions{text-align:right}.configurations .table-container table .actions{display:flex;justify-content:flex-end;gap:1rem}@media screen and (max-width: 768px){.configurations .table-container table .actions{flex-direction:column;gap:0.5rem}}.configurations .table-container table .title{width:100%;max-width:300px}@media screen and (max-width: 768px){.configurations .table-container table .title{max-width:96px}}.configurations .table-container table .title div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.configurations .table-container table .title div.config-event-title{font-weight:600}.configurations .table-container table .title div.config-event-description{font-size:0.75rem}.configurations .pagination{padding:1rem;position:sticky;top:100%;display:flex;justify-content:flex-end;gap:0.5rem;background:white;width:calc(100% - 2rem);z-index:2}.configurations .pagination td.arrows{display:flex;justify-content:flex-end;gap:0.5rem}.configurations .pagination button{display:flex;flex-direction:row;justify-content:center;align-items:center;height:3vh;width:3vh;min-width:3em;min-height:3em;cursor:pointer;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-300);background-color:transparent;color:var(--nylas-base-800);cursor:pointer}.configurations .pagination button:hover:not(:disabled){border:1px solid var(--nylas-primary)}.configurations .pagination button:active{border:1px solid var(--nylas-base-800)}.configurations .pagination button:disabled{border:1px solid var(--nylas-base-100);background-color:transparent;color:var(--nylas-base-300);cursor:not-allowed}.configurations .pagination button.right{transform:rotate(180deg)}.error-container{margin-top:1.5rem}.error-container .error{color:var(--nylas-error);padding:0.5rem 0;margin:1rem 0 0}button-component#copy button{width:108px}select-dropdown{width:auto}select-dropdown::part(sd_dropdown-button){display:block;height:48px;padding:0px 16px 8px}@media screen and (max-width: 768px){select-dropdown::part(sd_dropdown-button){width:92px}}select-dropdown::part(sd_dropdown-content){width:120px;right:0}select-dropdown::part(sd_dropdown-labelhtml){display:flex;gap:0.5rem;align-items:center;color:var(--nylas-base-900)}select-dropdown::part(sd_dropdown-labelhtml):hover{color:var(--nylas-primary)}', Zt = Vt;
|
|
504
|
+
var Gt = function(t, a, i, s) {
|
|
505
|
+
var l = arguments.length, n = l < 3 ? a : s === null ? s = Object.getOwnPropertyDescriptor(a, i) : s, c;
|
|
513
506
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
514
507
|
n = Reflect.decorate(t, a, i, s);
|
|
515
508
|
else
|
|
516
|
-
for (var
|
|
517
|
-
(c = t[
|
|
518
|
-
return
|
|
509
|
+
for (var d = t.length - 1; d >= 0; d--)
|
|
510
|
+
(c = t[d]) && (n = (l < 3 ? c(n) : l > 3 ? c(a, i, n) : c(a, i)) || n);
|
|
511
|
+
return l > 3 && n && Object.defineProperty(a, i, n), n;
|
|
519
512
|
}, W = function(t, a) {
|
|
520
513
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
521
514
|
return Reflect.metadata(t, a);
|
|
522
515
|
};
|
|
523
516
|
const Et = class {
|
|
524
517
|
constructor(t) {
|
|
525
|
-
Z(this, t), this.initListConfigurations =
|
|
518
|
+
Z(this, t), this.initListConfigurations = S(this, "initListConfigurations", 7), this.createButtonClick = S(this, "createButtonClick", 7), this.editButtonClick = S(this, "editButtonClick", 7), this.deleteButtonClick = S(this, "deleteButtonClick", 7), this.configurations = [], this.schedulerPreviewLink = "", this.listConfigurationsNextCursor = void 0, this.state = "loading", this.error = "", this.currentCursor = null, this.previousCursors = [], this.disableNextPageButton = !1;
|
|
526
519
|
}
|
|
527
520
|
listConfigurationsNextCursorChangedHandler(t, a) {
|
|
528
521
|
if (!t || t === a) {
|
|
@@ -532,21 +525,21 @@ const Et = class {
|
|
|
532
525
|
this.disableNextPageButton = !1, this.currentCursor = t;
|
|
533
526
|
}
|
|
534
527
|
connectedCallback() {
|
|
535
|
-
|
|
528
|
+
u("[nylas-list-configurations]", "connectedCallback");
|
|
536
529
|
}
|
|
537
530
|
componentWillLoad() {
|
|
538
|
-
|
|
531
|
+
u("[nylas-list-configurations]", "componentWillLoad"), this.configurations && this.configurations.length > 0 && (this.state = "loaded");
|
|
539
532
|
}
|
|
540
533
|
componentDidLoad() {
|
|
541
|
-
|
|
534
|
+
u("[nylas-list-configurations]", "componentDidLoad"), this.initListConfigurations.emit({
|
|
542
535
|
host: this.host
|
|
543
536
|
});
|
|
544
537
|
}
|
|
545
538
|
disconnectedCallback() {
|
|
546
|
-
|
|
539
|
+
u("[nylas-list-configurations]", "disconnectedCallback");
|
|
547
540
|
}
|
|
548
541
|
async handleNylasFormDropdownChanged(t) {
|
|
549
|
-
|
|
542
|
+
u("[nylas-list-configurations]", "handleNylasFormDropdownChanged", t.detail);
|
|
550
543
|
const { value: a } = t.detail, [i, s] = a.split("-");
|
|
551
544
|
switch (t.preventDefault(), i) {
|
|
552
545
|
case "delete":
|
|
@@ -609,7 +602,7 @@ const Et = class {
|
|
|
609
602
|
}));
|
|
610
603
|
}
|
|
611
604
|
render() {
|
|
612
|
-
return e(
|
|
605
|
+
return e(Lt, null, e("div", { class: "header" }, e("div", { class: "description" }, e("h2", null, "All Scheduling Pages"), e("p", null, "Create and manage your Scheduling Pages.")), this.configurations && this.configurations.length > 0 && e("div", { class: "actions" }, e("button-component", { part: "nlc__create-new-cta", clickHandler: () => {
|
|
613
606
|
this.createButtonClick.emit(this.host);
|
|
614
607
|
} }, "Create new"))), e("div", { class: "configurations" }, e("div", { class: "table-container" }, e("table", { class: {
|
|
615
608
|
"no-configurations": this.state !== "loading" && (!this.configurations || this.configurations.length === 0)
|
|
@@ -626,7 +619,7 @@ const Et = class {
|
|
|
626
619
|
], defaultSelectedOption: { value: "", label: "" }, dropdownButtonText: "...", withSearch: !1, withChevron: !1, exportparts: "sd_dropdown: actions__dropdown, sd_dropdown-button: actions__dropdown-button, sd_dropdown-content: actions__dropdown-content" }))))))), e("div", { class: "pagination" }, e("button", { class: "arrow left", onClick: () => this.previousPageClickedHandler(), disabled: this.previousCursors.length <= 0 }, e("chevron-icon", null)), e("button", { class: "arrow right", onClick: () => this.nextPageClickedHandler(), disabled: this.disableNextPageButton }, e("chevron-icon", null)))), this.state === "error" && e("div", { class: "error-container" }, e("p", { class: "error" }, this.error)));
|
|
627
620
|
}
|
|
628
621
|
get host() {
|
|
629
|
-
return
|
|
622
|
+
return Tt(this);
|
|
630
623
|
}
|
|
631
624
|
static get watchers() {
|
|
632
625
|
return {
|
|
@@ -634,8 +627,8 @@ const Et = class {
|
|
|
634
627
|
};
|
|
635
628
|
}
|
|
636
629
|
};
|
|
637
|
-
|
|
638
|
-
|
|
630
|
+
Gt([
|
|
631
|
+
Ft({
|
|
639
632
|
name: "nylas-list-configurations",
|
|
640
633
|
stateToProps: /* @__PURE__ */ new Map([
|
|
641
634
|
["schedulerConfig.configurations", "configurations"],
|
|
@@ -646,8 +639,8 @@ Vt([
|
|
|
646
639
|
initListConfigurations: async (t, a) => {
|
|
647
640
|
const { host: i, cursor: s } = t.detail;
|
|
648
641
|
await i.setState("loading");
|
|
649
|
-
const [
|
|
650
|
-
if (!
|
|
642
|
+
const [l, n] = await a.schedulerConfig.getConfigurations(s);
|
|
643
|
+
if (!l && n && n.message) {
|
|
651
644
|
await i.setState("error"), await i.setError(n.message);
|
|
652
645
|
return;
|
|
653
646
|
}
|
|
@@ -657,8 +650,8 @@ Vt([
|
|
|
657
650
|
a.schedulerConfigStore.resetSelectedConfiguration(), a.schedulerConfigStore.state.action = "create";
|
|
658
651
|
},
|
|
659
652
|
deleteButtonClick: async (t, a) => {
|
|
660
|
-
const { host: i, configuration: s } = t.detail, [
|
|
661
|
-
!
|
|
653
|
+
const { host: i, configuration: s } = t.detail, [l, n] = await a.schedulerConfig.deleteConfiguration(s.id);
|
|
654
|
+
!l && n && n.message && (await i.setState("error"), await i.setError(n.message));
|
|
662
655
|
},
|
|
663
656
|
editButtonClick: async (t, a) => {
|
|
664
657
|
const { configuration: i } = t.detail;
|
|
@@ -671,10 +664,10 @@ Vt([
|
|
|
671
664
|
W("design:paramtypes", []),
|
|
672
665
|
W("design:returntype", void 0)
|
|
673
666
|
], Et.prototype, "render", null);
|
|
674
|
-
Et.style =
|
|
667
|
+
Et.style = Zt;
|
|
675
668
|
export {
|
|
676
|
-
|
|
677
|
-
|
|
669
|
+
zt as google_logo_icon,
|
|
670
|
+
Mt as microsoft_logo_icon,
|
|
678
671
|
Pt as nylas_editor_tabs,
|
|
679
672
|
Et as nylas_list_configurations
|
|
680
673
|
};
|