@nylas/react 1.1.0-canary.21 → 1.1.0-canary.23
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-b8d6df60.js → add-circle-icon_3.entry-37a88ff3.js} +23 -13
- package/dist/add-circle-icon_3.entry-4f8f1cbf.cjs +1 -0
- package/dist/{archive-icon_7.entry-afaef817.cjs → archive-icon_7.entry-2ec9b077.cjs} +1 -1
- package/dist/{archive-icon_7.entry-3830776a.js → archive-icon_7.entry-3dcc4a66.js} +16 -16
- package/dist/{arrow-icon.entry-460cdd9f.cjs → arrow-icon.entry-175e8181.cjs} +1 -1
- package/dist/arrow-icon.entry-2cf3e94d.js +15 -0
- package/dist/{bold-icon_3.entry-80abafbb.js → bold-icon_3.entry-9fc74a39.js} +4 -4
- package/dist/{bold-icon_3.entry-1893eeec.cjs → bold-icon_3.entry-a3e61ad8.cjs} +1 -1
- package/dist/{button-component.entry-b78dc39e.cjs → button-component.entry-7fdb3bca.cjs} +1 -1
- package/dist/{button-component.entry-36137536.js → button-component.entry-861637f2.js} +2 -2
- package/dist/calendar-agenda-fill-icon_39.entry-3c21a3ec.cjs +7 -0
- package/dist/{calendar-agenda-fill-icon_40.entry-f19d6ad7.js → calendar-agenda-fill-icon_39.entry-493e91f6.js} +1268 -1300
- package/dist/{calendar-cancel-icon.entry-1fae00c5.js → calendar-cancel-icon.entry-3ca731f9.js} +2 -2
- package/dist/{calendar-cancel-icon.entry-0d83ee82.cjs → calendar-cancel-icon.entry-c9c7e3b3.cjs} +1 -1
- package/dist/{calendar-check-icon_2.entry-e01c9028.cjs → calendar-check-icon_2.entry-5b8f8a75.cjs} +1 -1
- package/dist/{calendar-check-icon_2.entry-159c38af.js → calendar-check-icon_2.entry-7c409a91.js} +5 -5
- package/dist/{calendar-icon.entry-3af9cb76.js → calendar-icon.entry-0589697f.js} +4 -4
- package/dist/{calendar-icon.entry-2e701aab.cjs → calendar-icon.entry-acd00f6f.cjs} +1 -1
- package/dist/{checkbox-component_2.entry-9ff2c85b.cjs → checkbox-component_2.entry-0aa252b9.cjs} +1 -1
- package/dist/{checkbox-component_2.entry-5eee51f6.js → checkbox-component_2.entry-538fd8ec.js} +3 -3
- package/dist/{checkmark-icon.entry-f96f1117.cjs → checkmark-icon.entry-0a184b31.cjs} +1 -1
- package/dist/{checkmark-icon.entry-0749b942.js → checkmark-icon.entry-56302db0.js} +4 -4
- package/dist/{chevron-icon_3.entry-c3989df2.cjs → chevron-icon_3.entry-7076e105.cjs} +1 -1
- package/dist/{chevron-icon_3.entry-2e9eebbc.js → chevron-icon_3.entry-80e03257.js} +13 -13
- package/dist/{clock-icon_4.entry-d4563931.cjs → clock-icon_4.entry-d6901afd.cjs} +1 -1
- package/dist/{clock-icon_4.entry-9395d0cb.js → clock-icon_4.entry-db3fbda1.js} +19 -19
- package/dist/{constants-67de2eec-e3b50fc6.cjs → constants-12bd3c98-22fd56f2.cjs} +1 -1
- package/dist/{constants-67de2eec-b17f5b96.js → constants-12bd3c98-26c75011.js} +4 -4
- package/dist/{copy-icon_3.entry-7de3667f.cjs → copy-icon_3.entry-33e89a37.cjs} +1 -1
- package/dist/{copy-icon_3.entry-7b276fa2.js → copy-icon_3.entry-9670b9f9.js} +7 -7
- package/dist/{document-refresh-icon.entry-6dd65cb6.js → document-refresh-icon.entry-149f2a3b.js} +5 -5
- package/dist/document-refresh-icon.entry-a3326831.cjs +1 -0
- package/dist/elements/index.d.ts +3 -0
- package/dist/{elements-dc5b338e-158dce67.cjs → elements-dc5b338e-211879a3.cjs} +1 -1
- package/dist/{elements-dc5b338e-5e8a704b.js → elements-dc5b338e-e07600d4.js} +1 -1
- package/dist/{focus-visible-e8093c16-9d88e8ee.js → focus-visible-e8093c16-284cefe0.js} +1 -1
- package/dist/{focus-visible-e8093c16-5883a317.cjs → focus-visible-e8093c16-cb97634f.cjs} +1 -1
- package/dist/{forward-icon_6.entry-acdf04ad.js → forward-icon_6.entry-554b0722.js} +9 -9
- package/dist/{forward-icon_6.entry-a59dada5.cjs → forward-icon_6.entry-751fdd4e.cjs} +3 -3
- package/dist/{globe-icon.entry-eef27331.cjs → globe-icon.entry-63eb510d.cjs} +1 -1
- package/dist/{globe-icon.entry-389c0391.js → globe-icon.entry-e3dd58bc.js} +2 -2
- package/dist/google-logo-icon_5.entry-bccce7f4.cjs +1 -0
- package/dist/google-logo-icon_5.entry-e462e091.js +748 -0
- package/dist/index-53420959-02fe58ef.js +5 -0
- package/dist/index-53420959-0b9c205e.cjs +1 -0
- package/dist/{index-6d9eeb53-15c69801.cjs → index-6d9eeb53-81e5b798.cjs} +1 -1
- package/dist/{index-6d9eeb53-c70fc8a7.js → index-6d9eeb53-cc42c6f1.js} +2 -2
- package/dist/{index-db48e0b6.cjs → index-8a536089.cjs} +14 -14
- package/dist/{index-f8317a8e.js → index-a15916e5.js} +398 -383
- package/dist/{index.es-b16d0cf5-d7f30c4a.cjs → index.es-5355a265-e701a627.cjs} +1 -1
- package/dist/{index.es-b16d0cf5-386496a9.js → index.es-5355a265-f8853ce4.js} +1 -1
- package/dist/{info-icon_2.entry-97d75550.js → info-icon_2.entry-3b349f01.js} +5 -5
- package/dist/{info-icon_2.entry-63914227.cjs → info-icon_2.entry-9559cf3b.cjs} +1 -1
- package/dist/{input-dropdown.entry-4d29246a.js → input-dropdown.entry-9bc68630.js} +2 -2
- package/dist/{input-dropdown.entry-629d7b54.cjs → input-dropdown.entry-d454f6bc.cjs} +1 -1
- package/dist/loading-icon.entry-1d49e471.js +15 -0
- package/dist/loading-icon.entry-a68da48b.cjs +1 -0
- package/dist/{mailbox-store-f11de360-d781fd36.js → mailbox-store-31d55036-1106efe2.js} +2 -2
- package/dist/{mailbox-store-f11de360-02a6de93.cjs → mailbox-store-31d55036-c8618c0b.cjs} +1 -1
- package/dist/{multi-select-dropdown.entry-8e14e9af.js → multi-select-dropdown.entry-36074a81.js} +2 -2
- package/dist/{multi-select-dropdown.entry-68fcca98.cjs → multi-select-dropdown.entry-e5ed9285.cjs} +1 -1
- package/dist/{nylas-booked-event-card_10.entry-9487941d.js → nylas-booked-event-card_10.entry-38d2fd2e.js} +75 -74
- package/dist/nylas-booked-event-card_10.entry-e530a8db.cjs +1 -0
- package/dist/nylas-booking-confirmation-type.entry-2fea82f9.js +106 -0
- package/dist/nylas-booking-confirmation-type.entry-5857a863.cjs +1 -0
- package/dist/{nylas-form-card.entry-ca669dea.cjs → nylas-form-card.entry-03a31218.cjs} +1 -1
- package/dist/{nylas-form-card.entry-ccfa5692.js → nylas-form-card.entry-6e45c873.js} +19 -19
- package/dist/{nylas-if-state.entry-93935670.js → nylas-if-state.entry-092f4e1a.js} +3 -3
- package/dist/{nylas-if-state.entry-faa11bb6.cjs → nylas-if-state.entry-61d7ebc5.cjs} +1 -1
- package/dist/{nylas-list-folders.entry-e7e179ea.cjs → nylas-list-folders.entry-1abbb401.cjs} +1 -1
- package/dist/{nylas-list-folders.entry-14fc1fe8.js → nylas-list-folders.entry-ab9e1c2c.js} +3 -3
- package/dist/{nylas-list-threads.entry-2118b146.js → nylas-list-threads.entry-2faaa2bb.js} +3 -3
- package/dist/{nylas-list-threads.entry-3f52fc06.cjs → nylas-list-threads.entry-dfc87aca.cjs} +1 -1
- package/dist/{nylas-login.entry-87a902d6.js → nylas-login.entry-243ae09e.js} +7 -7
- package/dist/{nylas-login.entry-915f0284.cjs → nylas-login.entry-d1cac0a1.cjs} +1 -1
- package/dist/{nylas-mailbox-pagination.entry-eedbf796.js → nylas-mailbox-pagination.entry-b8225a3e.js} +2 -2
- package/dist/{nylas-mailbox-pagination.entry-9aa8a606.cjs → nylas-mailbox-pagination.entry-c27af71c.cjs} +1 -1
- package/dist/{nylas-mailbox-toolbar-button.entry-40b75810.js → nylas-mailbox-toolbar-button.entry-22347d22.js} +7 -7
- package/dist/{nylas-mailbox-toolbar-button.entry-ba5b826e.cjs → nylas-mailbox-toolbar-button.entry-b66d597d.cjs} +1 -1
- package/dist/{nylas-mailbox.entry-179e5a5c.js → nylas-mailbox.entry-9e6e1b4d.js} +4 -4
- package/dist/{nylas-mailbox.entry-31de7f8f.cjs → nylas-mailbox.entry-cb80f58c.cjs} +1 -1
- package/dist/{nylas-provider.entry-7b70bbdc.js → nylas-provider.entry-196dd5da.js} +8 -8
- package/dist/{nylas-provider.entry-46fe01b6.cjs → nylas-provider.entry-28c12448.cjs} +1 -1
- package/dist/nylas-reminder-emails.entry-47ef5a9d.cjs +4 -0
- package/dist/nylas-reminder-emails.entry-b655d888.js +129 -0
- package/dist/nylas-reminder-time_2.entry-0f3747fb.cjs +1 -0
- package/dist/nylas-reminder-time_2.entry-9d8f7436.js +105 -0
- package/dist/{nylas-scheduler-editor.entry-76b68f66.cjs → nylas-scheduler-editor.entry-504e8ed3.cjs} +2 -2
- package/dist/{nylas-scheduler-editor.entry-f1f80de1.js → nylas-scheduler-editor.entry-feb7a7db.js} +12 -11
- package/dist/nylas-scheduling.entry-8c8f8e35.cjs +1 -0
- package/dist/{nylas-scheduling.entry-31d13205.js → nylas-scheduling.entry-d35efa9a.js} +73 -73
- package/dist/{nylas-threads-refresh.entry-a3ea46aa.js → nylas-threads-refresh.entry-91af9af3.js} +4 -4
- package/dist/{nylas-threads-refresh.entry-c9f9db8c.cjs → nylas-threads-refresh.entry-e637161b.cjs} +1 -1
- package/dist/{nylas-threads-search.entry-01482ddf.js → nylas-threads-search.entry-5457dcec.js} +5 -5
- package/dist/{nylas-threads-search.entry-a4ab0d47.cjs → nylas-threads-search.entry-b944f95a.cjs} +1 -1
- package/dist/{nylas-time-window-picker.entry-5a3bb0b7.cjs → nylas-time-window-picker.entry-134ef726.cjs} +1 -1
- package/dist/{nylas-time-window-picker.entry-5f063b2b.js → nylas-time-window-picker.entry-a6fd216b.js} +12 -12
- package/dist/{nylas-view-thread.entry-cb057b9e.js → nylas-view-thread.entry-6fdd6cb1.js} +3 -3
- package/dist/{nylas-view-thread.entry-82e78b82.cjs → nylas-view-thread.entry-9296a505.cjs} +1 -1
- package/dist/{person-icon.entry-78cdc7f9.cjs → person-icon.entry-1cdb4dc2.cjs} +1 -1
- package/dist/{person-icon.entry-3e30c63c.js → person-icon.entry-4a695727.js} +4 -4
- package/dist/{play-icon_2.entry-4fb1938c.cjs → play-icon_2.entry-10fd617e.cjs} +1 -1
- package/dist/{play-icon_2.entry-71eaad5c.js → play-icon_2.entry-fb013b17.js} +6 -6
- package/dist/react.cjs +1 -1
- package/dist/react.js +104 -101
- package/dist/{refresh-icon.entry-db85d14d.js → refresh-icon.entry-46c92605.js} +4 -4
- package/dist/{refresh-icon.entry-3570353d.cjs → refresh-icon.entry-9dbb04ba.cjs} +1 -1
- package/dist/{register-component-b2a51b20-9a913603.cjs → register-component-592986c5-5edf5835.cjs} +1 -1
- package/dist/{register-component-b2a51b20-8a262dcf.js → register-component-592986c5-d5d210a8.js} +1 -1
- package/dist/{scheduler-config-store-9ccfba4d-6806e3cb.cjs → scheduler-config-store-9ccfba4d-3ec35859.cjs} +1 -1
- package/dist/{scheduler-config-store-9ccfba4d-a6745ccc.js → scheduler-config-store-9ccfba4d-b08031b5.js} +1 -1
- package/dist/{scheduler-store-db06b30a-1e63b67f.js → scheduler-store-fd0d11a5-313e8592.js} +1 -1
- package/dist/{scheduler-store-db06b30a-d5e6b6c3.cjs → scheduler-store-fd0d11a5-b180b3b7.cjs} +1 -1
- package/dist/{textarea-component.entry-f5f402a1.js → textarea-component.entry-0cd3b57f.js} +4 -4
- package/dist/{textarea-component.entry-be870b8f.cjs → textarea-component.entry-788eb37a.cjs} +1 -1
- package/dist/{time-period-selector.entry-d1a8470b.js → time-period-selector.entry-112c0b64.js} +6 -6
- package/dist/{time-period-selector.entry-fc7d61c6.cjs → time-period-selector.entry-1e0b720b.cjs} +1 -1
- package/dist/{translate-icon.entry-b91a0449.js → translate-icon.entry-a4df3c16.js} +4 -4
- package/dist/{translate-icon.entry-3ae0ddae.cjs → translate-icon.entry-c701b391.cjs} +1 -1
- package/dist/{warning-icon.entry-54127f45.cjs → warning-icon.entry-bda0aafa.cjs} +1 -1
- package/dist/{warning-icon.entry-acdc811b.js → warning-icon.entry-d1703715.js} +7 -7
- package/package.json +3 -3
- package/dist/add-circle-icon_2.entry-29cc2385.cjs +0 -1
- package/dist/arrow-icon.entry-19f00716.js +0 -15
- package/dist/calendar-agenda-fill-icon_40.entry-62c66fce.cjs +0 -10
- package/dist/close-icon.entry-cf9f0a69.js +0 -15
- package/dist/close-icon.entry-e24af309.cjs +0 -1
- package/dist/document-refresh-icon.entry-582ac233.cjs +0 -1
- package/dist/google-logo-icon_4.entry-e9be320c.cjs +0 -1
- package/dist/google-logo-icon_4.entry-eae19fc8.js +0 -637
- package/dist/index-53420959-82a5306f.cjs +0 -1
- package/dist/index-53420959-9b1699ec.js +0 -5
- package/dist/loading-icon.entry-2f15a09f.cjs +0 -1
- package/dist/loading-icon.entry-fc9bc740.js +0 -15
- package/dist/nylas-booked-event-card_10.entry-4da23b61.cjs +0 -1
- package/dist/nylas-custom-booking-flow.entry-0e16973b.js +0 -106
- package/dist/nylas-custom-booking-flow.entry-338b0a8f.cjs +0 -1
- package/dist/nylas-scheduling.entry-3ce8c52f.cjs +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { r as v, c as
|
|
2
|
-
import { R as w } from "./register-component-
|
|
3
|
-
import { T as E, L as J, g as be, a as U } from "./constants-
|
|
4
|
-
import { s as S } from "./index-6d9eeb53-
|
|
5
|
-
import "./index-53420959-
|
|
1
|
+
import { r as v, c as u, d, h as a, k as l, n as Y, H as g, g as X, m as W, C as re, D as le, E as C, G as ce, I as de, J as B, F as fe } from "./index-a15916e5.js";
|
|
2
|
+
import { R as w } from "./register-component-592986c5-d5d210a8.js";
|
|
3
|
+
import { T as E, L as J, g as be, a as U } from "./constants-12bd3c98-26c75011.js";
|
|
4
|
+
import { s as S } from "./index-6d9eeb53-cc42c6f1.js";
|
|
5
|
+
import "./index-53420959-02fe58ef.js";
|
|
6
6
|
import "react";
|
|
7
7
|
import "react-dom";
|
|
8
8
|
const he = ':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%}', ue = he;
|
|
9
|
-
var
|
|
9
|
+
var me = function(e, t, i, o) {
|
|
10
10
|
var s = arguments.length, n = s < 3 ? t : o === null ? o = Object.getOwnPropertyDescriptor(t, i) : o, r;
|
|
11
11
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
12
12
|
n = Reflect.decorate(e, t, i, o);
|
|
@@ -20,7 +20,7 @@ var pe = function(e, t, i, o) {
|
|
|
20
20
|
};
|
|
21
21
|
const K = class {
|
|
22
22
|
constructor(e) {
|
|
23
|
-
v(this, e), this.cancelBookingButtonClicked =
|
|
23
|
+
v(this, e), this.cancelBookingButtonClicked = u(this, "cancelBookingButtonClicked", 7), this.rescheduleButtonClicked = u(this, "rescheduleButtonClicked", 7), this.rescheduleBookedEventError = u(this, "rescheduleBookedEventError", 7), this.cancelBookedEventValidationError = u(this, "cancelBookedEventValidationError", 7), this.handleCancelBookingButtonClicked = () => {
|
|
24
24
|
var s, n;
|
|
25
25
|
const t = new Date(this.selectedTimeslot.start_time), i = (n = (s = this.configSettings) == null ? void 0 : s.scheduler) == null ? void 0 : n.min_cancellation_notice;
|
|
26
26
|
t.getTime() - i * 60 * 1e3 < (/* @__PURE__ */ new Date()).getTime() ? this.cancelBookedEventValidationError.emit({
|
|
@@ -56,15 +56,15 @@ const K = class {
|
|
|
56
56
|
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.');
|
|
57
57
|
}
|
|
58
58
|
render() {
|
|
59
|
-
var e, t, i, o, s, n, r, c,
|
|
60
|
-
return a(
|
|
59
|
+
var e, t, i, o, s, n, r, c, m, b, f, p, h, x, k, y, _, q, A, Z, G, V;
|
|
60
|
+
return a(g, { key: "58765b8d8fb8630b0893d6c6e86fd87745885e4b", part: "nbec" }, a("sp-theme", { key: "c7086efdc3ad76d17ab76c21acdd7b8fcf6841d3", theme: "spectrum", color: "dark", scale: "medium" }, a("div", { key: "dbcd53b07cbedc5ec351febea9f6f0d795319e73", class: "booked-event-timezone" }, a("globe-icon", { key: "869433a367eedb9c80f8a4787e16473e96a5286a" }), E[this.selectedTimezone]), a("div", { key: "98daca2ef441eee475178a7e59d193dde4caa189", class: "event-card-wrapper", part: "nbec__card" }, a("div", { key: "6e9758b8fcc0e281dca625c6693e245d420fdcc6", class: "calendar-icon" }, a("calendar-check-icon", { key: "8aa83e62a30306cc86ae234147d8c6eb680ef61c" })), a("div", { key: "8e9f3395b241755c0264611d363f0d639370f6de", class: "booked-event-header" }, a("h2", { key: "0eff7c4489ea882b89575b95e4626e0f2bcf9487", slot: "card-title", part: "nbec__title" }, this.rescheduleBookingId && !this.isLoading ? `${l.t("bookingRescheduled")}` : `${l.t("bookingConfirmed")}`, "!"), a("div", { key: "c839174adae518ef5f036a3e29e82860714113d1", 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) || ((n = (s = this.bookingInfo) == null ? void 0 : s.primaryParticipant) == null ? void 0 : n.email))), a("sp-divider", { key: "8257b8c3f930b385f007962d3318d6aa77399489" }), a("div", { key: "9f13c453b1c981108299708db70ebec0be7d58cc", class: "booking-date-time" }, a("checkmark-circle-icon", { key: "9c51212fc00559af74215b88ae4b6c2ad6902ce5" }), a("h3", { key: "a52656d258ee10cf85b61b9fbe9b469482ff9cef" }, l.t("bookingDateAndTimeHeader")), a("p", { key: "3791d36b2d1ef8568e0b87d5b8d64548a40537fe" }, (r = this.selectedTimeslot) != null && r.start_time ? Y(new Date((c = this.selectedTimeslot) == null ? void 0 : c.start_time).toLocaleDateString(J[this.selectedLanguage], { dateStyle: "full" })) : "-", " ", a("br", { key: "15e586a111f8fa6d812a17d04fb9a6ce0ca84f19" }), new Date((m = this.selectedTimeslot) == null ? void 0 : m.start_time).toLocaleTimeString(void 0, { timeStyle: "short" }), " -", " ", new Date((b = this.selectedTimeslot) == null ? void 0 : b.end_time).toLocaleTimeString(void 0, { timeStyle: "short" }))), a("div", { key: "ab4f73ea904bae1978b9f6bcef5048a3f3625e9e", class: "booking-participants" }), a("sp-divider", { key: "d7de8473998bd24742533951e13a5d1893b06758" }), a("div", { key: "ad81fbb94ee37b773dfed28ac91afc2c7b099fe8", class: {
|
|
61
61
|
footer: !0,
|
|
62
|
-
"no-footer": ((
|
|
63
|
-
"no-template-cols": ((
|
|
62
|
+
"no-footer": ((p = (f = this.configSettings) == null ? void 0 : f.scheduler) == null ? void 0 : p.hide_cancellation_options) && ((x = (h = this.configSettings) == null ? void 0 : h.scheduler) == null ? void 0 : x.hide_rescheduling_options),
|
|
63
|
+
"no-template-cols": ((y = (k = this.configSettings) == null ? void 0 : k.scheduler) == null ? void 0 : y.hide_cancellation_options) || ((q = (_ = this.configSettings) == null ? void 0 : _.scheduler) == null ? void 0 : q.hide_rescheduling_options)
|
|
64
64
|
} }, !((Z = (A = this.configSettings) == null ? void 0 : A.scheduler) != null && Z.hide_cancellation_options) && a("sp-button", { variant: "secondary", treatment: "outline", class: "cancel", onClick: this.handleCancelBookingButtonClicked, part: "nbec__button-outline nbec__cancel-cta" }, `${l.t("cancelBookingButton")}`), !((V = (G = this.configSettings) == null ? void 0 : G.scheduler) != null && V.hide_rescheduling_options) && a("sp-button", { variant: "secondary", treatment: "outline", class: "reschedule", onClick: this.handleRescheduleButtonClicked, part: "nbec__button-outline nbec__reschedule-cta" }, `${l.t("rescheduleBookingButton")}`)))));
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
|
-
|
|
67
|
+
me([
|
|
68
68
|
w({
|
|
69
69
|
name: "nylas-booked-event-card",
|
|
70
70
|
stateToProps: /* @__PURE__ */ new Map([
|
|
@@ -92,7 +92,7 @@ pe([
|
|
|
92
92
|
z("design:returntype", void 0)
|
|
93
93
|
], K.prototype, "render", null);
|
|
94
94
|
K.style = ue;
|
|
95
|
-
const
|
|
95
|
+
const pe = ':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%}', ye = pe;
|
|
96
96
|
var ge = function(e, t, i, o) {
|
|
97
97
|
var s = arguments.length, n = s < 3 ? t : o === null ? o = Object.getOwnPropertyDescriptor(t, i) : o, r;
|
|
98
98
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
@@ -107,7 +107,7 @@ var ge = function(e, t, i, o) {
|
|
|
107
107
|
};
|
|
108
108
|
const T = /^[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])?)*$/, Q = class {
|
|
109
109
|
constructor(e) {
|
|
110
|
-
v(this, e), this.nameChanged =
|
|
110
|
+
v(this, e), this.nameChanged = u(this, "nameChanged", 7), this.emailChanged = u(this, "emailChanged", 7), this.backButtonClicked = u(this, "backButtonClicked", 7), this.detailsConfirmed = u(this, "detailsConfirmed", 7), this.bookingFormError = u(this, "bookingFormError", 7), this.bookingFormSubmitted = u(this, "bookingFormSubmitted", 7), this.handleGuestChange = (t, i) => {
|
|
111
111
|
this.resetGuestEmailError(t);
|
|
112
112
|
const o = [...this.guestEmails];
|
|
113
113
|
o[t] = S(i), this.guestEmails = [...o];
|
|
@@ -130,11 +130,11 @@ const T = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-
|
|
|
130
130
|
}, this.handleBackButtonClicked = () => {
|
|
131
131
|
this.backButtonClicked.emit();
|
|
132
132
|
}, this.bookButtonClickedHandler = async (t) => {
|
|
133
|
-
var c,
|
|
133
|
+
var c, m, b, f, p, h, x;
|
|
134
134
|
if (t.preventDefault(), this.bookingFormSubmitted.emit().defaultPrevented)
|
|
135
135
|
return;
|
|
136
136
|
d("nylas-booking-form", "bookButtonClickedHandler", this.bookingInfo);
|
|
137
|
-
const o = this.name || ((
|
|
137
|
+
const o = this.name || ((m = (c = this.bookingInfo) == null ? void 0 : c.primaryParticipant) == null ? void 0 : m.name), s = this.email || ((f = (b = this.bookingInfo) == null ? void 0 : b.primaryParticipant) == null ? void 0 : f.email);
|
|
138
138
|
if (!o || o === "") {
|
|
139
139
|
this.isNameValid = !1, this.validationError.name = l.t("fieldRequired", { field: l.t("name") }) || "Name is required", this.bookingFormError.emit({
|
|
140
140
|
title: "Booking form error",
|
|
@@ -158,20 +158,20 @@ const T = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-
|
|
|
158
158
|
}
|
|
159
159
|
let n = [];
|
|
160
160
|
if (this.guestEmails.length > 0) {
|
|
161
|
-
let
|
|
162
|
-
if (this.guestEmails.forEach((
|
|
163
|
-
|
|
164
|
-
}),
|
|
161
|
+
let k = !1;
|
|
162
|
+
if (this.guestEmails.forEach((y, _) => {
|
|
163
|
+
y === "" ? (k = !0, this.guestEmailErrors = { ...this.guestEmailErrors, [_]: l.t("fieldRequired", { field: l.t("email") }) }) : T.test(y) || (k = !0, this.guestEmailErrors = { ...this.guestEmailErrors, [_]: l.t("invalidInputFormat", { field: l.t("email") }) });
|
|
164
|
+
}), k) {
|
|
165
165
|
this.bookingFormError.emit({
|
|
166
166
|
title: "Booking form error",
|
|
167
167
|
description: l.t("invalidInputFormat", { field: l.t("guestEmail") }) || "Invalid guest email"
|
|
168
168
|
});
|
|
169
169
|
return;
|
|
170
170
|
}
|
|
171
|
-
n = this.guestEmails.map((
|
|
171
|
+
n = this.guestEmails.map((y) => ({ name: y.trim(), email: y.trim() }));
|
|
172
172
|
} else
|
|
173
|
-
(
|
|
174
|
-
const r = ((
|
|
173
|
+
(p = this.bookingInfo) != null && p.guests && (n = (h = this.bookingInfo) == null ? void 0 : h.guests);
|
|
174
|
+
const r = ((x = this.bookingInfo) == null ? void 0 : x.additionalFields) || [];
|
|
175
175
|
this.detailsConfirmed.emit({
|
|
176
176
|
primaryParticipant: {
|
|
177
177
|
name: o,
|
|
@@ -221,7 +221,7 @@ const T = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-
|
|
|
221
221
|
});
|
|
222
222
|
return;
|
|
223
223
|
}
|
|
224
|
-
this.updateAdditionalFields(e.detail.
|
|
224
|
+
this.updateAdditionalFields(e.detail.name, e.detail.value);
|
|
225
225
|
break;
|
|
226
226
|
}
|
|
227
227
|
}
|
|
@@ -233,49 +233,49 @@ const T = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-
|
|
|
233
233
|
});
|
|
234
234
|
return;
|
|
235
235
|
}
|
|
236
|
-
this.updateAdditionalFields(e.detail.
|
|
236
|
+
this.updateAdditionalFields(e.detail.name, e.detail.value);
|
|
237
237
|
}
|
|
238
238
|
switchToggledHandler(e) {
|
|
239
|
-
this.updateAdditionalFields(e.detail.
|
|
239
|
+
this.updateAdditionalFields(e.detail.name, e.detail.checked ? "true" : "false");
|
|
240
240
|
}
|
|
241
241
|
checkboxToggledHandler(e) {
|
|
242
|
-
this.updateAdditionalFields(e.detail.
|
|
242
|
+
this.updateAdditionalFields(e.detail.name, e.detail.checked ? "true" : "false");
|
|
243
243
|
}
|
|
244
244
|
radioChangedHandler(e) {
|
|
245
|
-
this.updateAdditionalFields(e.detail.
|
|
245
|
+
this.updateAdditionalFields(e.detail.name, e.detail.value);
|
|
246
246
|
}
|
|
247
247
|
render() {
|
|
248
|
-
var e, t, i, o, s, n, r, c,
|
|
249
|
-
return a(
|
|
248
|
+
var e, t, i, o, s, n, r, c, m;
|
|
249
|
+
return a(g, { key: "b0a70e2fb2f18f7b0efe6bfd108a35853fb67650" }, a("form", { key: "d6d6a14a31cc30fa4a4b3d51d736f9eb553c816f", onSubmit: (b) => this.bookButtonClickedHandler(b), noValidate: !0 }, a("div", { key: "02817a951387617334d00d4abd9170c487ba4a25", class: "nylas-booking-form" }, a("div", { key: "d449e95ce86e9a52f824d2d4281ec7675a21e435", class: "input-wrapper" }, a("input-component", { key: "db0e3c648a573ef41960cbf474d496c21387d22f", label: l.t("name"), name: "name", id: "name", defaultValue: ((t = (e = this.bookingInfo) == null ? void 0 : e.primaryParticipant) == null ? void 0 : t.name) || this.name, placeholder: l.t("namePlaceholder"), type: "text", required: !0, requiredError: l.t("fieldRequired", { field: l.t("name") }), patternError: l.t("invalidInputFormat", { field: l.t("name") }), part: "nbf__input-textfield" })), a("div", { key: "9807c067e59c1e857c4387b450fa657393b6998e", class: "input-wrapper" }, a("input-component", { key: "e09833f14be65cccdfb81614234a37a4a2d8d498", label: l.t("email"), name: "email", id: "email", pattern: T, defaultValue: ((o = (i = this.bookingInfo) == null ? void 0 : i.primaryParticipant) == null ? void 0 : o.email) || this.email, placeholder: l.t("emailPlaceholder"), type: "email", required: !0, requiredError: l.t("fieldRequired", { field: l.t("email") }), patternError: l.t("invalidInputFormat", { field: l.t("email") }), part: "nbf__input-textfield" })), ((n = (s = this.configSettings) == null ? void 0 : s.scheduler) == null ? void 0 : n.hide_additional_guests) !== !0 && a("div", { class: "input-wrapper" }, this.guestEmails.map((b, f) => a("div", { class: "input-wrapper button-wrapper" }, a("label", { class: {
|
|
250
250
|
error: !!this.guestEmailErrors[f]
|
|
251
251
|
} }, l.t("guestEmail")), a("div", { class: "guest-email-input" }, a("input", { type: "email", id: `guest-email-${f}`, maxLength: 100, class: {
|
|
252
252
|
"guest-email": !0,
|
|
253
253
|
error: !!this.guestEmailErrors[f]
|
|
254
|
-
}, placeholder: l.t("guestEmailPlaceholder"), value:
|
|
255
|
-
var
|
|
256
|
-
return this.handleGuestBlur(f, (
|
|
257
|
-
}, onInput: (
|
|
258
|
-
var
|
|
259
|
-
return this.handleGuestChange(f, (
|
|
260
|
-
} }), a("button-component", { variant: "basic", onClick: (
|
|
254
|
+
}, placeholder: l.t("guestEmailPlaceholder"), value: b, "data-index": f, part: "nbf__input-textfield", onBlur: (p) => {
|
|
255
|
+
var h;
|
|
256
|
+
return this.handleGuestBlur(f, (h = p.target) == null ? void 0 : h.value);
|
|
257
|
+
}, onInput: (p) => {
|
|
258
|
+
var h;
|
|
259
|
+
return this.handleGuestChange(f, (h = p.target) == null ? void 0 : h.value);
|
|
260
|
+
} }), a("button-component", { variant: "basic", onClick: (p) => this.removeGuestButtonClickHandler(p, f), class: {
|
|
261
261
|
"remove-guest": !0,
|
|
262
262
|
error: !!this.guestEmailErrors[f]
|
|
263
|
-
} }, a("close-icon", null))), a("p", { class: "help-text" }, this.guestEmailErrors[f]))), a("button-component", { class: "add-guest", variant: "invisible", part: "nbf__button-ghost", onClick: (
|
|
264
|
-
var
|
|
265
|
-
const f =
|
|
263
|
+
} }, a("close-icon", null))), a("p", { class: "help-text" }, this.guestEmailErrors[f]))), a("button-component", { class: "add-guest", variant: "invisible", part: "nbf__button-ghost", onClick: (b) => this.addGuestButtonClickedHandler(b) }, a("div", { class: "button-content" }, a("add-circle-icon", { slot: "icon" }), this.guestEmails.length > 0 ? `${l.t("addAnotherGuest")}` : `${l.t("addGuest")}`))), (m = Object.entries(((c = (r = this.configSettings) == null ? void 0 : r.scheduler) == null ? void 0 : c.additional_fields) || {})) == null ? void 0 : m.sort((b, f) => b[1].order - f[1].order).map((b) => {
|
|
264
|
+
var x, k;
|
|
265
|
+
const f = b[1], p = f.label, h = b[0];
|
|
266
266
|
switch (f.type) {
|
|
267
267
|
case "dropdown":
|
|
268
|
-
return a("div", { class: "input-wrapper" }, a("select-dropdown", { label:
|
|
268
|
+
return a("div", { class: "input-wrapper" }, a("select-dropdown", { label: p, name: h, id: h, withSearch: !1, options: (x = f.options) == null ? void 0 : x.map((y) => ({ value: y, label: y })), required: f.required, part: "nbf__input-textfield" }));
|
|
269
269
|
case "checkbox":
|
|
270
|
-
return a("div", { class: "input-wrapper" }, a("checkbox-component", { label:
|
|
270
|
+
return a("div", { class: "input-wrapper" }, a("checkbox-component", { label: p, name: h, id: h, required: f.required, part: "nbf__input-textfield" }));
|
|
271
271
|
case "radio_button":
|
|
272
|
-
return a("div", { class: "input-wrapper" }, a("radio-button-group", { label:
|
|
272
|
+
return a("div", { class: "input-wrapper" }, a("radio-button-group", { label: p, name: h, id: h, options: (k = f.options) == null ? void 0 : k.map((y) => ({ value: y, label: y })), required: f.required, part: "nbf__input-textfield" }));
|
|
273
273
|
case "multi_line_text":
|
|
274
|
-
return a("div", { class: "input-wrapper" }, a("textarea-component", { label:
|
|
274
|
+
return a("div", { class: "input-wrapper" }, a("textarea-component", { label: p, name: h, id: h, required: f.required, part: "nbf__input-textfield" }));
|
|
275
275
|
default:
|
|
276
|
-
return a("div", { class: "input-wrapper" }, a("input-component", { label:
|
|
276
|
+
return a("div", { class: "input-wrapper" }, a("input-component", { label: p, name: h, id: h, type: f.type, requiredError: l.t("fieldRequired", { field: p }), required: f.required, part: "nbf__input-textfield" }));
|
|
277
277
|
}
|
|
278
|
-
})
|
|
278
|
+
})), a("div", { key: "fedca1f1d3dc22fac5e93dd73f44273e3d6a12a2", class: "cta" }, a("sp-button", { key: "6be5ecaa860a446f3bc2dc292b919d29a14ae2c5", treatment: "outline", variant: "secondary", class: "back", part: "nbf__button-outline", onClick: this.handleBackButtonClicked }, a("slot", { key: "b3880450d464da75c0e1ba7193af484b7de18a04", name: "booking-form-back-label" }, `${l.t("backButton")}`)), a("sp-button", { key: "ac722e9ed9e8d1d1fdb284496efdcb8a03b0ca27", variant: "primary", class: "book", part: "nbf__button-primary", type: "submit", disabled: this.isLoading }, this.isLoading && a("loading-icon", { slot: "icon" }), a("slot", { key: "1e4d6c2da02e4d9567c1431d256e2ddf13753630", name: "booking-form-book-label" }, `${l.t("bookNowButton")}`)))));
|
|
279
279
|
}
|
|
280
280
|
get host() {
|
|
281
281
|
return X(this);
|
|
@@ -329,16 +329,16 @@ var xe = function(e, t, i, o) {
|
|
|
329
329
|
const ee = class {
|
|
330
330
|
constructor(e) {
|
|
331
331
|
var t, i;
|
|
332
|
-
v(this, e), this.goBackButtonClicked =
|
|
332
|
+
v(this, e), this.goBackButtonClicked = u(this, "goBackButtonClicked", 7), this.cancelBookingFormSubmitted = u(this, "cancelBookingFormSubmitted", 7), this.cancelBookedEventError = u(this, "cancelBookedEventError", 7), this.cancelBookingFormError = u(this, "cancelBookingFormError", 7), this.handleGoBackClicked = () => {
|
|
333
333
|
this.goBackButtonClicked.emit();
|
|
334
334
|
}, this.handleSubmitCancelBooking = (o) => {
|
|
335
|
-
var r, c,
|
|
335
|
+
var r, c, m;
|
|
336
336
|
if (o.preventDefault(), !this.cancellationReason) {
|
|
337
337
|
this.cancellationError = l.t("cancellationErrorMessage"), this.cancelBookingFormError.emit({ title: l.t("cancelBokingFormError"), description: l.t("cancellationErrorMessage") });
|
|
338
338
|
return;
|
|
339
339
|
}
|
|
340
340
|
const s = (c = (r = this.configSettings) == null ? void 0 : r.scheduler) == null ? void 0 : c.min_cancellation_notice;
|
|
341
|
-
if (this.selectedTimeslot && s && new Date((
|
|
341
|
+
if (this.selectedTimeslot && s && new Date((m = this.selectedTimeslot) == null ? void 0 : m.start_time).getTime() - s * 60 * 1e3 < (/* @__PURE__ */ new Date()).getTime()) {
|
|
342
342
|
this.cancelBookedEventError.emit({
|
|
343
343
|
error: {
|
|
344
344
|
title: l.t("cancellationErrorTitle"),
|
|
@@ -348,13 +348,13 @@ const ee = class {
|
|
|
348
348
|
return;
|
|
349
349
|
}
|
|
350
350
|
d(`[nylas-cancel-booking-form] Cancel booking form submitted with reason: ${this.cancellationReason}`);
|
|
351
|
-
const n = (
|
|
352
|
-
this.cancelBookedEventError.emit(
|
|
351
|
+
const n = (b) => {
|
|
352
|
+
this.cancelBookedEventError.emit(b);
|
|
353
353
|
};
|
|
354
354
|
this.cancelBookingFormSubmitted.emit({ bookingId: this.cancelBookingId, reason: this.cancellationReason, errorHandler: n });
|
|
355
355
|
}, this.handleOnChangeCancellationReason = (o) => {
|
|
356
356
|
this.cancellationError = "", this.cancellationReason = o.target.value;
|
|
357
|
-
}, this.cancelBookingId = void 0, this.configSettings = void 0, this.selectedTimeslot = 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.";
|
|
357
|
+
}, this.cancelBookingId = void 0, this.configSettings = void 0, this.selectedTimeslot = void 0, this.isLoading = 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.";
|
|
358
358
|
}
|
|
359
359
|
configSettingsChangedHandler(e) {
|
|
360
360
|
var t;
|
|
@@ -374,7 +374,7 @@ const ee = class {
|
|
|
374
374
|
}
|
|
375
375
|
render() {
|
|
376
376
|
var e, t;
|
|
377
|
-
return a(
|
|
377
|
+
return a(g, { key: "7f2e077d4030a0ee2f4801305b65dac5b54441b0", part: "ncec" }, a("sp-theme", { key: "f80896dfff124295412d3a7b693ed82cf9c3ed91", theme: "spectrum", scale: "medium" }, a("div", { key: "1c487f558c382b9dc2b7f79cf573b237379144ce", class: "nylas-cancel-booking-form", part: "ncec__card" }, a("div", { key: "153d19e9200b4ea3d365067161ecb882dc681efb", class: "nylas-cancel-booking-form__calendar-icon", part: "ncec__icon" }, a("calendar-cancel-icon", { key: "e33e0637944233c62013890e0ada8c31088c8818" })), a("h3", { key: "adc67e221a280a13251383257b32687d6d55307d", class: "nylas-cancel-booking-form__title", part: "ncec__title" }, l.t("cancelBookingTitle")), a("div", { key: "79b6294dbb3456744013ab7f4764c182b335aeef", class: "nylas-cancel-booking-form__description", part: "ncec__description" }, (t = (e = this.configSettings) == null ? void 0 : e.scheduler) != null && t.cancellation_policy ? this.cancellationPolicy : `${l.t("cancelBookingMessage")}`), a("form", { key: "18a7587f130f55bc15debe787f607fda543bb067", onSubmit: this.handleSubmitCancelBooking }, a("sp-field-label", { key: "b692b15310fef3af75d4e7302f2134b3dfc45cdb", for: "cancel-reason", class: this.cancellationError ? "error" : "" }, l.t("reasonForCancellation"), " ", a("span", { key: "6a5e6e7d130b31d34e409c040f14c41bc1d350f4", class: "required" }, "*")), a("sp-textfield", { key: "2e63aae432b4fccfcc55d52a836e71539275bd6f", 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 }, a("sp-help-text", { key: "4486e9362d2a1086dc91b4dca0080c0693040fc5", slot: "negative-help-text" }, this.cancellationError)), a("sp-button", { key: "bb750fcd1edd92c99b47f05c8f681ad9e04a3139", variant: "primary", class: "cancel", type: "submit", part: "ncec__button-cta", disabled: this.isLoading }, l.t("cancelBookingButton")), a("sp-button", { key: "e7cf434fb93bf231d44538184ed6ffcc52f0e2d0", variant: "secondary", class: "back", treatment: "outline", part: "ncec__button-outline", onClick: this.handleGoBackClicked }, l.t("goBackButton"))))));
|
|
378
378
|
}
|
|
379
379
|
static get watchers() {
|
|
380
380
|
return {
|
|
@@ -387,7 +387,8 @@ xe([
|
|
|
387
387
|
name: "nylas-cancel-booking-form",
|
|
388
388
|
stateToProps: /* @__PURE__ */ new Map([
|
|
389
389
|
["scheduler.configSettings", "configSettings"],
|
|
390
|
-
["scheduler.selectedTimeslot", "selectedTimeslot"]
|
|
390
|
+
["scheduler.selectedTimeslot", "selectedTimeslot"],
|
|
391
|
+
["scheduler.isLoading", "isLoading"]
|
|
391
392
|
]),
|
|
392
393
|
eventToProps: {
|
|
393
394
|
cancelBookingFormSubmitted: async (e, t) => {
|
|
@@ -417,7 +418,7 @@ var _e = function(e, t, i, o) {
|
|
|
417
418
|
};
|
|
418
419
|
const te = class {
|
|
419
420
|
constructor(e) {
|
|
420
|
-
v(this, e), this.closeCancelEventCardClicked =
|
|
421
|
+
v(this, e), this.closeCancelEventCardClicked = u(this, "closeCancelEventCardClicked", 7), this.cancelledEventCardError = u(this, "cancelledEventCardError", 7), this.handleCloseClicked = () => {
|
|
421
422
|
this.isClosing = !0;
|
|
422
423
|
const t = (i) => {
|
|
423
424
|
this.cancelledEventCardError.emit(i), this.isClosing = !1;
|
|
@@ -439,7 +440,7 @@ const te = class {
|
|
|
439
440
|
}
|
|
440
441
|
render() {
|
|
441
442
|
var e, t;
|
|
442
|
-
return a(
|
|
443
|
+
return a(g, { key: "9c98c6894ceb733fa180edd1df8175982baf746b", part: "ncec" }, a("sp-theme", { key: "14a7b09fc12551599c93762d7c5398d7326f3507", theme: "spectrum", color: "dark", scale: "medium" }, a("div", { key: "828831866ee86c226f755c0f151baecef91ed995", class: "nylas-cancelled-event-card", part: "ncec__card" }, a("div", { key: "e92df81c9d255aa862382915af84e33d17624150", class: "nylas-cancelled-event-card__calendar-icon", part: "ncec__icon" }, a("calendar-cancel-icon", { key: "bbbbbdf5e90467700c05c1702fcc5cc66968a834" })), a("h3", { key: "17e09dbd68c95dea1f3db1259ef4e801a956724e", class: "nylas-cancelled-event-card__title", part: "ncec__title" }, l.t("bookingCancelledTitle"), "!"), a("div", { key: "12cd951ec167e07a476620c5c0a6bba3f1d7d739", class: "nylas-cancelled-event-card__description", part: "ncec__description" }, l.t("bookingCancelledMessage"), " ", ((t = (e = this.configSettings) == null ? void 0 : e.organizer) == null ? void 0 : t.name) || "the participants", "."), a("div", { key: "07d80ab4a38a15eecb62c7f2d2205862e42d8e47", class: "nylas-cancelled-event-card__cta" }, a("sp-button", { key: "c5c33eacbce86cb787ef9d0343b05941b9e7189a", variant: "secondary", treatment: "outline", disabled: this.isClosing, part: "ncec__button-outline", onClick: this.handleCloseClicked }, this.isClosing ? `${l.t("closingButton")}...` : `${l.t("closeButton")}`)))));
|
|
443
444
|
}
|
|
444
445
|
};
|
|
445
446
|
_e([
|
|
@@ -468,14 +469,14 @@ function L(e, t, i, o) {
|
|
|
468
469
|
const r = s(n), c = s.ceil(n);
|
|
469
470
|
return n - r < c - n ? r : c;
|
|
470
471
|
}, s.offset = (n, r) => (t(n = /* @__PURE__ */ new Date(+n), r == null ? 1 : Math.floor(r)), n), s.range = (n, r, c) => {
|
|
471
|
-
const
|
|
472
|
+
const m = [];
|
|
472
473
|
if (n = s.ceil(n), c = c == null ? 1 : Math.floor(c), !(n < r) || !(c > 0))
|
|
473
|
-
return
|
|
474
|
-
let
|
|
474
|
+
return m;
|
|
475
|
+
let b;
|
|
475
476
|
do
|
|
476
|
-
|
|
477
|
-
while (
|
|
478
|
-
return
|
|
477
|
+
m.push(b = /* @__PURE__ */ new Date(+n)), t(n, c), e(n);
|
|
478
|
+
while (b < n && n < r);
|
|
479
|
+
return m;
|
|
479
480
|
}, s.filter = (n) => L((r) => {
|
|
480
481
|
if (r >= r)
|
|
481
482
|
for (; e(r), !n(r); )
|
|
@@ -523,7 +524,7 @@ var Be = function(e, t, i, o) {
|
|
|
523
524
|
};
|
|
524
525
|
const ne = class {
|
|
525
526
|
constructor(e) {
|
|
526
|
-
v(this, e), this.dateSelected =
|
|
527
|
+
v(this, e), this.dateSelected = u(this, "dateSelected", 7), this.monthChanged = u(this, "monthChanged", 7), this.selectableDates = void 0, this.selectedDate = void 0, this.configSettings = 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;
|
|
527
528
|
}
|
|
528
529
|
configSettingsChanged(e) {
|
|
529
530
|
var s;
|
|
@@ -562,7 +563,7 @@ const ne = class {
|
|
|
562
563
|
}
|
|
563
564
|
render() {
|
|
564
565
|
var e, t, i, o, s;
|
|
565
|
-
return a(
|
|
566
|
+
return a(g, { key: "b9352b7200decd122387246dfe84ffa03d8548f7", part: "ndp" }, a("div", { key: "f5e97afdd1f9e56323ec9a6f03c3d03f4f0b9752", class: "nylas-date-picker" }, a("div", { key: "f7b357631c4a8e49b5e2155744cc862c3f5686b2", class: "title", part: "'ndp__title" }, ((t = (e = this.configSettings) == null ? void 0 : e.organizer) == null ? void 0 : t.name) && a("h1", null, a("person-icon", null), ((o = (i = this.configSettings) == null ? void 0 : i.organizer) == null ? void 0 : o.name) || "Organizer"), a("p", { key: "ccaeb9dcb6c26a8debdf1517e7f6c4a38535d7e8" }, a("clock-icon", { key: "00991681f820c8d9cb5aac8d3fffdefd84a7ff8c" }), this.eventDuration ? ce(this.eventDuration) : `- ${l.t("time.minutes")}`)), a("div", { key: "cf9d074f2616969892a4b1993bc812f3a88cc30e", class: "header flex-row" }, a("h2", { key: "e419a9019e07540c61d6348d83ffb1b18dc6ab49", part: "ndp__month-header" }, a("strong", { key: "0b579d2821c676edad234e89a0f76b2625506002" }, de(this.month.toLocaleDateString(void 0, { month: "long" }).toLocaleLowerCase())), " ", this.month.toLocaleDateString(void 0, { year: "numeric" })), a("div", { key: "1c54a274075b10933e683b7c94def7b9a9c026bb", class: "pagination" }, a("button", { key: "77625a1039d9397d80d9223b9f70589cccd092e2", 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" }, a("chevron-icon", { key: "52723491a9e3ce61acb280aba55193c1ce11447f" })), a("button", { key: "71a728afda92fee35e1da058c0241f26f46cb837", onClick: () => this.changeMonth(1), class: { "chevron-right": !0, button: !0 }, disabled: this.disableNextMonthButton, part: "ndp__month-button" }, a("chevron-icon", { key: "af862e5450421ae1be319f6a3a9b393cb08b3e5a" })))), a("div", { key: "4edef52ad8c2bd98fc1a249fe28a3029c4a290c9", class: "dates" }, [
|
|
566
567
|
l.t("days.sunday"),
|
|
567
568
|
l.t("days.monday"),
|
|
568
569
|
l.t("days.tuesday"),
|
|
@@ -571,14 +572,14 @@ const ne = class {
|
|
|
571
572
|
l.t("days.friday"),
|
|
572
573
|
l.t("days.saturday")
|
|
573
574
|
].map((n) => a("div", { class: "day", part: "ndp__day" }, n)), this.dates.map((n, r) => {
|
|
574
|
-
var
|
|
575
|
+
var m;
|
|
575
576
|
const c = this.isDisabled(n, this.selectableDates);
|
|
576
577
|
return this.isLoading ? a("button", { disabled: !0, class: {
|
|
577
578
|
"date day-skeleton": !0,
|
|
578
579
|
"current-month": B(n, this.month)
|
|
579
580
|
}, style: { animationDelay: `${r * 20}ms` }, part: "ndp__date" }, n.getDate()) : a("button", { class: {
|
|
580
581
|
date: !0,
|
|
581
|
-
selected: !!(this.selectedDate && C(n, this.selectedDate) && this.selectableDates && ((
|
|
582
|
+
selected: !!(this.selectedDate && C(n, this.selectedDate) && this.selectableDates && ((m = this.selectableDates) == null ? void 0 : m.length) > 0),
|
|
582
583
|
"current-day": C(n, /* @__PURE__ */ new Date()),
|
|
583
584
|
"current-month": B(n, this.month)
|
|
584
585
|
}, "aria-lang": n.toLocaleDateString(void 0, { dateStyle: "full" }), disabled: c, onClick: () => this.selectDate(n), part: `ndp__date ${this.isSelected(n, this.selectedDate, this.selectableDates) ? "ndp__date--selected" : ""} ${C(n, /* @__PURE__ */ new Date()) ? "ndp__date--current-day" : ""} ${B(n, this.month) ? "ndp__date--current-month" : ""}` }, n.getDate());
|
|
@@ -629,7 +630,7 @@ var Ie = function(e, t, i, o) {
|
|
|
629
630
|
};
|
|
630
631
|
const ie = class {
|
|
631
632
|
constructor(e) {
|
|
632
|
-
v(this, e), this.timezoneChanged =
|
|
633
|
+
v(this, e), this.timezoneChanged = u(this, "timezoneChanged", 7), this.languageChanged = u(this, "languageChanged", 7), this.selectedTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone, this.selectedLanguage = navigator.language;
|
|
633
634
|
}
|
|
634
635
|
connectedCallback() {
|
|
635
636
|
}
|
|
@@ -669,7 +670,7 @@ const ie = class {
|
|
|
669
670
|
label: U[i],
|
|
670
671
|
value: i
|
|
671
672
|
}));
|
|
672
|
-
return a(
|
|
673
|
+
return a(g, { key: "8f8d20420b4bc34e48cd48b2f78f66bc01bae8f8" }, a("div", { key: "bb24d8978ae671cac3b063ace059da9932e638cd", class: "nylas-locale-switch" }, a("div", { key: "4c93f5c209c64e573f1eebdef7c6a9dea1049a08", class: {
|
|
673
674
|
"select-wrapper": !0,
|
|
674
675
|
timezone: !0
|
|
675
676
|
} }, a("select-dropdown", { key: "6dc7c793fbf3d8a3724f957dd0a3512034ec9689", name: "timezone", options: e, defaultSelectedOption: e.find((i) => i.value == this.selectedTimezone) }, a("span", { key: "afbd26c2bd09b94220801c575152773c4ba37c06", slot: "select-icon" }, a("globe-icon", { key: "5ca8b25e1cd2f21445c4431aa5dd3cafda67a5ce", width: "20", height: "20" })))), a("div", { key: "a4171de1a022cfdfd722acf37eff0fb6cf1e876a", class: {
|
|
@@ -705,7 +706,7 @@ const Re = ".sc-nylas-logo-h{display:flex}", Fe = Re, Pe = class {
|
|
|
705
706
|
v(this, e), this.width = "69", this.height = "24";
|
|
706
707
|
}
|
|
707
708
|
render() {
|
|
708
|
-
return a("svg", { key: "
|
|
709
|
+
return a("svg", { key: "0fbf980c0b3e79d48eac121208ded45ff37cf755", width: this.width, height: this.height, viewBox: "0 0 69 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, a("g", { key: "7fada887714f6771756e993a14cc85573cb03381", "clip-path": "url(#clip0_455_3543)" }, a("path", { key: "f91c2de423caf86f05f3f583cf2948dbb2ad57ff", 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" }), a("path", { key: "cde2692ce02ef84f5fb4dfd0d2586437cec14258", 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" }), a("path", { key: "f2e8d9f1ad8ab8238f0c412e2ece3e82e0c59cbe", 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" }), a("path", { key: "8c6634a7b8b1358e5b18ddfd44ac820c2025e92f", 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" }), a("path", { key: "100297c7cec7475275ddaaa14b77d55391627a23", 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" }), a("path", { key: "02d4f2d7ff9f1d622352cc6119e146f2369915f0", 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" }), a("path", { key: "f8c9ab3a5f34b72b550ffeb9869d92b3184f527f", 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" }), a("path", { key: "bd56ca92b932101416706164329e4eca5ab43437", 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" })), a("defs", { key: "20ae2f861eb31c0dd81bcd94c652de0ec040c7b3" }, a("clipPath", { key: "34e8be3ddc24fe243728764b8b171b0e8bea15d2", id: "clip0_455_3543" }, a("rect", { key: "da3c1e98ef4a481dd2645b630734905aa0c95a5b", width: "68.7123", height: "19.2877", fill: "white", transform: "translate(0.144043 0.356201)" }))));
|
|
709
710
|
}
|
|
710
711
|
};
|
|
711
712
|
Pe.style = Fe;
|
|
@@ -763,7 +764,7 @@ const Me = ':host{display:block;margin-bottom:-12px;width:100%;z-index:1;--nylas
|
|
|
763
764
|
this.notifications = this.notifications.filter((t) => t.id !== e);
|
|
764
765
|
}
|
|
765
766
|
render() {
|
|
766
|
-
return a(
|
|
767
|
+
return a(g, { key: "c507cfeee709a1742cfcfe448edb46148bb7645c" }, a(fe, { key: "bef717616baa583c675852eb3eae03a4303276ee" }, this.notifications.map((e) => a("div", { class: `notif ${e.type}`, key: e.id }, a("div", { class: "content" }, a("span", { class: `icon ${e.type}` }, (e.type === "error" || e.type === "warning") && a("warning-icon", null)), a("span", { class: "message" }, a("span", { class: "title" }, e.title), e.description && a("span", { class: "description" }, e.description))), a("button", { class: "dismiss-btn", onClick: () => this.dismissNotification(e.id) }, a("close-icon", null)))), a("slot", { key: "611326297709c03e357a3bb1597339d540b683b5" })));
|
|
767
768
|
}
|
|
768
769
|
get host() {
|
|
769
770
|
return X(this);
|
|
@@ -802,7 +803,7 @@ const oe = class {
|
|
|
802
803
|
}
|
|
803
804
|
render() {
|
|
804
805
|
var e;
|
|
805
|
-
return a(
|
|
806
|
+
return a(g, { key: "f794f4415321af6623c2c9d97925932dbb2047e4", part: "nsec" }, a("sp-theme", { key: "356fedb5c591554eb87d8cdf5cc711fe3524a7c7", theme: "spectrum", color: "dark", scale: "medium" }, a("div", { key: "336de44bd19e2fd086c2826a6c8206608f6ca646", class: "event-card", part: "nsec__card" }, a("div", { key: "940dd832f8fb09e27efa3ff5b0728a5053ff629e", class: "calendar-icon", part: "nsec__icon" }, a("calendar-icon", { key: "523369c88eb905de96b7c8431b9109b4fb8706ec" })), a("div", { key: "385494cc3d1830f124cdca616413caba9fc1ce64", class: "nylas-selected-event-card__date", part: "nsec__date" }, this.selectedDate ? Y((e = this.selectedDate) == null ? void 0 : e.toLocaleDateString(J[this.selectedLanguage || navigator.language], { dateStyle: "full" })) : "-"), a("div", { key: "7e92630de5bf9811e3e05ee2ff1fd2f54797f222", class: "nylas-selected-event-card__time", part: "nsec__time" }, this.startTime, " - ", this.endTime)), a("div", { key: "da2b0cd62a7519040ba9b055991684e4db7ff9b9", class: "event-timezone", part: "nsec__timezone" }, a("globe-icon", { key: "045c62d629116f91d3558a236c66374769c3a903" }), E[this.selectedTimezone])));
|
|
806
807
|
}
|
|
807
808
|
static get watchers() {
|
|
808
809
|
return {
|
|
@@ -842,7 +843,7 @@ var Ze = function(e, t, i, o) {
|
|
|
842
843
|
};
|
|
843
844
|
const se = class {
|
|
844
845
|
constructor(e) {
|
|
845
|
-
v(this, e), this.timeslotSelected =
|
|
846
|
+
v(this, e), this.timeslotSelected = u(this, "timeslotSelected", 7), this.timeslotConfirmed = u(this, "timeslotConfirmed", 7), this.handleConfirmedTimeslot = async (t, i) => {
|
|
846
847
|
t.preventDefault(), d("[nylas-timeslot-picker] Confirm timeslot", i), this.timeslotConfirmed.emit(i);
|
|
847
848
|
}, this.handleMouseEnter = (t) => {
|
|
848
849
|
this.hoveredTimeslotIndex = t;
|
|
@@ -897,13 +898,13 @@ const se = class {
|
|
|
897
898
|
return `${t.format(e.start_time)} - ${t.format(e.end_time)}`;
|
|
898
899
|
}
|
|
899
900
|
render() {
|
|
900
|
-
return this.isLoading ? a(
|
|
901
|
+
return this.isLoading ? a(g, null, a("div", { class: "loading" }, new Array(6).fill(0).map((e, t) => a("div", { class: "timeslot-skeleton", style: { animationDelay: `${t * 20}ms` } })))) : this.availability && this.availability.length === 0 ? a(g, null, a("div", { class: "empty" }, a("span", null, "No dates available"))) : (!this.times || this.times.length === 0) && this.selectedDate ? a(g, null, a("div", { class: "empty" }, a("span", null, "No time slots available for selected date"))) : this.selectedDate ? a(g, { part: "ntp" }, a("div", { class: "time-picker-wrapper" }, a("div", { class: "timeslots" }, this.times.map((e, t) => {
|
|
901
902
|
var i, o, s, n;
|
|
902
903
|
return a("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: {
|
|
903
904
|
time: !0,
|
|
904
905
|
selected: typeof this.selectedTimeslot < "u" && ((n = (s = this.selectedTimeslot) == null ? void 0 : s.start_time) == null ? void 0 : n.getTime()) === e.start_time.getTime()
|
|
905
906
|
}, 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 }));
|
|
906
|
-
})), this.selectedTimeslot && a("div", { class: "footer" }, a("sp-button", { variant: "primary", onClick: (e) => this.handleConfirmedTimeslot(e, this.selectedTimeslot), part: "ntp__button-primary" }, a("slot", { name: "timeslot-picker-cta-label" }, l.t("nextButton")), " ")))) : a(
|
|
907
|
+
})), this.selectedTimeslot && a("div", { class: "footer" }, a("sp-button", { variant: "primary", onClick: (e) => this.handleConfirmedTimeslot(e, this.selectedTimeslot), part: "ntp__button-primary" }, a("slot", { name: "timeslot-picker-cta-label" }, l.t("nextButton")), " ")))) : a(g, null);
|
|
907
908
|
}
|
|
908
909
|
static get watchers() {
|
|
909
910
|
return {
|