@nylas/react 1.1.0-canary.24 → 1.1.0-canary.25
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 +110 -2
- package/dist/add-circle-icon_2.entry-7165bd0e.js +25 -0
- package/dist/add-circle-icon_2.entry-f1ddca18.cjs +1 -0
- package/dist/{archive-icon_7.entry-0d379e81.js → archive-icon_7.entry-7411c224.js} +14 -14
- package/dist/{archive-icon_7.entry-464293d2.cjs → archive-icon_7.entry-e3df60ed.cjs} +1 -1
- package/dist/{arrow-icon.entry-4e6fe7be.cjs → arrow-icon.entry-280e18b0.cjs} +1 -1
- package/dist/arrow-icon.entry-38949317.js +15 -0
- package/dist/{bold-icon_3.entry-5f0eedfe.js → bold-icon_3.entry-5963945c.js} +4 -4
- package/dist/{bold-icon_3.entry-ba65ceeb.cjs → bold-icon_3.entry-5dffbedd.cjs} +1 -1
- package/dist/{button-component_2.entry-1290a222.js → button-component_2.entry-237733b4.js} +6 -6
- package/dist/{button-component_2.entry-ae5e68ec.cjs → button-component_2.entry-b29d2873.cjs} +1 -1
- package/dist/{calendar-agenda-fill-icon_48.entry-4ae8cc76.js → calendar-agenda-fill-icon_48.entry-9afba869.js} +219 -227
- package/dist/calendar-agenda-fill-icon_48.entry-d3830dbb.cjs +7 -0
- package/dist/{calendar-cancel-icon.entry-6506440a.cjs → calendar-cancel-icon.entry-77ccf227.cjs} +1 -1
- package/dist/{calendar-cancel-icon.entry-d2f0c9e0.js → calendar-cancel-icon.entry-780723a6.js} +4 -4
- package/dist/{calendar-check-icon_2.entry-5212c5b3.js → calendar-check-icon_2.entry-2c89c230.js} +7 -7
- package/dist/{calendar-check-icon_2.entry-0f70758f.cjs → calendar-check-icon_2.entry-b37ac7f0.cjs} +1 -1
- package/dist/{calendar-icon.entry-b7626be4.js → calendar-icon.entry-02dd3990.js} +6 -6
- package/dist/{calendar-icon.entry-f10bd734.cjs → calendar-icon.entry-ffc93569.cjs} +1 -1
- package/dist/{checkbox-component_2.entry-879250a5.cjs → checkbox-component_2.entry-00b6a1e9.cjs} +1 -1
- package/dist/{checkbox-component_2.entry-7ce6d945.js → checkbox-component_2.entry-ee9d0e6c.js} +3 -3
- package/dist/{chevron-icon_3.entry-a2f9e9ba.cjs → chevron-icon_3.entry-468abc26.cjs} +1 -1
- package/dist/{chevron-icon_3.entry-8c9ca484.js → chevron-icon_3.entry-f62e9ef1.js} +10 -10
- package/dist/{clock-icon_4.entry-3d9d8690.js → clock-icon_4.entry-766a1b23.js} +18 -18
- package/dist/{clock-icon_4.entry-7ecb071a.cjs → clock-icon_4.entry-7dc2cc4a.cjs} +1 -1
- package/dist/{constants-50c3e067-8cc8e601.js → constants-50c3e067-8a40a5fe.js} +1 -1
- package/dist/{constants-50c3e067-da2d4786.cjs → constants-50c3e067-9f2a6372.cjs} +1 -1
- package/dist/{copy-icon.entry-38cfea6b.js → copy-icon.entry-2a841508.js} +5 -5
- package/dist/{copy-icon.entry-0a80a55e.cjs → copy-icon.entry-e5251410.cjs} +1 -1
- package/dist/{delete-icon_2.entry-9e7cf99e.cjs → delete-icon_2.entry-1a5c39dc.cjs} +1 -1
- package/dist/{delete-icon_2.entry-f9a43051.js → delete-icon_2.entry-64555a2f.js} +5 -5
- package/dist/{document-refresh-icon.entry-827975fd.js → document-refresh-icon.entry-4bf6398b.js} +5 -5
- package/dist/document-refresh-icon.entry-fdc7ddda.cjs +1 -0
- package/dist/{elements-dc5b338e-0f8b5d33.js → elements-dc5b338e-2da1fe61.js} +1 -1
- package/dist/{elements-dc5b338e-3a7e1134.cjs → elements-dc5b338e-c8016c3d.cjs} +1 -1
- package/dist/{focus-visible-e8093c16-088a527d.cjs → focus-visible-e8093c16-0a38a184.cjs} +1 -1
- package/dist/{focus-visible-e8093c16-40f0c20e.js → focus-visible-e8093c16-9d0c98c0.js} +1 -1
- package/dist/{forward-icon_6.entry-f984a68b.js → forward-icon_6.entry-390ef70a.js} +9 -9
- package/dist/{forward-icon_6.entry-a8f80871.cjs → forward-icon_6.entry-7238ef38.cjs} +2 -2
- package/dist/{globe-icon.entry-c50fc96c.cjs → globe-icon.entry-81f42f89.cjs} +1 -1
- package/dist/{globe-icon.entry-a78c8ea8.js → globe-icon.entry-8d106260.js} +4 -4
- package/dist/{google-logo-icon_4.entry-710632b6.js → google-logo-icon_4.entry-aabd3886.js} +15 -15
- package/dist/google-logo-icon_4.entry-fa2b8999.cjs +1 -0
- package/dist/index-53420959-5fc8ad2b.js +5 -0
- package/dist/index-53420959-fcf45780.cjs +1 -0
- package/dist/{index-eca7f3e2.js → index-5ccfd9df.js} +50 -50
- package/dist/{index-6d9eeb53-407c797a.js → index-6d9eeb53-58c8980a.js} +2 -2
- package/dist/{index-6d9eeb53-cac6eaea.cjs → index-6d9eeb53-b2a6d09f.cjs} +1 -1
- package/dist/{index-a3051853.cjs → index-eb33703c.cjs} +3 -3
- package/dist/{index.es-17b386f4-856af8bb.js → index.es-c9454237-00ccd1e6.js} +1 -1
- package/dist/{index.es-17b386f4-c6a8cc2a.cjs → index.es-c9454237-b64161d1.cjs} +1 -1
- package/dist/{info-icon_2.entry-c08c459c.cjs → info-icon_2.entry-b2e11336.cjs} +1 -1
- package/dist/{info-icon_2.entry-ffd39ba3.js → info-icon_2.entry-bb8ed71c.js} +5 -5
- package/dist/{input-component.entry-35e6e399.cjs → input-component.entry-378b1ccc.cjs} +1 -1
- package/dist/{input-component.entry-c09124d3.js → input-component.entry-cb86170f.js} +5 -5
- package/dist/{input-dropdown.entry-9ac3e157.cjs → input-dropdown.entry-98954c93.cjs} +1 -1
- package/dist/{input-dropdown.entry-83f2c378.js → input-dropdown.entry-a76c339e.js} +2 -2
- package/dist/{mailbox-store-2e401c7f-66a87143.cjs → mailbox-store-edc386fc-156b7236.cjs} +1 -1
- package/dist/{mailbox-store-2e401c7f-9d607fd1.js → mailbox-store-edc386fc-8bc7558b.js} +2 -2
- package/dist/{multi-select-dropdown.entry-8710acb4.cjs → multi-select-dropdown.entry-40b855e1.cjs} +1 -1
- package/dist/{multi-select-dropdown.entry-2c2125e3.js → multi-select-dropdown.entry-6b686695.js} +2 -2
- package/dist/{nylas-booked-event-card_12.entry-009a11e3.cjs → nylas-booked-event-card_12.entry-9d693125.cjs} +1 -1
- package/dist/{nylas-booked-event-card_12.entry-5821b0c4.js → nylas-booked-event-card_12.entry-e861bb16.js} +13 -13
- package/dist/{nylas-form-card.entry-0ce9dd7d.js → nylas-form-card.entry-b158d789.js} +18 -18
- package/dist/{nylas-form-card.entry-951163a1.cjs → nylas-form-card.entry-ca4a8746.cjs} +1 -1
- package/dist/{nylas-if-state.entry-474cfdcd.js → nylas-if-state.entry-8e4d922c.js} +8 -8
- package/dist/{nylas-if-state.entry-16aabbff.cjs → nylas-if-state.entry-95fac42d.cjs} +1 -1
- package/dist/{nylas-list-folders.entry-a9e53520.js → nylas-list-folders.entry-83c39684.js} +7 -7
- package/dist/{nylas-list-folders.entry-f0a4d566.cjs → nylas-list-folders.entry-8a22e0c8.cjs} +1 -1
- package/dist/{nylas-list-threads.entry-7fc8b71d.cjs → nylas-list-threads.entry-54c582af.cjs} +1 -1
- package/dist/{nylas-list-threads.entry-5af74949.js → nylas-list-threads.entry-7ea370e1.js} +3 -3
- package/dist/{nylas-login.entry-acbdf23c.js → nylas-login.entry-9115fd81.js} +7 -7
- package/dist/{nylas-login.entry-d0fcf7c4.cjs → nylas-login.entry-fb627e40.cjs} +1 -1
- package/dist/{nylas-mailbox-pagination.entry-a70e4777.cjs → nylas-mailbox-pagination.entry-04626d27.cjs} +1 -1
- package/dist/{nylas-mailbox-pagination.entry-01f32d0c.js → nylas-mailbox-pagination.entry-3ff02cf9.js} +2 -2
- package/dist/{nylas-mailbox-toolbar-button.entry-208b2667.cjs → nylas-mailbox-toolbar-button.entry-8d00c789.cjs} +1 -1
- package/dist/{nylas-mailbox-toolbar-button.entry-a8166cf0.js → nylas-mailbox-toolbar-button.entry-f752e925.js} +7 -7
- package/dist/{nylas-mailbox.entry-bbd33bb0.js → nylas-mailbox.entry-99c27b6c.js} +6 -6
- package/dist/{nylas-mailbox.entry-7a3562b6.cjs → nylas-mailbox.entry-b3974f4e.cjs} +1 -1
- package/dist/{nylas-provider.entry-9cce7730.cjs → nylas-provider.entry-a3ad02a5.cjs} +1 -1
- package/dist/{nylas-provider.entry-7e8aedea.js → nylas-provider.entry-c206aa32.js} +6 -6
- package/dist/{nylas-reminder-emails.entry-a1b49b18.js → nylas-reminder-emails.entry-414ce6fe.js} +9 -9
- package/dist/nylas-reminder-emails.entry-59c07bfe.cjs +4 -0
- package/dist/{nylas-reminder-time_2.entry-6f6067f9.js → nylas-reminder-time_2.entry-197d83a0.js} +6 -6
- package/dist/{nylas-reminder-time_2.entry-0a480ab7.cjs → nylas-reminder-time_2.entry-d79dcd85.cjs} +1 -1
- package/dist/{nylas-scheduler-editor.entry-625d597e.js → nylas-scheduler-editor.entry-7f389982.js} +25 -25
- package/dist/{nylas-scheduler-editor.entry-6be8e9c6.cjs → nylas-scheduler-editor.entry-f1c6964a.cjs} +2 -2
- package/dist/nylas-scheduling.entry-1a8bd6fc.cjs +1 -0
- package/dist/{nylas-scheduling.entry-fa471c9e.js → nylas-scheduling.entry-4fa5381d.js} +126 -121
- package/dist/{nylas-threads-refresh.entry-da68039b.js → nylas-threads-refresh.entry-20602e7b.js} +11 -11
- package/dist/{nylas-threads-refresh.entry-77015d63.cjs → nylas-threads-refresh.entry-56b53449.cjs} +1 -1
- package/dist/{nylas-threads-search.entry-27472aef.js → nylas-threads-search.entry-8872473c.js} +7 -7
- package/dist/{nylas-threads-search.entry-8f765c67.cjs → nylas-threads-search.entry-8e0ec3ae.cjs} +1 -1
- package/dist/{nylas-time-window-picker.entry-e8842700.js → nylas-time-window-picker.entry-9ac542b7.js} +2 -2
- package/dist/{nylas-time-window-picker.entry-a59d7be6.cjs → nylas-time-window-picker.entry-ca47f721.cjs} +1 -1
- package/dist/{nylas-view-thread.entry-16cc4066.cjs → nylas-view-thread.entry-1f758e43.cjs} +1 -1
- package/dist/{nylas-view-thread.entry-322a9890.js → nylas-view-thread.entry-dcd3d5be.js} +3 -3
- package/dist/{person-icon.entry-fd56c344.cjs → person-icon.entry-63b28ace.cjs} +1 -1
- package/dist/{person-icon.entry-b62da62d.js → person-icon.entry-93130c05.js} +4 -4
- package/dist/play-icon_2.entry-6a99c32d.js +25 -0
- package/dist/play-icon_2.entry-b67fb649.cjs +1 -0
- package/dist/react.cjs +1 -1
- package/dist/react.js +1 -1
- package/dist/{refresh-icon.entry-99d7fbcb.js → refresh-icon.entry-84783c91.js} +2 -2
- package/dist/{refresh-icon.entry-5427ec8d.cjs → refresh-icon.entry-b49792fc.cjs} +1 -1
- package/dist/{register-component-4487ac6f-b29bf135.cjs → register-component-887199a9-003f96c5.cjs} +1 -1
- package/dist/{register-component-4487ac6f-4b0c1c53.js → register-component-887199a9-b41dfa7a.js} +1 -1
- package/dist/{scheduler-config-store-2a3b403d-810ef774.js → scheduler-config-store-2a3b403d-73610089.js} +1 -1
- package/dist/{scheduler-config-store-2a3b403d-51c51cff.cjs → scheduler-config-store-2a3b403d-a5e3433a.cjs} +1 -1
- package/dist/{scheduler-store-55107657-6c0c5de4.js → scheduler-store-fe281404-bddb1b6a.js} +1 -1
- package/dist/{scheduler-store-55107657-25845a8b.cjs → scheduler-store-fe281404-c3e477f6.cjs} +1 -1
- package/dist/textarea-component.entry-28c4bc05.cjs +1 -0
- package/dist/textarea-component.entry-40e959e5.js +36 -0
- package/dist/{time-period-selector.entry-d7792301.cjs → time-period-selector.entry-af71523a.cjs} +1 -1
- package/dist/{time-period-selector.entry-a6c6aefd.js → time-period-selector.entry-da5d8652.js} +2 -2
- package/dist/{translate-icon.entry-d65cfcea.js → translate-icon.entry-92b83635.js} +5 -5
- package/dist/{translate-icon.entry-4970d886.cjs → translate-icon.entry-a2ed4f76.cjs} +1 -1
- package/dist/{warning-icon.entry-eb7da408.js → warning-icon.entry-19f721c3.js} +4 -4
- package/dist/{warning-icon.entry-870059cb.cjs → warning-icon.entry-3ab9a59e.cjs} +1 -1
- package/package.json +3 -3
- package/dist/add-circle-icon_2.entry-4a6b44be.js +0 -25
- package/dist/add-circle-icon_2.entry-b0e8cb94.cjs +0 -1
- package/dist/arrow-icon.entry-3c2e4e0d.js +0 -15
- package/dist/calendar-agenda-fill-icon_48.entry-eaa36515.cjs +0 -7
- package/dist/document-refresh-icon.entry-5d6c4a99.cjs +0 -1
- package/dist/google-logo-icon_4.entry-14d75c66.cjs +0 -1
- package/dist/index-53420959-78cc8138.cjs +0 -1
- package/dist/index-53420959-da9158f8.js +0 -5
- package/dist/nylas-reminder-emails.entry-287316b6.cjs +0 -4
- package/dist/nylas-scheduling.entry-1678be21.cjs +0 -1
- package/dist/play-icon_2.entry-d0a67f7b.js +0 -25
- package/dist/play-icon_2.entry-d17c9937.cjs +0 -1
- package/dist/textarea-component.entry-8bdfbcc9.cjs +0 -1
- package/dist/textarea-component.entry-9803d3c3.js +0 -36
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { k as
|
|
2
|
-
import { n as
|
|
3
|
-
import { E, C as
|
|
4
|
-
import { L as
|
|
1
|
+
import { k as h, r as z, c as _, d as E, l as I, m as O, n as N, h as n, H as y, g as A, F as D } from "./index-5ccfd9df.js";
|
|
2
|
+
import { n as x, N as P } from "./index.es-c9454237-00ccd1e6.js";
|
|
3
|
+
import { E as B, C as F, N as S } from "./scheduler-store-fe281404-bddb1b6a.js";
|
|
4
|
+
import { L as j, a as M } from "./constants-50c3e067-8a40a5fe.js";
|
|
5
5
|
import "react";
|
|
6
6
|
import "react-dom";
|
|
7
|
-
class
|
|
8
|
-
constructor({ schedulerAPIURL: e, nylasSchedulerStore:
|
|
7
|
+
class H {
|
|
8
|
+
constructor({ schedulerAPIURL: e, nylasSchedulerStore: i, sessionId: o, configId: s, slug: d, clientId: r }) {
|
|
9
9
|
if (!e)
|
|
10
10
|
throw new Error("schedulerAPIURL is required");
|
|
11
|
-
if (!
|
|
11
|
+
if (!i)
|
|
12
12
|
throw new Error("nylasSchedulerStore is required");
|
|
13
|
-
if (!o && !s && !(
|
|
13
|
+
if (!o && !s && !(d || r))
|
|
14
14
|
throw new Error("sessionId is required for private configs. If using public config either pass a configurationId or a combination of slug and clientId.");
|
|
15
|
-
e === "/" && (e = new URL(window.location.href).origin), this.configId = s, this.sessionId = o, this.schedulerAPIURL = e, this.nylasSchedulerStore =
|
|
15
|
+
e === "/" && (e = new URL(window.location.href).origin), this.configId = s, this.sessionId = o, this.schedulerAPIURL = e, this.nylasSchedulerStore = i, this.slug = d, this.clientId = r;
|
|
16
16
|
}
|
|
17
17
|
init() {
|
|
18
|
-
|
|
18
|
+
E("NylasConnector init");
|
|
19
19
|
}
|
|
20
20
|
get schedulerStore() {
|
|
21
21
|
return this.nylasSchedulerStore;
|
|
22
22
|
}
|
|
23
23
|
get scheduler() {
|
|
24
|
-
return this._schedulerAPIConnector ? this._schedulerAPIConnector : (this._schedulerAPIConnector = new
|
|
24
|
+
return this._schedulerAPIConnector ? this._schedulerAPIConnector : (this._schedulerAPIConnector = new S({
|
|
25
25
|
schedulerAPIURL: this.schedulerAPIURL,
|
|
26
26
|
schedulerStore: this.schedulerStore,
|
|
27
27
|
sessionId: this.sessionId,
|
|
@@ -35,120 +35,121 @@ class M {
|
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
const k = (t, e) => {
|
|
38
|
-
const
|
|
39
|
-
return
|
|
40
|
-
|
|
38
|
+
const i = t.isLoading, o = t.showNotification, s = t.nylasBranding;
|
|
39
|
+
return n(
|
|
40
|
+
D,
|
|
41
41
|
null,
|
|
42
|
-
o &&
|
|
43
|
-
|
|
42
|
+
o && n("nylas-notification", null),
|
|
43
|
+
i && n(
|
|
44
44
|
"div",
|
|
45
45
|
{ class: "loading" },
|
|
46
|
-
|
|
46
|
+
n(
|
|
47
47
|
"div",
|
|
48
48
|
{ class: "left" },
|
|
49
|
-
|
|
49
|
+
n("div", { class: "skeleton" })
|
|
50
50
|
),
|
|
51
|
-
|
|
51
|
+
n(
|
|
52
52
|
"div",
|
|
53
53
|
{ class: "right" },
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
54
|
+
n("div", { class: "skeleton" }),
|
|
55
|
+
n("div", { class: "skeleton" }),
|
|
56
|
+
n("div", { class: "skeleton" }),
|
|
57
|
+
n("div", { class: "skeleton" }),
|
|
58
|
+
n("div", { class: "skeleton" })
|
|
59
59
|
)
|
|
60
60
|
),
|
|
61
|
-
!
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
!i && e,
|
|
62
|
+
n("div", { class: "footer" }, s && n(
|
|
63
|
+
D,
|
|
64
64
|
null,
|
|
65
65
|
"Powered by ",
|
|
66
|
-
|
|
66
|
+
n("nylas-logo", null)
|
|
67
67
|
))
|
|
68
68
|
);
|
|
69
|
-
},
|
|
69
|
+
}, L = (t, e) => n("div", { class: "message-banner" }, e), U = ':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-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;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{padding:0.5rem 4px 0;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}}.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 svg{fill:var(--nylas-base-500)}.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}', W = U, T = { title: h.t("genericErrorTitle"), type: x.Error, category: B.Component }, $ = class {
|
|
70
70
|
constructor(t) {
|
|
71
|
-
|
|
71
|
+
z(this, t), this.init = _(this, "init", 7), this.schedulerWillLoad = _(this, "schedulerWillLoad", 7), this.schedulerDidLoad = _(this, "schedulerDidLoad", 7), this.nylasSchedulerError = _(this, "nylasSchedulerError", 7), this.configSettingsLoaded = _(this, "configSettingsLoaded", 7), this.bookingRefExtracted = _(this, "bookingRefExtracted", 7), this.bookedEventInfo = _(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.automaticComponentRegistration = !0, this.selectedDateLabel = (/* @__PURE__ */ new Date()).toLocaleDateString(void 0, { dateStyle: "full" }) || `${h.t("noDateSelected")}`, this.refConfigId = void 0, this.language = navigator.language;
|
|
72
72
|
}
|
|
73
73
|
connectedCallback() {
|
|
74
|
-
|
|
74
|
+
E("[nylas-scheduler] connectedCallback");
|
|
75
75
|
}
|
|
76
76
|
async componentWillLoad() {
|
|
77
|
-
var s,
|
|
78
|
-
|
|
77
|
+
var s, d;
|
|
78
|
+
E("[nylas-scheduler] Component will load");
|
|
79
79
|
const t = this.schedulerWillLoad.emit(this.host);
|
|
80
80
|
if ("schedulerWillLoad" in this.eventOverrides && (await this.eventOverrides.schedulerWillLoad(t, this.nylasSchedulerConnector), t.defaultPrevented))
|
|
81
81
|
return;
|
|
82
82
|
this.stores = {
|
|
83
|
-
scheduler:
|
|
83
|
+
scheduler: F({
|
|
84
84
|
bookingInfo: this.bookingInfo,
|
|
85
85
|
nylasBranding: this.nylasBranding,
|
|
86
86
|
...this.defaultSchedulerState
|
|
87
87
|
})
|
|
88
|
-
}, this.baseProvider = new
|
|
88
|
+
}, this.baseProvider = new P(this.host, this.stores, this.automaticComponentRegistration, this.eventOverrides), this.refConfigId = this.configurationId;
|
|
89
89
|
let e;
|
|
90
90
|
if (this.rescheduleBookingRef) {
|
|
91
|
-
const [r, a,
|
|
91
|
+
const [r, a, l] = I(this.rescheduleBookingRef);
|
|
92
92
|
this.refConfigId = r, this.stores.scheduler.set("rescheduleBookingId", a), e = this.bookingRefExtracted.emit({ configurationId: r, bookingId: a });
|
|
93
93
|
} else if (this.cancelBookingRef) {
|
|
94
|
-
const [r, a,
|
|
94
|
+
const [r, a, l] = I(this.cancelBookingRef);
|
|
95
95
|
this.refConfigId = r, this.stores.scheduler.set("cancelBookingId", a), e = this.bookingRefExtracted.emit({ configurationId: r, bookingId: a });
|
|
96
96
|
} else if (this.organizerConfirmationBookingRef) {
|
|
97
|
-
const [r, a,
|
|
98
|
-
this.refConfigId = r, this.stores.scheduler.set("organizerConfirmationBookingId", a), this.stores.scheduler.set("organizerConfirmationSalt",
|
|
97
|
+
const [r, a, l] = I(this.organizerConfirmationBookingRef);
|
|
98
|
+
this.refConfigId = r, this.stores.scheduler.set("organizerConfirmationBookingId", a), this.stores.scheduler.set("organizerConfirmationSalt", l), e = this.bookingRefExtracted.emit({ configurationId: r, bookingId: a, salt: l });
|
|
99
99
|
}
|
|
100
100
|
if ("bookingRefExtracted" in this.eventOverrides && (await this.eventOverrides.bookingRefExtracted(e, this.nylasSchedulerConnector), e.defaultPrevented) || !this.checkIfSessionIdOrConfigIdExists())
|
|
101
101
|
return;
|
|
102
|
-
const
|
|
103
|
-
this.nylasSchedulerConnector = new
|
|
102
|
+
const i = (s = this.baseProvider) == null ? void 0 : s.getStore("scheduler");
|
|
103
|
+
this.nylasSchedulerConnector = new H({
|
|
104
104
|
schedulerAPIURL: this.schedulerApiUrl,
|
|
105
105
|
sessionId: this.sessionId,
|
|
106
106
|
configId: this.refConfigId,
|
|
107
107
|
slug: this.slug,
|
|
108
108
|
clientId: this.clientId,
|
|
109
|
-
nylasSchedulerStore:
|
|
109
|
+
nylasSchedulerStore: i
|
|
110
110
|
});
|
|
111
111
|
const o = this.init.emit(this.host);
|
|
112
|
-
"init" in this.eventOverrides && (await this.eventOverrides.init(o, this.nylasSchedulerConnector), o.defaultPrevented) || ((
|
|
112
|
+
"init" in this.eventOverrides && (await this.eventOverrides.init(o, this.nylasSchedulerConnector), o.defaultPrevented) || ((d = this.baseProvider) == null || d.componentWillLoad(this.nylasSchedulerConnector), this.applyThemeConfig(this.themeConfig));
|
|
113
113
|
}
|
|
114
114
|
async componentDidLoad() {
|
|
115
|
-
var
|
|
116
|
-
(
|
|
115
|
+
var l, c, p, g, b, u, m, w;
|
|
116
|
+
(l = this.baseProvider) == null || l.componentDidLoad();
|
|
117
117
|
const t = this.schedulerDidLoad.emit(this.host);
|
|
118
118
|
if ("schedulerDidLoad" in this.eventOverrides && (await this.eventOverrides.schedulerDidLoad(t, this.nylasSchedulerConnector), t.defaultPrevented) || !this.checkIfSessionIdOrConfigIdExists())
|
|
119
119
|
return;
|
|
120
120
|
this.localizationChanged(this.localization);
|
|
121
|
-
const e = await ((
|
|
121
|
+
const e = await ((c = this.nylasSchedulerConnector) == null ? void 0 : c.scheduler.getUISettings());
|
|
122
122
|
if (!e || "error" in e)
|
|
123
123
|
this.nylasSchedulerError.emit({ notification: { ...this.getErrorObject(e == null ? void 0 : e.error) }, host: this.host });
|
|
124
124
|
else {
|
|
125
|
-
|
|
126
|
-
|
|
125
|
+
"data" in e && ((p = e.data) != null && p.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.");
|
|
126
|
+
const f = this.configSettingsLoaded.emit({ settings: e });
|
|
127
|
+
if ("configSettingsLoaded" in this.eventOverrides && (await this.eventOverrides.configSettingsLoaded(f, this.nylasSchedulerConnector), f.defaultPrevented))
|
|
127
128
|
return;
|
|
128
129
|
}
|
|
129
|
-
const
|
|
130
|
+
const i = (g = this.baseProvider) == null ? void 0 : g.getStore("scheduler"), o = (u = (b = i == null ? void 0 : i.get("configSettings")) == null ? void 0 : b.scheduler) == null ? void 0 : u.available_days_in_future, s = i == null ? void 0 : i.get("selectedTimeslot");
|
|
130
131
|
if (s && (s != null && s.start_time)) {
|
|
131
132
|
if (!this.isTimeslotValid(s))
|
|
132
133
|
return;
|
|
133
|
-
if (
|
|
134
|
-
|
|
134
|
+
if (i != null && i.get("showBookingForm")) {
|
|
135
|
+
i == null || i.set("selectedDate", s.start_time);
|
|
135
136
|
return;
|
|
136
137
|
}
|
|
137
138
|
}
|
|
138
|
-
const
|
|
139
|
+
const d = i == null ? void 0 : i.get("selectedDate"), r = i == null ? void 0 : i.get("availability");
|
|
139
140
|
let a;
|
|
140
141
|
if (!(r && r.length > 0)) {
|
|
141
|
-
if (
|
|
142
|
-
const { startTime:
|
|
143
|
-
|
|
142
|
+
if (d) {
|
|
143
|
+
const { startTime: f, endTime: v, endTimeForAvailableDaysInFuture: C } = this.validateAvailableDaysInFuture(d, o || 30);
|
|
144
|
+
d.getTime() < C * 1e3 && (a = await ((w = this.nylasSchedulerConnector) == null ? void 0 : w.scheduler.getAvailability(f, v)));
|
|
144
145
|
} else {
|
|
145
|
-
const
|
|
146
|
-
|
|
146
|
+
const f = /* @__PURE__ */ new Date(), { startTime: v, endTime: C, endTimeForAvailableDaysInFuture: R } = this.validateAvailableDaysInFuture(f, o || 30);
|
|
147
|
+
f.getTime() < R * 1e3 && (a = await ((m = this.nylasSchedulerConnector) == null ? void 0 : m.scheduler.getAvailability(v, C)));
|
|
147
148
|
}
|
|
148
|
-
if ((!a || "error" in a) && this.nylasSchedulerError.emit({ notification: { ...this.getErrorObject(a == null ? void 0 : a.error) }, host: this.host }), !
|
|
149
|
-
let
|
|
150
|
-
const
|
|
151
|
-
|
|
149
|
+
if ((!a || "error" in a) && this.nylasSchedulerError.emit({ notification: { ...this.getErrorObject(a == null ? void 0 : a.error) }, host: this.host }), !d) {
|
|
150
|
+
let f = /* @__PURE__ */ new Date();
|
|
151
|
+
const v = i == null ? void 0 : i.get("availability").find((C) => new Date(C.start_time) > /* @__PURE__ */ new Date());
|
|
152
|
+
v && (f = v.start_time), i == null || i.set("selectedDate", f);
|
|
152
153
|
}
|
|
153
154
|
}
|
|
154
155
|
}
|
|
@@ -161,29 +162,29 @@ const k = (t, e) => {
|
|
|
161
162
|
(e = this.stores) == null || e.scheduler.set("bookingInfo", t);
|
|
162
163
|
}
|
|
163
164
|
rescheduleBookingRefChanged(t) {
|
|
164
|
-
var e,
|
|
165
|
+
var e, i;
|
|
165
166
|
if (t) {
|
|
166
|
-
const [o, s] =
|
|
167
|
-
(e = this.stores) == null || e.scheduler.set("rescheduleBookingId", s), this.refConfigId = o, (
|
|
167
|
+
const [o, s] = I(t);
|
|
168
|
+
(e = this.stores) == null || e.scheduler.set("rescheduleBookingId", s), this.refConfigId = o, (i = this.nylasSchedulerConnector) == null || i.scheduler.setConfigId(o);
|
|
168
169
|
}
|
|
169
170
|
}
|
|
170
171
|
cancelBookingRefChanged(t) {
|
|
171
|
-
var e,
|
|
172
|
+
var e, i;
|
|
172
173
|
if (t) {
|
|
173
|
-
const [o, s] =
|
|
174
|
-
(e = this.stores) == null || e.scheduler.set("cancelBookingId", s), this.refConfigId = o, (
|
|
174
|
+
const [o, s] = I(t);
|
|
175
|
+
(e = this.stores) == null || e.scheduler.set("cancelBookingId", s), this.refConfigId = o, (i = this.nylasSchedulerConnector) == null || i.scheduler.setConfigId(o);
|
|
175
176
|
}
|
|
176
177
|
}
|
|
177
178
|
organizerConfirmationBookingRefChanged(t) {
|
|
178
|
-
var e,
|
|
179
|
+
var e, i;
|
|
179
180
|
if (t) {
|
|
180
|
-
const [o, s] =
|
|
181
|
-
(e = this.stores) == null || e.scheduler.set("organizerConfirmationBookingId", s), this.refConfigId = o, (
|
|
181
|
+
const [o, s] = I(t);
|
|
182
|
+
(e = this.stores) == null || e.scheduler.set("organizerConfirmationBookingId", s), this.refConfigId = o, (i = this.nylasSchedulerConnector) == null || i.scheduler.setConfigId(o);
|
|
182
183
|
}
|
|
183
184
|
}
|
|
184
185
|
localizationChanged(t) {
|
|
185
186
|
t && Object.keys(t).forEach((e) => {
|
|
186
|
-
e in
|
|
187
|
+
e in j && (h.addResourceBundle(e, "translation", t[e], !1, !0), this.language = this.language);
|
|
187
188
|
});
|
|
188
189
|
}
|
|
189
190
|
themeConfigChanged(t) {
|
|
@@ -191,7 +192,7 @@ const k = (t, e) => {
|
|
|
191
192
|
}
|
|
192
193
|
languageChanged(t) {
|
|
193
194
|
const e = t.detail;
|
|
194
|
-
this.language = e,
|
|
195
|
+
this.language = e, h.changeLanguage(e);
|
|
195
196
|
}
|
|
196
197
|
async registerComponentHandler(t) {
|
|
197
198
|
var e;
|
|
@@ -202,29 +203,33 @@ const k = (t, e) => {
|
|
|
202
203
|
(e = this.baseProvider) == null || e.unregisterComponent(t.detail);
|
|
203
204
|
}
|
|
204
205
|
async monthChangedHandler(t) {
|
|
205
|
-
var r, a,
|
|
206
|
-
const e = t.detail,
|
|
207
|
-
if (o <
|
|
208
|
-
const
|
|
209
|
-
(!
|
|
210
|
-
const
|
|
211
|
-
|
|
206
|
+
var r, a, l, c, p, g, b;
|
|
207
|
+
const e = t.detail, i = (c = (l = (a = (r = this.nylasSchedulerConnector) == null ? void 0 : r.schedulerStore) == null ? void 0 : a.get("configSettings")) == null ? void 0 : l.scheduler) == null ? void 0 : c.available_days_in_future, { startTime: o, endTime: s, endTimeForAvailableDaysInFuture: d } = this.validateAvailableDaysInFuture(e, i || 30);
|
|
208
|
+
if (o < d && e.getTime() < d * 1e3) {
|
|
209
|
+
const u = await ((p = this.nylasSchedulerConnector) == null ? void 0 : p.scheduler.getAvailability(o, s));
|
|
210
|
+
(!u || "error" in u) && this.nylasSchedulerError.emit({ notification: { ...this.getErrorObject(u == null ? void 0 : u.error) }, host: this.host });
|
|
211
|
+
const m = (g = this.stores) == null ? void 0 : g.scheduler.get("selectableDates");
|
|
212
|
+
m && m.length > 0 && ((b = this.stores) == null || b.scheduler.set("selectedDate", m[0]));
|
|
212
213
|
}
|
|
213
214
|
}
|
|
214
215
|
async bookButtonClickedHandler(t) {
|
|
215
|
-
var
|
|
216
|
-
const
|
|
217
|
-
if (
|
|
218
|
-
const
|
|
219
|
-
(!
|
|
216
|
+
var d, r, a, l;
|
|
217
|
+
const i = (r = (d = this.nylasSchedulerConnector) == null ? void 0 : d.schedulerStore) == null ? void 0 : r.get("rescheduleBookingId");
|
|
218
|
+
if (i) {
|
|
219
|
+
const c = await ((a = this.nylasSchedulerConnector) == null ? void 0 : a.scheduler.rescheduleBooking(i, t.detail));
|
|
220
|
+
(!c || "error" in c) && this.nylasSchedulerError.emit({ notification: { ...this.getErrorObject(c == null ? void 0 : c.error) }, host: this.host });
|
|
221
|
+
const p = this.bookedEventInfo.emit({ ...c });
|
|
222
|
+
"bookedEventInfo" in this.eventOverrides && await this.eventOverrides.bookedEventInfo(p, this.nylasSchedulerConnector);
|
|
220
223
|
return;
|
|
221
224
|
}
|
|
222
|
-
const o = await ((
|
|
225
|
+
const o = await ((l = this.nylasSchedulerConnector) == null ? void 0 : l.scheduler.bookTimeslot(t.detail));
|
|
223
226
|
(!o || "error" in o) && this.nylasSchedulerError.emit({ notification: { ...this.getErrorObject(o == null ? void 0 : o.error) }, host: this.host });
|
|
227
|
+
const s = this.bookedEventInfo.emit({ ...o });
|
|
228
|
+
"bookedEventInfo" in this.eventOverrides && await this.eventOverrides.bookedEventInfo(s, this.nylasSchedulerConnector);
|
|
224
229
|
}
|
|
225
230
|
dateSelectedHandler(t) {
|
|
226
231
|
const e = t.detail;
|
|
227
|
-
this.selectedDateLabel = e ? e.toLocaleDateString(void 0, { dateStyle: "full" }) : `${
|
|
232
|
+
this.selectedDateLabel = e ? e.toLocaleDateString(void 0, { dateStyle: "full" }) : `${h.t("noDateSelected")}`;
|
|
228
233
|
}
|
|
229
234
|
cancelBookedEventErrorHandler(t) {
|
|
230
235
|
this.nylasSchedulerError.emit({ notification: { ...this.getErrorObject(t.detail.error) }, host: this.host });
|
|
@@ -250,9 +255,9 @@ const k = (t, e) => {
|
|
|
250
255
|
}
|
|
251
256
|
getErrorObject(t) {
|
|
252
257
|
return {
|
|
253
|
-
title: (t == null ? void 0 : t.title) ||
|
|
254
|
-
category: (t == null ? void 0 : t.category) ||
|
|
255
|
-
type:
|
|
258
|
+
title: (t == null ? void 0 : t.title) || T.title,
|
|
259
|
+
category: (t == null ? void 0 : t.category) || T.category,
|
|
260
|
+
type: x.Error,
|
|
256
261
|
description: (t == null ? void 0 : t.message) || "",
|
|
257
262
|
id: (/* @__PURE__ */ new Date()).getTime().toString(),
|
|
258
263
|
ttl: "none"
|
|
@@ -261,11 +266,11 @@ const k = (t, e) => {
|
|
|
261
266
|
checkIfSessionIdOrConfigIdExists() {
|
|
262
267
|
if (!this.sessionId && !this.refConfigId && !(this.slug && this.clientId)) {
|
|
263
268
|
let t = "";
|
|
264
|
-
return this.sessionId || (t +=
|
|
269
|
+
return this.sessionId || (t += h.t("sessionIdRequiredErrorMessage")), !this.sessionId && !this.refConfigId && !(this.slug && this.clientId) && (t = h.t("sessionIdRequiredErrorMessage") + " " + h.t("publicConfigErrorMessage")), this.nylasSchedulerError.emit({
|
|
265
270
|
notification: {
|
|
266
|
-
title:
|
|
267
|
-
category:
|
|
268
|
-
type:
|
|
271
|
+
title: h.t("schedulingComponentErrorTitle"),
|
|
272
|
+
category: B.Component,
|
|
273
|
+
type: x.Error,
|
|
269
274
|
description: t,
|
|
270
275
|
id: (/* @__PURE__ */ new Date()).getTime().toString(),
|
|
271
276
|
ttl: "none"
|
|
@@ -278,10 +283,10 @@ const k = (t, e) => {
|
|
|
278
283
|
isTimeslotValid(t) {
|
|
279
284
|
return new Date(t.start_time) < /* @__PURE__ */ new Date() ? (this.nylasSchedulerError.emit({
|
|
280
285
|
notification: {
|
|
281
|
-
title:
|
|
282
|
-
category:
|
|
283
|
-
type:
|
|
284
|
-
description:
|
|
286
|
+
title: h.t("invalidTimeslotErrorTitle"),
|
|
287
|
+
category: B.Component,
|
|
288
|
+
type: x.Error,
|
|
289
|
+
description: h.t("invalidTimeslotErrorMessage"),
|
|
285
290
|
id: (/* @__PURE__ */ new Date()).getTime().toString(),
|
|
286
291
|
ttl: "none"
|
|
287
292
|
},
|
|
@@ -289,39 +294,39 @@ const k = (t, e) => {
|
|
|
289
294
|
}), !1) : !0;
|
|
290
295
|
}
|
|
291
296
|
validateAvailableDaysInFuture(t, e) {
|
|
292
|
-
const
|
|
293
|
-
return { startTime: o <
|
|
297
|
+
const i = /* @__PURE__ */ new Date(), o = new Date(t.getFullYear(), t.getMonth(), 1).getTime() / 1e3, s = new Date(t.getFullYear(), t.getMonth() + 1, 1).getTime() / 1e3, d = Math.floor(O(i, e).getTime() / 1e3), r = Math.min(d, s);
|
|
298
|
+
return { startTime: o < i.getTime() / 1e3 ? Math.floor(i.getTime() / 1e3) : o, endTime: r, endTimeForAvailableDaysInFuture: d };
|
|
294
299
|
}
|
|
295
300
|
applyThemeConfig(t) {
|
|
296
301
|
if (t)
|
|
297
|
-
for (const [e,
|
|
298
|
-
this.host.style.setProperty(`${e}`,
|
|
302
|
+
for (const [e, i] of Object.entries(t))
|
|
303
|
+
this.host.style.setProperty(`${e}`, i);
|
|
299
304
|
}
|
|
300
305
|
render() {
|
|
301
|
-
var
|
|
302
|
-
const t = this.mode === "app", e = (
|
|
303
|
-
if (this.selectedDateLabel =
|
|
304
|
-
return
|
|
305
|
-
if (t &&
|
|
306
|
-
return
|
|
306
|
+
var m, w, f;
|
|
307
|
+
const t = this.mode === "app", e = (m = this.baseProvider) == null ? void 0 : m.getStore("scheduler"), i = e == null ? void 0 : e.get("eventInfo"), o = e == null ? void 0 : e.get("showBookingForm"), s = e == null ? void 0 : e.get("cancelledEventInfo"), d = e == null ? void 0 : e.get("cancelBookingId"), r = e == null ? void 0 : e.get("selectedTimeslot"), a = e == null ? void 0 : e.get("rescheduleBookingId"), l = e == null ? void 0 : e.get("organizerConfirmationBookingId"), c = e == null ? void 0 : e.get("rejectBookingId"), p = e == null ? void 0 : e.get("confirmedEventInfo"), g = (e == null ? void 0 : e.get("nylasBranding")) || this.nylasBranding, b = e == null ? void 0 : e.get("selectedDate"), u = (f = (w = e == null ? void 0 : e.get("configSettings")) == null ? void 0 : w.scheduler) == null ? void 0 : f.confirmation_redirect_url;
|
|
308
|
+
if (this.selectedDateLabel = b && this.language ? N(b.toLocaleDateString(M[this.language], { dateStyle: "full" })) : `${h.t("noDateSelected")}`, t && (d || c) && !s)
|
|
309
|
+
return n(y, null, n(k, { nylasBranding: g, isLoading: this.isLoading, showNotification: this.showNotification }, n("div", { class: "cancel-flow-page", part: "cancel-flow-page" }, n("nylas-cancel-booking-form", { selectedTimeslot: r, cancelBookingId: d, rejectBookingId: c, exportparts: "ncbf, ncbf__icon, ncbf__title, ncbf__description, ncbf__reason-textarea, ncbf__button-cta, ncbf__button-outline, ncbf__card" }))));
|
|
310
|
+
if (t && l)
|
|
311
|
+
return n(y, null, n(k, { nylasBranding: g, isLoading: this.isLoading, showNotification: this.showNotification }, n("div", { class: "manual-confirmation-page", part: "manual-confirmation-page" }, n("nylas-organizer-confirmation-card", { organizerConfirmationBookingId: l, exportparts: "nmcc, nmcc__title, nmcc__description, nmcc__button-cta, nmcc__button-outline" }))));
|
|
307
312
|
if (t && s)
|
|
308
|
-
return
|
|
309
|
-
if (t &&
|
|
310
|
-
return
|
|
311
|
-
if (t &&
|
|
312
|
-
window.location.assign(
|
|
313
|
+
return n(y, null, n(k, { 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" }))));
|
|
314
|
+
if (t && p)
|
|
315
|
+
return n(y, null, n(k, { nylasBranding: g, isLoading: this.isLoading, showNotification: this.showNotification }, n("div", { class: "cancelled-event-page", part: "confirmed-event-page" }, n("nylas-confirmed-event-card", { confirmedEventInfo: p, exportparts: "ncec, ncec__icon, ncec__title, ncec__description, ncec__button-outline, ncec__card" }))));
|
|
316
|
+
if (t && i && u) {
|
|
317
|
+
window.location.assign(u);
|
|
313
318
|
return;
|
|
314
319
|
}
|
|
315
|
-
if (t &&
|
|
316
|
-
return
|
|
317
|
-
if (t && (!
|
|
318
|
-
const
|
|
319
|
-
return
|
|
320
|
+
if (t && i)
|
|
321
|
+
return n(y, null, n(k, { nylasBranding: g, isLoading: this.isLoading, showNotification: this.showNotification }, n("div", { class: "booked-event-page", part: "booked-event-page" }, n("nylas-booked-event-card", { selectedTimeslot: r, eventInfo: i, exportparts: "nbec, nbec__title, nbec__card, nbec__description, nbec__button-outline, nbec__cancel-cta, nbec__reschedule-cta" }))));
|
|
322
|
+
if (t && (!i || a) && !o) {
|
|
323
|
+
const v = this.host.querySelector('[slot="timeslot-picker-cta-label"]');
|
|
324
|
+
return n(y, null, n(k, { nylasBranding: g, isLoading: this.isLoading, showNotification: this.showNotification }, a && n(L, null, `${h.t("rescheduleTitle")}`), n("div", { class: "select-date-page", part: "select-date-page" }, n("div", { class: "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 ${a ? "reschedule" : ""}` }, n("h2", null, n("calendar-icon", null), n("span", { id: "selectedDate" }, this.selectedDateLabel)), n("nylas-timeslot-picker", { exportparts: "ntp, ntp__timeslot, ntp__timeslot--selected, ntp__button-primary" }, v && n("span", { slot: "timeslot-picker-cta-label" }, n("slot", { name: "timeslot-picker-cta-label" })))))));
|
|
320
325
|
}
|
|
321
|
-
return t && !
|
|
326
|
+
return t && !i && o ? n(y, null, n(k, { nylasBranding: g, isLoading: this.isLoading, showNotification: this.showNotification }, a && n(L, null, `${h.t("rescheduleTitle")}`), n("div", { class: "additional-data-page", part: "additional-data-page" }, n("div", { class: "left-panel" }, n("div", { class: "wrapper" }, n("nylas-selected-event-card", { exportparts: "nsec, nsec__card, nsec__icon, nsec__date, nsec__time, nsec__timezone" }))), n("div", { class: `right-panel ${a ? "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" }))))) : n(y, null, n("slot", null));
|
|
322
327
|
}
|
|
323
328
|
get host() {
|
|
324
|
-
return
|
|
329
|
+
return A(this);
|
|
325
330
|
}
|
|
326
331
|
static get watchers() {
|
|
327
332
|
return {
|
|
@@ -334,7 +339,7 @@ const k = (t, e) => {
|
|
|
334
339
|
};
|
|
335
340
|
}
|
|
336
341
|
};
|
|
337
|
-
|
|
342
|
+
$.style = W;
|
|
338
343
|
export {
|
|
339
|
-
|
|
344
|
+
$ as nylas_scheduling
|
|
340
345
|
};
|
package/dist/{nylas-threads-refresh.entry-da68039b.js → nylas-threads-refresh.entry-20602e7b.js}
RENAMED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { r as f, c as p, d as i, h as o, H as u } from "./index-
|
|
2
|
-
import { R as m } from "./register-component-
|
|
1
|
+
import { r as f, c as p, d as i, h as o, H as u } from "./index-5ccfd9df.js";
|
|
2
|
+
import { R as m } from "./register-component-887199a9-b41dfa7a.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "react-dom";
|
|
5
5
|
const g = ":host{display:contents}.container{width:100%;overflow:auto;-webkit-overflow-scrolling:touch}.pull-to-refresh{display:none;border:0;background-color:transparent;text-align:center;width:100%;justify-content:center}.pulling{position:relative;display:flex;margin:0 auto;padding:1rem}.pulling svg{width:24px;height:24px;color:var(--nylas-color-primary-500);transform:rotate(90deg)}.refreshing{position:relative;display:flex;margin:0 auto;padding:1rem}.refreshing svg{width:24px;height:24px;fill:var(--nylas-color-primary-500);animation:rotate 1s linear infinite}@keyframes rotate{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}", y = g;
|
|
6
|
-
var v = function(t, e, s,
|
|
7
|
-
var
|
|
6
|
+
var v = function(t, e, s, r) {
|
|
7
|
+
var a = arguments.length, n = a < 3 ? e : r === null ? r = Object.getOwnPropertyDescriptor(e, s) : r, h;
|
|
8
8
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
9
|
-
n = Reflect.decorate(t, e, s,
|
|
9
|
+
n = Reflect.decorate(t, e, s, r);
|
|
10
10
|
else
|
|
11
11
|
for (var l = t.length - 1; l >= 0; l--)
|
|
12
|
-
(h = t[l]) && (n = (
|
|
13
|
-
return
|
|
12
|
+
(h = t[l]) && (n = (a < 3 ? h(n) : a > 3 ? h(e, s, n) : h(e, s)) || n);
|
|
13
|
+
return a > 3 && n && Object.defineProperty(e, s, n), n;
|
|
14
14
|
}, c = function(t, e) {
|
|
15
15
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
16
16
|
return Reflect.metadata(t, e);
|
|
@@ -18,8 +18,8 @@ var v = function(t, e, s, a) {
|
|
|
18
18
|
const d = class {
|
|
19
19
|
constructor(t) {
|
|
20
20
|
f(this, t), this.refresh = p(this, "refresh", 7), this.threshold = 100, this.onTouchStart = (e) => {
|
|
21
|
-
var s,
|
|
22
|
-
i("[nylas-threads-refresh] Touch start", e.touches[0].pageY, (s = this.containerElement) == null ? void 0 : s.scrollTop, (
|
|
21
|
+
var s, r, a, n;
|
|
22
|
+
i("[nylas-threads-refresh] Touch start", e.touches[0].pageY, (s = this.containerElement) == null ? void 0 : s.scrollTop, (r = this.containerElement) == null ? void 0 : r.offsetHeight, (a = this.contentElement) == null ? void 0 : a.scrollTop), ((n = this.containerElement) == null ? void 0 : n.scrollTop) === 0 ? this.start = e.touches[0].pageY : this.start = 0;
|
|
23
23
|
}, this.onTouchMove = (e) => {
|
|
24
24
|
this.start && (e.touches[0].pageY - this.start > this.threshold ? this.pulling = !0 : this.pulling = !1);
|
|
25
25
|
}, this.onTouchEnd = (e) => {
|
|
@@ -45,11 +45,11 @@ const d = class {
|
|
|
45
45
|
this.state = t;
|
|
46
46
|
}
|
|
47
47
|
render() {
|
|
48
|
-
return o(u, { key: "
|
|
48
|
+
return o(u, { key: "a3cbbe605d8d26999432651d0d60312647da8f86" }, o("div", { key: "1a59758a0cb17a919b7160fa260d1be527d62376", class: "container", ref: (t) => this.containerElement = t }, o("button", { key: "ed5e199459b3e4810143905c4983d5b1cfd1d755", class: {
|
|
49
49
|
"pull-to-refresh": !0,
|
|
50
50
|
pulling: this.pulling,
|
|
51
51
|
refreshing: this.state === "loading"
|
|
52
|
-
}, "aria-label": "Refreshing..." }, this.state === "loading" && o("refresh-icon", { slot: "icon" }), this.state !== "loading" && o("arrow-icon", { slot: "icon" })), o("div", { key: "
|
|
52
|
+
}, "aria-label": "Refreshing..." }, this.state === "loading" && o("refresh-icon", { slot: "icon" }), this.state !== "loading" && o("arrow-icon", { slot: "icon" })), o("div", { key: "044db42a017e65e10920661b8f83d7f98ac0fe35", class: "content", ref: (t) => this.contentElement = t }, o("slot", { key: "359a095179a1ef2e5733f843dc140171bc0bddfe" }))));
|
|
53
53
|
}
|
|
54
54
|
};
|
|
55
55
|
v([
|
package/dist/{nylas-threads-refresh.entry-77015d63.cjs → nylas-threads-refresh.entry-56b53449.cjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-eb33703c.cjs"),c=require("./register-component-887199a9-003f96c5.cjs");require("react");require("react-dom");const f=":host{display:contents}.container{width:100%;overflow:auto;-webkit-overflow-scrolling:touch}.pull-to-refresh{display:none;border:0;background-color:transparent;text-align:center;width:100%;justify-content:center}.pulling{position:relative;display:flex;margin:0 auto;padding:1rem}.pulling svg{width:24px;height:24px;color:var(--nylas-color-primary-500);transform:rotate(90deg)}.refreshing{position:relative;display:flex;margin:0 auto;padding:1rem}.refreshing svg{width:24px;height:24px;fill:var(--nylas-color-primary-500);animation:rotate 1s linear infinite}@keyframes rotate{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}",u=f;var p=function(t,e,n,a){var i=arguments.length,r=i<3?e:a===null?a=Object.getOwnPropertyDescriptor(e,n):a,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,n,a);else for(var h=t.length-1;h>=0;h--)(o=t[h])&&(r=(i<3?o(r):i>3?o(e,n,r):o(e,n))||r);return i>3&&r&&Object.defineProperty(e,n,r),r},l=function(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)};const d=class{constructor(t){s.registerInstance(this,t),this.refresh=s.createEvent(this,"refresh",7),this.threshold=100,this.onTouchStart=e=>{var n,a,i,r;s.debug("[nylas-threads-refresh] Touch start",e.touches[0].pageY,(n=this.containerElement)==null?void 0:n.scrollTop,(a=this.containerElement)==null?void 0:a.offsetHeight,(i=this.contentElement)==null?void 0:i.scrollTop),((r=this.containerElement)==null?void 0:r.scrollTop)===0?this.start=e.touches[0].pageY:this.start=0},this.onTouchMove=e=>{this.start&&(e.touches[0].pageY-this.start>this.threshold?this.pulling=!0:this.pulling=!1)},this.onTouchEnd=e=>{this.start&&(e.changedTouches[0].pageY-this.start>this.threshold&&(this.pulling=!1,this.refresh.emit({updateState:this.updateState})),this.start=0)},this.start=0,this.state="ready",this.pulling=!1,s.debug("[nylas-threads-refresh] Constructor"),this.updateState=this.updateState.bind(this)}connectedCallback(){}async componentWillLoad(){s.debug("[nylas-threads-refresh] Component will load")}componentDidLoad(){var t,e,n;s.debug("[nylas-threads-refresh] Component did load"),(t=this.containerElement)==null||t.addEventListener("touchstart",this.onTouchStart),(e=this.containerElement)==null||e.addEventListener("touchmove",this.onTouchMove),(n=this.containerElement)==null||n.addEventListener("touchend",this.onTouchEnd)}disconnectedCallback(){var t,e,n;s.debug("[nylas-threads-refresh] Component disconnected"),(t=this.containerElement)==null||t.removeEventListener("touchstart",this.onTouchStart),(e=this.containerElement)==null||e.removeEventListener("touchmove",this.onTouchMove),(n=this.containerElement)==null||n.removeEventListener("touchend",this.onTouchEnd)}async updateState(t){this.state=t}render(){return s.h(s.Host,{key:"a3cbbe605d8d26999432651d0d60312647da8f86"},s.h("div",{key:"1a59758a0cb17a919b7160fa260d1be527d62376",class:"container",ref:t=>this.containerElement=t},s.h("button",{key:"ed5e199459b3e4810143905c4983d5b1cfd1d755",class:{"pull-to-refresh":!0,pulling:this.pulling,refreshing:this.state==="loading"},"aria-label":"Refreshing..."},this.state==="loading"&&s.h("refresh-icon",{slot:"icon"}),this.state!=="loading"&&s.h("arrow-icon",{slot:"icon"})),s.h("div",{key:"044db42a017e65e10920661b8f83d7f98ac0fe35",class:"content",ref:t=>this.contentElement=t},s.h("slot",{key:"359a095179a1ef2e5733f843dc140171bc0bddfe"}))))}};p([c.RegisterComponent({name:"nylas-threads-refresh",eventToProps:{refresh:async(t,e)=>{s.debug("[nylas-threads-refresh] Refreshing threads");const{updateState:n}=t.detail;await n("loading"),await e.threads.getThreads(void 0,"overwrite",!1),await n("ready")}},fireRegisterEvent:!0}),l("design:type",Function),l("design:paramtypes",[]),l("design:returntype",void 0)],d.prototype,"render",null);d.style=u;exports.nylas_threads_refresh=d;
|
package/dist/{nylas-threads-search.entry-27472aef.js → nylas-threads-search.entry-8872473c.js}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { r as u, c as y, d as h, h as i, H as f } from "./index-
|
|
2
|
-
import { R as p } from "./register-component-
|
|
1
|
+
import { r as u, c as y, d as h, h as i, H as f } from "./index-5ccfd9df.js";
|
|
2
|
+
import { R as p } from "./register-component-887199a9-b41dfa7a.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "react-dom";
|
|
5
|
-
const m = ":host{display:block}sp-search{width:100%;border:0}",
|
|
6
|
-
var
|
|
5
|
+
const m = ":host{display:block}sp-search{width:100%;border:0}", g = m;
|
|
6
|
+
var b = function(t, e, n, r) {
|
|
7
7
|
var s = arguments.length, a = s < 3 ? e : r === null ? r = Object.getOwnPropertyDescriptor(e, n) : r, o;
|
|
8
8
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
9
9
|
a = Reflect.decorate(t, e, n, r);
|
|
@@ -37,7 +37,7 @@ const d = class {
|
|
|
37
37
|
this.internalQuery = this.query;
|
|
38
38
|
}
|
|
39
39
|
render() {
|
|
40
|
-
return i(f, { key: "
|
|
40
|
+
return i(f, { key: "b61eeaa00c7e01d06d5b867958ac4979169f20b6" }, i("sp-theme", { key: "52d3212dc5223063e1f3f26cd8a29d555eaa3fac", scale: "medium", color: "dark" }, i("sp-search", { key: "2a15f291ae4a2e118398a01c2ddf68f1912f13fb", quiet: !0, onSubmit: this.onSearch, onBlur: this.onSearch, value: this.internalQuery })));
|
|
41
41
|
}
|
|
42
42
|
static get watchers() {
|
|
43
43
|
return {
|
|
@@ -45,7 +45,7 @@ const d = class {
|
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
|
-
|
|
48
|
+
b([
|
|
49
49
|
p({
|
|
50
50
|
name: "nylas-pagination",
|
|
51
51
|
stateToProps: /* @__PURE__ */ new Map([["mailbox.searchQuery", "query"]]),
|
|
@@ -63,7 +63,7 @@ g([
|
|
|
63
63
|
l("design:paramtypes", []),
|
|
64
64
|
l("design:returntype", void 0)
|
|
65
65
|
], d.prototype, "render", null);
|
|
66
|
-
d.style =
|
|
66
|
+
d.style = g;
|
|
67
67
|
export {
|
|
68
68
|
d as nylas_threads_search
|
|
69
69
|
};
|
package/dist/{nylas-threads-search.entry-8f765c67.cjs → nylas-threads-search.entry-8e0ec3ae.cjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index-eb33703c.cjs"),d=require("./register-component-887199a9-003f96c5.cjs");require("react");require("react-dom");const u=":host{display:block}sp-search{width:100%;border:0}",y=u;var f=function(t,e,s,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,s):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,s,n);else for(var i=t.length-1;i>=0;i--)(c=t[i])&&(r=(o<3?c(r):o>3?c(e,s,r):c(e,s))||r);return o>3&&r&&Object.defineProperty(e,s,r),r},l=function(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)};const h=class{constructor(t){a.registerInstance(this,t),this.search=a.createEvent(this,"search",7),this.onSearch=async e=>{e.preventDefault(),e.stopPropagation();const n=e.target.value;n!==this.internalQuery&&(this.internalQuery=n,this.search.emit(this.internalQuery))},this.query="",this.internalQuery=""}connectedCallback(){}disconnectedCallback(){}async componentWillLoad(){a.debug("[nylas-threads-search] Component will load")}async componentDidLoad(){a.debug("[nylas-threads-search] Component did load")}onQueryChange(){this.internalQuery=this.query}render(){return a.h(a.Host,{key:"b61eeaa00c7e01d06d5b867958ac4979169f20b6"},a.h("sp-theme",{key:"52d3212dc5223063e1f3f26cd8a29d555eaa3fac",scale:"medium",color:"dark"},a.h("sp-search",{key:"2a15f291ae4a2e118398a01c2ddf68f1912f13fb",quiet:!0,onSubmit:this.onSearch,onBlur:this.onSearch,value:this.internalQuery})))}static get watchers(){return{query:["onQueryChange"]}}};f([d.RegisterComponent({name:"nylas-pagination",stateToProps:new Map([["mailbox.searchQuery","query"]]),eventToProps:{search:async(t,e)=>{await e.threads.getThreads({search_query_native:t.detail||void 0,page_token:void 0})}},fireRegisterEvent:!0}),l("design:type",Function),l("design:paramtypes",[]),l("design:returntype",void 0)],h.prototype,"render",null);h.style=y;exports.nylas_threads_search=h;
|