@nylas/react 1.3.4 → 1.3.6
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.entry-25aecb13.js +15 -0
- package/dist/{add-circle-icon.entry-dcc45961.cjs → add-circle-icon.entry-5c49ba96.cjs} +1 -1
- package/dist/{archive-icon.entry-c4da9f4f.cjs → archive-icon.entry-0a9e8ec3.cjs} +1 -1
- package/dist/{archive-icon.entry-715e139b.js → archive-icon.entry-89e31121.js} +2 -2
- package/dist/{arrow-icon.entry-bdccce8a.cjs → arrow-icon.entry-19e5237c.cjs} +1 -1
- package/dist/{arrow-icon.entry-9311463c.js → arrow-icon.entry-9cfd86a1.js} +2 -2
- package/dist/bold-icon.entry-d591e701.cjs +1 -0
- package/dist/{bold-icon.entry-c531dff1.js → bold-icon.entry-eab3420d.js} +6 -6
- package/dist/{button-component_2.entry-5aad0ec4.js → button-component_2.entry-7cd5f9c0.js} +6 -6
- package/dist/{button-component_2.entry-db911efe.cjs → button-component_2.entry-ce4314bf.cjs} +1 -1
- package/dist/{calendar-agenda-fill-icon_53.entry-6f1aa42c.js → calendar-agenda-fill-icon_54.entry-7099138a.js} +841 -727
- package/dist/calendar-agenda-fill-icon_54.entry-9228dbe7.cjs +8 -0
- package/dist/{calendar-cancel-icon.entry-59375bc4.js → calendar-cancel-icon.entry-299d6fba.js} +4 -4
- package/dist/{calendar-cancel-icon.entry-3bd1c8e9.cjs → calendar-cancel-icon.entry-6e3d20f1.cjs} +1 -1
- package/dist/{calendar-check-icon_2.entry-540dde9d.cjs → calendar-check-icon_2.entry-087dd913.cjs} +1 -1
- package/dist/{calendar-check-icon_2.entry-1ca369b6.js → calendar-check-icon_2.entry-08ef8d2f.js} +5 -5
- package/dist/{calendar-icon.entry-66517be4.js → calendar-icon.entry-53b54115.js} +5 -5
- package/dist/{calendar-icon.entry-1d9773d5.cjs → calendar-icon.entry-73f9d05b.cjs} +1 -1
- package/dist/checkbox-component_3.entry-bc9768dd.cjs +1 -0
- package/dist/checkbox-component_3.entry-d828eb1d.js +149 -0
- package/dist/{chevron-icon_3.entry-afc62aa5.js → chevron-icon_3.entry-783588a9.js} +8 -8
- package/dist/chevron-icon_3.entry-e956d78c.cjs +1 -0
- package/dist/{clock-icon_4.entry-ab2c2eaf.js → clock-icon_4.entry-0e809dcb.js} +18 -18
- package/dist/{clock-icon_4.entry-f46a42fc.cjs → clock-icon_4.entry-60d41dfd.cjs} +1 -1
- package/dist/close-icon.entry-1b5d25c5.cjs +1 -0
- package/dist/close-icon.entry-fef4f624.js +15 -0
- package/dist/constants-6da0ede7-151395ad.cjs +1 -0
- package/dist/{constants-91d76d21-1638ead6.js → constants-6da0ede7-49c32ba7.js} +29 -16
- package/dist/{copy-icon.entry-c009a659.js → copy-icon.entry-25699ab8.js} +7 -7
- package/dist/{copy-icon.entry-16835c5d.cjs → copy-icon.entry-ab6530e0.cjs} +1 -1
- package/dist/{delete-icon.entry-e8815e15.js → delete-icon.entry-802084f6.js} +5 -5
- package/dist/{delete-icon.entry-3c295200.cjs → delete-icon.entry-e99e1f82.cjs} +1 -1
- package/dist/document-refresh-icon.entry-065a59f5.cjs +1 -0
- package/dist/document-refresh-icon.entry-d1604f53.js +15 -0
- package/dist/elements/index.d.ts +1 -0
- package/dist/{feedbackSync-b5d35a5b-20032e5d.js → feedbackSync-c040f483-2b6476c4.js} +1 -1
- package/dist/{feedbackSync-b5d35a5b-1343e33b.cjs → feedbackSync-c040f483-d6dd0560.cjs} +1 -1
- package/dist/{folder-icon.entry-1837e7eb.cjs → folder-icon.entry-351e61fc.cjs} +1 -1
- package/dist/{folder-icon.entry-1a70f499.js → folder-icon.entry-6c0c09ed.js} +4 -4
- package/dist/forward-icon.entry-0ccfb600.js +15 -0
- package/dist/forward-icon.entry-6b7af9cd.cjs +1 -0
- package/dist/{globe-icon.entry-5ea64e36.cjs → globe-icon.entry-2b75b66b.cjs} +1 -1
- package/dist/{globe-icon.entry-2886c103.js → globe-icon.entry-5ddcd2cb.js} +4 -4
- package/dist/{google-logo-icon_4.entry-c0413818.js → google-logo-icon_4.entry-04174684.js} +354 -342
- package/dist/google-logo-icon_4.entry-a685ff91.cjs +1 -0
- package/dist/inbox-icon.entry-0ad18b3f.js +15 -0
- package/dist/inbox-icon.entry-425d1ded.cjs +1 -0
- package/dist/{index-cd93b584.js → index-7e7c24f1.js} +3944 -3309
- package/dist/index-81719cc6.cjs +81 -0
- package/dist/{index.es-ef72cd61-0860521c.cjs → index.es-2b014ec7-0589e68a.cjs} +1 -1
- package/dist/{index.es-ef72cd61-3075f564.js → index.es-2b014ec7-72557487.js} +1 -1
- package/dist/{info-icon_2.entry-cfa2954a.cjs → info-icon_2.entry-7ec02802.cjs} +1 -1
- package/dist/{info-icon_2.entry-891619f7.js → info-icon_2.entry-a6d0e842.js} +6 -6
- package/dist/{input-color-picker.entry-58c5f4d3.js → input-color-picker.entry-d98d06ca.js} +3 -3
- package/dist/{input-color-picker.entry-5c3e8407.cjs → input-color-picker.entry-ed9a1c07.cjs} +1 -1
- package/dist/input-component.entry-2e57b00e.cjs +1 -0
- package/dist/{input-component.entry-a45cff7f.js → input-component.entry-f3aa3419.js} +7 -7
- package/dist/{input-dropdown_2.entry-0518caac.js → input-dropdown_2.entry-0d9c8475.js} +15 -15
- package/dist/input-dropdown_2.entry-6fc7df16.cjs +1 -0
- package/dist/italic-icon.entry-7a8712f2.cjs +1 -0
- package/dist/italic-icon.entry-d610e66f.js +15 -0
- package/dist/{multi-select-dropdown.entry-0b7e26c0.js → multi-select-dropdown.entry-b31d9f11.js} +4 -4
- package/dist/multi-select-dropdown.entry-eaa268b4.cjs +1 -0
- package/dist/{nylas-booked-event-card_12.entry-8eed168c.js → nylas-booked-event-card_12.entry-45514813.js} +395 -349
- package/dist/nylas-booked-event-card_12.entry-498de30a.cjs +1 -0
- package/dist/{nylas-form-card.entry-8842785d.js → nylas-form-card.entry-67aec298.js} +3 -3
- package/dist/{nylas-form-card.entry-2c336c14.cjs → nylas-form-card.entry-fdb3c114.cjs} +1 -1
- package/dist/{nylas-if-state.entry-e6c90919.cjs → nylas-if-state.entry-76b38c9c.cjs} +1 -1
- package/dist/{nylas-if-state.entry-fdc20d01.js → nylas-if-state.entry-ee7d92b0.js} +3 -3
- package/dist/{nylas-login.entry-16f39c90.js → nylas-login.entry-265f9d0f.js} +3 -3
- package/dist/{nylas-login.entry-dcdc4d06.cjs → nylas-login.entry-589e45d0.cjs} +1 -1
- package/dist/{nylas-provider.entry-d51de210.js → nylas-provider.entry-5605a3e0.js} +5 -5
- package/dist/{nylas-provider.entry-0cc093e4.cjs → nylas-provider.entry-cfb9627c.cjs} +1 -1
- package/dist/{nylas-scheduler-editor.entry-af211f07.cjs → nylas-scheduler-editor.entry-6fdfb9b5.cjs} +2 -2
- package/dist/{nylas-scheduler-editor.entry-d0214565.js → nylas-scheduler-editor.entry-b3e085b3.js} +38 -32
- package/dist/nylas-scheduling.entry-8cc5c353.cjs +1 -0
- package/dist/{nylas-scheduling.entry-3d3a4eb4.js → nylas-scheduling.entry-bc00beba.js} +88 -79
- package/dist/nylas-time-window-picker.entry-a77c1d67.cjs +1 -0
- package/dist/nylas-time-window-picker.entry-c421303e.js +316 -0
- package/dist/{person-icon.entry-954d4c10.cjs → person-icon.entry-36b21e95.cjs} +1 -1
- package/dist/{person-icon.entry-dcdc2118.js → person-icon.entry-85660f98.js} +2 -2
- package/dist/{play-icon.entry-e727a1d6.js → play-icon.entry-953b1bc8.js} +4 -4
- package/dist/{play-icon.entry-7e17d583.cjs → play-icon.entry-c35ade8a.cjs} +1 -1
- package/dist/react.cjs +1 -1
- package/dist/react.js +71 -70
- package/dist/{refresh-icon.entry-f735be78.cjs → refresh-icon.entry-038501ca.cjs} +1 -1
- package/dist/{refresh-icon.entry-d5e50180.js → refresh-icon.entry-d8644f5d.js} +4 -4
- package/dist/{register-component-a169494c-62768a00.js → register-component-e9c10e19-099fb50f.js} +1 -1
- package/dist/{register-component-a169494c-3d95c4fd.cjs → register-component-e9c10e19-80bbc4dd.cjs} +1 -1
- package/dist/{reply-all-icon.entry-c847636d.cjs → reply-all-icon.entry-ead9d0ba.cjs} +1 -1
- package/dist/{reply-all-icon.entry-848cd16f.js → reply-all-icon.entry-f209daeb.js} +5 -5
- package/dist/reply-icon.entry-b7f35ecd.cjs +1 -0
- package/dist/reply-icon.entry-d37a129b.js +15 -0
- package/dist/{scheduler-config-store-ed4a8dfd-0e3f540f.cjs → scheduler-config-store-ed4a8dfd-0d4408cf.cjs} +1 -1
- package/dist/{scheduler-config-store-ed4a8dfd-622802c7.js → scheduler-config-store-ed4a8dfd-35ec90c6.js} +1 -1
- package/dist/{scheduler-store-8e74959b-ffa0b3c6.js → scheduler-store-dc3a7958-7c73f5e2.js} +2 -2
- package/dist/{scheduler-store-8e74959b-c8514d9a.cjs → scheduler-store-dc3a7958-99c6bdf6.cjs} +1 -1
- package/dist/sent-icon.entry-b662ef5b.cjs +1 -0
- package/dist/sent-icon.entry-ec433cec.js +15 -0
- package/dist/spam-icon.entry-3a553ae4.js +15 -0
- package/dist/spam-icon.entry-a79819fd.cjs +1 -0
- package/dist/{star-icon.entry-f275321a.cjs → star-icon.entry-47ea44e7.cjs} +1 -1
- package/dist/{star-icon.entry-d7cd7608.js → star-icon.entry-9b22bb32.js} +4 -4
- package/dist/stop-icon.entry-1f7918b2.js +15 -0
- package/dist/{stop-icon.entry-89c2bae7.cjs → stop-icon.entry-26e2e633.cjs} +1 -1
- package/dist/{textarea-component.entry-02360e34.js → textarea-component.entry-6939d0fc.js} +5 -4
- package/dist/textarea-component.entry-da0a861e.cjs +1 -0
- package/dist/toggle-switch.entry-5ae5ba46.js +33 -0
- package/dist/toggle-switch.entry-c5fd3e33.cjs +1 -0
- package/dist/{translate-icon.entry-a7915e82.cjs → translate-icon.entry-72e0369e.cjs} +1 -1
- package/dist/{translate-icon.entry-b0b36e4c.js → translate-icon.entry-8cffa646.js} +2 -2
- package/dist/trash-fill-icon.entry-815859c6.js +15 -0
- package/dist/trash-fill-icon.entry-8620c28f.cjs +1 -0
- package/dist/{underline-icon.entry-1636f401.js → underline-icon.entry-afd9c78b.js} +2 -2
- package/dist/{underline-icon.entry-8bf17177.cjs → underline-icon.entry-ba1a9e87.cjs} +1 -1
- package/dist/{warning-icon.entry-cef2e7c1.js → warning-icon.entry-53441175.js} +7 -7
- package/dist/{warning-icon.entry-27c0cdd6.cjs → warning-icon.entry-7cbede6b.cjs} +1 -1
- package/package.json +3 -3
- package/dist/add-circle-icon.entry-321c1dd1.js +0 -15
- package/dist/bold-icon.entry-06fa4738.cjs +0 -1
- package/dist/calendar-agenda-fill-icon_53.entry-affead77.cjs +0 -6
- package/dist/checkbox-component_3.entry-3918885e.cjs +0 -1
- package/dist/checkbox-component_3.entry-cf9507ac.js +0 -153
- package/dist/chevron-icon_3.entry-27b71bd6.cjs +0 -1
- package/dist/close-icon.entry-791cb99c.js +0 -15
- package/dist/close-icon.entry-be2b5f87.cjs +0 -1
- package/dist/constants-91d76d21-0f7c85cc.cjs +0 -1
- package/dist/document-refresh-icon.entry-1628d0dd.js +0 -15
- package/dist/document-refresh-icon.entry-7d84ace4.cjs +0 -1
- package/dist/forward-icon.entry-7a9952fe.cjs +0 -1
- package/dist/forward-icon.entry-92fa4f95.js +0 -15
- package/dist/google-logo-icon_4.entry-ff5ebfd9.cjs +0 -1
- package/dist/inbox-icon.entry-893a70b6.js +0 -15
- package/dist/inbox-icon.entry-ad864253.cjs +0 -1
- package/dist/index-94416062.cjs +0 -81
- package/dist/input-component.entry-f6f257b9.cjs +0 -1
- package/dist/input-dropdown_2.entry-85077fff.cjs +0 -1
- package/dist/italic-icon.entry-7f971c72.cjs +0 -1
- package/dist/italic-icon.entry-a9a0be67.js +0 -15
- package/dist/multi-select-dropdown.entry-2c5b3f8d.cjs +0 -1
- package/dist/nylas-booked-event-card_12.entry-d416f896.cjs +0 -1
- package/dist/nylas-scheduling.entry-ce1ef505.cjs +0 -1
- package/dist/nylas-time-window-picker_2.entry-24672606.js +0 -336
- package/dist/nylas-time-window-picker_2.entry-52a54abb.cjs +0 -1
- package/dist/reply-icon.entry-028435a1.cjs +0 -1
- package/dist/reply-icon.entry-9e3e5122.js +0 -15
- package/dist/sent-icon.entry-eef67c1a.cjs +0 -1
- package/dist/sent-icon.entry-f8fda6ff.js +0 -15
- package/dist/spam-icon.entry-22437325.cjs +0 -1
- package/dist/spam-icon.entry-ec4f3144.js +0 -15
- package/dist/stop-icon.entry-55779283.js +0 -15
- package/dist/textarea-component.entry-5e8cb080.cjs +0 -1
- package/dist/trash-fill-icon.entry-1fd28f47.js +0 -15
- package/dist/trash-fill-icon.entry-e933f219.cjs +0 -1
|
@@ -1,137 +1,136 @@
|
|
|
1
|
-
import { r as
|
|
2
|
-
import { R as
|
|
3
|
-
import { D as
|
|
4
|
-
import { i as
|
|
1
|
+
import { r as K, h as t, c as k, d as u, n as Le, i as d, o as te, H as Be, g as Pe, F as Te } from "./index-7e7c24f1.js";
|
|
2
|
+
import { R as Ee } from "./register-component-e9c10e19-099fb50f.js";
|
|
3
|
+
import { D as Fe } from "./constants-6da0ede7-49c32ba7.js";
|
|
4
|
+
import { i as Ae, a as je, c as $e, b as Je, f as Ve } from "./feedbackSync-c040f483-2b6476c4.js";
|
|
5
5
|
import "react";
|
|
6
6
|
import "react-dom";
|
|
7
|
-
const
|
|
8
|
-
constructor(
|
|
9
|
-
|
|
7
|
+
const Ze = ".sc-google-logo-icon-h{display:flex}", Ge = Ze, We = class {
|
|
8
|
+
constructor(e) {
|
|
9
|
+
K(this, e), this.width = "24", this.height = "24";
|
|
10
10
|
}
|
|
11
11
|
render() {
|
|
12
|
-
return
|
|
12
|
+
return t("svg", { key: "de9cae8990d7d127aa9fdd595dec79e80c79a84d", width: this.width, height: this.height, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, t("g", { key: "58338fde3c58a0b0c4d0df6ebb92f387eeba3a29", "clip-path": "url(#clip0_959_12452)" }, t("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" }), t("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" }), t("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" }), t("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" })), t("defs", { key: "1c29b130c1afb95fec41a1bbb20988423982ee0c" }, t("clipPath", { key: "9aefb74a952ab05e9493b2b5a0b6b838311f066e", id: "clip0_959_12452" }, t("rect", { key: "c3c6ed00b1ef66992016c15520abdd4691ca21bf", width: 24, height: 24, fill: "white" }))));
|
|
13
13
|
}
|
|
14
14
|
};
|
|
15
|
-
|
|
16
|
-
const
|
|
17
|
-
constructor(
|
|
18
|
-
|
|
15
|
+
We.style = Ge;
|
|
16
|
+
const qe = ".sc-microsoft-logo-icon-h{display:flex}", Ke = qe, Qe = class {
|
|
17
|
+
constructor(e) {
|
|
18
|
+
K(this, e), this.width = "22", this.height = "22";
|
|
19
19
|
}
|
|
20
20
|
render() {
|
|
21
|
-
return
|
|
21
|
+
return t("svg", { key: "20d8f297cf0cc69b7c398b6d0c24ca60a5c67109", width: this.width, height: this.height, viewBox: "0 0 22 22", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "dc420eb9c73909acfc6731606b24d015a600f34e", d: "M0.043457 0.043457H10.4782V10.4782H0.043457V0.043457Z", fill: "#F35325" }), t("path", { key: "d22732be730bc90dcd3b415b9e5bba8de185ad87", d: "M11.5217 0.043457H21.9565V10.4782H11.5217V0.043457Z", fill: "#81BC06" }), t("path", { key: "8c8bff7ba92cad76967ccf67c7b3435d07193091", d: "M0.043457 11.5217H10.4782V21.9565H0.043457V11.5217Z", fill: "#05A6F0" }), t("path", { key: "51d0a3be2495c599aee6062c51fb4bd531fd4b5c", d: "M11.5217 11.5217H21.9565V21.9565H11.5217V11.5217Z", fill: "#FFBA08" }));
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
|
-
|
|
24
|
+
Qe.style = Ke;
|
|
25
25
|
var r;
|
|
26
|
-
(function(
|
|
27
|
-
|
|
26
|
+
(function(e) {
|
|
27
|
+
e.EventInfo = "eventInfo", e.Availability = "availability", e.BookingOptions = "bookingOptions", e.Communications = "communications", e.Participants = "participants", e.BookingForm = "bookingForm", e.PageStyles = "pageStyles";
|
|
28
28
|
})(r || (r = {}));
|
|
29
|
-
function
|
|
30
|
-
return
|
|
31
|
-
|
|
29
|
+
function Xe({ id: e, formState: a, activeTab: n }, s) {
|
|
30
|
+
return console.log("formState?.disableEmails", a == null ? void 0 : a.disableEmails), t(
|
|
31
|
+
Te,
|
|
32
32
|
null,
|
|
33
|
-
|
|
33
|
+
t(
|
|
34
34
|
"div",
|
|
35
|
-
{ key: `event-info-${
|
|
36
|
-
|
|
35
|
+
{ key: `event-info-${e}`, class: { hide: n !== r.EventInfo } },
|
|
36
|
+
t(
|
|
37
37
|
"nylas-event-info",
|
|
38
38
|
null,
|
|
39
|
-
|
|
39
|
+
t(
|
|
40
40
|
"div",
|
|
41
41
|
{ slot: "inputs" },
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
t("nylas-event-title", { name: "title", exportparts: "net, net__title, net__dropdown-content" }),
|
|
43
|
+
t("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" }),
|
|
44
|
+
t("nylas-event-location", { name: "location", exportparts: "nel, nel__location, nel__dropdown, nel__dropdown-button, nel__dropdown-content" }),
|
|
45
|
+
t("nylas-event-description", { name: "description", exportparts: "nedesc, nedesc__textarea" })
|
|
46
46
|
)
|
|
47
47
|
)
|
|
48
48
|
),
|
|
49
|
-
|
|
49
|
+
t(
|
|
50
50
|
"div",
|
|
51
|
-
{ key: `availability-${
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
{ key: `availability-${e}`, class: { hide: n !== r.Availability } },
|
|
52
|
+
t("nylas-participant-booking-calendars", { participants: a.participants, name: "participant-booking-calendars", exportparts: "npbc, npbc__header, npbc__content, npbc__participant-container, npbc__participant-title" }),
|
|
53
|
+
t("nylas-connected-calendars", { participants: a.participants, name: "connected-calendars", exportparts: "nccals, nccals__header, nccals__content, nccals__container, nccals__title, nccals__toggle-container, npbc__participant-toggle-container" }),
|
|
54
|
+
t("nylas-availability-picker", { name: "availability", exportparts: "nap, 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" })
|
|
55
55
|
),
|
|
56
|
-
|
|
56
|
+
t(
|
|
57
57
|
"div",
|
|
58
|
-
{ key: `booking-options-${
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
{ key: `booking-options-${e}`, class: { hide: n !== r.BookingOptions } },
|
|
59
|
+
t("nylas-scheduling-method", { name: "availability-method", readOnly: !0, exportparts: "nsm, nsm__header, nsm__input-label, nsm__dropdown, nsm__dropdown-button, nsm__dropdown-content" }),
|
|
60
|
+
t(
|
|
61
61
|
"nylas-custom-booking-flow",
|
|
62
62
|
{ exportparts: "ncbflow, ncbflow__header, ncbflow__title, ncbflow__content" },
|
|
63
|
-
|
|
63
|
+
t(
|
|
64
64
|
"div",
|
|
65
65
|
{ slot: "inputs" },
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
t("nylas-booking-confirmation-type", { name: "confirmation-type", exportparts: "nbct, nbct__header, nbct__dropdown, nbct__dropdown-button, nbct__dropdown-content" }),
|
|
67
|
+
t("nylas-booking-confirmation-redirect", { name: "confirmation-redirect", exportparts: "nbcr, nbcr__header, nbcr__dropdown, nbcr__dropdown-button, nbcr__dropdown-content, nbcr__input-textfield" })
|
|
68
68
|
)
|
|
69
69
|
),
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
t("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" }),
|
|
71
|
+
t(
|
|
72
72
|
"nylas-event-limits",
|
|
73
73
|
null,
|
|
74
|
-
|
|
74
|
+
t(
|
|
75
75
|
"div",
|
|
76
76
|
{ slot: "inputs" },
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
77
|
+
t("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" }),
|
|
78
|
+
t("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" }),
|
|
79
|
+
t("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" }),
|
|
80
|
+
t("nylas-cancellation-policy", { name: "cancellation-policy", exportparts: "ncpolicy, ncpolicy__textarea" })
|
|
81
81
|
)
|
|
82
82
|
),
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
t("nylas-timeslot-interval", { name: "timeslot-interval", exportparts: "nti, nti__header, nti__input-label, nti__dropdown, nti__dropdown-button, nti__dropdown-content" }),
|
|
84
|
+
t("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" })
|
|
85
85
|
),
|
|
86
|
-
|
|
86
|
+
t(
|
|
87
87
|
"div",
|
|
88
|
-
{ key: `communications-${
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
e("nylas-reminder-emails", { name: "reminder-emails", exportparts: "nre, nre__tab-heading, nre__header, nre__body, nre__confirmation-email-toggle--container, nre__summary, nrt, nrt__number-dropdown, nrt__number-dropdown-button, nrt__number-dropdown-content, nrt__period-dropdown, nrt__period-dropdown-button, nrt__period-dropdown-content, nrt__time-period-selector" })
|
|
88
|
+
{ key: `communications-${e}`, class: { hide: n !== r.Communications } },
|
|
89
|
+
t("nylas-disable-emails", { name: "disable-emails", exportparts: "nde, nde__toggle-label, nde_toggle-input, nde_toggle-slider" }),
|
|
90
|
+
!(a != null && a.disableEmails) && t(
|
|
91
|
+
Te,
|
|
92
|
+
null,
|
|
93
|
+
t("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" }),
|
|
94
|
+
t("nylas-reminder-emails", { name: "reminder-emails", exportparts: "nre, nre__tab-heading, nre__header, nre__body, nre__confirmation-email-toggle--container, nre__summary, nrt, nrt__number-dropdown, nrt__number-dropdown-button, nrt__number-dropdown-content, nrt__period-dropdown, nrt__period-dropdown-button, nrt__period-dropdown-content, nrt__time-period-selector" })
|
|
95
|
+
)
|
|
97
96
|
),
|
|
98
|
-
|
|
97
|
+
t(
|
|
99
98
|
"div",
|
|
100
|
-
{ key: `participants-${
|
|
101
|
-
|
|
102
|
-
|
|
99
|
+
{ key: `participants-${e}`, class: { hide: n !== r.Participants } },
|
|
100
|
+
t("nylas-additional-participants", { name: "participants", exportparts: "nap, nap__title, nap__subtitle, nap__content, nap__input_group, nap__input_wrapper, nap__input, nap__remove-participant" }),
|
|
101
|
+
t("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" })
|
|
103
102
|
),
|
|
104
|
-
|
|
103
|
+
t(
|
|
105
104
|
"div",
|
|
106
|
-
{ key: `page-styles-${
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
105
|
+
{ key: `page-styles-${e}`, class: { hide: n !== r.PageStyles } },
|
|
106
|
+
t("nylas-custom-event-slug", { name: "custom-event-slug", exportparts: "nces, nces__body, nces__header, nces__drawer-toggle--container, nces__input-textfield" }),
|
|
107
|
+
t("nylas-page-name", { name: "page-name", exportparts: "npn, npn__body, npn__header, npn__drawer-toggle--container, npn__input-textfield" }),
|
|
108
|
+
t("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)
|
|
110
109
|
),
|
|
111
|
-
|
|
110
|
+
t(
|
|
112
111
|
"div",
|
|
113
|
-
{ key: `booking-form-${
|
|
114
|
-
|
|
112
|
+
{ key: `booking-form-${e}`, class: { hide: n !== r.BookingForm } },
|
|
113
|
+
t("nylas-booking-form-config", { name: "additional-fields", exportparts: "nbfc, nbfc__header, nbfc__add_field, nbfc__add_field-button, nbfc__add_field-content, nbfc__additional_fields, nbfc__form-field, nbfc__form-field-header, nbfc__form-field-content" })
|
|
115
114
|
)
|
|
116
115
|
);
|
|
117
116
|
}
|
|
118
|
-
const
|
|
119
|
-
var
|
|
120
|
-
var o = arguments.length,
|
|
117
|
+
const Ye = '.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;text-align:left;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:16px;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:16px;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}button-component#report-issue.sc-nylas-editor-tabs{width:auto}nylas-feedback-form.sc-nylas-editor-tabs{position:absolute;top:0;height:100%;width:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;background:rgba(0, 0, 0, 0.6);z-index:2;border-radius:inherit}', et = Ye;
|
|
118
|
+
var tt = function(e, a, n, s) {
|
|
119
|
+
var o = arguments.length, i = o < 3 ? a : s === null ? s = Object.getOwnPropertyDescriptor(a, n) : s, b;
|
|
121
120
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
122
|
-
|
|
121
|
+
i = Reflect.decorate(e, a, n, s);
|
|
123
122
|
else
|
|
124
|
-
for (var l =
|
|
125
|
-
(b =
|
|
126
|
-
return o > 3 &&
|
|
127
|
-
},
|
|
123
|
+
for (var l = e.length - 1; l >= 0; l--)
|
|
124
|
+
(b = e[l]) && (i = (o < 3 ? b(i) : o > 3 ? b(a, n, i) : b(a, n)) || i);
|
|
125
|
+
return o > 3 && i && Object.defineProperty(a, n, i), i;
|
|
126
|
+
}, Y = function(e, a) {
|
|
128
127
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
129
|
-
return Reflect.metadata(
|
|
128
|
+
return Reflect.metadata(e, a);
|
|
130
129
|
};
|
|
131
|
-
const
|
|
132
|
-
constructor(
|
|
133
|
-
|
|
134
|
-
var
|
|
130
|
+
const He = class {
|
|
131
|
+
constructor(e) {
|
|
132
|
+
K(this, e), this.schedulerConfigChanged = k(this, "schedulerConfigChanged", 7), this.schedulerConfigCreated = k(this, "schedulerConfigCreated", 7), this.cancelButtonClick = k(this, "cancelButtonClick", 7), this.formSubmitted = k(this, "formSubmitted", 7), this.previewButtonClicked = k(this, "previewButtonClicked", 7), this.schedulerEditorFormUpdated = k(this, "schedulerEditorFormUpdated", 7), this.formSubmissionHandler = async (a) => {
|
|
133
|
+
var ae, ne, ie, se, oe, re, le, de, ce, be, he, ue, pe, me, fe, ye, ge;
|
|
135
134
|
a.preventDefault();
|
|
136
135
|
const n = await this.formSubmitted.emit();
|
|
137
136
|
if (u("[nylas-editor-tabs]", "formSubmissionHandler", n), !this.formRef.checkValidity() || n.defaultPrevented) {
|
|
@@ -141,10 +140,10 @@ const Pt = class {
|
|
|
141
140
|
this.isLoading = !0, this.hasUnsavedChanges = !1;
|
|
142
141
|
const o = this.updateFormState();
|
|
143
142
|
u("[nylas-editor-tabs]", "formState", o);
|
|
144
|
-
const { title:
|
|
143
|
+
const { title: i, description: b, duration: l, availability: h, bookingCalendar: y, location: L, bookingType: T, buffer: D, availableDaysInFuture: I, minCancellationNotice: N, minBookingNotice: M, cancellationPolicy: z, timeslotInterval: C, additionalGuestsHidden: U, hideCancellationOptions: R, hideReschedulingOptions: A, participants: w, participantOpenHours: m, additionalFields: j, participantCalendars: g, conferencing: $, participantBookingCalendars: f, reminders: J, emailTemplate: V, redirectUrl: Z, availabilityMethod: P, slug: G, appearance: W, name: q, disableEmails: E } = o, p = ((ne = (ae = this.selectedConfiguration) == null ? void 0 : ae.participants) == null ? void 0 : ne.find((c) => c.is_organizer)) || (w == null ? void 0 : w.find((c) => c.is_organizer)), S = g && (p != null && p.email) ? g[p == null ? void 0 : p.email] : [], _ = ((ie = p == null ? void 0 : p.booking) == null ? void 0 : ie.calendar_id) || y, v = l ? parseInt(l) : 30, x = w && (w == null ? void 0 : w.length) > 0 ? w : [
|
|
145
144
|
{
|
|
146
|
-
name: (p == null ? void 0 : p.name) ?? ((
|
|
147
|
-
email: (p == null ? void 0 : p.email) ?? ((
|
|
145
|
+
name: (p == null ? void 0 : p.name) ?? ((se = this.currentUser) == null ? void 0 : se.name) ?? "",
|
|
146
|
+
email: (p == null ? void 0 : p.email) ?? ((oe = this.currentUser) == null ? void 0 : oe.email) ?? "",
|
|
148
147
|
is_organizer: !0,
|
|
149
148
|
timezone: (h == null ? void 0 : h.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
150
149
|
availability: {
|
|
@@ -155,133 +154,134 @@ const Pt = class {
|
|
|
155
154
|
calendar_id: y && y !== "" ? y : "primary"
|
|
156
155
|
}
|
|
157
156
|
}
|
|
158
|
-
],
|
|
159
|
-
...((
|
|
160
|
-
version: ((
|
|
161
|
-
slug:
|
|
162
|
-
name:
|
|
157
|
+
], H = {
|
|
158
|
+
...((re = this.selectedConfiguration) == null ? void 0 : re.id) && { id: this.selectedConfiguration.id },
|
|
159
|
+
version: ((le = this.selectedConfiguration) == null ? void 0 : le.version) ?? "1.0.0",
|
|
160
|
+
slug: G,
|
|
161
|
+
name: q,
|
|
163
162
|
availability: {
|
|
164
163
|
duration_minutes: v,
|
|
165
164
|
interval_minutes: (C == null ? void 0 : C.interval) ?? v,
|
|
166
165
|
round_to: C == null ? void 0 : C.roundTo,
|
|
167
166
|
availability_rules: {
|
|
168
|
-
availability_method: P || (((
|
|
169
|
-
buffer:
|
|
170
|
-
default_open_hours: (h == null ? void 0 : h.openHours) ?? ((
|
|
171
|
-
round_robin_group_id: ((
|
|
167
|
+
availability_method: P || (((be = (ce = (de = this.selectedConfiguration) == null ? void 0 : de.availability) == null ? void 0 : ce.availability_rules) == null ? void 0 : be.availability_method) ?? "collective"),
|
|
168
|
+
buffer: D || { before: 0, after: 0 },
|
|
169
|
+
default_open_hours: (h == null ? void 0 : h.openHours) ?? ((pe = (ue = (he = this.selectedConfiguration) == null ? void 0 : he.availability) == null ? void 0 : ue.availability_rules) == null ? void 0 : pe.default_open_hours) ?? Fe,
|
|
170
|
+
round_robin_group_id: ((ye = (fe = (me = this.selectedConfiguration) == null ? void 0 : me.availability) == null ? void 0 : fe.availability_rules) == null ? void 0 : ye.round_robin_group_id) ?? ""
|
|
172
171
|
}
|
|
173
172
|
},
|
|
174
173
|
participants: [
|
|
175
174
|
...x ? x.map((c) => {
|
|
176
|
-
var
|
|
175
|
+
var _e, ve, we, ke, Ce, xe;
|
|
177
176
|
let B = (h == null ? void 0 : h.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
178
|
-
if ((
|
|
179
|
-
const
|
|
177
|
+
if ((_e = m == null ? void 0 : m[c.email]) != null && _e.length && (B = (we = (ve = m == null ? void 0 : m[c.email]) == null ? void 0 : ve[0]) == null ? void 0 : we.timezone), c.is_organizer) {
|
|
178
|
+
const Se = f != null && f[c.email] ? f == null ? void 0 : f[c.email] : _ || "primary", X = g != null && g[c.email] ? g == null ? void 0 : g[c.email] : S != null && S.length ? S : ["primary"], Re = X.length === 1 && X[0] === "primary";
|
|
180
179
|
return {
|
|
181
180
|
name: c.name ?? "",
|
|
182
181
|
email: c.email,
|
|
183
182
|
is_organizer: !0,
|
|
184
183
|
timezone: B,
|
|
185
184
|
availability: {
|
|
186
|
-
calendar_ids:
|
|
187
|
-
open_hours: (m == null ? void 0 : m[c.email]) ?? ((
|
|
185
|
+
calendar_ids: Re ? [Se] : X,
|
|
186
|
+
open_hours: (m == null ? void 0 : m[c.email]) ?? ((ke = c.availability) == null ? void 0 : ke.open_hours) ?? []
|
|
188
187
|
},
|
|
189
188
|
booking: {
|
|
190
|
-
calendar_id:
|
|
189
|
+
calendar_id: Se
|
|
191
190
|
}
|
|
192
191
|
};
|
|
193
192
|
}
|
|
194
|
-
const
|
|
193
|
+
const O = f != null && f[c.email] ? { calendar_id: f == null ? void 0 : f[c.email] } : (c == null ? void 0 : c.booking) ?? void 0, Q = (g == null ? void 0 : g[c.email]) ?? ((Ce = c.availability) == null ? void 0 : Ce.calendar_ids) ?? ["primary"], Ue = Q.length === 1 && Q[0] === "primary";
|
|
195
194
|
return {
|
|
196
195
|
...c,
|
|
197
196
|
timezone: B,
|
|
198
197
|
availability: c.availability ? {
|
|
199
|
-
calendar_ids:
|
|
200
|
-
open_hours: (m == null ? void 0 : m[c.email]) ?? ((
|
|
198
|
+
calendar_ids: Ue && typeof O < "u" ? [O == null ? void 0 : O.calendar_id] : Q,
|
|
199
|
+
open_hours: (m == null ? void 0 : m[c.email]) ?? ((xe = c.availability) == null ? void 0 : xe.open_hours) ?? []
|
|
201
200
|
} : void 0,
|
|
202
|
-
booking:
|
|
201
|
+
booking: O
|
|
203
202
|
};
|
|
204
203
|
}) : []
|
|
205
204
|
],
|
|
206
205
|
event_booking: {
|
|
207
|
-
title: (
|
|
206
|
+
title: (i == null ? void 0 : i.toString()) ?? "",
|
|
208
207
|
description: (b == null ? void 0 : b.toString()) ?? "",
|
|
209
208
|
location: (L == null ? void 0 : L.toString()) ?? "",
|
|
210
209
|
booking_type: (T == null ? void 0 : T.toString()) ?? "booking",
|
|
211
210
|
timezone: (h == null ? void 0 : h.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
212
|
-
conferencing:
|
|
213
|
-
reminders:
|
|
211
|
+
conferencing: $,
|
|
212
|
+
reminders: J,
|
|
213
|
+
disable_emails: typeof E == "boolean" ? E : !1
|
|
214
214
|
},
|
|
215
215
|
scheduler: {
|
|
216
|
-
cancellation_policy:
|
|
217
|
-
available_days_in_future:
|
|
218
|
-
min_cancellation_notice:
|
|
216
|
+
cancellation_policy: z ?? "",
|
|
217
|
+
available_days_in_future: I ?? 30,
|
|
218
|
+
min_cancellation_notice: N ?? 0,
|
|
219
219
|
min_booking_notice: M ?? 60,
|
|
220
|
-
hide_additional_guests:
|
|
221
|
-
hide_cancellation_options:
|
|
222
|
-
hide_rescheduling_options:
|
|
223
|
-
additional_fields:
|
|
224
|
-
email_template:
|
|
225
|
-
confirmation_redirect_url:
|
|
220
|
+
hide_additional_guests: U ?? !1,
|
|
221
|
+
hide_cancellation_options: R ?? !1,
|
|
222
|
+
hide_rescheduling_options: A ?? !1,
|
|
223
|
+
additional_fields: j,
|
|
224
|
+
email_template: V,
|
|
225
|
+
confirmation_redirect_url: Z
|
|
226
226
|
},
|
|
227
|
-
appearance:
|
|
228
|
-
},
|
|
227
|
+
appearance: W
|
|
228
|
+
}, De = Le(this.selectedConfiguration, H || {}), F = this.action === "create" ? De : H;
|
|
229
229
|
this.isConfigRoundRobin(F) && (F.participants = F.participants.map((c) => ({ ...c, is_organizer: void 0 })));
|
|
230
|
-
const
|
|
230
|
+
const Ie = (c) => {
|
|
231
231
|
this.isLoading = !1, this.changesSaved = !0, setTimeout(() => {
|
|
232
232
|
this.changesSaved = !1;
|
|
233
233
|
}, 5e3);
|
|
234
|
-
},
|
|
234
|
+
}, Ne = this.checkForBookingFormErrors(F), Me = ((ge = this.configurations) == null ? void 0 : ge.find((c) => {
|
|
235
235
|
var B;
|
|
236
236
|
return c.id === ((B = this.selectedConfiguration) == null ? void 0 : B.id);
|
|
237
|
-
})) || {},
|
|
238
|
-
|
|
237
|
+
})) || {}, ze = this.checkForOrganizerConfirmationError(Le(F, Me));
|
|
238
|
+
Ne || ze || this.schedulerConfigChanged.emit({ config: F, resetLoadingState: Ie, action: this.action, host: this.host });
|
|
239
239
|
}, this.isConfigRoundRobin = (a) => {
|
|
240
|
-
var n,
|
|
241
|
-
return ((
|
|
240
|
+
var n, s, o, i;
|
|
241
|
+
return ((s = (n = a == null ? void 0 : a.availability) == null ? void 0 : n.availability_rules) == null ? void 0 : s.availability_method) === "max-availability" || ((i = (o = a.availability) == null ? void 0 : o.availability_rules) == null ? void 0 : i.availability_method) === "max-fairness";
|
|
242
242
|
}, this.checkForOrganizerConfirmationError = (a) => {
|
|
243
243
|
var b, l;
|
|
244
|
-
let n = !1,
|
|
245
|
-
const o = ((b = a.event_booking) == null ? void 0 : b.booking_type) === "organizer-confirmation",
|
|
246
|
-
return o && !
|
|
244
|
+
let n = !1, s = "";
|
|
245
|
+
const o = ((b = a.event_booking) == null ? void 0 : b.booking_type) === "organizer-confirmation", i = (l = a.scheduler) == null ? void 0 : l.organizer_confirmation_url;
|
|
246
|
+
return o && !i && (s += "Organizer confirmation URL is required when using organizer confirmation booking type.", n = !0), n && (this.isLoading = !1, this.host.setError(new Error(s))), n;
|
|
247
247
|
}, this.checkForBookingFormErrors = (a) => {
|
|
248
|
-
var
|
|
249
|
-
let n = !1,
|
|
250
|
-
const o = (
|
|
251
|
-
return o && (
|
|
248
|
+
var i;
|
|
249
|
+
let n = !1, s = "";
|
|
250
|
+
const o = (i = a.scheduler) == null ? void 0 : i.additional_fields;
|
|
251
|
+
return o && (s = "Booking form error: ", Object.entries(o).forEach((b) => {
|
|
252
252
|
const l = b[1];
|
|
253
253
|
if (l.label === "") {
|
|
254
|
-
|
|
254
|
+
s += `Label is required for field of type ${l.type}.`, n = !0;
|
|
255
255
|
return;
|
|
256
256
|
}
|
|
257
257
|
if (l.options) {
|
|
258
258
|
for (const h of l.options)
|
|
259
259
|
if (h.trim() === "") {
|
|
260
|
-
|
|
260
|
+
s += `Empty option detected inside ${l.label} of type ${l.type}.`, n = !0;
|
|
261
261
|
break;
|
|
262
262
|
}
|
|
263
263
|
}
|
|
264
|
-
})), n && (this.isLoading = !1, this.host.setError(new Error(
|
|
264
|
+
})), n && (this.isLoading = !1, this.host.setError(new Error(s))), n;
|
|
265
265
|
}, this.calendars = void 0, this.selectedConfiguration = void 0, this.configurations = void 0, this.currentUser = void 0, this.schedulerPreviewLink = "", this.mode = "app", this.hideEditorTabs = [], this.enableUserFeedback = !0, this.selectedLanguage = void 0, this.action = "create", this.showFeedbackModal = !1, this.activeTab = r.EventInfo, this.isLoading = !1, this.hasUnsavedChanges = !1, this.changesSaved = !1, this.formState = {}, this.error = "";
|
|
266
266
|
}
|
|
267
|
-
configChangedHandler(
|
|
268
|
-
u("[nylas-editor-tabs]", "configChangedHandler",
|
|
269
|
-
...this.getFormStateFromConfig(
|
|
270
|
-
},
|
|
267
|
+
configChangedHandler(e) {
|
|
268
|
+
u("[nylas-editor-tabs]", "configChangedHandler", e, this.selectedConfiguration), this.formState = {
|
|
269
|
+
...this.getFormStateFromConfig(e)
|
|
270
|
+
}, e != null && e.id ? this.action = "edit" : this.action = "create";
|
|
271
271
|
}
|
|
272
|
-
userChangedHandler(
|
|
273
|
-
u("[nylas-editor-tabs]", "userChangedHandler",
|
|
272
|
+
userChangedHandler(e) {
|
|
273
|
+
u("[nylas-editor-tabs]", "userChangedHandler", e), e && (this.formState = {
|
|
274
274
|
...this.getFormStateFromConfig(this.selectedConfiguration)
|
|
275
275
|
});
|
|
276
276
|
}
|
|
277
|
-
selectedLanguageChangedHandler(
|
|
278
|
-
|
|
277
|
+
selectedLanguageChangedHandler(e, a) {
|
|
278
|
+
e !== a && d.changeLanguage(e);
|
|
279
279
|
}
|
|
280
|
-
async schedulerConfigCreatedEventHandler(
|
|
281
|
-
return this.schedulerConfigCreated.emit(
|
|
280
|
+
async schedulerConfigCreatedEventHandler(e) {
|
|
281
|
+
return this.schedulerConfigCreated.emit(e);
|
|
282
282
|
}
|
|
283
|
-
async setError(
|
|
284
|
-
this.error =
|
|
283
|
+
async setError(e) {
|
|
284
|
+
this.error = e.message;
|
|
285
285
|
}
|
|
286
286
|
connectedCallback() {
|
|
287
287
|
u("[nylas-editor-tabs]", "connectedCallback");
|
|
@@ -291,12 +291,12 @@ const Pt = class {
|
|
|
291
291
|
}
|
|
292
292
|
componentDidLoad() {
|
|
293
293
|
var a, n;
|
|
294
|
-
u("[nylas-editor-tabs]", "componentDidLoad"), this.enableUserFeedback && !
|
|
294
|
+
u("[nylas-editor-tabs]", "componentDidLoad"), this.enableUserFeedback && !Ae() && je({
|
|
295
295
|
dsn: "https://9d5731f1c77ca84c9ed3fb9b3ccf7ee1@o74852.ingest.us.sentry.io/4507889638178816",
|
|
296
|
-
release: "1.3.
|
|
297
|
-
integrations: (
|
|
298
|
-
...
|
|
299
|
-
|
|
296
|
+
release: "1.3.6",
|
|
297
|
+
integrations: (s) => [
|
|
298
|
+
...s.filter((o) => !1),
|
|
299
|
+
Ve({
|
|
300
300
|
colorScheme: "system",
|
|
301
301
|
autoInject: !1
|
|
302
302
|
})
|
|
@@ -304,182 +304,194 @@ const Pt = class {
|
|
|
304
304
|
autoSessionTracking: !1,
|
|
305
305
|
beforeSend: () => null
|
|
306
306
|
}), (a = this.selectedConfiguration) != null && a.id && this.configChangedHandler(this.selectedConfiguration);
|
|
307
|
-
const
|
|
308
|
-
|
|
307
|
+
const e = (n = this.host.querySelector("button.tab:not(.hide)")) == null ? void 0 : n.name;
|
|
308
|
+
e && (this.activeTab = e);
|
|
309
309
|
}
|
|
310
310
|
disconnectedCallback() {
|
|
311
311
|
u("[nylas-editor-tabs]", "disconnectedCallback");
|
|
312
312
|
}
|
|
313
|
-
handleValueChanged(
|
|
314
|
-
u("[nylas-editor-tabs]", "handleValueChanged",
|
|
315
|
-
const { name: a, value: n } =
|
|
313
|
+
handleValueChanged(e) {
|
|
314
|
+
u("[nylas-editor-tabs]", "handleValueChanged", e);
|
|
315
|
+
const { name: a, value: n } = e.detail;
|
|
316
316
|
this.setFormState(n, a), this.formState = { ...this.formState }, this.hasUnsavedChanges = !0, this.error = "", this.schedulerEditorFormUpdated.emit({
|
|
317
|
-
value:
|
|
318
|
-
name:
|
|
317
|
+
value: e.detail.value,
|
|
318
|
+
name: e.detail.name
|
|
319
319
|
});
|
|
320
320
|
}
|
|
321
321
|
feedbackModalClosedHandler() {
|
|
322
322
|
this.showFeedbackModal = !1;
|
|
323
323
|
}
|
|
324
|
-
feedbackSubmittedHandler(
|
|
325
|
-
var i,
|
|
324
|
+
feedbackSubmittedHandler(e) {
|
|
325
|
+
var s, o, i, b, l, h;
|
|
326
326
|
const n = {
|
|
327
|
-
eventId:
|
|
328
|
-
|
|
327
|
+
eventId: $e("Scheduler Editor User Feedback", {
|
|
328
|
+
extra: {
|
|
329
|
+
configId: (s = this.selectedConfiguration) == null ? void 0 : s.id,
|
|
330
|
+
slug: (o = this.selectedConfiguration) == null ? void 0 : o.slug
|
|
331
|
+
}
|
|
332
|
+
}),
|
|
333
|
+
message: e.detail.feedback
|
|
329
334
|
};
|
|
330
|
-
|
|
335
|
+
Je(n, {
|
|
331
336
|
includeReplay: !0,
|
|
332
337
|
captureContext: {
|
|
333
338
|
tags: {
|
|
334
339
|
"nylas-web-element": "nylas-scheduler-editor",
|
|
335
|
-
"nylas-web-element-version": "1.3.
|
|
340
|
+
"nylas-web-element-version": "1.3.6",
|
|
341
|
+
"nylas-config-id": (i = this.selectedConfiguration) == null ? void 0 : i.id,
|
|
342
|
+
"nylas-slug": (b = this.selectedConfiguration) == null ? void 0 : b.slug,
|
|
343
|
+
"host-url": window.location.href
|
|
336
344
|
},
|
|
337
345
|
extra: {
|
|
338
|
-
configId: (
|
|
339
|
-
slug: (
|
|
346
|
+
configId: (l = this.selectedConfiguration) == null ? void 0 : l.id,
|
|
347
|
+
slug: (h = this.selectedConfiguration) == null ? void 0 : h.slug
|
|
340
348
|
}
|
|
341
349
|
}
|
|
342
350
|
}), this.showFeedbackModal = !1;
|
|
343
351
|
}
|
|
344
|
-
getFormStateFromConfig(
|
|
345
|
-
var n,
|
|
346
|
-
let a = (n =
|
|
347
|
-
return !a && ((o = (
|
|
352
|
+
getFormStateFromConfig(e) {
|
|
353
|
+
var n, s, o, i, b, l, h, y, L, T, D, I, N, M, z, C, U, R, A, w, m, j, g, $, f, J, V, Z, P, G, W, q, E, p, S;
|
|
354
|
+
let a = (n = e == null ? void 0 : e.participants) == null ? void 0 : n.find((_) => _.is_organizer);
|
|
355
|
+
return !a && ((o = (s = e == null ? void 0 : e.availability) == null ? void 0 : s.availability_rules) == null ? void 0 : o.availability_method) !== "collective" && (a = (i = e == null ? void 0 : e.participants) == null ? void 0 : i.find((_) => {
|
|
348
356
|
var v;
|
|
349
357
|
return _.email === ((v = this.currentUser) == null ? void 0 : v.email);
|
|
350
|
-
}), a && (a.is_organizer = !0)),
|
|
351
|
-
title: ((b =
|
|
352
|
-
description: ((l =
|
|
353
|
-
duration: ((y = (h =
|
|
358
|
+
}), a && (a.is_organizer = !0)), e != null && e.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."), {
|
|
359
|
+
title: ((b = e == null ? void 0 : e.event_booking) == null ? void 0 : b.title) ?? "",
|
|
360
|
+
description: ((l = e == null ? void 0 : e.event_booking) == null ? void 0 : l.description) ?? "",
|
|
361
|
+
duration: ((y = (h = e == null ? void 0 : e.availability) == null ? void 0 : h.duration_minutes) == null ? void 0 : y.toString()) ?? "30",
|
|
354
362
|
availability: {
|
|
355
|
-
timezone: ((L =
|
|
356
|
-
openHours: ((
|
|
363
|
+
timezone: ((L = e == null ? void 0 : e.event_booking) == null ? void 0 : L.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
364
|
+
openHours: ((D = (T = e == null ? void 0 : e.availability) == null ? void 0 : T.availability_rules) == null ? void 0 : D.default_open_hours) ?? Fe
|
|
357
365
|
},
|
|
358
|
-
additionalFields: ((
|
|
359
|
-
conferencing: ((
|
|
366
|
+
additionalFields: ((I = e == null ? void 0 : e.scheduler) == null ? void 0 : I.additional_fields) ?? {},
|
|
367
|
+
conferencing: ((N = e == null ? void 0 : e.event_booking) == null ? void 0 : N.conferencing) ?? {},
|
|
360
368
|
calendarIds: ((M = a == null ? void 0 : a.availability) == null ? void 0 : M.calendar_ids) ?? [],
|
|
361
|
-
participants: (
|
|
362
|
-
bookingCalendar: ((
|
|
363
|
-
location: ((C =
|
|
364
|
-
bookingType: ((
|
|
365
|
-
buffer: ((
|
|
366
|
-
cancellationPolicy: ((w =
|
|
367
|
-
availableDaysInFuture: ((m =
|
|
368
|
-
minCancellationNotice: ((
|
|
369
|
-
minBookingNotice: ((g =
|
|
369
|
+
participants: (e == null ? void 0 : e.participants) ?? [],
|
|
370
|
+
bookingCalendar: ((z = a == null ? void 0 : a.booking) == null ? void 0 : z.calendar_id) ?? (a == null ? void 0 : a.email) ?? "",
|
|
371
|
+
location: ((C = e == null ? void 0 : e.event_booking) == null ? void 0 : C.location) ?? "",
|
|
372
|
+
bookingType: ((U = e == null ? void 0 : e.event_booking) == null ? void 0 : U.booking_type) ?? "booking",
|
|
373
|
+
buffer: ((A = (R = e == null ? void 0 : e.availability) == null ? void 0 : R.availability_rules) == null ? void 0 : A.buffer) ?? { before: 0, after: 0 },
|
|
374
|
+
cancellationPolicy: ((w = e == null ? void 0 : e.scheduler) == null ? void 0 : w.cancellation_policy) ?? "",
|
|
375
|
+
availableDaysInFuture: ((m = e == null ? void 0 : e.scheduler) == null ? void 0 : m.available_days_in_future) ?? 30,
|
|
376
|
+
minCancellationNotice: ((j = e == null ? void 0 : e.scheduler) == null ? void 0 : j.min_cancellation_notice) ?? 0,
|
|
377
|
+
minBookingNotice: ((g = e == null ? void 0 : e.scheduler) == null ? void 0 : g.min_booking_notice) ?? 60,
|
|
370
378
|
timeslotInterval: {
|
|
371
|
-
interval: ((
|
|
372
|
-
roundTo: (
|
|
379
|
+
interval: (($ = e == null ? void 0 : e.availability) == null ? void 0 : $.interval_minutes) ?? ((f = e == null ? void 0 : e.availability) == null ? void 0 : f.duration_minutes),
|
|
380
|
+
roundTo: (J = e == null ? void 0 : e.availability) == null ? void 0 : J.round_to
|
|
373
381
|
},
|
|
374
|
-
additionalGuestsHidden: ((
|
|
375
|
-
hideCancellationOptions: ((
|
|
376
|
-
hideReschedulingOptions: ((P =
|
|
377
|
-
participantBookingCalendars: ((
|
|
378
|
-
var x,
|
|
379
|
-
return (x = v.booking) != null && x.calendar_id && (_[v.email] = (
|
|
382
|
+
additionalGuestsHidden: ((V = e == null ? void 0 : e.scheduler) == null ? void 0 : V.hide_additional_guests) ?? !1,
|
|
383
|
+
hideCancellationOptions: ((Z = e == null ? void 0 : e.scheduler) == null ? void 0 : Z.hide_cancellation_options) ?? !1,
|
|
384
|
+
hideReschedulingOptions: ((P = e == null ? void 0 : e.scheduler) == null ? void 0 : P.hide_rescheduling_options) ?? !1,
|
|
385
|
+
participantBookingCalendars: ((G = e == null ? void 0 : e.participants) == null ? void 0 : G.reduce((_, v) => {
|
|
386
|
+
var x, H;
|
|
387
|
+
return (x = v.booking) != null && x.calendar_id && (_[v.email] = (H = v.booking) == null ? void 0 : H.calendar_id), _;
|
|
380
388
|
})) ?? {},
|
|
381
|
-
participantCalendars: ((
|
|
389
|
+
participantCalendars: ((W = e == null ? void 0 : e.participants) == null ? void 0 : W.reduce((_, v) => {
|
|
382
390
|
var x;
|
|
383
391
|
return _[v.email] = (x = v.availability) == null ? void 0 : x.calendar_ids, _;
|
|
384
392
|
}, {})) ?? {},
|
|
385
|
-
reminders: (
|
|
386
|
-
emailTemplate: (
|
|
387
|
-
redirectUrl: (
|
|
388
|
-
slug:
|
|
389
|
-
appearance:
|
|
390
|
-
name:
|
|
393
|
+
reminders: (q = e == null ? void 0 : e.event_booking) == null ? void 0 : q.reminders,
|
|
394
|
+
emailTemplate: (E = e == null ? void 0 : e.scheduler) == null ? void 0 : E.email_template,
|
|
395
|
+
redirectUrl: (p = e == null ? void 0 : e.scheduler) == null ? void 0 : p.confirmation_redirect_url,
|
|
396
|
+
slug: e == null ? void 0 : e.slug,
|
|
397
|
+
appearance: e == null ? void 0 : e.appearance,
|
|
398
|
+
name: e == null ? void 0 : e.name,
|
|
399
|
+
disableEmails: (S = e == null ? void 0 : e.event_booking) == null ? void 0 : S.disable_emails
|
|
391
400
|
};
|
|
392
401
|
}
|
|
393
|
-
setFormState(
|
|
402
|
+
setFormState(e, a) {
|
|
394
403
|
switch (a) {
|
|
395
404
|
case "title":
|
|
396
|
-
this.formState.title =
|
|
405
|
+
this.formState.title = e.toString();
|
|
397
406
|
break;
|
|
398
407
|
case "description":
|
|
399
|
-
this.formState.description =
|
|
408
|
+
this.formState.description = e.toString();
|
|
400
409
|
break;
|
|
401
410
|
case "duration":
|
|
402
|
-
this.formState.duration =
|
|
411
|
+
this.formState.duration = e.toString();
|
|
403
412
|
break;
|
|
404
413
|
case "availability":
|
|
405
|
-
this.formState.availability = JSON.parse(
|
|
414
|
+
this.formState.availability = JSON.parse(e.toString());
|
|
406
415
|
break;
|
|
407
416
|
case "participants":
|
|
408
|
-
this.formState.participants = JSON.parse(
|
|
417
|
+
this.formState.participants = JSON.parse(e.toString());
|
|
409
418
|
break;
|
|
410
419
|
case "booking-calendar":
|
|
411
|
-
this.formState.bookingCalendar =
|
|
420
|
+
this.formState.bookingCalendar = e.toString();
|
|
412
421
|
break;
|
|
413
422
|
case "participant-booking-calendars":
|
|
414
|
-
this.formState.participantBookingCalendars = JSON.parse(
|
|
423
|
+
this.formState.participantBookingCalendars = JSON.parse(e.toString());
|
|
415
424
|
break;
|
|
416
425
|
case "location":
|
|
417
|
-
this.formState.location =
|
|
426
|
+
this.formState.location = e.toString();
|
|
418
427
|
break;
|
|
419
428
|
case "conference":
|
|
420
|
-
this.formState.conferencing = JSON.parse(
|
|
429
|
+
this.formState.conferencing = JSON.parse(e.toString());
|
|
421
430
|
break;
|
|
422
431
|
case "confirmation-type":
|
|
423
|
-
this.formState.bookingType =
|
|
432
|
+
this.formState.bookingType = e.toString();
|
|
424
433
|
break;
|
|
425
434
|
case "buffer-time":
|
|
426
|
-
this.formState.buffer = JSON.parse(
|
|
435
|
+
this.formState.buffer = JSON.parse(e.toString());
|
|
427
436
|
break;
|
|
428
437
|
case "limit-future-bookings":
|
|
429
|
-
this.formState.availableDaysInFuture = parseInt(
|
|
438
|
+
this.formState.availableDaysInFuture = parseInt(e.toString());
|
|
430
439
|
break;
|
|
431
440
|
case "min-cancellation-notice":
|
|
432
|
-
this.formState.minCancellationNotice = parseInt(
|
|
441
|
+
this.formState.minCancellationNotice = parseInt(e.toString());
|
|
433
442
|
break;
|
|
434
443
|
case "min-booking-notice":
|
|
435
|
-
this.formState.minBookingNotice = parseInt(
|
|
444
|
+
this.formState.minBookingNotice = parseInt(e.toString());
|
|
436
445
|
break;
|
|
437
446
|
case "cancellation-policy":
|
|
438
|
-
this.formState.cancellationPolicy =
|
|
447
|
+
this.formState.cancellationPolicy = e.toString();
|
|
439
448
|
break;
|
|
440
449
|
case "timeslot-interval":
|
|
441
|
-
this.formState.timeslotInterval = JSON.parse(
|
|
450
|
+
this.formState.timeslotInterval = JSON.parse(e.toString());
|
|
442
451
|
break;
|
|
443
452
|
case "customize-booking-settings": {
|
|
444
|
-
const n = JSON.parse(
|
|
453
|
+
const n = JSON.parse(e.toString());
|
|
445
454
|
this.formState.additionalGuestsHidden = n.additionalGuestsHidden, this.formState.hideCancellationOptions = n.hideCancellationOptions, this.formState.hideReschedulingOptions = n.hideReschedulingOptions;
|
|
446
455
|
break;
|
|
447
456
|
}
|
|
448
457
|
case "participant-custom-availability": {
|
|
449
|
-
const n = JSON.parse(
|
|
458
|
+
const n = JSON.parse(e.toString());
|
|
450
459
|
this.formState.participantOpenHours = n;
|
|
451
460
|
break;
|
|
452
461
|
}
|
|
453
462
|
case "additional-fields":
|
|
454
|
-
this.formState.additionalFields =
|
|
463
|
+
this.formState.additionalFields = e;
|
|
455
464
|
break;
|
|
456
465
|
case "connected-calendars":
|
|
457
|
-
this.formState.participantCalendars = JSON.parse(
|
|
466
|
+
this.formState.participantCalendars = JSON.parse(e.toString());
|
|
458
467
|
break;
|
|
459
468
|
case "confirmation-email-template":
|
|
460
|
-
this.formState.emailTemplate = JSON.parse(
|
|
469
|
+
this.formState.emailTemplate = JSON.parse(e.toString());
|
|
470
|
+
break;
|
|
471
|
+
case "disable-emails":
|
|
472
|
+
this.formState.disableEmails = JSON.parse(e.toString());
|
|
461
473
|
break;
|
|
462
474
|
case "reminder-overrides":
|
|
463
|
-
this.formState.reminders = JSON.parse(
|
|
475
|
+
this.formState.reminders = JSON.parse(e.toString());
|
|
464
476
|
break;
|
|
465
477
|
case "confirmation-redirect":
|
|
466
|
-
this.formState.redirectUrl =
|
|
478
|
+
this.formState.redirectUrl = e.toString();
|
|
467
479
|
break;
|
|
468
480
|
case "availability-method":
|
|
469
|
-
this.formState.availabilityMethod =
|
|
481
|
+
this.formState.availabilityMethod = e.toString();
|
|
470
482
|
break;
|
|
471
483
|
case "custom-event-slug":
|
|
472
|
-
console.debug("custom-event-slug",
|
|
484
|
+
console.debug("custom-event-slug", e), this.formState.slug = JSON.parse(e.toString());
|
|
473
485
|
break;
|
|
474
486
|
case "page-styling":
|
|
475
|
-
this.formState.appearance = JSON.parse(
|
|
487
|
+
this.formState.appearance = JSON.parse(e.toString());
|
|
476
488
|
break;
|
|
477
489
|
case "page-name":
|
|
478
|
-
this.formState.name = JSON.parse(
|
|
490
|
+
this.formState.name = JSON.parse(e.toString());
|
|
479
491
|
break;
|
|
480
492
|
}
|
|
481
493
|
this.schedulerEditorFormUpdated.emit({
|
|
482
|
-
value:
|
|
494
|
+
value: e,
|
|
483
495
|
name: a
|
|
484
496
|
});
|
|
485
497
|
}
|
|
@@ -488,31 +500,31 @@ const Pt = class {
|
|
|
488
500
|
this.setFormState(a, n);
|
|
489
501
|
}), this.formState = { ...this.formState }, this.formState;
|
|
490
502
|
}
|
|
491
|
-
setActiveTab(
|
|
492
|
-
|
|
503
|
+
setActiveTab(e, a) {
|
|
504
|
+
e.preventDefault(), this.updateFormState(), this.activeTab = a;
|
|
493
505
|
}
|
|
494
|
-
hideTab(
|
|
506
|
+
hideTab(e) {
|
|
495
507
|
var a;
|
|
496
|
-
return ((a = this.hideEditorTabs) == null ? void 0 : a.includes(
|
|
508
|
+
return ((a = this.hideEditorTabs) == null ? void 0 : a.includes(e)) || !1;
|
|
497
509
|
}
|
|
498
|
-
onFeedbackClick(
|
|
499
|
-
|
|
510
|
+
onFeedbackClick(e) {
|
|
511
|
+
e.preventDefault(), this.showFeedbackModal = !0;
|
|
500
512
|
}
|
|
501
513
|
render() {
|
|
502
|
-
var
|
|
503
|
-
return u("[nylas-editor-tabs]", "render", this.formState),
|
|
514
|
+
var e, a;
|
|
515
|
+
return u("[nylas-editor-tabs]", "render", this.formState), t(Be, { key: "6b41766e5e726c094aca62e18595796d43b2f298" }, t("form", { key: "24d68e11a81f94792218353822dd77fd7683c9f4", onSubmit: this.formSubmissionHandler, class: "scheduler-editor", ref: (n) => this.formRef = n, noValidate: !0 }, this.mode === "app" ? t("div", { class: "form-contents", part: "editor__form-contents net__form-contents" }, t("div", { class: "tabs", part: "editor__tabs net__tabs" }, t("button", { name: r.EventInfo, class: { tab: !0, active: this.activeTab == r.EventInfo, hide: this.hideTab(r.EventInfo) }, part: "editortab__event-info net__tab-event-info", onClick: (n) => this.setActiveTab(n, r.EventInfo) }, t("calendar-info-icon", { width: "16", height: "16" }), d.t("eventInfoTab")), t("button", { name: r.Availability, class: { tab: !0, active: this.activeTab == r.Availability, hide: this.hideTab(r.Availability) }, part: "editortab__availability net__tab-availability", onClick: (n) => this.setActiveTab(n, r.Availability) }, t("calendar-patterns-icon", { width: "16", height: "16" }), d.t("availabilityTab")), t("button", { name: r.Participants, class: { tab: !0, active: this.activeTab == r.Participants, hide: this.hideTab(r.Participants) }, part: "editortab__participants net__tab-participants", onClick: (n) => this.setActiveTab(n, r.Participants) }, t("people-icon", { width: "16", height: "16" }), d.t("participantsTab")), t("button", { name: r.BookingOptions, class: { tab: !0, active: this.activeTab == r.BookingOptions, hide: this.hideTab(r.BookingOptions) }, part: "editortab__booking-options net__tab-booking-options", onClick: (n) => this.setActiveTab(n, r.BookingOptions) }, t("flow-icon", { width: "16", height: "16" }), d.t("bookingOptionsTab")), t("button", { name: r.BookingForm, class: { tab: !0, active: this.activeTab == "bookingForm", hide: this.hideTab(r.BookingForm) }, part: "editortab__booking-form net__tab-booking-form", onClick: (n) => this.setActiveTab(n, r.BookingForm) }, this.activeTab == r.BookingForm ? t("calendar-agenda-fill-icon", { width: "16", height: "16" }) : t("calendar-agenda-icon", { width: "16", height: "16" }), d.t("bookingFormTab")), t("button", { name: r.Communications, class: { tab: !0, active: this.activeTab == "communications", hide: this.hideTab(r.Communications) }, onClick: (n) => this.setActiveTab(n, r.Communications), part: "editortab__communications net__tab-communications" }, this.activeTab == r.Communications ? t("envelope-fill-icon", { width: "16", height: "16" }) : t("envelope-icon", { width: "16", height: "16" }), d.t("communicationsTab")), t("button", { name: r.PageStyles, class: { tab: !0, active: this.activeTab == "pageStyles", hide: this.hideTab(r.PageStyles) }, onClick: (n) => this.setActiveTab(n, r.PageStyles), part: "editortab__page-styles net__tab-page-styles" }, this.activeTab == r.PageStyles ? t("paintbrush-fill-icon", { width: "16", height: "16" }) : t("paintbrush-icon", { width: "16", height: "16" }), d.t("pageStylesTab"))), t("div", { class: "tab-content", part: "editor__tab-content net__tab-content" }, t(Xe, { formState: this.formState, activeTab: this.activeTab, currentUser: this.currentUser, calendars: this.calendars, id: ((e = this.selectedConfiguration) == null ? void 0 : e.id) ?? "new", i18next: d }))) : t("div", { class: "composable", key: (a = this.selectedConfiguration) == null ? void 0 : a.id }, t("slot", null)), t("div", { key: "ba0dd27bf4d718ad8a62df1f79774f97993a39b5", class: "footer", part: "editor__footer net__footer" }, t("div", { key: "0e2787186678d9fdf18654220bf9b8b2fc430b8f", class: "preview", part: "editor__footer-preview net__footer-preview" }, this.enableUserFeedback && t("button-component", { title: "Share your feedback", id: "report-issue", variant: "basic", onClick: (n) => this.onFeedbackClick(n) }, t("feedback-icon", null))), t("div", { key: "f731ed68b6375274254947df08eacc1c6cc4685a", class: "buttons", part: "editor__footer-buttons net__footer-buttons" }, t("p", { key: "9bcf711385ae6cfc4341c7169f44c7e5e484c6e3", class: {
|
|
504
516
|
"unsaved-changes": this.hasUnsavedChanges && !this.changesSaved,
|
|
505
517
|
"saved-changes": this.changesSaved,
|
|
506
518
|
error: this.error !== "",
|
|
507
519
|
"error-full-width": this.error !== "" && this.action === "create"
|
|
508
|
-
} }, this.error !== "" ? this.error : "", this.error == "" && this.hasUnsavedChanges && !this.changesSaved ? "Unsaved changes" : this.error == "" && this.changesSaved ? "Changes saved!" : ""), this.schedulerPreviewLink !== "" && this.action === "edit" &&
|
|
509
|
-
n.preventDefault(), this.previewButtonClicked.emit(this.host).defaultPrevented || window.open(
|
|
510
|
-
}, variant: "basic" },
|
|
520
|
+
} }, this.error !== "" ? this.error : "", this.error == "" && this.hasUnsavedChanges && !this.changesSaved ? "Unsaved changes" : this.error == "" && this.changesSaved ? "Changes saved!" : ""), this.schedulerPreviewLink !== "" && this.action === "edit" && t("button-component", { title: "Preview", type: "button", disabled: this.isLoading, clickHandler: (n) => {
|
|
521
|
+
n.preventDefault(), this.previewButtonClicked.emit(this.host).defaultPrevented || window.open(te(this.schedulerPreviewLink, this.selectedConfiguration), "_blank");
|
|
522
|
+
}, variant: "basic" }, t("eye-icon", null)), t("button-component", { key: "3e4bf8e88e3b7e9d0e9088520dc1c053b0599bc6", type: "button", disabled: this.isLoading, clickHandler: (n) => {
|
|
511
523
|
n.preventDefault(), this.cancelButtonClick.emit(), this.error = "";
|
|
512
|
-
}, variant: "basic", part: "editor__footer-cancel net__footer-cancel" }, d.t("backButton")),
|
|
524
|
+
}, variant: "basic", part: "editor__footer-cancel net__footer-cancel" }, d.t("backButton")), t("button-component", { key: "052505c068878815930d6ed19dda364a609212b8", type: "submit", disabled: this.isLoading, part: "editor__footer-cta, net__footer-cta" }, this.isLoading ? t("span", null, d.t("savingButtonText"), t("loading-icon", null), " ") : this.action === "create" ? `${d.t("createButtonText")}` : `${d.t("saveChangesButtonText")}`)))), this.showFeedbackModal && t("nylas-feedback-form", null));
|
|
513
525
|
}
|
|
514
526
|
get host() {
|
|
515
|
-
return
|
|
527
|
+
return Pe(this);
|
|
516
528
|
}
|
|
517
529
|
static get watchers() {
|
|
518
530
|
return {
|
|
@@ -522,8 +534,8 @@ const Pt = class {
|
|
|
522
534
|
};
|
|
523
535
|
}
|
|
524
536
|
};
|
|
525
|
-
|
|
526
|
-
|
|
537
|
+
tt([
|
|
538
|
+
Ee({
|
|
527
539
|
name: "nylas-editor-tabs",
|
|
528
540
|
stateToProps: /* @__PURE__ */ new Map([
|
|
529
541
|
["schedulerConfig.calendars", "calendars"],
|
|
@@ -533,33 +545,33 @@ te([
|
|
|
533
545
|
["schedulerConfig.selectedLanguage", "selectedLanguage"]
|
|
534
546
|
]),
|
|
535
547
|
eventToProps: {
|
|
536
|
-
schedulerConfigChanged: async (
|
|
537
|
-
const { resetLoadingState: n, host:
|
|
548
|
+
schedulerConfigChanged: async (e, a) => {
|
|
549
|
+
const { resetLoadingState: n, host: s, action: o, config: i } = e.detail, b = (l) => {
|
|
538
550
|
const [h, y] = l;
|
|
539
|
-
!h && y ?
|
|
551
|
+
!h && y ? s.setError(y) : h && !y && o === "create" && s.schedulerConfigCreatedEventHandler({ config: h }), n && n(e);
|
|
540
552
|
};
|
|
541
553
|
if (o === "edit") {
|
|
542
|
-
const l = await a.schedulerConfig.updateConfiguration(
|
|
554
|
+
const l = await a.schedulerConfig.updateConfiguration(i);
|
|
543
555
|
b(l);
|
|
544
556
|
} else {
|
|
545
|
-
const l = await a.schedulerConfig.createConfiguration(
|
|
557
|
+
const l = await a.schedulerConfig.createConfiguration(i);
|
|
546
558
|
b(l);
|
|
547
559
|
}
|
|
548
560
|
},
|
|
549
|
-
cancelButtonClick: async (
|
|
561
|
+
cancelButtonClick: async (e, a) => {
|
|
550
562
|
a.schedulerConfigStore.state.action = null;
|
|
551
563
|
},
|
|
552
|
-
previewButtonClicked: async (
|
|
564
|
+
previewButtonClicked: async (e, a) => {
|
|
553
565
|
u("[nylas-editor-tabs]", "previewButtonClicked", a);
|
|
554
566
|
},
|
|
555
|
-
formSubmitted: async (
|
|
567
|
+
formSubmitted: async (e, a) => {
|
|
556
568
|
u("[nylas-editor-tabs]", "formSubmitted", a);
|
|
557
569
|
},
|
|
558
|
-
schedulerEditorFormUpdated: async (
|
|
559
|
-
u("[nylas-editor-tabs]", "schedulerEditorFormUpdated",
|
|
570
|
+
schedulerEditorFormUpdated: async (e, a) => {
|
|
571
|
+
u("[nylas-editor-tabs]", "schedulerEditorFormUpdated", e);
|
|
560
572
|
},
|
|
561
|
-
schedulerConfigCreated: async (
|
|
562
|
-
u("[nylas-editor-tabs]", "schedulerConfigCreated",
|
|
573
|
+
schedulerConfigCreated: async (e, a) => {
|
|
574
|
+
u("[nylas-editor-tabs]", "schedulerConfigCreated", e);
|
|
563
575
|
}
|
|
564
576
|
},
|
|
565
577
|
localPropsToProp: /* @__PURE__ */ new Map([
|
|
@@ -569,37 +581,37 @@ te([
|
|
|
569
581
|
]),
|
|
570
582
|
fireRegisterEvent: !0
|
|
571
583
|
}),
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
],
|
|
576
|
-
|
|
577
|
-
const
|
|
578
|
-
var
|
|
579
|
-
var o = arguments.length,
|
|
584
|
+
Y("design:type", Function),
|
|
585
|
+
Y("design:paramtypes", []),
|
|
586
|
+
Y("design:returntype", void 0)
|
|
587
|
+
], He.prototype, "render", null);
|
|
588
|
+
He.style = et;
|
|
589
|
+
const at = ':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:16px;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}@media screen and (max-width: 768px){.configurations .table-container{min-height:624px}}.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{display:flex;justify-content:flex-end;gap:1rem;text-align:right}@media screen and (max-width: 768px){.configurations .table-container table .actions{flex-direction:column;gap:0.5rem}}.configurations .table-container table .actions select-dropdown.last::part(sd_dropdown-content){bottom:54px}.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)}.card-wrapper{position:absolute;top:0;left:0;height:calc(100% + 4rem);width:-webkit-fill-available;width:-moz-available;width:fill-available;display:flex;flex-direction:column;justify-content:center;align-items:center;background:rgba(0, 0, 0, 0.6);z-index:2;border-radius:var(--nylas-border-radius-2x)}@media screen and (max-width: 768px){.card-wrapper{justify-content:start;height:100%}}.card-modal{background:var(--nylas-base-0);display:flex;flex-direction:column;font-family:var(--nylas-font-family);background-color:var(--nylas-base-0);color:var(--nylas-base-900);border-radius:var(--nylas-border-radius-3x);padding:32px;width:562px;box-shadow:0px 1px 4px rgba(0, 0, 0, 0.1), 0px 3px 6px rgba(0, 0, 0, 0.06)}@media screen and (max-width: 768px){.card-modal{width:auto;border-radius:0px}}.description.title-desc{margin-bottom:2rem}.description p{margin:0;font-size:18px;color:var(--nylas-base-600)}.footer{margin-top:1rem;padding-top:1rem;display:flex;justify-content:flex-end;gap:0.5rem;box-sizing:border-box;background-color:var(--nylas-base-25);width:100%;border-radius:0 0 var(--nylas-border-radius-2x) var(--nylas-border-radius-2x)}.close-button{width:100%;display:flex;justify-content:flex-end}.close-button button-component button{padding:0;height:auto}.close-button button-component button:hover{background-color:transparent !important}button-component{--dot-color:var(--nylas-base-700)}', nt = at;
|
|
590
|
+
var it = function(e, a, n, s) {
|
|
591
|
+
var o = arguments.length, i = o < 3 ? a : s === null ? s = Object.getOwnPropertyDescriptor(a, n) : s, b;
|
|
580
592
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
581
|
-
|
|
593
|
+
i = Reflect.decorate(e, a, n, s);
|
|
582
594
|
else
|
|
583
|
-
for (var l =
|
|
584
|
-
(b =
|
|
585
|
-
return o > 3 &&
|
|
586
|
-
},
|
|
595
|
+
for (var l = e.length - 1; l >= 0; l--)
|
|
596
|
+
(b = e[l]) && (i = (o < 3 ? b(i) : o > 3 ? b(a, n, i) : b(a, n)) || i);
|
|
597
|
+
return o > 3 && i && Object.defineProperty(a, n, i), i;
|
|
598
|
+
}, ee = function(e, a) {
|
|
587
599
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
588
|
-
return Reflect.metadata(
|
|
600
|
+
return Reflect.metadata(e, a);
|
|
589
601
|
};
|
|
590
|
-
const
|
|
591
|
-
constructor(
|
|
592
|
-
|
|
602
|
+
const Oe = class {
|
|
603
|
+
constructor(e) {
|
|
604
|
+
K(this, e), this.initListConfigurations = k(this, "initListConfigurations", 7), this.createButtonClick = k(this, "createButtonClick", 7), this.editButtonClick = k(this, "editButtonClick", 7), this.deleteButtonClick = k(this, "deleteButtonClick", 7), this.configurations = [], this.selectedLanguage = void 0, this.schedulerPreviewLink = "", this.listConfigurationsNextCursor = void 0, this.state = "loading", this.error = "", this.currentCursor = null, this.previousCursors = [], this.disableNextPageButton = !1, this.deleteConfigurationId = "", this.showDeleteButtonLoading = !1;
|
|
593
605
|
}
|
|
594
|
-
listConfigurationsNextCursorChangedHandler(
|
|
595
|
-
if (!
|
|
596
|
-
|
|
606
|
+
listConfigurationsNextCursorChangedHandler(e, a) {
|
|
607
|
+
if (!e || e === a) {
|
|
608
|
+
e === null && (this.disableNextPageButton = !0);
|
|
597
609
|
return;
|
|
598
610
|
}
|
|
599
|
-
this.disableNextPageButton = !1, this.currentCursor =
|
|
611
|
+
this.disableNextPageButton = !1, this.currentCursor = e;
|
|
600
612
|
}
|
|
601
|
-
selectedLanguageChangedHandler(
|
|
602
|
-
|
|
613
|
+
selectedLanguageChangedHandler(e, a) {
|
|
614
|
+
e !== a && d.changeLanguage(e);
|
|
603
615
|
}
|
|
604
616
|
connectedCallback() {
|
|
605
617
|
u("[nylas-list-configurations]", "connectedCallback");
|
|
@@ -615,19 +627,19 @@ const Et = class {
|
|
|
615
627
|
disconnectedCallback() {
|
|
616
628
|
u("[nylas-list-configurations]", "disconnectedCallback");
|
|
617
629
|
}
|
|
618
|
-
async handleNylasFormDropdownChanged(
|
|
630
|
+
async handleNylasFormDropdownChanged(e) {
|
|
619
631
|
var o;
|
|
620
|
-
u("[nylas-list-configurations]", "handleNylasFormDropdownChanged",
|
|
621
|
-
const { value: a } =
|
|
622
|
-
switch (
|
|
632
|
+
u("[nylas-list-configurations]", "handleNylasFormDropdownChanged", e.detail);
|
|
633
|
+
const { value: a } = e.detail, [n, s] = a.split("-");
|
|
634
|
+
switch (e.preventDefault(), n) {
|
|
623
635
|
case "delete":
|
|
624
|
-
this.deleteConfigurationId = (o = this.configurations[
|
|
636
|
+
this.deleteConfigurationId = (o = this.configurations[s]) == null ? void 0 : o.id;
|
|
625
637
|
break;
|
|
626
638
|
case "preview":
|
|
627
|
-
window.open(
|
|
639
|
+
window.open(te(this.schedulerPreviewLink, this.configurations[s]), "_blank");
|
|
628
640
|
break;
|
|
629
641
|
case "copy":
|
|
630
|
-
await navigator.clipboard.writeText(
|
|
642
|
+
await navigator.clipboard.writeText(te(this.schedulerPreviewLink, this.configurations[s]));
|
|
631
643
|
break;
|
|
632
644
|
}
|
|
633
645
|
}
|
|
@@ -639,28 +651,28 @@ const Et = class {
|
|
|
639
651
|
async getState() {
|
|
640
652
|
return this.state;
|
|
641
653
|
}
|
|
642
|
-
async setState(
|
|
643
|
-
this.state =
|
|
654
|
+
async setState(e) {
|
|
655
|
+
this.state = e;
|
|
644
656
|
}
|
|
645
|
-
async setError(
|
|
646
|
-
this.error =
|
|
657
|
+
async setError(e) {
|
|
658
|
+
this.error = e;
|
|
647
659
|
}
|
|
648
660
|
async hideDeleteConfirmation() {
|
|
649
661
|
this.deleteConfigurationId = "", this.showDeleteButtonLoading = !1;
|
|
650
662
|
}
|
|
651
|
-
closeModal(
|
|
652
|
-
|
|
663
|
+
closeModal(e) {
|
|
664
|
+
e.preventDefault(), this.deleteConfigurationId = "";
|
|
653
665
|
}
|
|
654
|
-
handleConfirmDeleteButtonClicked(
|
|
655
|
-
|
|
666
|
+
handleConfirmDeleteButtonClicked(e) {
|
|
667
|
+
e.preventDefault(), this.showDeleteButtonLoading = !0;
|
|
656
668
|
const a = this.configurations.find((n) => n.id === this.deleteConfigurationId);
|
|
657
669
|
a && (a != null && a.id) && this.deleteButtonClick.emit({ host: this.host, configuration: a });
|
|
658
670
|
}
|
|
659
|
-
getDurationString(
|
|
660
|
-
const a = Math.floor(
|
|
671
|
+
getDurationString(e) {
|
|
672
|
+
const a = Math.floor(e / 60), n = e % 60;
|
|
661
673
|
return `${a || ""} ${a ? `${a > 1 ? "hours" : "hour"}` : ""} ${n || ""} ${n ? `${n > 1 ? "mins" : "min"}` : ""}`;
|
|
662
674
|
}
|
|
663
|
-
getActionLabelHTML(
|
|
675
|
+
getActionLabelHTML(e) {
|
|
664
676
|
const a = {
|
|
665
677
|
display: "inline-flex",
|
|
666
678
|
alignItems: "center",
|
|
@@ -668,13 +680,13 @@ const Et = class {
|
|
|
668
680
|
}, n = {
|
|
669
681
|
color: "var(--nylas-error)"
|
|
670
682
|
};
|
|
671
|
-
switch (
|
|
683
|
+
switch (e) {
|
|
672
684
|
case "preview":
|
|
673
|
-
return
|
|
685
|
+
return t("span", { style: a }, t("eye-icon", { width: "16", height: "16" }), d.t("nylasListConfigurations.previewButtonText"));
|
|
674
686
|
case "copy":
|
|
675
|
-
return
|
|
687
|
+
return t("span", { style: a }, t("copy-icon", { width: "16", height: "16" }), d.t("nylasListConfigurations.copyLinkButtonText"));
|
|
676
688
|
case "delete":
|
|
677
|
-
return
|
|
689
|
+
return t("span", { style: { ...a, ...n } }, t("delete-icon", { width: "15", height: "17" }), d.t("nylasListConfigurations.deleteButtonText"));
|
|
678
690
|
default:
|
|
679
691
|
return "";
|
|
680
692
|
}
|
|
@@ -683,10 +695,10 @@ const Et = class {
|
|
|
683
695
|
if (this.previousCursors.length === 0)
|
|
684
696
|
return;
|
|
685
697
|
this.currentCursor = this.previousCursors.pop() || null;
|
|
686
|
-
const
|
|
698
|
+
const e = this.previousCursors[this.previousCursors.length - 1] || void 0;
|
|
687
699
|
this.initListConfigurations.emit({
|
|
688
700
|
host: this.host,
|
|
689
|
-
cursor:
|
|
701
|
+
cursor: e
|
|
690
702
|
});
|
|
691
703
|
}
|
|
692
704
|
nextPageClickedHandler() {
|
|
@@ -696,33 +708,33 @@ const Et = class {
|
|
|
696
708
|
}));
|
|
697
709
|
}
|
|
698
710
|
render() {
|
|
699
|
-
var
|
|
700
|
-
return
|
|
711
|
+
var e;
|
|
712
|
+
return t(Be, null, t("div", { class: "header" }, t("div", { class: "description" }, t("h2", null, d.t("allSchedulingPages")), t("p", null, d.t("createAndManageSchedulingPages"))), this.configurations && this.configurations.length > 0 && t("div", { class: "actions" }, t("button-component", { part: "nlc__create-new-cta", clickHandler: () => {
|
|
701
713
|
this.createButtonClick.emit(this.host);
|
|
702
|
-
} }, d.t("createNewSchedulingPageButtonText")))),
|
|
714
|
+
} }, d.t("createNewSchedulingPageButtonText")))), t("div", { class: "configurations" }, t("div", { class: "table-container" }, t("table", { class: {
|
|
703
715
|
"no-configurations": this.state !== "loading" && (!this.configurations || this.configurations.length === 0)
|
|
704
|
-
} },
|
|
716
|
+
} }, t("tr", { class: {
|
|
705
717
|
hide: this.state === "loading" || this.configurations && this.configurations.length === 0
|
|
706
|
-
} },
|
|
718
|
+
} }, t("th", null, d.t("pageTitle")), t("th", null, d.t("durationTitle")), t("th", null)), this.state === "loading" && t("tr", { class: "no-configurations" }, t("td", { colSpan: 3 }, t("div", null, t("h3", null, d.t("loading"), "..."), t("p", null, d.t("loadingPagesDescription"))))), this.state !== "loading" && (!this.configurations || this.configurations.length === 0) && t("tr", { class: "no-configurations" }, t("td", { colSpan: 3 }, t("div", null, t("calendar-icon", { width: "48", height: "48" }), t("h3", null, d.t("noSchedulingPages")), t("p", null, d.t("createFirstSchedulingPage")), t("button-component", { part: "nlc__create-new-cta", clickHandler: () => {
|
|
707
719
|
this.createButtonClick.emit(this.host);
|
|
708
|
-
} }, d.t("createNewSchedulingPageButtonText"))))), this.state !== "loading" && ((
|
|
709
|
-
var o,
|
|
710
|
-
const
|
|
711
|
-
return
|
|
720
|
+
} }, d.t("createNewSchedulingPageButtonText"))))), this.state !== "loading" && ((e = this.configurations) == null ? void 0 : e.map((a, n) => {
|
|
721
|
+
var o, i, b, l;
|
|
722
|
+
const s = (n === this.configurations.length - 1 || n === this.configurations.length - 2) && this.configurations.length > 3;
|
|
723
|
+
return t("tr", { key: a == null ? void 0 : a.id }, t("td", null, t("div", { class: "title" }, t("div", { class: "config-event-title", title: (o = a == null ? void 0 : a.event_booking) == null ? void 0 : o.title }, (i = a == null ? void 0 : a.event_booking) == null ? void 0 : i.title), t("div", { class: "config-event-description" }, (b = a == null ? void 0 : a.event_booking) == null ? void 0 : b.description))), t("td", null, t("div", { class: "duration" }, this.getDurationString((l = a == null ? void 0 : a.availability) == null ? void 0 : l.duration_minutes))), t("td", null, t("div", { class: "actions" }, t("button-component", { variant: "basic", key: `edit-${n}`, clickHandler: (h) => {
|
|
712
724
|
h.preventDefault(), this.editButtonClick.emit({ host: this.host, configuration: a });
|
|
713
|
-
} },
|
|
714
|
-
last:
|
|
725
|
+
} }, t("edit-icon", { width: "16", height: "16" }), d.t("editSchedulingPageButtonText")), t("select-dropdown", { class: {
|
|
726
|
+
last: s
|
|
715
727
|
}, name: "actions", options: [
|
|
716
728
|
{ value: `preview-${n}`, label: "Preview", labelHTML: this.getActionLabelHTML("preview") },
|
|
717
729
|
{ value: `copy-${n}`, label: "Copy link", labelHTML: this.getActionLabelHTML("copy") },
|
|
718
730
|
{ value: `delete-${n}`, label: "Delete", labelHTML: this.getActionLabelHTML("delete") }
|
|
719
731
|
], 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" }))));
|
|
720
|
-
})))),
|
|
732
|
+
})))), t("div", { class: "pagination" }, t("button", { class: "arrow left", onClick: () => this.previousPageClickedHandler(), disabled: this.previousCursors.length <= 0 }, t("chevron-icon", null)), t("button", { class: "arrow right", onClick: () => this.nextPageClickedHandler(), disabled: this.disableNextPageButton }, t("chevron-icon", null)))), this.state === "error" && t("div", { class: "error-container" }, t("p", { class: "error" }, this.error)), !!this.deleteConfigurationId && t("div", { class: "card-wrapper" }, t("div", { class: "card-modal" }, t("div", { class: "close-button" }, t("button-component", { tooltip: "Close", id: "close", variant: "invisible", onClick: (a) => this.closeModal(a), part: "nfbf__close-button" }, t("close-icon", null))), t("div", { class: "header" }, t("h2", { slot: "card-title", part: "nfbf__title" }, d.t("deleteSchedulingPageTitle"))), t("div", { class: "description title-desc" }, t("p", null, d.t("deleteSchedulingPageDescription"))), t("div", { class: {
|
|
721
733
|
footer: !0
|
|
722
|
-
} },
|
|
734
|
+
} }, t("button-component", { variant: "basic", onClick: (a) => this.closeModal(a), part: "nfbf__button-outline nfbf__cancel-cta" }, `${d.t("deleteSchedulingPageCancelButton")}`), t("button-component", { variant: "destructive", onClick: (a) => this.handleConfirmDeleteButtonClicked(a), disabled: this.showDeleteButtonLoading, isLoading: this.showDeleteButtonLoading, part: "nfbf__button-outline nfbf__reschedule-cta" }, `${d.t("deleteSchedulingPageConfirmButton")}`)))));
|
|
723
735
|
}
|
|
724
736
|
get host() {
|
|
725
|
-
return
|
|
737
|
+
return Pe(this);
|
|
726
738
|
}
|
|
727
739
|
static get watchers() {
|
|
728
740
|
return {
|
|
@@ -731,8 +743,8 @@ const Et = class {
|
|
|
731
743
|
};
|
|
732
744
|
}
|
|
733
745
|
};
|
|
734
|
-
|
|
735
|
-
|
|
746
|
+
it([
|
|
747
|
+
Ee({
|
|
736
748
|
name: "nylas-list-configurations",
|
|
737
749
|
stateToProps: /* @__PURE__ */ new Map([
|
|
738
750
|
["schedulerConfig.configurations", "configurations"],
|
|
@@ -741,38 +753,38 @@ ne([
|
|
|
741
753
|
]),
|
|
742
754
|
localPropsToProp: /* @__PURE__ */ new Map([["schedulerPreviewLink", "schedulerPreviewLink"]]),
|
|
743
755
|
eventToProps: {
|
|
744
|
-
initListConfigurations: async (
|
|
745
|
-
const { host: n, cursor:
|
|
756
|
+
initListConfigurations: async (e, a) => {
|
|
757
|
+
const { host: n, cursor: s } = e.detail;
|
|
746
758
|
await n.setState("loading");
|
|
747
|
-
const [o,
|
|
748
|
-
if (!o &&
|
|
749
|
-
await n.setState("error"), await n.setError(
|
|
759
|
+
const [o, i] = await a.schedulerConfig.getConfigurations(s);
|
|
760
|
+
if (!o && i && i.message) {
|
|
761
|
+
await n.setState("error"), await n.setError(i.message);
|
|
750
762
|
return;
|
|
751
763
|
}
|
|
752
764
|
await n.setState("loaded");
|
|
753
765
|
},
|
|
754
|
-
createButtonClick: async (
|
|
766
|
+
createButtonClick: async (e, a) => {
|
|
755
767
|
a.schedulerConfigStore.resetSelectedConfiguration(), a.schedulerConfigStore.state.action = "create";
|
|
756
768
|
},
|
|
757
|
-
deleteButtonClick: async (
|
|
758
|
-
const { host: n, configuration:
|
|
759
|
-
!o &&
|
|
769
|
+
deleteButtonClick: async (e, a) => {
|
|
770
|
+
const { host: n, configuration: s } = e.detail, [o, i] = await a.schedulerConfig.deleteConfiguration(s.id);
|
|
771
|
+
!o && i && i.message && (await n.setState("error"), await n.setError(i.message)), await n.hideDeleteConfirmation();
|
|
760
772
|
},
|
|
761
|
-
editButtonClick: async (
|
|
762
|
-
const { configuration: n } =
|
|
773
|
+
editButtonClick: async (e, a) => {
|
|
774
|
+
const { configuration: n } = e.detail;
|
|
763
775
|
a.schedulerConfigStore.state.selectedConfiguration = n, a.schedulerConfigStore.state.action = "edit";
|
|
764
776
|
}
|
|
765
777
|
},
|
|
766
778
|
fireRegisterEvent: !0
|
|
767
779
|
}),
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
],
|
|
772
|
-
|
|
780
|
+
ee("design:type", Function),
|
|
781
|
+
ee("design:paramtypes", []),
|
|
782
|
+
ee("design:returntype", void 0)
|
|
783
|
+
], Oe.prototype, "render", null);
|
|
784
|
+
Oe.style = nt;
|
|
773
785
|
export {
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
786
|
+
We as google_logo_icon,
|
|
787
|
+
Qe as microsoft_logo_icon,
|
|
788
|
+
He as nylas_editor_tabs,
|
|
789
|
+
Oe as nylas_list_configurations
|
|
778
790
|
};
|