@nylas/react 1.0.2-canary.2 → 1.1.0-canary.3
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_22.entry-8d0ac489.cjs +1 -0
- package/dist/{add-circle-icon_18.entry-f86ae88d.js → add-circle-icon_22.entry-da31fa71.js} +627 -421
- package/dist/{archive-icon_7.entry-052ac074.cjs → archive-icon_7.entry-7aad8104.cjs} +1 -1
- package/dist/{archive-icon_7.entry-0e34d6e7.js → archive-icon_7.entry-bc2418f7.js} +20 -20
- package/dist/{arrow-icon.entry-93f21385.cjs → arrow-icon.entry-6eba68a9.cjs} +1 -1
- package/dist/arrow-icon.entry-9a932082.js +15 -0
- package/dist/{bold-icon_3.entry-88ce1d25.js → bold-icon_3.entry-5f7e3755.js} +8 -8
- package/dist/bold-icon_3.entry-db17d481.cjs +1 -0
- package/dist/{calendar-cancel-icon.entry-e9c692fa.js → calendar-cancel-icon.entry-1ff7845a.js} +5 -5
- package/dist/{calendar-cancel-icon.entry-574c8aa4.cjs → calendar-cancel-icon.entry-a5141f82.cjs} +1 -1
- package/dist/{calendar-check-icon_2.entry-b0476bca.cjs → calendar-check-icon_2.entry-c3add652.cjs} +1 -1
- package/dist/{calendar-check-icon_2.entry-d461c713.js → calendar-check-icon_2.entry-d7421059.js} +6 -6
- package/dist/{calendar-icon.entry-1ca202a4.js → calendar-icon.entry-4458997f.js} +5 -5
- package/dist/{calendar-icon.entry-98936e6d.cjs → calendar-icon.entry-445d624a.cjs} +1 -1
- package/dist/chevron-icon_3.entry-8961e6bb.cjs +1 -0
- package/dist/chevron-icon_3.entry-f7f3d487.js +117 -0
- package/dist/close-icon.entry-6dd5ff0a.js +15 -0
- package/dist/close-icon.entry-ebc527c5.cjs +1 -0
- package/dist/{constants-b6bf6671-49a0f1f2.js → constants-6ee60d6d-4cd16450.js} +1 -1
- package/dist/{constants-b6bf6671-27e2557d.cjs → constants-6ee60d6d-6c0540db.cjs} +1 -1
- package/dist/document-refresh-icon.entry-298b2133.cjs +1 -0
- package/dist/{document-refresh-icon.entry-faea08ce.js → document-refresh-icon.entry-bdc323b5.js} +5 -5
- package/dist/elements/index.d.ts +7 -0
- package/dist/{forward-icon_6.entry-c4b37cb1.cjs → forward-icon_6.entry-15208ea9.cjs} +2 -2
- package/dist/{forward-icon_6.entry-8da1f65d.js → forward-icon_6.entry-62759373.js} +63 -63
- package/dist/{globe-icon.entry-4720304b.js → globe-icon.entry-9e082178.js} +2 -2
- package/dist/{globe-icon.entry-90a0b9c9.cjs → globe-icon.entry-c8302bf5.cjs} +1 -1
- package/dist/google-logo-icon_3.entry-0c095209.js +258 -0
- package/dist/google-logo-icon_3.entry-f8433ff9.cjs +1 -0
- package/dist/index-0f3bd8df.js +1824 -0
- package/dist/index-7a55dc33.cjs +30 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.es-2578c6a5-098d48d0.cjs +7 -0
- package/dist/{index-10914bc1-346f04fa.js → index.es-2578c6a5-71441142.js} +833 -933
- package/dist/{info-icon_2.entry-9307db18.js → info-icon_2.entry-73106882.js} +5 -5
- package/dist/{info-icon_2.entry-81e95048.cjs → info-icon_2.entry-ca224a3b.cjs} +1 -1
- package/dist/loading-icon.entry-012644b7.js +15 -0
- package/dist/loading-icon.entry-f9f5e66f.cjs +1 -0
- package/dist/mailbox-store-bb21512c-045c3ea0.cjs +1 -0
- package/dist/{mailbox-store-e721b17c-cf9a43dd.js → mailbox-store-bb21512c-615660ef.js} +125 -62
- package/dist/nylas-additional-participants.entry-a50ef8e2.cjs +1 -0
- package/dist/{nylas-additional-participants.entry-1653dec7.js → nylas-additional-participants.entry-db85836a.js} +13 -13
- package/dist/{nylas-booked-event-card_10.entry-aa971e8a.js → nylas-booked-event-card_10.entry-b49b2369.js} +26 -26
- package/dist/nylas-booked-event-card_10.entry-fccb783c.cjs +1 -0
- package/dist/nylas-form-card.entry-090a4d3b.js +56 -0
- package/dist/nylas-form-card.entry-f5230005.cjs +1 -0
- package/dist/nylas-if-state.entry-7924dde0.js +96 -0
- package/dist/nylas-if-state.entry-ff9c9a85.cjs +1 -0
- package/dist/{nylas-list-folders.entry-995fa819.js → nylas-list-folders.entry-9dd96530.js} +4 -4
- package/dist/{nylas-list-folders.entry-3b24d92d.cjs → nylas-list-folders.entry-dbfc2cf8.cjs} +1 -1
- package/dist/{nylas-list-threads.entry-fda42ded.cjs → nylas-list-threads.entry-6bcc0328.cjs} +1 -1
- package/dist/{nylas-list-threads.entry-21466eb3.js → nylas-list-threads.entry-b435eaae.js} +6 -6
- package/dist/nylas-login.entry-1623d309.cjs +1 -0
- package/dist/nylas-login.entry-97350c76.js +75 -0
- package/dist/{nylas-mailbox-pagination.entry-9dcd4901.cjs → nylas-mailbox-pagination.entry-1776eb16.cjs} +1 -1
- package/dist/{nylas-mailbox-pagination.entry-02d40186.js → nylas-mailbox-pagination.entry-ceef8be2.js} +3 -3
- package/dist/{nylas-mailbox-toolbar-button.entry-d1099fab.cjs → nylas-mailbox-toolbar-button.entry-7d3f79b9.cjs} +1 -1
- package/dist/{nylas-mailbox-toolbar-button.entry-dbad44b4.js → nylas-mailbox-toolbar-button.entry-e6b3d3a4.js} +10 -10
- package/dist/nylas-mailbox.entry-06d8014a.js +136 -0
- package/dist/nylas-mailbox.entry-ae8da6ff.cjs +1 -0
- package/dist/{nylas-provider.entry-bbee8c99.js → nylas-provider.entry-8b9c2b69.js} +50 -58
- package/dist/nylas-provider.entry-97c9e272.cjs +1 -0
- package/dist/nylas-scheduler-editor.entry-c3791787.js +2181 -0
- package/dist/nylas-scheduler-editor.entry-f6cf1cd9.cjs +7 -0
- package/dist/nylas-scheduling.entry-08ae840a.cjs +1 -0
- package/dist/{nylas-scheduling.entry-22b5ad07.js → nylas-scheduling.entry-6380509a.js} +39 -38
- package/dist/{nylas-threads-refresh.entry-05258b36.cjs → nylas-threads-refresh.entry-246e6d77.cjs} +1 -1
- package/dist/{nylas-threads-refresh.entry-414d8740.js → nylas-threads-refresh.entry-eaee86fb.js} +5 -5
- package/dist/nylas-threads-search.entry-42a2acb1.cjs +1 -0
- package/dist/{nylas-threads-search.entry-a19dc90f.js → nylas-threads-search.entry-7e12758e.js} +7 -7
- package/dist/{nylas-view-thread.entry-5da81e99.cjs → nylas-view-thread.entry-78e6927a.cjs} +1 -1
- package/dist/{nylas-view-thread.entry-38149162.js → nylas-view-thread.entry-b936e76a.js} +4 -4
- package/dist/{people-icon.entry-5c244c8d.js → people-icon.entry-5c8ee696.js} +5 -5
- package/dist/{people-icon.entry-4b682757.cjs → people-icon.entry-bcf848c0.cjs} +1 -1
- package/dist/play-icon_2.entry-356e63cc.js +25 -0
- package/dist/play-icon_2.entry-92e78f1b.cjs +1 -0
- package/dist/react.cjs +1 -1
- package/dist/react.js +84 -75
- package/dist/{refresh-icon.entry-63456c9a.js → refresh-icon.entry-77f0c377.js} +2 -2
- package/dist/{refresh-icon.entry-59fff3d4.cjs → refresh-icon.entry-bec053b6.cjs} +1 -1
- package/dist/{register-component-d056a880-f3003d6c.js → register-component-dc659dc3-0fdb18dc.js} +2 -2
- package/dist/{register-component-d056a880-2be11c56.cjs → register-component-dc659dc3-f58bf25b.cjs} +1 -1
- package/dist/scheduler-config-store-51ee4f42-ce3a9b0e.cjs +1 -0
- package/dist/scheduler-config-store-51ee4f42-e02895da.js +14 -0
- package/dist/{scheduler-store-0fbe642c-14466305.js → scheduler-store-72116723-3ba2480c.js} +3 -2
- package/dist/scheduler-store-72116723-db9d91f6.cjs +1 -0
- package/dist/time-period-selector.entry-decd251b.js +78 -0
- package/dist/time-period-selector.entry-f25fad77.cjs +1 -0
- package/dist/{translate-icon.entry-35999e70.js → translate-icon.entry-cac02c46.js} +2 -2
- package/dist/{translate-icon.entry-1784c18e.cjs → translate-icon.entry-dd5b707c.cjs} +1 -1
- package/dist/{warning-icon.entry-73de08c3.js → warning-icon.entry-370b9cf0.js} +4 -4
- package/dist/{warning-icon.entry-3a702d1d.cjs → warning-icon.entry-8af8a742.cjs} +1 -1
- package/package.json +3 -3
- package/dist/add-circle-icon_18.entry-b66b6343.cjs +0 -1
- package/dist/arrow-icon.entry-2afd9ea9.js +0 -15
- package/dist/auth-store-69ac49c7-5a0bbb90.cjs +0 -1
- package/dist/auth-store-69ac49c7-cbfda055.js +0 -66
- package/dist/bold-icon_3.entry-8f55a9e7.cjs +0 -1
- package/dist/chevron-icon_3.entry-830f52c2.js +0 -105
- package/dist/chevron-icon_3.entry-f7801467.cjs +0 -1
- package/dist/close-icon.entry-37e8361f.js +0 -15
- package/dist/close-icon.entry-8d6e9816.cjs +0 -1
- package/dist/document-refresh-icon.entry-fcb33921.cjs +0 -1
- package/dist/index-10914bc1-c8c3a2f3.cjs +0 -7
- package/dist/index-457dcf0b.cjs +0 -30
- package/dist/index-ce40ad47.js +0 -1570
- package/dist/loading-icon.entry-06d37ef0.cjs +0 -1
- package/dist/loading-icon.entry-dc518df4.js +0 -15
- package/dist/mailbox-store-e721b17c-4e97e07d.cjs +0 -1
- package/dist/nylas-additional-participants.entry-ff8bf378.cjs +0 -1
- package/dist/nylas-booked-event-card_10.entry-06bc3c51.cjs +0 -1
- package/dist/nylas-editor-tabs.entry-49b5a3ab.cjs +0 -1
- package/dist/nylas-editor-tabs.entry-9d0959bf.js +0 -181
- package/dist/nylas-form-card.entry-69d2095b.cjs +0 -1
- package/dist/nylas-form-card.entry-c4e78f88.js +0 -56
- package/dist/nylas-if-state_3.entry-2eb3f385.js +0 -293
- package/dist/nylas-if-state_3.entry-5baf6d6f.cjs +0 -1
- package/dist/nylas-provider.entry-78e2fa30.cjs +0 -1
- package/dist/nylas-scheduler-editor.entry-550d3c59.cjs +0 -1
- package/dist/nylas-scheduler-editor.entry-8f7ecf3b.js +0 -111
- package/dist/nylas-scheduling.entry-30a63738.cjs +0 -1
- package/dist/nylas-threads-search.entry-ff21fc65.cjs +0 -1
- package/dist/play-icon_2.entry-ccdc6b9c.cjs +0 -1
- package/dist/play-icon_2.entry-f36d6d55.js +0 -25
- package/dist/scheduler-config-store-4d035001-0256b40c.cjs +0 -1
- package/dist/scheduler-config-store-4d035001-db9dc78a.js +0 -33
- package/dist/scheduler-store-0fbe642c-410fdbf4.cjs +0 -1
- /package/dist/{utils-0cd66d04-89ab163d.js → utils-c00bdc3c-89ab163d.js} +0 -0
- /package/dist/{utils-0cd66d04-94b9c3b6.cjs → utils-c00bdc3c-94b9c3b6.cjs} +0 -0
|
@@ -1,67 +1,77 @@
|
|
|
1
|
-
import { r as
|
|
2
|
-
import { d, o as
|
|
3
|
-
import { R as
|
|
4
|
-
import { T as
|
|
5
|
-
import { c as
|
|
1
|
+
import { r as y, h as a, c as w, H as k, g as x } from "./index-0f3bd8df.js";
|
|
2
|
+
import { d, o as j, q as H, r as ve, s as V, v as ae, w as ie, x as ke, y as we, z as W, A as We } from "./utils-c00bdc3c-89ab163d.js";
|
|
3
|
+
import { R as _ } from "./register-component-dc659dc3-0fdb18dc.js";
|
|
4
|
+
import { T as xe, E as _e } from "./constants-6ee60d6d-4cd16450.js";
|
|
5
|
+
import { c as Ve } from "./_commonjsHelpers-57e89916-af061c86.js";
|
|
6
6
|
import "react";
|
|
7
7
|
import "react-dom";
|
|
8
|
-
const
|
|
8
|
+
const Ue = ".sc-add-circle-icon-h{display:flex}", Ze = Ue, Ye = class {
|
|
9
9
|
constructor(e) {
|
|
10
|
-
|
|
10
|
+
y(this, e), this.width = "24", this.height = "25";
|
|
11
11
|
}
|
|
12
12
|
render() {
|
|
13
|
-
return a("svg", { key: "
|
|
13
|
+
return a("svg", { key: "f3782ba9b526dffdc7335be8e63861fd3b99588f", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, a("path", { key: "f882c2d15fc67cc99d93f748e2917eb7a675655d", d: "M12 2.5c5.523 0 10 4.477 10 10s-4.477 10-10 10-10-4.477-10-10 4.477-10 10-10ZM12 4a8.5 8.5 0 1 0 0 17 8.5 8.5 0 0 0 0-17Zm0 3.5a.75.75 0 0 1 .75.75v3.5h3.5a.75.75 0 0 1 0 1.5h-3.5v3.5a.75.75 0 0 1-1.5 0v-3.5h-3.5a.75.75 0 0 1 0-1.5h3.5v-3.5A.75.75 0 0 1 12 7.5Z", fill: "currentColor" }));
|
|
14
14
|
}
|
|
15
15
|
};
|
|
16
|
-
|
|
17
|
-
const
|
|
16
|
+
Ye.style = Ze;
|
|
17
|
+
const Ke = "button.sc-button-component{height:48px;border:none;border-radius:var(--nylas-border-radius-2x);font-size:1rem;line-height:24px;padding:0 1rem;cursor:pointer;font-family:var(--nylas-font-family);font-weight:600}button.button-primary.sc-button-component{background:var(--nylas-primary);color:var(--nylas-base-0);height:48px;border:none;border-radius:var(--nylas-border-radius-2x);font-size:1rem;line-height:24px;padding:0 1rem;cursor:pointer}button.button-primary.sc-button-component:hover{background:var(--nylas-base-600)}button.button-primary.sc-button-component:active{background:var(--nylas-base-800)}button.button-primary.sc-button-component:disabled{background:var(--nylas-base-300);cursor:not-allowed}button.button-basic.sc-button-component{border:1px solid var(--nylas-base-300);color:var(--nylas-base-700);background:transparent}button.button-basic.sc-button-component:hover{background:transparent;border-color:var(--nylas-primary)}button.button-basic.sc-button-component:active{background:transparent;border-color:var(--nylas-base-600);border-width:2px}button.button-basic.sc-button-component:disabled{background:transparent;border-color:var(--nylas-base-300);color:var(--nylas-base-300);cursor:not-allowed}button.button-destructive.sc-button-component{border:1px solid var(--nylas-base-300);color:var(--nylas-error);background:transparent}button.button-destructive.sc-button-component:hover{background:transparent;border-color:var(--nylas-error)}button.button-destructive.sc-button-component:active{background:transparent;border-color:var(--nylas-error-pressed);border-width:2px;color:var(--nylas-error-pressed)}button.button-destructive.sc-button-component:disabled{background:transparent;border-color:var(--nylas-base-300);color:var(--nylas-base-300);cursor:not-allowed}", qe = Ke, Je = class {
|
|
18
18
|
constructor(e) {
|
|
19
|
-
|
|
19
|
+
y(this, e), this.variant = "primary", this.disabled = !1, this.type = "button", this.clickHandler = void 0, this.mouseOverHandler = void 0, this.mouseOutHandler = void 0, this.focusHandler = void 0, this.blurHandler = void 0;
|
|
20
20
|
}
|
|
21
21
|
render() {
|
|
22
|
-
|
|
22
|
+
const e = `button-${this.variant}` + (this.disabled ? " disabled" : "");
|
|
23
|
+
return a("button", { key: "cfd8e89f59f914245d2c8c8c78476a36d27da859", class: e, disabled: this.disabled, type: "type", onClick: this.clickHandler, onMouseOver: this.mouseOverHandler, onMouseOut: this.mouseOutHandler, onFocus: this.focusHandler, onBlur: this.blurHandler }, a("slot", { key: "4535ee0ad60500247597e0bc127634b04dbe560e" }));
|
|
23
24
|
}
|
|
24
25
|
};
|
|
25
|
-
|
|
26
|
-
const
|
|
26
|
+
Je.style = qe;
|
|
27
|
+
const Ge = ".sc-calendar-info-icon-h{display:flex}", Xe = Ge, Qe = class {
|
|
27
28
|
constructor(e) {
|
|
28
|
-
|
|
29
|
+
y(this, e), this.width = "20", this.height = "20";
|
|
29
30
|
}
|
|
30
31
|
render() {
|
|
31
|
-
return a("svg", { key: "
|
|
32
|
+
return a("svg", { key: "a81da147ac49427181db4dddb65aec3a24224ef7", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, a("path", { key: "95ead56b8fdb4b038cc1811615ffb5117f146920", 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" }));
|
|
32
33
|
}
|
|
33
34
|
};
|
|
34
|
-
|
|
35
|
-
const
|
|
35
|
+
Qe.style = Xe;
|
|
36
|
+
const et = ".sc-calendar-patterns-icon-h{display:flex}", tt = et, nt = class {
|
|
36
37
|
constructor(e) {
|
|
37
|
-
|
|
38
|
+
y(this, e), this.width = "20", this.height = "20";
|
|
38
39
|
}
|
|
39
40
|
render() {
|
|
40
|
-
return a("svg", { key: "
|
|
41
|
+
return a("svg", { key: "240e5d737e5c6e987cae5c658dfbb6f60eec94c9", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, a("path", { key: "7247ab8bb25c0b25173b6acf384866da1a07b59b", 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" }));
|
|
41
42
|
}
|
|
42
43
|
};
|
|
43
|
-
|
|
44
|
-
const
|
|
44
|
+
nt.style = tt;
|
|
45
|
+
const at = ".sc-flow-icon-h{display:flex}", it = at, st = class {
|
|
45
46
|
constructor(e) {
|
|
46
|
-
|
|
47
|
+
y(this, e), this.width = "16", this.height = "12";
|
|
47
48
|
}
|
|
48
49
|
render() {
|
|
49
|
-
return a("svg", { key: "
|
|
50
|
+
return a("svg", { key: "64cf30f0de8e94ba60072d0b1b36caa28b5123fa", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, a("path", { key: "5af4e418bffe3e59f56d8a9831b3b80b8e45248f", 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" }));
|
|
50
51
|
}
|
|
51
52
|
};
|
|
52
|
-
|
|
53
|
-
const
|
|
53
|
+
st.style = it;
|
|
54
|
+
const ot = ".sc-location-icon-h{display:flex}", lt = ot, rt = class {
|
|
54
55
|
constructor(e) {
|
|
55
|
-
|
|
56
|
+
y(this, e), this.width = "16", this.height = "18";
|
|
56
57
|
}
|
|
57
58
|
render() {
|
|
58
|
-
return a("svg", { key: "
|
|
59
|
+
return a("svg", { key: "99aeec9d05c84b5b625d6dde77e639b66da0ba74", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, a("path", { key: "20ab637f3fb7ba64b1bf145f6a8308632d6ceaa4", 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" }));
|
|
59
60
|
}
|
|
60
61
|
};
|
|
61
|
-
|
|
62
|
-
const
|
|
62
|
+
rt.style = lt;
|
|
63
|
+
const dt = ".sc-location-off-icon-h{display:flex}", ct = dt, ft = class {
|
|
63
64
|
constructor(e) {
|
|
64
|
-
|
|
65
|
+
y(this, e), this.width = "16", this.height = "18";
|
|
66
|
+
}
|
|
67
|
+
render() {
|
|
68
|
+
return a("svg", { key: "6ff327f807c0b46549b39b02a5f04e46bdfddfdc", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, a("path", { key: "4802054ea26248eaf04c81ed9eeaca8c7535c4bf", 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
|
+
}
|
|
70
|
+
};
|
|
71
|
+
ft.style = ct;
|
|
72
|
+
const pt = ':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)}', bt = pt, ut = class {
|
|
73
|
+
constructor(e) {
|
|
74
|
+
y(this, e), this.selectedOptionsChanged = w(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;
|
|
65
75
|
}
|
|
66
76
|
componentDidRender() {
|
|
67
77
|
d("multi-select-dropdown", "componentDidRender"), this.isOpen && this.shouldFocusFirstOption && (this.ariaActivedescendant = this.availableOptions[0].value, this.focusOption(0), this.shouldFocusFirstOption = !1);
|
|
@@ -98,12 +108,12 @@ const at = ':host{display:block;width:inherit;--nylas-primary:#2563eb;--nylas-er
|
|
|
98
108
|
case "Tab":
|
|
99
109
|
if (e.shiftKey) {
|
|
100
110
|
e.preventDefault();
|
|
101
|
-
const
|
|
102
|
-
this.ariaActivedescendant = t[
|
|
111
|
+
const o = n - 1 >= 0 ? n - 1 : t.length - 1;
|
|
112
|
+
this.ariaActivedescendant = t[o].value, this.focusOption(o);
|
|
103
113
|
} else {
|
|
104
114
|
e.preventDefault();
|
|
105
|
-
const
|
|
106
|
-
this.ariaActivedescendant = t[
|
|
115
|
+
const o = n + 1 < t.length ? n + 1 : 0;
|
|
116
|
+
this.ariaActivedescendant = t[o].value, this.focusOption(o);
|
|
107
117
|
}
|
|
108
118
|
break;
|
|
109
119
|
case "ArrowUp":
|
|
@@ -120,11 +130,11 @@ const at = ':host{display:block;width:inherit;--nylas-primary:#2563eb;--nylas-er
|
|
|
120
130
|
}
|
|
121
131
|
}
|
|
122
132
|
focusOption(e) {
|
|
123
|
-
var
|
|
133
|
+
var o;
|
|
124
134
|
const t = this.availableOptions[e];
|
|
125
135
|
if (!t)
|
|
126
136
|
return;
|
|
127
|
-
const n = t.value, s = (
|
|
137
|
+
const n = t.value, s = (o = this.el.shadowRoot) == null ? void 0 : o.getElementById(n);
|
|
128
138
|
s && (s.focus(), s.scrollIntoView({ behavior: "smooth", block: "nearest" }));
|
|
129
139
|
}
|
|
130
140
|
getSelectedOptions() {
|
|
@@ -137,29 +147,29 @@ const at = ':host{display:block;width:inherit;--nylas-primary:#2563eb;--nylas-er
|
|
|
137
147
|
}
|
|
138
148
|
render() {
|
|
139
149
|
var e, t;
|
|
140
|
-
return a(k, { key: "
|
|
150
|
+
return a(k, { key: "1cd6593ab9c3fba5bd85b4c6c3b72b5c02d56a06" }, a("div", { key: "4824791de73b31be01c7801569564c8444e14d25", class: "dropdown", part: "msd_dropdown" }, a("label", { key: "9cfb0b87aa5f514d2030ddb0b7f3a53d49ed623a", class: "dropdown-label" }, this.label, a("slot", { key: "e3e3db4816a4599b82ad9802b50540e4d5029ffe", name: "label-icon", "aria-hidden": "true" })), a("button", { key: "b00feb7b276c455987f5e9d957eecb88ba3bc65e", 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: "e0abc205d785aaada5884a21e0b94f02828ba09c", name: "select-icon", "aria-hidden": "true" }), a("span", { key: "9c69fcf904171f8cd7129dcf65d00e4ac2e72c4a", 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: "71f33e2a554531bb2cb498f857157bdaa28facea", class: this.isOpen ? "open" : "closed", "aria-hidden": "true" }, a("chevron-icon", { key: "0f418f723c61306bfa1efb8a5934957d211f3fce", 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));
|
|
141
151
|
}
|
|
142
152
|
get el() {
|
|
143
|
-
return
|
|
153
|
+
return x(this);
|
|
144
154
|
}
|
|
145
155
|
};
|
|
146
|
-
|
|
147
|
-
const
|
|
148
|
-
var
|
|
149
|
-
var
|
|
156
|
+
ut.style = bt;
|
|
157
|
+
const ht = ':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;border-bottom:1px solid var(--nylas-base-200)}.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)}@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 .select-timezone select-dropdown{border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}.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)}', mt = ht;
|
|
158
|
+
var yt = function(e, t, n, s) {
|
|
159
|
+
var o = arguments.length, i = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, n) : s, l;
|
|
150
160
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
151
161
|
i = Reflect.decorate(e, t, n, s);
|
|
152
162
|
else
|
|
153
163
|
for (var r = e.length - 1; r >= 0; r--)
|
|
154
|
-
(
|
|
155
|
-
return
|
|
164
|
+
(l = e[r]) && (i = (o < 3 ? l(i) : o > 3 ? l(t, n, i) : l(t, n)) || i);
|
|
165
|
+
return o > 3 && i && Object.defineProperty(t, n, i), i;
|
|
156
166
|
}, se = function(e, t) {
|
|
157
167
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
158
168
|
return Reflect.metadata(e, t);
|
|
159
169
|
};
|
|
160
|
-
const
|
|
170
|
+
const Ce = class {
|
|
161
171
|
constructor(e) {
|
|
162
|
-
|
|
172
|
+
y(this, e), this.valueChanged = w(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.openHours = void 0, this.name = "availability", this.defaultTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone, this.schedule = {
|
|
163
173
|
SUN: [],
|
|
164
174
|
MON: [{ start: "09:00am", end: "05:00pm" }],
|
|
165
175
|
TUE: [{ start: "09:00am", end: "05:00pm" }],
|
|
@@ -180,17 +190,17 @@ const xe = class {
|
|
|
180
190
|
name: this.name
|
|
181
191
|
});
|
|
182
192
|
let s = {};
|
|
183
|
-
if (Object.keys(e).forEach((
|
|
184
|
-
const i = e[
|
|
193
|
+
if (Object.keys(e).forEach((o) => {
|
|
194
|
+
const i = e[o];
|
|
185
195
|
if (i.length > 0) {
|
|
186
|
-
const
|
|
187
|
-
|
|
196
|
+
const l = this.getOverlaps(i);
|
|
197
|
+
l.length > 0 && (s[o] = l);
|
|
188
198
|
}
|
|
189
199
|
}), this.overlapDays = s, typeof this.internals.setFormValue != "function")
|
|
190
200
|
return;
|
|
191
201
|
if (Object.keys(s).length > 0) {
|
|
192
|
-
const
|
|
193
|
-
|
|
202
|
+
const o = (n = this.host.shadowRoot) == null ? void 0 : n.getElementById(Object.keys(s)[0]);
|
|
203
|
+
o && this.internals.setValidity({ customError: !0 }, "Overlapping time ranges found", o);
|
|
194
204
|
} else
|
|
195
205
|
this.internals.setValidity({ customError: !1 }), this.internals.setFormValue(JSON.stringify(this.scheduleToOpenHours(e, this.timezone)));
|
|
196
206
|
}
|
|
@@ -216,62 +226,62 @@ const xe = class {
|
|
|
216
226
|
d("nylas-availability-picker", "componentDidLoad"), this.openHours && this.openHours.length > 0 && this.updateSchedule(this.openHours), typeof this.internals.setFormValue == "function" && this.internals.setFormValue(JSON.stringify(this.scheduleToOpenHours(this.schedule, this.timezone)));
|
|
217
227
|
}
|
|
218
228
|
getOverlaps(e) {
|
|
219
|
-
let t = e.map((s,
|
|
220
|
-
start:
|
|
221
|
-
end:
|
|
222
|
-
originalIndex:
|
|
229
|
+
let t = e.map((s, o) => ({
|
|
230
|
+
start: j(s.start),
|
|
231
|
+
end: j(s.end),
|
|
232
|
+
originalIndex: o
|
|
223
233
|
}));
|
|
224
|
-
t.sort((s,
|
|
234
|
+
t.sort((s, o) => s.start - o.start);
|
|
225
235
|
let n = [];
|
|
226
236
|
for (let s = 1; s < t.length; s++)
|
|
227
237
|
t[s].start < t[s - 1].end && (n.includes(t[s].originalIndex) || n.push(t[s].originalIndex), n.includes(t[s - 1].originalIndex) || n.push(t[s - 1].originalIndex));
|
|
228
|
-
return n.sort((s,
|
|
238
|
+
return n.sort((s, o) => s - o);
|
|
229
239
|
}
|
|
230
240
|
addTimeRange(e) {
|
|
231
241
|
const t = this.schedule[e], n = 0, s = 1425;
|
|
232
242
|
if (t.length === 0)
|
|
233
243
|
this.schedule[e] = [{ start: "09:00am", end: "05:00pm" }];
|
|
234
244
|
else {
|
|
235
|
-
const
|
|
236
|
-
start:
|
|
237
|
-
end:
|
|
238
|
-
})).sort((
|
|
245
|
+
const o = t.map((l) => ({
|
|
246
|
+
start: j(l.start),
|
|
247
|
+
end: j(l.end)
|
|
248
|
+
})).sort((l, r) => l.start - r.start), i = o[o.length - 1].end;
|
|
239
249
|
if (i + 60 <= s)
|
|
240
250
|
this.schedule[e].push({
|
|
241
|
-
start:
|
|
242
|
-
end:
|
|
251
|
+
start: H(W(i)),
|
|
252
|
+
end: H(W(i + 60))
|
|
243
253
|
});
|
|
244
254
|
else {
|
|
245
|
-
let
|
|
246
|
-
if (
|
|
247
|
-
start:
|
|
248
|
-
end:
|
|
249
|
-
}),
|
|
250
|
-
for (let r = 0; r <
|
|
251
|
-
const
|
|
252
|
-
if (
|
|
255
|
+
let l = !1;
|
|
256
|
+
if (o[0].start > n + 60 && (this.schedule[e].push({
|
|
257
|
+
start: H(W(n)),
|
|
258
|
+
end: H(W(n + 60))
|
|
259
|
+
}), l = !0), !l)
|
|
260
|
+
for (let r = 0; r < o.length - 1; r++) {
|
|
261
|
+
const b = o[r].end;
|
|
262
|
+
if (o[r + 1].start - b >= 60) {
|
|
253
263
|
this.schedule[e].push({
|
|
254
|
-
start:
|
|
255
|
-
end:
|
|
264
|
+
start: H(W(b)),
|
|
265
|
+
end: H(W(b + 60))
|
|
256
266
|
});
|
|
257
267
|
break;
|
|
258
268
|
}
|
|
259
269
|
}
|
|
260
270
|
}
|
|
261
271
|
}
|
|
262
|
-
this.schedule[e].sort((
|
|
272
|
+
this.schedule[e].sort((o, i) => j(o.start) - j(i.start)), this.schedule = { ...this.schedule };
|
|
263
273
|
}
|
|
264
274
|
removeTimeRange(e, t) {
|
|
265
275
|
this.schedule[e].splice(t, 1), this.schedule = { ...this.schedule };
|
|
266
276
|
}
|
|
267
277
|
setTime(e, t, n) {
|
|
268
|
-
const [s,
|
|
269
|
-
|
|
278
|
+
const [s, o] = e.split("_"), [i, l] = s.split(":");
|
|
279
|
+
o === "start" ? this.schedule[i][l].start = n : o === "end" && (this.schedule[i][l].end = n), this.internals.setValidity({ customError: !1 }), this.schedule = { ...this.schedule };
|
|
270
280
|
}
|
|
271
281
|
setFormError(e, t, n) {
|
|
272
|
-
var
|
|
273
|
-
const [s,
|
|
274
|
-
i && this.internals.setValidity({ customError: !0 }, `Invalid ${
|
|
282
|
+
var l;
|
|
283
|
+
const [s, o] = e.split("_"), i = (l = this.host.shadowRoot) == null ? void 0 : l.getElementById(e);
|
|
284
|
+
i && this.internals.setValidity({ customError: !0 }, `Invalid ${o} time`, i);
|
|
275
285
|
}
|
|
276
286
|
updateSchedule(e) {
|
|
277
287
|
const t = {
|
|
@@ -285,9 +295,9 @@ const xe = class {
|
|
|
285
295
|
};
|
|
286
296
|
e.forEach((n) => {
|
|
287
297
|
n.days.forEach((s) => {
|
|
288
|
-
const
|
|
289
|
-
let
|
|
290
|
-
t[
|
|
298
|
+
const o = this.getDayKey(s), i = H(n.start), l = H(n.end), r = { start: i, end: l };
|
|
299
|
+
let b = !1;
|
|
300
|
+
t[o] && (b = t[o].some((f) => f.start === r.start && f.end === r.end)), b || (t[o] ? t[o].push(r) : t[o] = [r]);
|
|
291
301
|
});
|
|
292
302
|
}), e.length === 0 && (this.timezone = e[0].timezone), this.timezone = e[0].timezone, this.schedule = t;
|
|
293
303
|
}
|
|
@@ -297,48 +307,48 @@ const xe = class {
|
|
|
297
307
|
scheduleToOpenHours(e, t = "UTC") {
|
|
298
308
|
const n = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"];
|
|
299
309
|
let s = /* @__PURE__ */ new Map();
|
|
300
|
-
n.forEach((i,
|
|
310
|
+
n.forEach((i, l) => {
|
|
301
311
|
e[i] && e[i].forEach((r) => {
|
|
302
|
-
const
|
|
303
|
-
if (!s.has(
|
|
304
|
-
s.set(
|
|
312
|
+
const b = ve(r.start), f = ve(r.end), h = `${b}-${f}`;
|
|
313
|
+
if (!s.has(h))
|
|
314
|
+
s.set(h, { days: [l], start: b, end: f });
|
|
305
315
|
else {
|
|
306
|
-
let p = s.get(
|
|
307
|
-
p && (p.days.push(
|
|
316
|
+
let p = s.get(h);
|
|
317
|
+
p && (p.days.push(l), s.set(h, p));
|
|
308
318
|
}
|
|
309
319
|
});
|
|
310
320
|
});
|
|
311
|
-
let
|
|
312
|
-
return s.forEach((i,
|
|
313
|
-
|
|
321
|
+
let o = [];
|
|
322
|
+
return s.forEach((i, l) => {
|
|
323
|
+
o.push({
|
|
314
324
|
days: i.days,
|
|
315
325
|
start: i.start,
|
|
316
326
|
end: i.end,
|
|
317
327
|
timezone: t
|
|
318
328
|
});
|
|
319
|
-
}),
|
|
329
|
+
}), o;
|
|
320
330
|
}
|
|
321
331
|
render() {
|
|
322
|
-
const e = Object.keys(
|
|
323
|
-
label:
|
|
332
|
+
const e = Object.keys(xe).map((t) => ({
|
|
333
|
+
label: xe[t],
|
|
324
334
|
value: t
|
|
325
335
|
}));
|
|
326
|
-
return a(k, { key: "
|
|
336
|
+
return a(k, { key: "440dc2f314a9c47eb8186f4ed965ed3052301ddf" }, a("div", { key: "2d31ef10ae53275fc065f4e9f68c32f42b60d829", class: "nylas-availability-picker" }, a("div", { key: "aa6695b6054b81ece7ede5f5e089545a041800f6", class: "header", part: "nap__header" }, a("h3", { key: "86e0d18ca7b70d74159c5cead0d6f5a17a145fa7" }, "General availability"), a("p", { key: "05da67e03befbe936793af5ee98f801b512d28e7" }, "Set your availability for scheduling meetings.")), a("div", { key: "84c6bf714ccea4aff07d6e660d8ca3f96ce9a8cc", class: "content" }, a("div", { key: "16edf74e06bed5440df5f5ea73e90cfa83d08b29", class: "select-timezone", part: "nap__select-timezone" }, a("h4", { key: "1025677efcaf114cb86ce57324c299eeea79b37e", class: "sub-header" }, "Select timezone", a("span", { key: "6d65a6457da202c5a3d5c5cd4e185903a12cec7f", class: "icon" }, a("tooltip-component", { key: "61a40ea06c06f1d306a8b352d9ae883d09768249" }, a("info-icon", { key: "2d447cc2e6a619ee7b1cf1fd3e2b6424fcd6db5b", slot: "tooltip-icon" }), a("span", { key: "35742354ba0841bc1c17170094bab09d536208e6", slot: "tooltip-content" }, "Select your timezone for displaying availability.")))), a("select-dropdown", { key: "3532c95b077fc701cdbf89cd13668acc675cf0e4", 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: "c1e870c593966e29d72c3f519f3309f84e4b9a9a", slot: "select-icon" }, a("globe-icon", { key: "df23e31168778926b6118651cd636ab801f062f1", width: "20", height: "20" })))), a("div", { key: "5ad8cf7078dc104d1258f77e1c69bebf8c82d8dd", class: "availability", part: "nap__availability" }, Object.keys(this.schedule).map((t) => {
|
|
327
337
|
const n = t, s = this.schedule[t];
|
|
328
|
-
return a("div", { class: "availability-day" }, a("div", { class: "day", part: "
|
|
338
|
+
return a("div", { class: "availability-day" }, a("div", { class: "day", part: "nap__day" }, a("input", { type: "checkbox", name: n, id: n, checked: s.length > 0, onClick: () => {
|
|
329
339
|
s.length > 0 ? this.schedule[n] = [] : this.schedule[n] = [{ start: "09:00am", end: "05:00pm" }], this.schedule = { ...this.schedule };
|
|
330
|
-
} }), a("label", { htmlFor: n, "aria-label": "Select day" }, n)), a("div", { class: "time-ranges" }, s.length ? null : a("span", { class: "unavailable" }, "Unavailable"), s.length > 0 && s.map((
|
|
331
|
-
var
|
|
332
|
-
const
|
|
333
|
-
return a("div", { class: "time-range" }, a("div", { class: "pickers" }, a("nylas-time-window-picker", { id:
|
|
334
|
-
}), a("p", { class: "error" }, this.overlapDays[n] ? "Overlapping time ranges" : "")), a("div", null, s.length > 0 ? a("button", { onClick: () => this.addTimeRange(n) }, a("add-circle-icon", null)) : null));
|
|
340
|
+
} }), a("label", { htmlFor: n, "aria-label": "Select day" }, n)), a("div", { class: "time-ranges", part: "nap__time-ranges" }, s.length ? null : a("span", { class: "unavailable" }, "Unavailable"), s.length > 0 && s.map((o, i) => {
|
|
341
|
+
var b, f;
|
|
342
|
+
const l = `${t}:${i}_start`, r = `${t}:${i}_end`;
|
|
343
|
+
return a("div", { class: "time-range", part: "nap__time-range" }, a("div", { class: "pickers" }, a("nylas-time-window-picker", { id: l, hasError: (b = this.overlapDays[n]) == null ? void 0 : b.includes(i), time: o.start, name: l, key: l, exportparts: "time-picker: nap__time-picker-container, time-input: nap__time-picker-input, times: nap__time-picker-times", setTime: (h, p) => this.setTime(l, h, p), setFormError: (h, p) => this.setFormError(l, h, p) }), a("span", null, " - "), a("nylas-time-window-picker", { id: r, hasError: (f = this.overlapDays[n]) == null ? void 0 : f.includes(i), time: o.end, name: r, key: r, minimumStartTime: o.start, exportparts: "time-picker: nap__time-picker-container, time-input: nap__time-picker-input, times: nap__time-picker-times", setTime: (h, p) => this.setTime(r, h, p), setFormError: (h, p) => this.setFormError(r, h, p) })), a("button", { onClick: () => this.removeTimeRange(n, i) }, a("close-icon", null)));
|
|
344
|
+
}), a("p", { class: "error" }, this.overlapDays[n] ? "Overlapping time ranges" : "")), a("div", null, s.length > 0 ? a("button", { onClick: () => this.addTimeRange(n), part: "nap__add-time-range" }, a("add-circle-icon", null)) : null));
|
|
335
345
|
})))));
|
|
336
346
|
}
|
|
337
347
|
static get formAssociated() {
|
|
338
348
|
return !0;
|
|
339
349
|
}
|
|
340
350
|
get host() {
|
|
341
|
-
return
|
|
351
|
+
return x(this);
|
|
342
352
|
}
|
|
343
353
|
static get watchers() {
|
|
344
354
|
return {
|
|
@@ -347,32 +357,32 @@ const xe = class {
|
|
|
347
357
|
};
|
|
348
358
|
}
|
|
349
359
|
};
|
|
350
|
-
|
|
351
|
-
|
|
360
|
+
yt([
|
|
361
|
+
_({
|
|
352
362
|
name: "nylas-availability-picker",
|
|
353
363
|
fireRegisterEvent: !0
|
|
354
364
|
}),
|
|
355
365
|
se("design:type", Function),
|
|
356
366
|
se("design:paramtypes", []),
|
|
357
367
|
se("design:returntype", void 0)
|
|
358
|
-
],
|
|
359
|
-
|
|
360
|
-
const
|
|
361
|
-
var
|
|
362
|
-
var
|
|
368
|
+
], Ce.prototype, "render", null);
|
|
369
|
+
Ce.style = mt;
|
|
370
|
+
const gt = ':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);padding:1rem}.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}', vt = gt;
|
|
371
|
+
var kt = function(e, t, n, s) {
|
|
372
|
+
var o = arguments.length, i = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, n) : s, l;
|
|
363
373
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
364
374
|
i = Reflect.decorate(e, t, n, s);
|
|
365
375
|
else
|
|
366
376
|
for (var r = e.length - 1; r >= 0; r--)
|
|
367
|
-
(
|
|
368
|
-
return
|
|
369
|
-
},
|
|
377
|
+
(l = e[r]) && (i = (o < 3 ? l(i) : o > 3 ? l(t, n, i) : l(t, n)) || i);
|
|
378
|
+
return o > 3 && i && Object.defineProperty(t, n, i), i;
|
|
379
|
+
}, oe = function(e, t) {
|
|
370
380
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
371
381
|
return Reflect.metadata(e, t);
|
|
372
382
|
};
|
|
373
|
-
const
|
|
383
|
+
const Te = class {
|
|
374
384
|
constructor(e) {
|
|
375
|
-
|
|
385
|
+
y(this, e), this.valueChanged = w(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.name = "calendar", this.defaultBookingCalendar = "", this.selectedCalendar = "";
|
|
376
386
|
}
|
|
377
387
|
connectedCallback() {
|
|
378
388
|
d("nylas-booking-calendar-picker", "connectedCallback");
|
|
@@ -415,13 +425,13 @@ const we = class {
|
|
|
415
425
|
value: n.id,
|
|
416
426
|
label: n.name
|
|
417
427
|
}))) ?? [];
|
|
418
|
-
return a(k, null, a("div", { class: "nylas-booking-calendar-picker" }, a("div", { class: "header", part: "
|
|
428
|
+
return a(k, 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...")))));
|
|
419
429
|
}
|
|
420
430
|
static get formAssociated() {
|
|
421
431
|
return !0;
|
|
422
432
|
}
|
|
423
433
|
get host() {
|
|
424
|
-
return
|
|
434
|
+
return x(this);
|
|
425
435
|
}
|
|
426
436
|
static get watchers() {
|
|
427
437
|
return {
|
|
@@ -429,8 +439,8 @@ const we = class {
|
|
|
429
439
|
};
|
|
430
440
|
}
|
|
431
441
|
};
|
|
432
|
-
|
|
433
|
-
|
|
442
|
+
kt([
|
|
443
|
+
_({
|
|
434
444
|
name: "nylas-booking-calendar-picker",
|
|
435
445
|
eventToProps: {
|
|
436
446
|
valueChanged: async (e, t) => {
|
|
@@ -440,27 +450,27 @@ ft([
|
|
|
440
450
|
},
|
|
441
451
|
fireRegisterEvent: !0
|
|
442
452
|
}),
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
],
|
|
447
|
-
|
|
448
|
-
const
|
|
449
|
-
var
|
|
450
|
-
var
|
|
453
|
+
oe("design:type", Function),
|
|
454
|
+
oe("design:paramtypes", []),
|
|
455
|
+
oe("design:returntype", void 0)
|
|
456
|
+
], Te.prototype, "render", null);
|
|
457
|
+
Te.style = vt;
|
|
458
|
+
const wt = ':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}.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)}.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}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview{width:200px;padding:1rem;background:var(--nylas-base-25);border-bottom-right-radius:var(--nylas-border-radius-2x)}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview h4{font-size:12px;line-height:24px;color:var(--nylas-base-600);font-family:var(--nylas-font-family);font-weight:500;text-align:center}.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);border-bottom: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}', xt = wt;
|
|
459
|
+
var _t = function(e, t, n, s) {
|
|
460
|
+
var o = arguments.length, i = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, n) : s, l;
|
|
451
461
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
452
462
|
i = Reflect.decorate(e, t, n, s);
|
|
453
463
|
else
|
|
454
464
|
for (var r = e.length - 1; r >= 0; r--)
|
|
455
|
-
(
|
|
456
|
-
return
|
|
457
|
-
},
|
|
465
|
+
(l = e[r]) && (i = (o < 3 ? l(i) : o > 3 ? l(t, n, i) : l(t, n)) || i);
|
|
466
|
+
return o > 3 && i && Object.defineProperty(t, n, i), i;
|
|
467
|
+
}, le = function(e, t) {
|
|
458
468
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
459
469
|
return Reflect.metadata(e, t);
|
|
460
470
|
};
|
|
461
|
-
const
|
|
471
|
+
const Oe = class {
|
|
462
472
|
constructor(e) {
|
|
463
|
-
|
|
473
|
+
y(this, e), this.valueChanged = w(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;
|
|
464
474
|
}
|
|
465
475
|
connectedCallback() {
|
|
466
476
|
d("nylas-buffer-time", "connectedCallback");
|
|
@@ -499,8 +509,8 @@ const Ce = class {
|
|
|
499
509
|
selectedOptionChangedHandler(e) {
|
|
500
510
|
d("nylas-buffer-time", "selectedOptionChangedHandler", e.detail);
|
|
501
511
|
const t = (n) => {
|
|
502
|
-
const { value: s, name:
|
|
503
|
-
|
|
512
|
+
const { value: s, name: o } = n.detail;
|
|
513
|
+
o === "before-buffer-time" ? this.selectedBeforeBufferTime = parseInt(s) : o === "after-buffer-time" && (this.selectedAfterBufferTime = parseInt(s));
|
|
504
514
|
const i = {
|
|
505
515
|
before: this.selectedBeforeBufferTime,
|
|
506
516
|
after: this.selectedAfterBufferTime
|
|
@@ -510,47 +520,47 @@ const Ce = class {
|
|
|
510
520
|
this.valueChanged.emit({ ...e.detail, valueChanged: t });
|
|
511
521
|
}
|
|
512
522
|
renderPreview() {
|
|
513
|
-
const s = (
|
|
514
|
-
const r = Math.floor(
|
|
523
|
+
const s = (l) => {
|
|
524
|
+
const r = Math.floor(l / 30), b = l % 30 / 30 * 20;
|
|
515
525
|
return {
|
|
516
526
|
fullSlots: r,
|
|
517
|
-
partialFillHeight:
|
|
527
|
+
partialFillHeight: b
|
|
518
528
|
};
|
|
519
|
-
},
|
|
520
|
-
const { fullSlots:
|
|
521
|
-
return Array.from({ length: 4 }, (
|
|
522
|
-
const
|
|
529
|
+
}, o = () => {
|
|
530
|
+
const { fullSlots: l, partialFillHeight: r } = s(this.selectedBeforeBufferTime);
|
|
531
|
+
return Array.from({ length: 4 }, (b, f) => {
|
|
532
|
+
const h = this.selectedBeforeBufferTime > 0 && f > 4 - l - 1, p = this.selectedBeforeBufferTime > 0 && f === 4 - l - 1 && r > 0;
|
|
523
533
|
let v = {};
|
|
524
|
-
return
|
|
534
|
+
return h && !p ? v.backgroundColor = "var(--nylas-base-100)" : p && (v.background = `linear-gradient(to top, var(--nylas-base-100) ${r}px, transparent 0)`), a("div", { key: f, class: `slot ${h ? "active" : ""}`, style: {
|
|
525
535
|
height: "20px",
|
|
526
536
|
...v
|
|
527
537
|
} });
|
|
528
538
|
});
|
|
529
539
|
}, i = () => {
|
|
530
|
-
const { fullSlots:
|
|
531
|
-
return Array.from({ length: 4 }, (
|
|
532
|
-
const
|
|
540
|
+
const { fullSlots: l, partialFillHeight: r } = s(this.selectedAfterBufferTime);
|
|
541
|
+
return Array.from({ length: 4 }, (b, f) => {
|
|
542
|
+
const h = this.selectedAfterBufferTime > 0 && f < l, p = f === l && r > 0;
|
|
533
543
|
let v = {};
|
|
534
|
-
return
|
|
544
|
+
return h && !p ? v.backgroundColor = "var(--nylas-base-100)" : p && (v.background = `linear-gradient(to bottom, var(--nylas-base-100) ${r}px, transparent 0)`), a("div", { key: f, class: `slot ${h ? "active" : ""}`, style: {
|
|
535
545
|
height: "20px",
|
|
536
546
|
...v
|
|
537
547
|
} });
|
|
538
548
|
});
|
|
539
549
|
};
|
|
540
|
-
return a("div", { class: "preview-container" },
|
|
550
|
+
return a("div", { class: "preview-container" }, o(), a("div", { class: "event-slot", style: { height: "40px" } }), i());
|
|
541
551
|
}
|
|
542
552
|
render() {
|
|
543
553
|
const e = Array.from({ length: 121 }, (t, n) => ({
|
|
544
554
|
label: n.toString(),
|
|
545
555
|
value: n
|
|
546
556
|
}));
|
|
547
|
-
return a(k, null, a("div", { class: "nylas-buffer-time" }, a("div", { class: "header", part: "
|
|
557
|
+
return a(k, 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", 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", 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()))));
|
|
548
558
|
}
|
|
549
559
|
static get formAssociated() {
|
|
550
560
|
return !0;
|
|
551
561
|
}
|
|
552
562
|
get host() {
|
|
553
|
-
return
|
|
563
|
+
return x(this);
|
|
554
564
|
}
|
|
555
565
|
static get watchers() {
|
|
556
566
|
return {
|
|
@@ -558,8 +568,8 @@ const Ce = class {
|
|
|
558
568
|
};
|
|
559
569
|
}
|
|
560
570
|
};
|
|
561
|
-
|
|
562
|
-
|
|
571
|
+
_t([
|
|
572
|
+
_({
|
|
563
573
|
name: "nylas-buffer-time",
|
|
564
574
|
eventToProps: {
|
|
565
575
|
valueChanged: async (e, t) => {
|
|
@@ -569,27 +579,27 @@ bt([
|
|
|
569
579
|
},
|
|
570
580
|
fireRegisterEvent: !0
|
|
571
581
|
}),
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
],
|
|
576
|
-
|
|
577
|
-
const
|
|
578
|
-
var
|
|
579
|
-
var
|
|
582
|
+
le("design:type", Function),
|
|
583
|
+
le("design:paramtypes", []),
|
|
584
|
+
le("design:returntype", void 0)
|
|
585
|
+
], Oe.prototype, "render", null);
|
|
586
|
+
Oe.style = xt;
|
|
587
|
+
const Ct = ':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}', Tt = Ct;
|
|
588
|
+
var Ot = function(e, t, n, s) {
|
|
589
|
+
var o = arguments.length, i = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, n) : s, l;
|
|
580
590
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
581
591
|
i = Reflect.decorate(e, t, n, s);
|
|
582
592
|
else
|
|
583
593
|
for (var r = e.length - 1; r >= 0; r--)
|
|
584
|
-
(
|
|
585
|
-
return
|
|
594
|
+
(l = e[r]) && (i = (o < 3 ? l(i) : o > 3 ? l(t, n, i) : l(t, n)) || i);
|
|
595
|
+
return o > 3 && i && Object.defineProperty(t, n, i), i;
|
|
586
596
|
}, re = function(e, t) {
|
|
587
597
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
588
598
|
return Reflect.metadata(e, t);
|
|
589
599
|
};
|
|
590
|
-
const
|
|
600
|
+
const De = class {
|
|
591
601
|
constructor(e) {
|
|
592
|
-
|
|
602
|
+
y(this, e), this.valueChanged = w(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.organizerEmail = void 0, this.name = "calendar", this.defaultSelectedCalendars = [], this.selectedCalendars = [];
|
|
593
603
|
}
|
|
594
604
|
connectedCallback() {
|
|
595
605
|
d("nylas-calendar-picker", "connectedCallback");
|
|
@@ -629,20 +639,20 @@ const _e = class {
|
|
|
629
639
|
render() {
|
|
630
640
|
var t;
|
|
631
641
|
const e = ((t = this.calendars) == null ? void 0 : t.map((n) => {
|
|
632
|
-
var s,
|
|
642
|
+
var s, o;
|
|
633
643
|
return {
|
|
634
644
|
value: n.id,
|
|
635
645
|
label: n.name,
|
|
636
|
-
selected: ((s = this.defaultSelectedCalendars) == null ? void 0 : s.includes(n.id)) || ((
|
|
646
|
+
selected: ((s = this.defaultSelectedCalendars) == null ? void 0 : s.includes(n.id)) || ((o = this.defaultSelectedCalendars) == null ? void 0 : o.includes("primary")) && n.id === this.organizerEmail
|
|
637
647
|
};
|
|
638
648
|
})) ?? [];
|
|
639
|
-
return a(k, null, a("div", { class: "nylas-calendar-picker" }, 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 }, 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...")))));
|
|
649
|
+
return a(k, 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...")))));
|
|
640
650
|
}
|
|
641
651
|
static get formAssociated() {
|
|
642
652
|
return !0;
|
|
643
653
|
}
|
|
644
654
|
get host() {
|
|
645
|
-
return
|
|
655
|
+
return x(this);
|
|
646
656
|
}
|
|
647
657
|
static get watchers() {
|
|
648
658
|
return {
|
|
@@ -650,8 +660,8 @@ const _e = class {
|
|
|
650
660
|
};
|
|
651
661
|
}
|
|
652
662
|
};
|
|
653
|
-
|
|
654
|
-
|
|
663
|
+
Ot([
|
|
664
|
+
_({
|
|
655
665
|
name: "nylas-calendar-picker",
|
|
656
666
|
eventToProps: {
|
|
657
667
|
valueChanged: async (e, t) => {
|
|
@@ -664,24 +674,24 @@ yt([
|
|
|
664
674
|
re("design:type", Function),
|
|
665
675
|
re("design:paramtypes", []),
|
|
666
676
|
re("design:returntype", void 0)
|
|
667
|
-
],
|
|
668
|
-
|
|
669
|
-
const
|
|
670
|
-
var
|
|
671
|
-
var
|
|
677
|
+
], De.prototype, "render", null);
|
|
678
|
+
De.style = Tt;
|
|
679
|
+
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;width:inherit}.nylas-custom-booking-flow{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200)}.nylas-custom-booking-flow .header{padding:1rem;border-bottom:1px solid var(--nylas-base-200)}.nylas-custom-booking-flow .header h3{margin:0;font-size:1rem;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-custom-booking-flow .header p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.nylas-custom-booking-flow .nylas-custom-booking-flow__loading{padding-bottom:1rem}.nylas-custom-booking-flow .nylas-custom-booking-flow__loading .label{display:flex;align-items:center;gap:0.5rem;margin:1rem 1rem 0;color:var(--nylas-base-800)}.nylas-custom-booking-flow .nylas-custom-booking-flow__loading .loading-button{margin:0 1rem;padding:0;width:inherit;height:48px;color:black;font-size:1rem;cursor:not-allowed;display:flex;gap:0.5rem;justify-content:space-between;align-items:center;background:transparent;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}.nylas-custom-booking-flow .nylas-custom-booking-flow__loading .loading-button span{padding:0 1rem}.nylas-custom-booking-flow .nylas-custom-booking-flow__dropdown{padding:1rem}.nylas-custom-booking-flow .nylas-custom-booking-flow__dropdown span.label{display:flex;align-items:center;gap:4px;color:var(--nylas-base-800)}.nylas-custom-booking-flow .nylas-custom-booking-flow__dropdown span.label tooltip-component{display:flex}.nylas-custom-booking-flow .nylas-custom-booking-flow__dropdown select-dropdown::part(sd_dropdown){width:100%}.nylas-custom-booking-flow .nylas-custom-booking-flow__dropdown select-dropdown::part(sd_dropdown-button){width:100%;display:flex;justify-content:space-between;align-items:center;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);padding:1rem}.nylas-custom-booking-flow .nylas-custom-booking-flow__dropdown select-dropdown::part(sd_dropdown-content){width:100%;max-width:unset}.nylas-custom-booking-flow .nylas-custom-booking-flow__dropdown select-dropdown::part(sd_dropdown-button-selected-label){max-width:calc(100% - 2rem);font-family:var(--nylas-font-family);font-size:16px;line-height:24px}', It = Dt;
|
|
680
|
+
var St = function(e, t, n, s) {
|
|
681
|
+
var o = arguments.length, i = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, n) : s, l;
|
|
672
682
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
673
683
|
i = Reflect.decorate(e, t, n, s);
|
|
674
684
|
else
|
|
675
685
|
for (var r = e.length - 1; r >= 0; r--)
|
|
676
|
-
(
|
|
677
|
-
return
|
|
686
|
+
(l = e[r]) && (i = (o < 3 ? l(i) : o > 3 ? l(t, n, i) : l(t, n)) || i);
|
|
687
|
+
return o > 3 && i && Object.defineProperty(t, n, i), i;
|
|
678
688
|
}, de = function(e, t) {
|
|
679
689
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
680
690
|
return Reflect.metadata(e, t);
|
|
681
691
|
};
|
|
682
|
-
const
|
|
692
|
+
const Ie = class {
|
|
683
693
|
constructor(e) {
|
|
684
|
-
|
|
694
|
+
y(this, e), this.valueChanged = w(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 = "booking-type", this.bookingType = "", this.selectedBookingType = "";
|
|
685
695
|
}
|
|
686
696
|
connectedCallback() {
|
|
687
697
|
d("nylas-custom-booking-flow", "connectedCallback");
|
|
@@ -729,13 +739,13 @@ const Te = class {
|
|
|
729
739
|
value: "pre-booking"
|
|
730
740
|
}
|
|
731
741
|
];
|
|
732
|
-
return a(k, { key: "
|
|
742
|
+
return a(k, { key: "fe9e837aba8f846a0b77a21eee365080d41b4e57" }, a("div", { key: "2405db5290bcd44a602fd9f91bb91e13a9d7ffc7", class: "nylas-custom-booking-flow", part: "ncbf" }, a("div", { key: "2de829660fdba0da9e6cbcd6281c427b65414d90", class: "header", part: "ncbf__header" }, a("h3", { key: "13e3b9e450f54f04538c773ab2564513cdaf0fa5" }, "Customize booking flow"), a("p", { key: "9436439f81faf9aed4ff9029c5c0a08a268b5e59" }, "Customize how new bookings are handled when a booking is completed.")), e.length > 0 ? a("div", { class: "nylas-custom-booking-flow__dropdown" }, a("span", { class: "label" }, "After a booking is confirmed", a("tooltip-component", null, a("info-icon", { slot: "tooltip-icon" }), a("span", { slot: "tooltip-content" }, "Choose how you’d like to handle new bookings. If you choose to manually confirm/decline bookings, you will be able to review and accept or decline each booking request."))), a("select-dropdown", { name: "booking-type", options: e, withSearch: !1, exportparts: "sd_dropdown: ncbf__dropdown, sd_dropdown-button: ncbf__dropdown-button, sd_dropdown-content: ncbf__dropdown-content", defaultSelectedOption: e.find((t) => t.value == this.bookingType) ?? e[0] })) : a("div", { class: "nylas-custom-booking-flow__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...")))));
|
|
733
743
|
}
|
|
734
744
|
static get formAssociated() {
|
|
735
745
|
return !0;
|
|
736
746
|
}
|
|
737
747
|
get host() {
|
|
738
|
-
return
|
|
748
|
+
return x(this);
|
|
739
749
|
}
|
|
740
750
|
static get watchers() {
|
|
741
751
|
return {
|
|
@@ -743,8 +753,8 @@ const Te = class {
|
|
|
743
753
|
};
|
|
744
754
|
}
|
|
745
755
|
};
|
|
746
|
-
|
|
747
|
-
|
|
756
|
+
St([
|
|
757
|
+
_({
|
|
748
758
|
name: "nylas-custom-booking-flow",
|
|
749
759
|
eventToProps: {
|
|
750
760
|
valueChanged: async (e, t) => {
|
|
@@ -757,24 +767,24 @@ kt([
|
|
|
757
767
|
de("design:type", Function),
|
|
758
768
|
de("design:paramtypes", []),
|
|
759
769
|
de("design:returntype", void 0)
|
|
760
|
-
],
|
|
761
|
-
|
|
762
|
-
const
|
|
763
|
-
var
|
|
764
|
-
var
|
|
770
|
+
], Ie.prototype, "render", null);
|
|
771
|
+
Ie.style = It;
|
|
772
|
+
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-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:14px;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}', $t = Et;
|
|
773
|
+
var Lt = function(e, t, n, s) {
|
|
774
|
+
var o = arguments.length, i = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, n) : s, l;
|
|
765
775
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
766
776
|
i = Reflect.decorate(e, t, n, s);
|
|
767
777
|
else
|
|
768
778
|
for (var r = e.length - 1; r >= 0; r--)
|
|
769
|
-
(
|
|
770
|
-
return
|
|
779
|
+
(l = e[r]) && (i = (o < 3 ? l(i) : o > 3 ? l(t, n, i) : l(t, n)) || i);
|
|
780
|
+
return o > 3 && i && Object.defineProperty(t, n, i), i;
|
|
771
781
|
}, ce = function(e, t) {
|
|
772
782
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
773
783
|
return Reflect.metadata(e, t);
|
|
774
784
|
};
|
|
775
|
-
const
|
|
785
|
+
const Se = class {
|
|
776
786
|
constructor(e) {
|
|
777
|
-
|
|
787
|
+
y(this, e), this.valueChanged = w(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.eventDescription = void 0, this.description = this.eventDescription ?? "", this.name = "description";
|
|
778
788
|
}
|
|
779
789
|
elementNameChangedHandler(e) {
|
|
780
790
|
d("nylas-event-description", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
@@ -795,13 +805,13 @@ const Oe = class {
|
|
|
795
805
|
this.description = e.target.value, this.internals.setFormValue(e.target.value, "description"), this.valueChanged.emit({ value: e.target.value, name: this.name });
|
|
796
806
|
}
|
|
797
807
|
render() {
|
|
798
|
-
return a(k, { key: "
|
|
808
|
+
return a(k, { key: "5519bbdfdc7e253bf5b83c18decd714e54f58714" }, a("div", { key: "36541738e7d447cb6f9b3bf0f931c851efb0d8fe", class: "nylas-event-description", part: "nedesc" }, a("label", { key: "c0eb70c7e36360844559e0fd0a451243fb6f5860", htmlFor: "description" }, "Event description", a("span", { key: "98c176eaa09ccdac28fbba62f67ceeb8a6fed751", class: "label-icon" }, a("tooltip-component", { key: "553ca988451d6053a8863a52cbcdcb12dd041362" }, a("info-icon", { key: "015507616ffc54352cbecc9766e59d0db4a25367", slot: "tooltip-icon" }), a("span", { key: "86efa5b15ae112f6f974ba32e8c138e2c906184f", slot: "tooltip-content" }, "Provide any additional details for your event.")))), a("textarea", { key: "619f982afa3f2af2794d93cc0df930db618a3e5e", id: "description", part: "nedesc__textarea", name: "description", value: this.description, maxlength: "8192", onInput: (e) => this.handleChange(e) })));
|
|
799
809
|
}
|
|
800
810
|
static get formAssociated() {
|
|
801
811
|
return !0;
|
|
802
812
|
}
|
|
803
813
|
get host() {
|
|
804
|
-
return
|
|
814
|
+
return x(this);
|
|
805
815
|
}
|
|
806
816
|
static get watchers() {
|
|
807
817
|
return {
|
|
@@ -809,8 +819,8 @@ const Oe = class {
|
|
|
809
819
|
};
|
|
810
820
|
}
|
|
811
821
|
};
|
|
812
|
-
|
|
813
|
-
|
|
822
|
+
Lt([
|
|
823
|
+
_({
|
|
814
824
|
name: "nylas-event-description",
|
|
815
825
|
eventToProps: {},
|
|
816
826
|
fireRegisterEvent: !0
|
|
@@ -818,24 +828,24 @@ Ct([
|
|
|
818
828
|
ce("design:type", Function),
|
|
819
829
|
ce("design:paramtypes", []),
|
|
820
830
|
ce("design:returntype", void 0)
|
|
821
|
-
],
|
|
822
|
-
|
|
823
|
-
const
|
|
824
|
-
var
|
|
825
|
-
var
|
|
831
|
+
], Se.prototype, "render", null);
|
|
832
|
+
Se.style = $t;
|
|
833
|
+
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}.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:14px;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 select-dropdown::part(sd_dropdown-button){border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);padding:12px 16px}.nylas-event-duration__wrapper select-dropdown::part(sd_dropdown-button-selected-label){font-family:var(--nylas-font-family);font-size:16px;line-height:24px}', Ft = At;
|
|
834
|
+
var Ht = function(e, t, n, s) {
|
|
835
|
+
var o = arguments.length, i = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, n) : s, l;
|
|
826
836
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
827
837
|
i = Reflect.decorate(e, t, n, s);
|
|
828
838
|
else
|
|
829
839
|
for (var r = e.length - 1; r >= 0; r--)
|
|
830
|
-
(
|
|
831
|
-
return
|
|
840
|
+
(l = e[r]) && (i = (o < 3 ? l(i) : o > 3 ? l(t, n, i) : l(t, n)) || i);
|
|
841
|
+
return o > 3 && i && Object.defineProperty(t, n, i), i;
|
|
832
842
|
}, fe = function(e, t) {
|
|
833
843
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
834
844
|
return Reflect.metadata(e, t);
|
|
835
845
|
};
|
|
836
|
-
const
|
|
846
|
+
const Ee = class {
|
|
837
847
|
constructor(e) {
|
|
838
|
-
|
|
848
|
+
y(this, e), this.valueChanged = w(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 = "duration", this.eventDurationMinutes = void 0, this.duration = this.eventDurationMinutes ? this.eventDurationMinutes >= 60 ? this.eventDurationMinutes / 60 : this.eventDurationMinutes : 5, this.durationMinutes = this.eventDurationMinutes ?? 5, this.durationIncrement = this.eventDurationMinutes && this.eventDurationMinutes >= 60 ? 60 : 1;
|
|
839
849
|
}
|
|
840
850
|
elementNameChangedHandler(e) {
|
|
841
851
|
d("nylas-event-duration", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
@@ -856,7 +866,7 @@ const Se = class {
|
|
|
856
866
|
d("nylas-event-duration", "disconnectedCallback");
|
|
857
867
|
}
|
|
858
868
|
handleChange(e) {
|
|
859
|
-
this.duration = e.target.value, this.durationMinutes = this.duration * this.durationIncrement, this.internals.setFormValue(this.durationMinutes.toString(),
|
|
869
|
+
this.duration = e.target.value, this.durationMinutes = this.duration * this.durationIncrement, this.internals.setFormValue(this.durationMinutes.toString(), this.name);
|
|
860
870
|
}
|
|
861
871
|
handleBlur() {
|
|
862
872
|
(this.duration === null || this.duration === void 0) && this.durationIncrement === 1 && (this.duration = 5), (this.duration <= 0 || this.duration === null || this.duration === void 0) && this.durationIncrement === 60 && (this.duration = 1), this.duration < 5 && this.durationIncrement === 1 && (this.duration = 5), this.duration > 720 && this.durationIncrement === 1 && (this.duration = 720), this.duration > 12 && this.durationIncrement === 60 && (this.duration = 12), this.durationMinutes = this.duration * this.durationIncrement, this.internals.setFormValue(this.durationMinutes.toString(), "duration");
|
|
@@ -871,13 +881,13 @@ const Se = class {
|
|
|
871
881
|
{ value: 1, label: "minutes" },
|
|
872
882
|
{ value: 60, label: "hours" }
|
|
873
883
|
];
|
|
874
|
-
return a(k, { key: "
|
|
884
|
+
return a(k, { key: "b4c54d309345b6333578f1f8f49fbe9be7e50af7" }, a("div", { key: "401311ed8b0deb33eeb1013264f192ba87b0d118", class: "nylas-event-duration", part: "ned" }, a("label", { key: "5de11caa4aff28ca3fb11811e21adecfed22d32d", htmlFor: "duration" }, "Event duration", a("span", { key: "592731edca9c0c4ca63250e1fc3d964e4c7b271d", class: "required" }, "*"), a("span", { key: "b9f6a70dc84222e68d2251f485bbd3545d05fcde", class: "label-icon" }, a("tooltip-component", { key: "8fa85c6907a3625c1f50750b962014e7d413ea34" }, a("info-icon", { key: "677374d62adb9c9e27307b64bd69a979a28f32eb", slot: "tooltip-icon" }), a("span", { key: "d2ebc474b7876c3e23e31a296c826557b329be61", slot: "tooltip-content" }, "Set the duration of your event.")))), a("div", { key: "1240a158b86d06ed9e3859487e8688fc2cfea9e5", class: "nylas-event-duration__wrapper" }, a("input", { key: "fffb610158d4b056761f41e9b2ffd0e0aa5b1bfd", type: "number", part: "ned_input", id: "duration", name: "duration", value: this.duration, onBlur: () => this.handleBlur(), onInput: (t) => this.handleChange(t), min: 5 }), a("select-dropdown", { key: "8cf3f16c86c0220f992f69e4cfa012c170145b9e", name: "event-duration", options: e, 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 }))));
|
|
875
885
|
}
|
|
876
886
|
static get formAssociated() {
|
|
877
887
|
return !0;
|
|
878
888
|
}
|
|
879
889
|
get host() {
|
|
880
|
-
return
|
|
890
|
+
return x(this);
|
|
881
891
|
}
|
|
882
892
|
static get watchers() {
|
|
883
893
|
return {
|
|
@@ -886,8 +896,8 @@ const Se = class {
|
|
|
886
896
|
};
|
|
887
897
|
}
|
|
888
898
|
};
|
|
889
|
-
|
|
890
|
-
|
|
899
|
+
Ht([
|
|
900
|
+
_({
|
|
891
901
|
name: "nylas-event-duration",
|
|
892
902
|
eventToProps: {},
|
|
893
903
|
fireRegisterEvent: !0
|
|
@@ -895,24 +905,24 @@ Ot([
|
|
|
895
905
|
fe("design:type", Function),
|
|
896
906
|
fe("design:paramtypes", []),
|
|
897
907
|
fe("design:returntype", void 0)
|
|
898
|
-
],
|
|
899
|
-
|
|
900
|
-
const
|
|
901
|
-
var
|
|
902
|
-
var
|
|
908
|
+
], Ee.prototype, "render", null);
|
|
909
|
+
Ee.style = Ft;
|
|
910
|
+
const Mt = ':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}', Nt = Mt;
|
|
911
|
+
var Rt = function(e, t, n, s) {
|
|
912
|
+
var o = arguments.length, i = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, n) : s, l;
|
|
903
913
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
904
914
|
i = Reflect.decorate(e, t, n, s);
|
|
905
915
|
else
|
|
906
916
|
for (var r = e.length - 1; r >= 0; r--)
|
|
907
|
-
(
|
|
908
|
-
return
|
|
917
|
+
(l = e[r]) && (i = (o < 3 ? l(i) : o > 3 ? l(t, n, i) : l(t, n)) || i);
|
|
918
|
+
return o > 3 && i && Object.defineProperty(t, n, i), i;
|
|
909
919
|
}, pe = function(e, t) {
|
|
910
920
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
911
921
|
return Reflect.metadata(e, t);
|
|
912
922
|
};
|
|
913
|
-
const
|
|
923
|
+
const $e = class {
|
|
914
924
|
constructor(e) {
|
|
915
|
-
|
|
925
|
+
y(this, e), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals);
|
|
916
926
|
}
|
|
917
927
|
connectedCallback() {
|
|
918
928
|
d("nylas-event-info", "connectedCallback");
|
|
@@ -927,14 +937,14 @@ const Ee = class {
|
|
|
927
937
|
d("nylas-event-info", "disconnectedCallback");
|
|
928
938
|
}
|
|
929
939
|
render() {
|
|
930
|
-
return a(k, { key: "
|
|
940
|
+
return a(k, { key: "61e095027d4b933ff2d2cc17a5a9d8a6d1add51e" }, a("nylas-form-card", { key: "0aa8cfa9d92db31b33e30879f1baeda834a0b2f0" }, a("h1", { key: "1f8cb65c3b5b821d7f59b06a4ee338e2fd6bcc5b", slot: "header-title", class: "nylas-event-info__title" }, "Event information"), a("h3", { key: "40698f86b92127532457ece61c931eabced1ec25", slot: "header-subtitle", class: "nylas-event-info__subtitle" }, "Enter all event information."), a("div", { key: "724866551790e31b39fa016f6b88629573639cd6", slot: "content", class: "nylas-event-info__content" }, a("slot", { key: "ef0cd2dd50b7f160d2806d4e4b04f9fd39d1bf83", name: "inputs" }))));
|
|
931
941
|
}
|
|
932
942
|
static get formAssociated() {
|
|
933
943
|
return !0;
|
|
934
944
|
}
|
|
935
945
|
};
|
|
936
|
-
|
|
937
|
-
|
|
946
|
+
Rt([
|
|
947
|
+
_({
|
|
938
948
|
name: "nylas-event-info",
|
|
939
949
|
eventToProps: {},
|
|
940
950
|
fireRegisterEvent: !0
|
|
@@ -942,24 +952,71 @@ Dt([
|
|
|
942
952
|
pe("design:type", Function),
|
|
943
953
|
pe("design:paramtypes", []),
|
|
944
954
|
pe("design:returntype", void 0)
|
|
945
|
-
],
|
|
946
|
-
|
|
947
|
-
const
|
|
948
|
-
var
|
|
949
|
-
var
|
|
955
|
+
], $e.prototype, "render", null);
|
|
956
|
+
$e.style = Nt;
|
|
957
|
+
const zt = ':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}', Pt = zt;
|
|
958
|
+
var Bt = function(e, t, n, s) {
|
|
959
|
+
var o = arguments.length, i = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, n) : s, l;
|
|
950
960
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
951
961
|
i = Reflect.decorate(e, t, n, s);
|
|
952
962
|
else
|
|
953
963
|
for (var r = e.length - 1; r >= 0; r--)
|
|
954
|
-
(
|
|
955
|
-
return
|
|
956
|
-
},
|
|
964
|
+
(l = e[r]) && (i = (o < 3 ? l(i) : o > 3 ? l(t, n, i) : l(t, n)) || i);
|
|
965
|
+
return o > 3 && i && Object.defineProperty(t, n, i), i;
|
|
966
|
+
}, be = function(e, t) {
|
|
957
967
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
958
968
|
return Reflect.metadata(e, t);
|
|
959
969
|
};
|
|
960
|
-
const
|
|
970
|
+
const Le = class {
|
|
961
971
|
constructor(e) {
|
|
962
|
-
|
|
972
|
+
y(this, e), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals);
|
|
973
|
+
}
|
|
974
|
+
connectedCallback() {
|
|
975
|
+
d("nylas-event-limits", "connectedCallback");
|
|
976
|
+
}
|
|
977
|
+
componentWillLoad() {
|
|
978
|
+
d("nylas-event-limits", "componentWillLoad");
|
|
979
|
+
}
|
|
980
|
+
componentDidLoad() {
|
|
981
|
+
d("nylas-event-limits", "componentDidLoad");
|
|
982
|
+
}
|
|
983
|
+
disconnectedCallback() {
|
|
984
|
+
d("nylas-event-limits", "disconnectedCallback");
|
|
985
|
+
}
|
|
986
|
+
render() {
|
|
987
|
+
return a(k, { key: "5a2ad0ec53b85623d821f78858c3cff8b5e1a251" }, a("nylas-form-card", { key: "047025e1b53e4b92d4c5add386bae10702a493a0" }, a("h1", { key: "6e4f9438417a7a7037dda67b1b3ebdd09306f748", slot: "header-title", class: "nylas-event-limits__title" }, "Set event limits"), a("h3", { key: "6b2c72590cf35181cba99fdf7ce58a5d55eae153", slot: "header-subtitle", class: "nylas-event-limits__subtitle" }, "Customize event limits for the event."), a("div", { key: "ed1adf0a9eee51c73b86d78430d77b51db60d9a4", slot: "content", class: "nylas-event-limits__content" }, a("slot", { key: "b9a4299a7edfc2673afaab690ff610d449f8cd57", name: "inputs" }))));
|
|
988
|
+
}
|
|
989
|
+
static get formAssociated() {
|
|
990
|
+
return !0;
|
|
991
|
+
}
|
|
992
|
+
};
|
|
993
|
+
Bt([
|
|
994
|
+
_({
|
|
995
|
+
name: "nylas-event-limits",
|
|
996
|
+
eventToProps: {},
|
|
997
|
+
fireRegisterEvent: !0
|
|
998
|
+
}),
|
|
999
|
+
be("design:type", Function),
|
|
1000
|
+
be("design:paramtypes", []),
|
|
1001
|
+
be("design:returntype", void 0)
|
|
1002
|
+
], Le.prototype, "render", null);
|
|
1003
|
+
Le.style = Pt;
|
|
1004
|
+
const jt = ':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 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 label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:14px;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)}', Wt = jt;
|
|
1005
|
+
var Vt = function(e, t, n, s) {
|
|
1006
|
+
var o = arguments.length, i = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, n) : s, l;
|
|
1007
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
1008
|
+
i = Reflect.decorate(e, t, n, s);
|
|
1009
|
+
else
|
|
1010
|
+
for (var r = e.length - 1; r >= 0; r--)
|
|
1011
|
+
(l = e[r]) && (i = (o < 3 ? l(i) : o > 3 ? l(t, n, i) : l(t, n)) || i);
|
|
1012
|
+
return o > 3 && i && Object.defineProperty(t, n, i), i;
|
|
1013
|
+
}, ue = function(e, t) {
|
|
1014
|
+
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
1015
|
+
return Reflect.metadata(e, t);
|
|
1016
|
+
};
|
|
1017
|
+
const Ae = class {
|
|
1018
|
+
constructor(e) {
|
|
1019
|
+
y(this, e), this.valueChanged = w(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.eventTitle = void 0, this.name = "title", this.showTokens = !1, this.availableTokens = _e.map((t) => ({
|
|
963
1020
|
label: t.token,
|
|
964
1021
|
value: t.value,
|
|
965
1022
|
labelHTML: t
|
|
@@ -975,7 +1032,7 @@ const De = class {
|
|
|
975
1032
|
s == null || s.classList.add("active");
|
|
976
1033
|
} else {
|
|
977
1034
|
const s = (n = this.host.shadowRoot) == null ? void 0 : n.querySelectorAll(".token-options li.active");
|
|
978
|
-
s == null || s.forEach((
|
|
1035
|
+
s == null || s.forEach((o) => o.classList.remove("active"));
|
|
979
1036
|
}
|
|
980
1037
|
}
|
|
981
1038
|
connectedCallback() {
|
|
@@ -995,32 +1052,32 @@ const De = class {
|
|
|
995
1052
|
}
|
|
996
1053
|
highlightTokens() {
|
|
997
1054
|
let e = this.eventTitle || "";
|
|
998
|
-
return
|
|
1055
|
+
return _e.forEach((t) => {
|
|
999
1056
|
const n = t.value, s = new RegExp(`(\\${n})(?!\\w)`, "g");
|
|
1000
1057
|
e = e.replace(s, '<span class="highlighted-tag">$1</span>');
|
|
1001
1058
|
}), e;
|
|
1002
1059
|
}
|
|
1003
1060
|
getCurrentSelectionForBrowser() {
|
|
1004
|
-
var n, s,
|
|
1005
|
-
const e = (i,
|
|
1006
|
-
const
|
|
1061
|
+
var n, s, o;
|
|
1062
|
+
const e = (i, l, r) => {
|
|
1063
|
+
const b = i.replace(/[\u200B-\u200D\uFEFF]/g, ""), f = b.lastIndexOf("$"), h = b.substring(f).split(" ")[0];
|
|
1007
1064
|
return {
|
|
1008
|
-
focusOffset:
|
|
1065
|
+
focusOffset: l,
|
|
1009
1066
|
dollarIndex: f,
|
|
1010
|
-
lastWord:
|
|
1011
|
-
currentText:
|
|
1067
|
+
lastWord: h,
|
|
1068
|
+
currentText: b,
|
|
1012
1069
|
node: r
|
|
1013
1070
|
};
|
|
1014
|
-
}, t =
|
|
1071
|
+
}, t = We();
|
|
1015
1072
|
switch (console.log("currentBrowser", t), t) {
|
|
1016
1073
|
case "Chrome":
|
|
1017
|
-
const i = (n = this.host.shadowRoot) == null ? void 0 : n.getSelection(),
|
|
1018
|
-
return e(r, (i == null ? void 0 : i.focusOffset) || -1,
|
|
1074
|
+
const i = (n = this.host.shadowRoot) == null ? void 0 : n.getSelection(), l = i == null ? void 0 : i.focusNode, r = (l == null ? void 0 : l.nodeValue) || "";
|
|
1075
|
+
return e(r, (i == null ? void 0 : i.focusOffset) || -1, l);
|
|
1019
1076
|
case "Firefox":
|
|
1020
|
-
const
|
|
1021
|
-
return e(f, (
|
|
1077
|
+
const b = document.getSelection(), f = ((s = b == null ? void 0 : b.anchorNode) == null ? void 0 : s.nodeValue) || "";
|
|
1078
|
+
return e(f, (b == null ? void 0 : b.focusOffset) || -1, b == null ? void 0 : b.anchorNode);
|
|
1022
1079
|
case "Safari":
|
|
1023
|
-
const
|
|
1080
|
+
const h = window.getSelection(), p = h == null ? void 0 : h.getComposedRanges(this.host.shadowRoot)[0], v = ((o = p == null ? void 0 : p.startContainer) == null ? void 0 : o.nodeValue) || "";
|
|
1024
1081
|
return e(v, (p == null ? void 0 : p.endOffset) || -1, p == null ? void 0 : p.startContainer);
|
|
1025
1082
|
default:
|
|
1026
1083
|
return console.warn("Browser not supported"), null;
|
|
@@ -1032,20 +1089,20 @@ const De = class {
|
|
|
1032
1089
|
this.updateEventTitle(t), this.resetDropdown();
|
|
1033
1090
|
return;
|
|
1034
1091
|
}
|
|
1035
|
-
const { focusOffset: s, dollarIndex:
|
|
1036
|
-
if (
|
|
1092
|
+
const { focusOffset: s, dollarIndex: o, lastWord: i, currentText: l } = n;
|
|
1093
|
+
if (o === -1 || s < o) {
|
|
1037
1094
|
this.updateEventTitle(t), this.resetDropdown();
|
|
1038
1095
|
return;
|
|
1039
1096
|
}
|
|
1040
1097
|
i.startsWith("$") ? (this.showTokens = !0, this.currentWord = {
|
|
1041
1098
|
$value: i,
|
|
1042
|
-
fullText:
|
|
1043
|
-
index:
|
|
1099
|
+
fullText: l,
|
|
1100
|
+
index: o,
|
|
1044
1101
|
focusOffset: s
|
|
1045
1102
|
}, this.populateSuggestionsDropdown(i)) : this.resetDropdown(), this.updateEventTitle(t);
|
|
1046
1103
|
}
|
|
1047
1104
|
handleInputKeyDown(e) {
|
|
1048
|
-
var t, n, s,
|
|
1105
|
+
var t, n, s, o;
|
|
1049
1106
|
if (e.key === "Enter") {
|
|
1050
1107
|
e.preventDefault();
|
|
1051
1108
|
const i = (t = this.host.shadowRoot) == null ? void 0 : t.getElementById(this.ariaActivedescendant);
|
|
@@ -1054,54 +1111,54 @@ const De = class {
|
|
|
1054
1111
|
e.preventDefault();
|
|
1055
1112
|
const i = (n = this.host.shadowRoot) == null ? void 0 : n.getElementById(this.ariaActivedescendant);
|
|
1056
1113
|
if (i) {
|
|
1057
|
-
const
|
|
1058
|
-
|
|
1114
|
+
const l = i.nextElementSibling;
|
|
1115
|
+
l ? this.ariaActivedescendant = l.id : this.ariaActivedescendant = this.filteredTokens[0].label;
|
|
1059
1116
|
} else
|
|
1060
1117
|
this.ariaActivedescendant = this.filteredTokens[0].label;
|
|
1061
1118
|
} else if (e.key === "ArrowUp") {
|
|
1062
1119
|
e.preventDefault();
|
|
1063
1120
|
const i = (s = this.host.shadowRoot) == null ? void 0 : s.getElementById(this.ariaActivedescendant);
|
|
1064
1121
|
if (i) {
|
|
1065
|
-
const
|
|
1066
|
-
|
|
1122
|
+
const l = i.previousElementSibling;
|
|
1123
|
+
l ? this.ariaActivedescendant = l.id : this.ariaActivedescendant = this.filteredTokens[this.filteredTokens.length - 1].label;
|
|
1067
1124
|
} else
|
|
1068
1125
|
this.ariaActivedescendant = this.filteredTokens[this.filteredTokens.length - 1].label;
|
|
1069
1126
|
} else if (e.key === "Escape")
|
|
1070
1127
|
e.preventDefault(), this.resetDropdown();
|
|
1071
1128
|
else if (e.key === "Backspace" || e.key === "Delete") {
|
|
1072
1129
|
const i = this.getCurrentSelectionForBrowser();
|
|
1073
|
-
i != null && i.currentText.startsWith("${") && (
|
|
1130
|
+
i != null && i.currentText.startsWith("${") && (o = i == null ? void 0 : i.node) != null && o.parentNode && i.node.parentNode.removeChild(i.node);
|
|
1074
1131
|
}
|
|
1075
1132
|
}
|
|
1076
1133
|
selectOption(e, t) {
|
|
1077
1134
|
var c;
|
|
1078
1135
|
e.preventDefault();
|
|
1079
1136
|
const n = this.currentWord.fullText, s = this.currentWord.$value;
|
|
1080
|
-
let
|
|
1081
|
-
for (;
|
|
1082
|
-
if (
|
|
1083
|
-
const
|
|
1084
|
-
if (
|
|
1085
|
-
i =
|
|
1137
|
+
let o = this.titleRef.firstChild, i = null;
|
|
1138
|
+
for (; o; ) {
|
|
1139
|
+
if (o.nodeType === 3) {
|
|
1140
|
+
const u = ((c = o.textContent) == null ? void 0 : c.replace(/[\u200B-\u200D\uFEFF]/g, "")) || "", m = n.replace(/[\u200B-\u200D\uFEFF]/g, "");
|
|
1141
|
+
if (u.includes(m)) {
|
|
1142
|
+
i = o;
|
|
1086
1143
|
break;
|
|
1087
1144
|
}
|
|
1088
1145
|
}
|
|
1089
|
-
|
|
1146
|
+
o = o.nextSibling;
|
|
1090
1147
|
}
|
|
1091
1148
|
if (!i)
|
|
1092
1149
|
return;
|
|
1093
|
-
const
|
|
1150
|
+
const l = i.textContent || "", r = l.indexOf(s), b = l.substring(0, r), f = l.substring(r + s.length), h = document.createTextNode(b), p = document.createRange(), v = document.createElement("span");
|
|
1094
1151
|
v.classList.add("highlighted-tag"), v.textContent = `${t.value}`;
|
|
1095
1152
|
const Z = document.createTextNode(f);
|
|
1096
1153
|
if (f !== "")
|
|
1097
|
-
i.replaceWith(
|
|
1154
|
+
i.replaceWith(h, v, Z), p.setStart(Z, 0);
|
|
1098
1155
|
else {
|
|
1099
|
-
const
|
|
1100
|
-
i.replaceWith(
|
|
1156
|
+
const u = document.createTextNode("");
|
|
1157
|
+
i.replaceWith(h, v, u), p.setStart(u, 0);
|
|
1101
1158
|
}
|
|
1102
1159
|
this.resetDropdown(), this.titleRef.focus();
|
|
1103
|
-
const
|
|
1104
|
-
p.collapse(!0),
|
|
1160
|
+
const $ = window.getSelection();
|
|
1161
|
+
p.collapse(!0), $ == null || $.removeAllRanges(), $ == null || $.addRange(p), this.updateEventTitle(this.titleRef.textContent || "");
|
|
1105
1162
|
}
|
|
1106
1163
|
populateSuggestionsDropdown(e = "") {
|
|
1107
1164
|
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);
|
|
@@ -1118,13 +1175,13 @@ const De = class {
|
|
|
1118
1175
|
}
|
|
1119
1176
|
render() {
|
|
1120
1177
|
var e;
|
|
1121
|
-
return a(k, { key: "
|
|
1178
|
+
return a(k, { key: "a58acf57120285f1c42b0df698b31e298b40407d" }, a("div", { key: "ed5b5e3d7694fbce89647344b066326271786779", class: "nylas-event-title", part: "net" }, a("label", { key: "102d6d0df0164809afe2f215408cc321703c38bc", htmlFor: "title" }, "Event title", a("span", { key: "e024b656ae41640181ba67aed42a52509774354c", class: "required" }, "*"), a("span", { key: "7116bafdab5470e86ba2acdafc2236610b79ea59", class: "label-icon" }, a("tooltip-component", { key: "71a50958f2f04cdfe0cc35c17f60c64f3b910e84" }, a("info-icon", { key: "92e96b68f699d4aff80e028538259e27ba803e18", slot: "tooltip-icon" }), a("span", { key: "5c29a9e8bde6f4cd8df38082b70ad15682e4b687", slot: "tooltip-content" }, "Enter a title for your event.")))), a("div", { key: "72f580436b050b2af9b78149e3b8831912847e7f", class: "title", 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: "a75e5bea3c3841e1030ff676465c036006cf617f", class: "help-text" }, "Create a dynamic templated event title by typing $. Learn more")));
|
|
1122
1179
|
}
|
|
1123
1180
|
static get formAssociated() {
|
|
1124
1181
|
return !0;
|
|
1125
1182
|
}
|
|
1126
1183
|
get host() {
|
|
1127
|
-
return
|
|
1184
|
+
return x(this);
|
|
1128
1185
|
}
|
|
1129
1186
|
static get watchers() {
|
|
1130
1187
|
return {
|
|
@@ -1133,33 +1190,105 @@ const De = class {
|
|
|
1133
1190
|
};
|
|
1134
1191
|
}
|
|
1135
1192
|
};
|
|
1136
|
-
|
|
1137
|
-
|
|
1193
|
+
Vt([
|
|
1194
|
+
_({
|
|
1138
1195
|
name: "nylas-event-title",
|
|
1139
1196
|
eventToProps: {},
|
|
1140
1197
|
fireRegisterEvent: !0
|
|
1141
1198
|
}),
|
|
1199
|
+
ue("design:type", Function),
|
|
1200
|
+
ue("design:paramtypes", []),
|
|
1201
|
+
ue("design:returntype", void 0)
|
|
1202
|
+
], Ae.prototype, "render", null);
|
|
1203
|
+
Ae.style = Wt;
|
|
1204
|
+
const Ut = ':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)}.nylas-limit-future-bookings label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:14px;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}', Zt = Ut;
|
|
1205
|
+
var Yt = function(e, t, n, s) {
|
|
1206
|
+
var o = arguments.length, i = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, n) : s, l;
|
|
1207
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
1208
|
+
i = Reflect.decorate(e, t, n, s);
|
|
1209
|
+
else
|
|
1210
|
+
for (var r = e.length - 1; r >= 0; r--)
|
|
1211
|
+
(l = e[r]) && (i = (o < 3 ? l(i) : o > 3 ? l(t, n, i) : l(t, n)) || i);
|
|
1212
|
+
return o > 3 && i && Object.defineProperty(t, n, i), i;
|
|
1213
|
+
}, he = function(e, t) {
|
|
1214
|
+
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
1215
|
+
return Reflect.metadata(e, t);
|
|
1216
|
+
};
|
|
1217
|
+
const Fe = class {
|
|
1218
|
+
constructor(e) {
|
|
1219
|
+
y(this, e), this.valueChanged = w(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.availableDaysInFuture = void 0, this.name = "limit-future-bookings", this.selectedNumber = 1, this.selectedPeriod = "day";
|
|
1220
|
+
}
|
|
1221
|
+
elementNameChangedHandler(e) {
|
|
1222
|
+
d("nylas-limit-future-bookings", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
1223
|
+
}
|
|
1224
|
+
availableDaysInFutureChanged(e) {
|
|
1225
|
+
const { number: t, period: n } = this.calculateNumberAndPeriodFromDays(e);
|
|
1226
|
+
this.selectedNumber = t, this.selectedPeriod = n;
|
|
1227
|
+
}
|
|
1228
|
+
connectedCallback() {
|
|
1229
|
+
d("nylas-limit-future-bookings", "connectedCallback");
|
|
1230
|
+
}
|
|
1231
|
+
componentWillLoad() {
|
|
1232
|
+
d("nylas-limit-future-bookings", "componentWillLoad"), this.host.setAttribute("name", this.name);
|
|
1233
|
+
}
|
|
1234
|
+
componentDidLoad() {
|
|
1235
|
+
var e;
|
|
1236
|
+
d("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);
|
|
1237
|
+
}
|
|
1238
|
+
disconnectedCallback() {
|
|
1239
|
+
d("nylas-limit-future-bookings", "disconnectedCallback");
|
|
1240
|
+
}
|
|
1241
|
+
timePeriodChangedHandler(e) {
|
|
1242
|
+
const { number: t, period: n } = e.detail;
|
|
1243
|
+
let s;
|
|
1244
|
+
n === "day" ? s = t : n === "week" ? s = t * 7 : s = t * 30, this.valueChanged.emit({ value: s, name: this.name }), typeof this.internals.setFormValue == "function" && this.internals.setFormValue(s.toString(), this.name);
|
|
1245
|
+
}
|
|
1246
|
+
calculateNumberAndPeriodFromDays(e) {
|
|
1247
|
+
return e >= 30 && e % 30 === 0 ? { number: e / 30, period: "month" } : e >= 7 && e % 7 === 0 ? { number: e / 7, period: "week" } : { number: e, period: "day" };
|
|
1248
|
+
}
|
|
1249
|
+
render() {
|
|
1250
|
+
return a(k, { key: "8057320077aad1ea65297b4cac79fe11f69ab161" }, a("div", { key: "991d810bee6817a1ec26482807fece9d884b7844", class: "nylas-limit-future-bookings", part: "nlfb" }, a("label", { key: "caf0946d5a7cb202dc02cd596a7721e52278cb55" }, "Limit future bookings", a("span", { key: "fff09830bc407f7ce1fecf7e6809f2a030ce9a3e", class: "label-icon" }, a("tooltip-component", { key: "8c9cd31ae211d1d3a7f017032d7c1abb3f1c7df6" }, a("info-icon", { key: "43f8b14a4b28effd21e9b5a87b20f63b6bf0061d", slot: "tooltip-icon" }), a("span", { key: "bdfebd15750111829926da4dc0820f562c4fd9aa", slot: "tooltip-content" }, "Set a limit on how far in the future bookings can be made.")))), a("time-period-selector", { key: "de949c9c3aa9234102159bdec61efc061ac49408", 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 })));
|
|
1251
|
+
}
|
|
1252
|
+
static get formAssociated() {
|
|
1253
|
+
return !0;
|
|
1254
|
+
}
|
|
1255
|
+
get host() {
|
|
1256
|
+
return x(this);
|
|
1257
|
+
}
|
|
1258
|
+
static get watchers() {
|
|
1259
|
+
return {
|
|
1260
|
+
name: ["elementNameChangedHandler"],
|
|
1261
|
+
availableDaysInFuture: ["availableDaysInFutureChanged"]
|
|
1262
|
+
};
|
|
1263
|
+
}
|
|
1264
|
+
};
|
|
1265
|
+
Yt([
|
|
1266
|
+
_({
|
|
1267
|
+
name: "nylas-limit-future-bookings",
|
|
1268
|
+
eventToProps: {},
|
|
1269
|
+
fireRegisterEvent: !0
|
|
1270
|
+
}),
|
|
1142
1271
|
he("design:type", Function),
|
|
1143
1272
|
he("design:paramtypes", []),
|
|
1144
1273
|
he("design:returntype", void 0)
|
|
1145
|
-
],
|
|
1146
|
-
|
|
1147
|
-
const
|
|
1148
|
-
var
|
|
1149
|
-
var
|
|
1274
|
+
], Fe.prototype, "render", null);
|
|
1275
|
+
Fe.style = Zt;
|
|
1276
|
+
const Kt = ':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-nylas-base-800);font-size:14px;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}.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}', qt = Kt;
|
|
1277
|
+
var Jt = function(e, t, n, s) {
|
|
1278
|
+
var o = arguments.length, i = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, n) : s, l;
|
|
1150
1279
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
1151
1280
|
i = Reflect.decorate(e, t, n, s);
|
|
1152
1281
|
else
|
|
1153
1282
|
for (var r = e.length - 1; r >= 0; r--)
|
|
1154
|
-
(
|
|
1155
|
-
return
|
|
1156
|
-
},
|
|
1283
|
+
(l = e[r]) && (i = (o < 3 ? l(i) : o > 3 ? l(t, n, i) : l(t, n)) || i);
|
|
1284
|
+
return o > 3 && i && Object.defineProperty(t, n, i), i;
|
|
1285
|
+
}, me = function(e, t) {
|
|
1157
1286
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
1158
1287
|
return Reflect.metadata(e, t);
|
|
1159
1288
|
};
|
|
1160
|
-
const
|
|
1289
|
+
const He = class {
|
|
1161
1290
|
constructor(e) {
|
|
1162
|
-
|
|
1291
|
+
y(this, e), this.valueChanged = w(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.eventLocation = void 0, this.location = this.eventLocation ?? "", this.selectedLocationOption = this.eventLocation ? "custom" : "none", this.name = "location";
|
|
1163
1292
|
}
|
|
1164
1293
|
elementNameChangedHandler(e) {
|
|
1165
1294
|
d("nylas-location-component", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
@@ -1193,16 +1322,16 @@ const Le = class {
|
|
|
1193
1322
|
{ value: "none", label: "None" },
|
|
1194
1323
|
{ value: "custom", label: "Custom location" }
|
|
1195
1324
|
], t = {
|
|
1196
|
-
none: a("location-off-icon", { key: "
|
|
1197
|
-
custom: a("location-icon", { key: "
|
|
1325
|
+
none: a("location-off-icon", { key: "b6ed0f7da911d13fe204658d1dbfbc29d569a99a" }),
|
|
1326
|
+
custom: a("location-icon", { key: "08a5c193876813578037ee6003ab03fd947fb87d" })
|
|
1198
1327
|
};
|
|
1199
|
-
return a(k, { key: "
|
|
1328
|
+
return a(k, { key: "e512133eb2a9213bfacc2edad0581b7a6ad41bbc" }, a("div", { key: "1f0e59707c41f7836805ff26efbd5cc119dfef11", class: "nylas-event-location", part: "nel" }, a("label", { key: "60e264aa383ae29342678ecf23b12631fff1bc98", htmlFor: "location" }, "Location type", a("span", { key: "64c34dbeafa4b5c033be3d1facede6e737b915e1", class: "label-icon" }, a("tooltip-component", { key: "0c569694141c72418e997a85328127968d05eac1" }, a("info-icon", { key: "411fe82e0b6296b34aae95459c9da8bc07bd8131", slot: "tooltip-icon" }), a("span", { key: "67b4582af4fe7085c748e842b5fda1a46a454edf", 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: "3f7b59eaae37afcd7abc4af3c608c5e6dc3ebc30", class: "location-input" }, a("select-dropdown", { key: "424550ac2c3fd61e7c59d2e8c98cedfd156d5661", 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: "300fd4134259f97fcf3ba09d3d296c15ca18eec7", 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) }))));
|
|
1200
1329
|
}
|
|
1201
1330
|
static get formAssociated() {
|
|
1202
1331
|
return !0;
|
|
1203
1332
|
}
|
|
1204
1333
|
get host() {
|
|
1205
|
-
return
|
|
1334
|
+
return x(this);
|
|
1206
1335
|
}
|
|
1207
1336
|
static get watchers() {
|
|
1208
1337
|
return {
|
|
@@ -1211,152 +1340,225 @@ const Le = class {
|
|
|
1211
1340
|
};
|
|
1212
1341
|
}
|
|
1213
1342
|
};
|
|
1214
|
-
|
|
1215
|
-
|
|
1343
|
+
Jt([
|
|
1344
|
+
_({
|
|
1216
1345
|
name: "nylas-location-component",
|
|
1217
1346
|
eventToProps: {},
|
|
1218
1347
|
fireRegisterEvent: !0
|
|
1219
1348
|
}),
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
],
|
|
1224
|
-
|
|
1225
|
-
|
|
1349
|
+
me("design:type", Function),
|
|
1350
|
+
me("design:paramtypes", []),
|
|
1351
|
+
me("design:returntype", void 0)
|
|
1352
|
+
], He.prototype, "render", null);
|
|
1353
|
+
He.style = qt;
|
|
1354
|
+
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-min-cancellation-notice{display:flex;justify-content:space-between;font-family:var(--nylas-font-family)}.nylas-min-cancellation-notice label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:14px;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}', Xt = Gt;
|
|
1355
|
+
var Qt = function(e, t, n, s) {
|
|
1356
|
+
var o = arguments.length, i = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, n) : s, l;
|
|
1357
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
1358
|
+
i = Reflect.decorate(e, t, n, s);
|
|
1359
|
+
else
|
|
1360
|
+
for (var r = e.length - 1; r >= 0; r--)
|
|
1361
|
+
(l = e[r]) && (i = (o < 3 ? l(i) : o > 3 ? l(t, n, i) : l(t, n)) || i);
|
|
1362
|
+
return o > 3 && i && Object.defineProperty(t, n, i), i;
|
|
1363
|
+
}, ye = function(e, t) {
|
|
1364
|
+
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
1365
|
+
return Reflect.metadata(e, t);
|
|
1366
|
+
};
|
|
1367
|
+
const Me = class {
|
|
1368
|
+
constructor(e) {
|
|
1369
|
+
y(this, e), this.valueChanged = w(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.minCancellationNotice = void 0, this.name = "min-cancellation-notice", this.selectedNumber = 1, this.selectedPeriod = "day";
|
|
1370
|
+
}
|
|
1371
|
+
elementNameChangedHandler(e) {
|
|
1372
|
+
d("nylas-min-cancellation-notice", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
1373
|
+
}
|
|
1374
|
+
availableDaysInFutureChanged(e) {
|
|
1375
|
+
const { number: t, period: n } = this.calculateNumberAndPeriodFromMinutes(e);
|
|
1376
|
+
this.selectedNumber = t, this.selectedPeriod = n;
|
|
1377
|
+
}
|
|
1378
|
+
connectedCallback() {
|
|
1379
|
+
d("nylas-min-cancellation-notice", "connectedCallback");
|
|
1380
|
+
}
|
|
1381
|
+
componentWillLoad() {
|
|
1382
|
+
d("nylas-min-cancellation-notice", "componentWillLoad"), this.host.setAttribute("name", this.name);
|
|
1383
|
+
}
|
|
1384
|
+
componentDidLoad() {
|
|
1385
|
+
var e;
|
|
1386
|
+
d("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);
|
|
1387
|
+
}
|
|
1388
|
+
disconnectedCallback() {
|
|
1389
|
+
d("nylas-min-cancellation-notice", "disconnectedCallback");
|
|
1390
|
+
}
|
|
1391
|
+
timePeriodChangedHandler(e) {
|
|
1392
|
+
const { number: t, period: n } = e.detail;
|
|
1393
|
+
let s;
|
|
1394
|
+
const o = 60, i = o * 24, l = i * 7, r = i * 30;
|
|
1395
|
+
n === "minute" ? s = t : n === "hour" ? s = t * o : n === "day" ? s = t * i : n === "week" ? s = t * l : n === "month" ? s = t * r : s = 0, this.valueChanged.emit({ value: s, name: this.name }), typeof this.internals.setFormValue == "function" && this.internals.setFormValue(s.toString(), this.name);
|
|
1396
|
+
}
|
|
1397
|
+
calculateNumberAndPeriodFromMinutes(e) {
|
|
1398
|
+
return e >= 43200 ? { number: Math.floor(e / 43200), period: "month" } : e >= 10080 ? { number: Math.floor(e / 10080), period: "week" } : e >= 1440 ? { number: Math.floor(e / 1440), period: "day" } : e >= 60 ? { number: Math.floor(e / 60), period: "hour" } : { number: e, period: "minute" };
|
|
1399
|
+
}
|
|
1400
|
+
render() {
|
|
1401
|
+
return a(k, { key: "594c4e6ca9c565f486f5c09159de518fe586f7b8" }, a("div", { key: "712baa63d3ea867b5a7893a254954fcea49c80f0", class: "nylas-min-cancellation-notice", part: "nmcn" }, a("label", { key: "7256ab66b7908dc8b972b2987276e0d2d04dd0ee" }, "Minimum cancellation notice", a("span", { key: "515772bd9028f2718ad350acef7b293269e12279", class: "label-icon" }, a("tooltip-component", { key: "1fe93b6067d38d4d78fe0c16fbd21d67ea5db0fd" }, a("info-icon", { key: "2b1e4eb5c88b329441a98009d2e81fbe6c807ccd", slot: "tooltip-icon" }), a("span", { key: "44f83c20d9041f31bb4b58c190c5877cfcdd41b3", slot: "tooltip-content" }, "Set the minimum amount of time required to cancel an event.")))), a("time-period-selector", { key: "4b1725b8d90355b2481a37d8b894414ea5549cd8", 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 })));
|
|
1402
|
+
}
|
|
1403
|
+
static get formAssociated() {
|
|
1404
|
+
return !0;
|
|
1405
|
+
}
|
|
1406
|
+
get host() {
|
|
1407
|
+
return x(this);
|
|
1408
|
+
}
|
|
1409
|
+
static get watchers() {
|
|
1410
|
+
return {
|
|
1411
|
+
name: ["elementNameChangedHandler"],
|
|
1412
|
+
availableDaysInFuture: ["availableDaysInFutureChanged"]
|
|
1413
|
+
};
|
|
1414
|
+
}
|
|
1415
|
+
};
|
|
1416
|
+
Qt([
|
|
1417
|
+
_({
|
|
1418
|
+
name: "nylas-min-cancellation-notice",
|
|
1419
|
+
eventToProps: {},
|
|
1420
|
+
fireRegisterEvent: !0
|
|
1421
|
+
}),
|
|
1422
|
+
ye("design:type", Function),
|
|
1423
|
+
ye("design:paramtypes", []),
|
|
1424
|
+
ye("design:returntype", void 0)
|
|
1425
|
+
], Me.prototype, "render", null);
|
|
1426
|
+
Me.style = Xt;
|
|
1427
|
+
var Ne = { exports: {} };
|
|
1226
1428
|
(function(e, t) {
|
|
1227
1429
|
(function(n, s) {
|
|
1228
1430
|
e.exports = s();
|
|
1229
|
-
})(
|
|
1230
|
-
var n = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, s = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,
|
|
1431
|
+
})(Ve, function() {
|
|
1432
|
+
var n = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, s = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, o = /\d\d/, i = /\d\d?/, l = /\d*[^-_:/,()\s\d]+/, r = {}, b = function(c) {
|
|
1231
1433
|
return (c = +c) + (c > 68 ? 1900 : 2e3);
|
|
1232
1434
|
}, f = function(c) {
|
|
1233
|
-
return function(
|
|
1234
|
-
this[c] = +
|
|
1435
|
+
return function(u) {
|
|
1436
|
+
this[c] = +u;
|
|
1235
1437
|
};
|
|
1236
|
-
},
|
|
1237
|
-
(this.zone || (this.zone = {})).offset = function(
|
|
1238
|
-
if (!
|
|
1438
|
+
}, h = [/[+-]\d\d:?(\d\d)?|Z/, function(c) {
|
|
1439
|
+
(this.zone || (this.zone = {})).offset = function(u) {
|
|
1440
|
+
if (!u || u === "Z")
|
|
1239
1441
|
return 0;
|
|
1240
|
-
var m =
|
|
1241
|
-
return
|
|
1442
|
+
var m = u.match(/([+-]|\d\d)/g), g = 60 * m[1] + (+m[2] || 0);
|
|
1443
|
+
return g === 0 ? 0 : m[0] === "+" ? -g : g;
|
|
1242
1444
|
}(c);
|
|
1243
1445
|
}], p = function(c) {
|
|
1244
|
-
var
|
|
1245
|
-
return
|
|
1246
|
-
}, v = function(c,
|
|
1247
|
-
var m,
|
|
1248
|
-
if (
|
|
1249
|
-
for (var
|
|
1250
|
-
if (c.indexOf(
|
|
1251
|
-
m =
|
|
1446
|
+
var u = r[c];
|
|
1447
|
+
return u && (u.indexOf ? u : u.s.concat(u.f));
|
|
1448
|
+
}, v = function(c, u) {
|
|
1449
|
+
var m, g = r.meridiem;
|
|
1450
|
+
if (g) {
|
|
1451
|
+
for (var D = 1; D <= 24; D += 1)
|
|
1452
|
+
if (c.indexOf(g(D, 0, u)) > -1) {
|
|
1453
|
+
m = D > 12;
|
|
1252
1454
|
break;
|
|
1253
1455
|
}
|
|
1254
1456
|
} else
|
|
1255
|
-
m = c === (
|
|
1457
|
+
m = c === (u ? "pm" : "PM");
|
|
1256
1458
|
return m;
|
|
1257
|
-
}, Z = { A: [
|
|
1459
|
+
}, Z = { A: [l, function(c) {
|
|
1258
1460
|
this.afternoon = v(c, !1);
|
|
1259
|
-
}], a: [
|
|
1461
|
+
}], a: [l, function(c) {
|
|
1260
1462
|
this.afternoon = v(c, !0);
|
|
1261
1463
|
}], S: [/\d/, function(c) {
|
|
1262
1464
|
this.milliseconds = 100 * +c;
|
|
1263
|
-
}], SS: [
|
|
1465
|
+
}], SS: [o, function(c) {
|
|
1264
1466
|
this.milliseconds = 10 * +c;
|
|
1265
1467
|
}], SSS: [/\d{3}/, function(c) {
|
|
1266
1468
|
this.milliseconds = +c;
|
|
1267
|
-
}], s: [i, f("seconds")], ss: [i, f("seconds")], m: [i, f("minutes")], mm: [i, f("minutes")], H: [i, f("hours")], h: [i, f("hours")], HH: [i, f("hours")], hh: [i, f("hours")], D: [i, f("day")], DD: [
|
|
1268
|
-
var
|
|
1269
|
-
if (this.day = m[0],
|
|
1270
|
-
for (var
|
|
1271
|
-
|
|
1272
|
-
}], M: [i, f("month")], MM: [
|
|
1273
|
-
var
|
|
1274
|
-
return
|
|
1469
|
+
}], s: [i, f("seconds")], ss: [i, f("seconds")], m: [i, f("minutes")], mm: [i, f("minutes")], H: [i, f("hours")], h: [i, f("hours")], HH: [i, f("hours")], hh: [i, f("hours")], D: [i, f("day")], DD: [o, f("day")], Do: [l, function(c) {
|
|
1470
|
+
var u = r.ordinal, m = c.match(/\d+/);
|
|
1471
|
+
if (this.day = m[0], u)
|
|
1472
|
+
for (var g = 1; g <= 31; g += 1)
|
|
1473
|
+
u(g).replace(/\[|\]/g, "") === c && (this.day = g);
|
|
1474
|
+
}], M: [i, f("month")], MM: [o, f("month")], MMM: [l, function(c) {
|
|
1475
|
+
var u = p("months"), m = (p("monthsShort") || u.map(function(g) {
|
|
1476
|
+
return g.slice(0, 3);
|
|
1275
1477
|
})).indexOf(c) + 1;
|
|
1276
1478
|
if (m < 1)
|
|
1277
1479
|
throw new Error();
|
|
1278
1480
|
this.month = m % 12 || m;
|
|
1279
|
-
}], MMMM: [
|
|
1280
|
-
var
|
|
1281
|
-
if (
|
|
1481
|
+
}], MMMM: [l, function(c) {
|
|
1482
|
+
var u = p("months").indexOf(c) + 1;
|
|
1483
|
+
if (u < 1)
|
|
1282
1484
|
throw new Error();
|
|
1283
|
-
this.month =
|
|
1284
|
-
}], Y: [/[+-]?\d+/, f("year")], YY: [
|
|
1285
|
-
this.year =
|
|
1286
|
-
}], YYYY: [/\d{4}/, f("year")], Z:
|
|
1287
|
-
function
|
|
1288
|
-
var
|
|
1289
|
-
|
|
1290
|
-
for (var
|
|
1291
|
-
var
|
|
1292
|
-
return
|
|
1293
|
-
return
|
|
1485
|
+
this.month = u % 12 || u;
|
|
1486
|
+
}], Y: [/[+-]?\d+/, f("year")], YY: [o, function(c) {
|
|
1487
|
+
this.year = b(c);
|
|
1488
|
+
}], YYYY: [/\d{4}/, f("year")], Z: h, ZZ: h };
|
|
1489
|
+
function $(c) {
|
|
1490
|
+
var u, m;
|
|
1491
|
+
u = c, m = r && r.formats;
|
|
1492
|
+
for (var g = (c = u.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(N, L, O) {
|
|
1493
|
+
var C = O && O.toUpperCase();
|
|
1494
|
+
return L || m[O] || n[O] || m[C].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(A, F, R) {
|
|
1495
|
+
return F || R.slice(1);
|
|
1294
1496
|
});
|
|
1295
|
-
})).match(s),
|
|
1296
|
-
var U =
|
|
1297
|
-
|
|
1497
|
+
})).match(s), D = g.length, I = 0; I < D; I += 1) {
|
|
1498
|
+
var U = g[I], M = Z[U], S = M && M[0], E = M && M[1];
|
|
1499
|
+
g[I] = E ? { regex: S, parser: E } : U.replace(/^\[|\]$/g, "");
|
|
1298
1500
|
}
|
|
1299
|
-
return function(
|
|
1300
|
-
for (var
|
|
1301
|
-
var A =
|
|
1501
|
+
return function(N) {
|
|
1502
|
+
for (var L = {}, O = 0, C = 0; O < D; O += 1) {
|
|
1503
|
+
var A = g[O];
|
|
1302
1504
|
if (typeof A == "string")
|
|
1303
|
-
|
|
1505
|
+
C += A.length;
|
|
1304
1506
|
else {
|
|
1305
|
-
var
|
|
1306
|
-
|
|
1507
|
+
var F = A.regex, R = A.parser, Y = N.slice(C), P = F.exec(Y)[0];
|
|
1508
|
+
R.call(L, P), N = N.replace(P, "");
|
|
1307
1509
|
}
|
|
1308
1510
|
}
|
|
1309
|
-
return function(
|
|
1310
|
-
var
|
|
1311
|
-
if (
|
|
1312
|
-
var
|
|
1313
|
-
|
|
1511
|
+
return function(z) {
|
|
1512
|
+
var T = z.afternoon;
|
|
1513
|
+
if (T !== void 0) {
|
|
1514
|
+
var B = z.hours;
|
|
1515
|
+
T ? B < 12 && (z.hours += 12) : B === 12 && (z.hours = 0), delete z.afternoon;
|
|
1314
1516
|
}
|
|
1315
|
-
}(
|
|
1517
|
+
}(L), L;
|
|
1316
1518
|
};
|
|
1317
1519
|
}
|
|
1318
|
-
return function(c,
|
|
1319
|
-
m.p.customParseFormat = !0, c && c.parseTwoDigitYear && (
|
|
1320
|
-
var
|
|
1321
|
-
|
|
1322
|
-
var U =
|
|
1520
|
+
return function(c, u, m) {
|
|
1521
|
+
m.p.customParseFormat = !0, c && c.parseTwoDigitYear && (b = c.parseTwoDigitYear);
|
|
1522
|
+
var g = u.prototype, D = g.parse;
|
|
1523
|
+
g.parse = function(I) {
|
|
1524
|
+
var U = I.date, M = I.utc, S = I.args;
|
|
1323
1525
|
this.$u = M;
|
|
1324
|
-
var
|
|
1325
|
-
if (typeof
|
|
1326
|
-
var
|
|
1327
|
-
|
|
1526
|
+
var E = S[1];
|
|
1527
|
+
if (typeof E == "string") {
|
|
1528
|
+
var N = S[2] === !0, L = S[3] === !0, O = N || L, C = S[2];
|
|
1529
|
+
L && (C = S[2]), r = this.$locale(), !N && C && (r = m.Ls[C]), this.$d = function(Y, P, z) {
|
|
1328
1530
|
try {
|
|
1329
|
-
if (["x", "X"].indexOf(
|
|
1330
|
-
return new Date((
|
|
1331
|
-
var
|
|
1332
|
-
|
|
1333
|
-
var Q =
|
|
1334
|
-
return
|
|
1531
|
+
if (["x", "X"].indexOf(P) > -1)
|
|
1532
|
+
return new Date((P === "X" ? 1e3 : 1) * Y);
|
|
1533
|
+
var T = $(P)(Y), B = T.year, K = T.month, Re = T.day, ze = T.hours, Pe = T.minutes, Be = T.seconds, je = T.milliseconds, ge = T.zone, J = /* @__PURE__ */ new Date(), G = Re || (B || K ? 1 : J.getDate()), X = B || J.getFullYear(), q = 0;
|
|
1534
|
+
B && !K || (q = K > 0 ? K - 1 : J.getMonth());
|
|
1535
|
+
var Q = ze || 0, ee = Pe || 0, te = Be || 0, ne = je || 0;
|
|
1536
|
+
return ge ? new Date(Date.UTC(X, q, G, Q, ee, te, ne + 60 * ge.offset * 1e3)) : z ? new Date(Date.UTC(X, q, G, Q, ee, te, ne)) : new Date(X, q, G, Q, ee, te, ne);
|
|
1335
1537
|
} catch {
|
|
1336
1538
|
return /* @__PURE__ */ new Date("");
|
|
1337
1539
|
}
|
|
1338
|
-
}(U,
|
|
1339
|
-
} else if (
|
|
1340
|
-
for (var A =
|
|
1341
|
-
|
|
1342
|
-
var
|
|
1343
|
-
if (
|
|
1344
|
-
this.$d =
|
|
1540
|
+
}(U, E, M), this.init(), C && C !== !0 && (this.$L = this.locale(C).$L), O && U != this.format(E) && (this.$d = /* @__PURE__ */ new Date("")), r = {};
|
|
1541
|
+
} else if (E instanceof Array)
|
|
1542
|
+
for (var A = E.length, F = 1; F <= A; F += 1) {
|
|
1543
|
+
S[1] = E[F - 1];
|
|
1544
|
+
var R = m.apply(this, S);
|
|
1545
|
+
if (R.isValid()) {
|
|
1546
|
+
this.$d = R.$d, this.$L = R.$L, this.init();
|
|
1345
1547
|
break;
|
|
1346
1548
|
}
|
|
1347
|
-
|
|
1549
|
+
F === A && (this.$d = /* @__PURE__ */ new Date(""));
|
|
1348
1550
|
}
|
|
1349
1551
|
else
|
|
1350
|
-
|
|
1552
|
+
D.call(this, I);
|
|
1351
1553
|
};
|
|
1352
1554
|
};
|
|
1353
1555
|
});
|
|
1354
|
-
})(
|
|
1355
|
-
const
|
|
1356
|
-
V.extend(
|
|
1357
|
-
const
|
|
1556
|
+
})(Ne);
|
|
1557
|
+
const en = Ne.exports, tn = ':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}', nn = tn;
|
|
1558
|
+
V.extend(en);
|
|
1559
|
+
const an = class {
|
|
1358
1560
|
constructor(e) {
|
|
1359
|
-
|
|
1561
|
+
y(this, e), this.timeChange = w(this, "timeChange", 7), this.time = void 0, this.minimumStartTime = null, this.placeholder = "hh:mmam/pm", this.setTime = void 0, this.name = void 0, this.hasError = !1, this.setFormError = void 0, this.err = "", this.showTimes = !1, this.ariaActivedescendant = "", this.times = this.generateTimes(), this.shouldAutoScroll = !1;
|
|
1360
1562
|
}
|
|
1361
1563
|
handleOutsideClick(e) {
|
|
1362
1564
|
!e.composedPath().includes(this.el) && this.showTimes && (this.showTimes = !1);
|
|
@@ -1388,11 +1590,11 @@ const Bt = class {
|
|
|
1388
1590
|
return;
|
|
1389
1591
|
}
|
|
1390
1592
|
if (t === "") {
|
|
1391
|
-
const s =
|
|
1593
|
+
const s = ke().format("hh:mma");
|
|
1392
1594
|
this.setTime(e, s);
|
|
1393
1595
|
return;
|
|
1394
1596
|
}
|
|
1395
|
-
if (!
|
|
1597
|
+
if (!we(t)) {
|
|
1396
1598
|
const s = ae(t);
|
|
1397
1599
|
this.setTime(s);
|
|
1398
1600
|
return;
|
|
@@ -1404,13 +1606,13 @@ const Bt = class {
|
|
|
1404
1606
|
const t = (n = e.target) == null ? void 0 : n.value;
|
|
1405
1607
|
if (ie(t)) {
|
|
1406
1608
|
if (t === "") {
|
|
1407
|
-
const s =
|
|
1408
|
-
|
|
1609
|
+
const s = ke().format("hh:mma"), o = this.times.findIndex((i) => i.value === s);
|
|
1610
|
+
o > -1 && this.scrollToViewWithinParent(o);
|
|
1409
1611
|
return;
|
|
1410
1612
|
}
|
|
1411
|
-
if (!
|
|
1412
|
-
const s = ae(t),
|
|
1413
|
-
|
|
1613
|
+
if (!we(t)) {
|
|
1614
|
+
const s = ae(t), o = this.times.findIndex((i) => i.value === s);
|
|
1615
|
+
o > -1 && this.scrollToViewWithinParent(o);
|
|
1414
1616
|
return;
|
|
1415
1617
|
}
|
|
1416
1618
|
}
|
|
@@ -1420,11 +1622,11 @@ const Bt = class {
|
|
|
1420
1622
|
let t = V().set("hour", 0).set("minute", 0).set("second", 0);
|
|
1421
1623
|
this.minimumStartTime && (t = V(this.minimumStartTime, "hh:mma"));
|
|
1422
1624
|
const n = t.endOf("day").diff(t, "minutes"), s = Math.round(n / 15);
|
|
1423
|
-
for (let
|
|
1424
|
-
const i = t.add(
|
|
1425
|
-
if (
|
|
1625
|
+
for (let o = 0; o < s + 1; o++) {
|
|
1626
|
+
const i = t.add(o * 15, "minute");
|
|
1627
|
+
if (o == s && i.format("hh:mma").includes("am"))
|
|
1426
1628
|
break;
|
|
1427
|
-
e.push({ id:
|
|
1629
|
+
e.push({ id: o, value: i.format("hh:mma") });
|
|
1428
1630
|
}
|
|
1429
1631
|
return e;
|
|
1430
1632
|
}
|
|
@@ -1469,34 +1671,34 @@ const Bt = class {
|
|
|
1469
1671
|
e.key === "Escape" && (this.showTimes = !1, this.timeInput.focus());
|
|
1470
1672
|
}
|
|
1471
1673
|
scrollToViewWithinParent(e) {
|
|
1472
|
-
var
|
|
1473
|
-
const t = this.times[e], n = (
|
|
1674
|
+
var l;
|
|
1675
|
+
const t = this.times[e], n = (l = this.el.shadowRoot) == null ? void 0 : l.getElementById(t.id.toString()), s = this.timeMenu;
|
|
1474
1676
|
this.ariaActivedescendant = t.id.toString();
|
|
1475
|
-
const
|
|
1476
|
-
|
|
1677
|
+
const o = n.getBoundingClientRect(), i = s.getBoundingClientRect();
|
|
1678
|
+
o.top < i.top ? s.scrollTop -= i.top - o.top : o.bottom > i.bottom && (s.scrollTop += o.bottom - i.bottom), o.left < i.left ? s.scrollLeft -= i.left - o.left : o.right > i.right && (s.scrollLeft += o.right - i.right);
|
|
1477
1679
|
}
|
|
1478
1680
|
focusOption(e) {
|
|
1479
|
-
var
|
|
1681
|
+
var o;
|
|
1480
1682
|
const t = this.times[e];
|
|
1481
1683
|
if (!t)
|
|
1482
1684
|
return;
|
|
1483
|
-
const n = t.id.toString(), s = (
|
|
1685
|
+
const n = t.id.toString(), s = (o = this.el.shadowRoot) == null ? void 0 : o.getElementById(n);
|
|
1484
1686
|
s && (s.focus(), s.scrollIntoView({ behavior: "smooth", block: "nearest" }));
|
|
1485
1687
|
}
|
|
1486
1688
|
render() {
|
|
1487
|
-
return a(k, { key: "
|
|
1689
|
+
return a(k, { key: "ce9cc8b8d7672d0e8389051d271e2369598f3e0f" }, a("div", { key: "c12333b0675d581b6f84b5d332d05deeceabab32", class: "time-picker", part: "time-picker" }, a("input", { key: "65e951f23fce142c529933e8f0311a124b32c948", type: "text", name: this.name, id: this.name, part: "time-input", class: {
|
|
1488
1690
|
"time-input": !0,
|
|
1489
1691
|
error: !!this.err || this.hasError
|
|
1490
1692
|
}, ref: (e) => this.timeInput = e, value: this.time, onClick: () => {
|
|
1491
1693
|
this.showTimes = !0, this.shouldAutoScroll = !0;
|
|
1492
|
-
}, "aria-haspopup": "listbox", "aria-label": this.name, "aria-expanded": this.showTimes ? "true" : "false", placeholder: this.placeholder, onKeyDown: (e) => this.handleComboboxKeyDown(e), onInput: (e) => this.handleOnInput(e), onBlur: (e) => this.handleTimeAutocomplete(e) }), this.err && a("div", { class: "invalid-time-icon" }), this.showTimes && a("div", { class: "times", ref: (e) => this.timeMenu = e }, a("ul", { tabindex: "-1", role: "listbox", "aria-label": this.name, "aria-activedescendant": this.ariaActivedescendant, onKeyDown: (e) => this.handleListboxKeydown(e) }, this.times.map((e) => a("li", { tabindex: "0", key: e.id, id: e.id.toString(), class: {
|
|
1694
|
+
}, "aria-haspopup": "listbox", "aria-label": this.name, "aria-expanded": this.showTimes ? "true" : "false", placeholder: this.placeholder, onKeyDown: (e) => this.handleComboboxKeyDown(e), onInput: (e) => this.handleOnInput(e), onBlur: (e) => this.handleTimeAutocomplete(e) }), this.err && a("div", { class: "invalid-time-icon" }), this.showTimes && a("div", { class: "times", part: "times", ref: (e) => this.timeMenu = e }, a("ul", { tabindex: "-1", role: "listbox", "aria-label": this.name, "aria-activedescendant": this.ariaActivedescendant, onKeyDown: (e) => this.handleListboxKeydown(e) }, this.times.map((e) => a("li", { tabindex: "0", key: e.id, id: e.id.toString(), class: {
|
|
1493
1695
|
focused: this.ariaActivedescendant === e.id.toString()
|
|
1494
1696
|
}, onClick: (t) => {
|
|
1495
1697
|
this.handleTimeChange(t, e.value), this.showTimes = !1, this.timeInput.focus();
|
|
1496
1698
|
}, role: "option" }, `${e.value}`)))), !this.showTimes && this.err && a("p", { class: "error", id: "email-error" }, this.err)));
|
|
1497
1699
|
}
|
|
1498
1700
|
get el() {
|
|
1499
|
-
return
|
|
1701
|
+
return x(this);
|
|
1500
1702
|
}
|
|
1501
1703
|
static get watchers() {
|
|
1502
1704
|
return {
|
|
@@ -1504,24 +1706,28 @@ const Bt = class {
|
|
|
1504
1706
|
};
|
|
1505
1707
|
}
|
|
1506
1708
|
};
|
|
1507
|
-
|
|
1709
|
+
an.style = nn;
|
|
1508
1710
|
export {
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
Se as
|
|
1523
|
-
Ee as
|
|
1524
|
-
|
|
1525
|
-
Le as
|
|
1526
|
-
|
|
1711
|
+
Ye as add_circle_icon,
|
|
1712
|
+
Je as button_component,
|
|
1713
|
+
Qe as calendar_info_icon,
|
|
1714
|
+
nt as calendar_patterns_icon,
|
|
1715
|
+
st as flow_icon,
|
|
1716
|
+
rt as location_icon,
|
|
1717
|
+
ft as location_off_icon,
|
|
1718
|
+
ut as multi_select_dropdown,
|
|
1719
|
+
Ce as nylas_availability_picker,
|
|
1720
|
+
Te as nylas_booking_calendar_picker,
|
|
1721
|
+
Oe as nylas_buffer_time,
|
|
1722
|
+
De as nylas_calendar_picker,
|
|
1723
|
+
Ie as nylas_custom_booking_flow,
|
|
1724
|
+
Se as nylas_event_description,
|
|
1725
|
+
Ee as nylas_event_duration,
|
|
1726
|
+
$e as nylas_event_info,
|
|
1727
|
+
Le as nylas_event_limits,
|
|
1728
|
+
Ae as nylas_event_title,
|
|
1729
|
+
Fe as nylas_limit_future_bookings,
|
|
1730
|
+
He as nylas_location_component,
|
|
1731
|
+
Me as nylas_min_cancellation_notice,
|
|
1732
|
+
an as nylas_time_window_picker
|
|
1527
1733
|
};
|