@nylas/react 1.1.4 → 1.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/add-circle-icon_2.entry-1e899552.js +25 -0
- package/dist/add-circle-icon_2.entry-31acee1d.cjs +1 -0
- package/dist/archive-icon.entry-b5f307e8.js +15 -0
- package/dist/archive-icon.entry-e932c9e6.cjs +1 -0
- package/dist/{arrow-icon.entry-20b50784.js → arrow-icon.entry-aae2e22d.js} +2 -2
- package/dist/{arrow-icon.entry-83c3105b.cjs → arrow-icon.entry-e35a6cad.cjs} +1 -1
- package/dist/{bold-icon.entry-0e3d84e1.cjs → bold-icon.entry-1e3c9b1f.cjs} +1 -1
- package/dist/{bold-icon.entry-34b18d0d.js → bold-icon.entry-d5d86b3f.js} +2 -2
- package/dist/{button-component_2.entry-8a5e99da.js → button-component_2.entry-5284316e.js} +6 -6
- package/dist/{button-component_2.entry-54101987.cjs → button-component_2.entry-a86f8dca.cjs} +1 -1
- package/dist/{calendar-agenda-fill-icon_51.entry-a351dca5.js → calendar-agenda-fill-icon_54.entry-5672c589.js} +1943 -1638
- package/dist/calendar-agenda-fill-icon_54.entry-702b29cc.cjs +10 -0
- package/dist/{calendar-cancel-icon.entry-f83e9b41.js → calendar-cancel-icon.entry-7f81de9d.js} +4 -4
- package/dist/{calendar-cancel-icon.entry-00756264.cjs → calendar-cancel-icon.entry-e9792eaa.cjs} +1 -1
- package/dist/{calendar-check-icon_2.entry-1817540c.js → calendar-check-icon_2.entry-84db1700.js} +7 -7
- package/dist/{calendar-check-icon_2.entry-6ac948fc.cjs → calendar-check-icon_2.entry-ad055b37.cjs} +1 -1
- package/dist/{calendar-icon.entry-68e53f52.cjs → calendar-icon.entry-019f7feb.cjs} +1 -1
- package/dist/{calendar-icon.entry-362428bf.js → calendar-icon.entry-45db1630.js} +2 -2
- package/dist/{checkbox-component_2.entry-5ce9807d.cjs → checkbox-component_2.entry-8325ff88.cjs} +1 -1
- package/dist/{checkbox-component_2.entry-0d7c1916.js → checkbox-component_2.entry-84a053ff.js} +3 -3
- package/dist/{chevron-icon_3.entry-89c52603.cjs → chevron-icon_3.entry-0edde2a6.cjs} +1 -1
- package/dist/{chevron-icon_3.entry-37c087a7.js → chevron-icon_3.entry-ec894a13.js} +6 -6
- package/dist/{clock-icon_4.entry-2e78febe.js → clock-icon_4.entry-8ec9c29b.js} +8 -8
- package/dist/{clock-icon_4.entry-496058ef.cjs → clock-icon_4.entry-935fe48d.cjs} +1 -1
- package/dist/constants-c549b12b-7ea4c7f5.js +763 -0
- package/dist/constants-c549b12b-c85413b1.cjs +1 -0
- package/dist/copy-icon.entry-5a2030da.cjs +1 -0
- package/dist/{copy-icon.entry-6d4e05b0.js → copy-icon.entry-d9405510.js} +7 -7
- package/dist/{delete-icon.entry-ea06b42a.js → delete-icon.entry-1b0a3ba4.js} +7 -7
- package/dist/{delete-icon.entry-e98b336e.cjs → delete-icon.entry-3f3d1ffb.cjs} +1 -1
- package/dist/document-refresh-icon.entry-59a18097.cjs +1 -0
- package/dist/document-refresh-icon.entry-fab58d33.js +15 -0
- package/dist/{feedbackSync-ab657d65-e8b7c001.js → feedbackSync-b56b29ed-7a1f1f75.js} +1 -1
- package/dist/{feedbackSync-ab657d65-e650e46d.cjs → feedbackSync-b56b29ed-b6f352f3.cjs} +1 -1
- package/dist/{folder-icon.entry-6096fbf4.js → folder-icon.entry-b5a123d0.js} +2 -2
- package/dist/{folder-icon.entry-5c3f4e8f.cjs → folder-icon.entry-e85383b6.cjs} +1 -1
- package/dist/{forward-icon.entry-4089e3bb.cjs → forward-icon.entry-7c8ed4c3.cjs} +1 -1
- package/dist/forward-icon.entry-88ab1a85.js +15 -0
- package/dist/{globe-icon.entry-59f4c2f9.js → globe-icon.entry-6fb414ca.js} +4 -4
- package/dist/{globe-icon.entry-e8ca972e.cjs → globe-icon.entry-b1253516.cjs} +1 -1
- package/dist/google-logo-icon_4.entry-ae09d065.cjs +1 -0
- package/dist/{google-logo-icon_4.entry-d4b8926f.js → google-logo-icon_4.entry-fe627741.js} +213 -199
- package/dist/inbox-icon.entry-7dce836e.cjs +1 -0
- package/dist/{inbox-icon.entry-70dae5ec.js → inbox-icon.entry-cec35da1.js} +2 -2
- package/dist/{index-e475e0c0.js → index-3fd31877.js} +3236 -3090
- package/dist/index-bd6fdc8c.cjs +81 -0
- package/dist/{index.es-b475d61f-68a74a28.cjs → index.es-c7ca1bad-0a324dca.cjs} +1 -1
- package/dist/{index.es-b475d61f-bfa2cba2.js → index.es-c7ca1bad-b895d84b.js} +1 -1
- package/dist/{info-icon_2.entry-f1b1dfba.cjs → info-icon_2.entry-1dab6311.cjs} +1 -1
- package/dist/{info-icon_2.entry-2bb60213.js → info-icon_2.entry-f7e6b4aa.js} +5 -5
- package/dist/{input-color-picker.entry-5ae45a9e.js → input-color-picker.entry-30cda4e2.js} +3 -3
- package/dist/{input-color-picker.entry-b669f7fb.cjs → input-color-picker.entry-b6e53c29.cjs} +1 -1
- package/dist/{input-component.entry-eeb95361.cjs → input-component.entry-1f1f8e00.cjs} +1 -1
- package/dist/{input-component.entry-cb958501.js → input-component.entry-7a04bc8b.js} +3 -3
- package/dist/{input-dropdown.entry-0b458f68.cjs → input-dropdown.entry-5e5b67be.cjs} +1 -1
- package/dist/{input-dropdown.entry-962605f8.js → input-dropdown.entry-abf134a8.js} +4 -4
- package/dist/italic-icon.entry-4631c594.js +15 -0
- package/dist/italic-icon.entry-c793243b.cjs +1 -0
- package/dist/{multi-select-dropdown.entry-a66408a2.cjs → multi-select-dropdown.entry-2b8728d5.cjs} +1 -1
- package/dist/{multi-select-dropdown.entry-3084e1fc.js → multi-select-dropdown.entry-9a93da56.js} +2 -2
- package/dist/nylas-booked-event-card_12.entry-8d502a3c.cjs +1 -0
- package/dist/{nylas-booked-event-card_12.entry-29e2a4b1.js → nylas-booked-event-card_12.entry-f13f3f54.js} +299 -294
- package/dist/{nylas-form-card.entry-33b4c295.js → nylas-form-card.entry-862519b4.js} +16 -16
- package/dist/{nylas-form-card.entry-8465eccf.cjs → nylas-form-card.entry-af179b96.cjs} +1 -1
- package/dist/{nylas-if-state.entry-9d96fc87.js → nylas-if-state.entry-8803a762.js} +3 -3
- package/dist/{nylas-if-state.entry-adb6103a.cjs → nylas-if-state.entry-c1c1282d.cjs} +1 -1
- package/dist/{nylas-login.entry-3f7c195e.js → nylas-login.entry-3e12f747.js} +7 -7
- package/dist/{nylas-login.entry-78b968d1.cjs → nylas-login.entry-65f8f046.cjs} +1 -1
- package/dist/{nylas-provider.entry-b918d0f6.cjs → nylas-provider.entry-9626b113.cjs} +1 -1
- package/dist/{nylas-provider.entry-19635620.js → nylas-provider.entry-e3501bd1.js} +5 -5
- package/dist/{nylas-scheduler-editor.entry-cfed7ae2.cjs → nylas-scheduler-editor.entry-17cd1514.cjs} +2 -2
- package/dist/{nylas-scheduler-editor.entry-e848771f.js → nylas-scheduler-editor.entry-6df45b05.js} +25 -25
- package/dist/{nylas-scheduling.entry-da987c02.js → nylas-scheduling.entry-08051ba3.js} +138 -126
- package/dist/nylas-scheduling.entry-b1fafd91.cjs +1 -0
- package/dist/{nylas-time-window-picker.entry-1f76b577.cjs → nylas-time-window-picker.entry-4989d421.cjs} +1 -1
- package/dist/{nylas-time-window-picker.entry-3c6b29d9.js → nylas-time-window-picker.entry-bdc8c6ea.js} +13 -13
- package/dist/{person-icon.entry-79fcd9fb.js → person-icon.entry-d62a16b4.js} +2 -2
- package/dist/{person-icon.entry-82bbb87c.cjs → person-icon.entry-fb7efa8f.cjs} +1 -1
- package/dist/play-icon.entry-01b95392.js +15 -0
- package/dist/{play-icon.entry-3f357ea4.cjs → play-icon.entry-f485a2c8.cjs} +1 -1
- package/dist/react.cjs +1 -1
- package/dist/react.js +9 -9
- package/dist/{refresh-icon.entry-1427a5e6.js → refresh-icon.entry-1ff4b39f.js} +2 -2
- package/dist/{refresh-icon.entry-7ce5ec90.cjs → refresh-icon.entry-5f997e86.cjs} +1 -1
- package/dist/{register-component-679c1308-de697ecb.js → register-component-3444af44-854971ad.js} +1 -1
- package/dist/{register-component-679c1308-b5a96acf.cjs → register-component-3444af44-9053e8c3.cjs} +1 -1
- package/dist/{reply-all-icon.entry-cf8114db.cjs → reply-all-icon.entry-1dad6514.cjs} +1 -1
- package/dist/{reply-all-icon.entry-f1165660.js → reply-all-icon.entry-cbafb8a0.js} +2 -2
- package/dist/reply-icon.entry-162d9945.cjs +1 -0
- package/dist/reply-icon.entry-a43bc252.js +15 -0
- package/dist/{scheduler-config-store-2a3b403d-e5210f72.js → scheduler-config-store-ed4a8dfd-22db9285.js} +1 -2
- package/dist/scheduler-config-store-ed4a8dfd-eeaeaa50.cjs +1 -0
- package/dist/{scheduler-store-908886c8-b0f43cb9.js → scheduler-store-d4784b24-9a5f5734.js} +134 -126
- package/dist/scheduler-store-d4784b24-aed474e8.cjs +1 -0
- package/dist/sent-icon.entry-a05486d5.js +15 -0
- package/dist/sent-icon.entry-a1aec7e9.cjs +1 -0
- package/dist/spam-icon.entry-473f11af.js +15 -0
- package/dist/spam-icon.entry-b481a04b.cjs +1 -0
- package/dist/{star-icon.entry-b15601ca.js → star-icon.entry-12fdc345.js} +5 -5
- package/dist/{star-icon.entry-88501c8b.cjs → star-icon.entry-6b1fe3cf.cjs} +1 -1
- package/dist/stop-icon.entry-4bd609f7.js +15 -0
- package/dist/{stop-icon.entry-3475e257.cjs → stop-icon.entry-72481153.cjs} +1 -1
- package/dist/{textarea-component.entry-d1f4dd9a.js → textarea-component.entry-47e1b2e6.js} +2 -2
- package/dist/{textarea-component.entry-683c2959.cjs → textarea-component.entry-f330a755.cjs} +1 -1
- package/dist/{time-period-selector.entry-e97f86fd.js → time-period-selector.entry-a4899368.js} +2 -2
- package/dist/{time-period-selector.entry-8cfdf750.cjs → time-period-selector.entry-c7611563.cjs} +1 -1
- package/dist/{translate-icon.entry-5757c37c.cjs → translate-icon.entry-40dfa8c9.cjs} +1 -1
- package/dist/{translate-icon.entry-09c5574f.js → translate-icon.entry-4517838d.js} +4 -4
- package/dist/trash-fill-icon.entry-86ca3055.cjs +1 -0
- package/dist/{trash-fill-icon.entry-470ec1ff.js → trash-fill-icon.entry-d7e960eb.js} +3 -3
- package/dist/{underline-icon.entry-9fe74ba7.js → underline-icon.entry-352970f5.js} +2 -2
- package/dist/{underline-icon.entry-6d729068.cjs → underline-icon.entry-f16d4943.cjs} +1 -1
- package/dist/{warning-icon.entry-d924f8f9.js → warning-icon.entry-63987dad.js} +5 -5
- package/dist/{warning-icon.entry-c1d48318.cjs → warning-icon.entry-79ef75b2.cjs} +1 -1
- package/package.json +3 -3
- package/dist/add-circle-icon_2.entry-6753bd65.js +0 -25
- package/dist/add-circle-icon_2.entry-cd9a7f37.cjs +0 -1
- package/dist/archive-icon.entry-434d1696.js +0 -15
- package/dist/archive-icon.entry-7cb1c265.cjs +0 -1
- package/dist/calendar-agenda-fill-icon_51.entry-1920adc2.cjs +0 -7
- package/dist/constants-c31dccfe-04b9cd8a.js +0 -3883
- package/dist/constants-c31dccfe-1a739653.cjs +0 -15
- package/dist/copy-icon.entry-a1baee33.cjs +0 -1
- package/dist/document-refresh-icon.entry-09750b52.cjs +0 -1
- package/dist/document-refresh-icon.entry-afae6621.js +0 -15
- package/dist/forward-icon.entry-da319c05.js +0 -15
- package/dist/google-logo-icon_4.entry-e2001f83.cjs +0 -1
- package/dist/inbox-icon.entry-80ee9082.cjs +0 -1
- package/dist/index-6b9d4b01.cjs +0 -81
- package/dist/italic-icon.entry-4a89e289.cjs +0 -1
- package/dist/italic-icon.entry-5be07509.js +0 -15
- package/dist/nylas-booked-event-card_12.entry-227ccf31.cjs +0 -1
- package/dist/nylas-reminder-emails.entry-ec79b757.js +0 -168
- package/dist/nylas-reminder-emails.entry-ee76db24.cjs +0 -4
- package/dist/nylas-reminder-time_2.entry-105de2d0.js +0 -108
- package/dist/nylas-reminder-time_2.entry-83ecc1d4.cjs +0 -1
- package/dist/nylas-scheduling.entry-e989cf9e.cjs +0 -1
- package/dist/play-icon.entry-97b40470.js +0 -15
- package/dist/reply-icon.entry-3a601cff.js +0 -15
- package/dist/reply-icon.entry-3db337c9.cjs +0 -1
- package/dist/scheduler-config-store-2a3b403d-e6f5bcab.cjs +0 -1
- package/dist/scheduler-store-908886c8-62d14677.cjs +0 -1
- package/dist/sent-icon.entry-2c7bd48e.js +0 -15
- package/dist/sent-icon.entry-708b9a2b.cjs +0 -1
- package/dist/spam-icon.entry-3106ed3d.js +0 -15
- package/dist/spam-icon.entry-fa8b80c6.cjs +0 -1
- package/dist/stop-icon.entry-f926a8db.js +0 -15
- package/dist/trash-fill-icon.entry-4bbfabcc.cjs +0 -1
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { r as
|
|
2
|
-
import { R as
|
|
3
|
-
import { T as
|
|
1
|
+
import { r as k, c as b, d, q as U, h as n, i as c, k as K, H as g, s as X, t as fe, g as G, j as Y, v as be, w as me, x as E, y as he, z as ue, A as z, C as pe, F as ge } from "./index-3fd31877.js";
|
|
2
|
+
import { R as _ } from "./register-component-3444af44-854971ad.js";
|
|
3
|
+
import { T as D, a as Q, b as J } from "./constants-c549b12b-7ea4c7f5.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import "react-dom";
|
|
6
|
-
const
|
|
7
|
-
var
|
|
8
|
-
var o = arguments.length, i = o < 3 ? t :
|
|
6
|
+
const ye = ':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-booked-event-card{height:inherit;display:flex;flex-direction:column;justify-content:space-between;align-items:center;font-family:var(--nylas-font-family)}.event-card-wrapper{display:flex;align-items:center;flex-direction:column;background-color:var(--nylas-base-0);color:var(--nylas-base-900);border-radius:var(--nylas-border-radius-3x);position:relative;margin-top:1rem;margin-bottom:2rem;width:424px;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){.event-card-wrapper{width:100%;border-radius:0px}}.calendar-icon{display:flex;align-items:center;justify-content:center;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);color:var(--nylas-base-700)}.booked-event-header{margin:1.5rem 0;overflow-wrap:anywhere;display:flex;align-items:center;flex-direction:column;font-size:1rem;font-weight:400;border-bottom:1px solid var(--nylas-base-200);width:inherit;padding:0 0 1.5rem}.booked-event-header h2{color:var(--nylas-base-600);margin-top:1.5rem;margin-bottom:0.25rem;font-size:1.125rem;font-weight:600}.booked-event-header .card-description{text-align:center}.booking-date-time,.booking-participants{padding:0 1rem;margin-top:1.5rem;margin-left:3rem;display:flex;flex-direction:column;justify-content:space-between;align-self:flex-start;position:relative}.booking-date-time svg,.booking-participants svg{color:var(--nylas-base-700);position:absolute;left:-10px}.booking-date-time .block,.booking-participants .block{display:block}.booking-date-time h3,.booking-participants h3{color:var(--nylas-base-600);margin:0;font-size:16px;font-weight:600;line-height:1.25rem;text-align:justify;margin-bottom:4px}.booking-date-time p,.booking-participants p{font-size:16px;margin:0;font-weight:400;text-align:justify;color:var(--nylas-base-800)}.booking-participants{margin-bottom:1.5rem}.booked-event-timezone{display:flex;color:var(--nylas-base-600);margin-bottom:1.5rem;gap:4px;margin:2rem;align-items:center;align-self:flex-end}.button-container{width:inherit}.footer{padding:0.5rem;display:grid;grid-template-columns:1fr 1fr;gap:0.5rem;box-sizing:border-box;background-color:var(--nylas-base-25);border-top:1px solid var(--nylas-base-200);width:100%;border-radius:0 0 var(--nylas-border-radius-2x) var(--nylas-border-radius-2x)}.footer.no-template-cols{grid-template-columns:1fr}.footer.no-footer{display:none}sp-divider{background-color:var(--nylas-base-200);height:1px}calendar-check-icon{display:flex;align-items:center;justify-content:center;height:100%}', ve = ye;
|
|
7
|
+
var ke = function(e, t, a, s) {
|
|
8
|
+
var o = arguments.length, i = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, a) : s, r;
|
|
9
9
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
10
|
-
i = Reflect.decorate(e, t, a,
|
|
10
|
+
i = Reflect.decorate(e, t, a, s);
|
|
11
11
|
else
|
|
12
12
|
for (var l = e.length - 1; l >= 0; l--)
|
|
13
|
-
(
|
|
13
|
+
(r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, a, i) : r(t, a)) || i);
|
|
14
14
|
return o > 3 && i && Object.defineProperty(t, a, i), i;
|
|
15
|
-
},
|
|
15
|
+
}, R = function(e, t) {
|
|
16
16
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
17
17
|
return Reflect.metadata(e, t);
|
|
18
18
|
};
|
|
19
|
-
const
|
|
19
|
+
const ee = class {
|
|
20
20
|
constructor(e) {
|
|
21
|
-
|
|
21
|
+
k(this, e), this.cancelBookingButtonClicked = b(this, "cancelBookingButtonClicked", 7), this.rescheduleButtonClicked = b(this, "rescheduleButtonClicked", 7), this.rescheduleBookedEventError = b(this, "rescheduleBookedEventError", 7), this.cancelBookedEventValidationError = b(this, "cancelBookedEventValidationError", 7), this.handleCancelBookingButtonClicked = () => {
|
|
22
22
|
var o, i;
|
|
23
23
|
const t = new Date(this.selectedTimeslot.start_time), a = (i = (o = this.configSettings) == null ? void 0 : o.scheduler) == null ? void 0 : i.min_cancellation_notice;
|
|
24
24
|
t.getTime() - a * 60 * 1e3 < (/* @__PURE__ */ new Date()).getTime() ? this.cancelBookedEventValidationError.emit({
|
|
@@ -41,7 +41,7 @@ const Q = class {
|
|
|
41
41
|
default:
|
|
42
42
|
return "";
|
|
43
43
|
}
|
|
44
|
-
}, this.eventInfo = void 0, this.rescheduleBookingId = void 0, this.bookingInfo = void 0, this.selectedTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone, this.selectedTimeslot = void 0, this.
|
|
44
|
+
}, this.eventInfo = void 0, this.rescheduleBookingId = void 0, this.bookingInfo = void 0, this.configSettings = void 0, this.isLoading = void 0, this.selectedTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone, this.selectedTimeslot = void 0, this.selectedLanguage = navigator.language, this.startTime = "", this.endTime = "";
|
|
45
45
|
}
|
|
46
46
|
connectedCallback() {
|
|
47
47
|
}
|
|
@@ -51,20 +51,21 @@ const Q = class {
|
|
|
51
51
|
d("[nylas-booked-event-card] Component will load");
|
|
52
52
|
}
|
|
53
53
|
async componentDidLoad() {
|
|
54
|
-
|
|
54
|
+
var e, t;
|
|
55
|
+
d("[nylas-booked-event-card] Component did load"), this.eventInfo || console.warn('[nylas-booked-event-card] "eventInfo" prop missing. Please provide the event info to display the event details in the booked event card component.'), this.bookingInfo || console.warn('[nylas-booked-event-card] "bookingInfo" prop missing. Please provide the booking info to display the guest details in the booked event card component.'), this.startTime = U((e = this.selectedTimeslot) == null ? void 0 : e.start_time, this.selectedTimezone), this.endTime = U((t = this.selectedTimeslot) == null ? void 0 : t.end_time, this.selectedTimezone);
|
|
55
56
|
}
|
|
56
57
|
render() {
|
|
57
|
-
var a,
|
|
58
|
+
var a, s, o, i, r, l, p, m, f, u, h, v, x, w, C, y;
|
|
58
59
|
const e = (a = this.configSettings) == null ? void 0 : a.booking_type, t = e && e !== "booking";
|
|
59
|
-
return n(g, { key: "
|
|
60
|
+
return n(g, { key: "4c047c53d7532b60d6d28be607b3e926e07f2e50", part: "nbec" }, n("div", { key: "154180aa38c82fc2e28d8b9ad753804fdfb837d7", class: "nylas-booked-event-card" }, n("div", { key: "a6d046deffb82706bd609a2ac7f33f462578326a", class: "booked-event-timezone" }, n("globe-icon", { key: "22418924800ed88cdf685441561728ecac4594cd" }), D[this.selectedTimezone]), n("div", { key: "f4f4ffb1ff084cba9f1032c1d5e394a9b65286e2", class: "event-card-wrapper", part: "nbec__card" }, n("div", { key: "7440e6baed4f509594acf69166566a6546d9b2ae", class: "calendar-icon" }, n("calendar-check-icon", { key: "6a82cfb9ac8d89bb8151e86dcbb9d49422513b89" })), n("div", { key: "c913c479384ecd4e5df96dea05a1305a12df76c8", class: "booked-event-header" }, n("h2", { key: "c818d579e73751d6e83bf50f9dc34a3523e2b0f1", slot: "card-title", part: "nbec__title" }, this.rescheduleBookingId && !this.isLoading ? `${c.t("bookingRescheduled")}` : t && !this.isLoading ? `${c.t("bookingSent")}` : `${c.t("bookingConfirmed")}`, "!"), n("div", { key: "bb6cef397ebe5aec3ed49f455ac00430594c4c6f", class: "card-description", part: "nbec__description" }, t ? c.t("bookingSentDescription") : n("span", null, c.t("bookingConfirmedDescription")))), n("div", { key: "d4732fc9421c4d54062bdac74e69a476322f168a", class: "booking-date-time" }, n("checkmark-circle-icon", { key: "caadcce299c4506d709a65bfbc3d10fec64ef6d6" }), n("h3", { key: "8a2dc813f1be6bab13a53328c4e9dbb5ec7d41df" }, c.t("bookingDateAndTimeHeader")), n("p", { key: "fedc61f46ba1b96e424b23aff08c382296e4a6d3" }, (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" })) : "-", " ", n("br", { key: "6efc18bfd398bca545c359b5876ff9a16792485f" }), this.startTime, " - ", this.endTime)), n("div", { key: "c972d3fc4f1541ec6a1fde958176de0adccf3bcd", class: "booking-participants" }), !t && n("div", { class: "button-container" }, n("div", { class: {
|
|
60
61
|
footer: !0,
|
|
61
|
-
"no-footer": ((
|
|
62
|
-
"no-template-cols": ((
|
|
63
|
-
} }, !((w = (
|
|
62
|
+
"no-footer": ((r = (i = this.configSettings) == null ? void 0 : i.scheduler) == null ? void 0 : r.hide_cancellation_options) && ((p = (l = this.configSettings) == null ? void 0 : l.scheduler) == null ? void 0 : p.hide_rescheduling_options) || ((m = this.configSettings) == null ? void 0 : m.booking_type) === "organizer-confirmation",
|
|
63
|
+
"no-template-cols": ((u = (f = this.configSettings) == null ? void 0 : f.scheduler) == null ? void 0 : u.hide_cancellation_options) || ((v = (h = this.configSettings) == null ? void 0 : h.scheduler) == null ? void 0 : v.hide_rescheduling_options)
|
|
64
|
+
} }, !((w = (x = this.configSettings) == null ? void 0 : x.scheduler) != null && w.hide_cancellation_options) && n("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) && n("button-component", { variant: "basic", onClick: this.handleRescheduleButtonClicked, part: "nbec__button-outline nbec__reschedule-cta" }, `${c.t("rescheduleBookingButton")}`))))));
|
|
64
65
|
}
|
|
65
66
|
};
|
|
66
|
-
|
|
67
|
-
|
|
67
|
+
ke([
|
|
68
|
+
_({
|
|
68
69
|
name: "nylas-booked-event-card",
|
|
69
70
|
stateToProps: /* @__PURE__ */ new Map([
|
|
70
71
|
["scheduler.bookingInfo", "bookingInfo"],
|
|
@@ -80,8 +81,8 @@ ve([
|
|
|
80
81
|
t.scheduler.setCancel(e.detail.bookingId);
|
|
81
82
|
},
|
|
82
83
|
rescheduleButtonClicked: async (e, t) => {
|
|
83
|
-
const a = await t.scheduler.setReschedule(e.detail.bookingId), { errorHandler:
|
|
84
|
-
|
|
84
|
+
const a = await t.scheduler.setReschedule(e.detail.bookingId), { errorHandler: s } = e.detail;
|
|
85
|
+
s && (!a || "error" in a) && s(a);
|
|
85
86
|
},
|
|
86
87
|
rescheduleBookedEventError: async (e, t) => {
|
|
87
88
|
d("nylas-booked-event-card", "rescheduleBookedEventError", e.detail);
|
|
@@ -92,36 +93,36 @@ ve([
|
|
|
92
93
|
},
|
|
93
94
|
fireRegisterEvent: !0
|
|
94
95
|
}),
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
],
|
|
99
|
-
|
|
100
|
-
const
|
|
101
|
-
var
|
|
102
|
-
var o = arguments.length, i = o < 3 ? t :
|
|
96
|
+
R("design:type", Function),
|
|
97
|
+
R("design:paramtypes", []),
|
|
98
|
+
R("design:returntype", void 0)
|
|
99
|
+
], ee.prototype, "render", null);
|
|
100
|
+
ee.style = ve;
|
|
101
|
+
const Ce = ':host{display:block;height:100%;--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-booking-form{width:100%;padding:1.5rem;box-sizing:border-box;height:450px;overflow-y:auto;height:100%}form{height:100%;display:flex;flex-direction:column;justify-content:space-between;align-items:center}sp-textfield{--spectrum-corner-radius-100:var(--nylas-border-radius-2x);--spectrum-textfield-border-color:var(--nylas-base-300);position:relative;width:100%;height:48px;margin-bottom:16px;color:var(--nylas-base-500)}.cta{width:100%;display:grid;grid-template-columns:1fr 1fr;gap:0.5rem;align-items:flex-start;justify-content:space-between;gap:0.5rem;padding:14px;box-sizing:border-box;border-top:1px solid var(--nylas-base-200)}@media screen and (max-width: 768px){.cta{grid-template-columns:1fr}}.input-wrapper{width:100%;display:flex;flex-direction:column;align-items:flex-start;gap:4px;margin-bottom:1rem}.input-wrapper input::placeholder{color:var(--nylas-base-300)}.input-wrapper label,.input-wrapper input{font-family:var(--nylas-font-family);font-size:16px}.input-wrapper .help-text{margin:0;color:var(--nylas-error)}.button-wrapper{width:100%;align-items:flex-start;height:max-content;position:relative}.button-content{display:flex;gap:4px;align-items:center}sp-infield-button{--spectrum-infield-button-background-color:transparent;--spectrum-infield-button-background-color-hover:transparent;--spectrum-infield-button-background-color-active:transparent;--spectrum-infield-button-border-color:transparent;--spectrum-infield-button-border-width:1px;--spectrum-infield-button-border-radius:0;color:var(--nylas-base-600);background:transparent;border:none;outline:1px solid var(--nylas-base-300);border-radius:0 var(--nylas-border-radius-2x) var(--nylas-border-radius-2x) 0;height:52px;width:52px;display:flex;position:absolute;right:0;align-items:center;justify-content:center;cursor:pointer}sp-infield-button sp-icon-cross300{color:var(--nylas-base-600)}sp-infield-button.error{border-width:2px;border-color:var(--nylas-error)}input[type=text],input[type=email]{display:flex;height:48px;padding-left:16px;align-items:center;gap:8px;align-self:stretch;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-300);background:var(--nylas-base-0);width:-webkit-fill-available;color:var(--nylas-base-900);font-size:16px;font-style:normal;font-weight:400;line-height:150%}input[type=text]:focus,input[type=email]:focus{outline-color:var(--nylas-primary)}input[type=text].error,input[type=email].error{border-radius:var(--nylas-border-radius-2x);font-weight:600;border-color:var(--nylas-error);border-width:2px}input[type=text].error::placeholder,input[type=email].error::placeholder{font-weight:400}input[type=text]::placeholder,input[type=email]::placeholder{color:var(--nylas-base-300)}input[type=text].guest-email,input[type=email].guest-email{color:var(--nylas-base-900);padding-right:52px}label{display:flex;color:var(--nylas-base-800, #293056);font-size:14px;font-style:normal;font-weight:400;line-height:150%}label.error{color:var(--nylas-error)}label span.required{color:var(--nylas-error);padding:0 0.25rem}button-component.remove-guest{position:absolute;height:51px;right:0}button-component.remove-guest.error button{border-color:var(--nylas-error)}button-component.remove-guest button{height:inherit;border-top-left-radius:initial;border-bottom-left-radius:initial;border:none !important;border-left:1px solid var(--nylas-base-300) !important}button-component.remove-guest button:hover,button-component.remove-guest button:focus{outline:1px solid var(--nylas-primary) !important;color:var(--nylas-primary)}button-component.back button{--dot-color:var(--nylas-base-800)}.guest-email-input{position:relative;display:flex;width:100%}', _e = Ce;
|
|
102
|
+
var xe = function(e, t, a, s) {
|
|
103
|
+
var o = arguments.length, i = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, a) : s, r;
|
|
103
104
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
104
|
-
i = Reflect.decorate(e, t, a,
|
|
105
|
+
i = Reflect.decorate(e, t, a, s);
|
|
105
106
|
else
|
|
106
107
|
for (var l = e.length - 1; l >= 0; l--)
|
|
107
|
-
(
|
|
108
|
+
(r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, a, i) : r(t, a)) || i);
|
|
108
109
|
return o > 3 && i && Object.defineProperty(t, a, i), i;
|
|
109
|
-
},
|
|
110
|
+
}, j = function(e, t) {
|
|
110
111
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
111
112
|
return Reflect.metadata(e, t);
|
|
112
113
|
};
|
|
113
|
-
const
|
|
114
|
+
const L = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/, te = class {
|
|
114
115
|
constructor(e) {
|
|
115
|
-
|
|
116
|
+
k(this, e), this.nameChanged = b(this, "nameChanged", 7), this.emailChanged = b(this, "emailChanged", 7), this.backButtonClicked = b(this, "backButtonClicked", 7), this.detailsConfirmed = b(this, "detailsConfirmed", 7), this.bookingFormError = b(this, "bookingFormError", 7), this.bookingFormSubmitted = b(this, "bookingFormSubmitted", 7), this.handleGuestChange = (t, a) => {
|
|
116
117
|
this.resetGuestEmailError(t);
|
|
117
|
-
const
|
|
118
|
-
|
|
118
|
+
const s = [...this.guestEmails];
|
|
119
|
+
s[t] = X(a), this.guestEmails = [...s];
|
|
119
120
|
}, this.handleGuestBlur = (t, a) => {
|
|
120
121
|
if (this.resetGuestEmailError(t), a === "") {
|
|
121
122
|
this.guestEmailErrors[t] = c.t("fieldRequired", { field: c.t("email") });
|
|
122
123
|
return;
|
|
123
124
|
}
|
|
124
|
-
if (!
|
|
125
|
+
if (!L.test(a)) {
|
|
125
126
|
this.guestEmailErrors[t] = c.t("invalidInputFormat", { field: c.t("email") });
|
|
126
127
|
return;
|
|
127
128
|
}
|
|
@@ -130,17 +131,17 @@ const S = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-
|
|
|
130
131
|
t.preventDefault(), this.guestEmails = [...this.guestEmails, ""];
|
|
131
132
|
}, this.removeGuestButtonClickHandler = (t, a) => {
|
|
132
133
|
t.preventDefault(), this.resetGuestEmailError(a);
|
|
133
|
-
const
|
|
134
|
-
|
|
134
|
+
const s = [...this.guestEmails];
|
|
135
|
+
s.splice(a, 1), this.guestEmails = [...s];
|
|
135
136
|
}, this.handleBackButtonClicked = (t) => {
|
|
136
137
|
t.preventDefault(), this.backButtonLoading = !0, this.backButtonClicked.emit();
|
|
137
138
|
}, this.bookButtonClickedHandler = async (t) => {
|
|
138
|
-
var l,
|
|
139
|
+
var l, p, m, f, u, h, v, x, w;
|
|
139
140
|
if (t.preventDefault(), this.bookingFormSubmitted.emit().defaultPrevented)
|
|
140
141
|
return;
|
|
141
142
|
d("nylas-booking-form", "bookButtonClickedHandler", this.bookingInfo);
|
|
142
|
-
const
|
|
143
|
-
if (!
|
|
143
|
+
const s = this.name || ((p = (l = this.bookingInfo) == null ? void 0 : l.primaryParticipant) == null ? void 0 : p.name), o = this.email || ((f = (m = this.bookingInfo) == null ? void 0 : m.primaryParticipant) == null ? void 0 : f.email);
|
|
144
|
+
if (!s || s === "") {
|
|
144
145
|
this.isNameValid = !1, this.validationError.name = c.t("fieldRequired", { field: c.t("name") }) || "Name is required", this.bookingFormError.emit({
|
|
145
146
|
title: "Booking form error",
|
|
146
147
|
description: "Name is required"
|
|
@@ -154,7 +155,7 @@ const S = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-
|
|
|
154
155
|
});
|
|
155
156
|
return;
|
|
156
157
|
}
|
|
157
|
-
if (!
|
|
158
|
+
if (!L.test(o)) {
|
|
158
159
|
this.isEmailValid = !1, this.validationError.email = c.t("invalidInputFormat", { field: c.t("email") }), this.bookingFormError.emit({
|
|
159
160
|
title: "Booking form error",
|
|
160
161
|
description: c.t("invalidInputFormat", { field: c.t("email") }) || "Invalid email"
|
|
@@ -163,30 +164,33 @@ const S = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-
|
|
|
163
164
|
}
|
|
164
165
|
let i = [];
|
|
165
166
|
if (this.guestEmails.length > 0) {
|
|
166
|
-
let
|
|
167
|
-
if (this.guestEmails.forEach((
|
|
168
|
-
|
|
169
|
-
}),
|
|
167
|
+
let C = !1;
|
|
168
|
+
if (this.guestEmails.forEach((y, B) => {
|
|
169
|
+
y === "" ? (C = !0, this.guestEmailErrors = { ...this.guestEmailErrors, [B]: c.t("fieldRequired", { field: c.t("email") }) }) : L.test(y) || (C = !0, this.guestEmailErrors = { ...this.guestEmailErrors, [B]: c.t("invalidInputFormat", { field: c.t("email") }) });
|
|
170
|
+
}), C) {
|
|
170
171
|
this.bookingFormError.emit({
|
|
171
172
|
title: "Booking form error",
|
|
172
173
|
description: c.t("invalidInputFormat", { field: c.t("guestEmail") }) || "Invalid guest email"
|
|
173
174
|
});
|
|
174
175
|
return;
|
|
175
176
|
}
|
|
176
|
-
i = this.guestEmails.map((
|
|
177
|
+
i = this.guestEmails.map((y) => ({ name: y.trim(), email: y.trim() }));
|
|
177
178
|
} else
|
|
178
|
-
(
|
|
179
|
-
const
|
|
180
|
-
(
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
179
|
+
(u = this.bookingInfo) != null && u.guests && (i = (h = this.bookingInfo) == null ? void 0 : h.guests);
|
|
180
|
+
const r = {};
|
|
181
|
+
if ((v = this.bookingInfo) != null && v.additionalFields) {
|
|
182
|
+
const C = ((w = (x = this.configSettings) == null ? void 0 : x.scheduler) == null ? void 0 : w.additional_fields) || {};
|
|
183
|
+
Object.entries(this.bookingInfo.additionalFields).forEach(([y, B]) => {
|
|
184
|
+
y in C && (r[y] = B.value);
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
this.detailsConfirmed.emit({
|
|
184
188
|
primaryParticipant: {
|
|
185
|
-
name:
|
|
189
|
+
name: s,
|
|
186
190
|
email: o
|
|
187
191
|
},
|
|
188
192
|
guests: i,
|
|
189
|
-
additionalFields: { ...
|
|
193
|
+
additionalFields: { ...r, ...this.additionalFields }
|
|
190
194
|
});
|
|
191
195
|
}, this.updateAdditionalFields = (t, a) => {
|
|
192
196
|
this.additionalFields && (this.additionalFields[t] = a);
|
|
@@ -204,10 +208,10 @@ const S = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-
|
|
|
204
208
|
e && e.primaryParticipant && (this.name = e.primaryParticipant.name, this.email = e.primaryParticipant.email);
|
|
205
209
|
}
|
|
206
210
|
changeName(e) {
|
|
207
|
-
this.isNameValid = !0, this.validationError.name = "", this.name =
|
|
211
|
+
this.isNameValid = !0, this.validationError.name = "", this.name = fe(e), this.nameChanged.emit(e);
|
|
208
212
|
}
|
|
209
213
|
changeEmail(e) {
|
|
210
|
-
this.isEmailValid = !0, this.validationError.email = "", this.email =
|
|
214
|
+
this.isEmailValid = !0, this.validationError.email = "", this.email = X(e), this.emailChanged.emit(e);
|
|
211
215
|
}
|
|
212
216
|
resetGuestEmailError(e) {
|
|
213
217
|
const t = { ...this.guestEmailErrors };
|
|
@@ -256,40 +260,40 @@ const S = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-
|
|
|
256
260
|
this.updateAdditionalFields(e.detail.name, e.detail.value);
|
|
257
261
|
}
|
|
258
262
|
render() {
|
|
259
|
-
var e, t, a,
|
|
260
|
-
return n(g, { key: "
|
|
263
|
+
var e, t, a, s, o, i, r, l, p;
|
|
264
|
+
return n(g, { key: "0ea30bef8b00673240ee959d6b8baaffc7d2c715" }, n("form", { key: "d5bf36df0f5419c98b5114719c731e8c3201bc7b", onSubmit: (m) => this.bookButtonClickedHandler(m), noValidate: !0 }, n("div", { key: "2a7a7cbaae2af6f3b79e23366752a421bf2304ba", class: "nylas-booking-form", part: "nbf" }, n("div", { key: "9af4ebc990cb2ef4e3e58af148eb7609b203c78a", class: "input-wrapper", part: "nbf__input-wrapper" }, n("input-component", { key: "31ea0d5c904a62c2c9b8d7572b448d9a28b24e86", 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" })), n("div", { key: "95de0dabca66d11e1370b282e4d23eb545fb33a6", class: "input-wrapper", part: "nbf__input-wrapper" }, n("input-component", { key: "712b25028a9d12bde236ada12c9b8ee15a70c885", label: c.t("email"), name: "email", id: "email", pattern: L, defaultValue: ((s = (a = this.bookingInfo) == null ? void 0 : a.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 && n("div", { class: "input-wrapper", part: "nbf__input-wrapper" }, this.guestEmails.map((m, f) => n("div", { class: "input-wrapper button-wrapper" }, n("label", { class: {
|
|
261
265
|
error: !!this.guestEmailErrors[f]
|
|
262
266
|
} }, c.t("guestEmail")), n("div", { class: "guest-email-input" }, n("input", { type: "email", id: `guest-email-${f}`, maxLength: 100, class: {
|
|
263
267
|
"guest-email": !0,
|
|
264
268
|
error: !!this.guestEmailErrors[f]
|
|
265
|
-
}, placeholder: c.t("guestEmailPlaceholder"), value: m, "data-index": f, part: "nbf__input-textfield", onBlur: (
|
|
266
|
-
var
|
|
267
|
-
return this.handleGuestBlur(f, (
|
|
268
|
-
}, onInput: (
|
|
269
|
-
var
|
|
270
|
-
return this.handleGuestChange(f, (
|
|
271
|
-
} }), n("button-component", { variant: "basic", tooltip: "Remove guest", onClick: (
|
|
269
|
+
}, placeholder: c.t("guestEmailPlaceholder"), value: m, "data-index": f, part: "nbf__input-textfield", onBlur: (u) => {
|
|
270
|
+
var h;
|
|
271
|
+
return this.handleGuestBlur(f, (h = u.target) == null ? void 0 : h.value);
|
|
272
|
+
}, onInput: (u) => {
|
|
273
|
+
var h;
|
|
274
|
+
return this.handleGuestChange(f, (h = u.target) == null ? void 0 : h.value);
|
|
275
|
+
} }), n("button-component", { variant: "basic", tooltip: "Remove guest", onClick: (u) => this.removeGuestButtonClickHandler(u, f), class: {
|
|
272
276
|
"remove-guest": !0,
|
|
273
277
|
error: !!this.guestEmailErrors[f]
|
|
274
|
-
} }, n("close-icon", null))), n("p", { class: "help-text" }, this.guestEmailErrors[f]))), n("button-component", { class: "add-guest", variant: "invisible", part: "nbf__button-ghost", onClick: (m) => this.addGuestButtonClickedHandler(m) }, n("div", { class: "button-content" }, n("add-circle-icon", { slot: "icon" }), this.guestEmails.length > 0 ? `${c.t("addAnotherGuest")}` : `${c.t("addGuest")}`))), (
|
|
275
|
-
var
|
|
276
|
-
const f = m[1],
|
|
278
|
+
} }, n("close-icon", null))), n("p", { class: "help-text" }, this.guestEmailErrors[f]))), n("button-component", { class: "add-guest", variant: "invisible", part: "nbf__button-ghost", onClick: (m) => this.addGuestButtonClickedHandler(m) }, n("div", { class: "button-content" }, n("add-circle-icon", { slot: "icon" }), this.guestEmails.length > 0 ? `${c.t("addAnotherGuest")}` : `${c.t("addGuest")}`))), (p = Object.entries(((l = (r = this.configSettings) == null ? void 0 : r.scheduler) == null ? void 0 : l.additional_fields) || {})) == null ? void 0 : p.sort((m, f) => m[1].order - f[1].order).map((m) => {
|
|
279
|
+
var x, w, C, y, B, W;
|
|
280
|
+
const f = m[1], u = f.label, h = m[0], v = ((C = (w = (x = this.bookingInfo) == null ? void 0 : x.additionalFields) == null ? void 0 : w[h]) == null ? void 0 : C.value) || "";
|
|
277
281
|
switch (f.type) {
|
|
278
282
|
case "dropdown":
|
|
279
|
-
return n("div", { class: "input-wrapper", part: "nbf__input-wrapper" }, n("select-dropdown", { label:
|
|
283
|
+
return n("div", { class: "input-wrapper", part: "nbf__input-wrapper" }, n("select-dropdown", { label: u, name: h, id: h, withSearch: !1, defaultSelectedOption: v ? { value: v, label: v } : void 0, options: (y = f.options) == null ? void 0 : y.map((T) => ({ value: T, label: T })), required: f.required, exportparts: "sd_dropdown: nbf__dropdown, sd_dropdown-button: nbf__dropdown-button, sd_dropdown-content: nbf__dropdown-content" }));
|
|
280
284
|
case "checkbox":
|
|
281
|
-
return n("div", { class: "input-wrapper", part: "nbf__input-wrapper" }, n("checkbox-component", { label:
|
|
285
|
+
return n("div", { class: "input-wrapper", part: "nbf__input-wrapper" }, n("checkbox-component", { label: u, name: h, id: h, checked: v === "true", required: f.required, part: "nbf__checkbox-component" }));
|
|
282
286
|
case "radio_button":
|
|
283
|
-
return n("div", { class: "input-wrapper", part: "nbf__input-wrapper" }, n("radio-button-group", { label:
|
|
287
|
+
return n("div", { class: "input-wrapper", part: "nbf__input-wrapper" }, n("radio-button-group", { label: u, name: h, id: h, defaultSelectedValue: v || ((B = f.options) == null ? void 0 : B[0]) || "", options: (W = f.options) == null ? void 0 : W.map((T) => ({ value: T, label: T })), required: f.required, part: "nbf__radio-button-group" }));
|
|
284
288
|
case "multi_line_text":
|
|
285
|
-
return n("div", { class: "input-wrapper", part: "nbf__input-wrapper" }, n("textarea-component", { label:
|
|
289
|
+
return n("div", { class: "input-wrapper", part: "nbf__input-wrapper" }, n("textarea-component", { label: u, defaultValue: v, name: h, id: h, required: f.required, part: "nbf__textarea-component" }));
|
|
286
290
|
default:
|
|
287
|
-
return n("div", { class: "input-wrapper", part: "nbf__input-wrapper" }, n("input-component", { label:
|
|
291
|
+
return n("div", { class: "input-wrapper", part: "nbf__input-wrapper" }, n("input-component", { label: u, name: h, id: h, type: f.type, defaultValue: v || "", requiredError: c.t("fieldRequired", { field: u }), required: f.required, part: "nbf__input-textfield" }));
|
|
288
292
|
}
|
|
289
|
-
})), n("div", { key: "
|
|
293
|
+
})), n("div", { key: "f89d9ed23eca94e127aca472e8444336160a4a49", class: "cta" }, n("button-component", { key: "e1de4364cd5d351f23499ab82bf4d444185a47cc", variant: "basic", class: "back", part: "nbf__button-outline", isLoading: this.backButtonLoading && this.isLoading, onClick: this.handleBackButtonClicked }, n("slot", { key: "1b1a422766e53e8e1aec7d31db9c2406afec3da1", name: "booking-form-back-label" }, `${c.t("backButton")}`)), n("button-component", { key: "68c249ef1ca7dad8b6217d86662dd195ec77b016", variant: "primary", isLoading: !this.backButtonLoading && this.isLoading, disabled: this.isLoading, part: "nbf__button-primary", type: "submit" }, n("slot", { key: "de2c7d09c9203409e7d92b80f6901b5099ab1163", name: "booking-form-book-label" }, `${c.t("bookNowButton")}`)))));
|
|
290
294
|
}
|
|
291
295
|
get host() {
|
|
292
|
-
return
|
|
296
|
+
return G(this);
|
|
293
297
|
}
|
|
294
298
|
static get watchers() {
|
|
295
299
|
return {
|
|
@@ -297,8 +301,8 @@ const S = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-
|
|
|
297
301
|
};
|
|
298
302
|
}
|
|
299
303
|
};
|
|
300
|
-
|
|
301
|
-
|
|
304
|
+
xe([
|
|
305
|
+
_({
|
|
302
306
|
name: "nylas-booking-form",
|
|
303
307
|
stateToProps: /* @__PURE__ */ new Map([
|
|
304
308
|
["scheduler.isLoading", "isLoading"],
|
|
@@ -328,37 +332,37 @@ _e([
|
|
|
328
332
|
},
|
|
329
333
|
fireRegisterEvent: !0
|
|
330
334
|
}),
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
],
|
|
335
|
-
|
|
336
|
-
const
|
|
337
|
-
var
|
|
338
|
-
var o = arguments.length, i = o < 3 ? t :
|
|
335
|
+
j("design:type", Function),
|
|
336
|
+
j("design:paramtypes", []),
|
|
337
|
+
j("design:returntype", void 0)
|
|
338
|
+
], te.prototype, "render", null);
|
|
339
|
+
te.style = _e;
|
|
340
|
+
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}', Ee = we;
|
|
341
|
+
var Be = function(e, t, a, s) {
|
|
342
|
+
var o = arguments.length, i = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, a) : s, r;
|
|
339
343
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
340
|
-
i = Reflect.decorate(e, t, a,
|
|
344
|
+
i = Reflect.decorate(e, t, a, s);
|
|
341
345
|
else
|
|
342
346
|
for (var l = e.length - 1; l >= 0; l--)
|
|
343
|
-
(
|
|
347
|
+
(r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, a, i) : r(t, a)) || i);
|
|
344
348
|
return o > 3 && i && Object.defineProperty(t, a, i), i;
|
|
345
|
-
},
|
|
349
|
+
}, F = function(e, t) {
|
|
346
350
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
347
351
|
return Reflect.metadata(e, t);
|
|
348
352
|
};
|
|
349
|
-
const
|
|
353
|
+
const ne = class {
|
|
350
354
|
constructor(e) {
|
|
351
355
|
var t, a;
|
|
352
|
-
|
|
356
|
+
k(this, e), this.goBackButtonClicked = b(this, "goBackButtonClicked", 7), this.cancelBookingFormSubmitted = b(this, "cancelBookingFormSubmitted", 7), this.triggerValidation = b(this, "triggerValidation", 7), this.cancelBookedEventError = b(this, "cancelBookedEventError", 7), this.cancelBookingFormError = b(this, "cancelBookingFormError", 7), this.handleGoBackClicked = () => {
|
|
353
357
|
this.goBackButtonClicked.emit();
|
|
354
|
-
}, this.handleSubmitCancelBooking = (
|
|
355
|
-
var
|
|
356
|
-
if (this.triggerValidation.emit({}),
|
|
358
|
+
}, this.handleSubmitCancelBooking = (s) => {
|
|
359
|
+
var r, l, p;
|
|
360
|
+
if (this.triggerValidation.emit({}), s.preventDefault(), !this.cancellationReason) {
|
|
357
361
|
this.cancellationError = c.t("cancellationErrorMessage"), this.cancelBookingFormError.emit({ title: c.t("cancelBokingFormError"), description: c.t("cancellationErrorMessage") });
|
|
358
362
|
return;
|
|
359
363
|
}
|
|
360
|
-
const o = (l = (
|
|
361
|
-
if (this.selectedTimeslot && o && new Date((
|
|
364
|
+
const o = (l = (r = this.configSettings) == null ? void 0 : r.scheduler) == null ? void 0 : l.min_cancellation_notice;
|
|
365
|
+
if (this.selectedTimeslot && o && new Date((p = this.selectedTimeslot) == null ? void 0 : p.start_time).getTime() - o * 60 * 1e3 < (/* @__PURE__ */ new Date()).getTime()) {
|
|
362
366
|
this.cancelBookedEventError.emit({
|
|
363
367
|
error: {
|
|
364
368
|
title: c.t("cancellationErrorTitle"),
|
|
@@ -372,7 +376,7 @@ const te = class {
|
|
|
372
376
|
this.cancelBookedEventError.emit(m);
|
|
373
377
|
};
|
|
374
378
|
this.cancelBookingId ? this.cancelBookingFormSubmitted.emit({ bookingId: this.cancelBookingId, action: "cancel", reason: this.cancellationReason, errorHandler: i }) : this.rejectBookingId && this.cancelBookingFormSubmitted.emit({ bookingId: this.rejectBookingId, action: "reject", reason: this.cancellationReason, errorHandler: i });
|
|
375
|
-
}, this.cancelBookingId = void 0, this.rejectBookingId = void 0, this.
|
|
379
|
+
}, this.cancelBookingId = void 0, this.rejectBookingId = void 0, this.selectedTimeslot = void 0, this.configSettings = void 0, this.eventInfo = void 0, this.isLoading = void 0, this.cancellationReason = "", this.cancellationError = "", this.cancellationPolicy = ((a = (t = this.configSettings) == null ? void 0 : t.scheduler) == null ? void 0 : a.cancellation_policy) || "Your current timeslot will become available to others.";
|
|
376
380
|
}
|
|
377
381
|
configSettingsChangedHandler(e) {
|
|
378
382
|
var t;
|
|
@@ -395,7 +399,7 @@ const te = class {
|
|
|
395
399
|
}
|
|
396
400
|
render() {
|
|
397
401
|
var e, t;
|
|
398
|
-
return n(g, { key: "
|
|
402
|
+
return n(g, { key: "c4bdf11986a6efc5b9005e82583c3e0543c424b7", part: "ncbf" }, n("div", { key: "be45863d677fc6f4e0e7a473367d4e668988a6e3", class: "nylas-cancel-booking-form", part: "ncbf__card" }, n("div", { key: "acd1467de81bc7518ef026d18abaf2bec08ee9e7", class: "nylas-cancel-booking-form__calendar-icon", part: "ncbf__icon" }, n("calendar-cancel-icon", { key: "8622cec85da5c6767d4acd913d540ab5379d6a6b" })), n("h3", { key: "b16e109071f7b3ce4bdeff18d75b395b6397ef66", class: "nylas-cancel-booking-form__title", part: "ncbf__title" }, c.t("cancelBookingTitle")), n("div", { key: "99a98fda2cf78631fbf217425e98f50053819944", 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")}`), n("form", { key: "4f139a76c233767562d69e6abbc8bed2fe7068a4", onSubmit: this.handleSubmitCancelBooking }, n("textarea-component", { key: "cb9cb36cbc8054f0c99049230edd6867864b85eb", id: "cancel-reason", name: "cancel-reason", required: !0, label: c.t("reasonForCancellation"), class: this.cancellationError ? "error" : "", part: "ncbf__reason-textarea", defaultValue: this.cancellationReason }), n("div", { key: "d10517e31cc74630c726db714b2ec2f732ebb595", class: "footer" }, n("button-component", { key: "4074187227af0cb6c35a530faef004edde580f34", variant: "destructive", class: "cancel", type: "submit", part: "ncbf__button-cta", disabled: this.isLoading }, c.t("cancelBookingButton")), !!this.eventInfo && n("button-component", { variant: "basic", class: "back", part: "ncbf__button-outline", onClick: this.handleGoBackClicked }, c.t("goBackButton"))))));
|
|
399
403
|
}
|
|
400
404
|
static get watchers() {
|
|
401
405
|
return {
|
|
@@ -403,8 +407,8 @@ const te = class {
|
|
|
403
407
|
};
|
|
404
408
|
}
|
|
405
409
|
};
|
|
406
|
-
|
|
407
|
-
|
|
410
|
+
Be([
|
|
411
|
+
_({
|
|
408
412
|
name: "nylas-cancel-booking-form",
|
|
409
413
|
stateToProps: /* @__PURE__ */ new Map([
|
|
410
414
|
["scheduler.configSettings", "configSettings"],
|
|
@@ -416,17 +420,17 @@ Ee([
|
|
|
416
420
|
]),
|
|
417
421
|
eventToProps: {
|
|
418
422
|
cancelBookingFormSubmitted: async (e, t) => {
|
|
419
|
-
const { action: a, errorHandler:
|
|
423
|
+
const { action: a, errorHandler: s } = e.detail;
|
|
420
424
|
if (a === "cancel") {
|
|
421
425
|
const o = await t.scheduler.cancelBooking(e.detail.bookingId, e.detail.reason);
|
|
422
|
-
|
|
426
|
+
s && (!o || "error" in o) && s(o);
|
|
423
427
|
} else if (a === "reject") {
|
|
424
428
|
const o = await t.scheduler.updateBooking({
|
|
425
429
|
bookingId: e.detail.bookingId,
|
|
426
430
|
status: "cancelled",
|
|
427
431
|
reason: e.detail.reason
|
|
428
432
|
});
|
|
429
|
-
|
|
433
|
+
s && (!o || "error" in o) && s(o);
|
|
430
434
|
}
|
|
431
435
|
},
|
|
432
436
|
goBackButtonClicked: async (e, t) => {
|
|
@@ -441,33 +445,33 @@ Ee([
|
|
|
441
445
|
},
|
|
442
446
|
fireRegisterEvent: !0
|
|
443
447
|
}),
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
],
|
|
448
|
-
|
|
449
|
-
const
|
|
450
|
-
var
|
|
451
|
-
var o = arguments.length, i = o < 3 ? t :
|
|
448
|
+
F("design:type", Function),
|
|
449
|
+
F("design:paramtypes", []),
|
|
450
|
+
F("design:returntype", void 0)
|
|
451
|
+
], ne.prototype, "render", null);
|
|
452
|
+
ne.style = Ee;
|
|
453
|
+
const Te = ':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 = Te;
|
|
454
|
+
var Le = function(e, t, a, s) {
|
|
455
|
+
var o = arguments.length, i = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, a) : s, r;
|
|
452
456
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
453
|
-
i = Reflect.decorate(e, t, a,
|
|
457
|
+
i = Reflect.decorate(e, t, a, s);
|
|
454
458
|
else
|
|
455
459
|
for (var l = e.length - 1; l >= 0; l--)
|
|
456
|
-
(
|
|
460
|
+
(r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, a, i) : r(t, a)) || i);
|
|
457
461
|
return o > 3 && i && Object.defineProperty(t, a, i), i;
|
|
458
|
-
},
|
|
462
|
+
}, P = function(e, t) {
|
|
459
463
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
460
464
|
return Reflect.metadata(e, t);
|
|
461
465
|
};
|
|
462
|
-
const
|
|
466
|
+
const ae = class {
|
|
463
467
|
constructor(e) {
|
|
464
|
-
|
|
468
|
+
k(this, e), this.closeCancelEventCardClicked = b(this, "closeCancelEventCardClicked", 7), this.cancelledEventCardError = b(this, "cancelledEventCardError", 7), this.handleCloseClicked = () => {
|
|
465
469
|
this.isClosing = !0;
|
|
466
470
|
const t = (a) => {
|
|
467
471
|
this.cancelledEventCardError.emit(a), this.isClosing = !1;
|
|
468
472
|
};
|
|
469
473
|
this.closeCancelEventCardClicked.emit({ errorHandler: t });
|
|
470
|
-
}, this.
|
|
474
|
+
}, this.configSettings = void 0, this.cancelledEventInfo = void 0, this.isClosing = !1;
|
|
471
475
|
}
|
|
472
476
|
connectedCallback() {
|
|
473
477
|
d("[nylas-cancelled-event-card] Component connected");
|
|
@@ -483,17 +487,17 @@ const ne = class {
|
|
|
483
487
|
}
|
|
484
488
|
render() {
|
|
485
489
|
var e, t;
|
|
486
|
-
return n(g, { key: "
|
|
490
|
+
return n(g, { key: "e5e3ac32d965a7d9e9bc0bb8bbd774625ff07d7b", part: "ncec" }, n("div", { key: "e4ef634f512035b0e36012009a49d4e3e9845973", class: "nylas-cancelled-event-card", part: "ncec__card" }, n("div", { key: "8a739422bcf542b9b8c97c0a56032b4393755d5d", class: "nylas-cancelled-event-card__calendar-icon", part: "ncec__icon" }, n("calendar-cancel-icon", { key: "cd4aa557789c4487f6ce7ef70337a4af83e4d3be" })), n("h3", { key: "48aff2d9672f9d7e24b61ec5fa3b21ec63345f54", class: "nylas-cancelled-event-card__title", part: "ncec__title" }, c.t("bookingCancelledTitle"), "!"), n("div", { key: "0c861a46988ad3071850dbe61f8344b5da6cd6d6", 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", "."), n("div", { key: "d9801695af5953536439a188c7e1d8d324a2fdbd", class: "nylas-cancelled-event-card__cta" }, n("button-component", { key: "b8c463a0ef0c36a4c28b46a3ad0aaa7f5b8f2efc", variant: "basic", disabled: this.isClosing, part: "ncec__button-outline", onClick: this.handleCloseClicked }, this.isClosing ? `${c.t("closingButton")}...` : `${c.t("closeButton")}`))));
|
|
487
491
|
}
|
|
488
492
|
};
|
|
489
|
-
|
|
490
|
-
|
|
493
|
+
Le([
|
|
494
|
+
_({
|
|
491
495
|
name: "nylas-cancelled-event-card",
|
|
492
496
|
stateToProps: /* @__PURE__ */ new Map([["scheduler.configSettings", "configSettings"]]),
|
|
493
497
|
eventToProps: {
|
|
494
498
|
closeCancelEventCardClicked: async (e, t) => {
|
|
495
|
-
const a = await t.scheduler.resetCancel(), { errorHandler:
|
|
496
|
-
|
|
499
|
+
const a = await t.scheduler.resetCancel(), { errorHandler: s } = e.detail;
|
|
500
|
+
s && (!a || "error" in a) && s(a);
|
|
497
501
|
},
|
|
498
502
|
cancelledEventCardError: async (e, t) => {
|
|
499
503
|
d("nylas-cancelled-event-card", "cancelledEventCardError", e.detail);
|
|
@@ -501,33 +505,33 @@ De([
|
|
|
501
505
|
},
|
|
502
506
|
fireRegisterEvent: !0
|
|
503
507
|
}),
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
],
|
|
508
|
-
|
|
509
|
-
const
|
|
510
|
-
var ze = function(e, t, a,
|
|
511
|
-
var o = arguments.length, i = o < 3 ? t :
|
|
508
|
+
P("design:type", Function),
|
|
509
|
+
P("design:paramtypes", []),
|
|
510
|
+
P("design:returntype", void 0)
|
|
511
|
+
], ae.prototype, "render", null);
|
|
512
|
+
ae.style = De;
|
|
513
|
+
const Se = ':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-confirmed-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-confirmed-event-card{width:inherit}}.nylas-confirmed-event-card__title{font-size:18px;font-weight:600;line-height:24px;color:var(--nylas-base-900);text-align:center}.nylas-confirmed-event-description{font-size:16px;font-weight:500;color:var(--nylas-base-600)}.nylas-confirmed-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-confirmed-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%}', Ie = Se;
|
|
514
|
+
var ze = function(e, t, a, s) {
|
|
515
|
+
var o = arguments.length, i = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, a) : s, r;
|
|
512
516
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
513
|
-
i = Reflect.decorate(e, t, a,
|
|
517
|
+
i = Reflect.decorate(e, t, a, s);
|
|
514
518
|
else
|
|
515
519
|
for (var l = e.length - 1; l >= 0; l--)
|
|
516
|
-
(
|
|
520
|
+
(r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, a, i) : r(t, a)) || i);
|
|
517
521
|
return o > 3 && i && Object.defineProperty(t, a, i), i;
|
|
518
|
-
},
|
|
522
|
+
}, M = function(e, t) {
|
|
519
523
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
520
524
|
return Reflect.metadata(e, t);
|
|
521
525
|
};
|
|
522
|
-
const
|
|
526
|
+
const ie = class {
|
|
523
527
|
constructor(e) {
|
|
524
|
-
|
|
528
|
+
k(this, e), this.closeConfirmEventCardClicked = b(this, "closeConfirmEventCardClicked", 7), this.confirmedEventCardError = b(this, "confirmedEventCardError", 7), this.handleCloseClicked = () => {
|
|
525
529
|
this.isClosing = !0;
|
|
526
530
|
const t = (a) => {
|
|
527
531
|
this.confirmedEventCardError.emit(a), this.isClosing = !1;
|
|
528
532
|
};
|
|
529
533
|
this.closeConfirmEventCardClicked.emit({ errorHandler: t });
|
|
530
|
-
}, this.
|
|
534
|
+
}, this.configSettings = void 0, this.confirmedEventInfo = void 0, this.isClosing = !1;
|
|
531
535
|
}
|
|
532
536
|
connectedCallback() {
|
|
533
537
|
d("[nylas-confirmed-event-card] Component connected");
|
|
@@ -543,98 +547,98 @@ const ae = class {
|
|
|
543
547
|
}
|
|
544
548
|
render() {
|
|
545
549
|
var e, t;
|
|
546
|
-
return n(g, { key: "
|
|
550
|
+
return n(g, { key: "a5fbf79c6b7f27046b599c16d231226ff9c88f84", part: "ncec" }, n("div", { key: "06c6f5fa4e75d9ce01dc9145259bf4bfddf33624", class: "nylas-confirmed-event-card", part: "ncec__card" }, n("div", { key: "11a58aa7dba6da706cd35791c58442b022f97939", class: "nylas-confirmed-event-card__calendar-icon", part: "ncec__icon" }, n("calendar-cancel-icon", { key: "752da0991cdcfa12dc9c7dc1020ea9388f11c30e" })), n("h3", { key: "238934bc1f8bcb137e6e33eb66afb5bee01749b7", class: "nylas-confirmed-event-card__title", part: "ncec__title" }, c.t("confirmedEventCardTitle"), "!"), n("div", { key: "3a3d8ad8302ad54b528c37f0eb25d12590bb4f0d", 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", "."), n("div", { key: "49c69f2f9c01e4e775cb8caadbca213424e0a952", class: "nylas-confirmed-event-card__cta" }, n("button-component", { key: "e6e75c57f294d688a108df09ffc9daf849ef6319", variant: "basic", disabled: this.isClosing, part: "ncec__button-outline", onClick: this.handleCloseClicked }, this.isClosing ? `${c.t("closingButton")}...` : `${c.t("closeButton")}`))));
|
|
547
551
|
}
|
|
548
552
|
};
|
|
549
553
|
ze([
|
|
550
|
-
|
|
554
|
+
_({
|
|
551
555
|
name: "nylas-confirmed-event-card",
|
|
552
556
|
stateToProps: /* @__PURE__ */ new Map([["scheduler.configSettings", "configSettings"]]),
|
|
553
557
|
eventToProps: {
|
|
554
558
|
closeConfirmEventCardClicked: async (e, t) => {
|
|
555
|
-
const a = await t.scheduler.resetConfirm(), { errorHandler:
|
|
556
|
-
|
|
559
|
+
const a = await t.scheduler.resetConfirm(), { errorHandler: s } = e.detail;
|
|
560
|
+
s && (!a || "error" in a) && s(a);
|
|
557
561
|
}
|
|
558
562
|
},
|
|
559
563
|
fireRegisterEvent: !0
|
|
560
564
|
}),
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
],
|
|
565
|
-
|
|
566
|
-
const
|
|
567
|
-
function I(e, t, a,
|
|
565
|
+
M("design:type", Function),
|
|
566
|
+
M("design:paramtypes", []),
|
|
567
|
+
M("design:returntype", void 0)
|
|
568
|
+
], ie.prototype, "render", null);
|
|
569
|
+
ie.style = Ie;
|
|
570
|
+
const N = /* @__PURE__ */ new Date(), O = /* @__PURE__ */ new Date();
|
|
571
|
+
function I(e, t, a, s) {
|
|
568
572
|
function o(i) {
|
|
569
573
|
return e(i = arguments.length === 0 ? /* @__PURE__ */ new Date() : /* @__PURE__ */ new Date(+i)), i;
|
|
570
574
|
}
|
|
571
575
|
return o.floor = (i) => (e(i = /* @__PURE__ */ new Date(+i)), i), o.ceil = (i) => (e(i = new Date(i - 1)), t(i, 1), e(i), i), o.round = (i) => {
|
|
572
|
-
const
|
|
573
|
-
return i -
|
|
574
|
-
}, o.offset = (i,
|
|
575
|
-
const
|
|
576
|
-
if (i = o.ceil(i), l = l == null ? 1 : Math.floor(l), !(i <
|
|
577
|
-
return
|
|
576
|
+
const r = o(i), l = o.ceil(i);
|
|
577
|
+
return i - r < l - i ? r : l;
|
|
578
|
+
}, o.offset = (i, r) => (t(i = /* @__PURE__ */ new Date(+i), r == null ? 1 : Math.floor(r)), i), o.range = (i, r, l) => {
|
|
579
|
+
const p = [];
|
|
580
|
+
if (i = o.ceil(i), l = l == null ? 1 : Math.floor(l), !(i < r) || !(l > 0))
|
|
581
|
+
return p;
|
|
578
582
|
let m;
|
|
579
583
|
do
|
|
580
|
-
|
|
581
|
-
while (m < i && i <
|
|
582
|
-
return
|
|
583
|
-
}, o.filter = (i) => I((
|
|
584
|
-
if (
|
|
585
|
-
for (; e(
|
|
586
|
-
|
|
587
|
-
}, (
|
|
588
|
-
if (
|
|
584
|
+
p.push(m = /* @__PURE__ */ new Date(+i)), t(i, l), e(i);
|
|
585
|
+
while (m < i && i < r);
|
|
586
|
+
return p;
|
|
587
|
+
}, o.filter = (i) => I((r) => {
|
|
588
|
+
if (r >= r)
|
|
589
|
+
for (; e(r), !i(r); )
|
|
590
|
+
r.setTime(r - 1);
|
|
591
|
+
}, (r, l) => {
|
|
592
|
+
if (r >= r)
|
|
589
593
|
if (l < 0)
|
|
590
594
|
for (; ++l <= 0; )
|
|
591
|
-
for (; t(
|
|
595
|
+
for (; t(r, -1), !i(r); )
|
|
592
596
|
;
|
|
593
597
|
else
|
|
594
598
|
for (; --l >= 0; )
|
|
595
|
-
for (; t(
|
|
599
|
+
for (; t(r, 1), !i(r); )
|
|
596
600
|
;
|
|
597
|
-
}), a && (o.count = (i,
|
|
601
|
+
}), a && (o.count = (i, r) => (N.setTime(+i), O.setTime(+r), e(N), e(O), Math.floor(a(N, O))), o.every = (i) => (i = Math.floor(i), !isFinite(i) || !(i > 0) ? null : i > 1 ? o.filter(s ? (r) => s(r) % i === 0 : (r) => o.count(0, r) % i === 0) : o)), o;
|
|
598
602
|
}
|
|
599
|
-
const
|
|
603
|
+
const Re = 1e3, oe = Re * 60, je = oe * 60, S = je * 24, $ = I(
|
|
600
604
|
(e) => e.setHours(0, 0, 0, 0),
|
|
601
605
|
(e, t) => e.setDate(e.getDate() + t),
|
|
602
|
-
(e, t) => (t - e - (t.getTimezoneOffset() - e.getTimezoneOffset()) *
|
|
606
|
+
(e, t) => (t - e - (t.getTimezoneOffset() - e.getTimezoneOffset()) * oe) / S,
|
|
603
607
|
(e) => e.getDate() - 1
|
|
604
608
|
);
|
|
605
609
|
I((e) => {
|
|
606
610
|
e.setUTCHours(0, 0, 0, 0);
|
|
607
611
|
}, (e, t) => {
|
|
608
612
|
e.setUTCDate(e.getUTCDate() + t);
|
|
609
|
-
}, (e, t) => (t - e) /
|
|
613
|
+
}, (e, t) => (t - e) / S, (e) => e.getUTCDate() - 1);
|
|
610
614
|
I((e) => {
|
|
611
615
|
e.setUTCHours(0, 0, 0, 0);
|
|
612
616
|
}, (e, t) => {
|
|
613
617
|
e.setUTCDate(e.getUTCDate() + t);
|
|
614
|
-
}, (e, t) => (t - e) /
|
|
615
|
-
const
|
|
616
|
-
var
|
|
617
|
-
var o = arguments.length, i = o < 3 ? t :
|
|
618
|
+
}, (e, t) => (t - e) / S, (e) => Math.floor(e / S));
|
|
619
|
+
const Fe = ':host{display:block;min-height:444px;--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}@media screen and (max-width: 768px){:host{min-height:auto}}.nylas-date-picker{display:flex;gap:1rem;flex-direction:column}.header{margin:0 0.5rem;height:48px}.header h2{font-size:1.3125rem;font-weight:400;line-height:1rem;color:var(--nylas-base-800)}.header h2 strong{font-weight:600}.title{margin:0 -1.25rem;display:flex;flex-direction:column;padding:0 1.5rem;gap:0.5rem;border-bottom:1px solid var(--nylas-base-200);font-family:var(--nylas-font-family)}.title h1{margin-bottom:0;font-size:18px;line-height:20px;font-weight:600;display:flex;gap:0.5rem;align-items:center}.title p{margin-top:0;font-size:16px;display:flex;gap:0.5rem;align-items:center}@keyframes pulsate{0%{background-color:var(--nylas-base-50)}50%{background-color:var(--nylas-base-100)}100%{background-color:var(--nylas-base-50)}}.dates{display:grid;justify-items:center;grid-template-columns:repeat(7, 1fr);gap:0.5rem;margin-bottom:24px}.dates .date{position:relative;display:flex;flex-direction:row;justify-content:center;align-items:center;height:48px;width:48px;min-width:2rem;min-height:2rem;cursor:pointer;border-radius:var(--nylas-border-radius-2x);font-size:16px;font-weight:600;font-family:inherit;color:var(--nylas-base-text);background-color:var(--nylas-base-100);cursor:pointer;border:none}@media screen and (max-width: 412px){.dates .date{width:38px;height:38px;min-width:none}}.dates .date:hover:not(:disabled){box-shadow:0 0 0 2px var(--nylas-base-500) inset}.dates .date.date.current-month{color:var(--nylas-base-800)}.dates .date.date.selected{background-color:var(--nylas-primary);color:var(--nylas-base-0);font-weight:700}.dates .date.date.day-skeleton{color:var(--nylas-base-300)}.dates .date:disabled{color:var(--nylas-base-300);background-color:transparent;font-weight:400;cursor:not-allowed}.dates .day{font-size:12px;color:var(--nylas-base-800);font-weight:600;letter-spacing:0.5px;height:32px;display:flex;align-items:center}@media screen and (max-width: 768px){.dates .day{font-size:14px}}.dates .date.day-skeleton{height:48px;width:48px;border-radius:var(--nylas-border-radius-2x);animation:pulsate 1.5s infinite ease-in-out;background-color:var(--nylas-base-50)}@media screen and (max-width: 412px){.dates .date.day-skeleton{width:38px;height:38px;min-width:none}}.dates .date.current-day::after{content:"";position:absolute;bottom:6px;left:50%;transform:translateX(-50%);width:6px;height:6px;border-radius:50%;background-color:var(--nylas-base-500)}.dates .date.current-day.selected::after{background-color:var(--nylas-base-100)}.pagination{display:flex;flex-direction:row;justify-content:space-between;align-items:center;min-width:92px}.pagination .chevron-right{transform:rotate(180deg)}.pagination .button{display:flex;flex-direction:row;justify-content:center;align-items:center;height:3vh;width:3vh;min-width:3em;min-height:3em;cursor:pointer;border-radius:var(--nylas-border-radius-2x);background-color:transparent;color:var(--nylas-base-800);cursor:pointer;border:none}.pagination .button:hover{background-color:var(--nylas-base-50)}.pagination .button:active{background-color:var(--nylas-base-100)}.pagination .button:disabled{background-color:transparent;color:var(--nylas-base-300);cursor:not-allowed}.flex-row{display:flex;flex-direction:row;justify-content:space-between;align-items:center;color:var(--nylas-base-500)}', Pe = Fe;
|
|
620
|
+
var Me = function(e, t, a, s) {
|
|
621
|
+
var o = arguments.length, i = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, a) : s, r;
|
|
618
622
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
619
|
-
i = Reflect.decorate(e, t, a,
|
|
623
|
+
i = Reflect.decorate(e, t, a, s);
|
|
620
624
|
else
|
|
621
625
|
for (var l = e.length - 1; l >= 0; l--)
|
|
622
|
-
(
|
|
626
|
+
(r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, a, i) : r(t, a)) || i);
|
|
623
627
|
return o > 3 && i && Object.defineProperty(t, a, i), i;
|
|
624
|
-
},
|
|
628
|
+
}, H = function(e, t) {
|
|
625
629
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
626
630
|
return Reflect.metadata(e, t);
|
|
627
631
|
};
|
|
628
|
-
const
|
|
632
|
+
const se = class {
|
|
629
633
|
constructor(e) {
|
|
630
|
-
|
|
634
|
+
k(this, e), this.dateSelected = b(this, "dateSelected", 7), this.monthChanged = b(this, "monthChanged", 7), this.selectableDates = void 0, this.configSettings = void 0, this.selectedDate = void 0, this.selectedLanguage = void 0, this.isLoading = void 0, this.eventDuration = void 0, this.month = this.selectedDate || /* @__PURE__ */ new Date(), this.dates = this.getDates(), this.disableNextMonthButton = !1;
|
|
631
635
|
}
|
|
632
636
|
configSettingsChanged(e) {
|
|
633
637
|
var o;
|
|
634
638
|
const t = new Date(this.month.getFullYear(), this.month.getMonth() + 1, 1), a = (o = e == null ? void 0 : e.scheduler) == null ? void 0 : o.available_days_in_future;
|
|
635
639
|
if (a === void 0)
|
|
636
640
|
return;
|
|
637
|
-
|
|
641
|
+
Y(/* @__PURE__ */ new Date(), a).getTime() < t.getTime() ? this.disableNextMonthButton = !0 : this.disableNextMonthButton = !1;
|
|
638
642
|
}
|
|
639
643
|
selectedLanguageChanged(e) {
|
|
640
644
|
c.changeLanguage(e);
|
|
@@ -646,8 +650,8 @@ const oe = class {
|
|
|
646
650
|
componentWillLoad() {
|
|
647
651
|
}
|
|
648
652
|
getDates() {
|
|
649
|
-
const e =
|
|
650
|
-
return
|
|
653
|
+
const e = be(this.month), t = me(this.month);
|
|
654
|
+
return $.range($.offset(t, -t.getDay()), $.offset(e, 7 - e.getDay()));
|
|
651
655
|
}
|
|
652
656
|
selectDate(e) {
|
|
653
657
|
this.dateSelected.emit(e);
|
|
@@ -656,7 +660,7 @@ const oe = class {
|
|
|
656
660
|
var o, i;
|
|
657
661
|
this.month = new Date(this.month.getFullYear(), this.month.getMonth() + e, 1);
|
|
658
662
|
const t = new Date(this.month.getFullYear(), this.month.getMonth() + 1, 1), a = (i = (o = this.configSettings) == null ? void 0 : o.scheduler) == null ? void 0 : i.available_days_in_future;
|
|
659
|
-
|
|
663
|
+
Y(/* @__PURE__ */ new Date(), a).getTime() < t.getTime() ? this.disableNextMonthButton = !0 : this.disableNextMonthButton = !1, this.dates = this.getDates(), this.monthChanged.emit(this.month);
|
|
660
664
|
}
|
|
661
665
|
isSelected(e, t, a) {
|
|
662
666
|
return e && t && E(e, t) && a && (a == null ? void 0 : a.length) > 0;
|
|
@@ -665,8 +669,8 @@ const oe = class {
|
|
|
665
669
|
return e && (t == null ? void 0 : t.find((a) => E(a, e))) === void 0;
|
|
666
670
|
}
|
|
667
671
|
render() {
|
|
668
|
-
var e, t, a,
|
|
669
|
-
return n(g, { key: "
|
|
672
|
+
var e, t, a, s, o, i, r;
|
|
673
|
+
return n(g, { key: "06638094c3e21b094641e5adbf08762b346fc10e", part: "ndp" }, n("div", { key: "370143e471513ab59c49dc369208365e5dcd1865", class: "nylas-date-picker" }, n("div", { key: "9b84a00eada140f2f142dec17a8418854160be87", class: "title", part: "ndp__title" }, (e = this.configSettings) != null && e.name ? n("h1", null, (t = this.configSettings) == null ? void 0 : t.name) : ((s = (a = this.configSettings) == null ? void 0 : a.organizer) == null ? void 0 : s.name) && n("h1", null, n("person-icon", null), ((i = (o = this.configSettings) == null ? void 0 : o.organizer) == null ? void 0 : i.name) || "Organizer"), n("p", { key: "a64fee4f4c6886b31620cdc62de0769e3908b634" }, n("clock-icon", { key: "e6c4d1cf6fd0b45e9824f26cb4f1a9fd828347d3" }), this.eventDuration ? he(this.eventDuration) : `- ${c.t("time.minutes")}`)), n("div", { key: "7568638d6af0fa03f84cf4b32b418c6b4f4df0de", class: "header flex-row" }, n("h2", { key: "7b656957b240be95038151d5ca2089967b3704cd", part: "ndp__month-header" }, n("strong", { key: "cea1b1a9fc986885cb1425075364bb6b97b0d0e2" }, ue(this.month.toLocaleDateString(void 0, { month: "long" }).toLocaleLowerCase())), " ", this.month.toLocaleDateString(void 0, { year: "numeric" })), n("div", { key: "daf2f52ae4ca9e381fefadf53b9bf9f7a2c47987", class: "pagination" }, n("button", { key: "e182f6af777a122aaaa323fbada73258fd8bcf90", 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" }, n("chevron-icon", { key: "a9703cc9a0cbfc72e800f72a56233467bff2e5f9" })), n("button", { key: "bcafc749f794352746d64974e8e564a5db1125a4", title: "Next month", onClick: () => this.changeMonth(1), class: { "chevron-right": !0, button: !0 }, disabled: this.disableNextMonthButton, part: "ndp__month-button" }, n("chevron-icon", { key: "5fc036471ed8f1caabe79e8489321070d9b6eae3" })))), n("div", { key: "701d99cc45475a8b9217893bfa56c0fa80f61520", class: "dates" }, [
|
|
670
674
|
c.t("days.sunday"),
|
|
671
675
|
c.t("days.monday"),
|
|
672
676
|
c.t("days.tuesday"),
|
|
@@ -674,18 +678,18 @@ const oe = class {
|
|
|
674
678
|
c.t("days.thursday"),
|
|
675
679
|
c.t("days.friday"),
|
|
676
680
|
c.t("days.saturday")
|
|
677
|
-
].map((l) => n("div", { class: "day", part: "ndp__day" }, l)), this.dates.map((l,
|
|
681
|
+
].map((l) => n("div", { class: "day", part: "ndp__day" }, l)), this.dates.map((l, p) => {
|
|
678
682
|
var f;
|
|
679
683
|
const m = this.isDisabled(l, this.selectableDates);
|
|
680
684
|
return this.isLoading ? n("button", { disabled: !0, class: {
|
|
681
685
|
"date day-skeleton": !0,
|
|
682
|
-
"current-month":
|
|
683
|
-
}, style: { animationDelay: `${
|
|
686
|
+
"current-month": z(l, this.month)
|
|
687
|
+
}, style: { animationDelay: `${p * 20}ms` }, part: "ndp__date ndp__date--disabled" }, l.getDate()) : n("button", { class: {
|
|
684
688
|
date: !0,
|
|
685
689
|
selected: !!(this.selectedDate && E(l, this.selectedDate) && this.selectableDates && ((f = this.selectableDates) == null ? void 0 : f.length) > 0),
|
|
686
690
|
"current-day": E(l, /* @__PURE__ */ new Date()),
|
|
687
|
-
"current-month":
|
|
688
|
-
}, "aria-lang": 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" : ""} ${
|
|
691
|
+
"current-month": z(l, this.month)
|
|
692
|
+
}, "aria-lang": 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" : ""} ${z(l, this.month) ? "ndp__date--current-month" : ""}` }, l.getDate());
|
|
689
693
|
}))));
|
|
690
694
|
}
|
|
691
695
|
static get watchers() {
|
|
@@ -695,8 +699,8 @@ const oe = class {
|
|
|
695
699
|
};
|
|
696
700
|
}
|
|
697
701
|
};
|
|
698
|
-
|
|
699
|
-
|
|
702
|
+
Me([
|
|
703
|
+
_({
|
|
700
704
|
name: "nylas-date-picker",
|
|
701
705
|
stateToProps: /* @__PURE__ */ new Map([
|
|
702
706
|
["scheduler.selectableDates", "selectableDates"],
|
|
@@ -716,19 +720,19 @@ Pe([
|
|
|
716
720
|
},
|
|
717
721
|
fireRegisterEvent: !0
|
|
718
722
|
}),
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
],
|
|
723
|
-
|
|
724
|
-
const
|
|
725
|
-
var
|
|
726
|
-
var o = arguments.length, i = o < 3 ? t :
|
|
723
|
+
H("design:type", Function),
|
|
724
|
+
H("design:paramtypes", []),
|
|
725
|
+
H("design:returntype", void 0)
|
|
726
|
+
], se.prototype, "render", null);
|
|
727
|
+
se.style = Pe;
|
|
728
|
+
const Ne = ':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-locale-switch{display:flex;flex-direction:row;justify-content:space-between;align-items:center;border-left:none;border-right:none;color:var(--nylas-base-50);font-size:14px;font-weight:600;cursor:pointer;transition:all 0.2s ease-in-out;font-family:inherit}@media screen and (max-width: 768px){.nylas-locale-switch{font-size:16px}}.select-wrapper{display:flex;align-items:center;gap:0.5rem}select{border:none;background:transparent;cursor:pointer;outline:none;background-color:transparent;margin:0 0 1px;padding:4px;vertical-align:middle}select#timezone{width:140px}select#language{width:80px}span.timezone-label{display:flex;width:-webkit-fill-available;justify-content:space-between}select-dropdown{width:auto}select-dropdown::part(sd_dropdown-button){border:none;padding:10px}select-dropdown::part(sd_dropdown-content){max-width:306px}', Oe = Ne;
|
|
729
|
+
var $e = function(e, t, a, s) {
|
|
730
|
+
var o = arguments.length, i = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, a) : s, r;
|
|
727
731
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
728
|
-
i = Reflect.decorate(e, t, a,
|
|
732
|
+
i = Reflect.decorate(e, t, a, s);
|
|
729
733
|
else
|
|
730
734
|
for (var l = e.length - 1; l >= 0; l--)
|
|
731
|
-
(
|
|
735
|
+
(r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, a, i) : r(t, a)) || i);
|
|
732
736
|
return o > 3 && i && Object.defineProperty(t, a, i), i;
|
|
733
737
|
}, A = function(e, t) {
|
|
734
738
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
@@ -736,7 +740,7 @@ var Oe = function(e, t, a, r) {
|
|
|
736
740
|
};
|
|
737
741
|
const re = class {
|
|
738
742
|
constructor(e) {
|
|
739
|
-
|
|
743
|
+
k(this, e), this.timezoneChanged = b(this, "timezoneChanged", 7), this.languageChanged = b(this, "languageChanged", 7), this.selectedTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone, this.selectedLanguage = navigator.language;
|
|
740
744
|
}
|
|
741
745
|
connectedCallback() {
|
|
742
746
|
}
|
|
@@ -755,25 +759,25 @@ const re = class {
|
|
|
755
759
|
t === "timezone" ? this.changeTimezone(a) : t === "language" && this.changeLanguage(a);
|
|
756
760
|
}
|
|
757
761
|
getTimezoneLabelHTML(e) {
|
|
758
|
-
const t =
|
|
762
|
+
const t = pe(e);
|
|
759
763
|
return n("span", { class: "timezone-label", style: {
|
|
760
764
|
display: "flex",
|
|
761
765
|
alignItems: "center",
|
|
762
766
|
justifyContent: "space-between",
|
|
763
767
|
width: "-webkit-fill-available"
|
|
764
|
-
} },
|
|
768
|
+
} }, D[e], " ", n("span", { class: "timezone-offset", style: {
|
|
765
769
|
fontSize: "14px",
|
|
766
770
|
fontWeight: "400",
|
|
767
771
|
color: "var(--nylas-base-500)"
|
|
768
772
|
} }, t));
|
|
769
773
|
}
|
|
770
774
|
render() {
|
|
771
|
-
const e = Object.keys(
|
|
775
|
+
const e = Object.keys(D).map((a) => ({
|
|
772
776
|
labelHTML: this.getTimezoneLabelHTML(a),
|
|
773
|
-
label:
|
|
777
|
+
label: D[a],
|
|
774
778
|
value: a
|
|
775
|
-
})), t = Object.keys(
|
|
776
|
-
label:
|
|
779
|
+
})), t = Object.keys(J).map((a) => ({
|
|
780
|
+
label: J[a],
|
|
777
781
|
value: a
|
|
778
782
|
}));
|
|
779
783
|
return n(g, { key: "8e8ec3819083fb25cb8620f14aa1f140a995ec89" }, n("div", { key: "45aaebcd9f80d54dc01b5d611094fa05225c8331", class: "nylas-locale-switch", part: "nls" }, n("div", { key: "47d8166b91a3ef742b14e5783338c3701be85eb7", class: {
|
|
@@ -785,8 +789,8 @@ const re = class {
|
|
|
785
789
|
}, part: "nls__language" }, n("select-dropdown", { key: "f83f8dbf84878fb1670d4a6f59b045c111420ce1", name: "language", options: t, defaultSelectedOption: t.find((a) => a.value == this.selectedLanguage), exportparts: "sd_dropdown: nls__language-dropdown, sd_dropdown-button: nls__language-drop-button, sd_dropdown-content: nls__language-drop-content, sd_dropdown_label: nls__language-drop-label" }, n("span", { key: "3d66833265053e81c9333b5d36ae822ed3a17878", slot: "select-icon" }, n("translate-icon", { key: "30121c5733873930e7e1e3bdaedf11bd2f258139", width: "20", height: "20" }))))));
|
|
786
790
|
}
|
|
787
791
|
};
|
|
788
|
-
|
|
789
|
-
|
|
792
|
+
$e([
|
|
793
|
+
_({
|
|
790
794
|
name: "nylas-locale-switch",
|
|
791
795
|
stateToProps: /* @__PURE__ */ new Map([
|
|
792
796
|
["scheduler.selectedLanguage", "selectedLanguage"],
|
|
@@ -806,19 +810,19 @@ Oe([
|
|
|
806
810
|
A("design:paramtypes", []),
|
|
807
811
|
A("design:returntype", void 0)
|
|
808
812
|
], re.prototype, "render", null);
|
|
809
|
-
re.style =
|
|
810
|
-
const
|
|
813
|
+
re.style = Oe;
|
|
814
|
+
const He = ".sc-nylas-logo-h{display:flex}", Ae = He, qe = class {
|
|
811
815
|
constructor(e) {
|
|
812
|
-
|
|
816
|
+
k(this, e), this.width = "69", this.height = "24";
|
|
813
817
|
}
|
|
814
818
|
render() {
|
|
815
|
-
return n("svg", { key: "
|
|
819
|
+
return n("svg", { key: "12dffc0c444183dfd3bb8593076a6b022de4654b", width: this.width, height: this.height, viewBox: "0 0 69 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, n("g", { key: "89545db6a2731faffdf62b9f0826211c9827af35", "clip-path": "url(#clip0_455_3543)" }, n("path", { key: "bc169c74819239b2c40b3730a445f45d1a16f445", d: "M15.8092 3.03248C14.6497 1.86996 13.1076 1.23047 11.4646 1.23047C9.82156 1.23047 8.27753 1.86996 7.11999 3.03248L0.835347 9.33381C0.686846 9.4827 0.60498 9.68123 0.60498 9.89312C0.60498 10.105 0.686846 10.3035 0.835347 10.4524C0.983848 10.6013 1.18185 10.6834 1.39318 10.6834C1.60451 10.6834 1.80251 10.6013 1.95101 10.4524L8.23374 4.15111C10.0139 2.36627 12.9134 2.36627 14.6935 4.15111C16.4736 5.93785 16.4756 8.84322 14.6935 10.6281L8.4108 16.9275C8.10428 17.2348 8.10428 17.7368 8.4108 18.0461C8.5593 18.195 8.75731 18.2771 8.96863 18.2771C9.17996 18.2771 9.37796 18.195 9.52646 18.0461L15.8092 11.7467C16.9687 10.5841 17.6064 9.03793 17.6064 7.39053C17.6064 5.74314 16.9687 4.19501 15.8092 3.03439V3.03248Z", fill: "currentColor" }), n("path", { key: "456cd298652217764f8486bca01860c4f1132e58", d: "M14.9296 7.39038C14.9296 6.46074 14.5698 5.58837 13.9148 4.93361C12.5631 3.57828 10.3641 3.57828 9.01239 4.93361L0.663961 13.3023C0.51546 13.4512 0.433594 13.6497 0.433594 13.8616C0.433594 14.0735 0.51546 14.272 0.663961 14.4209C0.812462 14.5698 1.01046 14.6519 1.22179 14.6519C1.43312 14.6519 1.63112 14.5698 1.77962 14.4209L10.0367 6.1515L10.05 6.13623C10.0747 6.10759 10.1014 6.07705 10.128 6.05033C10.1585 6.01978 10.1928 5.99115 10.2251 5.96252L10.2442 5.94534C10.9886 5.31349 12.1119 5.3593 12.8011 6.05033C13.4903 6.74135 13.536 7.78171 12.9705 8.53192L12.9648 8.53955C12.9058 8.61591 12.8544 8.67699 12.8011 8.73044C12.7497 8.78198 12.6906 8.83352 12.6069 8.90033L4.45264 17.0991C4.30414 17.248 4.22227 17.4465 4.22227 17.6584C4.22227 17.8703 4.30414 18.0689 4.45264 18.2177C4.60114 18.3666 4.79914 18.4487 5.01047 18.4487C5.2218 18.4487 5.4198 18.3666 5.5683 18.2177L13.9167 9.84716C14.5698 9.1924 14.9315 8.31812 14.9315 7.39038H14.9296Z", fill: "currentColor" }), n("path", { key: "99e86fdeed7fd4e6440e749884432df26dfe1d37", d: "M10.6821 9.11238C10.4727 9.01694 10.2861 8.88904 10.1281 8.7306C9.97008 8.57216 9.84252 8.38508 9.74733 8.1751L9.69021 8.05103L0.467916 17.2978C0.287049 17.4792 0.174721 17.7082 0.149971 17.9411C0.125221 18.1778 0.19376 18.3897 0.344165 18.5405C0.471724 18.6684 0.65259 18.739 0.850592 18.739C1.11142 18.739 1.37796 18.6207 1.58358 18.4145L10.8059 9.16774L10.6821 9.11047V9.11238Z", fill: "currentColor" }), n("path", { key: "68231e9e8a5f86804d3590ca240bcaf362df1fa6", d: "M68.401 10.6185C68.2126 10.2692 67.9593 9.97334 67.6433 9.73854C67.3235 9.49993 66.956 9.31094 66.5486 9.17541C66.1316 9.03606 65.7033 8.91771 65.2749 8.81844C64.7951 8.70582 64.3039 8.57983 63.8165 8.44811C63.3196 8.31258 62.9065 8.14269 62.5905 7.94225C62.4743 7.88689 62.3391 7.76663 62.3391 7.50129C62.3391 7.39821 62.3639 7.29704 62.4153 7.19587L62.4248 7.18059C62.5352 7.02216 62.7142 6.8828 62.975 6.75109C63.234 6.62128 63.609 6.55829 64.1231 6.55829C64.5286 6.55829 64.877 6.61365 65.1569 6.72436C65.4348 6.83508 65.6652 6.96871 65.8442 7.12524C66.0212 7.27986 66.1659 7.45357 66.2782 7.63873C66.3563 7.76854 66.4267 7.89262 66.4858 8.00525L68.2754 6.84081C68.1669 6.59456 68.0146 6.33495 67.8204 6.0677C67.6033 5.768 67.3254 5.4893 66.9922 5.23732C66.659 4.98534 66.2516 4.77345 65.7813 4.60929C65.3111 4.44512 64.7532 4.36304 64.1231 4.36304C63.3844 4.36304 62.7599 4.46421 62.2706 4.66083C61.7813 4.85935 61.3815 5.09988 61.0845 5.37667C60.7875 5.65346 60.5628 5.95125 60.4143 6.2605C60.2639 6.57547 60.1611 6.85799 60.1078 7.10233C60.0945 7.18059 60.0812 7.27031 60.0678 7.36767C60.0545 7.4593 60.0469 7.5452 60.0469 7.62537C60.0469 8.13314 60.1745 8.56074 60.4239 8.89671C60.679 9.24222 61.0045 9.53429 61.391 9.76336C61.7813 9.99624 62.2116 10.1852 62.6704 10.3227C63.1388 10.462 63.5862 10.5823 64.0012 10.6796C64.4067 10.777 64.7932 10.8782 65.1531 10.9774C65.5224 11.0786 65.8289 11.2122 66.0631 11.3745C66.2801 11.5425 66.3887 11.7448 66.3887 11.9777C66.3887 12.2278 66.2916 12.4263 66.0993 12.5695C65.9279 12.6954 65.7261 12.7985 65.4958 12.8711C65.273 12.9436 65.0407 12.9913 64.8066 13.0142C64.58 13.0352 64.3915 13.0467 64.2468 13.0467C63.8032 13.0467 63.4224 13.0028 63.1197 12.915C62.8151 12.8272 62.5638 12.7241 62.3734 12.6057C62.1811 12.4874 62.0288 12.3614 61.9222 12.2316C61.8213 12.1094 61.747 12.0082 61.7014 11.9319L61.4957 11.6303L59.708 12.7928C59.8508 13.0161 60.0298 13.2643 60.2392 13.5296C60.4772 13.8293 60.7837 14.1138 61.153 14.3734C61.5224 14.633 61.966 14.8525 62.4724 15.0243C62.9788 15.1961 63.5748 15.282 64.2468 15.282C64.797 15.282 65.2901 15.2324 65.7166 15.137C66.1412 15.0396 66.5162 14.9117 66.8285 14.7552C67.1388 14.6005 67.4015 14.4192 67.6109 14.2149C67.8223 14.0107 67.9974 13.8026 68.1326 13.6003C68.4563 13.1135 68.6409 12.5504 68.6828 11.9262C68.6828 11.4069 68.5876 10.9641 68.401 10.6166V10.6185Z", fill: "currentColor" }), n("path", { key: "80b2550211f60e218c5f52f975a060e3ac4ea84a", d: "M26.3585 4.27905C23.7901 4.27905 21.6997 6.37504 21.6997 8.95017V15.0701H23.9291V8.95017C23.9291 7.6082 25.0181 6.5163 26.3565 6.5163C27.695 6.5163 28.784 7.6082 28.784 8.95017V15.0701H31.0134V8.95017C31.0134 6.37504 28.9229 4.27905 26.3546 4.27905H26.3585Z", fill: "currentColor" }), n("path", { key: "b5db41daab85f0ffd7738f492ede6189237b7d5f", d: "M53.4522 4.27905C50.4251 4.27905 47.9634 6.74728 47.9634 9.78245C47.9634 12.8176 50.427 15.2859 53.4522 15.2859C54.5545 15.2859 55.6188 14.9594 56.5288 14.3409L56.7116 14.2169V15.0682H58.941V9.78245C58.941 6.74728 56.4793 4.27905 53.4522 4.27905ZM53.4522 13.0505C51.655 13.0505 50.1928 11.5845 50.1928 9.78245C50.1928 7.98044 51.655 6.51439 53.4522 6.51439C55.2494 6.51439 56.7116 7.98044 56.7116 9.78245C56.7116 11.5845 55.2494 13.0505 53.4522 13.0505Z", fill: "currentColor" }), n("path", { key: "9fc6c3fe5eb5f86e4e53126c98958f36a128030f", d: "M45.5795 10.6166V0.356201H43.3501V10.6166C43.3501 13.1517 45.3758 15.2228 47.8908 15.2858V13.0486C46.6057 12.9875 45.5795 11.9204 45.5795 10.6166Z", fill: "currentColor" }), n("path", { key: "dcbcc1f9ad3d20c137644553a90ec0afc7f6bdf9", d: "M39.5428 4.4967V10.63C39.5428 11.6761 38.8669 12.621 37.9016 12.9284C37.1249 13.1746 36.3157 13.0486 35.6817 12.5829C35.0592 12.1247 34.6879 11.3917 34.6879 10.6186V4.4967H32.4585V10.5995C32.4585 12.7165 33.8388 14.57 35.8131 15.1084C37.0354 15.4424 38.2995 15.2973 39.3695 14.7037L39.5428 14.6063V14.9747C39.5428 16.2766 38.5166 17.3437 37.2315 17.4067V19.6439C39.7465 19.5809 41.7722 17.5117 41.7722 14.9747V4.4967H39.5428Z", fill: "currentColor" })), n("defs", { key: "569df0349b4a24ea2d0a0bee9788b0b8911dcf39" }, n("clipPath", { key: "7a24bd2f656eba24c53b46b1b65b6ae5ea11c378", id: "clip0_455_3543" }, n("rect", { key: "60a57936d17acf21b9c58a177f17f3ce3fede7f1", width: "68.7123", height: "19.2877", fill: "white", transform: "translate(0.144043 0.356201)" }))));
|
|
816
820
|
}
|
|
817
821
|
};
|
|
818
|
-
qe.style =
|
|
819
|
-
const
|
|
822
|
+
qe.style = Ae;
|
|
823
|
+
const Ve = ':host{display:block;margin-bottom:-12px;width:100%;z-index: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-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.notif{display:flex;padding:17px;align-items:flex-start;justify-content:space-between;gap:16px;border-radius:var(--nylas-border-radius-2x);border:1.5px solid var(--nylas-error);background:var(--nylas-base-0)}@media screen and (max-width: 768px){.notif{width:auto}}.notif .content{display:flex;flex-direction:row;gap:8px}.notif .content .message{font-size:14px;font-weight:400;color:var(--nylas-base-800)}.notif .content .message .title{font-size:16px;font-weight:600;color:var(--nylas-base-950);display:block}.notif .content .message .description{font-size:14px;font-weight:400;color:var(--nylas-base-800);display:block}.notif .content .icon.error{color:var(--nylas-error)}.notif.error{border-color:var(--nylas-error);background:rgb(255, 248, 248)}.notif.warning{border-color:var(--nylas-warning)}.notif.info{border-color:var(--nylas-info)}.notif.success{border-color:var(--nylas-success)}.notif .dismiss-btn{background:none;border:none;color:var(--nylas-base-950);cursor:pointer}', Ze = Ve, Ge = class {
|
|
820
824
|
constructor(e) {
|
|
821
|
-
|
|
825
|
+
k(this, e), this.ttl = 5e3, this.allowedCategories = ["component", "api", "validation", "invalid_session"], this.notifications = [];
|
|
822
826
|
}
|
|
823
827
|
onError(e) {
|
|
824
828
|
d(`[nylas-notification] Error: ${e.detail.notification.title}`), this.handleNotification(e);
|
|
@@ -862,7 +866,7 @@ const Ae = ':host{display:block;margin-bottom:-12px;width:100%;z-index:1;--nylas
|
|
|
862
866
|
if (this.notifications = [...this.notifications, { ...e.detail.notification }], e.detail.notification.ttl !== "none") {
|
|
863
867
|
const a = e.detail.notification.ttl ? e.detail.notification.ttl : this.ttl;
|
|
864
868
|
window.setTimeout(() => {
|
|
865
|
-
this.notifications = this.notifications.filter((
|
|
869
|
+
this.notifications = this.notifications.filter((s) => s.id !== e.detail.notification.id);
|
|
866
870
|
}, a);
|
|
867
871
|
}
|
|
868
872
|
}
|
|
@@ -870,29 +874,29 @@ const Ae = ':host{display:block;margin-bottom:-12px;width:100%;z-index:1;--nylas
|
|
|
870
874
|
this.notifications = this.notifications.filter((t) => t.id !== e);
|
|
871
875
|
}
|
|
872
876
|
render() {
|
|
873
|
-
return n(g, { key: "
|
|
877
|
+
return n(g, { key: "03f95b47c77afb69a2696473c2bf8c3f1e1ed44a" }, n(ge, { key: "990afe9475e36dbae84a70266ef0b5188d2011de" }, this.notifications.map((e) => n("div", { class: `notif ${e.type}`, key: e.id }, n("div", { class: "content" }, n("span", { class: `icon ${e.type}` }, (e.type === "error" || e.type === "warning") && n("warning-icon", null)), n("span", { class: "message" }, n("span", { class: "title" }, e.title), e.description && n("span", { class: "description" }, e.description))), n("button", { class: "dismiss-btn", onClick: () => this.dismissNotification(e.id) }, n("close-icon", null)))), n("slot", { key: "49a5c13a306626b5bba79c443bb8501fe50c7ea3" })));
|
|
874
878
|
}
|
|
875
879
|
get host() {
|
|
876
|
-
return
|
|
880
|
+
return G(this);
|
|
877
881
|
}
|
|
878
882
|
};
|
|
879
|
-
|
|
880
|
-
const
|
|
881
|
-
var
|
|
882
|
-
var o = arguments.length, i = o < 3 ? t :
|
|
883
|
+
Ge.style = Ze;
|
|
884
|
+
const We = ':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}.event-card-wrapper{height:inherit;display:flex;flex-direction:column;justify-content:space-between;align-items:center;font-family:var(--nylas-font-family);background-color:var(--nylas-base-0);color:var(--nylas-base-900);border-radius:var(--nylas-border-radius-3x);position:relative;margin-top:1rem;width:424px;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){.event-card-wrapper{width:100%;border-radius:0px}}.calendar-icon{display:flex;align-items:center;justify-content:center;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);color:var(--nylas-base-700)}.booked-event-header{margin:1.5rem 4rem;overflow-wrap:anywhere;display:flex;align-items:center;flex-direction:column;font-size:1rem;font-weight:400}.booked-event-header h2{color:var(--nylas-base-600);margin-top:1.5rem;margin-bottom:0.25rem;font-size:1.125rem;font-weight:600}.manage-booking-description{border-top:1px solid var(--nylas-base-200)}.manage-booking-description p{font-size:16px;margin:1rem;padding:0.5rem 1rem;font-weight:400;color:var(--nylas-base-800)}.footer{padding:0.5rem;display:grid;grid-template-columns:1fr 1fr;gap:0.5rem;box-sizing:border-box;background-color:var(--nylas-base-25);width:100%;border-radius:0 0 var(--nylas-border-radius-2x) var(--nylas-border-radius-2x)}.footer.no-template-cols{grid-template-columns:1fr}.footer.no-footer{display:none}sp-divider{background-color:var(--nylas-base-200);height:1px}calendar-check-icon{display:flex;align-items:center;justify-content:center;height:100%}button-component{--dot-color:var(--nylas-base-700)}', Ue = We;
|
|
885
|
+
var Xe = function(e, t, a, s) {
|
|
886
|
+
var o = arguments.length, i = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, a) : s, r;
|
|
883
887
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
884
|
-
i = Reflect.decorate(e, t, a,
|
|
888
|
+
i = Reflect.decorate(e, t, a, s);
|
|
885
889
|
else
|
|
886
890
|
for (var l = e.length - 1; l >= 0; l--)
|
|
887
|
-
(
|
|
891
|
+
(r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, a, i) : r(t, a)) || i);
|
|
888
892
|
return o > 3 && i && Object.defineProperty(t, a, i), i;
|
|
889
|
-
},
|
|
893
|
+
}, q = function(e, t) {
|
|
890
894
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
891
895
|
return Reflect.metadata(e, t);
|
|
892
896
|
};
|
|
893
|
-
const
|
|
897
|
+
const le = class {
|
|
894
898
|
constructor(e) {
|
|
895
|
-
|
|
899
|
+
k(this, e), this.rejectBookingButtonClicked = b(this, "rejectBookingButtonClicked", 7), this.confirmBookingButtonClicked = b(this, "confirmBookingButtonClicked", 7), this.confirmBookingError = b(this, "confirmBookingError", 7), this.handleConfirmBookingButtonClicked = () => {
|
|
896
900
|
this.action = "confirm";
|
|
897
901
|
const t = (a) => {
|
|
898
902
|
this.confirmBookingError.emit(a);
|
|
@@ -900,7 +904,7 @@ const se = class {
|
|
|
900
904
|
this.organizerConfirmationBookingId && !this.isLoading && this.confirmBookingButtonClicked.emit({ bookingId: this.organizerConfirmationBookingId, host: this.host, errorHandler: t });
|
|
901
905
|
}, this.handleRejectBookingButtonClicked = () => {
|
|
902
906
|
this.action = "reject", this.organizerConfirmationBookingId && !this.isLoading && this.rejectBookingButtonClicked.emit({ bookingId: this.organizerConfirmationBookingId, host: this.host });
|
|
903
|
-
}, this.
|
|
907
|
+
}, this.configSettings = void 0, this.isLoading = void 0, this.organizerConfirmationBookingId = void 0, this.selectedLanguage = navigator.language, this.action = null;
|
|
904
908
|
}
|
|
905
909
|
connectedCallback() {
|
|
906
910
|
}
|
|
@@ -916,19 +920,19 @@ const se = class {
|
|
|
916
920
|
this.action = null;
|
|
917
921
|
}
|
|
918
922
|
render() {
|
|
919
|
-
var e, t, a,
|
|
920
|
-
return n(g, { key: "
|
|
923
|
+
var e, t, a, s, o, i, r, l, p, m, f, u;
|
|
924
|
+
return n(g, { key: "c722e5ad0c458060b988e0a49fde079d8258125e", part: "nmcc" }, n("div", { key: "758b60b6834f7150a30434538707f321754f9f8b", class: "event-card-wrapper", part: "nmccc__card" }, n("div", { key: "675e8ab2297fefe3840eb06b536706e216cd525a", class: "calendar-icon" }, n("calendar-check-icon", { key: "56768b41e1abebb836619f1da25fdba7b0b32203" })), n("div", { key: "a026a0daa62a4bf5054682a93c19f296b4761d31", class: "booked-event-header" }, n("h2", { key: "38ba7f91abcde16f459f50a3638245e2c994f4f5", slot: "card-title", part: "nmcc__title" }, !!this.organizerConfirmationBookingId && `${c.t("bookingPendingTitle")}!`)), n("div", { key: "4ca2d5bd6cf71f624bb2eed64c0f8c44089adc0a", class: "manage-booking-description" }, n("p", { key: "6584d4ac6e59c6b4156f886a6903d05dcef37c3a" }, c.t("bookingPendingnDescription"))), n("div", { key: "805a279cbff4f92eb91f150146a6d5688945ffe6", class: {
|
|
921
925
|
footer: !0,
|
|
922
|
-
"no-footer": ((t = (e = this.configSettings) == null ? void 0 : e.scheduler) == null ? void 0 : t.hide_cancellation_options) && ((
|
|
923
|
-
"no-template-cols": ((i = (o = this.configSettings) == null ? void 0 : o.scheduler) == null ? void 0 : i.hide_cancellation_options) || ((l = (
|
|
924
|
-
} }, !((m = (
|
|
926
|
+
"no-footer": ((t = (e = this.configSettings) == null ? void 0 : e.scheduler) == null ? void 0 : t.hide_cancellation_options) && ((s = (a = this.configSettings) == null ? void 0 : a.scheduler) == null ? void 0 : s.hide_rescheduling_options),
|
|
927
|
+
"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)
|
|
928
|
+
} }, !((m = (p = this.configSettings) == null ? void 0 : p.scheduler) != null && m.hide_cancellation_options) && n("button-component", { variant: "destructive", onClick: this.handleRejectBookingButtonClicked, isLoading: this.isLoading && this.action === "reject", part: "nmcc__button-outline nmcc__cancel-cta" }, `${c.t("rejectBookingButton")}`), !((u = (f = this.configSettings) == null ? void 0 : f.scheduler) != null && u.hide_rescheduling_options) && n("button-component", { variant: "basic", onClick: this.handleConfirmBookingButtonClicked, isLoading: this.isLoading && this.action === "confirm", part: "nmcc__button-outline nmcc__reschedule-cta" }, `${c.t("confirmBookingButton")}`))));
|
|
925
929
|
}
|
|
926
930
|
get host() {
|
|
927
|
-
return
|
|
931
|
+
return G(this);
|
|
928
932
|
}
|
|
929
933
|
};
|
|
930
|
-
|
|
931
|
-
|
|
934
|
+
Xe([
|
|
935
|
+
_({
|
|
932
936
|
name: "nylas-organizer-confirmation-card",
|
|
933
937
|
stateToProps: /* @__PURE__ */ new Map([
|
|
934
938
|
["scheduler.organizerConfirmationBookingId", "organizerConfirmationBookingId"],
|
|
@@ -941,36 +945,36 @@ Ue([
|
|
|
941
945
|
t.scheduler.setReject(e.detail.bookingId);
|
|
942
946
|
},
|
|
943
947
|
confirmBookingButtonClicked: async (e, t) => {
|
|
944
|
-
const { host: a } = e.detail,
|
|
948
|
+
const { host: a } = e.detail, s = await t.scheduler.updateBooking({
|
|
945
949
|
bookingId: e.detail.bookingId,
|
|
946
950
|
status: "confirmed"
|
|
947
951
|
}), { errorHandler: o } = e.detail;
|
|
948
|
-
o && (!
|
|
952
|
+
o && (!s || "error" in s) && o(s), await a.resetAction();
|
|
949
953
|
}
|
|
950
954
|
},
|
|
951
955
|
fireRegisterEvent: !0
|
|
952
956
|
}),
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
],
|
|
957
|
-
|
|
958
|
-
const
|
|
959
|
-
var
|
|
960
|
-
var o = arguments.length, i = o < 3 ? t :
|
|
957
|
+
q("design:type", Function),
|
|
958
|
+
q("design:paramtypes", []),
|
|
959
|
+
q("design:returntype", void 0)
|
|
960
|
+
], le.prototype, "render", null);
|
|
961
|
+
le.style = Ue;
|
|
962
|
+
const Ye = ':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;position:relative;height:inherit;display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:var(--nylas-font-family)}.event-card{display:flex;align-items:center;flex-direction:column;width:calc(100% - 3rem);background-color:var(--nylas-base-0);color:var(--nylas-base-800);border-radius:var(--nylas-border-radius-2x);padding:3rem 1.5rem 1.5rem 1.5rem;position:relative;box-shadow:0px 1px 3px 0px rgba(0, 0, 0, 0.1), 0px 1px 2px 0px rgba(0, 0, 0, 0.06)}@media screen and (max-width: 768px){.event-card{margin-bottom:2rem}}.nylas-selected-event-card__date{font-size:min(max(16px, 3vw), 18px);font-weight:600}.nylas-selected-event-card__time{font-size:16px;font-weight:500}.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-icon{display:flex;align-items:center;justify-content:center;height:100%}.event-timezone{display:flex;color:var(--nylas-base-600);margin-bottom:8px;gap:4px;align-items:center}@media screen and (max-width: 768px){.event-timezone{margin-bottom:16px}}', Je = Ye;
|
|
963
|
+
var Ke = function(e, t, a, s) {
|
|
964
|
+
var o = arguments.length, i = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, a) : s, r;
|
|
961
965
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
962
|
-
i = Reflect.decorate(e, t, a,
|
|
966
|
+
i = Reflect.decorate(e, t, a, s);
|
|
963
967
|
else
|
|
964
968
|
for (var l = e.length - 1; l >= 0; l--)
|
|
965
|
-
(
|
|
969
|
+
(r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, a, i) : r(t, a)) || i);
|
|
966
970
|
return o > 3 && i && Object.defineProperty(t, a, i), i;
|
|
967
|
-
},
|
|
971
|
+
}, V = function(e, t) {
|
|
968
972
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
969
973
|
return Reflect.metadata(e, t);
|
|
970
974
|
};
|
|
971
|
-
const
|
|
975
|
+
const ce = class {
|
|
972
976
|
constructor(e) {
|
|
973
|
-
|
|
977
|
+
k(this, e), this.selectedDate = void 0, this.selectedTimeslot = void 0, this.selectedTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone, this.selectedLanguage = void 0, this.startTime = "", this.endTime = "";
|
|
974
978
|
}
|
|
975
979
|
connectedCallback() {
|
|
976
980
|
}
|
|
@@ -991,11 +995,11 @@ const le = class {
|
|
|
991
995
|
}
|
|
992
996
|
render() {
|
|
993
997
|
var e;
|
|
994
|
-
return n(g, { key: "
|
|
998
|
+
return n(g, { key: "988d5270aa9dbd656c11d70ae0f3058dd25b4eb8", part: "nsec" }, n("div", { key: "21681211baf07faa5b09cec29611859a8dbdd37b", class: "event-card", part: "nsec__card" }, n("div", { key: "9b478bc27a5469a7c67786e3b1958e20e2f59d9e", class: "calendar-icon", part: "nsec__icon" }, n("calendar-icon", { key: "9a9f4cd2551747874876d8a32943a8cd98032d1e" })), n("div", { key: "f9dcde6ca9cffbfeb2f5dcd4e3586433bf2fd055", 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 })) : "-"), n("div", { key: "a6151b6f505de22f748fcd959c5aa04721a4dd52", class: "nylas-selected-event-card__time", part: "nsec__time" }, this.startTime, " - ", this.endTime)), n("div", { key: "9190417c554a5e960841a8e132f3995574da14be", class: "event-timezone", part: "nsec__timezone" }, n("globe-icon", { key: "16f199ce28c18cc975bd8ade52f6b4fccfbe4455" }), D[this.selectedTimezone]));
|
|
995
999
|
}
|
|
996
1000
|
};
|
|
997
|
-
|
|
998
|
-
|
|
1001
|
+
Ke([
|
|
1002
|
+
_({
|
|
999
1003
|
name: "nylas-selected-event-card",
|
|
1000
1004
|
stateToProps: /* @__PURE__ */ new Map([
|
|
1001
1005
|
["scheduler.selectedDate", "selectedDate"],
|
|
@@ -1006,33 +1010,33 @@ Je([
|
|
|
1006
1010
|
eventToProps: {},
|
|
1007
1011
|
fireRegisterEvent: !0
|
|
1008
1012
|
}),
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
],
|
|
1013
|
-
|
|
1014
|
-
const
|
|
1015
|
-
var
|
|
1016
|
-
var o = arguments.length, i = o < 3 ? t :
|
|
1013
|
+
V("design:type", Function),
|
|
1014
|
+
V("design:paramtypes", []),
|
|
1015
|
+
V("design:returntype", void 0)
|
|
1016
|
+
], ce.prototype, "render", null);
|
|
1017
|
+
ce.style = Je;
|
|
1018
|
+
const Qe = ':host{display:block;height:calc(100% - 48px);--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}.time-picker-wrapper{display:flex;flex-direction:column;height:100%}.timeslots{position:relative;display:flex;flex-direction:column;gap:0.75rem;align-items:center;overflow-y:scroll;padding:0.5rem 1.5rem 1.5rem;flex:1}.time{box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:4px 12px;gap:0.5rem;font-size:16px;font-weight:500;font-family:inherit;width:100%;height:48px;color:var(--nylas-base-800);background:var(--nylas-base-0);border:none;outline:1.5px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);flex:none;order:4;align-self:stretch;flex-grow:0;cursor:pointer}.time:hover,.time:focus{color:var(--nylas-primary);outline-color:var(--nylas-primary)}.time.selected{font-weight:600;color:var(--nylas-primary);outline:2px solid var(--nylas-primary);border-color:transparent;box-shadow:0 0 0 2px var(--nylas-primary)}.empty{text-align:center;padding:0 1.5rem;color:var(--nylas-base-600);font-size:min(max(12px, 2vw), 14px);height:450px;display:flex;align-items:center;justify-content:center}@keyframes pulsate{0%{background-color:var(--nylas-base-50)}50%{background-color:var(--nylas-base-100)}100%{background-color:var(--nylas-base-50)}}.loading{padding:0 1.5rem}.loading .timeslot-skeleton{width:100%;height:4rem;background-color:var(--nylas-base-50);margin-bottom:0.5rem;border-radius:var(--nylas-border-radius-2x);animation:pulsate 1.5s infinite ease-in-out}.footer{width:100%;padding:14px;box-sizing:border-box;border-top:1px solid var(--nylas-base-200)}', et = Qe;
|
|
1019
|
+
var tt = function(e, t, a, s) {
|
|
1020
|
+
var o = arguments.length, i = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, a) : s, r;
|
|
1017
1021
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
1018
|
-
i = Reflect.decorate(e, t, a,
|
|
1022
|
+
i = Reflect.decorate(e, t, a, s);
|
|
1019
1023
|
else
|
|
1020
1024
|
for (var l = e.length - 1; l >= 0; l--)
|
|
1021
|
-
(
|
|
1025
|
+
(r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, a, i) : r(t, a)) || i);
|
|
1022
1026
|
return o > 3 && i && Object.defineProperty(t, a, i), i;
|
|
1023
|
-
},
|
|
1027
|
+
}, Z = function(e, t) {
|
|
1024
1028
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
1025
1029
|
return Reflect.metadata(e, t);
|
|
1026
1030
|
};
|
|
1027
|
-
const
|
|
1031
|
+
const de = class {
|
|
1028
1032
|
constructor(e) {
|
|
1029
|
-
|
|
1033
|
+
k(this, e), this.timeslotSelected = b(this, "timeslotSelected", 7), this.timeslotConfirmed = b(this, "timeslotConfirmed", 7), this.handleConfirmedTimeslot = async (t, a) => {
|
|
1030
1034
|
t.preventDefault(), d("[nylas-timeslot-picker] Confirm timeslot", a), this.timeslotConfirmed.emit(a);
|
|
1031
1035
|
}, this.handleMouseEnter = (t) => {
|
|
1032
1036
|
this.hoveredTimeslotIndex = t;
|
|
1033
1037
|
}, this.handleMouseLeave = () => {
|
|
1034
1038
|
this.hoveredTimeslotIndex = -1;
|
|
1035
|
-
}, this.
|
|
1039
|
+
}, this.availability = void 0, this.isLoading = void 0, this.selectedTimeslot = void 0, this.selectedTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone, this.selectedDate = /* @__PURE__ */ new Date(), this.selectedLanguage = void 0, this.times = [], this.hoveredTimeslotIndex = void 0, this.selectedTimeslotIndex = void 0;
|
|
1036
1040
|
}
|
|
1037
1041
|
selectedLanguageChanged(e) {
|
|
1038
1042
|
c.changeLanguage(e);
|
|
@@ -1040,7 +1044,7 @@ const ce = class {
|
|
|
1040
1044
|
selectedDateChanged(e) {
|
|
1041
1045
|
var t;
|
|
1042
1046
|
if (d("[nylas-timeslot-picker] Selected date changed", { newVal: e }), e && (this.selectedTimeslotIndex = "", typeof e < "u")) {
|
|
1043
|
-
const a = (t = this.availability) == null ? void 0 : t.filter((
|
|
1047
|
+
const a = (t = this.availability) == null ? void 0 : t.filter((s) => E(s.start_time, e)).map((s) => s);
|
|
1044
1048
|
this.times = a || [];
|
|
1045
1049
|
}
|
|
1046
1050
|
}
|
|
@@ -1055,12 +1059,13 @@ const ce = class {
|
|
|
1055
1059
|
disconnectedCallback() {
|
|
1056
1060
|
}
|
|
1057
1061
|
async componentWillLoad() {
|
|
1058
|
-
|
|
1059
|
-
const e = (t = this.availability) == null ? void 0 : t.filter((a) => this.selectedDate && E(a.start_time, this.selectedDate)).map((a) => a);
|
|
1060
|
-
this.times = e || [], d("[nylas-timeslot-picker] Component will load", { selectedDate: this.selectedDate, availability: this.availability, times: this.times });
|
|
1062
|
+
d("[nylas-timeslot-picker] Component will load", { selectedDate: this.selectedDate, availability: this.availability, times: this.times });
|
|
1061
1063
|
}
|
|
1062
1064
|
async componentDidLoad() {
|
|
1065
|
+
var t;
|
|
1063
1066
|
d("[nylas-timeslot-picker] Component did load");
|
|
1067
|
+
const e = (t = this.availability) == null ? void 0 : t.filter((a) => this.selectedDate && E(a.start_time, this.selectedDate)).map((a) => a);
|
|
1068
|
+
this.times = e || [];
|
|
1064
1069
|
}
|
|
1065
1070
|
getTimeslotId(e, t) {
|
|
1066
1071
|
return `${e.toLocaleDateString()}-${t}`;
|
|
@@ -1082,8 +1087,8 @@ const ce = class {
|
|
|
1082
1087
|
}
|
|
1083
1088
|
render() {
|
|
1084
1089
|
return this.isLoading ? n(g, null, n("div", { class: "loading" }, new Array(6).fill(0).map((e, t) => n("div", { class: "timeslot-skeleton", style: { animationDelay: `${t * 20}ms` } })))) : this.availability && this.availability.length === 0 ? n(g, null, n("div", { class: "empty" }, n("span", null, "No dates available"))) : (!this.times || this.times.length === 0) && this.selectedDate ? n(g, null, n("div", { class: "empty" }, n("span", null, "No time slots available for selected date"))) : this.selectedDate ? n(g, { part: "ntp" }, n("div", { class: "time-picker-wrapper" }, n("div", { class: "timeslots" }, this.times.map((e, t) => {
|
|
1085
|
-
var a,
|
|
1086
|
-
return n("button", { part: `ntp__timeslot ${((
|
|
1090
|
+
var a, s, o, i;
|
|
1091
|
+
return n("button", { part: `ntp__timeslot ${((s = (a = this.selectedTimeslot) == null ? void 0 : a.start_time) == null ? void 0 : s.getTime()) === e.start_time.getTime() ? "ntp__timeslot--selected" : ""}`, "aria-role": "button", class: {
|
|
1087
1092
|
time: !0,
|
|
1088
1093
|
selected: typeof this.selectedTimeslot < "u" && ((i = (o = this.selectedTimeslot) == null ? void 0 : o.start_time) == null ? void 0 : i.getTime()) === e.start_time.getTime()
|
|
1089
1094
|
}, 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 }));
|
|
@@ -1097,8 +1102,8 @@ const ce = class {
|
|
|
1097
1102
|
};
|
|
1098
1103
|
}
|
|
1099
1104
|
};
|
|
1100
|
-
|
|
1101
|
-
|
|
1105
|
+
tt([
|
|
1106
|
+
_({
|
|
1102
1107
|
name: "nylas-timeslot-picker",
|
|
1103
1108
|
stateToProps: /* @__PURE__ */ new Map([
|
|
1104
1109
|
["scheduler.selectedDate", "selectedDate"],
|
|
@@ -1118,22 +1123,22 @@ et([
|
|
|
1118
1123
|
},
|
|
1119
1124
|
fireRegisterEvent: !0
|
|
1120
1125
|
}),
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
],
|
|
1125
|
-
|
|
1126
|
+
Z("design:type", Function),
|
|
1127
|
+
Z("design:paramtypes", []),
|
|
1128
|
+
Z("design:returntype", void 0)
|
|
1129
|
+
], de.prototype, "render", null);
|
|
1130
|
+
de.style = et;
|
|
1126
1131
|
export {
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1132
|
+
ee as nylas_booked_event_card,
|
|
1133
|
+
te as nylas_booking_form,
|
|
1134
|
+
ne as nylas_cancel_booking_form,
|
|
1135
|
+
ae as nylas_cancelled_event_card,
|
|
1136
|
+
ie as nylas_confirmed_event_card,
|
|
1137
|
+
se as nylas_date_picker,
|
|
1133
1138
|
re as nylas_locale_switch,
|
|
1134
1139
|
qe as nylas_logo,
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1140
|
+
Ge as nylas_notification,
|
|
1141
|
+
le as nylas_organizer_confirmation_card,
|
|
1142
|
+
ce as nylas_selected_event_card,
|
|
1143
|
+
de as nylas_timeslot_picker
|
|
1139
1144
|
};
|