@nylas/react 1.1.0-canary.5 → 1.1.0-canary.8
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-080abc71.cjs +1 -0
- package/dist/{add-circle-icon_22.entry-9f634efd.js → add-circle-icon_22.entry-bda9be31.js} +619 -532
- package/dist/{archive-icon_7.entry-6649ed76.cjs → archive-icon_7.entry-ca20da59.cjs} +1 -1
- package/dist/{archive-icon_7.entry-24bac466.js → archive-icon_7.entry-e2954750.js} +21 -21
- package/dist/arrow-icon.entry-03a85113.js +15 -0
- package/dist/{arrow-icon.entry-1fffd526.cjs → arrow-icon.entry-548b027e.cjs} +1 -1
- package/dist/{bold-icon_3.entry-72e585da.js → bold-icon_3.entry-70ffa7f0.js} +4 -4
- package/dist/{bold-icon_3.entry-5a01fecf.cjs → bold-icon_3.entry-9a7b1869.cjs} +1 -1
- package/dist/{calendar-cancel-icon.entry-0b52bdc9.cjs → calendar-cancel-icon.entry-45388fdc.cjs} +1 -1
- package/dist/{calendar-cancel-icon.entry-247b530c.js → calendar-cancel-icon.entry-6bbc119f.js} +5 -5
- package/dist/{calendar-check-icon_2.entry-d7bb76c7.cjs → calendar-check-icon_2.entry-6628456c.cjs} +1 -1
- package/dist/{calendar-check-icon_2.entry-dbb2df49.js → calendar-check-icon_2.entry-f633f7a6.js} +10 -10
- package/dist/{calendar-icon.entry-911773c4.cjs → calendar-icon.entry-379b1fa1.cjs} +1 -1
- package/dist/{calendar-icon.entry-d64cb3d3.js → calendar-icon.entry-62b82c27.js} +5 -5
- package/dist/{chevron-icon_3.entry-db9f8217.js → chevron-icon_3.entry-74425e1f.js} +11 -11
- package/dist/{chevron-icon_3.entry-b72f4cdb.cjs → chevron-icon_3.entry-7ff803ad.cjs} +1 -1
- package/dist/close-icon.entry-18e140ed.cjs +1 -0
- package/dist/close-icon.entry-6a8ea4a7.js +15 -0
- package/dist/{constants-6ee60d6d-d5928e79.js → constants-f34b9c6e-95a17764.js} +10 -1
- package/dist/{constants-6ee60d6d-09ee73d9.cjs → constants-f34b9c6e-e7137e51.cjs} +2 -2
- package/dist/{document-refresh-icon.entry-ee9632d7.js → document-refresh-icon.entry-32c75418.js} +2 -2
- package/dist/{document-refresh-icon.entry-5e8cc2f0.cjs → document-refresh-icon.entry-f15f795a.cjs} +1 -1
- package/dist/{elements-dc5b338e-29ef67ec.cjs → elements-dc5b338e-1f23530f.cjs} +1 -1
- package/dist/{elements-dc5b338e-e87f79b6.js → elements-dc5b338e-62fe1cf3.js} +1 -1
- package/dist/{focus-visible-e8093c16-e7357f74.js → focus-visible-e8093c16-1f664070.js} +1 -1
- package/dist/{focus-visible-e8093c16-61d506d2.cjs → focus-visible-e8093c16-f0f05815.cjs} +1 -1
- package/dist/{forward-icon_6.entry-f054ad9d.js → forward-icon_6.entry-7fab04d7.js} +9 -9
- package/dist/{forward-icon_6.entry-cac8473a.cjs → forward-icon_6.entry-ef5e2e0f.cjs} +2 -2
- package/dist/{globe-icon.entry-bc484551.cjs → globe-icon.entry-398a9826.cjs} +1 -1
- package/dist/{globe-icon.entry-2fde6ac4.js → globe-icon.entry-b8e1efae.js} +4 -4
- package/dist/google-logo-icon_4.entry-38d5c2f2.cjs +1 -0
- package/dist/google-logo-icon_4.entry-5eca9538.js +381 -0
- package/dist/{index-22f7e49c.cjs → index-93c50de4.cjs} +11 -11
- package/dist/{index-f9ba9aa8.js → index-f93f6948.js} +890 -855
- package/dist/{index.es-f57e612a-1d17c676.js → index.es-df564f87-b773d34f.js} +1 -1
- package/dist/{index.es-f57e612a-95ca3e17.cjs → index.es-df564f87-e4a4092a.cjs} +1 -1
- package/dist/{info-icon_2.entry-e67844eb.cjs → info-icon_2.entry-2eb70f49.cjs} +1 -1
- package/dist/{info-icon_2.entry-dbf3931a.js → info-icon_2.entry-6bbfa6dc.js} +5 -5
- package/dist/loading-icon.entry-b563b2e6.js +15 -0
- package/dist/loading-icon.entry-fb04b893.cjs +1 -0
- package/dist/{mailbox-store-47fc8a1a-cd3516a7.cjs → mailbox-store-69c5c5f6-631eddb5.cjs} +1 -1
- package/dist/{mailbox-store-47fc8a1a-2365f20f.js → mailbox-store-69c5c5f6-8ab4670b.js} +2 -2
- package/dist/{nylas-additional-participants.entry-7c568149.cjs → nylas-additional-participants.entry-33a45477.cjs} +1 -1
- package/dist/{nylas-additional-participants.entry-e8426256.js → nylas-additional-participants.entry-4b214308.js} +9 -9
- package/dist/{nylas-booked-event-card_10.entry-6a664889.cjs → nylas-booked-event-card_10.entry-3e225025.cjs} +1 -1
- package/dist/{nylas-booked-event-card_10.entry-ef767733.js → nylas-booked-event-card_10.entry-e93bc290.js} +7 -7
- package/dist/{nylas-form-card.entry-d8506b1f.js → nylas-form-card.entry-0748fdd5.js} +16 -16
- package/dist/{nylas-form-card.entry-e44169b6.cjs → nylas-form-card.entry-eb3607bc.cjs} +1 -1
- package/dist/{nylas-if-state.entry-044c49d2.cjs → nylas-if-state.entry-276d61ad.cjs} +1 -1
- package/dist/{nylas-if-state.entry-98a336df.js → nylas-if-state.entry-f8abd025.js} +2 -2
- package/dist/{nylas-list-folders.entry-55ce3403.js → nylas-list-folders.entry-78cc680e.js} +3 -3
- package/dist/{nylas-list-folders.entry-509f9be4.cjs → nylas-list-folders.entry-afe02f0e.cjs} +1 -1
- package/dist/{nylas-list-threads.entry-1f57382a.js → nylas-list-threads.entry-217088de.js} +4 -4
- package/dist/{nylas-list-threads.entry-c36e2cf3.cjs → nylas-list-threads.entry-6395c12f.cjs} +1 -1
- package/dist/{nylas-login.entry-76358c2f.js → nylas-login.entry-e4d57589.js} +7 -7
- package/dist/{nylas-login.entry-66f542b8.cjs → nylas-login.entry-ec81e21b.cjs} +1 -1
- package/dist/{nylas-mailbox-pagination.entry-5562257a.js → nylas-mailbox-pagination.entry-069673aa.js} +2 -2
- package/dist/{nylas-mailbox-pagination.entry-89b0dd99.cjs → nylas-mailbox-pagination.entry-d4d929f1.cjs} +1 -1
- package/dist/{nylas-mailbox-toolbar-button.entry-6b1b5b15.js → nylas-mailbox-toolbar-button.entry-03c5f5c8.js} +8 -8
- package/dist/{nylas-mailbox-toolbar-button.entry-573e0429.cjs → nylas-mailbox-toolbar-button.entry-2b9e4431.cjs} +1 -1
- package/dist/{nylas-mailbox.entry-e21a2f50.cjs → nylas-mailbox.entry-1342178d.cjs} +1 -1
- package/dist/{nylas-mailbox.entry-97c503f2.js → nylas-mailbox.entry-7e6b4791.js} +4 -4
- package/dist/{nylas-provider.entry-61899957.cjs → nylas-provider.entry-0ae8e70a.cjs} +1 -1
- package/dist/{nylas-provider.entry-07e1e26a.js → nylas-provider.entry-498a7be9.js} +16 -16
- package/dist/{nylas-scheduler-editor.entry-e326c9de.js → nylas-scheduler-editor.entry-4de2bb97.js} +66 -66
- package/dist/{nylas-scheduler-editor.entry-60fe38ce.cjs → nylas-scheduler-editor.entry-72c91b7d.cjs} +3 -3
- package/dist/{nylas-scheduling.entry-d88289db.cjs → nylas-scheduling.entry-1a004916.cjs} +1 -1
- package/dist/{nylas-scheduling.entry-be0cc090.js → nylas-scheduling.entry-4e18ab43.js} +3 -3
- package/dist/{nylas-threads-refresh.entry-c71ee775.cjs → nylas-threads-refresh.entry-d020c89e.cjs} +1 -1
- package/dist/{nylas-threads-refresh.entry-8201f8dd.js → nylas-threads-refresh.entry-fc2d8028.js} +11 -11
- package/dist/{nylas-threads-search.entry-912a90a4.cjs → nylas-threads-search.entry-0abcbc10.cjs} +1 -1
- package/dist/{nylas-threads-search.entry-fc477e01.js → nylas-threads-search.entry-f92f7e30.js} +12 -12
- package/dist/{nylas-view-thread.entry-d2953ea8.js → nylas-view-thread.entry-2f1474cf.js} +6 -6
- package/dist/{nylas-view-thread.entry-af418ddb.cjs → nylas-view-thread.entry-56080c89.cjs} +1 -1
- package/dist/{people-icon.entry-73cfa6f5.cjs → people-icon.entry-431e5044.cjs} +1 -1
- package/dist/{people-icon.entry-4b598fde.js → people-icon.entry-b4778e15.js} +7 -7
- package/dist/{play-icon_2.entry-d1c2f823.js → play-icon_2.entry-24ffa01f.js} +8 -8
- package/dist/play-icon_2.entry-f97db395.cjs +1 -0
- package/dist/react.cjs +1 -1
- package/dist/react.js +11 -11
- package/dist/{refresh-icon.entry-6aedfce6.js → refresh-icon.entry-8395104b.js} +4 -4
- package/dist/{refresh-icon.entry-42d543d0.cjs → refresh-icon.entry-cf4416b8.cjs} +1 -1
- package/dist/{register-component-cf5c8420-dc1bc0a4.js → register-component-b9cfcbaf-c0147194.js} +1 -1
- package/dist/{register-component-cf5c8420-d3fb6bf9.cjs → register-component-b9cfcbaf-d40e1f3c.cjs} +1 -1
- package/dist/scheduler-config-store-07d98279-0610e42f.cjs +1 -0
- package/dist/scheduler-config-store-07d98279-3b70606c.js +24 -0
- package/dist/scheduler-store-24fd0e91-2dba20c2.cjs +1 -0
- package/dist/{scheduler-store-39d37291-4e8e9ff9.js → scheduler-store-24fd0e91-47098841.js} +89 -80
- package/dist/{time-period-selector.entry-f1e27a00.js → time-period-selector.entry-1e849c2e.js} +2 -2
- package/dist/{time-period-selector.entry-fb3d0178.cjs → time-period-selector.entry-d8f3462f.cjs} +1 -1
- package/dist/{translate-icon.entry-0d44b6cb.cjs → translate-icon.entry-66533238.cjs} +1 -1
- package/dist/{translate-icon.entry-3db947f5.js → translate-icon.entry-d847f706.js} +5 -5
- package/dist/{warning-icon.entry-a20657e4.cjs → warning-icon.entry-1f0f00ed.cjs} +1 -1
- package/dist/warning-icon.entry-b5db0151.js +15 -0
- package/package.json +3 -3
- package/dist/add-circle-icon_22.entry-e7ec6c34.cjs +0 -1
- package/dist/arrow-icon.entry-82e59ce4.js +0 -15
- package/dist/close-icon.entry-9d141bb4.js +0 -15
- package/dist/close-icon.entry-da590fa2.cjs +0 -1
- package/dist/google-logo-icon_4.entry-a9848399.cjs +0 -1
- package/dist/google-logo-icon_4.entry-dca87e45.js +0 -349
- package/dist/loading-icon.entry-4566cba8.cjs +0 -1
- package/dist/loading-icon.entry-ae4c2d7e.js +0 -15
- package/dist/play-icon_2.entry-1a487abb.cjs +0 -1
- package/dist/scheduler-config-store-6222c0ed-000f1a4f.js +0 -18
- package/dist/scheduler-config-store-6222c0ed-758621fb.cjs +0 -1
- package/dist/scheduler-store-39d37291-b66c052c.cjs +0 -1
- package/dist/warning-icon.entry-a8ea0fe0.js +0 -15
|
@@ -1,73 +1,73 @@
|
|
|
1
|
-
import { r as y, h as
|
|
2
|
-
import { R as
|
|
3
|
-
import { T as
|
|
1
|
+
import { r as y, h as i, c as w, d, H as x, g as _, z as W, A as M, B as ve, C as We, i as Ue, D as Z, E as ae, G as ie, I as ke, J as xe, K as U, L as Ze } from "./index-f93f6948.js";
|
|
2
|
+
import { R as C } from "./register-component-b9cfcbaf-c0147194.js";
|
|
3
|
+
import { T as we, E as _e } from "./constants-f34b9c6e-95a17764.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import "react-dom";
|
|
6
|
-
const
|
|
6
|
+
const Ye = ".sc-add-circle-icon-h{display:flex}", Ke = Ye, Ve = class {
|
|
7
7
|
constructor(e) {
|
|
8
8
|
y(this, e), this.width = "24", this.height = "25";
|
|
9
9
|
}
|
|
10
10
|
render() {
|
|
11
|
-
return
|
|
11
|
+
return i("svg", { key: "58ce81214aeed7ddc1ce5f76d674aba576422d48", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, i("path", { key: "2a47ed74601a5370f0300da06295a2b5969d7e5f", 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" }));
|
|
12
12
|
}
|
|
13
13
|
};
|
|
14
|
-
|
|
15
|
-
const
|
|
14
|
+
Ve.style = Ke;
|
|
15
|
+
const qe = "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}@media screen and (max-width: 768px){button.sc-button-component{width:100%}}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}", Je = qe, Ge = class {
|
|
16
16
|
constructor(e) {
|
|
17
17
|
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;
|
|
18
18
|
}
|
|
19
19
|
render() {
|
|
20
20
|
const e = `button-${this.variant}` + (this.disabled ? " disabled" : "");
|
|
21
|
-
return
|
|
21
|
+
return i("button", { key: "3ac840e8b65854c2e4bdabe93b21b5bcda99e4db", class: e, disabled: this.disabled, type: "type", onClick: this.clickHandler, onMouseOver: this.mouseOverHandler, onMouseOut: this.mouseOutHandler, onFocus: this.focusHandler, onBlur: this.blurHandler }, i("slot", { key: "110df0711566be0df89f2e04aed008dcaf91e9f3" }));
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
|
-
|
|
25
|
-
const
|
|
24
|
+
Ge.style = Je;
|
|
25
|
+
const Xe = ".sc-calendar-info-icon-h{display:flex}", Qe = Xe, et = class {
|
|
26
26
|
constructor(e) {
|
|
27
27
|
y(this, e), this.width = "20", this.height = "20";
|
|
28
28
|
}
|
|
29
29
|
render() {
|
|
30
|
-
return
|
|
30
|
+
return i("svg", { key: "4c290eae1d55ec9df96cbe6d9ba85d5d8b7ee102", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, i("path", { key: "a2a76a5d0183952d59f1d2f448dc7c460694e410", 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" }));
|
|
31
31
|
}
|
|
32
32
|
};
|
|
33
|
-
|
|
34
|
-
const
|
|
33
|
+
et.style = Qe;
|
|
34
|
+
const tt = ".sc-calendar-patterns-icon-h{display:flex}", nt = tt, at = class {
|
|
35
35
|
constructor(e) {
|
|
36
36
|
y(this, e), this.width = "20", this.height = "20";
|
|
37
37
|
}
|
|
38
38
|
render() {
|
|
39
|
-
return
|
|
39
|
+
return i("svg", { key: "cf8071f578ad04793f5bd5b446dccaa1f6d4c1a3", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, i("path", { key: "8e8a3c7d87bc41c6d6973a34863d05d996155c1d", 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" }));
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
|
-
|
|
43
|
-
const
|
|
42
|
+
at.style = nt;
|
|
43
|
+
const it = ".sc-flow-icon-h{display:flex}", st = it, ot = class {
|
|
44
44
|
constructor(e) {
|
|
45
45
|
y(this, e), this.width = "16", this.height = "12";
|
|
46
46
|
}
|
|
47
47
|
render() {
|
|
48
|
-
return
|
|
48
|
+
return i("svg", { key: "e0f4da46b751754406e8b0551890a1bffb1100e4", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, i("path", { key: "21997cb261d91c8589c3e87a01036dc8f91a8d9b", 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" }));
|
|
49
49
|
}
|
|
50
50
|
};
|
|
51
|
-
|
|
52
|
-
const
|
|
51
|
+
ot.style = st;
|
|
52
|
+
const lt = ".sc-location-icon-h{display:flex}", rt = lt, dt = class {
|
|
53
53
|
constructor(e) {
|
|
54
54
|
y(this, e), this.width = "16", this.height = "18";
|
|
55
55
|
}
|
|
56
56
|
render() {
|
|
57
|
-
return
|
|
57
|
+
return i("svg", { key: "4888ed340800392ac9bb38eb4b868fca595db537", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, i("path", { key: "20cfaacf5cb828569e0b4ec6d2e83fe3b5264b32", 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" }));
|
|
58
58
|
}
|
|
59
59
|
};
|
|
60
|
-
|
|
61
|
-
const
|
|
60
|
+
dt.style = rt;
|
|
61
|
+
const ct = ".sc-location-off-icon-h{display:flex}", ft = ct, pt = class {
|
|
62
62
|
constructor(e) {
|
|
63
63
|
y(this, e), this.width = "16", this.height = "18";
|
|
64
64
|
}
|
|
65
65
|
render() {
|
|
66
|
-
return
|
|
66
|
+
return i("svg", { key: "b61c56b0a012359592a4c2575f130ece6fd412c6", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, i("path", { key: "6be791c9a59fa3634f65881dfbca7adc5e3355d3", 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" }));
|
|
67
67
|
}
|
|
68
68
|
};
|
|
69
|
-
pt.style =
|
|
70
|
-
const
|
|
69
|
+
pt.style = ft;
|
|
70
|
+
const bt = ':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)}', ut = bt, ht = class {
|
|
71
71
|
constructor(e) {
|
|
72
72
|
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;
|
|
73
73
|
}
|
|
@@ -100,7 +100,7 @@ const ft = ':host{display:block;width:inherit;--nylas-primary:#2563eb;--nylas-er
|
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
handleListboxKeydown(e) {
|
|
103
|
-
const t = this.availableOptions, n = t.findIndex((
|
|
103
|
+
const t = this.availableOptions, n = t.findIndex((a) => a.value === this.ariaActivedescendant);
|
|
104
104
|
switch (e.key) {
|
|
105
105
|
case "ArrowDown":
|
|
106
106
|
case "Tab":
|
|
@@ -116,8 +116,8 @@ const ft = ':host{display:block;width:inherit;--nylas-primary:#2563eb;--nylas-er
|
|
|
116
116
|
break;
|
|
117
117
|
case "ArrowUp":
|
|
118
118
|
e.preventDefault();
|
|
119
|
-
const
|
|
120
|
-
this.ariaActivedescendant = t[
|
|
119
|
+
const a = n - 1 >= 0 ? n - 1 : t.length - 1;
|
|
120
|
+
this.ariaActivedescendant = t[a].value, this.focusOption(a);
|
|
121
121
|
break;
|
|
122
122
|
case "Enter":
|
|
123
123
|
e.preventDefault(), this.ariaActivedescendant && this.selectOption(t[n]);
|
|
@@ -132,42 +132,42 @@ const ft = ':host{display:block;width:inherit;--nylas-primary:#2563eb;--nylas-er
|
|
|
132
132
|
const t = this.availableOptions[e];
|
|
133
133
|
if (!t)
|
|
134
134
|
return;
|
|
135
|
-
const n = t.value,
|
|
136
|
-
|
|
135
|
+
const n = t.value, a = (o = this.el.shadowRoot) == null ? void 0 : o.getElementById(n);
|
|
136
|
+
a && (a.focus(), a.scrollIntoView({ behavior: "smooth", block: "nearest" }));
|
|
137
137
|
}
|
|
138
138
|
getSelectedOptions() {
|
|
139
139
|
return this.availableOptions.filter((e) => e.selected);
|
|
140
140
|
}
|
|
141
141
|
renderOption(e) {
|
|
142
|
-
return
|
|
142
|
+
return i("li", { key: e.value, id: e.value, role: "option", tabindex: "0", "aria-selected": e.selected ? "true" : "false", onClick: (t) => {
|
|
143
143
|
t.stopImmediatePropagation(), this.selectOption(e);
|
|
144
|
-
}, class: { selected: !!e.selected } },
|
|
144
|
+
}, class: { selected: !!e.selected } }, i("label", { htmlFor: e.value }, i("input", { "aria-hidden": "true", id: e.value, type: "checkbox", checked: e.selected }), i("span", null, e.label)));
|
|
145
145
|
}
|
|
146
146
|
render() {
|
|
147
147
|
var e, t;
|
|
148
|
-
return
|
|
148
|
+
return i(x, { key: "4ef13670e3dfbf55e023ac7532d93c48d21f3004" }, i("div", { key: "8626f138f5be677421697067460ef76d0a7cc697", class: "dropdown", part: "msd_dropdown" }, i("label", { key: "b723c488dac91c39f285aae1a3f7928844753bf1", class: "dropdown-label" }, this.label, i("slot", { key: "5bdec320647a41de57671c75523a453ccb07af2a", name: "label-icon", "aria-hidden": "true" })), i("button", { key: "f7d7cf144ac2fec93171b5ac6cd42be4be6b5c93", 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) }, i("slot", { key: "021e59628b8da260b308819614297c177a666334", name: "select-icon", "aria-hidden": "true" }), i("span", { key: "4a8c921538a23abe4c7efbeb176fb806587092c9", 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)), i("span", { key: "fc771549d102fb27e33d128504d09fa6151154e9", class: this.isOpen ? "open" : "closed", "aria-hidden": "true" }, i("chevron-icon", { key: "bd8282695d11bcfb617da05a75d0a2335650f705", width: "16", height: "16" }))), this.isOpen ? null : i("div", { class: "selected-options" }, this.getSelectedOptions().map((n) => i("span", { class: "selected-option" }, n.label, i("button", { key: n.label, onClick: () => this.selectOption(n) }, i("close-icon", null))))), this.isOpen ? i("div", { class: "dropdown-content", part: "msd_dropdown-content" }, i("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));
|
|
149
149
|
}
|
|
150
150
|
get el() {
|
|
151
|
-
return
|
|
151
|
+
return _(this);
|
|
152
152
|
}
|
|
153
153
|
};
|
|
154
|
-
|
|
155
|
-
const
|
|
156
|
-
var
|
|
157
|
-
var o = arguments.length,
|
|
154
|
+
ht.style = ut;
|
|
155
|
+
const mt = ':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)}', yt = mt;
|
|
156
|
+
var gt = function(e, t, n, a) {
|
|
157
|
+
var o = arguments.length, s = o < 3 ? t : a === null ? a = Object.getOwnPropertyDescriptor(t, n) : a, l;
|
|
158
158
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
159
|
-
|
|
159
|
+
s = Reflect.decorate(e, t, n, a);
|
|
160
160
|
else
|
|
161
161
|
for (var r = e.length - 1; r >= 0; r--)
|
|
162
|
-
(l = e[r]) && (
|
|
163
|
-
return o > 3 &&
|
|
162
|
+
(l = e[r]) && (s = (o < 3 ? l(s) : o > 3 ? l(t, n, s) : l(t, n)) || s);
|
|
163
|
+
return o > 3 && s && Object.defineProperty(t, n, s), s;
|
|
164
164
|
}, se = function(e, t) {
|
|
165
165
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
166
166
|
return Reflect.metadata(e, t);
|
|
167
167
|
};
|
|
168
168
|
const Ce = class {
|
|
169
169
|
constructor(e) {
|
|
170
|
-
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 = {
|
|
170
|
+
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.selectedConfiguration = void 0, this.openHours = void 0, this.name = "availability", this.defaultTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone, this.schedule = {
|
|
171
171
|
SUN: [],
|
|
172
172
|
MON: [{ start: "09:00am", end: "05:00pm" }],
|
|
173
173
|
TUE: [{ start: "09:00am", end: "05:00pm" }],
|
|
@@ -180,27 +180,38 @@ const Ce = class {
|
|
|
180
180
|
elementNameChangedHandler(e) {
|
|
181
181
|
d("nylas-calendar-picker", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
182
182
|
}
|
|
183
|
+
configChangedHandler(e) {
|
|
184
|
+
var n, a, o;
|
|
185
|
+
const t = (n = e == null ? void 0 : e.participants) == null ? void 0 : n.find((s) => s.is_organizer);
|
|
186
|
+
t && ((a = t == null ? void 0 : t.availability) != null && a.open_hours) && this.openHoursToSchedule((o = t == null ? void 0 : t.availability) == null ? void 0 : o.open_hours);
|
|
187
|
+
}
|
|
183
188
|
scheduleChanged(e, t) {
|
|
184
189
|
var n;
|
|
185
190
|
if (e !== t) {
|
|
186
191
|
this.valueChanged.emit({
|
|
187
|
-
value:
|
|
192
|
+
value: {
|
|
193
|
+
openHours: this.scheduleToOpenHours(e),
|
|
194
|
+
timezone: this.timezone
|
|
195
|
+
},
|
|
188
196
|
name: this.name
|
|
189
197
|
});
|
|
190
|
-
let
|
|
198
|
+
let a = {};
|
|
191
199
|
if (Object.keys(e).forEach((o) => {
|
|
192
|
-
const
|
|
193
|
-
if (
|
|
194
|
-
const l = this.getOverlaps(
|
|
195
|
-
l.length > 0 && (
|
|
200
|
+
const s = e[o];
|
|
201
|
+
if (s.length > 0) {
|
|
202
|
+
const l = this.getOverlaps(s);
|
|
203
|
+
l.length > 0 && (a[o] = l);
|
|
196
204
|
}
|
|
197
|
-
}), this.overlapDays =
|
|
205
|
+
}), this.overlapDays = a, typeof this.internals.setFormValue != "function")
|
|
198
206
|
return;
|
|
199
|
-
if (Object.keys(
|
|
200
|
-
const o = (n = this.host.shadowRoot) == null ? void 0 : n.getElementById(Object.keys(
|
|
207
|
+
if (Object.keys(a).length > 0) {
|
|
208
|
+
const o = (n = this.host.shadowRoot) == null ? void 0 : n.getElementById(Object.keys(a)[0]);
|
|
201
209
|
o && this.internals.setValidity({ customError: !0 }, "Overlapping time ranges found", o);
|
|
202
210
|
} else
|
|
203
|
-
this.internals.setValidity({ customError: !1 }), this.internals.setFormValue(JSON.stringify(
|
|
211
|
+
this.internals.setValidity({ customError: !1 }), this.internals.setFormValue(JSON.stringify({
|
|
212
|
+
openHours: this.scheduleToOpenHours(this.schedule),
|
|
213
|
+
timezone: this.timezone
|
|
214
|
+
}));
|
|
204
215
|
}
|
|
205
216
|
}
|
|
206
217
|
selectedOptionChangedHandler(e) {
|
|
@@ -208,7 +219,10 @@ const Ce = class {
|
|
|
208
219
|
if (t === "timezone") {
|
|
209
220
|
if (this.timezone = n, typeof this.internals.setFormValue != "function")
|
|
210
221
|
return;
|
|
211
|
-
this.internals.setFormValue(JSON.stringify(
|
|
222
|
+
this.internals.setFormValue(JSON.stringify({
|
|
223
|
+
openHours: this.scheduleToOpenHours(this.schedule),
|
|
224
|
+
timezone: this.timezone
|
|
225
|
+
}));
|
|
212
226
|
}
|
|
213
227
|
}
|
|
214
228
|
connectedCallback() {
|
|
@@ -221,67 +235,70 @@ const Ce = class {
|
|
|
221
235
|
d("nylas-availability-picker", "componentWillLoad"), this.host.setAttribute("name", this.name);
|
|
222
236
|
}
|
|
223
237
|
componentDidLoad() {
|
|
224
|
-
d("nylas-availability-picker", "componentDidLoad"), this.openHours && this.openHours.length > 0 && this.
|
|
238
|
+
d("nylas-availability-picker", "componentDidLoad"), this.openHours && this.openHours.length > 0 && this.openHoursToSchedule(this.openHours), typeof this.internals.setFormValue == "function" && this.internals.setFormValue(JSON.stringify({
|
|
239
|
+
openHours: this.scheduleToOpenHours(this.schedule),
|
|
240
|
+
timezone: this.timezone
|
|
241
|
+
}));
|
|
225
242
|
}
|
|
226
243
|
getOverlaps(e) {
|
|
227
|
-
let t = e.map((
|
|
228
|
-
start:
|
|
229
|
-
end:
|
|
244
|
+
let t = e.map((a, o) => ({
|
|
245
|
+
start: W(a.start),
|
|
246
|
+
end: W(a.end),
|
|
230
247
|
originalIndex: o
|
|
231
248
|
}));
|
|
232
|
-
t.sort((
|
|
249
|
+
t.sort((a, o) => a.start - o.start);
|
|
233
250
|
let n = [];
|
|
234
|
-
for (let
|
|
235
|
-
t[
|
|
236
|
-
return n.sort((
|
|
251
|
+
for (let a = 1; a < t.length; a++)
|
|
252
|
+
t[a].start < t[a - 1].end && (n.includes(t[a].originalIndex) || n.push(t[a].originalIndex), n.includes(t[a - 1].originalIndex) || n.push(t[a - 1].originalIndex));
|
|
253
|
+
return n.sort((a, o) => a - o);
|
|
237
254
|
}
|
|
238
255
|
addTimeRange(e) {
|
|
239
|
-
const t = this.schedule[e], n = 0,
|
|
256
|
+
const t = this.schedule[e], n = 0, a = 1425;
|
|
240
257
|
if (t.length === 0)
|
|
241
258
|
this.schedule[e] = [{ start: "09:00am", end: "05:00pm" }];
|
|
242
259
|
else {
|
|
243
260
|
const o = t.map((l) => ({
|
|
244
|
-
start:
|
|
245
|
-
end:
|
|
246
|
-
})).sort((l, r) => l.start - r.start),
|
|
247
|
-
if (
|
|
261
|
+
start: W(l.start),
|
|
262
|
+
end: W(l.end)
|
|
263
|
+
})).sort((l, r) => l.start - r.start), s = o[o.length - 1].end;
|
|
264
|
+
if (s + 60 <= a)
|
|
248
265
|
this.schedule[e].push({
|
|
249
|
-
start:
|
|
250
|
-
end:
|
|
266
|
+
start: M(U(s)),
|
|
267
|
+
end: M(U(s + 60))
|
|
251
268
|
});
|
|
252
269
|
else {
|
|
253
270
|
let l = !1;
|
|
254
271
|
if (o[0].start > n + 60 && (this.schedule[e].push({
|
|
255
|
-
start:
|
|
256
|
-
end:
|
|
272
|
+
start: M(U(n)),
|
|
273
|
+
end: M(U(n + 60))
|
|
257
274
|
}), l = !0), !l)
|
|
258
275
|
for (let r = 0; r < o.length - 1; r++) {
|
|
259
|
-
const
|
|
260
|
-
if (o[r + 1].start -
|
|
276
|
+
const u = o[r].end;
|
|
277
|
+
if (o[r + 1].start - u >= 60) {
|
|
261
278
|
this.schedule[e].push({
|
|
262
|
-
start:
|
|
263
|
-
end:
|
|
279
|
+
start: M(U(u)),
|
|
280
|
+
end: M(U(u + 60))
|
|
264
281
|
});
|
|
265
282
|
break;
|
|
266
283
|
}
|
|
267
284
|
}
|
|
268
285
|
}
|
|
269
286
|
}
|
|
270
|
-
this.schedule[e].sort((o,
|
|
287
|
+
this.schedule[e].sort((o, s) => W(o.start) - W(s.start)), this.schedule = { ...this.schedule };
|
|
271
288
|
}
|
|
272
289
|
removeTimeRange(e, t) {
|
|
273
290
|
this.schedule[e].splice(t, 1), this.schedule = { ...this.schedule };
|
|
274
291
|
}
|
|
275
292
|
setTime(e, t, n) {
|
|
276
|
-
const [
|
|
277
|
-
o === "start" ? this.schedule[
|
|
293
|
+
const [a, o] = e.split("_"), [s, l] = a.split(":");
|
|
294
|
+
o === "start" ? this.schedule[s][l].start = n : o === "end" && (this.schedule[s][l].end = n), this.internals.setValidity({ customError: !1 }), this.schedule = { ...this.schedule };
|
|
278
295
|
}
|
|
279
296
|
setFormError(e, t, n) {
|
|
280
297
|
var l;
|
|
281
|
-
const [
|
|
282
|
-
|
|
298
|
+
const [a, o] = e.split("_"), s = (l = this.host.shadowRoot) == null ? void 0 : l.getElementById(e);
|
|
299
|
+
s && this.internals.setValidity({ customError: !0 }, `Invalid ${o} time`, s);
|
|
283
300
|
}
|
|
284
|
-
|
|
301
|
+
openHoursToSchedule(e) {
|
|
285
302
|
const t = {
|
|
286
303
|
SUN: [],
|
|
287
304
|
MON: [],
|
|
@@ -292,95 +309,96 @@ const Ce = class {
|
|
|
292
309
|
SAT: []
|
|
293
310
|
};
|
|
294
311
|
e.forEach((n) => {
|
|
295
|
-
n.days.forEach((
|
|
296
|
-
const o = this.getDayKey(
|
|
297
|
-
let
|
|
298
|
-
t[o] && (
|
|
312
|
+
n.days.forEach((a) => {
|
|
313
|
+
const o = this.getDayKey(a), s = M(n.start), l = M(n.end), r = { start: s, end: l };
|
|
314
|
+
let u = !1;
|
|
315
|
+
t[o] && (u = t[o].some((f) => f.start === r.start && f.end === r.end)), u || (t[o] ? t[o].push(r) : t[o] = [r]);
|
|
299
316
|
});
|
|
300
|
-
}),
|
|
317
|
+
}), this.timezone = this.defaultTimezone, this.schedule = t;
|
|
301
318
|
}
|
|
302
319
|
getDayKey(e) {
|
|
303
320
|
return ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"][e];
|
|
304
321
|
}
|
|
305
|
-
scheduleToOpenHours(e
|
|
306
|
-
const
|
|
307
|
-
let
|
|
308
|
-
|
|
309
|
-
e[
|
|
310
|
-
const
|
|
311
|
-
if (!
|
|
312
|
-
|
|
322
|
+
scheduleToOpenHours(e) {
|
|
323
|
+
const t = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"];
|
|
324
|
+
let n = /* @__PURE__ */ new Map();
|
|
325
|
+
t.forEach((o, s) => {
|
|
326
|
+
e[o] && e[o].forEach((l) => {
|
|
327
|
+
const r = ve(l.start), u = ve(l.end), f = `${r}-${u}`;
|
|
328
|
+
if (!n.has(f))
|
|
329
|
+
n.set(f, { days: [s], start: r, end: u });
|
|
313
330
|
else {
|
|
314
|
-
let
|
|
315
|
-
|
|
331
|
+
let p = n.get(f);
|
|
332
|
+
p && (p.days.push(s), n.set(f, p));
|
|
316
333
|
}
|
|
317
334
|
});
|
|
318
335
|
});
|
|
319
|
-
let
|
|
320
|
-
return
|
|
321
|
-
|
|
322
|
-
days:
|
|
323
|
-
start:
|
|
324
|
-
end:
|
|
325
|
-
timezone: t
|
|
336
|
+
let a = [];
|
|
337
|
+
return n.forEach((o, s) => {
|
|
338
|
+
a.push({
|
|
339
|
+
days: o.days,
|
|
340
|
+
start: o.start,
|
|
341
|
+
end: o.end
|
|
326
342
|
});
|
|
327
|
-
}),
|
|
343
|
+
}), a;
|
|
328
344
|
}
|
|
329
345
|
render() {
|
|
330
|
-
const e = Object.keys(
|
|
331
|
-
label:
|
|
346
|
+
const e = Object.keys(we).map((t) => ({
|
|
347
|
+
label: we[t],
|
|
332
348
|
value: t
|
|
333
349
|
}));
|
|
334
|
-
return
|
|
335
|
-
const n = t,
|
|
336
|
-
return
|
|
337
|
-
|
|
338
|
-
} }),
|
|
339
|
-
var
|
|
340
|
-
const l = `${t}:${
|
|
341
|
-
return
|
|
342
|
-
}),
|
|
350
|
+
return i(x, { key: "396ba889df619966df24cb5eb33de1a77be3a2ba" }, i("div", { key: "bb2a28befc3aa0481fe265a6af99049b528fca42", class: "nylas-availability-picker" }, i("div", { key: "729c24276d5e773dfbc67791fede7aa0c0bcc747", class: "header", part: "nap__header" }, i("h3", { key: "ba7c73778a8b3dd197ca850cead346d2f00836b7" }, "General availability"), i("p", { key: "6f946e8e00921f0620b16a3412f290f176dd5b9b" }, "Set your availability for scheduling meetings.")), i("div", { key: "7753c38b6160be28c495cc9803015e0dc0003b2a", class: "content" }, i("div", { key: "8d79379263f772f29443b24f5996d017db12e764", class: "select-timezone", part: "nap__select-timezone" }, i("h4", { key: "e6a3658ecf3d92c0dda352532a3a0c71fb59f96e", class: "sub-header" }, "Select timezone", i("span", { key: "fdb95f85f111a1557897309ff0bd682a77499684", class: "icon" }, i("tooltip-component", { key: "37b47d8e5b24bd4620e6be932ea23c8553b4822f" }, i("info-icon", { key: "f1192d767cc0e1c67f989b47af093e3539d7c55c", slot: "tooltip-icon" }), i("span", { key: "2b3b949fc18e0118199a3ed9668ec0ca19283c79", slot: "tooltip-content" }, "Select your timezone for displaying availability.")))), i("select-dropdown", { key: "4729bd6e7b7c05a3fb47cf94010a00db51394c7e", 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) }, i("span", { key: "2157b7fb691541f42713a77dc1338dbb9f0e26c2", slot: "select-icon" }, i("globe-icon", { key: "17138c37b7df667e46873af1caa5278120fa4ce1", width: "20", height: "20" })))), i("div", { key: "9a49a84812b5fb544ebfd07d5dd1aba35679224e", class: "availability", part: "nap__availability" }, Object.keys(this.schedule).map((t) => {
|
|
351
|
+
const n = t, a = this.schedule[t];
|
|
352
|
+
return i("div", { class: "availability-day" }, i("div", { class: "day", part: "nap__day" }, i("input", { type: "checkbox", name: n, id: n, checked: a.length > 0, onClick: () => {
|
|
353
|
+
a.length > 0 ? this.schedule[n] = [] : this.schedule[n] = [{ start: "09:00am", end: "05:00pm" }], this.schedule = { ...this.schedule };
|
|
354
|
+
} }), i("label", { htmlFor: n, "aria-label": "Select day" }, n)), i("div", { class: "time-ranges", part: "nap__time-ranges" }, a.length ? null : i("span", { class: "unavailable" }, "Unavailable"), a.length > 0 && a.map((o, s) => {
|
|
355
|
+
var u, f;
|
|
356
|
+
const l = `${t}:${s}_start`, r = `${t}:${s}_end`;
|
|
357
|
+
return i("div", { class: "time-range", part: "nap__time-range" }, i("div", { class: "pickers" }, i("nylas-time-window-picker", { id: l, hasError: (u = this.overlapDays[n]) == null ? void 0 : u.includes(s), 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: (p, h) => this.setTime(l, p, h), setFormError: (p, h) => this.setFormError(l, p, h) }), i("span", null, " - "), i("nylas-time-window-picker", { id: r, hasError: (f = this.overlapDays[n]) == null ? void 0 : f.includes(s), 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: (p, h) => this.setTime(r, p, h), setFormError: (p, h) => this.setFormError(r, p, h) })), i("button", { onClick: () => this.removeTimeRange(n, s) }, i("close-icon", null)));
|
|
358
|
+
}), i("p", { class: "error" }, this.overlapDays[n] ? "Overlapping time ranges" : "")), i("div", null, a.length > 0 ? i("button", { onClick: () => this.addTimeRange(n), part: "nap__add-time-range" }, i("add-circle-icon", null)) : null));
|
|
343
359
|
})))));
|
|
344
360
|
}
|
|
345
361
|
static get formAssociated() {
|
|
346
362
|
return !0;
|
|
347
363
|
}
|
|
348
364
|
get host() {
|
|
349
|
-
return
|
|
365
|
+
return _(this);
|
|
350
366
|
}
|
|
351
367
|
static get watchers() {
|
|
352
368
|
return {
|
|
353
369
|
name: ["elementNameChangedHandler"],
|
|
370
|
+
selectedConfiguration: ["configChangedHandler"],
|
|
354
371
|
schedule: ["scheduleChanged"]
|
|
355
372
|
};
|
|
356
373
|
}
|
|
357
374
|
};
|
|
358
|
-
|
|
359
|
-
|
|
375
|
+
gt([
|
|
376
|
+
C({
|
|
360
377
|
name: "nylas-availability-picker",
|
|
378
|
+
stateToProps: /* @__PURE__ */ new Map([["schedulerConfig.selectedConfiguration", "selectedConfiguration"]]),
|
|
361
379
|
fireRegisterEvent: !0
|
|
362
380
|
}),
|
|
363
381
|
se("design:type", Function),
|
|
364
382
|
se("design:paramtypes", []),
|
|
365
383
|
se("design:returntype", void 0)
|
|
366
384
|
], Ce.prototype, "render", null);
|
|
367
|
-
Ce.style =
|
|
368
|
-
const
|
|
369
|
-
var
|
|
370
|
-
var o = arguments.length,
|
|
385
|
+
Ce.style = yt;
|
|
386
|
+
const vt = ':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}', kt = vt;
|
|
387
|
+
var xt = function(e, t, n, a) {
|
|
388
|
+
var o = arguments.length, s = o < 3 ? t : a === null ? a = Object.getOwnPropertyDescriptor(t, n) : a, l;
|
|
371
389
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
372
|
-
|
|
390
|
+
s = Reflect.decorate(e, t, n, a);
|
|
373
391
|
else
|
|
374
392
|
for (var r = e.length - 1; r >= 0; r--)
|
|
375
|
-
(l = e[r]) && (
|
|
376
|
-
return o > 3 &&
|
|
393
|
+
(l = e[r]) && (s = (o < 3 ? l(s) : o > 3 ? l(t, n, s) : l(t, n)) || s);
|
|
394
|
+
return o > 3 && s && Object.defineProperty(t, n, s), s;
|
|
377
395
|
}, oe = function(e, t) {
|
|
378
396
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
379
397
|
return Reflect.metadata(e, t);
|
|
380
398
|
};
|
|
381
399
|
const Te = class {
|
|
382
400
|
constructor(e) {
|
|
383
|
-
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 = "";
|
|
401
|
+
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.currentUser = void 0, this.name = "booking-calendar", this.defaultBookingCalendar = "", this.selectedCalendar = "";
|
|
384
402
|
}
|
|
385
403
|
connectedCallback() {
|
|
386
404
|
d("nylas-booking-calendar-picker", "connectedCallback");
|
|
@@ -392,7 +410,8 @@ const Te = class {
|
|
|
392
410
|
d("nylas-booking-calendar-picker", "componentWillLoad"), this.host.setAttribute("name", this.name);
|
|
393
411
|
}
|
|
394
412
|
componentDidLoad() {
|
|
395
|
-
|
|
413
|
+
var e, t;
|
|
414
|
+
d("nylas-booking-calendar-picker", "componentDidLoad"), this.defaultBookingCalendar = this.defaultBookingCalendar || ((e = this.currentUser) == null ? void 0 : e.email) || "", typeof this.internals.setFormValue == "function" && this.internals.setFormValue(this.defaultBookingCalendar.toString(), "booking-calendar"), this.selectedCalendar = this.defaultBookingCalendar || ((t = this.currentUser) == null ? void 0 : t.email) || "";
|
|
396
415
|
}
|
|
397
416
|
componentWillUpdate() {
|
|
398
417
|
d("nylas-booking-calendar-picker", "componentWillUpdate");
|
|
@@ -412,10 +431,10 @@ const Te = class {
|
|
|
412
431
|
selectedOptionChangedHandler(e) {
|
|
413
432
|
d("nylas-booking-calendar-picker", "selectedOptionChangedHandler", e.detail);
|
|
414
433
|
const t = (n) => {
|
|
415
|
-
const { value:
|
|
416
|
-
this.selectedCalendar =
|
|
434
|
+
const { value: a } = n.detail;
|
|
435
|
+
this.selectedCalendar = a, this.internals.setFormValue(a.toString(), this.name);
|
|
417
436
|
};
|
|
418
|
-
this.valueChanged.emit({
|
|
437
|
+
this.valueChanged.emit({ value: e.detail.value, name: this.name, valueChanged: t });
|
|
419
438
|
}
|
|
420
439
|
render() {
|
|
421
440
|
var t;
|
|
@@ -423,13 +442,13 @@ const Te = class {
|
|
|
423
442
|
value: n.id,
|
|
424
443
|
label: n.name
|
|
425
444
|
}))) ?? [];
|
|
426
|
-
return
|
|
445
|
+
return i(x, null, i("div", { class: "nylas-booking-calendar-picker", part: "nbcp" }, i("div", { class: "header", part: "nbcp__header" }, i("h3", null, "Calendar booking"), i("p", null, "Choose calendar where you’d like the event bookings to show up.")), e.length > 0 ? i("div", { class: "nylas-booking-calendar-picker__dropdown" }, i("span", { class: "label", part: "nbcp__input-label" }, "Select a calendar to book meetings on", i("tooltip-component", null, i("info-icon", { slot: "tooltip-icon" }), i("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."))), i("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] })) : i("div", { class: "nylas-booking-calendar-picker__loading" }, i("span", { class: "label" }, "Select a calendar to book meetings on ", i("info-icon", null)), i("div", { class: "loading-button" }, i("span", null, "Loading...")))));
|
|
427
446
|
}
|
|
428
447
|
static get formAssociated() {
|
|
429
448
|
return !0;
|
|
430
449
|
}
|
|
431
450
|
get host() {
|
|
432
|
-
return
|
|
451
|
+
return _(this);
|
|
433
452
|
}
|
|
434
453
|
static get watchers() {
|
|
435
454
|
return {
|
|
@@ -437,9 +456,13 @@ const Te = class {
|
|
|
437
456
|
};
|
|
438
457
|
}
|
|
439
458
|
};
|
|
440
|
-
|
|
441
|
-
|
|
459
|
+
xt([
|
|
460
|
+
C({
|
|
442
461
|
name: "nylas-booking-calendar-picker",
|
|
462
|
+
stateToProps: /* @__PURE__ */ new Map([
|
|
463
|
+
["schedulerConfig.calendars", "calendars"],
|
|
464
|
+
["schedulerConfig.currentUser", "currentUser"]
|
|
465
|
+
]),
|
|
443
466
|
eventToProps: {
|
|
444
467
|
valueChanged: async (e, t) => {
|
|
445
468
|
const { valueChanged: n } = e.detail;
|
|
@@ -452,21 +475,21 @@ kt([
|
|
|
452
475
|
oe("design:paramtypes", []),
|
|
453
476
|
oe("design:returntype", void 0)
|
|
454
477
|
], Te.prototype, "render", null);
|
|
455
|
-
Te.style =
|
|
456
|
-
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}',
|
|
457
|
-
var
|
|
458
|
-
var o = arguments.length,
|
|
478
|
+
Te.style = kt;
|
|
479
|
+
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}', _t = wt;
|
|
480
|
+
var Ct = function(e, t, n, a) {
|
|
481
|
+
var o = arguments.length, s = o < 3 ? t : a === null ? a = Object.getOwnPropertyDescriptor(t, n) : a, l;
|
|
459
482
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
460
|
-
|
|
483
|
+
s = Reflect.decorate(e, t, n, a);
|
|
461
484
|
else
|
|
462
485
|
for (var r = e.length - 1; r >= 0; r--)
|
|
463
|
-
(l = e[r]) && (
|
|
464
|
-
return o > 3 &&
|
|
486
|
+
(l = e[r]) && (s = (o < 3 ? l(s) : o > 3 ? l(t, n, s) : l(t, n)) || s);
|
|
487
|
+
return o > 3 && s && Object.defineProperty(t, n, s), s;
|
|
465
488
|
}, le = function(e, t) {
|
|
466
489
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
467
490
|
return Reflect.metadata(e, t);
|
|
468
491
|
};
|
|
469
|
-
const
|
|
492
|
+
const Ee = class {
|
|
470
493
|
constructor(e) {
|
|
471
494
|
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;
|
|
472
495
|
}
|
|
@@ -507,58 +530,58 @@ const Oe = class {
|
|
|
507
530
|
selectedOptionChangedHandler(e) {
|
|
508
531
|
d("nylas-buffer-time", "selectedOptionChangedHandler", e.detail);
|
|
509
532
|
const t = (n) => {
|
|
510
|
-
const { value:
|
|
511
|
-
o === "before-buffer-time" ? this.selectedBeforeBufferTime = parseInt(
|
|
512
|
-
const
|
|
533
|
+
const { value: a, name: o } = n.detail;
|
|
534
|
+
o === "before-buffer-time" ? this.selectedBeforeBufferTime = parseInt(a) : o === "after-buffer-time" && (this.selectedAfterBufferTime = parseInt(a));
|
|
535
|
+
const s = {
|
|
513
536
|
before: this.selectedBeforeBufferTime,
|
|
514
537
|
after: this.selectedAfterBufferTime
|
|
515
538
|
};
|
|
516
|
-
this.internals.setFormValue(JSON.stringify(
|
|
539
|
+
this.internals.setFormValue(JSON.stringify(s), "booking-calendar");
|
|
517
540
|
};
|
|
518
541
|
this.valueChanged.emit({ ...e.detail, valueChanged: t });
|
|
519
542
|
}
|
|
520
543
|
renderPreview() {
|
|
521
|
-
const
|
|
522
|
-
const r = Math.floor(l / 30),
|
|
544
|
+
const a = (l) => {
|
|
545
|
+
const r = Math.floor(l / 30), u = l % 30 / 30 * 20;
|
|
523
546
|
return {
|
|
524
547
|
fullSlots: r,
|
|
525
|
-
partialFillHeight:
|
|
548
|
+
partialFillHeight: u
|
|
526
549
|
};
|
|
527
550
|
}, o = () => {
|
|
528
|
-
const { fullSlots: l, partialFillHeight: r } =
|
|
529
|
-
return Array.from({ length: 4 }, (
|
|
530
|
-
const
|
|
551
|
+
const { fullSlots: l, partialFillHeight: r } = a(this.selectedBeforeBufferTime);
|
|
552
|
+
return Array.from({ length: 4 }, (u, f) => {
|
|
553
|
+
const p = this.selectedBeforeBufferTime > 0 && f > 4 - l - 1, h = this.selectedBeforeBufferTime > 0 && f === 4 - l - 1 && r > 0;
|
|
531
554
|
let v = {};
|
|
532
|
-
return
|
|
555
|
+
return p && !h ? v.backgroundColor = "var(--nylas-base-100)" : h && (v.background = `linear-gradient(to top, var(--nylas-base-100) ${r}px, transparent 0)`), i("div", { key: f, class: `slot ${p ? "active" : ""}`, style: {
|
|
533
556
|
height: "20px",
|
|
534
557
|
...v
|
|
535
558
|
} });
|
|
536
559
|
});
|
|
537
|
-
},
|
|
538
|
-
const { fullSlots: l, partialFillHeight: r } =
|
|
539
|
-
return Array.from({ length: 4 }, (
|
|
540
|
-
const
|
|
560
|
+
}, s = () => {
|
|
561
|
+
const { fullSlots: l, partialFillHeight: r } = a(this.selectedAfterBufferTime);
|
|
562
|
+
return Array.from({ length: 4 }, (u, f) => {
|
|
563
|
+
const p = this.selectedAfterBufferTime > 0 && f < l, h = f === l && r > 0;
|
|
541
564
|
let v = {};
|
|
542
|
-
return
|
|
565
|
+
return p && !h ? v.backgroundColor = "var(--nylas-base-100)" : h && (v.background = `linear-gradient(to bottom, var(--nylas-base-100) ${r}px, transparent 0)`), i("div", { key: f, class: `slot ${p ? "active" : ""}`, style: {
|
|
543
566
|
height: "20px",
|
|
544
567
|
...v
|
|
545
568
|
} });
|
|
546
569
|
});
|
|
547
570
|
};
|
|
548
|
-
return
|
|
571
|
+
return i("div", { class: "preview-container" }, o(), i("div", { class: "event-slot", style: { height: "40px" } }), s());
|
|
549
572
|
}
|
|
550
573
|
render() {
|
|
551
574
|
const e = Array.from({ length: 121 }, (t, n) => ({
|
|
552
575
|
label: n.toString(),
|
|
553
576
|
value: n
|
|
554
577
|
}));
|
|
555
|
-
return
|
|
578
|
+
return i(x, null, i("div", { class: "nylas-buffer-time", part: "nbt" }, i("div", { class: "header", part: "nbt__header" }, i("h3", null, "Buffer time"), i("p", null, "Add buffer time before and after the event.")), i("div", { class: "nylas-buffer-time__body", part: "nbt__body" }, i("div", { class: "nylas-buffer-time__dropdown" }, i("div", { class: "nylas-buffer-time__row" }, i("label", null, "Before the event"), i("div", { class: "dropdown-container" }, i("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] }), i("span", null, "mins"))), i("div", { class: "nylas-buffer-time__row" }, i("label", null, "After the event"), i("div", { class: "dropdown-container" }, i("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] }), i("span", null, "mins")))), i("div", { class: "nylas-buffer-time__preview", part: "nbt__preview" }, i("h4", null, "PREVIEW"), this.renderPreview()))));
|
|
556
579
|
}
|
|
557
580
|
static get formAssociated() {
|
|
558
581
|
return !0;
|
|
559
582
|
}
|
|
560
583
|
get host() {
|
|
561
|
-
return
|
|
584
|
+
return _(this);
|
|
562
585
|
}
|
|
563
586
|
static get watchers() {
|
|
564
587
|
return {
|
|
@@ -566,8 +589,8 @@ const Oe = class {
|
|
|
566
589
|
};
|
|
567
590
|
}
|
|
568
591
|
};
|
|
569
|
-
|
|
570
|
-
|
|
592
|
+
Ct([
|
|
593
|
+
C({
|
|
571
594
|
name: "nylas-buffer-time",
|
|
572
595
|
eventToProps: {
|
|
573
596
|
valueChanged: async (e, t) => {
|
|
@@ -580,24 +603,27 @@ _t([
|
|
|
580
603
|
le("design:type", Function),
|
|
581
604
|
le("design:paramtypes", []),
|
|
582
605
|
le("design:returntype", void 0)
|
|
583
|
-
],
|
|
584
|
-
|
|
585
|
-
const
|
|
586
|
-
var Ot = function(e, t, n,
|
|
587
|
-
var o = arguments.length,
|
|
606
|
+
], Ee.prototype, "render", null);
|
|
607
|
+
Ee.style = _t;
|
|
608
|
+
const Tt = ':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}', Et = Tt;
|
|
609
|
+
var Ot = function(e, t, n, a) {
|
|
610
|
+
var o = arguments.length, s = o < 3 ? t : a === null ? a = Object.getOwnPropertyDescriptor(t, n) : a, l;
|
|
588
611
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
589
|
-
|
|
612
|
+
s = Reflect.decorate(e, t, n, a);
|
|
590
613
|
else
|
|
591
614
|
for (var r = e.length - 1; r >= 0; r--)
|
|
592
|
-
(l = e[r]) && (
|
|
593
|
-
return o > 3 &&
|
|
615
|
+
(l = e[r]) && (s = (o < 3 ? l(s) : o > 3 ? l(t, n, s) : l(t, n)) || s);
|
|
616
|
+
return o > 3 && s && Object.defineProperty(t, n, s), s;
|
|
594
617
|
}, re = function(e, t) {
|
|
595
618
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
596
619
|
return Reflect.metadata(e, t);
|
|
597
620
|
};
|
|
598
|
-
const
|
|
621
|
+
const Oe = class {
|
|
599
622
|
constructor(e) {
|
|
600
|
-
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.
|
|
623
|
+
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.currentUser = void 0, this.name = "calendar", this.defaultSelectedCalendars = [], this.selectedCalendars = [];
|
|
624
|
+
}
|
|
625
|
+
elementNameChangedHandler(e) {
|
|
626
|
+
d("nylas-calendar-picker", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
601
627
|
}
|
|
602
628
|
connectedCallback() {
|
|
603
629
|
d("nylas-calendar-picker", "connectedCallback");
|
|
@@ -623,34 +649,31 @@ const De = class {
|
|
|
623
649
|
componentDidRender() {
|
|
624
650
|
d("nylas-calendar-picker", "componentDidRender");
|
|
625
651
|
}
|
|
626
|
-
elementNameChangedHandler(e) {
|
|
627
|
-
d("nylas-calendar-picker", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
628
|
-
}
|
|
629
652
|
selectedOptionsChangedHandler(e) {
|
|
630
653
|
d("nylas-calendar-picker", "selectedOptionChangedHandler", e.detail);
|
|
631
654
|
const t = (n) => {
|
|
632
|
-
const { value:
|
|
633
|
-
this.selectedCalendars = [...
|
|
655
|
+
const { value: a } = n.detail;
|
|
656
|
+
this.selectedCalendars = [...a], this.internals.setFormValue(a.toString(), "calendar");
|
|
634
657
|
};
|
|
635
658
|
this.valueChanged.emit({ ...e.detail, name: this.name, valueChangedHandler: t });
|
|
636
659
|
}
|
|
637
660
|
render() {
|
|
638
661
|
var t;
|
|
639
662
|
const e = ((t = this.calendars) == null ? void 0 : t.map((n) => {
|
|
640
|
-
var s,
|
|
663
|
+
var a, o, s, l;
|
|
641
664
|
return {
|
|
642
665
|
value: n.id,
|
|
643
666
|
label: n.name,
|
|
644
|
-
selected: ((
|
|
667
|
+
selected: ((a = this.defaultSelectedCalendars) == null ? void 0 : a.includes(n.id)) || ((o = this.defaultSelectedCalendars) != null && o.includes("primary") || ((s = this.defaultSelectedCalendars) == null ? void 0 : s.length) === 0 ? n.id === ((l = this.currentUser) == null ? void 0 : l.email) : !1)
|
|
645
668
|
};
|
|
646
669
|
})) ?? [];
|
|
647
|
-
return
|
|
670
|
+
return i(x, null, i("div", { class: "nylas-calendar-picker", part: "ncp" }, i("div", { class: "header", part: "ncp__header" }, i("h3", null, "Calendar availability"), i("p", null, "Select calendars that you’d like to use for checking your availability.")), e.length > 0 ? i("div", { class: "nylas-calendar-picker__dropdown" }, i("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" }, i("span", { slot: "label-icon" }, i("tooltip-component", null, i("info-icon", { slot: "tooltip-icon" }), i("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."))))) : i("div", { class: "nylas-calendar-picker__loading" }, i("span", { class: "label" }, "Select calendars that will be checked for availability ", i("info-icon", null)), i("div", { class: "loading-button" }, i("span", null, "Loading...")))));
|
|
648
671
|
}
|
|
649
672
|
static get formAssociated() {
|
|
650
673
|
return !0;
|
|
651
674
|
}
|
|
652
675
|
get host() {
|
|
653
|
-
return
|
|
676
|
+
return _(this);
|
|
654
677
|
}
|
|
655
678
|
static get watchers() {
|
|
656
679
|
return {
|
|
@@ -659,8 +682,12 @@ const De = class {
|
|
|
659
682
|
}
|
|
660
683
|
};
|
|
661
684
|
Ot([
|
|
662
|
-
|
|
685
|
+
C({
|
|
663
686
|
name: "nylas-calendar-picker",
|
|
687
|
+
stateToProps: /* @__PURE__ */ new Map([
|
|
688
|
+
["schedulerConfig.calendars", "calendars"],
|
|
689
|
+
["schedulerConfig.currentUser", "currentUser"]
|
|
690
|
+
]),
|
|
664
691
|
eventToProps: {
|
|
665
692
|
valueChanged: async (e, t) => {
|
|
666
693
|
const { valueChangedHandler: n } = e.detail;
|
|
@@ -672,24 +699,31 @@ Ot([
|
|
|
672
699
|
re("design:type", Function),
|
|
673
700
|
re("design:paramtypes", []),
|
|
674
701
|
re("design:returntype", void 0)
|
|
675
|
-
],
|
|
676
|
-
|
|
677
|
-
const
|
|
678
|
-
var
|
|
679
|
-
var o = arguments.length,
|
|
702
|
+
], Oe.prototype, "render", null);
|
|
703
|
+
Oe.style = Et;
|
|
704
|
+
const St = ':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}', Dt = St;
|
|
705
|
+
var It = function(e, t, n, a) {
|
|
706
|
+
var o = arguments.length, s = o < 3 ? t : a === null ? a = Object.getOwnPropertyDescriptor(t, n) : a, l;
|
|
680
707
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
681
|
-
|
|
708
|
+
s = Reflect.decorate(e, t, n, a);
|
|
682
709
|
else
|
|
683
710
|
for (var r = e.length - 1; r >= 0; r--)
|
|
684
|
-
(l = e[r]) && (
|
|
685
|
-
return o > 3 &&
|
|
711
|
+
(l = e[r]) && (s = (o < 3 ? l(s) : o > 3 ? l(t, n, s) : l(t, n)) || s);
|
|
712
|
+
return o > 3 && s && Object.defineProperty(t, n, s), s;
|
|
686
713
|
}, de = function(e, t) {
|
|
687
714
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
688
715
|
return Reflect.metadata(e, t);
|
|
689
716
|
};
|
|
690
|
-
const
|
|
717
|
+
const Se = class {
|
|
691
718
|
constructor(e) {
|
|
692
|
-
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 = "";
|
|
719
|
+
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.selectedConfiguration = void 0, this.name = "booking-type", this.bookingType = "", this.selectedBookingType = "";
|
|
720
|
+
}
|
|
721
|
+
elementNameChangedHandler(e) {
|
|
722
|
+
d("nylas-custom-booking-flow", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
723
|
+
}
|
|
724
|
+
selectedConfigurationChangedHandler(e, t) {
|
|
725
|
+
var n, a;
|
|
726
|
+
d("nylas-custom-booking-flow", "selectedConfigurationChangedHandler", e, t), (n = e == null ? void 0 : e.event_booking) != null && n.booking_type && (this.bookingType = (a = e == null ? void 0 : e.event_booking) == null ? void 0 : a.booking_type), typeof this.internals.setFormValue == "function" && this.internals.setFormValue(this.bookingType.toString(), "booking-calendar"), this.selectedBookingType = this.bookingType;
|
|
693
727
|
}
|
|
694
728
|
connectedCallback() {
|
|
695
729
|
d("nylas-custom-booking-flow", "connectedCallback");
|
|
@@ -701,7 +735,7 @@ const Ie = class {
|
|
|
701
735
|
d("nylas-custom-booking-flow", "componentWillLoad"), this.host.setAttribute("name", this.name);
|
|
702
736
|
}
|
|
703
737
|
componentDidLoad() {
|
|
704
|
-
d("nylas-custom-booking-flow", "componentDidLoad")
|
|
738
|
+
d("nylas-custom-booking-flow", "componentDidLoad");
|
|
705
739
|
}
|
|
706
740
|
componentWillUpdate() {
|
|
707
741
|
d("nylas-custom-booking-flow", "componentWillUpdate");
|
|
@@ -715,14 +749,11 @@ const Ie = class {
|
|
|
715
749
|
componentDidRender() {
|
|
716
750
|
d("nylas-custom-booking-flow", "componentDidRender");
|
|
717
751
|
}
|
|
718
|
-
elementNameChangedHandler(e) {
|
|
719
|
-
d("nylas-custom-booking-flow", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
720
|
-
}
|
|
721
752
|
selectedOptionChangedHandler(e) {
|
|
722
753
|
d("nylas-custom-booking-flow", "selectedOptionChangedHandler", e.detail);
|
|
723
754
|
const t = (n) => {
|
|
724
|
-
const { value:
|
|
725
|
-
this.selectedBookingType =
|
|
755
|
+
const { value: a } = n.detail;
|
|
756
|
+
this.selectedBookingType = a, this.internals.setFormValue(a.toString(), "booking-calendar");
|
|
726
757
|
};
|
|
727
758
|
this.valueChanged.emit({ ...e.detail, valueChanged: t });
|
|
728
759
|
}
|
|
@@ -737,23 +768,25 @@ const Ie = class {
|
|
|
737
768
|
value: "pre-booking"
|
|
738
769
|
}
|
|
739
770
|
];
|
|
740
|
-
return
|
|
771
|
+
return i(x, { key: "7f019073e242dce64522e27262298e480b0fb346" }, i("div", { key: "47bd77bcd4c4a1a9a845581bb6ad77b6dd7d65e7", class: "nylas-custom-booking-flow", part: "ncbf" }, i("div", { key: "17386ac59d7680789dda85e832c84061225b6b04", class: "header", part: "ncbf__header" }, i("h3", { key: "5368e8f321140f2bfaf60f6ca3f732f584824301" }, "Customize booking flow"), i("p", { key: "65a0d4d41804f41f7c01a682e4b8b97ebc2c4ef2" }, "Customize how new bookings are handled when a booking is completed.")), e.length > 0 ? i("div", { class: "nylas-custom-booking-flow__dropdown" }, i("span", { class: "label" }, "After a booking is confirmed", i("tooltip-component", null, i("info-icon", { slot: "tooltip-icon" }), i("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."))), i("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] })) : i("div", { class: "nylas-custom-booking-flow__loading" }, i("span", { class: "label" }, "Select a calendar to book meetings on ", i("info-icon", null)), i("div", { class: "loading-button" }, i("span", null, "Loading...")))));
|
|
741
772
|
}
|
|
742
773
|
static get formAssociated() {
|
|
743
774
|
return !0;
|
|
744
775
|
}
|
|
745
776
|
get host() {
|
|
746
|
-
return
|
|
777
|
+
return _(this);
|
|
747
778
|
}
|
|
748
779
|
static get watchers() {
|
|
749
780
|
return {
|
|
750
|
-
name: ["elementNameChangedHandler"]
|
|
781
|
+
name: ["elementNameChangedHandler"],
|
|
782
|
+
selectedConfiguration: ["selectedConfigurationChangedHandler"]
|
|
751
783
|
};
|
|
752
784
|
}
|
|
753
785
|
};
|
|
754
|
-
|
|
755
|
-
|
|
786
|
+
It([
|
|
787
|
+
C({
|
|
756
788
|
name: "nylas-custom-booking-flow",
|
|
789
|
+
stateToProps: /* @__PURE__ */ new Map([["schedulerConfig.selectedConfiguration", "selectedConfiguration"]]),
|
|
757
790
|
eventToProps: {
|
|
758
791
|
valueChanged: async (e, t) => {
|
|
759
792
|
const { valueChanged: n } = e.detail;
|
|
@@ -765,28 +798,33 @@ Et([
|
|
|
765
798
|
de("design:type", Function),
|
|
766
799
|
de("design:paramtypes", []),
|
|
767
800
|
de("design:returntype", void 0)
|
|
768
|
-
],
|
|
769
|
-
|
|
770
|
-
const
|
|
771
|
-
var
|
|
772
|
-
var o = arguments.length,
|
|
801
|
+
], Se.prototype, "render", null);
|
|
802
|
+
Se.style = Dt;
|
|
803
|
+
const $t = ':host{--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.nylas-event-description{display:flex;flex-direction:column;gap:4px}.nylas-event-description label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:16px;font-style:normal;font-weight:400;line-height:150%;}.nylas-event-description label span.label-icon{margin-left:4px}.nylas-event-description label span.label-icon tooltip-component{display:flex}.nylas-event-description textarea{padding:12px 16px;border-width:1;resize:vertical;border-radius:8px;font-family:var(--nylas-font-family);font-size:16px;line-height:24px;border:1px solid var(--nylas-base-200)}.nylas-event-description textarea::-webkit-resizer{display:none}', Lt = $t;
|
|
804
|
+
var Ht = function(e, t, n, a) {
|
|
805
|
+
var o = arguments.length, s = o < 3 ? t : a === null ? a = Object.getOwnPropertyDescriptor(t, n) : a, l;
|
|
773
806
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
774
|
-
|
|
807
|
+
s = Reflect.decorate(e, t, n, a);
|
|
775
808
|
else
|
|
776
809
|
for (var r = e.length - 1; r >= 0; r--)
|
|
777
|
-
(l = e[r]) && (
|
|
778
|
-
return o > 3 &&
|
|
810
|
+
(l = e[r]) && (s = (o < 3 ? l(s) : o > 3 ? l(t, n, s) : l(t, n)) || s);
|
|
811
|
+
return o > 3 && s && Object.defineProperty(t, n, s), s;
|
|
779
812
|
}, ce = function(e, t) {
|
|
780
813
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
781
814
|
return Reflect.metadata(e, t);
|
|
782
815
|
};
|
|
783
|
-
const
|
|
816
|
+
const De = class {
|
|
784
817
|
constructor(e) {
|
|
785
|
-
|
|
818
|
+
var t, n;
|
|
819
|
+
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.selectedConfiguration = void 0, this.eventDescription = void 0, this.description = this.eventDescription || ((n = (t = this.selectedConfiguration) == null ? void 0 : t.event_booking) == null ? void 0 : n.description) || "", this.name = "description";
|
|
786
820
|
}
|
|
787
821
|
elementNameChangedHandler(e) {
|
|
788
822
|
d("nylas-event-description", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
789
823
|
}
|
|
824
|
+
selectedConfigurationChangedHandler(e, t) {
|
|
825
|
+
var n, a;
|
|
826
|
+
d("nylas-custom-booking-flow", "selectedConfigurationChangedHandler", e, t), (n = e == null ? void 0 : e.event_booking) != null && n.description && (this.description = (a = e == null ? void 0 : e.event_booking) == null ? void 0 : a.description);
|
|
827
|
+
}
|
|
790
828
|
connectedCallback() {
|
|
791
829
|
d("nylas-event-description", "connectedCallback");
|
|
792
830
|
}
|
|
@@ -803,51 +841,58 @@ const Ee = class {
|
|
|
803
841
|
this.description = e.target.value, this.internals.setFormValue(e.target.value, "description"), this.valueChanged.emit({ value: e.target.value, name: this.name });
|
|
804
842
|
}
|
|
805
843
|
render() {
|
|
806
|
-
return
|
|
844
|
+
return i(x, { key: "08b8a3b8865cc09c467b5b8abc36d2d0f7039fcd" }, i("div", { key: "b906947588ca23a2edec4f31f04935cdc82bad96", class: "nylas-event-description", part: "nedesc" }, i("label", { key: "144ddfc7a8eb64434981122cc3df24dc89a00c63", htmlFor: "description" }, "Event description", i("span", { key: "6effc462e60a48b4eb55e325baf24f51f7c25854", class: "label-icon" }, i("tooltip-component", { key: "ee1d7faad42bdae393e4a20b9ec499c217aa21fc" }, i("info-icon", { key: "aecfd40dca5604d491e085be8fedb92e75276547", slot: "tooltip-icon" }), i("span", { key: "ce7cfceffe163a4c231813ed85ff7ebc80c8515d", slot: "tooltip-content" }, "Provide any additional details for your event.")))), i("textarea", { key: "0445a874c8d219548447a56780e435b986e159bc", id: "description", part: "nedesc__textarea", name: "description", value: this.description, maxlength: "8192", onInput: (e) => this.handleChange(e) })));
|
|
807
845
|
}
|
|
808
846
|
static get formAssociated() {
|
|
809
847
|
return !0;
|
|
810
848
|
}
|
|
811
849
|
get host() {
|
|
812
|
-
return
|
|
850
|
+
return _(this);
|
|
813
851
|
}
|
|
814
852
|
static get watchers() {
|
|
815
853
|
return {
|
|
816
|
-
name: ["elementNameChangedHandler"]
|
|
854
|
+
name: ["elementNameChangedHandler"],
|
|
855
|
+
selectedConfiguration: ["selectedConfigurationChangedHandler"]
|
|
817
856
|
};
|
|
818
857
|
}
|
|
819
858
|
};
|
|
820
|
-
|
|
821
|
-
|
|
859
|
+
Ht([
|
|
860
|
+
C({
|
|
822
861
|
name: "nylas-event-description",
|
|
862
|
+
stateToProps: /* @__PURE__ */ new Map([["schedulerConfig.selectedConfiguration", "selectedConfiguration"]]),
|
|
823
863
|
eventToProps: {},
|
|
824
864
|
fireRegisterEvent: !0
|
|
825
865
|
}),
|
|
826
866
|
ce("design:type", Function),
|
|
827
867
|
ce("design:paramtypes", []),
|
|
828
868
|
ce("design:returntype", void 0)
|
|
829
|
-
],
|
|
830
|
-
|
|
831
|
-
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:
|
|
832
|
-
var
|
|
833
|
-
var o = arguments.length,
|
|
869
|
+
], De.prototype, "render", null);
|
|
870
|
+
De.style = Lt;
|
|
871
|
+
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:16px;font-style:normal;font-weight:400;line-height:150%;}.nylas-event-duration label span.required{color:var(--nylas-error, #cc4841)}.nylas-event-duration label span.label-icon{margin-left:4px}.nylas-event-duration label span.label-icon tooltip-component{display:flex}.nylas-event-duration__wrapper{display:flex;align-items:center;gap:0.5rem}.nylas-event-duration__wrapper input{padding:12px 16px;border-width:1;border-radius:8px;border:1px solid var(--nylas-base-200);font-family:var(--nylas-font-family);font-size:16px;line-height:24px;width:48px}.nylas-event-duration__wrapper 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;
|
|
872
|
+
var Mt = function(e, t, n, a) {
|
|
873
|
+
var o = arguments.length, s = o < 3 ? t : a === null ? a = Object.getOwnPropertyDescriptor(t, n) : a, l;
|
|
834
874
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
835
|
-
|
|
875
|
+
s = Reflect.decorate(e, t, n, a);
|
|
836
876
|
else
|
|
837
877
|
for (var r = e.length - 1; r >= 0; r--)
|
|
838
|
-
(l = e[r]) && (
|
|
839
|
-
return o > 3 &&
|
|
840
|
-
},
|
|
878
|
+
(l = e[r]) && (s = (o < 3 ? l(s) : o > 3 ? l(t, n, s) : l(t, n)) || s);
|
|
879
|
+
return o > 3 && s && Object.defineProperty(t, n, s), s;
|
|
880
|
+
}, fe = function(e, t) {
|
|
841
881
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
842
882
|
return Reflect.metadata(e, t);
|
|
843
883
|
};
|
|
844
|
-
const
|
|
884
|
+
const Ie = class {
|
|
845
885
|
constructor(e) {
|
|
846
|
-
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;
|
|
886
|
+
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.selectedConfiguration = void 0, 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;
|
|
847
887
|
}
|
|
848
888
|
elementNameChangedHandler(e) {
|
|
849
889
|
d("nylas-event-duration", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
850
890
|
}
|
|
891
|
+
selectedConfigurationChangedHandler(e) {
|
|
892
|
+
var n;
|
|
893
|
+
const t = (n = e == null ? void 0 : e.availability) == null ? void 0 : n.duration_minutes;
|
|
894
|
+
t && (this.duration = t >= 60 ? t / 60 : t, this.durationMinutes = t ?? 5, this.durationIncrement = t >= 60 ? 60 : 1);
|
|
895
|
+
}
|
|
851
896
|
durationMinutesChangedHandler(e, t) {
|
|
852
897
|
d("nylas-event-duration", "durationMinutesChangedHandler", e), e !== t && this.valueChanged.emit({ value: e.toString(), name: this.name });
|
|
853
898
|
}
|
|
@@ -867,7 +912,7 @@ const Se = class {
|
|
|
867
912
|
this.duration = e.target.value, this.durationMinutes = this.duration * this.durationIncrement, this.internals.setFormValue(this.durationMinutes.toString(), this.name);
|
|
868
913
|
}
|
|
869
914
|
handleBlur() {
|
|
870
|
-
(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.
|
|
915
|
+
(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.durationMinutes = this.duration * this.durationIncrement, this.internals.setFormValue(this.durationMinutes.toString(), "duration");
|
|
871
916
|
}
|
|
872
917
|
selectedOptionChangedHandler(e) {
|
|
873
918
|
d("nylas-calendar-picker", "selectedOptionChangedHandler", e.detail);
|
|
@@ -879,42 +924,44 @@ const Se = class {
|
|
|
879
924
|
{ value: 1, label: "minutes" },
|
|
880
925
|
{ value: 60, label: "hours" }
|
|
881
926
|
];
|
|
882
|
-
return
|
|
927
|
+
return i(x, { key: "ff6384009f8323807da45260c85f9a833ca78605" }, i("div", { key: "9a495df4f19b186fb856b96b2165cf16f633c1d3", class: "nylas-event-duration", part: "ned" }, i("label", { key: "ddd0d777d526ebe86fb0353c74fb59d0acc9bb0c", htmlFor: "duration" }, "Event duration", i("span", { key: "4d4a72dcd4d5eb94065b92f680143837bacdf064", class: "required" }, "*"), i("span", { key: "0b4bf5ea22e494b579deeb5eb94b33e19f7805d7", class: "label-icon" }, i("tooltip-component", { key: "7ba13f0936a66b5d5ce8abdddaa2719ee944a53c" }, i("info-icon", { key: "c27304efca28e235f150d421b88ebb09b68705fd", slot: "tooltip-icon" }), i("span", { key: "f86eaf51c1360414af98ce557128fafb3c02b6d4", slot: "tooltip-content" }, "Set the duration of your event.")))), i("div", { key: "be06a61abc967a09375fb1cb4e634409f4b51909", class: "nylas-event-duration__wrapper" }, i("input", { key: "f89c51721313e11ead928cfa70b7a2953b8daaa5", type: "number", part: "ned_input", id: "duration", name: "duration", value: this.duration, onBlur: () => this.handleBlur(), onInput: (t) => this.handleChange(t), min: 5 }), i("select-dropdown", { key: "aed386f87a5b232f8b65a110d167e342f009a420", 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 }))));
|
|
883
928
|
}
|
|
884
929
|
static get formAssociated() {
|
|
885
930
|
return !0;
|
|
886
931
|
}
|
|
887
932
|
get host() {
|
|
888
|
-
return
|
|
933
|
+
return _(this);
|
|
889
934
|
}
|
|
890
935
|
static get watchers() {
|
|
891
936
|
return {
|
|
892
937
|
name: ["elementNameChangedHandler"],
|
|
938
|
+
selectedConfiguration: ["selectedConfigurationChangedHandler"],
|
|
893
939
|
durationMinutes: ["durationMinutesChangedHandler"]
|
|
894
940
|
};
|
|
895
941
|
}
|
|
896
942
|
};
|
|
897
|
-
|
|
898
|
-
|
|
943
|
+
Mt([
|
|
944
|
+
C({
|
|
899
945
|
name: "nylas-event-duration",
|
|
946
|
+
stateToProps: /* @__PURE__ */ new Map([["schedulerConfig.selectedConfiguration", "selectedConfiguration"]]),
|
|
900
947
|
eventToProps: {},
|
|
901
948
|
fireRegisterEvent: !0
|
|
902
949
|
}),
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
],
|
|
907
|
-
|
|
908
|
-
const
|
|
909
|
-
var
|
|
910
|
-
var o = arguments.length,
|
|
950
|
+
fe("design:type", Function),
|
|
951
|
+
fe("design:paramtypes", []),
|
|
952
|
+
fe("design:returntype", void 0)
|
|
953
|
+
], Ie.prototype, "render", null);
|
|
954
|
+
Ie.style = Ft;
|
|
955
|
+
const Nt = ':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}', Rt = Nt;
|
|
956
|
+
var Pt = function(e, t, n, a) {
|
|
957
|
+
var o = arguments.length, s = o < 3 ? t : a === null ? a = Object.getOwnPropertyDescriptor(t, n) : a, l;
|
|
911
958
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
912
|
-
|
|
959
|
+
s = Reflect.decorate(e, t, n, a);
|
|
913
960
|
else
|
|
914
961
|
for (var r = e.length - 1; r >= 0; r--)
|
|
915
|
-
(l = e[r]) && (
|
|
916
|
-
return o > 3 &&
|
|
917
|
-
},
|
|
962
|
+
(l = e[r]) && (s = (o < 3 ? l(s) : o > 3 ? l(t, n, s) : l(t, n)) || s);
|
|
963
|
+
return o > 3 && s && Object.defineProperty(t, n, s), s;
|
|
964
|
+
}, pe = function(e, t) {
|
|
918
965
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
919
966
|
return Reflect.metadata(e, t);
|
|
920
967
|
};
|
|
@@ -935,32 +982,32 @@ const $e = class {
|
|
|
935
982
|
d("nylas-event-info", "disconnectedCallback");
|
|
936
983
|
}
|
|
937
984
|
render() {
|
|
938
|
-
return
|
|
985
|
+
return i(x, { key: "73cf50f7f006fed6b41256b3f83c6a549f6919f8" }, i("nylas-form-card", { key: "f34f24881a48a3af65e665693548388a9cbebb5f" }, i("h1", { key: "5e6ff9922a926b74bbaafe8502bae2724bd6ee3a", slot: "header-title", class: "nylas-event-info__title" }, "Event information"), i("h3", { key: "2a127a2206f7dec1b1cc93804588a8b96a893f83", slot: "header-subtitle", class: "nylas-event-info__subtitle" }, "Enter all event information."), i("div", { key: "b3dcd7ddb2bbb278327ca059e1d8fce793645a47", slot: "content", class: "nylas-event-info__content" }, i("slot", { key: "7868be55755715b91a591f92225f13aeb5dbf00d", name: "inputs" }))));
|
|
939
986
|
}
|
|
940
987
|
static get formAssociated() {
|
|
941
988
|
return !0;
|
|
942
989
|
}
|
|
943
990
|
};
|
|
944
|
-
|
|
945
|
-
|
|
991
|
+
Pt([
|
|
992
|
+
C({
|
|
946
993
|
name: "nylas-event-info",
|
|
947
994
|
eventToProps: {},
|
|
948
995
|
fireRegisterEvent: !0
|
|
949
996
|
}),
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
997
|
+
pe("design:type", Function),
|
|
998
|
+
pe("design:paramtypes", []),
|
|
999
|
+
pe("design:returntype", void 0)
|
|
953
1000
|
], $e.prototype, "render", null);
|
|
954
|
-
$e.style =
|
|
955
|
-
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}',
|
|
956
|
-
var
|
|
957
|
-
var o = arguments.length,
|
|
1001
|
+
$e.style = Rt;
|
|
1002
|
+
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}', Bt = zt;
|
|
1003
|
+
var jt = function(e, t, n, a) {
|
|
1004
|
+
var o = arguments.length, s = o < 3 ? t : a === null ? a = Object.getOwnPropertyDescriptor(t, n) : a, l;
|
|
958
1005
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
959
|
-
|
|
1006
|
+
s = Reflect.decorate(e, t, n, a);
|
|
960
1007
|
else
|
|
961
1008
|
for (var r = e.length - 1; r >= 0; r--)
|
|
962
|
-
(l = e[r]) && (
|
|
963
|
-
return o > 3 &&
|
|
1009
|
+
(l = e[r]) && (s = (o < 3 ? l(s) : o > 3 ? l(t, n, s) : l(t, n)) || s);
|
|
1010
|
+
return o > 3 && s && Object.defineProperty(t, n, s), s;
|
|
964
1011
|
}, be = function(e, t) {
|
|
965
1012
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
966
1013
|
return Reflect.metadata(e, t);
|
|
@@ -982,14 +1029,14 @@ const Le = class {
|
|
|
982
1029
|
d("nylas-event-limits", "disconnectedCallback");
|
|
983
1030
|
}
|
|
984
1031
|
render() {
|
|
985
|
-
return
|
|
1032
|
+
return i(x, { key: "2cc9ace0192971cd75683313d64f3ef06d400136" }, i("nylas-form-card", { key: "cbca7bb803781e3c93a85c73e56e762f9daa2f9d" }, i("h1", { key: "5a55b7edf422b59b251c2df6d9cf174d83c012eb", slot: "header-title", class: "nylas-event-limits__title" }, "Set event limits"), i("h3", { key: "70415910cf84c503291373387bdab5c6da95e091", slot: "header-subtitle", class: "nylas-event-limits__subtitle" }, "Customize event limits for the event."), i("div", { key: "0735659855b9ad599c70dc8045e2477b853571e6", slot: "content", class: "nylas-event-limits__content" }, i("slot", { key: "a35e9bcc861998b14d5bbf630d6c1fcbd038fbdf", name: "inputs" }))));
|
|
986
1033
|
}
|
|
987
1034
|
static get formAssociated() {
|
|
988
1035
|
return !0;
|
|
989
1036
|
}
|
|
990
1037
|
};
|
|
991
|
-
|
|
992
|
-
|
|
1038
|
+
jt([
|
|
1039
|
+
C({
|
|
993
1040
|
name: "nylas-event-limits",
|
|
994
1041
|
eventToProps: {},
|
|
995
1042
|
fireRegisterEvent: !0
|
|
@@ -998,27 +1045,28 @@ Bt([
|
|
|
998
1045
|
be("design:paramtypes", []),
|
|
999
1046
|
be("design:returntype", void 0)
|
|
1000
1047
|
], Le.prototype, "render", null);
|
|
1001
|
-
Le.style =
|
|
1002
|
-
const
|
|
1003
|
-
var
|
|
1004
|
-
var o = arguments.length,
|
|
1048
|
+
Le.style = Bt;
|
|
1049
|
+
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}.nylas-event-title{display:flex;flex-direction:column;gap:4px;position:relative;text-align:left}.nylas-event-title div.title{padding:12px 16px;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);overflow:scroll;white-space:nowrap;scrollbar-width:thin}.nylas-event-title div.title::-webkit-scrollbar{width:6px;height:6px}.nylas-event-title div.title.error{border-color:var(--nylas-error);outline:none}.nylas-event-title input{padding:12px 16px;border-width:1;border-radius:8px;border:1px solid var(--nylas-base-200)}.nylas-event-title span.help-text{color:var(--nylas-base-800);font-size:14px;font-style:normal;font-weight:400;line-height:21px}.nylas-event-title span.error-message{color:var(--nylas-error)}.nylas-event-title label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:16px;font-style:normal;font-weight:400;line-height:150%;}.nylas-event-title label span.required{color:var(--nylas-error, #cc4841)}.nylas-event-title label span.label-icon{margin-left:4px}.nylas-event-title label span.label-icon tooltip-component{display:flex}.highlighted-tag{background-color:var(--nylas-base-200);border-radius:var(--nylas-border-radius);padding:5px;margin-left:4px}.token-options{display:block;background-color:var(--nylas-base-0);width:100%;max-height:336px;overflow:auto;z-index:1;border-radius:4px;position:absolute;top:80px;box-shadow:0px 4px 6px -2px rgba(0, 0, 0, 0.0509803922);box-shadow:0px 10px 15px -3px rgba(0, 0, 0, 0.1019607843)}@media screen and (max-width: 768px){.token-options{right:0;width:325px;max-width:unset}}.token-options ul{padding:0;list-style-type:none;color:var(--nylas-base-900);max-height:336px;margin:0}.token-options ul li{padding:16px, 12px, 16px, 12px;color:black;padding:12px 16px;text-decoration:none;display:block;font-family:inherit;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0px;text-align:left;cursor:pointer}.token-options ul li .token-label{display:flex;flex-direction:column;font-weight:400}.token-options ul li .token-label .token{color:var(--nylas-abse-900);font-size:16px;line-height:24px}.token-options ul li .token-label .description{color:var(--nylas-base-600);font-size:14px;line-height:21px}.token-options ul li:hover,.token-options ul li:focus,.token-options ul li:active,.token-options ul li.active{background-color:var(--nylas-base-100)}.token-options ul li:hover .token-label .token,.token-options ul li:focus .token-label .token,.token-options ul li:active .token-label .token,.token-options ul li.active .token-label .token{color:var(--nylas-primary)}.token-options .selected{background-color:var(--nylas-base-100)}', Ut = Wt;
|
|
1050
|
+
var Zt = function(e, t, n, a) {
|
|
1051
|
+
var o = arguments.length, s = o < 3 ? t : a === null ? a = Object.getOwnPropertyDescriptor(t, n) : a, l;
|
|
1005
1052
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
1006
|
-
|
|
1053
|
+
s = Reflect.decorate(e, t, n, a);
|
|
1007
1054
|
else
|
|
1008
1055
|
for (var r = e.length - 1; r >= 0; r--)
|
|
1009
|
-
(l = e[r]) && (
|
|
1010
|
-
return o > 3 &&
|
|
1056
|
+
(l = e[r]) && (s = (o < 3 ? l(s) : o > 3 ? l(t, n, s) : l(t, n)) || s);
|
|
1057
|
+
return o > 3 && s && Object.defineProperty(t, n, s), s;
|
|
1011
1058
|
}, ue = function(e, t) {
|
|
1012
1059
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
1013
1060
|
return Reflect.metadata(e, t);
|
|
1014
1061
|
};
|
|
1015
|
-
const
|
|
1062
|
+
const He = class {
|
|
1016
1063
|
constructor(e) {
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1064
|
+
var t, n;
|
|
1065
|
+
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.selectedConfiguration = void 0, this.eventTitle = (n = (t = this.selectedConfiguration) == null ? void 0 : t.event_booking) == null ? void 0 : n.title, this.name = "title", this.showTokens = !1, this.availableTokens = _e.map((a) => ({
|
|
1066
|
+
label: a.token,
|
|
1067
|
+
value: a.value,
|
|
1068
|
+
labelHTML: a
|
|
1069
|
+
})), this.filteredTokens = this.availableTokens, this.ariaActivedescendant = "", this.currentWord = { $value: "", fullText: "", index: -1, focusOffset: -1 }, this.validationError = "";
|
|
1022
1070
|
}
|
|
1023
1071
|
elementNameChangedHandler(e) {
|
|
1024
1072
|
d("nylas-event-title", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
@@ -1026,13 +1074,18 @@ const Ae = class {
|
|
|
1026
1074
|
ariaActivedescendantChangedHandler(e) {
|
|
1027
1075
|
var t, n;
|
|
1028
1076
|
if (d("nylas-event-title", "ariaActivedescendantChangedHandler", e), e !== "") {
|
|
1029
|
-
const
|
|
1030
|
-
|
|
1077
|
+
const a = (t = this.host.shadowRoot) == null ? void 0 : t.getElementById(e);
|
|
1078
|
+
a == null || a.classList.add("active");
|
|
1031
1079
|
} else {
|
|
1032
|
-
const
|
|
1033
|
-
|
|
1080
|
+
const a = (n = this.host.shadowRoot) == null ? void 0 : n.querySelectorAll(".token-options li.active");
|
|
1081
|
+
a == null || a.forEach((o) => o.classList.remove("active"));
|
|
1034
1082
|
}
|
|
1035
1083
|
}
|
|
1084
|
+
configChangedHandler(e) {
|
|
1085
|
+
var n;
|
|
1086
|
+
const t = (n = e == null ? void 0 : e.event_booking) == null ? void 0 : n.title;
|
|
1087
|
+
t && this.updateEventTitleFromProp(t);
|
|
1088
|
+
}
|
|
1036
1089
|
connectedCallback() {
|
|
1037
1090
|
d("nylas-event-title", "connectedCallback");
|
|
1038
1091
|
}
|
|
@@ -1045,38 +1098,47 @@ const Ae = class {
|
|
|
1045
1098
|
disconnectedCallback() {
|
|
1046
1099
|
d("nylas-event-title", "disconnectedCallback");
|
|
1047
1100
|
}
|
|
1101
|
+
formSubmittedHandler(e) {
|
|
1102
|
+
var t, n;
|
|
1103
|
+
d("nylas-event-title", "formSubmittedHandler", e), (n = (t = this.internals) == null ? void 0 : t.validity) != null && n.valid ? this.validationError = "" : this.validationError = "Event title is required";
|
|
1104
|
+
}
|
|
1048
1105
|
updateEventTitleFromProp(e) {
|
|
1049
|
-
|
|
1106
|
+
var t, n;
|
|
1107
|
+
d("nylas-event-title", "eventTitleChangedHandler", e), this.titleRef && (this.titleRef.innerHTML = this.highlightTokens(e), this.titleRef.focus(), typeof this.internals.setValidity == "function" && (e === "" ? (t = this.internals) == null || t.setValidity({ customError: !0 }, "Event title is required", this.titleRef) : (n = this.internals) == null || n.setValidity({ customError: !1 })));
|
|
1050
1108
|
}
|
|
1051
|
-
highlightTokens() {
|
|
1052
|
-
let
|
|
1053
|
-
return _e.forEach((
|
|
1054
|
-
const
|
|
1055
|
-
|
|
1056
|
-
}),
|
|
1109
|
+
highlightTokens(e) {
|
|
1110
|
+
let t = e;
|
|
1111
|
+
return _e.forEach((n) => {
|
|
1112
|
+
const a = n.value, o = new RegExp(`(\\${a})(?!\\w)`, "g");
|
|
1113
|
+
t = t.replace(o, '<span class="highlighted-tag">$1</span>');
|
|
1114
|
+
}), t;
|
|
1057
1115
|
}
|
|
1058
1116
|
getCurrentSelectionForBrowser() {
|
|
1059
|
-
var
|
|
1060
|
-
const e = (
|
|
1061
|
-
const
|
|
1117
|
+
var a, o, s;
|
|
1118
|
+
const e = (l, r, u, f) => {
|
|
1119
|
+
const p = l.replace(/[\u200B-\u200D\uFEFF]/g, ""), h = p.lastIndexOf("$"), v = p.substring(h).split(" ")[0];
|
|
1062
1120
|
return {
|
|
1063
|
-
focusOffset:
|
|
1064
|
-
dollarIndex:
|
|
1065
|
-
lastWord:
|
|
1066
|
-
currentText:
|
|
1067
|
-
node:
|
|
1121
|
+
focusOffset: r,
|
|
1122
|
+
dollarIndex: h,
|
|
1123
|
+
lastWord: v,
|
|
1124
|
+
currentText: p,
|
|
1125
|
+
node: u,
|
|
1126
|
+
allSelected: f
|
|
1068
1127
|
};
|
|
1069
|
-
}, t =
|
|
1070
|
-
|
|
1128
|
+
}, t = (l) => {
|
|
1129
|
+
var r, u;
|
|
1130
|
+
return l.anchorOffset === 0 && l.focusOffset === ((u = (r = l.focusNode) == null ? void 0 : r.nodeValue) == null ? void 0 : u.length);
|
|
1131
|
+
};
|
|
1132
|
+
switch (Ze()) {
|
|
1071
1133
|
case "Chrome":
|
|
1072
|
-
const
|
|
1073
|
-
return e(
|
|
1134
|
+
const l = (a = this.host.shadowRoot) == null ? void 0 : a.getSelection(), r = l == null ? void 0 : l.focusNode, u = (r == null ? void 0 : r.nodeValue) || "", f = l && t(l);
|
|
1135
|
+
return e(u, (l == null ? void 0 : l.focusOffset) || -1, r, f);
|
|
1074
1136
|
case "Firefox":
|
|
1075
|
-
const
|
|
1076
|
-
return e(
|
|
1137
|
+
const p = document.getSelection(), h = ((o = p == null ? void 0 : p.anchorNode) == null ? void 0 : o.nodeValue) || "", v = p && t(p);
|
|
1138
|
+
return e(h, (p == null ? void 0 : p.focusOffset) || -1, p == null ? void 0 : p.anchorNode, v);
|
|
1077
1139
|
case "Safari":
|
|
1078
|
-
const
|
|
1079
|
-
return e(
|
|
1140
|
+
const O = window.getSelection(), k = O == null ? void 0 : O.getComposedRanges(this.host.shadowRoot)[0], c = ((s = k == null ? void 0 : k.startContainer) == null ? void 0 : s.nodeValue) || "", b = O && t(O);
|
|
1141
|
+
return e(c, (k == null ? void 0 : k.endOffset) || -1, k == null ? void 0 : k.startContainer, b);
|
|
1080
1142
|
default:
|
|
1081
1143
|
return console.warn("Browser not supported"), null;
|
|
1082
1144
|
}
|
|
@@ -1087,141 +1149,148 @@ const Ae = class {
|
|
|
1087
1149
|
this.updateEventTitle(t), this.resetDropdown();
|
|
1088
1150
|
return;
|
|
1089
1151
|
}
|
|
1090
|
-
const { focusOffset:
|
|
1091
|
-
if (o === -1 ||
|
|
1152
|
+
const { focusOffset: a, dollarIndex: o, lastWord: s, currentText: l } = n;
|
|
1153
|
+
if (o === -1 || a < o) {
|
|
1092
1154
|
this.updateEventTitle(t), this.resetDropdown();
|
|
1093
1155
|
return;
|
|
1094
1156
|
}
|
|
1095
|
-
|
|
1096
|
-
$value:
|
|
1157
|
+
s.startsWith("$") ? (this.showTokens = !0, this.currentWord = {
|
|
1158
|
+
$value: s,
|
|
1097
1159
|
fullText: l,
|
|
1098
1160
|
index: o,
|
|
1099
|
-
focusOffset:
|
|
1100
|
-
}, this.populateSuggestionsDropdown(
|
|
1161
|
+
focusOffset: a
|
|
1162
|
+
}, this.populateSuggestionsDropdown(s)) : this.resetDropdown(), this.updateEventTitle(t);
|
|
1101
1163
|
}
|
|
1102
1164
|
handleInputKeyDown(e) {
|
|
1103
|
-
var
|
|
1104
|
-
|
|
1165
|
+
var n, a, o, s;
|
|
1166
|
+
const t = this.getCurrentSelectionForBrowser();
|
|
1167
|
+
if (t != null && t.allSelected && !We(e) && (this.titleRef.innerHTML = ""), e.key === "Enter") {
|
|
1105
1168
|
e.preventDefault();
|
|
1106
|
-
const
|
|
1107
|
-
|
|
1169
|
+
const l = (n = this.host.shadowRoot) == null ? void 0 : n.getElementById(this.ariaActivedescendant);
|
|
1170
|
+
l && (l.click(), this.ariaActivedescendant = "");
|
|
1108
1171
|
} else if (e.key === "ArrowDown") {
|
|
1109
1172
|
e.preventDefault();
|
|
1110
|
-
const
|
|
1111
|
-
if (
|
|
1112
|
-
const
|
|
1113
|
-
|
|
1173
|
+
const l = (a = this.host.shadowRoot) == null ? void 0 : a.getElementById(this.ariaActivedescendant);
|
|
1174
|
+
if (l) {
|
|
1175
|
+
const r = l.nextElementSibling;
|
|
1176
|
+
r ? this.ariaActivedescendant = r.id : this.ariaActivedescendant = this.filteredTokens[0].label;
|
|
1114
1177
|
} else
|
|
1115
1178
|
this.ariaActivedescendant = this.filteredTokens[0].label;
|
|
1116
1179
|
} else if (e.key === "ArrowUp") {
|
|
1117
1180
|
e.preventDefault();
|
|
1118
|
-
const
|
|
1119
|
-
if (
|
|
1120
|
-
const
|
|
1121
|
-
|
|
1181
|
+
const l = (o = this.host.shadowRoot) == null ? void 0 : o.getElementById(this.ariaActivedescendant);
|
|
1182
|
+
if (l) {
|
|
1183
|
+
const r = l.previousElementSibling;
|
|
1184
|
+
r ? this.ariaActivedescendant = r.id : this.ariaActivedescendant = this.filteredTokens[this.filteredTokens.length - 1].label;
|
|
1122
1185
|
} else
|
|
1123
1186
|
this.ariaActivedescendant = this.filteredTokens[this.filteredTokens.length - 1].label;
|
|
1124
|
-
} else
|
|
1125
|
-
e.preventDefault(), this.resetDropdown();
|
|
1126
|
-
else if (e.key === "Backspace" || e.key === "Delete") {
|
|
1127
|
-
const i = this.getCurrentSelectionForBrowser();
|
|
1128
|
-
i != null && i.currentText.startsWith("${") && (o = i == null ? void 0 : i.node) != null && o.parentNode && i.node.parentNode.removeChild(i.node);
|
|
1129
|
-
}
|
|
1187
|
+
} else
|
|
1188
|
+
e.key === "Escape" ? (e.preventDefault(), this.resetDropdown()) : (e.key === "Backspace" || e.key === "Delete") && (t != null && t.currentText.startsWith("${") && (s = t == null ? void 0 : t.node) != null && s.parentNode && t.node.parentNode.removeChild(t.node), (this.titleRef.textContent === "" || (t == null ? void 0 : t.currentText) === "" || t != null && t.allSelected) && (this.titleRef.innerHTML = ""));
|
|
1130
1189
|
}
|
|
1131
1190
|
selectOption(e, t) {
|
|
1132
1191
|
var c;
|
|
1133
1192
|
e.preventDefault();
|
|
1134
|
-
const n = this.currentWord.fullText,
|
|
1135
|
-
let o = this.titleRef.firstChild,
|
|
1193
|
+
const n = this.currentWord.fullText, a = this.currentWord.$value;
|
|
1194
|
+
let o = this.titleRef.firstChild, s = null;
|
|
1136
1195
|
for (; o; ) {
|
|
1137
1196
|
if (o.nodeType === 3) {
|
|
1138
|
-
const
|
|
1139
|
-
if (
|
|
1140
|
-
|
|
1197
|
+
const b = ((c = o.textContent) == null ? void 0 : c.replace(/[\u200B-\u200D\uFEFF]/g, "")) || "", m = n.replace(/[\u200B-\u200D\uFEFF]/g, "");
|
|
1198
|
+
if (b.includes(m)) {
|
|
1199
|
+
s = o;
|
|
1141
1200
|
break;
|
|
1142
1201
|
}
|
|
1143
1202
|
}
|
|
1144
1203
|
o = o.nextSibling;
|
|
1145
1204
|
}
|
|
1146
|
-
if (!
|
|
1205
|
+
if (!s)
|
|
1147
1206
|
return;
|
|
1148
|
-
const l =
|
|
1207
|
+
const l = s.textContent || "", r = l.indexOf(a), u = l.substring(0, r), f = l.substring(r + a.length), p = document.createTextNode(u), h = document.createRange(), v = document.createElement("span");
|
|
1149
1208
|
v.classList.add("highlighted-tag"), v.textContent = `${t.value}`;
|
|
1150
|
-
const
|
|
1151
|
-
if (
|
|
1152
|
-
|
|
1209
|
+
const O = document.createTextNode(f);
|
|
1210
|
+
if (f !== "")
|
|
1211
|
+
s.replaceWith(p, v, O), h.setStart(O, 1);
|
|
1153
1212
|
else {
|
|
1154
|
-
const
|
|
1155
|
-
|
|
1213
|
+
const b = document.createTextNode("");
|
|
1214
|
+
s.replaceWith(p, v, b), h.setStart(b, 1);
|
|
1156
1215
|
}
|
|
1157
1216
|
this.resetDropdown(), this.titleRef.focus();
|
|
1158
|
-
const
|
|
1159
|
-
|
|
1217
|
+
const k = window.getSelection();
|
|
1218
|
+
h.collapse(!0), k == null || k.removeAllRanges(), k == null || k.addRange(h), this.updateEventTitle(this.titleRef.textContent || "");
|
|
1160
1219
|
}
|
|
1161
1220
|
populateSuggestionsDropdown(e = "") {
|
|
1162
1221
|
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);
|
|
1163
1222
|
}
|
|
1164
1223
|
updateEventTitle(e) {
|
|
1224
|
+
var n, a, o;
|
|
1165
1225
|
const t = e.replace(/ +/g, " ");
|
|
1166
|
-
this.valueChanged.emit({ value: t, name: this.name });
|
|
1226
|
+
t === "" ? ((n = this.internals) == null || n.setValidity({ customError: !0 }, "Event title is required", this.titleRef), this.validationError = "Event title is required") : ((a = this.internals) == null || a.setValidity({ customError: !1 }), this.validationError = ""), (o = this.internals) == null || o.setFormValue(t, this.name), this.valueChanged.emit({ value: t, name: this.name });
|
|
1167
1227
|
}
|
|
1168
1228
|
resetDropdown() {
|
|
1169
1229
|
this.showTokens = !1, this.ariaActivedescendant = "";
|
|
1170
1230
|
}
|
|
1171
1231
|
getLabelHTML(e) {
|
|
1172
|
-
return
|
|
1232
|
+
return i("div", { class: "token-label" }, i("span", { class: "token" }, e.token), i("span", { class: "description" }, e.description));
|
|
1173
1233
|
}
|
|
1174
1234
|
render() {
|
|
1175
1235
|
var e;
|
|
1176
|
-
return
|
|
1236
|
+
return i(x, { key: "e0ddf6c13a5a0c0d2e0db9188365418fb7484dcf" }, i("div", { key: "a3b8e594c8d9632709e777891f04df0aaaf7c5c3", class: "nylas-event-title", part: "net" }, i("label", { key: "e5794d2cd8be0b1666bfa67c3ea657da5dc8d45d", htmlFor: "title" }, "Event title", i("span", { key: "1210caceb7bf824f01559460e1c5e572cb2dad92", class: "required" }, "*"), i("span", { key: "4280ec285221e6db76ca08723fe3888a1d2643e3", class: "label-icon" }, i("tooltip-component", { key: "d6c05fb79cf39656af7589a2e9de9ef832d7a2f8" }, i("info-icon", { key: "a4659d97d60d00dfcc2c993e70da5cfd05904f78", slot: "tooltip-icon" }), i("span", { key: "738bfa669eec42b417be02fbad0584af34044c83", slot: "tooltip-content" }, "Enter a title for your event.")))), i("div", { key: "df102dc899f8de91154689d9cdaae28465380622", class: {
|
|
1237
|
+
title: !0,
|
|
1238
|
+
error: this.validationError !== ""
|
|
1239
|
+
}, 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 && i("div", { class: "token-options", part: "net__dropdown-content" }, i("ul", { tabindex: "-1", role: "listbox", "aria-label": this.name, "aria-activedescendant": this.ariaActivedescendant }, this.filteredTokens.map((t) => i("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))))), i("span", { key: "ec769eea7e2e3ff6d64bef0f5099540c93ba80ab", class: "help-text" }, "Create a dynamic templated event title by typing $. Learn more"), this.validationError != "" && i("span", { class: "error-message" }, this.validationError)));
|
|
1177
1240
|
}
|
|
1178
1241
|
static get formAssociated() {
|
|
1179
1242
|
return !0;
|
|
1180
1243
|
}
|
|
1181
1244
|
get host() {
|
|
1182
|
-
return
|
|
1245
|
+
return _(this);
|
|
1183
1246
|
}
|
|
1184
1247
|
static get watchers() {
|
|
1185
1248
|
return {
|
|
1186
1249
|
name: ["elementNameChangedHandler"],
|
|
1187
|
-
ariaActivedescendant: ["ariaActivedescendantChangedHandler"]
|
|
1250
|
+
ariaActivedescendant: ["ariaActivedescendantChangedHandler"],
|
|
1251
|
+
selectedConfiguration: ["configChangedHandler"]
|
|
1188
1252
|
};
|
|
1189
1253
|
}
|
|
1190
1254
|
};
|
|
1191
|
-
|
|
1192
|
-
|
|
1255
|
+
Zt([
|
|
1256
|
+
C({
|
|
1193
1257
|
name: "nylas-event-title",
|
|
1258
|
+
stateToProps: /* @__PURE__ */ new Map([["schedulerConfig.selectedConfiguration", "selectedConfiguration"]]),
|
|
1194
1259
|
eventToProps: {},
|
|
1195
1260
|
fireRegisterEvent: !0
|
|
1196
1261
|
}),
|
|
1197
1262
|
ue("design:type", Function),
|
|
1198
1263
|
ue("design:paramtypes", []),
|
|
1199
1264
|
ue("design:returntype", void 0)
|
|
1200
|
-
],
|
|
1201
|
-
|
|
1202
|
-
const
|
|
1203
|
-
var
|
|
1204
|
-
var o = arguments.length,
|
|
1265
|
+
], He.prototype, "render", null);
|
|
1266
|
+
He.style = Ut;
|
|
1267
|
+
const Yt = ':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}', Kt = Yt;
|
|
1268
|
+
var Vt = function(e, t, n, a) {
|
|
1269
|
+
var o = arguments.length, s = o < 3 ? t : a === null ? a = Object.getOwnPropertyDescriptor(t, n) : a, l;
|
|
1205
1270
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
1206
|
-
|
|
1271
|
+
s = Reflect.decorate(e, t, n, a);
|
|
1207
1272
|
else
|
|
1208
1273
|
for (var r = e.length - 1; r >= 0; r--)
|
|
1209
|
-
(l = e[r]) && (
|
|
1210
|
-
return o > 3 &&
|
|
1274
|
+
(l = e[r]) && (s = (o < 3 ? l(s) : o > 3 ? l(t, n, s) : l(t, n)) || s);
|
|
1275
|
+
return o > 3 && s && Object.defineProperty(t, n, s), s;
|
|
1211
1276
|
}, he = function(e, t) {
|
|
1212
1277
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
1213
1278
|
return Reflect.metadata(e, t);
|
|
1214
1279
|
};
|
|
1215
|
-
const
|
|
1280
|
+
const Ae = class {
|
|
1216
1281
|
constructor(e) {
|
|
1217
|
-
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";
|
|
1282
|
+
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.selectedConfiguration = void 0, this.availableDaysInFuture = void 0, this.name = "limit-future-bookings", this.selectedNumber = 1, this.selectedPeriod = "day";
|
|
1218
1283
|
}
|
|
1219
1284
|
elementNameChangedHandler(e) {
|
|
1220
1285
|
d("nylas-limit-future-bookings", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
1221
1286
|
}
|
|
1287
|
+
selectedConfigurationChangedHandler(e) {
|
|
1288
|
+
var n;
|
|
1289
|
+
const t = (n = e == null ? void 0 : e.scheduler) == null ? void 0 : n.available_days_in_future;
|
|
1290
|
+
t && this.updateNumberAndPeriodFromDays(t);
|
|
1291
|
+
}
|
|
1222
1292
|
availableDaysInFutureChanged(e) {
|
|
1223
|
-
|
|
1224
|
-
this.selectedNumber = t, this.selectedPeriod = n;
|
|
1293
|
+
this.updateNumberAndPeriodFromDays(e);
|
|
1225
1294
|
}
|
|
1226
1295
|
connectedCallback() {
|
|
1227
1296
|
d("nylas-limit-future-bookings", "connectedCallback");
|
|
@@ -1238,59 +1307,68 @@ const Fe = class {
|
|
|
1238
1307
|
}
|
|
1239
1308
|
timePeriodChangedHandler(e) {
|
|
1240
1309
|
const { number: t, period: n } = e.detail;
|
|
1241
|
-
let
|
|
1242
|
-
n === "day" ?
|
|
1310
|
+
let a;
|
|
1311
|
+
n === "day" ? a = t : n === "week" ? a = t * 7 : a = t * 30, this.valueChanged.emit({ value: a, name: "availableDaysInFuture" }), typeof this.internals.setFormValue == "function" && this.internals.setFormValue(a.toString(), this.name);
|
|
1243
1312
|
}
|
|
1244
|
-
|
|
1245
|
-
|
|
1313
|
+
updateNumberAndPeriodFromDays(e) {
|
|
1314
|
+
let t, n;
|
|
1315
|
+
e >= 30 && e % 30 === 0 ? (t = e / 30, n = "month") : e >= 7 && e % 7 === 0 ? (t = e / 7, n = "week") : (t = e, n = "day"), this.selectedNumber = t, this.selectedPeriod = n;
|
|
1246
1316
|
}
|
|
1247
1317
|
render() {
|
|
1248
|
-
return
|
|
1318
|
+
return i(x, { key: "1bb30d8045366579b327f32f954d64c3360efa11" }, i("div", { key: "2594946bd35a01a0ab64288c54fe886f4577d8b5", class: "nylas-limit-future-bookings", part: "nlfb" }, i("label", { key: "cf955eb319e09617dd95037d66a387122238d17c" }, "Limit future bookings", i("span", { key: "4f5658353873122f083faec5504856902bdba106", class: "label-icon" }, i("tooltip-component", { key: "ee20b3543178702592b83e70a5a85988d0c3cd29" }, i("info-icon", { key: "dfe75e502418b3f00a29d3d0fb76338056089266", slot: "tooltip-icon" }), i("span", { key: "c7226da2491e6c3beda2f9739afda6220c37c0e1", slot: "tooltip-content" }, "Set a limit on how far in the future bookings can be made.")))), i("time-period-selector", { key: "5ad178b3d7158738a2882cb5a6554727de34a23d", 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 })));
|
|
1249
1319
|
}
|
|
1250
1320
|
static get formAssociated() {
|
|
1251
1321
|
return !0;
|
|
1252
1322
|
}
|
|
1253
1323
|
get host() {
|
|
1254
|
-
return
|
|
1324
|
+
return _(this);
|
|
1255
1325
|
}
|
|
1256
1326
|
static get watchers() {
|
|
1257
1327
|
return {
|
|
1258
1328
|
name: ["elementNameChangedHandler"],
|
|
1329
|
+
selectedConfiguration: ["selectedConfigurationChangedHandler"],
|
|
1259
1330
|
availableDaysInFuture: ["availableDaysInFutureChanged"]
|
|
1260
1331
|
};
|
|
1261
1332
|
}
|
|
1262
1333
|
};
|
|
1263
|
-
|
|
1264
|
-
|
|
1334
|
+
Vt([
|
|
1335
|
+
C({
|
|
1265
1336
|
name: "nylas-limit-future-bookings",
|
|
1337
|
+
stateToProps: /* @__PURE__ */ new Map([["schedulerConfig.selectedConfiguration", "selectedConfiguration"]]),
|
|
1266
1338
|
eventToProps: {},
|
|
1267
1339
|
fireRegisterEvent: !0
|
|
1268
1340
|
}),
|
|
1269
1341
|
he("design:type", Function),
|
|
1270
1342
|
he("design:paramtypes", []),
|
|
1271
1343
|
he("design:returntype", void 0)
|
|
1272
|
-
],
|
|
1273
|
-
|
|
1274
|
-
const
|
|
1275
|
-
var
|
|
1276
|
-
var o = arguments.length,
|
|
1344
|
+
], Ae.prototype, "render", null);
|
|
1345
|
+
Ae.style = Kt;
|
|
1346
|
+
const qt = ':host{--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.nylas-event-location{display:flex;flex-direction:column;gap:4px;font-family:var(--nylas-font-family)}.nylas-event-location label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:16px;font-style:normal;font-weight:400;line-height:150%;}.nylas-event-location label span.label-icon{margin-left:4px}.nylas-event-location label span.label-icon tooltip-component{display:flex}.nylas-event-location span[slot=select-icon]{border-right:1px solid var(--nylas-base-200);padding:16px 0.75rem 16px 0.5rem;border-radius:var(--nylas-border-radius-2x);border-bottom-right-radius:0;border-top-right-radius:0;height:20px}.nylas-event-location div.location-input{display:grid;grid-template-columns:auto 1fr;width:100%;gap:0.5rem}.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}', Jt = qt;
|
|
1347
|
+
var Gt = function(e, t, n, a) {
|
|
1348
|
+
var o = arguments.length, s = o < 3 ? t : a === null ? a = Object.getOwnPropertyDescriptor(t, n) : a, l;
|
|
1277
1349
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
1278
|
-
|
|
1350
|
+
s = Reflect.decorate(e, t, n, a);
|
|
1279
1351
|
else
|
|
1280
1352
|
for (var r = e.length - 1; r >= 0; r--)
|
|
1281
|
-
(l = e[r]) && (
|
|
1282
|
-
return o > 3 &&
|
|
1353
|
+
(l = e[r]) && (s = (o < 3 ? l(s) : o > 3 ? l(t, n, s) : l(t, n)) || s);
|
|
1354
|
+
return o > 3 && s && Object.defineProperty(t, n, s), s;
|
|
1283
1355
|
}, me = function(e, t) {
|
|
1284
1356
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
1285
1357
|
return Reflect.metadata(e, t);
|
|
1286
1358
|
};
|
|
1287
|
-
const
|
|
1359
|
+
const Fe = class {
|
|
1288
1360
|
constructor(e) {
|
|
1289
|
-
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";
|
|
1361
|
+
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.selectedConfiguration = void 0, this.eventLocation = void 0, this.location = this.eventLocation ?? "", this.selectedLocationOption = this.eventLocation ? "custom" : "none", this.name = "location";
|
|
1290
1362
|
}
|
|
1291
1363
|
elementNameChangedHandler(e) {
|
|
1292
1364
|
d("nylas-location-component", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
1293
1365
|
}
|
|
1366
|
+
selectedConfigurationChangedHandler(e, t) {
|
|
1367
|
+
var a;
|
|
1368
|
+
d("nylas-custom-booking-flow", "selectedConfigurationChangedHandler", e, t);
|
|
1369
|
+
const n = (a = e == null ? void 0 : e.event_booking) == null ? void 0 : a.location;
|
|
1370
|
+
n && (this.selectedLocationOption = n ? "custom" : "none", this.location = n);
|
|
1371
|
+
}
|
|
1294
1372
|
eventLocationChangedHandler(e, t) {
|
|
1295
1373
|
d("nylas-location-component", "eventLocationChangedHandler", e), e !== t && (this.selectedLocationOption = e ? "custom" : "none");
|
|
1296
1374
|
}
|
|
@@ -1320,58 +1398,64 @@ const He = class {
|
|
|
1320
1398
|
{ value: "none", label: "None" },
|
|
1321
1399
|
{ value: "custom", label: "Custom location" }
|
|
1322
1400
|
], t = {
|
|
1323
|
-
none:
|
|
1324
|
-
custom:
|
|
1401
|
+
none: i("location-off-icon", { key: "5344819790f0d245e78de8808b05005eaa610991" }),
|
|
1402
|
+
custom: i("location-icon", { key: "6d931006f7ea79e3290bde60cbdd3c1ca8e827f8" })
|
|
1325
1403
|
};
|
|
1326
|
-
return
|
|
1404
|
+
return i(x, { key: "2117e5636492cd1b3bc3b975fdc1398c030df9a4" }, i("div", { key: "093c3fdfaf0ad88955f8f785a5c589708d941e57", class: "nylas-event-location", part: "nel" }, i("label", { key: "e2754216f675fc82cdc7813bacfe0e928e9ed50e", htmlFor: "location" }, "Location type", i("span", { key: "e402fccc0065a4f6fd0cbd05af345b73b06c4464", class: "label-icon" }, i("tooltip-component", { key: "c818dbca3cbbf29e34c56bbc9caea7fc3816d808" }, i("info-icon", { key: "5ea673e0d49efe7e0a4ac04c3ec64427a63b8843", slot: "tooltip-icon" }), i("span", { key: "dac6ddf369aa6caf62a870ca349745f546ed3959", 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.")))), i("div", { key: "bf334b9e8e03b660f661d264c9ca52444ee859b6", class: "location-input" }, i("select-dropdown", { key: "f216e1589bb3b72a9ed6b9cfbec5683795e1b08e", 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" }, i("span", { key: "6ca96d9f95ac189195c1490e6872b2478cd0d270", slot: "select-icon" }, t[this.selectedLocationOption])), this.selectedLocationOption === "custom" && i("input", { type: "text", part: "nel__location", id: "location", name: "location", maxlength: "1024", value: this.location, onInput: (n) => this.handleChange(n) }))));
|
|
1327
1405
|
}
|
|
1328
1406
|
static get formAssociated() {
|
|
1329
1407
|
return !0;
|
|
1330
1408
|
}
|
|
1331
1409
|
get host() {
|
|
1332
|
-
return
|
|
1410
|
+
return _(this);
|
|
1333
1411
|
}
|
|
1334
1412
|
static get watchers() {
|
|
1335
1413
|
return {
|
|
1336
1414
|
name: ["elementNameChangedHandler"],
|
|
1415
|
+
selectedConfiguration: ["selectedConfigurationChangedHandler"],
|
|
1337
1416
|
eventLocation: ["eventLocationChangedHandler"]
|
|
1338
1417
|
};
|
|
1339
1418
|
}
|
|
1340
1419
|
};
|
|
1341
|
-
|
|
1342
|
-
|
|
1420
|
+
Gt([
|
|
1421
|
+
C({
|
|
1343
1422
|
name: "nylas-location-component",
|
|
1423
|
+
stateToProps: /* @__PURE__ */ new Map([["schedulerConfig.selectedConfiguration", "selectedConfiguration"]]),
|
|
1344
1424
|
eventToProps: {},
|
|
1345
1425
|
fireRegisterEvent: !0
|
|
1346
1426
|
}),
|
|
1347
1427
|
me("design:type", Function),
|
|
1348
1428
|
me("design:paramtypes", []),
|
|
1349
1429
|
me("design:returntype", void 0)
|
|
1350
|
-
],
|
|
1351
|
-
|
|
1352
|
-
const
|
|
1353
|
-
var
|
|
1354
|
-
var o = arguments.length,
|
|
1430
|
+
], Fe.prototype, "render", null);
|
|
1431
|
+
Fe.style = Jt;
|
|
1432
|
+
const Xt = ':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}', Qt = Xt;
|
|
1433
|
+
var en = function(e, t, n, a) {
|
|
1434
|
+
var o = arguments.length, s = o < 3 ? t : a === null ? a = Object.getOwnPropertyDescriptor(t, n) : a, l;
|
|
1355
1435
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
1356
|
-
|
|
1436
|
+
s = Reflect.decorate(e, t, n, a);
|
|
1357
1437
|
else
|
|
1358
1438
|
for (var r = e.length - 1; r >= 0; r--)
|
|
1359
|
-
(l = e[r]) && (
|
|
1360
|
-
return o > 3 &&
|
|
1439
|
+
(l = e[r]) && (s = (o < 3 ? l(s) : o > 3 ? l(t, n, s) : l(t, n)) || s);
|
|
1440
|
+
return o > 3 && s && Object.defineProperty(t, n, s), s;
|
|
1361
1441
|
}, ye = function(e, t) {
|
|
1362
1442
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
1363
1443
|
return Reflect.metadata(e, t);
|
|
1364
1444
|
};
|
|
1365
1445
|
const Me = class {
|
|
1366
1446
|
constructor(e) {
|
|
1367
|
-
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";
|
|
1447
|
+
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.selectedConfiguration = void 0, this.minCancellationNotice = void 0, this.name = "min-cancellation-notice", this.selectedNumber = 1, this.selectedPeriod = "day";
|
|
1368
1448
|
}
|
|
1369
1449
|
elementNameChangedHandler(e) {
|
|
1370
1450
|
d("nylas-min-cancellation-notice", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
1371
1451
|
}
|
|
1452
|
+
selectedConfigurationChangedHandler(e) {
|
|
1453
|
+
var n;
|
|
1454
|
+
const t = (n = e == null ? void 0 : e.scheduler) == null ? void 0 : n.min_cancellation_notice;
|
|
1455
|
+
t && this.updateNumberAndPeriodFromMinutes(t);
|
|
1456
|
+
}
|
|
1372
1457
|
availableDaysInFutureChanged(e) {
|
|
1373
|
-
|
|
1374
|
-
this.selectedNumber = t, this.selectedPeriod = n;
|
|
1458
|
+
this.updateNumberAndPeriodFromMinutes(e);
|
|
1375
1459
|
}
|
|
1376
1460
|
connectedCallback() {
|
|
1377
1461
|
d("nylas-min-cancellation-notice", "connectedCallback");
|
|
@@ -1388,32 +1472,35 @@ const Me = class {
|
|
|
1388
1472
|
}
|
|
1389
1473
|
timePeriodChangedHandler(e) {
|
|
1390
1474
|
const { number: t, period: n } = e.detail;
|
|
1391
|
-
let
|
|
1392
|
-
const o = 60,
|
|
1393
|
-
n === "minute" ?
|
|
1475
|
+
let a;
|
|
1476
|
+
const o = 60, s = o * 24, l = s * 7, r = s * 30;
|
|
1477
|
+
n === "minute" ? a = t : n === "hour" ? a = t * o : n === "day" ? a = t * s : n === "week" ? a = t * l : n === "month" ? a = t * r : a = 0, this.valueChanged.emit({ value: a, name: "minCancellationNotice" }), typeof this.internals.setFormValue == "function" && this.internals.setFormValue(a.toString(), this.name);
|
|
1394
1478
|
}
|
|
1395
|
-
|
|
1396
|
-
|
|
1479
|
+
updateNumberAndPeriodFromMinutes(e) {
|
|
1480
|
+
let s, l;
|
|
1481
|
+
e >= 43200 ? (s = Math.floor(e / 43200), l = "month") : e >= 10080 ? (s = Math.floor(e / 10080), l = "week") : e >= 1440 ? (s = Math.floor(e / 1440), l = "day") : e >= 60 ? (s = Math.floor(e / 60), l = "hour") : (s = e, l = "minute"), this.selectedNumber = s, this.selectedPeriod = l;
|
|
1397
1482
|
}
|
|
1398
1483
|
render() {
|
|
1399
|
-
return
|
|
1484
|
+
return i(x, { key: "d2eb0d080d1ce4645a642a4f5d55270ed170e882" }, i("div", { key: "2743c3c781ad47c9d0d53fdad2773f45d172e1f4", class: "nylas-min-cancellation-notice", part: "nmcn" }, i("label", { key: "457729b50558651645ecb10398586af1078cfd34" }, "Minimum cancellation notice", i("span", { key: "00b310035def5b8bbc183fa03d2bcb37d7c04b42", class: "label-icon" }, i("tooltip-component", { key: "27c7695f6302e2d043899656f15a70846c2858e2" }, i("info-icon", { key: "10f878cb410cc284e86890a0d6047c27bdc7f455", slot: "tooltip-icon" }), i("span", { key: "e853afaa116b43371d01fcb3b801e622902e22cd", slot: "tooltip-content" }, "Set the minimum amount of time required to cancel an event.")))), i("time-period-selector", { key: "8bb3955f8cce7661e213fbf2c107f8326937b467", 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 })));
|
|
1400
1485
|
}
|
|
1401
1486
|
static get formAssociated() {
|
|
1402
1487
|
return !0;
|
|
1403
1488
|
}
|
|
1404
1489
|
get host() {
|
|
1405
|
-
return
|
|
1490
|
+
return _(this);
|
|
1406
1491
|
}
|
|
1407
1492
|
static get watchers() {
|
|
1408
1493
|
return {
|
|
1409
1494
|
name: ["elementNameChangedHandler"],
|
|
1495
|
+
selectedConfiguration: ["selectedConfigurationChangedHandler"],
|
|
1410
1496
|
availableDaysInFuture: ["availableDaysInFutureChanged"]
|
|
1411
1497
|
};
|
|
1412
1498
|
}
|
|
1413
1499
|
};
|
|
1414
|
-
|
|
1415
|
-
|
|
1500
|
+
en([
|
|
1501
|
+
C({
|
|
1416
1502
|
name: "nylas-min-cancellation-notice",
|
|
1503
|
+
stateToProps: /* @__PURE__ */ new Map([["schedulerConfig.selectedConfiguration", "selectedConfiguration"]]),
|
|
1417
1504
|
eventToProps: {},
|
|
1418
1505
|
fireRegisterEvent: !0
|
|
1419
1506
|
}),
|
|
@@ -1421,40 +1508,40 @@ Qt([
|
|
|
1421
1508
|
ye("design:paramtypes", []),
|
|
1422
1509
|
ye("design:returntype", void 0)
|
|
1423
1510
|
], Me.prototype, "render", null);
|
|
1424
|
-
Me.style =
|
|
1511
|
+
Me.style = Qt;
|
|
1425
1512
|
var Ne = { exports: {} };
|
|
1426
1513
|
(function(e, t) {
|
|
1427
|
-
(function(n,
|
|
1428
|
-
e.exports =
|
|
1429
|
-
})(
|
|
1430
|
-
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" },
|
|
1514
|
+
(function(n, a) {
|
|
1515
|
+
e.exports = a();
|
|
1516
|
+
})(Ue, function() {
|
|
1517
|
+
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" }, a = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, o = /\d\d/, s = /\d\d?/, l = /\d*[^-_:/,()\s\d]+/, r = {}, u = function(c) {
|
|
1431
1518
|
return (c = +c) + (c > 68 ? 1900 : 2e3);
|
|
1432
|
-
},
|
|
1433
|
-
return function(
|
|
1434
|
-
this[c] = +
|
|
1519
|
+
}, f = function(c) {
|
|
1520
|
+
return function(b) {
|
|
1521
|
+
this[c] = +b;
|
|
1435
1522
|
};
|
|
1436
|
-
},
|
|
1437
|
-
(this.zone || (this.zone = {})).offset = function(
|
|
1438
|
-
if (!
|
|
1523
|
+
}, p = [/[+-]\d\d:?(\d\d)?|Z/, function(c) {
|
|
1524
|
+
(this.zone || (this.zone = {})).offset = function(b) {
|
|
1525
|
+
if (!b || b === "Z")
|
|
1439
1526
|
return 0;
|
|
1440
|
-
var m =
|
|
1527
|
+
var m = b.match(/([+-]|\d\d)/g), g = 60 * m[1] + (+m[2] || 0);
|
|
1441
1528
|
return g === 0 ? 0 : m[0] === "+" ? -g : g;
|
|
1442
1529
|
}(c);
|
|
1443
|
-
}],
|
|
1444
|
-
var
|
|
1445
|
-
return
|
|
1446
|
-
}, v = function(c,
|
|
1530
|
+
}], h = function(c) {
|
|
1531
|
+
var b = r[c];
|
|
1532
|
+
return b && (b.indexOf ? b : b.s.concat(b.f));
|
|
1533
|
+
}, v = function(c, b) {
|
|
1447
1534
|
var m, g = r.meridiem;
|
|
1448
1535
|
if (g) {
|
|
1449
1536
|
for (var D = 1; D <= 24; D += 1)
|
|
1450
|
-
if (c.indexOf(g(D, 0,
|
|
1537
|
+
if (c.indexOf(g(D, 0, b)) > -1) {
|
|
1451
1538
|
m = D > 12;
|
|
1452
1539
|
break;
|
|
1453
1540
|
}
|
|
1454
1541
|
} else
|
|
1455
|
-
m = c === (
|
|
1542
|
+
m = c === (b ? "pm" : "PM");
|
|
1456
1543
|
return m;
|
|
1457
|
-
},
|
|
1544
|
+
}, O = { A: [l, function(c) {
|
|
1458
1545
|
this.afternoon = v(c, !1);
|
|
1459
1546
|
}], a: [l, function(c) {
|
|
1460
1547
|
this.afternoon = v(c, !0);
|
|
@@ -1464,84 +1551,84 @@ var Ne = { exports: {} };
|
|
|
1464
1551
|
this.milliseconds = 10 * +c;
|
|
1465
1552
|
}], SSS: [/\d{3}/, function(c) {
|
|
1466
1553
|
this.milliseconds = +c;
|
|
1467
|
-
}], s: [
|
|
1468
|
-
var
|
|
1469
|
-
if (this.day = m[0],
|
|
1554
|
+
}], s: [s, f("seconds")], ss: [s, f("seconds")], m: [s, f("minutes")], mm: [s, f("minutes")], H: [s, f("hours")], h: [s, f("hours")], HH: [s, f("hours")], hh: [s, f("hours")], D: [s, f("day")], DD: [o, f("day")], Do: [l, function(c) {
|
|
1555
|
+
var b = r.ordinal, m = c.match(/\d+/);
|
|
1556
|
+
if (this.day = m[0], b)
|
|
1470
1557
|
for (var g = 1; g <= 31; g += 1)
|
|
1471
|
-
|
|
1472
|
-
}], M: [
|
|
1473
|
-
var
|
|
1558
|
+
b(g).replace(/\[|\]/g, "") === c && (this.day = g);
|
|
1559
|
+
}], M: [s, f("month")], MM: [o, f("month")], MMM: [l, function(c) {
|
|
1560
|
+
var b = h("months"), m = (h("monthsShort") || b.map(function(g) {
|
|
1474
1561
|
return g.slice(0, 3);
|
|
1475
1562
|
})).indexOf(c) + 1;
|
|
1476
1563
|
if (m < 1)
|
|
1477
1564
|
throw new Error();
|
|
1478
1565
|
this.month = m % 12 || m;
|
|
1479
1566
|
}], MMMM: [l, function(c) {
|
|
1480
|
-
var
|
|
1481
|
-
if (
|
|
1567
|
+
var b = h("months").indexOf(c) + 1;
|
|
1568
|
+
if (b < 1)
|
|
1482
1569
|
throw new Error();
|
|
1483
|
-
this.month =
|
|
1484
|
-
}], Y: [/[+-]?\d+/,
|
|
1485
|
-
this.year =
|
|
1486
|
-
}], YYYY: [/\d{4}/,
|
|
1487
|
-
function
|
|
1488
|
-
var
|
|
1489
|
-
|
|
1490
|
-
for (var g = (c =
|
|
1491
|
-
var
|
|
1492
|
-
return
|
|
1493
|
-
return F ||
|
|
1570
|
+
this.month = b % 12 || b;
|
|
1571
|
+
}], Y: [/[+-]?\d+/, f("year")], YY: [o, function(c) {
|
|
1572
|
+
this.year = u(c);
|
|
1573
|
+
}], YYYY: [/\d{4}/, f("year")], Z: p, ZZ: p };
|
|
1574
|
+
function k(c) {
|
|
1575
|
+
var b, m;
|
|
1576
|
+
b = c, m = r && r.formats;
|
|
1577
|
+
for (var g = (c = b.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(R, H, S) {
|
|
1578
|
+
var T = S && S.toUpperCase();
|
|
1579
|
+
return H || m[S] || n[S] || m[T].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(A, F, P) {
|
|
1580
|
+
return F || P.slice(1);
|
|
1494
1581
|
});
|
|
1495
|
-
})).match(
|
|
1496
|
-
var
|
|
1497
|
-
g[I] =
|
|
1582
|
+
})).match(a), D = g.length, I = 0; I < D; I += 1) {
|
|
1583
|
+
var Y = g[I], N = O[Y], $ = N && N[0], L = N && N[1];
|
|
1584
|
+
g[I] = L ? { regex: $, parser: L } : Y.replace(/^\[|\]$/g, "");
|
|
1498
1585
|
}
|
|
1499
|
-
return function(
|
|
1500
|
-
for (var
|
|
1501
|
-
var A = g[
|
|
1586
|
+
return function(R) {
|
|
1587
|
+
for (var H = {}, S = 0, T = 0; S < D; S += 1) {
|
|
1588
|
+
var A = g[S];
|
|
1502
1589
|
if (typeof A == "string")
|
|
1503
|
-
|
|
1590
|
+
T += A.length;
|
|
1504
1591
|
else {
|
|
1505
|
-
var F = A.regex,
|
|
1506
|
-
|
|
1592
|
+
var F = A.regex, P = A.parser, K = R.slice(T), B = F.exec(K)[0];
|
|
1593
|
+
P.call(H, B), R = R.replace(B, "");
|
|
1507
1594
|
}
|
|
1508
1595
|
}
|
|
1509
1596
|
return function(z) {
|
|
1510
|
-
var
|
|
1511
|
-
if (
|
|
1512
|
-
var
|
|
1513
|
-
|
|
1597
|
+
var E = z.afternoon;
|
|
1598
|
+
if (E !== void 0) {
|
|
1599
|
+
var j = z.hours;
|
|
1600
|
+
E ? j < 12 && (z.hours += 12) : j === 12 && (z.hours = 0), delete z.afternoon;
|
|
1514
1601
|
}
|
|
1515
|
-
}(
|
|
1602
|
+
}(H), H;
|
|
1516
1603
|
};
|
|
1517
1604
|
}
|
|
1518
|
-
return function(c,
|
|
1519
|
-
m.p.customParseFormat = !0, c && c.parseTwoDigitYear && (
|
|
1520
|
-
var g =
|
|
1605
|
+
return function(c, b, m) {
|
|
1606
|
+
m.p.customParseFormat = !0, c && c.parseTwoDigitYear && (u = c.parseTwoDigitYear);
|
|
1607
|
+
var g = b.prototype, D = g.parse;
|
|
1521
1608
|
g.parse = function(I) {
|
|
1522
|
-
var
|
|
1523
|
-
this.$u =
|
|
1524
|
-
var
|
|
1525
|
-
if (typeof
|
|
1526
|
-
var
|
|
1527
|
-
|
|
1609
|
+
var Y = I.date, N = I.utc, $ = I.args;
|
|
1610
|
+
this.$u = N;
|
|
1611
|
+
var L = $[1];
|
|
1612
|
+
if (typeof L == "string") {
|
|
1613
|
+
var R = $[2] === !0, H = $[3] === !0, S = R || H, T = $[2];
|
|
1614
|
+
H && (T = $[2]), r = this.$locale(), !R && T && (r = m.Ls[T]), this.$d = function(K, B, z) {
|
|
1528
1615
|
try {
|
|
1529
|
-
if (["x", "X"].indexOf(
|
|
1530
|
-
return new Date((
|
|
1531
|
-
var
|
|
1532
|
-
|
|
1533
|
-
var Q =
|
|
1616
|
+
if (["x", "X"].indexOf(B) > -1)
|
|
1617
|
+
return new Date((B === "X" ? 1e3 : 1) * K);
|
|
1618
|
+
var E = k(B)(K), j = E.year, V = E.month, Re = E.day, Pe = E.hours, ze = E.minutes, Be = E.seconds, je = E.milliseconds, ge = E.zone, J = /* @__PURE__ */ new Date(), G = Re || (j || V ? 1 : J.getDate()), X = j || J.getFullYear(), q = 0;
|
|
1619
|
+
j && !V || (q = V > 0 ? V - 1 : J.getMonth());
|
|
1620
|
+
var Q = Pe || 0, ee = ze || 0, te = Be || 0, ne = je || 0;
|
|
1534
1621
|
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);
|
|
1535
1622
|
} catch {
|
|
1536
1623
|
return /* @__PURE__ */ new Date("");
|
|
1537
1624
|
}
|
|
1538
|
-
}(
|
|
1539
|
-
} else if (
|
|
1540
|
-
for (var A =
|
|
1541
|
-
|
|
1542
|
-
var
|
|
1543
|
-
if (
|
|
1544
|
-
this.$d =
|
|
1625
|
+
}(Y, L, N), this.init(), T && T !== !0 && (this.$L = this.locale(T).$L), S && Y != this.format(L) && (this.$d = /* @__PURE__ */ new Date("")), r = {};
|
|
1626
|
+
} else if (L instanceof Array)
|
|
1627
|
+
for (var A = L.length, F = 1; F <= A; F += 1) {
|
|
1628
|
+
$[1] = L[F - 1];
|
|
1629
|
+
var P = m.apply(this, $);
|
|
1630
|
+
if (P.isValid()) {
|
|
1631
|
+
this.$d = P.$d, this.$L = P.$L, this.init();
|
|
1545
1632
|
break;
|
|
1546
1633
|
}
|
|
1547
1634
|
F === A && (this.$d = /* @__PURE__ */ new Date(""));
|
|
@@ -1552,9 +1639,9 @@ var Ne = { exports: {} };
|
|
|
1552
1639
|
};
|
|
1553
1640
|
});
|
|
1554
1641
|
})(Ne);
|
|
1555
|
-
const
|
|
1556
|
-
|
|
1557
|
-
const
|
|
1642
|
+
const tn = Ne.exports, nn = ':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}', an = nn;
|
|
1643
|
+
Z.extend(tn);
|
|
1644
|
+
const sn = class {
|
|
1558
1645
|
constructor(e) {
|
|
1559
1646
|
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;
|
|
1560
1647
|
}
|
|
@@ -1563,10 +1650,10 @@ const an = class {
|
|
|
1563
1650
|
}
|
|
1564
1651
|
minimumStartTimeChangedHandler() {
|
|
1565
1652
|
if (this.minimumStartTime) {
|
|
1566
|
-
let e =
|
|
1653
|
+
let e = Z().hour(parseInt(this.minimumStartTime)).minute(parseInt(this.minimumStartTime.slice(-4, -2)));
|
|
1567
1654
|
this.minimumStartTime.slice(-2).toLowerCase() === "pm" && parseInt(this.minimumStartTime) !== 12 ? e = e.add(12, "hour") : this.minimumStartTime.slice(-2).toLowerCase() === "am" && parseInt(this.minimumStartTime) === 12 && (e = e.subtract(12, "hour")), this.times = this.generateTimes();
|
|
1568
|
-
const t =
|
|
1569
|
-
|
|
1655
|
+
const t = Z(this.times[0].value, "hh:mma");
|
|
1656
|
+
Z(this.time, "hh:mma").isBefore(t) && (this.err = "Invalid", this.setFormError(null, "Invalid"));
|
|
1570
1657
|
}
|
|
1571
1658
|
}
|
|
1572
1659
|
componentDidRender() {
|
|
@@ -1588,13 +1675,13 @@ const an = class {
|
|
|
1588
1675
|
return;
|
|
1589
1676
|
}
|
|
1590
1677
|
if (t === "") {
|
|
1591
|
-
const
|
|
1592
|
-
this.setTime(e,
|
|
1678
|
+
const a = ke().format("hh:mma");
|
|
1679
|
+
this.setTime(e, a);
|
|
1593
1680
|
return;
|
|
1594
1681
|
}
|
|
1595
|
-
if (!
|
|
1596
|
-
const
|
|
1597
|
-
this.setTime(
|
|
1682
|
+
if (!xe(t)) {
|
|
1683
|
+
const a = ae(t);
|
|
1684
|
+
this.setTime(a);
|
|
1598
1685
|
return;
|
|
1599
1686
|
}
|
|
1600
1687
|
this.setTime(e, t);
|
|
@@ -1604,12 +1691,12 @@ const an = class {
|
|
|
1604
1691
|
const t = (n = e.target) == null ? void 0 : n.value;
|
|
1605
1692
|
if (ie(t)) {
|
|
1606
1693
|
if (t === "") {
|
|
1607
|
-
const
|
|
1694
|
+
const a = ke().format("hh:mma"), o = this.times.findIndex((s) => s.value === a);
|
|
1608
1695
|
o > -1 && this.scrollToViewWithinParent(o);
|
|
1609
1696
|
return;
|
|
1610
1697
|
}
|
|
1611
|
-
if (!
|
|
1612
|
-
const
|
|
1698
|
+
if (!xe(t)) {
|
|
1699
|
+
const a = ae(t), o = this.times.findIndex((s) => s.value === a);
|
|
1613
1700
|
o > -1 && this.scrollToViewWithinParent(o);
|
|
1614
1701
|
return;
|
|
1615
1702
|
}
|
|
@@ -1617,14 +1704,14 @@ const an = class {
|
|
|
1617
1704
|
}
|
|
1618
1705
|
generateTimes() {
|
|
1619
1706
|
const e = [];
|
|
1620
|
-
let t =
|
|
1621
|
-
this.minimumStartTime && (t =
|
|
1622
|
-
const n = t.endOf("day").diff(t, "minutes"),
|
|
1623
|
-
for (let o = 0; o <
|
|
1624
|
-
const
|
|
1625
|
-
if (o ==
|
|
1707
|
+
let t = Z().set("hour", 0).set("minute", 0).set("second", 0);
|
|
1708
|
+
this.minimumStartTime && (t = Z(this.minimumStartTime, "hh:mma"));
|
|
1709
|
+
const n = t.endOf("day").diff(t, "minutes"), a = Math.round(n / 15);
|
|
1710
|
+
for (let o = 0; o < a + 1; o++) {
|
|
1711
|
+
const s = t.add(o * 15, "minute");
|
|
1712
|
+
if (o == a && s.format("hh:mma").includes("am"))
|
|
1626
1713
|
break;
|
|
1627
|
-
e.push({ id: o, value:
|
|
1714
|
+
e.push({ id: o, value: s.format("hh:mma") });
|
|
1628
1715
|
}
|
|
1629
1716
|
return e;
|
|
1630
1717
|
}
|
|
@@ -1637,66 +1724,66 @@ const an = class {
|
|
|
1637
1724
|
if (this.ariaActivedescendant === "")
|
|
1638
1725
|
this.ariaActivedescendant = this.times[0].id.toString(), this.focusOption(0);
|
|
1639
1726
|
else {
|
|
1640
|
-
const t = this.times.findIndex((
|
|
1727
|
+
const t = this.times.findIndex((a) => a.id.toString() === this.ariaActivedescendant), n = t + 1 < this.times.length ? t + 1 : 0;
|
|
1641
1728
|
this.ariaActivedescendant = this.times[n].id.toString(), this.focusOption(n);
|
|
1642
1729
|
}
|
|
1643
1730
|
} else if (e.key === "ArrowUp")
|
|
1644
1731
|
if (e.preventDefault(), this.ariaActivedescendant === "")
|
|
1645
1732
|
this.ariaActivedescendant = this.times[this.times.length - 1].id.toString(), this.focusOption(this.times.length - 1);
|
|
1646
1733
|
else {
|
|
1647
|
-
const t = this.times.findIndex((
|
|
1734
|
+
const t = this.times.findIndex((a) => a.id.toString() === this.ariaActivedescendant), n = t - 1 >= 0 ? t - 1 : this.times.length - 1;
|
|
1648
1735
|
this.ariaActivedescendant = this.times[n].id.toString(), this.focusOption(n);
|
|
1649
1736
|
}
|
|
1650
1737
|
else
|
|
1651
1738
|
e.key === "Escape" && (this.showTimes = !1, this.timeInput.focus());
|
|
1652
1739
|
}
|
|
1653
1740
|
handleListboxKeydown(e) {
|
|
1654
|
-
const t = this.times, n = t.findIndex((
|
|
1741
|
+
const t = this.times, n = t.findIndex((a) => a.id.toString() === this.ariaActivedescendant);
|
|
1655
1742
|
if (e.key === "ArrowDown" || e.key === "Tab" && !e.shiftKey) {
|
|
1656
1743
|
e.preventDefault();
|
|
1657
|
-
const
|
|
1658
|
-
this.ariaActivedescendant = t[
|
|
1744
|
+
const a = n + 1 < t.length ? n + 1 : 0;
|
|
1745
|
+
this.ariaActivedescendant = t[a].id.toString(), this.focusOption(a);
|
|
1659
1746
|
} else if (e.key === "ArrowUp" || e.key === "Tab" && e.shiftKey) {
|
|
1660
1747
|
e.preventDefault();
|
|
1661
|
-
const
|
|
1662
|
-
this.ariaActivedescendant = t[
|
|
1748
|
+
const a = n - 1 >= 0 ? n - 1 : t.length - 1;
|
|
1749
|
+
this.ariaActivedescendant = t[a].id.toString(), this.focusOption(a);
|
|
1663
1750
|
} else if (e.key === "Enter") {
|
|
1664
1751
|
if (e.preventDefault(), this.ariaActivedescendant) {
|
|
1665
|
-
const
|
|
1666
|
-
this.handleTimeChange(e,
|
|
1752
|
+
const a = t[n];
|
|
1753
|
+
this.handleTimeChange(e, a.value), this.showTimes = !1, this.ariaActivedescendant = "", this.timeInput.focus();
|
|
1667
1754
|
}
|
|
1668
1755
|
} else
|
|
1669
1756
|
e.key === "Escape" && (this.showTimes = !1, this.timeInput.focus());
|
|
1670
1757
|
}
|
|
1671
1758
|
scrollToViewWithinParent(e) {
|
|
1672
1759
|
var l;
|
|
1673
|
-
const t = this.times[e], n = (l = this.el.shadowRoot) == null ? void 0 : l.getElementById(t.id.toString()),
|
|
1760
|
+
const t = this.times[e], n = (l = this.el.shadowRoot) == null ? void 0 : l.getElementById(t.id.toString()), a = this.timeMenu;
|
|
1674
1761
|
this.ariaActivedescendant = t.id.toString();
|
|
1675
|
-
const o = n.getBoundingClientRect(),
|
|
1676
|
-
o.top <
|
|
1762
|
+
const o = n.getBoundingClientRect(), s = a.getBoundingClientRect();
|
|
1763
|
+
o.top < s.top ? a.scrollTop -= s.top - o.top : o.bottom > s.bottom && (a.scrollTop += o.bottom - s.bottom), o.left < s.left ? a.scrollLeft -= s.left - o.left : o.right > s.right && (a.scrollLeft += o.right - s.right);
|
|
1677
1764
|
}
|
|
1678
1765
|
focusOption(e) {
|
|
1679
1766
|
var o;
|
|
1680
1767
|
const t = this.times[e];
|
|
1681
1768
|
if (!t)
|
|
1682
1769
|
return;
|
|
1683
|
-
const n = t.id.toString(),
|
|
1684
|
-
|
|
1770
|
+
const n = t.id.toString(), a = (o = this.el.shadowRoot) == null ? void 0 : o.getElementById(n);
|
|
1771
|
+
a && (a.focus(), a.scrollIntoView({ behavior: "smooth", block: "nearest" }));
|
|
1685
1772
|
}
|
|
1686
1773
|
render() {
|
|
1687
|
-
return
|
|
1774
|
+
return i(x, { key: "fe86daaa8256c8fb59ffe2dfcbf50220f3a7b746" }, i("div", { key: "8cffe49df87c5bf2b73cef66236c806b47d623d4", class: "time-picker", part: "time-picker" }, i("input", { key: "6f735244c63287b0ec0668b688bbb18bb405346b", type: "text", name: this.name, id: this.name, part: "time-input", class: {
|
|
1688
1775
|
"time-input": !0,
|
|
1689
1776
|
error: !!this.err || this.hasError
|
|
1690
1777
|
}, ref: (e) => this.timeInput = e, value: this.time, onClick: () => {
|
|
1691
1778
|
this.showTimes = !0, this.shouldAutoScroll = !0;
|
|
1692
|
-
}, "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 &&
|
|
1779
|
+
}, "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 && i("div", { class: "invalid-time-icon" }), this.showTimes && i("div", { class: "times", part: "times", ref: (e) => this.timeMenu = e }, i("ul", { tabindex: "-1", role: "listbox", "aria-label": this.name, "aria-activedescendant": this.ariaActivedescendant, onKeyDown: (e) => this.handleListboxKeydown(e) }, this.times.map((e) => i("li", { tabindex: "0", key: e.id, id: e.id.toString(), class: {
|
|
1693
1780
|
focused: this.ariaActivedescendant === e.id.toString()
|
|
1694
1781
|
}, onClick: (t) => {
|
|
1695
1782
|
this.handleTimeChange(t, e.value), this.showTimes = !1, this.timeInput.focus();
|
|
1696
|
-
}, role: "option" }, `${e.value}`)))), !this.showTimes && this.err &&
|
|
1783
|
+
}, role: "option" }, `${e.value}`)))), !this.showTimes && this.err && i("p", { class: "error", id: "email-error" }, this.err)));
|
|
1697
1784
|
}
|
|
1698
1785
|
get el() {
|
|
1699
|
-
return
|
|
1786
|
+
return _(this);
|
|
1700
1787
|
}
|
|
1701
1788
|
static get watchers() {
|
|
1702
1789
|
return {
|
|
@@ -1704,28 +1791,28 @@ const an = class {
|
|
|
1704
1791
|
};
|
|
1705
1792
|
}
|
|
1706
1793
|
};
|
|
1707
|
-
|
|
1794
|
+
sn.style = an;
|
|
1708
1795
|
export {
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1796
|
+
Ve as add_circle_icon,
|
|
1797
|
+
Ge as button_component,
|
|
1798
|
+
et as calendar_info_icon,
|
|
1799
|
+
at as calendar_patterns_icon,
|
|
1800
|
+
ot as flow_icon,
|
|
1801
|
+
dt as location_icon,
|
|
1715
1802
|
pt as location_off_icon,
|
|
1716
|
-
|
|
1803
|
+
ht as multi_select_dropdown,
|
|
1717
1804
|
Ce as nylas_availability_picker,
|
|
1718
1805
|
Te as nylas_booking_calendar_picker,
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1806
|
+
Ee as nylas_buffer_time,
|
|
1807
|
+
Oe as nylas_calendar_picker,
|
|
1808
|
+
Se as nylas_custom_booking_flow,
|
|
1809
|
+
De as nylas_event_description,
|
|
1810
|
+
Ie as nylas_event_duration,
|
|
1724
1811
|
$e as nylas_event_info,
|
|
1725
1812
|
Le as nylas_event_limits,
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1813
|
+
He as nylas_event_title,
|
|
1814
|
+
Ae as nylas_limit_future_bookings,
|
|
1815
|
+
Fe as nylas_location_component,
|
|
1729
1816
|
Me as nylas_min_cancellation_notice,
|
|
1730
|
-
|
|
1817
|
+
sn as nylas_time_window_picker
|
|
1731
1818
|
};
|