@nylas/react 2.0.3 → 2.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{abstract-provider-bdb7d9b4-12a95387.cjs → abstract-provider-45ada3b4-31e3ed72.cjs} +1 -1
- package/dist/{abstract-provider-bdb7d9b4-22cf4a74.js → abstract-provider-45ada3b4-abd3105d.js} +1 -1
- package/dist/{add-circle-icon_2.entry-d56f519c.cjs → add-circle-icon_2.entry-48953f9c.cjs} +1 -1
- package/dist/{add-circle-icon_2.entry-0ff79148.js → add-circle-icon_2.entry-f6f8b5e5.js} +1 -1
- package/dist/{archive-icon.entry-aaff46ec.js → archive-icon.entry-b3a76711.js} +1 -1
- package/dist/{archive-icon.entry-6ab120ff.cjs → archive-icon.entry-e2880dc7.cjs} +1 -1
- package/dist/{arrow-icon.entry-d57cf44f.cjs → arrow-icon.entry-84d1e26c.cjs} +1 -1
- package/dist/{arrow-icon.entry-d8fcbc1f.js → arrow-icon.entry-9b3441aa.js} +1 -1
- package/dist/{bold-icon.entry-e48075a4.js → bold-icon.entry-0749a116.js} +1 -1
- package/dist/{bold-icon.entry-0f23543d.cjs → bold-icon.entry-e1d8ab5e.cjs} +1 -1
- package/dist/{button-component_2.entry-3d622397.cjs → button-component_2.entry-1a817230.cjs} +1 -1
- package/dist/{button-component_2.entry-5db80bec.js → button-component_2.entry-6eb55e97.js} +1 -1
- package/dist/calendar-agenda-fill-icon_37.entry-0ca8b9f4.cjs +6 -0
- package/dist/calendar-agenda-fill-icon_37.entry-4adf73a2.js +5231 -0
- package/dist/{calendar-cancel-icon.entry-8b43441c.js → calendar-cancel-icon.entry-2a29cb3f.js} +1 -1
- package/dist/{calendar-cancel-icon.entry-9546c7c3.cjs → calendar-cancel-icon.entry-e0dee585.cjs} +1 -1
- package/dist/{calendar-check-icon.entry-a03b249a.cjs → calendar-check-icon.entry-7f96d456.cjs} +1 -1
- package/dist/{calendar-check-icon.entry-4e6abda7.js → calendar-check-icon.entry-c12b63ea.js} +1 -1
- package/dist/{calendar-icon.entry-cd4b0ec4.cjs → calendar-icon.entry-a2d19ff2.cjs} +1 -1
- package/dist/{calendar-icon.entry-5b622c12.js → calendar-icon.entry-e82a5169.js} +1 -1
- package/dist/checkbox-component.entry-59612a67.js +52 -0
- package/dist/checkbox-component.entry-ddce70bc.cjs +1 -0
- package/dist/checkbox-group_4.entry-3311da64.cjs +28 -0
- package/dist/{checkbox-group_4.entry-b2a5b2b2.js → checkbox-group_4.entry-7df47ad4.js} +287 -246
- package/dist/{checkmark-circle-icon.entry-30582af4.js → checkmark-circle-icon.entry-677b0def.js} +1 -1
- package/dist/{checkmark-circle-icon.entry-9617301c.cjs → checkmark-circle-icon.entry-67df713b.cjs} +1 -1
- package/dist/checkmark-icon_15.entry-2121e1b7.cjs +5 -0
- package/dist/checkmark-icon_15.entry-9fd0ec58.js +1412 -0
- package/dist/chevron-icon_3.entry-1a42235c.cjs +1 -0
- package/dist/{chevron-icon_3.entry-517447a6.js → chevron-icon_3.entry-f0ad71d9.js} +19 -10
- package/dist/{clock-icon_4.entry-5351318c.cjs → clock-icon_4.entry-88822a84.cjs} +1 -1
- package/dist/{clock-icon_4.entry-7ea1274d.js → clock-icon_4.entry-e7472d5f.js} +1 -1
- package/dist/{customParseFormat-f0d21eb3-904f1e57.js → customParseFormat-eeec04f5-3ad26beb.js} +1 -1
- package/dist/{customParseFormat-f0d21eb3-769d6bf2.cjs → customParseFormat-eeec04f5-d5957784.cjs} +1 -1
- package/dist/{delete-icon.entry-64b61f5c.cjs → delete-icon.entry-3cb58910.cjs} +1 -1
- package/dist/{delete-icon.entry-02e44ba1.js → delete-icon.entry-813429d7.js} +1 -1
- package/dist/{document-refresh-icon.entry-2f599a22.cjs → document-refresh-icon.entry-ae361b0b.cjs} +1 -1
- package/dist/{document-refresh-icon.entry-fcaa84ad.js → document-refresh-icon.entry-c224c778.js} +1 -1
- package/dist/{feedbackSync-b9c9e719-b54b3268.js → feedbackSync-0ebd0eda-803c3ebe.js} +1 -1
- package/dist/{feedbackSync-b9c9e719-bee3fea1.cjs → feedbackSync-0ebd0eda-e12b00d5.cjs} +1 -1
- package/dist/{folder-icon.entry-55c123dc.cjs → folder-icon.entry-107841af.cjs} +1 -1
- package/dist/{folder-icon.entry-f4862c1b.js → folder-icon.entry-9c1f7c41.js} +1 -1
- package/dist/{forward-icon.entry-4a41e94f.js → forward-icon.entry-4ac22c16.js} +1 -1
- package/dist/{forward-icon.entry-82719382.cjs → forward-icon.entry-6cec1f94.cjs} +1 -1
- package/dist/globe-icon.entry-7798c93b.js +16 -0
- package/dist/globe-icon.entry-909c1382.cjs +1 -0
- package/dist/google-logo-icon_6.entry-1f4ad364.cjs +2 -0
- package/dist/{google-logo-icon_6.entry-b331ab60.js → google-logo-icon_6.entry-b198c90a.js} +332 -282
- package/dist/{google-meet-icon_5.entry-e3d44d56.cjs → google-meet-icon_5.entry-82d87e77.cjs} +1 -1
- package/dist/{google-meet-icon_5.entry-eb9f7d93.js → google-meet-icon_5.entry-fa6dc1dc.js} +1 -1
- package/dist/{inbox-icon.entry-a385095d.js → inbox-icon.entry-1b123e64.js} +1 -1
- package/dist/{inbox-icon.entry-fa9085cd.cjs → inbox-icon.entry-84f96d31.cjs} +1 -1
- package/dist/{index-ad781fbc.js → index-140eb219.js} +6753 -6439
- package/dist/index-d8a42c15.cjs +118 -0
- package/dist/{index.es-ccb2a286-dfa2bfbe.js → index.es-57d4a08f-184cbc01.js} +1 -1
- package/dist/{index.es-ccb2a286-9a2c0934.cjs → index.es-57d4a08f-b0a2ca19.cjs} +1 -1
- package/dist/info-icon_2.entry-f09e7dae.cjs +1 -0
- package/dist/info-icon_2.entry-f8b72d08.js +35 -0
- package/dist/input-component.entry-44607977.js +93 -0
- package/dist/input-component.entry-fd38953d.cjs +1 -0
- package/dist/input-dropdown_2.entry-4c2e5e1a.cjs +1 -0
- package/dist/{input-dropdown_2.entry-1b55ef0c.js → input-dropdown_2.entry-6898b420.js} +30 -9
- package/dist/{italic-icon.entry-4266a817.js → italic-icon.entry-16aa1ada.js} +1 -1
- package/dist/{italic-icon.entry-843feb2b.cjs → italic-icon.entry-beef2254.cjs} +1 -1
- package/dist/lib/elements/index.d.ts +1 -0
- package/dist/lib/notetaker/SendNotetaker/SendNotetaker.d.ts +3 -2
- package/dist/lib/notetaker/VideoPlayer/VideoPlayer.d.ts +2 -0
- package/dist/lib/notetaker/lib/store.d.ts +1 -2
- package/dist/multi-select-dropdown.entry-50133d29.js +130 -0
- package/dist/multi-select-dropdown.entry-c82cd6d4.cjs +1 -0
- package/dist/{nylas-booked-event-card_11.entry-ccf30d91.js → nylas-booked-event-card_11.entry-56768a09.js} +69 -69
- package/dist/nylas-booked-event-card_11.entry-eb4b3c5c.cjs +1 -0
- package/dist/nylas-date-component_2.entry-93f2f352.cjs +1 -0
- package/dist/nylas-date-component_2.entry-df957150.js +307 -0
- package/dist/nylas-form-card.entry-4d95a4ad.cjs +1 -0
- package/dist/nylas-form-card.entry-7724e61f.js +72 -0
- package/dist/nylas-notification_2.entry-448c2cb8.cjs +1 -0
- package/dist/nylas-notification_2.entry-af763b6c.js +85 -0
- package/dist/{nylas-scheduler-editor.entry-aa079dff.js → nylas-scheduler-editor.entry-0e4ba46d.js} +45 -34
- package/dist/{nylas-scheduler-editor.entry-9744694a.cjs → nylas-scheduler-editor.entry-e36cdd9d.cjs} +2 -2
- package/dist/{nylas-scheduling.entry-7441979c.js → nylas-scheduling.entry-1b207e91.js} +196 -185
- package/dist/nylas-scheduling.entry-904dd10e.cjs +1 -0
- package/dist/{person-icon.entry-acf4d22b.cjs → person-icon.entry-70d46ca6.cjs} +1 -1
- package/dist/{person-icon.entry-23a69633.js → person-icon.entry-f2979577.js} +1 -1
- package/dist/{play-icon.entry-aa088180.cjs → play-icon.entry-c2cf0b12.cjs} +1 -1
- package/dist/{play-icon.entry-4e7884d4.js → play-icon.entry-d387df5d.js} +1 -1
- package/dist/radio-button-group.entry-45dbd2df.js +56 -0
- package/dist/radio-button-group.entry-94e06176.cjs +1 -0
- package/dist/react.cjs +1 -1
- package/dist/react.js +41 -40
- package/dist/{refresh-icon.entry-96cb008f.cjs → refresh-icon.entry-5ab20f26.cjs} +1 -1
- package/dist/{refresh-icon.entry-d1603555.js → refresh-icon.entry-777cff27.js} +1 -1
- package/dist/{register-component-9d4ceee5-46f58baf.js → register-component-0aad9e3d-b395364a.js} +1 -1
- package/dist/{register-component-9d4ceee5-6fabc42c.cjs → register-component-0aad9e3d-d2f2e543.cjs} +1 -1
- package/dist/{reply-all-icon.entry-537f7718.cjs → reply-all-icon.entry-3c90510e.cjs} +1 -1
- package/dist/{reply-all-icon.entry-6fae7288.js → reply-all-icon.entry-e2dd6da9.js} +1 -1
- package/dist/{reply-icon.entry-ae114e35.js → reply-icon.entry-00a97d9f.js} +1 -1
- package/dist/{reply-icon.entry-72fa6e4c.cjs → reply-icon.entry-d96478be.cjs} +1 -1
- package/dist/{sent-icon.entry-30a6ac17.cjs → sent-icon.entry-2d16da4e.cjs} +1 -1
- package/dist/{sent-icon.entry-b10d5e26.js → sent-icon.entry-949cf214.js} +1 -1
- package/dist/{spam-icon.entry-bed45849.js → spam-icon.entry-3baf9e79.js} +1 -1
- package/dist/{spam-icon.entry-357aa525.cjs → spam-icon.entry-7ee61730.cjs} +1 -1
- package/dist/{star-icon.entry-010349a5.js → star-icon.entry-9fdb278b.js} +1 -1
- package/dist/{star-icon.entry-53c85ebb.cjs → star-icon.entry-dc702d73.cjs} +1 -1
- package/dist/{stop-icon.entry-20af3bf5.cjs → stop-icon.entry-b5ae7e55.cjs} +1 -1
- package/dist/{stop-icon.entry-18f650bf.js → stop-icon.entry-efa1ea66.js} +1 -1
- package/dist/textarea-component.entry-247aca42.cjs +1 -0
- package/dist/textarea-component.entry-7c6fc4d8.js +55 -0
- package/dist/toggle-switch.entry-a0295d17.js +49 -0
- package/dist/toggle-switch.entry-d52b0338.cjs +1 -0
- package/dist/{translate-icon.entry-2308a8e4.js → translate-icon.entry-219cab17.js} +1 -1
- package/dist/{translate-icon.entry-7cb7a479.cjs → translate-icon.entry-985b3b29.cjs} +1 -1
- package/dist/{trash-fill-icon.entry-7f410c82.js → trash-fill-icon.entry-03c90559.js} +1 -1
- package/dist/{trash-fill-icon.entry-c70b9326.cjs → trash-fill-icon.entry-4dfd7d24.cjs} +1 -1
- package/dist/{underline-icon.entry-58ef1a9f.js → underline-icon.entry-58fa18b5.js} +1 -1
- package/dist/{underline-icon.entry-23f478f3.cjs → underline-icon.entry-c60b77a6.cjs} +1 -1
- package/package.json +3 -3
- package/dist/calendar-agenda-fill-icon_36.entry-75d7cd5b.cjs +0 -6
- package/dist/calendar-agenda-fill-icon_36.entry-78fc2e0d.js +0 -4708
- package/dist/checkbox-component_2.entry-82f4b1f2.js +0 -115
- package/dist/checkbox-component_2.entry-c9c8a87d.cjs +0 -1
- package/dist/checkbox-group_4.entry-5a4f0ed2.cjs +0 -28
- package/dist/checkmark-icon_15.entry-01536ed2.js +0 -1339
- package/dist/checkmark-icon_15.entry-c5eaad9b.cjs +0 -5
- package/dist/chevron-icon_3.entry-26f14744.cjs +0 -1
- package/dist/globe-icon_2.entry-3f0e408e.cjs +0 -1
- package/dist/globe-icon_2.entry-8f5c79b2.js +0 -210
- package/dist/google-logo-icon_6.entry-9c91c3d4.cjs +0 -2
- package/dist/index-dc6efb5e.cjs +0 -118
- package/dist/info-icon_2.entry-9f32753b.cjs +0 -1
- package/dist/info-icon_2.entry-c18a111e.js +0 -35
- package/dist/input-component.entry-eae64f46.js +0 -84
- package/dist/input-component.entry-ff9e04c9.cjs +0 -1
- package/dist/input-dropdown_2.entry-67d6d292.cjs +0 -1
- package/dist/multi-select-dropdown.entry-854265ef.js +0 -121
- package/dist/multi-select-dropdown.entry-ca9acf75.cjs +0 -1
- package/dist/nylas-booked-event-card_11.entry-8d3e2019.cjs +0 -1
- package/dist/nylas-form-card.entry-481ede48.js +0 -58
- package/dist/nylas-form-card.entry-58162c72.cjs +0 -1
- package/dist/nylas-notification_2.entry-7d3ed3b0.js +0 -85
- package/dist/nylas-notification_2.entry-dffa3ff6.cjs +0 -1
- package/dist/nylas-scheduling.entry-b1fcb48f.cjs +0 -1
- package/dist/radio-button-group.entry-243d7988.js +0 -47
- package/dist/radio-button-group.entry-cea225c8.cjs +0 -1
- package/dist/textarea-component.entry-b19642f1.cjs +0 -1
- package/dist/textarea-component.entry-e6120440.js +0 -39
- package/dist/toggle-switch.entry-32b0e964.js +0 -34
- package/dist/toggle-switch.entry-becdda2c.cjs +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { i as
|
|
2
|
-
import { N as re } from "./abstract-provider-
|
|
3
|
-
import { E as
|
|
4
|
-
import { n as H } from "./index.es-
|
|
1
|
+
import { i as d, r as te, a as P, b as A, k as N, l as V, m as ne, h as s, H as R, g as ie, e as se, F as oe } from "./index-140eb219.js";
|
|
2
|
+
import { N as re } from "./abstract-provider-45ada3b4-abd3105d.js";
|
|
3
|
+
import { E as M, i as ae, a as le, f as de, c as ce, b as he } from "./feedbackSync-0ebd0eda-803c3ebe.js";
|
|
4
|
+
import { n as H } from "./index.es-57d4a08f-184cbc01.js";
|
|
5
5
|
import { L as j, a as Z } from "./constants-f51538ef-e0a5f026.js";
|
|
6
6
|
import "react";
|
|
7
7
|
import "react/jsx-runtime";
|
|
@@ -9,7 +9,7 @@ import "react-dom";
|
|
|
9
9
|
class ge {
|
|
10
10
|
constructor() {
|
|
11
11
|
this.component = (e) => {
|
|
12
|
-
const t =
|
|
12
|
+
const t = M.Component, o = `${e} Error`;
|
|
13
13
|
return {
|
|
14
14
|
endtime_not_in_future: (n = '"endtime" can not be in the future') => ({
|
|
15
15
|
title: o,
|
|
@@ -63,7 +63,7 @@ class ge {
|
|
|
63
63
|
})
|
|
64
64
|
};
|
|
65
65
|
}, this.api = (e) => {
|
|
66
|
-
const t =
|
|
66
|
+
const t = M.Api, o = `${e} Error`;
|
|
67
67
|
return {
|
|
68
68
|
invalid_session: (n) => ({
|
|
69
69
|
title: o,
|
|
@@ -115,7 +115,7 @@ class ue {
|
|
|
115
115
|
}
|
|
116
116
|
async makeAPIRequest(e, t, o, n = {}) {
|
|
117
117
|
try {
|
|
118
|
-
const a = new URL(this.schedulerAPIURL), r = "2.0.
|
|
118
|
+
const a = new URL(this.schedulerAPIURL), r = "2.0.6";
|
|
119
119
|
return a.pathname = e, await (await fetch(decodeURIComponent(a.toString()), {
|
|
120
120
|
method: t,
|
|
121
121
|
headers: {
|
|
@@ -123,6 +123,7 @@ class ue {
|
|
|
123
123
|
Origin: window.location.origin,
|
|
124
124
|
"X-Source": "nylas-scheduling",
|
|
125
125
|
"X-Nylas-Web-Elements-Version": r,
|
|
126
|
+
...this.clientId && { "X-Nylas-Application-Public-Id": this.clientId },
|
|
126
127
|
...n
|
|
127
128
|
},
|
|
128
129
|
body: o
|
|
@@ -155,7 +156,7 @@ class ue {
|
|
|
155
156
|
this.schedulerStore.set("selectedTimezone", e);
|
|
156
157
|
}
|
|
157
158
|
selectLanguage(e) {
|
|
158
|
-
this.schedulerStore.set("selectedLanguage", e),
|
|
159
|
+
this.schedulerStore.set("selectedLanguage", e), d.changeLanguage(e);
|
|
159
160
|
}
|
|
160
161
|
async toggleAdditionalData(e) {
|
|
161
162
|
e || await this.refetchAvailability(), this.schedulerStore.set("showBookingForm", e);
|
|
@@ -214,69 +215,69 @@ class ue {
|
|
|
214
215
|
return this.schedulerStore.set("organizerConfirmationBookingId", ""), this.schedulerStore.set("confirmedEventInfo", void 0), e;
|
|
215
216
|
}
|
|
216
217
|
async bookTimeslot(e) {
|
|
217
|
-
var
|
|
218
|
+
var w, L, C;
|
|
218
219
|
this.schedulerStore.set("isLoading", !0);
|
|
219
220
|
const { selectedTimeslot: t, selectedTimezone: o, bookingInfo: n, selectedLanguage: a } = this.schedulerStore.state;
|
|
220
221
|
if (!e && !n)
|
|
221
|
-
return { error: this.errors.component(
|
|
222
|
+
return { error: this.errors.component(d.t("createBookingErrorTitle")).no_booking_info() };
|
|
222
223
|
const r = (e == null ? void 0 : e.timeslot) || t;
|
|
223
224
|
if (!r)
|
|
224
|
-
return { error: this.errors.component(
|
|
225
|
-
const l = e && (e != null && e.timezone) ? e == null ? void 0 : e.timezone : o,
|
|
225
|
+
return { error: this.errors.component(d.t("createBookingErrorTitle")).no_timeslot_selected() };
|
|
226
|
+
const l = e && (e != null && e.timezone) ? e == null ? void 0 : e.timezone : o, c = a || "en-US";
|
|
226
227
|
if (!l)
|
|
227
|
-
return { error: this.errors.component(
|
|
228
|
+
return { error: this.errors.component(d.t("createBookingErrorTitle")).no_timezone_selected() };
|
|
228
229
|
const m = [...this.schedulerStore.get("availabilityOrderEmails")];
|
|
229
|
-
let
|
|
230
|
+
let h = "";
|
|
230
231
|
const g = (r == null ? void 0 : r.emails) || [], f = {};
|
|
231
|
-
Object.entries((n == null ? void 0 : n.additionalFields) || {}).forEach(([
|
|
232
|
-
f[
|
|
232
|
+
Object.entries((n == null ? void 0 : n.additionalFields) || {}).forEach(([v, B]) => {
|
|
233
|
+
f[v] = B.value;
|
|
233
234
|
});
|
|
234
|
-
const
|
|
235
|
+
const b = e ? e == null ? void 0 : e.primaryParticipant : n == null ? void 0 : n.primaryParticipant, p = e ? (e == null ? void 0 : e.guests) || [] : (n == null ? void 0 : n.guests) || [], I = e ? e == null ? void 0 : e.additionalFields : f, _ = this.getHeaders(), k = `/v3/scheduling/bookings${!this.sessionId && this.configId ? `?configuration_id=${this.configId}` : !this.sessionId && this.slug && this.clientId ? `?slug=${this.slug}&client_id=${this.clientId}` : ""}`;
|
|
235
236
|
if (m.length === 0) {
|
|
236
|
-
const
|
|
237
|
-
additional_fields:
|
|
237
|
+
const v = await this.makeAPIRequest(decodeURIComponent(k), "POST", JSON.stringify({
|
|
238
|
+
additional_fields: I,
|
|
238
239
|
additional_guests: p,
|
|
239
|
-
guest: { ...
|
|
240
|
+
guest: { ...b },
|
|
240
241
|
start_time: r.start_time.getTime() / 1e3,
|
|
241
242
|
end_time: r.end_time.getTime() / 1e3,
|
|
242
243
|
timezone: l,
|
|
243
244
|
event_id: (r == null ? void 0 : r.event_id) || void 0,
|
|
244
245
|
master_id: (r == null ? void 0 : r.master_id) || void 0,
|
|
245
246
|
calendar_id: (r == null ? void 0 : r.calendar_id) || void 0,
|
|
246
|
-
email_language: this.getTwoLetterLanguageCode(
|
|
247
|
-
}),
|
|
248
|
-
return this.schedulerStore.set("isLoading", !1), "data" in
|
|
247
|
+
email_language: this.getTwoLetterLanguageCode(c)
|
|
248
|
+
}), _);
|
|
249
|
+
return this.schedulerStore.set("isLoading", !1), "data" in v ? (this.schedulerStore.set("eventInfo", v.data), v) : { error: v.error };
|
|
249
250
|
}
|
|
250
251
|
for (; m.length > 0; ) {
|
|
251
|
-
if (
|
|
252
|
+
if (h = m.shift(), !g.includes(h))
|
|
252
253
|
continue;
|
|
253
|
-
const
|
|
254
|
-
participants:
|
|
255
|
-
additional_fields:
|
|
254
|
+
const v = await this.makeAPIRequest(decodeURIComponent(k), "POST", JSON.stringify({
|
|
255
|
+
participants: h ? [{ email: h }] : void 0,
|
|
256
|
+
additional_fields: I,
|
|
256
257
|
additional_guests: p,
|
|
257
|
-
guest: { ...
|
|
258
|
+
guest: { ...b },
|
|
258
259
|
start_time: r.start_time.getTime() / 1e3,
|
|
259
260
|
end_time: r.end_time.getTime() / 1e3,
|
|
260
261
|
timezone: l,
|
|
261
|
-
email_language: this.getTwoLetterLanguageCode(
|
|
262
|
-
}),
|
|
263
|
-
if ("data" in
|
|
264
|
-
return this.schedulerStore.set("isLoading", !1), this.schedulerStore.set("eventInfo",
|
|
265
|
-
if ((
|
|
262
|
+
email_language: this.getTwoLetterLanguageCode(c)
|
|
263
|
+
}), _);
|
|
264
|
+
if ("data" in v)
|
|
265
|
+
return this.schedulerStore.set("isLoading", !1), this.schedulerStore.set("eventInfo", v == null ? void 0 : v.data), v;
|
|
266
|
+
if ((L = (w = v.error) == null ? void 0 : w.message) != null && L.startsWith("The selected timeslot is unavailable"))
|
|
266
267
|
continue;
|
|
267
268
|
{
|
|
268
269
|
this.schedulerStore.set("isLoading", !1);
|
|
269
|
-
const
|
|
270
|
-
let F =
|
|
271
|
-
if (
|
|
272
|
-
const
|
|
273
|
-
F = this.errors.api(
|
|
270
|
+
const B = (C = v.error) == null ? void 0 : C.type;
|
|
271
|
+
let F = v.error;
|
|
272
|
+
if (B && B in this.errors.api(d.t("createBookingErrorTitle"))) {
|
|
273
|
+
const U = this.getErrorMessage(F);
|
|
274
|
+
F = this.errors.api(d.t("createBookingErrorTitle"))[B](U);
|
|
274
275
|
}
|
|
275
276
|
return { error: F };
|
|
276
277
|
}
|
|
277
278
|
}
|
|
278
279
|
return this.schedulerStore.set("isLoading", !1), {
|
|
279
|
-
error: this.errors.api(
|
|
280
|
+
error: this.errors.api(d.t("createBookingErrorTitle")).timeslot_not_available("The selected timeslot is unavailable")
|
|
280
281
|
};
|
|
281
282
|
}
|
|
282
283
|
async getUISettings() {
|
|
@@ -289,10 +290,10 @@ class ue {
|
|
|
289
290
|
if ("error" in a) {
|
|
290
291
|
this.schedulerStore.set("isLoading", !1);
|
|
291
292
|
const l = (r = a.error) == null ? void 0 : r.type;
|
|
292
|
-
let
|
|
293
|
-
return l && l in this.errors.api(
|
|
293
|
+
let c = a.error;
|
|
294
|
+
return l && l in this.errors.api(d.t("getUISettingErrorTitle")) && (c = this.errors.api(d.t("getUISettingErrorTitle"))[l]((c == null ? void 0 : c.message) || (c == null ? void 0 : c.title) || "Something went wrong")), { error: c };
|
|
294
295
|
}
|
|
295
|
-
return "data" in a && this.schedulerStore.set("configSettings", a.data), this.schedulerStore.set("isLoading", !1), a;
|
|
296
|
+
return "data" in a && (this.schedulerStore.set("configSettings", a.data), this.clientId = a.data.app_client_id || this.clientId), this.schedulerStore.set("isLoading", !1), a;
|
|
296
297
|
}
|
|
297
298
|
getTwoLetterLanguageCode(e) {
|
|
298
299
|
return e.split("-")[0];
|
|
@@ -311,62 +312,72 @@ class ue {
|
|
|
311
312
|
return Math.min(n, e);
|
|
312
313
|
}
|
|
313
314
|
async getAvailability(e = 0, t = 0) {
|
|
314
|
-
var f,
|
|
315
|
+
var f, b, p, I, _;
|
|
315
316
|
this.schedulerStore.set("isLoading", !0);
|
|
316
317
|
const o = new URLSearchParams(), n = /* @__PURE__ */ new Date(), a = n.getTime();
|
|
317
318
|
if (t && t < a / 1e3)
|
|
318
|
-
return this.schedulerStore.set("isLoading", !1), { error: this.errors.component(
|
|
319
|
+
return this.schedulerStore.set("isLoading", !1), { error: this.errors.component(d.t("getAvailabilityErrorTitle")).endtime_not_in_future() };
|
|
319
320
|
if (!e) {
|
|
320
|
-
const
|
|
321
|
-
e = Math.floor(
|
|
321
|
+
const y = new Date(n.getFullYear(), n.getMonth(), 1);
|
|
322
|
+
e = Math.floor(y.getTime() / 1e3);
|
|
322
323
|
}
|
|
323
324
|
if (!t) {
|
|
324
|
-
const
|
|
325
|
-
t = Math.floor(
|
|
325
|
+
const y = new Date(n.getFullYear(), n.getMonth() + 1, 0);
|
|
326
|
+
t = Math.floor(y.getTime() / 1e3);
|
|
326
327
|
}
|
|
327
328
|
t = this.getEndTimeForAvailableDaysInFuture(t);
|
|
328
329
|
const r = this.getStartTimeWithMinBookingNotice(e);
|
|
329
330
|
e = r, t = r > t ? r + 1 : t, o.append("start_time", encodeURIComponent(e.toString())), o.append("end_time", encodeURIComponent(t.toString())), this.configId && !this.sessionId ? o.append("configuration_id", encodeURIComponent(this.configId)) : this.slug && this.clientId && !this.sessionId && (o.append("slug", encodeURIComponent(this.slug)), o.append("client_id", encodeURIComponent(this.clientId)));
|
|
330
331
|
const l = this.schedulerStore.get("rescheduleBookingId");
|
|
331
332
|
l && o.append("booking_id", encodeURIComponent(l));
|
|
332
|
-
const
|
|
333
|
+
const c = o.toString(), m = `/v3/scheduling/availability${c ? `?${c}` : ""}`, h = this.getHeaders(), g = await this.makeAPIRequest(decodeURIComponent(m), "GET", void 0, h);
|
|
333
334
|
if ("error" in g) {
|
|
334
335
|
this.schedulerStore.set("availability", []), this.schedulerStore.set("isLoading", !1);
|
|
335
|
-
const
|
|
336
|
+
const y = (f = g.error) == null ? void 0 : f.type;
|
|
336
337
|
let k = g.error;
|
|
337
|
-
if (b
|
|
338
|
-
const
|
|
339
|
-
|
|
338
|
+
if ((b = k == null ? void 0 : k.message) != null && b.toLowerCase().includes("Failed to find a valid Grant")) {
|
|
339
|
+
const w = d.t("invalidGrantError");
|
|
340
|
+
return {
|
|
341
|
+
error: {
|
|
342
|
+
title: d.t("invalidGrantErrorTitle"),
|
|
343
|
+
message: w,
|
|
344
|
+
category: M.Api
|
|
345
|
+
}
|
|
346
|
+
};
|
|
347
|
+
}
|
|
348
|
+
if (y && y in this.errors.api(d.t("getAvailabilityErrorTitle"))) {
|
|
349
|
+
const w = this.getErrorMessage(k);
|
|
350
|
+
k = this.errors.api(d.t("getAvailabilityErrorTitle"))[y](w);
|
|
340
351
|
}
|
|
341
352
|
return { error: k };
|
|
342
353
|
}
|
|
343
354
|
if ("data" in g) {
|
|
344
|
-
const
|
|
345
|
-
...
|
|
346
|
-
start_time: new Date(
|
|
347
|
-
end_time: new Date(
|
|
348
|
-
}))) || []).filter((
|
|
349
|
-
this.schedulerStore.set("availability",
|
|
350
|
-
const
|
|
351
|
-
this.schedulerStore.set("availabilityOrderEmails",
|
|
355
|
+
const w = (((I = (p = g.data) == null ? void 0 : p.time_slots) == null ? void 0 : I.map((C) => ({
|
|
356
|
+
...C,
|
|
357
|
+
start_time: new Date(C.start_time * 1e3),
|
|
358
|
+
end_time: new Date(C.end_time * 1e3)
|
|
359
|
+
}))) || []).filter((C) => C.start_time.getTime() > a).sort((C, v) => C.start_time.getTime() - v.start_time.getTime());
|
|
360
|
+
this.schedulerStore.set("availability", w);
|
|
361
|
+
const L = ((_ = g.data) == null ? void 0 : _.order) || [];
|
|
362
|
+
this.schedulerStore.set("availabilityOrderEmails", L);
|
|
352
363
|
}
|
|
353
364
|
return this.schedulerStore.set("isLoading", !1), g;
|
|
354
365
|
}
|
|
355
366
|
async cancelBooking(e, t) {
|
|
356
367
|
var l;
|
|
357
368
|
if (this.schedulerStore.set("isLoading", !0), !e)
|
|
358
|
-
return { error: this.errors.component(
|
|
369
|
+
return { error: this.errors.component(d.t("cancelBookingErrorTitle")).no_booking_id() };
|
|
359
370
|
const o = !this.sessionId && this.configId ? `?configuration_id=${this.configId}` : !this.sessionId && this.slug && this.clientId ? `?slug=${this.slug}&client_id=${this.clientId}` : "", n = `/v3/scheduling/bookings/${e}${o}`, a = this.getHeaders(), r = await this.makeAPIRequest(decodeURIComponent(n), "DELETE", JSON.stringify({
|
|
360
371
|
action: "cancel",
|
|
361
372
|
cancellation_reason: t
|
|
362
373
|
}), a);
|
|
363
374
|
if ("error" in r) {
|
|
364
375
|
this.schedulerStore.set("isLoading", !1);
|
|
365
|
-
const
|
|
376
|
+
const c = (l = r.error) == null ? void 0 : l.type;
|
|
366
377
|
let m = r.error;
|
|
367
|
-
if (
|
|
368
|
-
const
|
|
369
|
-
m = this.errors.api(
|
|
378
|
+
if (c && c in this.errors.api(d.t("cancelBookingErrorTitle"))) {
|
|
379
|
+
const h = this.getErrorMessage(m);
|
|
380
|
+
m = this.errors.api(d.t("cancelBookingErrorTitle"))[c](h);
|
|
370
381
|
}
|
|
371
382
|
return { error: m };
|
|
372
383
|
}
|
|
@@ -377,52 +388,52 @@ class ue {
|
|
|
377
388
|
async rescheduleBooking(e, t) {
|
|
378
389
|
var O;
|
|
379
390
|
if (this.schedulerStore.set("isLoading", !0), !e)
|
|
380
|
-
return { error: this.errors.component(
|
|
381
|
-
const o = this.errors.api(
|
|
391
|
+
return { error: this.errors.component(d.t("rescheduleBookingErrorTitle")).no_booking_id() };
|
|
392
|
+
const o = this.errors.api(d.t("rescheduleBookingErrorTitle")), n = this.errors.component(d.t("rescheduleBookingErrorTitle")), { bookingInfo: a, selectedTimeslot: r, selectedTimezone: l, selectedLanguage: c } = this.schedulerStore.state, { startTime: m, endTime: h, timezone: g } = t, f = m || (r == null ? void 0 : r.start_time);
|
|
382
393
|
if (!f)
|
|
383
394
|
return { error: n.invalid_start_time('Please pass "startTime" in data or set "selectedTimeslot" in the defaultSchedulerState.') };
|
|
384
|
-
const
|
|
385
|
-
if (!
|
|
395
|
+
const b = h || (r == null ? void 0 : r.end_time);
|
|
396
|
+
if (!b)
|
|
386
397
|
return { error: n.invalid_end_time('Please pass "endTime" in data or set "selectedTimeslot" in the defaultSchedulerState.') };
|
|
387
398
|
const p = this.schedulerStore.get("availabilityOrderEmails");
|
|
388
|
-
let
|
|
399
|
+
let I = "";
|
|
389
400
|
if (p.length > 0) {
|
|
390
|
-
const
|
|
391
|
-
for (let
|
|
392
|
-
if (
|
|
393
|
-
|
|
401
|
+
const T = (r == null ? void 0 : r.emails) || [];
|
|
402
|
+
for (let S = 0; S < p.length; S++)
|
|
403
|
+
if (T.includes(p[S])) {
|
|
404
|
+
I = p[S];
|
|
394
405
|
break;
|
|
395
406
|
}
|
|
396
407
|
}
|
|
397
|
-
const
|
|
398
|
-
if (!
|
|
408
|
+
const _ = g || l;
|
|
409
|
+
if (!_)
|
|
399
410
|
return { error: n.invalid_timezone('Please pass "timezone" in data or set "selectedTimezone" in the defaultSchedulerState.') };
|
|
400
|
-
const
|
|
401
|
-
Object.entries((a == null ? void 0 : a.additionalFields) || {}).forEach(([
|
|
402
|
-
|
|
411
|
+
const y = (r == null ? void 0 : r.event_id) || void 0, k = (r == null ? void 0 : r.master_id) || void 0, w = (r == null ? void 0 : r.calendar_id) || void 0, L = {};
|
|
412
|
+
Object.entries((a == null ? void 0 : a.additionalFields) || {}).forEach(([T, S]) => {
|
|
413
|
+
L[T] = S.value;
|
|
403
414
|
});
|
|
404
|
-
const
|
|
415
|
+
const C = t ? t == null ? void 0 : t.primaryParticipant : a == null ? void 0 : a.primaryParticipant, v = t ? (t == null ? void 0 : t.guests) || [] : (a == null ? void 0 : a.guests) || [], B = t ? t == null ? void 0 : t.additionalFields : L, F = !this.sessionId && this.configId ? `?configuration_id=${this.configId}` : !this.sessionId && this.slug && this.clientId ? `?slug=${this.slug}&client_id=${this.clientId}` : "", U = `/v3/scheduling/bookings/${e}${F}`, q = this.getHeaders(), x = await this.makeAPIRequest(decodeURIComponent(U), "PATCH", JSON.stringify({
|
|
405
416
|
start_time: f.getTime() / 1e3,
|
|
406
|
-
end_time:
|
|
407
|
-
timezone:
|
|
408
|
-
additional_fields:
|
|
409
|
-
guest: { ...
|
|
410
|
-
additional_guests:
|
|
411
|
-
participants:
|
|
412
|
-
email_language: this.getTwoLetterLanguageCode(
|
|
413
|
-
event_id:
|
|
414
|
-
master_id:
|
|
415
|
-
calendar_id:
|
|
417
|
+
end_time: b.getTime() / 1e3,
|
|
418
|
+
timezone: _,
|
|
419
|
+
additional_fields: B,
|
|
420
|
+
guest: { ...C },
|
|
421
|
+
additional_guests: v,
|
|
422
|
+
participants: I ? [{ email: I }] : void 0,
|
|
423
|
+
email_language: this.getTwoLetterLanguageCode(c),
|
|
424
|
+
event_id: y,
|
|
425
|
+
master_id: k,
|
|
426
|
+
calendar_id: w
|
|
416
427
|
}), q);
|
|
417
428
|
if ("error" in x) {
|
|
418
429
|
this.schedulerStore.set("isLoading", !1);
|
|
419
|
-
const
|
|
420
|
-
let
|
|
421
|
-
if (
|
|
422
|
-
const
|
|
423
|
-
|
|
430
|
+
const T = (O = x.error) == null ? void 0 : O.type;
|
|
431
|
+
let S = x.error;
|
|
432
|
+
if (T && T in o) {
|
|
433
|
+
const D = this.getErrorMessage(S);
|
|
434
|
+
S = o[T](D);
|
|
424
435
|
}
|
|
425
|
-
return { error:
|
|
436
|
+
return { error: S };
|
|
426
437
|
}
|
|
427
438
|
const u = this.schedulerStore.get("reschedulingEventInfo");
|
|
428
439
|
if ("data" in x)
|
|
@@ -430,46 +441,46 @@ class ue {
|
|
|
430
441
|
else if (u)
|
|
431
442
|
this.schedulerStore.set("eventInfo", u);
|
|
432
443
|
else {
|
|
433
|
-
const
|
|
444
|
+
const T = {
|
|
434
445
|
booking_id: e
|
|
435
446
|
};
|
|
436
|
-
this.schedulerStore.set("eventInfo",
|
|
447
|
+
this.schedulerStore.set("eventInfo", T);
|
|
437
448
|
}
|
|
438
449
|
return this.schedulerStore.set("isLoading", !1), x;
|
|
439
450
|
}
|
|
440
451
|
async updateBooking(e) {
|
|
441
452
|
var g;
|
|
442
453
|
this.schedulerStore.set("isLoading", !0);
|
|
443
|
-
const { bookingId: t, status: o, reason: n } = e, a = this.schedulerStore.get("organizerConfirmationSalt"), r = o === "confirmed" ?
|
|
454
|
+
const { bookingId: t, status: o, reason: n } = e, a = this.schedulerStore.get("organizerConfirmationSalt"), r = o === "confirmed" ? d.t("confirmBookingErrorTitle") : d.t("rejectBookingErrorTitle");
|
|
444
455
|
if (!t)
|
|
445
456
|
return { error: this.errors.component(r).no_booking_id() };
|
|
446
457
|
if (!a)
|
|
447
458
|
return { error: this.errors.component(r).no_salt() };
|
|
448
|
-
const l = !this.sessionId && this.configId ? `?configuration_id=${this.configId}` : !this.sessionId && this.slug && this.clientId ? `?slug=${this.slug}&client_id=${this.clientId}` : "",
|
|
459
|
+
const l = !this.sessionId && this.configId ? `?configuration_id=${this.configId}` : !this.sessionId && this.slug && this.clientId ? `?slug=${this.slug}&client_id=${this.clientId}` : "", c = `/v3/scheduling/bookings/${t}${l}`, m = this.getHeaders(), h = await this.makeAPIRequest(decodeURIComponent(c), "PUT", JSON.stringify({
|
|
449
460
|
status: o,
|
|
450
461
|
cancellation_reason: n,
|
|
451
462
|
salt: a
|
|
452
463
|
}), m);
|
|
453
|
-
if ("error" in
|
|
464
|
+
if ("error" in h) {
|
|
454
465
|
this.schedulerStore.set("isLoading", !1);
|
|
455
|
-
const f = (g =
|
|
456
|
-
let
|
|
466
|
+
const f = (g = h.error) == null ? void 0 : g.type;
|
|
467
|
+
let b = h.error;
|
|
457
468
|
if (f && f in this.errors.api(r)) {
|
|
458
|
-
const p = this.getErrorMessage(
|
|
459
|
-
|
|
469
|
+
const p = this.getErrorMessage(b);
|
|
470
|
+
b = this.errors.api(r)[f](p);
|
|
460
471
|
}
|
|
461
|
-
return { error:
|
|
472
|
+
return { error: b };
|
|
462
473
|
}
|
|
463
|
-
return "data" in
|
|
474
|
+
return "data" in h && o === "confirmed" ? this.schedulerStore.set("confirmedEventInfo", h == null ? void 0 : h.data) : "request_id" in h && o === "cancelled" && this.schedulerStore.set("cancelledEventInfo", {
|
|
464
475
|
booking_id: t
|
|
465
|
-
}), this.schedulerStore.set("organizerConfirmationBookingId", ""), this.schedulerStore.set("isLoading", !1),
|
|
476
|
+
}), this.schedulerStore.set("organizerConfirmationBookingId", ""), this.schedulerStore.set("isLoading", !1), h;
|
|
466
477
|
}
|
|
467
478
|
async validateGroupEventTimeslot(e) {
|
|
468
479
|
var r, l;
|
|
469
480
|
this.schedulerStore.set("isLoading", !0);
|
|
470
481
|
const t = (r = this.schedulerStore.get("configSettings")) == null ? void 0 : r.configuration_id;
|
|
471
482
|
if (!t)
|
|
472
|
-
return { error: this.errors.component(
|
|
483
|
+
return { error: this.errors.component(d.t("validateTimeslotErrorTitle")).no_config_id() };
|
|
473
484
|
const o = this.getHeaders(), n = `/v3/scheduling/configurations/${t}/group-events/validate-timeslot`, a = await this.makeAPIRequest(decodeURIComponent(n), "POST", JSON.stringify({
|
|
474
485
|
...e,
|
|
475
486
|
start_time: e.start_time.getTime() / 1e3,
|
|
@@ -477,11 +488,11 @@ class ue {
|
|
|
477
488
|
}), o);
|
|
478
489
|
if ("error" in a) {
|
|
479
490
|
this.schedulerStore.set("isLoading", !1);
|
|
480
|
-
const
|
|
491
|
+
const c = (l = a.error) == null ? void 0 : l.type;
|
|
481
492
|
let m = a.error;
|
|
482
|
-
if (
|
|
483
|
-
const
|
|
484
|
-
m = this.errors.api(
|
|
493
|
+
if (c && c in this.errors.api(d.t("validateTimeslotErrorTitle"))) {
|
|
494
|
+
const h = this.getErrorMessage(m);
|
|
495
|
+
m = this.errors.api(d.t("validateTimeslotErrorTitle"))[c](h);
|
|
485
496
|
}
|
|
486
497
|
return this.refetchAvailability(), { error: m };
|
|
487
498
|
}
|
|
@@ -597,20 +608,20 @@ const z = (i, e) => {
|
|
|
597
608
|
)
|
|
598
609
|
)
|
|
599
610
|
);
|
|
600
|
-
}, K = (i, e) => s("div", { class: "message-banner" }, e), me = ':host{display:flex;flex-direction:column;overflow:visible;border-radius:var(--nylas-border-radius-2x);width:fit-content;background:var(--nylas-base-0);position:relative;box-shadow:0px 4px 8px 2px rgba(0, 0, 0, 0.05), 0px 8px 16px -2px rgba(0, 0, 0, 0.1);--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;font-family:var(--nylas-font-family);font-optical-sizing:auto;font-style:normal;font-variation-settings:"slnt" 0}@media screen and (max-width: 768px){:host{width:auto;min-width:325px}}:root{font-family:inherit}.error{padding:8rem 12rem;color:var(--nylas-base-0);background-color:var(--nylas-error);margin:1.5rem;border-radius:var(--nylas-border-radius-2x)}.message-banner{text-align:right;color:var(--nylas-base-800);padding:1rem;border-bottom:1px solid var(--nylas-color-primary-200);margin:0}.loading{margin:1.5rem;display:flex;gap:1rem}.loading .skeleton{border-radius:var(--nylas-border-radius-2x);animation:pulsate 1.5s infinite}.loading .skeleton:nth-child(2){animation-delay:-100ms}.loading .skeleton:nth-child(3){animation-delay:-200ms}.loading .skeleton:nth-child(4){animation-delay:-300ms}.loading .skeleton:nth-child(5){animation-delay:-400ms}.loading .left .skeleton{height:100%;width:400px}.loading .right .skeleton{height:5rem;width:300px;margin-bottom:1rem}.loading .right .skeleton:last-child{margin-bottom:0}@keyframes pulsate{0%{background-color:var(--nylas-base-50)}50%{background-color:var(--nylas-base-100)}100%{background-color:var(--nylas-base-50)}}.select-date-page,.additional-data-page,.booked-event-page,.manual-confirmation-page,.cancelled-event-page,.cancel-flow-page{border-top-left-radius:var(--nylas-border-radius-2x);border-top-right-radius:var(--nylas-border-radius-2x)}.select-date-page,.additional-data-page{display:flex}@media screen and (max-width: 768px){.select-date-page,.additional-data-page{flex-direction:column}}.booked-event-page,.manual-confirmation-page{background-color:var(--nylas-base-50)}.cancelled-event-page,.manual-confirmation-page,.cancel-flow-page{padding:1rem;height:496px;display:flex;justify-content:center;align-items:center}.booked-event-page,.manual-confirmation-page,.cancelled-event-page,.cancel-flow-page{min-width:784px;background:var(--nylas-base-50)}@media screen and (max-width: 768px){.booked-event-page,.manual-confirmation-page,.cancelled-event-page,.cancel-flow-page{min-width:90%}}.left-panel{display:flex;flex-direction:column;min-width:424px;border-top-left-radius:inherit;background:var(--nylas-base-0);position:relative;padding:1rem 0 0 0;height:624px}@media screen and (max-width: 768px){.left-panel{border-top-right-radius:inherit;min-width:unset;height:auto}}@media screen and (max-width: 768px){.select-date-page .left-panel{height:624px}}.border{margin-left:-20px;margin-right:-20px;border-top-width:1px;height:0.5px;background-color:var(--nylas-base-200)}@media screen and (max-width: 768px){.border{display:none}}.right-panel{min-width:360px;width:360px;background-color:var(--nylas-base-50);height:624px;padding-top:16px;border-left:1px solid var(--nylas-base-200);border-top-right-radius:inherit}.right-panel.reschedule{border-top-right-radius:0px}@media screen and (max-width: 768px){.right-panel{border-top-right-radius:0px;width:inherit;min-width:unset;height:auto;border-left:none}}.right-panel h2{display:flex;margin:0;height:48px;gap:0.5rem;justify-content:center;align-items:center;width:auto;font-size:1.125rem;line-height:1.5rem;font-weight:500;text-align:center;color:var(--nylas-base-800)}.additional-data-page .left-panel{background-color:var(--nylas-base-50)}.additional-data-page .right-panel{background-color:var(--nylas-base-0)}nylas-selected-event-card{height:604px;padding:0 1rem}@media screen and (max-width: 768px){nylas-selected-event-card{height:250px}}.footer{display:flex;justify-content:flex-end;align-items:center;gap:8px;padding:16px;font-size:14px;font-weight:300;color:var(--nylas-base-500);border-top:1px solid var(--nylas-base-200);min-height:24px}.footer .powered-by-nylas{display:flex;align-items:center;text-decoration:none;color:var(--nylas-base-500)}.footer .powered-by-nylas:hover{color:var(--nylas-base-800)}.footer svg{fill:var(--nylas-base-500)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}.footer svg{margin-top:1px}nylas-selected-event-card::part(nsec__timezone){position:absolute;bottom:0}nylas-notification{margin:1.5rem;width:-webkit-fill-available;width:-moz-available;position:absolute}nylas-locale-switch{position:absolute;padding:18px 20px;bottom:0;width:-webkit-fill-available;width:-moz-available;border-top:1px solid var(--nylas-base-200)}@media screen and (max-width: 768px){nylas-locale-switch{height:auto}}nylas-date-picker{padding:0 20px}button-component#report-issue{width:auto;position:absolute;bottom:4px;left:16px}.language-feedback-container{width:auto;position:absolute;bottom:4px;left:16px;display:flex;gap:8px;align-items:center}.language-feedback-container button-component#report-issue{position:initial}nylas-feedback-form{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}', be = me, Q = { title:
|
|
611
|
+
}, K = (i, e) => s("div", { class: "message-banner" }, e), me = ':host{display:flex;flex-direction:column;overflow:visible;border-radius:var(--nylas-border-radius-2x);width:fit-content;background:var(--nylas-base-0);position:relative;box-shadow:0px 4px 8px 2px rgba(0, 0, 0, 0.05), 0px 8px 16px -2px rgba(0, 0, 0, 0.1);--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--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;font-family:var(--nylas-font-family);font-optical-sizing:auto;font-style:normal;font-variation-settings:"slnt" 0}@media screen and (max-width: 768px){:host{width:auto;min-width:325px}}:root{font-family:inherit}.error{padding:8rem 12rem;color:var(--nylas-base-0);background-color:var(--nylas-error);margin:1.5rem;border-radius:var(--nylas-border-radius-2x)}.message-banner{text-align:right;color:var(--nylas-base-800);padding:1rem;border-bottom:1px solid var(--nylas-color-primary-200);margin:0}.loading{margin:1.5rem;display:flex;gap:1rem}.loading .skeleton{border-radius:var(--nylas-border-radius-2x);animation:pulsate 1.5s infinite}.loading .skeleton:nth-child(2){animation-delay:-100ms}.loading .skeleton:nth-child(3){animation-delay:-200ms}.loading .skeleton:nth-child(4){animation-delay:-300ms}.loading .skeleton:nth-child(5){animation-delay:-400ms}.loading .left .skeleton{height:100%;width:400px}.loading .right .skeleton{height:5rem;width:300px;margin-bottom:1rem}.loading .right .skeleton:last-child{margin-bottom:0}@keyframes pulsate{0%{background-color:var(--nylas-base-50)}50%{background-color:var(--nylas-base-100)}100%{background-color:var(--nylas-base-50)}}.select-date-page,.additional-data-page,.booked-event-page,.manual-confirmation-page,.cancelled-event-page,.cancel-flow-page{border-top-left-radius:var(--nylas-border-radius-2x);border-top-right-radius:var(--nylas-border-radius-2x)}.select-date-page,.additional-data-page{display:flex}@media screen and (max-width: 768px){.select-date-page,.additional-data-page{flex-direction:column}}.booked-event-page,.manual-confirmation-page{background-color:var(--nylas-base-50)}.cancelled-event-page,.manual-confirmation-page,.cancel-flow-page{padding:1rem;height:496px;display:flex;justify-content:center;align-items:center}.booked-event-page,.manual-confirmation-page,.cancelled-event-page,.cancel-flow-page{min-width:784px;background:var(--nylas-base-50)}@media screen and (max-width: 768px){.booked-event-page,.manual-confirmation-page,.cancelled-event-page,.cancel-flow-page{min-width:90%}}.left-panel{display:flex;flex-direction:column;min-width:424px;border-top-left-radius:inherit;background:var(--nylas-base-0);position:relative;padding:1rem 0 0 0;height:624px}@media screen and (max-width: 768px){.left-panel{border-top-right-radius:inherit;min-width:unset;height:auto}}@media screen and (max-width: 768px){.select-date-page .left-panel{height:624px}}.border{margin-left:-20px;margin-right:-20px;border-top-width:1px;height:0.5px;background-color:var(--nylas-base-200)}@media screen and (max-width: 768px){.border{display:none}}.right-panel{min-width:360px;width:360px;background-color:var(--nylas-base-50);height:624px;padding-top:16px;border-left:1px solid var(--nylas-base-200);border-top-right-radius:inherit}.right-panel.reschedule{border-top-right-radius:0px}@media screen and (max-width: 768px){.right-panel{border-top-right-radius:0px;width:inherit;min-width:unset;height:auto;border-left:none}}.right-panel h2{display:flex;margin:0;height:48px;gap:0.5rem;justify-content:center;align-items:center;width:auto;font-size:1.125rem;line-height:1.5rem;font-weight:500;text-align:center;color:var(--nylas-base-800)}.additional-data-page .left-panel{background-color:var(--nylas-base-50)}.additional-data-page .right-panel{background-color:var(--nylas-base-0)}nylas-selected-event-card{height:604px;padding:0 1rem}@media screen and (max-width: 768px){nylas-selected-event-card{height:250px}}.footer{display:flex;justify-content:flex-end;align-items:center;gap:8px;padding:16px;font-size:14px;font-weight:300;color:var(--nylas-base-500);border-top:1px solid var(--nylas-base-200);min-height:24px}.footer .powered-by-nylas{display:flex;align-items:center;text-decoration:none;color:var(--nylas-base-500)}.footer .powered-by-nylas:hover{color:var(--nylas-base-800)}.footer svg{fill:var(--nylas-base-500)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}.footer svg{margin-top:1px}nylas-selected-event-card::part(nsec__timezone){position:absolute;bottom:0}nylas-notification{margin:1.5rem;width:-webkit-fill-available;width:-moz-available;position:absolute}nylas-locale-switch{position:absolute;padding:18px 20px;bottom:0;width:-webkit-fill-available;width:-moz-available;border-top:1px solid var(--nylas-base-200)}@media screen and (max-width: 768px){nylas-locale-switch{height:auto}}nylas-date-picker{padding:0 20px}button-component#report-issue{width:auto;position:absolute;bottom:4px;left:16px}.language-feedback-container{width:auto;position:absolute;bottom:4px;left:16px;display:flex;gap:8px;align-items:center}.language-feedback-container button-component#report-issue{position:initial}nylas-feedback-form{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}', be = me, Q = { title: d.t("genericErrorTitle"), type: H.Error, category: M.Component }, _e = class {
|
|
601
612
|
constructor(i) {
|
|
602
|
-
te(this, i), this.init = P(this, "init", 7), this.schedulerWillLoad = P(this, "schedulerWillLoad", 7), this.schedulerDidLoad = P(this, "schedulerDidLoad", 7), this.nylasSchedulerError = P(this, "nylasSchedulerError", 7), this.nylasSchedulerInfo = P(this, "nylasSchedulerInfo", 7), this.configSettingsLoaded = P(this, "configSettingsLoaded", 7), this.bookingRefExtracted = P(this, "bookingRefExtracted", 7), this.bookedEventInfo = P(this, "bookedEventInfo", 7), this.mode = "app", this.defaultSchedulerState = void 0, this.sessionId = void 0, this.schedulerApiUrl = "https://api.us.nylas.com", this.bookingInfo = void 0, this.rescheduleBookingRef = void 0, this.cancelBookingRef = void 0, this.organizerConfirmationBookingRef = void 0, this.configurationId = void 0, this.slug = void 0, this.clientId = void 0, this.nylasBranding = !0, this.eventOverrides = {}, this.isLoading = void 0, this.themeConfig = void 0, this.localization = void 0, this.defaultLanguage = void 0, this.showNotification = !0, this.enableUserFeedback = !0, this.hour12 = void 0, this.automaticComponentRegistration = !0, this.selectedDateLabel = (/* @__PURE__ */ new Date()).toLocaleDateString(navigator.language, { dateStyle: "full" }) || `${
|
|
613
|
+
te(this, i), this.init = P(this, "init", 7), this.schedulerWillLoad = P(this, "schedulerWillLoad", 7), this.schedulerDidLoad = P(this, "schedulerDidLoad", 7), this.nylasSchedulerError = P(this, "nylasSchedulerError", 7), this.nylasSchedulerInfo = P(this, "nylasSchedulerInfo", 7), this.configSettingsLoaded = P(this, "configSettingsLoaded", 7), this.bookingRefExtracted = P(this, "bookingRefExtracted", 7), this.bookedEventInfo = P(this, "bookedEventInfo", 7), this.mode = "app", this.defaultSchedulerState = void 0, this.sessionId = void 0, this.schedulerApiUrl = "https://api.us.nylas.com", this.bookingInfo = void 0, this.rescheduleBookingRef = void 0, this.cancelBookingRef = void 0, this.organizerConfirmationBookingRef = void 0, this.configurationId = void 0, this.slug = void 0, this.clientId = void 0, this.nylasBranding = !0, this.eventOverrides = {}, this.isLoading = void 0, this.themeConfig = void 0, this.localization = void 0, this.defaultLanguage = void 0, this.showNotification = !0, this.enableUserFeedback = !0, this.hour12 = void 0, this.automaticComponentRegistration = !0, this.selectedDateLabel = (/* @__PURE__ */ new Date()).toLocaleDateString(navigator.language, { dateStyle: "full" }) || `${d.t("noDateSelected")}`, this.refConfigId = void 0, this.language = navigator.language, this.showFeedbackModal = !1, this.bookingInfoConfirmed = null, this.version = "2.0.6";
|
|
603
614
|
}
|
|
604
615
|
connectedCallback() {
|
|
605
616
|
A("[nylas-scheduler] connectedCallback");
|
|
606
617
|
}
|
|
607
618
|
async componentWillLoad() {
|
|
608
|
-
var l,
|
|
609
|
-
A("[nylas-scheduler] Component will load"), this.version = "2.0.
|
|
619
|
+
var l, c, m;
|
|
620
|
+
A("[nylas-scheduler] Component will load"), this.version = "2.0.6", this.enableUserFeedback && !ae() && le({
|
|
610
621
|
dsn: "https://9d5731f1c77ca84c9ed3fb9b3ccf7ee1@o74852.ingest.us.sentry.io/4507889638178816",
|
|
611
622
|
release: this.version,
|
|
612
|
-
integrations: (
|
|
613
|
-
...
|
|
623
|
+
integrations: (h) => [
|
|
624
|
+
...h.filter((g) => !1),
|
|
614
625
|
de({
|
|
615
626
|
colorScheme: "system",
|
|
616
627
|
autoInject: !1
|
|
@@ -635,18 +646,18 @@ const z = (i, e) => {
|
|
|
635
646
|
}, this.baseProvider = new re(this.host, this.stores, this.automaticComponentRegistration, this.eventOverrides), this.refConfigId = this.configurationId;
|
|
636
647
|
let n;
|
|
637
648
|
if (this.rescheduleBookingRef) {
|
|
638
|
-
const [
|
|
639
|
-
this.refConfigId =
|
|
649
|
+
const [h, g, f] = N(this.rescheduleBookingRef);
|
|
650
|
+
this.refConfigId = h, this.stores.scheduler.set("rescheduleBookingId", g), n = this.bookingRefExtracted.emit({ configurationId: h, bookingId: g });
|
|
640
651
|
} else if (this.cancelBookingRef) {
|
|
641
|
-
const [
|
|
642
|
-
this.refConfigId =
|
|
652
|
+
const [h, g, f] = N(this.cancelBookingRef);
|
|
653
|
+
this.refConfigId = h, this.stores.scheduler.set("cancelBookingId", g), n = this.bookingRefExtracted.emit({ configurationId: h, bookingId: g });
|
|
643
654
|
} else if (this.organizerConfirmationBookingRef) {
|
|
644
|
-
const [
|
|
645
|
-
this.refConfigId =
|
|
655
|
+
const [h, g, f] = N(this.organizerConfirmationBookingRef);
|
|
656
|
+
this.refConfigId = h, this.stores.scheduler.set("organizerConfirmationBookingId", g), this.stores.scheduler.set("organizerConfirmationSalt", f), n = this.bookingRefExtracted.emit({ configurationId: h, bookingId: g, salt: f });
|
|
646
657
|
}
|
|
647
658
|
if ("bookingRefExtracted" in this.eventOverrides && (await this.eventOverrides.bookingRefExtracted(n, this.nylasSchedulerConnector), n.defaultPrevented) || !this.checkIfSessionIdOrConfigIdExists())
|
|
648
659
|
return;
|
|
649
|
-
const a = (
|
|
660
|
+
const a = (c = this.baseProvider) == null ? void 0 : c.getStore("scheduler");
|
|
650
661
|
this.nylasSchedulerConnector = new fe({
|
|
651
662
|
schedulerAPIURL: this.schedulerApiUrl,
|
|
652
663
|
sessionId: this.sessionId,
|
|
@@ -659,8 +670,8 @@ const z = (i, e) => {
|
|
|
659
670
|
"init" in this.eventOverrides && (await this.eventOverrides.init(r, this.nylasSchedulerConnector), r.defaultPrevented) || ((m = this.baseProvider) == null || m.componentWillLoad(this.nylasSchedulerConnector), this.applyThemeConfig(this.themeConfig));
|
|
660
671
|
}
|
|
661
672
|
async componentDidLoad() {
|
|
662
|
-
var
|
|
663
|
-
(
|
|
673
|
+
var c, m, h, g, f, b, p, I;
|
|
674
|
+
(c = this.baseProvider) == null || c.componentDidLoad();
|
|
664
675
|
const i = this.schedulerDidLoad.emit(this.host);
|
|
665
676
|
if ("schedulerDidLoad" in this.eventOverrides && (await this.eventOverrides.schedulerDidLoad(i, this.nylasSchedulerConnector), i.defaultPrevented) || !this.checkIfSessionIdOrConfigIdExists())
|
|
666
677
|
return;
|
|
@@ -670,12 +681,12 @@ const z = (i, e) => {
|
|
|
670
681
|
this.nylasSchedulerError.emit({ notification: { ...this.getErrorObject(e == null ? void 0 : e.error) }, host: this.host });
|
|
671
682
|
return;
|
|
672
683
|
} else {
|
|
673
|
-
"data" in e && ((
|
|
674
|
-
const
|
|
675
|
-
if ("configSettingsLoaded" in this.eventOverrides && (await this.eventOverrides.configSettingsLoaded(
|
|
684
|
+
"data" in e && ((h = e.data) != null && h.appearance) && console.info("Appearance settings have been returned from the configuration used byt his scheduling page; please remember to grab them from the configSettingsLoaded event and apply them as desired.");
|
|
685
|
+
const _ = this.configSettingsLoaded.emit({ settings: e });
|
|
686
|
+
if ("configSettingsLoaded" in this.eventOverrides && (await this.eventOverrides.configSettingsLoaded(_, this.nylasSchedulerConnector), _.defaultPrevented))
|
|
676
687
|
return;
|
|
677
688
|
}
|
|
678
|
-
const t = (g = this.baseProvider) == null ? void 0 : g.getStore("scheduler"), o = (
|
|
689
|
+
const t = (g = this.baseProvider) == null ? void 0 : g.getStore("scheduler"), o = (b = (f = t == null ? void 0 : t.get("configSettings")) == null ? void 0 : f.scheduler) == null ? void 0 : b.available_days_in_future, n = t == null ? void 0 : t.get("selectedTimeslot");
|
|
679
690
|
if (n && (n != null && n.start_time)) {
|
|
680
691
|
if (!this.isTimeslotValid(n))
|
|
681
692
|
return;
|
|
@@ -688,16 +699,16 @@ const z = (i, e) => {
|
|
|
688
699
|
let l;
|
|
689
700
|
if (!(r && r.length > 0)) {
|
|
690
701
|
if (a) {
|
|
691
|
-
const { startTime:
|
|
692
|
-
a.getTime() <
|
|
702
|
+
const { startTime: _, endTime: y, endTimeForAvailableDaysInFuture: k } = this.validateAvailableDaysInFuture(a, o || 30);
|
|
703
|
+
a.getTime() < k * 1e3 && (l = await ((I = this.nylasSchedulerConnector) == null ? void 0 : I.scheduler.getAvailability(_, y)));
|
|
693
704
|
} else {
|
|
694
|
-
const
|
|
695
|
-
|
|
705
|
+
const _ = /* @__PURE__ */ new Date(), { startTime: y, endTime: k, endTimeForAvailableDaysInFuture: w } = this.validateAvailableDaysInFuture(_, o || 30);
|
|
706
|
+
_.getTime() < w * 1e3 && (l = await ((p = this.nylasSchedulerConnector) == null ? void 0 : p.scheduler.getAvailability(y, k)));
|
|
696
707
|
}
|
|
697
708
|
if ((!l || "error" in l) && this.nylasSchedulerError.emit({ notification: { ...this.getErrorObject(l == null ? void 0 : l.error) }, host: this.host }), !a) {
|
|
698
|
-
let
|
|
699
|
-
const
|
|
700
|
-
|
|
709
|
+
let _ = /* @__PURE__ */ new Date();
|
|
710
|
+
const y = t == null ? void 0 : t.get("availability").find((k) => new Date(k.start_time) > /* @__PURE__ */ new Date());
|
|
711
|
+
y && (_ = y.start_time), t == null || t.set("selectedDate", _);
|
|
701
712
|
}
|
|
702
713
|
}
|
|
703
714
|
}
|
|
@@ -712,32 +723,32 @@ const z = (i, e) => {
|
|
|
712
723
|
rescheduleBookingRefChanged(i) {
|
|
713
724
|
var e, t;
|
|
714
725
|
if (i) {
|
|
715
|
-
const [o, n] =
|
|
726
|
+
const [o, n] = N(i);
|
|
716
727
|
(e = this.stores) == null || e.scheduler.set("rescheduleBookingId", n), this.refConfigId = o, (t = this.nylasSchedulerConnector) == null || t.scheduler.setConfigId(o);
|
|
717
728
|
}
|
|
718
729
|
}
|
|
719
730
|
cancelBookingRefChanged(i) {
|
|
720
731
|
var e, t;
|
|
721
732
|
if (i) {
|
|
722
|
-
const [o, n] =
|
|
733
|
+
const [o, n] = N(i);
|
|
723
734
|
(e = this.stores) == null || e.scheduler.set("cancelBookingId", n), this.refConfigId = o, (t = this.nylasSchedulerConnector) == null || t.scheduler.setConfigId(o);
|
|
724
735
|
}
|
|
725
736
|
}
|
|
726
737
|
organizerConfirmationBookingRefChanged(i) {
|
|
727
738
|
var e, t;
|
|
728
739
|
if (i) {
|
|
729
|
-
const [o, n] =
|
|
740
|
+
const [o, n] = N(i);
|
|
730
741
|
(e = this.stores) == null || e.scheduler.set("organizerConfirmationBookingId", n), this.refConfigId = o, (t = this.nylasSchedulerConnector) == null || t.scheduler.setConfigId(o);
|
|
731
742
|
}
|
|
732
743
|
}
|
|
733
744
|
localizationChanged(i) {
|
|
734
745
|
i && Object.keys(i).forEach((e) => {
|
|
735
|
-
e in j &&
|
|
746
|
+
e in j && d.addResourceBundle(e, "translation", i[e], !1, !0);
|
|
736
747
|
});
|
|
737
748
|
}
|
|
738
749
|
defaultLanguageChanged(i) {
|
|
739
750
|
var e;
|
|
740
|
-
i && ((e = this.stores) == null || e.scheduler.set("selectedLanguage", i),
|
|
751
|
+
i && ((e = this.stores) == null || e.scheduler.set("selectedLanguage", i), d.changeLanguage(i));
|
|
741
752
|
}
|
|
742
753
|
themeConfigChanged(i) {
|
|
743
754
|
var e, t;
|
|
@@ -745,7 +756,7 @@ const z = (i, e) => {
|
|
|
745
756
|
}
|
|
746
757
|
languageChanged(i) {
|
|
747
758
|
const e = i.detail;
|
|
748
|
-
this.language = e,
|
|
759
|
+
this.language = e, d.changeLanguage(e);
|
|
749
760
|
}
|
|
750
761
|
async registerComponentHandler(i) {
|
|
751
762
|
var e;
|
|
@@ -756,18 +767,18 @@ const z = (i, e) => {
|
|
|
756
767
|
(e = this.baseProvider) == null || e.unregisterComponent(i.detail);
|
|
757
768
|
}
|
|
758
769
|
async monthChangedHandler(i) {
|
|
759
|
-
var r, l,
|
|
760
|
-
const e = i.detail, t = (m = (
|
|
770
|
+
var r, l, c, m, h, g, f;
|
|
771
|
+
const e = i.detail, t = (m = (c = (l = (r = this.nylasSchedulerConnector) == null ? void 0 : r.schedulerStore) == null ? void 0 : l.get("configSettings")) == null ? void 0 : c.scheduler) == null ? void 0 : m.available_days_in_future, { startTime: o, endTime: n, endTimeForAvailableDaysInFuture: a } = this.validateAvailableDaysInFuture(e, t || 30);
|
|
761
772
|
if (!i.defaultPrevented && o < a && e.getTime() < a * 1e3) {
|
|
762
|
-
const
|
|
763
|
-
(!
|
|
773
|
+
const b = await ((h = this.nylasSchedulerConnector) == null ? void 0 : h.scheduler.getAvailability(o, n));
|
|
774
|
+
(!b || "error" in b) && this.nylasSchedulerError.emit({ notification: { ...this.getErrorObject(b == null ? void 0 : b.error) }, host: this.host });
|
|
764
775
|
const p = (g = this.stores) == null ? void 0 : g.scheduler.get("selectableDates");
|
|
765
776
|
p && p.length > 0 && ((f = this.stores) == null || f.scheduler.set("selectedDate", p[0]));
|
|
766
777
|
}
|
|
767
778
|
}
|
|
768
779
|
mapToBookingData(i) {
|
|
769
|
-
var r, l,
|
|
770
|
-
const e = (r = this.stores) == null ? void 0 : r.scheduler.get("selectedTimeslot"), t = (l = this.stores) == null ? void 0 : l.scheduler.get("selectedLanguage"), o = (
|
|
780
|
+
var r, l, c;
|
|
781
|
+
const e = (r = this.stores) == null ? void 0 : r.scheduler.get("selectedTimeslot"), t = (l = this.stores) == null ? void 0 : l.scheduler.get("selectedLanguage"), o = (c = this.stores) == null ? void 0 : c.scheduler.get("selectedTimezone"), n = e != null && e.start_time ? new Date(e == null ? void 0 : e.start_time).getTime() / 1e3 : "", a = e != null && e.end_time ? new Date(e == null ? void 0 : e.end_time).getTime() / 1e3 : "";
|
|
771
782
|
return {
|
|
772
783
|
additional_guests: i.guests,
|
|
773
784
|
guest: { ...i.primaryParticipant },
|
|
@@ -779,17 +790,17 @@ const z = (i, e) => {
|
|
|
779
790
|
};
|
|
780
791
|
}
|
|
781
792
|
async bookButtonClickedHandler(i) {
|
|
782
|
-
var
|
|
793
|
+
var c, m, h, g;
|
|
783
794
|
if (i.defaultPrevented)
|
|
784
795
|
return;
|
|
785
796
|
const e = i.detail, t = this.mapToBookingData(e);
|
|
786
797
|
this.bookingInfoConfirmed = e;
|
|
787
|
-
const n = (m = (
|
|
798
|
+
const n = (m = (c = this.nylasSchedulerConnector) == null ? void 0 : c.schedulerStore) == null ? void 0 : m.get("rescheduleBookingId");
|
|
788
799
|
if (n) {
|
|
789
|
-
const f = await ((
|
|
800
|
+
const f = await ((h = this.nylasSchedulerConnector) == null ? void 0 : h.scheduler.rescheduleBooking(n, e));
|
|
790
801
|
(!f || "error" in f) && this.nylasSchedulerError.emit({ notification: { ...this.getErrorObject(f == null ? void 0 : f.error) }, host: this.host });
|
|
791
|
-
const
|
|
792
|
-
this.bookingInfoConfirmed = { ...this.bookingInfoConfirmed, ...
|
|
802
|
+
const b = f == null ? void 0 : f.data, p = this.bookedEventInfo.emit({ ...f, data: { ...b, ...t } });
|
|
803
|
+
this.bookingInfoConfirmed = { ...this.bookingInfoConfirmed, ...b }, "bookedEventInfo" in this.eventOverrides && await this.eventOverrides.bookedEventInfo(p, this.nylasSchedulerConnector);
|
|
793
804
|
return;
|
|
794
805
|
}
|
|
795
806
|
const a = await ((g = this.nylasSchedulerConnector) == null ? void 0 : g.scheduler.bookTimeslot(e));
|
|
@@ -799,7 +810,7 @@ const z = (i, e) => {
|
|
|
799
810
|
}
|
|
800
811
|
dateSelectedHandler(i) {
|
|
801
812
|
const e = i.detail;
|
|
802
|
-
this.selectedDateLabel = e ? e.toLocaleDateString(this.language, { dateStyle: "full" }) : `${
|
|
813
|
+
this.selectedDateLabel = e ? e.toLocaleDateString(this.language, { dateStyle: "full" }) : `${d.t("noDateSelected")}`;
|
|
803
814
|
}
|
|
804
815
|
cancelBookedEventErrorHandler(i) {
|
|
805
816
|
this.nylasSchedulerError.emit({ notification: { ...this.getErrorObject(i.detail.error) }, host: this.host });
|
|
@@ -821,7 +832,7 @@ const z = (i, e) => {
|
|
|
821
832
|
i.detail.type === "error" ? this.nylasSchedulerError.emit({ notification: { ...this.getErrorObject({ message: e }) }, host: this.host }) : this.nylasSchedulerInfo.emit({
|
|
822
833
|
notification: {
|
|
823
834
|
title: "Event is full",
|
|
824
|
-
category:
|
|
835
|
+
category: M.Component,
|
|
825
836
|
type: H.Info,
|
|
826
837
|
description: "The event you selected is full. Please try a different time.",
|
|
827
838
|
id: (/* @__PURE__ */ new Date()).getTime().toString(),
|
|
@@ -881,10 +892,10 @@ const z = (i, e) => {
|
|
|
881
892
|
checkIfSessionIdOrConfigIdExists() {
|
|
882
893
|
if (!this.sessionId && !this.refConfigId && !(this.slug && this.clientId)) {
|
|
883
894
|
let i = "";
|
|
884
|
-
return this.sessionId || (i +=
|
|
895
|
+
return this.sessionId || (i += d.t("sessionIdRequiredErrorMessage")), !this.sessionId && !this.refConfigId && !(this.slug && this.clientId) && (i = d.t("sessionIdRequiredErrorMessage") + " " + d.t("publicConfigErrorMessage")), this.nylasSchedulerError.emit({
|
|
885
896
|
notification: {
|
|
886
|
-
title:
|
|
887
|
-
category:
|
|
897
|
+
title: d.t("schedulingComponentErrorTitle"),
|
|
898
|
+
category: M.Component,
|
|
888
899
|
type: H.Error,
|
|
889
900
|
description: i,
|
|
890
901
|
id: (/* @__PURE__ */ new Date()).getTime().toString(),
|
|
@@ -898,10 +909,10 @@ const z = (i, e) => {
|
|
|
898
909
|
isTimeslotValid(i) {
|
|
899
910
|
return new Date(i.start_time) < /* @__PURE__ */ new Date() ? (this.nylasSchedulerError.emit({
|
|
900
911
|
notification: {
|
|
901
|
-
title:
|
|
902
|
-
category:
|
|
912
|
+
title: d.t("invalidTimeslotErrorTitle"),
|
|
913
|
+
category: M.Component,
|
|
903
914
|
type: H.Error,
|
|
904
|
-
description:
|
|
915
|
+
description: d.t("invalidTimeslotErrorMessage"),
|
|
905
916
|
id: (/* @__PURE__ */ new Date()).getTime().toString(),
|
|
906
917
|
ttl: "none"
|
|
907
918
|
},
|
|
@@ -928,44 +939,44 @@ const z = (i, e) => {
|
|
|
928
939
|
const { name: e, value: t } = i.detail;
|
|
929
940
|
if (e === "language") {
|
|
930
941
|
const a = j[t];
|
|
931
|
-
|
|
942
|
+
d.changeLanguage(a), (n = (o = this.stores) == null ? void 0 : o.scheduler) == null || n.set("selectedLanguage", a);
|
|
932
943
|
}
|
|
933
944
|
}
|
|
934
945
|
render() {
|
|
935
|
-
var
|
|
936
|
-
const i = this.mode === "app", e = (
|
|
937
|
-
this.selectedDateLabel = f && this.language ? ne(f.toLocaleDateString(this.language, { dateStyle: "full" })) : `${
|
|
946
|
+
var _, y, k, w, L, C, v, B, F, U, q, x;
|
|
947
|
+
const i = this.mode === "app", e = (_ = this.baseProvider) == null ? void 0 : _.getStore("scheduler"), t = e == null ? void 0 : e.get("eventInfo"), o = e == null ? void 0 : e.get("showBookingForm"), n = e == null ? void 0 : e.get("cancelledEventInfo"), a = e == null ? void 0 : e.get("cancelBookingId"), r = e == null ? void 0 : e.get("selectedTimeslot"), l = e == null ? void 0 : e.get("rescheduleBookingId"), c = e == null ? void 0 : e.get("organizerConfirmationBookingId"), m = e == null ? void 0 : e.get("rejectBookingId"), h = e == null ? void 0 : e.get("confirmedEventInfo"), g = (e == null ? void 0 : e.get("nylasBranding")) || this.nylasBranding, f = e == null ? void 0 : e.get("selectedDate"), b = (k = (y = e == null ? void 0 : e.get("configSettings")) == null ? void 0 : y.scheduler) == null ? void 0 : k.confirmation_redirect_url;
|
|
948
|
+
this.selectedDateLabel = f && this.language ? ne(f.toLocaleDateString(this.language, { dateStyle: "full" })) : `${d.t("noDateSelected")}`;
|
|
938
949
|
const p = Object.keys(Z).map((u) => ({
|
|
939
950
|
label: Z[u],
|
|
940
951
|
value: u
|
|
941
|
-
})),
|
|
952
|
+
})), I = (e == null ? void 0 : e.get("selectedLanguage")) || this.defaultLanguage || navigator.language || j.en;
|
|
942
953
|
if (i && (a || m) && !n)
|
|
943
|
-
return s(R, null, s(z, { version: this.version, nylasBranding: g, isLoading: this.isLoading, showNotification: this.showNotification }, s("div", { class: "cancel-flow-page", part: "cancel-flow-page" }, s("nylas-cancel-booking-form", { selectedTimeslot: r, cancelBookingId: a, rejectBookingId: m, exportparts: "ncbf, ncbf__icon, ncbf__title, ncbf__description, ncbf__reason-textarea, ncbf__button-cta, ncbf__button-outline, ncbf__card" }))), s("div", { class: "language-feedback-container" }, this.enableUserFeedback && s("button-component", { id: "report-issue", variant: "basic", onClick: (u) => this.onFeedbackClick(u) }, s("feedback-icon", null)), s("select-dropdown", { name: "language", searchPlaceholder:
|
|
944
|
-
if (i && d)
|
|
945
|
-
return s(R, null, s(z, null, s("div", { class: "manual-confirmation-page", part: "manual-confirmation-page" }, s("nylas-organizer-confirmation-card", { organizerConfirmationBookingId: d, exportparts: "nmcc, nmcc__title, nmcc__description, nmcc__button-cta, nmcc__button-outline" }))), s("div", { class: "language-feedback-container" }, this.enableUserFeedback && s("button-component", { id: "report-issue", variant: "basic", onClick: (u) => this.onFeedbackClick(u) }, s("feedback-icon", null)), s("select-dropdown", { name: "language", searchPlaceholder: h.t("search"), options: p, withChevron: !1, defaultSelectedOption: p.find((u) => u.value == v), exportparts: "sd_dropdown: nse__language-dropdown, sd_dropdown-button: nse__language-drop-button, sd_dropdown-content: nse__language-drop-content, sd_dropdown_label: nse__language-drop-label" }, s("span", { slot: "select-icon" }, s("translate-icon", { width: "20", height: "20" })))), this.showFeedbackModal && s("nylas-feedback-form", null));
|
|
946
|
-
if (i && n)
|
|
947
|
-
return s(R, null, s(z, { version: this.version, nylasBranding: g, isLoading: this.isLoading, showNotification: this.showNotification }, s("div", { class: "cancelled-event-page", part: "cancelled-event-page" }, s("nylas-cancelled-event-card", { cancelledEventInfo: n, exportparts: "ncec, ncec__icon, ncec__title, ncec__description, ncec__button-outline, ncec__card" }))), s("div", { class: "language-feedback-container" }, this.enableUserFeedback && s("button-component", { id: "report-issue", variant: "basic", onClick: (u) => this.onFeedbackClick(u) }, s("feedback-icon", null)), s("select-dropdown", { name: "language", searchPlaceholder: h.t("search"), options: p, withChevron: !1, defaultSelectedOption: p.find((u) => u.value == v), exportparts: "sd_dropdown: nse__language-dropdown, sd_dropdown-button: nse__language-drop-button, sd_dropdown-content: nse__language-drop-content, sd_dropdown_label: nse__language-drop-label" }, s("span", { slot: "select-icon" }, s("translate-icon", { width: "20", height: "20" })))), this.showFeedbackModal && s("nylas-feedback-form", null));
|
|
954
|
+
return s(R, null, s(z, { version: this.version, nylasBranding: g, isLoading: this.isLoading, showNotification: this.showNotification }, s("div", { class: "cancel-flow-page", part: "cancel-flow-page" }, s("nylas-cancel-booking-form", { selectedTimeslot: r, cancelBookingId: a, rejectBookingId: m, exportparts: "ncbf, ncbf__icon, ncbf__title, ncbf__description, ncbf__reason-textarea, ncbf__button-cta, ncbf__button-outline, ncbf__card" }))), s("div", { class: "language-feedback-container" }, this.enableUserFeedback && s("button-component", { id: "report-issue", variant: "basic", onClick: (u) => this.onFeedbackClick(u) }, s("feedback-icon", null)), s("select-dropdown", { name: "language", searchPlaceholder: d.t("search"), options: p, withChevron: !1, themeConfig: this.themeConfig, defaultSelectedOption: p.find((u) => u.value == I), exportparts: "sd_dropdown: nse__language-dropdown, sd_dropdown-button: nse__language-drop-button, sd_dropdown-content: nse__language-drop-content, sd_dropdown_label: nse__language-drop-label" }, s("span", { slot: "select-icon" }, s("translate-icon", { width: "20", height: "20" })))), this.showFeedbackModal && s("nylas-feedback-form", null));
|
|
948
955
|
if (i && c)
|
|
949
|
-
return s(R, null, s(z,
|
|
950
|
-
if (i &&
|
|
951
|
-
|
|
952
|
-
|
|
956
|
+
return s(R, null, s(z, null, s("div", { class: "manual-confirmation-page", part: "manual-confirmation-page" }, s("nylas-organizer-confirmation-card", { organizerConfirmationBookingId: c, exportparts: "nmcc, nmcc__title, nmcc__description, nmcc__button-cta, nmcc__button-outline" }))), s("div", { class: "language-feedback-container" }, this.enableUserFeedback && s("button-component", { id: "report-issue", variant: "basic", onClick: (u) => this.onFeedbackClick(u) }, s("feedback-icon", null)), s("select-dropdown", { name: "language", searchPlaceholder: d.t("search"), options: p, withChevron: !1, themeConfig: this.themeConfig, defaultSelectedOption: p.find((u) => u.value == I), exportparts: "sd_dropdown: nse__language-dropdown, sd_dropdown-button: nse__language-drop-button, sd_dropdown-content: nse__language-drop-content, sd_dropdown_label: nse__language-drop-label" }, s("span", { slot: "select-icon" }, s("translate-icon", { width: "20", height: "20" })))), this.showFeedbackModal && s("nylas-feedback-form", null));
|
|
957
|
+
if (i && n)
|
|
958
|
+
return s(R, null, s(z, { version: this.version, nylasBranding: g, isLoading: this.isLoading, showNotification: this.showNotification }, s("div", { class: "cancelled-event-page", part: "cancelled-event-page" }, s("nylas-cancelled-event-card", { cancelledEventInfo: n, exportparts: "ncec, ncec__icon, ncec__title, ncec__description, ncec__button-outline, ncec__card" }))), s("div", { class: "language-feedback-container" }, this.enableUserFeedback && s("button-component", { id: "report-issue", variant: "basic", onClick: (u) => this.onFeedbackClick(u) }, s("feedback-icon", null)), s("select-dropdown", { name: "language", searchPlaceholder: d.t("search"), options: p, withChevron: !1, themeConfig: this.themeConfig, defaultSelectedOption: p.find((u) => u.value == I), exportparts: "sd_dropdown: nse__language-dropdown, sd_dropdown-button: nse__language-drop-button, sd_dropdown-content: nse__language-drop-content, sd_dropdown_label: nse__language-drop-label" }, s("span", { slot: "select-icon" }, s("translate-icon", { width: "20", height: "20" })))), this.showFeedbackModal && s("nylas-feedback-form", null));
|
|
959
|
+
if (i && h)
|
|
960
|
+
return s(R, null, s(z, { version: this.version, nylasBranding: g, isLoading: this.isLoading, showNotification: this.showNotification }, s("div", { class: "cancelled-event-page", part: "confirmed-event-page" }, s("nylas-confirmed-event-card", { confirmedEventInfo: h, exportparts: "ncec, ncec__icon, ncec__title, ncec__description, ncec__button-outline, ncec__card" }))), s("div", { class: "language-feedback-container" }, this.enableUserFeedback && s("button-component", { id: "report-issue", variant: "basic", onClick: (u) => this.onFeedbackClick(u) }, s("feedback-icon", null)), s("select-dropdown", { name: "language", searchPlaceholder: d.t("search"), options: p, withChevron: !1, themeConfig: this.themeConfig, defaultSelectedOption: p.find((u) => u.value == I), exportparts: "sd_dropdown: nse__language-dropdown, sd_dropdown-button: nse__language-drop-button, sd_dropdown-content: nse__language-drop-content, sd_dropdown_label: nse__language-drop-label" }, s("span", { slot: "select-icon" }, s("translate-icon", { width: "20", height: "20" })))), this.showFeedbackModal && s("nylas-feedback-form", null));
|
|
961
|
+
if (i && t && b) {
|
|
962
|
+
const u = (w = this.bookingInfoConfirmed) == null ? void 0 : w.primaryParticipant, O = (L = this.bookingInfoConfirmed) == null ? void 0 : L.location, T = (C = this.bookingInfoConfirmed) == null ? void 0 : C.booking_ref, S = ((v = this.bookingInfoConfirmed) == null ? void 0 : v.additionalFields) || {};
|
|
963
|
+
if (this.bookingInfo && typeof ((B = this.bookingInfo) == null ? void 0 : B.additionalFields) < "u") {
|
|
953
964
|
const $ = this.bookingInfo.additionalFields;
|
|
954
965
|
Object.keys($).forEach((W) => {
|
|
955
|
-
!
|
|
966
|
+
!S[W] && ($ != null && $[W]) && (S[W] = $[W].value);
|
|
956
967
|
});
|
|
957
968
|
}
|
|
958
|
-
const
|
|
959
|
-
|
|
969
|
+
const D = (F = this.stores) == null ? void 0 : F.scheduler.get("selectedTimeslot"), J = (U = this.stores) == null ? void 0 : U.scheduler.get("selectedTimezone"), Y = (q = this.stores) == null ? void 0 : q.scheduler.get("selectedLanguage"), G = (x = this.stores) == null ? void 0 : x.scheduler.get("configSettings"), X = this.configurationId ? this.configurationId : G == null ? void 0 : G.configuration_id, ee = window.location.search, E = new URLSearchParams(ee);
|
|
970
|
+
E.set("booking_id", t.booking_id), u != null && u.name && E.set("name", u.name), u != null && u.email && E.set("email", u.email), D != null && D.start_time && E.set("start_time", (new Date(D.start_time).getTime() / 1e3).toString()), D != null && D.end_time && E.set("end_time", (new Date(D.end_time).getTime() / 1e3).toString()), J && E.set("tz", J), Y && E.set("language", Y), S && E.set("additional_values", JSON.stringify(S)), this.slug && E.set("page_slug", this.slug), X && E.set("config_id", X), O && E.set("location", O), T && E.set("booking_ref", T), this.redirectToCustomUrl(`${b}?${E.toString()}`);
|
|
960
971
|
return;
|
|
961
972
|
}
|
|
962
973
|
if (i && t)
|
|
963
|
-
return s(R, null, s(z, { version: this.version, nylasBranding: g, isLoading: this.isLoading, showNotification: this.showNotification }, s("div", { class: "booked-event-page", part: "booked-event-page ns_booked-event-page" }, s("nylas-booked-event-card", { selectedTimeslot: r, eventInfo: t, exportparts: "nbec, nbec__title, nbec__card, nbec__description, nbec__button-outline, nbec__cancel-cta, nbec__reschedule-cta" }))), s("div", { class: "language-feedback-container" }, this.enableUserFeedback && s("button-component", { id: "report-issue", variant: "basic", onClick: (u) => this.onFeedbackClick(u) }, s("feedback-icon", null)), s("select-dropdown", { name: "language", searchPlaceholder:
|
|
974
|
+
return s(R, null, s(z, { version: this.version, nylasBranding: g, isLoading: this.isLoading, showNotification: this.showNotification }, s("div", { class: "booked-event-page", part: "booked-event-page ns_booked-event-page" }, s("nylas-booked-event-card", { selectedTimeslot: r, eventInfo: t, exportparts: "nbec, nbec__title, nbec__card, nbec__description, nbec__button-outline, nbec__cancel-cta, nbec__reschedule-cta" }))), s("div", { class: "language-feedback-container" }, this.enableUserFeedback && s("button-component", { id: "report-issue", variant: "basic", onClick: (u) => this.onFeedbackClick(u) }, s("feedback-icon", null)), s("select-dropdown", { name: "language", searchPlaceholder: d.t("search"), options: p, withChevron: !1, themeConfig: this.themeConfig, defaultSelectedOption: p.find((u) => u.value == I), exportparts: "sd_dropdown: nse__language-dropdown, sd_dropdown-button: nse__language-drop-button, sd_dropdown-content: nse__language-drop-content, sd_dropdown_label: nse__language-drop-label" }, s("span", { slot: "select-icon" }, s("translate-icon", { width: "20", height: "20" })))), this.showFeedbackModal && s("nylas-feedback-form", null));
|
|
964
975
|
if (i && (!t || l) && !o) {
|
|
965
976
|
const u = this.host.querySelector('[slot="timeslot-picker-cta-label"]');
|
|
966
|
-
return s(R, null, s(z, { version: this.version, nylasBranding: g, isLoading: this.isLoading, showNotification: this.showNotification }, l && s(K, null, `${
|
|
977
|
+
return s(R, null, s(z, { version: this.version, nylasBranding: g, isLoading: this.isLoading, showNotification: this.showNotification }, l && s(K, null, `${d.t("rescheduleTitle")}`), s("div", { class: "select-date-page", part: "select-date-page ns_select-date-page" }, s("div", { class: "left-panel", part: "ns_left-panel" }, s("nylas-date-picker", { exportparts: "ndp, ndp__title, ndp__month-header, ndp__month-button, ndp__day, ndp__date, ndp__date--disabled, ndp__date--selected, ndp__date--current-day, ndp__date--current-month" }), s("nylas-locale-switch", { exportparts: "nls, nls__timezone, nls__timezone-dropdown, nls__timezone-drop-button, nls__timezone-drop-button-selected-label, nls__timezone-drop-content, nls__timezone-drop-label, nls__language, nls__language-dropdown, nls__language-drop-button, nls__language-drop-content, nls__language-drop-label" })), s("div", { class: `right-panel ${l ? "reschedule" : ""}`, part: `ns_right-panel ${l ? "ns_reschedule" : ""}` }, s("h2", { part: "ns_right-panel__title" }, s("calendar-icon", { part: "ns_right-panel__calendar-icon" }), s("span", { id: "selectedDate", part: "ns_right-panel__selected-date" }, this.selectedDateLabel)), s("nylas-timeslot-picker", { exportparts: "ntp, ntp__time-picker-wrapper, ntp__timeslots, ntp__timeslot, ntp__timeslot--selected, ntp__button-primary" }, u && s("span", { slot: "timeslot-picker-cta-label" }, s("slot", { name: "timeslot-picker-cta-label" })))))), this.enableUserFeedback && s("button-component", { id: "report-issue", variant: "basic", onClick: (O) => this.onFeedbackClick(O) }, s("feedback-icon", null)), this.showFeedbackModal && s("nylas-feedback-form", null));
|
|
967
978
|
}
|
|
968
|
-
return i && !t && o ? s(R, null, s(z, { version: this.version, nylasBranding: g, isLoading: this.isLoading, showNotification: this.showNotification }, l && s(K, null, `${
|
|
979
|
+
return i && !t && o ? s(R, null, s(z, { version: this.version, nylasBranding: g, isLoading: this.isLoading, showNotification: this.showNotification }, l && s(K, null, `${d.t("rescheduleTitle")}`), s("div", { class: "additional-data-page", part: "additional-data-page ns_additional-data-page" }, s("div", { class: "left-panel ns_left-panel", part: "ns_left-panel" }, s("div", { class: "wrapper", part: "ns_left-panel__wrapper" }, s("nylas-selected-event-card", { exportparts: "nsec, nsec__card, nsec__icon, nsec__date, nsec__time, nsec__timezone" }))), s("div", { class: `right-panel ${l ? "reschedule" : ""}`, part: `ns_right-panel ${l ? "ns_reschedule" : ""}` }, s("nylas-booking-form", { exportparts: "nbf, nbf__input-textfield, nbf__button-ghost, nbf__button-outline, nbf__button-primary, nbf__input-wrapper, nbf__checkbox-component, nbf__radio-button-group, nbf__textarea-component, nbf__dropdown, nbf__dropdown-button, nbf__dropdown-content" })))), s("div", { class: "language-feedback-container" }, this.enableUserFeedback && s("button-component", { id: "report-issue", variant: "basic", onClick: (u) => this.onFeedbackClick(u) }, s("feedback-icon", null)), s("select-dropdown", { name: "language", searchPlaceholder: d.t("search"), options: p, withChevron: !1, themeConfig: this.themeConfig, defaultSelectedOption: p.find((u) => u.value == I), exportparts: "sd_dropdown: nse__language-dropdown, sd_dropdown-button: nse__language-drop-button, sd_dropdown-content: nse__language-drop-content, sd_dropdown_label: nse__language-drop-label" }, s("span", { slot: "select-icon" }, s("translate-icon", { width: "20", height: "20" })))), this.showFeedbackModal && s("nylas-feedback-form", null)) : s(R, null, s("slot", null));
|
|
969
980
|
}
|
|
970
981
|
get host() {
|
|
971
982
|
return ie(this);
|