@nylas/react 1.2.0 → 1.3.0
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-0f0cd6d8.cjs +1 -0
- package/dist/add-circle-icon.entry-d2b7178c.js +15 -0
- package/dist/{archive-icon.entry-50c4b134.js → archive-icon.entry-602d3c58.js} +1 -1
- package/dist/{archive-icon.entry-718a1225.cjs → archive-icon.entry-ec25f93a.cjs} +1 -1
- package/dist/{arrow-icon.entry-ca9625d3.cjs → arrow-icon.entry-7bcb6442.cjs} +1 -1
- package/dist/{arrow-icon.entry-53337688.js → arrow-icon.entry-d4dd38b3.js} +1 -1
- package/dist/{bold-icon.entry-c6109b88.js → bold-icon.entry-5fc41386.js} +1 -1
- package/dist/{bold-icon.entry-36e679f1.cjs → bold-icon.entry-fc1d34a6.cjs} +1 -1
- package/dist/{button-component_2.entry-a1b8cd03.cjs → button-component_2.entry-d23be43d.cjs} +1 -1
- package/dist/{button-component_2.entry-0a06b0c4.js → button-component_2.entry-d62ae520.js} +1 -1
- package/dist/{calendar-agenda-fill-icon_54.entry-e4d8ab10.js → calendar-agenda-fill-icon_54.entry-1a42103a.js} +96 -98
- package/dist/{calendar-agenda-fill-icon_54.entry-5b185e75.cjs → calendar-agenda-fill-icon_54.entry-95ccb99e.cjs} +3 -3
- package/dist/{calendar-cancel-icon.entry-813a8330.js → calendar-cancel-icon.entry-1566c286.js} +1 -1
- package/dist/{calendar-cancel-icon.entry-22862d8c.cjs → calendar-cancel-icon.entry-bf9fc719.cjs} +1 -1
- package/dist/{calendar-check-icon_2.entry-2ca25094.cjs → calendar-check-icon_2.entry-4c3e78a6.cjs} +1 -1
- package/dist/{calendar-check-icon_2.entry-79d381ce.js → calendar-check-icon_2.entry-82407a92.js} +1 -1
- package/dist/{calendar-icon.entry-78bb4f9b.cjs → calendar-icon.entry-359c064c.cjs} +1 -1
- package/dist/{calendar-icon.entry-d52951b0.js → calendar-icon.entry-c3c23413.js} +1 -1
- package/dist/{checkbox-component_2.entry-1219f0cf.js → checkbox-component_2.entry-97e97789.js} +1 -1
- package/dist/{checkbox-component_2.entry-a6114846.cjs → checkbox-component_2.entry-f974e789.cjs} +1 -1
- package/dist/{chevron-icon_3.entry-d8f195dc.cjs → chevron-icon_3.entry-2453084c.cjs} +1 -1
- package/dist/{chevron-icon_3.entry-82878ccf.js → chevron-icon_3.entry-a6189c37.js} +1 -1
- package/dist/{clock-icon_4.entry-e081ccca.cjs → clock-icon_4.entry-5162dfec.cjs} +1 -1
- package/dist/{clock-icon_4.entry-9ab4bc41.js → clock-icon_4.entry-ad679142.js} +1 -1
- package/dist/close-icon.entry-2c6cdf35.js +15 -0
- package/dist/close-icon.entry-38dc2638.cjs +1 -0
- package/dist/{copy-icon.entry-9d6e0f48.js → copy-icon.entry-6630ce5a.js} +1 -1
- package/dist/{copy-icon.entry-9c6f38c2.cjs → copy-icon.entry-79df1d0e.cjs} +1 -1
- package/dist/{delete-icon.entry-fd8dc119.js → delete-icon.entry-716f906c.js} +1 -1
- package/dist/{delete-icon.entry-6ec9c80d.cjs → delete-icon.entry-f9a265b6.cjs} +1 -1
- package/dist/{document-refresh-icon.entry-bea78baf.cjs → document-refresh-icon.entry-bb91822a.cjs} +1 -1
- package/dist/{document-refresh-icon.entry-2b531e97.js → document-refresh-icon.entry-fa775295.js} +1 -1
- package/dist/{feedbackSync-b56b29ed-a7e9f258.js → feedbackSync-adc893c2-5965d5ba.js} +1 -1
- package/dist/{feedbackSync-b56b29ed-cdcec5be.cjs → feedbackSync-adc893c2-70d06afc.cjs} +1 -1
- package/dist/{folder-icon.entry-485465be.cjs → folder-icon.entry-82a02de7.cjs} +1 -1
- package/dist/{folder-icon.entry-6a43630e.js → folder-icon.entry-9cf7590f.js} +1 -1
- package/dist/{forward-icon.entry-a1af9122.cjs → forward-icon.entry-034ec3be.cjs} +1 -1
- package/dist/{forward-icon.entry-514ea4a8.js → forward-icon.entry-ebd5e108.js} +1 -1
- package/dist/{globe-icon.entry-adcff451.js → globe-icon.entry-48837e22.js} +1 -1
- package/dist/{globe-icon.entry-970082a4.cjs → globe-icon.entry-b67c68d5.cjs} +1 -1
- package/dist/{google-logo-icon_4.entry-2b68fe81.js → google-logo-icon_4.entry-819d7d0d.js} +142 -128
- package/dist/{google-logo-icon_4.entry-21cb4b95.cjs → google-logo-icon_4.entry-b637470a.cjs} +1 -1
- package/dist/{inbox-icon.entry-94507d27.cjs → inbox-icon.entry-7f91d971.cjs} +1 -1
- package/dist/{inbox-icon.entry-d3e42f82.js → inbox-icon.entry-c611c154.js} +1 -1
- package/dist/{index-9dc1bd32.js → index-72501df0.js} +2623 -2554
- package/dist/{index-bec58f1d.cjs → index-92ba1b80.cjs} +28 -28
- package/dist/{index.es-c7ca1bad-5652d50c.cjs → index.es-28b1b2ec-595c0513.cjs} +1 -1
- package/dist/{index.es-c7ca1bad-38475209.js → index.es-28b1b2ec-5a87db22.js} +1 -1
- package/dist/{info-icon_2.entry-3b5a2c7f.js → info-icon_2.entry-4ad69286.js} +1 -1
- package/dist/{info-icon_2.entry-e23f3ffd.cjs → info-icon_2.entry-4c70ab61.cjs} +1 -1
- package/dist/{input-color-picker.entry-b4ea90c5.cjs → input-color-picker.entry-46bf04e1.cjs} +1 -1
- package/dist/{input-color-picker.entry-9bc48bd3.js → input-color-picker.entry-4e5760ce.js} +1 -1
- package/dist/{input-component.entry-e567ec08.cjs → input-component.entry-1019ce99.cjs} +1 -1
- package/dist/{input-component.entry-ebae3a8a.js → input-component.entry-dca1013f.js} +1 -1
- package/dist/{input-dropdown.entry-597cd5a8.cjs → input-dropdown.entry-e535fb5e.cjs} +1 -1
- package/dist/{input-dropdown.entry-1f704009.js → input-dropdown.entry-f14c59e7.js} +1 -1
- package/dist/{italic-icon.entry-08593dd0.js → italic-icon.entry-2ab53839.js} +1 -1
- package/dist/{italic-icon.entry-8f614353.cjs → italic-icon.entry-726cc194.cjs} +1 -1
- package/dist/{multi-select-dropdown.entry-eb978e22.cjs → multi-select-dropdown.entry-6820d249.cjs} +1 -1
- package/dist/{multi-select-dropdown.entry-5f1c73f3.js → multi-select-dropdown.entry-a097d3cb.js} +1 -1
- package/dist/{nylas-booked-event-card_12.entry-73785c5c.cjs → nylas-booked-event-card_12.entry-c684905b.cjs} +1 -1
- package/dist/{nylas-booked-event-card_12.entry-c4043d8f.js → nylas-booked-event-card_12.entry-ccd85ff4.js} +49 -49
- package/dist/{nylas-form-card.entry-1540207c.cjs → nylas-form-card.entry-8eb47f3d.cjs} +1 -1
- package/dist/{nylas-form-card.entry-80688e35.js → nylas-form-card.entry-afdfee47.js} +2 -2
- package/dist/{nylas-if-state.entry-037d0454.js → nylas-if-state.entry-7caad39f.js} +2 -2
- package/dist/{nylas-if-state.entry-e5155b5b.cjs → nylas-if-state.entry-be7978de.cjs} +1 -1
- package/dist/{nylas-login.entry-b3d73ab9.cjs → nylas-login.entry-bce4f689.cjs} +1 -1
- package/dist/{nylas-login.entry-d157a6ed.js → nylas-login.entry-dcf85f93.js} +2 -2
- package/dist/{nylas-provider.entry-cf4b8b57.js → nylas-provider.entry-97882e4b.js} +4 -4
- package/dist/{nylas-provider.entry-884ba204.cjs → nylas-provider.entry-f02017da.cjs} +1 -1
- package/dist/{nylas-scheduler-editor.entry-6f76d0d5.cjs → nylas-scheduler-editor.entry-cc6f4060.cjs} +2 -2
- package/dist/{nylas-scheduler-editor.entry-e731ca4a.js → nylas-scheduler-editor.entry-dcfdd6bf.js} +3 -3
- package/dist/{nylas-scheduling.entry-86b18d85.js → nylas-scheduling.entry-2b842e93.js} +41 -40
- package/dist/nylas-scheduling.entry-e0e9c8e8.cjs +1 -0
- package/dist/{nylas-time-window-picker.entry-393e855b.js → nylas-time-window-picker.entry-96f5fe9a.js} +1 -1
- package/dist/{nylas-time-window-picker.entry-f9687046.cjs → nylas-time-window-picker.entry-a8780f2e.cjs} +1 -1
- package/dist/{person-icon.entry-1b5dcd2e.cjs → person-icon.entry-2f8e00fd.cjs} +1 -1
- package/dist/{person-icon.entry-b5ccb1f4.js → person-icon.entry-3ec67feb.js} +1 -1
- package/dist/{play-icon.entry-3f2e7e31.cjs → play-icon.entry-1abf79e9.cjs} +1 -1
- package/dist/{play-icon.entry-5e51d961.js → play-icon.entry-a840bdca.js} +1 -1
- package/dist/react.cjs +1 -1
- package/dist/react.js +1 -1
- package/dist/{refresh-icon.entry-9beaa8e1.js → refresh-icon.entry-11fcb673.js} +1 -1
- package/dist/{refresh-icon.entry-3d241ffd.cjs → refresh-icon.entry-af7f54b4.cjs} +1 -1
- package/dist/{register-component-3444af44-94783766.js → register-component-75f530bc-0e4e3d7a.js} +1 -1
- package/dist/{register-component-3444af44-890ac950.cjs → register-component-75f530bc-61b6f2dd.cjs} +1 -1
- package/dist/{reply-all-icon.entry-6b55d3b3.js → reply-all-icon.entry-5c8b3356.js} +1 -1
- package/dist/{reply-all-icon.entry-a0fcbf30.cjs → reply-all-icon.entry-cc2ad940.cjs} +1 -1
- package/dist/{reply-icon.entry-c7d0d967.cjs → reply-icon.entry-840acade.cjs} +1 -1
- package/dist/{reply-icon.entry-c709b46f.js → reply-icon.entry-d048736f.js} +1 -1
- package/dist/{scheduler-config-store-ed4a8dfd-ba68cc09.cjs → scheduler-config-store-ed4a8dfd-161a3efd.cjs} +1 -1
- package/dist/{scheduler-config-store-ed4a8dfd-13c1c187.js → scheduler-config-store-ed4a8dfd-f74e58ae.js} +1 -1
- package/dist/{scheduler-store-ecd15be2-d2ef4ac2.js → scheduler-store-d84b82a0-11faba86.js} +2 -2
- package/dist/{scheduler-store-ecd15be2-8f7d171f.cjs → scheduler-store-d84b82a0-7a7fe186.cjs} +1 -1
- package/dist/{sent-icon.entry-9083bca9.cjs → sent-icon.entry-987760ce.cjs} +1 -1
- package/dist/{sent-icon.entry-b65083f4.js → sent-icon.entry-fd3b9ad9.js} +1 -1
- package/dist/{spam-icon.entry-e6c1a82a.cjs → spam-icon.entry-3ce4f9fc.cjs} +1 -1
- package/dist/{spam-icon.entry-120eca46.js → spam-icon.entry-4665415c.js} +1 -1
- package/dist/{star-icon.entry-e3563c0b.js → star-icon.entry-0f446ac7.js} +1 -1
- package/dist/{star-icon.entry-efbc2679.cjs → star-icon.entry-a3ba4703.cjs} +1 -1
- package/dist/{stop-icon.entry-ab5cf663.js → stop-icon.entry-72c964b2.js} +1 -1
- package/dist/{stop-icon.entry-8d07d719.cjs → stop-icon.entry-9c13e00a.cjs} +1 -1
- package/dist/{textarea-component.entry-a0ef9f03.js → textarea-component.entry-d414e219.js} +1 -1
- package/dist/{textarea-component.entry-93be4a65.cjs → textarea-component.entry-ff04b5fa.cjs} +1 -1
- package/dist/{time-period-selector.entry-16f96af9.cjs → time-period-selector.entry-2ce3347a.cjs} +1 -1
- package/dist/{time-period-selector.entry-2a86f48f.js → time-period-selector.entry-53edc0ba.js} +1 -1
- package/dist/{translate-icon.entry-d632b37b.js → translate-icon.entry-84a78b9a.js} +1 -1
- package/dist/{translate-icon.entry-868948d3.cjs → translate-icon.entry-9bab13ad.cjs} +1 -1
- package/dist/{trash-fill-icon.entry-eeab235e.js → trash-fill-icon.entry-2881a44c.js} +1 -1
- package/dist/{trash-fill-icon.entry-88dfffbc.cjs → trash-fill-icon.entry-84f52290.cjs} +1 -1
- package/dist/{underline-icon.entry-65e42dcf.js → underline-icon.entry-23eca319.js} +1 -1
- package/dist/{underline-icon.entry-35430c19.cjs → underline-icon.entry-5a8410ef.cjs} +1 -1
- package/dist/{warning-icon.entry-e7714a43.cjs → warning-icon.entry-1966042d.cjs} +1 -1
- package/dist/{warning-icon.entry-bab6d190.js → warning-icon.entry-abf9e5dc.js} +1 -1
- package/package.json +3 -3
- package/dist/add-circle-icon_2.entry-52cc3933.cjs +0 -1
- package/dist/add-circle-icon_2.entry-5ea903bf.js +0 -25
- package/dist/nylas-scheduling.entry-c8ee9a2a.cjs +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as k, c as h, d, q as U, h as a, i as c, k as K, H as
|
|
2
|
-
import { R as x } from "./register-component-
|
|
1
|
+
import { r as k, c as h, d, q as U, h as a, i as c, k as K, H as g, g as _, s as X, t as fe, j as Y, v as he, w as me, x as E, y as be, z as pe, A as j, C as ue, F as ge } from "./index-72501df0.js";
|
|
2
|
+
import { R as x } from "./register-component-75f530bc-0e4e3d7a.js";
|
|
3
3
|
import { T as L, a as Q, b as J } from "./constants-35df11e7-b37e3406.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import "react-dom";
|
|
@@ -63,13 +63,13 @@ const ee = class {
|
|
|
63
63
|
this.host.style.setProperty(`${t}`, n);
|
|
64
64
|
}
|
|
65
65
|
render() {
|
|
66
|
-
var n, s, o, i, r, l,
|
|
66
|
+
var n, s, o, i, r, l, u, m, f, p, b, v, w, T, C, y;
|
|
67
67
|
const e = (n = this.configSettings) == null ? void 0 : n.booking_type, t = e && e !== "booking";
|
|
68
|
-
return a(
|
|
68
|
+
return a(g, { key: "5c0d6ded922007d327b55a3536338a82302ca0be", part: "nbec" }, a("div", { key: "a0d3c60605fbf54303527bc6001477db946eb560", class: "nylas-booked-event-card" }, a("div", { key: "043a3aead5724fd56c3075d60ff0cfe470e2d551", class: "booked-event-timezone" }, a("globe-icon", { key: "f21ee01ed85b02982e013d6731bffd8a20ef0ad9" }), L[this.selectedTimezone]), a("div", { key: "5408744046d0b755044db2c88f15dfeed1ac0cd1", class: "event-card-wrapper", part: "nbec__card" }, a("div", { key: "c1e352e8395aa35c9faadadf10a82f04b10cf88e", class: "calendar-icon" }, a("calendar-check-icon", { key: "9e4464eb5a88dafa35340d8441bfc6570c880151" })), a("div", { key: "2265e9737ed82f085e348a6bde53dc68d7d7fc94", class: "booked-event-header" }, a("h2", { key: "30ba50948f9de4ef3f47c72547478c81870d85b2", slot: "card-title", part: "nbec__title" }, this.rescheduleBookingId && !this.isLoading ? `${c.t("bookingRescheduled")}` : t && !this.isLoading ? `${c.t("bookingSent")}` : `${c.t("bookingConfirmed")}`, "!"), a("div", { key: "8ae1ffd38656334a233bca8eb7b25b6e7c03c937", class: "card-description", part: "nbec__description" }, t ? c.t("bookingSentDescription") : a("span", null, c.t("bookingConfirmedDescription")))), a("div", { key: "cf6a84c9dc87e923c21468561a7601f476fd85a1", class: "booking-date-time" }, a("checkmark-circle-icon", { key: "7e42ae42fbe6c87a21f2a6031796132a5562d882" }), a("h3", { key: "d92ede4d9f33a3dd461a0e14c4965e614c23f075" }, c.t("bookingDateAndTimeHeader")), a("p", { key: "1da0c2ff11644c6718e8ca512baffbc0affb3fd5" }, (s = this.selectedTimeslot) != null && s.start_time ? K(new Date((o = this.selectedTimeslot) == null ? void 0 : o.start_time).toLocaleDateString(Q[this.selectedLanguage], { dateStyle: "full" })) : "-", " ", a("br", { key: "167cd8c78e97697766713811549588e9d6fd3fcb" }), this.startTime, " - ", this.endTime)), a("div", { key: "61d35600d07d7ffccbce3f3aa93a3bfed385637e", class: "booking-participants" }), !t && a("div", { class: "button-container" }, a("div", { class: {
|
|
69
69
|
footer: !0,
|
|
70
|
-
"no-footer": ((r = (i = this.configSettings) == null ? void 0 : i.scheduler) == null ? void 0 : r.hide_cancellation_options) && ((
|
|
70
|
+
"no-footer": ((r = (i = this.configSettings) == null ? void 0 : i.scheduler) == null ? void 0 : r.hide_cancellation_options) && ((u = (l = this.configSettings) == null ? void 0 : l.scheduler) == null ? void 0 : u.hide_rescheduling_options) || ((m = this.configSettings) == null ? void 0 : m.booking_type) === "organizer-confirmation",
|
|
71
71
|
"no-template-cols": ((p = (f = this.configSettings) == null ? void 0 : f.scheduler) == null ? void 0 : p.hide_cancellation_options) || ((v = (b = this.configSettings) == null ? void 0 : b.scheduler) == null ? void 0 : v.hide_rescheduling_options)
|
|
72
|
-
} }, !((
|
|
72
|
+
} }, !((T = (w = this.configSettings) == null ? void 0 : w.scheduler) != null && T.hide_cancellation_options) && a("button-component", { variant: "destructive", onClick: this.handleCancelBookingButtonClicked, part: "nbec__button-outline nbec__cancel-cta" }, `${c.t("cancelBookingButton")}`), !((y = (C = this.configSettings) == null ? void 0 : C.scheduler) != null && y.hide_rescheduling_options) && a("button-component", { variant: "basic", onClick: this.handleRescheduleButtonClicked, part: "nbec__button-outline nbec__reschedule-cta" }, `${c.t("rescheduleBookingButton")}`))))));
|
|
73
73
|
}
|
|
74
74
|
get host() {
|
|
75
75
|
return _(this);
|
|
@@ -153,11 +153,11 @@ const S = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-
|
|
|
153
153
|
}, this.handleBackButtonClicked = (t) => {
|
|
154
154
|
t.preventDefault(), this.backButtonLoading = !0, this.backButtonClicked.emit();
|
|
155
155
|
}, this.bookButtonClickedHandler = async (t) => {
|
|
156
|
-
var l,
|
|
156
|
+
var l, u, m, f, p, b, v, w, T;
|
|
157
157
|
if (t.preventDefault(), this.bookingFormSubmitted.emit().defaultPrevented)
|
|
158
158
|
return;
|
|
159
159
|
d("nylas-booking-form", "bookButtonClickedHandler", this.bookingInfo);
|
|
160
|
-
const s = this.name || ((
|
|
160
|
+
const s = this.name || ((u = (l = this.bookingInfo) == null ? void 0 : l.primaryParticipant) == null ? void 0 : u.name), o = this.email || ((f = (m = this.bookingInfo) == null ? void 0 : m.primaryParticipant) == null ? void 0 : f.email);
|
|
161
161
|
if (!s || s === "") {
|
|
162
162
|
this.isNameValid = !1, this.validationError.name = c.t("fieldRequired", { field: c.t("name") }) || "Name is required", this.bookingFormError.emit({
|
|
163
163
|
title: "Booking form error",
|
|
@@ -196,7 +196,7 @@ const S = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-
|
|
|
196
196
|
(p = this.bookingInfo) != null && p.guests && (i = (b = this.bookingInfo) == null ? void 0 : b.guests);
|
|
197
197
|
const r = {};
|
|
198
198
|
if ((v = this.bookingInfo) != null && v.additionalFields) {
|
|
199
|
-
const C = ((
|
|
199
|
+
const C = ((T = (w = this.configSettings) == null ? void 0 : w.scheduler) == null ? void 0 : T.additional_fields) || {};
|
|
200
200
|
Object.entries(this.bookingInfo.additionalFields).forEach(([y, B]) => {
|
|
201
201
|
y in C && (r[y] = B.value);
|
|
202
202
|
});
|
|
@@ -288,8 +288,8 @@ const S = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-
|
|
|
288
288
|
this.updateAdditionalFields(e.detail.name, e.detail.value);
|
|
289
289
|
}
|
|
290
290
|
render() {
|
|
291
|
-
var e, t, n, s, o, i, r, l,
|
|
292
|
-
return a(
|
|
291
|
+
var e, t, n, s, o, i, r, l, u;
|
|
292
|
+
return a(g, { key: "c0b87ead82e2d0c32de6f8b21c843c41aef053d5" }, a("form", { key: "7c2eb7bb085e4b26566147a607258382e8fba216", onSubmit: (m) => this.bookButtonClickedHandler(m), noValidate: !0 }, a("div", { key: "f9e63b09939bd160f7e32c0aeec4677cb8e075ea", class: "nylas-booking-form", part: "nbf" }, a("div", { key: "a864c6847043c4210bfa4cc9ac701b6824b93141", class: "input-wrapper", part: "nbf__input-wrapper" }, a("input-component", { key: "d73094b1ef71b938c036c6e2bfad84d91b64d0b3", label: c.t("name"), name: "name", id: "name", defaultValue: ((t = (e = this.bookingInfo) == null ? void 0 : e.primaryParticipant) == null ? void 0 : t.name) || this.name, placeholder: c.t("namePlaceholder"), type: "text", required: !0, requiredError: c.t("fieldRequired", { field: c.t("name") }), patternError: c.t("invalidInputFormat", { field: c.t("name") }), part: "nbf__input-textfield" })), a("div", { key: "50fcdaeef2f68847cec3a3768b3cf1dbc7332594", class: "input-wrapper", part: "nbf__input-wrapper" }, a("input-component", { key: "99146fd92e97eef620361282309cda149821c27e", label: c.t("email"), name: "email", id: "email", pattern: S, defaultValue: ((s = (n = this.bookingInfo) == null ? void 0 : n.primaryParticipant) == null ? void 0 : s.email) || this.email, placeholder: c.t("emailPlaceholder"), type: "email", required: !0, requiredError: c.t("fieldRequired", { field: c.t("email") }), patternError: c.t("invalidInputFormat", { field: c.t("email") }), part: "nbf__input-textfield" })), ((i = (o = this.configSettings) == null ? void 0 : o.scheduler) == null ? void 0 : i.hide_additional_guests) !== !0 && a("div", { class: "input-wrapper", part: "nbf__input-wrapper" }, this.guestEmails.map((m, f) => a("div", { class: "input-wrapper button-wrapper" }, a("label", { class: {
|
|
293
293
|
error: !!this.guestEmailErrors[f]
|
|
294
294
|
} }, c.t("guestEmail")), a("div", { class: "guest-email-input" }, a("input", { type: "email", id: `guest-email-${f}`, maxLength: 100, class: {
|
|
295
295
|
"guest-email": !0,
|
|
@@ -303,9 +303,9 @@ const S = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-
|
|
|
303
303
|
} }), a("button-component", { variant: "basic", tooltip: "Remove guest", onClick: (p) => this.removeGuestButtonClickHandler(p, f), class: {
|
|
304
304
|
"remove-guest": !0,
|
|
305
305
|
error: !!this.guestEmailErrors[f]
|
|
306
|
-
} }, a("close-icon", null))), a("p", { class: "help-text" }, this.guestEmailErrors[f]))), a("button-component", { class: "add-guest", variant: "invisible", part: "nbf__button-ghost", onClick: (m) => this.addGuestButtonClickedHandler(m) }, a("div", { class: "button-content" }, a("add-circle-icon", { slot: "icon" }), this.guestEmails.length > 0 ? `${c.t("addAnotherGuest")}` : `${c.t("addGuest")}`))), (
|
|
307
|
-
var w,
|
|
308
|
-
const f = m[1], p = f.label, b = m[0], v = ((C = (
|
|
306
|
+
} }, a("close-icon", null))), a("p", { class: "help-text" }, this.guestEmailErrors[f]))), a("button-component", { class: "add-guest", variant: "invisible", part: "nbf__button-ghost", onClick: (m) => this.addGuestButtonClickedHandler(m) }, a("div", { class: "button-content" }, a("add-circle-icon", { slot: "icon" }), this.guestEmails.length > 0 ? `${c.t("addAnotherGuest")}` : `${c.t("addGuest")}`))), (u = Object.entries(((l = (r = this.configSettings) == null ? void 0 : r.scheduler) == null ? void 0 : l.additional_fields) || {})) == null ? void 0 : u.sort((m, f) => m[1].order - f[1].order).map((m) => {
|
|
307
|
+
var w, T, C, y, B, W;
|
|
308
|
+
const f = m[1], p = f.label, b = m[0], v = ((C = (T = (w = this.bookingInfo) == null ? void 0 : w.additionalFields) == null ? void 0 : T[b]) == null ? void 0 : C.value) || "";
|
|
309
309
|
switch (f.type) {
|
|
310
310
|
case "dropdown":
|
|
311
311
|
return a("div", { class: "input-wrapper", part: "nbf__input-wrapper" }, a("select-dropdown", { label: p, name: b, id: b, withSearch: !1, defaultSelectedOption: v ? { value: v, label: v } : void 0, options: (y = f.options) == null ? void 0 : y.map((D) => ({ value: D, label: D })), required: f.required, exportparts: "sd_dropdown: nbf__dropdown, sd_dropdown-button: nbf__dropdown-button, sd_dropdown-content: nbf__dropdown-content" }));
|
|
@@ -367,8 +367,8 @@ xe([
|
|
|
367
367
|
F("design:returntype", void 0)
|
|
368
368
|
], te.prototype, "render", null);
|
|
369
369
|
te.style = _e;
|
|
370
|
-
const we = ':host{--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;display:block;width:400px;font-family:var(--nylas-font-family)}.nylas-cancel-booking-form{display:flex;align-items:center;flex-direction:column;background-color:var(--nylas-base-0);color:var(--nylas-base-800);border-radius:var(--nylas-border-radius-2x);padding:1.5rem;position:relative;box-shadow:0px 1px 4px rgba(0, 0, 0, 0.1), 0px 3px 6px rgba(0, 0, 0, 0.06)}.nylas-cancel-booking-form form{width:100%}.nylas-cancel-booking-form__title{font-size:18px;font-weight:600;margin-bottom:0;color:var(--nylas-base-900)}.nylas-cancel-booking-form__description{font-size:1rem;font-style:normal;font-weight:400;line-height:140%;color:var(--nylas-base-600);padding-bottom:1.25rem}.nylas-cancel-booking-form__calendar-icon{width:3rem;height:3rem;border-radius:50%;position:absolute;top:-1.25rem;left:50%;transform:translateX(-50%);background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200)}calendar-cancel-icon{display:flex;align-items:center;justify-content:center;height:100%}.footer{display:grid;grid-template-columns:1fr 1fr;width:100%;padding-top:1.25rem;gap:1rem;border-top:1px solid var(--nylas-base-200);margin-top:1.25rem}',
|
|
371
|
-
var
|
|
370
|
+
const we = ':host{--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;display:block;width:400px;font-family:var(--nylas-font-family)}.nylas-cancel-booking-form{display:flex;align-items:center;flex-direction:column;background-color:var(--nylas-base-0);color:var(--nylas-base-800);border-radius:var(--nylas-border-radius-2x);padding:1.5rem;position:relative;box-shadow:0px 1px 4px rgba(0, 0, 0, 0.1), 0px 3px 6px rgba(0, 0, 0, 0.06)}.nylas-cancel-booking-form form{width:100%}.nylas-cancel-booking-form__title{font-size:18px;font-weight:600;margin-bottom:0;color:var(--nylas-base-900)}.nylas-cancel-booking-form__description{font-size:1rem;font-style:normal;font-weight:400;line-height:140%;color:var(--nylas-base-600);padding-bottom:1.25rem}.nylas-cancel-booking-form__calendar-icon{width:3rem;height:3rem;border-radius:50%;position:absolute;top:-1.25rem;left:50%;transform:translateX(-50%);background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200)}calendar-cancel-icon{display:flex;align-items:center;justify-content:center;height:100%}.footer{display:grid;grid-template-columns:1fr 1fr;width:100%;padding-top:1.25rem;gap:1rem;border-top:1px solid var(--nylas-base-200);margin-top:1.25rem}', Te = we;
|
|
371
|
+
var Ee = function(e, t, n, s) {
|
|
372
372
|
var o = arguments.length, i = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, n) : s, r;
|
|
373
373
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
374
374
|
i = Reflect.decorate(e, t, n, s);
|
|
@@ -386,13 +386,13 @@ const ne = class {
|
|
|
386
386
|
k(this, e), this.goBackButtonClicked = h(this, "goBackButtonClicked", 7), this.cancelBookingFormSubmitted = h(this, "cancelBookingFormSubmitted", 7), this.triggerValidation = h(this, "triggerValidation", 7), this.cancelBookedEventError = h(this, "cancelBookedEventError", 7), this.cancelBookingFormError = h(this, "cancelBookingFormError", 7), this.handleGoBackClicked = () => {
|
|
387
387
|
this.goBackButtonClicked.emit();
|
|
388
388
|
}, this.handleSubmitCancelBooking = (s) => {
|
|
389
|
-
var r, l,
|
|
389
|
+
var r, l, u;
|
|
390
390
|
if (this.triggerValidation.emit({}), s.preventDefault(), !this.cancellationReason) {
|
|
391
391
|
this.cancellationError = c.t("cancellationErrorMessage"), this.cancelBookingFormError.emit({ title: c.t("cancelBokingFormError"), description: c.t("cancellationErrorMessage") });
|
|
392
392
|
return;
|
|
393
393
|
}
|
|
394
394
|
const o = (l = (r = this.configSettings) == null ? void 0 : r.scheduler) == null ? void 0 : l.min_cancellation_notice;
|
|
395
|
-
if (this.selectedTimeslot && o && new Date((
|
|
395
|
+
if (this.selectedTimeslot && o && new Date((u = this.selectedTimeslot) == null ? void 0 : u.start_time).getTime() - o * 60 * 1e3 < (/* @__PURE__ */ new Date()).getTime()) {
|
|
396
396
|
this.cancelBookedEventError.emit({
|
|
397
397
|
error: {
|
|
398
398
|
title: c.t("cancellationErrorTitle"),
|
|
@@ -437,7 +437,7 @@ const ne = class {
|
|
|
437
437
|
}
|
|
438
438
|
render() {
|
|
439
439
|
var e, t;
|
|
440
|
-
return a(
|
|
440
|
+
return a(g, { key: "a28fc058c46d2d16bc902bc3660f50316c57dece", part: "ncbf" }, a("div", { key: "84f2ba1baba4acba17364298b40dd6758f992476", class: "nylas-cancel-booking-form", part: "ncbf__card" }, a("div", { key: "3d3a21bbfafb1f6e5729dba6d2cce61c09d55d7f", class: "nylas-cancel-booking-form__calendar-icon", part: "ncbf__icon" }, a("calendar-cancel-icon", { key: "4da0905147c24eca01cf4d6e008b20db62fe1172" })), a("h3", { key: "dea90396dfe208b42228f5627421f909c94a6d3d", class: "nylas-cancel-booking-form__title", part: "ncbf__title" }, c.t("cancelBookingTitle")), a("div", { key: "4e7223a576a56dbd704b0f85b05928c4075eaa10", class: "nylas-cancel-booking-form__description", part: "ncbf__description" }, (t = (e = this.configSettings) == null ? void 0 : e.scheduler) != null && t.cancellation_policy ? this.cancellationPolicy : `${c.t("cancelBookingMessage")}`), a("form", { key: "d779a47d129a3e49d6f021c4fa148c4354e0b8e2", onSubmit: this.handleSubmitCancelBooking }, a("textarea-component", { key: "06c3d25a5fe75a4ea450703568648ca3741549c7", id: "cancel-reason", name: "cancel-reason", required: !0, label: c.t("reasonForCancellation"), class: this.cancellationError ? "error" : "", part: "ncbf__reason-textarea", defaultValue: this.cancellationReason }), a("div", { key: "19447dd729cc312c9a95c8977b50f335a3941d75", class: "footer" }, a("button-component", { key: "3c2fe7523fcd7127af466921e84722b368cb54bd", variant: "destructive", class: "cancel", type: "submit", part: "ncbf__button-cta", disabled: this.isLoading }, c.t("cancelBookingButton")), !!this.eventInfo && a("button-component", { variant: "basic", class: "back", part: "ncbf__button-outline", onClick: this.handleGoBackClicked }, c.t("goBackButton"))))));
|
|
441
441
|
}
|
|
442
442
|
get host() {
|
|
443
443
|
return _(this);
|
|
@@ -449,7 +449,7 @@ const ne = class {
|
|
|
449
449
|
};
|
|
450
450
|
}
|
|
451
451
|
};
|
|
452
|
-
|
|
452
|
+
Ee([
|
|
453
453
|
x({
|
|
454
454
|
name: "nylas-cancel-booking-form",
|
|
455
455
|
stateToProps: /* @__PURE__ */ new Map([
|
|
@@ -492,7 +492,7 @@ Te([
|
|
|
492
492
|
P("design:paramtypes", []),
|
|
493
493
|
P("design:returntype", void 0)
|
|
494
494
|
], ne.prototype, "render", null);
|
|
495
|
-
ne.style =
|
|
495
|
+
ne.style = Te;
|
|
496
496
|
const Be = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.nylas-cancelled-event-card{height:inherit;display:flex;flex-direction:column;justify-content:space-between;align-items:center;font-family:var(--nylas-font-family);width:400px;background-color:var(--nylas-base-0);color:var(--nylas-base-800);border-radius:var(--nylas-border-radius-2x);padding:1.5rem;position:relative;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){.nylas-cancelled-event-card{width:inherit}}.nylas-cancelled-event-card__title{font-size:18px;font-weight:600;line-height:24px;color:var(--nylas-base-900);text-align:center}.nylas-cancelled-event-description{font-size:16px;font-weight:500;color:var(--nylas-base-600)}.nylas-cancelled-event-card__calendar-icon{width:3rem;height:3rem;border-radius:50%;position:absolute;top:-1.25rem;left:50%;transform:translateX(-50%);background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200)}.nylas-cancelled-event-card__cta{width:100%;display:flex;flex-direction:row;align-items:flex-start;margin-top:1rem}calendar-cancel-icon{display:flex;align-items:center;justify-content:center;height:100%}button-component{width:100%}', De = Be;
|
|
497
497
|
var Le = function(e, t, n, s) {
|
|
498
498
|
var o = arguments.length, i = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, n) : s, r;
|
|
@@ -538,7 +538,7 @@ const ae = class {
|
|
|
538
538
|
}
|
|
539
539
|
render() {
|
|
540
540
|
var e, t;
|
|
541
|
-
return a(
|
|
541
|
+
return a(g, { key: "4bc5935f964686d8713ad7e7d1e40c67cdd4e12c", part: "ncec" }, a("div", { key: "56f468bfcd9045f260edbf5ff4d0b15b36d0b71b", class: "nylas-cancelled-event-card", part: "ncec__card" }, a("div", { key: "1ab411b7fe3a3be0acf4b1d959fd28ec008a209a", class: "nylas-cancelled-event-card__calendar-icon", part: "ncec__icon" }, a("calendar-cancel-icon", { key: "2385650a6494031b7f323c7983fc9ea889014cba" })), a("h3", { key: "0b2abe6bf9853fcda33d79b9862a4bed4a002f9e", class: "nylas-cancelled-event-card__title", part: "ncec__title" }, c.t("bookingCancelledTitle"), "!"), a("div", { key: "bffb4124594dd368cbd3889b57919738e46c9dba", class: "nylas-cancelled-event-card__description", part: "ncec__description" }, c.t("bookingCancelledMessage"), " ", ((t = (e = this.configSettings) == null ? void 0 : e.organizer) == null ? void 0 : t.name) || "the participants", "."), a("div", { key: "cec5f1eadfc6fb46ab380ec62e32a7150846ae60", class: "nylas-cancelled-event-card__cta" }, a("button-component", { key: "98d546eb6b74011e65cf7853481741da1b546427", variant: "basic", disabled: this.isClosing, part: "ncec__button-outline", onClick: this.handleCloseClicked }, this.isClosing ? `${c.t("closingButton")}...` : `${c.t("closeButton")}`))));
|
|
542
542
|
}
|
|
543
543
|
get host() {
|
|
544
544
|
return _(this);
|
|
@@ -618,7 +618,7 @@ const ie = class {
|
|
|
618
618
|
}
|
|
619
619
|
render() {
|
|
620
620
|
var e, t;
|
|
621
|
-
return a(
|
|
621
|
+
return a(g, { key: "d00500caec1a93e744df13ad7136f40f2e90b39f", part: "ncec" }, a("div", { key: "ff6c310c1e1571f571b5516158520075c87cfcd5", class: "nylas-confirmed-event-card", part: "ncec__card" }, a("div", { key: "a40599aa668d1623d0a1f470fec7baf532e2439d", class: "nylas-confirmed-event-card__calendar-icon", part: "ncec__icon" }, a("calendar-cancel-icon", { key: "7c164343c9cbf027edf2a0a7974e52a6fb340bac" })), a("h3", { key: "22f92206b8c8c3d24035f493eef2f5e717f0f76b", class: "nylas-confirmed-event-card__title", part: "ncec__title" }, c.t("confirmedEventCardTitle"), "!"), a("div", { key: "4cdeef5903561280e75d095cda64e3dce538b042", class: "nylas-confirmed-event-card__description", part: "ncec__description" }, c.t("confirmedEventCardDescription"), " ", ((t = (e = this.configSettings) == null ? void 0 : e.organizer) == null ? void 0 : t.name) || "the participants", "."), a("div", { key: "eba230ecfdfcef67f882f85ba11e3de738224bb1", class: "nylas-confirmed-event-card__cta" }, a("button-component", { key: "8c4707dbdaf60fb549a9a9f95fe4f46f11474d32", variant: "basic", disabled: this.isClosing, part: "ncec__button-outline", onClick: this.handleCloseClicked }, this.isClosing ? `${c.t("closingButton")}...` : `${c.t("closeButton")}`))));
|
|
622
622
|
}
|
|
623
623
|
get host() {
|
|
624
624
|
return _(this);
|
|
@@ -658,14 +658,14 @@ function z(e, t, n, s) {
|
|
|
658
658
|
const r = o(i), l = o.ceil(i);
|
|
659
659
|
return i - r < l - i ? r : l;
|
|
660
660
|
}, o.offset = (i, r) => (t(i = /* @__PURE__ */ new Date(+i), r == null ? 1 : Math.floor(r)), i), o.range = (i, r, l) => {
|
|
661
|
-
const
|
|
661
|
+
const u = [];
|
|
662
662
|
if (i = o.ceil(i), l = l == null ? 1 : Math.floor(l), !(i < r) || !(l > 0))
|
|
663
|
-
return
|
|
663
|
+
return u;
|
|
664
664
|
let m;
|
|
665
665
|
do
|
|
666
|
-
|
|
666
|
+
u.push(m = /* @__PURE__ */ new Date(+i)), t(i, l), e(i);
|
|
667
667
|
while (m < i && i < r);
|
|
668
|
-
return
|
|
668
|
+
return u;
|
|
669
669
|
}, o.filter = (i) => z((r) => {
|
|
670
670
|
if (r >= r)
|
|
671
671
|
for (; e(r), !i(r); )
|
|
@@ -726,7 +726,7 @@ const se = class {
|
|
|
726
726
|
c.changeLanguage(e);
|
|
727
727
|
}
|
|
728
728
|
themeConfigChanged(e) {
|
|
729
|
-
|
|
729
|
+
this.applyThemeConfig(e);
|
|
730
730
|
}
|
|
731
731
|
connectedCallback() {
|
|
732
732
|
}
|
|
@@ -738,7 +738,7 @@ const se = class {
|
|
|
738
738
|
d("[nylas-date-picker] Component did load"), this.applyThemeConfig(this.themeConfig);
|
|
739
739
|
}
|
|
740
740
|
applyThemeConfig(e) {
|
|
741
|
-
if (
|
|
741
|
+
if (e)
|
|
742
742
|
for (const [t, n] of Object.entries(e))
|
|
743
743
|
this.host.style.setProperty(`${t}`, n);
|
|
744
744
|
}
|
|
@@ -756,14 +756,14 @@ const se = class {
|
|
|
756
756
|
Y(/* @__PURE__ */ new Date(), n).getTime() < t.getTime() ? this.disableNextMonthButton = !0 : this.disableNextMonthButton = !1, this.dates = this.getDates(), this.monthChanged.emit(this.month);
|
|
757
757
|
}
|
|
758
758
|
isSelected(e, t, n) {
|
|
759
|
-
return e && t &&
|
|
759
|
+
return e && t && E(e, t) && n && (n == null ? void 0 : n.length) > 0;
|
|
760
760
|
}
|
|
761
761
|
isDisabled(e, t) {
|
|
762
|
-
return e && (t == null ? void 0 : t.find((n) =>
|
|
762
|
+
return e && (t == null ? void 0 : t.find((n) => E(n, e))) === void 0;
|
|
763
763
|
}
|
|
764
764
|
render() {
|
|
765
765
|
var e, t, n, s, o, i, r;
|
|
766
|
-
return a(
|
|
766
|
+
return a(g, { key: "4c20e8d37a61de3397cac0625884fdd9c11cc8af", part: "ndp" }, a("div", { key: "44174b6408db8263ab96c9acb57985af0d0780d2", class: "nylas-date-picker" }, a("div", { key: "962fc8b1ab8d8794df5838e16a477b8f705e4e6f", class: "title", part: "ndp__title" }, (e = this.configSettings) != null && e.name ? a("h1", null, (t = this.configSettings) == null ? void 0 : t.name) : ((s = (n = this.configSettings) == null ? void 0 : n.organizer) == null ? void 0 : s.name) && a("h1", null, a("person-icon", null), ((i = (o = this.configSettings) == null ? void 0 : o.organizer) == null ? void 0 : i.name) || "Organizer"), a("p", { key: "422505548dffc0ee5a70811415ff030641faeeff" }, a("clock-icon", { key: "ef51faa1c20ef5caf3f3a8f7ff619c619ba72401" }), this.eventDuration ? be(this.eventDuration) : `- ${c.t("time.minutes")}`)), a("div", { key: "f593d3bbcb954bd863381e445cff053ce0085714", class: "header flex-row" }, a("h2", { key: "bc844a479c3d7e7b4a2065e91aa79baace20b302", part: "ndp__month-header" }, a("strong", { key: "da5035f141b874d58f626426b71ee7e9dd0b6424" }, pe(this.month.toLocaleDateString(void 0, { month: "long" }).toLocaleLowerCase())), " ", this.month.toLocaleDateString(void 0, { year: "numeric" })), a("div", { key: "a2721542d5155de0072aa8a191b111b7d8cd7eea", class: "pagination" }, a("button", { key: "6611b22afdc7694eedb1700d0982be6a9d6e97fd", title: "Previous month", onClick: () => this.changeMonth(-1), class: { "chevron-left": !0, button: !0 }, disabled: !((r = this.selectableDates) != null && r.length) || this.month <= /* @__PURE__ */ new Date(), part: "ndp__month-button" }, a("chevron-icon", { key: "d3d5d7ebd113c60aa441403bb67a2540c7923517" })), a("button", { key: "67fc130c96bfb0dc4e198784a4e7f29cf9a409c5", title: "Next month", onClick: () => this.changeMonth(1), class: { "chevron-right": !0, button: !0 }, disabled: this.disableNextMonthButton, part: "ndp__month-button" }, a("chevron-icon", { key: "5d64178be9d3b9dc8be009155259181cc9d72381" })))), a("div", { key: "528f43c0d6d38a607bd9bdfa0db2906e0237171b", class: "dates" }, [
|
|
767
767
|
c.t("days.sunday"),
|
|
768
768
|
c.t("days.monday"),
|
|
769
769
|
c.t("days.tuesday"),
|
|
@@ -771,18 +771,18 @@ const se = class {
|
|
|
771
771
|
c.t("days.thursday"),
|
|
772
772
|
c.t("days.friday"),
|
|
773
773
|
c.t("days.saturday")
|
|
774
|
-
].map((l) => a("div", { class: "day", part: "ndp__day" }, l)), this.dates.map((l,
|
|
774
|
+
].map((l) => a("div", { class: "day", part: "ndp__day" }, l)), this.dates.map((l, u) => {
|
|
775
775
|
var f;
|
|
776
776
|
const m = this.isDisabled(l, this.selectableDates);
|
|
777
777
|
return this.isLoading ? a("button", { disabled: !0, class: {
|
|
778
778
|
"date day-skeleton": !0,
|
|
779
779
|
"current-month": j(l, this.month)
|
|
780
|
-
}, style: { animationDelay: `${
|
|
780
|
+
}, style: { animationDelay: `${u * 20}ms` }, part: "ndp__date ndp__date--disabled" }, l.getDate()) : a("button", { class: {
|
|
781
781
|
date: !0,
|
|
782
|
-
selected: !!(this.selectedDate &&
|
|
783
|
-
"current-day":
|
|
782
|
+
selected: !!(this.selectedDate && E(l, this.selectedDate) && this.selectableDates && ((f = this.selectableDates) == null ? void 0 : f.length) > 0),
|
|
783
|
+
"current-day": E(l, /* @__PURE__ */ new Date()),
|
|
784
784
|
"current-month": j(l, this.month)
|
|
785
|
-
}, "aria-label": l.toLocaleDateString(void 0, { dateStyle: "full" }), disabled: m, onClick: () => this.selectDate(l), part: `ndp__date ${this.isSelected(l, this.selectedDate, this.selectableDates) ? "ndp__date--selected" : ""} ${
|
|
785
|
+
}, "aria-label": l.toLocaleDateString(void 0, { dateStyle: "full" }), disabled: m, onClick: () => this.selectDate(l), part: `ndp__date ${this.isSelected(l, this.selectedDate, this.selectableDates) ? "ndp__date--selected" : ""} ${E(l, /* @__PURE__ */ new Date()) ? "ndp__date--current-day" : ""} ${j(l, this.month) ? "ndp__date--current-month" : ""}` }, l.getDate());
|
|
786
786
|
}))));
|
|
787
787
|
}
|
|
788
788
|
get host() {
|
|
@@ -868,7 +868,7 @@ const re = class {
|
|
|
868
868
|
t === "timezone" ? this.changeTimezone(n) : t === "language" && this.changeLanguage(n);
|
|
869
869
|
}
|
|
870
870
|
getTimezoneLabelHTML(e) {
|
|
871
|
-
const t =
|
|
871
|
+
const t = ue(e);
|
|
872
872
|
return a("span", { class: "timezone-label", style: {
|
|
873
873
|
display: "flex",
|
|
874
874
|
alignItems: "center",
|
|
@@ -889,7 +889,7 @@ const re = class {
|
|
|
889
889
|
label: J[n],
|
|
890
890
|
value: n
|
|
891
891
|
}));
|
|
892
|
-
return a(
|
|
892
|
+
return a(g, { key: "879a445840da85f74f8b844caede154613ec328e" }, a("div", { key: "e7c11dc083f190e0c4b541babce3129c458e4f70", class: "nylas-locale-switch", part: "nls" }, a("div", { key: "a764dca464a4dbadf24b1af73cc003558156f009", class: {
|
|
893
893
|
"select-wrapper": !0,
|
|
894
894
|
timezone: !0
|
|
895
895
|
}, part: "nls__timezone" }, a("select-dropdown", { key: "94ebb791726435cc32e78c127a43fbb92692882d", name: "timezone", options: e, defaultSelectedOption: e.find((n) => n.value == this.selectedTimezone), exportparts: "sd_dropdown: nls__timezone-dropdown, sd_dropdown-button: nls__timezone-drop-button, sd_dropdown-button-selected-label: nls__timezone-drop-button-selected-label, sd_dropdown-content: nls__timezone-drop-content, sd_dropdown_label: nls__timezone-drop-label" }, a("span", { key: "3d3923b8ba91ec563a930945bb7b07072e2fd43a", slot: "select-icon" }, a("globe-icon", { key: "70650f2e15d51241af9973eba1d73fed6c669cc0", width: "20", height: "20" })))), a("div", { key: "9a6fb1221184046119f5025c30366012642dabac", class: {
|
|
@@ -992,7 +992,7 @@ const Ve = ':host{display:block;margin-bottom:-12px;width:100%;z-index:1;--nylas
|
|
|
992
992
|
this.notifications = this.notifications.filter((t) => t.id !== e);
|
|
993
993
|
}
|
|
994
994
|
render() {
|
|
995
|
-
return a(
|
|
995
|
+
return a(g, { key: "03f95b47c77afb69a2696473c2bf8c3f1e1ed44a" }, a(ge, { key: "990afe9475e36dbae84a70266ef0b5188d2011de" }, this.notifications.map((e) => a("div", { class: `notif ${e.type}`, key: e.id }, a("div", { class: "content" }, a("span", { class: `icon ${e.type}` }, (e.type === "error" || e.type === "warning") && a("warning-icon", null)), a("span", { class: "message" }, a("span", { class: "title" }, e.title), e.description && a("span", { class: "description" }, e.description))), a("button", { class: "dismiss-btn", onClick: () => this.dismissNotification(e.id) }, a("close-icon", null)))), a("slot", { key: "49a5c13a306626b5bba79c443bb8501fe50c7ea3" })));
|
|
996
996
|
}
|
|
997
997
|
get host() {
|
|
998
998
|
return _(this);
|
|
@@ -1046,12 +1046,12 @@ const le = class {
|
|
|
1046
1046
|
this.action = null;
|
|
1047
1047
|
}
|
|
1048
1048
|
render() {
|
|
1049
|
-
var e, t, n, s, o, i, r, l,
|
|
1050
|
-
return a(
|
|
1049
|
+
var e, t, n, s, o, i, r, l, u, m, f, p;
|
|
1050
|
+
return a(g, { key: "00063ab52436fa94923515f0e7d9b83ad32a6de5", part: "nmcc" }, a("div", { key: "86d985186bd45ad8ccccaf26f6d3fd5b95bd6647", class: "event-card-wrapper", part: "nmccc__card" }, a("div", { key: "7c0337db6d10ec6c2336a932f8c9481cf870ac17", class: "calendar-icon" }, a("calendar-check-icon", { key: "8827a672b93e82a487b79fdcee0f37abf4dd70e0" })), a("div", { key: "283251146d05e457365652f9b1484f5b4342a5c9", class: "booked-event-header" }, a("h2", { key: "df264ab4ce9d9c5c8e63731d81727aeac8d63ff7", slot: "card-title", part: "nmcc__title" }, !!this.organizerConfirmationBookingId && `${c.t("bookingPendingTitle")}!`)), a("div", { key: "543c3f981da5149ef0d79f7ab1281744806fd2ff", class: "manage-booking-description" }, a("p", { key: "bb2cbf321fd7a4bcb8db89e918ba26f16c0767eb" }, c.t("bookingPendingnDescription"))), a("div", { key: "b400ded1e5fa2b35b9ffe615e6fe525a3fc51461", class: {
|
|
1051
1051
|
footer: !0,
|
|
1052
1052
|
"no-footer": ((t = (e = this.configSettings) == null ? void 0 : e.scheduler) == null ? void 0 : t.hide_cancellation_options) && ((s = (n = this.configSettings) == null ? void 0 : n.scheduler) == null ? void 0 : s.hide_rescheduling_options),
|
|
1053
1053
|
"no-template-cols": ((i = (o = this.configSettings) == null ? void 0 : o.scheduler) == null ? void 0 : i.hide_cancellation_options) || ((l = (r = this.configSettings) == null ? void 0 : r.scheduler) == null ? void 0 : l.hide_rescheduling_options)
|
|
1054
|
-
} }, !((m = (
|
|
1054
|
+
} }, !((m = (u = this.configSettings) == null ? void 0 : u.scheduler) != null && m.hide_cancellation_options) && a("button-component", { variant: "destructive", onClick: this.handleRejectBookingButtonClicked, isLoading: this.isLoading && this.action === "reject", part: "nmcc__button-outline nmcc__cancel-cta" }, `${c.t("rejectBookingButton")}`), !((p = (f = this.configSettings) == null ? void 0 : f.scheduler) != null && p.hide_rescheduling_options) && a("button-component", { variant: "basic", onClick: this.handleConfirmBookingButtonClicked, isLoading: this.isLoading && this.action === "confirm", part: "nmcc__button-outline nmcc__reschedule-cta" }, `${c.t("confirmBookingButton")}`))));
|
|
1055
1055
|
}
|
|
1056
1056
|
get host() {
|
|
1057
1057
|
return _(this);
|
|
@@ -1135,7 +1135,7 @@ const ce = class {
|
|
|
1135
1135
|
}
|
|
1136
1136
|
render() {
|
|
1137
1137
|
var e;
|
|
1138
|
-
return a(
|
|
1138
|
+
return a(g, { key: "e03c7985396173ef1d2bb0ba02ea88e958811a35", part: "nsec" }, a("div", { key: "017d6ce8fc92ef11070d94038e80095acbd90f29", class: "event-card", part: "nsec__card" }, a("div", { key: "b475d6d8481d4e85a383822ed34139a2838a686c", class: "calendar-icon", part: "nsec__icon" }, a("calendar-icon", { key: "83df23c0d499b2932c84175c45c05bb589294f74" })), a("div", { key: "e11fe3c83e6cf3fa926ec3b7e0e381625cb98b0f", class: "nylas-selected-event-card__date", part: "nsec__date" }, this.selectedDate ? K((e = this.selectedDate) == null ? void 0 : e.toLocaleDateString(Q[this.selectedLanguage || navigator.language], { dateStyle: "full", timeZone: this.selectedTimezone })) : "-"), a("div", { key: "ed9773f2567782ab354ffe28fbbc365d3d2effa5", class: "nylas-selected-event-card__time", part: "nsec__time" }, this.startTime, " - ", this.endTime)), a("div", { key: "16389c36fe0ab7c55e5f71ab22ad8576dc509cae", class: "event-timezone", part: "nsec__timezone" }, a("globe-icon", { key: "2c6d9e03e0687a5912e1f674c08c19b6e612e90a" }), L[this.selectedTimezone]));
|
|
1139
1139
|
}
|
|
1140
1140
|
get host() {
|
|
1141
1141
|
return _(this);
|
|
@@ -1193,13 +1193,13 @@ const de = class {
|
|
|
1193
1193
|
selectedDateChanged(e) {
|
|
1194
1194
|
var t;
|
|
1195
1195
|
if (d("[nylas-timeslot-picker] Selected date changed", { newVal: e }), e && (this.selectedTimeslotIndex = "", typeof e < "u")) {
|
|
1196
|
-
const n = (t = this.availability) == null ? void 0 : t.filter((s) =>
|
|
1196
|
+
const n = (t = this.availability) == null ? void 0 : t.filter((s) => E(s.start_time, e)).map((s) => s);
|
|
1197
1197
|
this.times = n || [];
|
|
1198
1198
|
}
|
|
1199
1199
|
}
|
|
1200
1200
|
availabilityChanged(e) {
|
|
1201
1201
|
if (d("[nylas-timeslot-picker] Available times changed", { newVal: e, selectedDate: this.selectedDate }), typeof e < "u") {
|
|
1202
|
-
const t = e == null ? void 0 : e.filter((n) => this.selectedDate &&
|
|
1202
|
+
const t = e == null ? void 0 : e.filter((n) => this.selectedDate && E(n.start_time, this.selectedDate)).map((n) => n);
|
|
1203
1203
|
this.times = t || [];
|
|
1204
1204
|
}
|
|
1205
1205
|
}
|
|
@@ -1216,7 +1216,7 @@ const de = class {
|
|
|
1216
1216
|
async componentDidLoad() {
|
|
1217
1217
|
var t;
|
|
1218
1218
|
d("[nylas-timeslot-picker] Component did load");
|
|
1219
|
-
const e = (t = this.availability) == null ? void 0 : t.filter((n) => this.selectedDate &&
|
|
1219
|
+
const e = (t = this.availability) == null ? void 0 : t.filter((n) => this.selectedDate && E(n.start_time, this.selectedDate)).map((n) => n);
|
|
1220
1220
|
this.times = e || [], this.applyThemeConfig(this.themeConfig);
|
|
1221
1221
|
}
|
|
1222
1222
|
applyThemeConfig(e) {
|
|
@@ -1243,13 +1243,13 @@ const de = class {
|
|
|
1243
1243
|
return `${t.format(e.start_time)} - ${t.format(e.end_time)}`;
|
|
1244
1244
|
}
|
|
1245
1245
|
render() {
|
|
1246
|
-
return this.isLoading ? a(
|
|
1246
|
+
return this.isLoading ? a(g, null, a("div", { class: "loading" }, new Array(6).fill(0).map((e, t) => a("div", { class: "timeslot-skeleton", style: { animationDelay: `${t * 20}ms` } })))) : this.availability && this.availability.length === 0 ? a(g, null, a("div", { class: "empty" }, a("span", null, "No dates available"))) : (!this.times || this.times.length === 0) && this.selectedDate ? a(g, null, a("div", { class: "empty" }, a("span", null, "No time slots available for selected date"))) : this.selectedDate ? a(g, { part: "ntp" }, a("div", { class: "time-picker-wrapper" }, a("div", { class: "timeslots" }, this.times.map((e, t) => {
|
|
1247
1247
|
var n, s, o, i;
|
|
1248
1248
|
return a("button", { part: `ntp__timeslot ${((s = (n = this.selectedTimeslot) == null ? void 0 : n.start_time) == null ? void 0 : s.getTime()) === e.start_time.getTime() ? "ntp__timeslot--selected" : ""}`, class: {
|
|
1249
1249
|
time: !0,
|
|
1250
1250
|
selected: typeof this.selectedTimeslot < "u" && ((i = (o = this.selectedTimeslot) == null ? void 0 : o.start_time) == null ? void 0 : i.getTime()) === e.start_time.getTime()
|
|
1251
1251
|
}, onClick: () => this.onClickSelectTime(e, t), onMouseEnter: () => this.handleMouseEnter(t), onMouseLeave: () => this.handleMouseLeave() }, this.hoveredTimeslotIndex == t || this.selectedTimeslotIndex == this.getTimeslotId(e.start_time, t) ? this.getTimeSlotLabel(e) : e.start_time.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit", timeZone: this.selectedTimezone }));
|
|
1252
|
-
})), this.selectedTimeslot && a("div", { class: "footer" }, a("button-component", { variant: "primary", onClick: (e) => this.handleConfirmedTimeslot(e, this.selectedTimeslot), part: "ntp__button-primary" }, a("slot", { name: "timeslot-picker-cta-label" }, c.t("nextButton")))))) : a(
|
|
1252
|
+
})), this.selectedTimeslot && a("div", { class: "footer" }, a("button-component", { variant: "primary", onClick: (e) => this.handleConfirmedTimeslot(e, this.selectedTimeslot), part: "ntp__button-primary" }, a("slot", { name: "timeslot-picker-cta-label" }, c.t("nextButton")))))) : a(g, null);
|
|
1253
1253
|
}
|
|
1254
1254
|
get host() {
|
|
1255
1255
|
return _(this);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-92ba1b80.cjs"),i=require("./register-component-75f530bc-61b6f2dd.cjs");require("react");require("react-dom");const b=':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.nylas-form-card{width:100%;border-radius:8px;border:1px solid var(--nylas-base-200)}.nylas-form-card__header{padding:1rem;border-bottom:1px solid var(--nylas-base-200)}',y=b;var m=function(a,n,t,r){var d=arguments.length,s=d<3?n:r===null?r=Object.getOwnPropertyDescriptor(n,t):r,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(a,n,t,r);else for(var l=a.length-1;l>=0;l--)(c=a[l])&&(s=(d<3?c(s):d>3?c(n,t,s):c(n,t))||s);return d>3&&s&&Object.defineProperty(n,t,s),s},o=function(a,n){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(a,n)};const f=class{constructor(a){e.registerInstance(this,a),a.$hostElement$["s-ei"]?this.internals=a.$hostElement$["s-ei"]:(this.internals=a.$hostElement$.attachInternals(),a.$hostElement$["s-ei"]=this.internals)}connectedCallback(){e.debug("nylas-event-card","connectedCallback")}componentWillLoad(){e.debug("nylas-event-card","componentWillLoad")}componentDidLoad(){e.debug("nylas-event-card","componentDidLoad")}disconnectedCallback(){e.debug("nylas-event-card","disconnectedCallback");const a=["header-title","header-subtitle","content"];e.checkForMissingSlots(a,this.host)}render(){return e.h(e.Host,{key:"5ccd047d1a8bb515dea8aa7b9d7d39265afc31c9"},e.h("div",{key:"c40f52eaa4d099d92d65b0df662cd2de1b5f35c7",class:"nylas-form-card",part:"nfc"},e.h("div",{key:"545dabd81dce9b4f6f5f1d129071e1136f62e609",class:"nylas-form-card__header",part:"nfc__header"},e.h("slot",{key:"2be9b24f91316235be7132a6466cd16b9dfe813c",name:"header-title"}),e.h("slot",{key:"3414a084465efc50a3856291dff61d8ef3b3c617",name:"header-subtitle"})),e.h("div",{key:"cc07650a55afd7fc5d2429ff3611168977775bc8",class:"nylas-form-card__content"},e.h("slot",{key:"d50dd8dfbfea1ad84876495e72dd03102e2bc0dc",name:"content"}))))}static get formAssociated(){return!0}get host(){return e.getElement(this)}};m([i.RegisterComponent({name:"nylas-form-card",eventToProps:{},fireRegisterEvent:!0}),o("design:type",Function),o("design:paramtypes",[]),o("design:returntype",void 0)],f.prototype,"render",null);f.style=y;exports.nylas_form_card=f;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as b, d as c, K as y, h as n, H as m, g as p } from "./index-
|
|
2
|
-
import { R as u } from "./register-component-
|
|
1
|
+
import { r as b, d as c, K as y, h as n, H as m, g as p } from "./index-72501df0.js";
|
|
2
|
+
import { R as u } from "./register-component-75f530bc-0e4e3d7a.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "react-dom";
|
|
5
5
|
const h = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.nylas-form-card{width:100%;border-radius:8px;border:1px solid var(--nylas-base-200)}.nylas-form-card__header{padding:1rem;border-bottom:1px solid var(--nylas-base-200)}', v = h;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as h, d as o, h as l, H as u } from "./index-
|
|
2
|
-
import { R as m } from "./register-component-
|
|
1
|
+
import { r as h, d as o, h as l, H as u } from "./index-72501df0.js";
|
|
2
|
+
import { R as m } from "./register-component-75f530bc-0e4e3d7a.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "react-dom";
|
|
5
5
|
const p = ":host{display:block}div{height:inherit}@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}.fade-in{animation:fadeIn 1.5s}.fade-out{animation:fadeOut 1.5s}@keyframes slideIn{0%{transform:translateY(100%)}100%{transform:translateY(0)}}@keyframes slideOut{0%{transform:translateY(0)}100%{transform:translateY(100%)}}.slide-in{animation:slideIn 1.5s}.slide-out{animation:slideOut 1.5s}@keyframes swipeIn{0%{transform:translateX(100%)}100%{transform:translateX(0)}}@keyframes swipeOut{0%{transform:translateX(0)}100%{transform:translateX(100%)}}.swipe-in{animation:swipeIn 1.5s}.swipe-out{animation:swipeOut 1.5s}", y = p;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-92ba1b80.cjs"),u=require("./register-component-75f530bc-61b6f2dd.cjs");require("react");require("react-dom");const c=":host{display:block}div{height:inherit}@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}.fade-in{animation:fadeIn 1.5s}.fade-out{animation:fadeOut 1.5s}@keyframes slideIn{0%{transform:translateY(100%)}100%{transform:translateY(0)}}@keyframes slideOut{0%{transform:translateY(0)}100%{transform:translateY(100%)}}.slide-in{animation:slideIn 1.5s}.slide-out{animation:slideOut 1.5s}@keyframes swipeIn{0%{transform:translateX(100%)}100%{transform:translateX(0)}}@keyframes swipeOut{0%{transform:translateX(0)}100%{transform:translateX(100%)}}.swipe-in{animation:swipeIn 1.5s}.swipe-out{animation:swipeOut 1.5s}",h=c;var m=function(e,n,s,a){var t=arguments.length,o=t<3?n:a===null?a=Object.getOwnPropertyDescriptor(n,s):a,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,n,s,a);else for(var f=e.length-1;f>=0;f--)(r=e[f])&&(o=(t<3?r(o):t>3?r(n,s,o):r(n,s))||o);return t>3&&o&&Object.defineProperty(n,s,o),o},l=function(e,n){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,n)};const d=class{constructor(e){i.registerInstance(this,e),this.state=void 0,this.isStateSet=void 0,this.isBoolean=void 0,this.getStore=void 0,this.transition="none",this.show=!1,this.classes={},this.initTransition=this.initTransition.bind(this)}connectedCallback(){}disconnectedCallback(){}async componentWillLoad(){i.debug("[nylas-if-state] Component will load"),this.watchStore(!0)}async componentDidLoad(){i.debug("[nylas-if-state] Component did load")}shouldRender(){const[e,n]=this.state?this.state.split("."):["",""],s=this.getStore;if(typeof s>"u")return i.debug(`[nylas-if-state] Store name: ${e} | State name: ${n}`,{getStore:s}),!1;const a=s(e);if(typeof a>"u")return i.debug(`[nylas-if-state] Store name: ${e} | State name: ${n}`,{store:a}),!1;const t=a.state[n];return typeof this.isStateSet=="boolean"?this.isStateSet===!1&&(typeof t>"u"||t===null||t.length===0)||this.isStateSet===!0&&typeof t<"u"&&t!==null:typeof this.isBoolean=="boolean"?this.isBoolean===!0&&typeof t<"u"&&t===!0||this.isBoolean===!1&&typeof t<"u"&&t===!1:!1}onGetStoreChange(){this.watchStore(!0)}watchStore(e=!1){const[n,s]=this.state?this.state.split("."):["",""],a=this.getStore;if(typeof a>"u")return i.debug(`[nylas-if-state] Store name: ${n} | State name: ${s}`,{getStore:a}),null;const t=a(n);if(typeof t>"u")return i.debug(`[nylas-if-state] Store name: ${n} | State name: ${s}`,{store:t}),null;e===!0&&this.initTransition(),t.onChange(s,this.initTransition)}initTransition(){const e=this.shouldRender();switch(this.transition){case"fade":case"slide":case"swipe":this.classes={[`${this.transition}-in`]:e,[`${this.transition}-out`]:!e},setTimeout(()=>{this.show=e},150);break;default:this.show=this.shouldRender();break}}render(){return i.h(i.Host,{key:"4ab162229644e4d5d9d571af164b417c3e503e2c"},i.h("div",{key:"f5b4dd56ac193ba63be4a7040bdb61d7a2e1da04",class:this.classes},this.show&&i.h("slot",null)))}static get watchers(){return{getStore:["onGetStoreChange"]}}};m([u.RegisterComponent({name:"nylas-if-state",getStoresToProp:"getStore",fireRegisterEvent:!0}),l("design:type",Function),l("design:paramtypes",[]),l("design:returntype",void 0)],d.prototype,"render",null);d.style=h;exports.nylas_if_state=d;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-92ba1b80.cjs"),h=require("./register-component-75f530bc-61b6f2dd.cjs");require("react");require("react-dom");const u=":host{font-family:'Arial', sans-serif;background:var(--nylas-color-primary-50);color:var(--nylas-color-primary-800);margin:0;display:contents}input{box-sizing:border-box}.login-container{display:flex;justify-content:center;align-items:center;height:100%}.login-box{width:300px;padding:20px;box-shadow:0 4px 8px rgba(0, 0, 0, 0.1);border-radius:var(--nylas-border-radius-2x);background:var(--nylas-color-primary-50);text-align:center}.login-box h1{margin-top:0;margin-bottom:0.5em}.login-box p{margin-bottom:1em}.login-methods button{display:block;width:100%;padding:10px 10px 10px 50px;margin-bottom:10px;border:none;border-radius:var(--nylas-border-radius);border:1px solid var(--nylas-color-primary-300);background:var(--nylas-color-primary-100);color:var(--nylas-color-primary-600);cursor:pointer;transition:background 0.3s ease;position:relative;text-align:left}.login-methods button svg{position:absolute;left:16px;top:50%;transform:translateY(-50%)}.login-methods button:hover{background:var(--nylas-color-primary-200);}.login-form label{display:block;margin-bottom:5px;text-align:left}.login-form input{width:100%;padding:10px;margin-bottom:10px;border:1px solid var(--nylas-color-primary-200);border-radius:var(--nylas-border-radius);background:var(--nylas-color-primary-100);color:var(--nylas-color-primary-800);}.login-form button{width:100%;padding:10px;border:none;border-radius:var(--nylas-border-radius);background:var(--nylas-color-primary-500);color:var(--nylas-color-primary-50);cursor:pointer;transition:background 0.3s ease}.login-form button:hover{background:var(--nylas-color-primary-600);}",p=u;var g=function(n,o,i,e){var a=arguments.length,r=a<3?o:e===null?e=Object.getOwnPropertyDescriptor(o,i):e,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(n,o,i,e);else for(var l=n.length-1;l>=0;l--)(s=n[l])&&(r=(a<3?s(r):a>3?s(o,i,r):s(o,i))||r);return a>3&&r&&Object.defineProperty(o,i,r),r},c=function(n,o){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,o)};const d=class{constructor(n){t.registerInstance(this,n),this.buttonClick=t.createEvent(this,"buttonClick",7),this._handleLoginRedirect=async()=>{var e;const o=await((e=this.nylasConnector)==null?void 0:e.auth.getHostedAuthRedirectURL(this.scopes));this.buttonClick.emit({url:o}).defaultPrevented||o&&(window.location.href=o)},this._onGoogleButtonClick=async o=>{var e;o.preventDefault();const i=await((e=this.nylasConnector)==null?void 0:e.auth.getHostedAuthRedirectURL(this.scopes,void 0,"google"));i&&(window.location.href=i)},this._onMicrosoftButtonClick=async o=>{var e;o.preventDefault();const i=await((e=this.nylasConnector)==null?void 0:e.auth.getHostedAuthRedirectURL(this.scopes,void 0,"microsoft"));i&&(window.location.href=i)},this._onFormSubmit=async o=>{var e;o.preventDefault();const i=await((e=this.nylasConnector)==null?void 0:e.auth.getHostedAuthRedirectURL(this.scopes,this.email));i&&(window.location.href=i)},this.isAuthenticated=!1,this.nylasConnector=void 0,this.scopes=void 0,this.loginMethod="redirect",this.companyName="Nylas",this.logoUrl="https://www.nylas.com/wp-content/uploads/main-logo.svg",this.logoWidth="min-content",this.providers="google,microsoft",this.buttonText="Login",this.email=""}connectedCallback(){}disconnectedCallback(){}componentWillLoad(){}async componentDidLoad(){var o;await((o=this.nylasConnector)==null?void 0:o.auth.manageHostedAuthCodeExchange(window.location.href))&&window.history.replaceState({},document.title,window.location.pathname)}render(){var o;const n=((o=this.providers)==null?void 0:o.split(","))||[];return t.h(t.Host,{key:"0e8ae3287facdc3e67109cd57cb80a761897de76"},this.loginMethod==="redirect"&&t.h("div",{class:"redirect-container"},!this.isAuthenticated&&t.h("button",{part:"button",onClick:this._handleLoginRedirect},this.buttonText)),this.loginMethod==="emebded"&&t.h("main",{class:"login-container"},t.h("section",{class:"login-box"},t.h("header",null,t.h("img",{src:this.logoUrl,alt:`${this.companyName} logo`,width:"100%",style:{minWidth:this.logoWidth}}),t.h("h1",null,"Welcome")),t.h("p",null,"Log in to your account to continue to ",this.companyName),t.h("div",{class:"login-methods"},n.includes("google")&&t.h("button",{class:"login-google",onClick:this._onGoogleButtonClick},t.h("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"18",height:"18",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 256 262"},t.h("path",{fill:"#4285F4",d:"M255.6 131.6c0-8.2-.8-16.2-2.2-23.9H130v45.3h70.3c-3 16.1-12.4 29.7-26.3 38.9v32.4h42.6c25-23 39.4-56.7 39.4-97.7z"}),t.h("path",{fill:"#34A853",d:"M130 262c35.3 0 64.9-11.7 86.5-31.7l-42.6-32.4c-11.7 7.9-26.7 12.6-43.9 12.6-33.7 0-62.3-22.7-72.5-53.4H14.5v33.3A130.3 130.3 0 00130 262z"}),t.h("path",{fill:"#FBBC05",d:"M57.5 158.1a72.7 72.7 0 010-54.2V70.6H14.5a130.4 130.4 0 000 120.8l43-33.3z"}),t.h("path",{fill:"#EA4335",d:"M130 51.6c19 0 36 6.5 49.4 19.2l37-36C195 13.1 165.2 0 130 0A130.3 130.3 0 0014.5 70.6l43 33.3c10.2-30.7 38.8-53.3 72.5-53.3z"})),"Continue with Google"),n.includes("microsoft")&&t.h("button",{class:"login-microsoft",onClick:this._onMicrosoftButtonClick},t.h("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"18",height:"18",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 448 512"},t.h("path",{fill:"#F3F3F3",d:"M0 32v192h192V32H0zm256 0v192h192V32H256zm192 256v192h-192V288h192zM0 224v192h192V224H0z"})),"Continue with Microsoft")),t.h("form",{class:"login-form",method:"POST",onSubmit:this._onFormSubmit},t.h("label",{htmlFor:"email"},"Email"),t.h("input",{type:"email",id:"email",name:"email",required:!0,value:this.email}),t.h("button",{type:"submit"},"Next")))))}};g([h.RegisterComponent({name:"nylas-login",connectorToProp:"nylasConnector",stateToProps:new Map([["auth.isAuthenticated","isAuthenticated"]]),fireRegisterEvent:!0}),c("design:type",Function),c("design:paramtypes",[]),c("design:returntype",void 0)],d.prototype,"render",null);d.style=p;exports.nylas_login=d;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as h, c as p, h as o, H as u } from "./index-
|
|
2
|
-
import { R as m } from "./register-component-
|
|
1
|
+
import { r as h, c as p, h as o, H as u } from "./index-72501df0.js";
|
|
2
|
+
import { R as m } from "./register-component-75f530bc-0e4e3d7a.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "react-dom";
|
|
5
5
|
const g = ":host{font-family:'Arial', sans-serif;background:var(--nylas-color-primary-50);color:var(--nylas-color-primary-800);margin:0;display:contents}input{box-sizing:border-box}.login-container{display:flex;justify-content:center;align-items:center;height:100%}.login-box{width:300px;padding:20px;box-shadow:0 4px 8px rgba(0, 0, 0, 0.1);border-radius:var(--nylas-border-radius-2x);background:var(--nylas-color-primary-50);text-align:center}.login-box h1{margin-top:0;margin-bottom:0.5em}.login-box p{margin-bottom:1em}.login-methods button{display:block;width:100%;padding:10px 10px 10px 50px;margin-bottom:10px;border:none;border-radius:var(--nylas-border-radius);border:1px solid var(--nylas-color-primary-300);background:var(--nylas-color-primary-100);color:var(--nylas-color-primary-600);cursor:pointer;transition:background 0.3s ease;position:relative;text-align:left}.login-methods button svg{position:absolute;left:16px;top:50%;transform:translateY(-50%)}.login-methods button:hover{background:var(--nylas-color-primary-200);}.login-form label{display:block;margin-bottom:5px;text-align:left}.login-form input{width:100%;padding:10px;margin-bottom:10px;border:1px solid var(--nylas-color-primary-200);border-radius:var(--nylas-border-radius);background:var(--nylas-color-primary-100);color:var(--nylas-color-primary-800);}.login-form button{width:100%;padding:10px;border:none;border-radius:var(--nylas-border-radius);background:var(--nylas-color-primary-500);color:var(--nylas-color-primary-50);cursor:pointer;transition:background 0.3s ease}.login-form button:hover{background:var(--nylas-color-primary-600);}", y = g;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as g, c as u, d as r, h as d, H as y, g as f, a as C } from "./index-
|
|
2
|
-
import { N as A, e as R } from "./index.es-
|
|
3
|
-
import { C as S, N as p } from "./scheduler-store-
|
|
4
|
-
import { C as m } from "./scheduler-config-store-ed4a8dfd-
|
|
1
|
+
import { r as g, c as u, d as r, h as d, H as y, g as f, a as C } from "./index-72501df0.js";
|
|
2
|
+
import { N as A, e as R } from "./index.es-28b1b2ec-5a87db22.js";
|
|
3
|
+
import { C as S, N as p } from "./scheduler-store-d84b82a0-11faba86.js";
|
|
4
|
+
import { C as m } from "./scheduler-config-store-ed4a8dfd-f74e58ae.js";
|
|
5
5
|
import "react";
|
|
6
6
|
import "react-dom";
|
|
7
7
|
class w {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-92ba1b80.cjs"),l=require("./index.es-28b1b2ec-595c0513.cjs"),d=require("./scheduler-store-d84b82a0-7a7fe186.cjs"),y=require("./scheduler-config-store-ed4a8dfd-161a3efd.cjs");require("react");require("react-dom");class f{constructor(e,t){this.nylasAuth=e,this.nylasAuthStore=t}async validateSession(){const e=await this.isAccessTokenValid();if(!e)this.logout();else{let t=await this.nylasAuth.getTokenInfo();if(t){const r=Math.floor(Date.now()/1e3);if(t.expires_in&&t.expires_in-r<3e5&&(o.debug("[NylasAuthConnectorMixin] Refreshing access token"),t=await this.nylasAuth.refreshAccessToken(),!t)){o.debug("[NylasAuthConnectorMixin] Token is expired and could not be refreshed. Logging out."),this.logout();return}this.nylasAuthStore.state.tokenInfo=t}}this.nylasAuthStore.state.isAuthenticated=e}async isAuthenticated(){return this.nylasAuth.isAuthenticated()}async getTokenInfo(){return this.nylasAuth.getTokenInfo()}async isAccessTokenValid(){return this.nylasAuth.isAccessTokenValid()}async logout(){await this.nylasAuth.logout()}async getHostedAuthRedirectURL(e,t,n){return this.nylasAuth.getHostedAuthRedirectURL(e,t,n)}async manageHostedAuthCodeExchange(e){const n=new URL(e).searchParams.get("code");if(n){const r=await this.nylasAuth.exchangeAuthCodeForTokenInfo(n);if(r)return this.nylasAuthStore.state.tokenInfo=r,this.nylasAuthStore.state.isAuthenticated=!0,r}return null}}class C{constructor(e,t,n,r,i,a="https://api.us.nylas.com"){this.router=e,this.schedulerAPIURL=a,this.nylasAuth=t,this.nylasAuthStore=n,this.nylasSchedulerStore=r,this.nylasSchedulerConfigStore=i}init(){o.debug("NylasConnector init")}get authStore(){return this.nylasAuthStore}get schedulerStore(){return this.nylasSchedulerStore}get schedulerConfigStore(){return this.nylasSchedulerConfigStore}get auth(){return this._authConnector?this._authConnector:(this._authConnector=new f(this.nylasAuth,this.nylasAuthStore),this._authConnector)}get scheduler(){return this._schedulerAPIConnector?this._schedulerAPIConnector:(this._schedulerAPIConnector=new d.NylaSchedulerAPIConnector({schedulerAPIURL:this.schedulerAPIURL,schedulerStore:this.schedulerStore}),this._schedulerAPIConnector)}getAuth(){return this.nylasAuth}resetStores(){this.nylasAuthStore.reset()}async logout(){await this.nylasAuth.logout(),this.resetStores()}}class A extends Event{constructor(e,t){super(e,t),this.oldURL=t.oldURL,this.newURL=t.newURL}}class R{constructor(){this.routeChangeListeners=[],o.debug("HashRouter constructor")}destroy(){o.debug("HashRouter destroy"),window.removeEventListener("hashchange",this.onRouteChange.bind(this))}init(){if(o.debug("HashRouter init"),window.addEventListener("hashchange",this.onRouteChange.bind(this)),typeof HashChangeEvent<"u"){const e=new HashChangeEvent("hashchange",{oldURL:"",newURL:window.location.href});this.onRouteChange(e)}else{const e=new A("hashchange",{oldURL:"",newURL:window.location.href});this.onRouteChange(e)}}addRouteChangeListener(e,t){o.debug("HashRouter addRouteChangeListener"),this.routeChangeListeners.push([e,t])}navigate(e,t){if(o.debug("HashRouter navigate"),t)return window.history.pushState(null,"",`#${e}`);window.location.hash=e}setRoute(e){o.debug("HashRouter setRoute"),window.location.hash=e}matchRoute(e,t){const n=e.split("/"),r=t.split("/");if(o.debug(`HashRouter matchRoute route=${e} path=${t}`,{routeParts:n,pathParts:r}),n[1]===""&&r[0]==="")return!0;if(n.length!==r.length)return!1;for(let i=0;i<n.length;i++){const a=n[i],h=r[i];if(!a.startsWith(":")&&a!==h)return!1}return!0}getRouteParams(e){o.debug("HashRouter getRouteParams");const t={},n=e.split("/"),r=window.location.hash.split("/");return n.forEach((i,a)=>{if(i.startsWith(":")){const h=i.substring(1);t[h]=r[a]}}),t}getRouteWithParams(e,t){o.debug("HashRouter getRouteWithParams");let n=e;return Object.keys(t).forEach(r=>{n=n.replace(`:${r}`,t[r])}),n}getRoute(){return o.debug("HashRouter getRoute"),window.location.hash}onRouteChange(e){this.routeChangeListeners.forEach(async([t,n])=>{const r=e.newURL.indexOf("#")===-1?"":e.newURL.substring(e.newURL.indexOf("#")+1);if(o.debug(`HashRouter onRouteChange route=${t} path=${r}`,{event:e}),!this.matchRoute(t,r)){o.debug(`HashRouter onRouteChange route=${t} path=${r} does not match`);return}const i=this.getRouteParams(t);await n(t,r,i)})}getBasePath(){return o.debug("HashRouter getBasePath"),""}}function S(s={}){const e={isAuthenticated:!1,tokenInfo:null,state:"ready",...s},t=o.createStore(e);return t.reset=()=>{for(const n in e){const r=e[n];t.set(n,r)}},t}const b=":host{display:contents}",w=b,g=class{constructor(s){o.registerInstance(this,s),this.init=o.createEvent(this,"init",7),this.loggedIn=o.createEvent(this,"loggedIn",7),this.loggedOut=o.createEvent(this,"loggedOut",7),this.handleAuthChange=async e=>{e?this.loggedIn.emit(this.host):this.loggedOut.emit(this.host)},this.authConfig=void 0,this.eventOverrides={},this.automaticComponentRegistration=!0}connectedCallback(){o.debug("[nylas-provider] connectedCallback")}async componentWillLoad(){var i,a,h,u,c;o.debug("[nylas-provider] componentWillLoad"),this.stores={auth:S(),scheduler:d.CreateNylasSchedulerStore(),schedulerConfig:y.CreateNylasSchedulerConfigStore()},this.baseProvider=new l.NylasBaseProvider(this.host,this.stores,this.automaticComponentRegistration,this.eventOverrides);const s=new R;this.nylasAuth=l.es({apiUri:"https://api.us.nylas.com",elementsApiUri:"https://elements.us.nylas.com",storageType:"indexeddb",clientId:"YOUR_CLIENT_ID",defaultScopes:[],redirectURI:"/",...this.authConfig});const e=(i=this.baseProvider)==null?void 0:i.getStore("auth");if(!e)throw new Error("The auth store is not set");const t=(a=this.baseProvider)==null?void 0:a.getStore("scheduler");if(!t)throw new Error("The scheduler store is not set");const n=(h=this.baseProvider)==null?void 0:h.getStore("schedulerConfig");if(!n)throw new Error("The scheduler config store is not set");this.nylasConnector=new C(s,this.nylasAuth,e,t,n),this.init.emit(this.host).defaultPrevented||await((u=this.nylasConnector)==null?void 0:u.auth.validateSession()),this.handleAuthChange(e.state.isAuthenticated),(c=this.baseProvider)==null||c.componentWillLoad(this.nylasConnector)}componentDidLoad(){var e,t;const s=(e=this.baseProvider)==null?void 0:e.getStore("auth");s==null||s.onChange("isAuthenticated",this.handleAuthChange),(t=this.baseProvider)==null||t.componentDidLoad()}componentDisconnected(){var s;(s=this.baseProvider)==null||s.componentDisconnected()}async registerComponentHandler(s){var e;(e=this.baseProvider)==null||e.registerComponent(s.detail)}async unregisterComponentHandler(s){var e;(e=this.baseProvider)==null||e.unregisterComponent(s.detail)}async getNylasAuth(){return this.nylasAuth}async getNylasConnector(){return this.nylasConnector}async getAuthStore(){var s;return(s=this.baseProvider)==null?void 0:s.getStore("auth")}async getNylasSchedulerStore(){var s;return(s=this.baseProvider)==null?void 0:s.getStore("scheduler")}async getNylasSchedulerConfigStore(){var s;return(s=this.baseProvider)==null?void 0:s.getStore("schedulerConfig")}render(){return o.h(o.Host,{key:"a07ace4fe61c7f7ee20b723d1858f7ebac56ff95"},o.h("slot",{key:"7c10f2b5cf18450c28617b3f35215b720f1d8bd2"}))}get host(){return o.getElement(this)}};g.style=w;exports.nylas_provider=g;
|