@nylas/react 1.1.0-canary.16 → 1.1.0-canary.18
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-3091976b.cjs +1 -0
- package/dist/add-circle-icon_2.entry-3b13ee64.js +25 -0
- package/dist/{archive-icon_7.entry-54dc5cc2.js → archive-icon_7.entry-8932618a.js} +19 -19
- package/dist/{archive-icon_7.entry-073d9915.cjs → archive-icon_7.entry-c2b6d860.cjs} +1 -1
- package/dist/{arrow-icon.entry-869a1db9.js → arrow-icon.entry-1f54c377.js} +4 -4
- package/dist/{arrow-icon.entry-bada78b8.cjs → arrow-icon.entry-a159bee8.cjs} +1 -1
- package/dist/{bold-icon_3.entry-5695177e.js → bold-icon_3.entry-447d0537.js} +10 -10
- package/dist/{bold-icon_3.entry-cc6150c9.cjs → bold-icon_3.entry-c51e1af3.cjs} +1 -1
- package/dist/{button-component.entry-a0533c8b.js → button-component.entry-52ccb6d9.js} +2 -2
- package/dist/{button-component.entry-3703ecff.cjs → button-component.entry-e79b2d08.cjs} +1 -1
- package/dist/{calendar-cancel-icon.entry-0f1d98b3.cjs → calendar-cancel-icon.entry-805febcc.cjs} +1 -1
- package/dist/{calendar-cancel-icon.entry-a9ab0b09.js → calendar-cancel-icon.entry-a78f27bc.js} +2 -2
- package/dist/{calendar-check-icon_2.entry-6b83717e.cjs → calendar-check-icon_2.entry-4a0fd7bd.cjs} +1 -1
- package/dist/{calendar-check-icon_2.entry-a62b5d2c.js → calendar-check-icon_2.entry-7c8b6c92.js} +3 -3
- package/dist/{calendar-icon.entry-08f83da9.cjs → calendar-icon.entry-1fc018b4.cjs} +1 -1
- package/dist/{calendar-icon.entry-ddc22561.js → calendar-icon.entry-96f9727f.js} +5 -5
- package/dist/calendar-info-icon_28.entry-2054703c.cjs +1 -0
- package/dist/{calendar-info-icon_27.entry-f02f44b7.js → calendar-info-icon_28.entry-e7bebd13.js} +527 -701
- package/dist/{chevron-icon_3.entry-f27202a2.js → chevron-icon_3.entry-25d90239.js} +6 -6
- package/dist/chevron-icon_3.entry-7bd4a4b5.cjs +1 -0
- package/dist/{clock-icon_2.entry-b7b8ef46.cjs → clock-icon_2.entry-2406c3d0.cjs} +1 -1
- package/dist/{clock-icon_2.entry-2277fd45.js → clock-icon_2.entry-c1b22ed4.js} +5 -5
- package/dist/{constants-f34b9c6e-ccdbc4ac.cjs → constants-f34b9c6e-b774916c.cjs} +1 -1
- package/dist/{constants-f34b9c6e-bbca6b6e.js → constants-f34b9c6e-f1c4dd0d.js} +1 -1
- package/dist/document-refresh-icon.entry-570f9c9d.js +15 -0
- package/dist/document-refresh-icon.entry-a0293858.cjs +1 -0
- package/dist/elements/index.d.ts +1 -0
- package/dist/{elements-dc5b338e-d48368b1.cjs → elements-dc5b338e-550a6cb1.cjs} +1 -1
- package/dist/{elements-dc5b338e-c4a07acc.js → elements-dc5b338e-cafa7a55.js} +1 -1
- package/dist/{focus-visible-e8093c16-10c0fa06.js → focus-visible-e8093c16-022799ce.js} +1 -1
- package/dist/{focus-visible-e8093c16-c86f3687.cjs → focus-visible-e8093c16-c14162e8.cjs} +1 -1
- package/dist/{forward-icon_6.entry-07cd4b52.cjs → forward-icon_6.entry-55752b23.cjs} +2 -2
- package/dist/{forward-icon_6.entry-39d788af.js → forward-icon_6.entry-9b832146.js} +9 -9
- package/dist/{globe-icon.entry-60a53e89.js → globe-icon.entry-2b61820e.js} +4 -4
- package/dist/{globe-icon.entry-76c90d97.cjs → globe-icon.entry-dabe7b8b.cjs} +1 -1
- package/dist/google-logo-icon_4.entry-60c0d39a.cjs +1 -0
- package/dist/google-logo-icon_4.entry-a0dc33da.js +467 -0
- package/dist/index-53420959-67beefed.js +5 -0
- package/dist/index-53420959-d3254a34.cjs +1 -0
- package/dist/{index-6d9eeb53-66c114b2.cjs → index-6d9eeb53-3049fc04.cjs} +1 -1
- package/dist/{index-6d9eeb53-38c9f47c.js → index-6d9eeb53-3edef246.js} +2 -2
- package/dist/{index-f383e3c4.js → index-812162da.js} +902 -901
- package/dist/{index-f435e814.cjs → index-e3e9b594.cjs} +3 -3
- package/dist/{index.es-9cc0eb3c-09dc620b.cjs → index.es-9cc0eb3c-0c99c055.cjs} +1 -1
- package/dist/{index.es-9cc0eb3c-510db795.js → index.es-9cc0eb3c-52226859.js} +1 -1
- package/dist/{info-icon_2.entry-a61859ac.js → info-icon_2.entry-2fe6c16c.js} +8 -8
- package/dist/{info-icon_2.entry-7fe8bcd9.cjs → info-icon_2.entry-5f6b9af8.cjs} +1 -1
- package/dist/{input-component.entry-12f60175.js → input-component.entry-1195d579.js} +6 -6
- package/dist/{input-component.entry-04dcc655.cjs → input-component.entry-2b6e44c4.cjs} +1 -1
- package/dist/{input-dropdown_2.entry-0e5925a7.js → input-dropdown_2.entry-dbd0d6f4.js} +35 -28
- package/dist/input-dropdown_2.entry-dbdb5aa3.cjs +1 -0
- package/dist/loading-icon.entry-027a2ad1.js +15 -0
- package/dist/{loading-icon.entry-f82786b4.cjs → loading-icon.entry-e179f122.cjs} +1 -1
- package/dist/{mailbox-store-64b4ef7c-1e6c96cc.cjs → mailbox-store-64b4ef7c-0eac526c.cjs} +1 -1
- package/dist/{mailbox-store-64b4ef7c-017196a6.js → mailbox-store-64b4ef7c-22a6c565.js} +2 -2
- package/dist/nylas-booked-event-card_10.entry-84f64ba5.cjs +1 -0
- package/dist/{nylas-booked-event-card_10.entry-2dff7f16.js → nylas-booked-event-card_10.entry-e0990f5b.js} +170 -170
- package/dist/{nylas-custom-booking-flow.entry-36f7a943.cjs → nylas-custom-booking-flow.entry-898c8cc9.cjs} +1 -1
- package/dist/{nylas-custom-booking-flow.entry-feed589b.js → nylas-custom-booking-flow.entry-bc64af5f.js} +7 -7
- package/dist/{nylas-form-card.entry-e9f09602.cjs → nylas-form-card.entry-0c71f4fc.cjs} +1 -1
- package/dist/{nylas-form-card.entry-49f519dd.js → nylas-form-card.entry-c564b52e.js} +9 -9
- package/dist/{nylas-if-state.entry-127694a9.js → nylas-if-state.entry-e9486e12.js} +3 -3
- package/dist/{nylas-if-state.entry-81916723.cjs → nylas-if-state.entry-ff6a2046.cjs} +1 -1
- package/dist/{nylas-list-folders.entry-e3e9ec1f.js → nylas-list-folders.entry-0258af1e.js} +7 -7
- package/dist/{nylas-list-folders.entry-f4c68fb9.cjs → nylas-list-folders.entry-90716d2b.cjs} +1 -1
- package/dist/{nylas-list-threads.entry-fa4b5318.js → nylas-list-threads.entry-1abcdd30.js} +3 -3
- package/dist/{nylas-list-threads.entry-f0a1b9d1.cjs → nylas-list-threads.entry-21edf012.cjs} +1 -1
- package/dist/{nylas-login.entry-aeac716e.cjs → nylas-login.entry-2e0ce95e.cjs} +1 -1
- package/dist/{nylas-login.entry-6d17e994.js → nylas-login.entry-ba7383ac.js} +3 -3
- package/dist/{nylas-mailbox-pagination.entry-50fba238.cjs → nylas-mailbox-pagination.entry-ba6beb08.cjs} +1 -1
- package/dist/{nylas-mailbox-pagination.entry-c440f56a.js → nylas-mailbox-pagination.entry-f6186560.js} +2 -2
- package/dist/{nylas-mailbox-toolbar-button.entry-d3d0c870.cjs → nylas-mailbox-toolbar-button.entry-0875aadb.cjs} +1 -1
- package/dist/{nylas-mailbox-toolbar-button.entry-14e30d36.js → nylas-mailbox-toolbar-button.entry-e18059b0.js} +10 -10
- package/dist/{nylas-mailbox.entry-a59159c7.js → nylas-mailbox.entry-2e3815ed.js} +4 -4
- package/dist/{nylas-mailbox.entry-2fdb3d4c.cjs → nylas-mailbox.entry-bb2905bf.cjs} +1 -1
- package/dist/{nylas-provider.entry-dfa8c7c1.cjs → nylas-provider.entry-51c5cdbf.cjs} +1 -1
- package/dist/{nylas-provider.entry-d7dbb5fc.js → nylas-provider.entry-69ee5061.js} +13 -13
- package/dist/{nylas-scheduler-editor.entry-67e71234.cjs → nylas-scheduler-editor.entry-923b8566.cjs} +2 -2
- package/dist/{nylas-scheduler-editor.entry-3b44b807.js → nylas-scheduler-editor.entry-d4a9afb1.js} +5 -5
- package/dist/{nylas-scheduling.entry-0ce0dab9.cjs → nylas-scheduling.entry-54f1a5e9.cjs} +1 -1
- package/dist/{nylas-scheduling.entry-68f72bf7.js → nylas-scheduling.entry-f82a2822.js} +3 -3
- package/dist/{nylas-threads-refresh.entry-23a83bd4.js → nylas-threads-refresh.entry-72482d2f.js} +10 -10
- package/dist/{nylas-threads-refresh.entry-955e92c7.cjs → nylas-threads-refresh.entry-99001756.cjs} +1 -1
- package/dist/{nylas-threads-search.entry-2fb6db63.cjs → nylas-threads-search.entry-462527fd.cjs} +1 -1
- package/dist/{nylas-threads-search.entry-8f01ee4a.js → nylas-threads-search.entry-c5fe50e5.js} +14 -14
- package/dist/nylas-time-window-picker.entry-0d93e7cc.js +316 -0
- package/dist/nylas-time-window-picker.entry-ccffcf2b.cjs +1 -0
- package/dist/{nylas-view-thread.entry-b957f88b.js → nylas-view-thread.entry-2d34b41c.js} +6 -6
- package/dist/{nylas-view-thread.entry-3cf0c1ac.cjs → nylas-view-thread.entry-58432a52.cjs} +1 -1
- package/dist/play-icon_2.entry-1ea3fd6b.cjs +1 -0
- package/dist/{play-icon_2.entry-ecdf8ea4.js → play-icon_2.entry-d08adf17.js} +7 -7
- package/dist/react.cjs +1 -1
- package/dist/react.js +41 -40
- package/dist/{refresh-icon.entry-76e58ccb.cjs → refresh-icon.entry-1e670732.cjs} +1 -1
- package/dist/{refresh-icon.entry-480d28aa.js → refresh-icon.entry-a041136d.js} +4 -4
- package/dist/{register-component-a5a9ca5d-438c8a96.js → register-component-a5a9ca5d-a5c01c35.js} +1 -1
- package/dist/{register-component-a5a9ca5d-ebf633cf.cjs → register-component-a5a9ca5d-b68b6039.cjs} +1 -1
- package/dist/{scheduler-config-store-4a50a03d-d5a5899e.cjs → scheduler-config-store-4a50a03d-884e6df8.cjs} +1 -1
- package/dist/{scheduler-config-store-4a50a03d-defa6368.js → scheduler-config-store-4a50a03d-ee42ff96.js} +1 -1
- package/dist/{scheduler-store-f02ce045-de4cb1f5.js → scheduler-store-f02ce045-23a14e3f.js} +1 -1
- package/dist/{scheduler-store-f02ce045-00faab09.cjs → scheduler-store-f02ce045-42e3647c.cjs} +1 -1
- package/dist/{textarea-component.entry-1c8d11af.js → textarea-component.entry-1b4c771b.js} +4 -4
- package/dist/{textarea-component.entry-5ff249a8.cjs → textarea-component.entry-24a830c1.cjs} +1 -1
- package/dist/{translate-icon.entry-a55c013b.cjs → translate-icon.entry-0c0add25.cjs} +1 -1
- package/dist/{translate-icon.entry-3741cac0.js → translate-icon.entry-44bde57b.js} +2 -2
- package/dist/{warning-icon.entry-445352b5.js → warning-icon.entry-8956cba2.js} +5 -5
- package/dist/{warning-icon.entry-1a104c52.cjs → warning-icon.entry-9a77ab01.cjs} +1 -1
- package/package.json +2 -2
- package/dist/add-circle-icon_2.entry-035ffd48.cjs +0 -1
- package/dist/add-circle-icon_2.entry-5cadaf97.js +0 -25
- package/dist/calendar-info-icon_27.entry-a8390790.cjs +0 -1
- package/dist/chevron-icon_3.entry-978b52d5.cjs +0 -1
- package/dist/document-refresh-icon.entry-5795e2a9.cjs +0 -1
- package/dist/document-refresh-icon.entry-656a5e02.js +0 -15
- package/dist/google-logo-icon_4.entry-5402eae2.cjs +0 -1
- package/dist/google-logo-icon_4.entry-d327d68f.js +0 -438
- package/dist/index-53420959-791b4e73.js +0 -5
- package/dist/index-53420959-9f979766.cjs +0 -1
- package/dist/input-dropdown_2.entry-d9bff099.cjs +0 -1
- package/dist/loading-icon.entry-51ddd748.js +0 -15
- package/dist/nylas-booked-event-card_10.entry-5a9a4cc6.cjs +0 -1
- package/dist/play-icon_2.entry-c92d5237.cjs +0 -1
- package/dist/toggle-switch.entry-26d3d1c9.cjs +0 -1
- package/dist/toggle-switch.entry-339ab48b.js +0 -25
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { r as m, c as d, d as c, h as
|
|
2
|
-
import { R as y } from "./register-component-a5a9ca5d-
|
|
3
|
-
import { T as _, g as re, L as q } from "./constants-f34b9c6e-
|
|
4
|
-
import { s as z } from "./index-6d9eeb53-
|
|
5
|
-
import "./index-53420959-
|
|
1
|
+
import { r as m, c as d, d as c, h as n, H as h, g as ae, l as V, z as ne, A as ie, C as u, D as oe, E as S, F as se } from "./index-812162da.js";
|
|
2
|
+
import { R as y } from "./register-component-a5a9ca5d-a5c01c35.js";
|
|
3
|
+
import { T as _, g as re, L as q } from "./constants-f34b9c6e-f1c4dd0d.js";
|
|
4
|
+
import { s as z } from "./index-6d9eeb53-3edef246.js";
|
|
5
|
+
import "./index-53420959-67beefed.js";
|
|
6
6
|
import "react";
|
|
7
7
|
import "react-dom";
|
|
8
8
|
const le = ':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}sp-theme{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 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}.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}.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-button{background-color:var(--nylas-base-0);color:var(--nylas-base-700);border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);font-size:16px;padding:8px;font-family:var(--nylas-font-family);font-weight:600;height:48px;line-height:24px}sp-button.cancel{color:var(--nylas-error)}sp-button.cancel:hover,sp-button.cancel:focus{border-color:var(--nylas-error)}sp-button.cancel:active{color:var(--nylas-error-pressed);border-color:var(--nylas-error-pressed)}sp-button.reschedule:hover,sp-button.reschedule:focus{border-color:var(--nylas-primary)}sp-button.reschedule:active{border-color:var(--nylas-base-600)}sp-divider{background-color:var(--nylas-base-200);height:1px}calendar-check-icon{display:flex;align-items:center;justify-content:center;height:100%}', ce = le;
|
|
9
|
-
var de = function(e, t,
|
|
10
|
-
var
|
|
9
|
+
var de = function(e, t, i, o) {
|
|
10
|
+
var s = arguments.length, a = s < 3 ? t : o === null ? o = Object.getOwnPropertyDescriptor(t, i) : o, r;
|
|
11
11
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
12
|
-
|
|
12
|
+
a = Reflect.decorate(e, t, i, o);
|
|
13
13
|
else
|
|
14
14
|
for (var l = e.length - 1; l >= 0; l--)
|
|
15
|
-
(r = e[l]) && (
|
|
16
|
-
return
|
|
15
|
+
(r = e[l]) && (a = (s < 3 ? r(a) : s > 3 ? r(t, i, a) : r(t, i)) || a);
|
|
16
|
+
return s > 3 && a && Object.defineProperty(t, i, a), a;
|
|
17
17
|
}, B = function(e, t) {
|
|
18
18
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
19
19
|
return Reflect.metadata(e, t);
|
|
@@ -21,17 +21,17 @@ var de = function(e, t, n, s) {
|
|
|
21
21
|
const W = class {
|
|
22
22
|
constructor(e) {
|
|
23
23
|
m(this, e), this.cancelBookingButtonClicked = d(this, "cancelBookingButtonClicked", 7), this.rescheduleButtonClicked = d(this, "rescheduleButtonClicked", 7), this.rescheduleBookedEventError = d(this, "rescheduleBookedEventError", 7), this.cancelBookedEventValidationError = d(this, "cancelBookedEventValidationError", 7), this.handleCancelBookingButtonClicked = () => {
|
|
24
|
-
var
|
|
25
|
-
const t = new Date(this.selectedTimeslot.start_time),
|
|
26
|
-
t.getTime() <
|
|
24
|
+
var s;
|
|
25
|
+
const t = new Date(this.selectedTimeslot.start_time), i = (s = this.configSettings) == null ? void 0 : s.scheduler.min_cancellation_notice, o = t.getTime() - i * 60 * 1e3;
|
|
26
|
+
t.getTime() < o ? this.cancelBookedEventValidationError.emit({
|
|
27
27
|
error: {
|
|
28
28
|
title: "Cancellation Error",
|
|
29
|
-
message: `You cannot cancel the booking within ${
|
|
29
|
+
message: `You cannot cancel the booking within ${i} minutes of the event.`
|
|
30
30
|
}
|
|
31
31
|
}) : this.cancelBookingButtonClicked.emit({ bookingId: this.eventInfo.booking_id });
|
|
32
32
|
}, this.handleRescheduleButtonClicked = () => {
|
|
33
|
-
const t = (
|
|
34
|
-
this.rescheduleBookedEventError.emit(
|
|
33
|
+
const t = (i) => {
|
|
34
|
+
this.rescheduleBookedEventError.emit(i);
|
|
35
35
|
};
|
|
36
36
|
this.rescheduleButtonClicked.emit({ bookingId: this.eventInfo.booking_id, errorHandler: t });
|
|
37
37
|
}, this.getOrganizer = (t) => t == null ? void 0 : t.organizer, this.getPaticipantType = (t) => {
|
|
@@ -56,12 +56,12 @@ const W = class {
|
|
|
56
56
|
c("[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.');
|
|
57
57
|
}
|
|
58
58
|
render() {
|
|
59
|
-
var e, t,
|
|
60
|
-
return
|
|
59
|
+
var e, t, i, o, s, a, r, l, b, f, v, k, x, C, g, p, w, $, A, Z, G;
|
|
60
|
+
return n(h, { key: "25f461e554d352c8b62341f77c84d61521a40472", part: "nbec" }, n("sp-theme", { key: "fa7ae9d97b3c334d71a64076bd6c5787b48b124b", theme: "spectrum", color: "dark", scale: "medium" }, n("div", { key: "731d9d89bfc2f63b8a1095ea671f39d1a99dc4a4", class: "booked-event-timezone" }, n("globe-icon", { key: "e7a7d73d7c9461f34145ddf3e99bf5640b39ab56" }), _[this.selectedTimezone]), n("div", { key: "dbb07cac45a1528a2633119af6050a630f8df173", class: "event-card-wrapper", part: "nbec__card" }, n("div", { key: "79b6b636707f8e867358da1b4340e6f0bfeb386e", class: "calendar-icon" }, n("calendar-check-icon", { key: "a268b01ecbf64976dc61c9e3c66a67cade9d2227" })), n("div", { key: "52c4c97407582b05bfb87e1379930f7cf149c013", class: "booked-event-header" }, n("h2", { key: "ed4631c601b4920b20c27d158063dcbef92084d4", slot: "card-title", part: "nbec__title" }, "Booking ", this.rescheduleBookingId ? "rescheduled" : "confirmed", "!"), n("div", { key: "f5e93f73c4828764cb7e27cc3d5ab2b761e66fdc", part: "nbec__description" }, ((e = this.getOrganizer(this.eventInfo)) == null ? void 0 : e.name) || ((t = this.getOrganizer(this.eventInfo)) == null ? void 0 : t.email), " & ", ((o = (i = this.bookingInfo) == null ? void 0 : i.primaryParticipant) == null ? void 0 : o.name) || ((a = (s = this.bookingInfo) == null ? void 0 : s.primaryParticipant) == null ? void 0 : a.email))), n("sp-divider", { key: "d9f14eeb24c4935f131edebb3102ffd69d2bde43" }), n("div", { key: "57f6f7877162eb8de8898d6523dac452b3c841e9", class: "booking-date-time" }, n("checkmark-circle-icon", { key: "5bd672ae7c70b0102d6a14e2761b8ecc222ce488" }), n("h3", { key: "5e8ca582a26a51f790ca111648381a10f8ef917c" }, "Booking date and time"), n("p", { key: "0b98f73c94add678003f63cd1e59352f7acd29b3" }, new Date((r = this.selectedTimeslot) == null ? void 0 : r.start_time).toLocaleDateString(void 0, { dateStyle: "full" }), " ", n("br", { key: "cc2a50917760651ca2e015fa22f264740b545a58" }), new Date((l = this.selectedTimeslot) == null ? void 0 : l.start_time).toLocaleTimeString(void 0, { timeStyle: "short" }), " -", " ", new Date((b = this.selectedTimeslot) == null ? void 0 : b.end_time).toLocaleTimeString(void 0, { timeStyle: "short" }))), n("div", { key: "5ccf1dbc6002c9eaf60b3bd9211e590ab9135d68", class: "booking-participants" }), n("sp-divider", { key: "7ff9b9f4fa4bfc19da47d358ddda325b13b1a465" }), n("div", { key: "2c3d69854b255864cca3782a9ad87175a18d8cf9", class: {
|
|
61
61
|
footer: !0,
|
|
62
62
|
"no-footer": ((v = (f = this.configSettings) == null ? void 0 : f.scheduler) == null ? void 0 : v.hide_cancellation_options) && ((x = (k = this.configSettings) == null ? void 0 : k.scheduler) == null ? void 0 : x.hide_rescheduling_options),
|
|
63
63
|
"no-template-cols": ((g = (C = this.configSettings) == null ? void 0 : C.scheduler) == null ? void 0 : g.hide_cancellation_options) || ((w = (p = this.configSettings) == null ? void 0 : p.scheduler) == null ? void 0 : w.hide_rescheduling_options)
|
|
64
|
-
} }, !((A = ($ = this.configSettings) == null ? void 0 : $.scheduler) != null && A.hide_cancellation_options) &&
|
|
64
|
+
} }, !((A = ($ = this.configSettings) == null ? void 0 : $.scheduler) != null && A.hide_cancellation_options) && n("sp-button", { variant: "secondary", treatment: "outline", class: "cancel", onClick: this.handleCancelBookingButtonClicked, part: "nbec__button-outline nbec__cancel-cta" }, "Cancel booking"), !((G = (Z = this.configSettings) == null ? void 0 : Z.scheduler) != null && G.hide_rescheduling_options) && n("sp-button", { variant: "secondary", treatment: "outline", class: "reschedule", onClick: this.handleRescheduleButtonClicked, part: "nbec__button-outline nbec__reschedule-cta" }, "Reschedule")))));
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
67
|
de([
|
|
@@ -79,8 +79,8 @@ de([
|
|
|
79
79
|
t.scheduler.setCancel(e.detail.bookingId);
|
|
80
80
|
},
|
|
81
81
|
rescheduleButtonClicked: async (e, t) => {
|
|
82
|
-
const
|
|
83
|
-
|
|
82
|
+
const i = await t.scheduler.setReschedule(e.detail.bookingId), { errorHandler: o } = e.detail;
|
|
83
|
+
o && (!i || "error" in i) && o(i);
|
|
84
84
|
}
|
|
85
85
|
},
|
|
86
86
|
fireRegisterEvent: !0
|
|
@@ -91,40 +91,40 @@ de([
|
|
|
91
91
|
], W.prototype, "render", null);
|
|
92
92
|
W.style = ce;
|
|
93
93
|
const be = ':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:flex;flex-direction:row;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{flex-direction:column-reverse}}sp-button{background-color:transparent;color:var(--nylas-base-800);border-radius:var(--nylas-border-radius-2x);--button-width:50%;font-family:var(--nylas-font-family);font-size:16px;font-weight:600;border:none;height:48px;padding:14px}@media screen and (max-width: 768px){sp-button{--button-width:100%}}sp-button:hover,sp-button:focus{background-color:var(--nylas-base-100);color:var(--nylas-primary);border-radius:var(--nylas-border-radius-2x)}sp-button:active{background-color:var(--nylas-base-200);color:var(--nylas-base-800)}sp-button.back{width:var(--button-width);background-color:transparent;color:var(--nylas-base-700);outline:1px solid var(--nylas-base-300)}sp-button.back:hover,sp-button.back:focus{outline-color:var(--nylas-primary)}sp-button.back:active{outline:2px solid var(--nylas-base-600)}sp-button.book{width:var(--button-width);background-color:var(--nylas-primary);color:var(--nylas-base-0)}sp-button.book:hover,sp-button.book:focus{background-color:var(--nylas-base-600)}sp-button.book:active{background-color:var(--nylas-base-800)}.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)}.guest-email-input{position:relative;display:flex;width:100%}', fe = be;
|
|
94
|
-
var he = function(e, t,
|
|
95
|
-
var
|
|
94
|
+
var he = function(e, t, i, o) {
|
|
95
|
+
var s = arguments.length, a = s < 3 ? t : o === null ? o = Object.getOwnPropertyDescriptor(t, i) : o, r;
|
|
96
96
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
97
|
-
|
|
97
|
+
a = Reflect.decorate(e, t, i, o);
|
|
98
98
|
else
|
|
99
99
|
for (var l = e.length - 1; l >= 0; l--)
|
|
100
|
-
(r = e[l]) && (
|
|
101
|
-
return
|
|
100
|
+
(r = e[l]) && (a = (s < 3 ? r(a) : s > 3 ? r(t, i, a) : r(t, i)) || a);
|
|
101
|
+
return s > 3 && a && Object.defineProperty(t, i, a), a;
|
|
102
102
|
}, L = function(e, t) {
|
|
103
103
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
104
104
|
return Reflect.metadata(e, t);
|
|
105
105
|
};
|
|
106
106
|
const E = /^[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])?)*$/, U = class {
|
|
107
107
|
constructor(e) {
|
|
108
|
-
m(this, e), this.nameChanged = d(this, "nameChanged", 7), this.emailChanged = d(this, "emailChanged", 7), this.backButtonClicked = d(this, "backButtonClicked", 7), this.detailsConfirmed = d(this, "detailsConfirmed", 7), this.bookingFormError = d(this, "bookingFormError", 7), this.bookingFormSubmitted = d(this, "bookingFormSubmitted", 7), this.handleGuestChange = (t,
|
|
108
|
+
m(this, e), this.nameChanged = d(this, "nameChanged", 7), this.emailChanged = d(this, "emailChanged", 7), this.backButtonClicked = d(this, "backButtonClicked", 7), this.detailsConfirmed = d(this, "detailsConfirmed", 7), this.bookingFormError = d(this, "bookingFormError", 7), this.bookingFormSubmitted = d(this, "bookingFormSubmitted", 7), this.handleGuestChange = (t, i) => {
|
|
109
109
|
this.resetGuestEmailError(t);
|
|
110
|
-
const
|
|
111
|
-
|
|
112
|
-
}, this.handleGuestBlur = (t,
|
|
113
|
-
if (this.resetGuestEmailError(t),
|
|
110
|
+
const o = [...this.guestEmails];
|
|
111
|
+
o[t] = z(i), this.guestEmails = [...o];
|
|
112
|
+
}, this.handleGuestBlur = (t, i) => {
|
|
113
|
+
if (this.resetGuestEmailError(t), i === "") {
|
|
114
114
|
this.guestEmailErrors[t] = "Email is required";
|
|
115
115
|
return;
|
|
116
116
|
}
|
|
117
|
-
if (!E.test(
|
|
117
|
+
if (!E.test(i)) {
|
|
118
118
|
this.guestEmailErrors[t] = "Enter a valid email address";
|
|
119
119
|
return;
|
|
120
120
|
}
|
|
121
|
-
this.handleGuestChange(t,
|
|
121
|
+
this.handleGuestChange(t, i);
|
|
122
122
|
}, this.addGuestButtonClickedHandler = (t) => {
|
|
123
123
|
t.preventDefault(), this.guestEmails = [...this.guestEmails, ""];
|
|
124
|
-
}, this.removeGuestButtonClickHandler = (t,
|
|
125
|
-
t.preventDefault(), this.resetGuestEmailError(
|
|
126
|
-
const
|
|
127
|
-
|
|
124
|
+
}, this.removeGuestButtonClickHandler = (t, i) => {
|
|
125
|
+
t.preventDefault(), this.resetGuestEmailError(i);
|
|
126
|
+
const o = [...this.guestEmails];
|
|
127
|
+
o.splice(i, 1), this.guestEmails = [...o];
|
|
128
128
|
}, this.handleBackButtonClicked = () => {
|
|
129
129
|
this.backButtonClicked.emit();
|
|
130
130
|
}, this.bookButtonClickedHandler = async (t) => {
|
|
@@ -132,29 +132,29 @@ const E = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-
|
|
|
132
132
|
if (t.preventDefault(), this.bookingFormSubmitted.emit().defaultPrevented)
|
|
133
133
|
return;
|
|
134
134
|
c("nylas-booking-form", "bookButtonClickedHandler", this.bookingInfo);
|
|
135
|
-
const
|
|
136
|
-
if (!
|
|
135
|
+
const o = this.name || ((b = (l = this.bookingInfo) == null ? void 0 : l.primaryParticipant) == null ? void 0 : b.name), s = this.email || ((v = (f = this.bookingInfo) == null ? void 0 : f.primaryParticipant) == null ? void 0 : v.email);
|
|
136
|
+
if (!o || o === "") {
|
|
137
137
|
this.isNameValid = !1, this.validationError.name = "Name is required", this.bookingFormError.emit({
|
|
138
138
|
title: "Booking form error",
|
|
139
139
|
description: "Name is required"
|
|
140
140
|
});
|
|
141
141
|
return;
|
|
142
142
|
}
|
|
143
|
-
if (!
|
|
143
|
+
if (!s || s === "") {
|
|
144
144
|
this.isEmailValid = !1, this.validationError.email = "Email is required", this.bookingFormError.emit({
|
|
145
145
|
title: "Booking form error",
|
|
146
146
|
description: "Email is required"
|
|
147
147
|
});
|
|
148
148
|
return;
|
|
149
149
|
}
|
|
150
|
-
if (!E.test(
|
|
150
|
+
if (!E.test(s)) {
|
|
151
151
|
this.isEmailValid = !1, this.validationError.email = "Enter a valid email address", this.bookingFormError.emit({
|
|
152
152
|
title: "Booking form error",
|
|
153
153
|
description: "Invalid email"
|
|
154
154
|
});
|
|
155
155
|
return;
|
|
156
156
|
}
|
|
157
|
-
let
|
|
157
|
+
let a = [];
|
|
158
158
|
if (this.guestEmails.length > 0) {
|
|
159
159
|
let g = !1;
|
|
160
160
|
if (this.guestEmails.forEach((p, w) => {
|
|
@@ -166,21 +166,21 @@ const E = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-
|
|
|
166
166
|
});
|
|
167
167
|
return;
|
|
168
168
|
}
|
|
169
|
-
|
|
169
|
+
a = this.guestEmails.map((p) => ({ name: p.trim(), email: p.trim() }));
|
|
170
170
|
} else
|
|
171
|
-
(k = this.bookingInfo) != null && k.guests && (
|
|
171
|
+
(k = this.bookingInfo) != null && k.guests && (a = (x = this.bookingInfo) == null ? void 0 : x.guests);
|
|
172
172
|
const r = ((C = this.bookingInfo) == null ? void 0 : C.additionalFields) || [];
|
|
173
173
|
this.detailsConfirmed.emit({
|
|
174
174
|
primaryParticipant: {
|
|
175
|
-
name:
|
|
176
|
-
email:
|
|
175
|
+
name: o,
|
|
176
|
+
email: s
|
|
177
177
|
},
|
|
178
|
-
guests:
|
|
178
|
+
guests: a,
|
|
179
179
|
additionalFields: [...r, ...this.additionalFields]
|
|
180
180
|
});
|
|
181
|
-
}, this.updateAdditionalFields = (t,
|
|
182
|
-
const
|
|
183
|
-
|
|
181
|
+
}, this.updateAdditionalFields = (t, i, o) => {
|
|
182
|
+
const s = this.additionalFields.findIndex((a) => a.name === t);
|
|
183
|
+
s > -1 ? this.additionalFields[s].value = i : this.additionalFields.push({ name: t, value: i, type: o || "text" });
|
|
184
184
|
}, this.isLoading = void 0, this.bookingInfo = void 0, this.eventInfo = void 0, this.configSettings = void 0, this.name = "", this.email = "", this.guestEmails = [], this.guestEmailErrors = {}, this.isNameValid = !0, this.isEmailValid = !0, this.additionalFields = [], this.validationError = { name: "", email: "" };
|
|
185
185
|
}
|
|
186
186
|
connectedCallback() {
|
|
@@ -188,8 +188,8 @@ const E = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-
|
|
|
188
188
|
disconnectedCallback() {
|
|
189
189
|
}
|
|
190
190
|
componentWillLoad() {
|
|
191
|
-
var e, t,
|
|
192
|
-
c("nylas-booking-form", "componentWillLoad", this.bookingInfo), this.bookingInfo && ((e = this.bookingInfo) != null && e.primaryParticipant) && (this.name = (t = this.bookingInfo.primaryParticipant) == null ? void 0 : t.name, this.email = (
|
|
191
|
+
var e, t, i;
|
|
192
|
+
c("nylas-booking-form", "componentWillLoad", this.bookingInfo), this.bookingInfo && ((e = this.bookingInfo) != null && e.primaryParticipant) && (this.name = (t = this.bookingInfo.primaryParticipant) == null ? void 0 : t.name, this.email = (i = this.bookingInfo.primaryParticipant) == null ? void 0 : i.email);
|
|
193
193
|
}
|
|
194
194
|
bookingInfoChangedHandler(e) {
|
|
195
195
|
e && e.primaryParticipant && (this.name = e.primaryParticipant.name, this.email = e.primaryParticipant.email);
|
|
@@ -242,10 +242,10 @@ const E = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-
|
|
|
242
242
|
this.updateAdditionalFields(e.detail.label, e.detail.checked ? "true" : "false", "checkbox");
|
|
243
243
|
}
|
|
244
244
|
render() {
|
|
245
|
-
var e, t,
|
|
246
|
-
return
|
|
245
|
+
var e, t, i, o, s, a;
|
|
246
|
+
return n(h, { key: "1b81fd4591cd90c85a578a8d957ed561e457cba5" }, n("form", { key: "4a4fef983332d1752ccf44823620ec2b906bf71e", onSubmit: (r) => this.bookButtonClickedHandler(r), noValidate: !0 }, n("div", { key: "e55ebf5bb6fbb5175e6175d06ce0e0a5266962cf", class: "nylas-booking-form" }, n("div", { key: "d50d5fdbc7b68b3c54098a6dde600ed52c607eed", class: "input-wrapper" }, n("input-component", { key: "a299cb5d2043e5fedd6f5f66889d7640e74b8b55", label: "Name", name: "name", id: "name", defaultValue: ((t = (e = this.bookingInfo) == null ? void 0 : e.primaryParticipant) == null ? void 0 : t.name) || this.name, placeholder: "Enter your name", type: "text", required: !0, part: "nbf__input-textfield" })), n("div", { key: "0d095468473009d67120d668f5e961ca4d90c16d", class: "input-wrapper" }, n("input-component", { key: "e81345e3aca7fa9cd0a90be50f81cfa544a23336", label: "Email", name: "email", id: "email", pattern: E, defaultValue: ((o = (i = this.bookingInfo) == null ? void 0 : i.primaryParticipant) == null ? void 0 : o.email) || this.email, placeholder: "Enter your email", type: "email", required: !0, part: "nbf__input-textfield" })), ((a = (s = this.configSettings) == null ? void 0 : s.scheduler) == null ? void 0 : a.hide_additional_guests) !== !0 && n("div", { class: "input-wrapper" }, this.guestEmails.map((r, l) => n("div", { class: "input-wrapper button-wrapper" }, n("label", { class: {
|
|
247
247
|
error: !!this.guestEmailErrors[l]
|
|
248
|
-
} }, "Guest email"),
|
|
248
|
+
} }, "Guest email"), n("div", { class: "guest-email-input" }, n("input", { type: "email", id: `guest-email-${l}`, maxLength: 100, class: {
|
|
249
249
|
"guest-email": !0,
|
|
250
250
|
error: !!this.guestEmailErrors[l]
|
|
251
251
|
}, placeholder: "Enter guest email", value: r, "data-index": l, part: "nbf__input-textfield", onBlur: (b) => {
|
|
@@ -254,10 +254,10 @@ const E = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-
|
|
|
254
254
|
}, onInput: (b) => {
|
|
255
255
|
var f;
|
|
256
256
|
return this.handleGuestChange(l, (f = b.target) == null ? void 0 : f.value);
|
|
257
|
-
} }),
|
|
257
|
+
} }), n("button-component", { variant: "basic", onClick: (b) => this.removeGuestButtonClickHandler(b, l), class: {
|
|
258
258
|
"remove-guest": !0,
|
|
259
259
|
error: !!this.guestEmailErrors[l]
|
|
260
|
-
} },
|
|
260
|
+
} }, n("close-icon", null))), n("p", { class: "help-text" }, this.guestEmailErrors[l]))), n("button-component", { class: "add-guest", variant: "invisible", part: "nbf__button-ghost", onClick: (r) => this.addGuestButtonClickedHandler(r) }, n("div", { class: "button-content" }, n("add-circle-icon", { slot: "icon" }), "Add ", this.guestEmails.length > 0 ? "another " : "", "guest"))), n("slot", { key: "f47bffdf6a15943c78d4bb75051d0f6704afd623", name: "custom-booking-form" })), n("div", { key: "12631d6648d7ebdc9e6714a54690486d53c8c623", class: "cta" }, n("sp-button", { key: "a72caa2eb6b5d95ee83600aa37e89730bfd68fdb", treatment: "outline", variant: "secondary", class: "back", part: "nbf__button-outline", onClick: this.handleBackButtonClicked }, n("slot", { key: "be107ab400cb5802c6153217cde54b75ccede466", name: "booking-form-back-label" }, "Back")), n("sp-button", { key: "d6f322389050d4cbbb1aada135b27b6bc4d34d6d", variant: "primary", class: "book", part: "nbf__button-primary", type: "submit" }, this.isLoading && n("loading-icon", { slot: "icon" }), n("slot", { key: "17ee459bee19ba620505e9931ccd4a485f530ecc", name: "booking-form-book-label" }, "Book now")))));
|
|
261
261
|
}
|
|
262
262
|
get host() {
|
|
263
263
|
return ae(this);
|
|
@@ -296,36 +296,36 @@ he([
|
|
|
296
296
|
], U.prototype, "render", null);
|
|
297
297
|
U.style = fe;
|
|
298
298
|
const me = ':host{display:block;width:400px;--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}sp-theme{height:inherit;display:flex;flex-direction:column;justify-content:space-between;align-items:center;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__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)}.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%}sp-button{background-color:var(--nylas-base-0);color:var(--nylas-base-700);border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);font-size:16px;font-weight:600;width:100%;height:48px;padding:8px;line-height:24px;font-family:var(--nylas-font-family)}sp-button.cancel{margin-top:1.25rem;background-color:var(--nylas-primary);color:var(--nylas-base-0)}sp-button.cancel:hover,sp-button.cancel:focus{background-color:var(--nylas-base-600)}sp-button.cancel:active{background-color:var(--nylas-base-800)}sp-button.back{margin-top:0.5rem}sp-button.back:hover,sp-button.back:focus{border-color:var(--nylas-primary)}sp-button.back:active{border-color:var(--nylas-base-600)}sp-field-label{margin-top:1rem;display:flex;color:var(--nylas-base-800);font-size:14px}sp-field-label.error{color:var(--nylas-error)}sp-field-label span.required{color:var(--nylas-error)}sp-textfield{--spectrum-textfield-border-color:var(--nylas-base-300);--spectrum-textfield-icon-color-invalid:var(--nylas-error);position:relative;width:100%;height:48px;margin-bottom:16px;background-color:var(--nylas-base-0);color:var(--nylas-base-500)}sp-textfield.error{--spectrum-textfield-border-color:var(--nylas-error)}sp-help-text{margin:0.25rem 0 1rem 0;color:var(--nylas-error)}', pe = me;
|
|
299
|
-
var ue = function(e, t,
|
|
300
|
-
var
|
|
299
|
+
var ue = function(e, t, i, o) {
|
|
300
|
+
var s = arguments.length, a = s < 3 ? t : o === null ? o = Object.getOwnPropertyDescriptor(t, i) : o, r;
|
|
301
301
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
302
|
-
|
|
302
|
+
a = Reflect.decorate(e, t, i, o);
|
|
303
303
|
else
|
|
304
304
|
for (var l = e.length - 1; l >= 0; l--)
|
|
305
|
-
(r = e[l]) && (
|
|
306
|
-
return
|
|
305
|
+
(r = e[l]) && (a = (s < 3 ? r(a) : s > 3 ? r(t, i, a) : r(t, i)) || a);
|
|
306
|
+
return s > 3 && a && Object.defineProperty(t, i, a), a;
|
|
307
307
|
}, I = function(e, t) {
|
|
308
308
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
309
309
|
return Reflect.metadata(e, t);
|
|
310
310
|
};
|
|
311
311
|
const Y = class {
|
|
312
312
|
constructor(e) {
|
|
313
|
-
var t,
|
|
313
|
+
var t, i;
|
|
314
314
|
m(this, e), this.goBackButtonClicked = d(this, "goBackButtonClicked", 7), this.cancelBookingFormSubmitted = d(this, "cancelBookingFormSubmitted", 7), this.cancelBookedEventError = d(this, "cancelBookedEventError", 7), this.cancelBookingFormError = d(this, "cancelBookingFormError", 7), this.handleGoBackClicked = () => {
|
|
315
315
|
this.goBackButtonClicked.emit();
|
|
316
|
-
}, this.handleSubmitCancelBooking = (
|
|
317
|
-
if (
|
|
316
|
+
}, this.handleSubmitCancelBooking = (o) => {
|
|
317
|
+
if (o.preventDefault(), !this.cancellationReason) {
|
|
318
318
|
this.cancellationError = "Please provide a reason for cancellation.", this.cancelBookingFormError.emit({ title: "Cancel booking form error", description: "Please provide a reason for cancellation." });
|
|
319
319
|
return;
|
|
320
320
|
}
|
|
321
321
|
c(`[nylas-cancel-booking-form] Cancel booking form submitted with reason: ${this.cancellationReason}`);
|
|
322
|
-
const
|
|
323
|
-
this.cancelBookedEventError.emit(
|
|
322
|
+
const s = (a) => {
|
|
323
|
+
this.cancelBookedEventError.emit(a);
|
|
324
324
|
};
|
|
325
|
-
this.cancelBookingFormSubmitted.emit({ bookingId: this.cancelBookingId, reason: this.cancellationReason, errorHandler:
|
|
326
|
-
}, this.handleOnChangeCancellationReason = (
|
|
327
|
-
this.cancellationError = "", this.cancellationReason =
|
|
328
|
-
}, this.cancelBookingId = void 0, this.configSettings = void 0, this.cancellationReason = "", this.cancellationError = "", this.cancellationPolicy = ((
|
|
325
|
+
this.cancelBookingFormSubmitted.emit({ bookingId: this.cancelBookingId, reason: this.cancellationReason, errorHandler: s });
|
|
326
|
+
}, this.handleOnChangeCancellationReason = (o) => {
|
|
327
|
+
this.cancellationError = "", this.cancellationReason = o.target.value;
|
|
328
|
+
}, this.cancelBookingId = void 0, this.configSettings = void 0, this.cancellationReason = "", this.cancellationError = "", this.cancellationPolicy = ((i = (t = this.configSettings) == null ? void 0 : t.scheduler) == null ? void 0 : i.cancellation_policy) || "Your current timeslot will become available to others.";
|
|
329
329
|
}
|
|
330
330
|
configSettingsChangedHandler(e) {
|
|
331
331
|
var t;
|
|
@@ -344,7 +344,7 @@ const Y = class {
|
|
|
344
344
|
c("[nylas-cancel-booking-form] Component disconnected");
|
|
345
345
|
}
|
|
346
346
|
render() {
|
|
347
|
-
return
|
|
347
|
+
return n(h, { key: "83015809da357a47d70c5bae845c8608924b6a31", part: "ncec" }, n("sp-theme", { key: "11d3b28a88081d5ecccfbb78ee6347a7856899e3", theme: "spectrum", scale: "medium" }, n("div", { key: "5d2750f253c1aff61c1d973529ce2f7fa65c4206", class: "nylas-cancel-booking-form", part: "ncec__card" }, n("div", { key: "36a8dd00a5eda62f2f8f9740bf447f0b50e81b9e", class: "nylas-cancel-booking-form__calendar-icon", part: "ncec__icon" }, n("calendar-cancel-icon", { key: "7bfaf1ffaa9a3bb288bc0e3f11c8c9ed7a4d2c9a" })), n("h3", { key: "74fff12d4aa0311d817348a4694042d2242f30cd", class: "nylas-cancel-booking-form__title", part: "ncec__title" }, "Cancel booking?"), n("div", { key: "647a02657fe9570c87b14ef7de0cc0fc713efb21", class: "nylas-cancel-booking-form__description", part: "ncec__description" }, this.cancellationPolicy), n("form", { key: "bb680b4a5a7203d44d08529b0d8b3224b51c2986", onSubmit: this.handleSubmitCancelBooking }, n("sp-field-label", { key: "401994e31c7f7bf65b8403a42b14a56e928d92f3", for: "cancel-reason", class: this.cancellationError ? "error" : "" }, "Reason for cancellation ", n("span", { key: "361907af2362f4fd09af7638c82de7320efe0072", class: "required" }, "*")), n("sp-textfield", { key: "d7e672672f0a7250104080f69f4e96de9321c537", id: "cancel-reason", class: this.cancellationError ? "error" : "", part: "ncec__reason-textarea", multiline: !0, value: this.cancellationReason, onInput: this.handleOnChangeCancellationReason, onFocus: this.handleOnChangeCancellationReason, invalid: !!this.cancellationError }, n("sp-help-text", { key: "d3bcfae8ae55ec910005c128f24d74ed34f1bf48", slot: "negative-help-text" }, this.cancellationError)), n("sp-button", { key: "23efceafbfcb073b0808f65ae110f31bcbfb7722", variant: "primary", class: "cancel", type: "submit", part: "ncec__button-cta" }, "Cancel booking"), n("sp-button", { key: "7030276dae50deab5549a64a3def7b4cb783e8d5", variant: "secondary", class: "back", treatment: "outline", part: "ncec__button-outline", onClick: this.handleGoBackClicked }, "Go back")))));
|
|
348
348
|
}
|
|
349
349
|
static get watchers() {
|
|
350
350
|
return {
|
|
@@ -358,8 +358,8 @@ ue([
|
|
|
358
358
|
stateToProps: /* @__PURE__ */ new Map([["scheduler.configSettings", "configSettings"]]),
|
|
359
359
|
eventToProps: {
|
|
360
360
|
cancelBookingFormSubmitted: async (e, t) => {
|
|
361
|
-
const
|
|
362
|
-
|
|
361
|
+
const i = await t.scheduler.cancelBooking(e.detail.bookingId, e.detail.reason), { errorHandler: o } = e.detail;
|
|
362
|
+
o && (!i || "error" in i) && o(i);
|
|
363
363
|
}
|
|
364
364
|
},
|
|
365
365
|
fireRegisterEvent: !0
|
|
@@ -370,14 +370,14 @@ ue([
|
|
|
370
370
|
], Y.prototype, "render", null);
|
|
371
371
|
Y.style = pe;
|
|
372
372
|
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}sp-theme{height:inherit;display:flex;flex-direction:column;justify-content:space-between;align-items:center;font-family:var(--nylas-font-family)}.nylas-cancelled-event-card{display:flex;align-items:center;flex-direction:column;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%}sp-button{background-color:var(--nylas-base-0);color:var(--nylas-base-700);border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);font-size:1rem;height:48px;padding:8px;line-height:24px;width:100%}sp-button:hover,sp-button:focus{border-color:var(--nylas-primary)}sp-button:active{border-color:var(--nylas-base-600)}', ge = ye;
|
|
373
|
-
var ve = function(e, t,
|
|
374
|
-
var
|
|
373
|
+
var ve = function(e, t, i, o) {
|
|
374
|
+
var s = arguments.length, a = s < 3 ? t : o === null ? o = Object.getOwnPropertyDescriptor(t, i) : o, r;
|
|
375
375
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
376
|
-
|
|
376
|
+
a = Reflect.decorate(e, t, i, o);
|
|
377
377
|
else
|
|
378
378
|
for (var l = e.length - 1; l >= 0; l--)
|
|
379
|
-
(r = e[l]) && (
|
|
380
|
-
return
|
|
379
|
+
(r = e[l]) && (a = (s < 3 ? r(a) : s > 3 ? r(t, i, a) : r(t, i)) || a);
|
|
380
|
+
return s > 3 && a && Object.defineProperty(t, i, a), a;
|
|
381
381
|
}, R = function(e, t) {
|
|
382
382
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
383
383
|
return Reflect.metadata(e, t);
|
|
@@ -386,8 +386,8 @@ const X = class {
|
|
|
386
386
|
constructor(e) {
|
|
387
387
|
m(this, e), this.closeCancelEventCardClicked = d(this, "closeCancelEventCardClicked", 7), this.cancelledEventCardError = d(this, "cancelledEventCardError", 7), this.handleCloseClicked = () => {
|
|
388
388
|
this.isClosing = !0;
|
|
389
|
-
const t = (
|
|
390
|
-
this.cancelledEventCardError.emit(
|
|
389
|
+
const t = (i) => {
|
|
390
|
+
this.cancelledEventCardError.emit(i), this.isClosing = !1;
|
|
391
391
|
};
|
|
392
392
|
this.closeCancelEventCardClicked.emit({ errorHandler: t });
|
|
393
393
|
}, this.cancelledEventInfo = void 0, this.isClosing = !1, this.configSettings = void 0;
|
|
@@ -406,7 +406,7 @@ const X = class {
|
|
|
406
406
|
}
|
|
407
407
|
render() {
|
|
408
408
|
var e, t;
|
|
409
|
-
return
|
|
409
|
+
return n(h, { key: "89bfb6419aea7fffc32726e4db26642ca810b3a4", part: "ncec" }, n("sp-theme", { key: "265e08ab9c6d4c7c7071353a35e2a8e69bd3875e", theme: "spectrum", color: "dark", scale: "medium" }, n("div", { key: "bd23802e8cd5bf923ed43f223eac30041ead9a2e", class: "nylas-cancelled-event-card", part: "ncec__card" }, n("div", { key: "270d9e2a65ee1a3a7d34aaa99bf1059b891929ae", class: "nylas-cancelled-event-card__calendar-icon", part: "ncec__icon" }, n("calendar-cancel-icon", { key: "e04e9bf8f7278265160c3a58c0a37c880faed0cc" })), n("h3", { key: "046647bd93284e280d5fb62f9488b6ed5ed9dea2", class: "nylas-cancelled-event-card__title", part: "ncec__title" }, "Your booking has been cancelled successfully!"), n("div", { key: "f85c31f7718fe5266b2d175afff46c7b63495c11", class: "nylas-cancelled-event-card__description", part: "ncec__description" }, "A cancellation email has been sent to ", ((t = (e = this.configSettings) == null ? void 0 : e.organizer) == null ? void 0 : t.name) || "the participants", "."), n("div", { key: "aa36cf4bbcb432334903a0b9ba2782ecf6abbe4c", class: "nylas-cancelled-event-card__cta" }, n("sp-button", { key: "65009ac918324e109b0b5a52331bea5a9b8c1a14", variant: "secondary", treatment: "outline", disabled: this.isClosing, part: "ncec__button-outline", onClick: this.handleCloseClicked }, this.isClosing ? "Closing..." : "Close")))));
|
|
410
410
|
}
|
|
411
411
|
};
|
|
412
412
|
ve([
|
|
@@ -415,8 +415,8 @@ ve([
|
|
|
415
415
|
stateToProps: /* @__PURE__ */ new Map([["scheduler.configSettings", "configSettings"]]),
|
|
416
416
|
eventToProps: {
|
|
417
417
|
closeCancelEventCardClicked: async (e, t) => {
|
|
418
|
-
const
|
|
419
|
-
|
|
418
|
+
const i = await t.scheduler.resetCancel(), { errorHandler: o } = e.detail;
|
|
419
|
+
o && (!i || "error" in i) && o(i);
|
|
420
420
|
}
|
|
421
421
|
},
|
|
422
422
|
fireRegisterEvent: !0
|
|
@@ -427,37 +427,37 @@ ve([
|
|
|
427
427
|
], X.prototype, "render", null);
|
|
428
428
|
X.style = ge;
|
|
429
429
|
const P = /* @__PURE__ */ new Date(), F = /* @__PURE__ */ new Date();
|
|
430
|
-
function T(e, t,
|
|
431
|
-
function
|
|
432
|
-
return e(
|
|
433
|
-
}
|
|
434
|
-
return
|
|
435
|
-
const r =
|
|
436
|
-
return
|
|
437
|
-
},
|
|
430
|
+
function T(e, t, i, o) {
|
|
431
|
+
function s(a) {
|
|
432
|
+
return e(a = arguments.length === 0 ? /* @__PURE__ */ new Date() : /* @__PURE__ */ new Date(+a)), a;
|
|
433
|
+
}
|
|
434
|
+
return s.floor = (a) => (e(a = /* @__PURE__ */ new Date(+a)), a), s.ceil = (a) => (e(a = new Date(a - 1)), t(a, 1), e(a), a), s.round = (a) => {
|
|
435
|
+
const r = s(a), l = s.ceil(a);
|
|
436
|
+
return a - r < l - a ? r : l;
|
|
437
|
+
}, s.offset = (a, r) => (t(a = /* @__PURE__ */ new Date(+a), r == null ? 1 : Math.floor(r)), a), s.range = (a, r, l) => {
|
|
438
438
|
const b = [];
|
|
439
|
-
if (
|
|
439
|
+
if (a = s.ceil(a), l = l == null ? 1 : Math.floor(l), !(a < r) || !(l > 0))
|
|
440
440
|
return b;
|
|
441
441
|
let f;
|
|
442
442
|
do
|
|
443
|
-
b.push(f = /* @__PURE__ */ new Date(+
|
|
444
|
-
while (f <
|
|
443
|
+
b.push(f = /* @__PURE__ */ new Date(+a)), t(a, l), e(a);
|
|
444
|
+
while (f < a && a < r);
|
|
445
445
|
return b;
|
|
446
|
-
},
|
|
446
|
+
}, s.filter = (a) => T((r) => {
|
|
447
447
|
if (r >= r)
|
|
448
|
-
for (; e(r), !
|
|
448
|
+
for (; e(r), !a(r); )
|
|
449
449
|
r.setTime(r - 1);
|
|
450
450
|
}, (r, l) => {
|
|
451
451
|
if (r >= r)
|
|
452
452
|
if (l < 0)
|
|
453
453
|
for (; ++l <= 0; )
|
|
454
|
-
for (; t(r, -1), !
|
|
454
|
+
for (; t(r, -1), !a(r); )
|
|
455
455
|
;
|
|
456
456
|
else
|
|
457
457
|
for (; --l >= 0; )
|
|
458
|
-
for (; t(r, 1), !
|
|
458
|
+
for (; t(r, 1), !a(r); )
|
|
459
459
|
;
|
|
460
|
-
}),
|
|
460
|
+
}), i && (s.count = (a, r) => (P.setTime(+a), F.setTime(+r), e(P), e(F), Math.floor(i(P, F))), s.every = (a) => (a = Math.floor(a), !isFinite(a) || !(a > 0) ? null : a > 1 ? s.filter(o ? (r) => o(r) % a === 0 : (r) => s.count(0, r) % a === 0) : s)), s;
|
|
461
461
|
}
|
|
462
462
|
const ke = 1e3, J = ke * 60, xe = J * 60, D = xe * 24, j = T(
|
|
463
463
|
(e) => e.setHours(0, 0, 0, 0),
|
|
@@ -476,14 +476,14 @@ T((e) => {
|
|
|
476
476
|
e.setUTCDate(e.getUTCDate() + t);
|
|
477
477
|
}, (e, t) => (t - e) / D, (e) => Math.floor(e / D));
|
|
478
478
|
const Ce = ':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)}', we = Ce;
|
|
479
|
-
var _e = function(e, t,
|
|
480
|
-
var
|
|
479
|
+
var _e = function(e, t, i, o) {
|
|
480
|
+
var s = arguments.length, a = s < 3 ? t : o === null ? o = Object.getOwnPropertyDescriptor(t, i) : o, r;
|
|
481
481
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
482
|
-
|
|
482
|
+
a = Reflect.decorate(e, t, i, o);
|
|
483
483
|
else
|
|
484
484
|
for (var l = e.length - 1; l >= 0; l--)
|
|
485
|
-
(r = e[l]) && (
|
|
486
|
-
return
|
|
485
|
+
(r = e[l]) && (a = (s < 3 ? r(a) : s > 3 ? r(t, i, a) : r(t, i)) || a);
|
|
486
|
+
return s > 3 && a && Object.defineProperty(t, i, a), a;
|
|
487
487
|
}, M = function(e, t) {
|
|
488
488
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
489
489
|
return Reflect.metadata(e, t);
|
|
@@ -493,11 +493,11 @@ const K = class {
|
|
|
493
493
|
m(this, e), this.dateSelected = d(this, "dateSelected", 7), this.monthChanged = d(this, "monthChanged", 7), this.selectableDates = void 0, this.selectedDate = void 0, this.configSettings = void 0, this.isLoading = void 0, this.eventDuration = void 0, this.month = this.selectedDate || /* @__PURE__ */ new Date(), this.dates = this.getDates(), this.disableNextMonthButton = !1;
|
|
494
494
|
}
|
|
495
495
|
configSettingsChanged(e) {
|
|
496
|
-
var
|
|
497
|
-
const t = new Date(this.month.getFullYear(), this.month.getMonth() + 1, 1),
|
|
498
|
-
if (
|
|
496
|
+
var s;
|
|
497
|
+
const t = new Date(this.month.getFullYear(), this.month.getMonth() + 1, 1), i = (s = e == null ? void 0 : e.scheduler) == null ? void 0 : s.available_days_in_future;
|
|
498
|
+
if (i === void 0)
|
|
499
499
|
return;
|
|
500
|
-
V(/* @__PURE__ */ new Date(),
|
|
500
|
+
V(/* @__PURE__ */ new Date(), i).getTime() < t.getTime() ? this.disableNextMonthButton = !0 : this.disableNextMonthButton = !1;
|
|
501
501
|
}
|
|
502
502
|
connectedCallback() {
|
|
503
503
|
}
|
|
@@ -513,31 +513,31 @@ const K = class {
|
|
|
513
513
|
this.dateSelected.emit(e);
|
|
514
514
|
}
|
|
515
515
|
changeMonth(e) {
|
|
516
|
-
var
|
|
516
|
+
var s, a;
|
|
517
517
|
this.month = new Date(this.month.getFullYear(), this.month.getMonth() + e, 1);
|
|
518
|
-
const t = new Date(this.month.getFullYear(), this.month.getMonth() + 1, 1),
|
|
519
|
-
V(/* @__PURE__ */ new Date(),
|
|
518
|
+
const t = new Date(this.month.getFullYear(), this.month.getMonth() + 1, 1), i = (a = (s = this.configSettings) == null ? void 0 : s.scheduler) == null ? void 0 : a.available_days_in_future;
|
|
519
|
+
V(/* @__PURE__ */ new Date(), i).getTime() < t.getTime() ? this.disableNextMonthButton = !0 : this.disableNextMonthButton = !1, this.dates = this.getDates(), this.monthChanged.emit(this.month), this.selectDate();
|
|
520
520
|
}
|
|
521
|
-
isSelected(e, t,
|
|
522
|
-
return e && t && u(e, t) &&
|
|
521
|
+
isSelected(e, t, i) {
|
|
522
|
+
return e && t && u(e, t) && i && (i == null ? void 0 : i.length) > 0;
|
|
523
523
|
}
|
|
524
524
|
isDisabled(e, t) {
|
|
525
|
-
return e && (t == null ? void 0 : t.find((
|
|
525
|
+
return e && (t == null ? void 0 : t.find((i) => u(i, e))) === void 0;
|
|
526
526
|
}
|
|
527
527
|
render() {
|
|
528
|
-
var e, t,
|
|
529
|
-
return
|
|
530
|
-
var
|
|
531
|
-
const
|
|
532
|
-
return this.isLoading ?
|
|
528
|
+
var e, t, i, o, s;
|
|
529
|
+
return n(h, { key: "bc2d37f59dc4cc59c9659a15ce640d3f3c738239", part: "ndp" }, n("div", { key: "7b39c6ff3b5c820d6ee4cc3419a80f9803011deb", class: "nylas-date-picker" }, n("div", { key: "e7e08bbe189da82d187241b1025633f9ea690bbe", class: "title", part: "'ndp__title" }, ((t = (e = this.configSettings) == null ? void 0 : e.organizer) == null ? void 0 : t.name) && n("h1", null, n("person-icon", null), ((o = (i = this.configSettings) == null ? void 0 : i.organizer) == null ? void 0 : o.name) || "Organizer"), n("p", { key: "7a952faa33c2421f9b6d25a4d56ec7a510d42ab5" }, n("clock-icon", { key: "35561bc9866d9c75e676b3ef589b1506a6d273c6" }), this.eventDuration ? oe(this.eventDuration) : "- minutes")), n("div", { key: "b3799870aa76c6e54b3ec5a32dda0b684a817e1d", class: "header flex-row" }, n("h2", { key: "bb00822464f175aa9b9c5f66f8fa79e95363b33d", part: "ndp__month-header" }, n("strong", { key: "3cdeb9340334fabb6ee1ef09ffb28a6e75177275" }, this.month.toLocaleDateString(void 0, { month: "long" })), " ", this.month.toLocaleDateString(void 0, { year: "numeric" })), n("div", { key: "ad6b090bdff3470d1f7381cce6d5734a698c7af9", class: "pagination" }, n("button", { key: "90621e82962b012b50dedb9ec4c49bc7cdff0936", onClick: () => this.changeMonth(-1), class: { "chevron-left": !0, button: !0 }, disabled: !((s = this.selectableDates) != null && s.length) || this.month <= /* @__PURE__ */ new Date(), part: "ndp__month-button" }, n("chevron-icon", { key: "7596ada39a388b9570a3a783ff5cdf7bb3f252c1" })), n("button", { key: "e7bbf331f680b0c6f2538639235a008e213b52ee", onClick: () => this.changeMonth(1), class: { "chevron-right": !0, button: !0 }, disabled: this.disableNextMonthButton, part: "ndp__month-button" }, n("chevron-icon", { key: "898e3a4609bf204bdf4d375cd53c23d5ac52bc50" })))), n("div", { key: "e41bd3d09ef9c8bc48dd8aa5db6554af8b31faa8", class: "dates" }, ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"].map((a) => n("div", { class: "day", part: "ndp__day" }, a)), this.dates.map((a, r) => {
|
|
530
|
+
var b;
|
|
531
|
+
const l = this.isDisabled(a, this.selectableDates);
|
|
532
|
+
return this.isLoading ? n("button", { disabled: !0, class: {
|
|
533
533
|
"date day-skeleton": !0,
|
|
534
|
-
"current-month": S(
|
|
535
|
-
}, style: { animationDelay: `${
|
|
534
|
+
"current-month": S(a, this.month)
|
|
535
|
+
}, style: { animationDelay: `${r * 20}ms` }, part: "ndp__date" }, a.getDate()) : n("button", { class: {
|
|
536
536
|
date: !0,
|
|
537
|
-
selected: !!(this.selectedDate && u(
|
|
538
|
-
"current-day": u(
|
|
539
|
-
"current-month": S(
|
|
540
|
-
}, "aria-lang":
|
|
537
|
+
selected: !!(this.selectedDate && u(a, this.selectedDate) && this.selectableDates && ((b = this.selectableDates) == null ? void 0 : b.length) > 0),
|
|
538
|
+
"current-day": u(a, /* @__PURE__ */ new Date()),
|
|
539
|
+
"current-month": S(a, this.month)
|
|
540
|
+
}, "aria-lang": a.toLocaleDateString(void 0, { dateStyle: "full" }), disabled: l, onClick: () => this.selectDate(a), part: `ndp__date ${this.isSelected(a, this.selectedDate, this.selectableDates) ? "ndp__date--selected" : ""} ${u(a, /* @__PURE__ */ new Date()) ? "ndp__date--current-day" : ""} ${S(a, this.month) ? "ndp__date--current-month" : ""}` }, a.getDate());
|
|
541
541
|
}))));
|
|
542
542
|
}
|
|
543
543
|
static get watchers() {
|
|
@@ -569,14 +569,14 @@ _e([
|
|
|
569
569
|
], K.prototype, "render", null);
|
|
570
570
|
K.style = we;
|
|
571
571
|
const Ee = ':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}', De = Ee;
|
|
572
|
-
var Te = function(e, t,
|
|
573
|
-
var
|
|
572
|
+
var Te = function(e, t, i, o) {
|
|
573
|
+
var s = arguments.length, a = s < 3 ? t : o === null ? o = Object.getOwnPropertyDescriptor(t, i) : o, r;
|
|
574
574
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
575
|
-
|
|
575
|
+
a = Reflect.decorate(e, t, i, o);
|
|
576
576
|
else
|
|
577
577
|
for (var l = e.length - 1; l >= 0; l--)
|
|
578
|
-
(r = e[l]) && (
|
|
579
|
-
return
|
|
578
|
+
(r = e[l]) && (a = (s < 3 ? r(a) : s > 3 ? r(t, i, a) : r(t, i)) || a);
|
|
579
|
+
return s > 3 && a && Object.defineProperty(t, i, a), a;
|
|
580
580
|
}, N = function(e, t) {
|
|
581
581
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
582
582
|
return Reflect.metadata(e, t);
|
|
@@ -598,38 +598,38 @@ const Q = class {
|
|
|
598
598
|
this.selectedLanguage = e, this.languageChanged.emit(e);
|
|
599
599
|
}
|
|
600
600
|
nylasFormDropdownChangedHandler(e) {
|
|
601
|
-
const { name: t, value:
|
|
602
|
-
t === "timezone" ? this.changeTimezone(
|
|
601
|
+
const { name: t, value: i } = e.detail;
|
|
602
|
+
t === "timezone" ? this.changeTimezone(i) : t === "language" && this.changeLanguage(i);
|
|
603
603
|
}
|
|
604
604
|
getTimezoneLabelHTML(e) {
|
|
605
605
|
const t = re(e);
|
|
606
|
-
return
|
|
606
|
+
return n("span", { class: "timezone-label", style: {
|
|
607
607
|
display: "flex",
|
|
608
608
|
alignItems: "center",
|
|
609
609
|
justifyContent: "space-between",
|
|
610
610
|
width: "-webkit-fill-available"
|
|
611
|
-
} }, _[e], " ",
|
|
611
|
+
} }, _[e], " ", n("span", { class: "timezone-offset", style: {
|
|
612
612
|
fontSize: "14px",
|
|
613
613
|
fontWeight: "400",
|
|
614
614
|
color: "var(--nylas-base-500)"
|
|
615
615
|
} }, t));
|
|
616
616
|
}
|
|
617
617
|
render() {
|
|
618
|
-
const e = Object.keys(_).map((
|
|
619
|
-
labelHTML: this.getTimezoneLabelHTML(
|
|
620
|
-
label: _[
|
|
621
|
-
value:
|
|
622
|
-
})), t = Object.keys(q).map((
|
|
623
|
-
label: q[
|
|
624
|
-
value:
|
|
618
|
+
const e = Object.keys(_).map((i) => ({
|
|
619
|
+
labelHTML: this.getTimezoneLabelHTML(i),
|
|
620
|
+
label: _[i],
|
|
621
|
+
value: i
|
|
622
|
+
})), t = Object.keys(q).map((i) => ({
|
|
623
|
+
label: q[i],
|
|
624
|
+
value: i
|
|
625
625
|
}));
|
|
626
|
-
return
|
|
626
|
+
return n(h, { key: "2d50a22ae8502ec3c6062da3cbbeb0bb6f0fcb8b" }, n("div", { key: "8725370edb7b3fb70264586c8d6bf4cc7c8f6220", class: "nylas-locale-switch" }, n("div", { key: "da5375359f87b3f1fc5c3ec9f094c76886a1a401", class: {
|
|
627
627
|
"select-wrapper": !0,
|
|
628
628
|
timezone: !0
|
|
629
|
-
} },
|
|
629
|
+
} }, n("select-dropdown", { key: "3633e969f27a301b59ad64afb9f63a0bf19afcc6", name: "timezone", options: e, defaultSelectedOption: e.find((i) => i.value == this.selectedTimezone) }, n("span", { key: "97db913cf64de05eb986fdea378a17948ead2527", slot: "select-icon" }, n("globe-icon", { key: "ee73e4c113c23614a7084cb1f19e2d6149fd3185", width: "20", height: "20" })))), n("div", { key: "04245f7d6c51994197ff107f064632d5c8050e65", class: {
|
|
630
630
|
"select-wrapper": !0,
|
|
631
631
|
language: !0
|
|
632
|
-
} },
|
|
632
|
+
} }, n("select-dropdown", { key: "55ed837e54b69f9db0548c9c4e4c6e5211ef577a", name: "language", options: t, defaultSelectedOption: t.find((i) => i.value == this.selectedLanguage) }, n("span", { key: "43b4d67e865a27842998a796f8d12e0d9b5171eb", slot: "select-icon" }, n("translate-icon", { key: "c393677712c3528f162bc5700368deb4dd6a197c", width: "20", height: "20" }))))));
|
|
633
633
|
}
|
|
634
634
|
};
|
|
635
635
|
Te([
|
|
@@ -656,7 +656,7 @@ const Se = ".sc-nylas-logo-h{display:flex}", ze = Se, Be = class {
|
|
|
656
656
|
m(this, e), this.width = "69", this.height = "24";
|
|
657
657
|
}
|
|
658
658
|
render() {
|
|
659
|
-
return
|
|
659
|
+
return n("svg", { key: "6e6bbcafcedbb912945dd29a383b809dd1295683", width: this.width, height: this.height, viewBox: "0 0 69 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, n("g", { key: "361bd69757205d793a7619841a425fabbf075475", "clip-path": "url(#clip0_455_3543)" }, n("path", { key: "9f56ecacf7401c2f04a56dc4b0d201b008dc9c52", 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: "f3b85c6d9c447bf55c3299de0084894d6f4b405a", 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: "2d1f7045c261de3721c5b8b27403c8258310ae4c", 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: "a6a34de523ff685dd51372f44b4c47d038419ed4", 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: "127937c688ac0410b9b3a53ee76fd962a4f4b407", 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: "7336b38c7bcb388276b886e6792ad173327142d5", 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: "904bbd6f937f00c2ae6e2269235f2adc2afbc6e4", 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: "9425f2b121d23319942fa5d4daa9ce53173cbcf9", 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: "7c41827bdfde9ce70fbcb353d98991e37e2a99fe" }, n("clipPath", { key: "5e29b38dc325426fdb3284275f74c1c46485eb1c", id: "clip0_455_3543" }, n("rect", { key: "c63515b41fb503c621fb26917befbcf503e26262", width: "68.7123", height: "19.2877", fill: "white", transform: "translate(0.144043 0.356201)" }))));
|
|
660
660
|
}
|
|
661
661
|
};
|
|
662
662
|
Be.style = ze;
|
|
@@ -692,7 +692,7 @@ const Le = ':host{display:block;margin-bottom:-12px;width:100%;z-index:1;--nylas
|
|
|
692
692
|
if (this.notifications = [...this.notifications, { ...e.detail }], e.detail.ttl !== "none") {
|
|
693
693
|
const t = e.detail.ttl ? e.detail.ttl : this.ttl;
|
|
694
694
|
window.setTimeout(() => {
|
|
695
|
-
this.notifications = this.notifications.filter((
|
|
695
|
+
this.notifications = this.notifications.filter((i) => i.id !== e.detail.id);
|
|
696
696
|
}, t);
|
|
697
697
|
}
|
|
698
698
|
}
|
|
@@ -700,19 +700,19 @@ const Le = ':host{display:block;margin-bottom:-12px;width:100%;z-index:1;--nylas
|
|
|
700
700
|
this.notifications = this.notifications.filter((t) => t.id !== e);
|
|
701
701
|
}
|
|
702
702
|
render() {
|
|
703
|
-
return
|
|
703
|
+
return n(h, { key: "b86593ead0279b9e2213c2554d1153379470880e" }, n(se, { key: "860f23f3c6a0636b408d56806b11129c0a697418" }, 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: "6125314e051684b396d99a3c8bb9ba99392f2729" })));
|
|
704
704
|
}
|
|
705
705
|
};
|
|
706
706
|
Re.style = Ie;
|
|
707
707
|
const Pe = ":host{display:block}sp-theme{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}}", Fe = Pe;
|
|
708
|
-
var je = function(e, t,
|
|
709
|
-
var
|
|
708
|
+
var je = function(e, t, i, o) {
|
|
709
|
+
var s = arguments.length, a = s < 3 ? t : o === null ? o = Object.getOwnPropertyDescriptor(t, i) : o, r;
|
|
710
710
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
711
|
-
|
|
711
|
+
a = Reflect.decorate(e, t, i, o);
|
|
712
712
|
else
|
|
713
713
|
for (var l = e.length - 1; l >= 0; l--)
|
|
714
|
-
(r = e[l]) && (
|
|
715
|
-
return
|
|
714
|
+
(r = e[l]) && (a = (s < 3 ? r(a) : s > 3 ? r(t, i, a) : r(t, i)) || a);
|
|
715
|
+
return s > 3 && a && Object.defineProperty(t, i, a), a;
|
|
716
716
|
}, O = function(e, t) {
|
|
717
717
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
718
718
|
return Reflect.metadata(e, t);
|
|
@@ -736,7 +736,7 @@ const ee = class {
|
|
|
736
736
|
}
|
|
737
737
|
render() {
|
|
738
738
|
var e;
|
|
739
|
-
return
|
|
739
|
+
return n(h, { key: "ae635bed01604ece8f012b82c00fa7d4b6bc4c3d", part: "nsec" }, n("sp-theme", { key: "edcbe79ce2a87e920bd88714b3a5a747d4a80747", theme: "spectrum", color: "dark", scale: "medium" }, n("div", { key: "8c736e8a7ea756b2ef8ba316e0f2c0f38f3821fd", class: "event-card", part: "nsec__card" }, n("div", { key: "06c33c0fc54e893cbeb8c685503f73a74109ab33", class: "calendar-icon", part: "nsec__icon" }, n("calendar-icon", { key: "69617d50f58122aea2dd92e7ea26d5b2a984c2bf" })), n("div", { key: "e4e53019bba6e23f2c5f0a5b8cde5336973d795d", class: "nylas-selected-event-card__date", part: "nsec__date" }, (e = this.selectedDate) == null ? void 0 : e.toLocaleDateString(void 0, { dateStyle: "full" })), n("div", { key: "c838e6987d4c932471d27dca86c295f549f06a5d", class: "nylas-selected-event-card__time", part: "nsec__time" }, this.startTime, " - ", this.endTime)), n("div", { key: "3e0f9d170e593f39516d49e31fe0da1db49fe828", class: "event-timezone", part: "nsec__timezone" }, n("globe-icon", { key: "12f52fc23ec7d60d046078aceeb6fffba7283078" }), _[this.selectedTimezone])));
|
|
740
740
|
}
|
|
741
741
|
static get watchers() {
|
|
742
742
|
return {
|
|
@@ -761,22 +761,22 @@ je([
|
|
|
761
761
|
], ee.prototype, "render", null);
|
|
762
762
|
ee.style = Fe;
|
|
763
763
|
const Me = ":host{display:block;height:calc(100% - 48px)}.time-picker-wrapper{display:flex;flex-direction:column;height:100%}.time-slots{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 .time-slot-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)}.footer sp-button{padding:14px;color:var(--nylas-base-100);border-radius:var(--nylas-border-radius-2x);width:100%;height:48px;font-weight:600;font-size:16px;background-color:var(--nylas-primary);border:none}.footer sp-button:hover,.footer sp-button:focus{background-color:var(--nylas-base-600)}.footer sp-button:active{background-color:var(--nylas-base-800)}", Ne = Me;
|
|
764
|
-
var Oe = function(e, t,
|
|
765
|
-
var
|
|
764
|
+
var Oe = function(e, t, i, o) {
|
|
765
|
+
var s = arguments.length, a = s < 3 ? t : o === null ? o = Object.getOwnPropertyDescriptor(t, i) : o, r;
|
|
766
766
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
767
|
-
|
|
767
|
+
a = Reflect.decorate(e, t, i, o);
|
|
768
768
|
else
|
|
769
769
|
for (var l = e.length - 1; l >= 0; l--)
|
|
770
|
-
(r = e[l]) && (
|
|
771
|
-
return
|
|
770
|
+
(r = e[l]) && (a = (s < 3 ? r(a) : s > 3 ? r(t, i, a) : r(t, i)) || a);
|
|
771
|
+
return s > 3 && a && Object.defineProperty(t, i, a), a;
|
|
772
772
|
}, H = function(e, t) {
|
|
773
773
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
774
774
|
return Reflect.metadata(e, t);
|
|
775
775
|
};
|
|
776
776
|
const te = class {
|
|
777
777
|
constructor(e) {
|
|
778
|
-
m(this, e), this.timeslotSelected = d(this, "timeslotSelected", 7), this.timeslotConfirmed = d(this, "timeslotConfirmed", 7), this.handleConfirmedTimeslot = async (t,
|
|
779
|
-
t.preventDefault(), c("[nylas-timeslot-picker] Confirm timeslot",
|
|
778
|
+
m(this, e), this.timeslotSelected = d(this, "timeslotSelected", 7), this.timeslotConfirmed = d(this, "timeslotConfirmed", 7), this.handleConfirmedTimeslot = async (t, i) => {
|
|
779
|
+
t.preventDefault(), c("[nylas-timeslot-picker] Confirm timeslot", i), this.timeslotConfirmed.emit(i);
|
|
780
780
|
}, this.handleMouseEnter = (t) => {
|
|
781
781
|
this.hoveredTimeslotIndex = t;
|
|
782
782
|
}, this.handleMouseLeave = () => {
|
|
@@ -789,7 +789,7 @@ const te = class {
|
|
|
789
789
|
}
|
|
790
790
|
async componentWillLoad() {
|
|
791
791
|
var t;
|
|
792
|
-
const e = (t = this.availability) == null ? void 0 : t.filter((
|
|
792
|
+
const e = (t = this.availability) == null ? void 0 : t.filter((i) => this.selectedDate && u(i.start_time, this.selectedDate)).map((i) => i);
|
|
793
793
|
this.times = e || [], c("[nylas-timeslot-picker] Component will load", { selectedDate: this.selectedDate, availability: this.availability, times: this.times });
|
|
794
794
|
}
|
|
795
795
|
async componentDidLoad() {
|
|
@@ -815,24 +815,24 @@ const te = class {
|
|
|
815
815
|
selectedDateChanged(e) {
|
|
816
816
|
var t;
|
|
817
817
|
if (c("[nylas-timeslot-picker] Selected date changed", { newVal: e }), e && (this.selectedTimeslotIndex = "", typeof e < "u")) {
|
|
818
|
-
const
|
|
819
|
-
this.times =
|
|
818
|
+
const i = (t = this.availability) == null ? void 0 : t.filter((o) => u(o.start_time, e)).map((o) => o);
|
|
819
|
+
this.times = i || [];
|
|
820
820
|
}
|
|
821
821
|
}
|
|
822
822
|
availabilityChanged(e) {
|
|
823
823
|
if (c("[nylas-timeslot-picker] Available times changed", { newVal: e, selectedDate: this.selectedDate }), typeof e < "u") {
|
|
824
|
-
const t = e == null ? void 0 : e.filter((
|
|
824
|
+
const t = e == null ? void 0 : e.filter((i) => this.selectedDate && u(i.start_time, this.selectedDate)).map((i) => i);
|
|
825
825
|
this.times = t || [];
|
|
826
826
|
}
|
|
827
827
|
}
|
|
828
828
|
render() {
|
|
829
|
-
return this.isLoading ?
|
|
830
|
-
var
|
|
831
|
-
return
|
|
829
|
+
return this.isLoading ? n(h, null, n("div", { class: "loading" }, new Array(6).fill(0).map((e, t) => n("div", { class: "time-slot-skeleton", style: { animationDelay: `${t * 20}ms` } })))) : this.availability && this.availability.length === 0 ? n(h, null, n("div", { class: "empty" }, n("span", null, "No dates available"))) : (!this.times || this.times.length === 0) && this.selectedDate ? n(h, null, n("div", { class: "empty" }, n("span", null, "No time slots available for selected date"))) : this.selectedDate ? n(h, { part: "ntp" }, n("div", { class: "time-picker-wrapper" }, n("div", { class: "time-slots" }, this.times.map((e, t) => {
|
|
830
|
+
var i, o, s, a;
|
|
831
|
+
return n("button", { part: `ntp__timeslot ${((o = (i = this.selectedTimeslot) == null ? void 0 : i.start_time) == null ? void 0 : o.getTime()) === e.start_time.getTime() ? "ntp__timeslot--selected" : ""}`, "aria-role": "button", class: {
|
|
832
832
|
time: !0,
|
|
833
|
-
selected: typeof this.selectedTimeslot < "u" && ((
|
|
833
|
+
selected: typeof this.selectedTimeslot < "u" && ((a = (s = this.selectedTimeslot) == null ? void 0 : s.start_time) == null ? void 0 : a.getTime()) === e.start_time.getTime()
|
|
834
834
|
}, 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 }));
|
|
835
|
-
})), this.selectedTimeslot &&
|
|
835
|
+
})), this.selectedTimeslot && n("div", { class: "footer" }, n("sp-button", { variant: "primary", onClick: (e) => this.handleConfirmedTimeslot(e, this.selectedTimeslot), part: "ntp__button-primary" }, n("slot", { name: "timeslot-picker-cta-label" }, "Next"))))) : n(h, null);
|
|
836
836
|
}
|
|
837
837
|
static get watchers() {
|
|
838
838
|
return {
|