@nylas/react 1.4.3 → 1.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/dist/{add-circle-icon_2.entry-12cddf69.js → add-circle-icon_2.entry-55361a03.js} +3 -3
- package/dist/add-circle-icon_2.entry-75a3df95.cjs +1 -0
- package/dist/archive-icon.entry-3c4e4b28.js +16 -0
- package/dist/archive-icon.entry-8aa151fd.cjs +1 -0
- package/dist/arrow-icon.entry-2cef5ca1.cjs +1 -0
- package/dist/{arrow-icon.entry-66125a01.js → arrow-icon.entry-5bb183c1.js} +5 -5
- package/dist/{bold-icon.entry-4e0f124a.cjs → bold-icon.entry-c919c71d.cjs} +1 -1
- package/dist/{bold-icon.entry-96b5c7c9.js → bold-icon.entry-e0010c60.js} +4 -4
- package/dist/{button-component_2.entry-537ef8cf.cjs → button-component_2.entry-078ee06a.cjs} +1 -1
- package/dist/{button-component_2.entry-02ec97e5.js → button-component_2.entry-1dd1b8d6.js} +9 -9
- package/dist/{calendar-agenda-fill-icon_36.entry-a134ce8f.js → calendar-agenda-fill-icon_36.entry-772a70d7.js} +99 -99
- package/dist/calendar-agenda-fill-icon_36.entry-9b694a33.cjs +6 -0
- package/dist/{calendar-cancel-icon.entry-d4a5aa8d.js → calendar-cancel-icon.entry-7d1a7cea.js} +4 -4
- package/dist/{calendar-cancel-icon.entry-64d8a8f7.cjs → calendar-cancel-icon.entry-b791b6b1.cjs} +1 -1
- package/dist/{calendar-check-icon_2.entry-620c2161.cjs → calendar-check-icon_2.entry-2380a4e6.cjs} +1 -1
- package/dist/{calendar-check-icon_2.entry-d7d417b1.js → calendar-check-icon_2.entry-2b5711fd.js} +3 -3
- package/dist/{calendar-icon.entry-994e0116.js → calendar-icon.entry-9b23c994.js} +2 -2
- package/dist/{calendar-icon.entry-b1ba99b6.cjs → calendar-icon.entry-f88c8b09.cjs} +1 -1
- package/dist/{checkbox-component.entry-b43f7dcb.js → checkbox-component.entry-94fd68e7.js} +4 -4
- package/dist/{checkbox-component.entry-286cf4b6.cjs → checkbox-component.entry-af77c4fa.cjs} +1 -1
- package/dist/{checkmark-icon_15.entry-c20a861e.js → checkmark-icon_15.entry-3ddf90df.js} +224 -222
- package/dist/checkmark-icon_15.entry-de65b967.cjs +5 -0
- package/dist/chevron-icon_3.entry-a492d340.cjs +1 -0
- package/dist/{chevron-icon_3.entry-5e8c6975.js → chevron-icon_3.entry-af195326.js} +6 -6
- package/dist/{clock-icon_4.entry-ea55f4c7.cjs → clock-icon_4.entry-530cd13b.cjs} +1 -1
- package/dist/{clock-icon_4.entry-4ba6118a.js → clock-icon_4.entry-7dc4324b.js} +8 -8
- package/dist/{customParseFormat-6c652dbb-905f5f24.cjs → customParseFormat-129be926-30b2af24.cjs} +1 -1
- package/dist/{customParseFormat-6c652dbb-bafc6567.js → customParseFormat-129be926-36eabae2.js} +1 -1
- package/dist/{delete-icon.entry-6f8bb1a4.js → delete-icon.entry-3328484a.js} +4 -4
- package/dist/{delete-icon.entry-d5cc7ec2.cjs → delete-icon.entry-9369bf78.cjs} +1 -1
- package/dist/document-refresh-icon.entry-902ead30.js +16 -0
- package/dist/{document-refresh-icon.entry-59bcbf3e.cjs → document-refresh-icon.entry-f45be1c4.cjs} +1 -1
- package/dist/elements/index.d.ts +0 -8
- package/dist/{feedbackSync-de135b5b-1bb1eed1.cjs → feedbackSync-d943ffc7-13f01c1f.cjs} +1 -1
- package/dist/{feedbackSync-de135b5b-125921e6.js → feedbackSync-d943ffc7-d1e98ba0.js} +1 -1
- package/dist/{folder-icon.entry-a4b426f1.cjs → folder-icon.entry-48cfa8d0.cjs} +1 -1
- package/dist/{folder-icon.entry-c99aefa7.js → folder-icon.entry-c4ffba45.js} +2 -2
- package/dist/{forward-icon.entry-d5f444e4.cjs → forward-icon.entry-146f3318.cjs} +1 -1
- package/dist/{forward-icon.entry-c03a667b.js → forward-icon.entry-dd036273.js} +5 -5
- package/dist/{globe-icon_2.entry-5d4462c6.cjs → globe-icon_2.entry-049fbca2.cjs} +1 -1
- package/dist/{globe-icon_2.entry-b4bd2a2e.js → globe-icon_2.entry-d6a95f6e.js} +90 -80
- package/dist/{google-logo-icon_6.entry-b525183b.cjs → google-logo-icon_6.entry-4d9e06be.cjs} +2 -2
- package/dist/{google-logo-icon_6.entry-bbca3ca0.js → google-logo-icon_6.entry-e26385cc.js} +398 -380
- package/dist/{google-meet-icon_5.entry-29131db6.cjs → google-meet-icon_5.entry-94112d7e.cjs} +1 -1
- package/dist/{google-meet-icon_5.entry-070a3973.js → google-meet-icon_5.entry-c0129f58.js} +12 -12
- package/dist/inbox-icon.entry-74d7a10d.js +16 -0
- package/dist/inbox-icon.entry-94683ba9.cjs +1 -0
- package/dist/index-3b0366ac.cjs +57 -0
- package/dist/{index-5179ba9a.js → index-6e735f92.js} +5678 -4802
- package/dist/{index.es-19a10e83-9591824a.js → index.es-4615d47c-9156501b.js} +827 -1065
- package/dist/{index.es-19a10e83-89045449.cjs → index.es-4615d47c-b7c254fe.cjs} +6 -6
- package/dist/{info-icon_2.entry-327fa47f.cjs → info-icon_2.entry-8bcd39dc.cjs} +1 -1
- package/dist/{info-icon_2.entry-3066c0ae.js → info-icon_2.entry-ef5dbccc.js} +3 -3
- package/dist/{input-component.entry-9ec938d5.js → input-component.entry-922063d5.js} +9 -9
- package/dist/{input-component.entry-6a046128.cjs → input-component.entry-cc1fb2fa.cjs} +1 -1
- package/dist/{input-dropdown_2.entry-886a91a0.js → input-dropdown_2.entry-4041c294.js} +5 -5
- package/dist/input-dropdown_2.entry-f3750e99.cjs +1 -0
- package/dist/italic-icon.entry-63b6943f.cjs +1 -0
- package/dist/italic-icon.entry-6706da64.js +16 -0
- package/dist/{multi-select-dropdown_2.entry-6d631e1a.cjs → multi-select-dropdown_2.entry-1096321d.cjs} +1 -1
- package/dist/{multi-select-dropdown_2.entry-065aa4e8.js → multi-select-dropdown_2.entry-e10a9439.js} +22 -16
- package/dist/nylas-booked-event-card_12.entry-38f37135.cjs +1 -0
- package/dist/{nylas-booked-event-card_12.entry-c7c98fe2.js → nylas-booked-event-card_12.entry-7eceb6b6.js} +226 -224
- package/dist/nylas-event-calendar_3.entry-7dad0f2f.cjs +11 -0
- package/dist/{nylas-event-calendar_3.entry-36866347.js → nylas-event-calendar_3.entry-cc428f95.js} +2360 -2238
- package/dist/{nylas-form-card.entry-6adcea46.cjs → nylas-form-card.entry-984be5f9.cjs} +1 -1
- package/dist/{nylas-form-card.entry-cf5b0151.js → nylas-form-card.entry-dd3f240a.js} +3 -3
- package/dist/{nylas-scheduler-editor.entry-7a4190b0.js → nylas-scheduler-editor.entry-623da747.js} +39 -15
- package/dist/nylas-scheduler-editor.entry-8fb56081.cjs +2 -0
- package/dist/nylas-scheduling.entry-472ef577.cjs +1 -0
- package/dist/nylas-scheduling.entry-6608aa36.js +968 -0
- package/dist/{person-icon.entry-08d6cab1.cjs → person-icon.entry-168ba481.cjs} +1 -1
- package/dist/{person-icon.entry-0919d562.js → person-icon.entry-9f0233cd.js} +4 -4
- package/dist/{play-icon.entry-6a6c0b09.cjs → play-icon.entry-4115845d.cjs} +1 -1
- package/dist/play-icon.entry-5fbfabb5.js +16 -0
- package/dist/{radio-button-group.entry-3e9eb18a.cjs → radio-button-group.entry-3ae5f246.cjs} +1 -1
- package/dist/{radio-button-group.entry-82316913.js → radio-button-group.entry-da3f23ac.js} +2 -2
- package/dist/react.cjs +1 -1
- package/dist/react.js +96 -104
- package/dist/{refresh-icon.entry-c4f5caf0.cjs → refresh-icon.entry-13742bb5.cjs} +1 -1
- package/dist/{refresh-icon.entry-f19b8dbf.js → refresh-icon.entry-e1db3ca5.js} +2 -2
- package/dist/{register-component-139bea5f-38016ef2.js → register-component-083eb961-763c87e9.js} +1 -1
- package/dist/{register-component-139bea5f-93ebfbd3.cjs → register-component-083eb961-c5c48a1b.cjs} +1 -1
- package/dist/{reply-all-icon.entry-53a19ae0.cjs → reply-all-icon.entry-9446c2d0.cjs} +1 -1
- package/dist/{reply-all-icon.entry-3cf08a4a.js → reply-all-icon.entry-ded706c7.js} +2 -2
- package/dist/{reply-icon.entry-b1a1cda3.cjs → reply-icon.entry-0d362c63.cjs} +1 -1
- package/dist/{reply-icon.entry-78dc0e18.js → reply-icon.entry-7c5c0fd9.js} +5 -5
- package/dist/sent-icon.entry-92434496.cjs +1 -0
- package/dist/sent-icon.entry-bc9d1b35.js +16 -0
- package/dist/spam-icon.entry-11370b68.js +16 -0
- package/dist/spam-icon.entry-e0313c63.cjs +1 -0
- package/dist/{star-icon.entry-3f29c8bc.js → star-icon.entry-3a81207c.js} +6 -6
- package/dist/{star-icon.entry-262f813c.cjs → star-icon.entry-87823b56.cjs} +1 -1
- package/dist/{stop-icon.entry-0d3c0894.js → stop-icon.entry-472a11dc.js} +2 -2
- package/dist/{stop-icon.entry-00c3656b.cjs → stop-icon.entry-ddf9242a.cjs} +1 -1
- package/dist/{textarea-component.entry-cb4f5468.cjs → textarea-component.entry-2c6c0c7e.cjs} +1 -1
- package/dist/{textarea-component.entry-b03727b2.js → textarea-component.entry-f9797150.js} +2 -2
- package/dist/{toggle-switch.entry-eaadad98.js → toggle-switch.entry-a7cbc256.js} +2 -2
- package/dist/{toggle-switch.entry-4ba825d1.cjs → toggle-switch.entry-fbef6918.cjs} +1 -1
- package/dist/{translate-icon.entry-b964caca.js → translate-icon.entry-0ab604fe.js} +4 -4
- package/dist/{translate-icon.entry-e468fb5f.cjs → translate-icon.entry-2fe4868f.cjs} +1 -1
- package/dist/trash-fill-icon.entry-1904e8d6.cjs +1 -0
- package/dist/trash-fill-icon.entry-4bdfb061.js +16 -0
- package/dist/{underline-icon.entry-8a52f2c5.js → underline-icon.entry-29366789.js} +2 -2
- package/dist/{underline-icon.entry-fb2fe007.cjs → underline-icon.entry-6a2ca451.cjs} +1 -1
- package/dist/{warning-icon.entry-ba862018.js → warning-icon.entry-1649ffe7.js} +2 -2
- package/dist/{warning-icon.entry-e113397f.cjs → warning-icon.entry-3f848ed6.cjs} +1 -1
- package/package.json +2 -2
- package/dist/add-circle-icon_2.entry-fd842279.cjs +0 -1
- package/dist/archive-icon.entry-318baea1.cjs +0 -1
- package/dist/archive-icon.entry-f71155e0.js +0 -16
- package/dist/arrow-icon.entry-25e08042.cjs +0 -1
- package/dist/calendar-agenda-fill-icon_36.entry-97747463.cjs +0 -6
- package/dist/checkmark-icon_15.entry-6fa7dd5d.cjs +0 -5
- package/dist/chevron-icon_3.entry-bb5b71da.cjs +0 -1
- package/dist/document-refresh-icon.entry-15f6a5ce.js +0 -16
- package/dist/inbox-icon.entry-fae322d8.cjs +0 -1
- package/dist/inbox-icon.entry-feed5692.js +0 -16
- package/dist/index-22f83f6f.cjs +0 -57
- package/dist/input-dropdown_2.entry-33bd12b2.cjs +0 -1
- package/dist/italic-icon.entry-63976e0c.cjs +0 -1
- package/dist/italic-icon.entry-8b41cd6d.js +0 -16
- package/dist/notebook-store-b61693cd-0cdf1255.js +0 -14
- package/dist/notebook-store-b61693cd-c1314935.cjs +0 -5
- package/dist/nylas-booked-event-card_12.entry-35442a83.cjs +0 -1
- package/dist/nylas-call-summary.entry-c7482276.js +0 -16
- package/dist/nylas-call-summary.entry-e457f7dc.cjs +0 -1
- package/dist/nylas-event-calendar_3.entry-207500c1.cjs +0 -6
- package/dist/nylas-if-state.entry-ac37023b.cjs +0 -1
- package/dist/nylas-if-state.entry-f786a0c4.js +0 -95
- package/dist/nylas-key-points.entry-4eedc560.js +0 -29
- package/dist/nylas-key-points.entry-70648aaa.cjs +0 -1
- package/dist/nylas-login.entry-1f979b45.cjs +0 -1
- package/dist/nylas-login.entry-3c9d81eb.js +0 -74
- package/dist/nylas-provider.entry-6d72e728.js +0 -265
- package/dist/nylas-provider.entry-850dd082.cjs +0 -1
- package/dist/nylas-scheduler-editor.entry-f76b5368.cjs +0 -2
- package/dist/nylas-scheduling.entry-735334de.cjs +0 -1
- package/dist/nylas-scheduling.entry-c2426f53.js +0 -439
- package/dist/nylas-transcript.entry-b9707df7.js +0 -128
- package/dist/nylas-transcript.entry-f42910e3.cjs +0 -6
- package/dist/nylas-video-player.entry-4da5451f.js +0 -39
- package/dist/nylas-video-player.entry-61772b8a.cjs +0 -1
- package/dist/nylas-video-preview.entry-7e5f92da.cjs +0 -1
- package/dist/nylas-video-preview.entry-a43997ba.js +0 -16
- package/dist/play-icon.entry-07ce821c.js +0 -16
- package/dist/scheduler-config-store-d6729d8d-05905fa5.js +0 -29
- package/dist/scheduler-config-store-d6729d8d-416ec549.cjs +0 -1
- package/dist/scheduler-store-d97ec8e0-34c7a845.cjs +0 -1
- package/dist/scheduler-store-d97ec8e0-7c59bd89.js +0 -533
- package/dist/sent-icon.entry-8d9ffe9f.cjs +0 -1
- package/dist/sent-icon.entry-f7680a13.js +0 -16
- package/dist/spam-icon.entry-28e67f64.cjs +0 -1
- package/dist/spam-icon.entry-56089211.js +0 -16
- package/dist/trash-fill-icon.entry-6d7624a8.cjs +0 -1
- package/dist/trash-fill-icon.entry-742bcd40.js +0 -16
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as X, h as n,
|
|
2
|
-
import { R as
|
|
3
|
-
import { C as O, D as
|
|
4
|
-
import { i as
|
|
1
|
+
import { r as X, h as n, a as _, b, i as d, s as ge, v as re, H as le, g as de, F as ie, j as et } from "./index-6e735f92.js";
|
|
2
|
+
import { R as ce } from "./register-component-083eb961-763c87e9.js";
|
|
3
|
+
import { C as O, D as Ae, e as tt, b as nt } from "./constants-3d8016e3-3c080f00.js";
|
|
4
|
+
import { i as je, a as $e, c as Je, b as Ve, f as Ze } from "./feedbackSync-d943ffc7-d1e98ba0.js";
|
|
5
5
|
import "react";
|
|
6
6
|
import "react/jsx-runtime";
|
|
7
7
|
import "react-dom";
|
|
@@ -10,19 +10,19 @@ const at = ".sc-google-logo-icon-h{display:flex}", ot = at, st = class {
|
|
|
10
10
|
X(this, e), this.width = "24", this.height = "24";
|
|
11
11
|
}
|
|
12
12
|
render() {
|
|
13
|
-
return n("svg", { key: "
|
|
13
|
+
return n("svg", { key: "497d96edf36fb0a0da5dcfd9ad2fe71b3b7ea9a8", width: this.width, height: this.height, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, n("g", { key: "ff34b10d048568e1f4a7534c71c4a184a7a201e3", "clip-path": "url(#clip0_959_12452)" }, n("path", { key: "d04cbd5dadb80fb04a3f97f6cff28ee64d474183", 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" }), n("path", { key: "8d9769691ac47af4bf7a0549162136ee23d2ae2f", 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" }), n("path", { key: "8851626c907a3bb240e2acbd897964953da1c3c1", 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" }), n("path", { key: "52f0ae0c024656288107ed29c0e0e0d3bf25c534", 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" })), n("defs", { key: "2a70dda1a292a31a96ca67b97f17eb9492aa27f0" }, n("clipPath", { key: "fd1204014da069fad95527bb6878bb2639321f7f", id: "clip0_959_12452" }, n("rect", { key: "eb697d55080f8fc14d5f388d30c0f8fb562d1cfb", width: 24, height: 24, fill: "white" }))));
|
|
14
14
|
}
|
|
15
15
|
};
|
|
16
16
|
st.style = ot;
|
|
17
|
-
const
|
|
17
|
+
const rt = ".sc-microsoft-logo-icon-h{display:flex}", it = rt, lt = class {
|
|
18
18
|
constructor(e) {
|
|
19
19
|
X(this, e), this.width = "22", this.height = "22";
|
|
20
20
|
}
|
|
21
21
|
render() {
|
|
22
|
-
return n("svg", { key: "
|
|
22
|
+
return n("svg", { key: "fad699e59d1015d5f6458a851ef64c15d50a11da", width: this.width, height: this.height, viewBox: "0 0 22 22", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, n("path", { key: "8a2ec941750b125fd8dc9476b65afae9715e4378", d: "M0.043457 0.043457H10.4782V10.4782H0.043457V0.043457Z", fill: "#F35325" }), n("path", { key: "085645c16519805acf94427915e6651bb041d022", d: "M11.5217 0.043457H21.9565V10.4782H11.5217V0.043457Z", fill: "#81BC06" }), n("path", { key: "a90f655243dc66642ef28597ee770dc5bd3f7d7d", d: "M0.043457 11.5217H10.4782V21.9565H0.043457V11.5217Z", fill: "#05A6F0" }), n("path", { key: "5ea3f196243b29bb0f291f08f7253547a8b574c0", d: "M11.5217 11.5217H21.9565V21.9565H11.5217V11.5217Z", fill: "#FFBA08" }));
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
|
-
lt.style =
|
|
25
|
+
lt.style = it;
|
|
26
26
|
var u;
|
|
27
27
|
(function(e) {
|
|
28
28
|
e.EventInfo = "eventInfo", e.Availability = "availability", e.BookingOptions = "bookingOptions", e.Communications = "communications", e.Participants = "participants", e.BookingForm = "bookingForm", e.PageStyles = "pageStyles";
|
|
@@ -117,90 +117,90 @@ function dt({ id: e, formState: t, activeTab: a }, s) {
|
|
|
117
117
|
}
|
|
118
118
|
const ct = '.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-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff}.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}', pt = ct;
|
|
119
119
|
var bt = function(e, t, a, s) {
|
|
120
|
-
var
|
|
120
|
+
var r = arguments.length, o = r < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, a) : s, l;
|
|
121
121
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
122
122
|
o = Reflect.decorate(e, t, a, s);
|
|
123
123
|
else
|
|
124
|
-
for (var
|
|
125
|
-
(l = e[
|
|
126
|
-
return
|
|
127
|
-
},
|
|
124
|
+
for (var i = e.length - 1; i >= 0; i--)
|
|
125
|
+
(l = e[i]) && (o = (r < 3 ? l(o) : r > 3 ? l(t, a, o) : l(t, a)) || o);
|
|
126
|
+
return r > 3 && o && Object.defineProperty(t, a, o), o;
|
|
127
|
+
}, ue = function(e, t) {
|
|
128
128
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
129
129
|
return Reflect.metadata(e, t);
|
|
130
130
|
};
|
|
131
|
-
const
|
|
131
|
+
const We = class {
|
|
132
132
|
constructor(e) {
|
|
133
133
|
X(this, e), this.schedulerConfigChanged = _(this, "schedulerConfigChanged", 7), this.schedulerConfigCreated = _(this, "schedulerConfigCreated", 7), this.cancelButtonClick = _(this, "cancelButtonClick", 7), this.formSubmitted = _(this, "formSubmitted", 7), this.previewButtonClicked = _(this, "previewButtonClicked", 7), this.schedulerEditorFormUpdated = _(this, "schedulerEditorFormUpdated", 7), this.formSubmissionHandler = async (t) => {
|
|
134
|
-
var
|
|
134
|
+
var me, _e, ve, we, ke, Ce, xe, Se, Ee, Te, Fe, Le, Oe, Pe, Be, He, ze;
|
|
135
135
|
t.preventDefault();
|
|
136
136
|
const a = await this.formSubmitted.emit();
|
|
137
137
|
if (b("[nylas-editor-tabs]", "formSubmissionHandler", a), !this.formRef.checkValidity() || a.defaultPrevented) {
|
|
138
|
-
this.error = this.formRef.validationMessage ||
|
|
138
|
+
this.error = this.formRef.validationMessage || d.t("fixFormErrors");
|
|
139
139
|
return;
|
|
140
140
|
}
|
|
141
141
|
this.isLoading = !0, this.hasUnsavedChanges = !1;
|
|
142
|
-
const
|
|
143
|
-
b("[nylas-editor-tabs]", "formState",
|
|
144
|
-
const { title: o, description: l, duration:
|
|
142
|
+
const r = this.updateFormState();
|
|
143
|
+
b("[nylas-editor-tabs]", "formState", r);
|
|
144
|
+
const { title: o, description: l, duration: i, availability: c, bookingCalendar: p, location: f, bookingType: m, buffer: w, availableDaysInFuture: x, minCancellationNotice: T, minBookingNotice: z, cancellationPolicy: P, timeslotInterval: S, additionalGuestsHidden: B, hideCancellationOptions: N, hideReschedulingOptions: R, participants: E, participantOpenHours: k, additionalFields: M, participantCalendars: h, conferencing: U, participantBookingCalendars: v, reminders: A, emailTemplate: I, redirectUrl: j, availabilityMethod: H, slug: $, appearance: J, name: Y, disableEmails: V, organizerLocale: K } = r, C = ((_e = (me = this.selectedConfiguration) == null ? void 0 : me.participants) == null ? void 0 : _e.find((g) => g.is_organizer)) || (E == null ? void 0 : E.find((g) => g.is_organizer)), G = h && (C != null && C.email) ? h[C == null ? void 0 : C.email] : [], W = ((ve = C == null ? void 0 : C.booking) == null ? void 0 : ve.calendar_id) || p, F = i ? parseInt(i) : 30, L = E && (E == null ? void 0 : E.length) > 0 ? E : [
|
|
145
145
|
{
|
|
146
|
-
name: (
|
|
147
|
-
email: (
|
|
146
|
+
name: (C == null ? void 0 : C.name) ?? ((we = this.currentUser) == null ? void 0 : we.name) ?? "",
|
|
147
|
+
email: (C == null ? void 0 : C.email) ?? ((ke = this.currentUser) == null ? void 0 : ke.email) ?? "",
|
|
148
148
|
is_organizer: !0,
|
|
149
|
-
timezone: (
|
|
149
|
+
timezone: (c == null ? void 0 : c.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
150
150
|
availability: {
|
|
151
|
-
calendar_ids:
|
|
151
|
+
calendar_ids: p && p !== "" ? [p] : ["primary"],
|
|
152
152
|
open_hours: []
|
|
153
153
|
},
|
|
154
154
|
booking: {
|
|
155
|
-
calendar_id:
|
|
155
|
+
calendar_id: p && p !== "" ? p : "primary"
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
158
|
];
|
|
159
|
-
let
|
|
160
|
-
this.selectedEventType && this.selectedEventType !== O.group && (
|
|
159
|
+
let D = H || (((Se = (xe = (Ce = this.selectedConfiguration) == null ? void 0 : Ce.availability) == null ? void 0 : xe.availability_rules) == null ? void 0 : Se.availability_method) ?? "collective");
|
|
160
|
+
this.selectedEventType && this.selectedEventType !== O.group && (D = this.selectedEventType === O.one_on_one ? O.collective : this.selectedEventType), console.log("availabilityMethodSelected", D);
|
|
161
161
|
const q = {
|
|
162
|
-
...((
|
|
163
|
-
version: ((
|
|
164
|
-
slug:
|
|
165
|
-
name:
|
|
162
|
+
...((Ee = this.selectedConfiguration) == null ? void 0 : Ee.id) && { id: this.selectedConfiguration.id },
|
|
163
|
+
version: ((Te = this.selectedConfiguration) == null ? void 0 : Te.version) ?? "1.0.0",
|
|
164
|
+
slug: $,
|
|
165
|
+
name: Y,
|
|
166
166
|
availability: {
|
|
167
167
|
duration_minutes: F,
|
|
168
168
|
interval_minutes: (S == null ? void 0 : S.interval) ?? F,
|
|
169
169
|
round_to: S == null ? void 0 : S.roundTo,
|
|
170
170
|
availability_rules: {
|
|
171
|
-
availability_method:
|
|
172
|
-
buffer:
|
|
173
|
-
default_open_hours: (
|
|
174
|
-
round_robin_group_id: ((
|
|
171
|
+
availability_method: D,
|
|
172
|
+
buffer: w || { before: 0, after: 0 },
|
|
173
|
+
default_open_hours: (c == null ? void 0 : c.openHours) ?? ((Oe = (Le = (Fe = this.selectedConfiguration) == null ? void 0 : Fe.availability) == null ? void 0 : Le.availability_rules) == null ? void 0 : Oe.default_open_hours) ?? Ae,
|
|
174
|
+
round_robin_group_id: ((He = (Be = (Pe = this.selectedConfiguration) == null ? void 0 : Pe.availability) == null ? void 0 : Be.availability_rules) == null ? void 0 : He.round_robin_group_id) ?? ""
|
|
175
175
|
}
|
|
176
176
|
},
|
|
177
177
|
participants: [
|
|
178
|
-
...L ? L.map((
|
|
179
|
-
var
|
|
180
|
-
let Q = (
|
|
181
|
-
if ((
|
|
182
|
-
const
|
|
178
|
+
...L ? L.map((g) => {
|
|
179
|
+
var Ne, Ue, Ie, De, Re, Me;
|
|
180
|
+
let Q = (c == null ? void 0 : c.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
181
|
+
if ((Ne = k == null ? void 0 : k[g.email]) != null && Ne.length && (Q = (Ie = (Ue = k == null ? void 0 : k[g.email]) == null ? void 0 : Ue[0]) == null ? void 0 : Ie.timezone), g.is_organizer) {
|
|
182
|
+
const Ge = v != null && v[g.email] ? v == null ? void 0 : v[g.email] : W || "primary", be = h != null && h[g.email] ? h == null ? void 0 : h[g.email] : G != null && G.length ? G : ["primary"], Xe = be.length === 1 && be[0] === "primary";
|
|
183
183
|
return {
|
|
184
|
-
name:
|
|
185
|
-
email:
|
|
184
|
+
name: g.name ?? "",
|
|
185
|
+
email: g.email,
|
|
186
186
|
is_organizer: !0,
|
|
187
187
|
timezone: Q,
|
|
188
188
|
availability: {
|
|
189
|
-
calendar_ids: Xe ? [
|
|
190
|
-
open_hours: (
|
|
189
|
+
calendar_ids: Xe ? [Ge] : be,
|
|
190
|
+
open_hours: (k == null ? void 0 : k[g.email]) ?? ((De = g.availability) == null ? void 0 : De.open_hours) ?? []
|
|
191
191
|
},
|
|
192
192
|
booking: {
|
|
193
|
-
calendar_id:
|
|
193
|
+
calendar_id: Ge
|
|
194
194
|
}
|
|
195
195
|
};
|
|
196
196
|
}
|
|
197
|
-
const ee =
|
|
197
|
+
const ee = v != null && v[g.email] ? { calendar_id: v == null ? void 0 : v[g.email] } : (g == null ? void 0 : g.booking) ?? void 0, pe = (h == null ? void 0 : h[g.email]) ?? ((Re = g.availability) == null ? void 0 : Re.calendar_ids) ?? ["primary"], Qe = pe.length === 1 && pe[0] === "primary";
|
|
198
198
|
return {
|
|
199
|
-
...
|
|
199
|
+
...g,
|
|
200
200
|
timezone: Q,
|
|
201
|
-
availability:
|
|
202
|
-
calendar_ids: Qe && typeof ee < "u" ? [ee == null ? void 0 : ee.calendar_id] :
|
|
203
|
-
open_hours: (
|
|
201
|
+
availability: g.availability ? {
|
|
202
|
+
calendar_ids: Qe && typeof ee < "u" ? [ee == null ? void 0 : ee.calendar_id] : pe,
|
|
203
|
+
open_hours: (k == null ? void 0 : k[g.email]) ?? ((Me = g.availability) == null ? void 0 : Me.open_hours) ?? []
|
|
204
204
|
} : void 0,
|
|
205
205
|
booking: ee
|
|
206
206
|
};
|
|
@@ -209,63 +209,63 @@ const Ze = class {
|
|
|
209
209
|
event_booking: {
|
|
210
210
|
title: (o == null ? void 0 : o.toString()) ?? "",
|
|
211
211
|
description: (l == null ? void 0 : l.toString()) ?? "",
|
|
212
|
-
location: (
|
|
213
|
-
booking_type: (
|
|
214
|
-
timezone: (
|
|
215
|
-
conferencing:
|
|
212
|
+
location: (f == null ? void 0 : f.toString()) ?? "",
|
|
213
|
+
booking_type: (m == null ? void 0 : m.toString()) ?? "booking",
|
|
214
|
+
timezone: (c == null ? void 0 : c.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
215
|
+
conferencing: U,
|
|
216
216
|
reminders: A,
|
|
217
|
-
disable_emails: typeof
|
|
217
|
+
disable_emails: typeof V == "boolean" ? V : !1
|
|
218
218
|
},
|
|
219
219
|
scheduler: {
|
|
220
|
-
cancellation_policy:
|
|
221
|
-
available_days_in_future:
|
|
222
|
-
min_cancellation_notice:
|
|
223
|
-
min_booking_notice:
|
|
224
|
-
hide_additional_guests:
|
|
225
|
-
hide_cancellation_options:
|
|
220
|
+
cancellation_policy: P ?? "",
|
|
221
|
+
available_days_in_future: x ?? 30,
|
|
222
|
+
min_cancellation_notice: T ?? 0,
|
|
223
|
+
min_booking_notice: z ?? 60,
|
|
224
|
+
hide_additional_guests: B ?? !1,
|
|
225
|
+
hide_cancellation_options: N ?? !1,
|
|
226
226
|
hide_rescheduling_options: R ?? !1,
|
|
227
|
-
additional_fields:
|
|
228
|
-
email_template:
|
|
229
|
-
...
|
|
227
|
+
additional_fields: M,
|
|
228
|
+
email_template: I ? {
|
|
229
|
+
...I,
|
|
230
230
|
organizer_locale: K || "en",
|
|
231
|
-
logo:
|
|
231
|
+
logo: I.logo || ""
|
|
232
232
|
} : void 0,
|
|
233
|
-
confirmation_redirect_url:
|
|
233
|
+
confirmation_redirect_url: j
|
|
234
234
|
},
|
|
235
|
-
appearance:
|
|
236
|
-
}, te =
|
|
237
|
-
this.isConfigRoundRobin(
|
|
238
|
-
const ne = (
|
|
235
|
+
appearance: J
|
|
236
|
+
}, te = ge(this.selectedConfiguration, q || {}), Z = this.action === "create" ? te : q;
|
|
237
|
+
this.isConfigRoundRobin(Z) && (Z.participants = Z.participants.map((g) => ({ ...g, is_organizer: void 0 })));
|
|
238
|
+
const ne = (g) => {
|
|
239
239
|
this.isLoading = !1, this.changesSaved = !0, setTimeout(() => {
|
|
240
240
|
this.changesSaved = !1;
|
|
241
241
|
}, 5e3);
|
|
242
|
-
}, ae = this.checkForBookingFormErrors(
|
|
242
|
+
}, ae = this.checkForBookingFormErrors(Z), oe = ((ze = this.configurations) == null ? void 0 : ze.find((g) => {
|
|
243
243
|
var Q;
|
|
244
|
-
return
|
|
245
|
-
})) || {},
|
|
246
|
-
ae ||
|
|
244
|
+
return g.id === ((Q = this.selectedConfiguration) == null ? void 0 : Q.id);
|
|
245
|
+
})) || {}, se = this.checkForOrganizerConfirmationError(ge(Z, oe));
|
|
246
|
+
ae || se || this.schedulerConfigChanged.emit({ config: Z, resetLoadingState: ne, action: this.action, host: this.host });
|
|
247
247
|
}, this.isConfigRoundRobin = (t) => {
|
|
248
|
-
var a, s,
|
|
249
|
-
return ((s = (a = t == null ? void 0 : t.availability) == null ? void 0 : a.availability_rules) == null ? void 0 : s.availability_method) === "max-availability" || ((o = (
|
|
248
|
+
var a, s, r, o;
|
|
249
|
+
return ((s = (a = t == null ? void 0 : t.availability) == null ? void 0 : a.availability_rules) == null ? void 0 : s.availability_method) === "max-availability" || ((o = (r = t.availability) == null ? void 0 : r.availability_rules) == null ? void 0 : o.availability_method) === "max-fairness";
|
|
250
250
|
}, this.checkForOrganizerConfirmationError = (t) => {
|
|
251
|
-
var l,
|
|
251
|
+
var l, i;
|
|
252
252
|
let a = !1, s = "";
|
|
253
|
-
const
|
|
254
|
-
return
|
|
253
|
+
const r = ((l = t.event_booking) == null ? void 0 : l.booking_type) === "organizer-confirmation", o = (i = t.scheduler) == null ? void 0 : i.organizer_confirmation_url;
|
|
254
|
+
return r && !o && (s += "Organizer confirmation URL is required when using organizer confirmation booking type.", a = !0), a && (this.isLoading = !1, this.host.setError(new Error(s))), a;
|
|
255
255
|
}, this.checkForBookingFormErrors = (t) => {
|
|
256
256
|
var o;
|
|
257
257
|
let a = !1, s = "";
|
|
258
|
-
const
|
|
259
|
-
return
|
|
260
|
-
const
|
|
261
|
-
if (
|
|
262
|
-
s +=
|
|
258
|
+
const r = (o = t.scheduler) == null ? void 0 : o.additional_fields;
|
|
259
|
+
return r && (s = d.t("nylasEditorTabs.bookingFormError"), Object.entries(r).forEach((l) => {
|
|
260
|
+
const i = l[1];
|
|
261
|
+
if (i.label === "") {
|
|
262
|
+
s += d.t("nylasEditorTabs.bookingFormError_label", { type: i.type }), a = !0;
|
|
263
263
|
return;
|
|
264
264
|
}
|
|
265
|
-
if (
|
|
266
|
-
for (const
|
|
267
|
-
if (
|
|
268
|
-
s +=
|
|
265
|
+
if (i.options) {
|
|
266
|
+
for (const c of i.options)
|
|
267
|
+
if (c.trim() === "") {
|
|
268
|
+
s += d.t("nylasEditorTabs.bookingFormError_option", { label: i.label, type: i.type }), a = !0;
|
|
269
269
|
break;
|
|
270
270
|
}
|
|
271
271
|
}
|
|
@@ -283,7 +283,7 @@ const Ze = class {
|
|
|
283
283
|
});
|
|
284
284
|
}
|
|
285
285
|
selectedLanguageChangedHandler(e, t) {
|
|
286
|
-
e !== t && (
|
|
286
|
+
e !== t && (d.changeLanguage(e), this.error && (this.error = d.t("fixFormErrors")));
|
|
287
287
|
}
|
|
288
288
|
async schedulerConfigCreatedEventHandler(e) {
|
|
289
289
|
return this.schedulerConfigCreated.emit(e);
|
|
@@ -299,12 +299,12 @@ const Ze = class {
|
|
|
299
299
|
}
|
|
300
300
|
componentDidLoad() {
|
|
301
301
|
var t, a;
|
|
302
|
-
b("[nylas-editor-tabs]", "componentDidLoad"), this.enableUserFeedback && !
|
|
302
|
+
b("[nylas-editor-tabs]", "componentDidLoad"), this.enableUserFeedback && !je() && $e({
|
|
303
303
|
dsn: "https://9d5731f1c77ca84c9ed3fb9b3ccf7ee1@o74852.ingest.us.sentry.io/4507889638178816",
|
|
304
|
-
release: "1.4.
|
|
304
|
+
release: "1.4.5",
|
|
305
305
|
integrations: (s) => [
|
|
306
|
-
...s.filter((
|
|
307
|
-
|
|
306
|
+
...s.filter((r) => !1),
|
|
307
|
+
Ze({
|
|
308
308
|
colorScheme: "system",
|
|
309
309
|
autoInject: !1
|
|
310
310
|
})
|
|
@@ -330,82 +330,82 @@ const Ze = class {
|
|
|
330
330
|
this.showFeedbackModal = !1;
|
|
331
331
|
}
|
|
332
332
|
feedbackSubmittedHandler(e) {
|
|
333
|
-
var s,
|
|
333
|
+
var s, r, o, l, i, c;
|
|
334
334
|
const a = {
|
|
335
|
-
eventId:
|
|
335
|
+
eventId: Je("Scheduler Editor User Feedback", {
|
|
336
336
|
extra: {
|
|
337
337
|
configId: (s = this.selectedConfiguration) == null ? void 0 : s.id,
|
|
338
|
-
slug: (
|
|
338
|
+
slug: (r = this.selectedConfiguration) == null ? void 0 : r.slug
|
|
339
339
|
}
|
|
340
340
|
}),
|
|
341
341
|
message: e.detail.feedback
|
|
342
342
|
};
|
|
343
|
-
|
|
343
|
+
Ve(a, {
|
|
344
344
|
includeReplay: !0,
|
|
345
345
|
captureContext: {
|
|
346
346
|
tags: {
|
|
347
347
|
"nylas-web-element": "nylas-scheduler-editor",
|
|
348
|
-
"nylas-web-element-version": "1.4.
|
|
348
|
+
"nylas-web-element-version": "1.4.5",
|
|
349
349
|
"nylas-config-id": (o = this.selectedConfiguration) == null ? void 0 : o.id,
|
|
350
350
|
"nylas-slug": (l = this.selectedConfiguration) == null ? void 0 : l.slug,
|
|
351
351
|
"host-url": window.location.href
|
|
352
352
|
},
|
|
353
353
|
extra: {
|
|
354
|
-
configId: (
|
|
355
|
-
slug: (
|
|
354
|
+
configId: (i = this.selectedConfiguration) == null ? void 0 : i.id,
|
|
355
|
+
slug: (c = this.selectedConfiguration) == null ? void 0 : c.slug
|
|
356
356
|
}
|
|
357
357
|
}
|
|
358
358
|
}), this.showFeedbackModal = !1;
|
|
359
359
|
}
|
|
360
360
|
getFormStateFromConfig(e) {
|
|
361
|
-
var a, s,
|
|
361
|
+
var a, s, r, o, l, i, c, p, f, m, w, x, T, z, P, S, B, N, R, E, k, M, h, U, v, A, I, j, H, $, J, Y, V, K, C, G, W;
|
|
362
362
|
let t = (a = e == null ? void 0 : e.participants) == null ? void 0 : a.find((F) => F.is_organizer);
|
|
363
|
-
return !t && ((
|
|
363
|
+
return !t && ((r = (s = e == null ? void 0 : e.availability) == null ? void 0 : s.availability_rules) == null ? void 0 : r.availability_method) !== "collective" && (t = (o = e == null ? void 0 : e.participants) == null ? void 0 : o.find((F) => {
|
|
364
364
|
var L;
|
|
365
365
|
return F.email === ((L = this.currentUser) == null ? void 0 : L.email);
|
|
366
366
|
}), t && (t.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."), {
|
|
367
367
|
title: ((l = e == null ? void 0 : e.event_booking) == null ? void 0 : l.title) ?? "",
|
|
368
|
-
description: ((
|
|
369
|
-
duration: ((
|
|
368
|
+
description: ((i = e == null ? void 0 : e.event_booking) == null ? void 0 : i.description) ?? "",
|
|
369
|
+
duration: ((p = (c = e == null ? void 0 : e.availability) == null ? void 0 : c.duration_minutes) == null ? void 0 : p.toString()) ?? "30",
|
|
370
370
|
availability: {
|
|
371
|
-
timezone: ((
|
|
372
|
-
openHours: ((
|
|
371
|
+
timezone: ((f = e == null ? void 0 : e.event_booking) == null ? void 0 : f.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
372
|
+
openHours: ((w = (m = e == null ? void 0 : e.availability) == null ? void 0 : m.availability_rules) == null ? void 0 : w.default_open_hours) ?? Ae
|
|
373
373
|
},
|
|
374
|
-
additionalFields: ((
|
|
375
|
-
conferencing: ((
|
|
376
|
-
calendarIds: ((
|
|
374
|
+
additionalFields: ((x = e == null ? void 0 : e.scheduler) == null ? void 0 : x.additional_fields) ?? {},
|
|
375
|
+
conferencing: ((T = e == null ? void 0 : e.event_booking) == null ? void 0 : T.conferencing) ?? {},
|
|
376
|
+
calendarIds: ((z = t == null ? void 0 : t.availability) == null ? void 0 : z.calendar_ids) ?? [],
|
|
377
377
|
participants: (e == null ? void 0 : e.participants) ?? [],
|
|
378
|
-
bookingCalendar: ((
|
|
378
|
+
bookingCalendar: ((P = t == null ? void 0 : t.booking) == null ? void 0 : P.calendar_id) ?? (t == null ? void 0 : t.email) ?? "",
|
|
379
379
|
location: ((S = e == null ? void 0 : e.event_booking) == null ? void 0 : S.location) ?? "",
|
|
380
|
-
bookingType: ((
|
|
381
|
-
buffer: ((R = (
|
|
382
|
-
cancellationPolicy: ((
|
|
383
|
-
availableDaysInFuture: ((
|
|
384
|
-
minCancellationNotice: ((
|
|
385
|
-
minBookingNotice: ((
|
|
380
|
+
bookingType: ((B = e == null ? void 0 : e.event_booking) == null ? void 0 : B.booking_type) ?? "booking",
|
|
381
|
+
buffer: ((R = (N = e == null ? void 0 : e.availability) == null ? void 0 : N.availability_rules) == null ? void 0 : R.buffer) ?? { before: 0, after: 0 },
|
|
382
|
+
cancellationPolicy: ((E = e == null ? void 0 : e.scheduler) == null ? void 0 : E.cancellation_policy) ?? "",
|
|
383
|
+
availableDaysInFuture: ((k = e == null ? void 0 : e.scheduler) == null ? void 0 : k.available_days_in_future) ?? 30,
|
|
384
|
+
minCancellationNotice: ((M = e == null ? void 0 : e.scheduler) == null ? void 0 : M.min_cancellation_notice) ?? 0,
|
|
385
|
+
minBookingNotice: ((h = e == null ? void 0 : e.scheduler) == null ? void 0 : h.min_booking_notice) ?? 60,
|
|
386
386
|
timeslotInterval: {
|
|
387
|
-
interval: ((
|
|
387
|
+
interval: ((U = e == null ? void 0 : e.availability) == null ? void 0 : U.interval_minutes) ?? ((v = e == null ? void 0 : e.availability) == null ? void 0 : v.duration_minutes),
|
|
388
388
|
roundTo: (A = e == null ? void 0 : e.availability) == null ? void 0 : A.round_to
|
|
389
389
|
},
|
|
390
|
-
additionalGuestsHidden: ((
|
|
391
|
-
hideCancellationOptions: ((
|
|
392
|
-
hideReschedulingOptions: ((
|
|
393
|
-
participantBookingCalendars: ((
|
|
394
|
-
var
|
|
395
|
-
return (
|
|
390
|
+
additionalGuestsHidden: ((I = e == null ? void 0 : e.scheduler) == null ? void 0 : I.hide_additional_guests) ?? !1,
|
|
391
|
+
hideCancellationOptions: ((j = e == null ? void 0 : e.scheduler) == null ? void 0 : j.hide_cancellation_options) ?? !1,
|
|
392
|
+
hideReschedulingOptions: ((H = e == null ? void 0 : e.scheduler) == null ? void 0 : H.hide_rescheduling_options) ?? !1,
|
|
393
|
+
participantBookingCalendars: (($ = e == null ? void 0 : e.participants) == null ? void 0 : $.reduce((F, L) => {
|
|
394
|
+
var D, q;
|
|
395
|
+
return (D = L.booking) != null && D.calendar_id && (F[L.email] = (q = L.booking) == null ? void 0 : q.calendar_id), F;
|
|
396
396
|
})) ?? {},
|
|
397
|
-
participantCalendars: ((
|
|
398
|
-
var
|
|
399
|
-
return F[L.email] = (
|
|
397
|
+
participantCalendars: ((J = e == null ? void 0 : e.participants) == null ? void 0 : J.reduce((F, L) => {
|
|
398
|
+
var D;
|
|
399
|
+
return F[L.email] = (D = L.availability) == null ? void 0 : D.calendar_ids, F;
|
|
400
400
|
}, {})) ?? {},
|
|
401
|
-
reminders: (
|
|
402
|
-
emailTemplate: (
|
|
401
|
+
reminders: (Y = e == null ? void 0 : e.event_booking) == null ? void 0 : Y.reminders,
|
|
402
|
+
emailTemplate: (V = e == null ? void 0 : e.scheduler) == null ? void 0 : V.email_template,
|
|
403
403
|
redirectUrl: (K = e == null ? void 0 : e.scheduler) == null ? void 0 : K.confirmation_redirect_url,
|
|
404
404
|
slug: e == null ? void 0 : e.slug,
|
|
405
405
|
appearance: e == null ? void 0 : e.appearance,
|
|
406
406
|
name: e == null ? void 0 : e.name,
|
|
407
|
-
disableEmails: (
|
|
408
|
-
organizerLocale: (W = (
|
|
407
|
+
disableEmails: (C = e == null ? void 0 : e.event_booking) == null ? void 0 : C.disable_emails,
|
|
408
|
+
organizerLocale: (W = (G = e == null ? void 0 : e.scheduler) == null ? void 0 : G.email_template) == null ? void 0 : W.organizer_locale
|
|
409
409
|
};
|
|
410
410
|
}
|
|
411
411
|
setFormState(e, t) {
|
|
@@ -523,19 +523,19 @@ const Ze = class {
|
|
|
523
523
|
}
|
|
524
524
|
render() {
|
|
525
525
|
var e, t;
|
|
526
|
-
return b("[nylas-editor-tabs]", "render", this.formState), n(
|
|
526
|
+
return b("[nylas-editor-tabs]", "render", this.formState), n(le, { key: "520498cc06164904f9272efc548fbbc3d6fa9436" }, n("form", { key: "345b225d6c2c4b4e9a687e4fcf6b502d4c5270fc", onSubmit: this.formSubmissionHandler, class: "scheduler-editor", ref: (a) => this.formRef = a, noValidate: !0 }, this.mode === "app" ? n("div", { class: "form-contents", part: "editor__form-contents net__form-contents" }, n("div", { class: "tabs", part: "editor__tabs net__tabs" }, n("button", { name: u.EventInfo, class: { tab: !0, active: this.activeTab == u.EventInfo, hide: this.hideTab(u.EventInfo) }, part: "editortab__event-info net__tab-event-info", onClick: (a) => this.setActiveTab(a, u.EventInfo) }, n("calendar-info-icon", { width: "16", height: "16" }), d.t("eventInfoTab")), n("button", { name: u.Availability, class: { tab: !0, active: this.activeTab == u.Availability, hide: this.hideTab(u.Availability) }, part: "editortab__availability net__tab-availability", onClick: (a) => this.setActiveTab(a, u.Availability) }, n("calendar-patterns-icon", { width: "16", height: "16" }), d.t("availabilityTab")), n("button", { name: u.Participants, class: { tab: !0, active: this.activeTab == u.Participants, hide: this.hideTab(u.Participants) }, part: "editortab__participants net__tab-participants", onClick: (a) => this.setActiveTab(a, u.Participants) }, n("people-icon", { width: "16", height: "16" }), d.t("participantsTab")), n("button", { name: u.BookingOptions, class: { tab: !0, active: this.activeTab == u.BookingOptions, hide: this.hideTab(u.BookingOptions) }, part: "editortab__booking-options net__tab-booking-options", onClick: (a) => this.setActiveTab(a, u.BookingOptions) }, n("flow-icon", { width: "16", height: "16" }), d.t("bookingOptionsTab")), n("button", { name: u.BookingForm, class: { tab: !0, active: this.activeTab == "bookingForm", hide: this.hideTab(u.BookingForm) }, part: "editortab__booking-form net__tab-booking-form", onClick: (a) => this.setActiveTab(a, u.BookingForm) }, this.activeTab == u.BookingForm ? n("calendar-agenda-fill-icon", { width: "16", height: "16" }) : n("calendar-agenda-icon", { width: "16", height: "16" }), d.t("bookingFormTab")), n("button", { name: u.Communications, class: { tab: !0, active: this.activeTab == "communications", hide: this.hideTab(u.Communications) }, onClick: (a) => this.setActiveTab(a, u.Communications), part: "editortab__communications net__tab-communications" }, this.activeTab == u.Communications ? n("envelope-fill-icon", { width: "16", height: "16" }) : n("envelope-icon", { width: "16", height: "16" }), d.t("communicationsTab")), n("button", { name: u.PageStyles, class: { tab: !0, active: this.activeTab == "pageStyles", hide: this.hideTab(u.PageStyles) }, onClick: (a) => this.setActiveTab(a, u.PageStyles), part: "editortab__page-styles net__tab-page-styles" }, this.activeTab == u.PageStyles ? n("paintbrush-fill-icon", { width: "16", height: "16" }) : n("paintbrush-icon", { width: "16", height: "16" }), d.t("pageStylesTab"))), n("div", { class: "tab-content", part: "editor__tab-content net__tab-content" }, n(dt, { formState: this.formState, activeTab: this.activeTab, currentUser: this.currentUser, calendars: this.calendars, id: ((e = this.selectedConfiguration) == null ? void 0 : e.id) ?? "new", i18next: d }))) : n("div", { class: "composable", key: (t = this.selectedConfiguration) == null ? void 0 : t.id }, n("slot", null)), n("div", { key: "338321713b0f06ea47004f0e1e15a4236819e9db", class: "footer", part: "editor__footer net__footer" }, n("div", { key: "76e1844d8c78a547c69417c13f789f9c25bb7aa1", class: "preview", part: "editor__footer-preview net__footer-preview" }, this.enableUserFeedback && n("button-component", { title: "Share your feedback", id: "report-issue", variant: "basic", onClick: (a) => this.onFeedbackClick(a) }, n("feedback-icon", null))), n("div", { key: "c0fdc46cafb3e6dabaef1a05757d03b92a120b48", class: "buttons", part: "editor__footer-buttons net__footer-buttons" }, n("p", { key: "09c7bde4256d60ac2e161750aa2d5b0e140508d3", class: {
|
|
527
527
|
"unsaved-changes": this.hasUnsavedChanges && !this.changesSaved,
|
|
528
528
|
"saved-changes": this.changesSaved,
|
|
529
529
|
error: this.error !== "",
|
|
530
530
|
"error-full-width": this.error !== "" && this.action === "create"
|
|
531
|
-
} }, this.error !== "" ? this.error : "", this.error == "" && this.hasUnsavedChanges && !this.changesSaved ?
|
|
532
|
-
a.preventDefault(), this.previewButtonClicked.emit(this.host).defaultPrevented || window.open(
|
|
533
|
-
}, variant: "basic" }, n("eye-icon", null)), n("button-component", { key: "
|
|
531
|
+
} }, this.error !== "" ? this.error : "", this.error == "" && this.hasUnsavedChanges && !this.changesSaved ? d.t("unsavedChangesLabel") : this.error == "" && this.changesSaved ? `${d.t("changesSavedLabel")}!` : ""), this.schedulerPreviewLink !== "" && this.action === "edit" && n("button-component", { title: "Preview", type: "button", disabled: this.isLoading, clickHandler: (a) => {
|
|
532
|
+
a.preventDefault(), this.previewButtonClicked.emit(this.host).defaultPrevented || window.open(re(this.schedulerPreviewLink, this.selectedConfiguration), "_blank");
|
|
533
|
+
}, variant: "basic" }, n("eye-icon", null)), n("button-component", { key: "227d2a0f91074a802be81f12247bc5bca4245d22", type: "button", disabled: this.isLoading, clickHandler: (a) => {
|
|
534
534
|
a.preventDefault(), this.cancelButtonClick.emit(), this.error = "";
|
|
535
|
-
}, variant: "basic", part: "editor__footer-cancel net__footer-cancel" },
|
|
535
|
+
}, variant: "basic", part: "editor__footer-cancel net__footer-cancel" }, d.t("backButton")), n("button-component", { key: "65fe1b45c389c6b6d3406ab07521ea1640677778", type: "submit", disabled: this.isLoading, part: "editor__footer-cta, net__footer-cta" }, this.isLoading ? n("span", null, d.t("savingButtonText"), n("loading-icon", null), " ") : this.action === "create" ? `${d.t("createButtonText")}` : `${d.t("saveChangesButtonText")}`)))), this.showFeedbackModal && n("nylas-feedback-form", null));
|
|
536
536
|
}
|
|
537
537
|
get host() {
|
|
538
|
-
return
|
|
538
|
+
return de(this);
|
|
539
539
|
}
|
|
540
540
|
static get watchers() {
|
|
541
541
|
return {
|
|
@@ -546,7 +546,7 @@ const Ze = class {
|
|
|
546
546
|
}
|
|
547
547
|
};
|
|
548
548
|
bt([
|
|
549
|
-
|
|
549
|
+
ce({
|
|
550
550
|
name: "nylas-editor-tabs",
|
|
551
551
|
stateToProps: /* @__PURE__ */ new Map([
|
|
552
552
|
["schedulerConfig.calendars", "calendars"],
|
|
@@ -558,16 +558,16 @@ bt([
|
|
|
558
558
|
]),
|
|
559
559
|
eventToProps: {
|
|
560
560
|
schedulerConfigChanged: async (e, t) => {
|
|
561
|
-
const { resetLoadingState: a, host: s, action:
|
|
562
|
-
const [
|
|
563
|
-
!
|
|
561
|
+
const { resetLoadingState: a, host: s, action: r, config: o } = e.detail, l = (i) => {
|
|
562
|
+
const [c, p] = i;
|
|
563
|
+
!c && p ? s.setError(p) : c && !p && r === "create" && (s.schedulerConfigCreatedEventHandler({ config: c, action: r, host: s }), t.schedulerConfigStore.set("selectedEventType", void 0)), a && a(e);
|
|
564
564
|
};
|
|
565
|
-
if (
|
|
566
|
-
const
|
|
567
|
-
l(
|
|
565
|
+
if (r === "edit") {
|
|
566
|
+
const i = await t.schedulerConfig.updateConfiguration(o);
|
|
567
|
+
l(i);
|
|
568
568
|
} else {
|
|
569
|
-
const
|
|
570
|
-
l(
|
|
569
|
+
const i = await t.schedulerConfig.createConfiguration(o);
|
|
570
|
+
l(i);
|
|
571
571
|
}
|
|
572
572
|
},
|
|
573
573
|
cancelButtonClick: async (e, t) => {
|
|
@@ -593,27 +593,27 @@ bt([
|
|
|
593
593
|
]),
|
|
594
594
|
fireRegisterEvent: !0
|
|
595
595
|
}),
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
],
|
|
600
|
-
|
|
601
|
-
var
|
|
596
|
+
ue("design:type", Function),
|
|
597
|
+
ue("design:paramtypes", []),
|
|
598
|
+
ue("design:returntype", void 0)
|
|
599
|
+
], We.prototype, "render", null);
|
|
600
|
+
We.style = pt;
|
|
601
|
+
var y;
|
|
602
602
|
(function(e) {
|
|
603
603
|
e.BookingOptions = "bookingOptions", e.Communications = "communications", e.BookingForm = "bookingForm", e.PageStyles = "pageStyles", e.CalendarView = "calendarView";
|
|
604
|
-
})(
|
|
604
|
+
})(y || (y = {}));
|
|
605
605
|
function ut({ id: e, formState: t, activeTab: a }, s) {
|
|
606
606
|
return n(
|
|
607
607
|
ie,
|
|
608
608
|
null,
|
|
609
|
-
a ===
|
|
609
|
+
a === y.CalendarView && n(
|
|
610
610
|
"div",
|
|
611
|
-
{ key: `calendar-view-${e}`, class: { hide: a !==
|
|
611
|
+
{ key: `calendar-view-${e}`, class: { hide: a !== y.CalendarView, "calendar-view": !0 } },
|
|
612
612
|
n("nylas-event-calendar", null)
|
|
613
613
|
),
|
|
614
614
|
n(
|
|
615
615
|
"div",
|
|
616
|
-
{ key: `booking-options-${e}`, class: { hide: a !==
|
|
616
|
+
{ key: `booking-options-${e}`, class: { hide: a !== y.BookingOptions } },
|
|
617
617
|
n("nylas-scheduling-method", { name: "availability-method", readOnly: !0, exportparts: "nsm, nsm__header, nsm__input-label, nsm__dropdown, nsm__dropdown-button, nsm__dropdown-content" }),
|
|
618
618
|
n(
|
|
619
619
|
"nylas-custom-booking-flow",
|
|
@@ -631,6 +631,7 @@ function ut({ id: e, formState: t, activeTab: a }, s) {
|
|
|
631
631
|
n(
|
|
632
632
|
"div",
|
|
633
633
|
{ slot: "inputs" },
|
|
634
|
+
n("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" }),
|
|
634
635
|
n("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" }),
|
|
635
636
|
n("nylas-cancellation-policy", { name: "cancellation-policy", exportparts: "ncpolicy, ncpolicy__textarea" })
|
|
636
637
|
)
|
|
@@ -639,7 +640,7 @@ function ut({ id: e, formState: t, activeTab: a }, s) {
|
|
|
639
640
|
),
|
|
640
641
|
n(
|
|
641
642
|
"div",
|
|
642
|
-
{ key: `communications-${e}`, class: { hide: a !==
|
|
643
|
+
{ key: `communications-${e}`, class: { hide: a !== y.Communications } },
|
|
643
644
|
n("nylas-disable-emails", { name: "disable-emails", exportparts: "nde, nde__toggle-label, nde_toggle-input, nde_toggle-slider" }),
|
|
644
645
|
!(t != null && t.disableEmails) && n(
|
|
645
646
|
ie,
|
|
@@ -650,35 +651,35 @@ function ut({ id: e, formState: t, activeTab: a }, s) {
|
|
|
650
651
|
),
|
|
651
652
|
n(
|
|
652
653
|
"div",
|
|
653
|
-
{ key: `page-styles-${e}`, class: { hide: a !==
|
|
654
|
+
{ key: `page-styles-${e}`, class: { hide: a !== y.PageStyles } },
|
|
654
655
|
n("nylas-custom-event-slug", { name: "custom-event-slug", exportparts: "nces, nces__body, nces__header, nces__drawer-toggle--container, nces__input-textfield" }),
|
|
655
656
|
n("nylas-page-name", { name: "page-name", requirePageName: !0, exportparts: "npn, npn__body, npn__header, npn__drawer-toggle--container, npn__input-textfield" }),
|
|
656
657
|
n("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)
|
|
657
658
|
),
|
|
658
659
|
n(
|
|
659
660
|
"div",
|
|
660
|
-
{ key: `booking-form-${e}`, class: { hide: a !==
|
|
661
|
+
{ key: `booking-form-${e}`, class: { hide: a !== y.BookingForm } },
|
|
661
662
|
n("nylas-booking-form-config", { name: "additional-fields", exportparts: "nbfc, nbfc__header, nbfc__add_field, nbfc__add_field-button, nbfc__add_field-content, nbfc__static_fields, nbfc__additional_fields, nbfc__form-field, nbfc__form-field-header, nbfc__form-field-content" })
|
|
662
663
|
)
|
|
663
664
|
);
|
|
664
665
|
}
|
|
665
666
|
const ht = '.sc-nylas-editor-tabs-group-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-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff}.scheduler-editor.sc-nylas-editor-tabs-group{display:flex;flex-direction:column;height:inherit;position:relative}.scheduler-editor.sc-nylas-editor-tabs-group div.return-to-calendar-view.sc-nylas-editor-tabs-group{display:flex;border-bottom:1px solid var(--nylas-base-200)}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group{display:grid;grid-template-columns:minmax(224px, 25%) 1fr;height:auto;overflow-y:auto;min-height:calc(100% - 80px - 48px)}@media screen and (max-width: 768px){.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group{display:table-column-group;height:auto;min-height:calc(100% - 80px - 196px - 48px)}}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tabs.sc-nylas-editor-tabs-group{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-group .form-contents.sc-nylas-editor-tabs-group .tabs.sc-nylas-editor-tabs-group{border-right:none}}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tabs.sc-nylas-editor-tabs-group .tab.sc-nylas-editor-tabs-group{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-group .form-contents.sc-nylas-editor-tabs-group .tabs.sc-nylas-editor-tabs-group .tab.sc-nylas-editor-tabs-group:not(:first-of-type){margin-top:0.25rem}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tabs.sc-nylas-editor-tabs-group .tab.sc-nylas-editor-tabs-group:last-of-type{margin-bottom:0.25rem}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tabs.sc-nylas-editor-tabs-group .tab.active.sc-nylas-editor-tabs-group{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-group .form-contents.sc-nylas-editor-tabs-group .tabs.sc-nylas-editor-tabs-group .tab.hide.sc-nylas-editor-tabs-group{display:none}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group{max-width:692px;overflow-y:auto;overflow-x:hidden}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group .hide.sc-nylas-editor-tabs-group{display:none}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group .calendar-view.sc-nylas-editor-tabs-group{position:absolute;top:0;left:0;height:calc(100% - 80px);width:-webkit-fill-available;background:var(--nylas-base-0)}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group nylas-event-info.sc-nylas-editor-tabs-group,.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group nylas-event-limits.sc-nylas-editor-tabs-group{width:inherit}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group nylas-event-info.sc-nylas-editor-tabs-group div[slot=inputs].sc-nylas-editor-tabs-group,.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group nylas-event-limits.sc-nylas-editor-tabs-group div[slot=inputs].sc-nylas-editor-tabs-group{display:flex;flex-direction:column;gap:1rem}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group .tab-header.sc-nylas-editor-tabs-group{display:flex;flex-direction:column;margin:1rem 1rem 0.5rem;row-gap:4px}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group .tab-header.sc-nylas-editor-tabs-group h3.sc-nylas-editor-tabs-group{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-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group .tab-header.sc-nylas-editor-tabs-group p.sc-nylas-editor-tabs-group{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-group{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-group{flex-direction:column;height:auto;z-index:2}}.footer.sc-nylas-editor-tabs-group .preview.sc-nylas-editor-tabs-group{display:flex;gap:16px}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs-group .preview.sc-nylas-editor-tabs-group{margin-top:1rem;width:100%}}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group{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-group .buttons.sc-nylas-editor-tabs-group{flex-direction:column-reverse;width:100%}}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group .footer-buttons__row.sc-nylas-editor-tabs-group{display:flex;gap:16px}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group .footer-buttons__row.sc-nylas-editor-tabs-group{width:100%}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group .footer-buttons__row.sc-nylas-editor-tabs-group button-component[title=Preview].sc-nylas-editor-tabs-group{width:48px}}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group p.sc-nylas-editor-tabs-group{max-width:524px}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group p.unsaved-changes.sc-nylas-editor-tabs-group{color:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group p.saved-changes.sc-nylas-editor-tabs-group{color:var(--nylas-success)}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group p.error.sc-nylas-editor-tabs-group{color:var(--nylas-error)}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group p.error-full-width.sc-nylas-editor-tabs-group{max-width:660px}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group button-component.sc-nylas-editor-tabs-group{width:100%}}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group button.sc-nylas-editor-tabs-group{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-group .buttons.sc-nylas-editor-tabs-group button.sc-nylas-editor-tabs-group:hover{background:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group button.sc-nylas-editor-tabs-group:active{background:var(--nylas-base-800)}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group button.sc-nylas-editor-tabs-group:disabled{background:var(--nylas-base-300);cursor:not-allowed}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group button.sc-nylas-editor-tabs-group span.sc-nylas-editor-tabs-group{display:flex;align-items:center;justify-content:center;gap:0.5rem}button-component#report-issue.sc-nylas-editor-tabs-group{width:auto}nylas-feedback-form.sc-nylas-editor-tabs-group{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}', yt = ht;
|
|
666
667
|
var ft = function(e, t, a, s) {
|
|
667
|
-
var
|
|
668
|
+
var r = arguments.length, o = r < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, a) : s, l;
|
|
668
669
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
669
670
|
o = Reflect.decorate(e, t, a, s);
|
|
670
671
|
else
|
|
671
|
-
for (var
|
|
672
|
-
(l = e[
|
|
673
|
-
return
|
|
674
|
-
},
|
|
672
|
+
for (var i = e.length - 1; i >= 0; i--)
|
|
673
|
+
(l = e[i]) && (o = (r < 3 ? l(o) : r > 3 ? l(t, a, o) : l(t, a)) || o);
|
|
674
|
+
return r > 3 && o && Object.defineProperty(t, a, o), o;
|
|
675
|
+
}, he = function(e, t) {
|
|
675
676
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
676
677
|
return Reflect.metadata(e, t);
|
|
677
678
|
};
|
|
678
|
-
const
|
|
679
|
+
const qe = class {
|
|
679
680
|
constructor(e) {
|
|
680
681
|
X(this, e), this.schedulerConfigChanged = _(this, "schedulerConfigChanged", 7), this.schedulerConfigCreated = _(this, "schedulerConfigCreated", 7), this.cancelButtonClick = _(this, "cancelButtonClick", 7), this.formSubmitted = _(this, "formSubmitted", 7), this.previewButtonClicked = _(this, "previewButtonClicked", 7), this.schedulerEditorFormUpdated = _(this, "schedulerEditorFormUpdated", 7), this.groupEventCreateTriggered = _(this, "groupEventCreateTriggered", 7), this.groupEventUpdateTriggered = _(this, "groupEventUpdateTriggered", 7), this.groupEventDeleteTriggered = _(this, "groupEventDeleteTriggered", 7), this.groupEventImportTriggered = _(this, "groupEventImportTriggered", 7), this.saveGroupEventChangesError = _(this, "saveGroupEventChangesError", 7), this.formSubmissionHandler = async (t) => {
|
|
681
|
-
var
|
|
682
|
+
var G, W, F, L, D, q, te, Z, ne, ae, oe;
|
|
682
683
|
t.preventDefault();
|
|
683
684
|
const a = await this.formSubmitted.emit();
|
|
684
685
|
if (b("[nylas-editor-tabs-group]", "formSubmissionHandler", a), !this.formRef.checkValidity() || a.defaultPrevented) {
|
|
@@ -686,84 +687,85 @@ const We = class {
|
|
|
686
687
|
return;
|
|
687
688
|
}
|
|
688
689
|
this.isLoading = !0, this.hasUnsavedChanges = !1;
|
|
689
|
-
const
|
|
690
|
-
b("[nylas-editor-tabs-group]", "formState",
|
|
691
|
-
const { title: o, description: l, bookingCalendar:
|
|
692
|
-
...((
|
|
693
|
-
slug:
|
|
694
|
-
name:
|
|
690
|
+
const r = this.updateFormState();
|
|
691
|
+
b("[nylas-editor-tabs-group]", "formState", r);
|
|
692
|
+
const { title: o, description: l, bookingCalendar: i, location: c, bookingType: p, minCancellationNotice: f, minBookingNotice: m, cancellationPolicy: w, hideCancellationOptions: x, hideReschedulingOptions: T, additionalFields: z, conferencing: P, reminders: S, emailTemplate: B, redirectUrl: N, slug: R, appearance: E, name: k, eventCapacity: M, eventTimeslot: h, participants: U, disableEmails: v, organizerLocale: A } = r, I = {
|
|
693
|
+
...((G = this.selectedConfiguration) == null ? void 0 : G.id) && { id: this.selectedConfiguration.id },
|
|
694
|
+
slug: R,
|
|
695
|
+
name: k,
|
|
695
696
|
type: this.selectedEventType === O.group ? O.group : void 0,
|
|
696
697
|
scheduler: {
|
|
697
|
-
cancellation_policy:
|
|
698
|
-
min_cancellation_notice:
|
|
699
|
-
|
|
700
|
-
|
|
698
|
+
cancellation_policy: w ?? "",
|
|
699
|
+
min_cancellation_notice: f ?? 0,
|
|
700
|
+
min_booking_notice: m ?? 60,
|
|
701
|
+
hide_cancellation_options: x ?? !1,
|
|
702
|
+
hide_rescheduling_options: T ?? !1,
|
|
701
703
|
additional_fields: z,
|
|
702
|
-
email_template:
|
|
703
|
-
...
|
|
704
|
-
organizer_locale:
|
|
705
|
-
logo:
|
|
704
|
+
email_template: B ? {
|
|
705
|
+
...B,
|
|
706
|
+
organizer_locale: A || "en",
|
|
707
|
+
logo: B.logo || ""
|
|
706
708
|
} : void 0,
|
|
707
|
-
confirmation_redirect_url:
|
|
709
|
+
confirmation_redirect_url: N
|
|
708
710
|
},
|
|
709
|
-
appearance:
|
|
711
|
+
appearance: E,
|
|
710
712
|
group_booking: {
|
|
711
|
-
booking_type:
|
|
712
|
-
disable_emails: typeof
|
|
713
|
-
reminders:
|
|
713
|
+
booking_type: p || "booking",
|
|
714
|
+
disable_emails: typeof v == "boolean" ? v : !1,
|
|
715
|
+
reminders: S,
|
|
714
716
|
conferencing: P,
|
|
715
|
-
calendar_id:
|
|
716
|
-
default_capacity:
|
|
717
|
+
calendar_id: i || "primary",
|
|
718
|
+
default_capacity: M || 10
|
|
717
719
|
}
|
|
718
|
-
},
|
|
719
|
-
delete
|
|
720
|
-
const
|
|
720
|
+
}, j = ge(this.selectedConfiguration, I || {}), H = this.action === "create" ? j : I;
|
|
721
|
+
delete H.availability, delete H.participants, delete H.event_booking;
|
|
722
|
+
const $ = (se) => {
|
|
721
723
|
this.isLoading = !1, this.changesSaved = !0, setTimeout(() => {
|
|
722
724
|
this.changesSaved = !1;
|
|
723
725
|
}, 3e3);
|
|
724
726
|
};
|
|
725
|
-
if (this.checkForBookingFormErrors(
|
|
727
|
+
if (this.checkForBookingFormErrors(H))
|
|
726
728
|
return;
|
|
727
|
-
const
|
|
728
|
-
name: ((
|
|
729
|
-
email: ((
|
|
730
|
-
},
|
|
729
|
+
const Y = {
|
|
730
|
+
name: ((W = this.currentUser) == null ? void 0 : W.name) ?? ((F = this.currentUser) == null ? void 0 : F.email) ?? "",
|
|
731
|
+
email: ((L = this.currentUser) == null ? void 0 : L.email) ?? ""
|
|
732
|
+
}, V = ((D = this.calendars) == null ? void 0 : D.find((se) => se.is_primary)) ?? ((q = this.calendars) == null ? void 0 : q[0]), K = [{ ...Y, is_organizer: !0 }], C = (te = this.selectedConfiguration) != null && te.id ? void 0 : {
|
|
731
733
|
title: o,
|
|
732
734
|
description: l,
|
|
733
|
-
location: P ? void 0 :
|
|
734
|
-
conferencing:
|
|
735
|
+
location: P ? void 0 : c,
|
|
736
|
+
conferencing: c ? void 0 : P,
|
|
735
737
|
when: {
|
|
736
|
-
start_time: ((
|
|
737
|
-
end_time: ((
|
|
738
|
-
start_timezone: ((
|
|
739
|
-
end_timezone: ((
|
|
738
|
+
start_time: ((Z = h == null ? void 0 : h.when) == null ? void 0 : Z.start_time) ?? 0,
|
|
739
|
+
end_time: ((ne = h == null ? void 0 : h.when) == null ? void 0 : ne.end_time) ?? 0,
|
|
740
|
+
start_timezone: ((ae = h == null ? void 0 : h.when) == null ? void 0 : ae.start_timezone) ?? "",
|
|
741
|
+
end_timezone: ((oe = h == null ? void 0 : h.when) == null ? void 0 : oe.end_timezone) ?? ""
|
|
740
742
|
},
|
|
741
|
-
recurrence: (
|
|
742
|
-
calendar_id:
|
|
743
|
-
participants:
|
|
744
|
-
organizer:
|
|
745
|
-
capacity:
|
|
743
|
+
recurrence: (h == null ? void 0 : h.recurrence) ?? [],
|
|
744
|
+
calendar_id: i || (V == null ? void 0 : V.id) || "primary",
|
|
745
|
+
participants: U != null && U.length ? U : K,
|
|
746
|
+
organizer: Y,
|
|
747
|
+
capacity: M || 10
|
|
746
748
|
};
|
|
747
|
-
this.schedulerConfigChanged.emit({ groupEvent:
|
|
749
|
+
this.schedulerConfigChanged.emit({ groupEvent: C || void 0, config: H, resetLoadingState: $, action: this.action, host: this.host });
|
|
748
750
|
}, this.checkForBookingFormErrors = (t) => {
|
|
749
751
|
var o;
|
|
750
752
|
let a = !1, s = "";
|
|
751
|
-
const
|
|
752
|
-
return
|
|
753
|
-
const
|
|
754
|
-
if (
|
|
755
|
-
s +=
|
|
753
|
+
const r = (o = t.scheduler) == null ? void 0 : o.additional_fields;
|
|
754
|
+
return r && (s = d.t("nylasEditorTabs.bookingFormError"), Object.entries(r).forEach((l) => {
|
|
755
|
+
const i = l[1];
|
|
756
|
+
if (i.label === "") {
|
|
757
|
+
s += d.t("nylasEditorTabs.bookingFormError_label", { type: i.type }), a = !0;
|
|
756
758
|
return;
|
|
757
759
|
}
|
|
758
|
-
if (
|
|
759
|
-
for (const
|
|
760
|
-
if (
|
|
761
|
-
s +=
|
|
760
|
+
if (i.options) {
|
|
761
|
+
for (const c of i.options)
|
|
762
|
+
if (c.trim() === "") {
|
|
763
|
+
s += d.t("nylasEditorTabs.bookingFormError_option", { label: i.label, type: i.type }), a = !0;
|
|
762
764
|
break;
|
|
763
765
|
}
|
|
764
766
|
}
|
|
765
767
|
})), a && (this.isLoading = !1, this.host.setError(new Error(s))), a;
|
|
766
|
-
}, 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.selectedEventType = void 0, this.selectedGroupEvent = void 0, this.action = "create", this.showFeedbackModal = !1, this.activeTab =
|
|
768
|
+
}, 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.selectedEventType = void 0, this.selectedGroupEvent = void 0, this.action = "create", this.showFeedbackModal = !1, this.activeTab = y.CalendarView, this.isLoading = !1, this.hasUnsavedChanges = !1, this.changesSaved = !1, this.formState = {}, this.error = "";
|
|
767
769
|
}
|
|
768
770
|
configChangedHandler(e) {
|
|
769
771
|
b("[nylas-editor-tabs-group]", "configChangedHandler", e, this.selectedConfiguration), this.formState = {
|
|
@@ -771,28 +773,28 @@ const We = class {
|
|
|
771
773
|
}, e != null && e.id ? this.action = "edit" : this.action = "create";
|
|
772
774
|
}
|
|
773
775
|
selectedGroupEventChangedHandler(e) {
|
|
774
|
-
var t, a, s,
|
|
776
|
+
var t, a, s, r, o, l, i, c, p, f, m, w, x, T, z, P, S, B, N, R, E, k, M, h, U, v, A, I, j, H, $;
|
|
775
777
|
b("[nylas-editor-tabs-group]", "selectedGroupEventChangedHandler", e, this.selectedConfiguration), this.formState = {
|
|
776
778
|
...this.formState,
|
|
777
779
|
title: (a = (t = this.selectedGroupEvent) == null ? void 0 : t.event) == null ? void 0 : a.title,
|
|
778
|
-
description: (
|
|
780
|
+
description: (r = (s = this.selectedGroupEvent) == null ? void 0 : s.event) == null ? void 0 : r.description,
|
|
779
781
|
location: (l = (o = this.selectedGroupEvent) == null ? void 0 : o.event) == null ? void 0 : l.location,
|
|
780
|
-
conferencing: (
|
|
781
|
-
eventCapacity: (
|
|
782
|
-
participants: (
|
|
783
|
-
name:
|
|
784
|
-
email:
|
|
785
|
-
is_organizer: !!
|
|
782
|
+
conferencing: (c = (i = this.selectedGroupEvent) == null ? void 0 : i.event) == null ? void 0 : c.conferencing,
|
|
783
|
+
eventCapacity: (f = (p = this.selectedGroupEvent) == null ? void 0 : p.group_event_info) == null ? void 0 : f.capacity,
|
|
784
|
+
participants: (x = (w = (m = this.selectedGroupEvent) == null ? void 0 : m.group_event_info) == null ? void 0 : w.participants) == null ? void 0 : x.map((J) => ({
|
|
785
|
+
name: J.name,
|
|
786
|
+
email: J.email,
|
|
787
|
+
is_organizer: !!J.is_organizer,
|
|
786
788
|
timezone: ""
|
|
787
789
|
})),
|
|
788
|
-
eventTimeslot: (
|
|
790
|
+
eventTimeslot: (z = (T = this.selectedGroupEvent) == null ? void 0 : T.event) != null && z.when ? {
|
|
789
791
|
when: {
|
|
790
|
-
start_time: (
|
|
791
|
-
end_time: (
|
|
792
|
-
start_timezone: (
|
|
793
|
-
end_timezone: (A = (
|
|
792
|
+
start_time: (B = (S = (P = this.selectedGroupEvent) == null ? void 0 : P.event) == null ? void 0 : S.when) == null ? void 0 : B.start_time,
|
|
793
|
+
end_time: (E = (R = (N = this.selectedGroupEvent) == null ? void 0 : N.event) == null ? void 0 : R.when) == null ? void 0 : E.end_time,
|
|
794
|
+
start_timezone: (h = (M = (k = this.selectedGroupEvent) == null ? void 0 : k.event) == null ? void 0 : M.when) == null ? void 0 : h.start_timezone,
|
|
795
|
+
end_timezone: (A = (v = (U = this.selectedGroupEvent) == null ? void 0 : U.event) == null ? void 0 : v.when) == null ? void 0 : A.end_timezone
|
|
794
796
|
},
|
|
795
|
-
recurrence: (
|
|
797
|
+
recurrence: (j = (I = this.selectedGroupEvent) == null ? void 0 : I.group_event_info) != null && j.rrule ? ($ = (H = this.selectedGroupEvent) == null ? void 0 : H.group_event_info) == null ? void 0 : $.rrule : []
|
|
796
798
|
} : void 0
|
|
797
799
|
};
|
|
798
800
|
}
|
|
@@ -802,7 +804,7 @@ const We = class {
|
|
|
802
804
|
});
|
|
803
805
|
}
|
|
804
806
|
selectedLanguageChangedHandler(e, t) {
|
|
805
|
-
e !== t &&
|
|
807
|
+
e !== t && d.changeLanguage(e);
|
|
806
808
|
}
|
|
807
809
|
async schedulerConfigCreatedEventHandler(e) {
|
|
808
810
|
return this.schedulerConfigCreated.emit(e);
|
|
@@ -821,12 +823,12 @@ const We = class {
|
|
|
821
823
|
}
|
|
822
824
|
componentDidLoad() {
|
|
823
825
|
var t, a, s;
|
|
824
|
-
b("[nylas-editor-tabs-group]", "componentDidLoad"), this.enableUserFeedback && !
|
|
826
|
+
b("[nylas-editor-tabs-group]", "componentDidLoad"), this.enableUserFeedback && !je() && $e({
|
|
825
827
|
dsn: "https://9d5731f1c77ca84c9ed3fb9b3ccf7ee1@o74852.ingest.us.sentry.io/4507889638178816",
|
|
826
|
-
release: "1.4.
|
|
827
|
-
integrations: (
|
|
828
|
-
...
|
|
829
|
-
|
|
828
|
+
release: "1.4.5",
|
|
829
|
+
integrations: (r) => [
|
|
830
|
+
...r.filter((o) => !1),
|
|
831
|
+
Ze({
|
|
830
832
|
colorScheme: "system",
|
|
831
833
|
autoInject: !1
|
|
832
834
|
})
|
|
@@ -852,21 +854,21 @@ const We = class {
|
|
|
852
854
|
this.showFeedbackModal = !1;
|
|
853
855
|
}
|
|
854
856
|
feedbackSubmittedHandler(e) {
|
|
855
|
-
var s,
|
|
857
|
+
var s, r;
|
|
856
858
|
const a = {
|
|
857
|
-
eventId:
|
|
859
|
+
eventId: Je("Scheduler Editor User Feedback"),
|
|
858
860
|
message: e.detail.feedback
|
|
859
861
|
};
|
|
860
|
-
|
|
862
|
+
Ve(a, {
|
|
861
863
|
includeReplay: !0,
|
|
862
864
|
captureContext: {
|
|
863
865
|
tags: {
|
|
864
866
|
"nylas-web-element": "nylas-scheduler-editor",
|
|
865
|
-
"nylas-web-element-version": "1.4.
|
|
867
|
+
"nylas-web-element-version": "1.4.5"
|
|
866
868
|
},
|
|
867
869
|
extra: {
|
|
868
870
|
configId: (s = this.selectedConfiguration) == null ? void 0 : s.id,
|
|
869
|
-
slug: (
|
|
871
|
+
slug: (r = this.selectedConfiguration) == null ? void 0 : r.slug
|
|
870
872
|
}
|
|
871
873
|
}
|
|
872
874
|
}), this.showFeedbackModal = !1;
|
|
@@ -876,13 +878,13 @@ const We = class {
|
|
|
876
878
|
this.groupEventImportTriggered.emit({ groupEvent: e.detail, configId: ((t = this.selectedConfiguration) == null ? void 0 : t.id) ?? "", host: this.host });
|
|
877
879
|
}
|
|
878
880
|
saveGroupEventChangesHandler(e) {
|
|
879
|
-
var s,
|
|
881
|
+
var s, r, o, l, i, c, p;
|
|
880
882
|
b("saveGroupEventChangesHandler", e.detail, this.selectedGroupEvent);
|
|
881
883
|
const t = this.formRef.checkValidity(), a = this.getGroupEventDetailsFromFormState();
|
|
882
|
-
if (this.resetError(), a.title || this.setError(new Error("Event title is required.")), (!((s = a.when) != null && s.start_time) || !((
|
|
884
|
+
if (this.resetError(), a.title || this.setError(new Error("Event title is required.")), (!((s = a.when) != null && s.start_time) || !((r = a.when) != null && r.end_time)) && this.setError(new Error("Event time is required.")), (o = a.participants) != null && o.length || this.setError(new Error("Participants are required.")), (l = a.participants) != null && l.length && ((i = a.participants) != null && i.some((f) => !f.email)) && this.setError(new Error("Participant email is required.")), this.error !== "" || !t) {
|
|
883
885
|
this.saveGroupEventChangesError.emit({
|
|
884
886
|
error: this.error ?? "An error occurred while saving changes.",
|
|
885
|
-
configId: ((
|
|
887
|
+
configId: ((c = this.selectedConfiguration) == null ? void 0 : c.id) ?? "",
|
|
886
888
|
host: this.host
|
|
887
889
|
});
|
|
888
890
|
return;
|
|
@@ -890,7 +892,7 @@ const We = class {
|
|
|
890
892
|
this.groupEventUpdateTriggered.emit({
|
|
891
893
|
groupEvent: a,
|
|
892
894
|
chosenOption: e.detail.action,
|
|
893
|
-
configId: ((
|
|
895
|
+
configId: ((p = this.selectedConfiguration) == null ? void 0 : p.id) ?? "",
|
|
894
896
|
host: this.host
|
|
895
897
|
});
|
|
896
898
|
}
|
|
@@ -906,66 +908,67 @@ const We = class {
|
|
|
906
908
|
});
|
|
907
909
|
}
|
|
908
910
|
createGroupEventHandler(e) {
|
|
909
|
-
var l,
|
|
911
|
+
var l, i, c, p, f, m, w;
|
|
910
912
|
const t = e.detail, a = {
|
|
911
|
-
name: ((l = this.currentUser) == null ? void 0 : l.name) ?? ((
|
|
912
|
-
email: ((
|
|
913
|
-
}, s = ((
|
|
913
|
+
name: ((l = this.currentUser) == null ? void 0 : l.name) ?? ((i = this.currentUser) == null ? void 0 : i.email) ?? "",
|
|
914
|
+
email: ((c = this.currentUser) == null ? void 0 : c.email) ?? ""
|
|
915
|
+
}, s = ((p = this.calendars) == null ? void 0 : p.find((x) => x.is_primary)) ?? ((f = this.calendars) == null ? void 0 : f[0]), r = ((m = this.formState) == null ? void 0 : m.conferencing) || t.conferencing, o = {
|
|
914
916
|
title: t.title,
|
|
915
917
|
description: t.description,
|
|
916
|
-
location:
|
|
918
|
+
location: r ? void 0 : t.location,
|
|
917
919
|
participants: t.participants,
|
|
918
920
|
organizer: a,
|
|
919
|
-
conferencing: t.location ? void 0 :
|
|
921
|
+
conferencing: t.location ? void 0 : r,
|
|
920
922
|
when: t.eventTimeslot.when,
|
|
921
923
|
recurrence: t.eventTimeslot.recurrence,
|
|
922
924
|
calendar_id: (s == null ? void 0 : s.id) || "primary",
|
|
923
925
|
capacity: t.eventCapacity
|
|
924
926
|
};
|
|
925
|
-
this.groupEventCreateTriggered.emit({ groupEvent: o, configId: ((
|
|
927
|
+
this.groupEventCreateTriggered.emit({ groupEvent: o, configId: ((w = this.selectedConfiguration) == null ? void 0 : w.id) ?? "", host: this.host });
|
|
926
928
|
}
|
|
927
929
|
getGroupEventDetailsFromFormState() {
|
|
928
|
-
var
|
|
929
|
-
const e = ((
|
|
930
|
-
name: ((
|
|
931
|
-
email: ((
|
|
932
|
-
}, a = [{ ...t, is_organizer: !0 }], { title: s, description:
|
|
930
|
+
var m, w, x, T, z, P, S, B, N;
|
|
931
|
+
const e = ((m = this.calendars) == null ? void 0 : m.find((R) => R.is_primary)) ?? ((w = this.calendars) == null ? void 0 : w[0]), t = {
|
|
932
|
+
name: ((x = this.currentUser) == null ? void 0 : x.name) ?? ((T = this.currentUser) == null ? void 0 : T.email) ?? "",
|
|
933
|
+
email: ((z = this.currentUser) == null ? void 0 : z.email) ?? ""
|
|
934
|
+
}, a = [{ ...t, is_organizer: !0 }], { title: s, description: r, bookingCalendar: o, location: l, conferencing: i, eventCapacity: c, eventTimeslot: p, participants: f } = this.formState;
|
|
933
935
|
return {
|
|
934
936
|
title: s,
|
|
935
|
-
description:
|
|
936
|
-
location:
|
|
937
|
-
conferencing: l ? void 0 :
|
|
937
|
+
description: r,
|
|
938
|
+
location: i ? void 0 : l,
|
|
939
|
+
conferencing: l ? void 0 : i,
|
|
938
940
|
when: {
|
|
939
|
-
start_time: ((
|
|
940
|
-
end_time: ((S =
|
|
941
|
-
start_timezone: ((
|
|
942
|
-
end_timezone: ((
|
|
941
|
+
start_time: ((P = p == null ? void 0 : p.when) == null ? void 0 : P.start_time) ?? 0,
|
|
942
|
+
end_time: ((S = p == null ? void 0 : p.when) == null ? void 0 : S.end_time) ?? 0,
|
|
943
|
+
start_timezone: ((B = p == null ? void 0 : p.when) == null ? void 0 : B.start_timezone) ?? "",
|
|
944
|
+
end_timezone: ((N = p == null ? void 0 : p.when) == null ? void 0 : N.end_timezone) ?? ""
|
|
943
945
|
},
|
|
944
|
-
recurrence: (
|
|
946
|
+
recurrence: (p == null ? void 0 : p.recurrence) ?? [],
|
|
945
947
|
calendar_id: o || (e == null ? void 0 : e.id) || "primary",
|
|
946
|
-
participants:
|
|
948
|
+
participants: f != null && f.length ? f : a,
|
|
947
949
|
organizer: t,
|
|
948
|
-
capacity:
|
|
950
|
+
capacity: c || 10
|
|
949
951
|
};
|
|
950
952
|
}
|
|
951
953
|
getFormStateFromConfig(e) {
|
|
952
|
-
var t, a, s,
|
|
954
|
+
var t, a, s, r, o, l, i, c, p, f, m, w, x, T;
|
|
953
955
|
return 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."), {
|
|
954
956
|
additionalFields: ((t = e == null ? void 0 : e.scheduler) == null ? void 0 : t.additional_fields) ?? {},
|
|
955
957
|
bookingType: ((a = e == null ? void 0 : e.group_booking) == null ? void 0 : a.booking_type) ?? "booking",
|
|
956
958
|
cancellationPolicy: ((s = e == null ? void 0 : e.scheduler) == null ? void 0 : s.cancellation_policy) ?? "",
|
|
957
|
-
minCancellationNotice: ((
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
959
|
+
minCancellationNotice: ((r = e == null ? void 0 : e.scheduler) == null ? void 0 : r.min_cancellation_notice) ?? 0,
|
|
960
|
+
minBookingNotice: ((o = e == null ? void 0 : e.scheduler) == null ? void 0 : o.min_booking_notice) ?? 60,
|
|
961
|
+
hideCancellationOptions: ((l = e == null ? void 0 : e.scheduler) == null ? void 0 : l.hide_cancellation_options) ?? !1,
|
|
962
|
+
hideReschedulingOptions: ((i = e == null ? void 0 : e.scheduler) == null ? void 0 : i.hide_rescheduling_options) ?? !1,
|
|
963
|
+
reminders: (c = e == null ? void 0 : e.group_booking) == null ? void 0 : c.reminders,
|
|
964
|
+
emailTemplate: (p = e == null ? void 0 : e.scheduler) == null ? void 0 : p.email_template,
|
|
965
|
+
redirectUrl: (f = e == null ? void 0 : e.scheduler) == null ? void 0 : f.confirmation_redirect_url,
|
|
963
966
|
slug: e == null ? void 0 : e.slug,
|
|
964
967
|
appearance: e == null ? void 0 : e.appearance,
|
|
965
968
|
name: e == null ? void 0 : e.name,
|
|
966
|
-
bookingCalendar: (
|
|
967
|
-
disableEmails: (
|
|
968
|
-
organizerLocale: (
|
|
969
|
+
bookingCalendar: (m = e == null ? void 0 : e.group_booking) == null ? void 0 : m.calendar_id,
|
|
970
|
+
disableEmails: (w = e == null ? void 0 : e.group_booking) == null ? void 0 : w.disable_emails,
|
|
971
|
+
organizerLocale: (T = (x = e == null ? void 0 : e.scheduler) == null ? void 0 : x.email_template) == null ? void 0 : T.organizer_locale
|
|
969
972
|
};
|
|
970
973
|
}
|
|
971
974
|
setFormState(e, t) {
|
|
@@ -988,6 +991,9 @@ const We = class {
|
|
|
988
991
|
case "min-cancellation-notice":
|
|
989
992
|
this.formState.minCancellationNotice = parseInt(e.toString());
|
|
990
993
|
break;
|
|
994
|
+
case "min-booking-notice":
|
|
995
|
+
this.formState.minBookingNotice = parseInt(e.toString());
|
|
996
|
+
break;
|
|
991
997
|
case "cancellation-policy":
|
|
992
998
|
this.formState.cancellationPolicy = e.toString();
|
|
993
999
|
break;
|
|
@@ -1063,21 +1069,21 @@ const We = class {
|
|
|
1063
1069
|
}
|
|
1064
1070
|
render() {
|
|
1065
1071
|
var e, t;
|
|
1066
|
-
return b("[nylas-editor-tabs-group]", "render", this.formState), n(
|
|
1067
|
-
this.setActiveTab(a,
|
|
1068
|
-
} }, n("chevron-icon", { width: "16", height: "16" }), n("span", null, "
|
|
1072
|
+
return b("[nylas-editor-tabs-group]", "render", this.formState), n(le, { key: "9b79ba6f8696d5c7bcc9eb1d8c4b3cebddc6e4a9" }, n("form", { key: "e70dade70b4bf2a9a5974e70a335b6f04ea24ed6", onSubmit: this.formSubmissionHandler, class: "scheduler-editor", ref: (a) => this.formRef = a, noValidate: !0 }, this.mode === "app" ? n("div", { class: "return-to-calendar-view", part: "editor__return-to-calendar-view net__return-to-calendar-view" }, n("button-component", { id: "return-to-calendar-view-button", variant: "invisible", part: "nset__header__back-button", type: "button", onClick: (a) => {
|
|
1073
|
+
this.setActiveTab(a, y.CalendarView);
|
|
1074
|
+
} }, n("chevron-icon", { width: "16", height: "16" }), n("span", null, d.t("returnToCalendarView")))) : null, this.mode === "app" ? n("div", { class: "form-contents", part: "editor__form-contents net__form-contents" }, n("div", { class: "tabs", part: "editor__tabs net__tabs" }, n("button", { name: y.BookingOptions, class: { tab: !0, active: this.activeTab == y.BookingOptions, hide: this.hideTab(y.BookingOptions) }, part: "editortab__booking-options net__tab-booking-options", onClick: (a) => this.setActiveTab(a, y.BookingOptions) }, n("flow-icon", { width: "16", height: "16" }), d.t("bookingOptionsTab")), n("button", { name: y.BookingForm, class: { tab: !0, active: this.activeTab == y.BookingForm, hide: this.hideTab(y.BookingForm) }, part: "editortab__booking-form net__tab-booking-form", onClick: (a) => this.setActiveTab(a, y.BookingForm) }, this.activeTab == y.BookingForm ? n("calendar-agenda-fill-icon", { width: "16", height: "16" }) : n("calendar-agenda-icon", { width: "16", height: "16" }), d.t("bookingFormTab")), n("button", { name: y.Communications, class: { tab: !0, active: this.activeTab == y.Communications, hide: this.hideTab(y.Communications) }, onClick: (a) => this.setActiveTab(a, y.Communications), part: "editortab__communications net__tab-communications" }, this.activeTab == y.Communications ? n("envelope-fill-icon", { width: "16", height: "16" }) : n("envelope-icon", { width: "16", height: "16" }), d.t("communicationsTab")), n("button", { name: y.PageStyles, class: { tab: !0, active: this.activeTab == y.PageStyles, hide: this.hideTab(y.PageStyles) }, onClick: (a) => this.setActiveTab(a, y.PageStyles), part: "editortab__page-styles net__tab-page-styles" }, this.activeTab == y.PageStyles ? n("paintbrush-fill-icon", { width: "16", height: "16" }) : n("paintbrush-icon", { width: "16", height: "16" }), d.t("pageStylesTab"))), n("div", { class: "tab-content", part: "editor__tab-content net__tab-content" }, n(ut, { formState: this.formState, activeTab: this.activeTab, currentUser: this.currentUser, calendars: this.calendars, id: ((e = this.selectedConfiguration) == null ? void 0 : e.id) ?? "new", i18next: d }))) : n("div", { class: "composable", key: (t = this.selectedConfiguration) == null ? void 0 : t.id }, n("slot", null)), n("div", { key: "3e14a9cecdd8200a4a388595c69450fc1fc2d024", class: "footer", part: "editor__footer net__footer" }, n("div", { key: "fa88541076507a351a9189d3937e380b042adb2a", class: "preview", part: "editor__footer-preview net__footer-preview" }, this.enableUserFeedback && n("button-component", { title: "Share your feedback", id: "report-issue", variant: "basic", onClick: (a) => this.onFeedbackClick(a) }, n("feedback-icon", null)), this.activeTab === y.CalendarView && n("button-component", { title: "Go to page settings", id: "page-settings", variant: "basic", onClick: (a) => this.setActiveTab(a, y.BookingOptions) }, d.t("pageSettingsButton"))), n("div", { key: "5c2436da8cc3deb362e42ba4ff8ac228b89263dc", class: "buttons", part: "editor__footer-buttons net__footer-buttons" }, n("p", { key: "132875a26da363e4b402879b8344fce6311c1702", class: {
|
|
1069
1075
|
"unsaved-changes": this.hasUnsavedChanges && !this.changesSaved,
|
|
1070
1076
|
"saved-changes": this.changesSaved,
|
|
1071
1077
|
error: this.error !== "",
|
|
1072
1078
|
"error-full-width": this.error !== "" && this.action === "create"
|
|
1073
|
-
} }, this.error !== "" ? this.error : "", this.error == "" && this.hasUnsavedChanges && !this.changesSaved && this.activeTab !==
|
|
1074
|
-
a.preventDefault(), this.previewButtonClicked.emit(this.host).defaultPrevented || window.open(
|
|
1075
|
-
}, variant: "basic" }, n("eye-icon", null)), n("button-component", { key: "
|
|
1079
|
+
} }, this.error !== "" ? this.error : "", this.error == "" && this.hasUnsavedChanges && !this.changesSaved && this.activeTab !== y.CalendarView ? d.t("unsavedChangesLabel") : this.error == "" && this.changesSaved ? `${d.t("changesSavedLabel")}!` : ""), n("div", { key: "f30fa484009f4d4729551014e86ec4a0d2ae7824", class: "footer-buttons__row" }, this.schedulerPreviewLink !== "" && this.action === "edit" && n("button-component", { title: "Preview", type: "button", disabled: this.isLoading, clickHandler: (a) => {
|
|
1080
|
+
a.preventDefault(), this.previewButtonClicked.emit(this.host).defaultPrevented || window.open(re(this.schedulerPreviewLink, this.selectedConfiguration), "_blank");
|
|
1081
|
+
}, variant: "basic" }, n("eye-icon", null)), n("button-component", { key: "de0c92614c21e3d7ad2d1e982186df2858e99981", type: "button", disabled: this.isLoading, clickHandler: (a) => {
|
|
1076
1082
|
a.preventDefault(), this.cancelButtonClick.emit(), this.error = "";
|
|
1077
|
-
}, variant: "basic", part: "editor__footer-cancel net__footer-cancel" },
|
|
1083
|
+
}, variant: "basic", part: "editor__footer-cancel net__footer-cancel" }, d.t("backButton")), n("button-component", { key: "5edfb977d8feed310347b968cdb7505f9bc7eb1f", type: "submit", disabled: this.isLoading, part: "editor__footer-cta, net__footer-cta" }, this.isLoading ? n("span", null, d.t("savingButtonText"), n("loading-icon", null), " ") : this.action === "create" ? `${d.t("createButtonText")}` : `${d.t("saveChangesButtonText")}`))))), this.showFeedbackModal && n("nylas-feedback-form", null));
|
|
1078
1084
|
}
|
|
1079
1085
|
get host() {
|
|
1080
|
-
return
|
|
1086
|
+
return de(this);
|
|
1081
1087
|
}
|
|
1082
1088
|
static get watchers() {
|
|
1083
1089
|
return {
|
|
@@ -1089,7 +1095,7 @@ const We = class {
|
|
|
1089
1095
|
}
|
|
1090
1096
|
};
|
|
1091
1097
|
ft([
|
|
1092
|
-
|
|
1098
|
+
ce({
|
|
1093
1099
|
name: "nylas-editor-tabs-group",
|
|
1094
1100
|
stateToProps: /* @__PURE__ */ new Map([
|
|
1095
1101
|
["schedulerConfig.calendars", "calendars"],
|
|
@@ -1102,20 +1108,20 @@ ft([
|
|
|
1102
1108
|
]),
|
|
1103
1109
|
eventToProps: {
|
|
1104
1110
|
schedulerConfigChanged: async (e, t) => {
|
|
1105
|
-
const { resetLoadingState: a, host: s, action:
|
|
1106
|
-
const [
|
|
1107
|
-
!
|
|
1111
|
+
const { resetLoadingState: a, host: s, action: r, config: o, groupEvent: l } = e.detail, i = (c) => {
|
|
1112
|
+
const [p, f] = c;
|
|
1113
|
+
!p && f ? s.setError(f) : p && !f && r === "create" && s.schedulerConfigCreatedEventHandler({ config: p, action: r, host: s });
|
|
1108
1114
|
};
|
|
1109
|
-
if (
|
|
1110
|
-
const
|
|
1111
|
-
|
|
1115
|
+
if (r === "edit") {
|
|
1116
|
+
const c = await t.schedulerConfig.updateConfiguration(o);
|
|
1117
|
+
i(c), a && a(e);
|
|
1112
1118
|
} else {
|
|
1113
|
-
const
|
|
1114
|
-
|
|
1115
|
-
const [
|
|
1116
|
-
if (
|
|
1117
|
-
const
|
|
1118
|
-
|
|
1119
|
+
const c = await t.schedulerConfig.createConfiguration(o);
|
|
1120
|
+
i(c);
|
|
1121
|
+
const [p, f] = c, m = p == null ? void 0 : p.id;
|
|
1122
|
+
if (m && l) {
|
|
1123
|
+
const w = await t.schedulerConfig.createGroupEvent(l, m);
|
|
1124
|
+
i(w);
|
|
1119
1125
|
}
|
|
1120
1126
|
a && a(e);
|
|
1121
1127
|
}
|
|
@@ -1136,24 +1142,24 @@ ft([
|
|
|
1136
1142
|
b("[nylas-editor-tabs-group]", "schedulerConfigCreated", e);
|
|
1137
1143
|
},
|
|
1138
1144
|
groupEventUpdateTriggered: async (e, t) => {
|
|
1139
|
-
const { groupEvent: a, host: s, chosenOption:
|
|
1140
|
-
!
|
|
1145
|
+
const { groupEvent: a, host: s, chosenOption: r, configId: o } = e.detail, l = await t.schedulerConfig.updateGroupEvent(a, r, o), [i, c] = l;
|
|
1146
|
+
!i && c && s.setError(c);
|
|
1141
1147
|
},
|
|
1142
1148
|
groupEventDeleteTriggered: async (e, t) => {
|
|
1143
|
-
const { groupEvent: a, chosenOption: s, configId:
|
|
1144
|
-
!
|
|
1149
|
+
const { groupEvent: a, chosenOption: s, configId: r, host: o } = e.detail, l = await t.schedulerConfig.deleteGroupEvent(a, s, r), [i, c] = l;
|
|
1150
|
+
!i && c && o.setError(c);
|
|
1145
1151
|
},
|
|
1146
1152
|
groupEventCreateTriggered: async (e, t) => {
|
|
1147
|
-
const { groupEvent: a, configId: s, host:
|
|
1148
|
-
!l &&
|
|
1153
|
+
const { groupEvent: a, configId: s, host: r } = e.detail, o = await t.schedulerConfig.createGroupEvent(a, s), [l, i] = o;
|
|
1154
|
+
!l && i && r.setError(i);
|
|
1149
1155
|
},
|
|
1150
1156
|
groupEventImportTriggered: async (e, t) => {
|
|
1151
|
-
const { groupEvent: a, configId: s, host:
|
|
1152
|
-
if (!l &&
|
|
1153
|
-
const
|
|
1157
|
+
const { groupEvent: a, configId: s, host: r } = e.detail, o = await t.schedulerConfig.importGroupEvent([a], s), [l, i] = o;
|
|
1158
|
+
if (!l && i && r.setError(i), l && l.import_failed && l.import_failed.length > 0) {
|
|
1159
|
+
const c = l.import_failed.map((p) => p.reason).join(`
|
|
1154
1160
|
`);
|
|
1155
|
-
|
|
1156
|
-
|
|
1161
|
+
r.setError(new Error(c)), setTimeout(() => {
|
|
1162
|
+
r.resetError();
|
|
1157
1163
|
}, 5e3);
|
|
1158
1164
|
}
|
|
1159
1165
|
},
|
|
@@ -1169,25 +1175,25 @@ ft([
|
|
|
1169
1175
|
]),
|
|
1170
1176
|
fireRegisterEvent: !0
|
|
1171
1177
|
}),
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
],
|
|
1176
|
-
|
|
1178
|
+
he("design:type", Function),
|
|
1179
|
+
he("design:paramtypes", []),
|
|
1180
|
+
he("design:returntype", void 0)
|
|
1181
|
+
], qe.prototype, "render", null);
|
|
1182
|
+
qe.style = yt;
|
|
1177
1183
|
const gt = ':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-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff}.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)}', mt = gt;
|
|
1178
1184
|
var _t = function(e, t, a, s) {
|
|
1179
|
-
var
|
|
1185
|
+
var r = arguments.length, o = r < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, a) : s, l;
|
|
1180
1186
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
1181
1187
|
o = Reflect.decorate(e, t, a, s);
|
|
1182
1188
|
else
|
|
1183
|
-
for (var
|
|
1184
|
-
(l = e[
|
|
1185
|
-
return
|
|
1186
|
-
},
|
|
1189
|
+
for (var i = e.length - 1; i >= 0; i--)
|
|
1190
|
+
(l = e[i]) && (o = (r < 3 ? l(o) : r > 3 ? l(t, a, o) : l(t, a)) || o);
|
|
1191
|
+
return r > 3 && o && Object.defineProperty(t, a, o), o;
|
|
1192
|
+
}, ye = function(e, t) {
|
|
1187
1193
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
1188
1194
|
return Reflect.metadata(e, t);
|
|
1189
1195
|
};
|
|
1190
|
-
const
|
|
1196
|
+
const Ye = class {
|
|
1191
1197
|
constructor(e) {
|
|
1192
1198
|
X(this, e), this.initListConfigurations = _(this, "initListConfigurations", 7), this.createButtonClick = _(this, "createButtonClick", 7), this.editButtonClick = _(this, "editButtonClick", 7), this.deleteButtonClick = _(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;
|
|
1193
1199
|
}
|
|
@@ -1199,7 +1205,7 @@ const qe = class {
|
|
|
1199
1205
|
this.disableNextPageButton = !1, this.currentCursor = e;
|
|
1200
1206
|
}
|
|
1201
1207
|
selectedLanguageChangedHandler(e, t) {
|
|
1202
|
-
e !== t &&
|
|
1208
|
+
e !== t && d.changeLanguage(e);
|
|
1203
1209
|
}
|
|
1204
1210
|
connectedCallback() {
|
|
1205
1211
|
b("[nylas-list-configurations]", "connectedCallback");
|
|
@@ -1216,18 +1222,18 @@ const qe = class {
|
|
|
1216
1222
|
b("[nylas-list-configurations]", "disconnectedCallback");
|
|
1217
1223
|
}
|
|
1218
1224
|
async handleNylasFormDropdownChanged(e) {
|
|
1219
|
-
var
|
|
1225
|
+
var r;
|
|
1220
1226
|
b("[nylas-list-configurations]", "handleNylasFormDropdownChanged", e.detail);
|
|
1221
1227
|
const { value: t } = e.detail, [a, s] = t.split("-");
|
|
1222
1228
|
switch (e.preventDefault(), a) {
|
|
1223
1229
|
case "delete":
|
|
1224
|
-
this.deleteConfigurationId = (
|
|
1230
|
+
this.deleteConfigurationId = (r = this.configurations[s]) == null ? void 0 : r.id;
|
|
1225
1231
|
break;
|
|
1226
1232
|
case "preview":
|
|
1227
|
-
window.open(
|
|
1233
|
+
window.open(re(this.schedulerPreviewLink, this.configurations[s]), "_blank");
|
|
1228
1234
|
break;
|
|
1229
1235
|
case "copy":
|
|
1230
|
-
await navigator.clipboard.writeText(
|
|
1236
|
+
await navigator.clipboard.writeText(re(this.schedulerPreviewLink, this.configurations[s]));
|
|
1231
1237
|
break;
|
|
1232
1238
|
}
|
|
1233
1239
|
}
|
|
@@ -1272,11 +1278,11 @@ const qe = class {
|
|
|
1272
1278
|
};
|
|
1273
1279
|
switch (e) {
|
|
1274
1280
|
case "preview":
|
|
1275
|
-
return n("span", { style: t }, n("eye-icon", { width: "16", height: "16" }),
|
|
1281
|
+
return n("span", { style: t }, n("eye-icon", { width: "16", height: "16" }), d.t("nylasListConfigurations.previewButtonText"));
|
|
1276
1282
|
case "copy":
|
|
1277
|
-
return n("span", { style: t }, n("copy-icon", { width: "16", height: "16" }),
|
|
1283
|
+
return n("span", { style: t }, n("copy-icon", { width: "16", height: "16" }), d.t("nylasListConfigurations.copyLinkButtonText"));
|
|
1278
1284
|
case "delete":
|
|
1279
|
-
return n("span", { style: { ...t, ...a } }, n("delete-icon", { width: "15", height: "17" }),
|
|
1285
|
+
return n("span", { style: { ...t, ...a } }, n("delete-icon", { width: "15", height: "17" }), d.t("nylasListConfigurations.deleteButtonText"));
|
|
1280
1286
|
default:
|
|
1281
1287
|
return "";
|
|
1282
1288
|
}
|
|
@@ -1299,32 +1305,32 @@ const qe = class {
|
|
|
1299
1305
|
}
|
|
1300
1306
|
render() {
|
|
1301
1307
|
var e;
|
|
1302
|
-
return n(
|
|
1308
|
+
return n(le, null, n("div", { class: "header" }, n("div", { class: "description" }, n("h2", null, d.t("allSchedulingPages")), n("p", null, d.t("createAndManageSchedulingPages"))), this.configurations && this.configurations.length > 0 && n("div", { class: "actions" }, n("button-component", { part: "nlc__create-new-cta", clickHandler: () => {
|
|
1303
1309
|
this.createButtonClick.emit(this.host);
|
|
1304
|
-
} },
|
|
1310
|
+
} }, d.t("createNewSchedulingPageButtonText")))), n("div", { class: "configurations" }, n("div", { class: "table-container" }, n("table", { class: {
|
|
1305
1311
|
"no-configurations": this.state !== "loading" && (!this.configurations || this.configurations.length === 0)
|
|
1306
1312
|
} }, n("tr", { class: {
|
|
1307
1313
|
hide: this.state === "loading" || this.configurations && this.configurations.length === 0
|
|
1308
|
-
} }, n("th", null,
|
|
1314
|
+
} }, n("th", null, d.t("pageTitle")), n("th", null, d.t("durationTitle")), n("th", null)), this.state === "loading" && n("tr", { class: "no-configurations" }, n("td", { colSpan: 3 }, n("div", null, n("h3", null, d.t("loading"), "..."), n("p", null, d.t("loadingPagesDescription"))))), this.state !== "loading" && (!this.configurations || this.configurations.length === 0) && n("tr", { class: "no-configurations" }, n("td", { colSpan: 3 }, n("div", null, n("calendar-icon", { width: "48", height: "48" }), n("h3", null, d.t("noSchedulingPages")), n("p", null, d.t("createFirstSchedulingPage")), n("button-component", { part: "nlc__create-new-cta", clickHandler: () => {
|
|
1309
1315
|
this.createButtonClick.emit(this.host);
|
|
1310
|
-
} },
|
|
1311
|
-
var l,
|
|
1312
|
-
const s = (a === this.configurations.length - 1 || a === this.configurations.length - 2) && this.configurations.length > 3,
|
|
1313
|
-
return n("tr", { key: t == null ? void 0 : t.id }, n("td", null, n("div", { class: "title" }, n("div", { class: "config-event-title", title: (l = o == null ? void 0 : o.event_booking) == null ? void 0 : l.title }, ((
|
|
1314
|
-
|
|
1315
|
-
} }, n("edit-icon", { width: "16", height: "16" }),
|
|
1316
|
+
} }, d.t("createNewSchedulingPageButtonText"))))), this.state !== "loading" && ((e = this.configurations) == null ? void 0 : e.map((t, a) => {
|
|
1317
|
+
var l, i, c, p;
|
|
1318
|
+
const s = (a === this.configurations.length - 1 || a === this.configurations.length - 2) && this.configurations.length > 3, r = t, o = t;
|
|
1319
|
+
return n("tr", { key: t == null ? void 0 : t.id }, n("td", null, n("div", { class: "title" }, n("div", { class: "config-event-title", title: (l = o == null ? void 0 : o.event_booking) == null ? void 0 : l.title }, ((i = o == null ? void 0 : o.event_booking) == null ? void 0 : i.title) || (r == null ? void 0 : r.name)), n("div", { class: "config-event-description" }, (c = o == null ? void 0 : o.event_booking) == null ? void 0 : c.description))), n("td", null, n("div", { class: "duration" }, this.getDurationString((p = o == null ? void 0 : o.availability) == null ? void 0 : p.duration_minutes))), n("td", null, n("div", { class: "actions" }, n("button-component", { variant: "basic", key: `edit-${a}`, clickHandler: (f) => {
|
|
1320
|
+
f.preventDefault(), this.editButtonClick.emit({ host: this.host, configuration: t });
|
|
1321
|
+
} }, n("edit-icon", { width: "16", height: "16" }), d.t("editSchedulingPageButtonText")), n("select-dropdown", { class: {
|
|
1316
1322
|
last: s
|
|
1317
1323
|
}, name: "actions", options: [
|
|
1318
1324
|
{ value: `preview-${a}`, label: "Preview", labelHTML: this.getActionLabelHTML("preview") },
|
|
1319
1325
|
{ value: `copy-${a}`, label: "Copy link", labelHTML: this.getActionLabelHTML("copy") },
|
|
1320
1326
|
{ value: `delete-${a}`, label: "Delete", labelHTML: this.getActionLabelHTML("delete") }
|
|
1321
1327
|
], 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, actions-Copy, actions-Preview, actions-Delete" }))));
|
|
1322
|
-
})))), n("div", { class: "pagination" }, n("button", { class: "arrow left", onClick: () => this.previousPageClickedHandler(), disabled: this.previousCursors.length <= 0 }, n("chevron-icon", null)), n("button", { class: "arrow right", onClick: () => this.nextPageClickedHandler(), disabled: this.disableNextPageButton }, n("chevron-icon", null)))), this.state === "error" && n("div", { class: "error-container" }, n("p", { class: "error" }, this.error)), !!this.deleteConfigurationId && n("div", { class: "card-wrapper" }, n("div", { class: "card-modal" }, n("div", { class: "close-button" }, n("button-component", { tooltip: "Close", id: "close", variant: "invisible", onClick: (t) => this.closeModal(t), part: "nfbf__close-button" }, n("close-icon", null))), n("div", { class: "header" }, n("h2", { slot: "card-title", part: "nfbf__title" },
|
|
1328
|
+
})))), n("div", { class: "pagination" }, n("button", { class: "arrow left", onClick: () => this.previousPageClickedHandler(), disabled: this.previousCursors.length <= 0 }, n("chevron-icon", null)), n("button", { class: "arrow right", onClick: () => this.nextPageClickedHandler(), disabled: this.disableNextPageButton }, n("chevron-icon", null)))), this.state === "error" && n("div", { class: "error-container" }, n("p", { class: "error" }, this.error)), !!this.deleteConfigurationId && n("div", { class: "card-wrapper" }, n("div", { class: "card-modal" }, n("div", { class: "close-button" }, n("button-component", { tooltip: "Close", id: "close", variant: "invisible", onClick: (t) => this.closeModal(t), part: "nfbf__close-button" }, n("close-icon", null))), n("div", { class: "header" }, n("h2", { slot: "card-title", part: "nfbf__title" }, d.t("deleteSchedulingPageTitle"))), n("div", { class: "description title-desc" }, n("p", null, d.t("deleteSchedulingPageDescription"))), n("div", { class: {
|
|
1323
1329
|
footer: !0
|
|
1324
|
-
} }, n("button-component", { variant: "basic", onClick: (t) => this.closeModal(t), part: "nfbf__button-outline nfbf__cancel-cta" }, `${
|
|
1330
|
+
} }, n("button-component", { variant: "basic", onClick: (t) => this.closeModal(t), part: "nfbf__button-outline nfbf__cancel-cta" }, `${d.t("deleteSchedulingPageCancelButton")}`), n("button-component", { variant: "destructive", onClick: (t) => this.handleConfirmDeleteButtonClicked(t), disabled: this.showDeleteButtonLoading, isLoading: this.showDeleteButtonLoading, part: "nfbf__button-outline nfbf__reschedule-cta" }, `${d.t("deleteSchedulingPageConfirmButton")}`)))));
|
|
1325
1331
|
}
|
|
1326
1332
|
get host() {
|
|
1327
|
-
return
|
|
1333
|
+
return de(this);
|
|
1328
1334
|
}
|
|
1329
1335
|
static get watchers() {
|
|
1330
1336
|
return {
|
|
@@ -1334,7 +1340,7 @@ const qe = class {
|
|
|
1334
1340
|
}
|
|
1335
1341
|
};
|
|
1336
1342
|
_t([
|
|
1337
|
-
|
|
1343
|
+
ce({
|
|
1338
1344
|
name: "nylas-list-configurations",
|
|
1339
1345
|
stateToProps: /* @__PURE__ */ new Map([
|
|
1340
1346
|
["schedulerConfig.configurations", "configurations"],
|
|
@@ -1346,8 +1352,8 @@ _t([
|
|
|
1346
1352
|
initListConfigurations: async (e, t) => {
|
|
1347
1353
|
const { host: a, cursor: s } = e.detail;
|
|
1348
1354
|
await a.setState("loading");
|
|
1349
|
-
const [
|
|
1350
|
-
if (!
|
|
1355
|
+
const [r, o] = await t.schedulerConfig.getConfigurations(s);
|
|
1356
|
+
if (!r && o && o.message) {
|
|
1351
1357
|
await a.setState("error"), await a.setError(o.message);
|
|
1352
1358
|
return;
|
|
1353
1359
|
}
|
|
@@ -1358,16 +1364,16 @@ _t([
|
|
|
1358
1364
|
t.schedulerConfigStore.resetSelectedConfiguration(), (a = t.schedulerConfigStore.state.experimentalFeatures) != null && a.group_events ? t.schedulerConfigStore.state.action = "create-select" : t.schedulerConfigStore.state.action = "create";
|
|
1359
1365
|
},
|
|
1360
1366
|
deleteButtonClick: async (e, t) => {
|
|
1361
|
-
const { host: a, configuration: s } = e.detail, [
|
|
1362
|
-
!
|
|
1367
|
+
const { host: a, configuration: s } = e.detail, [r, o] = await t.schedulerConfig.deleteConfiguration(s.id);
|
|
1368
|
+
!r && o && o.message && (await a.setState("error"), await a.setError(o.message)), await a.hideDeleteConfirmation();
|
|
1363
1369
|
},
|
|
1364
1370
|
editButtonClick: async (e, t) => {
|
|
1365
1371
|
const { configuration: a } = e.detail;
|
|
1366
1372
|
if (t.schedulerConfigStore.state.selectedConfiguration = a, a.type === "group") {
|
|
1367
|
-
const { startTime: s, endTime:
|
|
1373
|
+
const { startTime: s, endTime: r } = et((/* @__PURE__ */ new Date()).toISOString(), "week");
|
|
1368
1374
|
t.schedulerConfigStore.state.calendarViewDateRange = {
|
|
1369
1375
|
start_time: s.toString(),
|
|
1370
|
-
end_time:
|
|
1376
|
+
end_time: r.toString()
|
|
1371
1377
|
};
|
|
1372
1378
|
const [o, l] = await t.schedulerConfig.getGroupEvents(a.id);
|
|
1373
1379
|
if (!o && l && l.message)
|
|
@@ -1378,25 +1384,25 @@ _t([
|
|
|
1378
1384
|
},
|
|
1379
1385
|
fireRegisterEvent: !0
|
|
1380
1386
|
}),
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
],
|
|
1385
|
-
|
|
1387
|
+
ye("design:type", Function),
|
|
1388
|
+
ye("design:paramtypes", []),
|
|
1389
|
+
ye("design:returntype", void 0)
|
|
1390
|
+
], Ye.prototype, "render", null);
|
|
1391
|
+
Ye.style = mt;
|
|
1386
1392
|
const vt = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff;width:inherit}.nylas-select-event-type{height:inherit;overflow-y:auto}.nylas-select-event-type div.header{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--nylas-base-200)}.nylas-select-event-type div.header h2{font-size:18px;padding:0 24px;line-height:24px;margin:0;font-weight:600;color:var(--nylas-base-800)}.nylas-select-event-type div.header button-component button{background:transparent;border:none;cursor:pointer}.nylas-select-event-type div.header button-component button:hover,.nylas-select-event-type div.header button-component button:active{color:var(--nylas-primary);background-color:transparent}.nylas-select-event-type div.header button-component button:disabled{cursor:not-allowed}.nylas-select-event-type div.content{padding:40px}.nylas-select-event-type div.content h3{margin:0 0 32px 0;font-size:18px;line-height:24px;font-weight:600}.nylas-select-event-type div.content div.event-type{display:flex;flex-direction:column;gap:8px}.nylas-select-event-type div.content div.event-type div.event-type-option{padding:16px;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-3x);width:inherit;cursor:pointer;display:flex;flex-direction:column;gap:8px}.nylas-select-event-type div.content div.event-type div.event-type-option h4{margin:0;font-size:16px;line-height:24px;font-weight:600;color:var(--nylas-base-900)}.nylas-select-event-type div.content div.event-type div.event-type-option p{margin:0;font-size:14px;line-height:21px;font-weight:400;color:var(--nylas-base-800)}', wt = vt;
|
|
1387
1393
|
var kt = function(e, t, a, s) {
|
|
1388
|
-
var
|
|
1394
|
+
var r = arguments.length, o = r < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, a) : s, l;
|
|
1389
1395
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
1390
1396
|
o = Reflect.decorate(e, t, a, s);
|
|
1391
1397
|
else
|
|
1392
|
-
for (var
|
|
1393
|
-
(l = e[
|
|
1394
|
-
return
|
|
1395
|
-
},
|
|
1398
|
+
for (var i = e.length - 1; i >= 0; i--)
|
|
1399
|
+
(l = e[i]) && (o = (r < 3 ? l(o) : r > 3 ? l(t, a, o) : l(t, a)) || o);
|
|
1400
|
+
return r > 3 && o && Object.defineProperty(t, a, o), o;
|
|
1401
|
+
}, fe = function(e, t) {
|
|
1396
1402
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
1397
1403
|
return Reflect.metadata(e, t);
|
|
1398
1404
|
};
|
|
1399
|
-
const
|
|
1405
|
+
const Ke = class {
|
|
1400
1406
|
constructor(e) {
|
|
1401
1407
|
X(this, e), this.returnToAllSchedulingPagesEvent = _(this, "returnToAllSchedulingPagesEvent", 7), this.createEventTypeSelected = _(this, "createEventTypeSelected", 7), this.participantOptions = void 0, this.name = "select-event-type", this.selectedLanguage = void 0;
|
|
1402
1408
|
}
|
|
@@ -1416,33 +1422,45 @@ const Ye = class {
|
|
|
1416
1422
|
b("nylas-select-event-type", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
1417
1423
|
}
|
|
1418
1424
|
selectedLanguageChangedHandler(e, t) {
|
|
1419
|
-
e !== t &&
|
|
1425
|
+
e !== t && d.changeLanguage(e);
|
|
1420
1426
|
}
|
|
1421
1427
|
render() {
|
|
1422
|
-
var
|
|
1428
|
+
var r;
|
|
1423
1429
|
const e = [
|
|
1424
|
-
{ label: "1:1", value: O.one_on_one, description: "Allows 1:1 bookings" },
|
|
1425
|
-
{ label: "Collective", value: O.collective, description: "Allows n:1 bookings with additional participants" },
|
|
1426
1430
|
{
|
|
1427
|
-
label: "
|
|
1431
|
+
label: d.t("nylasSelectEventType.eventTypeOptions.oneOnOne.label"),
|
|
1432
|
+
value: O.one_on_one,
|
|
1433
|
+
description: d.t("nylasSelectEventType.eventTypeOptions.oneOnOne.desc")
|
|
1434
|
+
},
|
|
1435
|
+
{
|
|
1436
|
+
label: d.t("nylasSelectEventType.eventTypeOptions.collective.label"),
|
|
1437
|
+
value: O.collective,
|
|
1438
|
+
description: d.t("nylasSelectEventType.eventTypeOptions.collective.desc")
|
|
1439
|
+
},
|
|
1440
|
+
{
|
|
1441
|
+
label: d.t("nylasSelectEventType.eventTypeOptions.maxFairness.label"),
|
|
1428
1442
|
value: O.max_fairness,
|
|
1429
|
-
description: "
|
|
1443
|
+
description: d.t("nylasSelectEventType.eventTypeOptions.maxFairness.desc")
|
|
1430
1444
|
},
|
|
1431
1445
|
{
|
|
1432
|
-
label: "
|
|
1446
|
+
label: d.t("nylasSelectEventType.eventTypeOptions.maxAvailability.label"),
|
|
1433
1447
|
value: O.max_availability,
|
|
1434
|
-
description: "
|
|
1448
|
+
description: d.t("nylasSelectEventType.eventTypeOptions.maxAvailability.desc")
|
|
1435
1449
|
},
|
|
1436
|
-
{
|
|
1437
|
-
|
|
1438
|
-
|
|
1450
|
+
{
|
|
1451
|
+
label: d.t("nylasSelectEventType.eventTypeOptions.group.label"),
|
|
1452
|
+
value: O.group,
|
|
1453
|
+
description: d.t("nylasSelectEventType.eventTypeOptions.group.desc")
|
|
1454
|
+
}
|
|
1455
|
+
], t = this.participantOptions && ((r = this.participantOptions) == null ? void 0 : r.length) > 0 && !!this.participantOptions[0].email && !!this.participantOptions[0].name && !!this.participantOptions[0].calendars && this.participantOptions[0].calendars.length > 0, a = [O.collective, O.max_availability, O.max_fairness], s = [O.one_on_one, O.group];
|
|
1456
|
+
return n(le, { key: "4cd1ea6564b67ff7547499e504214684a61350c3" }, n("div", { key: "2e591b78dcbd4e832ed63a837d0e03edde75e97c", class: "nylas-select-event-type", part: "nset" }, n("div", { key: "9b866ca6a3e3bc025ba13d8f023e825c4c042d14", class: "header", part: "nset__header" }, n("h2", { key: "0a8390189a308bb1ef7c51ca3efa0b5b8d2aa165" }, d.t("nylasSelectEventType.createEventHeaderTitle")), n("button-component", { key: "0a7d6503aa2ea9c137aa59f4a211a88f816844cd", variant: "invisible", part: "nset__header__back-button", onClick: (o) => {
|
|
1439
1457
|
this.returnToAllSchedulingPagesEvent.emit();
|
|
1440
|
-
} }, n("chevron-icon", { key: "
|
|
1458
|
+
} }, n("chevron-icon", { key: "5a81b33f22799f77657f9a8196ec1d72e255865c", width: "16", height: "16" }), n("span", { key: "df5b805d76b1040bacae5e68eebd2ff7a74b2810" }, d.t("nylasSelectEventType.returnToAllSchedulingPages")))), n("div", { key: "ff48e355eb9baac896bf6e3de2dafbfbd91f57c0", class: "content", part: "nset__content" }, n("h3", { key: "d387519b40557886ece52327429e6e58aa133689" }, d.t("nylasSelectEventType.eventTypeHeaderTitle")), n("div", { key: "a3384ed668259f02114efd375cfcaad125f1efe7", class: "event-type", part: "nset__content__event-type" }, e.filter((o) => s.includes(o.value) || t && a.includes(o.value)).map((o) => n("div", { class: "event-type-option", onClick: (l) => {
|
|
1441
1459
|
this.createEventTypeSelected.emit({ eventType: o.value });
|
|
1442
1460
|
}, part: `nset__content__event-type-option-${o.value}` }, n("h4", null, o.label), n("p", null, o.description)))))));
|
|
1443
1461
|
}
|
|
1444
1462
|
get host() {
|
|
1445
|
-
return
|
|
1463
|
+
return de(this);
|
|
1446
1464
|
}
|
|
1447
1465
|
static get watchers() {
|
|
1448
1466
|
return {
|
|
@@ -1452,7 +1470,7 @@ const Ye = class {
|
|
|
1452
1470
|
}
|
|
1453
1471
|
};
|
|
1454
1472
|
kt([
|
|
1455
|
-
|
|
1473
|
+
ce({
|
|
1456
1474
|
name: "nylas-select-event-type",
|
|
1457
1475
|
stateToProps: /* @__PURE__ */ new Map([
|
|
1458
1476
|
["schedulerConfig.selectedLanguage", "selectedLanguage"],
|
|
@@ -1469,16 +1487,16 @@ kt([
|
|
|
1469
1487
|
},
|
|
1470
1488
|
fireRegisterEvent: !0
|
|
1471
1489
|
}),
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
],
|
|
1476
|
-
|
|
1490
|
+
fe("design:type", Function),
|
|
1491
|
+
fe("design:paramtypes", []),
|
|
1492
|
+
fe("design:returntype", void 0)
|
|
1493
|
+
], Ke.prototype, "render", null);
|
|
1494
|
+
Ke.style = wt;
|
|
1477
1495
|
export {
|
|
1478
1496
|
st as google_logo_icon,
|
|
1479
1497
|
lt as microsoft_logo_icon,
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1498
|
+
We as nylas_editor_tabs,
|
|
1499
|
+
qe as nylas_editor_tabs_group,
|
|
1500
|
+
Ye as nylas_list_configurations,
|
|
1501
|
+
Ke as nylas_select_event_type
|
|
1484
1502
|
};
|