@nylas/react 1.4.4 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/dist/add-circle-icon_2.entry-8a1c55bc.cjs +1 -0
- package/dist/{add-circle-icon_2.entry-615fc101.js → add-circle-icon_2.entry-b4bbcfee.js} +3 -3
- package/dist/archive-icon.entry-a2492cf3.js +16 -0
- package/dist/archive-icon.entry-e48d2356.cjs +1 -0
- package/dist/{arrow-icon.entry-da152ec2.js → arrow-icon.entry-9414299f.js} +5 -5
- package/dist/arrow-icon.entry-b1ecb2aa.cjs +1 -0
- package/dist/{bold-icon.entry-61046c15.js → bold-icon.entry-b72aed9f.js} +4 -4
- package/dist/{bold-icon.entry-58679992.cjs → bold-icon.entry-c781e9c1.cjs} +1 -1
- package/dist/{button-component_2.entry-db53e00a.js → button-component_2.entry-36e49459.js} +9 -9
- package/dist/{button-component_2.entry-53bfdc19.cjs → button-component_2.entry-73f76545.cjs} +1 -1
- package/dist/calendar-agenda-fill-icon_36.entry-e9b92e0e.cjs +6 -0
- package/dist/{calendar-agenda-fill-icon_36.entry-76796ea7.js → calendar-agenda-fill-icon_36.entry-efa7ad26.js} +100 -100
- package/dist/{calendar-cancel-icon.entry-e5032d71.cjs → calendar-cancel-icon.entry-01c388eb.cjs} +1 -1
- package/dist/{calendar-cancel-icon.entry-f3b8ae99.js → calendar-cancel-icon.entry-0f739a8a.js} +4 -4
- package/dist/{calendar-check-icon_2.entry-7303362a.cjs → calendar-check-icon_2.entry-5febbadf.cjs} +1 -1
- package/dist/{calendar-check-icon_2.entry-27dc91f7.js → calendar-check-icon_2.entry-dfb0036d.js} +3 -3
- package/dist/{calendar-icon.entry-4f432baf.cjs → calendar-icon.entry-9743e0b7.cjs} +1 -1
- package/dist/{calendar-icon.entry-48fc45d6.js → calendar-icon.entry-f197396d.js} +2 -2
- package/dist/{checkbox-component.entry-8fad4faf.cjs → checkbox-component.entry-1aa5782f.cjs} +1 -1
- package/dist/{checkbox-component.entry-a15ffc4c.js → checkbox-component.entry-72a6aa72.js} +4 -4
- package/dist/checkmark-icon_15.entry-35dd97b7.cjs +5 -0
- package/dist/{checkmark-icon_15.entry-9f926a70.js → checkmark-icon_15.entry-5c09cff5.js} +225 -223
- package/dist/{chevron-icon_3.entry-5130fbba.js → chevron-icon_3.entry-4a72f211.js} +6 -6
- package/dist/chevron-icon_3.entry-e0608b7c.cjs +1 -0
- package/dist/{clock-icon_4.entry-40a393c9.js → clock-icon_4.entry-0afe79c2.js} +8 -8
- package/dist/{clock-icon_4.entry-ac65deae.cjs → clock-icon_4.entry-202ce025.cjs} +1 -1
- package/dist/constants-f51538ef-cd2a67c4.cjs +1 -0
- package/dist/{constants-3d8016e3-3c080f00.js → constants-f51538ef-e0a5f026.js} +27 -32
- package/dist/{customParseFormat-a4d9ea69-763f219e.cjs → customParseFormat-d1de5ed0-65a0bba3.cjs} +1 -1
- package/dist/{customParseFormat-a4d9ea69-7caebeb2.js → customParseFormat-d1de5ed0-c0ef002d.js} +1 -1
- package/dist/{delete-icon.entry-78e44eba.js → delete-icon.entry-580bfcc9.js} +4 -4
- package/dist/{delete-icon.entry-770dac8c.cjs → delete-icon.entry-762ac892.cjs} +1 -1
- package/dist/{document-refresh-icon.entry-d331f844.cjs → document-refresh-icon.entry-4e0f0c61.cjs} +1 -1
- package/dist/document-refresh-icon.entry-e500b4e3.js +16 -0
- package/dist/elements/index.d.ts +0 -8
- package/dist/{feedbackSync-57bb471a-ee800a95.js → feedbackSync-172f942c-42124493.js} +1 -1
- package/dist/{feedbackSync-57bb471a-5afb7715.cjs → feedbackSync-172f942c-62f72bd2.cjs} +1 -1
- package/dist/{folder-icon.entry-163e0aee.cjs → folder-icon.entry-2694e253.cjs} +1 -1
- package/dist/{folder-icon.entry-42650400.js → folder-icon.entry-54c3cc66.js} +2 -2
- package/dist/{forward-icon.entry-d60b6e31.js → forward-icon.entry-5e540f05.js} +5 -5
- package/dist/{forward-icon.entry-0a499b38.cjs → forward-icon.entry-f07102d8.cjs} +1 -1
- package/dist/{globe-icon_2.entry-19359092.cjs → globe-icon_2.entry-14a4c168.cjs} +1 -1
- package/dist/{globe-icon_2.entry-5afa8049.js → globe-icon_2.entry-aaceb196.js} +90 -80
- package/dist/{google-logo-icon_6.entry-d2febb78.js → google-logo-icon_6.entry-00d40db2.js} +473 -439
- package/dist/google-logo-icon_6.entry-fa76ffe3.cjs +2 -0
- package/dist/{google-meet-icon_5.entry-4a94137f.cjs → google-meet-icon_5.entry-6c20e149.cjs} +1 -1
- package/dist/{google-meet-icon_5.entry-7b1b36f2.js → google-meet-icon_5.entry-f1f05903.js} +12 -12
- package/dist/inbox-icon.entry-9a4628f2.cjs +1 -0
- package/dist/inbox-icon.entry-aa78ba8c.js +16 -0
- package/dist/index-1e75512f.cjs +57 -0
- package/dist/{index-9243e481.js → index-e8380973.js} +5687 -4802
- package/dist/{index.es-13ff6710-0f748bd2.cjs → index.es-fc8588de-034ead51.cjs} +6 -6
- package/dist/{index.es-13ff6710-73fa05e6.js → index.es-fc8588de-c943eef6.js} +827 -1065
- package/dist/{info-icon_2.entry-ba869bab.js → info-icon_2.entry-b3b313ab.js} +3 -3
- package/dist/{info-icon_2.entry-6667923a.cjs → info-icon_2.entry-bbcefb9a.cjs} +1 -1
- package/dist/{input-component.entry-7396acf1.js → input-component.entry-401b9ba5.js} +9 -9
- package/dist/{input-component.entry-db84f917.cjs → input-component.entry-ec8e8e7c.cjs} +1 -1
- package/dist/input-dropdown_2.entry-8cb11601.cjs +1 -0
- package/dist/{input-dropdown_2.entry-20f2031b.js → input-dropdown_2.entry-c37f392c.js} +6 -6
- package/dist/italic-icon.entry-0e85d0d9.js +16 -0
- package/dist/italic-icon.entry-6675558a.cjs +1 -0
- package/dist/{multi-select-dropdown_2.entry-81740b34.js → multi-select-dropdown_2.entry-3eecf18a.js} +22 -16
- package/dist/{multi-select-dropdown_2.entry-8e07b42b.cjs → multi-select-dropdown_2.entry-e37c501d.cjs} +1 -1
- package/dist/{nylas-booked-event-card_12.entry-e56c8e92.js → nylas-booked-event-card_12.entry-e7464ae7.js} +226 -224
- package/dist/nylas-booked-event-card_12.entry-fddc9ab8.cjs +1 -0
- package/dist/{nylas-event-calendar_3.entry-2504c7c0.js → nylas-event-calendar_3.entry-9abd46c2.js} +2360 -2238
- package/dist/nylas-event-calendar_3.entry-e6669bbf.cjs +11 -0
- package/dist/{nylas-form-card.entry-98903549.js → nylas-form-card.entry-a3186807.js} +3 -3
- package/dist/{nylas-form-card.entry-c406e3d3.cjs → nylas-form-card.entry-cbb00fba.cjs} +1 -1
- package/dist/nylas-scheduler-editor.entry-5c92901a.cjs +2 -0
- package/dist/{nylas-scheduler-editor.entry-670cc0b8.js → nylas-scheduler-editor.entry-7b188a38.js} +83 -50
- package/dist/nylas-scheduling.entry-970240f6.cjs +1 -0
- package/dist/nylas-scheduling.entry-e9929b03.js +968 -0
- package/dist/{person-icon.entry-bdaa899b.cjs → person-icon.entry-8998fdb8.cjs} +1 -1
- package/dist/{person-icon.entry-3bca6e51.js → person-icon.entry-d2856f08.js} +4 -4
- package/dist/{play-icon.entry-ecc86e85.cjs → play-icon.entry-99eb969b.cjs} +1 -1
- package/dist/play-icon.entry-f949a80f.js +16 -0
- package/dist/{radio-button-group.entry-9851076c.js → radio-button-group.entry-bc3b12fd.js} +2 -2
- package/dist/{radio-button-group.entry-6965ad34.cjs → radio-button-group.entry-d66edd04.cjs} +1 -1
- package/dist/react.cjs +1 -1
- package/dist/react.js +96 -104
- package/dist/{refresh-icon.entry-90d52ab3.cjs → refresh-icon.entry-99d1982d.cjs} +1 -1
- package/dist/{refresh-icon.entry-d776c4a7.js → refresh-icon.entry-d6df8b1c.js} +2 -2
- package/dist/{register-component-02a05665-2e992621.js → register-component-62d792d4-448b6a43.js} +1 -1
- package/dist/{register-component-02a05665-75652287.cjs → register-component-62d792d4-c6e7d129.cjs} +1 -1
- package/dist/{reply-all-icon.entry-24f7c0fe.js → reply-all-icon.entry-7ebf01a0.js} +2 -2
- package/dist/{reply-all-icon.entry-6e49eb03.cjs → reply-all-icon.entry-d7c44139.cjs} +1 -1
- package/dist/{reply-icon.entry-7fff25c9.cjs → reply-icon.entry-058c00e8.cjs} +1 -1
- package/dist/{reply-icon.entry-d5d26d65.js → reply-icon.entry-d1622d85.js} +5 -5
- package/dist/sent-icon.entry-6c604512.cjs +1 -0
- package/dist/sent-icon.entry-fe12bc2f.js +16 -0
- package/dist/spam-icon.entry-45e5292e.cjs +1 -0
- package/dist/spam-icon.entry-b97c7709.js +16 -0
- package/dist/{star-icon.entry-3c57a35c.cjs → star-icon.entry-4db13fdb.cjs} +1 -1
- package/dist/{star-icon.entry-c2e743a9.js → star-icon.entry-98b80645.js} +6 -6
- package/dist/{stop-icon.entry-0b9563d5.js → stop-icon.entry-0290fd30.js} +2 -2
- package/dist/{stop-icon.entry-cf4c4e63.cjs → stop-icon.entry-9d7b53fd.cjs} +1 -1
- package/dist/{textarea-component.entry-2eccc173.cjs → textarea-component.entry-9b474ab5.cjs} +1 -1
- package/dist/{textarea-component.entry-60e7a4d0.js → textarea-component.entry-a62c257b.js} +2 -2
- package/dist/{toggle-switch.entry-612744fd.cjs → toggle-switch.entry-5dbfcd48.cjs} +1 -1
- package/dist/{toggle-switch.entry-0a6b01e6.js → toggle-switch.entry-e423b793.js} +2 -2
- package/dist/{translate-icon.entry-ede5f77d.js → translate-icon.entry-60c55a2e.js} +4 -4
- package/dist/{translate-icon.entry-8adc4146.cjs → translate-icon.entry-f82fa6fc.cjs} +1 -1
- package/dist/trash-fill-icon.entry-095caae3.cjs +1 -0
- package/dist/trash-fill-icon.entry-825055fd.js +16 -0
- package/dist/{underline-icon.entry-d2fe2da6.cjs → underline-icon.entry-0807a43d.cjs} +1 -1
- package/dist/{underline-icon.entry-b2b43ba2.js → underline-icon.entry-40028bc6.js} +2 -2
- package/dist/{warning-icon.entry-0a5c7337.js → warning-icon.entry-24e37759.js} +2 -2
- package/dist/{warning-icon.entry-85822f4d.cjs → warning-icon.entry-fce7c14f.cjs} +1 -1
- package/package.json +2 -2
- package/dist/add-circle-icon_2.entry-e616ece6.cjs +0 -1
- package/dist/archive-icon.entry-41938a61.cjs +0 -1
- package/dist/archive-icon.entry-bd81d2d9.js +0 -16
- package/dist/arrow-icon.entry-4103be57.cjs +0 -1
- package/dist/calendar-agenda-fill-icon_36.entry-917e4a9d.cjs +0 -6
- package/dist/checkmark-icon_15.entry-08c8b107.cjs +0 -5
- package/dist/chevron-icon_3.entry-2f75c3c4.cjs +0 -1
- package/dist/constants-3d8016e3-fd6c3848.cjs +0 -1
- package/dist/document-refresh-icon.entry-f6dfe744.js +0 -16
- package/dist/google-logo-icon_6.entry-896a10a5.cjs +0 -2
- package/dist/inbox-icon.entry-24ec450f.cjs +0 -1
- package/dist/inbox-icon.entry-b71acde0.js +0 -16
- package/dist/index-efb6db79.cjs +0 -57
- package/dist/input-dropdown_2.entry-0c219620.cjs +0 -1
- package/dist/italic-icon.entry-a9324a8a.cjs +0 -1
- package/dist/italic-icon.entry-c42f8112.js +0 -16
- package/dist/notebook-store-b61693cd-5657061b.js +0 -14
- package/dist/notebook-store-b61693cd-6515d345.cjs +0 -5
- package/dist/nylas-booked-event-card_12.entry-7c7afae5.cjs +0 -1
- package/dist/nylas-call-summary.entry-4bf7284f.cjs +0 -1
- package/dist/nylas-call-summary.entry-ad6fb46a.js +0 -16
- package/dist/nylas-event-calendar_3.entry-f747f6a8.cjs +0 -6
- package/dist/nylas-if-state.entry-6b071705.cjs +0 -1
- package/dist/nylas-if-state.entry-7468854a.js +0 -95
- package/dist/nylas-key-points.entry-7af8da1a.cjs +0 -1
- package/dist/nylas-key-points.entry-c186445e.js +0 -29
- package/dist/nylas-login.entry-171bd025.cjs +0 -1
- package/dist/nylas-login.entry-d85c1473.js +0 -74
- package/dist/nylas-provider.entry-ab1f6886.js +0 -265
- package/dist/nylas-provider.entry-e4231b93.cjs +0 -1
- package/dist/nylas-scheduler-editor.entry-d522ca98.cjs +0 -2
- package/dist/nylas-scheduling.entry-9e81c6fc.js +0 -439
- package/dist/nylas-scheduling.entry-c52edb14.cjs +0 -1
- package/dist/nylas-transcript.entry-a1fa7e17.cjs +0 -6
- package/dist/nylas-transcript.entry-fb39b5af.js +0 -128
- package/dist/nylas-video-player.entry-25e8cd9a.js +0 -39
- package/dist/nylas-video-player.entry-89842545.cjs +0 -1
- package/dist/nylas-video-preview.entry-28a0bd60.cjs +0 -1
- package/dist/nylas-video-preview.entry-80171531.js +0 -16
- package/dist/play-icon.entry-d548464e.js +0 -16
- package/dist/scheduler-config-store-d6729d8d-50920e8c.js +0 -29
- package/dist/scheduler-config-store-d6729d8d-a0bdda83.cjs +0 -1
- package/dist/scheduler-store-fe9e85a4-1dcfddfa.js +0 -533
- package/dist/scheduler-store-fe9e85a4-baabf78a.cjs +0 -1
- package/dist/sent-icon.entry-42ce5bcb.cjs +0 -1
- package/dist/sent-icon.entry-858fe83e.js +0 -16
- package/dist/spam-icon.entry-0827144e.js +0 -16
- package/dist/spam-icon.entry-bf1a48b6.cjs +0 -1
- package/dist/trash-fill-icon.entry-b6456ec8.cjs +0 -1
- package/dist/trash-fill-icon.entry-d48f72c5.js +0 -16
|
@@ -1,439 +0,0 @@
|
|
|
1
|
-
import { i as u, r as Q, c as w, d as P, k as E, l as X, m as Z, h as n, H as C, g as V, F as ee } from "./index-9243e481.js";
|
|
2
|
-
import { n as T, N as te } from "./index.es-13ff6710-73fa05e6.js";
|
|
3
|
-
import { E as R, C as ne, N as ie } from "./scheduler-store-fe9e85a4-1dcfddfa.js";
|
|
4
|
-
import { L as oe } from "./constants-3d8016e3-3c080f00.js";
|
|
5
|
-
import { i as se, a as ae, c as re, b as le, f as de } from "./feedbackSync-57bb471a-ee800a95.js";
|
|
6
|
-
import "react";
|
|
7
|
-
import "react/jsx-runtime";
|
|
8
|
-
import "react-dom";
|
|
9
|
-
class ce {
|
|
10
|
-
constructor({ schedulerAPIURL: e, nylasSchedulerStore: i, sessionId: a, configId: s, slug: r, clientId: l }) {
|
|
11
|
-
if (!e)
|
|
12
|
-
throw new Error("schedulerAPIURL is required");
|
|
13
|
-
if (!i)
|
|
14
|
-
throw new Error("nylasSchedulerStore is required");
|
|
15
|
-
if (!a && !s && !(r || l))
|
|
16
|
-
throw new Error("sessionId is required for private configs. If using public config either pass a configurationId or a combination of slug and clientId.");
|
|
17
|
-
e === "/" && (e = new URL(window.location.href).origin), this.configId = s, this.sessionId = a, this.schedulerAPIURL = e, this.nylasSchedulerStore = i, this.slug = r, this.clientId = l;
|
|
18
|
-
}
|
|
19
|
-
init() {
|
|
20
|
-
P("NylasConnector init");
|
|
21
|
-
}
|
|
22
|
-
get schedulerStore() {
|
|
23
|
-
return this.nylasSchedulerStore;
|
|
24
|
-
}
|
|
25
|
-
get scheduler() {
|
|
26
|
-
return this._schedulerAPIConnector ? this._schedulerAPIConnector : (this._schedulerAPIConnector = new ie({
|
|
27
|
-
schedulerAPIURL: this.schedulerAPIURL,
|
|
28
|
-
schedulerStore: this.schedulerStore,
|
|
29
|
-
sessionId: this.sessionId,
|
|
30
|
-
configId: this.configId,
|
|
31
|
-
slug: this.slug,
|
|
32
|
-
clientId: this.clientId
|
|
33
|
-
}), this._schedulerAPIConnector);
|
|
34
|
-
}
|
|
35
|
-
resetStores() {
|
|
36
|
-
this.nylasSchedulerStore.reset();
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
const x = (t, e) => {
|
|
40
|
-
const i = t.isLoading, a = t.showNotification, s = t.nylasBranding;
|
|
41
|
-
return n(
|
|
42
|
-
ee,
|
|
43
|
-
null,
|
|
44
|
-
a && n("nylas-notification", null),
|
|
45
|
-
i && n(
|
|
46
|
-
"div",
|
|
47
|
-
{ class: "loading" },
|
|
48
|
-
n(
|
|
49
|
-
"div",
|
|
50
|
-
{ class: "left" },
|
|
51
|
-
n("div", { class: "skeleton" })
|
|
52
|
-
),
|
|
53
|
-
n(
|
|
54
|
-
"div",
|
|
55
|
-
{ class: "right" },
|
|
56
|
-
n("div", { class: "skeleton" }),
|
|
57
|
-
n("div", { class: "skeleton" }),
|
|
58
|
-
n("div", { class: "skeleton" }),
|
|
59
|
-
n("div", { class: "skeleton" }),
|
|
60
|
-
n("div", { class: "skeleton" })
|
|
61
|
-
)
|
|
62
|
-
),
|
|
63
|
-
!i && e,
|
|
64
|
-
n("div", { class: "footer" }, s && n(
|
|
65
|
-
"a",
|
|
66
|
-
{ href: "https://scheduler.nylas.com?utm_source=powered-by-nylas-logoutm_medium=link&utm_campaign=get-scheduler&utm_id=get-scheduler", class: "powered-by-nylas", target: "_blank", rel: "noreferrer noopener" },
|
|
67
|
-
"Powered by ",
|
|
68
|
-
n("span", { class: "sr-only" }, "Nylas"),
|
|
69
|
-
n("nylas-logo", { "aria-hidden": !0 })
|
|
70
|
-
))
|
|
71
|
-
);
|
|
72
|
-
}, Y = (t, e) => n("div", { class: "message-banner" }, e), he = ':host{display:flex;flex-direction:column;overflow:visible;border-radius:var(--nylas-border-radius-2x);width:fit-content;background:var(--nylas-base-0);position:relative;box-shadow:0px 4px 8px 2px rgba(0, 0, 0, 0.05), 0px 8px 16px -2px rgba(0, 0, 0, 0.1);--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff;font-family:var(--nylas-font-family);font-optical-sizing:auto;font-style:normal;font-variation-settings:"slnt" 0}@media screen and (max-width: 768px){:host{width:auto;min-width:325px}}:root{font-family:inherit}.error{padding:8rem 12rem;color:var(--nylas-base-0);background-color:var(--nylas-error);margin:1.5rem;border-radius:var(--nylas-border-radius-2x)}.message-banner{text-align:right;color:var(--nylas-base-800);padding:1rem;border-bottom:1px solid var(--nylas-color-primary-200);margin:0}.loading{margin:1.5rem;display:flex;gap:1rem}.loading .skeleton{border-radius:var(--nylas-border-radius-2x);animation:pulsate 1.5s infinite}.loading .skeleton:nth-child(2){animation-delay:-100ms}.loading .skeleton:nth-child(3){animation-delay:-200ms}.loading .skeleton:nth-child(4){animation-delay:-300ms}.loading .skeleton:nth-child(5){animation-delay:-400ms}.loading .left .skeleton{height:100%;width:400px}.loading .right .skeleton{height:5rem;width:300px;margin-bottom:1rem}.loading .right .skeleton:last-child{margin-bottom:0}@keyframes pulsate{0%{background-color:var(--nylas-base-50)}50%{background-color:var(--nylas-base-100)}100%{background-color:var(--nylas-base-50)}}.select-date-page,.additional-data-page,.booked-event-page,.manual-confirmation-page,.cancelled-event-page,.cancel-flow-page{border-top-left-radius:var(--nylas-border-radius-2x);border-top-right-radius:var(--nylas-border-radius-2x)}.select-date-page,.additional-data-page{display:flex}@media screen and (max-width: 768px){.select-date-page,.additional-data-page{flex-direction:column}}.booked-event-page,.manual-confirmation-page{background-color:var(--nylas-base-50)}.cancelled-event-page,.manual-confirmation-page,.cancel-flow-page{padding:1rem;height:496px;display:flex;justify-content:center;align-items:center}.booked-event-page,.manual-confirmation-page,.cancelled-event-page,.cancel-flow-page{min-width:784px;background:var(--nylas-base-50)}@media screen and (max-width: 768px){.booked-event-page,.manual-confirmation-page,.cancelled-event-page,.cancel-flow-page{min-width:90%}}.left-panel{display:flex;flex-direction:column;min-width:424px;border-top-left-radius:inherit;background:var(--nylas-base-0);position:relative;padding:1rem 0 0 0;height:624px}@media screen and (max-width: 768px){.left-panel{border-top-right-radius:inherit;min-width:unset;height:auto}}@media screen and (max-width: 768px){.select-date-page .left-panel{height:624px}}.border{margin-left:-20px;margin-right:-20px;border-top-width:1px;height:0.5px;background-color:var(--nylas-base-200)}@media screen and (max-width: 768px){.border{display:none}}.right-panel{min-width:360px;width:360px;background-color:var(--nylas-base-50);height:624px;padding-top:16px;border-left:1px solid var(--nylas-base-200);border-top-right-radius:inherit}.right-panel.reschedule{border-top-right-radius:0px}@media screen and (max-width: 768px){.right-panel{border-top-right-radius:0px;width:inherit;min-width:unset;height:auto;border-left:none}}.right-panel h2{display:flex;margin:0;height:48px;gap:0.5rem;justify-content:center;align-items:center;width:auto;font-size:1.125rem;line-height:1.5rem;font-weight:500;text-align:center;color:var(--nylas-base-800)}.additional-data-page .left-panel{background-color:var(--nylas-base-50)}.additional-data-page .right-panel{background-color:var(--nylas-base-0)}nylas-selected-event-card{height:604px;padding:0 1rem}@media screen and (max-width: 768px){nylas-selected-event-card{height:250px}}.footer{display:flex;justify-content:flex-end;align-items:center;padding:16px;font-size:14px;font-weight:300;color:var(--nylas-base-500);border-top:1px solid var(--nylas-base-200);min-height:24px}.footer .powered-by-nylas{display:flex;align-items:center;text-decoration:none;color:var(--nylas-base-500)}.footer .powered-by-nylas:hover{color:var(--nylas-base-800)}.footer svg{fill:var(--nylas-base-500)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}.footer svg{margin-top:1px}nylas-selected-event-card::part(nsec__timezone){position:absolute;bottom:0}nylas-notification{margin:1.5rem;width:-webkit-fill-available;width:-moz-available;position:absolute}nylas-locale-switch{position:absolute;padding:18px 20px;bottom:0;width:-webkit-fill-available;width:-moz-available;border-top:1px solid var(--nylas-base-200)}@media screen and (max-width: 768px){nylas-locale-switch{height:auto}}nylas-date-picker{padding:0 20px}button-component#report-issue{width:auto;position:absolute;bottom:4px;left:16px}nylas-feedback-form{position:absolute;top:0;height:100%;width:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;background:rgba(0, 0, 0, 0.6);z-index:2;border-radius:inherit}', ge = he, J = { title: u.t("genericErrorTitle"), type: T.Error, category: R.Component }, fe = class {
|
|
73
|
-
constructor(t) {
|
|
74
|
-
Q(this, t), this.init = w(this, "init", 7), this.schedulerWillLoad = w(this, "schedulerWillLoad", 7), this.schedulerDidLoad = w(this, "schedulerDidLoad", 7), this.nylasSchedulerError = w(this, "nylasSchedulerError", 7), this.nylasSchedulerInfo = w(this, "nylasSchedulerInfo", 7), this.configSettingsLoaded = w(this, "configSettingsLoaded", 7), this.bookingRefExtracted = w(this, "bookingRefExtracted", 7), this.bookedEventInfo = w(this, "bookedEventInfo", 7), this.mode = "app", this.defaultSchedulerState = void 0, this.sessionId = void 0, this.schedulerApiUrl = "https://api.us.nylas.com", this.bookingInfo = void 0, this.rescheduleBookingRef = void 0, this.cancelBookingRef = void 0, this.organizerConfirmationBookingRef = void 0, this.configurationId = void 0, this.slug = void 0, this.clientId = void 0, this.nylasBranding = !0, this.eventOverrides = {}, this.isLoading = void 0, this.themeConfig = void 0, this.localization = void 0, this.showNotification = !0, this.enableUserFeedback = !0, this.hour12 = void 0, this.automaticComponentRegistration = !0, this.selectedDateLabel = (/* @__PURE__ */ new Date()).toLocaleDateString(navigator.language, { dateStyle: "full" }) || `${u.t("noDateSelected")}`, this.refConfigId = void 0, this.language = navigator.language, this.showFeedbackModal = !1, this.bookingInfoConfirmed = null;
|
|
75
|
-
}
|
|
76
|
-
connectedCallback() {
|
|
77
|
-
P("[nylas-scheduler] connectedCallback");
|
|
78
|
-
}
|
|
79
|
-
async componentWillLoad() {
|
|
80
|
-
var s, r;
|
|
81
|
-
P("[nylas-scheduler] Component will load"), this.enableUserFeedback && !se() && ae({
|
|
82
|
-
dsn: "https://9d5731f1c77ca84c9ed3fb9b3ccf7ee1@o74852.ingest.us.sentry.io/4507889638178816",
|
|
83
|
-
release: "1.4.3",
|
|
84
|
-
integrations: (l) => [
|
|
85
|
-
...l.filter((o) => !1),
|
|
86
|
-
de({
|
|
87
|
-
colorScheme: "system",
|
|
88
|
-
autoInject: !1
|
|
89
|
-
})
|
|
90
|
-
],
|
|
91
|
-
autoSessionTracking: !1,
|
|
92
|
-
beforeSend: () => null
|
|
93
|
-
});
|
|
94
|
-
const t = this.schedulerWillLoad.emit(this.host);
|
|
95
|
-
if ("schedulerWillLoad" in this.eventOverrides && (await this.eventOverrides.schedulerWillLoad(t, this.nylasSchedulerConnector), t.defaultPrevented))
|
|
96
|
-
return;
|
|
97
|
-
this.stores = {
|
|
98
|
-
scheduler: ne({
|
|
99
|
-
bookingInfo: this.bookingInfo,
|
|
100
|
-
nylasBranding: this.nylasBranding,
|
|
101
|
-
themeConfig: this.themeConfig,
|
|
102
|
-
hour12: this.hour12,
|
|
103
|
-
...this.defaultSchedulerState
|
|
104
|
-
})
|
|
105
|
-
}, this.baseProvider = new te(this.host, this.stores, this.automaticComponentRegistration, this.eventOverrides), this.refConfigId = this.configurationId;
|
|
106
|
-
let e;
|
|
107
|
-
if (this.rescheduleBookingRef) {
|
|
108
|
-
const [l, o, c] = E(this.rescheduleBookingRef);
|
|
109
|
-
this.refConfigId = l, this.stores.scheduler.set("rescheduleBookingId", o), e = this.bookingRefExtracted.emit({ configurationId: l, bookingId: o });
|
|
110
|
-
} else if (this.cancelBookingRef) {
|
|
111
|
-
const [l, o, c] = E(this.cancelBookingRef);
|
|
112
|
-
this.refConfigId = l, this.stores.scheduler.set("cancelBookingId", o), e = this.bookingRefExtracted.emit({ configurationId: l, bookingId: o });
|
|
113
|
-
} else if (this.organizerConfirmationBookingRef) {
|
|
114
|
-
const [l, o, c] = E(this.organizerConfirmationBookingRef);
|
|
115
|
-
this.refConfigId = l, this.stores.scheduler.set("organizerConfirmationBookingId", o), this.stores.scheduler.set("organizerConfirmationSalt", c), e = this.bookingRefExtracted.emit({ configurationId: l, bookingId: o, salt: c });
|
|
116
|
-
}
|
|
117
|
-
if ("bookingRefExtracted" in this.eventOverrides && (await this.eventOverrides.bookingRefExtracted(e, this.nylasSchedulerConnector), e.defaultPrevented) || !this.checkIfSessionIdOrConfigIdExists())
|
|
118
|
-
return;
|
|
119
|
-
const i = (s = this.baseProvider) == null ? void 0 : s.getStore("scheduler");
|
|
120
|
-
this.nylasSchedulerConnector = new ce({
|
|
121
|
-
schedulerAPIURL: this.schedulerApiUrl,
|
|
122
|
-
sessionId: this.sessionId,
|
|
123
|
-
configId: this.refConfigId,
|
|
124
|
-
slug: this.slug,
|
|
125
|
-
clientId: this.clientId,
|
|
126
|
-
nylasSchedulerStore: i
|
|
127
|
-
});
|
|
128
|
-
const a = this.init.emit(this.host);
|
|
129
|
-
"init" in this.eventOverrides && (await this.eventOverrides.init(a, this.nylasSchedulerConnector), a.defaultPrevented) || ((r = this.baseProvider) == null || r.componentWillLoad(this.nylasSchedulerConnector), this.applyThemeConfig(this.themeConfig));
|
|
130
|
-
}
|
|
131
|
-
async componentDidLoad() {
|
|
132
|
-
var c, m, y, g, h, f, k, D;
|
|
133
|
-
(c = this.baseProvider) == null || c.componentDidLoad();
|
|
134
|
-
const t = this.schedulerDidLoad.emit(this.host);
|
|
135
|
-
if ("schedulerDidLoad" in this.eventOverrides && (await this.eventOverrides.schedulerDidLoad(t, this.nylasSchedulerConnector), t.defaultPrevented) || !this.checkIfSessionIdOrConfigIdExists())
|
|
136
|
-
return;
|
|
137
|
-
this.localizationChanged(this.localization);
|
|
138
|
-
const e = await ((m = this.nylasSchedulerConnector) == null ? void 0 : m.scheduler.getUISettings());
|
|
139
|
-
if (!e || "error" in e) {
|
|
140
|
-
this.nylasSchedulerError.emit({ notification: { ...this.getErrorObject(e == null ? void 0 : e.error) }, host: this.host });
|
|
141
|
-
return;
|
|
142
|
-
} else {
|
|
143
|
-
"data" in e && ((y = e.data) != null && y.appearance) && console.info("Appearance settings have been returned from the configuration used byt his scheduling page; please remember to grab them from the configSettingsLoaded event and apply them as desired.");
|
|
144
|
-
const b = this.configSettingsLoaded.emit({ settings: e });
|
|
145
|
-
if ("configSettingsLoaded" in this.eventOverrides && (await this.eventOverrides.configSettingsLoaded(b, this.nylasSchedulerConnector), b.defaultPrevented))
|
|
146
|
-
return;
|
|
147
|
-
}
|
|
148
|
-
const i = (g = this.baseProvider) == null ? void 0 : g.getStore("scheduler"), a = (f = (h = i == null ? void 0 : i.get("configSettings")) == null ? void 0 : h.scheduler) == null ? void 0 : f.available_days_in_future, s = i == null ? void 0 : i.get("selectedTimeslot");
|
|
149
|
-
if (s && (s != null && s.start_time)) {
|
|
150
|
-
if (!this.isTimeslotValid(s))
|
|
151
|
-
return;
|
|
152
|
-
if (i != null && i.get("showBookingForm")) {
|
|
153
|
-
i == null || i.set("selectedDate", s.start_time);
|
|
154
|
-
return;
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
const r = i == null ? void 0 : i.get("selectedDate"), l = i == null ? void 0 : i.get("availability");
|
|
158
|
-
let o;
|
|
159
|
-
if (!(l && l.length > 0)) {
|
|
160
|
-
if (r) {
|
|
161
|
-
const { startTime: b, endTime: v, endTimeForAvailableDaysInFuture: _ } = this.validateAvailableDaysInFuture(r, a || 30);
|
|
162
|
-
r.getTime() < _ * 1e3 && (o = await ((D = this.nylasSchedulerConnector) == null ? void 0 : D.scheduler.getAvailability(b, v)));
|
|
163
|
-
} else {
|
|
164
|
-
const b = /* @__PURE__ */ new Date(), { startTime: v, endTime: _, endTimeForAvailableDaysInFuture: F } = this.validateAvailableDaysInFuture(b, a || 30);
|
|
165
|
-
b.getTime() < F * 1e3 && (o = await ((k = this.nylasSchedulerConnector) == null ? void 0 : k.scheduler.getAvailability(v, _)));
|
|
166
|
-
}
|
|
167
|
-
if ((!o || "error" in o) && this.nylasSchedulerError.emit({ notification: { ...this.getErrorObject(o == null ? void 0 : o.error) }, host: this.host }), !r) {
|
|
168
|
-
let b = /* @__PURE__ */ new Date();
|
|
169
|
-
const v = i == null ? void 0 : i.get("availability").find((_) => new Date(_.start_time) > /* @__PURE__ */ new Date());
|
|
170
|
-
v && (b = v.start_time), i == null || i.set("selectedDate", b);
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
componentDisconnected() {
|
|
175
|
-
var t;
|
|
176
|
-
(t = this.baseProvider) == null || t.componentDisconnected();
|
|
177
|
-
}
|
|
178
|
-
bookingInfoChanged(t) {
|
|
179
|
-
var e;
|
|
180
|
-
(e = this.stores) == null || e.scheduler.set("bookingInfo", t);
|
|
181
|
-
}
|
|
182
|
-
rescheduleBookingRefChanged(t) {
|
|
183
|
-
var e, i;
|
|
184
|
-
if (t) {
|
|
185
|
-
const [a, s] = E(t);
|
|
186
|
-
(e = this.stores) == null || e.scheduler.set("rescheduleBookingId", s), this.refConfigId = a, (i = this.nylasSchedulerConnector) == null || i.scheduler.setConfigId(a);
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
cancelBookingRefChanged(t) {
|
|
190
|
-
var e, i;
|
|
191
|
-
if (t) {
|
|
192
|
-
const [a, s] = E(t);
|
|
193
|
-
(e = this.stores) == null || e.scheduler.set("cancelBookingId", s), this.refConfigId = a, (i = this.nylasSchedulerConnector) == null || i.scheduler.setConfigId(a);
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
organizerConfirmationBookingRefChanged(t) {
|
|
197
|
-
var e, i;
|
|
198
|
-
if (t) {
|
|
199
|
-
const [a, s] = E(t);
|
|
200
|
-
(e = this.stores) == null || e.scheduler.set("organizerConfirmationBookingId", s), this.refConfigId = a, (i = this.nylasSchedulerConnector) == null || i.scheduler.setConfigId(a);
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
localizationChanged(t) {
|
|
204
|
-
t && Object.keys(t).forEach((e) => {
|
|
205
|
-
e in oe && u.addResourceBundle(e, "translation", t[e], !1, !0);
|
|
206
|
-
});
|
|
207
|
-
}
|
|
208
|
-
themeConfigChanged(t) {
|
|
209
|
-
var e, i;
|
|
210
|
-
(i = (e = this.baseProvider) == null ? void 0 : e.getStore("scheduler")) == null || i.set("themeConfig", t), this.applyThemeConfig(t);
|
|
211
|
-
}
|
|
212
|
-
languageChanged(t) {
|
|
213
|
-
const e = t.detail;
|
|
214
|
-
this.language = e, u.changeLanguage(e);
|
|
215
|
-
}
|
|
216
|
-
async registerComponentHandler(t) {
|
|
217
|
-
var e;
|
|
218
|
-
(e = this.baseProvider) == null || e.registerComponent(t.detail);
|
|
219
|
-
}
|
|
220
|
-
async unregisterComponentHandler(t) {
|
|
221
|
-
var e;
|
|
222
|
-
(e = this.baseProvider) == null || e.unregisterComponent(t.detail);
|
|
223
|
-
}
|
|
224
|
-
async monthChangedHandler(t) {
|
|
225
|
-
var l, o, c, m, y, g, h;
|
|
226
|
-
const e = t.detail, i = (m = (c = (o = (l = this.nylasSchedulerConnector) == null ? void 0 : l.schedulerStore) == null ? void 0 : o.get("configSettings")) == null ? void 0 : c.scheduler) == null ? void 0 : m.available_days_in_future, { startTime: a, endTime: s, endTimeForAvailableDaysInFuture: r } = this.validateAvailableDaysInFuture(e, i || 30);
|
|
227
|
-
if (!t.defaultPrevented && a < r && e.getTime() < r * 1e3) {
|
|
228
|
-
const f = await ((y = this.nylasSchedulerConnector) == null ? void 0 : y.scheduler.getAvailability(a, s));
|
|
229
|
-
(!f || "error" in f) && this.nylasSchedulerError.emit({ notification: { ...this.getErrorObject(f == null ? void 0 : f.error) }, host: this.host });
|
|
230
|
-
const k = (g = this.stores) == null ? void 0 : g.scheduler.get("selectableDates");
|
|
231
|
-
k && k.length > 0 && ((h = this.stores) == null || h.scheduler.set("selectedDate", k[0]));
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
mapToBookingData(t) {
|
|
235
|
-
var l, o, c;
|
|
236
|
-
const e = (l = this.stores) == null ? void 0 : l.scheduler.get("selectedTimeslot"), i = (o = this.stores) == null ? void 0 : o.scheduler.get("selectedLanguage"), a = (c = this.stores) == null ? void 0 : c.scheduler.get("selectedTimezone"), s = e != null && e.start_time ? new Date(e == null ? void 0 : e.start_time).getTime() / 1e3 : "", r = e != null && e.end_time ? new Date(e == null ? void 0 : e.end_time).getTime() / 1e3 : "";
|
|
237
|
-
return {
|
|
238
|
-
additional_guests: t.guests,
|
|
239
|
-
guest: { ...t.primaryParticipant },
|
|
240
|
-
additional_fields: { ...t.additionalFields },
|
|
241
|
-
start_time: s,
|
|
242
|
-
end_time: r,
|
|
243
|
-
email_language: i,
|
|
244
|
-
timezone: a
|
|
245
|
-
};
|
|
246
|
-
}
|
|
247
|
-
async bookButtonClickedHandler(t) {
|
|
248
|
-
var c, m, y, g;
|
|
249
|
-
if (t.defaultPrevented)
|
|
250
|
-
return;
|
|
251
|
-
const e = t.detail, i = this.mapToBookingData(e);
|
|
252
|
-
this.bookingInfoConfirmed = e;
|
|
253
|
-
const s = (m = (c = this.nylasSchedulerConnector) == null ? void 0 : c.schedulerStore) == null ? void 0 : m.get("rescheduleBookingId");
|
|
254
|
-
if (s) {
|
|
255
|
-
const h = await ((y = this.nylasSchedulerConnector) == null ? void 0 : y.scheduler.rescheduleBooking(s, e));
|
|
256
|
-
(!h || "error" in h) && this.nylasSchedulerError.emit({ notification: { ...this.getErrorObject(h == null ? void 0 : h.error) }, host: this.host });
|
|
257
|
-
const f = h == null ? void 0 : h.data, k = this.bookedEventInfo.emit({ ...h, data: { ...f, ...i } });
|
|
258
|
-
this.bookingInfoConfirmed = { ...this.bookingInfoConfirmed, ...f }, "bookedEventInfo" in this.eventOverrides && await this.eventOverrides.bookedEventInfo(k, this.nylasSchedulerConnector);
|
|
259
|
-
return;
|
|
260
|
-
}
|
|
261
|
-
const r = await ((g = this.nylasSchedulerConnector) == null ? void 0 : g.scheduler.bookTimeslot(e));
|
|
262
|
-
(!r || "error" in r) && this.nylasSchedulerError.emit({ notification: { ...this.getErrorObject(r == null ? void 0 : r.error) }, host: this.host });
|
|
263
|
-
const l = r == null ? void 0 : r.data, o = this.bookedEventInfo.emit({ ...r, data: { ...l, ...i } });
|
|
264
|
-
this.bookingInfoConfirmed = { ...this.bookingInfoConfirmed, ...l }, "bookedEventInfo" in this.eventOverrides && await this.eventOverrides.bookedEventInfo(o, this.nylasSchedulerConnector);
|
|
265
|
-
}
|
|
266
|
-
dateSelectedHandler(t) {
|
|
267
|
-
const e = t.detail;
|
|
268
|
-
this.selectedDateLabel = e ? e.toLocaleDateString(this.language, { dateStyle: "full" }) : `${u.t("noDateSelected")}`;
|
|
269
|
-
}
|
|
270
|
-
cancelBookedEventErrorHandler(t) {
|
|
271
|
-
this.nylasSchedulerError.emit({ notification: { ...this.getErrorObject(t.detail.error) }, host: this.host });
|
|
272
|
-
}
|
|
273
|
-
cancelBookedEventValidationErrorHandler(t) {
|
|
274
|
-
this.nylasSchedulerError.emit({ notification: { ...this.getErrorObject(t.detail.error) }, host: this.host });
|
|
275
|
-
}
|
|
276
|
-
rescheduleBookedEventErrorHandler(t) {
|
|
277
|
-
this.nylasSchedulerError.emit({ notification: { ...this.getErrorObject(t.detail.error) }, host: this.host });
|
|
278
|
-
}
|
|
279
|
-
confirmBookingErrorHandler(t) {
|
|
280
|
-
this.nylasSchedulerError.emit({ notification: { ...this.getErrorObject(t.detail.error) }, host: this.host });
|
|
281
|
-
}
|
|
282
|
-
feedbackModalClosedHandler() {
|
|
283
|
-
this.showFeedbackModal = !1;
|
|
284
|
-
}
|
|
285
|
-
eventIsFullHandler(t) {
|
|
286
|
-
const e = t.detail.error;
|
|
287
|
-
t.detail.type === "error" ? this.nylasSchedulerError.emit({ notification: { ...this.getErrorObject({ message: e }) }, host: this.host }) : this.nylasSchedulerInfo.emit({
|
|
288
|
-
notification: {
|
|
289
|
-
title: "Event is full",
|
|
290
|
-
category: R.Component,
|
|
291
|
-
type: T.Info,
|
|
292
|
-
description: "The event you selected is full. Please try a different time.",
|
|
293
|
-
id: (/* @__PURE__ */ new Date()).getTime().toString(),
|
|
294
|
-
ttl: 3e3
|
|
295
|
-
},
|
|
296
|
-
host: this.host
|
|
297
|
-
});
|
|
298
|
-
}
|
|
299
|
-
feedbackSubmittedHandler(t) {
|
|
300
|
-
const i = {
|
|
301
|
-
eventId: re("Scheduling Page User Feedback", {
|
|
302
|
-
extra: {
|
|
303
|
-
configId: this.configurationId,
|
|
304
|
-
slug: this.slug
|
|
305
|
-
}
|
|
306
|
-
}),
|
|
307
|
-
message: t.detail.feedback
|
|
308
|
-
};
|
|
309
|
-
le(i, {
|
|
310
|
-
includeReplay: !0,
|
|
311
|
-
captureContext: {
|
|
312
|
-
tags: {
|
|
313
|
-
"nylas-web-element": "nylas-scheduling",
|
|
314
|
-
"nylas-web-element-version": "1.4.3",
|
|
315
|
-
"nylas-config-id": this.configurationId,
|
|
316
|
-
"nylas-slug": this.slug,
|
|
317
|
-
"host-url": window.location.href
|
|
318
|
-
},
|
|
319
|
-
extra: {
|
|
320
|
-
configId: this.configurationId,
|
|
321
|
-
slug: this.slug
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
}), this.showFeedbackModal = !1;
|
|
325
|
-
}
|
|
326
|
-
async getNylasSchedulerStore() {
|
|
327
|
-
var t;
|
|
328
|
-
return (t = this.baseProvider) == null ? void 0 : t.getStore("scheduler");
|
|
329
|
-
}
|
|
330
|
-
async getNylasSchedulerConnector() {
|
|
331
|
-
return this.nylasSchedulerConnector;
|
|
332
|
-
}
|
|
333
|
-
async getRef() {
|
|
334
|
-
return this.host;
|
|
335
|
-
}
|
|
336
|
-
getErrorObject(t) {
|
|
337
|
-
return {
|
|
338
|
-
title: (t == null ? void 0 : t.title) || J.title,
|
|
339
|
-
category: (t == null ? void 0 : t.category) || J.category,
|
|
340
|
-
type: T.Error,
|
|
341
|
-
description: (t == null ? void 0 : t.message) || "",
|
|
342
|
-
id: (/* @__PURE__ */ new Date()).getTime().toString(),
|
|
343
|
-
ttl: "none"
|
|
344
|
-
};
|
|
345
|
-
}
|
|
346
|
-
checkIfSessionIdOrConfigIdExists() {
|
|
347
|
-
if (!this.sessionId && !this.refConfigId && !(this.slug && this.clientId)) {
|
|
348
|
-
let t = "";
|
|
349
|
-
return this.sessionId || (t += u.t("sessionIdRequiredErrorMessage")), !this.sessionId && !this.refConfigId && !(this.slug && this.clientId) && (t = u.t("sessionIdRequiredErrorMessage") + " " + u.t("publicConfigErrorMessage")), this.nylasSchedulerError.emit({
|
|
350
|
-
notification: {
|
|
351
|
-
title: u.t("schedulingComponentErrorTitle"),
|
|
352
|
-
category: R.Component,
|
|
353
|
-
type: T.Error,
|
|
354
|
-
description: t,
|
|
355
|
-
id: (/* @__PURE__ */ new Date()).getTime().toString(),
|
|
356
|
-
ttl: "none"
|
|
357
|
-
},
|
|
358
|
-
host: this.host
|
|
359
|
-
}), !1;
|
|
360
|
-
}
|
|
361
|
-
return !0;
|
|
362
|
-
}
|
|
363
|
-
isTimeslotValid(t) {
|
|
364
|
-
return new Date(t.start_time) < /* @__PURE__ */ new Date() ? (this.nylasSchedulerError.emit({
|
|
365
|
-
notification: {
|
|
366
|
-
title: u.t("invalidTimeslotErrorTitle"),
|
|
367
|
-
category: R.Component,
|
|
368
|
-
type: T.Error,
|
|
369
|
-
description: u.t("invalidTimeslotErrorMessage"),
|
|
370
|
-
id: (/* @__PURE__ */ new Date()).getTime().toString(),
|
|
371
|
-
ttl: "none"
|
|
372
|
-
},
|
|
373
|
-
host: this.host
|
|
374
|
-
}), !1) : !0;
|
|
375
|
-
}
|
|
376
|
-
validateAvailableDaysInFuture(t, e) {
|
|
377
|
-
const i = /* @__PURE__ */ new Date(), a = new Date(t.getFullYear(), t.getMonth(), 1).getTime() / 1e3, s = new Date(t.getFullYear(), t.getMonth() + 1, 1).getTime() / 1e3, r = Math.floor(X(i, e).getTime() / 1e3), l = Math.min(r, s);
|
|
378
|
-
return { startTime: a < i.getTime() / 1e3 ? Math.floor(i.getTime() / 1e3) : a, endTime: l, endTimeForAvailableDaysInFuture: r };
|
|
379
|
-
}
|
|
380
|
-
applyThemeConfig(t) {
|
|
381
|
-
if (t)
|
|
382
|
-
for (const [e, i] of Object.entries(t))
|
|
383
|
-
this.host.style.setProperty(`${e}`, i);
|
|
384
|
-
}
|
|
385
|
-
onFeedbackClick(t) {
|
|
386
|
-
t.preventDefault(), this.showFeedbackModal = !0;
|
|
387
|
-
}
|
|
388
|
-
redirectToCustomUrl(t) {
|
|
389
|
-
window.location.assign(t);
|
|
390
|
-
}
|
|
391
|
-
render() {
|
|
392
|
-
var k, D, b, v, _, F, N, A, M, U, j, H;
|
|
393
|
-
const t = this.mode === "app", e = (k = this.baseProvider) == null ? void 0 : k.getStore("scheduler"), i = e == null ? void 0 : e.get("eventInfo"), a = e == null ? void 0 : e.get("showBookingForm"), s = e == null ? void 0 : e.get("cancelledEventInfo"), r = e == null ? void 0 : e.get("cancelBookingId"), l = e == null ? void 0 : e.get("selectedTimeslot"), o = e == null ? void 0 : e.get("rescheduleBookingId"), c = e == null ? void 0 : e.get("organizerConfirmationBookingId"), m = e == null ? void 0 : e.get("rejectBookingId"), y = e == null ? void 0 : e.get("confirmedEventInfo"), g = (e == null ? void 0 : e.get("nylasBranding")) || this.nylasBranding, h = e == null ? void 0 : e.get("selectedDate"), f = (b = (D = e == null ? void 0 : e.get("configSettings")) == null ? void 0 : D.scheduler) == null ? void 0 : b.confirmation_redirect_url;
|
|
394
|
-
if (this.selectedDateLabel = h && this.language ? Z(h.toLocaleDateString(this.language, { dateStyle: "full" })) : `${u.t("noDateSelected")}`, t && (r || m) && !s)
|
|
395
|
-
return n(C, null, n(x, { nylasBranding: g, isLoading: this.isLoading, showNotification: this.showNotification }, n("div", { class: "cancel-flow-page", part: "cancel-flow-page" }, n("nylas-cancel-booking-form", { selectedTimeslot: l, cancelBookingId: r, rejectBookingId: m, exportparts: "ncbf, ncbf__icon, ncbf__title, ncbf__description, ncbf__reason-textarea, ncbf__button-cta, ncbf__button-outline, ncbf__card" }))), this.enableUserFeedback && n("button-component", { id: "report-issue", variant: "basic", onClick: (d) => this.onFeedbackClick(d) }, n("feedback-icon", null)), this.showFeedbackModal && n("nylas-feedback-form", null));
|
|
396
|
-
if (t && c)
|
|
397
|
-
return n(C, null, n(x, null, n("div", { class: "manual-confirmation-page", part: "manual-confirmation-page" }, n("nylas-organizer-confirmation-card", { organizerConfirmationBookingId: c, exportparts: "nmcc, nmcc__title, nmcc__description, nmcc__button-cta, nmcc__button-outline" }))), this.enableUserFeedback && n("button-component", { id: "report-issue", variant: "basic", onClick: (d) => this.onFeedbackClick(d) }, n("feedback-icon", null)), this.showFeedbackModal && n("nylas-feedback-form", null));
|
|
398
|
-
if (t && s)
|
|
399
|
-
return n(C, null, n(x, { nylasBranding: g, isLoading: this.isLoading, showNotification: this.showNotification }, n("div", { class: "cancelled-event-page", part: "cancelled-event-page" }, n("nylas-cancelled-event-card", { cancelledEventInfo: s, exportparts: "ncec, ncec__icon, ncec__title, ncec__description, ncec__button-outline, ncec__card" }))), this.enableUserFeedback && n("button-component", { id: "report-issue", variant: "basic", onClick: (d) => this.onFeedbackClick(d) }, n("feedback-icon", null)), this.showFeedbackModal && n("nylas-feedback-form", null));
|
|
400
|
-
if (t && y)
|
|
401
|
-
return n(C, null, n(x, { nylasBranding: g, isLoading: this.isLoading, showNotification: this.showNotification }, n("div", { class: "cancelled-event-page", part: "confirmed-event-page" }, n("nylas-confirmed-event-card", { confirmedEventInfo: y, exportparts: "ncec, ncec__icon, ncec__title, ncec__description, ncec__button-outline, ncec__card" }))), this.enableUserFeedback && n("button-component", { id: "report-issue", variant: "basic", onClick: (d) => this.onFeedbackClick(d) }, n("feedback-icon", null)), this.showFeedbackModal && n("nylas-feedback-form", null));
|
|
402
|
-
if (t && i && f) {
|
|
403
|
-
const d = (v = this.bookingInfoConfirmed) == null ? void 0 : v.primaryParticipant, L = (_ = this.bookingInfoConfirmed) == null ? void 0 : _.location, $ = (F = this.bookingInfoConfirmed) == null ? void 0 : F.booking_ref, z = ((N = this.bookingInfoConfirmed) == null ? void 0 : N.additionalFields) || {};
|
|
404
|
-
if (this.bookingInfo && typeof ((A = this.bookingInfo) == null ? void 0 : A.additionalFields) < "u") {
|
|
405
|
-
const B = this.bookingInfo.additionalFields;
|
|
406
|
-
Object.keys(B).forEach((S) => {
|
|
407
|
-
!z[S] && (B != null && B[S]) && (z[S] = B[S].value);
|
|
408
|
-
});
|
|
409
|
-
}
|
|
410
|
-
const I = (M = this.stores) == null ? void 0 : M.scheduler.get("selectedTimeslot"), W = (U = this.stores) == null ? void 0 : U.scheduler.get("selectedTimezone"), q = (j = this.stores) == null ? void 0 : j.scheduler.get("selectedLanguage"), O = (H = this.stores) == null ? void 0 : H.scheduler.get("configSettings"), G = this.configurationId ? this.configurationId : O == null ? void 0 : O.configuration_id, K = window.location.search, p = new URLSearchParams(K);
|
|
411
|
-
p.set("booking_id", i.booking_id), d != null && d.name && p.set("name", d.name), d != null && d.email && p.set("email", d.email), I != null && I.start_time && p.set("start_time", (new Date(I.start_time).getTime() / 1e3).toString()), I != null && I.end_time && p.set("end_time", (new Date(I.end_time).getTime() / 1e3).toString()), W && p.set("tz", W), q && p.set("language", q), z && p.set("additional_values", JSON.stringify(z)), this.slug && p.set("page_slug", this.slug), G && p.set("config_id", G), L && p.set("location", L), $ && p.set("booking_ref", $), this.redirectToCustomUrl(`${f}?${p.toString()}`);
|
|
412
|
-
return;
|
|
413
|
-
}
|
|
414
|
-
if (t && i)
|
|
415
|
-
return n(C, null, n(x, { nylasBranding: g, isLoading: this.isLoading, showNotification: this.showNotification }, n("div", { class: "booked-event-page", part: "booked-event-page ns_booked-event-page" }, n("nylas-booked-event-card", { selectedTimeslot: l, eventInfo: i, exportparts: "nbec, nbec__title, nbec__card, nbec__description, nbec__button-outline, nbec__cancel-cta, nbec__reschedule-cta" }))), this.enableUserFeedback && n("button-component", { id: "report-issue", variant: "basic", onClick: (d) => this.onFeedbackClick(d) }, n("feedback-icon", null)), this.showFeedbackModal && n("nylas-feedback-form", null));
|
|
416
|
-
if (t && (!i || o) && !a) {
|
|
417
|
-
const d = this.host.querySelector('[slot="timeslot-picker-cta-label"]');
|
|
418
|
-
return n(C, null, n(x, { nylasBranding: g, isLoading: this.isLoading, showNotification: this.showNotification }, o && n(Y, null, `${u.t("rescheduleTitle")}`), n("div", { class: "select-date-page", part: "select-date-page ns_select-date-page" }, n("div", { class: "left-panel", part: "ns_left-panel" }, n("nylas-date-picker", { exportparts: "ndp, ndp__title, ndp__month-header, ndp__month-button, ndp__day, ndp__date, ndp__date--disabled, ndp__date--selected, ndp__date--current-day, ndp__date--current-month" }), n("nylas-locale-switch", { exportparts: "nls, nls__timezone, nls__timezone-dropdown, nls__timezone-drop-button, nls__timezone-drop-button-selected-label, nls__timezone-drop-content, nls__timezone-drop-label, nls__language, nls__language-dropdown, nls__language-drop-button, nls__language-drop-content, nls__language-drop-label" })), n("div", { class: `right-panel ${o ? "reschedule" : ""}`, part: `ns_right-panel ${o ? "ns_reschedule" : ""}` }, n("h2", { part: "ns_right-panel__title" }, n("calendar-icon", { part: "ns_right-panel__calendar-icon" }), n("span", { id: "selectedDate", part: "ns_right-panel__selected-date" }, this.selectedDateLabel)), n("nylas-timeslot-picker", { exportparts: "ntp, ntp__time-picker-wrapper, ntp__timeslots, ntp__timeslot, ntp__timeslot--selected, ntp__button-primary" }, d && n("span", { slot: "timeslot-picker-cta-label" }, n("slot", { name: "timeslot-picker-cta-label" })))))), this.enableUserFeedback && n("button-component", { id: "report-issue", variant: "basic", onClick: (L) => this.onFeedbackClick(L) }, n("feedback-icon", null)), this.showFeedbackModal && n("nylas-feedback-form", null));
|
|
419
|
-
}
|
|
420
|
-
return t && !i && a ? n(C, null, n(x, { nylasBranding: g, isLoading: this.isLoading, showNotification: this.showNotification }, o && n(Y, null, `${u.t("rescheduleTitle")}`), n("div", { class: "additional-data-page", part: "additional-data-page ns_additional-data-page" }, n("div", { class: "left-panel ns_left-panel", part: "ns_left-panel" }, n("div", { class: "wrapper", part: "ns_left-panel__wrapper" }, n("nylas-selected-event-card", { exportparts: "nsec, nsec__card, nsec__icon, nsec__date, nsec__time, nsec__timezone" }))), n("div", { class: `right-panel ${o ? "reschedule" : ""}`, part: `ns_right-panel ${o ? "ns_reschedule" : ""}` }, n("nylas-booking-form", { exportparts: "nbf, nbf__input-textfield, nbf__button-ghost, nbf__button-outline, nbf__button-primary, nbf__input-wrapper, nbf__checkbox-component, nbf__radio-button-group, nbf__textarea-component, nbf__dropdown, nbf__dropdown-button, nbf__dropdown-content" })))), this.enableUserFeedback && n("button-component", { id: "report-issue", variant: "basic", onClick: (d) => this.onFeedbackClick(d) }, n("feedback-icon", null)), this.showFeedbackModal && n("nylas-feedback-form", null)) : n(C, null, n("slot", null));
|
|
421
|
-
}
|
|
422
|
-
get host() {
|
|
423
|
-
return V(this);
|
|
424
|
-
}
|
|
425
|
-
static get watchers() {
|
|
426
|
-
return {
|
|
427
|
-
bookingInfo: ["bookingInfoChanged"],
|
|
428
|
-
rescheduleBookingRef: ["rescheduleBookingRefChanged"],
|
|
429
|
-
cancelBookingRef: ["cancelBookingRefChanged"],
|
|
430
|
-
organizerConfirmationBookingRef: ["organizerConfirmationBookingRefChanged"],
|
|
431
|
-
localization: ["localizationChanged"],
|
|
432
|
-
themeConfig: ["themeConfigChanged"]
|
|
433
|
-
};
|
|
434
|
-
}
|
|
435
|
-
};
|
|
436
|
-
fe.style = ge;
|
|
437
|
-
export {
|
|
438
|
-
fe as nylas_scheduling
|
|
439
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-efb6db79.cjs"),w=require("./index.es-13ff6710-0f748bd2.cjs"),C=require("./scheduler-store-fe9e85a4-baabf78a.cjs"),Y=require("./constants-3d8016e3-fd6c3848.cjs"),D=require("./feedbackSync-57bb471a-5afb7715.cjs");require("react");require("react/jsx-runtime");require("react-dom");class J{constructor({schedulerAPIURL:t,nylasSchedulerStore:i,sessionId:a,configId:s,slug:r,clientId:l}){if(!t)throw new Error("schedulerAPIURL is required");if(!i)throw new Error("nylasSchedulerStore is required");if(!a&&!s&&!(r||l))throw new Error("sessionId is required for private configs. If using public config either pass a configurationId or a combination of slug and clientId.");t==="/"&&(t=new URL(window.location.href).origin),this.configId=s,this.sessionId=a,this.schedulerAPIURL=t,this.nylasSchedulerStore=i,this.slug=r,this.clientId=l}init(){e.debug("NylasConnector init")}get schedulerStore(){return this.nylasSchedulerStore}get scheduler(){return this._schedulerAPIConnector?this._schedulerAPIConnector:(this._schedulerAPIConnector=new C.NylaSchedulerAPIConnector({schedulerAPIURL:this.schedulerAPIURL,schedulerStore:this.schedulerStore,sessionId:this.sessionId,configId:this.configId,slug:this.slug,clientId:this.clientId}),this._schedulerAPIConnector)}resetStores(){this.nylasSchedulerStore.reset()}}const I=(n,t)=>{const i=n.isLoading,a=n.showNotification,s=n.nylasBranding;return e.h(e.Fragment,null,a&&e.h("nylas-notification",null),i&&e.h("div",{class:"loading"},e.h("div",{class:"left"},e.h("div",{class:"skeleton"})),e.h("div",{class:"right"},e.h("div",{class:"skeleton"}),e.h("div",{class:"skeleton"}),e.h("div",{class:"skeleton"}),e.h("div",{class:"skeleton"}),e.h("div",{class:"skeleton"}))),!i&&t,e.h("div",{class:"footer"},s&&e.h("a",{href:"https://scheduler.nylas.com?utm_source=powered-by-nylas-logoutm_medium=link&utm_campaign=get-scheduler&utm_id=get-scheduler",class:"powered-by-nylas",target:"_blank",rel:"noreferrer noopener"},"Powered by ",e.h("span",{class:"sr-only"},"Nylas"),e.h("nylas-logo",{"aria-hidden":!0}))))},q=(n,t)=>e.h("div",{class:"message-banner"},t),K=':host{display:flex;flex-direction:column;overflow:visible;border-radius:var(--nylas-border-radius-2x);width:fit-content;background:var(--nylas-base-0);position:relative;box-shadow:0px 4px 8px 2px rgba(0, 0, 0, 0.05), 0px 8px 16px -2px rgba(0, 0, 0, 0.1);--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff;font-family:var(--nylas-font-family);font-optical-sizing:auto;font-style:normal;font-variation-settings:"slnt" 0}@media screen and (max-width: 768px){:host{width:auto;min-width:325px}}:root{font-family:inherit}.error{padding:8rem 12rem;color:var(--nylas-base-0);background-color:var(--nylas-error);margin:1.5rem;border-radius:var(--nylas-border-radius-2x)}.message-banner{text-align:right;color:var(--nylas-base-800);padding:1rem;border-bottom:1px solid var(--nylas-color-primary-200);margin:0}.loading{margin:1.5rem;display:flex;gap:1rem}.loading .skeleton{border-radius:var(--nylas-border-radius-2x);animation:pulsate 1.5s infinite}.loading .skeleton:nth-child(2){animation-delay:-100ms}.loading .skeleton:nth-child(3){animation-delay:-200ms}.loading .skeleton:nth-child(4){animation-delay:-300ms}.loading .skeleton:nth-child(5){animation-delay:-400ms}.loading .left .skeleton{height:100%;width:400px}.loading .right .skeleton{height:5rem;width:300px;margin-bottom:1rem}.loading .right .skeleton:last-child{margin-bottom:0}@keyframes pulsate{0%{background-color:var(--nylas-base-50)}50%{background-color:var(--nylas-base-100)}100%{background-color:var(--nylas-base-50)}}.select-date-page,.additional-data-page,.booked-event-page,.manual-confirmation-page,.cancelled-event-page,.cancel-flow-page{border-top-left-radius:var(--nylas-border-radius-2x);border-top-right-radius:var(--nylas-border-radius-2x)}.select-date-page,.additional-data-page{display:flex}@media screen and (max-width: 768px){.select-date-page,.additional-data-page{flex-direction:column}}.booked-event-page,.manual-confirmation-page{background-color:var(--nylas-base-50)}.cancelled-event-page,.manual-confirmation-page,.cancel-flow-page{padding:1rem;height:496px;display:flex;justify-content:center;align-items:center}.booked-event-page,.manual-confirmation-page,.cancelled-event-page,.cancel-flow-page{min-width:784px;background:var(--nylas-base-50)}@media screen and (max-width: 768px){.booked-event-page,.manual-confirmation-page,.cancelled-event-page,.cancel-flow-page{min-width:90%}}.left-panel{display:flex;flex-direction:column;min-width:424px;border-top-left-radius:inherit;background:var(--nylas-base-0);position:relative;padding:1rem 0 0 0;height:624px}@media screen and (max-width: 768px){.left-panel{border-top-right-radius:inherit;min-width:unset;height:auto}}@media screen and (max-width: 768px){.select-date-page .left-panel{height:624px}}.border{margin-left:-20px;margin-right:-20px;border-top-width:1px;height:0.5px;background-color:var(--nylas-base-200)}@media screen and (max-width: 768px){.border{display:none}}.right-panel{min-width:360px;width:360px;background-color:var(--nylas-base-50);height:624px;padding-top:16px;border-left:1px solid var(--nylas-base-200);border-top-right-radius:inherit}.right-panel.reschedule{border-top-right-radius:0px}@media screen and (max-width: 768px){.right-panel{border-top-right-radius:0px;width:inherit;min-width:unset;height:auto;border-left:none}}.right-panel h2{display:flex;margin:0;height:48px;gap:0.5rem;justify-content:center;align-items:center;width:auto;font-size:1.125rem;line-height:1.5rem;font-weight:500;text-align:center;color:var(--nylas-base-800)}.additional-data-page .left-panel{background-color:var(--nylas-base-50)}.additional-data-page .right-panel{background-color:var(--nylas-base-0)}nylas-selected-event-card{height:604px;padding:0 1rem}@media screen and (max-width: 768px){nylas-selected-event-card{height:250px}}.footer{display:flex;justify-content:flex-end;align-items:center;padding:16px;font-size:14px;font-weight:300;color:var(--nylas-base-500);border-top:1px solid var(--nylas-base-200);min-height:24px}.footer .powered-by-nylas{display:flex;align-items:center;text-decoration:none;color:var(--nylas-base-500)}.footer .powered-by-nylas:hover{color:var(--nylas-base-800)}.footer svg{fill:var(--nylas-base-500)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}.footer svg{margin-top:1px}nylas-selected-event-card::part(nsec__timezone){position:absolute;bottom:0}nylas-notification{margin:1.5rem;width:-webkit-fill-available;width:-moz-available;position:absolute}nylas-locale-switch{position:absolute;padding:18px 20px;bottom:0;width:-webkit-fill-available;width:-moz-available;border-top:1px solid var(--nylas-base-200)}@media screen and (max-width: 768px){nylas-locale-switch{height:auto}}nylas-date-picker{padding:0 20px}button-component#report-issue{width:auto;position:absolute;bottom:4px;left:16px}nylas-feedback-form{position:absolute;top:0;height:100%;width:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;background:rgba(0, 0, 0, 0.6);z-index:2;border-radius:inherit}',Q=K,$={title:e.instance.t("genericErrorTitle"),type:w.nr.Error,category:C.ErrorCategory.Component},W=class{constructor(n){e.registerInstance(this,n),this.init=e.createEvent(this,"init",7),this.schedulerWillLoad=e.createEvent(this,"schedulerWillLoad",7),this.schedulerDidLoad=e.createEvent(this,"schedulerDidLoad",7),this.nylasSchedulerError=e.createEvent(this,"nylasSchedulerError",7),this.nylasSchedulerInfo=e.createEvent(this,"nylasSchedulerInfo",7),this.configSettingsLoaded=e.createEvent(this,"configSettingsLoaded",7),this.bookingRefExtracted=e.createEvent(this,"bookingRefExtracted",7),this.bookedEventInfo=e.createEvent(this,"bookedEventInfo",7),this.mode="app",this.defaultSchedulerState=void 0,this.sessionId=void 0,this.schedulerApiUrl="https://api.us.nylas.com",this.bookingInfo=void 0,this.rescheduleBookingRef=void 0,this.cancelBookingRef=void 0,this.organizerConfirmationBookingRef=void 0,this.configurationId=void 0,this.slug=void 0,this.clientId=void 0,this.nylasBranding=!0,this.eventOverrides={},this.isLoading=void 0,this.themeConfig=void 0,this.localization=void 0,this.showNotification=!0,this.enableUserFeedback=!0,this.hour12=void 0,this.automaticComponentRegistration=!0,this.selectedDateLabel=new Date().toLocaleDateString(navigator.language,{dateStyle:"full"})||`${e.instance.t("noDateSelected")}`,this.refConfigId=void 0,this.language=navigator.language,this.showFeedbackModal=!1,this.bookingInfoConfirmed=null}connectedCallback(){e.debug("[nylas-scheduler] connectedCallback")}async componentWillLoad(){var s,r;e.debug("[nylas-scheduler] Component will load"),this.enableUserFeedback&&!D.isInitialized()&&D.init({dsn:"https://9d5731f1c77ca84c9ed3fb9b3ccf7ee1@o74852.ingest.us.sentry.io/4507889638178816",release:"1.4.3",integrations:l=>[...l.filter(o=>!1),D.feedbackSyncIntegration({colorScheme:"system",autoInject:!1})],autoSessionTracking:!1,beforeSend:()=>null});const n=this.schedulerWillLoad.emit(this.host);if("schedulerWillLoad"in this.eventOverrides&&(await this.eventOverrides.schedulerWillLoad(n,this.nylasSchedulerConnector),n.defaultPrevented))return;this.stores={scheduler:C.CreateNylasSchedulerStore({bookingInfo:this.bookingInfo,nylasBranding:this.nylasBranding,themeConfig:this.themeConfig,hour12:this.hour12,...this.defaultSchedulerState})},this.baseProvider=new w.NylasBaseProvider(this.host,this.stores,this.automaticComponentRegistration,this.eventOverrides),this.refConfigId=this.configurationId;let t;if(this.rescheduleBookingRef){const[l,o,c]=e.compactStringToUUIDs(this.rescheduleBookingRef);this.refConfigId=l,this.stores.scheduler.set("rescheduleBookingId",o),t=this.bookingRefExtracted.emit({configurationId:l,bookingId:o})}else if(this.cancelBookingRef){const[l,o,c]=e.compactStringToUUIDs(this.cancelBookingRef);this.refConfigId=l,this.stores.scheduler.set("cancelBookingId",o),t=this.bookingRefExtracted.emit({configurationId:l,bookingId:o})}else if(this.organizerConfirmationBookingRef){const[l,o,c]=e.compactStringToUUIDs(this.organizerConfirmationBookingRef);this.refConfigId=l,this.stores.scheduler.set("organizerConfirmationBookingId",o),this.stores.scheduler.set("organizerConfirmationSalt",c),t=this.bookingRefExtracted.emit({configurationId:l,bookingId:o,salt:c})}if("bookingRefExtracted"in this.eventOverrides&&(await this.eventOverrides.bookingRefExtracted(t,this.nylasSchedulerConnector),t.defaultPrevented)||!this.checkIfSessionIdOrConfigIdExists())return;const i=(s=this.baseProvider)==null?void 0:s.getStore("scheduler");this.nylasSchedulerConnector=new J({schedulerAPIURL:this.schedulerApiUrl,sessionId:this.sessionId,configId:this.refConfigId,slug:this.slug,clientId:this.clientId,nylasSchedulerStore:i});const a=this.init.emit(this.host);"init"in this.eventOverrides&&(await this.eventOverrides.init(a,this.nylasSchedulerConnector),a.defaultPrevented)||((r=this.baseProvider)==null||r.componentWillLoad(this.nylasSchedulerConnector),this.applyThemeConfig(this.themeConfig))}async componentDidLoad(){var c,p,m,g,h,f,y,x;(c=this.baseProvider)==null||c.componentDidLoad();const n=this.schedulerDidLoad.emit(this.host);if("schedulerDidLoad"in this.eventOverrides&&(await this.eventOverrides.schedulerDidLoad(n,this.nylasSchedulerConnector),n.defaultPrevented)||!this.checkIfSessionIdOrConfigIdExists())return;this.localizationChanged(this.localization);const t=await((p=this.nylasSchedulerConnector)==null?void 0:p.scheduler.getUISettings());if(!t||"error"in t){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(t==null?void 0:t.error)},host:this.host});return}else{"data"in t&&((m=t.data)!=null&&m.appearance)&&console.info("Appearance settings have been returned from the configuration used byt his scheduling page; please remember to grab them from the configSettingsLoaded event and apply them as desired.");const u=this.configSettingsLoaded.emit({settings:t});if("configSettingsLoaded"in this.eventOverrides&&(await this.eventOverrides.configSettingsLoaded(u,this.nylasSchedulerConnector),u.defaultPrevented))return}const i=(g=this.baseProvider)==null?void 0:g.getStore("scheduler"),a=(f=(h=i==null?void 0:i.get("configSettings"))==null?void 0:h.scheduler)==null?void 0:f.available_days_in_future,s=i==null?void 0:i.get("selectedTimeslot");if(s&&(s!=null&&s.start_time)){if(!this.isTimeslotValid(s))return;if(i!=null&&i.get("showBookingForm")){i==null||i.set("selectedDate",s.start_time);return}}const r=i==null?void 0:i.get("selectedDate"),l=i==null?void 0:i.get("availability");let o;if(!(l&&l.length>0)){if(r){const{startTime:u,endTime:k,endTimeForAvailableDaysInFuture:v}=this.validateAvailableDaysInFuture(r,a||30);r.getTime()<v*1e3&&(o=await((x=this.nylasSchedulerConnector)==null?void 0:x.scheduler.getAvailability(u,k)))}else{const u=new Date,{startTime:k,endTime:v,endTimeForAvailableDaysInFuture:B}=this.validateAvailableDaysInFuture(u,a||30);u.getTime()<B*1e3&&(o=await((y=this.nylasSchedulerConnector)==null?void 0:y.scheduler.getAvailability(k,v)))}if((!o||"error"in o)&&this.nylasSchedulerError.emit({notification:{...this.getErrorObject(o==null?void 0:o.error)},host:this.host}),!r){let u=new Date;const k=i==null?void 0:i.get("availability").find(v=>new Date(v.start_time)>new Date);k&&(u=k.start_time),i==null||i.set("selectedDate",u)}}}componentDisconnected(){var n;(n=this.baseProvider)==null||n.componentDisconnected()}bookingInfoChanged(n){var t;(t=this.stores)==null||t.scheduler.set("bookingInfo",n)}rescheduleBookingRefChanged(n){var t,i;if(n){const[a,s]=e.compactStringToUUIDs(n);(t=this.stores)==null||t.scheduler.set("rescheduleBookingId",s),this.refConfigId=a,(i=this.nylasSchedulerConnector)==null||i.scheduler.setConfigId(a)}}cancelBookingRefChanged(n){var t,i;if(n){const[a,s]=e.compactStringToUUIDs(n);(t=this.stores)==null||t.scheduler.set("cancelBookingId",s),this.refConfigId=a,(i=this.nylasSchedulerConnector)==null||i.scheduler.setConfigId(a)}}organizerConfirmationBookingRefChanged(n){var t,i;if(n){const[a,s]=e.compactStringToUUIDs(n);(t=this.stores)==null||t.scheduler.set("organizerConfirmationBookingId",s),this.refConfigId=a,(i=this.nylasSchedulerConnector)==null||i.scheduler.setConfigId(a)}}localizationChanged(n){n&&Object.keys(n).forEach(t=>{t in Y.LANGUAGE_CODE&&e.instance.addResourceBundle(t,"translation",n[t],!1,!0)})}themeConfigChanged(n){var t,i;(i=(t=this.baseProvider)==null?void 0:t.getStore("scheduler"))==null||i.set("themeConfig",n),this.applyThemeConfig(n)}languageChanged(n){const t=n.detail;this.language=t,e.instance.changeLanguage(t)}async registerComponentHandler(n){var t;(t=this.baseProvider)==null||t.registerComponent(n.detail)}async unregisterComponentHandler(n){var t;(t=this.baseProvider)==null||t.unregisterComponent(n.detail)}async monthChangedHandler(n){var l,o,c,p,m,g,h;const t=n.detail,i=(p=(c=(o=(l=this.nylasSchedulerConnector)==null?void 0:l.schedulerStore)==null?void 0:o.get("configSettings"))==null?void 0:c.scheduler)==null?void 0:p.available_days_in_future,{startTime:a,endTime:s,endTimeForAvailableDaysInFuture:r}=this.validateAvailableDaysInFuture(t,i||30);if(!n.defaultPrevented&&a<r&&t.getTime()<r*1e3){const f=await((m=this.nylasSchedulerConnector)==null?void 0:m.scheduler.getAvailability(a,s));(!f||"error"in f)&&this.nylasSchedulerError.emit({notification:{...this.getErrorObject(f==null?void 0:f.error)},host:this.host});const y=(g=this.stores)==null?void 0:g.scheduler.get("selectableDates");y&&y.length>0&&((h=this.stores)==null||h.scheduler.set("selectedDate",y[0]))}}mapToBookingData(n){var l,o,c;const t=(l=this.stores)==null?void 0:l.scheduler.get("selectedTimeslot"),i=(o=this.stores)==null?void 0:o.scheduler.get("selectedLanguage"),a=(c=this.stores)==null?void 0:c.scheduler.get("selectedTimezone"),s=t!=null&&t.start_time?new Date(t==null?void 0:t.start_time).getTime()/1e3:"",r=t!=null&&t.end_time?new Date(t==null?void 0:t.end_time).getTime()/1e3:"";return{additional_guests:n.guests,guest:{...n.primaryParticipant},additional_fields:{...n.additionalFields},start_time:s,end_time:r,email_language:i,timezone:a}}async bookButtonClickedHandler(n){var c,p,m,g;if(n.defaultPrevented)return;const t=n.detail,i=this.mapToBookingData(t);this.bookingInfoConfirmed=t;const s=(p=(c=this.nylasSchedulerConnector)==null?void 0:c.schedulerStore)==null?void 0:p.get("rescheduleBookingId");if(s){const h=await((m=this.nylasSchedulerConnector)==null?void 0:m.scheduler.rescheduleBooking(s,t));(!h||"error"in h)&&this.nylasSchedulerError.emit({notification:{...this.getErrorObject(h==null?void 0:h.error)},host:this.host});const f=h==null?void 0:h.data,y=this.bookedEventInfo.emit({...h,data:{...f,...i}});this.bookingInfoConfirmed={...this.bookingInfoConfirmed,...f},"bookedEventInfo"in this.eventOverrides&&await this.eventOverrides.bookedEventInfo(y,this.nylasSchedulerConnector);return}const r=await((g=this.nylasSchedulerConnector)==null?void 0:g.scheduler.bookTimeslot(t));(!r||"error"in r)&&this.nylasSchedulerError.emit({notification:{...this.getErrorObject(r==null?void 0:r.error)},host:this.host});const l=r==null?void 0:r.data,o=this.bookedEventInfo.emit({...r,data:{...l,...i}});this.bookingInfoConfirmed={...this.bookingInfoConfirmed,...l},"bookedEventInfo"in this.eventOverrides&&await this.eventOverrides.bookedEventInfo(o,this.nylasSchedulerConnector)}dateSelectedHandler(n){const t=n.detail;this.selectedDateLabel=t?t.toLocaleDateString(this.language,{dateStyle:"full"}):`${e.instance.t("noDateSelected")}`}cancelBookedEventErrorHandler(n){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(n.detail.error)},host:this.host})}cancelBookedEventValidationErrorHandler(n){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(n.detail.error)},host:this.host})}rescheduleBookedEventErrorHandler(n){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(n.detail.error)},host:this.host})}confirmBookingErrorHandler(n){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(n.detail.error)},host:this.host})}feedbackModalClosedHandler(){this.showFeedbackModal=!1}eventIsFullHandler(n){const t=n.detail.error;n.detail.type==="error"?this.nylasSchedulerError.emit({notification:{...this.getErrorObject({message:t})},host:this.host}):this.nylasSchedulerInfo.emit({notification:{title:"Event is full",category:C.ErrorCategory.Component,type:w.nr.Info,description:"The event you selected is full. Please try a different time.",id:new Date().getTime().toString(),ttl:3e3},host:this.host})}feedbackSubmittedHandler(n){const i={eventId:D.captureMessage("Scheduling Page User Feedback",{extra:{configId:this.configurationId,slug:this.slug}}),message:n.detail.feedback};D.captureFeedback(i,{includeReplay:!0,captureContext:{tags:{"nylas-web-element":"nylas-scheduling","nylas-web-element-version":"1.4.3","nylas-config-id":this.configurationId,"nylas-slug":this.slug,"host-url":window.location.href},extra:{configId:this.configurationId,slug:this.slug}}}),this.showFeedbackModal=!1}async getNylasSchedulerStore(){var n;return(n=this.baseProvider)==null?void 0:n.getStore("scheduler")}async getNylasSchedulerConnector(){return this.nylasSchedulerConnector}async getRef(){return this.host}getErrorObject(n){return{title:(n==null?void 0:n.title)||$.title,category:(n==null?void 0:n.category)||$.category,type:w.nr.Error,description:(n==null?void 0:n.message)||"",id:new Date().getTime().toString(),ttl:"none"}}checkIfSessionIdOrConfigIdExists(){if(!this.sessionId&&!this.refConfigId&&!(this.slug&&this.clientId)){let n="";return this.sessionId||(n+=e.instance.t("sessionIdRequiredErrorMessage")),!this.sessionId&&!this.refConfigId&&!(this.slug&&this.clientId)&&(n=e.instance.t("sessionIdRequiredErrorMessage")+" "+e.instance.t("publicConfigErrorMessage")),this.nylasSchedulerError.emit({notification:{title:e.instance.t("schedulingComponentErrorTitle"),category:C.ErrorCategory.Component,type:w.nr.Error,description:n,id:new Date().getTime().toString(),ttl:"none"},host:this.host}),!1}return!0}isTimeslotValid(n){return new Date(n.start_time)<new Date?(this.nylasSchedulerError.emit({notification:{title:e.instance.t("invalidTimeslotErrorTitle"),category:C.ErrorCategory.Component,type:w.nr.Error,description:e.instance.t("invalidTimeslotErrorMessage"),id:new Date().getTime().toString(),ttl:"none"},host:this.host}),!1):!0}validateAvailableDaysInFuture(n,t){const i=new Date,a=new Date(n.getFullYear(),n.getMonth(),1).getTime()/1e3,s=new Date(n.getFullYear(),n.getMonth()+1,1).getTime()/1e3,r=Math.floor(e.addDaysToCurrentDate(i,t).getTime()/1e3),l=Math.min(r,s);return{startTime:a<i.getTime()/1e3?Math.floor(i.getTime()/1e3):a,endTime:l,endTimeForAvailableDaysInFuture:r}}applyThemeConfig(n){if(n)for(const[t,i]of Object.entries(n))this.host.style.setProperty(`${t}`,i)}onFeedbackClick(n){n.preventDefault(),this.showFeedbackModal=!0}redirectToCustomUrl(n){window.location.assign(n)}render(){var y,x,u,k,v,B,z,O,R,P,U,N;const n=this.mode==="app",t=(y=this.baseProvider)==null?void 0:y.getStore("scheduler"),i=t==null?void 0:t.get("eventInfo"),a=t==null?void 0:t.get("showBookingForm"),s=t==null?void 0:t.get("cancelledEventInfo"),r=t==null?void 0:t.get("cancelBookingId"),l=t==null?void 0:t.get("selectedTimeslot"),o=t==null?void 0:t.get("rescheduleBookingId"),c=t==null?void 0:t.get("organizerConfirmationBookingId"),p=t==null?void 0:t.get("rejectBookingId"),m=t==null?void 0:t.get("confirmedEventInfo"),g=(t==null?void 0:t.get("nylasBranding"))||this.nylasBranding,h=t==null?void 0:t.get("selectedDate"),f=(u=(x=t==null?void 0:t.get("configSettings"))==null?void 0:x.scheduler)==null?void 0:u.confirmation_redirect_url;if(this.selectedDateLabel=h&&this.language?e.capitalizeFirstLetter(h.toLocaleDateString(this.language,{dateStyle:"full"})):`${e.instance.t("noDateSelected")}`,n&&(r||p)&&!s)return e.h(e.Host,null,e.h(I,{nylasBranding:g,isLoading:this.isLoading,showNotification:this.showNotification},e.h("div",{class:"cancel-flow-page",part:"cancel-flow-page"},e.h("nylas-cancel-booking-form",{selectedTimeslot:l,cancelBookingId:r,rejectBookingId:p,exportparts:"ncbf, ncbf__icon, ncbf__title, ncbf__description, ncbf__reason-textarea, ncbf__button-cta, ncbf__button-outline, ncbf__card"}))),this.enableUserFeedback&&e.h("button-component",{id:"report-issue",variant:"basic",onClick:d=>this.onFeedbackClick(d)},e.h("feedback-icon",null)),this.showFeedbackModal&&e.h("nylas-feedback-form",null));if(n&&c)return e.h(e.Host,null,e.h(I,null,e.h("div",{class:"manual-confirmation-page",part:"manual-confirmation-page"},e.h("nylas-organizer-confirmation-card",{organizerConfirmationBookingId:c,exportparts:"nmcc, nmcc__title, nmcc__description, nmcc__button-cta, nmcc__button-outline"}))),this.enableUserFeedback&&e.h("button-component",{id:"report-issue",variant:"basic",onClick:d=>this.onFeedbackClick(d)},e.h("feedback-icon",null)),this.showFeedbackModal&&e.h("nylas-feedback-form",null));if(n&&s)return e.h(e.Host,null,e.h(I,{nylasBranding:g,isLoading:this.isLoading,showNotification:this.showNotification},e.h("div",{class:"cancelled-event-page",part:"cancelled-event-page"},e.h("nylas-cancelled-event-card",{cancelledEventInfo:s,exportparts:"ncec, ncec__icon, ncec__title, ncec__description, ncec__button-outline, ncec__card"}))),this.enableUserFeedback&&e.h("button-component",{id:"report-issue",variant:"basic",onClick:d=>this.onFeedbackClick(d)},e.h("feedback-icon",null)),this.showFeedbackModal&&e.h("nylas-feedback-form",null));if(n&&m)return e.h(e.Host,null,e.h(I,{nylasBranding:g,isLoading:this.isLoading,showNotification:this.showNotification},e.h("div",{class:"cancelled-event-page",part:"confirmed-event-page"},e.h("nylas-confirmed-event-card",{confirmedEventInfo:m,exportparts:"ncec, ncec__icon, ncec__title, ncec__description, ncec__button-outline, ncec__card"}))),this.enableUserFeedback&&e.h("button-component",{id:"report-issue",variant:"basic",onClick:d=>this.onFeedbackClick(d)},e.h("feedback-icon",null)),this.showFeedbackModal&&e.h("nylas-feedback-form",null));if(n&&i&&f){const d=(k=this.bookingInfoConfirmed)==null?void 0:k.primaryParticipant,T=(v=this.bookingInfoConfirmed)==null?void 0:v.location,M=(B=this.bookingInfoConfirmed)==null?void 0:B.booking_ref,F=((z=this.bookingInfoConfirmed)==null?void 0:z.additionalFields)||{};if(this.bookingInfo&&typeof((O=this.bookingInfo)==null?void 0:O.additionalFields)<"u"){const E=this.bookingInfo.additionalFields;Object.keys(E).forEach(L=>{!F[L]&&(E!=null&&E[L])&&(F[L]=E[L].value)})}const _=(R=this.stores)==null?void 0:R.scheduler.get("selectedTimeslot"),A=(P=this.stores)==null?void 0:P.scheduler.get("selectedTimezone"),j=(U=this.stores)==null?void 0:U.scheduler.get("selectedLanguage"),S=(N=this.stores)==null?void 0:N.scheduler.get("configSettings"),H=this.configurationId?this.configurationId:S==null?void 0:S.configuration_id,G=window.location.search,b=new URLSearchParams(G);b.set("booking_id",i.booking_id),d!=null&&d.name&&b.set("name",d.name),d!=null&&d.email&&b.set("email",d.email),_!=null&&_.start_time&&b.set("start_time",(new Date(_.start_time).getTime()/1e3).toString()),_!=null&&_.end_time&&b.set("end_time",(new Date(_.end_time).getTime()/1e3).toString()),A&&b.set("tz",A),j&&b.set("language",j),F&&b.set("additional_values",JSON.stringify(F)),this.slug&&b.set("page_slug",this.slug),H&&b.set("config_id",H),T&&b.set("location",T),M&&b.set("booking_ref",M),this.redirectToCustomUrl(`${f}?${b.toString()}`);return}if(n&&i)return e.h(e.Host,null,e.h(I,{nylasBranding:g,isLoading:this.isLoading,showNotification:this.showNotification},e.h("div",{class:"booked-event-page",part:"booked-event-page ns_booked-event-page"},e.h("nylas-booked-event-card",{selectedTimeslot:l,eventInfo:i,exportparts:"nbec, nbec__title, nbec__card, nbec__description, nbec__button-outline, nbec__cancel-cta, nbec__reschedule-cta"}))),this.enableUserFeedback&&e.h("button-component",{id:"report-issue",variant:"basic",onClick:d=>this.onFeedbackClick(d)},e.h("feedback-icon",null)),this.showFeedbackModal&&e.h("nylas-feedback-form",null));if(n&&(!i||o)&&!a){const d=this.host.querySelector('[slot="timeslot-picker-cta-label"]');return e.h(e.Host,null,e.h(I,{nylasBranding:g,isLoading:this.isLoading,showNotification:this.showNotification},o&&e.h(q,null,`${e.instance.t("rescheduleTitle")}`),e.h("div",{class:"select-date-page",part:"select-date-page ns_select-date-page"},e.h("div",{class:"left-panel",part:"ns_left-panel"},e.h("nylas-date-picker",{exportparts:"ndp, ndp__title, ndp__month-header, ndp__month-button, ndp__day, ndp__date, ndp__date--disabled, ndp__date--selected, ndp__date--current-day, ndp__date--current-month"}),e.h("nylas-locale-switch",{exportparts:"nls, nls__timezone, nls__timezone-dropdown, nls__timezone-drop-button, nls__timezone-drop-button-selected-label, nls__timezone-drop-content, nls__timezone-drop-label, nls__language, nls__language-dropdown, nls__language-drop-button, nls__language-drop-content, nls__language-drop-label"})),e.h("div",{class:`right-panel ${o?"reschedule":""}`,part:`ns_right-panel ${o?"ns_reschedule":""}`},e.h("h2",{part:"ns_right-panel__title"},e.h("calendar-icon",{part:"ns_right-panel__calendar-icon"}),e.h("span",{id:"selectedDate",part:"ns_right-panel__selected-date"},this.selectedDateLabel)),e.h("nylas-timeslot-picker",{exportparts:"ntp, ntp__time-picker-wrapper, ntp__timeslots, ntp__timeslot, ntp__timeslot--selected, ntp__button-primary"},d&&e.h("span",{slot:"timeslot-picker-cta-label"},e.h("slot",{name:"timeslot-picker-cta-label"})))))),this.enableUserFeedback&&e.h("button-component",{id:"report-issue",variant:"basic",onClick:T=>this.onFeedbackClick(T)},e.h("feedback-icon",null)),this.showFeedbackModal&&e.h("nylas-feedback-form",null))}return n&&!i&&a?e.h(e.Host,null,e.h(I,{nylasBranding:g,isLoading:this.isLoading,showNotification:this.showNotification},o&&e.h(q,null,`${e.instance.t("rescheduleTitle")}`),e.h("div",{class:"additional-data-page",part:"additional-data-page ns_additional-data-page"},e.h("div",{class:"left-panel ns_left-panel",part:"ns_left-panel"},e.h("div",{class:"wrapper",part:"ns_left-panel__wrapper"},e.h("nylas-selected-event-card",{exportparts:"nsec, nsec__card, nsec__icon, nsec__date, nsec__time, nsec__timezone"}))),e.h("div",{class:`right-panel ${o?"reschedule":""}`,part:`ns_right-panel ${o?"ns_reschedule":""}`},e.h("nylas-booking-form",{exportparts:"nbf, nbf__input-textfield, nbf__button-ghost, nbf__button-outline, nbf__button-primary, nbf__input-wrapper, nbf__checkbox-component, nbf__radio-button-group, nbf__textarea-component, nbf__dropdown, nbf__dropdown-button, nbf__dropdown-content"})))),this.enableUserFeedback&&e.h("button-component",{id:"report-issue",variant:"basic",onClick:d=>this.onFeedbackClick(d)},e.h("feedback-icon",null)),this.showFeedbackModal&&e.h("nylas-feedback-form",null)):e.h(e.Host,null,e.h("slot",null))}get host(){return e.getElement(this)}static get watchers(){return{bookingInfo:["bookingInfoChanged"],rescheduleBookingRef:["rescheduleBookingRefChanged"],cancelBookingRef:["cancelBookingRefChanged"],organizerConfirmationBookingRef:["organizerConfirmationBookingRefChanged"],localization:["localizationChanged"],themeConfig:["themeConfigChanged"]}}};W.style=Q;exports.nylas_scheduling=W;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-efb6db79.cjs"),C=require("./notebook-store-b61693cd-6515d345.cjs");require("react");require("react/jsx-runtime");require("react-dom");const p=new CSSStyleSheet;p.replaceSync(`
|
|
2
|
-
:host {
|
|
3
|
-
font-family: Arial, sans-serif;
|
|
4
|
-
}
|
|
5
|
-
`);const i=t.createStore({style:p,toolbarState:"default",searchTerm:""}),f=({width:r,height:e,fill:n})=>t.h("svg",{viewBox:"0 0 16 16",width:r,height:e,xmlns:"http://www.w3.org/2000/svg"},t.h("path",{d:"M9.30887 10.016C8.53903 10.6318 7.56252 11 6.5 11C4.01472 11 2 8.98531 2 6.50002C2 4.01473 4.01472 2 6.5 2C8.98528 2 11 4.01473 11 6.50002C11 7.56252 10.6318 8.53901 10.016 9.30885L13.8536 13.1464C14.0488 13.3417 14.0488 13.6583 13.8536 13.8536C13.6583 14.0488 13.3417 14.0488 13.1464 13.8536L9.30887 10.016ZM10 6.50002C10 4.56701 8.433 3 6.5 3C4.567 3 3 4.56701 3 6.50002C3 8.43302 4.567 10 6.5 10C8.433 10 10 8.43302 10 6.50002Z",fill:n})),h=({width:r,height:e,fill:n,className:s})=>t.h("svg",{width:r,height:e,class:s,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"},t.h("path",{d:"M4.00029 4.08525L4 10.5C4 11.8255 5.03154 12.91 6.33562 12.9947L6.5 13L10.9144 13.0007C10.7083 13.5829 10.1528 14 9.5 14H6C4.34315 14 3 12.6569 3 11V5.5C3 4.84678 3.41754 4.29109 4.00029 4.08525ZM11.5 2C12.3284 2 13 2.67157 13 3.5V10.5C13 11.3284 12.3284 12 11.5 12H6.5C5.67157 12 5 11.3284 5 10.5V3.5C5 2.67157 5.67157 2 6.5 2H11.5ZM11.5 3H6.5C6.22386 3 6 3.22386 6 3.5V10.5C6 10.7761 6.22386 11 6.5 11H11.5C11.7761 11 12 10.7761 12 10.5V3.5C12 3.22386 11.7761 3 11.5 3Z",fill:n})),b=({width:r,height:e,fill:n})=>t.h("svg",{width:r,height:e,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"},t.h("path",{d:"M8 14C11.3137 14 14 11.3137 14 8C14 4.68629 11.3137 2 8 2C4.68629 2 2 4.68629 2 8C2 11.3137 4.68629 14 8 14ZM8 3C8.37372 3 8.87543 3.35608 9.31258 4.31781C9.4073 4.52619 9.49448 4.75446 9.57265 5H6.42735C6.50552 4.75446 6.5927 4.52619 6.68742 4.31781C7.12457 3.35608 7.62628 3 8 3ZM5.77705 3.90401C5.62614 4.23601 5.49428 4.6038 5.38411 5H3.99963C4.52341 4.30269 5.22525 3.74677 6.03766 3.39978C5.94287 3.56117 5.85596 3.7304 5.77705 3.90401ZM5.16299 6C5.05694 6.6275 5 7.30146 5 8C5 8.69854 5.05694 9.3725 5.16299 10H3.41604C3.14845 9.38754 3 8.7111 3 8C3 7.2889 3.14845 6.61246 3.41604 6H5.16299ZM5.38411 11C5.49428 11.3962 5.62614 11.764 5.77705 12.096C5.85596 12.2696 5.94287 12.4388 6.03766 12.6002C5.22525 12.2532 4.52341 11.6973 3.99963 11H5.38411ZM6.42735 11H9.57265C9.49448 11.2455 9.4073 11.4738 9.31258 11.6822C8.87543 12.6439 8.37372 13 8 13C7.62628 13 7.12457 12.6439 6.68742 11.6822C6.5927 11.4738 6.50552 11.2455 6.42735 11ZM9.82134 10H6.17866C6.06438 9.3892 6 8.71396 6 8C6 7.28604 6.06438 6.6108 6.17866 6H9.82134C9.93562 6.6108 10 7.28604 10 8C10 8.71396 9.93562 9.3892 9.82134 10ZM10.6159 11H12.0004C11.4766 11.6973 10.7747 12.2532 9.96234 12.6002C10.0571 12.4388 10.144 12.2696 10.2229 12.096C10.3739 11.764 10.5057 11.3962 10.6159 11ZM12.584 10H10.837C10.9431 9.3725 11 8.69854 11 8C11 7.30146 10.9431 6.6275 10.837 6H12.584C12.8516 6.61246 13 7.2889 13 8C13 8.7111 12.8516 9.38754 12.584 10ZM9.96234 3.39978C10.7747 3.74677 11.4766 4.30269 12.0004 5H10.6159C10.5057 4.6038 10.3739 4.23601 10.2229 3.90401C10.144 3.7304 10.0571 3.56117 9.96234 3.39978Z",fill:n})),d=i.get,o=i.set,l=(r,e)=>d(r)===e;function y({transcripts:r}){const e=()=>{o("searchTerm",""),o("toolbarState","default")},n=async()=>{const s={"text/plain":r.map(a=>`${a.ts} ${a.speaker}: ${a.text}`).join(`
|
|
6
|
-
`)},c=new ClipboardItem(s);await navigator.clipboard.write([c])};return t.h("div",{class:"toolbar"},l("toolbarState","default")&&t.h("div",{class:"controls"},t.h("button",{onClick:()=>o("toolbarState","search")},t.h(f,{height:16,fill:"#2C2C2C"}),"Search"),t.h("button",{onClick:n},t.h(h,{height:16,fill:"#2C2C2C"}),"Copy"),t.h("button",{onClick:()=>o("toolbarState","language")},t.h(b,{height:16,fill:"#2C2C2C"}),"Language")),l("toolbarState","search")&&t.h("div",{class:"search"},t.h("input",{type:"text",value:d("searchTerm"),onInput:s=>o("searchTerm",s.target.value),onKeyDown:s=>s.key==="Escape"&&e(),placeholder:"Search transcript",autoFocus:!0}),t.h("button",{class:"clear",onClick:e},"Cancel")),l("toolbarState","language")&&t.h("div",{class:"language"},t.h("select",null,t.h("option",{value:"en"},"English"),t.h("option",{value:"fr"},"French")),t.h("button",{class:"regenerate"},"Regenerate"),t.h("button",{class:"clear",onClick:e},"Done")))}const x=':host{--background:white;--font-family:"Inter", sans-serif;--border-radius:8px}.nylas-transcript{background-color:var(--background);border-radius:var(--border-radius);border:1px solid #e0e6f9;font-size:14px;font-family:var(--font-family);font-optical-sizing:auto}.nylas-transcript .toolbar{padding:20px 20px}.nylas-transcript .toolbar input,.nylas-transcript .toolbar select{border:1px solid #4169e1;padding:10px 20px;border-radius:6px;width:100%}.nylas-transcript .toolbar button.clear{background:none;border:none;cursor:pointer;font-size:14px;font-family:var(--font-family)}.nylas-transcript .toolbar .controls{display:flex;align-items:center;justify-content:stretch;gap:6px}.nylas-transcript .toolbar .controls button{font-family:var(--font-family);cursor:pointer;background-color:white;border:1px solid #c7dbf9;border-radius:8px;padding-top:12px;padding-bottom:12px;flex-grow:1;letter-spacing:-4%;display:flex;align-items:center;justify-content:center}.nylas-transcript .toolbar .controls button svg{margin-right:6px}.nylas-transcript .toolbar .controls button:active{background-color:#f0f4f9}.nylas-transcript .toolbar .search,.nylas-transcript .toolbar .language{display:flex;align-items:center;justify-content:space-between;gap:20px}.nylas-transcript .language button.regenerate{width:93px;border-radius:8px;padding:12px 8px;text-align:center;outline:0;border:none;background-color:#4169e1;color:white}.nylas-transcript .transcripts{max-height:50vh;overflow-y:auto;border-top:1px solid #ebeff6}.nylas-transcript .transcripts .no-results{padding:20px;text-align:center;color:rgba(0, 0, 0, 0.6)}.nylas-transcript .transcripts .transcripts-item{padding:16px 18px;gap:20px;display:flex;line-height:24px;border-bottom:1px solid #ebeff6;transition:0.5s background-color ease-in-out;font-size:14px}.nylas-transcript .transcripts .transcripts-item .highlight{background-color:yellow}.nylas-transcript .transcripts .transcripts-item .copy-btn{fill:#4b4b4b;cursor:pointer;width:24px;transition:0.3s transform ease-in-out}.nylas-transcript .transcripts .transcripts-item .copy-btn:active{fill:#9747ff;transform:scale(2)}.nylas-transcript .transcripts .transcripts-item .speaker{font-weight:500;font-size:16px;margin-bottom:0.5rem}.nylas-transcript .transcripts .transcripts-item.active{background-color:#ebeff6}.nylas-transcript .transcripts .transcripts-item .time{color:#9747ff;font-weight:600;min-width:60px}',m=x;t.dayjs.extend(t.utc);const v=({text:r,highlight:e})=>(e&&(r=r.replace(new RegExp(e,"gi"),`<span class="highlight">${e}</span>`)),t.h("div",{innerHTML:r})),u=class{constructor(r){t.registerInstance(this,r),this.focusedIndex=-1,this.autoscroll=!0,this.transcript=void 0}componentDidLoad(){i.onChange("style",r=>{console.log("Style change",r),this.el.shadowRoot&&r&&(this.el.shadowRoot.adoptedStyleSheets=[r])})}get transcripts(){var c;const r=C.videoStore.get("videoTime"),e=i.get("searchTerm");if(!this.transcript)return[];const n=this.transcript.findIndex(a=>a.start/1e3>=r)-1;n>=0&&this.autoscroll&&((c=this.transcriptContainer.querySelector(".active"))==null||c.scrollIntoView({behavior:"smooth",block:"center"}));let s=this.transcript.map((a,g)=>({...a,active:g===n,ts:a.start?this.secondsToStr(a.start):null}));return e&&(s=s.filter(a=>a.text.toLowerCase().includes(e.toLowerCase()))),s}secondsToStr(r){return r<36e5?t.dayjs.utc(r).format("mm:ss"):t.dayjs.utc(r).format("HH:mm:ss")}handleCopy(r){navigator.clipboard.writeText(`${r.ts} ${r.speaker}: ${r.text}`)}render(){return t.h("div",{key:"690629131ffa02c83db097568bcb9d983934a52d",class:"nylas-transcript"},t.h(y,{key:"e259b18c6f56c48881b305e87540ccf8752299ad",transcripts:this.transcripts}),t.h("div",{key:"e9fd658295e29bf38877e3bf30c324710e732b8a",class:"transcripts",ref:r=>this.transcriptContainer=r},!this.transcripts.length&&t.h("div",{class:"no-results"},"Transcript not available."),this.transcripts.map((r,e)=>t.h("div",{class:{"transcripts-item":!0,active:r.active},onPointerEnter:()=>this.focusedIndex=e,onPointerLeave:()=>this.focusedIndex=-1},r.ts&&t.h("div",{class:"time"},this.focusedIndex===e?t.h("span",{onClick:()=>this.handleCopy(r)},t.h(h,{className:"copy-btn"})):r.ts),t.h("div",{class:"message"},t.h("div",{class:"speaker"},r.speaker),t.h(v,{text:r.text,highlight:i.get("searchTerm")}))))))}get el(){return t.getElement(this)}};u.style=m;exports.nylas_transcript=u;
|