@nylas/react 1.3.3 → 1.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/add-circle-icon.entry-321c1dd1.js +15 -0
- package/dist/{add-circle-icon.entry-89060fe6.cjs → add-circle-icon.entry-dcc45961.cjs} +1 -1
- package/dist/archive-icon.entry-715e139b.js +15 -0
- package/dist/archive-icon.entry-c4da9f4f.cjs +1 -0
- package/dist/{arrow-icon.entry-7c38f4ad.js → arrow-icon.entry-9311463c.js} +2 -2
- package/dist/{arrow-icon.entry-e8dbe365.cjs → arrow-icon.entry-bdccce8a.cjs} +1 -1
- package/dist/{bold-icon.entry-665901ce.cjs → bold-icon.entry-06fa4738.cjs} +1 -1
- package/dist/{bold-icon.entry-4ce7cfee.js → bold-icon.entry-c531dff1.js} +4 -4
- package/dist/{button-component_2.entry-89ea010b.js → button-component_2.entry-5aad0ec4.js} +9 -9
- package/dist/{button-component_2.entry-ca263036.cjs → button-component_2.entry-db911efe.cjs} +1 -1
- package/dist/{calendar-agenda-fill-icon_53.entry-347662f3.js → calendar-agenda-fill-icon_53.entry-6f1aa42c.js} +1846 -1433
- package/dist/calendar-agenda-fill-icon_53.entry-affead77.cjs +6 -0
- package/dist/{calendar-cancel-icon.entry-6b7836c9.cjs → calendar-cancel-icon.entry-3bd1c8e9.cjs} +1 -1
- package/dist/{calendar-cancel-icon.entry-c1d33f90.js → calendar-cancel-icon.entry-59375bc4.js} +4 -4
- package/dist/{calendar-check-icon_2.entry-222e3c0b.js → calendar-check-icon_2.entry-1ca369b6.js} +7 -7
- package/dist/{calendar-check-icon_2.entry-67024cd6.cjs → calendar-check-icon_2.entry-540dde9d.cjs} +1 -1
- package/dist/{calendar-icon.entry-380048b0.cjs → calendar-icon.entry-1d9773d5.cjs} +1 -1
- package/dist/{calendar-icon.entry-c08a8f21.js → calendar-icon.entry-66517be4.js} +5 -5
- package/dist/{checkbox-component_3.entry-52b27cb9.cjs → checkbox-component_3.entry-3918885e.cjs} +1 -1
- package/dist/{checkbox-component_3.entry-dab3c3c8.js → checkbox-component_3.entry-cf9507ac.js} +5 -5
- package/dist/{chevron-icon_3.entry-17bb7d23.cjs → chevron-icon_3.entry-27b71bd6.cjs} +1 -1
- package/dist/{chevron-icon_3.entry-7be40d99.js → chevron-icon_3.entry-afc62aa5.js} +13 -13
- package/dist/{clock-icon_4.entry-89e0dd55.js → clock-icon_4.entry-ab2c2eaf.js} +18 -18
- package/dist/{clock-icon_4.entry-875db481.cjs → clock-icon_4.entry-f46a42fc.cjs} +1 -1
- package/dist/close-icon.entry-791cb99c.js +15 -0
- package/dist/close-icon.entry-be2b5f87.cjs +1 -0
- package/dist/{constants-54af2051-a3596673.cjs → constants-91d76d21-0f7c85cc.cjs} +1 -1
- package/dist/{constants-54af2051-767e8462.js → constants-91d76d21-1638ead6.js} +23 -11
- package/dist/copy-icon.entry-16835c5d.cjs +1 -0
- package/dist/{copy-icon.entry-eecc7301.js → copy-icon.entry-c009a659.js} +6 -6
- package/dist/{delete-icon.entry-1e6c99ee.cjs → delete-icon.entry-3c295200.cjs} +1 -1
- package/dist/{delete-icon.entry-4b341b41.js → delete-icon.entry-e8815e15.js} +2 -2
- package/dist/document-refresh-icon.entry-1628d0dd.js +15 -0
- package/dist/{document-refresh-icon.entry-612c5d4f.cjs → document-refresh-icon.entry-7d84ace4.cjs} +1 -1
- package/dist/{feedbackSync-e5cb0245-013ce5ec.cjs → feedbackSync-b5d35a5b-1343e33b.cjs} +1 -1
- package/dist/{feedbackSync-e5cb0245-f8e4575c.js → feedbackSync-b5d35a5b-20032e5d.js} +1 -1
- package/dist/{folder-icon.entry-5bc752d4.cjs → folder-icon.entry-1837e7eb.cjs} +1 -1
- package/dist/{folder-icon.entry-8d91bc75.js → folder-icon.entry-1a70f499.js} +2 -2
- package/dist/forward-icon.entry-7a9952fe.cjs +1 -0
- package/dist/forward-icon.entry-92fa4f95.js +15 -0
- package/dist/{globe-icon.entry-c2ddabb6.js → globe-icon.entry-2886c103.js} +4 -4
- package/dist/{globe-icon.entry-13f5dd98.cjs → globe-icon.entry-5ea64e36.cjs} +1 -1
- package/dist/{google-logo-icon_4.entry-b58af39b.js → google-logo-icon_4.entry-c0413818.js} +168 -148
- package/dist/google-logo-icon_4.entry-ff5ebfd9.cjs +1 -0
- package/dist/inbox-icon.entry-893a70b6.js +15 -0
- package/dist/inbox-icon.entry-ad864253.cjs +1 -0
- package/dist/index-94416062.cjs +81 -0
- package/dist/index-cd93b584.js +16202 -0
- package/dist/{index.es-e9d66a9b-fa36c085.cjs → index.es-ef72cd61-0860521c.cjs} +1 -1
- package/dist/{index.es-e9d66a9b-a07a895d.js → index.es-ef72cd61-3075f564.js} +1 -1
- package/dist/{info-icon_2.entry-14cad09c.js → info-icon_2.entry-891619f7.js} +5 -5
- package/dist/{info-icon_2.entry-fce3a1ce.cjs → info-icon_2.entry-cfa2954a.cjs} +1 -1
- package/dist/{input-color-picker.entry-2079f40e.js → input-color-picker.entry-58c5f4d3.js} +4 -4
- package/dist/{input-color-picker.entry-785e80b1.cjs → input-color-picker.entry-5c3e8407.cjs} +1 -1
- package/dist/{input-component.entry-cee3fa04.js → input-component.entry-a45cff7f.js} +3 -3
- package/dist/{input-component.entry-0edf62cf.cjs → input-component.entry-f6f257b9.cjs} +1 -1
- package/dist/input-dropdown_2.entry-0518caac.js +228 -0
- package/dist/input-dropdown_2.entry-85077fff.cjs +1 -0
- package/dist/italic-icon.entry-7f971c72.cjs +1 -0
- package/dist/italic-icon.entry-a9a0be67.js +15 -0
- package/dist/multi-select-dropdown.entry-0b7e26c0.js +116 -0
- package/dist/multi-select-dropdown.entry-2c5b3f8d.cjs +1 -0
- package/dist/{nylas-booked-event-card_12.entry-56068565.js → nylas-booked-event-card_12.entry-8eed168c.js} +211 -190
- package/dist/nylas-booked-event-card_12.entry-d416f896.cjs +1 -0
- package/dist/{nylas-form-card.entry-77485e1d.cjs → nylas-form-card.entry-2c336c14.cjs} +1 -1
- package/dist/{nylas-form-card.entry-df1c70ff.js → nylas-form-card.entry-8842785d.js} +8 -8
- package/dist/{nylas-if-state.entry-0271bf92.cjs → nylas-if-state.entry-e6c90919.cjs} +1 -1
- package/dist/{nylas-if-state.entry-74c342ef.js → nylas-if-state.entry-fdc20d01.js} +3 -3
- package/dist/{nylas-login.entry-6a308ac9.js → nylas-login.entry-16f39c90.js} +3 -3
- package/dist/{nylas-login.entry-2483aa51.cjs → nylas-login.entry-dcdc4d06.cjs} +1 -1
- package/dist/{nylas-provider.entry-df790de3.cjs → nylas-provider.entry-0cc093e4.cjs} +1 -1
- package/dist/{nylas-provider.entry-5cbbd312.js → nylas-provider.entry-d51de210.js} +5 -5
- package/dist/nylas-scheduler-editor.entry-af211f07.cjs +2 -0
- package/dist/{nylas-scheduler-editor.entry-b6793c45.js → nylas-scheduler-editor.entry-d0214565.js} +48 -30
- package/dist/{nylas-scheduling.entry-fea8dca0.js → nylas-scheduling.entry-3d3a4eb4.js} +7 -7
- package/dist/{nylas-scheduling.entry-2a9aed18.cjs → nylas-scheduling.entry-ce1ef505.cjs} +1 -1
- package/dist/{nylas-time-window-picker_2.entry-fc5aa4be.js → nylas-time-window-picker_2.entry-24672606.js} +30 -30
- package/dist/{nylas-time-window-picker_2.entry-32f657a2.cjs → nylas-time-window-picker_2.entry-52a54abb.cjs} +1 -1
- package/dist/{person-icon.entry-c853f6b5.cjs → person-icon.entry-954d4c10.cjs} +1 -1
- package/dist/{person-icon.entry-fae1d972.js → person-icon.entry-dcdc2118.js} +4 -4
- package/dist/{play-icon.entry-b07a4311.cjs → play-icon.entry-7e17d583.cjs} +1 -1
- package/dist/{play-icon.entry-6ccd7cb6.js → play-icon.entry-e727a1d6.js} +4 -4
- package/dist/react.cjs +1 -1
- package/dist/react.js +1 -1
- package/dist/{refresh-icon.entry-b717e4fe.js → refresh-icon.entry-d5e50180.js} +4 -4
- package/dist/{refresh-icon.entry-a218275f.cjs → refresh-icon.entry-f735be78.cjs} +1 -1
- package/dist/{register-component-5d7bcc15-bb9405d1.cjs → register-component-a169494c-3d95c4fd.cjs} +1 -1
- package/dist/{register-component-5d7bcc15-43981253.js → register-component-a169494c-62768a00.js} +1 -1
- package/dist/{reply-all-icon.entry-f20c4a10.js → reply-all-icon.entry-848cd16f.js} +5 -5
- package/dist/{reply-all-icon.entry-cd2bafd1.cjs → reply-all-icon.entry-c847636d.cjs} +1 -1
- package/dist/reply-icon.entry-028435a1.cjs +1 -0
- package/dist/reply-icon.entry-9e3e5122.js +15 -0
- package/dist/{scheduler-config-store-ed4a8dfd-96520080.cjs → scheduler-config-store-ed4a8dfd-0e3f540f.cjs} +1 -1
- package/dist/{scheduler-config-store-ed4a8dfd-2619e757.js → scheduler-config-store-ed4a8dfd-622802c7.js} +1 -1
- package/dist/{scheduler-store-3acf4d70-53282ac4.cjs → scheduler-store-8e74959b-c8514d9a.cjs} +1 -1
- package/dist/{scheduler-store-3acf4d70-68aacbea.js → scheduler-store-8e74959b-ffa0b3c6.js} +2 -2
- package/dist/sent-icon.entry-eef67c1a.cjs +1 -0
- package/dist/sent-icon.entry-f8fda6ff.js +15 -0
- package/dist/spam-icon.entry-22437325.cjs +1 -0
- package/dist/spam-icon.entry-ec4f3144.js +15 -0
- package/dist/{star-icon.entry-6fc95071.js → star-icon.entry-d7cd7608.js} +5 -5
- package/dist/{star-icon.entry-a6e85c82.cjs → star-icon.entry-f275321a.cjs} +1 -1
- package/dist/{stop-icon.entry-8b041eda.js → stop-icon.entry-55779283.js} +2 -2
- package/dist/{stop-icon.entry-eee61c96.cjs → stop-icon.entry-89c2bae7.cjs} +1 -1
- package/dist/{textarea-component.entry-dc92a53f.js → textarea-component.entry-02360e34.js} +2 -2
- package/dist/{textarea-component.entry-cbe424d4.cjs → textarea-component.entry-5e8cb080.cjs} +1 -1
- package/dist/{translate-icon.entry-7307d3f1.cjs → translate-icon.entry-a7915e82.cjs} +1 -1
- package/dist/{translate-icon.entry-447f1502.js → translate-icon.entry-b0b36e4c.js} +4 -4
- package/dist/trash-fill-icon.entry-1fd28f47.js +15 -0
- package/dist/trash-fill-icon.entry-e933f219.cjs +1 -0
- package/dist/{underline-icon.entry-6acfca57.js → underline-icon.entry-1636f401.js} +2 -2
- package/dist/{underline-icon.entry-c636ca0e.cjs → underline-icon.entry-8bf17177.cjs} +1 -1
- package/dist/{warning-icon.entry-03615141.cjs → warning-icon.entry-27c0cdd6.cjs} +1 -1
- package/dist/{warning-icon.entry-290eb052.js → warning-icon.entry-cef2e7c1.js} +7 -7
- package/package.json +3 -3
- package/dist/add-circle-icon.entry-8b883ae4.js +0 -15
- package/dist/archive-icon.entry-62c7e06e.js +0 -15
- package/dist/archive-icon.entry-e9038aeb.cjs +0 -1
- package/dist/calendar-agenda-fill-icon_53.entry-da0fac2a.cjs +0 -9
- package/dist/close-icon.entry-4b2a2974.js +0 -15
- package/dist/close-icon.entry-e52d8440.cjs +0 -1
- package/dist/copy-icon.entry-f3370220.cjs +0 -1
- package/dist/document-refresh-icon.entry-653dc173.js +0 -15
- package/dist/forward-icon.entry-1d14a631.js +0 -15
- package/dist/forward-icon.entry-fe0f2a3a.cjs +0 -1
- package/dist/google-logo-icon_4.entry-59423b91.cjs +0 -1
- package/dist/inbox-icon.entry-2e8c1cf5.cjs +0 -1
- package/dist/inbox-icon.entry-5a452db1.js +0 -15
- package/dist/index-5611d3d5.cjs +0 -81
- package/dist/index-589f8eee.js +0 -13086
- package/dist/input-dropdown.entry-63cf88c1.cjs +0 -1
- package/dist/input-dropdown.entry-a1bac5bf.js +0 -134
- package/dist/italic-icon.entry-85a90ace.js +0 -15
- package/dist/italic-icon.entry-9ced8045.cjs +0 -1
- package/dist/multi-select-dropdown.entry-dd699cdf.js +0 -112
- package/dist/multi-select-dropdown.entry-f6ac5ae9.cjs +0 -1
- package/dist/nylas-booked-event-card_12.entry-89bcf205.cjs +0 -1
- package/dist/nylas-scheduler-editor.entry-c23fd4d8.cjs +0 -2
- package/dist/reply-icon.entry-30b5222b.cjs +0 -1
- package/dist/reply-icon.entry-abfbde42.js +0 -15
- package/dist/sent-icon.entry-2b183210.cjs +0 -1
- package/dist/sent-icon.entry-77bb678e.js +0 -15
- package/dist/spam-icon.entry-42f9c9e7.js +0 -15
- package/dist/spam-icon.entry-cbeaca0c.cjs +0 -1
- package/dist/time-period-selector.entry-45ca7b1a.js +0 -99
- package/dist/time-period-selector.entry-60718809.cjs +0 -1
- package/dist/trash-fill-icon.entry-1138f73e.cjs +0 -1
- package/dist/trash-fill-icon.entry-7d11144b.js +0 -15
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as q, h as e, c as k, d as u, n as St,
|
|
2
|
-
import { R as Bt } from "./register-component-
|
|
3
|
-
import { D as
|
|
4
|
-
import { i as Rt, a as At, c as jt, b as $t, f as Jt } from "./feedbackSync-
|
|
1
|
+
import { r as q, h as e, c as k, d as u, n as St, i as d, o as tt, H as Tt, g as Ft, F as Ut } from "./index-cd93b584.js";
|
|
2
|
+
import { R as Bt } from "./register-component-a169494c-62768a00.js";
|
|
3
|
+
import { D as Lt } from "./constants-91d76d21-1638ead6.js";
|
|
4
|
+
import { i as Rt, a as At, c as jt, b as $t, f as Jt } from "./feedbackSync-b5d35a5b-20032e5d.js";
|
|
5
5
|
import "react";
|
|
6
6
|
import "react-dom";
|
|
7
7
|
const Vt = ".sc-google-logo-icon-h{display:flex}", Zt = Vt, Gt = class {
|
|
@@ -9,7 +9,7 @@ const Vt = ".sc-google-logo-icon-h{display:flex}", Zt = Vt, Gt = class {
|
|
|
9
9
|
q(this, t), this.width = "24", this.height = "24";
|
|
10
10
|
}
|
|
11
11
|
render() {
|
|
12
|
-
return e("svg", { key: "
|
|
12
|
+
return e("svg", { key: "3ca599e18ce6095779ded84b497b5296f17c10d2", width: this.width, height: this.height, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, e("g", { key: "88b3f5f83ede3ed85a770467f48ad836405b990a", "clip-path": "url(#clip0_959_12452)" }, e("path", { key: "4e15a1ff9fd5ed8752a01653cc0313519c3979ca", d: "M23.745 12.27C23.745 11.48 23.675 10.73 23.555 10H12.255V14.51H18.725C18.435 15.99 17.585 17.24 16.325 18.09V21.09H20.185C22.445 19 23.745 15.92 23.745 12.27Z", fill: "#4285F4" }), e("path", { key: "1d5b9ac448e9067003693fc996d84e4a6a6fb424", d: "M12.255 24C15.495 24 18.205 22.92 20.185 21.09L16.325 18.09C15.245 18.81 13.875 19.25 12.255 19.25C9.12504 19.25 6.47505 17.14 5.52505 14.29H1.54504V17.38C3.51504 21.3 7.56504 24 12.255 24Z", fill: "#34A853" }), e("path", { key: "60c45db031014875d1f0c51e4d96d233ff4d739e", d: "M5.52501 14.2901C5.27501 13.5701 5.145 12.8001 5.145 12.0001C5.145 11.2001 5.28501 10.4301 5.52501 9.71012V6.62012H1.545C0.725004 8.24012 0.255005 10.0601 0.255005 12.0001C0.255005 13.9401 0.725004 15.7601 1.545 17.3801L5.52501 14.2901Z", fill: "#FBBC05" }), e("path", { key: "c11e6c275b10368721e0d520d98a8f57bc38acc5", d: "M12.255 4.75C14.025 4.75 15.605 5.36 16.855 6.55L20.275 3.13C18.205 1.19 15.495 0 12.255 0C7.56504 0 3.51504 2.7 1.54504 6.62L5.52505 9.71C6.47505 6.86 9.12504 4.75 12.255 4.75Z", fill: "#EA4335" })), e("defs", { key: "9ed8d3df0e31854c32fe754fc79877ca48ea5ab9" }, e("clipPath", { key: "7b54dd3d596dc38980237b59f21184a00316760f", id: "clip0_959_12452" }, e("rect", { key: "6632bab4f2645c9a5dc9f3f000a7b537d5b09f22", width: 24, height: 24, fill: "white" }))));
|
|
13
13
|
}
|
|
14
14
|
};
|
|
15
15
|
Gt.style = Zt;
|
|
@@ -18,7 +18,7 @@ const Wt = ".sc-microsoft-logo-icon-h{display:flex}", qt = Wt, Kt = class {
|
|
|
18
18
|
q(this, t), this.width = "22", this.height = "22";
|
|
19
19
|
}
|
|
20
20
|
render() {
|
|
21
|
-
return e("svg", { key: "
|
|
21
|
+
return e("svg", { key: "970afb49d36b25194c649b69ca0f136a588c20a4", width: this.width, height: this.height, viewBox: "0 0 22 22", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, e("path", { key: "b3f4f95ead19fff86c4026bcf226a31a22b9c09a", d: "M0.043457 0.043457H10.4782V10.4782H0.043457V0.043457Z", fill: "#F35325" }), e("path", { key: "425e0c099da7b5e3637665f2b9240aab9dd43589", d: "M11.5217 0.043457H21.9565V10.4782H11.5217V0.043457Z", fill: "#81BC06" }), e("path", { key: "2f531126f18dd92603d2caaa31dfaf8a3dac3c9f", d: "M0.043457 11.5217H10.4782V21.9565H0.043457V11.5217Z", fill: "#05A6F0" }), e("path", { key: "b500f059a84c5223d1688410bc8378e02fc87156", d: "M11.5217 11.5217H21.9565V21.9565H11.5217V11.5217Z", fill: "#FFBA08" }));
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
24
|
Kt.style = qt;
|
|
@@ -26,7 +26,7 @@ var r;
|
|
|
26
26
|
(function(t) {
|
|
27
27
|
t.EventInfo = "eventInfo", t.Availability = "availability", t.BookingOptions = "bookingOptions", t.Communications = "communications", t.Participants = "participants", t.BookingForm = "bookingForm", t.PageStyles = "pageStyles";
|
|
28
28
|
})(r || (r = {}));
|
|
29
|
-
function Qt({ id: t, formState: a, activeTab: n },
|
|
29
|
+
function Qt({ id: t, formState: a, activeTab: n, i18next: i }, o) {
|
|
30
30
|
return e(
|
|
31
31
|
Ut,
|
|
32
32
|
null,
|
|
@@ -89,11 +89,11 @@ function Qt({ id: t, formState: a, activeTab: n }, i) {
|
|
|
89
89
|
e(
|
|
90
90
|
"div",
|
|
91
91
|
{ class: "tab-header" },
|
|
92
|
-
e("h3", null, "
|
|
93
|
-
e("p", null,
|
|
92
|
+
e("h3", null, i.t("eventCommunicationsTitle")),
|
|
93
|
+
e("p", null, i.t("eventCommunicationsDescription"))
|
|
94
94
|
),
|
|
95
95
|
e("nylas-confirmation-email", { name: "confirmation-email-template", exportparts: "nce, nce__tab-heading, nce__header, nce__body, nce__confirmation-email-toggle--container, nce__summary, nce__reminder-input_dropdown, nce__reminder-input_dropdown-input, nce__reminder-input_dropdown-content" }),
|
|
96
|
-
e("nylas-reminder-emails", { name: "reminder-emails", exportparts: "nre, nre__tab-heading, nre__header, nre__body, nre__confirmation-email-toggle--container, nre__summary,
|
|
96
|
+
e("nylas-reminder-emails", { name: "reminder-emails", exportparts: "nre, nre__tab-heading, nre__header, nre__body, nre__confirmation-email-toggle--container, nre__summary, nrt, nrt__number-dropdown, nrt__number-dropdown-button, nrt__number-dropdown-content, nrt__period-dropdown, nrt__period-dropdown-button, nrt__period-dropdown-content, nrt__time-period-selector" })
|
|
97
97
|
),
|
|
98
98
|
e(
|
|
99
99
|
"div",
|
|
@@ -106,7 +106,7 @@ function Qt({ id: t, formState: a, activeTab: n }, i) {
|
|
|
106
106
|
{ key: `page-styles-${t}`, class: { hide: n !== r.PageStyles } },
|
|
107
107
|
e("nylas-custom-event-slug", { name: "custom-event-slug", exportparts: "nces, nces__body, nces__header, nces__drawer-toggle--container, nces__input-textfield" }),
|
|
108
108
|
e("nylas-page-name", { name: "page-name", exportparts: "npn, npn__body, npn__header, npn__drawer-toggle--container, npn__input-textfield" }),
|
|
109
|
-
e("nylas-page-styling", { name: "page-styling", exportparts: "nps, nps__header, nps__drawer-toggle--container, nps__body, nps__title-input-textfield, nps__company-logo-input-textfield, nps__color-picker, nps__color-picker-button, nps__color-picker-button-label, nps__color-picker-selected-label, nps__submit-button-label-input-textfield, nps__message-textarea" },
|
|
109
|
+
e("nylas-page-styling", { name: "page-styling", exportparts: "nps, nps__header, nps__drawer-toggle--container, nps__body, nps__title-input-textfield, nps__company-logo-input-textfield, nps__color-picker, nps__color-picker-button, nps__color-picker-button-label, nps__color-picker-selected-label, nps__submit-button-label-input-textfield, nps__message-textarea" }, o)
|
|
110
110
|
),
|
|
111
111
|
e(
|
|
112
112
|
"div",
|
|
@@ -115,24 +115,22 @@ function Qt({ id: t, formState: a, activeTab: n }, i) {
|
|
|
115
115
|
)
|
|
116
116
|
);
|
|
117
117
|
}
|
|
118
|
-
const Xt = '.sc-nylas-editor-tabs-h{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.scheduler-editor.sc-nylas-editor-tabs{display:flex;flex-direction:column;height:inherit}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs{height:calc(100% - 80px);display:grid;grid-template-columns:minmax(224px, 25%) 1fr}@media screen and (max-width: 768px){.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs{display:table-column-group;height:auto}}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs{display:flex;flex-direction:column;border-right:1px solid var(--nylas-base-200);background-color:var(--nylas-base-25)}@media screen and (max-width: 768px){.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs{border-right:none}}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.sc-nylas-editor-tabs{display:flex;align-items:center;gap:0.5rem;padding:0.5rem 1rem;color:var(--nylas-base-900);background:var(--nylas-base-0);border:none;height:56px;font-family:var(--nylas-font-family);font-size:16px;font-weight:500;line-height:24px;cursor:pointer}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.sc-nylas-editor-tabs:not(:first-of-type){margin-top:0.25rem}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.sc-nylas-editor-tabs:last-of-type{margin-bottom:0.25rem}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.active.sc-nylas-editor-tabs{font-weight:600;background:var(--nylas-base-0);color:var(--nylas-primary);border-left:4px solid var(--nylas-primary);box-shadow:0px 1px 2px 0px rgba(0, 0, 0, 0.0588235294);box-shadow:0px 1px 3px 0px rgba(0, 0, 0, 0.1019607843)}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.hide.sc-nylas-editor-tabs{display:none}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs{max-width:692px;overflow-y:auto;overflow-x:hidden}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs .hide.sc-nylas-editor-tabs{display:none}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-info.sc-nylas-editor-tabs,.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-limits.sc-nylas-editor-tabs{width:inherit}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-info.sc-nylas-editor-tabs div[slot=inputs].sc-nylas-editor-tabs,.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-limits.sc-nylas-editor-tabs div[slot=inputs].sc-nylas-editor-tabs{display:flex;flex-direction:column;gap:1rem}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs .tab-header.sc-nylas-editor-tabs{display:flex;flex-direction:column;margin:1rem 1rem 0.5rem;row-gap:4px}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs .tab-header.sc-nylas-editor-tabs h3.sc-nylas-editor-tabs{margin:0;font-size:
|
|
118
|
+
const Xt = '.sc-nylas-editor-tabs-h{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.scheduler-editor.sc-nylas-editor-tabs{display:flex;flex-direction:column;height:inherit}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs{height:calc(100% - 80px);display:grid;grid-template-columns:minmax(224px, 25%) 1fr}@media screen and (max-width: 768px){.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs{display:table-column-group;height:auto}}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs{display:flex;flex-direction:column;border-right:1px solid var(--nylas-base-200);background-color:var(--nylas-base-25)}@media screen and (max-width: 768px){.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs{border-right:none}}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.sc-nylas-editor-tabs{display:flex;align-items:center;text-align:left;gap:0.5rem;padding:0.5rem 1rem;color:var(--nylas-base-900);background:var(--nylas-base-0);border:none;height:56px;font-family:var(--nylas-font-family);font-size:16px;font-weight:500;line-height:24px;cursor:pointer}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.sc-nylas-editor-tabs:not(:first-of-type){margin-top:0.25rem}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.sc-nylas-editor-tabs:last-of-type{margin-bottom:0.25rem}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.active.sc-nylas-editor-tabs{font-weight:600;background:var(--nylas-base-0);color:var(--nylas-primary);border-left:4px solid var(--nylas-primary);box-shadow:0px 1px 2px 0px rgba(0, 0, 0, 0.0588235294);box-shadow:0px 1px 3px 0px rgba(0, 0, 0, 0.1019607843)}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.hide.sc-nylas-editor-tabs{display:none}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs{max-width:692px;overflow-y:auto;overflow-x:hidden}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs .hide.sc-nylas-editor-tabs{display:none}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-info.sc-nylas-editor-tabs,.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-limits.sc-nylas-editor-tabs{width:inherit}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-info.sc-nylas-editor-tabs div[slot=inputs].sc-nylas-editor-tabs,.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-limits.sc-nylas-editor-tabs div[slot=inputs].sc-nylas-editor-tabs{display:flex;flex-direction:column;gap:1rem}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs .tab-header.sc-nylas-editor-tabs{display:flex;flex-direction:column;margin:1rem 1rem 0.5rem;row-gap:4px}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs .tab-header.sc-nylas-editor-tabs h3.sc-nylas-editor-tabs{margin:0;font-size:16px;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs .tab-header.sc-nylas-editor-tabs p.sc-nylas-editor-tabs{margin:0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.footer.sc-nylas-editor-tabs{display:flex;justify-content:space-between;align-items:center;gap:1rem;min-height:80px;padding:0 1rem;border-top:1px solid var(--nylas-base-200)}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs{flex-direction:column;height:auto}}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs .preview.sc-nylas-editor-tabs{margin-top:1rem;width:100%}}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs{display:flex;justify-content:flex-end;align-items:center;justify-self:flex-end;gap:1rem}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs{flex-direction:column-reverse;width:100%}}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.sc-nylas-editor-tabs{max-width:524px}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.unsaved-changes.sc-nylas-editor-tabs{color:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.saved-changes.sc-nylas-editor-tabs{color:var(--nylas-success)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.error.sc-nylas-editor-tabs{color:var(--nylas-error)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.error-full-width.sc-nylas-editor-tabs{max-width:660px}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button-component.sc-nylas-editor-tabs{width:100%}}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs{background:var(--nylas-primary);color:var(--nylas-base-0);height:48px;border:none;border-radius:var(--nylas-border-radius-2x);font-size:16px;line-height:24px;padding:0 1rem;cursor:pointer;width:148px}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:hover{background:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:active{background:var(--nylas-base-800)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:disabled{background:var(--nylas-base-300);cursor:not-allowed}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs span.sc-nylas-editor-tabs{display:flex;align-items:center;justify-content:center;gap:0.5rem}button-component#report-issue.sc-nylas-editor-tabs{width:auto}nylas-feedback-form.sc-nylas-editor-tabs{position:absolute;top:0;height:100%;width:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;background:rgba(0, 0, 0, 0.6);z-index:2;border-radius:inherit}', Yt = Xt;
|
|
119
119
|
var te = function(t, a, n, i) {
|
|
120
|
-
var o = arguments.length, s = o < 3 ? a : i === null ? i = Object.getOwnPropertyDescriptor(a, n) : i,
|
|
120
|
+
var o = arguments.length, s = o < 3 ? a : i === null ? i = Object.getOwnPropertyDescriptor(a, n) : i, b;
|
|
121
121
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
122
122
|
s = Reflect.decorate(t, a, n, i);
|
|
123
123
|
else
|
|
124
124
|
for (var l = t.length - 1; l >= 0; l--)
|
|
125
|
-
(
|
|
125
|
+
(b = t[l]) && (s = (o < 3 ? b(s) : o > 3 ? b(a, n, s) : b(a, n)) || s);
|
|
126
126
|
return o > 3 && s && Object.defineProperty(a, n, s), s;
|
|
127
127
|
}, X = function(t, a) {
|
|
128
128
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
129
129
|
return Reflect.metadata(t, a);
|
|
130
130
|
};
|
|
131
|
-
const
|
|
131
|
+
const Pt = class {
|
|
132
132
|
constructor(t) {
|
|
133
|
-
q(this, t), this.schedulerConfigChanged = k(this, "schedulerConfigChanged", 7), this.cancelButtonClick = k(this, "cancelButtonClick", 7), this.formSubmitted = k(this, "formSubmitted", 7), this.previewButtonClicked = k(this, "previewButtonClicked", 7), this.schedulerEditorFormUpdated = k(this, "schedulerEditorFormUpdated", 7), this.
|
|
134
|
-
this.error = a.message;
|
|
135
|
-
}, this.formSubmissionHandler = async (a) => {
|
|
133
|
+
q(this, t), this.schedulerConfigChanged = k(this, "schedulerConfigChanged", 7), this.schedulerConfigCreated = k(this, "schedulerConfigCreated", 7), this.cancelButtonClick = k(this, "cancelButtonClick", 7), this.formSubmitted = k(this, "formSubmitted", 7), this.previewButtonClicked = k(this, "previewButtonClicked", 7), this.schedulerEditorFormUpdated = k(this, "schedulerEditorFormUpdated", 7), this.formSubmissionHandler = async (a) => {
|
|
136
134
|
var et, at, nt, it, st, ot, rt, lt, dt, ct, bt, ht, ut, pt, mt, ft, yt;
|
|
137
135
|
a.preventDefault();
|
|
138
136
|
const n = await this.formSubmitted.emit();
|
|
@@ -143,12 +141,12 @@ const Tt = class {
|
|
|
143
141
|
this.isLoading = !0, this.hasUnsavedChanges = !1;
|
|
144
142
|
const o = this.updateFormState();
|
|
145
143
|
u("[nylas-editor-tabs]", "formState", o);
|
|
146
|
-
const { title: s, description:
|
|
144
|
+
const { title: s, description: b, duration: l, availability: h, bookingCalendar: y, location: L, bookingType: T, buffer: O, availableDaysInFuture: D, minCancellationNotice: I, minBookingNotice: M, cancellationPolicy: N, timeslotInterval: C, additionalGuestsHidden: z, hideCancellationOptions: U, hideReschedulingOptions: R, participants: w, participantOpenHours: m, additionalFields: A, participantCalendars: g, conferencing: j, participantBookingCalendars: f, reminders: $, emailTemplate: J, redirectUrl: V, availabilityMethod: P, slug: Z, appearance: G, name: W } = o, p = ((at = (et = this.selectedConfiguration) == null ? void 0 : et.participants) == null ? void 0 : at.find((c) => c.is_organizer)) || (w == null ? void 0 : w.find((c) => c.is_organizer)), S = g && (p != null && p.email) ? g[p == null ? void 0 : p.email] : [], _ = ((nt = p == null ? void 0 : p.booking) == null ? void 0 : nt.calendar_id) || y, v = l ? parseInt(l) : 30, x = w && (w == null ? void 0 : w.length) > 0 ? w : [
|
|
147
145
|
{
|
|
148
|
-
name: (
|
|
149
|
-
email: (
|
|
146
|
+
name: (p == null ? void 0 : p.name) ?? ((it = this.currentUser) == null ? void 0 : it.name) ?? "",
|
|
147
|
+
email: (p == null ? void 0 : p.email) ?? ((st = this.currentUser) == null ? void 0 : st.email) ?? "",
|
|
150
148
|
is_organizer: !0,
|
|
151
|
-
timezone: (
|
|
149
|
+
timezone: (h == null ? void 0 : h.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
152
150
|
availability: {
|
|
153
151
|
calendar_ids: y && y !== "" ? [y] : ["primary"],
|
|
154
152
|
open_hours: []
|
|
@@ -157,114 +155,114 @@ const Tt = class {
|
|
|
157
155
|
calendar_id: y && y !== "" ? y : "primary"
|
|
158
156
|
}
|
|
159
157
|
}
|
|
160
|
-
],
|
|
158
|
+
], E = {
|
|
161
159
|
...((ot = this.selectedConfiguration) == null ? void 0 : ot.id) && { id: this.selectedConfiguration.id },
|
|
162
160
|
version: ((rt = this.selectedConfiguration) == null ? void 0 : rt.version) ?? "1.0.0",
|
|
163
|
-
slug:
|
|
164
|
-
name:
|
|
161
|
+
slug: Z,
|
|
162
|
+
name: W,
|
|
165
163
|
availability: {
|
|
166
|
-
duration_minutes:
|
|
167
|
-
interval_minutes: (
|
|
168
|
-
round_to:
|
|
164
|
+
duration_minutes: v,
|
|
165
|
+
interval_minutes: (C == null ? void 0 : C.interval) ?? v,
|
|
166
|
+
round_to: C == null ? void 0 : C.roundTo,
|
|
169
167
|
availability_rules: {
|
|
170
|
-
availability_method:
|
|
168
|
+
availability_method: P || (((ct = (dt = (lt = this.selectedConfiguration) == null ? void 0 : lt.availability) == null ? void 0 : dt.availability_rules) == null ? void 0 : ct.availability_method) ?? "collective"),
|
|
171
169
|
buffer: O || { before: 0, after: 0 },
|
|
172
|
-
default_open_hours: (
|
|
170
|
+
default_open_hours: (h == null ? void 0 : h.openHours) ?? ((ut = (ht = (bt = this.selectedConfiguration) == null ? void 0 : bt.availability) == null ? void 0 : ht.availability_rules) == null ? void 0 : ut.default_open_hours) ?? Lt,
|
|
173
171
|
round_robin_group_id: ((ft = (mt = (pt = this.selectedConfiguration) == null ? void 0 : pt.availability) == null ? void 0 : mt.availability_rules) == null ? void 0 : ft.round_robin_group_id) ?? ""
|
|
174
172
|
}
|
|
175
173
|
},
|
|
176
174
|
participants: [
|
|
177
|
-
...
|
|
178
|
-
var
|
|
179
|
-
let
|
|
180
|
-
if ((
|
|
181
|
-
const xt =
|
|
175
|
+
...x ? x.map((c) => {
|
|
176
|
+
var gt, _t, vt, wt, kt, Ct;
|
|
177
|
+
let B = (h == null ? void 0 : h.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
178
|
+
if ((gt = m == null ? void 0 : m[c.email]) != null && gt.length && (B = (vt = (_t = m == null ? void 0 : m[c.email]) == null ? void 0 : _t[0]) == null ? void 0 : vt.timezone), c.is_organizer) {
|
|
179
|
+
const xt = f != null && f[c.email] ? f == null ? void 0 : f[c.email] : _ || "primary", Q = g != null && g[c.email] ? g == null ? void 0 : g[c.email] : S != null && S.length ? S : ["primary"], zt = Q.length === 1 && Q[0] === "primary";
|
|
182
180
|
return {
|
|
183
|
-
name:
|
|
184
|
-
email:
|
|
181
|
+
name: c.name ?? "",
|
|
182
|
+
email: c.email,
|
|
185
183
|
is_organizer: !0,
|
|
186
|
-
timezone:
|
|
184
|
+
timezone: B,
|
|
187
185
|
availability: {
|
|
188
186
|
calendar_ids: zt ? [xt] : Q,
|
|
189
|
-
open_hours: (
|
|
187
|
+
open_hours: (m == null ? void 0 : m[c.email]) ?? ((wt = c.availability) == null ? void 0 : wt.open_hours) ?? []
|
|
190
188
|
},
|
|
191
189
|
booking: {
|
|
192
190
|
calendar_id: xt
|
|
193
191
|
}
|
|
194
192
|
};
|
|
195
193
|
}
|
|
196
|
-
const
|
|
194
|
+
const H = f != null && f[c.email] ? { calendar_id: f == null ? void 0 : f[c.email] } : (c == null ? void 0 : c.booking) ?? void 0, K = (g == null ? void 0 : g[c.email]) ?? ((kt = c.availability) == null ? void 0 : kt.calendar_ids) ?? ["primary"], Nt = K.length === 1 && K[0] === "primary";
|
|
197
195
|
return {
|
|
198
|
-
...
|
|
199
|
-
timezone:
|
|
200
|
-
availability:
|
|
201
|
-
calendar_ids: Nt && typeof
|
|
202
|
-
open_hours: (
|
|
196
|
+
...c,
|
|
197
|
+
timezone: B,
|
|
198
|
+
availability: c.availability ? {
|
|
199
|
+
calendar_ids: Nt && typeof H < "u" ? [H == null ? void 0 : H.calendar_id] : K,
|
|
200
|
+
open_hours: (m == null ? void 0 : m[c.email]) ?? ((Ct = c.availability) == null ? void 0 : Ct.open_hours) ?? []
|
|
203
201
|
} : void 0,
|
|
204
|
-
booking:
|
|
202
|
+
booking: H
|
|
205
203
|
};
|
|
206
204
|
}) : []
|
|
207
205
|
],
|
|
208
206
|
event_booking: {
|
|
209
207
|
title: (s == null ? void 0 : s.toString()) ?? "",
|
|
210
|
-
description: (
|
|
211
|
-
location: (
|
|
212
|
-
booking_type: (
|
|
213
|
-
timezone: (
|
|
214
|
-
conferencing:
|
|
215
|
-
reminders:
|
|
208
|
+
description: (b == null ? void 0 : b.toString()) ?? "",
|
|
209
|
+
location: (L == null ? void 0 : L.toString()) ?? "",
|
|
210
|
+
booking_type: (T == null ? void 0 : T.toString()) ?? "booking",
|
|
211
|
+
timezone: (h == null ? void 0 : h.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
212
|
+
conferencing: j,
|
|
213
|
+
reminders: $
|
|
216
214
|
},
|
|
217
215
|
scheduler: {
|
|
218
|
-
cancellation_policy:
|
|
219
|
-
available_days_in_future:
|
|
220
|
-
min_cancellation_notice:
|
|
221
|
-
min_booking_notice:
|
|
222
|
-
hide_additional_guests:
|
|
223
|
-
hide_cancellation_options:
|
|
224
|
-
hide_rescheduling_options:
|
|
225
|
-
additional_fields:
|
|
226
|
-
email_template:
|
|
227
|
-
confirmation_redirect_url:
|
|
216
|
+
cancellation_policy: N ?? "",
|
|
217
|
+
available_days_in_future: D ?? 30,
|
|
218
|
+
min_cancellation_notice: I ?? 0,
|
|
219
|
+
min_booking_notice: M ?? 60,
|
|
220
|
+
hide_additional_guests: z ?? !1,
|
|
221
|
+
hide_cancellation_options: U ?? !1,
|
|
222
|
+
hide_rescheduling_options: R ?? !1,
|
|
223
|
+
additional_fields: A,
|
|
224
|
+
email_template: J,
|
|
225
|
+
confirmation_redirect_url: V
|
|
228
226
|
},
|
|
229
|
-
appearance:
|
|
230
|
-
},
|
|
231
|
-
this.isConfigRoundRobin(
|
|
232
|
-
const
|
|
227
|
+
appearance: G
|
|
228
|
+
}, Ht = St(this.selectedConfiguration, E || {}), F = this.action === "create" ? Ht : E;
|
|
229
|
+
this.isConfigRoundRobin(F) && (F.participants = F.participants.map((c) => ({ ...c, is_organizer: void 0 })));
|
|
230
|
+
const Ot = (c) => {
|
|
233
231
|
this.isLoading = !1, this.changesSaved = !0, setTimeout(() => {
|
|
234
232
|
this.changesSaved = !1;
|
|
235
233
|
}, 5e3);
|
|
236
|
-
}, Dt = this.checkForBookingFormErrors(
|
|
237
|
-
var
|
|
238
|
-
return
|
|
239
|
-
})) || {}, Mt = this.checkForOrganizerConfirmationError(St(
|
|
240
|
-
Dt || Mt || this.schedulerConfigChanged.emit({ config:
|
|
234
|
+
}, Dt = this.checkForBookingFormErrors(F), It = ((yt = this.configurations) == null ? void 0 : yt.find((c) => {
|
|
235
|
+
var B;
|
|
236
|
+
return c.id === ((B = this.selectedConfiguration) == null ? void 0 : B.id);
|
|
237
|
+
})) || {}, Mt = this.checkForOrganizerConfirmationError(St(F, It));
|
|
238
|
+
Dt || Mt || this.schedulerConfigChanged.emit({ config: F, resetLoadingState: Ot, action: this.action, host: this.host });
|
|
241
239
|
}, this.isConfigRoundRobin = (a) => {
|
|
242
240
|
var n, i, o, s;
|
|
243
241
|
return ((i = (n = a == null ? void 0 : a.availability) == null ? void 0 : n.availability_rules) == null ? void 0 : i.availability_method) === "max-availability" || ((s = (o = a.availability) == null ? void 0 : o.availability_rules) == null ? void 0 : s.availability_method) === "max-fairness";
|
|
244
242
|
}, this.checkForOrganizerConfirmationError = (a) => {
|
|
245
|
-
var
|
|
243
|
+
var b, l;
|
|
246
244
|
let n = !1, i = "";
|
|
247
|
-
const o = ((
|
|
248
|
-
return o && !s && (i += "Organizer confirmation URL is required when using organizer confirmation booking type.", n = !0), n && (this.isLoading = !1, this.setError(new Error(i))), n;
|
|
245
|
+
const o = ((b = a.event_booking) == null ? void 0 : b.booking_type) === "organizer-confirmation", s = (l = a.scheduler) == null ? void 0 : l.organizer_confirmation_url;
|
|
246
|
+
return o && !s && (i += "Organizer confirmation URL is required when using organizer confirmation booking type.", n = !0), n && (this.isLoading = !1, this.host.setError(new Error(i))), n;
|
|
249
247
|
}, this.checkForBookingFormErrors = (a) => {
|
|
250
248
|
var s;
|
|
251
249
|
let n = !1, i = "";
|
|
252
250
|
const o = (s = a.scheduler) == null ? void 0 : s.additional_fields;
|
|
253
|
-
return o && (i = "Booking form error: ", Object.entries(o).forEach((
|
|
254
|
-
const l =
|
|
251
|
+
return o && (i = "Booking form error: ", Object.entries(o).forEach((b) => {
|
|
252
|
+
const l = b[1];
|
|
255
253
|
if (l.label === "") {
|
|
256
254
|
i += `Label is required for field of type ${l.type}.`, n = !0;
|
|
257
255
|
return;
|
|
258
256
|
}
|
|
259
257
|
if (l.options) {
|
|
260
|
-
for (const
|
|
261
|
-
if (
|
|
258
|
+
for (const h of l.options)
|
|
259
|
+
if (h.trim() === "") {
|
|
262
260
|
i += `Empty option detected inside ${l.label} of type ${l.type}.`, n = !0;
|
|
263
261
|
break;
|
|
264
262
|
}
|
|
265
263
|
}
|
|
266
|
-
})), n && (this.isLoading = !1, this.setError(new Error(i))), n;
|
|
267
|
-
}, 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.action = "create", this.showFeedbackModal = !1, this.activeTab = r.EventInfo, this.isLoading = !1, this.hasUnsavedChanges = !1, this.changesSaved = !1, this.formState = {}, this.error = "";
|
|
264
|
+
})), n && (this.isLoading = !1, this.host.setError(new Error(i))), n;
|
|
265
|
+
}, this.calendars = void 0, this.selectedConfiguration = void 0, this.configurations = void 0, this.currentUser = void 0, this.schedulerPreviewLink = "", this.mode = "app", this.hideEditorTabs = [], this.enableUserFeedback = !0, this.selectedLanguage = void 0, this.action = "create", this.showFeedbackModal = !1, this.activeTab = r.EventInfo, this.isLoading = !1, this.hasUnsavedChanges = !1, this.changesSaved = !1, this.formState = {}, this.error = "";
|
|
268
266
|
}
|
|
269
267
|
configChangedHandler(t) {
|
|
270
268
|
u("[nylas-editor-tabs]", "configChangedHandler", t, this.selectedConfiguration), this.formState = {
|
|
@@ -276,6 +274,15 @@ const Tt = class {
|
|
|
276
274
|
...this.getFormStateFromConfig(this.selectedConfiguration)
|
|
277
275
|
});
|
|
278
276
|
}
|
|
277
|
+
selectedLanguageChangedHandler(t, a) {
|
|
278
|
+
t !== a && d.changeLanguage(t);
|
|
279
|
+
}
|
|
280
|
+
async schedulerConfigCreatedEventHandler(t) {
|
|
281
|
+
return this.schedulerConfigCreated.emit(t);
|
|
282
|
+
}
|
|
283
|
+
async setError(t) {
|
|
284
|
+
this.error = t.message;
|
|
285
|
+
}
|
|
279
286
|
connectedCallback() {
|
|
280
287
|
u("[nylas-editor-tabs]", "connectedCallback");
|
|
281
288
|
}
|
|
@@ -286,7 +293,7 @@ const Tt = class {
|
|
|
286
293
|
var a, n;
|
|
287
294
|
u("[nylas-editor-tabs]", "componentDidLoad"), this.enableUserFeedback && !Rt() && At({
|
|
288
295
|
dsn: "https://9d5731f1c77ca84c9ed3fb9b3ccf7ee1@o74852.ingest.us.sentry.io/4507889638178816",
|
|
289
|
-
release: "1.3.
|
|
296
|
+
release: "1.3.4",
|
|
290
297
|
integrations: (i) => [
|
|
291
298
|
...i.filter((o) => !1),
|
|
292
299
|
Jt({
|
|
@@ -325,7 +332,7 @@ const Tt = class {
|
|
|
325
332
|
captureContext: {
|
|
326
333
|
tags: {
|
|
327
334
|
"nylas-web-element": "nylas-scheduler-editor",
|
|
328
|
-
"nylas-web-element-version": "1.3.
|
|
335
|
+
"nylas-web-element-version": "1.3.4"
|
|
329
336
|
},
|
|
330
337
|
extra: {
|
|
331
338
|
configId: (i = this.selectedConfiguration) == null ? void 0 : i.id,
|
|
@@ -335,49 +342,49 @@ const Tt = class {
|
|
|
335
342
|
}), this.showFeedbackModal = !1;
|
|
336
343
|
}
|
|
337
344
|
getFormStateFromConfig(t) {
|
|
338
|
-
var n, i, o, s,
|
|
345
|
+
var n, i, o, s, b, l, h, y, L, T, O, D, I, M, N, C, z, U, R, w, m, A, g, j, f, $, J, V, P, Z, G, W, p, S;
|
|
339
346
|
let a = (n = t == null ? void 0 : t.participants) == null ? void 0 : n.find((_) => _.is_organizer);
|
|
340
347
|
return !a && ((o = (i = t == null ? void 0 : t.availability) == null ? void 0 : i.availability_rules) == null ? void 0 : o.availability_method) !== "collective" && (a = (s = t == null ? void 0 : t.participants) == null ? void 0 : s.find((_) => {
|
|
341
|
-
var
|
|
342
|
-
return _.email === ((
|
|
348
|
+
var v;
|
|
349
|
+
return _.email === ((v = this.currentUser) == null ? void 0 : v.email);
|
|
343
350
|
}), a && (a.is_organizer = !0)), t != null && t.appearance && console.info("Appearance settings have been returned from the given configuration; please remember to grab them from the configSettingsLoaded event and apply them as desired."), {
|
|
344
|
-
title: ((
|
|
351
|
+
title: ((b = t == null ? void 0 : t.event_booking) == null ? void 0 : b.title) ?? "",
|
|
345
352
|
description: ((l = t == null ? void 0 : t.event_booking) == null ? void 0 : l.description) ?? "",
|
|
346
|
-
duration: ((y = (
|
|
353
|
+
duration: ((y = (h = t == null ? void 0 : t.availability) == null ? void 0 : h.duration_minutes) == null ? void 0 : y.toString()) ?? "30",
|
|
347
354
|
availability: {
|
|
348
|
-
timezone: ((
|
|
349
|
-
openHours: ((O = (
|
|
355
|
+
timezone: ((L = t == null ? void 0 : t.event_booking) == null ? void 0 : L.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
356
|
+
openHours: ((O = (T = t == null ? void 0 : t.availability) == null ? void 0 : T.availability_rules) == null ? void 0 : O.default_open_hours) ?? Lt
|
|
350
357
|
},
|
|
351
|
-
additionalFields: ((
|
|
352
|
-
conferencing: ((
|
|
353
|
-
calendarIds: ((
|
|
358
|
+
additionalFields: ((D = t == null ? void 0 : t.scheduler) == null ? void 0 : D.additional_fields) ?? {},
|
|
359
|
+
conferencing: ((I = t == null ? void 0 : t.event_booking) == null ? void 0 : I.conferencing) ?? {},
|
|
360
|
+
calendarIds: ((M = a == null ? void 0 : a.availability) == null ? void 0 : M.calendar_ids) ?? [],
|
|
354
361
|
participants: (t == null ? void 0 : t.participants) ?? [],
|
|
355
|
-
bookingCalendar: ((
|
|
356
|
-
location: ((
|
|
357
|
-
bookingType: ((
|
|
358
|
-
buffer: ((
|
|
359
|
-
cancellationPolicy: ((
|
|
360
|
-
availableDaysInFuture: ((
|
|
361
|
-
minCancellationNotice: ((
|
|
362
|
-
minBookingNotice: ((
|
|
362
|
+
bookingCalendar: ((N = a == null ? void 0 : a.booking) == null ? void 0 : N.calendar_id) ?? (a == null ? void 0 : a.email) ?? "",
|
|
363
|
+
location: ((C = t == null ? void 0 : t.event_booking) == null ? void 0 : C.location) ?? "",
|
|
364
|
+
bookingType: ((z = t == null ? void 0 : t.event_booking) == null ? void 0 : z.booking_type) ?? "booking",
|
|
365
|
+
buffer: ((R = (U = t == null ? void 0 : t.availability) == null ? void 0 : U.availability_rules) == null ? void 0 : R.buffer) ?? { before: 0, after: 0 },
|
|
366
|
+
cancellationPolicy: ((w = t == null ? void 0 : t.scheduler) == null ? void 0 : w.cancellation_policy) ?? "",
|
|
367
|
+
availableDaysInFuture: ((m = t == null ? void 0 : t.scheduler) == null ? void 0 : m.available_days_in_future) ?? 30,
|
|
368
|
+
minCancellationNotice: ((A = t == null ? void 0 : t.scheduler) == null ? void 0 : A.min_cancellation_notice) ?? 0,
|
|
369
|
+
minBookingNotice: ((g = t == null ? void 0 : t.scheduler) == null ? void 0 : g.min_booking_notice) ?? 60,
|
|
363
370
|
timeslotInterval: {
|
|
364
|
-
interval: ((
|
|
365
|
-
roundTo: (
|
|
371
|
+
interval: ((j = t == null ? void 0 : t.availability) == null ? void 0 : j.interval_minutes) ?? ((f = t == null ? void 0 : t.availability) == null ? void 0 : f.duration_minutes),
|
|
372
|
+
roundTo: ($ = t == null ? void 0 : t.availability) == null ? void 0 : $.round_to
|
|
366
373
|
},
|
|
367
|
-
additionalGuestsHidden: ((
|
|
368
|
-
hideCancellationOptions: ((
|
|
369
|
-
hideReschedulingOptions: ((
|
|
370
|
-
participantBookingCalendars: ((
|
|
371
|
-
var
|
|
372
|
-
return (
|
|
374
|
+
additionalGuestsHidden: ((J = t == null ? void 0 : t.scheduler) == null ? void 0 : J.hide_additional_guests) ?? !1,
|
|
375
|
+
hideCancellationOptions: ((V = t == null ? void 0 : t.scheduler) == null ? void 0 : V.hide_cancellation_options) ?? !1,
|
|
376
|
+
hideReschedulingOptions: ((P = t == null ? void 0 : t.scheduler) == null ? void 0 : P.hide_rescheduling_options) ?? !1,
|
|
377
|
+
participantBookingCalendars: ((Z = t == null ? void 0 : t.participants) == null ? void 0 : Z.reduce((_, v) => {
|
|
378
|
+
var x, E;
|
|
379
|
+
return (x = v.booking) != null && x.calendar_id && (_[v.email] = (E = v.booking) == null ? void 0 : E.calendar_id), _;
|
|
373
380
|
})) ?? {},
|
|
374
|
-
participantCalendars: ((
|
|
375
|
-
var
|
|
376
|
-
return _[
|
|
381
|
+
participantCalendars: ((G = t == null ? void 0 : t.participants) == null ? void 0 : G.reduce((_, v) => {
|
|
382
|
+
var x;
|
|
383
|
+
return _[v.email] = (x = v.availability) == null ? void 0 : x.calendar_ids, _;
|
|
377
384
|
}, {})) ?? {},
|
|
378
|
-
reminders: (
|
|
379
|
-
emailTemplate: (
|
|
380
|
-
redirectUrl: (
|
|
385
|
+
reminders: (W = t == null ? void 0 : t.event_booking) == null ? void 0 : W.reminders,
|
|
386
|
+
emailTemplate: (p = t == null ? void 0 : t.scheduler) == null ? void 0 : p.email_template,
|
|
387
|
+
redirectUrl: (S = t == null ? void 0 : t.scheduler) == null ? void 0 : S.confirmation_redirect_url,
|
|
381
388
|
slug: t == null ? void 0 : t.slug,
|
|
382
389
|
appearance: t == null ? void 0 : t.appearance,
|
|
383
390
|
name: t == null ? void 0 : t.name
|
|
@@ -493,24 +500,25 @@ const Tt = class {
|
|
|
493
500
|
}
|
|
494
501
|
render() {
|
|
495
502
|
var t, a;
|
|
496
|
-
return u("[nylas-editor-tabs]", "render", this.formState), e(
|
|
503
|
+
return u("[nylas-editor-tabs]", "render", this.formState), e(Tt, { key: "afd735b73e35d8abfa9c83d21ab8307b07df48e6" }, e("form", { key: "7d7093deb88e6ec8e636092e4bcbadf03916a994", onSubmit: this.formSubmissionHandler, class: "scheduler-editor", ref: (n) => this.formRef = n, noValidate: !0 }, this.mode === "app" ? e("div", { class: "form-contents", part: "editor__form-contents net__form-contents" }, e("div", { class: "tabs", part: "editor__tabs net__tabs" }, e("button", { name: r.EventInfo, class: { tab: !0, active: this.activeTab == r.EventInfo, hide: this.hideTab(r.EventInfo) }, part: "editortab__event-info net__tab-event-info", onClick: (n) => this.setActiveTab(n, r.EventInfo) }, e("calendar-info-icon", { width: "16", height: "16" }), d.t("eventInfoTab")), e("button", { name: r.Availability, class: { tab: !0, active: this.activeTab == r.Availability, hide: this.hideTab(r.Availability) }, part: "editortab__availability net__tab-availability", onClick: (n) => this.setActiveTab(n, r.Availability) }, e("calendar-patterns-icon", { width: "16", height: "16" }), d.t("availabilityTab")), e("button", { name: r.Participants, class: { tab: !0, active: this.activeTab == r.Participants, hide: this.hideTab(r.Participants) }, part: "editortab__participants net__tab-participants", onClick: (n) => this.setActiveTab(n, r.Participants) }, e("people-icon", { width: "16", height: "16" }), d.t("participantsTab")), e("button", { name: r.BookingOptions, class: { tab: !0, active: this.activeTab == r.BookingOptions, hide: this.hideTab(r.BookingOptions) }, part: "editortab__booking-options net__tab-booking-options", onClick: (n) => this.setActiveTab(n, r.BookingOptions) }, e("flow-icon", { width: "16", height: "16" }), d.t("bookingOptionsTab")), e("button", { name: r.BookingForm, class: { tab: !0, active: this.activeTab == "bookingForm", hide: this.hideTab(r.BookingForm) }, part: "editortab__booking-form net__tab-booking-form", onClick: (n) => this.setActiveTab(n, r.BookingForm) }, this.activeTab == r.BookingForm ? e("calendar-agenda-fill-icon", { width: "16", height: "16" }) : e("calendar-agenda-icon", { width: "16", height: "16" }), d.t("bookingFormTab")), e("button", { name: r.Communications, class: { tab: !0, active: this.activeTab == "communications", hide: this.hideTab(r.Communications) }, onClick: (n) => this.setActiveTab(n, r.Communications), part: "editortab__communications net__tab-communications" }, this.activeTab == r.Communications ? e("envelope-fill-icon", { width: "16", height: "16" }) : e("envelope-icon", { width: "16", height: "16" }), d.t("communicationsTab")), e("button", { name: r.PageStyles, class: { tab: !0, active: this.activeTab == "pageStyles", hide: this.hideTab(r.PageStyles) }, onClick: (n) => this.setActiveTab(n, r.PageStyles), part: "editortab__page-styles net__tab-page-styles" }, this.activeTab == r.PageStyles ? e("paintbrush-fill-icon", { width: "16", height: "16" }) : e("paintbrush-icon", { width: "16", height: "16" }), d.t("pageStylesTab"))), e("div", { class: "tab-content", part: "editor__tab-content net__tab-content" }, e(Qt, { formState: this.formState, activeTab: this.activeTab, currentUser: this.currentUser, calendars: this.calendars, id: ((t = this.selectedConfiguration) == null ? void 0 : t.id) ?? "new", i18next: d }))) : e("div", { class: "composable", key: (a = this.selectedConfiguration) == null ? void 0 : a.id }, e("slot", null)), e("div", { key: "d2d76b6b587c13a32dfc749f4fea4b47102923f0", class: "footer", part: "editor__footer net__footer" }, e("div", { key: "7714cacce55f8b8e06e60f289ef02fe8e336419c", class: "preview", part: "editor__footer-preview net__footer-preview" }, this.enableUserFeedback && e("button-component", { title: "Share your feedback", id: "report-issue", variant: "basic", onClick: (n) => this.onFeedbackClick(n) }, e("feedback-icon", null))), e("div", { key: "54d1b26ae9e1ffc22fbe679e40ad0ec40f4df3fb", class: "buttons", part: "editor__footer-buttons net__footer-buttons" }, e("p", { key: "e443a0cc63281f971bbdf7349e1adbb88abb42a9", class: {
|
|
497
504
|
"unsaved-changes": this.hasUnsavedChanges && !this.changesSaved,
|
|
498
505
|
"saved-changes": this.changesSaved,
|
|
499
506
|
error: this.error !== "",
|
|
500
507
|
"error-full-width": this.error !== "" && this.action === "create"
|
|
501
508
|
} }, this.error !== "" ? this.error : "", this.error == "" && this.hasUnsavedChanges && !this.changesSaved ? "Unsaved changes" : this.error == "" && this.changesSaved ? "Changes saved!" : ""), this.schedulerPreviewLink !== "" && this.action === "edit" && e("button-component", { title: "Preview", type: "button", disabled: this.isLoading, clickHandler: (n) => {
|
|
502
509
|
n.preventDefault(), this.previewButtonClicked.emit(this.host).defaultPrevented || window.open(tt(this.schedulerPreviewLink, this.selectedConfiguration), "_blank");
|
|
503
|
-
}, variant: "basic" }, e("eye-icon", null)), e("button-component", { key: "
|
|
510
|
+
}, variant: "basic" }, e("eye-icon", null)), e("button-component", { key: "057295595f302e2090a0136981a09546f6994c1c", type: "button", disabled: this.isLoading, clickHandler: (n) => {
|
|
504
511
|
n.preventDefault(), this.cancelButtonClick.emit(), this.error = "";
|
|
505
|
-
}, variant: "basic", part: "editor__footer-cancel net__footer-cancel" }, "
|
|
512
|
+
}, variant: "basic", part: "editor__footer-cancel net__footer-cancel" }, d.t("backButton")), e("button-component", { key: "18ba294735d5754526a3634f5c7dc7dfd87d1679", type: "submit", disabled: this.isLoading, part: "editor__footer-cta, net__footer-cta" }, this.isLoading ? e("span", null, d.t("savingButtonText"), e("loading-icon", null), " ") : this.action === "create" ? `${d.t("createButtonText")}` : `${d.t("saveChangesButtonText")}`)))), this.showFeedbackModal && e("nylas-feedback-form", null));
|
|
506
513
|
}
|
|
507
514
|
get host() {
|
|
508
|
-
return
|
|
515
|
+
return Ft(this);
|
|
509
516
|
}
|
|
510
517
|
static get watchers() {
|
|
511
518
|
return {
|
|
512
519
|
selectedConfiguration: ["configChangedHandler"],
|
|
513
|
-
currentUser: ["userChangedHandler"]
|
|
520
|
+
currentUser: ["userChangedHandler"],
|
|
521
|
+
selectedLanguage: ["selectedLanguageChangedHandler"]
|
|
514
522
|
};
|
|
515
523
|
}
|
|
516
524
|
};
|
|
@@ -521,20 +529,21 @@ te([
|
|
|
521
529
|
["schedulerConfig.calendars", "calendars"],
|
|
522
530
|
["schedulerConfig.selectedConfiguration", "selectedConfiguration"],
|
|
523
531
|
["schedulerConfig.currentUser", "currentUser"],
|
|
524
|
-
["schedulerConfig.configurations", "configurations"]
|
|
532
|
+
["schedulerConfig.configurations", "configurations"],
|
|
533
|
+
["schedulerConfig.selectedLanguage", "selectedLanguage"]
|
|
525
534
|
]),
|
|
526
535
|
eventToProps: {
|
|
527
536
|
schedulerConfigChanged: async (t, a) => {
|
|
528
|
-
const { resetLoadingState: n,
|
|
529
|
-
const [
|
|
530
|
-
!
|
|
537
|
+
const { resetLoadingState: n, host: i, action: o, config: s } = t.detail, b = (l) => {
|
|
538
|
+
const [h, y] = l;
|
|
539
|
+
!h && y ? i.setError(y) : h && !y && o === "create" && i.schedulerConfigCreatedEventHandler({ config: h }), n && n(t);
|
|
531
540
|
};
|
|
532
541
|
if (o === "edit") {
|
|
533
542
|
const l = await a.schedulerConfig.updateConfiguration(s);
|
|
534
|
-
|
|
543
|
+
b(l);
|
|
535
544
|
} else {
|
|
536
545
|
const l = await a.schedulerConfig.createConfiguration(s);
|
|
537
|
-
|
|
546
|
+
b(l);
|
|
538
547
|
}
|
|
539
548
|
},
|
|
540
549
|
cancelButtonClick: async (t, a) => {
|
|
@@ -548,6 +557,9 @@ te([
|
|
|
548
557
|
},
|
|
549
558
|
schedulerEditorFormUpdated: async (t, a) => {
|
|
550
559
|
u("[nylas-editor-tabs]", "schedulerEditorFormUpdated", t);
|
|
560
|
+
},
|
|
561
|
+
schedulerConfigCreated: async (t, a) => {
|
|
562
|
+
u("[nylas-editor-tabs]", "schedulerConfigCreated", t);
|
|
551
563
|
}
|
|
552
564
|
},
|
|
553
565
|
localPropsToProp: /* @__PURE__ */ new Map([
|
|
@@ -560,16 +572,16 @@ te([
|
|
|
560
572
|
X("design:type", Function),
|
|
561
573
|
X("design:paramtypes", []),
|
|
562
574
|
X("design:returntype", void 0)
|
|
563
|
-
],
|
|
564
|
-
|
|
565
|
-
const ee = ':host{display:grid;grid-auto-flow:row;width:100%;font-family:inherit;font-optical-sizing:auto;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.header{display:flex;align-items:center;justify-content:space-between;margin-bottom:1rem;gap:1rem}@media screen and (max-width: 768px){.header{flex-direction:column;gap:0.5rem;align-items:unset}}.header h2{margin:0;font-size:1.25rem;color:var(--nylas-base-900);font-weight:600}.header p{margin:0;font-size:
|
|
575
|
+
], Pt.prototype, "render", null);
|
|
576
|
+
Pt.style = Yt;
|
|
577
|
+
const ee = ':host{display:grid;grid-auto-flow:row;width:100%;font-family:inherit;font-optical-sizing:auto;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.header{display:flex;align-items:center;justify-content:space-between;margin-bottom:1rem;gap:1rem}@media screen and (max-width: 768px){.header{flex-direction:column;gap:0.5rem;align-items:unset}}.header h2{margin:0;font-size:1.25rem;color:var(--nylas-base-900);font-weight:600}.header p{margin:0;font-size:16px;color:var(--nylas-base-700)}.header .actions{justify-self:end}@media screen and (max-width: 768px){.header .actions{width:100%}}.configurations{border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);background:var(--nylas-base-0);height:100%;display:flex;flex-direction:column;position:relative;overflow-y:hidden}.configurations .table-container{overflow-y:auto;flex:1}.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)}', ae = ee;
|
|
566
578
|
var ne = function(t, a, n, i) {
|
|
567
|
-
var o = arguments.length, s = o < 3 ? a : i === null ? i = Object.getOwnPropertyDescriptor(a, n) : i,
|
|
579
|
+
var o = arguments.length, s = o < 3 ? a : i === null ? i = Object.getOwnPropertyDescriptor(a, n) : i, b;
|
|
568
580
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
569
581
|
s = Reflect.decorate(t, a, n, i);
|
|
570
582
|
else
|
|
571
583
|
for (var l = t.length - 1; l >= 0; l--)
|
|
572
|
-
(
|
|
584
|
+
(b = t[l]) && (s = (o < 3 ? b(s) : o > 3 ? b(a, n, s) : b(a, n)) || s);
|
|
573
585
|
return o > 3 && s && Object.defineProperty(a, n, s), s;
|
|
574
586
|
}, Y = function(t, a) {
|
|
575
587
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
@@ -577,7 +589,7 @@ var ne = function(t, a, n, i) {
|
|
|
577
589
|
};
|
|
578
590
|
const Et = class {
|
|
579
591
|
constructor(t) {
|
|
580
|
-
q(this, t), this.initListConfigurations = k(this, "initListConfigurations", 7), this.createButtonClick = k(this, "createButtonClick", 7), this.editButtonClick = k(this, "editButtonClick", 7), this.deleteButtonClick = k(this, "deleteButtonClick", 7), this.configurations = [], this.schedulerPreviewLink = "", this.listConfigurationsNextCursor = void 0, this.state = "loading", this.error = "", this.currentCursor = null, this.previousCursors = [], this.disableNextPageButton = !1, this.deleteConfigurationId = "", this.showDeleteButtonLoading = !1;
|
|
592
|
+
q(this, t), this.initListConfigurations = k(this, "initListConfigurations", 7), this.createButtonClick = k(this, "createButtonClick", 7), this.editButtonClick = k(this, "editButtonClick", 7), this.deleteButtonClick = k(this, "deleteButtonClick", 7), this.configurations = [], this.selectedLanguage = void 0, this.schedulerPreviewLink = "", this.listConfigurationsNextCursor = void 0, this.state = "loading", this.error = "", this.currentCursor = null, this.previousCursors = [], this.disableNextPageButton = !1, this.deleteConfigurationId = "", this.showDeleteButtonLoading = !1;
|
|
581
593
|
}
|
|
582
594
|
listConfigurationsNextCursorChangedHandler(t, a) {
|
|
583
595
|
if (!t || t === a) {
|
|
@@ -586,6 +598,9 @@ const Et = class {
|
|
|
586
598
|
}
|
|
587
599
|
this.disableNextPageButton = !1, this.currentCursor = t;
|
|
588
600
|
}
|
|
601
|
+
selectedLanguageChangedHandler(t, a) {
|
|
602
|
+
t !== a && d.changeLanguage(t);
|
|
603
|
+
}
|
|
589
604
|
connectedCallback() {
|
|
590
605
|
u("[nylas-list-configurations]", "connectedCallback");
|
|
591
606
|
}
|
|
@@ -655,11 +670,11 @@ const Et = class {
|
|
|
655
670
|
};
|
|
656
671
|
switch (t) {
|
|
657
672
|
case "preview":
|
|
658
|
-
return e("span", { style: a }, e("eye-icon", { width: "16", height: "16" }), "
|
|
673
|
+
return e("span", { style: a }, e("eye-icon", { width: "16", height: "16" }), d.t("nylasListConfigurations.previewButtonText"));
|
|
659
674
|
case "copy":
|
|
660
|
-
return e("span", { style: a }, e("copy-icon", { width: "16", height: "16" }), "
|
|
675
|
+
return e("span", { style: a }, e("copy-icon", { width: "16", height: "16" }), d.t("nylasListConfigurations.copyLinkButtonText"));
|
|
661
676
|
case "delete":
|
|
662
|
-
return e("span", { style: { ...a, ...n } }, e("delete-icon", { width: "15", height: "17" }), "
|
|
677
|
+
return e("span", { style: { ...a, ...n } }, e("delete-icon", { width: "15", height: "17" }), d.t("nylasListConfigurations.deleteButtonText"));
|
|
663
678
|
default:
|
|
664
679
|
return "";
|
|
665
680
|
}
|
|
@@ -682,33 +697,37 @@ const Et = class {
|
|
|
682
697
|
}
|
|
683
698
|
render() {
|
|
684
699
|
var t;
|
|
685
|
-
return e(
|
|
700
|
+
return e(Tt, null, e("div", { class: "header" }, e("div", { class: "description" }, e("h2", null, d.t("allSchedulingPages")), e("p", null, d.t("createAndManageSchedulingPages"))), this.configurations && this.configurations.length > 0 && e("div", { class: "actions" }, e("button-component", { part: "nlc__create-new-cta", clickHandler: () => {
|
|
686
701
|
this.createButtonClick.emit(this.host);
|
|
687
|
-
} }, "
|
|
702
|
+
} }, d.t("createNewSchedulingPageButtonText")))), e("div", { class: "configurations" }, e("div", { class: "table-container" }, e("table", { class: {
|
|
688
703
|
"no-configurations": this.state !== "loading" && (!this.configurations || this.configurations.length === 0)
|
|
689
704
|
} }, e("tr", { class: {
|
|
690
705
|
hide: this.state === "loading" || this.configurations && this.configurations.length === 0
|
|
691
|
-
} }, e("th", null, "
|
|
706
|
+
} }, e("th", null, d.t("pageTitle")), e("th", null, d.t("durationTitle")), e("th", null)), this.state === "loading" && e("tr", { class: "no-configurations" }, e("td", { colSpan: 3 }, e("div", null, e("h3", null, d.t("loading"), "..."), e("p", null, d.t("loadingPagesDescription"))))), this.state !== "loading" && (!this.configurations || this.configurations.length === 0) && e("tr", { class: "no-configurations" }, e("td", { colSpan: 3 }, e("div", null, e("calendar-icon", { width: "48", height: "48" }), e("h3", null, d.t("noSchedulingPages")), e("p", null, d.t("createFirstSchedulingPage")), e("button-component", { part: "nlc__create-new-cta", clickHandler: () => {
|
|
692
707
|
this.createButtonClick.emit(this.host);
|
|
693
|
-
} }, "
|
|
694
|
-
var
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
708
|
+
} }, d.t("createNewSchedulingPageButtonText"))))), this.state !== "loading" && ((t = this.configurations) == null ? void 0 : t.map((a, n) => {
|
|
709
|
+
var o, s, b, l;
|
|
710
|
+
const i = n === this.configurations.length - 1 || n === this.configurations.length - 2;
|
|
711
|
+
return e("tr", { key: a == null ? void 0 : a.id }, e("td", null, e("div", { class: "title" }, e("div", { class: "config-event-title", title: (o = a == null ? void 0 : a.event_booking) == null ? void 0 : o.title }, (s = a == null ? void 0 : a.event_booking) == null ? void 0 : s.title), e("div", { class: "config-event-description" }, (b = a == null ? void 0 : a.event_booking) == null ? void 0 : b.description))), e("td", null, e("div", { class: "duration" }, this.getDurationString((l = a == null ? void 0 : a.availability) == null ? void 0 : l.duration_minutes))), e("td", null, e("div", { class: "actions" }, e("button-component", { variant: "basic", key: `edit-${n}`, clickHandler: (h) => {
|
|
712
|
+
h.preventDefault(), this.editButtonClick.emit({ host: this.host, configuration: a });
|
|
713
|
+
} }, e("edit-icon", { width: "16", height: "16" }), d.t("editSchedulingPageButtonText")), e("select-dropdown", { class: {
|
|
714
|
+
last: i
|
|
715
|
+
}, name: "actions", options: [
|
|
698
716
|
{ value: `preview-${n}`, label: "Preview", labelHTML: this.getActionLabelHTML("preview") },
|
|
699
717
|
{ value: `copy-${n}`, label: "Copy link", labelHTML: this.getActionLabelHTML("copy") },
|
|
700
718
|
{ value: `delete-${n}`, label: "Delete", labelHTML: this.getActionLabelHTML("delete") }
|
|
701
719
|
], 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" }))));
|
|
702
|
-
})))), e("div", { class: "pagination" }, e("button", { class: "arrow left", onClick: () => this.previousPageClickedHandler(), disabled: this.previousCursors.length <= 0 }, e("chevron-icon", null)), e("button", { class: "arrow right", onClick: () => this.nextPageClickedHandler(), disabled: this.disableNextPageButton }, e("chevron-icon", null)))), this.state === "error" && e("div", { class: "error-container" }, e("p", { class: "error" }, this.error)), !!this.deleteConfigurationId && e("div", { class: "card-wrapper" }, e("div", { class: "card-modal" }, e("div", { class: "close-button" }, e("button-component", { tooltip: "Close", id: "close", variant: "invisible", onClick: (a) => this.closeModal(a), part: "nfbf__close-button" }, e("close-icon", null))), e("div", { class: "header" }, e("h2", { slot: "card-title", part: "nfbf__title" },
|
|
720
|
+
})))), e("div", { class: "pagination" }, e("button", { class: "arrow left", onClick: () => this.previousPageClickedHandler(), disabled: this.previousCursors.length <= 0 }, e("chevron-icon", null)), e("button", { class: "arrow right", onClick: () => this.nextPageClickedHandler(), disabled: this.disableNextPageButton }, e("chevron-icon", null)))), this.state === "error" && e("div", { class: "error-container" }, e("p", { class: "error" }, this.error)), !!this.deleteConfigurationId && e("div", { class: "card-wrapper" }, e("div", { class: "card-modal" }, e("div", { class: "close-button" }, e("button-component", { tooltip: "Close", id: "close", variant: "invisible", onClick: (a) => this.closeModal(a), part: "nfbf__close-button" }, e("close-icon", null))), e("div", { class: "header" }, e("h2", { slot: "card-title", part: "nfbf__title" }, d.t("deleteSchedulingPageTitle"))), e("div", { class: "description title-desc" }, e("p", null, d.t("deleteSchedulingPageDescription"))), e("div", { class: {
|
|
703
721
|
footer: !0
|
|
704
|
-
} }, e("button-component", { variant: "basic", onClick: (a) => this.closeModal(a), part: "nfbf__button-outline nfbf__cancel-cta" }, `${
|
|
722
|
+
} }, e("button-component", { variant: "basic", onClick: (a) => this.closeModal(a), part: "nfbf__button-outline nfbf__cancel-cta" }, `${d.t("deleteSchedulingPageCancelButton")}`), e("button-component", { variant: "destructive", onClick: (a) => this.handleConfirmDeleteButtonClicked(a), disabled: this.showDeleteButtonLoading, isLoading: this.showDeleteButtonLoading, part: "nfbf__button-outline nfbf__reschedule-cta" }, `${d.t("deleteSchedulingPageConfirmButton")}`)))));
|
|
705
723
|
}
|
|
706
724
|
get host() {
|
|
707
|
-
return
|
|
725
|
+
return Ft(this);
|
|
708
726
|
}
|
|
709
727
|
static get watchers() {
|
|
710
728
|
return {
|
|
711
|
-
listConfigurationsNextCursor: ["listConfigurationsNextCursorChangedHandler"]
|
|
729
|
+
listConfigurationsNextCursor: ["listConfigurationsNextCursorChangedHandler"],
|
|
730
|
+
selectedLanguage: ["selectedLanguageChangedHandler"]
|
|
712
731
|
};
|
|
713
732
|
}
|
|
714
733
|
};
|
|
@@ -717,7 +736,8 @@ ne([
|
|
|
717
736
|
name: "nylas-list-configurations",
|
|
718
737
|
stateToProps: /* @__PURE__ */ new Map([
|
|
719
738
|
["schedulerConfig.configurations", "configurations"],
|
|
720
|
-
["schedulerConfig.listConfigurationsNextCursor", "listConfigurationsNextCursor"]
|
|
739
|
+
["schedulerConfig.listConfigurationsNextCursor", "listConfigurationsNextCursor"],
|
|
740
|
+
["schedulerConfig.selectedLanguage", "selectedLanguage"]
|
|
721
741
|
]),
|
|
722
742
|
localPropsToProp: /* @__PURE__ */ new Map([["schedulerPreviewLink", "schedulerPreviewLink"]]),
|
|
723
743
|
eventToProps: {
|
|
@@ -753,6 +773,6 @@ Et.style = ae;
|
|
|
753
773
|
export {
|
|
754
774
|
Gt as google_logo_icon,
|
|
755
775
|
Kt as microsoft_logo_icon,
|
|
756
|
-
|
|
776
|
+
Pt as nylas_editor_tabs,
|
|
757
777
|
Et as nylas_list_configurations
|
|
758
778
|
};
|