@nylas/react 1.1.0-canary.21 → 1.1.0-canary.22
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_2.entry-404b178a.js} +5 -5
- package/dist/{add-circle-icon_2.entry-29cc2385.cjs → add-circle-icon_2.entry-d44a0d4b.cjs} +1 -1
- package/dist/{archive-icon_7.entry-afaef817.cjs → archive-icon_7.entry-1c2e5b68.cjs} +1 -1
- package/dist/{archive-icon_7.entry-3830776a.js → archive-icon_7.entry-d14abebc.js} +16 -16
- package/dist/{arrow-icon.entry-460cdd9f.cjs → arrow-icon.entry-61290104.cjs} +1 -1
- package/dist/arrow-icon.entry-8dd5bfb5.js +15 -0
- package/dist/{bold-icon_3.entry-1893eeec.cjs → bold-icon_3.entry-c5502b92.cjs} +1 -1
- package/dist/{bold-icon_3.entry-80abafbb.js → bold-icon_3.entry-cc7319da.js} +4 -4
- package/dist/{button-component.entry-36137536.js → button-component.entry-71de5b6b.js} +2 -2
- package/dist/{button-component.entry-b78dc39e.cjs → button-component.entry-92c46833.cjs} +1 -1
- package/dist/{calendar-agenda-fill-icon_40.entry-62c66fce.cjs → calendar-agenda-fill-icon_40.entry-242956c2.cjs} +3 -3
- package/dist/{calendar-agenda-fill-icon_40.entry-f19d6ad7.js → calendar-agenda-fill-icon_40.entry-b33080d8.js} +135 -135
- package/dist/{calendar-cancel-icon.entry-0d83ee82.cjs → calendar-cancel-icon.entry-bbf56125.cjs} +1 -1
- package/dist/{calendar-cancel-icon.entry-1fae00c5.js → calendar-cancel-icon.entry-fcc89777.js} +2 -2
- package/dist/{calendar-check-icon_2.entry-e01c9028.cjs → calendar-check-icon_2.entry-64d553de.cjs} +1 -1
- package/dist/{calendar-check-icon_2.entry-159c38af.js → calendar-check-icon_2.entry-e7691b84.js} +5 -5
- package/dist/{calendar-icon.entry-3af9cb76.js → calendar-icon.entry-6375e3ed.js} +4 -4
- package/dist/{calendar-icon.entry-2e701aab.cjs → calendar-icon.entry-9cea89bc.cjs} +1 -1
- package/dist/{checkbox-component_2.entry-5eee51f6.js → checkbox-component_2.entry-751f4638.js} +3 -3
- package/dist/{checkbox-component_2.entry-9ff2c85b.cjs → checkbox-component_2.entry-9a89cf14.cjs} +1 -1
- package/dist/{checkmark-icon.entry-0749b942.js → checkmark-icon.entry-136b682c.js} +4 -4
- package/dist/{checkmark-icon.entry-f96f1117.cjs → checkmark-icon.entry-6bca8604.cjs} +1 -1
- package/dist/{chevron-icon_3.entry-c3989df2.cjs → chevron-icon_3.entry-97c91007.cjs} +1 -1
- package/dist/{chevron-icon_3.entry-2e9eebbc.js → chevron-icon_3.entry-b4995425.js} +13 -13
- package/dist/{clock-icon_4.entry-d4563931.cjs → clock-icon_4.entry-cd6ac47d.cjs} +1 -1
- package/dist/{clock-icon_4.entry-9395d0cb.js → clock-icon_4.entry-d2e007e5.js} +19 -19
- package/dist/close-icon.entry-d1348fa8.cjs +1 -0
- package/dist/close-icon.entry-d4d4da48.js +15 -0
- package/dist/{constants-67de2eec-b17f5b96.js → constants-67de2eec-31cbc722.js} +1 -1
- package/dist/{constants-67de2eec-e3b50fc6.cjs → constants-67de2eec-8286f29c.cjs} +1 -1
- package/dist/{copy-icon_3.entry-7b276fa2.js → copy-icon_3.entry-e41eb1a0.js} +7 -7
- package/dist/{copy-icon_3.entry-7de3667f.cjs → copy-icon_3.entry-f614fc20.cjs} +1 -1
- package/dist/document-refresh-icon.entry-12833775.cjs +1 -0
- package/dist/{document-refresh-icon.entry-6dd65cb6.js → document-refresh-icon.entry-817322ba.js} +5 -5
- package/dist/{elements-dc5b338e-158dce67.cjs → elements-dc5b338e-3a8522b8.cjs} +1 -1
- package/dist/{elements-dc5b338e-5e8a704b.js → elements-dc5b338e-d885666f.js} +1 -1
- package/dist/{focus-visible-e8093c16-5883a317.cjs → focus-visible-e8093c16-17bb48f2.cjs} +1 -1
- package/dist/{focus-visible-e8093c16-9d88e8ee.js → focus-visible-e8093c16-78717e30.js} +1 -1
- package/dist/{forward-icon_6.entry-a59dada5.cjs → forward-icon_6.entry-074fd345.cjs} +3 -3
- package/dist/{forward-icon_6.entry-acdf04ad.js → forward-icon_6.entry-39b55b30.js} +9 -9
- package/dist/{globe-icon.entry-389c0391.js → globe-icon.entry-a1875d7e.js} +2 -2
- package/dist/{globe-icon.entry-eef27331.cjs → globe-icon.entry-dee4c2b0.cjs} +1 -1
- package/dist/{google-logo-icon_4.entry-eae19fc8.js → google-logo-icon_4.entry-3c3101ea.js} +25 -25
- package/dist/{google-logo-icon_4.entry-e9be320c.cjs → google-logo-icon_4.entry-44c3f539.cjs} +1 -1
- package/dist/{index-db48e0b6.cjs → index-26f8bbeb.cjs} +2 -2
- package/dist/index-53420959-a444c1cf.cjs +1 -0
- package/dist/index-53420959-b26d1293.js +5 -0
- package/dist/{index-f8317a8e.js → index-5da0aff3.js} +48 -48
- package/dist/{index-6d9eeb53-15c69801.cjs → index-6d9eeb53-b71b16c5.cjs} +1 -1
- package/dist/{index-6d9eeb53-c70fc8a7.js → index-6d9eeb53-f37ff819.js} +2 -2
- package/dist/{index.es-b16d0cf5-d7f30c4a.cjs → index.es-b16d0cf5-4ce1fb63.cjs} +1 -1
- package/dist/{index.es-b16d0cf5-386496a9.js → index.es-b16d0cf5-b1cecbdd.js} +1 -1
- package/dist/{info-icon_2.entry-63914227.cjs → info-icon_2.entry-67a3e2c3.cjs} +1 -1
- package/dist/{info-icon_2.entry-97d75550.js → info-icon_2.entry-6fd10047.js} +5 -5
- package/dist/{input-dropdown.entry-629d7b54.cjs → input-dropdown.entry-701ab8b7.cjs} +1 -1
- package/dist/{input-dropdown.entry-4d29246a.js → input-dropdown.entry-e677224a.js} +2 -2
- package/dist/loading-icon.entry-3f54b204.js +15 -0
- package/dist/loading-icon.entry-558c2382.cjs +1 -0
- package/dist/{mailbox-store-f11de360-d781fd36.js → mailbox-store-f11de360-79ba75b1.js} +2 -2
- package/dist/{mailbox-store-f11de360-02a6de93.cjs → mailbox-store-f11de360-8f269e26.cjs} +1 -1
- package/dist/{multi-select-dropdown.entry-68fcca98.cjs → multi-select-dropdown.entry-d053b2fb.cjs} +1 -1
- package/dist/{multi-select-dropdown.entry-8e14e9af.js → multi-select-dropdown.entry-e46f5cfb.js} +2 -2
- package/dist/nylas-booked-event-card_10.entry-32911b16.cjs +1 -0
- package/dist/{nylas-booked-event-card_10.entry-9487941d.js → nylas-booked-event-card_10.entry-545261f6.js} +72 -72
- package/dist/{nylas-custom-booking-flow.entry-338b0a8f.cjs → nylas-custom-booking-flow.entry-49b82a11.cjs} +1 -1
- package/dist/{nylas-custom-booking-flow.entry-0e16973b.js → nylas-custom-booking-flow.entry-6639c5fb.js} +6 -6
- package/dist/{nylas-form-card.entry-ccfa5692.js → nylas-form-card.entry-7d69820f.js} +16 -16
- package/dist/{nylas-form-card.entry-ca669dea.cjs → nylas-form-card.entry-a063402d.cjs} +1 -1
- package/dist/{nylas-if-state.entry-faa11bb6.cjs → nylas-if-state.entry-54a6948f.cjs} +1 -1
- package/dist/{nylas-if-state.entry-93935670.js → nylas-if-state.entry-9e7df799.js} +3 -3
- package/dist/{nylas-list-folders.entry-14fc1fe8.js → nylas-list-folders.entry-013ffceb.js} +3 -3
- package/dist/{nylas-list-folders.entry-e7e179ea.cjs → nylas-list-folders.entry-d08423d4.cjs} +1 -1
- package/dist/{nylas-list-threads.entry-3f52fc06.cjs → nylas-list-threads.entry-be9bc422.cjs} +1 -1
- package/dist/{nylas-list-threads.entry-2118b146.js → nylas-list-threads.entry-d3f575a5.js} +3 -3
- package/dist/{nylas-login.entry-87a902d6.js → nylas-login.entry-d82e8ee0.js} +7 -7
- package/dist/{nylas-login.entry-915f0284.cjs → nylas-login.entry-e7015d8f.cjs} +1 -1
- package/dist/{nylas-mailbox-pagination.entry-9aa8a606.cjs → nylas-mailbox-pagination.entry-22866764.cjs} +1 -1
- package/dist/{nylas-mailbox-pagination.entry-eedbf796.js → nylas-mailbox-pagination.entry-99339476.js} +2 -2
- package/dist/{nylas-mailbox-toolbar-button.entry-ba5b826e.cjs → nylas-mailbox-toolbar-button.entry-09faed21.cjs} +1 -1
- package/dist/{nylas-mailbox-toolbar-button.entry-40b75810.js → nylas-mailbox-toolbar-button.entry-b8929b00.js} +7 -7
- package/dist/{nylas-mailbox.entry-179e5a5c.js → nylas-mailbox.entry-6e8d4f9c.js} +4 -4
- package/dist/{nylas-mailbox.entry-31de7f8f.cjs → nylas-mailbox.entry-91ca6af1.cjs} +1 -1
- package/dist/{nylas-provider.entry-46fe01b6.cjs → nylas-provider.entry-b80d5e74.cjs} +1 -1
- package/dist/{nylas-provider.entry-7b70bbdc.js → nylas-provider.entry-cc32369c.js} +8 -8
- package/dist/{nylas-scheduler-editor.entry-f1f80de1.js → nylas-scheduler-editor.entry-5e0475d8.js} +5 -5
- package/dist/{nylas-scheduler-editor.entry-76b68f66.cjs → nylas-scheduler-editor.entry-c7f7bf6c.cjs} +2 -2
- package/dist/{nylas-scheduling.entry-3ce8c52f.cjs → nylas-scheduling.entry-047cd53a.cjs} +1 -1
- package/dist/{nylas-scheduling.entry-31d13205.js → nylas-scheduling.entry-c79596db.js} +30 -34
- package/dist/{nylas-threads-refresh.entry-a3ea46aa.js → nylas-threads-refresh.entry-e200efb9.js} +4 -4
- package/dist/{nylas-threads-refresh.entry-c9f9db8c.cjs → nylas-threads-refresh.entry-ef2ad409.cjs} +1 -1
- package/dist/{nylas-threads-search.entry-01482ddf.js → nylas-threads-search.entry-85a0bc7d.js} +5 -5
- package/dist/{nylas-threads-search.entry-a4ab0d47.cjs → nylas-threads-search.entry-a260ce6f.cjs} +1 -1
- package/dist/{nylas-time-window-picker.entry-5f063b2b.js → nylas-time-window-picker.entry-c9b2a7ca.js} +2 -2
- package/dist/{nylas-time-window-picker.entry-5a3bb0b7.cjs → nylas-time-window-picker.entry-cb33b696.cjs} +1 -1
- package/dist/{nylas-view-thread.entry-82e78b82.cjs → nylas-view-thread.entry-219511ac.cjs} +1 -1
- package/dist/{nylas-view-thread.entry-cb057b9e.js → nylas-view-thread.entry-f302c441.js} +3 -3
- package/dist/{person-icon.entry-78cdc7f9.cjs → person-icon.entry-6b20ac42.cjs} +1 -1
- package/dist/{person-icon.entry-3e30c63c.js → person-icon.entry-8f8b928f.js} +4 -4
- package/dist/{play-icon_2.entry-71eaad5c.js → play-icon_2.entry-3aa92414.js} +6 -6
- package/dist/{play-icon_2.entry-4fb1938c.cjs → play-icon_2.entry-c8114634.cjs} +1 -1
- package/dist/react.cjs +1 -1
- package/dist/react.js +1 -1
- package/dist/{refresh-icon.entry-db85d14d.js → refresh-icon.entry-0d80c9c5.js} +4 -4
- package/dist/{refresh-icon.entry-3570353d.cjs → refresh-icon.entry-de5001c7.cjs} +1 -1
- package/dist/{register-component-b2a51b20-9a913603.cjs → register-component-b2a51b20-09664950.cjs} +1 -1
- package/dist/{register-component-b2a51b20-8a262dcf.js → register-component-b2a51b20-ea46761a.js} +1 -1
- package/dist/{scheduler-config-store-9ccfba4d-a6745ccc.js → scheduler-config-store-9ccfba4d-92cb99d1.js} +1 -1
- package/dist/{scheduler-config-store-9ccfba4d-6806e3cb.cjs → scheduler-config-store-9ccfba4d-a677e77b.cjs} +1 -1
- package/dist/{scheduler-store-db06b30a-d5e6b6c3.cjs → scheduler-store-db06b30a-08429fc9.cjs} +1 -1
- package/dist/{scheduler-store-db06b30a-1e63b67f.js → scheduler-store-db06b30a-cee61c58.js} +1 -1
- package/dist/{textarea-component.entry-be870b8f.cjs → textarea-component.entry-670f72a7.cjs} +1 -1
- package/dist/{textarea-component.entry-f5f402a1.js → textarea-component.entry-c2d1900c.js} +4 -4
- package/dist/{time-period-selector.entry-fc7d61c6.cjs → time-period-selector.entry-3ccfc000.cjs} +1 -1
- package/dist/{time-period-selector.entry-d1a8470b.js → time-period-selector.entry-a03b1ce1.js} +6 -6
- package/dist/{translate-icon.entry-b91a0449.js → translate-icon.entry-8a2878ba.js} +4 -4
- package/dist/{translate-icon.entry-3ae0ddae.cjs → translate-icon.entry-b483f6b3.cjs} +1 -1
- package/dist/{warning-icon.entry-acdc811b.js → warning-icon.entry-68b3f25e.js} +7 -7
- package/dist/{warning-icon.entry-54127f45.cjs → warning-icon.entry-784f7818.cjs} +1 -1
- package/package.json +3 -3
- package/dist/arrow-icon.entry-19f00716.js +0 -15
- 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/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
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { r as v, c as
|
|
2
|
-
import { R as w } from "./register-component-b2a51b20-
|
|
3
|
-
import { T as E, L as J, g as be, a as U } from "./constants-67de2eec-
|
|
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-5da0aff3.js";
|
|
2
|
+
import { R as w } from "./register-component-b2a51b20-ea46761a.js";
|
|
3
|
+
import { T as E, L as J, g as be, a as U } from "./constants-67de2eec-31cbc722.js";
|
|
4
|
+
import { s as S } from "./index-6d9eeb53-f37ff819.js";
|
|
5
|
+
import "./index-53420959-b26d1293.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: "ffa41614915a34d864868b89798dda71162d5c41", variant: "primary", class: "book", part: "nbf__button-primary", type: "submit" }, this.isLoading && a("loading-icon", { slot: "icon" }), a("slot", { key: "cd2d5e03fe06a073ab9e9c6d404f854149b1de63", 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,8 +348,8 @@ 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) => {
|
|
@@ -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: "fac967312e7bf8244790ac475078ba3274dbf374", part: "ncec" }, a("sp-theme", { key: "0d1e0d011f2660e7b741698b8471add378c72cef", theme: "spectrum", scale: "medium" }, a("div", { key: "4fa58bdcaf7d1a95da265eed94484fe67507578f", class: "nylas-cancel-booking-form", part: "ncec__card" }, a("div", { key: "5f00ac9dd2d46399888bf259bd37116f89c6553c", class: "nylas-cancel-booking-form__calendar-icon", part: "ncec__icon" }, a("calendar-cancel-icon", { key: "8316d0b1c2b5eade6853c8ebdf4941e569eeb847" })), a("h3", { key: "30d8fc1c63746263319d80244abedb157b189d2b", class: "nylas-cancel-booking-form__title", part: "ncec__title" }, l.t("cancelBookingTitle")), a("div", { key: "09c8c465ee3aa8de2bda3471469088f516506a04", 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: "c4a8a2ef36a7fbfc9b74ac041516b0bb32ddd8eb", onSubmit: this.handleSubmitCancelBooking }, a("sp-field-label", { key: "64650888d1ef21608ffd676cc627919c30a4ae95", for: "cancel-reason", class: this.cancellationError ? "error" : "" }, l.t("reasonForCancellation"), " ", a("span", { key: "b8e801cbdf08b8e5786958514bc316cd3f5a00d5", class: "required" }, "*")), a("sp-textfield", { key: "ef32a4dca00f42930bbf8fe95b09a8f1662c86f9", 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: "730649bf078c88796d8defd8b4fd664404e28d64", slot: "negative-help-text" }, this.cancellationError)), a("sp-button", { key: "9f4225fdf4808501be4521b78f6cc00a7f3bf06d", variant: "primary", class: "cancel", type: "submit", part: "ncec__button-cta" }, l.t("cancelBookingButton")), a("sp-button", { key: "5eded5210d04ca74746ffa1f2230b78edc2daa29", 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 {
|
|
@@ -417,7 +417,7 @@ var _e = function(e, t, i, o) {
|
|
|
417
417
|
};
|
|
418
418
|
const te = class {
|
|
419
419
|
constructor(e) {
|
|
420
|
-
v(this, e), this.closeCancelEventCardClicked =
|
|
420
|
+
v(this, e), this.closeCancelEventCardClicked = u(this, "closeCancelEventCardClicked", 7), this.cancelledEventCardError = u(this, "cancelledEventCardError", 7), this.handleCloseClicked = () => {
|
|
421
421
|
this.isClosing = !0;
|
|
422
422
|
const t = (i) => {
|
|
423
423
|
this.cancelledEventCardError.emit(i), this.isClosing = !1;
|
|
@@ -439,7 +439,7 @@ const te = class {
|
|
|
439
439
|
}
|
|
440
440
|
render() {
|
|
441
441
|
var e, t;
|
|
442
|
-
return a(
|
|
442
|
+
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
443
|
}
|
|
444
444
|
};
|
|
445
445
|
_e([
|
|
@@ -468,14 +468,14 @@ function L(e, t, i, o) {
|
|
|
468
468
|
const r = s(n), c = s.ceil(n);
|
|
469
469
|
return n - r < c - n ? r : c;
|
|
470
470
|
}, s.offset = (n, r) => (t(n = /* @__PURE__ */ new Date(+n), r == null ? 1 : Math.floor(r)), n), s.range = (n, r, c) => {
|
|
471
|
-
const
|
|
471
|
+
const m = [];
|
|
472
472
|
if (n = s.ceil(n), c = c == null ? 1 : Math.floor(c), !(n < r) || !(c > 0))
|
|
473
|
-
return
|
|
474
|
-
let
|
|
473
|
+
return m;
|
|
474
|
+
let b;
|
|
475
475
|
do
|
|
476
|
-
|
|
477
|
-
while (
|
|
478
|
-
return
|
|
476
|
+
m.push(b = /* @__PURE__ */ new Date(+n)), t(n, c), e(n);
|
|
477
|
+
while (b < n && n < r);
|
|
478
|
+
return m;
|
|
479
479
|
}, s.filter = (n) => L((r) => {
|
|
480
480
|
if (r >= r)
|
|
481
481
|
for (; e(r), !n(r); )
|
|
@@ -523,7 +523,7 @@ var Be = function(e, t, i, o) {
|
|
|
523
523
|
};
|
|
524
524
|
const ne = class {
|
|
525
525
|
constructor(e) {
|
|
526
|
-
v(this, e), this.dateSelected =
|
|
526
|
+
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
527
|
}
|
|
528
528
|
configSettingsChanged(e) {
|
|
529
529
|
var s;
|
|
@@ -562,7 +562,7 @@ const ne = class {
|
|
|
562
562
|
}
|
|
563
563
|
render() {
|
|
564
564
|
var e, t, i, o, s;
|
|
565
|
-
return a(
|
|
565
|
+
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
566
|
l.t("days.sunday"),
|
|
567
567
|
l.t("days.monday"),
|
|
568
568
|
l.t("days.tuesday"),
|
|
@@ -571,14 +571,14 @@ const ne = class {
|
|
|
571
571
|
l.t("days.friday"),
|
|
572
572
|
l.t("days.saturday")
|
|
573
573
|
].map((n) => a("div", { class: "day", part: "ndp__day" }, n)), this.dates.map((n, r) => {
|
|
574
|
-
var
|
|
574
|
+
var m;
|
|
575
575
|
const c = this.isDisabled(n, this.selectableDates);
|
|
576
576
|
return this.isLoading ? a("button", { disabled: !0, class: {
|
|
577
577
|
"date day-skeleton": !0,
|
|
578
578
|
"current-month": B(n, this.month)
|
|
579
579
|
}, style: { animationDelay: `${r * 20}ms` }, part: "ndp__date" }, n.getDate()) : a("button", { class: {
|
|
580
580
|
date: !0,
|
|
581
|
-
selected: !!(this.selectedDate && C(n, this.selectedDate) && this.selectableDates && ((
|
|
581
|
+
selected: !!(this.selectedDate && C(n, this.selectedDate) && this.selectableDates && ((m = this.selectableDates) == null ? void 0 : m.length) > 0),
|
|
582
582
|
"current-day": C(n, /* @__PURE__ */ new Date()),
|
|
583
583
|
"current-month": B(n, this.month)
|
|
584
584
|
}, "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 +629,7 @@ var Ie = function(e, t, i, o) {
|
|
|
629
629
|
};
|
|
630
630
|
const ie = class {
|
|
631
631
|
constructor(e) {
|
|
632
|
-
v(this, e), this.timezoneChanged =
|
|
632
|
+
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
633
|
}
|
|
634
634
|
connectedCallback() {
|
|
635
635
|
}
|
|
@@ -669,7 +669,7 @@ const ie = class {
|
|
|
669
669
|
label: U[i],
|
|
670
670
|
value: i
|
|
671
671
|
}));
|
|
672
|
-
return a(
|
|
672
|
+
return a(g, { key: "8f8d20420b4bc34e48cd48b2f78f66bc01bae8f8" }, a("div", { key: "bb24d8978ae671cac3b063ace059da9932e638cd", class: "nylas-locale-switch" }, a("div", { key: "4c93f5c209c64e573f1eebdef7c6a9dea1049a08", class: {
|
|
673
673
|
"select-wrapper": !0,
|
|
674
674
|
timezone: !0
|
|
675
675
|
} }, 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 +705,7 @@ const Re = ".sc-nylas-logo-h{display:flex}", Fe = Re, Pe = class {
|
|
|
705
705
|
v(this, e), this.width = "69", this.height = "24";
|
|
706
706
|
}
|
|
707
707
|
render() {
|
|
708
|
-
return a("svg", { key: "
|
|
708
|
+
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
709
|
}
|
|
710
710
|
};
|
|
711
711
|
Pe.style = Fe;
|
|
@@ -763,7 +763,7 @@ const Me = ':host{display:block;margin-bottom:-12px;width:100%;z-index:1;--nylas
|
|
|
763
763
|
this.notifications = this.notifications.filter((t) => t.id !== e);
|
|
764
764
|
}
|
|
765
765
|
render() {
|
|
766
|
-
return a(
|
|
766
|
+
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
767
|
}
|
|
768
768
|
get host() {
|
|
769
769
|
return X(this);
|
|
@@ -802,7 +802,7 @@ const oe = class {
|
|
|
802
802
|
}
|
|
803
803
|
render() {
|
|
804
804
|
var e;
|
|
805
|
-
return a(
|
|
805
|
+
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
806
|
}
|
|
807
807
|
static get watchers() {
|
|
808
808
|
return {
|
|
@@ -842,7 +842,7 @@ var Ze = function(e, t, i, o) {
|
|
|
842
842
|
};
|
|
843
843
|
const se = class {
|
|
844
844
|
constructor(e) {
|
|
845
|
-
v(this, e), this.timeslotSelected =
|
|
845
|
+
v(this, e), this.timeslotSelected = u(this, "timeslotSelected", 7), this.timeslotConfirmed = u(this, "timeslotConfirmed", 7), this.handleConfirmedTimeslot = async (t, i) => {
|
|
846
846
|
t.preventDefault(), d("[nylas-timeslot-picker] Confirm timeslot", i), this.timeslotConfirmed.emit(i);
|
|
847
847
|
}, this.handleMouseEnter = (t) => {
|
|
848
848
|
this.hoveredTimeslotIndex = t;
|
|
@@ -897,13 +897,13 @@ const se = class {
|
|
|
897
897
|
return `${t.format(e.start_time)} - ${t.format(e.end_time)}`;
|
|
898
898
|
}
|
|
899
899
|
render() {
|
|
900
|
-
return this.isLoading ? a(
|
|
900
|
+
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
901
|
var i, o, s, n;
|
|
902
902
|
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
903
|
time: !0,
|
|
904
904
|
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
905
|
}, 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(
|
|
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(g, null);
|
|
907
907
|
}
|
|
908
908
|
static get watchers() {
|
|
909
909
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-26f8bbeb.cjs"),b=require("./register-component-b2a51b20-09664950.cjs");require("react");require("react-dom");const g=':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;width:inherit}.nylas-custom-booking-flow{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200)}.nylas-custom-booking-flow .header{padding:1rem;border-bottom:1px solid var(--nylas-base-200)}.nylas-custom-booking-flow .header h3{margin:0;font-size:1rem;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-custom-booking-flow .header p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.nylas-custom-booking-flow .nylas-custom-booking-flow__loading{padding-bottom:1rem}.nylas-custom-booking-flow .nylas-custom-booking-flow__loading .label{display:flex;align-items:center;gap:0.5rem;margin:1rem 1rem 0;color:var(--nylas-base-800)}.nylas-custom-booking-flow .nylas-custom-booking-flow__loading .loading-button{margin:0 1rem;padding:0;width:inherit;height:48px;color:black;font-size:1rem;cursor:not-allowed;display:flex;gap:0.5rem;justify-content:space-between;align-items:center;background:transparent;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}.nylas-custom-booking-flow .nylas-custom-booking-flow__loading .loading-button span{padding:0 1rem}.nylas-custom-booking-flow .nylas-custom-booking-flow__dropdown{padding:1rem}.nylas-custom-booking-flow .nylas-custom-booking-flow__dropdown span.label{display:flex;align-items:center;gap:4px;color:var(--nylas-base-800)}.nylas-custom-booking-flow .nylas-custom-booking-flow__dropdown span.label tooltip-component{display:flex}.nylas-custom-booking-flow .nylas-custom-booking-flow__dropdown select-dropdown::part(sd_dropdown){width:100%}.nylas-custom-booking-flow .nylas-custom-booking-flow__dropdown select-dropdown::part(sd_dropdown-button){width:100%;display:flex;justify-content:space-between;align-items:center;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);padding:1rem}.nylas-custom-booking-flow .nylas-custom-booking-flow__dropdown select-dropdown::part(sd_dropdown-content){width:100%;max-width:unset}.nylas-custom-booking-flow .nylas-custom-booking-flow__dropdown select-dropdown::part(sd_dropdown-button-selected-label){max-width:calc(100% - 2rem);font-family:var(--nylas-font-family);font-size:16px;line-height:24px}',f=g;var m=function(o,n,t,a){var l=arguments.length,s=l<3?n:a===null?a=Object.getOwnPropertyDescriptor(n,t):a,i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,n,t,a);else for(var r=o.length-1;r>=0;r--)(i=o[r])&&(s=(l<3?i(s):l>3?i(n,t,s):i(n,t))||s);return l>3&&s&&Object.defineProperty(n,t,s),s},d=function(o,n){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(o,n)};const c=class{constructor(o){e.registerInstance(this,o),this.valueChanged=e.createEvent(this,"valueChanged",7),o.$hostElement$["s-ei"]?this.internals=o.$hostElement$["s-ei"]:(this.internals=o.$hostElement$.attachInternals(),o.$hostElement$["s-ei"]=this.internals),this.selectedConfiguration=void 0,this.name="booking-type",this.bookingType="",this.selectedBookingType=""}elementNameChangedHandler(o){e.debug("nylas-custom-booking-flow","elementNameChangedHandler",o),this.host.setAttribute("name",o)}selectedConfigurationChangedHandler(o,n){var t,a;e.debug("nylas-custom-booking-flow","selectedConfigurationChangedHandler",o,n),(t=o==null?void 0:o.event_booking)!=null&&t.booking_type&&(this.bookingType=(a=o==null?void 0:o.event_booking)==null?void 0:a.booking_type),typeof this.internals.setFormValue=="function"&&this.internals.setFormValue(this.bookingType.toString(),this.name),this.selectedBookingType=this.bookingType}connectedCallback(){e.debug("nylas-custom-booking-flow","connectedCallback")}disconnectedCallback(){e.debug("nylas-custom-booking-flow","disconnectedCallback")}componentWillLoad(){e.debug("nylas-custom-booking-flow","componentWillLoad"),this.host.setAttribute("name",this.name)}componentDidLoad(){e.debug("nylas-custom-booking-flow","componentDidLoad")}componentWillUpdate(){e.debug("nylas-custom-booking-flow","componentWillUpdate")}componentDidUpdate(){e.debug("nylas-custom-booking-flow","componentDidUpdate")}componentWillRender(){e.debug("nylas-custom-booking-flow","componentWillRender")}componentDidRender(){e.debug("nylas-custom-booking-flow","componentDidRender")}nylasFormDropdownChangedHandler(o){e.debug("nylas-custom-booking-flow","nylasFormDropdownChangedHandler",o.detail);const n=t=>{const{value:a}=t.detail;this.selectedBookingType=a,this.internals.setFormValue(a.toString(),this.name)};this.valueChanged.emit({...o.detail,valueChanged:n})}render(){const o=[{label:"Automatically accept bookings",value:"booking"},{label:"Manually confirm/decline bookings",value:"pre-booking"}];return e.h(e.Host,{key:"79853eb2437caf39c59f82c936165234331b1348"},e.h("div",{key:"81abe8d086f8889f8d5450562a6a2bbb07308857",class:"nylas-custom-booking-flow",part:"ncbf"},e.h("div",{key:"9cbe5505ba1ab47170f2016e8949bc0a626332bc",class:"header",part:"ncbf__header"},e.h("h3",{key:"bc7c5a49d01b5edd4a162cbc980234ffa67146ea"},"Customize booking flow"),e.h("p",{key:"42e7fe230baca52029fc3f240fd5d54368000a2f"},"Customize how new bookings are handled when a booking is completed.")),o.length>0&&e.h("div",{class:"nylas-custom-booking-flow__dropdown"},e.h("span",{class:"label"},"After a booking is confirmed",e.h("tooltip-component",null,e.h("info-icon",{slot:"tooltip-icon"}),e.h("span",{slot:"tooltip-content"},"Choose how you’d like to handle new bookings. If you choose to manually confirm/decline bookings, you will be able to review and accept or decline each booking request."))),e.h("select-dropdown",{name:"booking-type",options:o,withSearch:!1,exportparts:"sd_dropdown: ncbf__dropdown, sd_dropdown-button: ncbf__dropdown-button, sd_dropdown-content: ncbf__dropdown-content",defaultSelectedOption:o.find(n=>n.value==this.bookingType)??o[0]}))))}static get formAssociated(){return!0}get host(){return e.getElement(this)}static get watchers(){return{name:["elementNameChangedHandler"],selectedConfiguration:["selectedConfigurationChangedHandler"]}}};m([b.RegisterComponent({name:"nylas-custom-booking-flow",stateToProps:new Map([["schedulerConfig.selectedConfiguration","selectedConfiguration"]]),eventToProps:{valueChanged:async(o,n)=>{const{valueChanged:t}=o.detail;t&&t(o)}},fireRegisterEvent:!0}),d("design:type",Function),d("design:paramtypes",[]),d("design:returntype",void 0)],c.prototype,"render",null);c.style=f;exports.nylas_custom_booking_flow=c;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { r as f, c as m, d as t, h as a, H as g, g as p } from "./index-
|
|
2
|
-
import { R as y } from "./register-component-b2a51b20-
|
|
1
|
+
import { r as f, c as m, d as t, h as a, H as g, g as p } from "./index-5da0aff3.js";
|
|
2
|
+
import { R as y } from "./register-component-b2a51b20-ea46761a.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "react-dom";
|
|
5
5
|
const u = ':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;width:inherit}.nylas-custom-booking-flow{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200)}.nylas-custom-booking-flow .header{padding:1rem;border-bottom:1px solid var(--nylas-base-200)}.nylas-custom-booking-flow .header h3{margin:0;font-size:1rem;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-custom-booking-flow .header p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.nylas-custom-booking-flow .nylas-custom-booking-flow__loading{padding-bottom:1rem}.nylas-custom-booking-flow .nylas-custom-booking-flow__loading .label{display:flex;align-items:center;gap:0.5rem;margin:1rem 1rem 0;color:var(--nylas-base-800)}.nylas-custom-booking-flow .nylas-custom-booking-flow__loading .loading-button{margin:0 1rem;padding:0;width:inherit;height:48px;color:black;font-size:1rem;cursor:not-allowed;display:flex;gap:0.5rem;justify-content:space-between;align-items:center;background:transparent;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}.nylas-custom-booking-flow .nylas-custom-booking-flow__loading .loading-button span{padding:0 1rem}.nylas-custom-booking-flow .nylas-custom-booking-flow__dropdown{padding:1rem}.nylas-custom-booking-flow .nylas-custom-booking-flow__dropdown span.label{display:flex;align-items:center;gap:4px;color:var(--nylas-base-800)}.nylas-custom-booking-flow .nylas-custom-booking-flow__dropdown span.label tooltip-component{display:flex}.nylas-custom-booking-flow .nylas-custom-booking-flow__dropdown select-dropdown::part(sd_dropdown){width:100%}.nylas-custom-booking-flow .nylas-custom-booking-flow__dropdown select-dropdown::part(sd_dropdown-button){width:100%;display:flex;justify-content:space-between;align-items:center;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);padding:1rem}.nylas-custom-booking-flow .nylas-custom-booking-flow__dropdown select-dropdown::part(sd_dropdown-content){width:100%;max-width:unset}.nylas-custom-booking-flow .nylas-custom-booking-flow__dropdown select-dropdown::part(sd_dropdown-button-selected-label){max-width:calc(100% - 2rem);font-family:var(--nylas-font-family);font-size:16px;line-height:24px}', h = u;
|
|
6
6
|
var w = function(o, n, e, s) {
|
|
7
|
-
var i = arguments.length, l = i < 3 ? n : s === null ? s = Object.getOwnPropertyDescriptor(n, e) : s,
|
|
7
|
+
var i = arguments.length, l = i < 3 ? n : s === null ? s = Object.getOwnPropertyDescriptor(n, e) : s, r;
|
|
8
8
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
9
9
|
l = Reflect.decorate(o, n, e, s);
|
|
10
10
|
else
|
|
11
|
-
for (var
|
|
12
|
-
(
|
|
11
|
+
for (var d = o.length - 1; d >= 0; d--)
|
|
12
|
+
(r = o[d]) && (l = (i < 3 ? r(l) : i > 3 ? r(n, e, l) : r(n, e)) || l);
|
|
13
13
|
return i > 3 && l && Object.defineProperty(n, e, l), l;
|
|
14
14
|
}, c = function(o, n) {
|
|
15
15
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
@@ -69,7 +69,7 @@ const b = class {
|
|
|
69
69
|
value: "pre-booking"
|
|
70
70
|
}
|
|
71
71
|
];
|
|
72
|
-
return a(g, { key: "
|
|
72
|
+
return a(g, { key: "79853eb2437caf39c59f82c936165234331b1348" }, a("div", { key: "81abe8d086f8889f8d5450562a6a2bbb07308857", class: "nylas-custom-booking-flow", part: "ncbf" }, a("div", { key: "9cbe5505ba1ab47170f2016e8949bc0a626332bc", class: "header", part: "ncbf__header" }, a("h3", { key: "bc7c5a49d01b5edd4a162cbc980234ffa67146ea" }, "Customize booking flow"), a("p", { key: "42e7fe230baca52029fc3f240fd5d54368000a2f" }, "Customize how new bookings are handled when a booking is completed.")), o.length > 0 && a("div", { class: "nylas-custom-booking-flow__dropdown" }, a("span", { class: "label" }, "After a booking is confirmed", a("tooltip-component", null, a("info-icon", { slot: "tooltip-icon" }), a("span", { slot: "tooltip-content" }, "Choose how you’d like to handle new bookings. If you choose to manually confirm/decline bookings, you will be able to review and accept or decline each booking request."))), a("select-dropdown", { name: "booking-type", options: o, withSearch: !1, exportparts: "sd_dropdown: ncbf__dropdown, sd_dropdown-button: ncbf__dropdown-button, sd_dropdown-content: ncbf__dropdown-content", defaultSelectedOption: o.find((n) => n.value == this.bookingType) ?? o[0] }))));
|
|
73
73
|
}
|
|
74
74
|
static get formAssociated() {
|
|
75
75
|
return !0;
|