@nylas/react 1.1.0-canary.20 → 1.1.0-canary.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/add-circle-icon_2.entry-404b178a.js +69 -0
- package/dist/add-circle-icon_2.entry-d44a0d4b.cjs +1 -0
- package/dist/archive-icon_7.entry-1c2e5b68.cjs +1 -0
- package/dist/{archive-icon_7.entry-2f418a3e.js → archive-icon_7.entry-d14abebc.js} +21 -21
- package/dist/{arrow-icon.entry-ac5e1a47.cjs → arrow-icon.entry-61290104.cjs} +1 -1
- package/dist/arrow-icon.entry-8dd5bfb5.js +15 -0
- package/dist/{bold-icon_3.entry-4fff7400.cjs → bold-icon_3.entry-c5502b92.cjs} +1 -1
- package/dist/{bold-icon_3.entry-18507c82.js → bold-icon_3.entry-cc7319da.js} +4 -4
- package/dist/button-component.entry-71de5b6b.js +16 -0
- package/dist/button-component.entry-92c46833.cjs +1 -0
- package/dist/calendar-agenda-fill-icon_40.entry-242956c2.cjs +10 -0
- package/dist/{calendar-agenda-fill-icon_35.entry-db989ce0.js → calendar-agenda-fill-icon_40.entry-b33080d8.js} +1461 -1068
- package/dist/{calendar-cancel-icon.entry-d2e10dfc.cjs → calendar-cancel-icon.entry-bbf56125.cjs} +1 -1
- package/dist/{calendar-cancel-icon.entry-31caeae1.js → calendar-cancel-icon.entry-fcc89777.js} +2 -2
- package/dist/{calendar-check-icon_2.entry-d32551e9.cjs → calendar-check-icon_2.entry-64d553de.cjs} +1 -1
- package/dist/{calendar-check-icon_2.entry-7f67c003.js → calendar-check-icon_2.entry-e7691b84.js} +5 -5
- package/dist/{calendar-icon.entry-6e89816b.js → calendar-icon.entry-6375e3ed.js} +4 -4
- package/dist/{calendar-icon.entry-f3f1c623.cjs → calendar-icon.entry-9cea89bc.cjs} +1 -1
- package/dist/checkbox-component_2.entry-751f4638.js +56 -0
- package/dist/checkbox-component_2.entry-9a89cf14.cjs +1 -0
- package/dist/checkmark-icon.entry-136b682c.js +15 -0
- package/dist/checkmark-icon.entry-6bca8604.cjs +1 -0
- package/dist/{chevron-icon_3.entry-3be68846.cjs → chevron-icon_3.entry-97c91007.cjs} +1 -1
- package/dist/{chevron-icon_3.entry-2e20a83e.js → chevron-icon_3.entry-b4995425.js} +7 -7
- package/dist/clock-icon_4.entry-cd6ac47d.cjs +1 -0
- package/dist/clock-icon_4.entry-d2e007e5.js +45 -0
- package/dist/close-icon.entry-d1348fa8.cjs +1 -0
- package/dist/close-icon.entry-d4d4da48.js +15 -0
- package/dist/{constants-7ce66b44-3952e81c.js → constants-67de2eec-31cbc722.js} +37 -17
- package/dist/{constants-7ce66b44-a6b777d4.cjs → constants-67de2eec-8286f29c.cjs} +5 -5
- package/dist/{copy-icon_4.entry-187edab9.js → copy-icon_3.entry-e41eb1a0.js} +9 -19
- package/dist/copy-icon_3.entry-f614fc20.cjs +1 -0
- package/dist/{document-refresh-icon.entry-ea0e1ab9.cjs → document-refresh-icon.entry-12833775.cjs} +1 -1
- package/dist/{document-refresh-icon.entry-9d7900d7.js → document-refresh-icon.entry-817322ba.js} +5 -5
- package/dist/elements/index.d.ts +8 -0
- package/dist/{elements-dc5b338e-edf63aa6.cjs → elements-dc5b338e-3a8522b8.cjs} +1 -1
- package/dist/{elements-dc5b338e-e6271e48.js → elements-dc5b338e-d885666f.js} +1 -1
- package/dist/{focus-visible-e8093c16-84e41b3b.cjs → focus-visible-e8093c16-17bb48f2.cjs} +1 -1
- package/dist/{focus-visible-e8093c16-4c45967c.js → focus-visible-e8093c16-78717e30.js} +1 -1
- package/dist/{forward-icon_6.entry-4cb6eb63.cjs → forward-icon_6.entry-074fd345.cjs} +2 -2
- package/dist/{forward-icon_6.entry-949d0cfb.js → forward-icon_6.entry-39b55b30.js} +9 -9
- package/dist/{globe-icon.entry-04b35395.js → globe-icon.entry-a1875d7e.js} +2 -2
- package/dist/{globe-icon.entry-741f8ad4.cjs → globe-icon.entry-dee4c2b0.cjs} +1 -1
- package/dist/google-logo-icon_4.entry-3c3101ea.js +637 -0
- package/dist/google-logo-icon_4.entry-44c3f539.cjs +1 -0
- package/dist/index-26f8bbeb.cjs +42 -0
- package/dist/index-53420959-a444c1cf.cjs +1 -0
- package/dist/index-53420959-b26d1293.js +5 -0
- package/dist/index-5da0aff3.js +7638 -0
- package/dist/{index-6d9eeb53-8b16e3b5.cjs → index-6d9eeb53-b71b16c5.cjs} +1 -1
- package/dist/{index-6d9eeb53-b15263de.js → index-6d9eeb53-f37ff819.js} +2 -2
- package/dist/{index.es-9cc0eb3c-2e0f7d11.cjs → index.es-b16d0cf5-4ce1fb63.cjs} +1 -1
- package/dist/{index.es-9cc0eb3c-e6c5dd2d.js → index.es-b16d0cf5-b1cecbdd.js} +1 -1
- package/dist/{info-icon_2.entry-c3468951.cjs → info-icon_2.entry-67a3e2c3.cjs} +1 -1
- package/dist/{info-icon_2.entry-d0270899.js → info-icon_2.entry-6fd10047.js} +7 -7
- package/dist/input-dropdown.entry-701ab8b7.cjs +1 -0
- package/dist/input-dropdown.entry-e677224a.js +132 -0
- package/dist/{loading-icon.entry-96d9d1be.js → loading-icon.entry-3f54b204.js} +4 -4
- package/dist/loading-icon.entry-558c2382.cjs +1 -0
- package/dist/{mailbox-store-64b4ef7c-7c793d9a.js → mailbox-store-f11de360-79ba75b1.js} +2 -2
- package/dist/{mailbox-store-64b4ef7c-c609ac6d.cjs → mailbox-store-f11de360-8f269e26.cjs} +1 -1
- package/dist/{multi-select-dropdown.entry-f298ca2c.cjs → multi-select-dropdown.entry-d053b2fb.cjs} +1 -1
- package/dist/{multi-select-dropdown.entry-2ca73c71.js → multi-select-dropdown.entry-e46f5cfb.js} +2 -2
- package/dist/nylas-booked-event-card_10.entry-32911b16.cjs +1 -0
- package/dist/{nylas-booked-event-card_10.entry-2b01df7e.js → nylas-booked-event-card_10.entry-545261f6.js} +364 -323
- package/dist/{nylas-custom-booking-flow.entry-05b9522a.cjs → nylas-custom-booking-flow.entry-49b82a11.cjs} +1 -1
- package/dist/{nylas-custom-booking-flow.entry-66beff43.js → nylas-custom-booking-flow.entry-6639c5fb.js} +31 -31
- package/dist/{nylas-form-card.entry-3de9f477.js → nylas-form-card.entry-7d69820f.js} +18 -18
- package/dist/{nylas-form-card.entry-3e1331c9.cjs → nylas-form-card.entry-a063402d.cjs} +1 -1
- package/dist/{nylas-if-state.entry-a734df46.cjs → nylas-if-state.entry-54a6948f.cjs} +1 -1
- package/dist/{nylas-if-state.entry-a0689083.js → nylas-if-state.entry-9e7df799.js} +3 -3
- package/dist/{nylas-list-folders.entry-4fb9d4c2.js → nylas-list-folders.entry-013ffceb.js} +4 -4
- package/dist/{nylas-list-folders.entry-74a56187.cjs → nylas-list-folders.entry-d08423d4.cjs} +1 -1
- package/dist/{nylas-list-threads.entry-0addc621.cjs → nylas-list-threads.entry-be9bc422.cjs} +1 -1
- package/dist/{nylas-list-threads.entry-9a6d4c33.js → nylas-list-threads.entry-d3f575a5.js} +3 -3
- package/dist/{nylas-login.entry-beb6e0d9.js → nylas-login.entry-d82e8ee0.js} +3 -3
- package/dist/{nylas-login.entry-bdac29c0.cjs → nylas-login.entry-e7015d8f.cjs} +1 -1
- package/dist/{nylas-mailbox-pagination.entry-c5d07bbe.cjs → nylas-mailbox-pagination.entry-22866764.cjs} +1 -1
- package/dist/{nylas-mailbox-pagination.entry-1d71850a.js → nylas-mailbox-pagination.entry-99339476.js} +2 -2
- package/dist/{nylas-mailbox-toolbar-button.entry-7d9d6293.cjs → nylas-mailbox-toolbar-button.entry-09faed21.cjs} +1 -1
- package/dist/{nylas-mailbox-toolbar-button.entry-882c97a0.js → nylas-mailbox-toolbar-button.entry-b8929b00.js} +7 -7
- package/dist/{nylas-mailbox.entry-d810adba.js → nylas-mailbox.entry-6e8d4f9c.js} +4 -4
- package/dist/{nylas-mailbox.entry-94eb97ec.cjs → nylas-mailbox.entry-91ca6af1.cjs} +1 -1
- package/dist/{nylas-provider.entry-5a4bb86e.cjs → nylas-provider.entry-b80d5e74.cjs} +1 -1
- package/dist/{nylas-provider.entry-fcaf9e1c.js → nylas-provider.entry-cc32369c.js} +34 -34
- package/dist/{nylas-scheduler-editor.entry-1ca566d3.js → nylas-scheduler-editor.entry-5e0475d8.js} +8 -11
- package/dist/{nylas-scheduler-editor.entry-30597812.cjs → nylas-scheduler-editor.entry-c7f7bf6c.cjs} +2 -2
- package/dist/nylas-scheduling.entry-047cd53a.cjs +1 -0
- package/dist/{nylas-scheduling.entry-aefefe3d.js → nylas-scheduling.entry-c79596db.js} +82 -73
- package/dist/{nylas-threads-refresh.entry-a85222e2.js → nylas-threads-refresh.entry-e200efb9.js} +4 -4
- package/dist/{nylas-threads-refresh.entry-f3b9fdf2.cjs → nylas-threads-refresh.entry-ef2ad409.cjs} +1 -1
- package/dist/{nylas-threads-search.entry-b1bf455b.js → nylas-threads-search.entry-85a0bc7d.js} +6 -6
- package/dist/{nylas-threads-search.entry-2c8ac7dc.cjs → nylas-threads-search.entry-a260ce6f.cjs} +1 -1
- package/dist/{nylas-time-window-picker.entry-6d664a05.js → nylas-time-window-picker.entry-c9b2a7ca.js} +18 -18
- package/dist/{nylas-time-window-picker.entry-3a34b29b.cjs → nylas-time-window-picker.entry-cb33b696.cjs} +1 -1
- package/dist/{nylas-view-thread.entry-bf6cab2a.cjs → nylas-view-thread.entry-219511ac.cjs} +1 -1
- package/dist/{nylas-view-thread.entry-ddcb042f.js → nylas-view-thread.entry-f302c441.js} +6 -6
- package/dist/person-icon.entry-6b20ac42.cjs +1 -0
- package/dist/person-icon.entry-8f8b928f.js +15 -0
- package/dist/play-icon_2.entry-3aa92414.js +25 -0
- package/dist/play-icon_2.entry-c8114634.cjs +1 -0
- package/dist/react.cjs +1 -1
- package/dist/react.js +116 -108
- package/dist/{refresh-icon.entry-0fdcb7af.js → refresh-icon.entry-0d80c9c5.js} +2 -2
- package/dist/{refresh-icon.entry-99761cb6.cjs → refresh-icon.entry-de5001c7.cjs} +1 -1
- package/dist/{register-component-a5a9ca5d-4439e573.cjs → register-component-b2a51b20-09664950.cjs} +1 -1
- package/dist/{register-component-a5a9ca5d-ddae10b3.js → register-component-b2a51b20-ea46761a.js} +1 -1
- package/dist/{scheduler-config-store-9ccfba4d-84025740.js → scheduler-config-store-9ccfba4d-92cb99d1.js} +1 -1
- package/dist/{scheduler-config-store-9ccfba4d-b774bfee.cjs → scheduler-config-store-9ccfba4d-a677e77b.cjs} +1 -1
- package/dist/scheduler-store-db06b30a-08429fc9.cjs +1 -0
- package/dist/{scheduler-store-8a400448-8ab7b63e.js → scheduler-store-db06b30a-cee61c58.js} +119 -116
- package/dist/{textarea-component.entry-359e4665.cjs → textarea-component.entry-670f72a7.cjs} +1 -1
- package/dist/{textarea-component.entry-193d29fd.js → textarea-component.entry-c2d1900c.js} +4 -4
- package/dist/time-period-selector.entry-3ccfc000.cjs +1 -0
- package/dist/time-period-selector.entry-a03b1ce1.js +93 -0
- package/dist/{translate-icon.entry-22a3e72e.js → translate-icon.entry-8a2878ba.js} +4 -4
- package/dist/{translate-icon.entry-32ec36de.cjs → translate-icon.entry-b483f6b3.cjs} +1 -1
- package/dist/{warning-icon.entry-8d9b59c0.js → warning-icon.entry-68b3f25e.js} +5 -5
- package/dist/{warning-icon.entry-b8d483e1.cjs → warning-icon.entry-784f7818.cjs} +1 -1
- package/package.json +3 -3
- package/dist/add-circle-icon_2.entry-5cefae99.js +0 -25
- package/dist/add-circle-icon_2.entry-85523420.cjs +0 -1
- package/dist/archive-icon_7.entry-eb90a353.cjs +0 -1
- package/dist/arrow-icon.entry-753eb942.js +0 -15
- package/dist/button-component_4.entry-3c508e3b.js +0 -115
- package/dist/button-component_4.entry-f8ab53dc.cjs +0 -1
- package/dist/calendar-agenda-fill-icon_35.entry-b56841a0.cjs +0 -7
- package/dist/clock-icon_2.entry-074eb053.cjs +0 -1
- package/dist/clock-icon_2.entry-bc938936.js +0 -25
- package/dist/copy-icon_4.entry-f704b2f1.cjs +0 -1
- package/dist/google-logo-icon_4.entry-8e87cf66.cjs +0 -1
- package/dist/google-logo-icon_4.entry-f50de25f.js +0 -598
- package/dist/index-53420959-507f0a27.js +0 -5
- package/dist/index-53420959-e6c2e510.cjs +0 -1
- package/dist/index-a4831dfe.cjs +0 -42
- package/dist/index-a68236be.js +0 -5011
- package/dist/input-dropdown_2.entry-2485dcc3.cjs +0 -1
- package/dist/input-dropdown_2.entry-2cd6cfc7.js +0 -220
- package/dist/loading-icon.entry-5ed52afe.cjs +0 -1
- package/dist/nylas-booked-event-card_10.entry-97977ac7.cjs +0 -1
- package/dist/nylas-scheduling.entry-00c418c8.cjs +0 -1
- package/dist/play-icon_2.entry-4f316c3d.cjs +0 -1
- package/dist/play-icon_2.entry-d55a018a.js +0 -25
- package/dist/scheduler-store-8a400448-eaa566fa.cjs +0 -1
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { r as
|
|
2
|
-
import { n as
|
|
3
|
-
import { E as
|
|
1
|
+
import { k as h, r as L, c as k, d as _, l as x, m as A, n as N, h as i, H as m, g as R, F as E } from "./index-5da0aff3.js";
|
|
2
|
+
import { n as I, N as F } from "./index.es-b16d0cf5-b1cecbdd.js";
|
|
3
|
+
import { E as C, C as P, N as S } from "./scheduler-store-db06b30a-cee61c58.js";
|
|
4
|
+
import { L as O } from "./constants-67de2eec-31cbc722.js";
|
|
4
5
|
import "react";
|
|
5
6
|
import "react-dom";
|
|
6
|
-
class
|
|
7
|
+
class j {
|
|
7
8
|
constructor({ schedulerAPIURL: e, nylasSchedulerStore: a, sessionId: n, configId: s }) {
|
|
8
9
|
if (!e)
|
|
9
10
|
throw new Error("schedulerAPIURL is required");
|
|
@@ -14,13 +15,13 @@ class P {
|
|
|
14
15
|
e === "/" && (e = new URL(window.location.href).origin), this.configId = s, this.sessionId = n, this.schedulerAPIURL = e, this.nylasSchedulerStore = a;
|
|
15
16
|
}
|
|
16
17
|
init() {
|
|
17
|
-
|
|
18
|
+
_("NylasConnector init");
|
|
18
19
|
}
|
|
19
20
|
get schedulerStore() {
|
|
20
21
|
return this.nylasSchedulerStore;
|
|
21
22
|
}
|
|
22
23
|
get scheduler() {
|
|
23
|
-
return this._schedulerAPIConnector ? this._schedulerAPIConnector : (this._schedulerAPIConnector = new
|
|
24
|
+
return this._schedulerAPIConnector ? this._schedulerAPIConnector : (this._schedulerAPIConnector = new S({
|
|
24
25
|
schedulerAPIURL: this.schedulerAPIURL,
|
|
25
26
|
schedulerStore: this.schedulerStore,
|
|
26
27
|
sessionId: this.sessionId,
|
|
@@ -31,10 +32,10 @@ class P {
|
|
|
31
32
|
this.nylasSchedulerStore.reset();
|
|
32
33
|
}
|
|
33
34
|
}
|
|
34
|
-
const
|
|
35
|
+
const w = (t, e) => {
|
|
35
36
|
const a = t.isLoading, n = t.showNotification, s = t.nylasBranding;
|
|
36
37
|
return i(
|
|
37
|
-
|
|
38
|
+
E,
|
|
38
39
|
null,
|
|
39
40
|
n && i("nylas-notification", null),
|
|
40
41
|
a && i(
|
|
@@ -57,40 +58,40 @@ const y = (t, e) => {
|
|
|
57
58
|
),
|
|
58
59
|
!a && e,
|
|
59
60
|
i("div", { class: "footer" }, s && i(
|
|
60
|
-
|
|
61
|
+
E,
|
|
61
62
|
null,
|
|
62
63
|
"Powered by ",
|
|
63
64
|
i("nylas-logo", null)
|
|
64
65
|
))
|
|
65
66
|
);
|
|
66
|
-
},
|
|
67
|
+
}, D = (t, e) => i("div", { class: "message-banner" }, e), H = ':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 6px -2px rgba(0, 0, 0, 0.05), 0px 10px 15px -3px 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-top:1rem}.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,.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{background-color:var(--nylas-base-50)}.cancelled-event-page,.cancel-flow-page{padding:1rem;height:496px;display:flex;justify-content:center;align-items:center}.booked-event-page,.cancelled-event-page,.cancel-flow-page{min-width:784px;background:var(--nylas-base-50)}@media screen and (max-width: 768px){.booked-event-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}@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}', M = H, B = { title: h.t("genericErrorTitle"), type: I.Error, category: C.Component }, U = class {
|
|
67
68
|
constructor(t) {
|
|
68
|
-
|
|
69
|
+
L(this, t), this.init = k(this, "init", 7), this.schedulerWillLoad = k(this, "schedulerWillLoad", 7), this.schedulerDidLoad = k(this, "schedulerDidLoad", 7), this.nylasSchedulerError = k(this, "nylasSchedulerError", 7), this.bookingRefExtracted = k(this, "bookingRefExtracted", 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.configurationId = void 0, this.nylasBranding = !0, this.eventOverrides = {}, this.isLoading = void 0, this.themeConfig = 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;
|
|
69
70
|
}
|
|
70
71
|
connectedCallback() {
|
|
71
|
-
|
|
72
|
+
_("[nylas-scheduler] connectedCallback");
|
|
72
73
|
}
|
|
73
74
|
async componentWillLoad() {
|
|
74
75
|
var a, n;
|
|
75
|
-
if (
|
|
76
|
+
if (_("[nylas-scheduler] Component will load"), this.schedulerWillLoad.emit(this.host).defaultPrevented)
|
|
76
77
|
return;
|
|
77
78
|
if (this.stores = {
|
|
78
|
-
scheduler:
|
|
79
|
+
scheduler: P({
|
|
79
80
|
bookingInfo: this.bookingInfo,
|
|
80
81
|
nylasBranding: this.nylasBranding,
|
|
81
82
|
...this.defaultSchedulerState
|
|
82
83
|
})
|
|
83
|
-
}, this.baseProvider = new
|
|
84
|
-
const [s, o] =
|
|
84
|
+
}, this.baseProvider = new F(this.host, this.stores, this.automaticComponentRegistration, this.eventOverrides), this.refConfigId = this.configurationId, this.rescheduleBookingRef) {
|
|
85
|
+
const [s, o] = x(this.rescheduleBookingRef);
|
|
85
86
|
this.refConfigId = s, this.stores.scheduler.set("rescheduleBookingId", o), this.bookingRefExtracted.emit({ configurationId: s, bookingId: o });
|
|
86
87
|
} else if (this.cancelBookingRef) {
|
|
87
|
-
const [s, o] =
|
|
88
|
+
const [s, o] = x(this.cancelBookingRef);
|
|
88
89
|
this.refConfigId = s, this.stores.scheduler.set("cancelBookingId", o), this.bookingRefExtracted.emit({ configurationId: s, bookingId: o });
|
|
89
90
|
}
|
|
90
91
|
if (!this.checkIfSessionIdOrConfigIdExists())
|
|
91
92
|
return;
|
|
92
93
|
const e = (a = this.baseProvider) == null ? void 0 : a.getStore("scheduler");
|
|
93
|
-
if (this.nylasSchedulerConnector = new
|
|
94
|
+
if (this.nylasSchedulerConnector = new j({
|
|
94
95
|
schedulerAPIURL: this.schedulerApiUrl,
|
|
95
96
|
sessionId: this.sessionId,
|
|
96
97
|
configId: this.refConfigId,
|
|
@@ -100,12 +101,12 @@ const y = (t, e) => {
|
|
|
100
101
|
this.host.style.setProperty(`${s}`, o);
|
|
101
102
|
}
|
|
102
103
|
async componentDidLoad() {
|
|
103
|
-
var d, l,
|
|
104
|
+
var d, l, g, u, p, y, f;
|
|
104
105
|
if ((d = this.baseProvider) == null || d.componentDidLoad(), !this.checkIfSessionIdOrConfigIdExists())
|
|
105
106
|
return;
|
|
106
107
|
const t = await ((l = this.nylasSchedulerConnector) == null ? void 0 : l.scheduler.getUISettings());
|
|
107
|
-
(!t || "error" in t) && this.nylasSchedulerError.emit({ ...this.getErrorObject(t == null ? void 0 : t.error) });
|
|
108
|
-
const e = (
|
|
108
|
+
(!t || "error" in t) && this.nylasSchedulerError.emit({ notification: { ...this.getErrorObject(t == null ? void 0 : t.error) }, host: this.host });
|
|
109
|
+
const e = (g = this.baseProvider) == null ? void 0 : g.getStore("scheduler"), a = (p = (u = e == null ? void 0 : e.get("configSettings")) == null ? void 0 : u.scheduler) == null ? void 0 : p.available_days_in_future, n = e == null ? void 0 : e.get("selectedTimeslot");
|
|
109
110
|
if (n && (n != null && n.start_time)) {
|
|
110
111
|
if (!this.isTimeslotValid(n))
|
|
111
112
|
return;
|
|
@@ -118,16 +119,16 @@ const y = (t, e) => {
|
|
|
118
119
|
let r;
|
|
119
120
|
if (!(o && o.length > 0)) {
|
|
120
121
|
if (s) {
|
|
121
|
-
const { startTime:
|
|
122
|
-
s.getTime() <
|
|
122
|
+
const { startTime: c, endTime: b, endTimeForAvailableDaysInFuture: v } = this.validateAvailableDaysInFuture(s, a || 30);
|
|
123
|
+
s.getTime() < v * 1e3 && (r = await ((f = this.nylasSchedulerConnector) == null ? void 0 : f.scheduler.getAvailability(c, b)));
|
|
123
124
|
} else {
|
|
124
|
-
const
|
|
125
|
-
|
|
125
|
+
const c = /* @__PURE__ */ new Date(), { startTime: b, endTime: v, endTimeForAvailableDaysInFuture: T } = this.validateAvailableDaysInFuture(c, a || 30);
|
|
126
|
+
c.getTime() < T * 1e3 && (r = await ((y = this.nylasSchedulerConnector) == null ? void 0 : y.scheduler.getAvailability(b, v)));
|
|
126
127
|
}
|
|
127
|
-
if ((!r || "error" in r) && this.nylasSchedulerError.emit({ ...this.getErrorObject(r == null ? void 0 : r.error) }), !s) {
|
|
128
|
-
let
|
|
129
|
-
const
|
|
130
|
-
|
|
128
|
+
if ((!r || "error" in r) && this.nylasSchedulerError.emit({ notification: { ...this.getErrorObject(r == null ? void 0 : r.error) }, host: this.host }), !s) {
|
|
129
|
+
let c = /* @__PURE__ */ new Date();
|
|
130
|
+
const b = e == null ? void 0 : e.get("availability").find((v) => new Date(v.start_time) > /* @__PURE__ */ new Date());
|
|
131
|
+
b && (c = b.start_time), e == null || e.set("selectedDate", c);
|
|
131
132
|
}
|
|
132
133
|
}
|
|
133
134
|
}
|
|
@@ -142,17 +143,21 @@ const y = (t, e) => {
|
|
|
142
143
|
rescheduleBookingRefChanged(t) {
|
|
143
144
|
var e, a;
|
|
144
145
|
if (t) {
|
|
145
|
-
const [n, s] =
|
|
146
|
+
const [n, s] = x(t);
|
|
146
147
|
(e = this.stores) == null || e.scheduler.set("rescheduleBookingId", s), this.refConfigId = n, (a = this.nylasSchedulerConnector) == null || a.scheduler.setConfigId(n);
|
|
147
148
|
}
|
|
148
149
|
}
|
|
149
150
|
cancelBookingRefChanged(t) {
|
|
150
151
|
var e, a;
|
|
151
152
|
if (t) {
|
|
152
|
-
const [n, s] =
|
|
153
|
+
const [n, s] = x(t);
|
|
153
154
|
(e = this.stores) == null || e.scheduler.set("cancelBookingId", s), this.refConfigId = n, (a = this.nylasSchedulerConnector) == null || a.scheduler.setConfigId(n);
|
|
154
155
|
}
|
|
155
156
|
}
|
|
157
|
+
languageChanged(t) {
|
|
158
|
+
const e = t.detail;
|
|
159
|
+
this.language = e, h.changeLanguage(e);
|
|
160
|
+
}
|
|
156
161
|
async registerComponentHandler(t) {
|
|
157
162
|
var e;
|
|
158
163
|
(e = this.baseProvider) == null || e.registerComponent(t.detail);
|
|
@@ -162,11 +167,13 @@ const y = (t, e) => {
|
|
|
162
167
|
(e = this.baseProvider) == null || e.unregisterComponent(t.detail);
|
|
163
168
|
}
|
|
164
169
|
async monthChangedHandler(t) {
|
|
165
|
-
var r, d, l,
|
|
166
|
-
const e = t.detail, a = (
|
|
170
|
+
var r, d, l, g, u, p, y;
|
|
171
|
+
const e = t.detail, a = (g = (l = (d = (r = this.nylasSchedulerConnector) == null ? void 0 : r.schedulerStore) == null ? void 0 : d.get("configSettings")) == null ? void 0 : l.scheduler) == null ? void 0 : g.available_days_in_future, { startTime: n, endTime: s, endTimeForAvailableDaysInFuture: o } = this.validateAvailableDaysInFuture(e, a || 30);
|
|
167
172
|
if (n < o && e.getTime() < o * 1e3) {
|
|
168
|
-
const
|
|
169
|
-
(!
|
|
173
|
+
const f = await ((u = this.nylasSchedulerConnector) == null ? void 0 : u.scheduler.getAvailability(n, s));
|
|
174
|
+
(!f || "error" in f) && this.nylasSchedulerError.emit({ notification: { ...this.getErrorObject(f == null ? void 0 : f.error) }, host: this.host });
|
|
175
|
+
const c = (p = this.stores) == null ? void 0 : p.scheduler.get("selectableDates");
|
|
176
|
+
c && c.length > 0 && ((y = this.stores) == null || y.scheduler.set("selectedDate", c[0]));
|
|
170
177
|
}
|
|
171
178
|
}
|
|
172
179
|
async bookButtonClickedHandler(t) {
|
|
@@ -174,24 +181,24 @@ const y = (t, e) => {
|
|
|
174
181
|
const a = (o = (s = this.nylasSchedulerConnector) == null ? void 0 : s.schedulerStore) == null ? void 0 : o.get("rescheduleBookingId");
|
|
175
182
|
if (a) {
|
|
176
183
|
const l = await ((r = this.nylasSchedulerConnector) == null ? void 0 : r.scheduler.rescheduleBooking(a, t.detail));
|
|
177
|
-
(!l || "error" in l) && this.nylasSchedulerError.emit({ ...this.getErrorObject(l == null ? void 0 : l.error) });
|
|
184
|
+
(!l || "error" in l) && this.nylasSchedulerError.emit({ notification: { ...this.getErrorObject(l == null ? void 0 : l.error) }, host: this.host });
|
|
178
185
|
return;
|
|
179
186
|
}
|
|
180
187
|
const n = await ((d = this.nylasSchedulerConnector) == null ? void 0 : d.scheduler.bookTimeslot(t.detail));
|
|
181
|
-
(!n || "error" in n) && this.nylasSchedulerError.emit({ ...this.getErrorObject(n == null ? void 0 : n.error) });
|
|
188
|
+
(!n || "error" in n) && this.nylasSchedulerError.emit({ notification: { ...this.getErrorObject(n == null ? void 0 : n.error) }, host: this.host });
|
|
182
189
|
}
|
|
183
190
|
dateSelectedHandler(t) {
|
|
184
191
|
const e = t.detail;
|
|
185
|
-
this.selectedDateLabel = e ? e.toLocaleDateString(void 0, { dateStyle: "full" }) : "
|
|
192
|
+
this.selectedDateLabel = e ? e.toLocaleDateString(void 0, { dateStyle: "full" }) : `${h.t("noDateSelected")}`;
|
|
186
193
|
}
|
|
187
194
|
cancelBookedEventErrorHandler(t) {
|
|
188
|
-
this.nylasSchedulerError.emit({ ...this.getErrorObject(t.detail.error) });
|
|
195
|
+
this.nylasSchedulerError.emit({ notification: { ...this.getErrorObject(t.detail.error) }, host: this.host });
|
|
189
196
|
}
|
|
190
197
|
cancelBookedEventValidationErrorHandler(t) {
|
|
191
|
-
this.nylasSchedulerError.emit({ ...this.getErrorObject(t.detail.error) });
|
|
198
|
+
this.nylasSchedulerError.emit({ notification: { ...this.getErrorObject(t.detail.error) }, host: this.host });
|
|
192
199
|
}
|
|
193
200
|
rescheduleBookedEventErrorHandler(t) {
|
|
194
|
-
this.nylasSchedulerError.emit({ ...this.getErrorObject(t.detail.error) });
|
|
201
|
+
this.nylasSchedulerError.emit({ notification: { ...this.getErrorObject(t.detail.error) }, host: this.host });
|
|
195
202
|
}
|
|
196
203
|
async getNylasSchedulerStore() {
|
|
197
204
|
var t;
|
|
@@ -205,9 +212,9 @@ const y = (t, e) => {
|
|
|
205
212
|
}
|
|
206
213
|
getErrorObject(t) {
|
|
207
214
|
return {
|
|
208
|
-
title: (t == null ? void 0 : t.title) ||
|
|
209
|
-
category: (t == null ? void 0 : t.category) ||
|
|
210
|
-
type:
|
|
215
|
+
title: (t == null ? void 0 : t.title) || B.title,
|
|
216
|
+
category: (t == null ? void 0 : t.category) || B.category,
|
|
217
|
+
type: I.Error,
|
|
211
218
|
description: (t == null ? void 0 : t.message) || "",
|
|
212
219
|
id: (/* @__PURE__ */ new Date()).getTime().toString(),
|
|
213
220
|
ttl: "none"
|
|
@@ -215,49 +222,51 @@ const y = (t, e) => {
|
|
|
215
222
|
}
|
|
216
223
|
checkIfSessionIdOrConfigIdExists() {
|
|
217
224
|
return !this.sessionId && !this.refConfigId ? (this.nylasSchedulerError.emit({
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
225
|
+
notification: {
|
|
226
|
+
title: h.t("noSessionIdErrorTitle"),
|
|
227
|
+
category: C.Component,
|
|
228
|
+
type: I.Error,
|
|
229
|
+
description: h.t("noSessionIdErrorMessage"),
|
|
230
|
+
id: (/* @__PURE__ */ new Date()).getTime().toString(),
|
|
231
|
+
ttl: "none"
|
|
232
|
+
},
|
|
233
|
+
host: this.host
|
|
224
234
|
}), !1) : !0;
|
|
225
235
|
}
|
|
226
236
|
isTimeslotValid(t) {
|
|
227
237
|
return new Date(t.start_time) < /* @__PURE__ */ new Date() ? (this.nylasSchedulerError.emit({
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
238
|
+
notification: {
|
|
239
|
+
title: h.t("invalidTimeslotErrorTitle"),
|
|
240
|
+
category: C.Component,
|
|
241
|
+
type: I.Error,
|
|
242
|
+
description: h.t("invalidTimeslotErrorMessage"),
|
|
243
|
+
id: (/* @__PURE__ */ new Date()).getTime().toString(),
|
|
244
|
+
ttl: "none"
|
|
245
|
+
},
|
|
246
|
+
host: this.host
|
|
234
247
|
}), !1) : !0;
|
|
235
248
|
}
|
|
236
249
|
validateAvailableDaysInFuture(t, e) {
|
|
237
|
-
const a = /* @__PURE__ */ new Date(), n = new Date(t.getFullYear(), t.getMonth(), 1).getTime() / 1e3, s = new Date(t.getFullYear(), t.getMonth() + 1, 1).getTime() / 1e3, o = Math.floor(
|
|
250
|
+
const a = /* @__PURE__ */ new Date(), n = new Date(t.getFullYear(), t.getMonth(), 1).getTime() / 1e3, s = new Date(t.getFullYear(), t.getMonth() + 1, 1).getTime() / 1e3, o = Math.floor(A(a, e).getTime() / 1e3), r = Math.min(o, s);
|
|
238
251
|
return { startTime: n < a.getTime() / 1e3 ? Math.floor(a.getTime() / 1e3) : n, endTime: r, endTimeForAvailableDaysInFuture: o };
|
|
239
252
|
}
|
|
240
253
|
render() {
|
|
241
|
-
var
|
|
242
|
-
const t = this.mode === "app", e = (
|
|
243
|
-
if (this.selectedDateLabel =
|
|
244
|
-
return i(
|
|
254
|
+
var u;
|
|
255
|
+
const t = this.mode === "app", e = (u = this.baseProvider) == null ? void 0 : u.getStore("scheduler"), a = e == null ? void 0 : e.get("eventInfo"), n = e == null ? void 0 : e.get("showBookingForm"), s = e == null ? void 0 : e.get("cancelledEventInfo"), o = e == null ? void 0 : e.get("cancelBookingId"), r = e == null ? void 0 : e.get("selectedTimeslot"), d = e == null ? void 0 : e.get("rescheduleBookingId"), l = (e == null ? void 0 : e.get("nylasBranding")) || this.nylasBranding, g = e == null ? void 0 : e.get("selectedDate");
|
|
256
|
+
if (this.selectedDateLabel = g && this.language ? N(g.toLocaleDateString(O[this.language], { dateStyle: "full" })) : `${h.t("noDateSelected")}`, t && o && !s)
|
|
257
|
+
return i(m, null, i(w, { nylasBranding: l, isLoading: this.isLoading, showNotification: this.showNotification }, i("div", { class: "cancel-flow-page", part: "cancel-flow-page" }, i("nylas-cancel-booking-form", { selectedTimeslot: r, cancelBookingId: o, exportparts: "ncbf, ncbf__input-textfield, ncbf__button-cta, ncbf__button-outline, ncbf__input-label" }))));
|
|
245
258
|
if (t && s)
|
|
246
|
-
return i(
|
|
259
|
+
return i(m, null, i(w, { nylasBranding: l, isLoading: this.isLoading, showNotification: this.showNotification }, i("div", { class: "cancelled-event-page", part: "cancelled-event-page" }, i("nylas-cancelled-event-card", { cancelledEventInfo: s, exportparts: "ncec, ncec__icon, ncec__title, ncec__description, ncec__button-outline, ncec__card" }))));
|
|
247
260
|
if (t && a)
|
|
248
|
-
return i(
|
|
261
|
+
return i(m, null, i(w, { nylasBranding: l, isLoading: this.isLoading, showNotification: this.showNotification }, i("div", { class: "booked-event-page", part: "booked-event-page" }, i("nylas-booked-event-card", { selectedTimeslot: r, eventInfo: a, exportparts: "nbec, nbec__title, nbec__card, nbec__description, nbec__button-outline, nbec__cancel-cta, nbec__reschedule-cta" }))));
|
|
249
262
|
if (t && (!a || d) && !n) {
|
|
250
|
-
const
|
|
251
|
-
return i(
|
|
252
|
-
}
|
|
253
|
-
if (t && !a && n) {
|
|
254
|
-
const c = this.host.querySelector('[slot="custom-booking-form"]');
|
|
255
|
-
return i(p, null, i(y, { nylasBranding: l, isLoading: this.isLoading, showNotification: this.showNotification }, d && i(E, null, "Choose another time slot to reschedule your meeting"), i("div", { class: "additional-data-page", part: "additional-data-page" }, i("div", { class: "left-panel" }, i("div", { class: "wrapper" }, i("nylas-selected-event-card", { exportparts: "nsec, nsec__card, nsec__icon, nsec__date, nsec__time" }))), i("div", { class: "right-panel" }, i("nylas-booking-form", { exportparts: "nbf, nbf__input-label, nbf__input-textfield, nbf__button-ghost, nbf__button-primary, nbf__button-outline" }, c && i("div", { slot: "custom-booking-form" }, i("slot", { name: "custom-booking-form" })))))));
|
|
263
|
+
const p = this.host.querySelector('[slot="timeslot-picker-cta-label"]');
|
|
264
|
+
return i(m, null, i(w, { nylasBranding: l, isLoading: this.isLoading, showNotification: this.showNotification }, d && i(D, null, `${h.t("rescheduleTitle")}`), i("div", { class: "select-date-page", part: "select-date-page" }, i("div", { class: "left-panel" }, i("nylas-date-picker", { exportparts: "ndp, ndp__month-header, ndp__month-button, ndp__day, ndp__date, ndp__date--selected, ndp__date--current-day, ndp__date--current-month" }), i("nylas-locale-switch", null)), i("div", { class: "right-panel" }, i("h2", null, i("calendar-icon", null), i("span", { id: "selectedDate" }, this.selectedDateLabel)), i("nylas-timeslot-picker", { exportparts: "ntp, ntp__timeslot, ntp__timeslot--selected, ntp__button-primary" }, p && i("span", { slot: "timeslot-picker-cta-label" }, i("slot", { name: "timeslot-picker-cta-label" })))))));
|
|
256
265
|
}
|
|
257
|
-
return i(
|
|
266
|
+
return t && !a && n ? i(m, null, i(w, { nylasBranding: l, isLoading: this.isLoading, showNotification: this.showNotification }, d && i(D, null, `${h.t("rescheduleTitle")}`), i("div", { class: "additional-data-page", part: "additional-data-page" }, i("div", { class: "left-panel" }, i("div", { class: "wrapper" }, i("nylas-selected-event-card", { exportparts: "nsec, nsec__card, nsec__icon, nsec__date, nsec__time" }))), i("div", { class: "right-panel" }, i("nylas-booking-form", { exportparts: "nbf, nbf__input-label, nbf__input-textfield, nbf__button-ghost, nbf__button-primary, nbf__button-outline" }))))) : i(m, null, i("slot", null));
|
|
258
267
|
}
|
|
259
268
|
get host() {
|
|
260
|
-
return
|
|
269
|
+
return R(this);
|
|
261
270
|
}
|
|
262
271
|
static get watchers() {
|
|
263
272
|
return {
|
|
@@ -267,7 +276,7 @@ const y = (t, e) => {
|
|
|
267
276
|
};
|
|
268
277
|
}
|
|
269
278
|
};
|
|
270
|
-
|
|
279
|
+
U.style = M;
|
|
271
280
|
export {
|
|
272
|
-
|
|
281
|
+
U as nylas_scheduling
|
|
273
282
|
};
|
package/dist/{nylas-threads-refresh.entry-a85222e2.js → nylas-threads-refresh.entry-e200efb9.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
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-5da0aff3.js";
|
|
2
|
+
import { R as m } from "./register-component-b2a51b20-ea46761a.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;
|
|
@@ -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: "208a3f1e64e9f7a1a2614fa3e772c5664e3d3109" }, o("div", { key: "36d2e44d491978301c549d62834606f7d46737b3", class: "container", ref: (t) => this.containerElement = t }, o("button", { key: "1f2cbf74de5be69de5eeca22b46e0ba51ac87720", 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: "089d5985cbfb0be2d9db820b0039cb29fa7138a9", class: "content", ref: (t) => this.contentElement = t }, o("slot", { key: "8594cea7e7c308acf95aa59d7e8dabfeeb813fc4" }))));
|
|
53
53
|
}
|
|
54
54
|
};
|
|
55
55
|
v([
|
package/dist/{nylas-threads-refresh.entry-f3b9fdf2.cjs → nylas-threads-refresh.entry-ef2ad409.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-26f8bbeb.cjs"),d=require("./register-component-b2a51b20-09664950.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 c=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:"208a3f1e64e9f7a1a2614fa3e772c5664e3d3109"},s.h("div",{key:"36d2e44d491978301c549d62834606f7d46737b3",class:"container",ref:t=>this.containerElement=t},s.h("button",{key:"1f2cbf74de5be69de5eeca22b46e0ba51ac87720",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:"089d5985cbfb0be2d9db820b0039cb29fa7138a9",class:"content",ref:t=>this.contentElement=t},s.h("slot",{key:"8594cea7e7c308acf95aa59d7e8dabfeeb813fc4"}))))}};p([d.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)],c.prototype,"render",null);c.style=u;exports.nylas_threads_refresh=c;
|
package/dist/{nylas-threads-search.entry-b1bf455b.js → nylas-threads-search.entry-85a0bc7d.js}
RENAMED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { r as u, c as y, d as h, h as i, H as p } from "./index-
|
|
2
|
-
import { R as f } from "./register-component-
|
|
1
|
+
import { r as u, c as y, d as h, h as i, H as p } from "./index-5da0aff3.js";
|
|
2
|
+
import { R as f } from "./register-component-b2a51b20-ea46761a.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "react-dom";
|
|
5
5
|
const m = ":host{display:block}sp-search{width:100%;border:0}", b = m;
|
|
6
6
|
var g = function(t, e, n, r) {
|
|
7
|
-
var s = arguments.length, a = s < 3 ? e : r === null ? r = Object.getOwnPropertyDescriptor(e, n) : r,
|
|
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);
|
|
10
10
|
else
|
|
11
|
-
for (var
|
|
12
|
-
(
|
|
11
|
+
for (var c = t.length - 1; c >= 0; c--)
|
|
12
|
+
(o = t[c]) && (a = (s < 3 ? o(a) : s > 3 ? o(e, n, a) : o(e, n)) || a);
|
|
13
13
|
return s > 3 && a && Object.defineProperty(e, n, a), a;
|
|
14
14
|
}, l = function(t, e) {
|
|
15
15
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
@@ -37,7 +37,7 @@ const d = class {
|
|
|
37
37
|
this.internalQuery = this.query;
|
|
38
38
|
}
|
|
39
39
|
render() {
|
|
40
|
-
return i(p, { key: "
|
|
40
|
+
return i(p, { key: "ab923b1dc0d97e7989c0acb5153b3ef41c564379" }, i("sp-theme", { key: "d51233f46b3551a8e9b62a19a8d48c2e265ed7e6", scale: "medium", color: "dark" }, i("sp-search", { key: "be41fc3866ba0ee6203f0c310f4f544bcdf2e52d", quiet: !0, onSubmit: this.onSearch, onBlur: this.onSearch, value: this.internalQuery })));
|
|
41
41
|
}
|
|
42
42
|
static get watchers() {
|
|
43
43
|
return {
|
package/dist/{nylas-threads-search.entry-2c8ac7dc.cjs → nylas-threads-search.entry-a260ce6f.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-26f8bbeb.cjs"),u=require("./register-component-b2a51b20-09664950.cjs");require("react");require("react-dom");const d=":host{display:block}sp-search{width:100%;border:0}",y=d;var f=function(t,e,s,n){var c=arguments.length,r=c<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,s):n,o;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--)(o=t[i])&&(r=(c<3?o(r):c>3?o(e,s,r):o(e,s))||r);return c>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:"ab923b1dc0d97e7989c0acb5153b3ef41c564379"},a.h("sp-theme",{key:"d51233f46b3551a8e9b62a19a8d48c2e265ed7e6",scale:"medium",color:"dark"},a.h("sp-search",{key:"be41fc3866ba0ee6203f0c310f4f544bcdf2e52d",quiet:!0,onSubmit:this.onSearch,onBlur:this.onSearch,value:this.internalQuery})))}static get watchers(){return{query:["onQueryChange"]}}};f([u.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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as ae,
|
|
1
|
+
import { i as ae, U as C, r as oe, c as N, V as Z, W as B, X as G, Y as q, h as k, H as he, g as me } from "./index-5da0aff3.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import "react-dom";
|
|
4
4
|
var J = { exports: {} };
|
|
@@ -6,7 +6,7 @@ var J = { exports: {} };
|
|
|
6
6
|
(function(n, i) {
|
|
7
7
|
e.exports = i();
|
|
8
8
|
})(ae, function() {
|
|
9
|
-
var n = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, i = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, r = /\d\d/, o = /\d\d?/, v = /\d*[^-_:/,()\s\d]+/, x = {},
|
|
9
|
+
var n = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, i = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, r = /\d\d/, o = /\d\d?/, v = /\d*[^-_:/,()\s\d]+/, x = {}, U = function(s) {
|
|
10
10
|
return (s = +s) + (s > 68 ? 1900 : 2e3);
|
|
11
11
|
}, l = function(s) {
|
|
12
12
|
return function(a) {
|
|
@@ -22,7 +22,7 @@ var J = { exports: {} };
|
|
|
22
22
|
}], P = function(s) {
|
|
23
23
|
var a = x[s];
|
|
24
24
|
return a && (a.indexOf ? a : a.s.concat(a.f));
|
|
25
|
-
},
|
|
25
|
+
}, X = function(s, a) {
|
|
26
26
|
var h, m = x.meridiem;
|
|
27
27
|
if (m) {
|
|
28
28
|
for (var f = 1; f <= 24; f += 1)
|
|
@@ -34,9 +34,9 @@ var J = { exports: {} };
|
|
|
34
34
|
h = s === (a ? "pm" : "PM");
|
|
35
35
|
return h;
|
|
36
36
|
}, Q = { A: [v, function(s) {
|
|
37
|
-
this.afternoon =
|
|
37
|
+
this.afternoon = X(s, !1);
|
|
38
38
|
}], a: [v, function(s) {
|
|
39
|
-
this.afternoon =
|
|
39
|
+
this.afternoon = X(s, !0);
|
|
40
40
|
}], S: [/\d/, function(s) {
|
|
41
41
|
this.milliseconds = 100 * +s;
|
|
42
42
|
}], SS: [r, function(s) {
|
|
@@ -61,7 +61,7 @@ var J = { exports: {} };
|
|
|
61
61
|
throw new Error();
|
|
62
62
|
this.month = a % 12 || a;
|
|
63
63
|
}], Y: [/[+-]?\d+/, l("year")], YY: [r, function(s) {
|
|
64
|
-
this.year =
|
|
64
|
+
this.year = U(s);
|
|
65
65
|
}], YYYY: [/\d{4}/, l("year")], Z: _, ZZ: _ };
|
|
66
66
|
function ee(s) {
|
|
67
67
|
var a, h;
|
|
@@ -95,7 +95,7 @@ var J = { exports: {} };
|
|
|
95
95
|
};
|
|
96
96
|
}
|
|
97
97
|
return function(s, a, h) {
|
|
98
|
-
h.p.customParseFormat = !0, s && s.parseTwoDigitYear && (
|
|
98
|
+
h.p.customParseFormat = !0, s && s.parseTwoDigitYear && (U = s.parseTwoDigitYear);
|
|
99
99
|
var m = a.prototype, f = m.parse;
|
|
100
100
|
m.parse = function(p) {
|
|
101
101
|
var L = p.date, I = p.utc, y = p.args;
|
|
@@ -107,10 +107,10 @@ var J = { exports: {} };
|
|
|
107
107
|
try {
|
|
108
108
|
if (["x", "X"].indexOf(A) > -1)
|
|
109
109
|
return new Date((A === "X" ? 1e3 : 1) * E);
|
|
110
|
-
var c = ee(A)(E), Y = c.year, O = c.month, te = c.day, ie = c.hours, se = c.minutes, ne = c.seconds, re = c.milliseconds,
|
|
110
|
+
var c = ee(A)(E), Y = c.year, O = c.month, te = c.day, ie = c.hours, se = c.minutes, ne = c.seconds, re = c.milliseconds, j = c.zone, z = /* @__PURE__ */ new Date(), F = te || (Y || O ? 1 : z.getDate()), H = Y || z.getFullYear(), $ = 0;
|
|
111
111
|
Y && !O || ($ = O > 0 ? O - 1 : z.getMonth());
|
|
112
|
-
var K = ie || 0, R = se || 0, V = ne || 0,
|
|
113
|
-
return
|
|
112
|
+
var K = ie || 0, R = se || 0, V = ne || 0, W = re || 0;
|
|
113
|
+
return j ? new Date(Date.UTC(H, $, F, K, R, V, W + 60 * j.offset * 1e3)) : M ? new Date(Date.UTC(H, $, F, K, R, V, W)) : new Date(H, $, F, K, R, V, W);
|
|
114
114
|
} catch {
|
|
115
115
|
return /* @__PURE__ */ new Date("");
|
|
116
116
|
}
|
|
@@ -135,7 +135,7 @@ const le = J.exports, de = ':host{display:block;position:relative;--nylas-primar
|
|
|
135
135
|
C.extend(le);
|
|
136
136
|
const ue = class {
|
|
137
137
|
constructor(e) {
|
|
138
|
-
oe(this, e), this.timeChange =
|
|
138
|
+
oe(this, e), this.timeChange = N(this, "timeChange", 7), this.formError = N(this, "formError", 7), this.time = void 0, this.minimumStartTime = null, this.placeholder = "hh:mmam/pm", this.name = void 0, this.hasError = !1, this.err = "", this.showTimes = !1, this.ariaActivedescendant = "", this.times = this.generateTimes(), this.shouldAutoScroll = !1;
|
|
139
139
|
}
|
|
140
140
|
handleOutsideClick(e) {
|
|
141
141
|
!e.composedPath().includes(this.el) && this.showTimes && (this.showTimes = !1);
|
|
@@ -153,7 +153,7 @@ const ue = class {
|
|
|
153
153
|
}
|
|
154
154
|
componentDidRender() {
|
|
155
155
|
if (this.showTimes && this.shouldAutoScroll) {
|
|
156
|
-
const e =
|
|
156
|
+
const e = Z(this.time), t = this.times.findIndex((n) => n.value === e);
|
|
157
157
|
t > -1 && (this.shouldAutoScroll = !1, this.scrollToViewWithinParent(t));
|
|
158
158
|
return;
|
|
159
159
|
}
|
|
@@ -163,7 +163,7 @@ const ue = class {
|
|
|
163
163
|
n[0] === "00" && n[1].slice(-2) == "pm" && (this.err = "Invalid", this.formError.emit({
|
|
164
164
|
key: this.el.id,
|
|
165
165
|
message: "Invalid"
|
|
166
|
-
})),
|
|
166
|
+
})), B(t) ? (this.err = "", this.formError.emit({
|
|
167
167
|
key: this.el.id,
|
|
168
168
|
message: ""
|
|
169
169
|
})) : (this.err = "Invalid", this.formError.emit({
|
|
@@ -177,7 +177,7 @@ const ue = class {
|
|
|
177
177
|
handleTimeAutocomplete(e) {
|
|
178
178
|
var n;
|
|
179
179
|
const t = (n = e.target) == null ? void 0 : n.value;
|
|
180
|
-
if (!
|
|
180
|
+
if (!B(t)) {
|
|
181
181
|
this.err = "Invalid", this.formError.emit({
|
|
182
182
|
key: this.el.id,
|
|
183
183
|
message: "Invalid"
|
|
@@ -193,7 +193,7 @@ const ue = class {
|
|
|
193
193
|
return;
|
|
194
194
|
}
|
|
195
195
|
if (!q(t)) {
|
|
196
|
-
const i =
|
|
196
|
+
const i = Z(t);
|
|
197
197
|
this.timeChange.emit({
|
|
198
198
|
key: this.el.id,
|
|
199
199
|
value: i
|
|
@@ -208,14 +208,14 @@ const ue = class {
|
|
|
208
208
|
handleOnInput(e) {
|
|
209
209
|
var n;
|
|
210
210
|
const t = (n = e.target) == null ? void 0 : n.value;
|
|
211
|
-
if (
|
|
211
|
+
if (B(t)) {
|
|
212
212
|
if (t === "") {
|
|
213
213
|
const i = G().format("hh:mma"), r = this.times.findIndex((o) => o.value === i);
|
|
214
214
|
r > -1 && this.scrollToViewWithinParent(r);
|
|
215
215
|
return;
|
|
216
216
|
}
|
|
217
217
|
if (!q(t)) {
|
|
218
|
-
const i =
|
|
218
|
+
const i = Z(t), r = this.times.findIndex((o) => o.value === i);
|
|
219
219
|
r > -1 && this.scrollToViewWithinParent(r);
|
|
220
220
|
return;
|
|
221
221
|
}
|
|
@@ -290,7 +290,7 @@ const ue = class {
|
|
|
290
290
|
i && (i.focus(), i.scrollIntoView({ behavior: "smooth", block: "nearest" }));
|
|
291
291
|
}
|
|
292
292
|
render() {
|
|
293
|
-
return k(he, { key: "
|
|
293
|
+
return k(he, { key: "12d85398908ad2f7599f6bb8f205385e29d02fd8" }, k("div", { key: "3204c12df33c2d1ca51ed410c7a1ba4a8af5aa8a", class: "time-picker", part: "time-picker" }, k("input", { key: "2ab8d78f1f02286df97a0c820e40d836fd4f9e1a", type: "text", name: this.name, id: this.name, part: "time-input", class: {
|
|
294
294
|
"time-input": !0,
|
|
295
295
|
error: !!this.err || this.hasError
|
|
296
296
|
}, ref: (e) => this.timeInput = e, value: this.time, onClick: () => {
|