@nylas/react 1.1.0-canary.15 → 1.1.0-canary.17
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-936fd73b.cjs +1 -0
- package/dist/add-circle-icon_2.entry-ce6aaa1d.js +25 -0
- package/dist/{archive-icon_7.entry-ca8262ff.js → archive-icon_7.entry-60e900b6.js} +18 -18
- package/dist/{archive-icon_7.entry-25d8b2f0.cjs → archive-icon_7.entry-8c8317e9.cjs} +1 -1
- package/dist/{arrow-icon.entry-991ba7cd.js → arrow-icon.entry-057db95a.js} +2 -2
- package/dist/{arrow-icon.entry-01192ecf.cjs → arrow-icon.entry-2d4e9572.cjs} +1 -1
- package/dist/bold-icon_3.entry-557c6007.js +35 -0
- package/dist/{bold-icon_3.entry-e94dcf5b.cjs → bold-icon_3.entry-ba732761.cjs} +1 -1
- package/dist/{add-circle-icon_2.entry-3f834b47.js → button-component.entry-22d0ac2e.js} +5 -15
- package/dist/button-component.entry-385f9581.cjs +1 -0
- package/dist/{calendar-cancel-icon.entry-f646c147.js → calendar-cancel-icon.entry-820cf967.js} +5 -5
- package/dist/{calendar-cancel-icon.entry-9088fa8b.cjs → calendar-cancel-icon.entry-b2657caf.cjs} +1 -1
- package/dist/{calendar-check-icon_2.entry-a7e4d0e6.js → calendar-check-icon_2.entry-128a5d67.js} +9 -9
- package/dist/{calendar-check-icon_2.entry-4dc1391a.cjs → calendar-check-icon_2.entry-b13e7cbb.cjs} +1 -1
- package/dist/{calendar-icon.entry-1658930c.js → calendar-icon.entry-a43e6011.js} +5 -5
- package/dist/{calendar-icon.entry-1e2acd5c.cjs → calendar-icon.entry-d17d7cfb.cjs} +1 -1
- package/dist/calendar-info-icon_28.entry-b4f09bfe.cjs +1 -0
- package/dist/{calendar-info-icon_25.entry-493c5547.js → calendar-info-icon_28.entry-b71c23c5.js} +754 -828
- package/dist/{chevron-icon_3.entry-52b97043.cjs → chevron-icon_3.entry-4807a0b1.cjs} +1 -1
- package/dist/{chevron-icon_3.entry-b3c7eb44.js → chevron-icon_3.entry-e0796c69.js} +5 -5
- package/dist/{clock-icon_2.entry-882249ee.cjs → clock-icon_2.entry-267614c2.cjs} +1 -1
- package/dist/{clock-icon_2.entry-58f07042.js → clock-icon_2.entry-e959ae50.js} +7 -7
- package/dist/{constants-f34b9c6e-1da5094b.cjs → constants-f34b9c6e-ebc2e19c.cjs} +1 -1
- package/dist/{constants-f34b9c6e-628beaa8.js → constants-f34b9c6e-efe2836b.js} +1 -1
- package/dist/{document-refresh-icon.entry-b53316b4.js → document-refresh-icon.entry-b4c217df.js} +2 -2
- package/dist/{document-refresh-icon.entry-4f581bf4.cjs → document-refresh-icon.entry-b8850675.cjs} +1 -1
- package/dist/elements/index.d.ts +1 -0
- package/dist/{elements-dc5b338e-3284591d.cjs → elements-dc5b338e-a33785e3.cjs} +1 -1
- package/dist/{elements-dc5b338e-7abe37c6.js → elements-dc5b338e-b0a290ae.js} +1 -1
- package/dist/{focus-visible-e8093c16-d6612604.js → focus-visible-e8093c16-5f1ae916.js} +1 -1
- package/dist/{focus-visible-e8093c16-cb6c97b1.cjs → focus-visible-e8093c16-d2afb13d.cjs} +1 -1
- package/dist/{forward-icon_6.entry-e402ad1e.cjs → forward-icon_6.entry-0009e4f0.cjs} +3 -3
- package/dist/{forward-icon_6.entry-d54244f7.js → forward-icon_6.entry-53683e82.js} +9 -9
- package/dist/{globe-icon.entry-e83c79c2.js → globe-icon.entry-dbb47687.js} +4 -4
- package/dist/{globe-icon.entry-db7377d9.cjs → globe-icon.entry-df67eab8.cjs} +1 -1
- package/dist/google-logo-icon_4.entry-77f3b86e.js +454 -0
- package/dist/google-logo-icon_4.entry-c5db1be3.cjs +1 -0
- package/dist/index-53420959-16700a42.cjs +1 -0
- package/dist/index-53420959-f0c4f9af.js +5 -0
- package/dist/{index-2d032bec.js → index-5851f0a2.js} +816 -825
- package/dist/{index-6d9eeb53-91d36348.js → index-6d9eeb53-2f37342f.js} +2 -2
- package/dist/{index-6d9eeb53-f478270c.cjs → index-6d9eeb53-ded66877.cjs} +1 -1
- package/dist/{index-9c04361d.cjs → index-769f0fdd.cjs} +3 -3
- package/dist/{index.es-9cc0eb3c-ee2ebbe1.js → index.es-9cc0eb3c-2cf4632f.js} +1 -1
- package/dist/{index.es-9cc0eb3c-2242baf6.cjs → index.es-9cc0eb3c-e8de46e6.cjs} +1 -1
- package/dist/{info-icon_2.entry-74eb7415.js → info-icon_2.entry-c27ac645.js} +3 -3
- package/dist/{info-icon_2.entry-4b257e73.cjs → info-icon_2.entry-e355fb7d.cjs} +1 -1
- package/dist/{input-component.entry-6bb4a5e8.js → input-component.entry-a38a65da.js} +4 -4
- package/dist/{input-component.entry-3ef7ce2c.cjs → input-component.entry-ef2b397d.cjs} +1 -1
- package/dist/input-dropdown_2.entry-9e50060e.cjs +1 -0
- package/dist/{input-dropdown_2.entry-f71e4c01.js → input-dropdown_2.entry-ce1da1b3.js} +37 -26
- package/dist/loading-icon.entry-175aca19.cjs +1 -0
- package/dist/loading-icon.entry-4ab88ed8.js +15 -0
- package/dist/{mailbox-store-64b4ef7c-202f1afd.js → mailbox-store-64b4ef7c-47dac9aa.js} +2 -2
- package/dist/{mailbox-store-64b4ef7c-74f959be.cjs → mailbox-store-64b4ef7c-ebe84c96.cjs} +1 -1
- package/dist/nylas-booked-event-card_10.entry-6de99d57.cjs +1 -0
- package/dist/{nylas-booked-event-card_10.entry-ddfcff5e.js → nylas-booked-event-card_10.entry-ef9c2d62.js} +11 -11
- package/dist/{nylas-custom-booking-flow.entry-63ed387e.cjs → nylas-custom-booking-flow.entry-c59c1306.cjs} +1 -1
- package/dist/{nylas-custom-booking-flow.entry-a1f66d05.js → nylas-custom-booking-flow.entry-f31400e2.js} +2 -2
- package/dist/{nylas-form-card.entry-ea1153b9.js → nylas-form-card.entry-b189e066.js} +2 -2
- package/dist/{nylas-form-card.entry-6fece0ff.cjs → nylas-form-card.entry-bc048703.cjs} +1 -1
- package/dist/{nylas-if-state.entry-05f8f66f.js → nylas-if-state.entry-5bdf8669.js} +3 -3
- package/dist/{nylas-if-state.entry-b75320f0.cjs → nylas-if-state.entry-933c79e0.cjs} +1 -1
- package/dist/{nylas-list-folders.entry-edc61b97.cjs → nylas-list-folders.entry-5d1bef7f.cjs} +1 -1
- package/dist/{nylas-list-folders.entry-bd5a1b1d.js → nylas-list-folders.entry-f0e7ae4e.js} +3 -3
- package/dist/{nylas-list-threads.entry-79ad0944.cjs → nylas-list-threads.entry-3e300e7e.cjs} +1 -1
- package/dist/{nylas-list-threads.entry-f3cd80de.js → nylas-list-threads.entry-3f7451ad.js} +3 -3
- package/dist/{nylas-login.entry-68873357.cjs → nylas-login.entry-dbf9e11f.cjs} +1 -1
- package/dist/{nylas-login.entry-b3207e82.js → nylas-login.entry-e3b757a0.js} +7 -7
- package/dist/{nylas-mailbox-pagination.entry-2ef5b88a.cjs → nylas-mailbox-pagination.entry-0db12a01.cjs} +1 -1
- package/dist/{nylas-mailbox-pagination.entry-22c5b9ca.js → nylas-mailbox-pagination.entry-6c845a2a.js} +2 -2
- package/dist/{nylas-mailbox-toolbar-button.entry-f2fa3a8e.cjs → nylas-mailbox-toolbar-button.entry-553f041a.cjs} +1 -1
- package/dist/{nylas-mailbox-toolbar-button.entry-95bb58b5.js → nylas-mailbox-toolbar-button.entry-ec196947.js} +4 -4
- package/dist/{nylas-mailbox.entry-4ef7d18d.js → nylas-mailbox.entry-1552ad11.js} +7 -7
- package/dist/{nylas-mailbox.entry-4b1d320f.cjs → nylas-mailbox.entry-c0bbca56.cjs} +1 -1
- package/dist/{nylas-provider.entry-7f7e098a.js → nylas-provider.entry-6d286e92.js} +37 -37
- package/dist/{nylas-provider.entry-b629340a.cjs → nylas-provider.entry-d4bf23c2.cjs} +1 -1
- package/dist/{nylas-scheduler-editor.entry-19a29c4c.cjs → nylas-scheduler-editor.entry-00a71304.cjs} +2 -2
- package/dist/{nylas-scheduler-editor.entry-2d19593f.js → nylas-scheduler-editor.entry-caa1026b.js} +8 -7
- package/dist/{nylas-scheduling.entry-753cb746.js → nylas-scheduling.entry-19ff3d50.js} +9 -9
- package/dist/nylas-scheduling.entry-f1fb67d2.cjs +1 -0
- package/dist/{nylas-threads-refresh.entry-5a774ad7.js → nylas-threads-refresh.entry-6acf3c2b.js} +4 -4
- package/dist/{nylas-threads-refresh.entry-0a832631.cjs → nylas-threads-refresh.entry-bc4c10ea.cjs} +1 -1
- package/dist/{nylas-threads-search.entry-451c6d5c.js → nylas-threads-search.entry-82fa1504.js} +5 -5
- package/dist/{nylas-threads-search.entry-5b57688b.cjs → nylas-threads-search.entry-ee28712c.cjs} +1 -1
- package/dist/nylas-time-window-picker.entry-131f84b4.cjs +1 -0
- package/dist/nylas-time-window-picker.entry-3c45d82e.js +316 -0
- package/dist/{nylas-view-thread.entry-7b273955.cjs → nylas-view-thread.entry-0d9a4aa9.cjs} +1 -1
- package/dist/{nylas-view-thread.entry-e0af8998.js → nylas-view-thread.entry-695a7b0b.js} +6 -6
- package/dist/{play-icon_2.entry-58592b64.js → play-icon_2.entry-ab47588e.js} +3 -3
- package/dist/{play-icon_2.entry-5b22a7ca.cjs → play-icon_2.entry-b1167d3a.cjs} +1 -1
- package/dist/react.cjs +1 -1
- package/dist/react.js +41 -40
- package/dist/{refresh-icon.entry-876b8aea.cjs → refresh-icon.entry-28e3ade7.cjs} +1 -1
- package/dist/{refresh-icon.entry-90756bc6.js → refresh-icon.entry-43267155.js} +5 -5
- package/dist/{register-component-a5a9ca5d-8bede801.js → register-component-a5a9ca5d-538c35c3.js} +1 -1
- package/dist/{register-component-a5a9ca5d-1fbb27d2.cjs → register-component-a5a9ca5d-8b06415c.cjs} +1 -1
- package/dist/scheduler-config-store-4a50a03d-40e87f35.cjs +1 -0
- package/dist/{scheduler-config-store-ec3b6190-cbc40d60.js → scheduler-config-store-4a50a03d-4a2e2abf.js} +4 -3
- package/dist/{scheduler-store-f02ce045-1d93c571.js → scheduler-store-f02ce045-121c1e09.js} +1 -1
- package/dist/{scheduler-store-f02ce045-712c600c.cjs → scheduler-store-f02ce045-f11cfad9.cjs} +1 -1
- package/dist/{textarea-component.entry-3ea161d6.js → textarea-component.entry-1ec19adb.js} +4 -4
- package/dist/{textarea-component.entry-9d6b5cdc.cjs → textarea-component.entry-402a369b.cjs} +1 -1
- package/dist/{translate-icon.entry-04dde6b1.cjs → translate-icon.entry-59f4e190.cjs} +1 -1
- package/dist/{translate-icon.entry-be9c3401.js → translate-icon.entry-d412697e.js} +6 -6
- package/dist/{warning-icon.entry-347d77af.js → warning-icon.entry-3ee1f451.js} +5 -5
- package/dist/{warning-icon.entry-84121a43.cjs → warning-icon.entry-aa6b2c2c.cjs} +1 -1
- package/package.json +3 -3
- package/dist/add-circle-icon_2.entry-00dc2c13.cjs +0 -1
- package/dist/bold-icon_3.entry-81a3ff1e.js +0 -35
- package/dist/calendar-info-icon_25.entry-7513d798.cjs +0 -1
- package/dist/close-icon.entry-4a39816a.js +0 -15
- package/dist/close-icon.entry-f1166251.cjs +0 -1
- package/dist/google-logo-icon_4.entry-8818686b.js +0 -429
- package/dist/google-logo-icon_4.entry-fa65ae29.cjs +0 -1
- package/dist/index-53420959-41ed02ae.js +0 -5
- package/dist/index-53420959-a76f0327.cjs +0 -1
- package/dist/input-dropdown_2.entry-a87714fc.cjs +0 -1
- package/dist/loading-icon.entry-30724cb0.js +0 -15
- package/dist/loading-icon.entry-bb250f1c.cjs +0 -1
- package/dist/nylas-additional-participants.entry-567c7c2a.cjs +0 -1
- package/dist/nylas-additional-participants.entry-7961be04.js +0 -81
- package/dist/nylas-booked-event-card_10.entry-c2f889ba.cjs +0 -1
- package/dist/nylas-scheduling.entry-70454242.cjs +0 -1
- package/dist/people-icon.entry-c7fb7f6c.cjs +0 -1
- package/dist/people-icon.entry-de3fada0.js +0 -15
- package/dist/scheduler-config-store-ec3b6190-104df545.cjs +0 -1
- package/dist/toggle-switch.entry-10aa0c1a.cjs +0 -1
- package/dist/toggle-switch.entry-a08c1027.js +0 -25
package/dist/{calendar-info-icon_25.entry-493c5547.js → calendar-info-icon_28.entry-b71c23c5.js}
RENAMED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { r as
|
|
2
|
-
import { R as
|
|
3
|
-
import { T as
|
|
4
|
-
import { s as
|
|
5
|
-
import "./index-53420959-
|
|
1
|
+
import { r as p, h as a, c as u, d as r, H as y, g as h, G as w, I as x, J as V, K as q, L as he, M as O, O as me } from "./index-5851f0a2.js";
|
|
2
|
+
import { R as m } from "./register-component-a5a9ca5d-538c35c3.js";
|
|
3
|
+
import { T as J, E as K } from "./constants-f34b9c6e-efe2836b.js";
|
|
4
|
+
import { s as H } from "./index-6d9eeb53-2f37342f.js";
|
|
5
|
+
import "./index-53420959-f0c4f9af.js";
|
|
6
6
|
import "react";
|
|
7
7
|
import "react-dom";
|
|
8
|
-
const
|
|
8
|
+
const ge = ".sc-calendar-info-icon-h{display:flex}", ve = ge, _e = class {
|
|
9
9
|
constructor(e) {
|
|
10
|
-
|
|
10
|
+
p(this, e), this.width = "20", this.height = "20";
|
|
11
11
|
}
|
|
12
12
|
render() {
|
|
13
|
-
return a("svg", { key: "
|
|
13
|
+
return a("svg", { key: "cccc82de81a96835882467868c393b01acefd2ce", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, a("path", { key: "1d4e348404256d41966b5f59f34151493412c4cb", d: "M12 0C13.3807 0 14.5 1.11929 14.5 2.5V6.59971C14.1832 6.43777 13.8486 6.30564 13.5 6.20703V4H1.5V11.5C1.5 12.3284 2.17157 13 3 13H6.70703C6.80564 13.3486 6.93777 13.6832 7.09971 14H3C1.61929 14 0.5 12.8807 0.5 11.5V2.5C0.5 1.11929 1.61929 0 3 0H12ZM12 1H3C2.17157 1 1.5 1.67157 1.5 2.5V3H13.5V2.5C13.5 1.67157 12.8284 1 12 1ZM11.375 9.5C11.375 9.15482 11.6548 8.875 12 8.875C12.3452 8.875 12.625 9.15482 12.625 9.5C12.625 9.84518 12.3452 10.125 12 10.125C11.6548 10.125 11.375 9.84518 11.375 9.5ZM12.5 13.5C12.5 13.7761 12.2761 14 12 14C11.7239 14 11.5 13.7761 11.5 13.5V11.5C11.5 11.2239 11.7239 11 12 11C12.2761 11 12.5 11.2239 12.5 11.5V13.5ZM7.5 11.5C7.5 9.01472 9.51472 7 12 7C14.4853 7 16.5 9.01472 16.5 11.5C16.5 13.9853 14.4853 16 12 16C9.51472 16 7.5 13.9853 7.5 11.5ZM8.5 11.5C8.5 13.433 10.067 15 12 15C13.933 15 15.5 13.433 15.5 11.5C15.5 9.567 13.933 8 12 8C10.067 8 8.5 9.567 8.5 11.5Z", fill: "currentColor" }));
|
|
14
14
|
}
|
|
15
15
|
};
|
|
16
|
-
|
|
17
|
-
const
|
|
16
|
+
_e.style = ve;
|
|
17
|
+
const ke = ".sc-calendar-patterns-icon-h{display:flex}", xe = ke, Ce = class {
|
|
18
18
|
constructor(e) {
|
|
19
|
-
|
|
19
|
+
p(this, e), this.width = "20", this.height = "20";
|
|
20
20
|
}
|
|
21
21
|
render() {
|
|
22
|
-
return a("svg", { key: "
|
|
22
|
+
return a("svg", { key: "dd2ac860a58584163788ba39e76c53c456b8effe", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, a("path", { key: "fe1368d38056f3d10efca5ec6fcde6dc92821df6", d: "M3.25 0H11.75C13.2688 0 14.5 1.23122 14.5 2.75V11.25C14.5 12.7688 13.2688 14 11.75 14H3.25C1.73122 14 0.5 12.7688 0.5 11.25V2.75C0.5 1.23122 1.73122 0 3.25 0ZM2 2.75V4H13V2.75C13 2.05964 12.4404 1.5 11.75 1.5H3.25C2.55964 1.5 2 2.05964 2 2.75ZM12.2071 5L8.20711 9H10.7929L13 6.79289V5H12.2071ZM10.7929 5H8.20711L4.20711 9H6.79289L10.7929 5ZM2.79289 9L6.79289 5H4.20711L2 7.20711V9H2.79289ZM2 5.79289L2.79289 5H2V5.79289ZM12.2071 9H13V8.20711L12.2071 9Z", fill: "currentColor" }));
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
|
-
|
|
26
|
-
const
|
|
25
|
+
Ce.style = xe;
|
|
26
|
+
const we = 'label{--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;display:flex;align-items:center;font-family:var(--nylas-font-family);cursor:pointer;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}label input[type=checkbox]{position:absolute;opacity:0;cursor:pointer}label input[type=checkbox]:focus~.checkmark,label input[type=checkbox]:hover~.checkmark{border-color:var(--nylas-primary)}label input[type=checkbox]:checked~.checkmark{color:var(--nylas-base-0);background:var(--nylas-primary) url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8c3ZnIHdpZHRoPSIxMiIgaGVpZ2h0PSI5IiB2aWV3Qm94PSIwIDAgMTIgOSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCiAgPHBhdGggZD0iTTQuNTc1IDguOTc3cy0uNDA0LS4wMDctLjUzNi0uMTY1TC4wNTcgNS42NGwuODI5LTEuMjI3TDQuNDcgNy4yNjggMTAuOTIxLjA4NmwuOTIzIDEuMTAzLTYuODYzIDcuNjRjLS4xMzQtLjAwMy0uNDA2LjE0OC0uNDA2LjE0OHoiIGZpbGw9IiNGRkYiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPg0KPC9zdmc+) 50% 40% no-repeat;border:2px solid var(--nylas-primary)}label .checkmark{border-radius:var(--nylas-border-radius);border:2px solid var(--nylas-base-800);position:absolute;left:0;top:2px;width:18px;height:18px;cursor:pointer;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}label .label{margin-left:32px;font-size:16px;font-weight:400;color:var(--nylas-base-800);line-height:24px}', Oe = we, Ie = class {
|
|
27
27
|
constructor(e) {
|
|
28
|
-
|
|
28
|
+
p(this, e), this.nylasFormCheckboxToggled = u(this, "nylasFormCheckboxToggled", 7), this.name = "checkbox", this.checked = !1, this.label = "", this.isChecked = this.checked;
|
|
29
29
|
}
|
|
30
30
|
componentWillLoad() {
|
|
31
31
|
this.isChecked = this.checked;
|
|
@@ -38,43 +38,43 @@ const ot = 'label{--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pr
|
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
40
|
render() {
|
|
41
|
-
return a("label", { key: "
|
|
41
|
+
return a("label", { key: "9d7aecec74bf3dabbb242324c0d028b46213b81f" }, a("input", { key: "d0e94c6ee729adab2bc6df57f573024f632d87b9", type: "checkbox", name: this.name, checked: this.isChecked, onChange: () => this.toggleCheck() }), a("span", { key: "95d00654e241d754eca4b721df4c71d3649d2dc0", class: "checkmark" }), a("slot", { key: "f5560353f9371cd8d14b18f4ca1000123770b094", name: "label" }, a("span", { key: "09189dda1ec3da4095ae2d8978e579d4f0dd5a4a", class: "label" }, this.label)));
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
|
-
|
|
45
|
-
const
|
|
44
|
+
Ie.style = Oe;
|
|
45
|
+
const Te = ".sc-flow-icon-h{display:flex}", He = Te, $e = class {
|
|
46
46
|
constructor(e) {
|
|
47
|
-
|
|
47
|
+
p(this, e), this.width = "16", this.height = "12";
|
|
48
48
|
}
|
|
49
49
|
render() {
|
|
50
|
-
return a("svg", { key: "
|
|
50
|
+
return a("svg", { key: "990421d00dad37fc4e84a1e472f71486b0af9e8b", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, a("path", { key: "1458febb2237e9d0b3b0e7ba75891a85aaa70f16", d: "M13 1.66211C11.8954 1.66211 11 2.55754 11 3.66211C11 4.76668 11.8954 5.66211 13 5.66211C14.1046 5.66211 15 4.76668 15 3.66211C15 2.55754 14.1046 1.66211 13 1.66211ZM10.0407 3.16678C10.2768 1.74563 11.5119 0.662109 13 0.662109C14.6569 0.662109 16 2.00526 16 3.66211C16 5.31896 14.6569 6.66211 13 6.66211C11.5162 6.66211 10.2839 5.58482 10.0428 4.16971C9.37629 4.23688 8.82682 4.7426 8.71466 5.41551L8.27173 8.07311C8.07929 9.22776 7.11428 10.087 5.9593 10.1574C5.72319 11.5786 4.48813 12.6621 3 12.6621C1.34315 12.6621 0 11.319 0 9.66211C0 8.00526 1.34315 6.66211 3 6.66211C4.48384 6.66211 5.71607 7.73939 5.95724 9.15451C6.62371 9.08734 7.17318 8.58162 7.28534 7.90871L7.72827 5.25111C7.92071 4.09646 8.88571 3.23718 10.0407 3.16678ZM3 7.66211C1.89543 7.66211 1 8.55754 1 9.66211C1 10.7667 1.89543 11.6621 3 11.6621C4.10457 11.6621 5 10.7667 5 9.66211C5 8.55754 4.10457 7.66211 3 7.66211Z", fill: "currentColor" }));
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
|
-
|
|
54
|
-
const
|
|
53
|
+
$e.style = He;
|
|
54
|
+
const De = ".sc-location-icon-h{display:flex}", Se = De, Ee = class {
|
|
55
55
|
constructor(e) {
|
|
56
|
-
|
|
56
|
+
p(this, e), this.width = "16", this.height = "18";
|
|
57
57
|
}
|
|
58
58
|
render() {
|
|
59
|
-
return a("svg", { key: "
|
|
59
|
+
return a("svg", { key: "18863bae4b528331182b4f9f2d57ec427a7537ab", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, a("path", { key: "b2450f8d8b35c9b0fcfe776b5517b7454e332255", d: "M10 7.66211C10 9.31896 8.65685 10.6621 7 10.6621C5.34315 10.6621 4 9.31896 4 7.66211C4 6.00526 5.34315 4.66211 7 4.66211C8.65685 4.66211 10 6.00526 10 7.66211ZM9 7.66211C9 6.55754 8.10457 5.66211 7 5.66211C5.89543 5.66211 5 6.55754 5 7.66211C5 8.76668 5.89543 9.66211 7 9.66211C8.10457 9.66211 9 8.76668 9 7.66211ZM11.9497 12.6171C14.6834 9.88221 14.6834 5.44812 11.9497 2.71326C9.21608 -0.0216067 4.78392 -0.0216067 2.05025 2.71326C-0.683418 5.44812 -0.683418 9.88221 2.05025 12.6171L3.57128 14.1159L5.61408 16.101L5.74691 16.2188C6.52168 16.8468 7.65623 16.8076 8.38611 16.1012L10.8223 13.7312L11.9497 12.6171ZM2.75499 3.4183C5.09944 1.07282 8.90055 1.07282 11.245 3.4183C13.5294 5.70364 13.5879 9.3725 11.4207 11.7288L11.245 11.912L9.92371 13.216L7.69315 15.3846L7.60016 15.4642C7.24594 15.732 6.7543 15.732 6.40012 15.4642L6.30713 15.3845L3.3263 12.4791L2.75499 11.912L2.57927 11.7288C0.412077 9.3725 0.47065 5.70364 2.75499 3.4183Z", fill: "currentColor" }));
|
|
60
60
|
}
|
|
61
61
|
};
|
|
62
|
-
|
|
63
|
-
const
|
|
62
|
+
Ee.style = Se;
|
|
63
|
+
const Le = ".sc-location-off-icon-h{display:flex}", Ne = Le, Pe = class {
|
|
64
64
|
constructor(e) {
|
|
65
|
-
|
|
65
|
+
p(this, e), this.width = "16", this.height = "18";
|
|
66
66
|
}
|
|
67
67
|
render() {
|
|
68
|
-
return a("svg", { key: "
|
|
68
|
+
return a("svg", { key: "7e8bb8dd37c043ab86b0a382fba2d8b8a850d035", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, a("path", { key: "f99541cb8478894f2497354838fccc4930f54674", d: "M0.146447 0.808556C0.341709 0.613294 0.658291 0.613294 0.853553 0.808556L15.8536 15.8086C16.0488 16.0038 16.0488 16.3204 15.8536 16.5157C15.6583 16.7109 15.3417 16.7109 15.1464 16.5157L12.0938 13.463L11.8223 13.7312L9.38611 16.1012C8.65623 16.8076 7.52168 16.8468 6.74691 16.2188L6.61408 16.101L4.57128 14.1159L3.05025 12.6171C0.607421 10.1732 0.347525 6.37239 2.27056 3.63976L0.146447 1.51566C-0.0488155 1.3204 -0.0488155 1.00382 0.146447 0.808556ZM9.07768 10.4469C8.74346 10.576 8.38024 10.6468 8.0005 10.6468C6.34839 10.6468 5.00909 9.30689 5.00909 7.65406C5.00909 7.27461 5.07967 6.91166 5.20843 6.57763L2.98793 4.35713C1.49206 6.62038 1.68917 9.67377 3.57927 11.7288L3.75499 11.912L4.3263 12.4791L7.30713 15.3845L7.40012 15.4642C7.7543 15.732 8.24594 15.732 8.60016 15.4642L8.69315 15.3846L10.9237 13.216L11.3883 12.7575L9.07768 10.4469ZM9.85409 8.39486L10.5983 9.13904C10.8487 8.70143 10.9919 8.19447 10.9919 7.65406C10.9919 6.00122 9.65261 4.66134 8.0005 4.66134C7.45986 4.66134 6.95271 4.80482 6.51504 5.05581L7.25921 5.79998C7.48839 5.70819 7.73855 5.6577 8.0005 5.6577C9.10258 5.6577 9.99599 6.5515 9.99599 7.65406C9.99599 7.91581 9.94564 8.16581 9.85409 8.39486ZM4.35291 2.89368C6.70671 1.08827 10.0908 1.26314 12.245 3.4183C14.3986 5.57283 14.5739 8.95702 12.771 11.3118L13.4812 12.022C15.6702 9.27273 15.493 5.25762 12.9497 2.71326C10.4058 0.168159 6.39081 -0.00843871 3.64269 2.18347L4.35291 2.89368Z", fill: "currentColor" }));
|
|
69
69
|
}
|
|
70
70
|
};
|
|
71
|
-
|
|
72
|
-
const
|
|
71
|
+
Pe.style = Ne;
|
|
72
|
+
const Fe = ':host{display:block;width:inherit;--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}.dropdown{display:inline-block;width:100%;position:relative}.dropdown .dropdown-label{display:flex;align-items:center;gap:0.25rem;color:var(--nylas-base-800)}.dropbtn{width:inherit;height:48px;color:black;padding:0.5rem;font-size:1rem;cursor:pointer;display:flex;gap:0.5rem;justify-content:space-between;align-items:center;background:transparent;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}.dropbtn.focus{background:transparent}.dropbtn:hover,.dropbtn:active{border:1px solid var(--nylas-primary)}.dropbtn:active{outline:2px solid var(--nylas-primary)}.dropbtn span.open{transform:rotate(90deg)}.dropbtn span.closed{transform:rotate(270deg)}.dropdown-content{display:block;margin-top:0.5rem;background-color:var(--nylas-base-0);width:100%;max-height:336px;overflow:auto;border:1px solid #ddd;z-index:1;border-radius:4px;position:absolute;box-shadow:0px 4px 6px -2px rgba(0, 0, 0, 0.0509803922);box-shadow:0px 10px 15px -3px rgba(0, 0, 0, 0.1019607843)}.dropdown-content ul{padding:0;list-style-type:none;color:var(--nylas-base-900);max-height:336px}.dropdown-content ul li{padding:16px, 12px, 16px, 12px;color:black;padding:12px 16px;text-decoration:none;display:block;font-family:inherit;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0px;text-align:left;cursor:pointer}.dropdown-content ul li:hover,.dropdown-content ul li:focus{background-color:var(--nylas-base-100)}.dropdown-content ul li label{display:flex;align-items:center;gap:0.5rem}.dropdown-content ul li label input{margin:0}.selected-options{display:flex;flex-wrap:wrap;gap:0.5rem;padding:0.5rem 0;margin-top:0.25rem;background:var(--nylas-base-0)}.selected-options .selected-option{display:flex;align-items:center;gap:0.5rem;padding:4px 8px;border-radius:var(--nylas-border-radius-2x);background:var(--nylas-base-100);color:var(--nylas-base-800);font-size:16px;font-weight:500;line-height:1.5rem;letter-spacing:0.5px}.selected-options .selected-option button{background:transparent;border:none;cursor:pointer;padding:0}.selected-options .selected-option button:hover{color:var(--nylas-primary)}', Ae = Fe, Re = class {
|
|
73
73
|
constructor(e) {
|
|
74
|
-
|
|
74
|
+
p(this, e), this.selectedOptionsChanged = u(this, "selectedOptionsChanged", 7), this.name = void 0, this.label = void 0, this.options = [], this.availableOptions = this.options, this.isOpen = !1, this.ariaActivedescendant = "", this.shouldFocusFirstOption = !1;
|
|
75
75
|
}
|
|
76
76
|
componentDidRender() {
|
|
77
|
-
|
|
77
|
+
r("multi-select-dropdown", "componentDidRender"), this.isOpen && this.shouldFocusFirstOption && (this.ariaActivedescendant = this.availableOptions[0].value, this.focusOption(0), this.shouldFocusFirstOption = !1);
|
|
78
78
|
}
|
|
79
79
|
handleOutsideClick(e) {
|
|
80
80
|
!e.composedPath().includes(this.el) && this.isOpen && (this.isOpen = !1);
|
|
@@ -147,29 +147,118 @@ const vt = ':host{display:block;width:inherit;--nylas-primary:#2563eb;--nylas-er
|
|
|
147
147
|
}
|
|
148
148
|
render() {
|
|
149
149
|
var e, t;
|
|
150
|
-
return a(
|
|
150
|
+
return a(y, { key: "68762c15e4d20e8d695807b7d4b401f95d1759a8" }, a("div", { key: "f6b695da1ac813ce000f09442d79797cd57b5400", class: "dropdown", part: "msd_dropdown" }, a("label", { key: "375e7f825f8ca0962b12f5a35960a514535a0e4d", class: "dropdown-label" }, this.label, a("slot", { key: "4cb277f7424fc3a2906b6ca2bb25ab9af75f4b48", name: "label-icon", "aria-hidden": "true" })), a("button", { key: "76d5eec276f0aadb5f94de67a7c674d7506fec1b", part: "msd_dropdown-button", class: { dropbtn: !0, open: this.isOpen }, onClick: () => this.toggleDropdown(), "aria-haspopup": "listbox", "aria-expanded": this.isOpen ? "true" : "false", "aria-label": this.name, onKeyDown: (n) => this.handleSelectButtonKeyDown(n) }, a("slot", { key: "229cae92d81294a1a8785ae95a265b156c4c571b", name: "select-icon", "aria-hidden": "true" }), a("span", { key: "c2c030a9052bf733af0c9f5aabf665f9c50a612a", class: "selected-option", part: "msd_dropdown-button-selected-label" }, this.getSelectedOptions().length > 1 ? `Multiple ${this.name}s selected` : ((e = this.availableOptions.filter((n) => n.selected)[0]) == null ? void 0 : e.label) ?? ((t = this.availableOptions[0]) == null ? void 0 : t.label)), a("span", { key: "0f18d14621e108bd6019ceea2e86ae19d1816d53", class: this.isOpen ? "open" : "closed", "aria-hidden": "true" }, a("chevron-icon", { key: "1dba99f7491f72edeed66b567692b4aaf16be32d", width: "16", height: "16" }))), this.isOpen ? null : a("div", { class: "selected-options" }, this.getSelectedOptions().map((n) => a("span", { class: "selected-option" }, n.label, a("button", { key: n.label, onClick: () => this.selectOption(n) }, a("close-icon", null))))), this.isOpen ? a("div", { class: "dropdown-content", part: "msd_dropdown-content" }, a("ul", { tabindex: "-1", role: "listbox", "aria-label": this.name, "aria-multiselectable": !0, "aria-activedescendant": this.ariaActivedescendant, onKeyDown: (n) => this.handleListboxKeydown(n) }, this.availableOptions.map((n) => this.renderOption(n)))) : null));
|
|
151
151
|
}
|
|
152
152
|
get el() {
|
|
153
|
-
return
|
|
153
|
+
return h(this);
|
|
154
154
|
}
|
|
155
155
|
};
|
|
156
|
-
|
|
157
|
-
const
|
|
158
|
-
var
|
|
156
|
+
Re.style = Ae;
|
|
157
|
+
const Me = ':host{display:block;margin:1rem;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.nylas-additional-participants__title{color:var(--nylas-base-nylas-base-900-aaa, #101323);font-size:16px;font-style:normal;font-weight:600;line-height:20px;margin:0;text-align:left}.nylas-additional-participants__subtitle{color:var(--nylas-base-600);font-size:14px;font-style:normal;font-weight:400;line-height:20px;margin:0.25rem 0px 0px;text-align:left}.nylas-additional-participants__content{padding:1rem;display:flex;flex-direction:column;gap:1rem}.nylas-additional-participants__input_group{padding-top:8px;display:flex;flex-direction:column;gap:4px}.nylas-additional-participants__input_group label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:14px;font-style:normal;font-weight:400;line-height:150%}.nylas-additional-participants__input_wrapper{display:flex;border-width:1;border-radius:8px;border:1px solid var(--nylas-base-300)}.nylas-additional-participants__input_wrapper button{padding:12px;border:none;border-left:1px solid var(--nylas-base-300);background:none;cursor:pointer}.nylas-additional-participants__input_wrapper button:hover,.nylas-additional-participants__input_wrapper button:active{color:var(--nylas-primary)}.nylas-additional-participants__input_wrapper_organizer{background:var(--nylas-base-50)}.nylas-additional-participants__input{flex:1;display:flex;justify-content:space-between}.nylas-additional-participants__input.organizer{padding:12px 16px}.nylas-additional-participants__input input{border:none;outline:none;background:none;width:100%}.nylas-additional-participants__input input-dropdown{width:100%}.nylas-additional-participants__input input-dropdown::part(id_dropdown){width:100%;height:100%}.nylas-additional-participants__input input-dropdown::part(id_dropdown-input){height:100%;border-radius:var(--nylas-border-radius-2x);border:none;border-top-right-radius:initial;border-bottom-right-radius:initial;padding-left:16px}.nylas-additional-participants__add{padding:12px;display:flex;align-items:center;border:none;background:none;cursor:pointer}.nylas-additional-participants__add span{padding:0 8px;font-size:16px;font-style:normal;font-weight:500}.nylas-additional-participants__add:hover,.nylas-additional-participants__add:active{color:var(--nylas-primary)}', ze = Me;
|
|
158
|
+
var je = function(e, t, n, i) {
|
|
159
159
|
var l = arguments.length, s = l < 3 ? t : i === null ? i = Object.getOwnPropertyDescriptor(t, n) : i, o;
|
|
160
160
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
161
161
|
s = Reflect.decorate(e, t, n, i);
|
|
162
162
|
else
|
|
163
|
-
for (var
|
|
164
|
-
(o = e[
|
|
163
|
+
for (var d = e.length - 1; d >= 0; d--)
|
|
164
|
+
(o = e[d]) && (s = (l < 3 ? o(s) : l > 3 ? o(t, n, s) : o(t, n)) || s);
|
|
165
165
|
return l > 3 && s && Object.defineProperty(t, n, s), s;
|
|
166
|
-
},
|
|
166
|
+
}, $ = function(e, t) {
|
|
167
167
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
168
168
|
return Reflect.metadata(e, t);
|
|
169
169
|
};
|
|
170
|
-
const
|
|
170
|
+
const Y = class {
|
|
171
171
|
constructor(e) {
|
|
172
|
-
|
|
172
|
+
p(this, e), this.valueChanged = u(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.name = "participants", this.eventParticipants = void 0, this.participantOptions = void 0, this.participants = this.eventParticipants ?? [], this.participantsValid = !0;
|
|
173
|
+
}
|
|
174
|
+
elementNameChangedHandler(e) {
|
|
175
|
+
r("nylas-additional-participants", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
176
|
+
}
|
|
177
|
+
connectedCallback() {
|
|
178
|
+
r("nylas-additional-participants", "connectedCallback");
|
|
179
|
+
}
|
|
180
|
+
componentWillLoad() {
|
|
181
|
+
r("nylas-additional-participants", "componentWillLoad"), this.host.setAttribute("name", this.name);
|
|
182
|
+
}
|
|
183
|
+
componentDidLoad() {
|
|
184
|
+
r("nylas-additional-participants", "componentDidLoad"), this.updateFormValue();
|
|
185
|
+
}
|
|
186
|
+
disconnectedCallback() {
|
|
187
|
+
r("nylas-additional-participants", "disconnectedCallback");
|
|
188
|
+
}
|
|
189
|
+
onInputOptionChanged(e) {
|
|
190
|
+
var i;
|
|
191
|
+
r("nylas-additional-participants", "onInputOptionChanged");
|
|
192
|
+
const t = e.detail.name;
|
|
193
|
+
this.participants[t].email = e.detail.value;
|
|
194
|
+
const n = (i = this.participantOptions) == null ? void 0 : i.find((l) => l.email === e.detail.value);
|
|
195
|
+
this.participants[t].availability = n ? { calendar_ids: ["primary"] } : void 0, this.participants[t].name = (n == null ? void 0 : n.name) || e.detail.value, this.participants = [...this.participants], this.updateFormValue();
|
|
196
|
+
}
|
|
197
|
+
onParticipantChange(e, t) {
|
|
198
|
+
r("nylas-additional-participants", "onParticipantChange"), this.participants[t].email = e.target.value, this.updateFormValue();
|
|
199
|
+
}
|
|
200
|
+
addParticipant() {
|
|
201
|
+
r("nylas-additional-participants", "addParticipant"), this.participants = [...this.participants, { name: "", email: "", is_organizer: !1 }], this.updateFormValue();
|
|
202
|
+
}
|
|
203
|
+
removeParticipant(e) {
|
|
204
|
+
r("nylas-additional-participants", "removeParticipant"), this.participants = this.participants.filter((t, n) => n !== e), this.updateFormValue();
|
|
205
|
+
}
|
|
206
|
+
validate(e, t) {
|
|
207
|
+
r("nylas-additional-participants", "validate");
|
|
208
|
+
const i = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(String(e).toLowerCase());
|
|
209
|
+
this.participants[t].is_valid = i, this.updateFormValue();
|
|
210
|
+
}
|
|
211
|
+
updateFormValue() {
|
|
212
|
+
r("nylas-additional-participants", "updateFormValue"), this.internals.setFormValue(JSON.stringify(this.participants), this.name), this.valueChanged.emit({ value: JSON.stringify(this.participants), name: this.name });
|
|
213
|
+
}
|
|
214
|
+
getArrayDifference(e, t) {
|
|
215
|
+
return e.filter((i) => !t.some((l) => i.email === l.email)).map((i) => ({ value: i.email, label: i.email }));
|
|
216
|
+
}
|
|
217
|
+
render() {
|
|
218
|
+
return a(y, { key: "67454437ca6e9771da4373e293b8b1d468c79680" }, a("nylas-form-card", { key: "844913ba1bca33b83b0d7c0a89323ca48f5ce1dd" }, a("h3", { key: "bbdbf1e9addc3238a013697bff343a1065758928", slot: "header-title", class: "nylas-additional-participants__title", part: "nap__title" }, "Additional participants"), a("p", { key: "37520f9fcc4996b9635821a52ed5d9c0350af88f", slot: "header-subtitle", class: "nylas-additional-participants__subtitle", part: "nap__subtitle" }, "Add anyone else who would be joining for this event."), a("div", { key: "76a8d8118f9012cced55357e4243b897ec41e385", slot: "content", class: "nylas-additional-participants__content" }, a("div", { key: "bb5d6f6e7ebf486eb4c8395ff3ab971335d19750" }, this.participants.map((e, t) => a("div", { class: "nylas-additional-participants__input_group", part: "nap__input_group" }, a("label", null, e.is_organizer ? "Organizer" : `Participant ${t}`), a("div", { part: "nap__input_wrapper", class: `nylas-additional-participants__input_wrapper ${e.is_organizer && "nylas-additional-participants__input_wrapper_organizer"} ${e.is_valid === !1 && "nylas-additional-participants__input_wrapper_invalid"}` }, a("div", { class: { "nylas-additional-participants__input": !0, organizer: e.is_organizer }, part: "nap__input" }, e.is_organizer ? a("input", { type: "text", value: e.email, onInput: (n) => {
|
|
219
|
+
this.onParticipantChange(n, t);
|
|
220
|
+
}, readOnly: e.is_organizer, onBlur: () => this.validate(e.email, t) }) : a("input-dropdown", { name: `${t}`, filterable: !0, inputValue: e.email, options: this.getArrayDifference(this.participantOptions || [], this.participants) }), !e.is_organizer && a("button", { onClick: () => this.removeParticipant(t), part: "nap__remove-participant" }, a("close-icon", null))))))), a("button", { key: "14febbe15dc97b44304e98c14d7e084ea5126304", class: "nylas-additional-participants__add", part: "nap__add-participant", onClick: () => this.addParticipant() }, a("add-circle-icon", { key: "8f60f39d5d3b3b4532a78eacb0d4bf907a8b7836" }), " ", a("span", { key: "8e2c9a49072d04ab571470c68c3277a76706e60e" }, "Add ", this.participants.length > 1 ? "another" : "a", " participant")))));
|
|
221
|
+
}
|
|
222
|
+
static get formAssociated() {
|
|
223
|
+
return !0;
|
|
224
|
+
}
|
|
225
|
+
get host() {
|
|
226
|
+
return h(this);
|
|
227
|
+
}
|
|
228
|
+
static get watchers() {
|
|
229
|
+
return {
|
|
230
|
+
name: ["elementNameChangedHandler"]
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
};
|
|
234
|
+
je([
|
|
235
|
+
m({
|
|
236
|
+
name: "nylas-additional-participants",
|
|
237
|
+
stateToProps: /* @__PURE__ */ new Map([["schedulerConfig.additionalParticipants", "participantOptions"]]),
|
|
238
|
+
eventToProps: {},
|
|
239
|
+
fireRegisterEvent: !0
|
|
240
|
+
}),
|
|
241
|
+
$("design:type", Function),
|
|
242
|
+
$("design:paramtypes", []),
|
|
243
|
+
$("design:returntype", void 0)
|
|
244
|
+
], Y.prototype, "render", null);
|
|
245
|
+
Y.style = ze;
|
|
246
|
+
const We = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;width:inherit}.nylas-availability-picker{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200)}.nylas-availability-picker .header{padding:1rem}.nylas-availability-picker .header h3{margin:0;font-size:16px;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-availability-picker .header p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.nylas-availability-picker .content{padding:1rem;color:var(--nylas-base-900);font-size:16px;font-family:var(--nylas-font-family);border-top:1px solid var(--nylas-base-200)}@media screen and (max-width: 504px){.nylas-availability-picker .content{font-size:15px}}.nylas-availability-picker .content .select-timezone{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--nylas-base-200);padding-bottom:1rem;gap:1rem}.nylas-availability-picker .content .select-timezone h4{display:flex;gap:0.5rem;align-items:center;margin:0;font-size:16px;font-weight:500;line-height:20px}@media screen and (max-width: 504px){.nylas-availability-picker .content .select-timezone h4{font-size:15px}}.nylas-availability-picker .content .availability{display:flex;flex-direction:column;gap:1rem;padding:0 0.5rem;margin:1rem 0}@media screen and (max-width: 504px){.nylas-availability-picker .content .availability{gap:0.5rem;padding:0}}.nylas-availability-picker .content .availability .availability-day{display:grid;grid-template-columns:minmax(auto, 65px) 1fr minmax(auto, 40px);gap:1rem;align-items:baseline}@media screen and (max-width: 768px){.nylas-availability-picker .content .availability .availability-day{grid-template-columns:78px 1fr auto}}@media screen and (max-width: 504px){.nylas-availability-picker .content .availability .availability-day{display:inline-grid;gap:8px;grid-template-columns:60px 1fr auto}}.nylas-availability-picker .content .availability .availability-day .day{display:flex;gap:0.5rem;align-items:center}@media screen and (max-width: 504px){.nylas-availability-picker .content .availability .availability-day .day{gap:0.25rem}}.nylas-availability-picker .content .availability .availability-day .day input[type=checkbox]{transform:scale(1.3)}.nylas-availability-picker .content .availability .availability-day .time-ranges span.unavailable{height:48px;display:flex;align-items:center;justify-content:center}.nylas-availability-picker .content .availability .availability-day .time-ranges .time-range{display:flex;gap:1.5rem;justify-content:space-between;align-items:baseline}@media screen and (max-width: 504px){.nylas-availability-picker .content .availability .availability-day .time-ranges .time-range{justify-content:unset;gap:0.5rem}}.nylas-availability-picker .content .availability .availability-day .time-ranges .time-range .pickers{display:flex;gap:1rem}@media screen and (max-width: 504px){.nylas-availability-picker .content .availability .availability-day .time-ranges .time-range .pickers{gap:0.5rem}}.nylas-availability-picker .content .availability .availability-day .time-ranges .time-range .pickers span{margin-top:0.75rem}.nylas-availability-picker .content .availability .availability-day .time-ranges .time-range:not(:last-of-type){margin-bottom:1rem}.nylas-availability-picker .content .availability .availability-day .time-ranges p.error{color:var(--nylas-error)}.nylas-availability-picker .content .availability .availability-day button{border:none;background:transparent;height:40px;cursor:pointer;color:var(--nylas-base-800)}.nylas-availability-picker .content .availability .availability-day button:hover,.nylas-availability-picker .content .availability .availability-day button:active{color:var(--nylas-primary)}select-dropdown{width:auto}select-dropdown::part(sd_dropdown-button){justify-content:initial}', Be = We;
|
|
247
|
+
var Ze = function(e, t, n, i) {
|
|
248
|
+
var l = arguments.length, s = l < 3 ? t : i === null ? i = Object.getOwnPropertyDescriptor(t, n) : i, o;
|
|
249
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
250
|
+
s = Reflect.decorate(e, t, n, i);
|
|
251
|
+
else
|
|
252
|
+
for (var d = e.length - 1; d >= 0; d--)
|
|
253
|
+
(o = e[d]) && (s = (l < 3 ? o(s) : l > 3 ? o(t, n, s) : o(t, n)) || s);
|
|
254
|
+
return l > 3 && s && Object.defineProperty(t, n, s), s;
|
|
255
|
+
}, D = function(e, t) {
|
|
256
|
+
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
257
|
+
return Reflect.metadata(e, t);
|
|
258
|
+
};
|
|
259
|
+
const Q = class {
|
|
260
|
+
constructor(e) {
|
|
261
|
+
p(this, e), this.valueChanged = u(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.selectedConfiguration = void 0, this.openHours = void 0, this.name = "availability", this.defaultTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone, this.hideHeader = !1, this.schedule = {
|
|
173
262
|
SUN: [],
|
|
174
263
|
MON: [{ start: "09:00am", end: "05:00pm" }],
|
|
175
264
|
TUE: [{ start: "09:00am", end: "05:00pm" }],
|
|
@@ -180,23 +269,16 @@ const Ee = class {
|
|
|
180
269
|
}, this.timezone = Intl.DateTimeFormat().resolvedOptions().timeZone, this.overlapDays = {};
|
|
181
270
|
}
|
|
182
271
|
elementNameChangedHandler(e) {
|
|
183
|
-
|
|
272
|
+
r("nylas-calendar-picker", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
184
273
|
}
|
|
185
274
|
configChangedHandler(e) {
|
|
186
|
-
var n, i
|
|
187
|
-
const t = (n = e == null ? void 0 : e.
|
|
188
|
-
t &&
|
|
275
|
+
var n, i;
|
|
276
|
+
const t = (i = (n = e == null ? void 0 : e.availability) == null ? void 0 : n.availability_rules) == null ? void 0 : i.default_open_hours;
|
|
277
|
+
t && this.openHoursToSchedule(t);
|
|
189
278
|
}
|
|
190
279
|
scheduleChanged(e, t) {
|
|
191
280
|
var n;
|
|
192
281
|
if (e !== t) {
|
|
193
|
-
this.valueChanged.emit({
|
|
194
|
-
value: {
|
|
195
|
-
openHours: this.scheduleToOpenHours(e),
|
|
196
|
-
timezone: this.timezone
|
|
197
|
-
},
|
|
198
|
-
name: this.name
|
|
199
|
-
});
|
|
200
282
|
let i = {};
|
|
201
283
|
if (Object.keys(e).forEach((l) => {
|
|
202
284
|
const s = e[l];
|
|
@@ -208,12 +290,19 @@ const Ee = class {
|
|
|
208
290
|
return;
|
|
209
291
|
if (Object.keys(i).length > 0) {
|
|
210
292
|
const l = (n = this.host.shadowRoot) == null ? void 0 : n.getElementById(Object.keys(i)[0]);
|
|
211
|
-
l && (
|
|
293
|
+
l && (r("nylas-availability-picker", "The time ranges are overlapping. Overlap: ", i), this.internals.setValidity({ customError: !0 }, "Overlapping time ranges found", l));
|
|
212
294
|
} else
|
|
213
295
|
this.internals.setValidity({ customError: !1 }), this.internals.setFormValue(JSON.stringify({
|
|
214
296
|
openHours: this.scheduleToOpenHours(this.schedule),
|
|
215
297
|
timezone: this.timezone
|
|
216
298
|
}));
|
|
299
|
+
this.valueChanged.emit({
|
|
300
|
+
value: JSON.stringify({
|
|
301
|
+
openHours: this.scheduleToOpenHours(e),
|
|
302
|
+
timezone: this.timezone
|
|
303
|
+
}),
|
|
304
|
+
name: this.name
|
|
305
|
+
});
|
|
217
306
|
}
|
|
218
307
|
}
|
|
219
308
|
nylasFormDropdownChangedHandler(e) {
|
|
@@ -221,31 +310,41 @@ const Ee = class {
|
|
|
221
310
|
if (t === "timezone") {
|
|
222
311
|
if (this.timezone = n, typeof this.internals.setFormValue != "function")
|
|
223
312
|
return;
|
|
224
|
-
|
|
313
|
+
const i = {
|
|
225
314
|
openHours: this.scheduleToOpenHours(this.schedule),
|
|
226
315
|
timezone: this.timezone
|
|
227
|
-
}
|
|
316
|
+
};
|
|
317
|
+
this.internals.setFormValue(JSON.stringify(i)), this.valueChanged.emit({
|
|
318
|
+
value: JSON.stringify(i),
|
|
319
|
+
name: this.name
|
|
320
|
+
});
|
|
228
321
|
}
|
|
229
322
|
}
|
|
230
323
|
connectedCallback() {
|
|
231
|
-
|
|
324
|
+
r("nylas-availability-picker", "connectedCallback");
|
|
232
325
|
}
|
|
233
326
|
disconnectedCallback() {
|
|
234
|
-
|
|
327
|
+
r("nylas-availability-picker", "disconnectedCallback");
|
|
235
328
|
}
|
|
236
329
|
componentWillLoad() {
|
|
237
|
-
|
|
330
|
+
r("nylas-availability-picker", "componentWillLoad"), this.host.setAttribute("name", this.name);
|
|
238
331
|
}
|
|
239
332
|
componentDidLoad() {
|
|
240
|
-
|
|
333
|
+
if (r("nylas-availability-picker", "componentDidLoad"), this.openHours && this.openHours.length > 0 && this.openHoursToSchedule(this.openHours), typeof this.internals.setFormValue != "function")
|
|
334
|
+
return;
|
|
335
|
+
const e = {
|
|
241
336
|
openHours: this.scheduleToOpenHours(this.schedule),
|
|
242
337
|
timezone: this.timezone
|
|
243
|
-
}
|
|
338
|
+
};
|
|
339
|
+
this.internals.setFormValue(JSON.stringify(e)), this.valueChanged.emit({
|
|
340
|
+
value: JSON.stringify(e),
|
|
341
|
+
name: this.name
|
|
342
|
+
});
|
|
244
343
|
}
|
|
245
344
|
getOverlaps(e) {
|
|
246
345
|
let t = e.map((i, l) => ({
|
|
247
|
-
start:
|
|
248
|
-
end:
|
|
346
|
+
start: w(i.start),
|
|
347
|
+
end: w(i.end),
|
|
249
348
|
originalIndex: l
|
|
250
349
|
}));
|
|
251
350
|
t.sort((i, l) => i.start - l.start);
|
|
@@ -260,33 +359,33 @@ const Ee = class {
|
|
|
260
359
|
this.schedule[e] = [{ start: "09:00am", end: "05:00pm" }];
|
|
261
360
|
else {
|
|
262
361
|
const l = t.map((o) => ({
|
|
263
|
-
start:
|
|
264
|
-
end:
|
|
265
|
-
})).sort((o,
|
|
362
|
+
start: w(o.start),
|
|
363
|
+
end: w(o.end)
|
|
364
|
+
})).sort((o, d) => o.start - d.start), s = l[l.length - 1].end;
|
|
266
365
|
if (s + 60 <= i)
|
|
267
366
|
this.schedule[e].push({
|
|
268
|
-
start:
|
|
269
|
-
end:
|
|
367
|
+
start: x(O(s)),
|
|
368
|
+
end: x(O(s + 60))
|
|
270
369
|
});
|
|
271
370
|
else {
|
|
272
371
|
let o = !1;
|
|
273
372
|
if (l[0].start > n + 60 && (this.schedule[e].push({
|
|
274
|
-
start:
|
|
275
|
-
end:
|
|
373
|
+
start: x(O(n)),
|
|
374
|
+
end: x(O(n + 60))
|
|
276
375
|
}), o = !0), !o)
|
|
277
|
-
for (let
|
|
278
|
-
const
|
|
279
|
-
if (l[
|
|
376
|
+
for (let d = 0; d < l.length - 1; d++) {
|
|
377
|
+
const b = l[d].end;
|
|
378
|
+
if (l[d + 1].start - b >= 60) {
|
|
280
379
|
this.schedule[e].push({
|
|
281
|
-
start:
|
|
282
|
-
end:
|
|
380
|
+
start: x(O(b)),
|
|
381
|
+
end: x(O(b + 60))
|
|
283
382
|
});
|
|
284
383
|
break;
|
|
285
384
|
}
|
|
286
385
|
}
|
|
287
386
|
}
|
|
288
387
|
}
|
|
289
|
-
this.schedule[e].sort((l, s) =>
|
|
388
|
+
this.schedule[e].sort((l, s) => w(l.start) - w(s.start)), this.schedule = { ...this.schedule };
|
|
290
389
|
}
|
|
291
390
|
removeTimeRange(e, t) {
|
|
292
391
|
this.schedule[e].splice(t, 1), this.schedule = { ...this.schedule };
|
|
@@ -312,9 +411,9 @@ const Ee = class {
|
|
|
312
411
|
};
|
|
313
412
|
e.forEach((n) => {
|
|
314
413
|
n.days.forEach((i) => {
|
|
315
|
-
const l = this.getDayKey(i), s =
|
|
316
|
-
let
|
|
317
|
-
t[l] && (
|
|
414
|
+
const l = this.getDayKey(i), s = x(n.start), o = x(n.end), d = { start: s, end: o };
|
|
415
|
+
let b = !1;
|
|
416
|
+
t[l] && (b = t[l].some((f) => f.start === d.start && f.end === d.end)), b || (t[l] ? t[l].push(d) : t[l] = [d]);
|
|
318
417
|
});
|
|
319
418
|
}), this.timezone = this.defaultTimezone, this.schedule = t;
|
|
320
419
|
}
|
|
@@ -326,12 +425,12 @@ const Ee = class {
|
|
|
326
425
|
let n = /* @__PURE__ */ new Map();
|
|
327
426
|
t.forEach((l, s) => {
|
|
328
427
|
e[l] && e[l].forEach((o) => {
|
|
329
|
-
const
|
|
428
|
+
const d = V(o.start), b = V(o.end), f = `${d}-${b}`;
|
|
330
429
|
if (!n.has(f))
|
|
331
|
-
n.set(f, { days: [s], start:
|
|
430
|
+
n.set(f, { days: [s], start: d, end: b });
|
|
332
431
|
else {
|
|
333
|
-
let
|
|
334
|
-
|
|
432
|
+
let c = n.get(f);
|
|
433
|
+
c && (c.days.push(s), n.set(f, c));
|
|
335
434
|
}
|
|
336
435
|
});
|
|
337
436
|
});
|
|
@@ -346,18 +445,18 @@ const Ee = class {
|
|
|
346
445
|
}), i;
|
|
347
446
|
}
|
|
348
447
|
render() {
|
|
349
|
-
const e = Object.keys(
|
|
350
|
-
label:
|
|
448
|
+
const e = Object.keys(J).map((t) => ({
|
|
449
|
+
label: J[t],
|
|
351
450
|
value: t
|
|
352
451
|
}));
|
|
353
|
-
return a(
|
|
452
|
+
return a(y, { key: "81c6118e501f4424ce74cb81530a67f7896a7fca" }, a("div", { key: "6dbcda74a92e36089dfda5b11469c6619bb095e1", class: "nylas-availability-picker", part: "nap" }, !this.hideHeader && a("div", { class: "header", part: "nap__header" }, a("h3", null, "General availability"), a("p", null, "Set your availability for scheduling meetings.")), a("div", { key: "f217b53a7ddc2d0554a3c3e44e79580924dbaa43", class: "content" }, a("div", { key: "fe3dcc1c1c5504e65babb72f7b92f7954e3d4a20", class: "select-timezone", part: "nap__select-timezone" }, a("h4", { key: "0746b7a08e56b8d2359ae37357b46b84b440851c", class: "sub-header" }, "Select timezone", a("span", { key: "f6d5424b939bec04d0ab01e3b037a5db6ffdbb77", class: "icon" }, a("tooltip-component", { key: "7f6371d4e3ee3ab8c841d3799fbe77a1206084eb" }, a("info-icon", { key: "ae2b6f45b9eba0c26909b283daceafeddefc7936", slot: "tooltip-icon" }), a("span", { key: "38cb9c51f61d0087216660e5b2a54f42a42663ae", slot: "tooltip-content" }, "Select your timezone for displaying availability.")))), a("select-dropdown", { key: "e3467d03d104fe090d776bc03306d289de53cb60", name: "timezone", exportparts: "sd_dropdown: nap__timezone-container, sd_dropdown-button: nap__timezone-button, sd_dropdown-content: nap__timezone-dropdown-content", options: e, defaultSelectedOption: e.find((t) => t.value === this.defaultTimezone) }, a("span", { key: "afbee8547454b8eb1ba75a41056e1393fd60c2ec", slot: "select-icon" }, a("globe-icon", { key: "7bc82d7454658d2d0783a7d9422b76fb4083d14f", width: "20", height: "20" })))), a("div", { key: "2fd561856ac6731c16da239cd296545e256dd12d", class: "availability", part: "nap__availability" }, Object.keys(this.schedule).map((t) => {
|
|
354
453
|
const n = t, i = this.schedule[t];
|
|
355
454
|
return a("div", { class: "availability-day" }, a("div", { class: "day", part: "nap__day" }, a("input", { type: "checkbox", name: n, id: n, checked: i.length > 0, onClick: () => {
|
|
356
455
|
i.length > 0 ? this.schedule[n] = [] : this.schedule[n] = [{ start: "09:00am", end: "05:00pm" }], this.schedule = { ...this.schedule };
|
|
357
456
|
} }), a("label", { htmlFor: n, "aria-label": "Select day" }, n)), a("div", { class: "time-ranges", part: "nap__time-ranges" }, i.length ? null : a("span", { class: "unavailable" }, "Unavailable"), i.length > 0 && i.map((l, s) => {
|
|
358
|
-
var
|
|
359
|
-
const o = `${t}:${s}_start`,
|
|
360
|
-
return a("div", { class: "time-range", part: "nap__time-range" }, a("div", { class: "pickers" }, a("nylas-time-window-picker", { id: o, hasError: (
|
|
457
|
+
var b, f;
|
|
458
|
+
const o = `${t}:${s}_start`, d = `${t}:${s}_end`;
|
|
459
|
+
return a("div", { class: "time-range", part: "nap__time-range" }, a("div", { class: "pickers" }, a("nylas-time-window-picker", { id: o, hasError: (b = this.overlapDays[n]) == null ? void 0 : b.includes(s), time: l.start, name: o, key: o, exportparts: "time-picker: nap__time-picker-container, time-input: nap__time-picker-input, times: nap__time-picker-times" }), a("span", null, " - "), a("nylas-time-window-picker", { id: d, hasError: (f = this.overlapDays[n]) == null ? void 0 : f.includes(s), time: l.end, name: d, key: d, minimumStartTime: l.start, exportparts: "time-picker: nap__time-picker-container, time-input: nap__time-picker-input, times: nap__time-picker-times" })), a("button", { onClick: () => this.removeTimeRange(n, s) }, a("close-icon", null)));
|
|
361
460
|
}), a("p", { class: "error" }, this.overlapDays[n] ? "Overlapping time ranges" : "")), a("div", null, i.length > 0 ? a("button", { onClick: () => this.addTimeRange(n), part: "nap__add-time-range" }, a("add-circle-icon", null)) : null));
|
|
362
461
|
})))));
|
|
363
462
|
}
|
|
@@ -365,7 +464,7 @@ const Ee = class {
|
|
|
365
464
|
return !0;
|
|
366
465
|
}
|
|
367
466
|
get host() {
|
|
368
|
-
return
|
|
467
|
+
return h(this);
|
|
369
468
|
}
|
|
370
469
|
static get watchers() {
|
|
371
470
|
return {
|
|
@@ -375,64 +474,64 @@ const Ee = class {
|
|
|
375
474
|
};
|
|
376
475
|
}
|
|
377
476
|
};
|
|
378
|
-
|
|
379
|
-
|
|
477
|
+
Ze([
|
|
478
|
+
m({
|
|
380
479
|
name: "nylas-availability-picker",
|
|
381
480
|
stateToProps: /* @__PURE__ */ new Map([["schedulerConfig.selectedConfiguration", "selectedConfiguration"]]),
|
|
382
481
|
fireRegisterEvent: !0
|
|
383
482
|
}),
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
],
|
|
388
|
-
|
|
389
|
-
const
|
|
390
|
-
var
|
|
483
|
+
D("design:type", Function),
|
|
484
|
+
D("design:paramtypes", []),
|
|
485
|
+
D("design:returntype", void 0)
|
|
486
|
+
], Q.prototype, "render", null);
|
|
487
|
+
Q.style = Be;
|
|
488
|
+
const Ue = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;width:inherit}.nylas-booking-calendar-picker{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200)}.nylas-booking-calendar-picker .header{padding:1rem;border-bottom:1px solid var(--nylas-base-200)}.nylas-booking-calendar-picker .header h3{margin:0;font-size:1rem;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-booking-calendar-picker .header p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__loading{padding-bottom:1rem;display:flex;flex-direction:column;gap:4px}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__loading .label{display:flex;align-items:center;gap:0.5rem;margin:1rem 1rem 0;color:var(--nylas-base-800)}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__loading .loading-button{margin:0 1rem;padding:0;width:inherit;height:48px;color:black;font-size:1rem;cursor:not-allowed;display:flex;gap:0.5rem;justify-content:space-between;align-items:center;background:transparent;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__loading .loading-button span{padding:0 1rem}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__dropdown{padding:1rem;display:flex;flex-direction:column;gap:4px}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__dropdown span.label{display:flex;align-items:center;gap:4px;color:var(--nylas-base-800)}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__dropdown span.label tooltip-component{display:flex}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__dropdown select-dropdown::part(sd_dropdown){width:100%}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__dropdown select-dropdown::part(sd_dropdown-content){width:100%;max-width:unset}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__dropdown select-dropdown::part(sd_dropdown-button){width:100%;display:flex;justify-content:space-between;align-items:center;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__dropdown select-dropdown::part(sd_dropdown-button-selected-label){max-width:calc(100% - 2rem);font-family:var(--nylas-font-family);font-size:16px;line-height:24px}', Ge = Ue;
|
|
489
|
+
var Ve = function(e, t, n, i) {
|
|
391
490
|
var l = arguments.length, s = l < 3 ? t : i === null ? i = Object.getOwnPropertyDescriptor(t, n) : i, o;
|
|
392
491
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
393
492
|
s = Reflect.decorate(e, t, n, i);
|
|
394
493
|
else
|
|
395
|
-
for (var
|
|
396
|
-
(o = e[
|
|
494
|
+
for (var d = e.length - 1; d >= 0; d--)
|
|
495
|
+
(o = e[d]) && (s = (l < 3 ? o(s) : l > 3 ? o(t, n, s) : o(t, n)) || s);
|
|
397
496
|
return l > 3 && s && Object.defineProperty(t, n, s), s;
|
|
398
|
-
},
|
|
497
|
+
}, S = function(e, t) {
|
|
399
498
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
400
499
|
return Reflect.metadata(e, t);
|
|
401
500
|
};
|
|
402
|
-
const
|
|
501
|
+
const X = class {
|
|
403
502
|
constructor(e) {
|
|
404
|
-
|
|
503
|
+
p(this, e), this.valueChanged = u(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.calendars = void 0, this.currentUser = void 0, this.name = "booking-calendar", this.defaultBookingCalendar = "", this.selectedCalendar = "";
|
|
405
504
|
}
|
|
406
505
|
connectedCallback() {
|
|
407
|
-
|
|
506
|
+
r("nylas-booking-calendar-picker", "connectedCallback");
|
|
408
507
|
}
|
|
409
508
|
disconnectedCallback() {
|
|
410
|
-
|
|
509
|
+
r("nylas-booking-calendar-picker", "disconnectedCallback");
|
|
411
510
|
}
|
|
412
511
|
componentWillLoad() {
|
|
413
|
-
|
|
512
|
+
r("nylas-booking-calendar-picker", "componentWillLoad"), this.host.setAttribute("name", this.name);
|
|
414
513
|
}
|
|
415
514
|
componentDidLoad() {
|
|
416
515
|
var e, t;
|
|
417
|
-
|
|
516
|
+
r("nylas-booking-calendar-picker", "componentDidLoad"), this.defaultBookingCalendar = this.defaultBookingCalendar || ((e = this.currentUser) == null ? void 0 : e.email) || "", typeof this.internals.setFormValue == "function" && this.internals.setFormValue(this.defaultBookingCalendar.toString(), "booking-calendar"), this.selectedCalendar = this.defaultBookingCalendar || ((t = this.currentUser) == null ? void 0 : t.email) || "";
|
|
418
517
|
}
|
|
419
518
|
componentWillUpdate() {
|
|
420
|
-
|
|
519
|
+
r("nylas-booking-calendar-picker", "componentWillUpdate");
|
|
421
520
|
}
|
|
422
521
|
componentDidUpdate() {
|
|
423
|
-
|
|
522
|
+
r("nylas-booking-calendar-picker", "componentDidUpdate");
|
|
424
523
|
}
|
|
425
524
|
componentWillRender() {
|
|
426
|
-
|
|
525
|
+
r("nylas-booking-calendar-picker", "componentWillRender");
|
|
427
526
|
}
|
|
428
527
|
componentDidRender() {
|
|
429
|
-
|
|
528
|
+
r("nylas-booking-calendar-picker", "componentDidRender");
|
|
430
529
|
}
|
|
431
530
|
elementNameChangedHandler(e) {
|
|
432
|
-
|
|
531
|
+
r("nylas-booking-calendar-picker", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
433
532
|
}
|
|
434
533
|
nylasFormDropdownChangedHandler(e) {
|
|
435
|
-
|
|
534
|
+
r("nylas-booking-calendar-picker", "nylasFormDropdownChangedHandler", e.detail);
|
|
436
535
|
const t = (n) => {
|
|
437
536
|
const { value: i } = n.detail;
|
|
438
537
|
this.selectedCalendar = i, this.internals.setFormValue(i.toString(), this.name);
|
|
@@ -445,13 +544,13 @@ const $e = class {
|
|
|
445
544
|
value: n.id,
|
|
446
545
|
label: n.name
|
|
447
546
|
}))) ?? [];
|
|
448
|
-
return a(
|
|
547
|
+
return a(y, null, a("div", { class: "nylas-booking-calendar-picker", part: "nbcp" }, a("div", { class: "header", part: "nbcp__header" }, a("h3", null, "Calendar booking"), a("p", null, "Choose calendar where you’d like the event bookings to show up.")), e.length > 0 ? a("div", { class: "nylas-booking-calendar-picker__dropdown" }, a("span", { class: "label", part: "nbcp__input-label" }, "Select a calendar to book meetings on", a("tooltip-component", null, a("info-icon", { slot: "tooltip-icon" }), a("span", { slot: "tooltip-content" }, "Check availability across one or multiple calendars. If multiple calendars are selected, you must be available across all of them to be considered available."))), a("select-dropdown", { name: "booking-calendar", options: e, withSearch: !1, exportparts: "sd_dropdown: nbcp__dropdown, sd_dropdown-button: nbcp__dropdown-button, sd_dropdown-content: nbcp__dropdown-content", defaultSelectedOption: e.find((n) => n.value == this.defaultBookingCalendar) ?? e[0] })) : a("div", { class: "nylas-booking-calendar-picker__loading" }, a("span", { class: "label" }, "Select a calendar to book meetings on ", a("info-icon", null)), a("div", { class: "loading-button" }, a("span", null, "Loading...")))));
|
|
449
548
|
}
|
|
450
549
|
static get formAssociated() {
|
|
451
550
|
return !0;
|
|
452
551
|
}
|
|
453
552
|
get host() {
|
|
454
|
-
return
|
|
553
|
+
return h(this);
|
|
455
554
|
}
|
|
456
555
|
static get watchers() {
|
|
457
556
|
return {
|
|
@@ -459,8 +558,8 @@ const $e = class {
|
|
|
459
558
|
};
|
|
460
559
|
}
|
|
461
560
|
};
|
|
462
|
-
|
|
463
|
-
|
|
561
|
+
Ve([
|
|
562
|
+
m({
|
|
464
563
|
name: "nylas-booking-calendar-picker",
|
|
465
564
|
stateToProps: /* @__PURE__ */ new Map([
|
|
466
565
|
["schedulerConfig.calendars", "calendars"],
|
|
@@ -474,39 +573,39 @@ Dt([
|
|
|
474
573
|
},
|
|
475
574
|
fireRegisterEvent: !0
|
|
476
575
|
}),
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
],
|
|
481
|
-
|
|
482
|
-
const
|
|
483
|
-
var
|
|
576
|
+
S("design:type", Function),
|
|
577
|
+
S("design:paramtypes", []),
|
|
578
|
+
S("design:returntype", void 0)
|
|
579
|
+
], X.prototype, "render", null);
|
|
580
|
+
X.style = Ge;
|
|
581
|
+
const Je = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;width:inherit}.nylas-buffer-time{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200);text-align:left}.nylas-buffer-time .header{padding:1rem;border-bottom:1px solid var(--nylas-base-200)}.nylas-buffer-time .header h3{margin:0;font-size:1rem;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-buffer-time .header p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.nylas-buffer-time .nylas-buffer-time__body{display:grid;grid-template-columns:1fr auto}@media screen and (max-width: 768px){.nylas-buffer-time .nylas-buffer-time__body{grid-template-columns:1fr}}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__dropdown{padding:1rem;display:flex;flex-direction:column;gap:1rem;border-right:1px solid var(--nylas-base-200);color:var(--nylas-base-800)}@media screen and (max-width: 768px){.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__dropdown{border:none}}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__dropdown .nylas-buffer-time__row{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:1rem}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__dropdown .nylas-buffer-time__row label{width:200px}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__dropdown .nylas-buffer-time__row .dropdown-container{display:flex;gap:1rem;align-items:center;justify-content:flex-end}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview{width:208px;background:var(--nylas-base-25);border-bottom-right-radius:var(--nylas-border-radius-2x)}@media screen and (max-width: 768px){.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview{width:inherit;border-bottom-left-radius:var(--nylas-border-radius-2x)}}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview h4{font-size:14px;line-height:24px;color:var(--nylas-base-600);font-family:var(--nylas-font-family);font-weight:500;text-align:center;margin:0.75rem 0}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview .preview-container{padding:0 2rem 1rem}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview .preview-container .slot{background-color:transparent;border-top:1px solid var(--nylas-base-300)}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview .preview-container .slot.active{background-color:var(--nylas-base-100)}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview .preview-container .slot:last-of-type{border-bottom:1px solid var(--nylas-base-300)}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview .preview-container .event-slot{background-color:var(--nylas-base-600);border-top:1px solid var(--nylas-base-300)}.nylas-buffer-time .nylas-buffer-time__dropdown select-dropdown::part(sd_dropdown-button){width:104px;display:flex;justify-content:space-between;align-items:center;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);padding:1rem}.nylas-buffer-time .nylas-buffer-time__dropdown select-dropdown::part(sd_dropdown-content){width:100%}.nylas-buffer-time .nylas-buffer-time__dropdown select-dropdown::part(sd_dropdown-button-selected-label){max-width:calc(100% - 2rem);font-family:var(--nylas-font-family);font-size:16px;line-height:24px}', Ke = Je;
|
|
582
|
+
var qe = function(e, t, n, i) {
|
|
484
583
|
var l = arguments.length, s = l < 3 ? t : i === null ? i = Object.getOwnPropertyDescriptor(t, n) : i, o;
|
|
485
584
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
486
585
|
s = Reflect.decorate(e, t, n, i);
|
|
487
586
|
else
|
|
488
|
-
for (var
|
|
489
|
-
(o = e[
|
|
587
|
+
for (var d = e.length - 1; d >= 0; d--)
|
|
588
|
+
(o = e[d]) && (s = (l < 3 ? o(s) : l > 3 ? o(t, n, s) : o(t, n)) || s);
|
|
490
589
|
return l > 3 && s && Object.defineProperty(t, n, s), s;
|
|
491
|
-
},
|
|
590
|
+
}, E = function(e, t) {
|
|
492
591
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
493
592
|
return Reflect.metadata(e, t);
|
|
494
593
|
};
|
|
495
|
-
const
|
|
594
|
+
const ee = class {
|
|
496
595
|
constructor(e) {
|
|
497
|
-
|
|
596
|
+
p(this, e), this.valueChanged = u(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.name = "buffer-time", this.buffer = { before: 0, after: 0 }, this.selectedBeforeBufferTime = this.buffer.before, this.selectedAfterBufferTime = this.buffer.after;
|
|
498
597
|
}
|
|
499
598
|
connectedCallback() {
|
|
500
|
-
|
|
599
|
+
r("nylas-buffer-time", "connectedCallback");
|
|
501
600
|
}
|
|
502
601
|
disconnectedCallback() {
|
|
503
|
-
|
|
602
|
+
r("nylas-buffer-time", "disconnectedCallback");
|
|
504
603
|
}
|
|
505
604
|
componentWillLoad() {
|
|
506
|
-
|
|
605
|
+
r("nylas-buffer-time", "componentWillLoad"), this.host.setAttribute("name", this.name);
|
|
507
606
|
}
|
|
508
607
|
componentDidLoad() {
|
|
509
|
-
if (
|
|
608
|
+
if (r("nylas-buffer-time", "componentDidLoad"), typeof this.internals.setFormValue == "function") {
|
|
510
609
|
const e = {
|
|
511
610
|
before: this.selectedBeforeBufferTime,
|
|
512
611
|
after: this.selectedAfterBufferTime
|
|
@@ -516,22 +615,22 @@ const He = class {
|
|
|
516
615
|
this.selectedAfterBufferTime = this.buffer.after, this.selectedBeforeBufferTime = this.buffer.before;
|
|
517
616
|
}
|
|
518
617
|
componentWillUpdate() {
|
|
519
|
-
|
|
618
|
+
r("nylas-buffer-time", "componentWillUpdate");
|
|
520
619
|
}
|
|
521
620
|
componentDidUpdate() {
|
|
522
|
-
|
|
621
|
+
r("nylas-buffer-time", "componentDidUpdate");
|
|
523
622
|
}
|
|
524
623
|
componentWillRender() {
|
|
525
|
-
|
|
624
|
+
r("nylas-buffer-time", "componentWillRender");
|
|
526
625
|
}
|
|
527
626
|
componentDidRender() {
|
|
528
|
-
|
|
627
|
+
r("nylas-buffer-time", "componentDidRender");
|
|
529
628
|
}
|
|
530
629
|
elementNameChangedHandler(e) {
|
|
531
|
-
|
|
630
|
+
r("nylas-buffer-time", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
532
631
|
}
|
|
533
632
|
nylasFormDropdownChangedHandler(e) {
|
|
534
|
-
|
|
633
|
+
r("nylas-buffer-time", "nylasFormDropdownChangedHandler", e.detail);
|
|
535
634
|
const t = (n) => {
|
|
536
635
|
const { value: i, name: l } = n.detail;
|
|
537
636
|
l === "before-buffer-time" ? this.selectedBeforeBufferTime = parseInt(i) : l === "after-buffer-time" && (this.selectedAfterBufferTime = parseInt(i));
|
|
@@ -545,29 +644,29 @@ const He = class {
|
|
|
545
644
|
}
|
|
546
645
|
renderPreview() {
|
|
547
646
|
const i = (o) => {
|
|
548
|
-
const
|
|
647
|
+
const d = Math.floor(o / 30), b = o % 30 / 30 * 10;
|
|
549
648
|
return {
|
|
550
|
-
fullSlots:
|
|
551
|
-
partialFillHeight:
|
|
649
|
+
fullSlots: d,
|
|
650
|
+
partialFillHeight: b
|
|
552
651
|
};
|
|
553
652
|
}, l = () => {
|
|
554
|
-
const { fullSlots: o, partialFillHeight:
|
|
555
|
-
return Array.from({ length: 4 }, (
|
|
556
|
-
const
|
|
557
|
-
let
|
|
558
|
-
return
|
|
653
|
+
const { fullSlots: o, partialFillHeight: d } = i(this.selectedBeforeBufferTime);
|
|
654
|
+
return Array.from({ length: 4 }, (b, f) => {
|
|
655
|
+
const c = this.selectedBeforeBufferTime > 0 && f > 4 - o - 1, _ = this.selectedBeforeBufferTime > 0 && f === 4 - o - 1 && d > 0;
|
|
656
|
+
let g = {};
|
|
657
|
+
return c && !_ ? g.backgroundColor = "var(--nylas-base-100)" : _ && (g.background = `linear-gradient(to top, var(--nylas-base-100) ${d}px, transparent 0)`), a("div", { key: f, class: `slot ${c ? "active" : ""}`, style: {
|
|
559
658
|
height: "10px",
|
|
560
|
-
...
|
|
659
|
+
...g
|
|
561
660
|
} });
|
|
562
661
|
});
|
|
563
662
|
}, s = () => {
|
|
564
|
-
const { fullSlots: o, partialFillHeight:
|
|
565
|
-
return Array.from({ length: 4 }, (
|
|
566
|
-
const
|
|
567
|
-
let
|
|
568
|
-
return
|
|
663
|
+
const { fullSlots: o, partialFillHeight: d } = i(this.selectedAfterBufferTime);
|
|
664
|
+
return Array.from({ length: 4 }, (b, f) => {
|
|
665
|
+
const c = this.selectedAfterBufferTime > 0 && f < o, _ = f === o && d > 0;
|
|
666
|
+
let g = {};
|
|
667
|
+
return c && !_ ? g.backgroundColor = "var(--nylas-base-100)" : _ && (g.background = `linear-gradient(to bottom, var(--nylas-base-100) ${d}px, transparent 0)`), a("div", { key: f, class: `slot ${c ? "active" : ""}`, style: {
|
|
569
668
|
height: "10px",
|
|
570
|
-
...
|
|
669
|
+
...g
|
|
571
670
|
} });
|
|
572
671
|
});
|
|
573
672
|
};
|
|
@@ -581,13 +680,13 @@ const He = class {
|
|
|
581
680
|
value: i
|
|
582
681
|
};
|
|
583
682
|
});
|
|
584
|
-
return a(
|
|
683
|
+
return a(y, null, a("div", { class: "nylas-buffer-time", part: "nbt" }, a("div", { class: "header", part: "nbt__header" }, a("h3", null, "Buffer time"), a("p", null, "Add buffer time before and after the event.")), a("div", { class: "nylas-buffer-time__body", part: "nbt__body" }, a("div", { class: "nylas-buffer-time__dropdown" }, a("div", { class: "nylas-buffer-time__row" }, a("label", null, "Before the event"), a("div", { class: "dropdown-container" }, a("select-dropdown", { id: "before-buffer-time", withSearch: !1, name: "before-buffer-time", exportparts: "sd_dropdown: nbt__dropdown-before, sd_dropdown-button: nbt__dropdown-button-before, sd_dropdown-content: nbt__dropdown-content-before", options: e, defaultSelectedOption: e.find((t) => t.value == this.selectedBeforeBufferTime) ?? e[0] }), a("span", null, "mins"))), a("div", { class: "nylas-buffer-time__row" }, a("label", null, "After the event"), a("div", { class: "dropdown-container" }, a("select-dropdown", { id: "after-buffer-time", withSearch: !1, name: "after-buffer-time", exportparts: "sd_dropdown: nbt__dropdown-after, sd_dropdown-button: nbt__dropdown-button-after, sd_dropdown-content: nbt__dropdown-content-after", options: e, defaultSelectedOption: e.find((t) => t.value == this.selectedAfterBufferTime) ?? e[0] }), a("span", null, "mins")))), a("div", { class: "nylas-buffer-time__preview", part: "nbt__preview" }, a("h4", null, "PREVIEW"), this.renderPreview()))));
|
|
585
684
|
}
|
|
586
685
|
static get formAssociated() {
|
|
587
686
|
return !0;
|
|
588
687
|
}
|
|
589
688
|
get host() {
|
|
590
|
-
return
|
|
689
|
+
return h(this);
|
|
591
690
|
}
|
|
592
691
|
static get watchers() {
|
|
593
692
|
return {
|
|
@@ -595,8 +694,8 @@ const He = class {
|
|
|
595
694
|
};
|
|
596
695
|
}
|
|
597
696
|
};
|
|
598
|
-
|
|
599
|
-
|
|
697
|
+
qe([
|
|
698
|
+
m({
|
|
600
699
|
name: "nylas-buffer-time",
|
|
601
700
|
eventToProps: {
|
|
602
701
|
valueChanged: async (e, t) => {
|
|
@@ -606,57 +705,57 @@ Et([
|
|
|
606
705
|
},
|
|
607
706
|
fireRegisterEvent: !0
|
|
608
707
|
}),
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
],
|
|
613
|
-
|
|
614
|
-
const
|
|
615
|
-
var
|
|
708
|
+
E("design:type", Function),
|
|
709
|
+
E("design:paramtypes", []),
|
|
710
|
+
E("design:returntype", void 0)
|
|
711
|
+
], ee.prototype, "render", null);
|
|
712
|
+
ee.style = Ke;
|
|
713
|
+
const Ye = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;width:inherit}.nylas-calendar-picker{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200)}.nylas-calendar-picker .header{padding:1rem;border-bottom:1px solid var(--nylas-base-200)}.nylas-calendar-picker .header h3{margin:0;font-size:1rem;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-calendar-picker .header p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.nylas-calendar-picker .nylas-calendar-picker__loading{padding-bottom:1rem;display:flex;flex-direction:column;gap:4px}.nylas-calendar-picker .nylas-calendar-picker__loading .label{display:flex;align-items:center;gap:0.5rem;margin:1rem 1rem 0;color:var(--nylas-base-800)}.nylas-calendar-picker .nylas-calendar-picker__loading .label tooltip-component{display:flex}.nylas-calendar-picker .nylas-calendar-picker__loading .loading-button{margin:0 1rem;padding:0;width:inherit;height:48px;color:black;font-size:1rem;cursor:not-allowed;display:flex;gap:0.5rem;justify-content:space-between;align-items:center;background:transparent;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}.nylas-calendar-picker .nylas-calendar-picker__loading .loading-button span{padding:0 1rem}.nylas-calendar-picker .nylas-calendar-picker__dropdown{padding:1rem}.nylas-calendar-picker .nylas-calendar-picker__dropdown multi-select-dropdown::part(msd_dropdown){width:100%;display:flex;flex-direction:column;gap:4px}.nylas-calendar-picker .nylas-calendar-picker__dropdown multi-select-dropdown::part(msd_dropdown-button){width:100%;display:flex;justify-content:space-between;align-items:center;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);padding:1rem}.nylas-calendar-picker .nylas-calendar-picker__dropdown multi-select-dropdown::part(msd_dropdown-content){width:100%;max-width:unset}.nylas-calendar-picker .nylas-calendar-picker__dropdown multi-select-dropdown::part(msd_dropdown-button-selected-label){max-width:calc(100% - 2rem);font-family:var(--nylas-font-family);font-size:16px;line-height:24px}', Qe = Ye;
|
|
714
|
+
var Xe = function(e, t, n, i) {
|
|
616
715
|
var l = arguments.length, s = l < 3 ? t : i === null ? i = Object.getOwnPropertyDescriptor(t, n) : i, o;
|
|
617
716
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
618
717
|
s = Reflect.decorate(e, t, n, i);
|
|
619
718
|
else
|
|
620
|
-
for (var
|
|
621
|
-
(o = e[
|
|
719
|
+
for (var d = e.length - 1; d >= 0; d--)
|
|
720
|
+
(o = e[d]) && (s = (l < 3 ? o(s) : l > 3 ? o(t, n, s) : o(t, n)) || s);
|
|
622
721
|
return l > 3 && s && Object.defineProperty(t, n, s), s;
|
|
623
|
-
},
|
|
722
|
+
}, L = function(e, t) {
|
|
624
723
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
625
724
|
return Reflect.metadata(e, t);
|
|
626
725
|
};
|
|
627
|
-
const
|
|
726
|
+
const te = class {
|
|
628
727
|
constructor(e) {
|
|
629
|
-
|
|
728
|
+
p(this, e), this.valueChanged = u(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.calendars = void 0, this.currentUser = void 0, this.name = "calendar", this.defaultSelectedCalendars = [], this.selectedCalendars = [];
|
|
630
729
|
}
|
|
631
730
|
elementNameChangedHandler(e) {
|
|
632
|
-
|
|
731
|
+
r("nylas-calendar-picker", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
633
732
|
}
|
|
634
733
|
connectedCallback() {
|
|
635
|
-
|
|
734
|
+
r("nylas-calendar-picker", "connectedCallback");
|
|
636
735
|
}
|
|
637
736
|
disconnectedCallback() {
|
|
638
|
-
|
|
737
|
+
r("nylas-calendar-picker", "disconnectedCallback");
|
|
639
738
|
}
|
|
640
739
|
componentWillLoad() {
|
|
641
|
-
|
|
740
|
+
r("nylas-calendar-picker", "componentWillLoad"), this.host.setAttribute("name", this.name);
|
|
642
741
|
}
|
|
643
742
|
componentDidLoad() {
|
|
644
|
-
|
|
743
|
+
r("nylas-calendar-picker", "componentDidLoad"), typeof this.internals.setFormValue == "function" && this.internals.setFormValue(this.defaultSelectedCalendars.toString(), "calendar");
|
|
645
744
|
}
|
|
646
745
|
componentWillUpdate() {
|
|
647
|
-
|
|
746
|
+
r("nylas-calendar-picker", "componentWillUpdate");
|
|
648
747
|
}
|
|
649
748
|
componentDidUpdate() {
|
|
650
|
-
|
|
749
|
+
r("nylas-calendar-picker", "componentDidUpdate");
|
|
651
750
|
}
|
|
652
751
|
componentWillRender() {
|
|
653
|
-
|
|
752
|
+
r("nylas-calendar-picker", "componentWillRender");
|
|
654
753
|
}
|
|
655
754
|
componentDidRender() {
|
|
656
|
-
|
|
755
|
+
r("nylas-calendar-picker", "componentDidRender");
|
|
657
756
|
}
|
|
658
757
|
selectedOptionsChangedHandler(e) {
|
|
659
|
-
|
|
758
|
+
r("nylas-calendar-picker", "nylasFormDropdownChangedHandler", e.detail);
|
|
660
759
|
const t = (n) => {
|
|
661
760
|
const { value: i } = n.detail;
|
|
662
761
|
this.selectedCalendars = [...i], this.internals.setFormValue(i.toString(), "calendar");
|
|
@@ -673,13 +772,13 @@ const Le = class {
|
|
|
673
772
|
selected: ((i = this.defaultSelectedCalendars) == null ? void 0 : i.includes(n.id)) || ((l = this.defaultSelectedCalendars) != null && l.includes("primary") || ((s = this.defaultSelectedCalendars) == null ? void 0 : s.length) === 0 ? n.id === ((o = this.currentUser) == null ? void 0 : o.email) : !1)
|
|
674
773
|
};
|
|
675
774
|
})) ?? [];
|
|
676
|
-
return a(
|
|
775
|
+
return a(y, null, a("div", { class: "nylas-calendar-picker", part: "ncp" }, a("div", { class: "header", part: "ncp__header" }, a("h3", null, "Calendar availability"), a("p", null, "Select calendars that you’d like to use for checking your availability.")), e.length > 0 ? a("div", { class: "nylas-calendar-picker__dropdown" }, a("multi-select-dropdown", { name: "calendar", label: "Select calendars that will be checked for availability", options: e, exportparts: "msd_dropdown: ncp__dropdown, msd_dropdown-button: ncp__dropdown-button, msd_dropdown-content: ncp__dropdown-content" }, a("span", { slot: "label-icon" }, a("tooltip-component", null, a("info-icon", { slot: "tooltip-icon" }), a("span", { slot: "tooltip-content" }, "Check availability across one or multiple calendars. If multiple calendars are selected, you must be available across all of them to be considered available. The default is your primary calendar if none are selected."))))) : a("div", { class: "nylas-calendar-picker__loading" }, a("span", { class: "label" }, "Select calendars that will be checked for availability ", a("info-icon", null)), a("div", { class: "loading-button" }, a("span", null, "Loading...")))));
|
|
677
776
|
}
|
|
678
777
|
static get formAssociated() {
|
|
679
778
|
return !0;
|
|
680
779
|
}
|
|
681
780
|
get host() {
|
|
682
|
-
return
|
|
781
|
+
return h(this);
|
|
683
782
|
}
|
|
684
783
|
static get watchers() {
|
|
685
784
|
return {
|
|
@@ -687,8 +786,8 @@ const Le = class {
|
|
|
687
786
|
};
|
|
688
787
|
}
|
|
689
788
|
};
|
|
690
|
-
|
|
691
|
-
|
|
789
|
+
Xe([
|
|
790
|
+
m({
|
|
692
791
|
name: "nylas-calendar-picker",
|
|
693
792
|
stateToProps: /* @__PURE__ */ new Map([
|
|
694
793
|
["schedulerConfig.calendars", "calendars"],
|
|
@@ -702,60 +801,60 @@ Lt([
|
|
|
702
801
|
},
|
|
703
802
|
fireRegisterEvent: !0
|
|
704
803
|
}),
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
],
|
|
709
|
-
|
|
710
|
-
const
|
|
711
|
-
var
|
|
804
|
+
L("design:type", Function),
|
|
805
|
+
L("design:paramtypes", []),
|
|
806
|
+
L("design:returntype", void 0)
|
|
807
|
+
], te.prototype, "render", null);
|
|
808
|
+
te.style = Qe;
|
|
809
|
+
const et = ':host{--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.nylas-cancellation-policy{display:flex;flex-direction:column;gap:4px}.nylas-cancellation-policy label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:16px;font-style:normal;font-weight:400;line-height:150%;}.nylas-cancellation-policy label span.label-icon{margin-left:4px}.nylas-cancellation-policy label span.label-icon tooltip-component{display:flex}.nylas-cancellation-policy textarea{padding:12px 16px;border-width:1;resize:vertical;border-radius:8px;font-family:var(--nylas-font-family);font-size:16px;line-height:24px;border:1px solid var(--nylas-base-200)}.nylas-cancellation-policy textarea::-webkit-resizer{display:none}', tt = et;
|
|
810
|
+
var nt = function(e, t, n, i) {
|
|
712
811
|
var l = arguments.length, s = l < 3 ? t : i === null ? i = Object.getOwnPropertyDescriptor(t, n) : i, o;
|
|
713
812
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
714
813
|
s = Reflect.decorate(e, t, n, i);
|
|
715
814
|
else
|
|
716
|
-
for (var
|
|
717
|
-
(o = e[
|
|
815
|
+
for (var d = e.length - 1; d >= 0; d--)
|
|
816
|
+
(o = e[d]) && (s = (l < 3 ? o(s) : l > 3 ? o(t, n, s) : o(t, n)) || s);
|
|
718
817
|
return l > 3 && s && Object.defineProperty(t, n, s), s;
|
|
719
|
-
},
|
|
818
|
+
}, N = function(e, t) {
|
|
720
819
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
721
820
|
return Reflect.metadata(e, t);
|
|
722
821
|
};
|
|
723
|
-
const
|
|
822
|
+
const ne = class {
|
|
724
823
|
constructor(e) {
|
|
725
824
|
var t, n;
|
|
726
|
-
|
|
825
|
+
p(this, e), this.valueChanged = u(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.selectedConfiguration = void 0, this.cancellationPolicy = void 0, this.name = "cancelation-policy", this.message = this.cancellationPolicy || ((n = (t = this.selectedConfiguration) == null ? void 0 : t.scheduler) == null ? void 0 : n.cancellation_policy) || "";
|
|
727
826
|
}
|
|
728
827
|
elementNameChangedHandler(e) {
|
|
729
|
-
|
|
828
|
+
r("nylas-cancellation-policy", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
730
829
|
}
|
|
731
830
|
selectedConfigurationChangedHandler(e, t) {
|
|
732
831
|
var n, i;
|
|
733
|
-
|
|
832
|
+
r("nylas-custom-booking-flow", "selectedConfigurationChangedHandler", e, t), (n = e == null ? void 0 : e.scheduler) != null && n.cancellation_policy && (this.message = (i = e == null ? void 0 : e.scheduler) == null ? void 0 : i.cancellation_policy);
|
|
734
833
|
}
|
|
735
834
|
connectedCallback() {
|
|
736
|
-
|
|
835
|
+
r("nylas-cancellation-policy", "connectedCallback");
|
|
737
836
|
}
|
|
738
837
|
componentWillLoad() {
|
|
739
|
-
|
|
838
|
+
r("nylas-cancellation-policy", "componentWillLoad"), this.host.setAttribute("name", this.name);
|
|
740
839
|
}
|
|
741
840
|
componentDidLoad() {
|
|
742
|
-
|
|
841
|
+
r("nylas-cancellation-policy", "componentDidLoad");
|
|
743
842
|
}
|
|
744
843
|
disconnectedCallback() {
|
|
745
|
-
|
|
844
|
+
r("nylas-cancellation-policy", "disconnectedCallback");
|
|
746
845
|
}
|
|
747
846
|
handleChange(e) {
|
|
748
|
-
const t =
|
|
847
|
+
const t = H(e.target.value);
|
|
749
848
|
this.message = t, this.internals.setFormValue(t, this.name), this.valueChanged.emit({ value: t, name: this.name });
|
|
750
849
|
}
|
|
751
850
|
render() {
|
|
752
|
-
return a(
|
|
851
|
+
return a(y, { key: "9ad194925cfb18c323d3f75aec51c4ac5ad67230" }, a("div", { key: "a4ae061a504a0cd6a91dd6dd23adcf7c3b8f43d5", class: "nylas-cancellation-policy", part: "ncpolicy" }, a("label", { key: "ea742ee8fba2e50a5694c210172e8783fa3d5e7b", htmlFor: this.name }, "Cancellation policy message", a("span", { key: "5c7143f8da100b650aa386c9fb895c3fd9ed2e04", class: "label-icon" }, a("tooltip-component", { key: "f46c7b94a1a58bd7162e5cfffc14a88b04a18a4c" }, a("info-icon", { key: "9d85ce578da1db7b080f3152b8fdb43834968829", slot: "tooltip-icon" }), a("span", { key: "0e4d0c4f98d1529179622c22fa6bf9d56d085ffb", slot: "tooltip-content" }, "Attendees receive this message if trying to cancel the event. Attendees are asked to provide a reason for cancellation.")))), a("textarea", { key: "570404ef8450c4ef2bb28fad4d1c6359b735abae", id: this.name, part: "ncpolicy__textarea", name: this.name, value: this.message, maxlength: "250", onInput: (e) => this.handleChange(e) })));
|
|
753
852
|
}
|
|
754
853
|
static get formAssociated() {
|
|
755
854
|
return !0;
|
|
756
855
|
}
|
|
757
856
|
get host() {
|
|
758
|
-
return
|
|
857
|
+
return h(this);
|
|
759
858
|
}
|
|
760
859
|
static get watchers() {
|
|
761
860
|
return {
|
|
@@ -764,71 +863,71 @@ const Me = class {
|
|
|
764
863
|
};
|
|
765
864
|
}
|
|
766
865
|
};
|
|
767
|
-
|
|
768
|
-
|
|
866
|
+
nt([
|
|
867
|
+
m({
|
|
769
868
|
name: "nylas-cancellation-policy",
|
|
770
869
|
stateToProps: /* @__PURE__ */ new Map([["schedulerConfig.selectedConfiguration", "selectedConfiguration"]]),
|
|
771
870
|
eventToProps: {},
|
|
772
871
|
fireRegisterEvent: !0
|
|
773
872
|
}),
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
],
|
|
778
|
-
|
|
779
|
-
const
|
|
780
|
-
var
|
|
873
|
+
N("design:type", Function),
|
|
874
|
+
N("design:paramtypes", []),
|
|
875
|
+
N("design:returntype", void 0)
|
|
876
|
+
], ne.prototype, "render", null);
|
|
877
|
+
ne.style = tt;
|
|
878
|
+
const at = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;width:inherit}.nylas-customize-booking-settings{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200)}.nylas-customize-booking-settings .header{padding:1rem;border-bottom:1px solid var(--nylas-base-200)}.nylas-customize-booking-settings .header h3{margin:0;font-size:1rem;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-customize-booking-settings .header p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.nylas-customize-booking-settings .nylas-customize-booking-settings__settings{display:flex;flex-direction:column;gap:1.5rem;padding:1rem;margin:1rem 0}.nylas-customize-booking-settings .nylas-customize-booking-settings__settings .nylas-customize-booking-settings__settings-div{display:flex;align-items:center;gap:4px}.label{margin-left:32px;font-size:16px;font-weight:400;color:var(--nylas-base-800);line-height:24px}.label .label-contents{margin:0;display:inline-block}@media screen and (max-width: 768px){.label .label-contents{display:block}}.label tooltip-component{display:inline-block}@media screen and (max-width: 768px){tooltip-component#guests::part(tc__content){left:58px}}tooltip-component#reschedule::part(tc__content){left:58px}@media screen and (max-width: 768px){tooltip-component#reschedule::part(tc__content){left:58px}}tooltip-component#cancel::part(tc__content){left:-58px}@media screen and (max-width: 768px){tooltip-component#cancel::part(tc__content){left:58px}}', it = at;
|
|
879
|
+
var st = function(e, t, n, i) {
|
|
781
880
|
var l = arguments.length, s = l < 3 ? t : i === null ? i = Object.getOwnPropertyDescriptor(t, n) : i, o;
|
|
782
881
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
783
882
|
s = Reflect.decorate(e, t, n, i);
|
|
784
883
|
else
|
|
785
|
-
for (var
|
|
786
|
-
(o = e[
|
|
884
|
+
for (var d = e.length - 1; d >= 0; d--)
|
|
885
|
+
(o = e[d]) && (s = (l < 3 ? o(s) : l > 3 ? o(t, n, s) : o(t, n)) || s);
|
|
787
886
|
return l > 3 && s && Object.defineProperty(t, n, s), s;
|
|
788
|
-
},
|
|
887
|
+
}, P = function(e, t) {
|
|
789
888
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
790
889
|
return Reflect.metadata(e, t);
|
|
791
890
|
};
|
|
792
|
-
const
|
|
891
|
+
const ae = class {
|
|
793
892
|
constructor(e) {
|
|
794
893
|
var t, n, i, l, s, o;
|
|
795
|
-
|
|
894
|
+
p(this, e), this.valueChanged = u(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.selectedConfiguration = void 0, this.defaultAdditionalGuestsHidden = ((n = (t = this.selectedConfiguration) == null ? void 0 : t.scheduler) == null ? void 0 : n.hide_additional_guests) ?? !1, this.defaultHideCancellationOptions = ((l = (i = this.selectedConfiguration) == null ? void 0 : i.scheduler) == null ? void 0 : l.hide_cancellation_options) ?? !1, this.defaultHideReschedulingOptions = ((o = (s = this.selectedConfiguration) == null ? void 0 : s.scheduler) == null ? void 0 : o.hide_rescheduling_options) ?? !1, this.name = "customize-booking-settings", this.allowGuestsToInvite = this.defaultAdditionalGuestsHidden, this.hideCancellationOptions = this.defaultHideCancellationOptions, this.hideReschedulingOptions = this.defaultHideReschedulingOptions;
|
|
796
895
|
}
|
|
797
896
|
elementNameChangedHandler(e) {
|
|
798
|
-
|
|
897
|
+
r("nylas-customize-booking-settings", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
799
898
|
}
|
|
800
899
|
selectedConfigurationChangedHandler(e) {
|
|
801
900
|
var t, n, i;
|
|
802
|
-
|
|
901
|
+
r("nylas-customize-booking-settings", "selectedConfigurationChangedHandler", e), this.allowGuestsToInvite = !((t = e == null ? void 0 : e.scheduler) != null && t.hide_additional_guests), this.hideCancellationOptions = ((n = e == null ? void 0 : e.scheduler) == null ? void 0 : n.hide_cancellation_options) ?? !1, this.hideReschedulingOptions = ((i = e == null ? void 0 : e.scheduler) == null ? void 0 : i.hide_rescheduling_options) ?? !1;
|
|
803
902
|
}
|
|
804
903
|
connectedCallback() {
|
|
805
|
-
|
|
904
|
+
r("nylas-customize-booking-settings", "connectedCallback");
|
|
806
905
|
}
|
|
807
906
|
disconnectedCallback() {
|
|
808
|
-
|
|
907
|
+
r("nylas-customize-booking-settings", "disconnectedCallback");
|
|
809
908
|
}
|
|
810
909
|
componentWillLoad() {
|
|
811
|
-
|
|
910
|
+
r("nylas-customize-booking-settings", "componentWillLoad"), this.host.setAttribute("name", this.name);
|
|
812
911
|
}
|
|
813
912
|
componentDidLoad() {
|
|
814
|
-
|
|
913
|
+
r("nylas-customize-booking-settings", "componentDidLoad");
|
|
815
914
|
}
|
|
816
915
|
componentWillUpdate() {
|
|
817
|
-
|
|
916
|
+
r("nylas-customize-booking-settings", "componentWillUpdate");
|
|
818
917
|
}
|
|
819
918
|
componentDidUpdate() {
|
|
820
|
-
|
|
919
|
+
r("nylas-customize-booking-settings", "componentDidUpdate");
|
|
821
920
|
}
|
|
822
921
|
componentWillRender() {
|
|
823
|
-
|
|
922
|
+
r("nylas-customize-booking-settings", "componentWillRender");
|
|
824
923
|
}
|
|
825
924
|
componentDidRender() {
|
|
826
|
-
|
|
925
|
+
r("nylas-customize-booking-settings", "componentDidRender");
|
|
827
926
|
}
|
|
828
927
|
checkboxToggledHandler(e) {
|
|
829
928
|
const { name: t, checked: n } = e.detail;
|
|
830
929
|
switch (t) {
|
|
831
|
-
case "
|
|
930
|
+
case "hide_additional_guests":
|
|
832
931
|
this.allowGuestsToInvite = n;
|
|
833
932
|
break;
|
|
834
933
|
case "hide_cancellation_options":
|
|
@@ -852,13 +951,13 @@ const Ae = class {
|
|
|
852
951
|
}), this.name);
|
|
853
952
|
}
|
|
854
953
|
render() {
|
|
855
|
-
return a(
|
|
954
|
+
return a(y, { key: "98e7ab408f5d7dff71321819cbc2a5e336ca52de" }, a("div", { key: "ea73803234b4843cf7e58dc2570171e0237ea7d1", class: "nylas-customize-booking-settings", part: "ncbs" }, a("div", { key: "9b081de7e2d2152b874a5a4713a5313c6e021409", class: "header", part: "ncbs__header" }, a("h3", { key: "976be7412b4f8d70269c3b429652fa1091da1457" }, "Additional settings"), a("p", { key: "f580ed5fd9c29773715bf26f5dc0c466c56ba43f" }, "Booking settings for the event.")), a("div", { key: "9e694bcf133167fa12efbd46bee02158b56e9777", class: "nylas-customize-booking-settings__settings", part: "ncbs__settings" }, a("div", { key: "39d4154e12c7f5cf96f04ca3fc3e0f17d0e8b2ec", class: "nylas-customize-booking-settings__settings-div", part: "ncbs__settings-div , ncbs__additional_guests" }, a("checkbox-component", { key: "61f11b632388d036622078f76f2d90370458b152", name: "hide_additional_guests", label: "Allow guests to invite additional guests.", checked: this.allowGuestsToInvite }, a("span", { key: "14573cca344d64ddfddebe6f402321a52fcce6ee", slot: "label", class: "label" }, a("p", { key: "64790dee39a090a778479a7eb3b1efcd14054bb9", class: "label-contents" }, "Allow guests to invite additional guests to the booking."), a("tooltip-component", { key: "564c56d4f159e11bf82b02eaab43b36ef9dd7117", id: "guests" }, a("info-icon", { key: "a442aac8c9d930dc6be00a07fb6cd32b39cbd24b", slot: "tooltip-icon" }), a("span", { key: "6a9eff50392213a42be00c99f0f78d5e2d8eb0f4", slot: "tooltip-content" }, "Allow guests to invite additional guests to the event. If enabled, the guest will be able to add additional guests' email addresses."))))), a("div", { key: "e7d58c8c04cd715bd02fd4dcc14073ce1f6aaf08", class: "nylas-customize-booking-settings__settings-div", part: "ncbs__settings-div , ncbs__rescheduling_options" }, a("checkbox-component", { key: "3f5c22d363bb11012b8514f5a33871a3f054fc80", name: "hide_rescheduling_options", label: "Hide 'Reschedule' option on booking page and emails.", checked: this.hideReschedulingOptions }, a("span", { key: "2ed45b907aa847c41da5a0e394b0b5ddb91a3e26", slot: "label", class: "label" }, a("p", { key: "a1fc109c7211d387426d66ac9129fad25032565b", class: "label-contents" }, "Hide the ", a("strong", { key: "ac79eec03a85d1963ac4e75b0fbf678f4a063776" }, "Reschedule"), " button on the Scheduling Page and in the email notifications."), a("tooltip-component", { key: "d8f41e37b915c0be9154a475da07d5ed343d96b4", id: "reschedule" }, a("info-icon", { key: "fbb3f300f4276bd249f9cf12d11c4b6467c82247", slot: "tooltip-icon" }), a("span", { key: "689b3c36070c26e6d6bac530a56008404354e43b", slot: "tooltip-content" }, "Hide the 'Reschedule' button on the Scheduling page and in the email notifications. If enabled, the guest will not be able to reschedule the booking."))))), a("div", { key: "f21aeca85fbb63da4d844d37cf87ff1e8d48f001", class: "nylas-customize-booking-settings__settings-div", part: "ncbs__settings-div , ncbs__cancellation_options" }, a("checkbox-component", { key: "be80ca87a198de83451085fceca77b4d2455357d", name: "hide_cancellation_options", label: "Hide 'Cancel' option on booking page and emails.", checked: this.hideCancellationOptions }, a("span", { key: "80e718e75b94562d3b8c4a3d9f170ee2de0c2c1b", slot: "label", class: "label" }, a("p", { key: "d46dfe25aa86b112f5c57abe3337de6d88a79c90", class: "label-contents" }, "Hide the ", a("strong", { key: "ac243fbb7a3c85c8ab3af28b61ae2724c428ac3e" }, "Cancel"), " button on the Scheduling Page and in the email notifications."), a("tooltip-component", { key: "b720fc3becba6ca2cc71d01bb77c19ec154b1aa1", id: "cancel" }, a("info-icon", { key: "5ab491a0734fe525ad2be3e2ad067cb292cce182", slot: "tooltip-icon" }), a("span", { key: "4621e731c10b515294641be4f9ee60142b46f9c6", slot: "tooltip-content" }, "Hide the 'Cancel' button on the Scheduling page and in the email notifications. If enabled, the guest will not be able to cancel the booking."))))))));
|
|
856
955
|
}
|
|
857
956
|
static get formAssociated() {
|
|
858
957
|
return !0;
|
|
859
958
|
}
|
|
860
959
|
get host() {
|
|
861
|
-
return
|
|
960
|
+
return h(this);
|
|
862
961
|
}
|
|
863
962
|
static get watchers() {
|
|
864
963
|
return {
|
|
@@ -867,66 +966,66 @@ const Ae = class {
|
|
|
867
966
|
};
|
|
868
967
|
}
|
|
869
968
|
};
|
|
870
|
-
|
|
871
|
-
|
|
969
|
+
st([
|
|
970
|
+
m({
|
|
872
971
|
name: "nylas-customize-booking-settings",
|
|
873
972
|
stateToProps: /* @__PURE__ */ new Map([["schedulerConfig.selectedConfiguration", "selectedConfiguration"]]),
|
|
874
973
|
fireRegisterEvent: !0
|
|
875
974
|
}),
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
],
|
|
880
|
-
|
|
881
|
-
const
|
|
882
|
-
var
|
|
975
|
+
P("design:type", Function),
|
|
976
|
+
P("design:paramtypes", []),
|
|
977
|
+
P("design:returntype", void 0)
|
|
978
|
+
], ae.prototype, "render", null);
|
|
979
|
+
ae.style = it;
|
|
980
|
+
const lt = ':host{--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.nylas-event-description{display:flex;flex-direction:column;gap:4px}.nylas-event-description label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:16px;font-style:normal;font-weight:400;line-height:150%;}.nylas-event-description label span.label-icon{margin-left:4px}.nylas-event-description label span.label-icon tooltip-component{display:flex}.nylas-event-description textarea{padding:12px 16px;border-width:1;resize:vertical;border-radius:8px;font-family:var(--nylas-font-family);font-size:16px;line-height:24px;border:1px solid var(--nylas-base-200)}.nylas-event-description textarea::-webkit-resizer{display:none}', ot = lt;
|
|
981
|
+
var rt = function(e, t, n, i) {
|
|
883
982
|
var l = arguments.length, s = l < 3 ? t : i === null ? i = Object.getOwnPropertyDescriptor(t, n) : i, o;
|
|
884
983
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
885
984
|
s = Reflect.decorate(e, t, n, i);
|
|
886
985
|
else
|
|
887
|
-
for (var
|
|
888
|
-
(o = e[
|
|
986
|
+
for (var d = e.length - 1; d >= 0; d--)
|
|
987
|
+
(o = e[d]) && (s = (l < 3 ? o(s) : l > 3 ? o(t, n, s) : o(t, n)) || s);
|
|
889
988
|
return l > 3 && s && Object.defineProperty(t, n, s), s;
|
|
890
|
-
},
|
|
989
|
+
}, F = function(e, t) {
|
|
891
990
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
892
991
|
return Reflect.metadata(e, t);
|
|
893
992
|
};
|
|
894
|
-
const
|
|
993
|
+
const ie = class {
|
|
895
994
|
constructor(e) {
|
|
896
995
|
var t, n;
|
|
897
|
-
|
|
996
|
+
p(this, e), this.valueChanged = u(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.selectedConfiguration = void 0, this.eventDescription = void 0, this.name = "description", this.description = this.eventDescription || ((n = (t = this.selectedConfiguration) == null ? void 0 : t.event_booking) == null ? void 0 : n.description) || "";
|
|
898
997
|
}
|
|
899
998
|
elementNameChangedHandler(e) {
|
|
900
|
-
|
|
999
|
+
r("nylas-event-description", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
901
1000
|
}
|
|
902
1001
|
selectedConfigurationChangedHandler(e, t) {
|
|
903
1002
|
var n, i;
|
|
904
|
-
|
|
1003
|
+
r("nylas-custom-booking-flow", "selectedConfigurationChangedHandler", e, t), (n = e == null ? void 0 : e.event_booking) != null && n.description && (this.description = (i = e == null ? void 0 : e.event_booking) == null ? void 0 : i.description);
|
|
905
1004
|
}
|
|
906
1005
|
connectedCallback() {
|
|
907
|
-
|
|
1006
|
+
r("nylas-event-description", "connectedCallback");
|
|
908
1007
|
}
|
|
909
1008
|
componentWillLoad() {
|
|
910
|
-
|
|
1009
|
+
r("nylas-event-description", "componentWillLoad"), this.host.setAttribute("name", this.name);
|
|
911
1010
|
}
|
|
912
1011
|
componentDidLoad() {
|
|
913
|
-
|
|
1012
|
+
r("nylas-event-description", "componentDidLoad");
|
|
914
1013
|
}
|
|
915
1014
|
disconnectedCallback() {
|
|
916
|
-
|
|
1015
|
+
r("nylas-event-description", "disconnectedCallback");
|
|
917
1016
|
}
|
|
918
1017
|
handleChange(e) {
|
|
919
|
-
const t =
|
|
1018
|
+
const t = H(e.target.value);
|
|
920
1019
|
this.description = t, this.internals.setFormValue(t, "description"), this.valueChanged.emit({ value: t, name: this.name });
|
|
921
1020
|
}
|
|
922
1021
|
render() {
|
|
923
|
-
return a(
|
|
1022
|
+
return a(y, { key: "ba8fe981702f13ac0b8132bc13fc6fea56500a62" }, a("div", { key: "41ab7f418a4878f7e9322564f77fe1008f048090", class: "nylas-event-description", part: "nedesc" }, a("label", { key: "8dd6e3fc10d8a360606b53eef4b7c596df082167", htmlFor: "description" }, "Event description", a("span", { key: "1533f26a880a136a76ad6bacb33b9cbf3895b35e", class: "label-icon" }, a("tooltip-component", { key: "f378fa630e3a8c80a5423c5086ff8ed3d0baa50b" }, a("info-icon", { key: "e343fc186b270f6c7eb9c38bf1ea04dbb7de7d6e", slot: "tooltip-icon" }), a("span", { key: "fb397590af111cac95805c50b96e22ebf3a3836e", slot: "tooltip-content" }, "Provide any additional details for your event.")))), a("textarea", { key: "650ab0c3162ad8fda2d3b0dfa9870bdc1aa700e6", id: "description", part: "nedesc__textarea", name: "description", value: this.description, maxlength: "8192", onInput: (e) => this.handleChange(e) })));
|
|
924
1023
|
}
|
|
925
1024
|
static get formAssociated() {
|
|
926
1025
|
return !0;
|
|
927
1026
|
}
|
|
928
1027
|
get host() {
|
|
929
|
-
return
|
|
1028
|
+
return h(this);
|
|
930
1029
|
}
|
|
931
1030
|
static get watchers() {
|
|
932
1031
|
return {
|
|
@@ -935,34 +1034,34 @@ const Ne = class {
|
|
|
935
1034
|
};
|
|
936
1035
|
}
|
|
937
1036
|
};
|
|
938
|
-
|
|
939
|
-
|
|
1037
|
+
rt([
|
|
1038
|
+
m({
|
|
940
1039
|
name: "nylas-event-description",
|
|
941
1040
|
stateToProps: /* @__PURE__ */ new Map([["schedulerConfig.selectedConfiguration", "selectedConfiguration"]]),
|
|
942
1041
|
eventToProps: {},
|
|
943
1042
|
fireRegisterEvent: !0
|
|
944
1043
|
}),
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
],
|
|
949
|
-
|
|
950
|
-
const
|
|
951
|
-
var
|
|
1044
|
+
F("design:type", Function),
|
|
1045
|
+
F("design:paramtypes", []),
|
|
1046
|
+
F("design:returntype", void 0)
|
|
1047
|
+
], ie.prototype, "render", null);
|
|
1048
|
+
ie.style = ot;
|
|
1049
|
+
const dt = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.nylas-event-duration{display:flex;flex-direction:column;gap:4px}.nylas-event-duration label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:16px;font-style:normal;font-weight:400;line-height:150%;}.nylas-event-duration label span.required{color:var(--nylas-error, #cc4841)}.nylas-event-duration label span.label-icon{margin-left:4px}.nylas-event-duration label span.label-icon tooltip-component{display:flex}.nylas-event-duration__wrapper{display:flex;align-items:center;gap:0.5rem}.nylas-event-duration__wrapper input{padding:12px 16px;border-width:1;border-radius:8px;border:1px solid var(--nylas-base-200);font-family:var(--nylas-font-family);font-size:16px;line-height:24px;width:48px}.nylas-event-duration__wrapper input-dropdown::part(id_dropdown-input){border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);padding:14px 16px;width:50px}.nylas-event-duration__wrapper input-dropdown::part(id_dropdown-content){width:100%;min-width:unset;height:200px}.nylas-event-duration__wrapper select-dropdown{width:120px}@media screen and (max-width: 768px){.nylas-event-duration__wrapper select-dropdown{width:100%}}.nylas-event-duration__wrapper select-dropdown::part(sd_dropdown-button){border:1px solid var(--nylas-base-200)}', ct = dt;
|
|
1050
|
+
var pt = function(e, t, n, i) {
|
|
952
1051
|
var l = arguments.length, s = l < 3 ? t : i === null ? i = Object.getOwnPropertyDescriptor(t, n) : i, o;
|
|
953
1052
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
954
1053
|
s = Reflect.decorate(e, t, n, i);
|
|
955
1054
|
else
|
|
956
|
-
for (var
|
|
957
|
-
(o = e[
|
|
1055
|
+
for (var d = e.length - 1; d >= 0; d--)
|
|
1056
|
+
(o = e[d]) && (s = (l < 3 ? o(s) : l > 3 ? o(t, n, s) : o(t, n)) || s);
|
|
958
1057
|
return l > 3 && s && Object.defineProperty(t, n, s), s;
|
|
959
|
-
},
|
|
1058
|
+
}, A = function(e, t) {
|
|
960
1059
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
961
1060
|
return Reflect.metadata(e, t);
|
|
962
1061
|
};
|
|
963
|
-
const
|
|
1062
|
+
const se = class {
|
|
964
1063
|
constructor(e) {
|
|
965
|
-
|
|
1064
|
+
p(this, e), this.valueChanged = u(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.selectedConfiguration = void 0, this.name = "duration", this.eventDurationMinutes = void 0, this.duration = this.eventDurationMinutes ? this.eventDurationMinutes >= 60 ? this.eventDurationMinutes / 60 : this.eventDurationMinutes : 30, this.durationMinutes = this.eventDurationMinutes ?? 30, this.durationIncrement = this.eventDurationMinutes && this.eventDurationMinutes >= 60 ? 60 : 1, this.durationMinutesOptions = [
|
|
966
1065
|
{ value: 15, label: "15" },
|
|
967
1066
|
{ value: 30, label: "30" },
|
|
968
1067
|
{ value: 45, label: "45" },
|
|
@@ -970,7 +1069,7 @@ const Fe = class {
|
|
|
970
1069
|
];
|
|
971
1070
|
}
|
|
972
1071
|
elementNameChangedHandler(e) {
|
|
973
|
-
|
|
1072
|
+
r("nylas-event-duration", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
974
1073
|
}
|
|
975
1074
|
selectedConfigurationChangedHandler(e) {
|
|
976
1075
|
var n;
|
|
@@ -978,19 +1077,19 @@ const Fe = class {
|
|
|
978
1077
|
t && (this.duration = t >= 60 ? t / 60 : t, this.durationMinutes = t ?? 30, this.durationIncrement = t >= 60 ? 60 : 1);
|
|
979
1078
|
}
|
|
980
1079
|
durationMinutesChangedHandler(e, t) {
|
|
981
|
-
|
|
1080
|
+
r("nylas-event-duration", "durationMinutesChangedHandler", e), e !== t && this.valueChanged.emit({ value: e.toString(), name: this.name });
|
|
982
1081
|
}
|
|
983
1082
|
connectedCallback() {
|
|
984
|
-
|
|
1083
|
+
r("nylas-event-duration", "connectedCallback");
|
|
985
1084
|
}
|
|
986
1085
|
componentWillLoad() {
|
|
987
|
-
|
|
1086
|
+
r("nylas-event-duration", "componentWillLoad"), this.host.setAttribute("name", this.name), this.setDurationMintueOptions();
|
|
988
1087
|
}
|
|
989
1088
|
componentDidLoad() {
|
|
990
|
-
|
|
1089
|
+
r("nylas-event-duration", "componentDidLoad"), this.internals.setFormValue(this.durationMinutes.toString(), "duration");
|
|
991
1090
|
}
|
|
992
1091
|
disconnectedCallback() {
|
|
993
|
-
|
|
1092
|
+
r("nylas-event-duration", "disconnectedCallback");
|
|
994
1093
|
}
|
|
995
1094
|
setDurationMintueOptions() {
|
|
996
1095
|
return this.durationIncrement === 1 ? this.durationMinutesOptions = [
|
|
@@ -1004,12 +1103,12 @@ const Fe = class {
|
|
|
1004
1103
|
this.duration = e.target.value, this.durationMinutes = this.duration * this.durationIncrement, this.internals.setFormValue(this.durationMinutes.toString(), this.name);
|
|
1005
1104
|
}
|
|
1006
1105
|
nylasFormDropdownChangedHandler(e) {
|
|
1007
|
-
|
|
1106
|
+
r("nylas-calendar-picker", "nylasFormDropdownChangedHandler", e.detail);
|
|
1008
1107
|
const { value: t } = e.detail;
|
|
1009
1108
|
this.durationIncrement = parseInt(t), this.durationIncrement === 1 ? this.duration = 60 : this.duration = 1, this.setDurationMintueOptions(), this.durationMinutes = this.duration * this.durationIncrement, this.internals.setFormValue(this.durationMinutes.toString(), "duration");
|
|
1010
1109
|
}
|
|
1011
1110
|
inputOptionChangedHandler(e) {
|
|
1012
|
-
|
|
1111
|
+
r("nylas-calendar-picker", "inputOptionChangedHandler", e.detail);
|
|
1013
1112
|
const { value: t } = e.detail;
|
|
1014
1113
|
this.duration = t, this.durationMinutes = this.duration * this.durationIncrement, this.internals.setFormValue(this.durationMinutes.toString(), this.name);
|
|
1015
1114
|
}
|
|
@@ -1018,13 +1117,13 @@ const Fe = class {
|
|
|
1018
1117
|
{ value: 1, label: "minute" },
|
|
1019
1118
|
{ value: 60, label: "hour" }
|
|
1020
1119
|
];
|
|
1021
|
-
return a(
|
|
1120
|
+
return a(y, { key: "69f81ffd2ca891c9c4681ac03e28091c52db815d" }, a("div", { key: "0f2f55279a060023ee3d0996e255075821c0eaf8", class: "nylas-event-duration", part: "ned" }, a("label", { key: "034772be3a25547f190ea70575e07f356aec1268", htmlFor: "duration" }, "Event duration", a("span", { key: "b3bbb769c229d9de4da23b330c6801093ec70ffe", class: "required" }, "*"), a("span", { key: "f62a2f5e762073f5dea8be87948fc75cc398c2cf", class: "label-icon" }, a("tooltip-component", { key: "73fa017a9c54ee8b38c5d9ebecffeb247bb94e1a" }, a("info-icon", { key: "662f790d63babba084ffb7b3d2c1d6ad57872444", slot: "tooltip-icon" }), a("span", { key: "71e2c2816bde5eef547f8004858c10809a3d9fc8", slot: "tooltip-content" }, "Set the duration of your event.")))), a("div", { key: "491c79e0a0ff84aa3421c084bbe0370fe3fae874", class: "nylas-event-duration__wrapper" }, a("input-dropdown", { key: "de21d1aa7aa5dffd80c73bd27860b4a8949e54d6", name: "event-duration", options: this.durationMinutesOptions, inputValue: this.duration.toString(), exportparts: "id_dropdown: ned__input_dropdown, id_dropdown-input: ned__input_dropdown-input, id_dropdown-content: ned__input_dropdown-content", defaultInputOption: this.durationMinutesOptions.find((t) => t.value == this.duration) ?? e[0] }), a("select-dropdown", { key: "8ecfa42bb8d7065750b80a523e051aede990237e", name: "event-duration", options: e, pluralizedLabel: this.duration > 1 ? "s" : "", exportparts: "sd_dropdown: ned__dropdown, sd_dropdown-button: ned__dropdown-button, sd_dropdown-content: ned__dropdown-content", defaultSelectedOption: e.find((t) => t.value == this.durationIncrement) ?? e[0], withSearch: !1 }))));
|
|
1022
1121
|
}
|
|
1023
1122
|
static get formAssociated() {
|
|
1024
1123
|
return !0;
|
|
1025
1124
|
}
|
|
1026
1125
|
get host() {
|
|
1027
|
-
return
|
|
1126
|
+
return h(this);
|
|
1028
1127
|
}
|
|
1029
1128
|
static get watchers() {
|
|
1030
1129
|
return {
|
|
@@ -1034,158 +1133,158 @@ const Fe = class {
|
|
|
1034
1133
|
};
|
|
1035
1134
|
}
|
|
1036
1135
|
};
|
|
1037
|
-
|
|
1038
|
-
|
|
1136
|
+
pt([
|
|
1137
|
+
m({
|
|
1039
1138
|
name: "nylas-event-duration",
|
|
1040
1139
|
stateToProps: /* @__PURE__ */ new Map([["schedulerConfig.selectedConfiguration", "selectedConfiguration"]]),
|
|
1041
1140
|
eventToProps: {},
|
|
1042
1141
|
fireRegisterEvent: !0
|
|
1043
1142
|
}),
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
],
|
|
1048
|
-
|
|
1049
|
-
const
|
|
1050
|
-
var
|
|
1143
|
+
A("design:type", Function),
|
|
1144
|
+
A("design:paramtypes", []),
|
|
1145
|
+
A("design:returntype", void 0)
|
|
1146
|
+
], se.prototype, "render", null);
|
|
1147
|
+
se.style = ct;
|
|
1148
|
+
const ft = ':host{display:block;margin:1rem;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.nylas-event-info__title{color:var(--nylas-base-900);font-size:16px;font-style:normal;font-weight:600;line-height:20px;margin:0;text-align:left}.nylas-event-info__subtitle{color:var(--nylas-base-600);font-size:14px;font-style:normal;font-weight:400;line-height:20px;margin:0.25rem 0px 0px;text-align:left}.nylas-event-info__content{padding:1rem;display:flex;flex-direction:column;gap:1rem}.nylas-event-info__block{display:flex;justify-content:space-between;gap:0.5rem}', bt = ft;
|
|
1149
|
+
var ut = function(e, t, n, i) {
|
|
1051
1150
|
var l = arguments.length, s = l < 3 ? t : i === null ? i = Object.getOwnPropertyDescriptor(t, n) : i, o;
|
|
1052
1151
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
1053
1152
|
s = Reflect.decorate(e, t, n, i);
|
|
1054
1153
|
else
|
|
1055
|
-
for (var
|
|
1056
|
-
(o = e[
|
|
1154
|
+
for (var d = e.length - 1; d >= 0; d--)
|
|
1155
|
+
(o = e[d]) && (s = (l < 3 ? o(s) : l > 3 ? o(t, n, s) : o(t, n)) || s);
|
|
1057
1156
|
return l > 3 && s && Object.defineProperty(t, n, s), s;
|
|
1058
|
-
},
|
|
1157
|
+
}, R = function(e, t) {
|
|
1059
1158
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
1060
1159
|
return Reflect.metadata(e, t);
|
|
1061
1160
|
};
|
|
1062
|
-
const
|
|
1161
|
+
const le = class {
|
|
1063
1162
|
constructor(e) {
|
|
1064
|
-
|
|
1163
|
+
p(this, e), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals);
|
|
1065
1164
|
}
|
|
1066
1165
|
connectedCallback() {
|
|
1067
|
-
|
|
1166
|
+
r("nylas-event-info", "connectedCallback");
|
|
1068
1167
|
}
|
|
1069
1168
|
componentWillLoad() {
|
|
1070
|
-
|
|
1169
|
+
r("nylas-event-info", "componentWillLoad");
|
|
1071
1170
|
}
|
|
1072
1171
|
componentDidLoad() {
|
|
1073
|
-
|
|
1172
|
+
r("nylas-event-info", "componentDidLoad"), q(["inputs"], this.el);
|
|
1074
1173
|
}
|
|
1075
1174
|
disconnectedCallback() {
|
|
1076
|
-
|
|
1175
|
+
r("nylas-event-info", "disconnectedCallback");
|
|
1077
1176
|
}
|
|
1078
1177
|
render() {
|
|
1079
|
-
return a(
|
|
1178
|
+
return a(y, { key: "311ce4cda7377b94f12a98ff6a3318697762f6f0" }, a("nylas-form-card", { key: "99e5490667e83818242ae24863e5cdd94b39b0fa" }, a("h1", { key: "f8c0f0cc5c330fac2b2f17e46be32ea4f3cc0b4b", slot: "header-title", class: "nylas-event-info__title" }, "Event information"), a("h3", { key: "637d443ca5851d7038acf20425c7fc969543951d", slot: "header-subtitle", class: "nylas-event-info__subtitle" }, "Enter all event information."), a("div", { key: "aa0c51b31eeda0ba4b2c0090ed8367d139ea447b", slot: "content", class: "nylas-event-info__content" }, a("slot", { key: "95cf051184160aa802d89fc395bf914df09412e9", name: "inputs" }))));
|
|
1080
1179
|
}
|
|
1081
1180
|
static get formAssociated() {
|
|
1082
1181
|
return !0;
|
|
1083
1182
|
}
|
|
1084
1183
|
get el() {
|
|
1085
|
-
return
|
|
1184
|
+
return h(this);
|
|
1086
1185
|
}
|
|
1087
1186
|
};
|
|
1088
|
-
|
|
1089
|
-
|
|
1187
|
+
ut([
|
|
1188
|
+
m({
|
|
1090
1189
|
name: "nylas-event-info",
|
|
1091
1190
|
eventToProps: {},
|
|
1092
1191
|
fireRegisterEvent: !0
|
|
1093
1192
|
}),
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
],
|
|
1098
|
-
|
|
1099
|
-
const
|
|
1100
|
-
var
|
|
1193
|
+
R("design:type", Function),
|
|
1194
|
+
R("design:paramtypes", []),
|
|
1195
|
+
R("design:returntype", void 0)
|
|
1196
|
+
], le.prototype, "render", null);
|
|
1197
|
+
le.style = bt;
|
|
1198
|
+
const yt = ':host{display:block;margin:1rem;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.nylas-event-limits__title{color:var(--nylas-base-900);font-size:16px;font-style:normal;font-weight:600;line-height:20px;margin:0;text-align:left}.nylas-event-limits__subtitle{color:var(--nylas-base-600);font-size:14px;font-style:normal;font-weight:400;line-height:20px;margin:0.25rem 0px 0px;text-align:left}.nylas-event-limits__content{padding:1rem;display:flex;flex-direction:column;gap:1rem}.nylas-event-limits__block{display:flex;justify-content:space-between;gap:0.5rem}', ht = yt;
|
|
1199
|
+
var mt = function(e, t, n, i) {
|
|
1101
1200
|
var l = arguments.length, s = l < 3 ? t : i === null ? i = Object.getOwnPropertyDescriptor(t, n) : i, o;
|
|
1102
1201
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
1103
1202
|
s = Reflect.decorate(e, t, n, i);
|
|
1104
1203
|
else
|
|
1105
|
-
for (var
|
|
1106
|
-
(o = e[
|
|
1204
|
+
for (var d = e.length - 1; d >= 0; d--)
|
|
1205
|
+
(o = e[d]) && (s = (l < 3 ? o(s) : l > 3 ? o(t, n, s) : o(t, n)) || s);
|
|
1107
1206
|
return l > 3 && s && Object.defineProperty(t, n, s), s;
|
|
1108
|
-
},
|
|
1207
|
+
}, M = function(e, t) {
|
|
1109
1208
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
1110
1209
|
return Reflect.metadata(e, t);
|
|
1111
1210
|
};
|
|
1112
|
-
const
|
|
1211
|
+
const oe = class {
|
|
1113
1212
|
constructor(e) {
|
|
1114
|
-
|
|
1213
|
+
p(this, e), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals);
|
|
1115
1214
|
}
|
|
1116
1215
|
connectedCallback() {
|
|
1117
|
-
|
|
1216
|
+
r("nylas-event-limits", "connectedCallback");
|
|
1118
1217
|
}
|
|
1119
1218
|
componentWillLoad() {
|
|
1120
|
-
|
|
1219
|
+
r("nylas-event-limits", "componentWillLoad");
|
|
1121
1220
|
}
|
|
1122
1221
|
componentDidLoad() {
|
|
1123
|
-
|
|
1222
|
+
r("nylas-event-limits", "componentDidLoad"), q(["inputs"], this.el);
|
|
1124
1223
|
}
|
|
1125
1224
|
disconnectedCallback() {
|
|
1126
|
-
|
|
1225
|
+
r("nylas-event-limits", "disconnectedCallback");
|
|
1127
1226
|
}
|
|
1128
1227
|
render() {
|
|
1129
|
-
return a(
|
|
1228
|
+
return a(y, { key: "6bfa0e29afa1529eb445b68339a658e4d7c8a6be" }, a("nylas-form-card", { key: "eda419f6f0f7bb8dfd2ebdb0a13c0a8c650190eb" }, a("h1", { key: "ea2c9af0d66665f25dcbb9c4c152bf159ceb4169", slot: "header-title", class: "nylas-event-limits__title" }, "Set event limits"), a("h3", { key: "b600fd0b690bab256fde199b373913d9009be9bf", slot: "header-subtitle", class: "nylas-event-limits__subtitle" }, "Customize event limits for the event."), a("div", { key: "72b24085107528833d406802b206eed3719bb358", slot: "content", class: "nylas-event-limits__content" }, a("slot", { key: "74a09fd8044065a2f52ef5abaeef0ba80f38f17b", name: "inputs" }))));
|
|
1130
1229
|
}
|
|
1131
1230
|
static get formAssociated() {
|
|
1132
1231
|
return !0;
|
|
1133
1232
|
}
|
|
1134
1233
|
get el() {
|
|
1135
|
-
return
|
|
1234
|
+
return h(this);
|
|
1136
1235
|
}
|
|
1137
1236
|
};
|
|
1138
|
-
|
|
1139
|
-
|
|
1237
|
+
mt([
|
|
1238
|
+
m({
|
|
1140
1239
|
name: "nylas-event-limits",
|
|
1141
1240
|
eventToProps: {},
|
|
1142
1241
|
fireRegisterEvent: !0
|
|
1143
1242
|
}),
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
],
|
|
1148
|
-
|
|
1149
|
-
const
|
|
1150
|
-
var
|
|
1243
|
+
M("design:type", Function),
|
|
1244
|
+
M("design:paramtypes", []),
|
|
1245
|
+
M("design:returntype", void 0)
|
|
1246
|
+
], oe.prototype, "render", null);
|
|
1247
|
+
oe.style = ht;
|
|
1248
|
+
const gt = ':host{--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.nylas-event-location{display:flex;flex-direction:column;gap:4px;font-family:var(--nylas-font-family)}.nylas-event-location label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:16px;font-style:normal;font-weight:400;line-height:150%;}.nylas-event-location label span.label-icon{margin-left:4px}.nylas-event-location label span.label-icon tooltip-component{display:flex}.nylas-event-location span[slot=select-icon]{border-right:1px solid var(--nylas-base-200);padding:16px 0.75rem 16px 0.5rem;border-radius:var(--nylas-border-radius-2x);border-bottom-right-radius:0;border-top-right-radius:0;height:20px}.nylas-event-location div.location-input{display:grid;grid-template-columns:auto 1fr;width:100%;gap:0.5rem}@media screen and (max-width: 768px){.nylas-event-location div.location-input{grid-template-columns:1fr}}.nylas-event-location div.location-input input{border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);padding:12px 16px;font-family:var(--nylas-font-family);font-size:16px;line-height:24px}.nylas-event-location select-dropdown{width:208px}@media screen and (max-width: 768px){.nylas-event-location select-dropdown{width:100%}}.nylas-event-location select-dropdown::part(sd_dropdown){width:100%}.nylas-event-location select-dropdown::part(sd_dropdown-content){left:calc(35px + 0.5rem)}.nylas-event-location select-dropdown::part(sd_dropdown-button){display:flex;justify-content:space-between;width:100%;border:1px solid var(--nylas-base-200);padding:0 0.5rem}.nylas-event-location select-dropdown::part(sd_dropdown-button-selected-label){display:inline-flex;align-self:center;padding:14px 0;font-family:var(--nylas-font-family);font-size:16px;line-height:24px}', vt = gt;
|
|
1249
|
+
var _t = function(e, t, n, i) {
|
|
1151
1250
|
var l = arguments.length, s = l < 3 ? t : i === null ? i = Object.getOwnPropertyDescriptor(t, n) : i, o;
|
|
1152
1251
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
1153
1252
|
s = Reflect.decorate(e, t, n, i);
|
|
1154
1253
|
else
|
|
1155
|
-
for (var
|
|
1156
|
-
(o = e[
|
|
1254
|
+
for (var d = e.length - 1; d >= 0; d--)
|
|
1255
|
+
(o = e[d]) && (s = (l < 3 ? o(s) : l > 3 ? o(t, n, s) : o(t, n)) || s);
|
|
1157
1256
|
return l > 3 && s && Object.defineProperty(t, n, s), s;
|
|
1158
|
-
},
|
|
1257
|
+
}, z = function(e, t) {
|
|
1159
1258
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
1160
1259
|
return Reflect.metadata(e, t);
|
|
1161
1260
|
};
|
|
1162
|
-
const
|
|
1261
|
+
const re = class {
|
|
1163
1262
|
constructor(e) {
|
|
1164
|
-
|
|
1263
|
+
p(this, e), this.valueChanged = u(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.name = "location", this.selectedConfiguration = void 0, this.eventLocation = void 0, this.location = this.eventLocation ?? "", this.selectedLocationOption = this.eventLocation ? "custom" : "none";
|
|
1165
1264
|
}
|
|
1166
1265
|
elementNameChangedHandler(e) {
|
|
1167
|
-
|
|
1266
|
+
r("nylas-event-location", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
1168
1267
|
}
|
|
1169
1268
|
selectedConfigurationChangedHandler(e, t) {
|
|
1170
1269
|
var i;
|
|
1171
|
-
|
|
1270
|
+
r("nylas-custom-booking-flow", "selectedConfigurationChangedHandler", e, t);
|
|
1172
1271
|
const n = (i = e == null ? void 0 : e.event_booking) == null ? void 0 : i.location;
|
|
1173
1272
|
n && (this.selectedLocationOption = n ? "custom" : "none", this.location = n);
|
|
1174
1273
|
}
|
|
1175
1274
|
eventLocationChangedHandler(e, t) {
|
|
1176
|
-
|
|
1275
|
+
r("nylas-event-location", "eventLocationChangedHandler", e), e !== t && (this.selectedLocationOption = e ? "custom" : "none");
|
|
1177
1276
|
}
|
|
1178
1277
|
connectedCallback() {
|
|
1179
|
-
|
|
1278
|
+
r("nylas-event-location", "connectedCallback");
|
|
1180
1279
|
}
|
|
1181
1280
|
componentWillLoad() {
|
|
1182
|
-
|
|
1281
|
+
r("nylas-event-location", "componentWillLoad"), this.host.setAttribute("name", this.name);
|
|
1183
1282
|
}
|
|
1184
1283
|
componentDidLoad() {
|
|
1185
|
-
|
|
1284
|
+
r("nylas-event-location", "componentDidLoad");
|
|
1186
1285
|
}
|
|
1187
1286
|
disconnectedCallback() {
|
|
1188
|
-
|
|
1287
|
+
r("nylas-event-location", "disconnectedCallback");
|
|
1189
1288
|
}
|
|
1190
1289
|
nylasFormDropdownChangedHandler(e) {
|
|
1191
1290
|
this.selectedLocationOption = e.detail.value, this.selectedLocationOption === "none" && (this.location = "", this.setFormValue("", "location"), this.valueChanged.emit({ value: "", name: this.name }));
|
|
@@ -1194,7 +1293,7 @@ const ze = class {
|
|
|
1194
1293
|
typeof this.internals.setFormValue == "function" && this.internals.setFormValue(e, t);
|
|
1195
1294
|
}
|
|
1196
1295
|
handleChange(e) {
|
|
1197
|
-
const t =
|
|
1296
|
+
const t = H(e.target.value);
|
|
1198
1297
|
this.location = t, this.setFormValue(t, "location"), this.valueChanged.emit({ value: t, name: this.name });
|
|
1199
1298
|
}
|
|
1200
1299
|
render() {
|
|
@@ -1205,13 +1304,13 @@ const ze = class {
|
|
|
1205
1304
|
none: a("location-off-icon", { key: "f9a254f862acd3c1b8a24b7efe0069f232bd9f51" }),
|
|
1206
1305
|
custom: a("location-icon", { key: "641cfced66068f659d7d6db3b88a11314d9cacf6" })
|
|
1207
1306
|
};
|
|
1208
|
-
return a(
|
|
1307
|
+
return a(y, { key: "9e86c85ff957ac4d8192350e61bc66dfb7d8f764" }, a("div", { key: "a51752993c346200236187f906caa0629be50e88", class: "nylas-event-location", part: "nel" }, a("label", { key: "53cb18b0acd1a46b4be9a49f88a2786e7832d761", htmlFor: "location" }, "Location type", a("span", { key: "2b2debd710387758562de5833b5160f1d3a18481", class: "label-icon" }, a("tooltip-component", { key: "237da0e3bbfae495fd865d99e8f1e1ef68ae027e" }, a("info-icon", { key: "5f23b94c2bbe0f3ddd3870aeb69cee2f75b0bd28", slot: "tooltip-icon" }), a("span", { key: "b1ed166875a24ce4bcfbc808c26d0042b74f73f3", slot: "tooltip-content" }, "Choose how you’ll meet with the participants at the scheduled time. Pick from available conferencing options or add a custom location.")))), a("div", { key: "316411158feced50b61ce97014ffa0ba7c4400e8", class: "location-input" }, a("select-dropdown", { key: "cc6bdbca81e738f43dfb37b7dc66f06ac338dc40", withSearch: !1, name: "location", options: e, defaultSelectedOption: e.find((n) => n.value == this.selectedLocationOption), exportparts: "sd_dropdown: nel__dropdown, sd_dropdown-button: nel__dropdown-button, sd_dropdown-content: nel__dropdown-content" }, a("span", { key: "faacafdffda95071ee9304ac0e4c0125dc31c123", slot: "select-icon" }, t[this.selectedLocationOption])), this.selectedLocationOption === "custom" && a("input", { type: "text", part: "nel__location", id: "location", name: "location", maxlength: "1024", value: this.location, onInput: (n) => this.handleChange(n) }))));
|
|
1209
1308
|
}
|
|
1210
1309
|
static get formAssociated() {
|
|
1211
1310
|
return !0;
|
|
1212
1311
|
}
|
|
1213
1312
|
get host() {
|
|
1214
|
-
return
|
|
1313
|
+
return h(this);
|
|
1215
1314
|
}
|
|
1216
1315
|
static get watchers() {
|
|
1217
1316
|
return {
|
|
@@ -1221,46 +1320,46 @@ const ze = class {
|
|
|
1221
1320
|
};
|
|
1222
1321
|
}
|
|
1223
1322
|
};
|
|
1224
|
-
|
|
1225
|
-
|
|
1323
|
+
_t([
|
|
1324
|
+
m({
|
|
1226
1325
|
name: "nylas-event-location",
|
|
1227
1326
|
stateToProps: /* @__PURE__ */ new Map([["schedulerConfig.selectedConfiguration", "selectedConfiguration"]]),
|
|
1228
1327
|
eventToProps: {},
|
|
1229
1328
|
fireRegisterEvent: !0
|
|
1230
1329
|
}),
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
],
|
|
1235
|
-
|
|
1236
|
-
const
|
|
1237
|
-
var
|
|
1330
|
+
z("design:type", Function),
|
|
1331
|
+
z("design:paramtypes", []),
|
|
1332
|
+
z("design:returntype", void 0)
|
|
1333
|
+
], re.prototype, "render", null);
|
|
1334
|
+
re.style = vt;
|
|
1335
|
+
const kt = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.nylas-event-title{display:flex;flex-direction:column;gap:4px;position:relative;text-align:left}.nylas-event-title div.title{padding:12px 16px;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);overflow:scroll;white-space:nowrap;scrollbar-width:thin}.nylas-event-title div.title::-webkit-scrollbar{width:6px;height:6px}.nylas-event-title div.title.error{border-color:var(--nylas-error);outline:none}.nylas-event-title input{padding:12px 16px;border-width:1;border-radius:8px;border:1px solid var(--nylas-base-200)}.nylas-event-title span.help-text{color:var(--nylas-base-800);font-size:14px;font-style:normal;font-weight:400;line-height:21px}.nylas-event-title span.error-message{color:var(--nylas-error)}.nylas-event-title label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:16px;font-style:normal;font-weight:400;line-height:150%;}.nylas-event-title label span.required{color:var(--nylas-error, #cc4841)}.nylas-event-title label span.label-icon{margin-left:4px}.nylas-event-title label span.label-icon tooltip-component{display:flex}.highlighted-tag{background-color:var(--nylas-base-200);border-radius:var(--nylas-border-radius);padding:5px;margin-left:4px}.token-options{display:block;background-color:var(--nylas-base-0);width:100%;max-height:336px;overflow:auto;z-index:1;border-radius:4px;position:absolute;top:80px;box-shadow:0px 4px 6px -2px rgba(0, 0, 0, 0.0509803922);box-shadow:0px 10px 15px -3px rgba(0, 0, 0, 0.1019607843)}@media screen and (max-width: 768px){.token-options{right:0;width:325px;max-width:unset}}.token-options ul{padding:0;list-style-type:none;color:var(--nylas-base-900);max-height:336px;margin:0}.token-options ul li{padding:16px, 12px, 16px, 12px;color:black;padding:12px 16px;text-decoration:none;display:block;font-family:inherit;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0px;text-align:left;cursor:pointer}.token-options ul li .token-label{display:flex;flex-direction:column;font-weight:400}.token-options ul li .token-label .token{color:var(--nylas-abse-900);font-size:16px;line-height:24px}.token-options ul li .token-label .description{color:var(--nylas-base-600);font-size:14px;line-height:21px}.token-options ul li:hover,.token-options ul li:focus,.token-options ul li:active,.token-options ul li.active{background-color:var(--nylas-base-100)}.token-options ul li:hover .token-label .token,.token-options ul li:focus .token-label .token,.token-options ul li:active .token-label .token,.token-options ul li.active .token-label .token{color:var(--nylas-primary)}.token-options .selected{background-color:var(--nylas-base-100)}', xt = kt;
|
|
1336
|
+
var Ct = function(e, t, n, i) {
|
|
1238
1337
|
var l = arguments.length, s = l < 3 ? t : i === null ? i = Object.getOwnPropertyDescriptor(t, n) : i, o;
|
|
1239
1338
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
1240
1339
|
s = Reflect.decorate(e, t, n, i);
|
|
1241
1340
|
else
|
|
1242
|
-
for (var
|
|
1243
|
-
(o = e[
|
|
1341
|
+
for (var d = e.length - 1; d >= 0; d--)
|
|
1342
|
+
(o = e[d]) && (s = (l < 3 ? o(s) : l > 3 ? o(t, n, s) : o(t, n)) || s);
|
|
1244
1343
|
return l > 3 && s && Object.defineProperty(t, n, s), s;
|
|
1245
|
-
},
|
|
1344
|
+
}, j = function(e, t) {
|
|
1246
1345
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
1247
1346
|
return Reflect.metadata(e, t);
|
|
1248
1347
|
};
|
|
1249
|
-
const
|
|
1348
|
+
const de = class {
|
|
1250
1349
|
constructor(e) {
|
|
1251
1350
|
var t, n;
|
|
1252
|
-
|
|
1351
|
+
p(this, e), this.valueChanged = u(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.selectedConfiguration = void 0, this.eventTitle = (n = (t = this.selectedConfiguration) == null ? void 0 : t.event_booking) == null ? void 0 : n.title, this.name = "title", this.showTokens = !1, this.availableTokens = K.map((i) => ({
|
|
1253
1352
|
label: i.token,
|
|
1254
1353
|
value: i.value,
|
|
1255
1354
|
labelHTML: i
|
|
1256
1355
|
})), this.filteredTokens = this.availableTokens, this.ariaActivedescendant = "", this.currentWord = { $value: "", fullText: "", index: -1, focusOffset: -1 }, this.validationError = "";
|
|
1257
1356
|
}
|
|
1258
1357
|
elementNameChangedHandler(e) {
|
|
1259
|
-
|
|
1358
|
+
r("nylas-event-title", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
1260
1359
|
}
|
|
1261
1360
|
ariaActivedescendantChangedHandler(e) {
|
|
1262
1361
|
var t, n;
|
|
1263
|
-
if (
|
|
1362
|
+
if (r("nylas-event-title", "ariaActivedescendantChangedHandler", e), e !== "") {
|
|
1264
1363
|
const i = (t = this.host.shadowRoot) == null ? void 0 : t.getElementById(e);
|
|
1265
1364
|
i == null || i.classList.add("active");
|
|
1266
1365
|
} else {
|
|
@@ -1274,65 +1373,65 @@ const je = class {
|
|
|
1274
1373
|
t && this.updateEventTitleFromProp(t);
|
|
1275
1374
|
}
|
|
1276
1375
|
connectedCallback() {
|
|
1277
|
-
|
|
1376
|
+
r("nylas-event-title", "connectedCallback");
|
|
1278
1377
|
}
|
|
1279
1378
|
componentWillLoad() {
|
|
1280
|
-
|
|
1379
|
+
r("nylas-event-title", "componentWillLoad"), this.host.setAttribute("name", this.name);
|
|
1281
1380
|
}
|
|
1282
1381
|
componentDidLoad() {
|
|
1283
|
-
|
|
1382
|
+
r("nylas-event-title", "componentDidLoad"), this.updateEventTitleFromProp(this.eventTitle || "");
|
|
1284
1383
|
}
|
|
1285
1384
|
disconnectedCallback() {
|
|
1286
|
-
|
|
1385
|
+
r("nylas-event-title", "disconnectedCallback");
|
|
1287
1386
|
}
|
|
1288
1387
|
formSubmittedHandler(e) {
|
|
1289
1388
|
var t, n;
|
|
1290
|
-
|
|
1389
|
+
r("nylas-event-title", "formSubmittedHandler", e), (n = (t = this.internals) == null ? void 0 : t.validity) != null && n.valid ? this.validationError = "" : this.validationError = "Event title is required";
|
|
1291
1390
|
}
|
|
1292
1391
|
updateEventTitleFromProp(e) {
|
|
1293
1392
|
var t, n;
|
|
1294
|
-
|
|
1393
|
+
r("nylas-event-title", "eventTitleChangedHandler", e), this.titleRef && (this.titleRef.innerHTML = this.highlightTokens(e), this.titleRef.focus(), typeof this.internals.setValidity == "function" && (e === "" ? (t = this.internals) == null || t.setValidity({ customError: !0 }, "Event title is required", this.titleRef) : (n = this.internals) == null || n.setValidity({ customError: !1 })));
|
|
1295
1394
|
}
|
|
1296
1395
|
highlightTokens(e) {
|
|
1297
1396
|
let t = e;
|
|
1298
|
-
return
|
|
1397
|
+
return K.forEach((n) => {
|
|
1299
1398
|
const i = n.value, l = new RegExp(`(\\${i})(?!\\w)`, "g");
|
|
1300
1399
|
t = t.replace(l, '<span class="highlighted-tag">$1</span>');
|
|
1301
1400
|
}), t;
|
|
1302
1401
|
}
|
|
1303
1402
|
getCurrentSelectionForBrowser() {
|
|
1304
1403
|
var i, l, s;
|
|
1305
|
-
const e = (o,
|
|
1306
|
-
const
|
|
1404
|
+
const e = (o, d, b, f) => {
|
|
1405
|
+
const c = o.replace(/[\u200B-\u200D\uFEFF]/g, ""), _ = c.lastIndexOf("$"), g = c.substring(_).split(" ")[0];
|
|
1307
1406
|
return {
|
|
1308
|
-
focusOffset:
|
|
1309
|
-
dollarIndex:
|
|
1310
|
-
lastWord:
|
|
1311
|
-
currentText:
|
|
1312
|
-
node:
|
|
1407
|
+
focusOffset: d,
|
|
1408
|
+
dollarIndex: _,
|
|
1409
|
+
lastWord: g,
|
|
1410
|
+
currentText: c,
|
|
1411
|
+
node: b,
|
|
1313
1412
|
allSelected: f
|
|
1314
1413
|
};
|
|
1315
1414
|
}, t = (o) => {
|
|
1316
|
-
var
|
|
1317
|
-
return o.anchorOffset === 0 && o.focusOffset === ((
|
|
1415
|
+
var d, b;
|
|
1416
|
+
return o.anchorOffset === 0 && o.focusOffset === ((b = (d = o.focusNode) == null ? void 0 : d.nodeValue) == null ? void 0 : b.length);
|
|
1318
1417
|
};
|
|
1319
|
-
switch (
|
|
1418
|
+
switch (me()) {
|
|
1320
1419
|
case "Chrome":
|
|
1321
|
-
const o = (i = this.host.shadowRoot) == null ? void 0 : i.getSelection(),
|
|
1322
|
-
return e(
|
|
1420
|
+
const o = (i = this.host.shadowRoot) == null ? void 0 : i.getSelection(), d = o == null ? void 0 : o.focusNode, b = (d == null ? void 0 : d.nodeValue) || "", f = o && t(o);
|
|
1421
|
+
return e(b, (o == null ? void 0 : o.focusOffset) || -1, d, f);
|
|
1323
1422
|
case "Firefox":
|
|
1324
|
-
const
|
|
1325
|
-
return e(
|
|
1423
|
+
const c = document.getSelection(), _ = ((l = c == null ? void 0 : c.anchorNode) == null ? void 0 : l.nodeValue) || "", g = c && t(c);
|
|
1424
|
+
return e(_, (c == null ? void 0 : c.focusOffset) || -1, c == null ? void 0 : c.anchorNode, g);
|
|
1326
1425
|
case "Safari":
|
|
1327
|
-
const
|
|
1328
|
-
return e(
|
|
1426
|
+
const k = window.getSelection(), v = k == null ? void 0 : k.getComposedRanges(this.host.shadowRoot)[0], I = ((s = v == null ? void 0 : v.startContainer) == null ? void 0 : s.nodeValue) || "", C = k && t(k);
|
|
1427
|
+
return e(I, (v == null ? void 0 : v.endOffset) || -1, v == null ? void 0 : v.startContainer, C);
|
|
1329
1428
|
default:
|
|
1330
1429
|
return console.warn("Browser not supported"), null;
|
|
1331
1430
|
}
|
|
1332
1431
|
}
|
|
1333
1432
|
handleChange(e) {
|
|
1334
1433
|
let t = e.target.textContent || "";
|
|
1335
|
-
t =
|
|
1434
|
+
t = H(t);
|
|
1336
1435
|
const n = this.getCurrentSelectionForBrowser();
|
|
1337
1436
|
if (!n) {
|
|
1338
1437
|
this.updateEventTitle(t), this.resetDropdown();
|
|
@@ -1353,7 +1452,7 @@ const je = class {
|
|
|
1353
1452
|
handleInputKeyDown(e) {
|
|
1354
1453
|
var n, i, l, s;
|
|
1355
1454
|
const t = this.getCurrentSelectionForBrowser();
|
|
1356
|
-
if (t != null && t.allSelected && !
|
|
1455
|
+
if (t != null && t.allSelected && !he(e) && (this.titleRef.innerHTML = ""), e.key === "Enter") {
|
|
1357
1456
|
e.preventDefault();
|
|
1358
1457
|
const o = (n = this.host.shadowRoot) == null ? void 0 : n.getElementById(this.ariaActivedescendant);
|
|
1359
1458
|
o && (o.click(), this.ariaActivedescendant = "");
|
|
@@ -1361,30 +1460,30 @@ const je = class {
|
|
|
1361
1460
|
e.preventDefault();
|
|
1362
1461
|
const o = (i = this.host.shadowRoot) == null ? void 0 : i.getElementById(this.ariaActivedescendant);
|
|
1363
1462
|
if (o) {
|
|
1364
|
-
const
|
|
1365
|
-
|
|
1463
|
+
const d = o.nextElementSibling;
|
|
1464
|
+
d ? this.ariaActivedescendant = d.id : this.ariaActivedescendant = this.filteredTokens[0].label;
|
|
1366
1465
|
} else
|
|
1367
1466
|
this.ariaActivedescendant = this.filteredTokens[0].label;
|
|
1368
1467
|
} else if (e.key === "ArrowUp") {
|
|
1369
1468
|
e.preventDefault();
|
|
1370
1469
|
const o = (l = this.host.shadowRoot) == null ? void 0 : l.getElementById(this.ariaActivedescendant);
|
|
1371
1470
|
if (o) {
|
|
1372
|
-
const
|
|
1373
|
-
|
|
1471
|
+
const d = o.previousElementSibling;
|
|
1472
|
+
d ? this.ariaActivedescendant = d.id : this.ariaActivedescendant = this.filteredTokens[this.filteredTokens.length - 1].label;
|
|
1374
1473
|
} else
|
|
1375
1474
|
this.ariaActivedescendant = this.filteredTokens[this.filteredTokens.length - 1].label;
|
|
1376
1475
|
} else
|
|
1377
1476
|
e.key === "Escape" ? (e.preventDefault(), this.resetDropdown()) : (e.key === "Backspace" || e.key === "Delete") && (t != null && t.currentText.startsWith("${") && (s = t == null ? void 0 : t.node) != null && s.parentNode && t.node.parentNode.removeChild(t.node), (this.titleRef.textContent === "" || (t == null ? void 0 : t.currentText) === "" || t != null && t.allSelected) && (this.titleRef.innerHTML = ""));
|
|
1378
1477
|
}
|
|
1379
1478
|
selectOption(e, t) {
|
|
1380
|
-
var
|
|
1479
|
+
var I;
|
|
1381
1480
|
e.preventDefault();
|
|
1382
1481
|
const n = this.currentWord.fullText, i = this.currentWord.$value;
|
|
1383
1482
|
let l = this.titleRef.firstChild, s = null;
|
|
1384
1483
|
for (; l; ) {
|
|
1385
1484
|
if (l.nodeType === 3) {
|
|
1386
|
-
const
|
|
1387
|
-
if (
|
|
1485
|
+
const C = ((I = l.textContent) == null ? void 0 : I.replace(/[\u200B-\u200D\uFEFF]/g, "")) || "", ye = n.replace(/[\u200B-\u200D\uFEFF]/g, "");
|
|
1486
|
+
if (C.includes(ye)) {
|
|
1388
1487
|
s = l;
|
|
1389
1488
|
break;
|
|
1390
1489
|
}
|
|
@@ -1393,18 +1492,18 @@ const je = class {
|
|
|
1393
1492
|
}
|
|
1394
1493
|
if (!s)
|
|
1395
1494
|
return;
|
|
1396
|
-
const o = s.textContent || "",
|
|
1397
|
-
|
|
1398
|
-
const
|
|
1495
|
+
const o = s.textContent || "", d = o.indexOf(i), b = o.substring(0, d), f = o.substring(d + i.length), c = document.createTextNode(b), _ = document.createRange(), g = document.createElement("span");
|
|
1496
|
+
g.classList.add("highlighted-tag"), g.textContent = `${t.value}`;
|
|
1497
|
+
const k = document.createTextNode(f);
|
|
1399
1498
|
if (f !== "")
|
|
1400
|
-
s.replaceWith(
|
|
1499
|
+
s.replaceWith(c, g, k), _.setStart(k, 1);
|
|
1401
1500
|
else {
|
|
1402
|
-
const
|
|
1403
|
-
s.replaceWith(
|
|
1501
|
+
const C = document.createTextNode("");
|
|
1502
|
+
s.replaceWith(c, g, C), _.setStart(C, 1);
|
|
1404
1503
|
}
|
|
1405
1504
|
this.resetDropdown(), this.titleRef.focus();
|
|
1406
|
-
const
|
|
1407
|
-
|
|
1505
|
+
const v = window.getSelection();
|
|
1506
|
+
_.collapse(!0), v == null || v.removeAllRanges(), v == null || v.addRange(_), this.updateEventTitle(this.titleRef.textContent || "");
|
|
1408
1507
|
}
|
|
1409
1508
|
populateSuggestionsDropdown(e = "") {
|
|
1410
1509
|
this.filteredTokens = this.availableTokens.filter((t) => t.label.startsWith(e.toString()) || t.value.startsWith(e.toString())), this.filteredTokens.length > 0 && (this.ariaActivedescendant = this.filteredTokens[0].label);
|
|
@@ -1422,7 +1521,7 @@ const je = class {
|
|
|
1422
1521
|
}
|
|
1423
1522
|
render() {
|
|
1424
1523
|
var e;
|
|
1425
|
-
return a(
|
|
1524
|
+
return a(y, { key: "8e8de66d58ca4428f35effa133fc8c0b3e3c804f" }, a("div", { key: "411cf6eb2553063facf74bc0fcf46cbced1b2eb8", class: "nylas-event-title", part: "net" }, a("label", { key: "47c8a32d54022a41182ba71aa665f05275e0926b", htmlFor: "title" }, "Event title", a("span", { key: "664268aa456eeae43411ef0c59c3391dfebac185", class: "required" }, "*"), a("span", { key: "c4db00b1f2f428c30344dbe098fabba19e15cf76", class: "label-icon" }, a("tooltip-component", { key: "9884d36d7237310d454cb2cce36ea7a7391a58e5" }, a("info-icon", { key: "6a2c57dc06b77fb2c8faaa21af08558f7cfcf98c", slot: "tooltip-icon" }), a("span", { key: "185fee4da67795d4cbad48ce905c573e42749b95", slot: "tooltip-content" }, "Enter a title for your event.")))), a("div", { key: "80db52b66751ec73660465a2185d2e5c1304903d", class: {
|
|
1426
1525
|
title: !0,
|
|
1427
1526
|
error: this.validationError !== ""
|
|
1428
1527
|
}, part: "net__title", ref: (t) => this.titleRef = t, contentEditable: "true", onInput: (t) => this.handleChange(t), onKeyDown: (t) => this.handleInputKeyDown(t) }), this.showTokens && ((e = this.filteredTokens) == null ? void 0 : e.length) > 0 && a("div", { class: "token-options", part: "net__dropdown-content" }, a("ul", { tabindex: "-1", role: "listbox", "aria-label": this.name, "aria-activedescendant": this.ariaActivedescendant }, this.filteredTokens.map((t) => a("li", { tabindex: "0", key: t.label, id: t.label, class: { active: this.ariaActivedescendant === t.label }, onClick: (n) => this.selectOption(n, t), role: "option" }, this.getLabelHTML(t.labelHTML))))), a("span", { key: "35d1099854f33517e668691f98a3bf296a8280d4", class: "help-text" }, "Create a dynamic templated event title by typing $. Learn more"), this.validationError != "" && a("span", { class: "error-message" }, this.validationError)));
|
|
@@ -1431,7 +1530,7 @@ const je = class {
|
|
|
1431
1530
|
return !0;
|
|
1432
1531
|
}
|
|
1433
1532
|
get host() {
|
|
1434
|
-
return
|
|
1533
|
+
return h(this);
|
|
1435
1534
|
}
|
|
1436
1535
|
static get watchers() {
|
|
1437
1536
|
return {
|
|
@@ -1441,37 +1540,37 @@ const je = class {
|
|
|
1441
1540
|
};
|
|
1442
1541
|
}
|
|
1443
1542
|
};
|
|
1444
|
-
|
|
1445
|
-
|
|
1543
|
+
Ct([
|
|
1544
|
+
m({
|
|
1446
1545
|
name: "nylas-event-title",
|
|
1447
1546
|
stateToProps: /* @__PURE__ */ new Map([["schedulerConfig.selectedConfiguration", "selectedConfiguration"]]),
|
|
1448
1547
|
eventToProps: {},
|
|
1449
1548
|
fireRegisterEvent: !0
|
|
1450
1549
|
}),
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
],
|
|
1455
|
-
|
|
1456
|
-
const
|
|
1457
|
-
var
|
|
1550
|
+
j("design:type", Function),
|
|
1551
|
+
j("design:paramtypes", []),
|
|
1552
|
+
j("design:returntype", void 0)
|
|
1553
|
+
], de.prototype, "render", null);
|
|
1554
|
+
de.style = xt;
|
|
1555
|
+
const wt = ':host{--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.nylas-limit-future-bookings{display:flex;justify-content:space-between;font-family:var(--nylas-font-family)}@media screen and (max-width: 768px){.nylas-limit-future-bookings{flex-direction:column;gap:0.5rem}}.nylas-limit-future-bookings label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:16px;font-style:normal;font-weight:400;line-height:150%;}.nylas-limit-future-bookings label span.label-icon{margin-left:4px}.nylas-limit-future-bookings label span.label-icon tooltip-component{display:flex}select-dropdown::part(sd_dropdown-button){border:none}', Ot = wt;
|
|
1556
|
+
var It = function(e, t, n, i) {
|
|
1458
1557
|
var l = arguments.length, s = l < 3 ? t : i === null ? i = Object.getOwnPropertyDescriptor(t, n) : i, o;
|
|
1459
1558
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
1460
1559
|
s = Reflect.decorate(e, t, n, i);
|
|
1461
1560
|
else
|
|
1462
|
-
for (var
|
|
1463
|
-
(o = e[
|
|
1561
|
+
for (var d = e.length - 1; d >= 0; d--)
|
|
1562
|
+
(o = e[d]) && (s = (l < 3 ? o(s) : l > 3 ? o(t, n, s) : o(t, n)) || s);
|
|
1464
1563
|
return l > 3 && s && Object.defineProperty(t, n, s), s;
|
|
1465
|
-
},
|
|
1564
|
+
}, W = function(e, t) {
|
|
1466
1565
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
1467
1566
|
return Reflect.metadata(e, t);
|
|
1468
1567
|
};
|
|
1469
|
-
const
|
|
1568
|
+
const ce = class {
|
|
1470
1569
|
constructor(e) {
|
|
1471
|
-
|
|
1570
|
+
p(this, e), this.valueChanged = u(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.selectedConfiguration = void 0, this.availableDaysInFuture = void 0, this.name = "limit-future-bookings", this.selectedNumber = 1, this.selectedPeriod = "day";
|
|
1472
1571
|
}
|
|
1473
1572
|
elementNameChangedHandler(e) {
|
|
1474
|
-
|
|
1573
|
+
r("nylas-limit-future-bookings", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
1475
1574
|
}
|
|
1476
1575
|
selectedConfigurationChangedHandler(e) {
|
|
1477
1576
|
var n;
|
|
@@ -1482,17 +1581,17 @@ const Be = class {
|
|
|
1482
1581
|
this.updateNumberAndPeriodFromDays(e);
|
|
1483
1582
|
}
|
|
1484
1583
|
connectedCallback() {
|
|
1485
|
-
|
|
1584
|
+
r("nylas-limit-future-bookings", "connectedCallback");
|
|
1486
1585
|
}
|
|
1487
1586
|
componentWillLoad() {
|
|
1488
|
-
|
|
1587
|
+
r("nylas-limit-future-bookings", "componentWillLoad"), this.host.setAttribute("name", this.name);
|
|
1489
1588
|
}
|
|
1490
1589
|
componentDidLoad() {
|
|
1491
1590
|
var e;
|
|
1492
|
-
|
|
1591
|
+
r("nylas-limit-future-bookings", "componentDidLoad"), this.availableDaysInFutureChanged(this.availableDaysInFuture ?? 1), typeof this.internals.setFormValue == "function" && this.internals.setFormValue(((e = this.availableDaysInFuture) == null ? void 0 : e.toString()) ?? "1", this.name);
|
|
1493
1592
|
}
|
|
1494
1593
|
disconnectedCallback() {
|
|
1495
|
-
|
|
1594
|
+
r("nylas-limit-future-bookings", "disconnectedCallback");
|
|
1496
1595
|
}
|
|
1497
1596
|
timePeriodChangedHandler(e) {
|
|
1498
1597
|
const { number: t, period: n } = e.detail;
|
|
@@ -1504,13 +1603,13 @@ const Be = class {
|
|
|
1504
1603
|
e >= 30 && e % 30 === 0 ? (t = e / 30, n = "month") : e >= 7 && e % 7 === 0 ? (t = e / 7, n = "week") : (t = e, n = "day"), this.selectedNumber = t, this.selectedPeriod = n;
|
|
1505
1604
|
}
|
|
1506
1605
|
render() {
|
|
1507
|
-
return a(
|
|
1606
|
+
return a(y, { key: "e1e24151575c5c687d51fdf177840aa7c05424d9" }, a("div", { key: "ceb19c13b5ad7e132260de266b1883b3f8d53f3d", class: "nylas-limit-future-bookings", part: "nlfb" }, a("label", { key: "44c296c74b9a9cd7152d2c704d4dc6ef82cc39c7" }, "Limit future bookings", a("span", { key: "11e7622613f38d12ef4f1c564b0ca311ab679cb3", class: "label-icon" }, a("tooltip-component", { key: "d9ab1be2efb6616a937d112017be0e2c8e965ab3" }, a("info-icon", { key: "9f207ec82aa2a122ebfd0ba047f650751c49e470", slot: "tooltip-icon" }), a("span", { key: "1d91cfa505846f5f9da0457b785d8c645044be55", slot: "tooltip-content" }, "Set a limit on how far in the future bookings can be made.")))), a("time-period-selector", { key: "cc11ea1514b99b8b4ef1721a15d56fbda1c1693b", id: "limit-future-bookings", timePeriods: ["day", "week", "month"], exportparts: "tps__number-dropdown: nlfb__number-dropdown, tps__number-dropdown-button: nlfb__number-dropdown-button, tps__number-dropdown-content: nlfb__number-dropdown-content, tps__period-dropdown: nlfb__period-dropdown, tps__period-dropdown-button: nlfb__period-dropdown-button, tps__period-dropdown-content: nlfb__period-dropdown-content", defaultSelectedNumber: this.selectedNumber, defaultSelectedPeriod: this.selectedPeriod })));
|
|
1508
1607
|
}
|
|
1509
1608
|
static get formAssociated() {
|
|
1510
1609
|
return !0;
|
|
1511
1610
|
}
|
|
1512
1611
|
get host() {
|
|
1513
|
-
return
|
|
1612
|
+
return h(this);
|
|
1514
1613
|
}
|
|
1515
1614
|
static get watchers() {
|
|
1516
1615
|
return {
|
|
@@ -1520,37 +1619,37 @@ const Be = class {
|
|
|
1520
1619
|
};
|
|
1521
1620
|
}
|
|
1522
1621
|
};
|
|
1523
|
-
|
|
1524
|
-
|
|
1622
|
+
It([
|
|
1623
|
+
m({
|
|
1525
1624
|
name: "nylas-limit-future-bookings",
|
|
1526
1625
|
stateToProps: /* @__PURE__ */ new Map([["schedulerConfig.selectedConfiguration", "selectedConfiguration"]]),
|
|
1527
1626
|
eventToProps: {},
|
|
1528
1627
|
fireRegisterEvent: !0
|
|
1529
1628
|
}),
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
],
|
|
1534
|
-
|
|
1535
|
-
const
|
|
1536
|
-
var
|
|
1629
|
+
W("design:type", Function),
|
|
1630
|
+
W("design:paramtypes", []),
|
|
1631
|
+
W("design:returntype", void 0)
|
|
1632
|
+
], ce.prototype, "render", null);
|
|
1633
|
+
ce.style = Ot;
|
|
1634
|
+
const Tt = ':host{--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.nylas-min-booking-notice{display:flex;justify-content:space-between;font-family:var(--nylas-font-family)}@media screen and (max-width: 768px){.nylas-min-booking-notice{flex-direction:column;gap:0.5rem}}.nylas-min-booking-notice label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:16px;font-style:normal;font-weight:400;line-height:150%;}.nylas-min-booking-notice label span.label-icon{margin-left:4px}.nylas-min-booking-notice label span.label-icon tooltip-component{display:flex}select-dropdown::part(sd_dropdown-button){border:none}', Ht = Tt;
|
|
1635
|
+
var $t = function(e, t, n, i) {
|
|
1537
1636
|
var l = arguments.length, s = l < 3 ? t : i === null ? i = Object.getOwnPropertyDescriptor(t, n) : i, o;
|
|
1538
1637
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
1539
1638
|
s = Reflect.decorate(e, t, n, i);
|
|
1540
1639
|
else
|
|
1541
|
-
for (var
|
|
1542
|
-
(o = e[
|
|
1640
|
+
for (var d = e.length - 1; d >= 0; d--)
|
|
1641
|
+
(o = e[d]) && (s = (l < 3 ? o(s) : l > 3 ? o(t, n, s) : o(t, n)) || s);
|
|
1543
1642
|
return l > 3 && s && Object.defineProperty(t, n, s), s;
|
|
1544
|
-
},
|
|
1643
|
+
}, B = function(e, t) {
|
|
1545
1644
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
1546
1645
|
return Reflect.metadata(e, t);
|
|
1547
1646
|
};
|
|
1548
|
-
const
|
|
1647
|
+
const pe = class {
|
|
1549
1648
|
constructor(e) {
|
|
1550
|
-
|
|
1649
|
+
p(this, e), this.valueChanged = u(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.selectedConfiguration = void 0, this.minBookingNotice = void 0, this.name = "min-booking-notice", this.selectedNumber = 1, this.selectedPeriod = "hour";
|
|
1551
1650
|
}
|
|
1552
1651
|
elementNameChangedHandler(e) {
|
|
1553
|
-
|
|
1652
|
+
r("nylas-min-booking-notice", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
1554
1653
|
}
|
|
1555
1654
|
selectedConfigurationChangedHandler(e) {
|
|
1556
1655
|
var n;
|
|
@@ -1561,36 +1660,36 @@ const We = class {
|
|
|
1561
1660
|
this.updateNumberAndPeriodFromMinutes(e);
|
|
1562
1661
|
}
|
|
1563
1662
|
connectedCallback() {
|
|
1564
|
-
|
|
1663
|
+
r("nylas-min-booking-notice", "connectedCallback");
|
|
1565
1664
|
}
|
|
1566
1665
|
componentWillLoad() {
|
|
1567
|
-
|
|
1666
|
+
r("nylas-min-booking-notice", "componentWillLoad"), this.host.setAttribute("name", this.name);
|
|
1568
1667
|
}
|
|
1569
1668
|
componentDidLoad() {
|
|
1570
1669
|
var e;
|
|
1571
|
-
|
|
1670
|
+
r("nylas-min-booking-notice", "componentDidLoad"), this.availableDaysInFutureChanged(this.minBookingNotice ?? 1), typeof this.internals.setFormValue == "function" && this.internals.setFormValue(((e = this.minBookingNotice) == null ? void 0 : e.toString()) ?? "1", this.name);
|
|
1572
1671
|
}
|
|
1573
1672
|
disconnectedCallback() {
|
|
1574
|
-
|
|
1673
|
+
r("nylas-min-booking-notice", "disconnectedCallback");
|
|
1575
1674
|
}
|
|
1576
1675
|
timePeriodChangedHandler(e) {
|
|
1577
1676
|
const { number: t, period: n } = e.detail;
|
|
1578
1677
|
let i;
|
|
1579
|
-
const l = 60, s = l * 24, o = s * 7,
|
|
1580
|
-
n === "minute" ? i = t : n === "hour" ? i = t * l : n === "day" ? i = t * s : n === "week" ? i = t * o : n === "month" ? i = t *
|
|
1678
|
+
const l = 60, s = l * 24, o = s * 7, d = s * 30;
|
|
1679
|
+
n === "minute" ? i = t : n === "hour" ? i = t * l : n === "day" ? i = t * s : n === "week" ? i = t * o : n === "month" ? i = t * d : i = 0, this.valueChanged.emit({ value: i, name: "minBookingNotice" }), typeof this.internals.setFormValue == "function" && this.internals.setFormValue(i.toString(), this.name);
|
|
1581
1680
|
}
|
|
1582
1681
|
updateNumberAndPeriodFromMinutes(e) {
|
|
1583
1682
|
let s, o;
|
|
1584
1683
|
e >= 43200 ? (s = Math.floor(e / 43200), o = "month") : e >= 10080 ? (s = Math.floor(e / 10080), o = "week") : e >= 1440 ? (s = Math.floor(e / 1440), o = "day") : e >= 60 ? (s = Math.floor(e / 60), o = "hour") : (s = e, o = "minute"), this.selectedNumber = s, this.selectedPeriod = o;
|
|
1585
1684
|
}
|
|
1586
1685
|
render() {
|
|
1587
|
-
return a(
|
|
1686
|
+
return a(y, { key: "75bc177620fae5662328ba8f53f9f4a4e84733e5" }, a("div", { key: "a76b27e58174ca827e389b361ce4837e6ae11ced", class: "nylas-min-booking-notice", part: "nmbn" }, a("label", { key: "1db3f2c7c54b05744b64ad40c951595122d317c5" }, "Minimum booking notice", a("span", { key: "a4c7db6f534b570cbbf5af4c3d60d97843599a4b", class: "label-icon" }, a("tooltip-component", { key: "f7d6ba6b294f85c9d573933b6916cd50ad830d2a" }, a("info-icon", { key: "16b11bfaa5affbe15748f6ae6129c1e5a6fcfe32", slot: "tooltip-icon" }), a("span", { key: "1fe829a53fa3dcef0a6d5954717889d9e92d0c68", slot: "tooltip-content" }, "The minimum amount of time in the future for planning the event.")))), a("time-period-selector", { key: "e4a545fc471e67447cab675ccd11fa786337fc23", id: "min-booking-notice", exportparts: "tps__number-dropdown: nmbn__number-dropdown, tps__number-dropdown-button: nmbn__number-dropdown-button, tps__number-dropdown-content: nmbn__number-dropdown-content, tps__period-dropdown: nmbn__period-dropdown, tps__period-dropdown-button: nmbn__period-dropdown-button, tps__period-dropdown-content: nmbn__period-dropdown-content", timePeriods: ["minute", "hour", "day", "week"], defaultSelectedNumber: this.selectedNumber, defaultSelectedPeriod: this.selectedPeriod })));
|
|
1588
1687
|
}
|
|
1589
1688
|
static get formAssociated() {
|
|
1590
1689
|
return !0;
|
|
1591
1690
|
}
|
|
1592
1691
|
get host() {
|
|
1593
|
-
return
|
|
1692
|
+
return h(this);
|
|
1594
1693
|
}
|
|
1595
1694
|
static get watchers() {
|
|
1596
1695
|
return {
|
|
@@ -1600,37 +1699,37 @@ const We = class {
|
|
|
1600
1699
|
};
|
|
1601
1700
|
}
|
|
1602
1701
|
};
|
|
1603
|
-
|
|
1604
|
-
|
|
1702
|
+
$t([
|
|
1703
|
+
m({
|
|
1605
1704
|
name: "nylas-min-booking-notice",
|
|
1606
1705
|
stateToProps: /* @__PURE__ */ new Map([["schedulerConfig.selectedConfiguration", "selectedConfiguration"]]),
|
|
1607
1706
|
eventToProps: {},
|
|
1608
1707
|
fireRegisterEvent: !0
|
|
1609
1708
|
}),
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
],
|
|
1614
|
-
|
|
1615
|
-
const
|
|
1616
|
-
var
|
|
1709
|
+
B("design:type", Function),
|
|
1710
|
+
B("design:paramtypes", []),
|
|
1711
|
+
B("design:returntype", void 0)
|
|
1712
|
+
], pe.prototype, "render", null);
|
|
1713
|
+
pe.style = Ht;
|
|
1714
|
+
const Dt = ':host{--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.nylas-min-cancellation-notice{display:flex;justify-content:space-between;font-family:var(--nylas-font-family)}@media screen and (max-width: 768px){.nylas-min-cancellation-notice{flex-direction:column;gap:0.5rem}}.nylas-min-cancellation-notice label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:16px;font-style:normal;font-weight:400;line-height:150%;}.nylas-min-cancellation-notice label span.label-icon{margin-left:4px}.nylas-min-cancellation-notice label span.label-icon tooltip-component{display:flex}select-dropdown::part(sd_dropdown-button){border:none}', St = Dt;
|
|
1715
|
+
var Et = function(e, t, n, i) {
|
|
1617
1716
|
var l = arguments.length, s = l < 3 ? t : i === null ? i = Object.getOwnPropertyDescriptor(t, n) : i, o;
|
|
1618
1717
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
1619
1718
|
s = Reflect.decorate(e, t, n, i);
|
|
1620
1719
|
else
|
|
1621
|
-
for (var
|
|
1622
|
-
(o = e[
|
|
1720
|
+
for (var d = e.length - 1; d >= 0; d--)
|
|
1721
|
+
(o = e[d]) && (s = (l < 3 ? o(s) : l > 3 ? o(t, n, s) : o(t, n)) || s);
|
|
1623
1722
|
return l > 3 && s && Object.defineProperty(t, n, s), s;
|
|
1624
|
-
},
|
|
1723
|
+
}, Z = function(e, t) {
|
|
1625
1724
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
1626
1725
|
return Reflect.metadata(e, t);
|
|
1627
1726
|
};
|
|
1628
|
-
const
|
|
1727
|
+
const fe = class {
|
|
1629
1728
|
constructor(e) {
|
|
1630
|
-
|
|
1729
|
+
p(this, e), this.valueChanged = u(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.selectedConfiguration = void 0, this.minCancellationNotice = void 0, this.name = "min-cancellation-notice", this.selectedNumber = 1, this.selectedPeriod = "day";
|
|
1631
1730
|
}
|
|
1632
1731
|
elementNameChangedHandler(e) {
|
|
1633
|
-
|
|
1732
|
+
r("nylas-min-cancellation-notice", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
1634
1733
|
}
|
|
1635
1734
|
selectedConfigurationChangedHandler(e) {
|
|
1636
1735
|
var n;
|
|
@@ -1641,36 +1740,36 @@ const Ue = class {
|
|
|
1641
1740
|
this.updateNumberAndPeriodFromMinutes(e);
|
|
1642
1741
|
}
|
|
1643
1742
|
connectedCallback() {
|
|
1644
|
-
|
|
1743
|
+
r("nylas-min-cancellation-notice", "connectedCallback");
|
|
1645
1744
|
}
|
|
1646
1745
|
componentWillLoad() {
|
|
1647
|
-
|
|
1746
|
+
r("nylas-min-cancellation-notice", "componentWillLoad"), this.host.setAttribute("name", this.name);
|
|
1648
1747
|
}
|
|
1649
1748
|
componentDidLoad() {
|
|
1650
1749
|
var e;
|
|
1651
|
-
|
|
1750
|
+
r("nylas-min-cancellation-notice", "componentDidLoad"), this.availableDaysInFutureChanged(this.minCancellationNotice ?? 1), typeof this.internals.setFormValue == "function" && this.internals.setFormValue(((e = this.minCancellationNotice) == null ? void 0 : e.toString()) ?? "1", this.name);
|
|
1652
1751
|
}
|
|
1653
1752
|
disconnectedCallback() {
|
|
1654
|
-
|
|
1753
|
+
r("nylas-min-cancellation-notice", "disconnectedCallback");
|
|
1655
1754
|
}
|
|
1656
1755
|
timePeriodChangedHandler(e) {
|
|
1657
1756
|
const { number: t, period: n } = e.detail;
|
|
1658
1757
|
let i;
|
|
1659
|
-
const l = 60, s = l * 24, o = s * 7,
|
|
1660
|
-
n === "minute" ? i = t : n === "hour" ? i = t * l : n === "day" ? i = t * s : n === "week" ? i = t * o : n === "month" ? i = t *
|
|
1758
|
+
const l = 60, s = l * 24, o = s * 7, d = s * 30;
|
|
1759
|
+
n === "minute" ? i = t : n === "hour" ? i = t * l : n === "day" ? i = t * s : n === "week" ? i = t * o : n === "month" ? i = t * d : i = 0, this.valueChanged.emit({ value: i, name: "minCancellationNotice" }), typeof this.internals.setFormValue == "function" && this.internals.setFormValue(i.toString(), this.name);
|
|
1661
1760
|
}
|
|
1662
1761
|
updateNumberAndPeriodFromMinutes(e) {
|
|
1663
1762
|
let s, o;
|
|
1664
1763
|
e >= 43200 ? (s = Math.floor(e / 43200), o = "month") : e >= 10080 ? (s = Math.floor(e / 10080), o = "week") : e >= 1440 ? (s = Math.floor(e / 1440), o = "day") : e >= 60 ? (s = Math.floor(e / 60), o = "hour") : (s = e, o = "minute"), this.selectedNumber = s, this.selectedPeriod = o;
|
|
1665
1764
|
}
|
|
1666
1765
|
render() {
|
|
1667
|
-
return a(
|
|
1766
|
+
return a(y, { key: "8cccdce4a9960ecf6b860b638da26c50a68104c4" }, a("div", { key: "82854ad81861233231fe4a1e8006196155328141", class: "nylas-min-cancellation-notice", part: "nmcn" }, a("label", { key: "db3eddec3a8fb28c0b035d4d4cd61986832dff0b" }, "Minimum cancellation notice", a("span", { key: "137472a58beef549599289b04be8fde01e7d81da", class: "label-icon" }, a("tooltip-component", { key: "2cfcceb4c7144553ac85d32da46fbd894955a9ee" }, a("info-icon", { key: "9e13ddb61e10e10a5fa426fb6a2b56159597ea88", slot: "tooltip-icon" }), a("span", { key: "9670035ec49fe0db37564d2d44d30f2197a7ec85", slot: "tooltip-content" }, "Set the minimum amount of time required to cancel an event.")))), a("time-period-selector", { key: "0e7b9f7b99d7e10c2c39c5affdfc014a403146ad", id: "min-cancellation-notice", exportparts: "tps__number-dropdown: nmcn__number-dropdown, tps__number-dropdown-button: nmcn__number-dropdown-button, tps__number-dropdown-content: nmcn__number-dropdown-content, tps__period-dropdown: nmcn__period-dropdown, tps__period-dropdown-button: nmcn__period-dropdown-button, tps__period-dropdown-content: nmcn__period-dropdown-content", timePeriods: ["minute", "hour", "day", "week"], defaultSelectedNumber: this.selectedNumber, defaultSelectedPeriod: this.selectedPeriod })));
|
|
1668
1767
|
}
|
|
1669
1768
|
static get formAssociated() {
|
|
1670
1769
|
return !0;
|
|
1671
1770
|
}
|
|
1672
1771
|
get host() {
|
|
1673
|
-
return
|
|
1772
|
+
return h(this);
|
|
1674
1773
|
}
|
|
1675
1774
|
static get watchers() {
|
|
1676
1775
|
return {
|
|
@@ -1680,394 +1779,190 @@ const Ue = class {
|
|
|
1680
1779
|
};
|
|
1681
1780
|
}
|
|
1682
1781
|
};
|
|
1683
|
-
|
|
1684
|
-
|
|
1782
|
+
Et([
|
|
1783
|
+
m({
|
|
1685
1784
|
name: "nylas-min-cancellation-notice",
|
|
1686
1785
|
stateToProps: /* @__PURE__ */ new Map([["schedulerConfig.selectedConfiguration", "selectedConfiguration"]]),
|
|
1687
1786
|
eventToProps: {},
|
|
1688
1787
|
fireRegisterEvent: !0
|
|
1689
1788
|
}),
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
],
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
(
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
return 0;
|
|
1710
|
-
var m = p.match(/([+-]|\d\d)/g), y = 60 * m[1] + (+m[2] || 0);
|
|
1711
|
-
return y === 0 ? 0 : m[0] === "+" ? -y : y;
|
|
1712
|
-
}(c);
|
|
1713
|
-
}], g = function(c) {
|
|
1714
|
-
var p = r[c];
|
|
1715
|
-
return p && (p.indexOf ? p : p.s.concat(p.f));
|
|
1716
|
-
}, v = function(c, p) {
|
|
1717
|
-
var m, y = r.meridiem;
|
|
1718
|
-
if (y) {
|
|
1719
|
-
for (var O = 1; O <= 24; O += 1)
|
|
1720
|
-
if (c.indexOf(y(O, 0, p)) > -1) {
|
|
1721
|
-
m = O > 12;
|
|
1722
|
-
break;
|
|
1723
|
-
}
|
|
1724
|
-
} else
|
|
1725
|
-
m = c === (p ? "pm" : "PM");
|
|
1726
|
-
return m;
|
|
1727
|
-
}, D = { A: [o, function(c) {
|
|
1728
|
-
this.afternoon = v(c, !1);
|
|
1729
|
-
}], a: [o, function(c) {
|
|
1730
|
-
this.afternoon = v(c, !0);
|
|
1731
|
-
}], S: [/\d/, function(c) {
|
|
1732
|
-
this.milliseconds = 100 * +c;
|
|
1733
|
-
}], SS: [l, function(c) {
|
|
1734
|
-
this.milliseconds = 10 * +c;
|
|
1735
|
-
}], SSS: [/\d{3}/, function(c) {
|
|
1736
|
-
this.milliseconds = +c;
|
|
1737
|
-
}], s: [s, f("seconds")], ss: [s, f("seconds")], m: [s, f("minutes")], mm: [s, f("minutes")], H: [s, f("hours")], h: [s, f("hours")], HH: [s, f("hours")], hh: [s, f("hours")], D: [s, f("day")], DD: [l, f("day")], Do: [o, function(c) {
|
|
1738
|
-
var p = r.ordinal, m = c.match(/\d+/);
|
|
1739
|
-
if (this.day = m[0], p)
|
|
1740
|
-
for (var y = 1; y <= 31; y += 1)
|
|
1741
|
-
p(y).replace(/\[|\]/g, "") === c && (this.day = y);
|
|
1742
|
-
}], M: [s, f("month")], MM: [l, f("month")], MMM: [o, function(c) {
|
|
1743
|
-
var p = g("months"), m = (g("monthsShort") || p.map(function(y) {
|
|
1744
|
-
return y.slice(0, 3);
|
|
1745
|
-
})).indexOf(c) + 1;
|
|
1746
|
-
if (m < 1)
|
|
1747
|
-
throw new Error();
|
|
1748
|
-
this.month = m % 12 || m;
|
|
1749
|
-
}], MMMM: [o, function(c) {
|
|
1750
|
-
var p = g("months").indexOf(c) + 1;
|
|
1751
|
-
if (p < 1)
|
|
1752
|
-
throw new Error();
|
|
1753
|
-
this.month = p % 12 || p;
|
|
1754
|
-
}], Y: [/[+-]?\d+/, f("year")], YY: [l, function(c) {
|
|
1755
|
-
this.year = h(c);
|
|
1756
|
-
}], YYYY: [/\d{4}/, f("year")], Z: u, ZZ: u };
|
|
1757
|
-
function x(c) {
|
|
1758
|
-
var p, m;
|
|
1759
|
-
p = c, m = r && r.formats;
|
|
1760
|
-
for (var y = (c = p.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(R, L, S) {
|
|
1761
|
-
var T = S && S.toUpperCase();
|
|
1762
|
-
return L || m[S] || n[S] || m[T].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(M, A, P) {
|
|
1763
|
-
return A || P.slice(1);
|
|
1764
|
-
});
|
|
1765
|
-
})).match(i), O = y.length, E = 0; E < O; E += 1) {
|
|
1766
|
-
var Y = y[E], F = D[Y], $ = F && F[0], H = F && F[1];
|
|
1767
|
-
y[E] = H ? { regex: $, parser: H } : Y.replace(/^\[|\]$/g, "");
|
|
1768
|
-
}
|
|
1769
|
-
return function(R) {
|
|
1770
|
-
for (var L = {}, S = 0, T = 0; S < O; S += 1) {
|
|
1771
|
-
var M = y[S];
|
|
1772
|
-
if (typeof M == "string")
|
|
1773
|
-
T += M.length;
|
|
1774
|
-
else {
|
|
1775
|
-
var A = M.regex, P = M.parser, G = R.slice(T), j = A.exec(G)[0];
|
|
1776
|
-
P.call(L, j), R = R.replace(j, "");
|
|
1777
|
-
}
|
|
1778
|
-
}
|
|
1779
|
-
return function(z) {
|
|
1780
|
-
var I = z.afternoon;
|
|
1781
|
-
if (I !== void 0) {
|
|
1782
|
-
var B = z.hours;
|
|
1783
|
-
I ? B < 12 && (z.hours += 12) : B === 12 && (z.hours = 0), delete z.afternoon;
|
|
1784
|
-
}
|
|
1785
|
-
}(L), L;
|
|
1786
|
-
};
|
|
1787
|
-
}
|
|
1788
|
-
return function(c, p, m) {
|
|
1789
|
-
m.p.customParseFormat = !0, c && c.parseTwoDigitYear && (h = c.parseTwoDigitYear);
|
|
1790
|
-
var y = p.prototype, O = y.parse;
|
|
1791
|
-
y.parse = function(E) {
|
|
1792
|
-
var Y = E.date, F = E.utc, $ = E.args;
|
|
1793
|
-
this.$u = F;
|
|
1794
|
-
var H = $[1];
|
|
1795
|
-
if (typeof H == "string") {
|
|
1796
|
-
var R = $[2] === !0, L = $[3] === !0, S = R || L, T = $[2];
|
|
1797
|
-
L && (T = $[2]), r = this.$locale(), !R && T && (r = m.Ls[T]), this.$d = function(G, j, z) {
|
|
1798
|
-
try {
|
|
1799
|
-
if (["x", "X"].indexOf(j) > -1)
|
|
1800
|
-
return new Date((j === "X" ? 1e3 : 1) * G);
|
|
1801
|
-
var I = x(j)(G), B = I.year, K = I.month, Ge = I.day, Ke = I.hours, Je = I.minutes, qe = I.seconds, Ve = I.milliseconds, we = I.zone, Q = /* @__PURE__ */ new Date(), X = Ge || (B || K ? 1 : Q.getDate()), ee = B || Q.getFullYear(), J = 0;
|
|
1802
|
-
B && !K || (J = K > 0 ? K - 1 : Q.getMonth());
|
|
1803
|
-
var te = Ke || 0, ne = Je || 0, ae = qe || 0, ie = Ve || 0;
|
|
1804
|
-
return we ? new Date(Date.UTC(ee, J, X, te, ne, ae, ie + 60 * we.offset * 1e3)) : z ? new Date(Date.UTC(ee, J, X, te, ne, ae, ie)) : new Date(ee, J, X, te, ne, ae, ie);
|
|
1805
|
-
} catch {
|
|
1806
|
-
return /* @__PURE__ */ new Date("");
|
|
1807
|
-
}
|
|
1808
|
-
}(Y, H, F), this.init(), T && T !== !0 && (this.$L = this.locale(T).$L), S && Y != this.format(H) && (this.$d = /* @__PURE__ */ new Date("")), r = {};
|
|
1809
|
-
} else if (H instanceof Array)
|
|
1810
|
-
for (var M = H.length, A = 1; A <= M; A += 1) {
|
|
1811
|
-
$[1] = H[A - 1];
|
|
1812
|
-
var P = m.apply(this, $);
|
|
1813
|
-
if (P.isValid()) {
|
|
1814
|
-
this.$d = P.$d, this.$L = P.$L, this.init();
|
|
1815
|
-
break;
|
|
1816
|
-
}
|
|
1817
|
-
A === M && (this.$d = /* @__PURE__ */ new Date(""));
|
|
1818
|
-
}
|
|
1819
|
-
else
|
|
1820
|
-
O.call(this, E);
|
|
1821
|
-
};
|
|
1822
|
-
};
|
|
1823
|
-
});
|
|
1824
|
-
})(Ze);
|
|
1825
|
-
const hn = Ze.exports, bn = ':host{display:block;position:relative;--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}.time-picker{display:inline-block;width:150px;font-family:var(--nylas-font-family);position:relative}@media screen and (max-width: 768px){.time-picker{width:auto}}.time-picker input{width:150px;height:48px;text-align:center;font-size:16px;font-family:inherit;cursor:pointer;background:transparent;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}@media screen and (max-width: 768px){.time-picker input{width:88px}}@media screen and (max-width: 504px){.time-picker input{width:68px;font-size:15px}}.time-picker input.focus{background:transparent}.time-picker input:hover,.time-picker input:active{border:1px solid var(--nylas-primary)}.time-picker input:active{outline:2px solid var(--nylas-primary)}.time-picker input span.open{transform:rotate(90deg)}.time-picker input span.closed{transform:rotate(270deg)}.time-picker input.error{border:1px solid var(--nylas-error)}.time-picker p.error{color:var(--nylas-error);font-size:0.875rem;margin:0}.times{display:block;margin-top:0.5rem;background-color:var(--nylas-base-0);width:100%;max-height:336px;overflow:auto;border:1px solid #ddd;z-index:1;border-radius:4px;position:absolute;box-shadow:0px 4px 6px -2px rgba(0, 0, 0, 0.0509803922);box-shadow:0px 10px 15px -3px rgba(0, 0, 0, 0.1019607843)}.times ul{padding:0;list-style-type:none;color:var(--nylas-base-900);max-height:336px}.times ul li{padding:16px, 12px, 16px, 12px;color:black;padding:12px 16px;text-decoration:none;display:block;font-family:inherit;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0px;text-align:center;cursor:pointer}.times ul li.focused{background-color:var(--nylas-base-100)}.times ul li:hover,.times ul li:focus{background-color:var(--nylas-base-100)}.times ul li label{display:flex;align-items:center;gap:0.5rem}.times ul li label input{margin:0}', mn = bn;
|
|
1826
|
-
Z.extend(hn);
|
|
1827
|
-
const yn = class {
|
|
1789
|
+
Z("design:type", Function),
|
|
1790
|
+
Z("design:paramtypes", []),
|
|
1791
|
+
Z("design:returntype", void 0)
|
|
1792
|
+
], fe.prototype, "render", null);
|
|
1793
|
+
fe.style = St;
|
|
1794
|
+
const Lt = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;width:inherit}.nylas-participants-custom-availability{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200)}.nylas-participants-custom-availability .header{padding:1rem}.nylas-participants-custom-availability .header h3{margin:0;font-size:16px;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-participants-custom-availability .header p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.nylas-participants-custom-availability .content .participant-container{padding-top:8px;border-top:1px solid var(--nylas-base-200)}.nylas-participants-custom-availability .content .participant-container .participant-title{display:flex;justify-content:space-between;align-items:center;padding:4px 16px 12px}.nylas-participants-custom-availability .content .participant-container .participant-title p{margin:0}.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle{display:flex;gap:24px;align-items:center}.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle .chevron{display:flex;align-self:center;cursor:pointer}.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle .chevron:hover,.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle .chevron:active{color:var(--nylas-primary)}.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle .chevron.open{transform:rotate(90deg)}.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle .chevron.closed{transform:rotate(270deg)}.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle .chevron.disabled{cursor:not-allowed;color:var(--nylas-base-300)}.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle .chevron.disabled:hover{color:var(--nylas-base-300)}.nylas-participants-custom-availability .content .participant-container nylas-availability-picker::part(nap){margin:0;border:none}', Nt = Lt;
|
|
1795
|
+
var Pt = function(e, t, n, i) {
|
|
1796
|
+
var l = arguments.length, s = l < 3 ? t : i === null ? i = Object.getOwnPropertyDescriptor(t, n) : i, o;
|
|
1797
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
1798
|
+
s = Reflect.decorate(e, t, n, i);
|
|
1799
|
+
else
|
|
1800
|
+
for (var d = e.length - 1; d >= 0; d--)
|
|
1801
|
+
(o = e[d]) && (s = (l < 3 ? o(s) : l > 3 ? o(t, n, s) : o(t, n)) || s);
|
|
1802
|
+
return l > 3 && s && Object.defineProperty(t, n, s), s;
|
|
1803
|
+
}, U = function(e, t) {
|
|
1804
|
+
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
1805
|
+
return Reflect.metadata(e, t);
|
|
1806
|
+
};
|
|
1807
|
+
const be = class {
|
|
1828
1808
|
constructor(e) {
|
|
1829
|
-
|
|
1830
|
-
}
|
|
1831
|
-
handleOutsideClick(e) {
|
|
1832
|
-
!e.composedPath().includes(this.el) && this.showTimes && (this.showTimes = !1);
|
|
1833
|
-
}
|
|
1834
|
-
minimumStartTimeChangedHandler() {
|
|
1835
|
-
if (this.minimumStartTime) {
|
|
1836
|
-
let e = Z().hour(parseInt(this.minimumStartTime)).minute(parseInt(this.minimumStartTime.slice(-4, -2)));
|
|
1837
|
-
this.minimumStartTime.slice(-2).toLowerCase() === "pm" && parseInt(this.minimumStartTime) !== 12 ? e = e.add(12, "hour") : this.minimumStartTime.slice(-2).toLowerCase() === "am" && parseInt(this.minimumStartTime) === 12 && (e = e.subtract(12, "hour")), this.times = this.generateTimes();
|
|
1838
|
-
const t = Z(this.times[0].value, "hh:mma");
|
|
1839
|
-
Z(this.time, "hh:mma").isBefore(t) && (this.err = "Invalid", this.formError.emit({
|
|
1840
|
-
key: this.el.id,
|
|
1841
|
-
message: "Invalid"
|
|
1842
|
-
}));
|
|
1843
|
-
}
|
|
1809
|
+
p(this, e), this.valueChanged = u(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.name = "participant-custom-availability", this.participants = void 0, this.selectedParticipants = this.setParticipants(this.participants);
|
|
1844
1810
|
}
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
const e = se(this.time), t = this.times.findIndex((n) => n.value === e);
|
|
1848
|
-
t > -1 && (this.shouldAutoScroll = !1, this.scrollToViewWithinParent(t));
|
|
1849
|
-
return;
|
|
1850
|
-
}
|
|
1811
|
+
elementNameChangedHandler(e) {
|
|
1812
|
+
r("nylas-participants-custom-availability", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
1851
1813
|
}
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
n[0] === "00" && n[1].slice(-2) == "pm" && (this.err = "Invalid", this.formError.emit({
|
|
1855
|
-
key: this.el.id,
|
|
1856
|
-
message: "Invalid"
|
|
1857
|
-
})), le(t) ? (this.err = "", this.formError.emit({
|
|
1858
|
-
key: this.el.id,
|
|
1859
|
-
message: ""
|
|
1860
|
-
})) : (this.err = "Invalid", this.formError.emit({
|
|
1861
|
-
key: this.el.id,
|
|
1862
|
-
message: "Invalid"
|
|
1863
|
-
})), this.timeChange.emit({
|
|
1864
|
-
key: this.el.id,
|
|
1865
|
-
value: t
|
|
1866
|
-
});
|
|
1814
|
+
participantsChangedHandler(e) {
|
|
1815
|
+
r("nylas-participants-custom-availability", "participantsChangedHandler", e), this.selectedParticipants = this.setParticipants(e);
|
|
1867
1816
|
}
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
const t = (n = e.target) == null ? void 0 : n.value;
|
|
1871
|
-
if (!le(t)) {
|
|
1872
|
-
this.err = "Invalid", this.formError.emit({
|
|
1873
|
-
key: this.el.id,
|
|
1874
|
-
message: "Invalid"
|
|
1875
|
-
});
|
|
1876
|
-
return;
|
|
1877
|
-
}
|
|
1878
|
-
if (t === "") {
|
|
1879
|
-
const i = Te().format("hh:mma");
|
|
1880
|
-
this.timeChange.emit({
|
|
1881
|
-
key: this.el.id,
|
|
1882
|
-
value: i
|
|
1883
|
-
});
|
|
1884
|
-
return;
|
|
1885
|
-
}
|
|
1886
|
-
if (!Ie(t)) {
|
|
1887
|
-
const i = se(t);
|
|
1888
|
-
this.timeChange.emit({
|
|
1889
|
-
key: this.el.id,
|
|
1890
|
-
value: i
|
|
1891
|
-
});
|
|
1892
|
-
return;
|
|
1893
|
-
}
|
|
1894
|
-
this.timeChange.emit({
|
|
1895
|
-
key: this.el.id,
|
|
1896
|
-
value: t
|
|
1897
|
-
});
|
|
1898
|
-
}
|
|
1899
|
-
handleOnInput(e) {
|
|
1900
|
-
var n;
|
|
1901
|
-
const t = (n = e.target) == null ? void 0 : n.value;
|
|
1902
|
-
if (le(t)) {
|
|
1903
|
-
if (t === "") {
|
|
1904
|
-
const i = Te().format("hh:mma"), l = this.times.findIndex((s) => s.value === i);
|
|
1905
|
-
l > -1 && this.scrollToViewWithinParent(l);
|
|
1906
|
-
return;
|
|
1907
|
-
}
|
|
1908
|
-
if (!Ie(t)) {
|
|
1909
|
-
const i = se(t), l = this.times.findIndex((s) => s.value === i);
|
|
1910
|
-
l > -1 && this.scrollToViewWithinParent(l);
|
|
1911
|
-
return;
|
|
1912
|
-
}
|
|
1913
|
-
}
|
|
1817
|
+
connectedCallback() {
|
|
1818
|
+
r("nylas-participants-custom-availability", "connectedCallback");
|
|
1914
1819
|
}
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
let t = Z().set("hour", 0).set("minute", 0).set("second", 0);
|
|
1918
|
-
this.minimumStartTime && (t = Z(this.minimumStartTime, "hh:mma"));
|
|
1919
|
-
const n = t.endOf("day").diff(t, "minutes"), i = Math.round(n / 15);
|
|
1920
|
-
for (let l = 0; l < i + 1; l++) {
|
|
1921
|
-
const s = t.add(l * 15, "minute");
|
|
1922
|
-
if (l == i && s.format("hh:mma").includes("am"))
|
|
1923
|
-
break;
|
|
1924
|
-
e.push({ id: l, value: s.format("hh:mma") });
|
|
1925
|
-
}
|
|
1926
|
-
return e;
|
|
1820
|
+
disconnectedCallback() {
|
|
1821
|
+
r("nylas-participants-custom-availability", "disconnectedCallback");
|
|
1927
1822
|
}
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
if (e.preventDefault(), !this.showTimes) {
|
|
1931
|
-
this.showTimes = !0, this.shouldAutoScroll = !0;
|
|
1932
|
-
return;
|
|
1933
|
-
}
|
|
1934
|
-
if (this.ariaActivedescendant === "")
|
|
1935
|
-
this.ariaActivedescendant = this.times[0].id.toString(), this.focusOption(0);
|
|
1936
|
-
else {
|
|
1937
|
-
const t = this.times.findIndex((i) => i.id.toString() === this.ariaActivedescendant), n = t + 1 < this.times.length ? t + 1 : 0;
|
|
1938
|
-
this.ariaActivedescendant = this.times[n].id.toString(), this.focusOption(n);
|
|
1939
|
-
}
|
|
1940
|
-
} else if (e.key === "ArrowUp")
|
|
1941
|
-
if (e.preventDefault(), this.ariaActivedescendant === "")
|
|
1942
|
-
this.ariaActivedescendant = this.times[this.times.length - 1].id.toString(), this.focusOption(this.times.length - 1);
|
|
1943
|
-
else {
|
|
1944
|
-
const t = this.times.findIndex((i) => i.id.toString() === this.ariaActivedescendant), n = t - 1 >= 0 ? t - 1 : this.times.length - 1;
|
|
1945
|
-
this.ariaActivedescendant = this.times[n].id.toString(), this.focusOption(n);
|
|
1946
|
-
}
|
|
1947
|
-
else
|
|
1948
|
-
e.key === "Escape" && (this.showTimes = !1, this.timeInput.focus());
|
|
1823
|
+
componentWillLoad() {
|
|
1824
|
+
r("nylas-participants-custom-availability", "componentWillLoad");
|
|
1949
1825
|
}
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
if (e.key === "ArrowDown" || e.key === "Tab" && !e.shiftKey) {
|
|
1953
|
-
e.preventDefault();
|
|
1954
|
-
const i = n + 1 < t.length ? n + 1 : 0;
|
|
1955
|
-
this.ariaActivedescendant = t[i].id.toString(), this.focusOption(i);
|
|
1956
|
-
} else if (e.key === "ArrowUp" || e.key === "Tab" && e.shiftKey) {
|
|
1957
|
-
e.preventDefault();
|
|
1958
|
-
const i = n - 1 >= 0 ? n - 1 : t.length - 1;
|
|
1959
|
-
this.ariaActivedescendant = t[i].id.toString(), this.focusOption(i);
|
|
1960
|
-
} else if (e.key === "Enter") {
|
|
1961
|
-
if (e.preventDefault(), this.ariaActivedescendant) {
|
|
1962
|
-
const i = t[n];
|
|
1963
|
-
this.handleTimeChange(e, i.value), this.showTimes = !1, this.ariaActivedescendant = "", this.timeInput.focus();
|
|
1964
|
-
}
|
|
1965
|
-
} else
|
|
1966
|
-
e.key === "Escape" && (this.showTimes = !1, this.timeInput.focus());
|
|
1826
|
+
componentDidLoad() {
|
|
1827
|
+
r("nylas-participants-custom-availability", "componentDidLoad");
|
|
1967
1828
|
}
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
const t = this.times[e], n = (o = this.el.shadowRoot) == null ? void 0 : o.getElementById(t.id.toString()), i = this.timeMenu;
|
|
1971
|
-
this.ariaActivedescendant = t.id.toString();
|
|
1972
|
-
const l = n.getBoundingClientRect(), s = i.getBoundingClientRect();
|
|
1973
|
-
l.top < s.top ? i.scrollTop -= s.top - l.top : l.bottom > s.bottom && (i.scrollTop += l.bottom - s.bottom), l.left < s.left ? i.scrollLeft -= s.left - l.left : l.right > s.right && (i.scrollLeft += l.right - s.right);
|
|
1829
|
+
nylasFormSwitchToggledHandler(e) {
|
|
1830
|
+
r("nylas-participants-custom-availability", "nylasFormSwitchToggledHandler", e.detail), this.selectedParticipants[e.detail.name].isOpen = e.detail.checked, this.selectedParticipants[e.detail.name].setCustom = e.detail.checked, this.selectedParticipants = { ...this.selectedParticipants };
|
|
1974
1831
|
}
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
const t =
|
|
1978
|
-
if (!t)
|
|
1832
|
+
handleValueChanged(e) {
|
|
1833
|
+
r("[nylas-editor-tabs]", "handleValueChanged", e);
|
|
1834
|
+
const { name: t, value: n } = e.detail;
|
|
1835
|
+
if (!t.startsWith("participant-"))
|
|
1979
1836
|
return;
|
|
1980
|
-
|
|
1981
|
-
|
|
1837
|
+
if (this.participantFormRef.checkValidity())
|
|
1838
|
+
this.internals.setValidity({});
|
|
1839
|
+
else {
|
|
1840
|
+
this.internals.setValidity({ customError: !0 }, "Please fix the overlapping time ranges.");
|
|
1841
|
+
return;
|
|
1842
|
+
}
|
|
1843
|
+
const i = JSON.parse(n), l = t.split("-")[2];
|
|
1844
|
+
if (!this.selectedParticipants[l])
|
|
1845
|
+
return;
|
|
1846
|
+
this.selectedParticipants[l].openHours = i.openHours, this.selectedParticipants = { ...this.selectedParticipants };
|
|
1847
|
+
const s = {};
|
|
1848
|
+
this.participants.forEach((o) => {
|
|
1849
|
+
s[o.email] = this.selectedParticipants[o.email].openHours;
|
|
1850
|
+
}), this.internals.setFormValue(JSON.stringify(s), this.name), this.valueChanged.emit({ value: JSON.stringify(s), name: this.name });
|
|
1851
|
+
}
|
|
1852
|
+
setParticipants(e) {
|
|
1853
|
+
const t = {};
|
|
1854
|
+
return e.forEach((n) => {
|
|
1855
|
+
var l, s;
|
|
1856
|
+
const i = !!n.is_organizer;
|
|
1857
|
+
t[n.email] = {
|
|
1858
|
+
isOpen: i,
|
|
1859
|
+
setCustom: !!((l = n.availability) != null && l.open_hours),
|
|
1860
|
+
openHours: ((s = n.availability) == null ? void 0 : s.open_hours) || [],
|
|
1861
|
+
name: n.name || n.email,
|
|
1862
|
+
availability: n.availability
|
|
1863
|
+
};
|
|
1864
|
+
}), t;
|
|
1982
1865
|
}
|
|
1983
1866
|
render() {
|
|
1984
|
-
return a(
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
}
|
|
1992
|
-
this.handleTimeChange(t, e.value), this.showTimes = !1, this.timeInput.focus();
|
|
1993
|
-
}, role: "option" }, `${e.value}`)))), !this.showTimes && this.err && a("p", { class: "error", id: "email-error" }, this.err)));
|
|
1867
|
+
return a(y, { key: "5590f983de527efa3e79d854e9cb2b49e433d64b" }, a("div", { key: "7a016a7a277b077a4edd63d433a185a7d2f7aaab", class: "nylas-participants-custom-availability", part: "npca" }, a("div", { key: "7fb61474d9b80c59844dd2ca67cd00e95ee2a2be", class: "header", part: "npca__header" }, a("h3", { key: "dc66f0262309a5c08c887bbbf5c408233ebd1c00" }, "Set Custom Availability for Participants"), a("p", { key: "60686b9f1c4aab680caf07de6c22561c5ec1a9e5" }, "Set custom availability for scheduling meetings, or default to general availability.")), a("div", { key: "8782a3b4e48ce7eb74eb6e41e239b16d9840fb80", class: "content", part: "npca__content" }, a("form", { key: "c2f23d7eebc4a113fbfa2cbcd7623c99b5a87f89", ref: (e) => this.participantFormRef = e }, Object.keys(this.selectedParticipants).map((e, t) => {
|
|
1868
|
+
var i, l;
|
|
1869
|
+
const n = this.selectedParticipants[e];
|
|
1870
|
+
if (!(!n || !n.name || !n.availability))
|
|
1871
|
+
return a("div", { class: "participant-container", part: "npca__participant-container", key: `participant-conatiner-${t}` }, a("div", { class: "participant-title", part: "npca__participant-title" }, a("p", null, "Set ", n.name, "'s custom availability"), a("div", { class: "participant-toggle", part: "npca__participant-toggle--container" }, a("toggle-switch", { exportparts: "ts_label: npca__toggle-label, ts_input: npca_toggle-input, ts_slider: npca_toggle-slider", name: e, checked: !!n.openHours && n.openHours.length > 0 }), a("span", { class: `chevron ${n.isOpen ? "open" : "closed"} ${n.setCustom ? "" : "disabled"}`, onClick: () => {
|
|
1872
|
+
n.setCustom && (this.selectedParticipants[e].isOpen = !n.isOpen, this.selectedParticipants = { ...this.selectedParticipants });
|
|
1873
|
+
} }, a("chevron-icon", { width: "24", height: "24" })))), n.isOpen && a("nylas-availability-picker", { key: t, name: `participant-${t}-${e}`, openHours: n.openHours, defaultTimezone: (l = (i = n.openHours) == null ? void 0 : i[0]) == null ? void 0 : l.timezone, hideHeader: !0 }));
|
|
1874
|
+
})))));
|
|
1994
1875
|
}
|
|
1995
|
-
get
|
|
1996
|
-
return
|
|
1876
|
+
static get formAssociated() {
|
|
1877
|
+
return !0;
|
|
1878
|
+
}
|
|
1879
|
+
get host() {
|
|
1880
|
+
return h(this);
|
|
1997
1881
|
}
|
|
1998
1882
|
static get watchers() {
|
|
1999
1883
|
return {
|
|
2000
|
-
|
|
1884
|
+
name: ["elementNameChangedHandler"],
|
|
1885
|
+
participants: ["participantsChangedHandler"]
|
|
2001
1886
|
};
|
|
2002
1887
|
}
|
|
2003
1888
|
};
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
1889
|
+
Pt([
|
|
1890
|
+
m({
|
|
1891
|
+
name: "nylas-participants-custom-availability",
|
|
1892
|
+
eventToProps: {},
|
|
1893
|
+
fireRegisterEvent: !0
|
|
1894
|
+
}),
|
|
1895
|
+
U("design:type", Function),
|
|
1896
|
+
U("design:paramtypes", []),
|
|
1897
|
+
U("design:returntype", void 0)
|
|
1898
|
+
], be.prototype, "render", null);
|
|
1899
|
+
be.style = Nt;
|
|
1900
|
+
const Ft = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;width:inherit}.nylas-timeslot-interval{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200)}.nylas-timeslot-interval .header{padding:1rem;border-bottom:1px solid var(--nylas-base-200)}.nylas-timeslot-interval .header h3{margin:0;font-size:1rem;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-timeslot-interval .header p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.nylas-timeslot-interval .nylas-timeslot-interval__dropdown{padding:1rem;display:flex;flex-direction:column;gap:4px}.nylas-timeslot-interval .nylas-timeslot-interval__dropdown span.label{display:flex;align-items:center;gap:4px;color:var(--nylas-base-800)}.nylas-timeslot-interval .nylas-timeslot-interval__dropdown span.label tooltip-component{display:flex}.nylas-timeslot-interval .nylas-timeslot-interval__dropdown select-dropdown{margin-bottom:1.5rem}.nylas-timeslot-interval .nylas-timeslot-interval__dropdown select-dropdown::part(sd_dropdown){width:100%}.nylas-timeslot-interval .nylas-timeslot-interval__dropdown select-dropdown::part(sd_dropdown-content){width:100%;max-width:unset}.nylas-timeslot-interval .nylas-timeslot-interval__dropdown select-dropdown::part(sd_dropdown-button){width:100%;display:flex;justify-content:space-between;align-items:center;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);padding:1rem}.nylas-timeslot-interval .nylas-timeslot-interval__dropdown select-dropdown::part(sd_dropdown-button-selected-label){max-width:calc(100% - 2rem);font-family:var(--nylas-font-family);font-size:16px;line-height:24px}', At = Ft;
|
|
1901
|
+
var Rt = function(e, t, n, i) {
|
|
2007
1902
|
var l = arguments.length, s = l < 3 ? t : i === null ? i = Object.getOwnPropertyDescriptor(t, n) : i, o;
|
|
2008
1903
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
2009
1904
|
s = Reflect.decorate(e, t, n, i);
|
|
2010
1905
|
else
|
|
2011
|
-
for (var
|
|
2012
|
-
(o = e[
|
|
1906
|
+
for (var d = e.length - 1; d >= 0; d--)
|
|
1907
|
+
(o = e[d]) && (s = (l < 3 ? o(s) : l > 3 ? o(t, n, s) : o(t, n)) || s);
|
|
2013
1908
|
return l > 3 && s && Object.defineProperty(t, n, s), s;
|
|
2014
|
-
},
|
|
1909
|
+
}, G = function(e, t) {
|
|
2015
1910
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
2016
1911
|
return Reflect.metadata(e, t);
|
|
2017
1912
|
};
|
|
2018
|
-
const
|
|
1913
|
+
const T = 15, ue = class {
|
|
2019
1914
|
constructor(e) {
|
|
2020
1915
|
var t, n, i, l, s, o;
|
|
2021
|
-
|
|
1916
|
+
p(this, e), this.valueChanged = u(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.selectedConfiguration = void 0, this.name = "timeslot-picker", this.eventDurationMinutes = ((n = (t = this.selectedConfiguration) == null ? void 0 : t.availability) == null ? void 0 : n.duration_minutes) ?? 5, this.defaultIntervalMinutes = ((l = (i = this.selectedConfiguration) == null ? void 0 : i.availability) == null ? void 0 : l.interval_minutes) ?? this.eventDurationMinutes, this.defaultRoundTo = ((o = (s = this.selectedConfiguration) == null ? void 0 : s.availability) == null ? void 0 : o.round_to) ?? void 0, this.selectedInterval = this.defaultIntervalMinutes, this.selectedRoundTo = !!(this.defaultRoundTo && this.defaultRoundTo === this.defaultIntervalMinutes);
|
|
2022
1917
|
}
|
|
2023
1918
|
elementNameChangedHandler(e) {
|
|
2024
|
-
|
|
1919
|
+
r("nylas-timeslot-interval", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
2025
1920
|
}
|
|
2026
1921
|
selectedConfigurationChangedHandler(e) {
|
|
2027
1922
|
var t, n;
|
|
2028
|
-
|
|
1923
|
+
r("nylas-timeslot-interval", "selectedConfigurationChangedHandler", e), this.defaultIntervalMinutes = ((t = e.availability) == null ? void 0 : t.interval_minutes) ?? this.eventDurationMinutes, this.defaultRoundTo = ((n = e.availability) == null ? void 0 : n.round_to) ?? void 0, this.selectedInterval = this.defaultIntervalMinutes, this.selectedRoundTo = !!(this.defaultRoundTo && this.defaultRoundTo === this.defaultIntervalMinutes);
|
|
2029
1924
|
}
|
|
2030
1925
|
connectedCallback() {
|
|
2031
|
-
|
|
1926
|
+
r("nylas-timeslot-interval", "connectedCallback");
|
|
2032
1927
|
}
|
|
2033
1928
|
disconnectedCallback() {
|
|
2034
|
-
|
|
1929
|
+
r("nylas-timeslot-interval", "disconnectedCallback");
|
|
2035
1930
|
}
|
|
2036
1931
|
componentWillLoad() {
|
|
2037
|
-
|
|
1932
|
+
r("nylas-timeslot-interval", "componentWillLoad"), this.host.setAttribute("name", this.name);
|
|
2038
1933
|
}
|
|
2039
1934
|
componentDidLoad() {
|
|
2040
|
-
|
|
1935
|
+
r("nylas-timeslot-interval", "componentDidLoad");
|
|
2041
1936
|
}
|
|
2042
1937
|
componentWillUpdate() {
|
|
2043
|
-
|
|
1938
|
+
r("nylas-timeslot-interval", "componentWillUpdate");
|
|
2044
1939
|
}
|
|
2045
1940
|
componentDidUpdate() {
|
|
2046
|
-
|
|
1941
|
+
r("nylas-timeslot-interval", "componentDidUpdate");
|
|
2047
1942
|
}
|
|
2048
1943
|
componentWillRender() {
|
|
2049
|
-
|
|
1944
|
+
r("nylas-timeslot-interval", "componentWillRender");
|
|
2050
1945
|
}
|
|
2051
1946
|
componentDidRender() {
|
|
2052
|
-
|
|
1947
|
+
r("nylas-timeslot-interval", "componentDidRender");
|
|
2053
1948
|
}
|
|
2054
1949
|
nylasFormDropdownChangedHandler(e) {
|
|
2055
|
-
|
|
1950
|
+
r("nylas-timeslot-interval", "nylasFormDropdownChangedHandler", e.detail), e.detail.value === "duration" ? this.selectedInterval = this.eventDurationMinutes : this.selectedInterval = parseInt(e.detail.value), console.log("nylasFormDropdownChanged selectedRoundTo", this.selectedRoundTo), this.valueChanged.emit({
|
|
2056
1951
|
value: JSON.stringify({
|
|
2057
1952
|
interval: this.selectedInterval,
|
|
2058
|
-
roundTo: this.selectedRoundTo ? this.selectedInterval :
|
|
1953
|
+
roundTo: this.selectedRoundTo ? this.selectedInterval : T
|
|
2059
1954
|
}),
|
|
2060
1955
|
name: this.name
|
|
2061
|
-
}), typeof this.internals.setFormValue == "function" && this.internals.setFormValue(JSON.stringify({ interval: this.selectedInterval, roundTo: this.selectedRoundTo ? this.selectedInterval :
|
|
1956
|
+
}), typeof this.internals.setFormValue == "function" && this.internals.setFormValue(JSON.stringify({ interval: this.selectedInterval, roundTo: this.selectedRoundTo ? this.selectedInterval : T }), this.name);
|
|
2062
1957
|
}
|
|
2063
1958
|
radioSelectionChangedHandler(e) {
|
|
2064
|
-
|
|
1959
|
+
r("nylas-timeslot-interval", "radioSelectionChangedHandler", e.detail), e.detail.value === "no-rounding" ? this.selectedRoundTo = !1 : this.selectedRoundTo = !0, console.log("selectedRoundTo", this.selectedRoundTo), this.valueChanged.emit({
|
|
2065
1960
|
value: JSON.stringify({
|
|
2066
1961
|
interval: this.selectedInterval,
|
|
2067
|
-
roundTo: this.selectedRoundTo ? this.selectedInterval :
|
|
1962
|
+
roundTo: this.selectedRoundTo ? this.selectedInterval : T
|
|
2068
1963
|
}),
|
|
2069
1964
|
name: this.name
|
|
2070
|
-
}), typeof this.internals.setFormValue == "function" && this.internals.setFormValue(JSON.stringify({ interval: this.selectedInterval, roundTo: this.selectedRoundTo ? this.selectedInterval :
|
|
1965
|
+
}), typeof this.internals.setFormValue == "function" && this.internals.setFormValue(JSON.stringify({ interval: this.selectedInterval, roundTo: this.selectedRoundTo ? this.selectedInterval : T }), this.name);
|
|
2071
1966
|
}
|
|
2072
1967
|
render() {
|
|
2073
1968
|
const e = [
|
|
@@ -2080,7 +1975,7 @@ const q = 15, Ye = class {
|
|
|
2080
1975
|
{ value: "45", label: "45 mins" },
|
|
2081
1976
|
{ value: "60", label: "60 mins" }
|
|
2082
1977
|
];
|
|
2083
|
-
return a(
|
|
1978
|
+
return a(y, { key: "792ad5a36b3d3908e134f926e2a5596db28fadbf" }, a("div", { key: "95b99dbf25b3e472aaea700639b3c056ccfcb3ca", class: "nylas-timeslot-interval", part: "nti" }, a("div", { key: "4c19be343c3e0d9f38fa8160800bdf85548588b3", class: "header", part: "nti__header" }, a("h3", { key: "9dd8785f3f995add953de09fe9b42324df9f2357" }, "Time-slot interval preferences"), a("p", { key: "9611b580a85c17d1c4afc60e2210fe4756d91b77" }, "Choose your interval preference for time-slots.")), a("div", { key: "01d71df37fa1724f2284dbc8d0e84700693cb2ef", class: "nylas-timeslot-interval__dropdown" }, a("span", { key: "53d613b58c05e00b8a8c9c7de5043ba2a5e4e2de", class: "label", part: "nti__input-label" }, "Select interval preference", a("tooltip-component", { key: "c171e87a108631c04d8956d1015dfd273c42f46e" }, a("info-icon", { key: "ebb77a5d85abce76b2e52c30491aa5bf5c23cf98", slot: "tooltip-icon" }), a("span", { key: "e01edbb2f124619b8d47640193e76fcad06fc568", slot: "tooltip-content" }, "Set the interval preference for the time-slots."))), a("select-dropdown", { key: "1b5714aa414c08687457793921815eb0f4403b83", name: "booking-calendar", options: e, withSearch: !1, exportparts: "sd_dropdown: nti__dropdown, sd_dropdown-button: nti__dropdown-button, sd_dropdown-content: nti__dropdown-content", defaultSelectedOption: this.defaultIntervalMinutes == this.eventDurationMinutes ? e[0] : e.find((t) => t.value == this.defaultIntervalMinutes.toString()) ?? e[0] }), a("span", { key: "feb0e75bae639119f00ed98e17c7df1ed842530a", class: "label", part: "nti__input-label" }, "Select the type of time-slot rounding", a("tooltip-component", { key: "7513c90d894fbdbb5cbc1a283650cfefca16481e" }, a("info-icon", { key: "16713630e2403a1e61c5eb49bfeeaac17b45ca62", slot: "tooltip-icon" }), a("span", { key: "ca1bc61ac175c7b12648d8b2017e661bd78296dd", slot: "tooltip-content" }, "Select if you want to round the time slots to the nearest interval."))), a("radio-button-group", { key: "f0413408b347a98ce855eaf439253192f1071973", name: "interval-preference", defaultSelectedValue: this.defaultRoundTo && this.defaultRoundTo === this.defaultIntervalMinutes ? "rounding" : "no-rounding", options: [
|
|
2084
1979
|
{ value: "no-rounding", label: "Default", description: "Time-slots will be rounded to the nearest quarter-hour." },
|
|
2085
1980
|
{
|
|
2086
1981
|
value: "rounding",
|
|
@@ -2093,7 +1988,7 @@ const q = 15, Ye = class {
|
|
|
2093
1988
|
return !0;
|
|
2094
1989
|
}
|
|
2095
1990
|
get host() {
|
|
2096
|
-
return
|
|
1991
|
+
return h(this);
|
|
2097
1992
|
}
|
|
2098
1993
|
static get watchers() {
|
|
2099
1994
|
return {
|
|
@@ -2102,20 +1997,29 @@ const q = 15, Ye = class {
|
|
|
2102
1997
|
};
|
|
2103
1998
|
}
|
|
2104
1999
|
};
|
|
2105
|
-
|
|
2106
|
-
|
|
2000
|
+
Rt([
|
|
2001
|
+
m({
|
|
2107
2002
|
name: "nylas-timeslot-interval",
|
|
2108
2003
|
stateToProps: /* @__PURE__ */ new Map([["schedulerConfig.selectedConfiguration", "selectedConfiguration"]]),
|
|
2109
2004
|
fireRegisterEvent: !0
|
|
2110
2005
|
}),
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
],
|
|
2115
|
-
|
|
2116
|
-
const
|
|
2006
|
+
G("design:type", Function),
|
|
2007
|
+
G("design:paramtypes", []),
|
|
2008
|
+
G("design:returntype", void 0)
|
|
2009
|
+
], ue.prototype, "render", null);
|
|
2010
|
+
ue.style = At;
|
|
2011
|
+
const Mt = ".sc-people-icon-h{display:flex}", zt = Mt, jt = class {
|
|
2012
|
+
constructor(e) {
|
|
2013
|
+
p(this, e), this.width = "20", this.height = "20";
|
|
2014
|
+
}
|
|
2015
|
+
render() {
|
|
2016
|
+
return a("svg", { key: "66534381bbb0bc14b93a49ed0afdc81a917958d4", xmlns: "http://www.w3.org/2000/svg", width: this.width, height: this.height, fill: "none", viewBox: "0 0 20 20" }, a("path", { key: "2c7959434ba7dcf303b3c87d99b04b2818875c68", fill: "currentColor", d: "M11 10a2 2 0 0 1 2 2v1.5c0 2.054-2.088 3.5-5.5 3.5S2 15.554 2 13.5V12a2 2 0 0 1 2-2h7Zm0 1H4a1 1 0 0 0-1 1v1.5C3 14.907 4.579 16 7.5 16c2.921 0 4.5-1.093 4.5-2.5V12a1 1 0 0 0-1-1Zm5-1a2 2 0 0 1 2 2v.5c0 2.089-1.568 3.5-4.5 3.5-.141 0-.28-.003-.414-.01.208-.242.382-.502.522-.781l.097-.213h.039C15.976 14.931 17 13.96 17 12.5V12a1 1 0 0 0-1-1h-2.171a3 3 0 0 0-.594-1H16ZM7.5 2a3.5 3.5 0 1 1 0 7 3.5 3.5 0 0 1 0-7Zm7 2a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5Zm-7-1a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5Zm7 2a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Z" }));
|
|
2017
|
+
}
|
|
2018
|
+
};
|
|
2019
|
+
jt.style = zt;
|
|
2020
|
+
const Wt = ".radio-group{display:flex;flex-direction:column}.radio-group label{display:flex;font-family:var(--nylas-font-family);cursor:pointer}.radio-group label .radio-option{display:flex;align-items:flex-start;gap:0.5rem}.radio-group label .radio-option input[type=radio]{cursor:pointer}.radio-group label .radio-option input[type=radio i]{width:20px;height:20px;color:var(--nylas-primary);margin-top:16px}.radio-group label .radio-option p{display:flex;flex-direction:column;gap:0.5rem}.radio-group label .radio-option p .title{font-size:16px;font-weight:500;line-height:20px;color:var(--nylas-base-800)}.radio-group label .radio-option p .description{font-size:14px;font-weight:400;line-height:20px;color:var(--nylas-base-600)}", Bt = Wt, Zt = class {
|
|
2117
2021
|
constructor(e) {
|
|
2118
|
-
|
|
2022
|
+
p(this, e), this.radioSelectionChanged = u(this, "radioSelectionChanged", 7), this.name = "radio-group", this.options = [], this.defaultSelectedValue = "", this.selectedValue = this.defaultSelectedValue;
|
|
2119
2023
|
}
|
|
2120
2024
|
handleChange(e) {
|
|
2121
2025
|
this.selectedValue = e, this.radioSelectionChanged.emit({
|
|
@@ -2124,34 +2028,56 @@ const xn = ".radio-group{display:flex;flex-direction:column}.radio-group label{d
|
|
|
2124
2028
|
});
|
|
2125
2029
|
}
|
|
2126
2030
|
render() {
|
|
2127
|
-
return a("div", { key: "
|
|
2031
|
+
return a("div", { key: "985ed3b83d804748d61641feae65322fd08c1649", class: "radio-group" }, this.options.map((e) => a("label", null, a("div", { class: "radio-option" }, a("input", { type: "radio", name: this.name, value: e.value, checked: this.selectedValue === e.value, onChange: () => this.handleChange(e.value) }), a("p", null, a("span", { class: "title" }, e.label), a("span", { class: "description" }, e.description))))));
|
|
2032
|
+
}
|
|
2033
|
+
};
|
|
2034
|
+
Zt.style = Bt;
|
|
2035
|
+
const Ut = '.switch{--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;display:inline-block;height:34px;position:relative;width:60px}.switch input{display:none}.slider{background-color:var(--nylas-base-400);bottom:0;cursor:pointer;left:0;position:absolute;right:0;top:0;transition:0.4s}.slider:before{background-color:var(--nylas-base-0);bottom:4px;content:"";height:32px;left:4px;position:absolute;transition:0.4s;width:32px}input:checked+.slider{background-color:var(--nylas-success)}input:checked+.slider:before{transform:translateX(32px)}.slider.round{border-radius:35px;width:72px;height:40px}.slider.round:before{border-radius:50%}', Gt = Ut, Vt = class {
|
|
2036
|
+
constructor(e) {
|
|
2037
|
+
p(this, e), this.nylasFormSwitchToggled = u(this, "nylasFormSwitchToggled", 7), this.name = "toggle-switch", this.checked = !1, this.label = "", this.isChecked = this.checked;
|
|
2038
|
+
}
|
|
2039
|
+
componentWillLoad() {
|
|
2040
|
+
this.isChecked = this.checked;
|
|
2041
|
+
}
|
|
2042
|
+
toggleCheck() {
|
|
2043
|
+
this.isChecked = !this.isChecked, this.nylasFormSwitchToggled.emit({
|
|
2044
|
+
checked: this.isChecked,
|
|
2045
|
+
name: this.name,
|
|
2046
|
+
label: this.label
|
|
2047
|
+
});
|
|
2048
|
+
}
|
|
2049
|
+
render() {
|
|
2050
|
+
return a("label", { key: "d91b5d5853ab8a256953c4fde8a79b1ef739433d", class: "switch", part: "ts_label" }, a("input", { key: "6f694e5a07cefacc05e155a0319fe99ec1714354", type: "checkbox", part: "ts_input", name: this.name, checked: this.isChecked, onChange: () => this.toggleCheck() }), a("div", { key: "e2db848dbad679562201ba8151a523fa1b9dc2b9", class: "slider round", part: "ts_slider" }));
|
|
2128
2051
|
}
|
|
2129
2052
|
};
|
|
2130
|
-
|
|
2053
|
+
Vt.style = Gt;
|
|
2131
2054
|
export {
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2055
|
+
_e as calendar_info_icon,
|
|
2056
|
+
Ce as calendar_patterns_icon,
|
|
2057
|
+
Ie as checkbox_component,
|
|
2058
|
+
$e as flow_icon,
|
|
2059
|
+
Ee as location_icon,
|
|
2060
|
+
Pe as location_off_icon,
|
|
2061
|
+
Re as multi_select_dropdown,
|
|
2062
|
+
Y as nylas_additional_participants,
|
|
2063
|
+
Q as nylas_availability_picker,
|
|
2064
|
+
X as nylas_booking_calendar_picker,
|
|
2065
|
+
ee as nylas_buffer_time,
|
|
2066
|
+
te as nylas_calendar_picker,
|
|
2067
|
+
ne as nylas_cancellation_policy,
|
|
2068
|
+
ae as nylas_customize_booking_settings,
|
|
2069
|
+
ie as nylas_event_description,
|
|
2070
|
+
se as nylas_event_duration,
|
|
2071
|
+
le as nylas_event_info,
|
|
2072
|
+
oe as nylas_event_limits,
|
|
2073
|
+
re as nylas_event_location,
|
|
2074
|
+
de as nylas_event_title,
|
|
2075
|
+
ce as nylas_limit_future_bookings,
|
|
2076
|
+
pe as nylas_min_booking_notice,
|
|
2077
|
+
fe as nylas_min_cancellation_notice,
|
|
2078
|
+
be as nylas_participants_custom_availability,
|
|
2079
|
+
ue as nylas_timeslot_interval,
|
|
2080
|
+
jt as people_icon,
|
|
2081
|
+
Zt as radio_button_group,
|
|
2082
|
+
Vt as toggle_switch
|
|
2157
2083
|
};
|