@nylas/react 1.1.0-canary.18 → 1.1.0-canary.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{add-circle-icon_2.entry-3b13ee64.js → add-circle-icon_2.entry-3ca337a6.js} +5 -5
- package/dist/{add-circle-icon_2.entry-3091976b.cjs → add-circle-icon_2.entry-adde5fdf.cjs} +1 -1
- package/dist/{archive-icon_7.entry-c2b6d860.cjs → archive-icon_7.entry-2b56ef80.cjs} +1 -1
- package/dist/{archive-icon_7.entry-8932618a.js → archive-icon_7.entry-896a1054.js} +13 -13
- package/dist/{arrow-icon.entry-a159bee8.cjs → arrow-icon.entry-0288f3fc.cjs} +1 -1
- package/dist/arrow-icon.entry-9aaa93fd.js +15 -0
- package/dist/{bold-icon_3.entry-447d0537.js → bold-icon_3.entry-0061cf1f.js} +4 -4
- package/dist/{bold-icon_3.entry-c51e1af3.cjs → bold-icon_3.entry-e7810620.cjs} +1 -1
- package/dist/button-component_4.entry-276606e6.js +115 -0
- package/dist/button-component_4.entry-e53a8f37.cjs +1 -0
- package/dist/calendar-agenda-fill-icon_35.entry-a19cae9c.js +4178 -0
- package/dist/calendar-agenda-fill-icon_35.entry-fa968081.cjs +7 -0
- package/dist/{calendar-cancel-icon.entry-a78f27bc.js → calendar-cancel-icon.entry-71eae711.js} +1 -1
- package/dist/{calendar-cancel-icon.entry-805febcc.cjs → calendar-cancel-icon.entry-8e8b25b6.cjs} +1 -1
- package/dist/{calendar-check-icon_2.entry-4a0fd7bd.cjs → calendar-check-icon_2.entry-562e98cf.cjs} +1 -1
- package/dist/{calendar-check-icon_2.entry-7c8b6c92.js → calendar-check-icon_2.entry-6f971ca2.js} +1 -1
- package/dist/{calendar-icon.entry-1fc018b4.cjs → calendar-icon.entry-3a59af30.cjs} +1 -1
- package/dist/{calendar-icon.entry-96f9727f.js → calendar-icon.entry-3e496896.js} +1 -1
- package/dist/{chevron-icon_3.entry-25d90239.js → chevron-icon_3.entry-7eac0ed5.js} +37 -34
- package/dist/chevron-icon_3.entry-7ff10540.cjs +1 -0
- package/dist/{clock-icon_2.entry-c1b22ed4.js → clock-icon_2.entry-120d672e.js} +5 -5
- package/dist/{clock-icon_2.entry-2406c3d0.cjs → clock-icon_2.entry-43873262.cjs} +1 -1
- package/dist/{constants-f34b9c6e-b774916c.cjs → constants-7ce66b44-a951d78c.cjs} +5 -5
- package/dist/{constants-f34b9c6e-f1c4dd0d.js → constants-7ce66b44-e7ca66c2.js} +484 -383
- package/dist/copy-icon_4.entry-57874c4f.cjs +1 -0
- package/dist/copy-icon_4.entry-9a949d24.js +45 -0
- package/dist/{document-refresh-icon.entry-570f9c9d.js → document-refresh-icon.entry-f0d95ac8.js} +5 -5
- package/dist/document-refresh-icon.entry-f1d3f32d.cjs +1 -0
- package/dist/elements/index.d.ts +14 -0
- package/dist/{elements-dc5b338e-550a6cb1.cjs → elements-dc5b338e-62b53496.cjs} +1 -1
- package/dist/{elements-dc5b338e-cafa7a55.js → elements-dc5b338e-974e2077.js} +1 -1
- package/dist/{focus-visible-e8093c16-022799ce.js → focus-visible-e8093c16-7a512fc0.js} +1 -1
- package/dist/{focus-visible-e8093c16-c14162e8.cjs → focus-visible-e8093c16-923e1041.cjs} +1 -1
- package/dist/{forward-icon_6.entry-55752b23.cjs → forward-icon_6.entry-45b70066.cjs} +3 -3
- package/dist/{forward-icon_6.entry-9b832146.js → forward-icon_6.entry-675c0b73.js} +9 -9
- package/dist/{globe-icon.entry-2b61820e.js → globe-icon.entry-3296e427.js} +2 -2
- package/dist/{globe-icon.entry-dabe7b8b.cjs → globe-icon.entry-7ecd6221.cjs} +1 -1
- package/dist/google-logo-icon_4.entry-aa9f8b35.js +584 -0
- package/dist/google-logo-icon_4.entry-fd734a59.cjs +1 -0
- package/dist/index-53420959-1c0d390d.js +5 -0
- package/dist/index-53420959-8e7b10db.cjs +1 -0
- package/dist/{index-812162da.js → index-5efb84b8.js} +813 -793
- package/dist/{index-6d9eeb53-3edef246.js → index-6d9eeb53-4e2a7f9f.js} +2 -2
- package/dist/{index-6d9eeb53-3049fc04.cjs → index-6d9eeb53-aa1dfa96.cjs} +1 -1
- package/dist/index-d36b8fb8.cjs +42 -0
- package/dist/{index.es-9cc0eb3c-52226859.js → index.es-9cc0eb3c-65f8af0c.js} +1 -1
- package/dist/{index.es-9cc0eb3c-0c99c055.cjs → index.es-9cc0eb3c-8eefd4fc.cjs} +1 -1
- package/dist/{info-icon_2.entry-5f6b9af8.cjs → info-icon_2.entry-e612f1d6.cjs} +1 -1
- package/dist/{info-icon_2.entry-2fe6c16c.js → info-icon_2.entry-f06c8dd0.js} +8 -8
- package/dist/{input-dropdown_2.entry-dbdb5aa3.cjs → input-dropdown_2.entry-ad380260.cjs} +1 -1
- package/dist/{input-dropdown_2.entry-dbd0d6f4.js → input-dropdown_2.entry-ccd95678.js} +3 -3
- package/dist/{loading-icon.entry-e179f122.cjs → loading-icon.entry-678a6b3f.cjs} +1 -1
- package/dist/loading-icon.entry-9e6670d5.js +15 -0
- package/dist/{mailbox-store-64b4ef7c-0eac526c.cjs → mailbox-store-64b4ef7c-9bd02ffd.cjs} +1 -1
- package/dist/{mailbox-store-64b4ef7c-22a6c565.js → mailbox-store-64b4ef7c-b56d5e78.js} +2 -2
- package/dist/multi-select-dropdown.entry-5bb80d89.cjs +1 -0
- package/dist/multi-select-dropdown.entry-edf10867.js +91 -0
- package/dist/{nylas-booked-event-card_10.entry-e0990f5b.js → nylas-booked-event-card_10.entry-92f6e85d.js} +267 -235
- package/dist/nylas-booked-event-card_10.entry-ad4671b2.cjs +1 -0
- package/dist/{nylas-custom-booking-flow.entry-bc64af5f.js → nylas-custom-booking-flow.entry-b39a2bf2.js} +3 -3
- package/dist/{nylas-custom-booking-flow.entry-898c8cc9.cjs → nylas-custom-booking-flow.entry-cef0041a.cjs} +1 -1
- package/dist/{nylas-form-card.entry-c564b52e.js → nylas-form-card.entry-bf4545e2.js} +11 -11
- package/dist/{nylas-form-card.entry-0c71f4fc.cjs → nylas-form-card.entry-fba5d623.cjs} +1 -1
- package/dist/{nylas-if-state.entry-e9486e12.js → nylas-if-state.entry-2739dc10.js} +3 -3
- package/dist/{nylas-if-state.entry-ff6a2046.cjs → nylas-if-state.entry-d7b818a6.cjs} +1 -1
- package/dist/{nylas-list-folders.entry-90716d2b.cjs → nylas-list-folders.entry-0ec6ba20.cjs} +1 -1
- package/dist/{nylas-list-folders.entry-0258af1e.js → nylas-list-folders.entry-3197e390.js} +7 -7
- package/dist/{nylas-list-threads.entry-21edf012.cjs → nylas-list-threads.entry-2a7e1e84.cjs} +1 -1
- package/dist/{nylas-list-threads.entry-1abcdd30.js → nylas-list-threads.entry-9004c490.js} +3 -3
- package/dist/{nylas-login.entry-2e0ce95e.cjs → nylas-login.entry-c2ffd6a5.cjs} +1 -1
- package/dist/{nylas-login.entry-ba7383ac.js → nylas-login.entry-f2927406.js} +3 -3
- package/dist/{nylas-mailbox-pagination.entry-ba6beb08.cjs → nylas-mailbox-pagination.entry-839c9ad3.cjs} +1 -1
- package/dist/{nylas-mailbox-pagination.entry-f6186560.js → nylas-mailbox-pagination.entry-e9356835.js} +2 -2
- package/dist/{nylas-mailbox-toolbar-button.entry-e18059b0.js → nylas-mailbox-toolbar-button.entry-298a3c47.js} +10 -10
- package/dist/{nylas-mailbox-toolbar-button.entry-0875aadb.cjs → nylas-mailbox-toolbar-button.entry-43812d51.cjs} +1 -1
- package/dist/{nylas-mailbox.entry-2e3815ed.js → nylas-mailbox.entry-aa42f6c4.js} +4 -4
- package/dist/{nylas-mailbox.entry-bb2905bf.cjs → nylas-mailbox.entry-cf13ddf5.cjs} +1 -1
- package/dist/{nylas-provider.entry-69ee5061.js → nylas-provider.entry-1a3a195f.js} +39 -39
- package/dist/{nylas-provider.entry-51c5cdbf.cjs → nylas-provider.entry-843b5593.cjs} +1 -1
- package/dist/nylas-scheduler-editor.entry-048e7a8f.cjs +2 -0
- package/dist/{nylas-scheduler-editor.entry-d4a9afb1.js → nylas-scheduler-editor.entry-d56d6d2a.js} +138 -119
- package/dist/nylas-scheduling.entry-0ad9b1d0.cjs +1 -0
- package/dist/{nylas-scheduling.entry-f82a2822.js → nylas-scheduling.entry-7039a890.js} +52 -52
- package/dist/{nylas-threads-refresh.entry-99001756.cjs → nylas-threads-refresh.entry-9cae6ac8.cjs} +1 -1
- package/dist/{nylas-threads-refresh.entry-72482d2f.js → nylas-threads-refresh.entry-d951050a.js} +10 -10
- package/dist/nylas-threads-search.entry-0d34c5a8.cjs +1 -0
- package/dist/{nylas-threads-search.entry-c5fe50e5.js → nylas-threads-search.entry-7a4bbc75.js} +17 -17
- package/dist/{nylas-time-window-picker.entry-ccffcf2b.cjs → nylas-time-window-picker.entry-062bc8c1.cjs} +1 -1
- package/dist/{nylas-time-window-picker.entry-0d93e7cc.js → nylas-time-window-picker.entry-210c3f1a.js} +2 -2
- package/dist/{nylas-view-thread.entry-2d34b41c.js → nylas-view-thread.entry-8b39a997.js} +6 -6
- package/dist/{nylas-view-thread.entry-58432a52.cjs → nylas-view-thread.entry-db78ed9c.cjs} +1 -1
- package/dist/play-icon_2.entry-19271982.cjs +1 -0
- package/dist/play-icon_2.entry-c53f3cac.js +25 -0
- package/dist/react.cjs +1 -1
- package/dist/react.js +115 -101
- package/dist/{refresh-icon.entry-a041136d.js → refresh-icon.entry-75139a0c.js} +4 -4
- package/dist/{refresh-icon.entry-1e670732.cjs → refresh-icon.entry-e695cf7f.cjs} +1 -1
- package/dist/{register-component-a5a9ca5d-a5c01c35.js → register-component-a5a9ca5d-d69a7a05.js} +1 -1
- package/dist/{register-component-a5a9ca5d-b68b6039.cjs → register-component-a5a9ca5d-eebf89e7.cjs} +1 -1
- package/dist/scheduler-config-store-9ccfba4d-22a58b7d.cjs +1 -0
- package/dist/{scheduler-config-store-4a50a03d-ee42ff96.js → scheduler-config-store-9ccfba4d-fd62a421.js} +8 -6
- package/dist/{scheduler-store-f02ce045-23a14e3f.js → scheduler-store-8a400448-3b007d4d.js} +125 -96
- package/dist/scheduler-store-8a400448-44e0edad.cjs +1 -0
- package/dist/{textarea-component.entry-24a830c1.cjs → textarea-component.entry-48feabb3.cjs} +1 -1
- package/dist/{textarea-component.entry-1b4c771b.js → textarea-component.entry-ead5ab00.js} +7 -6
- package/dist/{translate-icon.entry-44bde57b.js → translate-icon.entry-55043beb.js} +2 -2
- package/dist/{translate-icon.entry-0c0add25.cjs → translate-icon.entry-5f62bc61.cjs} +1 -1
- package/dist/{warning-icon.entry-9a77ab01.cjs → warning-icon.entry-2e0a80da.cjs} +1 -1
- package/dist/{warning-icon.entry-8956cba2.js → warning-icon.entry-fa644462.js} +5 -5
- package/package.json +3 -3
- package/dist/arrow-icon.entry-1f54c377.js +0 -15
- package/dist/button-component.entry-52ccb6d9.js +0 -16
- package/dist/button-component.entry-e79b2d08.cjs +0 -1
- package/dist/calendar-info-icon_28.entry-2054703c.cjs +0 -1
- package/dist/calendar-info-icon_28.entry-e7bebd13.js +0 -2083
- package/dist/chevron-icon_3.entry-7bd4a4b5.cjs +0 -1
- package/dist/document-refresh-icon.entry-a0293858.cjs +0 -1
- package/dist/google-logo-icon_4.entry-60c0d39a.cjs +0 -1
- package/dist/google-logo-icon_4.entry-a0dc33da.js +0 -467
- package/dist/index-53420959-67beefed.js +0 -5
- package/dist/index-53420959-d3254a34.cjs +0 -1
- package/dist/index-e3e9b594.cjs +0 -42
- package/dist/input-component.entry-1195d579.js +0 -45
- package/dist/input-component.entry-2b6e44c4.cjs +0 -1
- package/dist/loading-icon.entry-027a2ad1.js +0 -15
- package/dist/nylas-booked-event-card_10.entry-84f64ba5.cjs +0 -1
- package/dist/nylas-scheduler-editor.entry-923b8566.cjs +0 -2
- package/dist/nylas-scheduling.entry-54f1a5e9.cjs +0 -1
- package/dist/nylas-threads-search.entry-462527fd.cjs +0 -1
- package/dist/play-icon_2.entry-1ea3fd6b.cjs +0 -1
- package/dist/play-icon_2.entry-d08adf17.js +0 -25
- package/dist/scheduler-config-store-4a50a03d-884e6df8.cjs +0 -1
- package/dist/scheduler-store-f02ce045-42e3647c.cjs +0 -1
|
@@ -0,0 +1,4178 @@
|
|
|
1
|
+
import { r as E, h as s, c as R, d, H as $, g as F, G as ke, I as pe, J as an, K as vn, L as na, M as we, O as aa } from "./index-5efb84b8.js";
|
|
2
|
+
import { R as M } from "./register-component-a5a9ca5d-d69a7a05.js";
|
|
3
|
+
import { T as on, F as sn, a as ia, P as bt, C as oa, E as rn } from "./constants-7ce66b44-e7ca66c2.js";
|
|
4
|
+
import { s as ut } from "./index-6d9eeb53-4e2a7f9f.js";
|
|
5
|
+
import "./index-53420959-1c0d390d.js";
|
|
6
|
+
import "react";
|
|
7
|
+
import "react-dom";
|
|
8
|
+
const sa = ".sc-calendar-agenda-fill-icon-h{display:flex}", ra = sa, la = class {
|
|
9
|
+
constructor(e) {
|
|
10
|
+
E(this, e), this.width = "20", this.height = "20";
|
|
11
|
+
}
|
|
12
|
+
render() {
|
|
13
|
+
return s("svg", { key: "1b157c16f504c8914c81d71a9c40c91f9c96632d", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, s("path", { key: "4c5bdf4bd6ff70e09c6677510d8e29a3433846ee", d: "M14 11.5C14 12.8807 12.8807 14 11.5 14H2.5C1.11929 14 0 12.8807 0 11.5V2.5C0 1.11929 1.11929 0 2.5 0H11.5C12.8807 0 14 1.11929 14 2.5V11.5ZM11 3.5C11 3.25454 10.8231 3.05039 10.5899 3.00806L10.5 3H3.5L3.41012 3.00806C3.17688 3.05039 3 3.25454 3 3.5C3 3.74546 3.17688 3.94961 3.41012 3.99194L3.5 4H10.5L10.5899 3.99194C10.8231 3.94961 11 3.74546 11 3.5ZM11 7C11 6.75454 10.8231 6.55039 10.5899 6.50806L10.5 6.5H3.5L3.41012 6.50806C3.17688 6.55039 3 6.75454 3 7C3 7.24546 3.17688 7.44961 3.41012 7.49194L3.5 7.5H10.5L10.5899 7.49194C10.8231 7.44961 11 7.24546 11 7ZM11 10.5C11 10.2545 10.8231 10.0504 10.5899 10.0081L10.5 10H3.5L3.41012 10.0081C3.17688 10.0504 3 10.2545 3 10.5C3 10.7455 3.17688 10.9496 3.41012 10.9919L3.5 11H10.5L10.5899 10.9919C10.8231 10.9496 11 10.7455 11 10.5Z", fill: "currentColor" }));
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
la.style = ra;
|
|
17
|
+
const da = ".sc-calendar-agenda-icon-h{display:flex}", ca = da, fa = class {
|
|
18
|
+
constructor(e) {
|
|
19
|
+
E(this, e), this.width = "20", this.height = "20";
|
|
20
|
+
}
|
|
21
|
+
render() {
|
|
22
|
+
return s("svg", { key: "eb527c787e9dc29d22cb8904ac8e19a2ed337ba1", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, s("path", { key: "26b06beae8f75f506cd5cf16351af85d814f7727", d: "M14 11.5C14 12.8807 12.8807 14 11.5 14H2.5C1.11929 14 0 12.8807 0 11.5V2.5C0 1.11929 1.11929 0 2.5 0H11.5C12.8807 0 14 1.11929 14 2.5V11.5ZM13 11.5V2.5C13 1.67157 12.3284 1 11.5 1H2.5C1.67157 1 1 1.67157 1 2.5V11.5C1 12.3284 1.67157 13 2.5 13H11.5C12.3284 13 13 12.3284 13 11.5ZM11 3.5C11 3.74546 10.8231 3.94961 10.5899 3.99194L10.5 4H3.5C3.22386 4 3 3.77614 3 3.5C3 3.25454 3.17688 3.05039 3.41012 3.00806L3.5 3H10.5C10.7761 3 11 3.22386 11 3.5ZM11 7C11 7.24546 10.8231 7.44961 10.5899 7.49194L10.5 7.5H3.5C3.22386 7.5 3 7.27614 3 7C3 6.75454 3.17688 6.55039 3.41012 6.50806L3.5 6.5H10.5C10.7761 6.5 11 6.72386 11 7ZM11 10.5C11 10.7455 10.8231 10.9496 10.5899 10.9919L10.5 11H3.5C3.22386 11 3 10.7761 3 10.5C3 10.2545 3.17688 10.0504 3.41012 10.0081L3.5 10H10.5C10.7761 10 11 10.2239 11 10.5Z", fill: "currentColor" }));
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
fa.style = ca;
|
|
26
|
+
const pa = ".sc-calendar-info-icon-h{display:flex}", ua = pa, ha = class {
|
|
27
|
+
constructor(e) {
|
|
28
|
+
E(this, e), this.width = "20", this.height = "20";
|
|
29
|
+
}
|
|
30
|
+
render() {
|
|
31
|
+
return s("svg", { key: "9012ae7b873d35927c299ed62d247b77757bb679", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, s("path", { key: "0a3a11d84c99d05ad964d3b5606c072dd31872a7", d: "M12 0C13.3807 0 14.5 1.11929 14.5 2.5V6.59971C14.1832 6.43777 13.8486 6.30564 13.5 6.20703V4H1.5V11.5C1.5 12.3284 2.17157 13 3 13H6.70703C6.80564 13.3486 6.93777 13.6832 7.09971 14H3C1.61929 14 0.5 12.8807 0.5 11.5V2.5C0.5 1.11929 1.61929 0 3 0H12ZM12 1H3C2.17157 1 1.5 1.67157 1.5 2.5V3H13.5V2.5C13.5 1.67157 12.8284 1 12 1ZM11.375 9.5C11.375 9.15482 11.6548 8.875 12 8.875C12.3452 8.875 12.625 9.15482 12.625 9.5C12.625 9.84518 12.3452 10.125 12 10.125C11.6548 10.125 11.375 9.84518 11.375 9.5ZM12.5 13.5C12.5 13.7761 12.2761 14 12 14C11.7239 14 11.5 13.7761 11.5 13.5V11.5C11.5 11.2239 11.7239 11 12 11C12.2761 11 12.5 11.2239 12.5 11.5V13.5ZM7.5 11.5C7.5 9.01472 9.51472 7 12 7C14.4853 7 16.5 9.01472 16.5 11.5C16.5 13.9853 14.4853 16 12 16C9.51472 16 7.5 13.9853 7.5 11.5ZM8.5 11.5C8.5 13.433 10.067 15 12 15C13.933 15 15.5 13.433 15.5 11.5C15.5 9.567 13.933 8 12 8C10.067 8 8.5 9.567 8.5 11.5Z", fill: "currentColor" }));
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
ha.style = ua;
|
|
35
|
+
const ba = ".sc-calendar-patterns-icon-h{display:flex}", ma = ba, ya = class {
|
|
36
|
+
constructor(e) {
|
|
37
|
+
E(this, e), this.width = "20", this.height = "20";
|
|
38
|
+
}
|
|
39
|
+
render() {
|
|
40
|
+
return s("svg", { key: "ca6df3db90bbbffc29dfdc6ee5a440266eaa153d", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, s("path", { key: "ab45118ff407127ca1673159e1b78c93c7c97bed", d: "M3.25 0H11.75C13.2688 0 14.5 1.23122 14.5 2.75V11.25C14.5 12.7688 13.2688 14 11.75 14H3.25C1.73122 14 0.5 12.7688 0.5 11.25V2.75C0.5 1.23122 1.73122 0 3.25 0ZM2 2.75V4H13V2.75C13 2.05964 12.4404 1.5 11.75 1.5H3.25C2.55964 1.5 2 2.05964 2 2.75ZM12.2071 5L8.20711 9H10.7929L13 6.79289V5H12.2071ZM10.7929 5H8.20711L4.20711 9H6.79289L10.7929 5ZM2.79289 9L6.79289 5H4.20711L2 7.20711V9H2.79289ZM2 5.79289L2.79289 5H2V5.79289ZM12.2071 9H13V8.20711L12.2071 9Z", fill: "currentColor" }));
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
ya.style = ma;
|
|
44
|
+
const ga = ".sc-dragable-icon-h{display:flex}", va = ga, _a = class {
|
|
45
|
+
constructor(e) {
|
|
46
|
+
E(this, e), this.width = "20", this.height = "20";
|
|
47
|
+
}
|
|
48
|
+
render() {
|
|
49
|
+
return s("svg", { key: "c7f7764272ef6655faff588775ade6f30a91fad9", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, s("path", { key: "a0d4ab468da865868678aa28f722a29f45366977", d: "M15.5 18C16.3284 18 17 18.6716 17 19.5C17 20.3284 16.3284 21 15.5 21C14.6716 21 14 20.3284 14 19.5C14 18.6716 14.6716 18 15.5 18ZM8.5 18C9.32843 18 10 18.6716 10 19.5C10 20.3284 9.32843 21 8.5 21C7.67157 21 7 20.3284 7 19.5C7 18.6716 7.67157 18 8.5 18ZM15.5 11C16.3284 11 17 11.6716 17 12.5C17 13.3284 16.3284 14 15.5 14C14.6716 14 14 13.3284 14 12.5C14 11.6716 14.6716 11 15.5 11ZM8.5 11C9.32843 11 10 11.6716 10 12.5C10 13.3284 9.32843 14 8.5 14C7.67157 14 7 13.3284 7 12.5C7 11.6716 7.67157 11 8.5 11ZM15.5 4C16.3284 4 17 4.67157 17 5.5C17 6.32843 16.3284 7 15.5 7C14.6716 7 14 6.32843 14 5.5C14 4.67157 14.6716 4 15.5 4ZM8.5 4C9.32843 4 10 4.67157 10 5.5C10 6.32843 9.32843 7 8.5 7C7.67157 7 7 6.32843 7 5.5C7 4.67157 7.67157 4 8.5 4Z", fill: "currentColor" }));
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
_a.style = va;
|
|
53
|
+
const Ca = ".sc-flow-icon-h{display:flex}", ka = Ca, wa = class {
|
|
54
|
+
constructor(e) {
|
|
55
|
+
E(this, e), this.width = "16", this.height = "12";
|
|
56
|
+
}
|
|
57
|
+
render() {
|
|
58
|
+
return s("svg", { key: "8f888e065ebdda1a394eec563bebdc6fde729c27", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, s("path", { key: "0118146c83f167797c9a12f51d4cb3d76f45ff02", 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" }));
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
wa.style = ka;
|
|
62
|
+
const xa = ".sc-google-meet-icon-h{display:flex}", Ea = xa, Da = class {
|
|
63
|
+
constructor(e) {
|
|
64
|
+
E(this, e), this.width = "20", this.height = "20";
|
|
65
|
+
}
|
|
66
|
+
render() {
|
|
67
|
+
return s("svg", { key: "923ad042339ebe4c7a56d73147e230e187b101eb", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, s("g", { key: "d69b02bdaa610fdbaa6c066db00a64db13b56bf4", "clip-path": "url(#clip0_22_6251)" }, s("path", { key: "ce0e74129c30d4ec00fa62e6a2c84341905697c7", d: "M11.3145 10.1036L13.2642 12.3321L15.8859 14.0076L16.343 10.1173L15.8859 6.31384L13.2139 7.78584L11.3145 10.1036Z", fill: "#00832D" }), s("path", { key: "dfc9c195f76edcd0a450805b388b856592bd09b3", d: "M0 13.6464V16.9607C0 17.7184 0.613714 18.3321 1.37143 18.3321H4.68571L5.37143 15.827L4.68571 13.6464L2.41143 12.9607L0 13.6464Z", fill: "#0066DA" }), s("path", { key: "e35612e857a7627b4aa7e237c5dfc273a9a68ba2", d: "M4.68571 1.875L0 6.56071L2.41143 7.24643L4.68571 6.56071L5.36 4.40986L4.68571 1.875Z", fill: "#E94235" }), s("path", { key: "89d1a6c4f7167c1e5b93f40b1ea5dc0cf1315666", d: "M4.68571 6.56067H0V13.6464H4.68571V6.56067Z", fill: "#2684FC" }), s("path", { key: "e5b7a37ee3a64680e40eb1657ad020001f936e6c", d: "M18.8798 3.85895L15.8855 6.31381V14.0075L18.8935 16.4738C19.3438 16.8258 20.0021 16.5047 20.0021 15.9321V4.38923C20.0021 3.80981 19.329 3.49209 18.8798 3.85895ZM11.3141 10.1035V13.6464H4.68555V18.3321H14.5141C15.2718 18.3321 15.8855 17.7184 15.8855 16.9607V14.0075L11.3141 10.1035Z", fill: "#00AC47" }), s("path", { key: "c31ea5e38a4f63eea5f745838ce3be32af778c91", d: "M14.5141 1.875H4.68555V6.56071H11.3141V10.1036L15.8855 6.31614V3.24643C15.8855 2.48871 15.2718 1.875 14.5141 1.875Z", fill: "#FFBA00" })), s("defs", { key: "831abe8e73b739a4a28f8ac8944613a0a5963097" }, s("clipPath", { key: "ae1e2f5d4973a7e7d01b0ad0f9a4b4926d9d3689", id: "clip0_22_6251" }, s("rect", { key: "83250f8f06562e52f749902c314f7ad21c94a6c8", width: "20", height: "20", fill: "white" }))));
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
Da.style = Ea;
|
|
71
|
+
const Sa = ".sc-location-icon-h{display:flex}", Oa = Sa, Ta = class {
|
|
72
|
+
constructor(e) {
|
|
73
|
+
E(this, e), this.width = "16", this.height = "18";
|
|
74
|
+
}
|
|
75
|
+
render() {
|
|
76
|
+
return s("svg", { key: "0bf43c320aa1eebfb924c19c8f0b23befef84256", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, s("path", { key: "cc11ded13eee0d30ab3c724de5cd537356410abd", 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" }));
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
Ta.style = Oa;
|
|
80
|
+
const Ia = ".sc-location-off-icon-h{display:flex}", Ha = Ia, Pa = class {
|
|
81
|
+
constructor(e) {
|
|
82
|
+
E(this, e), this.width = "16", this.height = "18";
|
|
83
|
+
}
|
|
84
|
+
render() {
|
|
85
|
+
return s("svg", { key: "22e7a43c0d6f68d88e0227148978fccf3b078233", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, s("path", { key: "6f5e7dee6dc3bef735920b4373b05bac45bd9205", 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" }));
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
Pa.style = Ha;
|
|
89
|
+
const Na = ".sc-microsoft-teams-icon-h{display:flex}", Aa = Na, $a = class {
|
|
90
|
+
constructor(e) {
|
|
91
|
+
E(this, e), this.width = "20", this.height = "20";
|
|
92
|
+
}
|
|
93
|
+
render() {
|
|
94
|
+
return s("svg", { key: "359169b17648dae88bd9da8598a9aeaee8b96e2d", width: this.width, height: this.height, viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, s("g", { key: "f963ee6000bd1218a0ed480ee8737beba954fca5", "clip-path": "url(#clip0_22_6280)" }, s("path", { key: "de23ac3cff64cd86048cce2894830a899bbc0a7f", d: "M13.7109 7.60168H18.8769C19.365 7.60168 19.7607 7.99734 19.7607 8.4854V13.191C19.7607 14.9848 18.3065 16.4389 16.5127 16.4389H16.4974C14.7036 16.4391 13.2493 14.9852 13.249 13.1914C13.249 13.1913 13.249 13.1911 13.249 13.191V8.06355C13.249 7.80847 13.4558 7.60168 13.7109 7.60168Z", fill: "#5059C9" }), s("path", { key: "9349bc32777ca9a4c47bfbfe6152b5f620bfb9ff", d: "M17.2024 6.67152C18.3583 6.67152 19.2954 5.73444 19.2954 4.5785C19.2954 3.42255 18.3583 2.48547 17.2024 2.48547C16.0465 2.48547 15.1094 3.42255 15.1094 4.5785C15.1094 5.73444 16.0465 6.67152 17.2024 6.67152Z", fill: "#5059C9" }), s("path", { key: "668ca67feccc1c894dcbbdead4d5e8e3402a4b0c", d: "M10.6912 6.67152C12.3609 6.67152 13.7145 5.31796 13.7145 3.64826C13.7145 1.97856 12.3609 0.625 10.6912 0.625C9.02153 0.625 7.66797 1.97856 7.66797 3.64826C7.66797 5.31796 9.02153 6.67152 10.6912 6.67152Z", fill: "#7B83EB" }), s("path", { key: "f698f7ee96aca4a26f110149030b20eb8cb03f2f", d: "M14.7223 7.60168H6.19482C5.71257 7.61362 5.33108 8.01384 5.34227 8.49611V13.8631C5.27492 16.7571 7.56457 19.1588 10.4586 19.2296C13.3525 19.1588 15.6422 16.7571 15.5748 13.8631V8.49611C15.586 8.01384 15.2045 7.61362 14.7223 7.60168Z", fill: "#7B83EB" }), s("path", { key: "0a0964cdf2fd5758c90f6cb06efcbc03500282b2", opacity: "0.1", d: "M10.9234 7.60168V15.1226C10.9211 15.4675 10.7121 15.7773 10.3932 15.9087C10.2917 15.9516 10.1825 15.9738 10.0723 15.9738H5.75134C5.69088 15.8203 5.63507 15.6668 5.58855 15.5087C5.42574 14.975 5.34267 14.4201 5.34204 13.8622V8.49471C5.33086 8.01321 5.71172 7.61362 6.1932 7.60168H10.9234Z", fill: "black" }), s("path", { key: "7e1c4d85c3447d84a89212100615ef267d88599b", opacity: "0.2", d: "M10.4583 7.60168V15.5877C10.4583 15.698 10.4362 15.8071 10.3932 15.9087C10.2619 16.2276 9.95205 16.4366 9.60717 16.4389H5.96995C5.89088 16.2854 5.81646 16.1319 5.75134 15.9738C5.68623 15.8156 5.63507 15.6668 5.58855 15.5087C5.42574 14.975 5.34267 14.4201 5.34204 13.8622V8.49471C5.33086 8.01321 5.71172 7.61362 6.1932 7.60168H10.4583Z", fill: "black" }), s("path", { key: "2144a9a4bbcb730aacd6803bb0b250994dd006ce", opacity: "0.2", d: "M10.4583 7.60168V14.6575C10.4548 15.1261 10.0758 15.5051 9.60716 15.5087H5.58855C5.42574 14.975 5.34267 14.4201 5.34204 13.8622V8.49471C5.33086 8.01321 5.71172 7.61362 6.1932 7.60168H10.4583Z", fill: "black" }), s("path", { key: "192467da47b97c7e64f69d4c3076ac6a3ba534fa", opacity: "0.2", d: "M9.9932 7.60168V14.6575C9.98965 15.1261 9.61065 15.5051 9.14203 15.5087H5.58855C5.42574 14.975 5.34267 14.4201 5.34204 13.8622V8.49471C5.33086 8.01321 5.71172 7.61362 6.1932 7.60168H9.9932Z", fill: "black" }), s("path", { key: "fa61a6a64091707161be951e860434d56db20b24", opacity: "0.1", d: "M10.9241 5.1971V6.66222C10.845 6.66687 10.7706 6.67152 10.6915 6.67152C10.6124 6.67152 10.538 6.66687 10.4589 6.66222C10.3019 6.6518 10.1462 6.62689 9.99382 6.5878C9.05195 6.36475 8.27382 5.70421 7.90079 4.81106C7.83661 4.66107 7.78678 4.50533 7.75195 4.34595H10.0729C10.5422 4.34772 10.9223 4.72775 10.9241 5.1971Z", fill: "black" }), s("path", { key: "ca1e281406d07a710416ef7df9c94800bb648689", opacity: "0.2", d: "M10.4585 5.66219V6.66219C10.3015 6.65177 10.1458 6.62686 9.99341 6.58778C9.05155 6.36473 8.27342 5.70418 7.90039 4.81104H9.60736C10.0767 4.81281 10.4567 5.19285 10.4585 5.66219Z", fill: "black" }), s("path", { key: "6b47b55120783e70490ce6c079990a4a0829ee6b", opacity: "0.2", d: "M10.4585 5.66219V6.66219C10.3015 6.65177 10.1458 6.62686 9.99341 6.58778C9.05155 6.36473 8.27342 5.70418 7.90039 4.81104H9.60736C10.0767 4.81281 10.4567 5.19285 10.4585 5.66219Z", fill: "black" }), s("path", { key: "5f405177aa9cf68b38d094a45227c983eb8ff6e7", opacity: "0.2", d: "M9.99341 5.6622V6.58778C9.05155 6.36473 8.27342 5.70418 7.90039 4.81104H9.14225C9.6116 4.81282 9.99163 5.19286 9.99341 5.6622Z", fill: "black" }), s("path", { key: "5dce1571223960a8fd888742044431c761fe2157", d: "M0.613296 4.81104H9.14074C9.61159 4.81104 9.99329 5.19274 9.99329 5.66359V14.191C9.99329 14.6619 9.61158 15.0436 9.14074 15.0436H0.613296C0.14244 15.0436 -0.239258 14.6619 -0.239258 14.191V5.66359C-0.239258 5.19274 0.142449 4.81104 0.613296 4.81104Z", fill: "url(#paint0_linear_22_6280)" }), s("path", { key: "d6f95d7f2759f691cc23b2106eda0ba2734afca4", d: "M7.12025 8.05659H5.4156V12.6985H4.32956V8.05659H2.63281V7.15613H7.12025V8.05659Z", fill: "white" })), s("defs", { key: "01ddd7b4a655763ad0f889d4d1d75963cec6d986" }, s("linearGradient", { key: "41594dd87db0ffc82b8d8ed0a181e0d41ab7039f", id: "paint0_linear_22_6280", x1: "1.53835", y1: "4.14486", x2: "8.2157", y2: "15.7098", gradientUnits: "userSpaceOnUse" }, s("stop", { key: "e88fb7c5b11161f05695f5adf8109a097c618c0a", "stop-color": "#5A62C3" }), s("stop", { key: "7f5a6231d31260b4df5122534fce2a6f7f34e337", offset: "0.5", "stop-color": "#4D55BD" }), s("stop", { key: "f3fe9f223c2bed497337b6d8f3f1d823939087aa", offset: "1", "stop-color": "#3940AB" })), s("clipPath", { key: "3386bbeca4aaa30629160dae17beaa731f2343ac", id: "clip0_22_6280" }, s("rect", { key: "8a2c5dc8112fc59beca2cc5972fe00353dae4ee0", width: "20", height: "20", fill: "white" }))));
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
$a.style = Aa;
|
|
98
|
+
const Fa = ':host{display:block;margin:1rem;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.nylas-additional-participants__title{color:var(--nylas-base-nylas-base-900-aaa, #101323);font-size:16px;font-style:normal;font-weight:600;line-height:20px;margin:0;text-align:left}.nylas-additional-participants__subtitle{color:var(--nylas-base-600);font-size:14px;font-style:normal;font-weight:400;line-height:20px;margin:0.25rem 0px 0px;text-align:left}.nylas-additional-participants__content{padding:1rem;display:flex;flex-direction:column;gap:1rem}.nylas-additional-participants__input_group{padding-top:8px;display:flex;flex-direction:column;gap:4px}.nylas-additional-participants__input_group label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:14px;font-style:normal;font-weight:400;line-height:150%}.nylas-additional-participants__input_group .nylas-additional-participants__error{color:var(--nylas-error);font-size:14px;font-family:var(--nylas-font-family);font-weight:400;line-height:16px;margin:0;text-align:left}.nylas-additional-participants__input_wrapper{display:flex;border-width:1;border-radius:8px;border:1px solid var(--nylas-base-300)}.nylas-additional-participants__input_wrapper.error{border-color:var(--nylas-error)}.nylas-additional-participants__input_wrapper button{padding:12px;border:none;border-left:1px solid var(--nylas-base-300);background:none;cursor:pointer}.nylas-additional-participants__input_wrapper button:hover,.nylas-additional-participants__input_wrapper button:active{color:var(--nylas-primary)}.nylas-additional-participants__input_wrapper_organizer{background:var(--nylas-base-50)}.nylas-additional-participants__input{flex:1;display:flex;justify-content:space-between}.nylas-additional-participants__input.organizer{padding:12px 16px}.nylas-additional-participants__input input{border:none;outline:none;background:none;width:100%}.nylas-additional-participants__input input-dropdown{width:100%}.nylas-additional-participants__input input-dropdown::part(id_dropdown){width:100%;height:100%}.nylas-additional-participants__input input-dropdown::part(id_dropdown-input){height:100%;border-radius:var(--nylas-border-radius-2x);border:none;border-top-right-radius:initial;border-bottom-right-radius:initial;padding-left:16px}.nylas-additional-participants__add{padding:12px;display:flex;align-items:center;border:none;background:none;cursor:pointer}.nylas-additional-participants__add span{padding:0 8px;font-size:16px;font-style:normal;font-weight:500}.nylas-additional-participants__add:hover,.nylas-additional-participants__add:active{color:var(--nylas-primary)}', Ma = Fa;
|
|
99
|
+
var La = function(e, t, n, a) {
|
|
100
|
+
var o = arguments.length, i = o < 3 ? t : a === null ? a = Object.getOwnPropertyDescriptor(t, n) : a, r;
|
|
101
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
102
|
+
i = Reflect.decorate(e, t, n, a);
|
|
103
|
+
else
|
|
104
|
+
for (var l = e.length - 1; l >= 0; l--)
|
|
105
|
+
(r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, n, i) : r(t, n)) || i);
|
|
106
|
+
return o > 3 && i && Object.defineProperty(t, n, i), i;
|
|
107
|
+
}, mt = function(e, t) {
|
|
108
|
+
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
109
|
+
return Reflect.metadata(e, t);
|
|
110
|
+
};
|
|
111
|
+
const _n = class {
|
|
112
|
+
constructor(e) {
|
|
113
|
+
E(this, e), this.valueChanged = R(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.name = "participants", this.eventParticipants = void 0, this.participantOptions = void 0, this.participants = this.eventParticipants ?? [], this.participantErrors = {};
|
|
114
|
+
}
|
|
115
|
+
elementNameChangedHandler(e) {
|
|
116
|
+
d("nylas-additional-participants", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
117
|
+
}
|
|
118
|
+
connectedCallback() {
|
|
119
|
+
d("nylas-additional-participants", "connectedCallback");
|
|
120
|
+
}
|
|
121
|
+
componentWillLoad() {
|
|
122
|
+
d("nylas-additional-participants", "componentWillLoad"), this.host.setAttribute("name", this.name);
|
|
123
|
+
}
|
|
124
|
+
componentDidLoad() {
|
|
125
|
+
d("nylas-additional-participants", "componentDidLoad"), this.updateFormValue();
|
|
126
|
+
}
|
|
127
|
+
disconnectedCallback() {
|
|
128
|
+
d("nylas-additional-participants", "disconnectedCallback");
|
|
129
|
+
}
|
|
130
|
+
onInputOptionChanged(e) {
|
|
131
|
+
var o;
|
|
132
|
+
d("nylas-additional-participants", "onInputOptionChanged");
|
|
133
|
+
const t = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/, n = e.detail.name, a = (o = this.participantOptions) == null ? void 0 : o.find((i) => i.email === e.detail.value);
|
|
134
|
+
if (!a && !t.test(e.detail.value)) {
|
|
135
|
+
this.internals.setValidity({ customError: !0 }, "Please enter a valid email address"), this.participantErrors[n] = "Please enter a valid email address", this.participants[n].is_valid = !1, this.participants = [...this.participants];
|
|
136
|
+
return;
|
|
137
|
+
} else
|
|
138
|
+
this.participantErrors[n] = "", this.participants[n].is_valid = !0, this.internals.setValidity({});
|
|
139
|
+
this.participants[n].email = e.detail.value, this.participants[n].availability = a ? { calendar_ids: ["primary"] } : void 0, this.participants[n].name = (a == null ? void 0 : a.name) || e.detail.value, this.participants = [...this.participants], this.updateFormValue();
|
|
140
|
+
}
|
|
141
|
+
onParticipantChange(e, t) {
|
|
142
|
+
d("nylas-additional-participants", "onParticipantChange"), this.participants[t].email = e.target.value, this.updateFormValue();
|
|
143
|
+
}
|
|
144
|
+
addParticipant() {
|
|
145
|
+
d("nylas-additional-participants", "addParticipant"), this.participants = [...this.participants, { name: "", email: "", is_organizer: !1 }], this.updateFormValue();
|
|
146
|
+
}
|
|
147
|
+
removeParticipant(e) {
|
|
148
|
+
d("nylas-additional-participants", "removeParticipant"), this.participants = this.participants.filter((t, n) => n !== e), this.updateFormValue();
|
|
149
|
+
}
|
|
150
|
+
validate(e, t) {
|
|
151
|
+
d("nylas-additional-participants", "validate");
|
|
152
|
+
const a = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(String(e).toLowerCase());
|
|
153
|
+
this.participants[t].is_valid = a, this.updateFormValue();
|
|
154
|
+
}
|
|
155
|
+
updateFormValue() {
|
|
156
|
+
d("nylas-additional-participants", "updateFormValue"), this.internals.setFormValue(JSON.stringify(this.participants), this.name), this.valueChanged.emit({ value: JSON.stringify(this.participants), name: this.name });
|
|
157
|
+
}
|
|
158
|
+
getArrayDifference(e, t) {
|
|
159
|
+
return e.filter((a) => !t.some((o) => a.email === o.email)).map((a) => ({ value: a.email, label: a.email }));
|
|
160
|
+
}
|
|
161
|
+
render() {
|
|
162
|
+
return s($, { key: "572070ca2a3dee4fb2e6691dbbdd710033f41037" }, s("nylas-form-card", { key: "cb28ef9de2eec5ad8b021673a0ffd8f6293e81a5" }, s("h3", { key: "1e68e44f7a0fd10da4d1bb89251c01dbaa4668f0", slot: "header-title", class: "nylas-additional-participants__title", part: "nap__title" }, "Participants"), s("p", { key: "f5e85f98e09a5bc8b42e463736c3c45ab97517df", slot: "header-subtitle", class: "nylas-additional-participants__subtitle", part: "nap__subtitle" }, "Add people in your team or organization to join the event."), s("div", { key: "1aff671a65de1986de7d2ffea7c5ec2220ac9847", slot: "content", class: "nylas-additional-participants__content" }, s("div", { key: "2ee5547b3dd0b89adf51a30279aba64298a255fd" }, this.participants.map((e, t) => s("div", { class: "nylas-additional-participants__input_group", part: "nap__input_group" }, s("label", null, e.is_organizer ? "Organizer" : `Participant ${t}`), s("div", { part: "nap__input_wrapper", class: {
|
|
163
|
+
"nylas-additional-participants__input_wrapper": !0,
|
|
164
|
+
"nylas-additional-participants__input_wrapper_organizer": e.is_organizer,
|
|
165
|
+
"nylas-additional-participants__input_wrapper_invalid": e.is_valid === !1,
|
|
166
|
+
error: e.is_valid === !1
|
|
167
|
+
} }, s("div", { class: { "nylas-additional-participants__input": !0, organizer: e.is_organizer }, part: "nap__input" }, e.is_organizer ? s("input", { type: "text", value: e.email, onInput: (n) => {
|
|
168
|
+
this.onParticipantChange(n, t);
|
|
169
|
+
}, readOnly: e.is_organizer, onBlur: () => this.validate(e.email, t) }) : s("input-dropdown", { name: `${t}`, filterable: !0, inputValue: e.email, options: this.getArrayDifference(this.participantOptions || [], this.participants) }), !e.is_organizer && s("button", { onClick: () => this.removeParticipant(t), part: "nap__remove-participant" }, s("close-icon", null)))), !e.is_valid && s("p", { class: "nylas-additional-participants__error", part: "nap__error" }, this.participantErrors[t])))), s("button", { key: "5c0ef712646837af283756bcdb878ba67e0a2a98", class: "nylas-additional-participants__add", part: "nap__add-participant", onClick: () => this.addParticipant() }, s("add-circle-icon", { key: "e3365a9c9f2079212df03cff95e7f75115a7489f" }), " ", s("span", { key: "8f55e5ac577a2422b673aac42e9f7b675ed056fc" }, "Add ", this.participants.length > 1 ? "another" : "a", " participant")))));
|
|
170
|
+
}
|
|
171
|
+
static get formAssociated() {
|
|
172
|
+
return !0;
|
|
173
|
+
}
|
|
174
|
+
get host() {
|
|
175
|
+
return F(this);
|
|
176
|
+
}
|
|
177
|
+
static get watchers() {
|
|
178
|
+
return {
|
|
179
|
+
name: ["elementNameChangedHandler"]
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
La([
|
|
184
|
+
M({
|
|
185
|
+
name: "nylas-additional-participants",
|
|
186
|
+
stateToProps: /* @__PURE__ */ new Map([["schedulerConfig.additionalParticipants", "participantOptions"]]),
|
|
187
|
+
eventToProps: {},
|
|
188
|
+
fireRegisterEvent: !0
|
|
189
|
+
}),
|
|
190
|
+
mt("design:type", Function),
|
|
191
|
+
mt("design:paramtypes", []),
|
|
192
|
+
mt("design:returntype", void 0)
|
|
193
|
+
], _n.prototype, "render", null);
|
|
194
|
+
_n.style = Ma;
|
|
195
|
+
const Ra = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;width:inherit}.nylas-availability-picker{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200)}.nylas-availability-picker .header{padding:1rem}.nylas-availability-picker .header h3{margin:0;font-size:16px;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-availability-picker .header p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left;display:flex;align-items:center;gap:4px}.nylas-availability-picker .content{padding:1rem;color:var(--nylas-base-900);font-size:16px;font-family:var(--nylas-font-family);border-top:1px solid var(--nylas-base-200)}@media screen and (max-width: 504px){.nylas-availability-picker .content{font-size:15px}}.nylas-availability-picker .content .select-timezone{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--nylas-base-200);padding-bottom:1rem;gap:1rem}.nylas-availability-picker .content .select-timezone h4{display:flex;gap:0.5rem;align-items:center;margin:0;font-size:16px;font-weight:500;line-height:20px}@media screen and (max-width: 504px){.nylas-availability-picker .content .select-timezone h4{font-size:15px}}.nylas-availability-picker .content .availability{display:flex;flex-direction:column;gap:1rem;padding:0 0.5rem;margin:1rem 0}@media screen and (max-width: 504px){.nylas-availability-picker .content .availability{gap:0.5rem;padding:0}}.nylas-availability-picker .content .availability .availability-day{display:grid;grid-template-columns:minmax(auto, 65px) 1fr minmax(auto, 40px);gap:1rem;align-items:baseline}@media screen and (max-width: 768px){.nylas-availability-picker .content .availability .availability-day{grid-template-columns:78px 1fr auto}}@media screen and (max-width: 504px){.nylas-availability-picker .content .availability .availability-day{display:inline-grid;gap:8px;grid-template-columns:60px 1fr auto}}.nylas-availability-picker .content .availability .availability-day .day{display:flex;gap:0.5rem;align-items:center}@media screen and (max-width: 504px){.nylas-availability-picker .content .availability .availability-day .day{gap:0.25rem}}.nylas-availability-picker .content .availability .availability-day .day input[type=checkbox]{transform:scale(1.3)}.nylas-availability-picker .content .availability .availability-day .time-ranges span.unavailable{height:48px;display:flex;align-items:center;justify-content:center}.nylas-availability-picker .content .availability .availability-day .time-ranges .time-range{display:flex;gap:1.5rem;justify-content:space-between;align-items:baseline}@media screen and (max-width: 504px){.nylas-availability-picker .content .availability .availability-day .time-ranges .time-range{justify-content:unset;gap:0.5rem}}.nylas-availability-picker .content .availability .availability-day .time-ranges .time-range .pickers{display:flex;gap:1rem}@media screen and (max-width: 504px){.nylas-availability-picker .content .availability .availability-day .time-ranges .time-range .pickers{gap:0.5rem}}.nylas-availability-picker .content .availability .availability-day .time-ranges .time-range .pickers span{margin-top:0.75rem}.nylas-availability-picker .content .availability .availability-day .time-ranges .time-range:not(:last-of-type){margin-bottom:1rem}.nylas-availability-picker .content .availability .availability-day .time-ranges p.error{color:var(--nylas-error)}.nylas-availability-picker .content .availability .availability-day button{border:none;background:transparent;height:40px;cursor:pointer;color:var(--nylas-base-800)}.nylas-availability-picker .content .availability .availability-day button:hover,.nylas-availability-picker .content .availability .availability-day button:active{color:var(--nylas-primary)}select-dropdown{width:auto}select-dropdown::part(sd_dropdown-button){justify-content:initial}', za = Ra;
|
|
196
|
+
var ja = function(e, t, n, a) {
|
|
197
|
+
var o = arguments.length, i = o < 3 ? t : a === null ? a = Object.getOwnPropertyDescriptor(t, n) : a, r;
|
|
198
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
199
|
+
i = Reflect.decorate(e, t, n, a);
|
|
200
|
+
else
|
|
201
|
+
for (var l = e.length - 1; l >= 0; l--)
|
|
202
|
+
(r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, n, i) : r(t, n)) || i);
|
|
203
|
+
return o > 3 && i && Object.defineProperty(t, n, i), i;
|
|
204
|
+
}, yt = function(e, t) {
|
|
205
|
+
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
206
|
+
return Reflect.metadata(e, t);
|
|
207
|
+
};
|
|
208
|
+
const Cn = class {
|
|
209
|
+
constructor(e) {
|
|
210
|
+
E(this, e), this.valueChanged = R(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.selectedConfiguration = void 0, this.openHours = void 0, this.name = "availability", this.defaultTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone, this.hideHeader = !1, this.schedule = {
|
|
211
|
+
SUN: [],
|
|
212
|
+
MON: [{ start: "09:00am", end: "05:00pm" }],
|
|
213
|
+
TUE: [{ start: "09:00am", end: "05:00pm" }],
|
|
214
|
+
WED: [{ start: "09:00am", end: "05:00pm" }],
|
|
215
|
+
THU: [{ start: "09:00am", end: "05:00pm" }],
|
|
216
|
+
FRI: [{ start: "09:00am", end: "05:00pm" }],
|
|
217
|
+
SAT: []
|
|
218
|
+
}, this.timezone = Intl.DateTimeFormat().resolvedOptions().timeZone, this.overlapDays = {};
|
|
219
|
+
}
|
|
220
|
+
elementNameChangedHandler(e) {
|
|
221
|
+
d("nylas-calendar-picker", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
222
|
+
}
|
|
223
|
+
configChangedHandler(e) {
|
|
224
|
+
var n, a;
|
|
225
|
+
const t = (a = (n = e == null ? void 0 : e.availability) == null ? void 0 : n.availability_rules) == null ? void 0 : a.default_open_hours;
|
|
226
|
+
t && this.openHoursToSchedule(t);
|
|
227
|
+
}
|
|
228
|
+
scheduleChanged(e, t) {
|
|
229
|
+
var n;
|
|
230
|
+
if (e !== t) {
|
|
231
|
+
let a = {};
|
|
232
|
+
if (Object.keys(e).forEach((o) => {
|
|
233
|
+
const i = e[o];
|
|
234
|
+
if (i.length > 0) {
|
|
235
|
+
const r = this.getOverlaps(i);
|
|
236
|
+
r.length > 0 && (a[o] = r);
|
|
237
|
+
}
|
|
238
|
+
}), this.overlapDays = a, typeof this.internals.setFormValue != "function")
|
|
239
|
+
return;
|
|
240
|
+
if (Object.keys(a).length > 0) {
|
|
241
|
+
const o = (n = this.host.shadowRoot) == null ? void 0 : n.getElementById(Object.keys(a)[0]);
|
|
242
|
+
o && (d("nylas-availability-picker", "The time ranges are overlapping. Overlap: ", a), this.internals.setValidity({ customError: !0 }, "Overlapping time ranges found", o));
|
|
243
|
+
} else
|
|
244
|
+
this.internals.setValidity({ customError: !1 }), this.internals.setFormValue(JSON.stringify({
|
|
245
|
+
openHours: this.scheduleToOpenHours(this.schedule),
|
|
246
|
+
timezone: this.timezone
|
|
247
|
+
}));
|
|
248
|
+
this.valueChanged.emit({
|
|
249
|
+
value: JSON.stringify({
|
|
250
|
+
openHours: this.scheduleToOpenHours(e),
|
|
251
|
+
timezone: this.timezone
|
|
252
|
+
}),
|
|
253
|
+
name: this.name
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
nylasFormDropdownChangedHandler(e) {
|
|
258
|
+
const { name: t, value: n } = e.detail;
|
|
259
|
+
if (t === "timezone") {
|
|
260
|
+
if (this.timezone = n, typeof this.internals.setFormValue != "function")
|
|
261
|
+
return;
|
|
262
|
+
const a = {
|
|
263
|
+
openHours: this.scheduleToOpenHours(this.schedule),
|
|
264
|
+
timezone: this.timezone
|
|
265
|
+
};
|
|
266
|
+
this.internals.setFormValue(JSON.stringify(a)), this.valueChanged.emit({
|
|
267
|
+
value: JSON.stringify(a),
|
|
268
|
+
name: this.name
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
connectedCallback() {
|
|
273
|
+
d("nylas-availability-picker", "connectedCallback");
|
|
274
|
+
}
|
|
275
|
+
disconnectedCallback() {
|
|
276
|
+
d("nylas-availability-picker", "disconnectedCallback");
|
|
277
|
+
}
|
|
278
|
+
componentWillLoad() {
|
|
279
|
+
d("nylas-availability-picker", "componentWillLoad"), this.host.setAttribute("name", this.name);
|
|
280
|
+
}
|
|
281
|
+
componentDidLoad() {
|
|
282
|
+
if (d("nylas-availability-picker", "componentDidLoad"), this.openHours && this.openHours.length > 0 && this.openHoursToSchedule(this.openHours), typeof this.internals.setFormValue != "function")
|
|
283
|
+
return;
|
|
284
|
+
const e = {
|
|
285
|
+
openHours: this.scheduleToOpenHours(this.schedule),
|
|
286
|
+
timezone: this.timezone
|
|
287
|
+
};
|
|
288
|
+
this.internals.setFormValue(JSON.stringify(e)), this.valueChanged.emit({
|
|
289
|
+
value: JSON.stringify(e),
|
|
290
|
+
name: this.name
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
getOverlaps(e) {
|
|
294
|
+
let t = e.map((a, o) => ({
|
|
295
|
+
start: ke(a.start),
|
|
296
|
+
end: ke(a.end),
|
|
297
|
+
originalIndex: o
|
|
298
|
+
}));
|
|
299
|
+
t.sort((a, o) => a.start - o.start);
|
|
300
|
+
let n = [];
|
|
301
|
+
for (let a = 1; a < t.length; a++)
|
|
302
|
+
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));
|
|
303
|
+
return n.sort((a, o) => a - o);
|
|
304
|
+
}
|
|
305
|
+
addTimeRange(e) {
|
|
306
|
+
const t = this.schedule[e], n = 0, a = 1425;
|
|
307
|
+
if (t.length === 0)
|
|
308
|
+
this.schedule[e] = [{ start: "09:00am", end: "05:00pm" }];
|
|
309
|
+
else {
|
|
310
|
+
const o = t.map((r) => ({
|
|
311
|
+
start: ke(r.start),
|
|
312
|
+
end: ke(r.end)
|
|
313
|
+
})).sort((r, l) => r.start - l.start), i = o[o.length - 1].end;
|
|
314
|
+
if (i + 60 <= a)
|
|
315
|
+
this.schedule[e].push({
|
|
316
|
+
start: pe(we(i)),
|
|
317
|
+
end: pe(we(i + 60))
|
|
318
|
+
});
|
|
319
|
+
else {
|
|
320
|
+
let r = !1;
|
|
321
|
+
if (o[0].start > n + 60 && (this.schedule[e].push({
|
|
322
|
+
start: pe(we(n)),
|
|
323
|
+
end: pe(we(n + 60))
|
|
324
|
+
}), r = !0), !r)
|
|
325
|
+
for (let l = 0; l < o.length - 1; l++) {
|
|
326
|
+
const c = o[l].end;
|
|
327
|
+
if (o[l + 1].start - c >= 60) {
|
|
328
|
+
this.schedule[e].push({
|
|
329
|
+
start: pe(we(c)),
|
|
330
|
+
end: pe(we(c + 60))
|
|
331
|
+
});
|
|
332
|
+
break;
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
this.schedule[e].sort((o, i) => ke(o.start) - ke(i.start)), this.schedule = { ...this.schedule };
|
|
338
|
+
}
|
|
339
|
+
removeTimeRange(e, t) {
|
|
340
|
+
this.schedule[e].splice(t, 1), this.schedule = { ...this.schedule };
|
|
341
|
+
}
|
|
342
|
+
setTime(e) {
|
|
343
|
+
const { key: t, value: n } = e.detail, [a, o] = t.split("_"), [i, r] = a.split(":");
|
|
344
|
+
o === "start" ? this.schedule[i][r].start = n : o === "end" && (this.schedule[i][r].end = n), this.internals.setValidity({ customError: !1 }), this.schedule = { ...this.schedule };
|
|
345
|
+
}
|
|
346
|
+
setFormError(e) {
|
|
347
|
+
var i;
|
|
348
|
+
const { key: t } = e.detail, [n, a] = t.split("_"), o = (i = this.host.shadowRoot) == null ? void 0 : i.getElementById(t);
|
|
349
|
+
o && this.internals.setValidity({ customError: !0 }, `Invalid ${a} time`, o);
|
|
350
|
+
}
|
|
351
|
+
openHoursToSchedule(e) {
|
|
352
|
+
const t = {
|
|
353
|
+
SUN: [],
|
|
354
|
+
MON: [],
|
|
355
|
+
TUE: [],
|
|
356
|
+
WED: [],
|
|
357
|
+
THU: [],
|
|
358
|
+
FRI: [],
|
|
359
|
+
SAT: []
|
|
360
|
+
};
|
|
361
|
+
e.forEach((n) => {
|
|
362
|
+
n.days.forEach((a) => {
|
|
363
|
+
const o = this.getDayKey(a), i = pe(n.start), r = pe(n.end), l = { start: i, end: r };
|
|
364
|
+
let c = !1;
|
|
365
|
+
t[o] && (c = t[o].some((f) => f.start === l.start && f.end === l.end)), c || (t[o] ? t[o].push(l) : t[o] = [l]);
|
|
366
|
+
});
|
|
367
|
+
}), this.timezone = this.defaultTimezone, this.schedule = t;
|
|
368
|
+
}
|
|
369
|
+
getDayKey(e) {
|
|
370
|
+
return ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"][e];
|
|
371
|
+
}
|
|
372
|
+
scheduleToOpenHours(e) {
|
|
373
|
+
const t = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"];
|
|
374
|
+
let n = /* @__PURE__ */ new Map();
|
|
375
|
+
t.forEach((o, i) => {
|
|
376
|
+
e[o] && e[o].forEach((r) => {
|
|
377
|
+
const l = an(r.start), c = an(r.end), f = `${l}-${c}`;
|
|
378
|
+
if (!n.has(f))
|
|
379
|
+
n.set(f, { days: [i], start: l, end: c });
|
|
380
|
+
else {
|
|
381
|
+
let p = n.get(f);
|
|
382
|
+
p && (p.days.push(i), n.set(f, p));
|
|
383
|
+
}
|
|
384
|
+
});
|
|
385
|
+
});
|
|
386
|
+
let a = [];
|
|
387
|
+
return n.forEach((o, i) => {
|
|
388
|
+
a.push({
|
|
389
|
+
days: o.days,
|
|
390
|
+
start: o.start,
|
|
391
|
+
end: o.end,
|
|
392
|
+
timezone: this.timezone
|
|
393
|
+
});
|
|
394
|
+
}), a;
|
|
395
|
+
}
|
|
396
|
+
render() {
|
|
397
|
+
const e = Object.keys(on).map((t) => ({
|
|
398
|
+
label: on[t],
|
|
399
|
+
value: t
|
|
400
|
+
}));
|
|
401
|
+
return s($, { key: "d6ebb0ac834c059d38d5c3062315d0a6ff7e7606" }, s("div", { key: "0e8ec0786d293d3a1295021cdcc1a0966084cd74", class: "nylas-availability-picker", part: "nap" }, !this.hideHeader && s("div", { class: "header", part: "nap__header" }, s("h3", null, "General availability"), s("p", null, "Set when you're regularly available for event bookings.", s("tooltip-component", null, s("info-icon", { slot: "tooltip-icon" }), s("span", { slot: "tooltip-content" }, "This is the default availability for participants who don’t have availability set on the Participants tab.")))), s("div", { key: "20167bda51a9dc039bcef3a491a0433038af94f3", class: "content" }, s("div", { key: "d33de054ff0b04614e34ad4b8bb0f15110f722f1", class: "select-timezone", part: "nap__select-timezone" }, s("h4", { key: "35bad46d4e78e08c75acf41b95ab2809e59d3c5c", class: "sub-header" }, "Select timezone"), s("select-dropdown", { key: "63193f9d7c3479affe9a5c99b199b32678d4c8c7", 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) }, s("span", { key: "ed8101d5acc86458413f771edbd3cc4c016d3d5f", slot: "select-icon" }, s("globe-icon", { key: "637d5652a53679bfd0052ec8348fb9c2ab9b4c89", width: "20", height: "20" })))), s("div", { key: "0023ea0d976234b85cf88a3c057dd2d3982d2f3d", class: "availability", part: "nap__availability" }, Object.keys(this.schedule).map((t) => {
|
|
402
|
+
const n = t, a = this.schedule[t];
|
|
403
|
+
return s("div", { class: "availability-day" }, s("div", { class: "day", part: "nap__day" }, s("input", { type: "checkbox", name: n, id: n, checked: a.length > 0, onClick: () => {
|
|
404
|
+
a.length > 0 ? this.schedule[n] = [] : this.schedule[n] = [{ start: "09:00am", end: "05:00pm" }], this.schedule = { ...this.schedule };
|
|
405
|
+
} }), s("label", { htmlFor: n, "aria-label": "Select day" }, n)), s("div", { class: "time-ranges", part: "nap__time-ranges" }, a.length ? null : s("span", { class: "unavailable" }, "Unavailable"), a.length > 0 && a.map((o, i) => {
|
|
406
|
+
var c, f;
|
|
407
|
+
const r = `${t}:${i}_start`, l = `${t}:${i}_end`;
|
|
408
|
+
return s("div", { class: "time-range", part: "nap__time-range" }, s("div", { class: "pickers" }, s("nylas-time-window-picker", { id: r, hasError: (c = this.overlapDays[n]) == null ? void 0 : c.includes(i), time: o.start, name: r, key: r, exportparts: "time-picker: nap__time-picker-container, time-input: nap__time-picker-input, times: nap__time-picker-times" }), s("span", null, " - "), s("nylas-time-window-picker", { id: l, hasError: (f = this.overlapDays[n]) == null ? void 0 : f.includes(i), time: o.end, name: l, key: l, minimumStartTime: o.start, exportparts: "time-picker: nap__time-picker-container, time-input: nap__time-picker-input, times: nap__time-picker-times" })), s("button", { onClick: () => this.removeTimeRange(n, i) }, s("close-icon", null)));
|
|
409
|
+
}), s("p", { class: "error" }, this.overlapDays[n] ? "Overlapping time ranges" : "")), s("div", null, a.length > 0 ? s("button", { onClick: () => this.addTimeRange(n), part: "nap__add-time-range" }, s("add-circle-icon", null)) : null));
|
|
410
|
+
})))));
|
|
411
|
+
}
|
|
412
|
+
static get formAssociated() {
|
|
413
|
+
return !0;
|
|
414
|
+
}
|
|
415
|
+
get host() {
|
|
416
|
+
return F(this);
|
|
417
|
+
}
|
|
418
|
+
static get watchers() {
|
|
419
|
+
return {
|
|
420
|
+
name: ["elementNameChangedHandler"],
|
|
421
|
+
selectedConfiguration: ["configChangedHandler"],
|
|
422
|
+
schedule: ["scheduleChanged"]
|
|
423
|
+
};
|
|
424
|
+
}
|
|
425
|
+
};
|
|
426
|
+
ja([
|
|
427
|
+
M({
|
|
428
|
+
name: "nylas-availability-picker",
|
|
429
|
+
stateToProps: /* @__PURE__ */ new Map([["schedulerConfig.selectedConfiguration", "selectedConfiguration"]]),
|
|
430
|
+
fireRegisterEvent: !0
|
|
431
|
+
}),
|
|
432
|
+
yt("design:type", Function),
|
|
433
|
+
yt("design:paramtypes", []),
|
|
434
|
+
yt("design:returntype", void 0)
|
|
435
|
+
], Cn.prototype, "render", null);
|
|
436
|
+
Cn.style = za;
|
|
437
|
+
const Ba = ':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;display:flex;align-items:center;gap:4px}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__loading{padding-bottom:1rem;display:flex;flex-direction:column;gap:4px}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__loading .label{display:flex;align-items:center;gap:0.5rem;margin:1rem 1rem 0;color:var(--nylas-base-800)}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__loading .loading-button{margin:0 1rem;padding:0;width:inherit;height:48px;color:black;font-size:1rem;cursor:not-allowed;display:flex;gap:0.5rem;justify-content:space-between;align-items:center;background:transparent;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__loading .loading-button span{padding:0 1rem}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__dropdown{padding:1rem;display:flex;flex-direction:column;gap:4px}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__dropdown span.label{display:flex;align-items:center;gap:4px;color:var(--nylas-base-800)}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__dropdown span.label tooltip-component{display:flex}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__dropdown select-dropdown::part(sd_dropdown){width:100%}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__dropdown select-dropdown::part(sd_dropdown-content){width:100%;max-width:unset}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__dropdown select-dropdown::part(sd_dropdown-button){width:100%;display:flex;justify-content:space-between;align-items:center;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__dropdown select-dropdown::part(sd_dropdown-button-selected-label){max-width:calc(100% - 2rem);font-family:var(--nylas-font-family);font-size:16px;line-height:24px}', Wa = Ba;
|
|
438
|
+
var Za = function(e, t, n, a) {
|
|
439
|
+
var o = arguments.length, i = o < 3 ? t : a === null ? a = Object.getOwnPropertyDescriptor(t, n) : a, r;
|
|
440
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
441
|
+
i = Reflect.decorate(e, t, n, a);
|
|
442
|
+
else
|
|
443
|
+
for (var l = e.length - 1; l >= 0; l--)
|
|
444
|
+
(r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, n, i) : r(t, n)) || i);
|
|
445
|
+
return o > 3 && i && Object.defineProperty(t, n, i), i;
|
|
446
|
+
}, gt = function(e, t) {
|
|
447
|
+
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
448
|
+
return Reflect.metadata(e, t);
|
|
449
|
+
};
|
|
450
|
+
const kn = class {
|
|
451
|
+
constructor(e) {
|
|
452
|
+
E(this, e), this.valueChanged = R(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.hideHeader = !1, this.selectedCalendar = "";
|
|
453
|
+
}
|
|
454
|
+
connectedCallback() {
|
|
455
|
+
d("nylas-booking-calendar-picker", "connectedCallback");
|
|
456
|
+
}
|
|
457
|
+
disconnectedCallback() {
|
|
458
|
+
d("nylas-booking-calendar-picker", "disconnectedCallback");
|
|
459
|
+
}
|
|
460
|
+
componentWillLoad() {
|
|
461
|
+
d("nylas-booking-calendar-picker", "componentWillLoad"), this.host.setAttribute("name", this.name);
|
|
462
|
+
}
|
|
463
|
+
componentDidLoad() {
|
|
464
|
+
var e, t;
|
|
465
|
+
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) || "", this.valueChanged.emit({ value: this.selectedCalendar, name: this.name });
|
|
466
|
+
}
|
|
467
|
+
componentWillUpdate() {
|
|
468
|
+
d("nylas-booking-calendar-picker", "componentWillUpdate");
|
|
469
|
+
}
|
|
470
|
+
componentDidUpdate() {
|
|
471
|
+
d("nylas-booking-calendar-picker", "componentDidUpdate");
|
|
472
|
+
}
|
|
473
|
+
componentWillRender() {
|
|
474
|
+
d("nylas-booking-calendar-picker", "componentWillRender");
|
|
475
|
+
}
|
|
476
|
+
componentDidRender() {
|
|
477
|
+
d("nylas-booking-calendar-picker", "componentDidRender");
|
|
478
|
+
}
|
|
479
|
+
elementNameChangedHandler(e) {
|
|
480
|
+
d("nylas-booking-calendar-picker", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
481
|
+
}
|
|
482
|
+
nylasFormDropdownChangedHandler(e) {
|
|
483
|
+
d("nylas-booking-calendar-picker", "nylasFormDropdownChangedHandler", e.detail);
|
|
484
|
+
const t = (n) => {
|
|
485
|
+
const { value: a } = n.detail;
|
|
486
|
+
this.selectedCalendar = a, this.internals.setFormValue(a.toString(), this.name);
|
|
487
|
+
};
|
|
488
|
+
this.valueChanged.emit({ value: e.detail.value, name: this.name, valueChanged: t });
|
|
489
|
+
}
|
|
490
|
+
render() {
|
|
491
|
+
var t;
|
|
492
|
+
const e = ((t = this.calendars) == null ? void 0 : t.map((n) => ({
|
|
493
|
+
value: n.id,
|
|
494
|
+
label: n.name
|
|
495
|
+
}))) ?? [];
|
|
496
|
+
return s($, null, s("div", { class: "nylas-booking-calendar-picker", part: "nbcp" }, !this.hideHeader && s("div", { class: "header", part: "nbcp__header" }, s("h3", null, "Calendar booking"), s("p", null, "Select the calendar where you want to add event bookings.", s("tooltip-component", null, s("info-icon", { slot: "tooltip-icon" }), s("span", { slot: "tooltip-content" }, "The calendar will be used to create events.")))), e.length > 0 ? s("div", { class: "nylas-booking-calendar-picker__dropdown" }, s("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] })) : s("div", { class: "nylas-booking-calendar-picker__loading" }, s("span", { class: "label" }, "Select a calendar to book meetings on ", s("info-icon", null)), s("div", { class: "loading-button" }, s("span", null, "Loading...")))));
|
|
497
|
+
}
|
|
498
|
+
static get formAssociated() {
|
|
499
|
+
return !0;
|
|
500
|
+
}
|
|
501
|
+
get host() {
|
|
502
|
+
return F(this);
|
|
503
|
+
}
|
|
504
|
+
static get watchers() {
|
|
505
|
+
return {
|
|
506
|
+
name: ["elementNameChangedHandler"]
|
|
507
|
+
};
|
|
508
|
+
}
|
|
509
|
+
};
|
|
510
|
+
Za([
|
|
511
|
+
M({
|
|
512
|
+
name: "nylas-booking-calendar-picker",
|
|
513
|
+
eventToProps: {
|
|
514
|
+
valueChanged: async (e, t) => {
|
|
515
|
+
const { valueChanged: n } = e.detail;
|
|
516
|
+
n && n(e);
|
|
517
|
+
}
|
|
518
|
+
},
|
|
519
|
+
fireRegisterEvent: !0
|
|
520
|
+
}),
|
|
521
|
+
gt("design:type", Function),
|
|
522
|
+
gt("design:paramtypes", []),
|
|
523
|
+
gt("design:returntype", void 0)
|
|
524
|
+
], kn.prototype, "render", null);
|
|
525
|
+
kn.style = Wa;
|
|
526
|
+
/**!
|
|
527
|
+
* Sortable 1.15.2
|
|
528
|
+
* @author RubaXa <trash@rubaxa.org>
|
|
529
|
+
* @author owenm <owen23355@gmail.com>
|
|
530
|
+
* @license MIT
|
|
531
|
+
*/
|
|
532
|
+
function ln(e, t) {
|
|
533
|
+
var n = Object.keys(e);
|
|
534
|
+
if (Object.getOwnPropertySymbols) {
|
|
535
|
+
var a = Object.getOwnPropertySymbols(e);
|
|
536
|
+
t && (a = a.filter(function(o) {
|
|
537
|
+
return Object.getOwnPropertyDescriptor(e, o).enumerable;
|
|
538
|
+
})), n.push.apply(n, a);
|
|
539
|
+
}
|
|
540
|
+
return n;
|
|
541
|
+
}
|
|
542
|
+
function se(e) {
|
|
543
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
544
|
+
var n = arguments[t] != null ? arguments[t] : {};
|
|
545
|
+
t % 2 ? ln(Object(n), !0).forEach(function(a) {
|
|
546
|
+
Va(e, a, n[a]);
|
|
547
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : ln(Object(n)).forEach(function(a) {
|
|
548
|
+
Object.defineProperty(e, a, Object.getOwnPropertyDescriptor(n, a));
|
|
549
|
+
});
|
|
550
|
+
}
|
|
551
|
+
return e;
|
|
552
|
+
}
|
|
553
|
+
function at(e) {
|
|
554
|
+
"@babel/helpers - typeof";
|
|
555
|
+
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? at = function(t) {
|
|
556
|
+
return typeof t;
|
|
557
|
+
} : at = function(t) {
|
|
558
|
+
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
559
|
+
}, at(e);
|
|
560
|
+
}
|
|
561
|
+
function Va(e, t, n) {
|
|
562
|
+
return t in e ? Object.defineProperty(e, t, {
|
|
563
|
+
value: n,
|
|
564
|
+
enumerable: !0,
|
|
565
|
+
configurable: !0,
|
|
566
|
+
writable: !0
|
|
567
|
+
}) : e[t] = n, e;
|
|
568
|
+
}
|
|
569
|
+
function ee() {
|
|
570
|
+
return ee = Object.assign || function(e) {
|
|
571
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
572
|
+
var n = arguments[t];
|
|
573
|
+
for (var a in n)
|
|
574
|
+
Object.prototype.hasOwnProperty.call(n, a) && (e[a] = n[a]);
|
|
575
|
+
}
|
|
576
|
+
return e;
|
|
577
|
+
}, ee.apply(this, arguments);
|
|
578
|
+
}
|
|
579
|
+
function Ua(e, t) {
|
|
580
|
+
if (e == null)
|
|
581
|
+
return {};
|
|
582
|
+
var n = {}, a = Object.keys(e), o, i;
|
|
583
|
+
for (i = 0; i < a.length; i++)
|
|
584
|
+
o = a[i], !(t.indexOf(o) >= 0) && (n[o] = e[o]);
|
|
585
|
+
return n;
|
|
586
|
+
}
|
|
587
|
+
function Ga(e, t) {
|
|
588
|
+
if (e == null)
|
|
589
|
+
return {};
|
|
590
|
+
var n = Ua(e, t), a, o;
|
|
591
|
+
if (Object.getOwnPropertySymbols) {
|
|
592
|
+
var i = Object.getOwnPropertySymbols(e);
|
|
593
|
+
for (o = 0; o < i.length; o++)
|
|
594
|
+
a = i[o], !(t.indexOf(a) >= 0) && Object.prototype.propertyIsEnumerable.call(e, a) && (n[a] = e[a]);
|
|
595
|
+
}
|
|
596
|
+
return n;
|
|
597
|
+
}
|
|
598
|
+
function qa(e) {
|
|
599
|
+
return Ya(e) || Xa(e) || Ka(e) || Ja();
|
|
600
|
+
}
|
|
601
|
+
function Ya(e) {
|
|
602
|
+
if (Array.isArray(e))
|
|
603
|
+
return Gt(e);
|
|
604
|
+
}
|
|
605
|
+
function Xa(e) {
|
|
606
|
+
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null)
|
|
607
|
+
return Array.from(e);
|
|
608
|
+
}
|
|
609
|
+
function Ka(e, t) {
|
|
610
|
+
if (e) {
|
|
611
|
+
if (typeof e == "string")
|
|
612
|
+
return Gt(e, t);
|
|
613
|
+
var n = Object.prototype.toString.call(e).slice(8, -1);
|
|
614
|
+
if (n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set")
|
|
615
|
+
return Array.from(e);
|
|
616
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
617
|
+
return Gt(e, t);
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
function Gt(e, t) {
|
|
621
|
+
(t == null || t > e.length) && (t = e.length);
|
|
622
|
+
for (var n = 0, a = new Array(t); n < t; n++)
|
|
623
|
+
a[n] = e[n];
|
|
624
|
+
return a;
|
|
625
|
+
}
|
|
626
|
+
function Ja() {
|
|
627
|
+
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
628
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
629
|
+
}
|
|
630
|
+
var Qa = "1.15.2";
|
|
631
|
+
function le(e) {
|
|
632
|
+
if (typeof window < "u" && window.navigator)
|
|
633
|
+
return !!/* @__PURE__ */ navigator.userAgent.match(e);
|
|
634
|
+
}
|
|
635
|
+
var de = le(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), Ge = le(/Edge/i), dn = le(/firefox/i), Be = le(/safari/i) && !le(/chrome/i) && !le(/android/i), wn = le(/iP(ad|od|hone)/i), xn = le(/chrome/i) && le(/android/i), En = {
|
|
636
|
+
capture: !1,
|
|
637
|
+
passive: !1
|
|
638
|
+
};
|
|
639
|
+
function x(e, t, n) {
|
|
640
|
+
e.addEventListener(t, n, !de && En);
|
|
641
|
+
}
|
|
642
|
+
function w(e, t, n) {
|
|
643
|
+
e.removeEventListener(t, n, !de && En);
|
|
644
|
+
}
|
|
645
|
+
function lt(e, t) {
|
|
646
|
+
if (t) {
|
|
647
|
+
if (t[0] === ">" && (t = t.substring(1)), e)
|
|
648
|
+
try {
|
|
649
|
+
if (e.matches)
|
|
650
|
+
return e.matches(t);
|
|
651
|
+
if (e.msMatchesSelector)
|
|
652
|
+
return e.msMatchesSelector(t);
|
|
653
|
+
if (e.webkitMatchesSelector)
|
|
654
|
+
return e.webkitMatchesSelector(t);
|
|
655
|
+
} catch {
|
|
656
|
+
return !1;
|
|
657
|
+
}
|
|
658
|
+
return !1;
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
function ei(e) {
|
|
662
|
+
return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode;
|
|
663
|
+
}
|
|
664
|
+
function Q(e, t, n, a) {
|
|
665
|
+
if (e) {
|
|
666
|
+
n = n || document;
|
|
667
|
+
do {
|
|
668
|
+
if (t != null && (t[0] === ">" ? e.parentNode === n && lt(e, t) : lt(e, t)) || a && e === n)
|
|
669
|
+
return e;
|
|
670
|
+
if (e === n)
|
|
671
|
+
break;
|
|
672
|
+
} while (e = ei(e));
|
|
673
|
+
}
|
|
674
|
+
return null;
|
|
675
|
+
}
|
|
676
|
+
var cn = /\s+/g;
|
|
677
|
+
function P(e, t, n) {
|
|
678
|
+
if (e && t)
|
|
679
|
+
if (e.classList)
|
|
680
|
+
e.classList[n ? "add" : "remove"](t);
|
|
681
|
+
else {
|
|
682
|
+
var a = (" " + e.className + " ").replace(cn, " ").replace(" " + t + " ", " ");
|
|
683
|
+
e.className = (a + (n ? " " + t : "")).replace(cn, " ");
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
function m(e, t, n) {
|
|
687
|
+
var a = e && e.style;
|
|
688
|
+
if (a) {
|
|
689
|
+
if (n === void 0)
|
|
690
|
+
return document.defaultView && document.defaultView.getComputedStyle ? n = document.defaultView.getComputedStyle(e, "") : e.currentStyle && (n = e.currentStyle), t === void 0 ? n : n[t];
|
|
691
|
+
!(t in a) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), a[t] = n + (typeof n == "string" ? "" : "px");
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
function Ce(e, t) {
|
|
695
|
+
var n = "";
|
|
696
|
+
if (typeof e == "string")
|
|
697
|
+
n = e;
|
|
698
|
+
else
|
|
699
|
+
do {
|
|
700
|
+
var a = m(e, "transform");
|
|
701
|
+
a && a !== "none" && (n = a + " " + n);
|
|
702
|
+
} while (!t && (e = e.parentNode));
|
|
703
|
+
var o = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
704
|
+
return o && new o(n);
|
|
705
|
+
}
|
|
706
|
+
function Dn(e, t, n) {
|
|
707
|
+
if (e) {
|
|
708
|
+
var a = e.getElementsByTagName(t), o = 0, i = a.length;
|
|
709
|
+
if (n)
|
|
710
|
+
for (; o < i; o++)
|
|
711
|
+
n(a[o], o);
|
|
712
|
+
return a;
|
|
713
|
+
}
|
|
714
|
+
return [];
|
|
715
|
+
}
|
|
716
|
+
function oe() {
|
|
717
|
+
var e = document.scrollingElement;
|
|
718
|
+
return e || document.documentElement;
|
|
719
|
+
}
|
|
720
|
+
function T(e, t, n, a, o) {
|
|
721
|
+
if (!(!e.getBoundingClientRect && e !== window)) {
|
|
722
|
+
var i, r, l, c, f, p, u;
|
|
723
|
+
if (e !== window && e.parentNode && e !== oe() ? (i = e.getBoundingClientRect(), r = i.top, l = i.left, c = i.bottom, f = i.right, p = i.height, u = i.width) : (r = 0, l = 0, c = window.innerHeight, f = window.innerWidth, p = window.innerHeight, u = window.innerWidth), (t || n) && e !== window && (o = o || e.parentNode, !de))
|
|
724
|
+
do
|
|
725
|
+
if (o && o.getBoundingClientRect && (m(o, "transform") !== "none" || n && m(o, "position") !== "static")) {
|
|
726
|
+
var b = o.getBoundingClientRect();
|
|
727
|
+
r -= b.top + parseInt(m(o, "border-top-width")), l -= b.left + parseInt(m(o, "border-left-width")), c = r + i.height, f = l + i.width;
|
|
728
|
+
break;
|
|
729
|
+
}
|
|
730
|
+
while (o = o.parentNode);
|
|
731
|
+
if (a && e !== window) {
|
|
732
|
+
var v = Ce(o || e), y = v && v.a, k = v && v.d;
|
|
733
|
+
v && (r /= k, l /= y, u /= y, p /= k, c = r + p, f = l + u);
|
|
734
|
+
}
|
|
735
|
+
return {
|
|
736
|
+
top: r,
|
|
737
|
+
left: l,
|
|
738
|
+
bottom: c,
|
|
739
|
+
right: f,
|
|
740
|
+
width: u,
|
|
741
|
+
height: p
|
|
742
|
+
};
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
function fn(e, t, n) {
|
|
746
|
+
for (var a = be(e, !0), o = T(e)[t]; a; ) {
|
|
747
|
+
var i = T(a)[n], r = void 0;
|
|
748
|
+
if (n === "top" || n === "left" ? r = o >= i : r = o <= i, !r)
|
|
749
|
+
return a;
|
|
750
|
+
if (a === oe())
|
|
751
|
+
break;
|
|
752
|
+
a = be(a, !1);
|
|
753
|
+
}
|
|
754
|
+
return !1;
|
|
755
|
+
}
|
|
756
|
+
function Te(e, t, n, a) {
|
|
757
|
+
for (var o = 0, i = 0, r = e.children; i < r.length; ) {
|
|
758
|
+
if (r[i].style.display !== "none" && r[i] !== g.ghost && (a || r[i] !== g.dragged) && Q(r[i], n.draggable, e, !1)) {
|
|
759
|
+
if (o === t)
|
|
760
|
+
return r[i];
|
|
761
|
+
o++;
|
|
762
|
+
}
|
|
763
|
+
i++;
|
|
764
|
+
}
|
|
765
|
+
return null;
|
|
766
|
+
}
|
|
767
|
+
function Jt(e, t) {
|
|
768
|
+
for (var n = e.lastElementChild; n && (n === g.ghost || m(n, "display") === "none" || t && !lt(n, t)); )
|
|
769
|
+
n = n.previousElementSibling;
|
|
770
|
+
return n || null;
|
|
771
|
+
}
|
|
772
|
+
function A(e, t) {
|
|
773
|
+
var n = 0;
|
|
774
|
+
if (!e || !e.parentNode)
|
|
775
|
+
return -1;
|
|
776
|
+
for (; e = e.previousElementSibling; )
|
|
777
|
+
e.nodeName.toUpperCase() !== "TEMPLATE" && e !== g.clone && (!t || lt(e, t)) && n++;
|
|
778
|
+
return n;
|
|
779
|
+
}
|
|
780
|
+
function pn(e) {
|
|
781
|
+
var t = 0, n = 0, a = oe();
|
|
782
|
+
if (e)
|
|
783
|
+
do {
|
|
784
|
+
var o = Ce(e), i = o.a, r = o.d;
|
|
785
|
+
t += e.scrollLeft * i, n += e.scrollTop * r;
|
|
786
|
+
} while (e !== a && (e = e.parentNode));
|
|
787
|
+
return [t, n];
|
|
788
|
+
}
|
|
789
|
+
function ti(e, t) {
|
|
790
|
+
for (var n in e)
|
|
791
|
+
if (e.hasOwnProperty(n)) {
|
|
792
|
+
for (var a in t)
|
|
793
|
+
if (t.hasOwnProperty(a) && t[a] === e[n][a])
|
|
794
|
+
return Number(n);
|
|
795
|
+
}
|
|
796
|
+
return -1;
|
|
797
|
+
}
|
|
798
|
+
function be(e, t) {
|
|
799
|
+
if (!e || !e.getBoundingClientRect)
|
|
800
|
+
return oe();
|
|
801
|
+
var n = e, a = !1;
|
|
802
|
+
do
|
|
803
|
+
if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
|
|
804
|
+
var o = m(n);
|
|
805
|
+
if (n.clientWidth < n.scrollWidth && (o.overflowX == "auto" || o.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (o.overflowY == "auto" || o.overflowY == "scroll")) {
|
|
806
|
+
if (!n.getBoundingClientRect || n === document.body)
|
|
807
|
+
return oe();
|
|
808
|
+
if (a || t)
|
|
809
|
+
return n;
|
|
810
|
+
a = !0;
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
while (n = n.parentNode);
|
|
814
|
+
return oe();
|
|
815
|
+
}
|
|
816
|
+
function ni(e, t) {
|
|
817
|
+
if (e && t)
|
|
818
|
+
for (var n in t)
|
|
819
|
+
t.hasOwnProperty(n) && (e[n] = t[n]);
|
|
820
|
+
return e;
|
|
821
|
+
}
|
|
822
|
+
function vt(e, t) {
|
|
823
|
+
return Math.round(e.top) === Math.round(t.top) && Math.round(e.left) === Math.round(t.left) && Math.round(e.height) === Math.round(t.height) && Math.round(e.width) === Math.round(t.width);
|
|
824
|
+
}
|
|
825
|
+
var We;
|
|
826
|
+
function Sn(e, t) {
|
|
827
|
+
return function() {
|
|
828
|
+
if (!We) {
|
|
829
|
+
var n = arguments, a = this;
|
|
830
|
+
n.length === 1 ? e.call(a, n[0]) : e.apply(a, n), We = setTimeout(function() {
|
|
831
|
+
We = void 0;
|
|
832
|
+
}, t);
|
|
833
|
+
}
|
|
834
|
+
};
|
|
835
|
+
}
|
|
836
|
+
function ai() {
|
|
837
|
+
clearTimeout(We), We = void 0;
|
|
838
|
+
}
|
|
839
|
+
function On(e, t, n) {
|
|
840
|
+
e.scrollLeft += t, e.scrollTop += n;
|
|
841
|
+
}
|
|
842
|
+
function Qt(e) {
|
|
843
|
+
var t = window.Polymer, n = window.jQuery || window.Zepto;
|
|
844
|
+
return t && t.dom ? t.dom(e).cloneNode(!0) : n ? n(e).clone(!0)[0] : e.cloneNode(!0);
|
|
845
|
+
}
|
|
846
|
+
function un(e, t) {
|
|
847
|
+
m(e, "position", "absolute"), m(e, "top", t.top), m(e, "left", t.left), m(e, "width", t.width), m(e, "height", t.height);
|
|
848
|
+
}
|
|
849
|
+
function _t(e) {
|
|
850
|
+
m(e, "position", ""), m(e, "top", ""), m(e, "left", ""), m(e, "width", ""), m(e, "height", "");
|
|
851
|
+
}
|
|
852
|
+
function Tn(e, t, n) {
|
|
853
|
+
var a = {};
|
|
854
|
+
return Array.from(e.children).forEach(function(o) {
|
|
855
|
+
var i, r, l, c;
|
|
856
|
+
if (!(!Q(o, t.draggable, e, !1) || o.animated || o === n)) {
|
|
857
|
+
var f = T(o);
|
|
858
|
+
a.left = Math.min((i = a.left) !== null && i !== void 0 ? i : 1 / 0, f.left), a.top = Math.min((r = a.top) !== null && r !== void 0 ? r : 1 / 0, f.top), a.right = Math.max((l = a.right) !== null && l !== void 0 ? l : -1 / 0, f.right), a.bottom = Math.max((c = a.bottom) !== null && c !== void 0 ? c : -1 / 0, f.bottom);
|
|
859
|
+
}
|
|
860
|
+
}), a.width = a.right - a.left, a.height = a.bottom - a.top, a.x = a.left, a.y = a.top, a;
|
|
861
|
+
}
|
|
862
|
+
var W = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
863
|
+
function ii() {
|
|
864
|
+
var e = [], t;
|
|
865
|
+
return {
|
|
866
|
+
captureAnimationState: function() {
|
|
867
|
+
if (e = [], !!this.options.animation) {
|
|
868
|
+
var a = [].slice.call(this.el.children);
|
|
869
|
+
a.forEach(function(o) {
|
|
870
|
+
if (!(m(o, "display") === "none" || o === g.ghost)) {
|
|
871
|
+
e.push({
|
|
872
|
+
target: o,
|
|
873
|
+
rect: T(o)
|
|
874
|
+
});
|
|
875
|
+
var i = se({}, e[e.length - 1].rect);
|
|
876
|
+
if (o.thisAnimationDuration) {
|
|
877
|
+
var r = Ce(o, !0);
|
|
878
|
+
r && (i.top -= r.f, i.left -= r.e);
|
|
879
|
+
}
|
|
880
|
+
o.fromRect = i;
|
|
881
|
+
}
|
|
882
|
+
});
|
|
883
|
+
}
|
|
884
|
+
},
|
|
885
|
+
addAnimationState: function(a) {
|
|
886
|
+
e.push(a);
|
|
887
|
+
},
|
|
888
|
+
removeAnimationState: function(a) {
|
|
889
|
+
e.splice(ti(e, {
|
|
890
|
+
target: a
|
|
891
|
+
}), 1);
|
|
892
|
+
},
|
|
893
|
+
animateAll: function(a) {
|
|
894
|
+
var o = this;
|
|
895
|
+
if (!this.options.animation) {
|
|
896
|
+
clearTimeout(t), typeof a == "function" && a();
|
|
897
|
+
return;
|
|
898
|
+
}
|
|
899
|
+
var i = !1, r = 0;
|
|
900
|
+
e.forEach(function(l) {
|
|
901
|
+
var c = 0, f = l.target, p = f.fromRect, u = T(f), b = f.prevFromRect, v = f.prevToRect, y = l.rect, k = Ce(f, !0);
|
|
902
|
+
k && (u.top -= k.f, u.left -= k.e), f.toRect = u, f.thisAnimationDuration && vt(b, u) && !vt(p, u) && // Make sure animatingRect is on line between toRect & fromRect
|
|
903
|
+
(y.top - u.top) / (y.left - u.left) === (p.top - u.top) / (p.left - u.left) && (c = si(y, b, v, o.options)), vt(u, p) || (f.prevFromRect = p, f.prevToRect = u, c || (c = o.options.animation), o.animate(f, y, u, c)), c && (i = !0, r = Math.max(r, c), clearTimeout(f.animationResetTimer), f.animationResetTimer = setTimeout(function() {
|
|
904
|
+
f.animationTime = 0, f.prevFromRect = null, f.fromRect = null, f.prevToRect = null, f.thisAnimationDuration = null;
|
|
905
|
+
}, c), f.thisAnimationDuration = c);
|
|
906
|
+
}), clearTimeout(t), i ? t = setTimeout(function() {
|
|
907
|
+
typeof a == "function" && a();
|
|
908
|
+
}, r) : typeof a == "function" && a(), e = [];
|
|
909
|
+
},
|
|
910
|
+
animate: function(a, o, i, r) {
|
|
911
|
+
if (r) {
|
|
912
|
+
m(a, "transition", ""), m(a, "transform", "");
|
|
913
|
+
var l = Ce(this.el), c = l && l.a, f = l && l.d, p = (o.left - i.left) / (c || 1), u = (o.top - i.top) / (f || 1);
|
|
914
|
+
a.animatingX = !!p, a.animatingY = !!u, m(a, "transform", "translate3d(" + p + "px," + u + "px,0)"), this.forRepaintDummy = oi(a), m(a, "transition", "transform " + r + "ms" + (this.options.easing ? " " + this.options.easing : "")), m(a, "transform", "translate3d(0,0,0)"), typeof a.animated == "number" && clearTimeout(a.animated), a.animated = setTimeout(function() {
|
|
915
|
+
m(a, "transition", ""), m(a, "transform", ""), a.animated = !1, a.animatingX = !1, a.animatingY = !1;
|
|
916
|
+
}, r);
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
};
|
|
920
|
+
}
|
|
921
|
+
function oi(e) {
|
|
922
|
+
return e.offsetWidth;
|
|
923
|
+
}
|
|
924
|
+
function si(e, t, n, a) {
|
|
925
|
+
return Math.sqrt(Math.pow(t.top - e.top, 2) + Math.pow(t.left - e.left, 2)) / Math.sqrt(Math.pow(t.top - n.top, 2) + Math.pow(t.left - n.left, 2)) * a.animation;
|
|
926
|
+
}
|
|
927
|
+
var xe = [], Ct = {
|
|
928
|
+
initializeByDefault: !0
|
|
929
|
+
}, qe = {
|
|
930
|
+
mount: function(t) {
|
|
931
|
+
for (var n in Ct)
|
|
932
|
+
Ct.hasOwnProperty(n) && !(n in t) && (t[n] = Ct[n]);
|
|
933
|
+
xe.forEach(function(a) {
|
|
934
|
+
if (a.pluginName === t.pluginName)
|
|
935
|
+
throw "Sortable: Cannot mount plugin ".concat(t.pluginName, " more than once");
|
|
936
|
+
}), xe.push(t);
|
|
937
|
+
},
|
|
938
|
+
pluginEvent: function(t, n, a) {
|
|
939
|
+
var o = this;
|
|
940
|
+
this.eventCanceled = !1, a.cancel = function() {
|
|
941
|
+
o.eventCanceled = !0;
|
|
942
|
+
};
|
|
943
|
+
var i = t + "Global";
|
|
944
|
+
xe.forEach(function(r) {
|
|
945
|
+
n[r.pluginName] && (n[r.pluginName][i] && n[r.pluginName][i](se({
|
|
946
|
+
sortable: n
|
|
947
|
+
}, a)), n.options[r.pluginName] && n[r.pluginName][t] && n[r.pluginName][t](se({
|
|
948
|
+
sortable: n
|
|
949
|
+
}, a)));
|
|
950
|
+
});
|
|
951
|
+
},
|
|
952
|
+
initializePlugins: function(t, n, a, o) {
|
|
953
|
+
xe.forEach(function(l) {
|
|
954
|
+
var c = l.pluginName;
|
|
955
|
+
if (!(!t.options[c] && !l.initializeByDefault)) {
|
|
956
|
+
var f = new l(t, n, t.options);
|
|
957
|
+
f.sortable = t, f.options = t.options, t[c] = f, ee(a, f.defaults);
|
|
958
|
+
}
|
|
959
|
+
});
|
|
960
|
+
for (var i in t.options)
|
|
961
|
+
if (t.options.hasOwnProperty(i)) {
|
|
962
|
+
var r = this.modifyOption(t, i, t.options[i]);
|
|
963
|
+
typeof r < "u" && (t.options[i] = r);
|
|
964
|
+
}
|
|
965
|
+
},
|
|
966
|
+
getEventProperties: function(t, n) {
|
|
967
|
+
var a = {};
|
|
968
|
+
return xe.forEach(function(o) {
|
|
969
|
+
typeof o.eventProperties == "function" && ee(a, o.eventProperties.call(n[o.pluginName], t));
|
|
970
|
+
}), a;
|
|
971
|
+
},
|
|
972
|
+
modifyOption: function(t, n, a) {
|
|
973
|
+
var o;
|
|
974
|
+
return xe.forEach(function(i) {
|
|
975
|
+
t[i.pluginName] && i.optionListeners && typeof i.optionListeners[n] == "function" && (o = i.optionListeners[n].call(t[i.pluginName], a));
|
|
976
|
+
}), o;
|
|
977
|
+
}
|
|
978
|
+
};
|
|
979
|
+
function Le(e) {
|
|
980
|
+
var t = e.sortable, n = e.rootEl, a = e.name, o = e.targetEl, i = e.cloneEl, r = e.toEl, l = e.fromEl, c = e.oldIndex, f = e.newIndex, p = e.oldDraggableIndex, u = e.newDraggableIndex, b = e.originalEvent, v = e.putSortable, y = e.extraEventProperties;
|
|
981
|
+
if (t = t || n && n[W], !!t) {
|
|
982
|
+
var k, S = t.options, V = "on" + a.charAt(0).toUpperCase() + a.substr(1);
|
|
983
|
+
window.CustomEvent && !de && !Ge ? k = new CustomEvent(a, {
|
|
984
|
+
bubbles: !0,
|
|
985
|
+
cancelable: !0
|
|
986
|
+
}) : (k = document.createEvent("Event"), k.initEvent(a, !0, !0)), k.to = r || n, k.from = l || n, k.item = o || n, k.clone = i, k.oldIndex = c, k.newIndex = f, k.oldDraggableIndex = p, k.newDraggableIndex = u, k.originalEvent = b, k.pullMode = v ? v.lastPutMode : void 0;
|
|
987
|
+
var z = se(se({}, y), qe.getEventProperties(a, t));
|
|
988
|
+
for (var U in z)
|
|
989
|
+
k[U] = z[U];
|
|
990
|
+
n && n.dispatchEvent(k), S[V] && S[V].call(t, k);
|
|
991
|
+
}
|
|
992
|
+
}
|
|
993
|
+
var ri = ["evt"], G = function(t, n) {
|
|
994
|
+
var a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, o = a.evt, i = Ga(a, ri);
|
|
995
|
+
qe.pluginEvent.bind(g)(t, n, se({
|
|
996
|
+
dragEl: h,
|
|
997
|
+
parentEl: N,
|
|
998
|
+
ghostEl: C,
|
|
999
|
+
rootEl: I,
|
|
1000
|
+
nextEl: _e,
|
|
1001
|
+
lastDownEl: it,
|
|
1002
|
+
cloneEl: H,
|
|
1003
|
+
cloneHidden: he,
|
|
1004
|
+
dragStarted: Re,
|
|
1005
|
+
putSortable: j,
|
|
1006
|
+
activeSortable: g.active,
|
|
1007
|
+
originalEvent: o,
|
|
1008
|
+
oldIndex: Oe,
|
|
1009
|
+
oldDraggableIndex: Ze,
|
|
1010
|
+
newIndex: K,
|
|
1011
|
+
newDraggableIndex: ue,
|
|
1012
|
+
hideGhostForTarget: Nn,
|
|
1013
|
+
unhideGhostForTarget: An,
|
|
1014
|
+
cloneNowHidden: function() {
|
|
1015
|
+
he = !0;
|
|
1016
|
+
},
|
|
1017
|
+
cloneNowShown: function() {
|
|
1018
|
+
he = !1;
|
|
1019
|
+
},
|
|
1020
|
+
dispatchSortableEvent: function(l) {
|
|
1021
|
+
Z({
|
|
1022
|
+
sortable: n,
|
|
1023
|
+
name: l,
|
|
1024
|
+
originalEvent: o
|
|
1025
|
+
});
|
|
1026
|
+
}
|
|
1027
|
+
}, i));
|
|
1028
|
+
};
|
|
1029
|
+
function Z(e) {
|
|
1030
|
+
Le(se({
|
|
1031
|
+
putSortable: j,
|
|
1032
|
+
cloneEl: H,
|
|
1033
|
+
targetEl: h,
|
|
1034
|
+
rootEl: I,
|
|
1035
|
+
oldIndex: Oe,
|
|
1036
|
+
oldDraggableIndex: Ze,
|
|
1037
|
+
newIndex: K,
|
|
1038
|
+
newDraggableIndex: ue
|
|
1039
|
+
}, e));
|
|
1040
|
+
}
|
|
1041
|
+
var h, N, C, I, _e, it, H, he, Oe, K, Ze, ue, Xe, j, Se = !1, dt = !1, ct = [], ge, te, kt, wt, hn, bn, Re, Ee, Ve, Ue = !1, Ke = !1, ot, B, xt = [], qt = !1, ft = [], ht = typeof document < "u", Je = wn, mn = Ge || de ? "cssFloat" : "float", li = ht && !xn && !wn && "draggable" in document.createElement("div"), In = function() {
|
|
1042
|
+
if (ht) {
|
|
1043
|
+
if (de)
|
|
1044
|
+
return !1;
|
|
1045
|
+
var e = document.createElement("x");
|
|
1046
|
+
return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
|
|
1047
|
+
}
|
|
1048
|
+
}(), Hn = function(t, n) {
|
|
1049
|
+
var a = m(t), o = parseInt(a.width) - parseInt(a.paddingLeft) - parseInt(a.paddingRight) - parseInt(a.borderLeftWidth) - parseInt(a.borderRightWidth), i = Te(t, 0, n), r = Te(t, 1, n), l = i && m(i), c = r && m(r), f = l && parseInt(l.marginLeft) + parseInt(l.marginRight) + T(i).width, p = c && parseInt(c.marginLeft) + parseInt(c.marginRight) + T(r).width;
|
|
1050
|
+
if (a.display === "flex")
|
|
1051
|
+
return a.flexDirection === "column" || a.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
1052
|
+
if (a.display === "grid")
|
|
1053
|
+
return a.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
1054
|
+
if (i && l.float && l.float !== "none") {
|
|
1055
|
+
var u = l.float === "left" ? "left" : "right";
|
|
1056
|
+
return r && (c.clear === "both" || c.clear === u) ? "vertical" : "horizontal";
|
|
1057
|
+
}
|
|
1058
|
+
return i && (l.display === "block" || l.display === "flex" || l.display === "table" || l.display === "grid" || f >= o && a[mn] === "none" || r && a[mn] === "none" && f + p > o) ? "vertical" : "horizontal";
|
|
1059
|
+
}, di = function(t, n, a) {
|
|
1060
|
+
var o = a ? t.left : t.top, i = a ? t.right : t.bottom, r = a ? t.width : t.height, l = a ? n.left : n.top, c = a ? n.right : n.bottom, f = a ? n.width : n.height;
|
|
1061
|
+
return o === l || i === c || o + r / 2 === l + f / 2;
|
|
1062
|
+
}, ci = function(t, n) {
|
|
1063
|
+
var a;
|
|
1064
|
+
return ct.some(function(o) {
|
|
1065
|
+
var i = o[W].options.emptyInsertThreshold;
|
|
1066
|
+
if (!(!i || Jt(o))) {
|
|
1067
|
+
var r = T(o), l = t >= r.left - i && t <= r.right + i, c = n >= r.top - i && n <= r.bottom + i;
|
|
1068
|
+
if (l && c)
|
|
1069
|
+
return a = o;
|
|
1070
|
+
}
|
|
1071
|
+
}), a;
|
|
1072
|
+
}, Pn = function(t) {
|
|
1073
|
+
function n(i, r) {
|
|
1074
|
+
return function(l, c, f, p) {
|
|
1075
|
+
var u = l.options.group.name && c.options.group.name && l.options.group.name === c.options.group.name;
|
|
1076
|
+
if (i == null && (r || u))
|
|
1077
|
+
return !0;
|
|
1078
|
+
if (i == null || i === !1)
|
|
1079
|
+
return !1;
|
|
1080
|
+
if (r && i === "clone")
|
|
1081
|
+
return i;
|
|
1082
|
+
if (typeof i == "function")
|
|
1083
|
+
return n(i(l, c, f, p), r)(l, c, f, p);
|
|
1084
|
+
var b = (r ? l : c).options.group.name;
|
|
1085
|
+
return i === !0 || typeof i == "string" && i === b || i.join && i.indexOf(b) > -1;
|
|
1086
|
+
};
|
|
1087
|
+
}
|
|
1088
|
+
var a = {}, o = t.group;
|
|
1089
|
+
(!o || at(o) != "object") && (o = {
|
|
1090
|
+
name: o
|
|
1091
|
+
}), a.name = o.name, a.checkPull = n(o.pull, !0), a.checkPut = n(o.put), a.revertClone = o.revertClone, t.group = a;
|
|
1092
|
+
}, Nn = function() {
|
|
1093
|
+
!In && C && m(C, "display", "none");
|
|
1094
|
+
}, An = function() {
|
|
1095
|
+
!In && C && m(C, "display", "");
|
|
1096
|
+
};
|
|
1097
|
+
ht && !xn && document.addEventListener("click", function(e) {
|
|
1098
|
+
if (dt)
|
|
1099
|
+
return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), dt = !1, !1;
|
|
1100
|
+
}, !0);
|
|
1101
|
+
var ve = function(t) {
|
|
1102
|
+
if (h) {
|
|
1103
|
+
t = t.touches ? t.touches[0] : t;
|
|
1104
|
+
var n = ci(t.clientX, t.clientY);
|
|
1105
|
+
if (n) {
|
|
1106
|
+
var a = {};
|
|
1107
|
+
for (var o in t)
|
|
1108
|
+
t.hasOwnProperty(o) && (a[o] = t[o]);
|
|
1109
|
+
a.target = a.rootEl = n, a.preventDefault = void 0, a.stopPropagation = void 0, n[W]._onDragOver(a);
|
|
1110
|
+
}
|
|
1111
|
+
}
|
|
1112
|
+
}, fi = function(t) {
|
|
1113
|
+
h && h.parentNode[W]._isOutsideThisEl(t.target);
|
|
1114
|
+
};
|
|
1115
|
+
function g(e, t) {
|
|
1116
|
+
if (!(e && e.nodeType && e.nodeType === 1))
|
|
1117
|
+
throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));
|
|
1118
|
+
this.el = e, this.options = t = ee({}, t), e[W] = this;
|
|
1119
|
+
var n = {
|
|
1120
|
+
group: null,
|
|
1121
|
+
sort: !0,
|
|
1122
|
+
disabled: !1,
|
|
1123
|
+
store: null,
|
|
1124
|
+
handle: null,
|
|
1125
|
+
draggable: /^[uo]l$/i.test(e.nodeName) ? ">li" : ">*",
|
|
1126
|
+
swapThreshold: 1,
|
|
1127
|
+
// percentage; 0 <= x <= 1
|
|
1128
|
+
invertSwap: !1,
|
|
1129
|
+
// invert always
|
|
1130
|
+
invertedSwapThreshold: null,
|
|
1131
|
+
// will be set to same as swapThreshold if default
|
|
1132
|
+
removeCloneOnHide: !0,
|
|
1133
|
+
direction: function() {
|
|
1134
|
+
return Hn(e, this.options);
|
|
1135
|
+
},
|
|
1136
|
+
ghostClass: "sortable-ghost",
|
|
1137
|
+
chosenClass: "sortable-chosen",
|
|
1138
|
+
dragClass: "sortable-drag",
|
|
1139
|
+
ignore: "a, img",
|
|
1140
|
+
filter: null,
|
|
1141
|
+
preventOnFilter: !0,
|
|
1142
|
+
animation: 0,
|
|
1143
|
+
easing: null,
|
|
1144
|
+
setData: function(r, l) {
|
|
1145
|
+
r.setData("Text", l.textContent);
|
|
1146
|
+
},
|
|
1147
|
+
dropBubble: !1,
|
|
1148
|
+
dragoverBubble: !1,
|
|
1149
|
+
dataIdAttr: "data-id",
|
|
1150
|
+
delay: 0,
|
|
1151
|
+
delayOnTouchOnly: !1,
|
|
1152
|
+
touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,
|
|
1153
|
+
forceFallback: !1,
|
|
1154
|
+
fallbackClass: "sortable-fallback",
|
|
1155
|
+
fallbackOnBody: !1,
|
|
1156
|
+
fallbackTolerance: 0,
|
|
1157
|
+
fallbackOffset: {
|
|
1158
|
+
x: 0,
|
|
1159
|
+
y: 0
|
|
1160
|
+
},
|
|
1161
|
+
supportPointer: g.supportPointer !== !1 && "PointerEvent" in window && !Be,
|
|
1162
|
+
emptyInsertThreshold: 5
|
|
1163
|
+
};
|
|
1164
|
+
qe.initializePlugins(this, e, n);
|
|
1165
|
+
for (var a in n)
|
|
1166
|
+
!(a in t) && (t[a] = n[a]);
|
|
1167
|
+
Pn(t);
|
|
1168
|
+
for (var o in this)
|
|
1169
|
+
o.charAt(0) === "_" && typeof this[o] == "function" && (this[o] = this[o].bind(this));
|
|
1170
|
+
this.nativeDraggable = t.forceFallback ? !1 : li, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? x(e, "pointerdown", this._onTapStart) : (x(e, "mousedown", this._onTapStart), x(e, "touchstart", this._onTapStart)), this.nativeDraggable && (x(e, "dragover", this), x(e, "dragenter", this)), ct.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), ee(this, ii());
|
|
1171
|
+
}
|
|
1172
|
+
g.prototype = /** @lends Sortable.prototype */
|
|
1173
|
+
{
|
|
1174
|
+
constructor: g,
|
|
1175
|
+
_isOutsideThisEl: function(t) {
|
|
1176
|
+
!this.el.contains(t) && t !== this.el && (Ee = null);
|
|
1177
|
+
},
|
|
1178
|
+
_getDirection: function(t, n) {
|
|
1179
|
+
return typeof this.options.direction == "function" ? this.options.direction.call(this, t, n, h) : this.options.direction;
|
|
1180
|
+
},
|
|
1181
|
+
_onTapStart: function(t) {
|
|
1182
|
+
if (t.cancelable) {
|
|
1183
|
+
var n = this, a = this.el, o = this.options, i = o.preventOnFilter, r = t.type, l = t.touches && t.touches[0] || t.pointerType && t.pointerType === "touch" && t, c = (l || t).target, f = t.target.shadowRoot && (t.path && t.path[0] || t.composedPath && t.composedPath()[0]) || c, p = o.filter;
|
|
1184
|
+
if (vi(a), !h && !(/mousedown|pointerdown/.test(r) && t.button !== 0 || o.disabled) && !f.isContentEditable && !(!this.nativeDraggable && Be && c && c.tagName.toUpperCase() === "SELECT") && (c = Q(c, o.draggable, a, !1), !(c && c.animated) && it !== c)) {
|
|
1185
|
+
if (Oe = A(c), Ze = A(c, o.draggable), typeof p == "function") {
|
|
1186
|
+
if (p.call(this, t, c, this)) {
|
|
1187
|
+
Z({
|
|
1188
|
+
sortable: n,
|
|
1189
|
+
rootEl: f,
|
|
1190
|
+
name: "filter",
|
|
1191
|
+
targetEl: c,
|
|
1192
|
+
toEl: a,
|
|
1193
|
+
fromEl: a
|
|
1194
|
+
}), G("filter", n, {
|
|
1195
|
+
evt: t
|
|
1196
|
+
}), i && t.cancelable && t.preventDefault();
|
|
1197
|
+
return;
|
|
1198
|
+
}
|
|
1199
|
+
} else if (p && (p = p.split(",").some(function(u) {
|
|
1200
|
+
if (u = Q(f, u.trim(), a, !1), u)
|
|
1201
|
+
return Z({
|
|
1202
|
+
sortable: n,
|
|
1203
|
+
rootEl: u,
|
|
1204
|
+
name: "filter",
|
|
1205
|
+
targetEl: c,
|
|
1206
|
+
fromEl: a,
|
|
1207
|
+
toEl: a
|
|
1208
|
+
}), G("filter", n, {
|
|
1209
|
+
evt: t
|
|
1210
|
+
}), !0;
|
|
1211
|
+
}), p)) {
|
|
1212
|
+
i && t.cancelable && t.preventDefault();
|
|
1213
|
+
return;
|
|
1214
|
+
}
|
|
1215
|
+
o.handle && !Q(f, o.handle, a, !1) || this._prepareDragStart(t, l, c);
|
|
1216
|
+
}
|
|
1217
|
+
}
|
|
1218
|
+
},
|
|
1219
|
+
_prepareDragStart: function(t, n, a) {
|
|
1220
|
+
var o = this, i = o.el, r = o.options, l = i.ownerDocument, c;
|
|
1221
|
+
if (a && !h && a.parentNode === i) {
|
|
1222
|
+
var f = T(a);
|
|
1223
|
+
if (I = i, h = a, N = h.parentNode, _e = h.nextSibling, it = a, Xe = r.group, g.dragged = h, ge = {
|
|
1224
|
+
target: h,
|
|
1225
|
+
clientX: (n || t).clientX,
|
|
1226
|
+
clientY: (n || t).clientY
|
|
1227
|
+
}, hn = ge.clientX - f.left, bn = ge.clientY - f.top, this._lastX = (n || t).clientX, this._lastY = (n || t).clientY, h.style["will-change"] = "all", c = function() {
|
|
1228
|
+
if (G("delayEnded", o, {
|
|
1229
|
+
evt: t
|
|
1230
|
+
}), g.eventCanceled) {
|
|
1231
|
+
o._onDrop();
|
|
1232
|
+
return;
|
|
1233
|
+
}
|
|
1234
|
+
o._disableDelayedDragEvents(), !dn && o.nativeDraggable && (h.draggable = !0), o._triggerDragStart(t, n), Z({
|
|
1235
|
+
sortable: o,
|
|
1236
|
+
name: "choose",
|
|
1237
|
+
originalEvent: t
|
|
1238
|
+
}), P(h, r.chosenClass, !0);
|
|
1239
|
+
}, r.ignore.split(",").forEach(function(p) {
|
|
1240
|
+
Dn(h, p.trim(), Et);
|
|
1241
|
+
}), x(l, "dragover", ve), x(l, "mousemove", ve), x(l, "touchmove", ve), x(l, "mouseup", o._onDrop), x(l, "touchend", o._onDrop), x(l, "touchcancel", o._onDrop), dn && this.nativeDraggable && (this.options.touchStartThreshold = 4, h.draggable = !0), G("delayStart", this, {
|
|
1242
|
+
evt: t
|
|
1243
|
+
}), r.delay && (!r.delayOnTouchOnly || n) && (!this.nativeDraggable || !(Ge || de))) {
|
|
1244
|
+
if (g.eventCanceled) {
|
|
1245
|
+
this._onDrop();
|
|
1246
|
+
return;
|
|
1247
|
+
}
|
|
1248
|
+
x(l, "mouseup", o._disableDelayedDrag), x(l, "touchend", o._disableDelayedDrag), x(l, "touchcancel", o._disableDelayedDrag), x(l, "mousemove", o._delayedDragTouchMoveHandler), x(l, "touchmove", o._delayedDragTouchMoveHandler), r.supportPointer && x(l, "pointermove", o._delayedDragTouchMoveHandler), o._dragStartTimer = setTimeout(c, r.delay);
|
|
1249
|
+
} else
|
|
1250
|
+
c();
|
|
1251
|
+
}
|
|
1252
|
+
},
|
|
1253
|
+
_delayedDragTouchMoveHandler: function(t) {
|
|
1254
|
+
var n = t.touches ? t.touches[0] : t;
|
|
1255
|
+
Math.max(Math.abs(n.clientX - this._lastX), Math.abs(n.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1)) && this._disableDelayedDrag();
|
|
1256
|
+
},
|
|
1257
|
+
_disableDelayedDrag: function() {
|
|
1258
|
+
h && Et(h), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
1259
|
+
},
|
|
1260
|
+
_disableDelayedDragEvents: function() {
|
|
1261
|
+
var t = this.el.ownerDocument;
|
|
1262
|
+
w(t, "mouseup", this._disableDelayedDrag), w(t, "touchend", this._disableDelayedDrag), w(t, "touchcancel", this._disableDelayedDrag), w(t, "mousemove", this._delayedDragTouchMoveHandler), w(t, "touchmove", this._delayedDragTouchMoveHandler), w(t, "pointermove", this._delayedDragTouchMoveHandler);
|
|
1263
|
+
},
|
|
1264
|
+
_triggerDragStart: function(t, n) {
|
|
1265
|
+
n = n || t.pointerType == "touch" && t, !this.nativeDraggable || n ? this.options.supportPointer ? x(document, "pointermove", this._onTouchMove) : n ? x(document, "touchmove", this._onTouchMove) : x(document, "mousemove", this._onTouchMove) : (x(h, "dragend", this), x(I, "dragstart", this._onDragStart));
|
|
1266
|
+
try {
|
|
1267
|
+
document.selection ? st(function() {
|
|
1268
|
+
document.selection.empty();
|
|
1269
|
+
}) : window.getSelection().removeAllRanges();
|
|
1270
|
+
} catch {
|
|
1271
|
+
}
|
|
1272
|
+
},
|
|
1273
|
+
_dragStarted: function(t, n) {
|
|
1274
|
+
if (Se = !1, I && h) {
|
|
1275
|
+
G("dragStarted", this, {
|
|
1276
|
+
evt: n
|
|
1277
|
+
}), this.nativeDraggable && x(document, "dragover", fi);
|
|
1278
|
+
var a = this.options;
|
|
1279
|
+
!t && P(h, a.dragClass, !1), P(h, a.ghostClass, !0), g.active = this, t && this._appendGhost(), Z({
|
|
1280
|
+
sortable: this,
|
|
1281
|
+
name: "start",
|
|
1282
|
+
originalEvent: n
|
|
1283
|
+
});
|
|
1284
|
+
} else
|
|
1285
|
+
this._nulling();
|
|
1286
|
+
},
|
|
1287
|
+
_emulateDragOver: function() {
|
|
1288
|
+
if (te) {
|
|
1289
|
+
this._lastX = te.clientX, this._lastY = te.clientY, Nn();
|
|
1290
|
+
for (var t = document.elementFromPoint(te.clientX, te.clientY), n = t; t && t.shadowRoot && (t = t.shadowRoot.elementFromPoint(te.clientX, te.clientY), t !== n); )
|
|
1291
|
+
n = t;
|
|
1292
|
+
if (h.parentNode[W]._isOutsideThisEl(t), n)
|
|
1293
|
+
do {
|
|
1294
|
+
if (n[W]) {
|
|
1295
|
+
var a = void 0;
|
|
1296
|
+
if (a = n[W]._onDragOver({
|
|
1297
|
+
clientX: te.clientX,
|
|
1298
|
+
clientY: te.clientY,
|
|
1299
|
+
target: t,
|
|
1300
|
+
rootEl: n
|
|
1301
|
+
}), a && !this.options.dragoverBubble)
|
|
1302
|
+
break;
|
|
1303
|
+
}
|
|
1304
|
+
t = n;
|
|
1305
|
+
} while (n = n.parentNode);
|
|
1306
|
+
An();
|
|
1307
|
+
}
|
|
1308
|
+
},
|
|
1309
|
+
_onTouchMove: function(t) {
|
|
1310
|
+
if (ge) {
|
|
1311
|
+
var n = this.options, a = n.fallbackTolerance, o = n.fallbackOffset, i = t.touches ? t.touches[0] : t, r = C && Ce(C, !0), l = C && r && r.a, c = C && r && r.d, f = Je && B && pn(B), p = (i.clientX - ge.clientX + o.x) / (l || 1) + (f ? f[0] - xt[0] : 0) / (l || 1), u = (i.clientY - ge.clientY + o.y) / (c || 1) + (f ? f[1] - xt[1] : 0) / (c || 1);
|
|
1312
|
+
if (!g.active && !Se) {
|
|
1313
|
+
if (a && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < a)
|
|
1314
|
+
return;
|
|
1315
|
+
this._onDragStart(t, !0);
|
|
1316
|
+
}
|
|
1317
|
+
if (C) {
|
|
1318
|
+
r ? (r.e += p - (kt || 0), r.f += u - (wt || 0)) : r = {
|
|
1319
|
+
a: 1,
|
|
1320
|
+
b: 0,
|
|
1321
|
+
c: 0,
|
|
1322
|
+
d: 1,
|
|
1323
|
+
e: p,
|
|
1324
|
+
f: u
|
|
1325
|
+
};
|
|
1326
|
+
var b = "matrix(".concat(r.a, ",").concat(r.b, ",").concat(r.c, ",").concat(r.d, ",").concat(r.e, ",").concat(r.f, ")");
|
|
1327
|
+
m(C, "webkitTransform", b), m(C, "mozTransform", b), m(C, "msTransform", b), m(C, "transform", b), kt = p, wt = u, te = i;
|
|
1328
|
+
}
|
|
1329
|
+
t.cancelable && t.preventDefault();
|
|
1330
|
+
}
|
|
1331
|
+
},
|
|
1332
|
+
_appendGhost: function() {
|
|
1333
|
+
if (!C) {
|
|
1334
|
+
var t = this.options.fallbackOnBody ? document.body : I, n = T(h, !0, Je, !0, t), a = this.options;
|
|
1335
|
+
if (Je) {
|
|
1336
|
+
for (B = t; m(B, "position") === "static" && m(B, "transform") === "none" && B !== document; )
|
|
1337
|
+
B = B.parentNode;
|
|
1338
|
+
B !== document.body && B !== document.documentElement ? (B === document && (B = oe()), n.top += B.scrollTop, n.left += B.scrollLeft) : B = oe(), xt = pn(B);
|
|
1339
|
+
}
|
|
1340
|
+
C = h.cloneNode(!0), P(C, a.ghostClass, !1), P(C, a.fallbackClass, !0), P(C, a.dragClass, !0), m(C, "transition", ""), m(C, "transform", ""), m(C, "box-sizing", "border-box"), m(C, "margin", 0), m(C, "top", n.top), m(C, "left", n.left), m(C, "width", n.width), m(C, "height", n.height), m(C, "opacity", "0.8"), m(C, "position", Je ? "absolute" : "fixed"), m(C, "zIndex", "100000"), m(C, "pointerEvents", "none"), g.ghost = C, t.appendChild(C), m(C, "transform-origin", hn / parseInt(C.style.width) * 100 + "% " + bn / parseInt(C.style.height) * 100 + "%");
|
|
1341
|
+
}
|
|
1342
|
+
},
|
|
1343
|
+
_onDragStart: function(t, n) {
|
|
1344
|
+
var a = this, o = t.dataTransfer, i = a.options;
|
|
1345
|
+
if (G("dragStart", this, {
|
|
1346
|
+
evt: t
|
|
1347
|
+
}), g.eventCanceled) {
|
|
1348
|
+
this._onDrop();
|
|
1349
|
+
return;
|
|
1350
|
+
}
|
|
1351
|
+
G("setupClone", this), g.eventCanceled || (H = Qt(h), H.removeAttribute("id"), H.draggable = !1, H.style["will-change"] = "", this._hideClone(), P(H, this.options.chosenClass, !1), g.clone = H), a.cloneId = st(function() {
|
|
1352
|
+
G("clone", a), !g.eventCanceled && (a.options.removeCloneOnHide || I.insertBefore(H, h), a._hideClone(), Z({
|
|
1353
|
+
sortable: a,
|
|
1354
|
+
name: "clone"
|
|
1355
|
+
}));
|
|
1356
|
+
}), !n && P(h, i.dragClass, !0), n ? (dt = !0, a._loopId = setInterval(a._emulateDragOver, 50)) : (w(document, "mouseup", a._onDrop), w(document, "touchend", a._onDrop), w(document, "touchcancel", a._onDrop), o && (o.effectAllowed = "move", i.setData && i.setData.call(a, o, h)), x(document, "drop", a), m(h, "transform", "translateZ(0)")), Se = !0, a._dragStartId = st(a._dragStarted.bind(a, n, t)), x(document, "selectstart", a), Re = !0, Be && m(document.body, "user-select", "none");
|
|
1357
|
+
},
|
|
1358
|
+
// Returns true - if no further action is needed (either inserted or another condition)
|
|
1359
|
+
_onDragOver: function(t) {
|
|
1360
|
+
var n = this.el, a = t.target, o, i, r, l = this.options, c = l.group, f = g.active, p = Xe === c, u = l.sort, b = j || f, v, y = this, k = !1;
|
|
1361
|
+
if (qt)
|
|
1362
|
+
return;
|
|
1363
|
+
function S(Ae, ea) {
|
|
1364
|
+
G(Ae, y, se({
|
|
1365
|
+
evt: t,
|
|
1366
|
+
isOwner: p,
|
|
1367
|
+
axis: v ? "vertical" : "horizontal",
|
|
1368
|
+
revert: r,
|
|
1369
|
+
dragRect: o,
|
|
1370
|
+
targetRect: i,
|
|
1371
|
+
canSort: u,
|
|
1372
|
+
fromSortable: b,
|
|
1373
|
+
target: a,
|
|
1374
|
+
completed: z,
|
|
1375
|
+
onMove: function(nn, ta) {
|
|
1376
|
+
return Qe(I, n, h, o, nn, T(nn), t, ta);
|
|
1377
|
+
},
|
|
1378
|
+
changed: U
|
|
1379
|
+
}, ea));
|
|
1380
|
+
}
|
|
1381
|
+
function V() {
|
|
1382
|
+
S("dragOverAnimationCapture"), y.captureAnimationState(), y !== b && b.captureAnimationState();
|
|
1383
|
+
}
|
|
1384
|
+
function z(Ae) {
|
|
1385
|
+
return S("dragOverCompleted", {
|
|
1386
|
+
insertion: Ae
|
|
1387
|
+
}), Ae && (p ? f._hideClone() : f._showClone(y), y !== b && (P(h, j ? j.options.ghostClass : f.options.ghostClass, !1), P(h, l.ghostClass, !0)), j !== y && y !== g.active ? j = y : y === g.active && j && (j = null), b === y && (y._ignoreWhileAnimating = a), y.animateAll(function() {
|
|
1388
|
+
S("dragOverAnimationComplete"), y._ignoreWhileAnimating = null;
|
|
1389
|
+
}), y !== b && (b.animateAll(), b._ignoreWhileAnimating = null)), (a === h && !h.animated || a === n && !a.animated) && (Ee = null), !l.dragoverBubble && !t.rootEl && a !== document && (h.parentNode[W]._isOutsideThisEl(t.target), !Ae && ve(t)), !l.dragoverBubble && t.stopPropagation && t.stopPropagation(), k = !0;
|
|
1390
|
+
}
|
|
1391
|
+
function U() {
|
|
1392
|
+
K = A(h), ue = A(h, l.draggable), Z({
|
|
1393
|
+
sortable: y,
|
|
1394
|
+
name: "change",
|
|
1395
|
+
toEl: n,
|
|
1396
|
+
newIndex: K,
|
|
1397
|
+
newDraggableIndex: ue,
|
|
1398
|
+
originalEvent: t
|
|
1399
|
+
});
|
|
1400
|
+
}
|
|
1401
|
+
if (t.preventDefault !== void 0 && t.cancelable && t.preventDefault(), a = Q(a, l.draggable, n, !0), S("dragOver"), g.eventCanceled)
|
|
1402
|
+
return k;
|
|
1403
|
+
if (h.contains(t.target) || a.animated && a.animatingX && a.animatingY || y._ignoreWhileAnimating === a)
|
|
1404
|
+
return z(!1);
|
|
1405
|
+
if (dt = !1, f && !l.disabled && (p ? u || (r = N !== I) : j === this || (this.lastPutMode = Xe.checkPull(this, f, h, t)) && c.checkPut(this, f, h, t))) {
|
|
1406
|
+
if (v = this._getDirection(t, a) === "vertical", o = T(h), S("dragOverValid"), g.eventCanceled)
|
|
1407
|
+
return k;
|
|
1408
|
+
if (r)
|
|
1409
|
+
return N = I, V(), this._hideClone(), S("revert"), g.eventCanceled || (_e ? I.insertBefore(h, _e) : I.appendChild(h)), z(!0);
|
|
1410
|
+
var D = Jt(n, l.draggable);
|
|
1411
|
+
if (!D || bi(t, v, this) && !D.animated) {
|
|
1412
|
+
if (D === h)
|
|
1413
|
+
return z(!1);
|
|
1414
|
+
if (D && n === t.target && (a = D), a && (i = T(a)), Qe(I, n, h, o, a, i, t, !!a) !== !1)
|
|
1415
|
+
return V(), D && D.nextSibling ? n.insertBefore(h, D.nextSibling) : n.appendChild(h), N = n, U(), z(!0);
|
|
1416
|
+
} else if (D && hi(t, v, this)) {
|
|
1417
|
+
var ae = Te(n, 0, l, !0);
|
|
1418
|
+
if (ae === h)
|
|
1419
|
+
return z(!1);
|
|
1420
|
+
if (a = ae, i = T(a), Qe(I, n, h, o, a, i, t, !1) !== !1)
|
|
1421
|
+
return V(), n.insertBefore(h, ae), N = n, U(), z(!0);
|
|
1422
|
+
} else if (a.parentNode === n) {
|
|
1423
|
+
i = T(a);
|
|
1424
|
+
var ie = 0, me, Ie = h.parentNode !== n, Y = !di(h.animated && h.toRect || o, a.animated && a.toRect || i, v), He = v ? "top" : "left", ce = fn(a, "top", "top") || fn(h, "top", "top"), Pe = ce ? ce.scrollTop : void 0;
|
|
1425
|
+
Ee !== a && (me = i[He], Ue = !1, Ke = !Y && l.invertSwap || Ie), ie = mi(t, a, i, v, Y ? 1 : l.swapThreshold, l.invertedSwapThreshold == null ? l.swapThreshold : l.invertedSwapThreshold, Ke, Ee === a);
|
|
1426
|
+
var re;
|
|
1427
|
+
if (ie !== 0) {
|
|
1428
|
+
var ye = A(h);
|
|
1429
|
+
do
|
|
1430
|
+
ye -= ie, re = N.children[ye];
|
|
1431
|
+
while (re && (m(re, "display") === "none" || re === C));
|
|
1432
|
+
}
|
|
1433
|
+
if (ie === 0 || re === a)
|
|
1434
|
+
return z(!1);
|
|
1435
|
+
Ee = a, Ve = ie;
|
|
1436
|
+
var Ne = a.nextElementSibling, fe = !1;
|
|
1437
|
+
fe = ie === 1;
|
|
1438
|
+
var Ye = Qe(I, n, h, o, a, i, t, fe);
|
|
1439
|
+
if (Ye !== !1)
|
|
1440
|
+
return (Ye === 1 || Ye === -1) && (fe = Ye === 1), qt = !0, setTimeout(ui, 30), V(), fe && !Ne ? n.appendChild(h) : a.parentNode.insertBefore(h, fe ? Ne : a), ce && On(ce, 0, Pe - ce.scrollTop), N = h.parentNode, me !== void 0 && !Ke && (ot = Math.abs(me - T(a)[He])), U(), z(!0);
|
|
1441
|
+
}
|
|
1442
|
+
if (n.contains(h))
|
|
1443
|
+
return z(!1);
|
|
1444
|
+
}
|
|
1445
|
+
return !1;
|
|
1446
|
+
},
|
|
1447
|
+
_ignoreWhileAnimating: null,
|
|
1448
|
+
_offMoveEvents: function() {
|
|
1449
|
+
w(document, "mousemove", this._onTouchMove), w(document, "touchmove", this._onTouchMove), w(document, "pointermove", this._onTouchMove), w(document, "dragover", ve), w(document, "mousemove", ve), w(document, "touchmove", ve);
|
|
1450
|
+
},
|
|
1451
|
+
_offUpEvents: function() {
|
|
1452
|
+
var t = this.el.ownerDocument;
|
|
1453
|
+
w(t, "mouseup", this._onDrop), w(t, "touchend", this._onDrop), w(t, "pointerup", this._onDrop), w(t, "touchcancel", this._onDrop), w(document, "selectstart", this);
|
|
1454
|
+
},
|
|
1455
|
+
_onDrop: function(t) {
|
|
1456
|
+
var n = this.el, a = this.options;
|
|
1457
|
+
if (K = A(h), ue = A(h, a.draggable), G("drop", this, {
|
|
1458
|
+
evt: t
|
|
1459
|
+
}), N = h && h.parentNode, K = A(h), ue = A(h, a.draggable), g.eventCanceled) {
|
|
1460
|
+
this._nulling();
|
|
1461
|
+
return;
|
|
1462
|
+
}
|
|
1463
|
+
Se = !1, Ke = !1, Ue = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), Yt(this.cloneId), Yt(this._dragStartId), this.nativeDraggable && (w(document, "drop", this), w(n, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), Be && m(document.body, "user-select", ""), m(h, "transform", ""), t && (Re && (t.cancelable && t.preventDefault(), !a.dropBubble && t.stopPropagation()), C && C.parentNode && C.parentNode.removeChild(C), (I === N || j && j.lastPutMode !== "clone") && H && H.parentNode && H.parentNode.removeChild(H), h && (this.nativeDraggable && w(h, "dragend", this), Et(h), h.style["will-change"] = "", Re && !Se && P(h, j ? j.options.ghostClass : this.options.ghostClass, !1), P(h, this.options.chosenClass, !1), Z({
|
|
1464
|
+
sortable: this,
|
|
1465
|
+
name: "unchoose",
|
|
1466
|
+
toEl: N,
|
|
1467
|
+
newIndex: null,
|
|
1468
|
+
newDraggableIndex: null,
|
|
1469
|
+
originalEvent: t
|
|
1470
|
+
}), I !== N ? (K >= 0 && (Z({
|
|
1471
|
+
rootEl: N,
|
|
1472
|
+
name: "add",
|
|
1473
|
+
toEl: N,
|
|
1474
|
+
fromEl: I,
|
|
1475
|
+
originalEvent: t
|
|
1476
|
+
}), Z({
|
|
1477
|
+
sortable: this,
|
|
1478
|
+
name: "remove",
|
|
1479
|
+
toEl: N,
|
|
1480
|
+
originalEvent: t
|
|
1481
|
+
}), Z({
|
|
1482
|
+
rootEl: N,
|
|
1483
|
+
name: "sort",
|
|
1484
|
+
toEl: N,
|
|
1485
|
+
fromEl: I,
|
|
1486
|
+
originalEvent: t
|
|
1487
|
+
}), Z({
|
|
1488
|
+
sortable: this,
|
|
1489
|
+
name: "sort",
|
|
1490
|
+
toEl: N,
|
|
1491
|
+
originalEvent: t
|
|
1492
|
+
})), j && j.save()) : K !== Oe && K >= 0 && (Z({
|
|
1493
|
+
sortable: this,
|
|
1494
|
+
name: "update",
|
|
1495
|
+
toEl: N,
|
|
1496
|
+
originalEvent: t
|
|
1497
|
+
}), Z({
|
|
1498
|
+
sortable: this,
|
|
1499
|
+
name: "sort",
|
|
1500
|
+
toEl: N,
|
|
1501
|
+
originalEvent: t
|
|
1502
|
+
})), g.active && ((K == null || K === -1) && (K = Oe, ue = Ze), Z({
|
|
1503
|
+
sortable: this,
|
|
1504
|
+
name: "end",
|
|
1505
|
+
toEl: N,
|
|
1506
|
+
originalEvent: t
|
|
1507
|
+
}), this.save()))), this._nulling();
|
|
1508
|
+
},
|
|
1509
|
+
_nulling: function() {
|
|
1510
|
+
G("nulling", this), I = h = N = C = _e = H = it = he = ge = te = Re = K = ue = Oe = Ze = Ee = Ve = j = Xe = g.dragged = g.ghost = g.clone = g.active = null, ft.forEach(function(t) {
|
|
1511
|
+
t.checked = !0;
|
|
1512
|
+
}), ft.length = kt = wt = 0;
|
|
1513
|
+
},
|
|
1514
|
+
handleEvent: function(t) {
|
|
1515
|
+
switch (t.type) {
|
|
1516
|
+
case "drop":
|
|
1517
|
+
case "dragend":
|
|
1518
|
+
this._onDrop(t);
|
|
1519
|
+
break;
|
|
1520
|
+
case "dragenter":
|
|
1521
|
+
case "dragover":
|
|
1522
|
+
h && (this._onDragOver(t), pi(t));
|
|
1523
|
+
break;
|
|
1524
|
+
case "selectstart":
|
|
1525
|
+
t.preventDefault();
|
|
1526
|
+
break;
|
|
1527
|
+
}
|
|
1528
|
+
},
|
|
1529
|
+
/**
|
|
1530
|
+
* Serializes the item into an array of string.
|
|
1531
|
+
* @returns {String[]}
|
|
1532
|
+
*/
|
|
1533
|
+
toArray: function() {
|
|
1534
|
+
for (var t = [], n, a = this.el.children, o = 0, i = a.length, r = this.options; o < i; o++)
|
|
1535
|
+
n = a[o], Q(n, r.draggable, this.el, !1) && t.push(n.getAttribute(r.dataIdAttr) || gi(n));
|
|
1536
|
+
return t;
|
|
1537
|
+
},
|
|
1538
|
+
/**
|
|
1539
|
+
* Sorts the elements according to the array.
|
|
1540
|
+
* @param {String[]} order order of the items
|
|
1541
|
+
*/
|
|
1542
|
+
sort: function(t, n) {
|
|
1543
|
+
var a = {}, o = this.el;
|
|
1544
|
+
this.toArray().forEach(function(i, r) {
|
|
1545
|
+
var l = o.children[r];
|
|
1546
|
+
Q(l, this.options.draggable, o, !1) && (a[i] = l);
|
|
1547
|
+
}, this), n && this.captureAnimationState(), t.forEach(function(i) {
|
|
1548
|
+
a[i] && (o.removeChild(a[i]), o.appendChild(a[i]));
|
|
1549
|
+
}), n && this.animateAll();
|
|
1550
|
+
},
|
|
1551
|
+
/**
|
|
1552
|
+
* Save the current sorting
|
|
1553
|
+
*/
|
|
1554
|
+
save: function() {
|
|
1555
|
+
var t = this.options.store;
|
|
1556
|
+
t && t.set && t.set(this);
|
|
1557
|
+
},
|
|
1558
|
+
/**
|
|
1559
|
+
* For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
|
|
1560
|
+
* @param {HTMLElement} el
|
|
1561
|
+
* @param {String} [selector] default: `options.draggable`
|
|
1562
|
+
* @returns {HTMLElement|null}
|
|
1563
|
+
*/
|
|
1564
|
+
closest: function(t, n) {
|
|
1565
|
+
return Q(t, n || this.options.draggable, this.el, !1);
|
|
1566
|
+
},
|
|
1567
|
+
/**
|
|
1568
|
+
* Set/get option
|
|
1569
|
+
* @param {string} name
|
|
1570
|
+
* @param {*} [value]
|
|
1571
|
+
* @returns {*}
|
|
1572
|
+
*/
|
|
1573
|
+
option: function(t, n) {
|
|
1574
|
+
var a = this.options;
|
|
1575
|
+
if (n === void 0)
|
|
1576
|
+
return a[t];
|
|
1577
|
+
var o = qe.modifyOption(this, t, n);
|
|
1578
|
+
typeof o < "u" ? a[t] = o : a[t] = n, t === "group" && Pn(a);
|
|
1579
|
+
},
|
|
1580
|
+
/**
|
|
1581
|
+
* Destroy
|
|
1582
|
+
*/
|
|
1583
|
+
destroy: function() {
|
|
1584
|
+
G("destroy", this);
|
|
1585
|
+
var t = this.el;
|
|
1586
|
+
t[W] = null, w(t, "mousedown", this._onTapStart), w(t, "touchstart", this._onTapStart), w(t, "pointerdown", this._onTapStart), this.nativeDraggable && (w(t, "dragover", this), w(t, "dragenter", this)), Array.prototype.forEach.call(t.querySelectorAll("[draggable]"), function(n) {
|
|
1587
|
+
n.removeAttribute("draggable");
|
|
1588
|
+
}), this._onDrop(), this._disableDelayedDragEvents(), ct.splice(ct.indexOf(this.el), 1), this.el = t = null;
|
|
1589
|
+
},
|
|
1590
|
+
_hideClone: function() {
|
|
1591
|
+
if (!he) {
|
|
1592
|
+
if (G("hideClone", this), g.eventCanceled)
|
|
1593
|
+
return;
|
|
1594
|
+
m(H, "display", "none"), this.options.removeCloneOnHide && H.parentNode && H.parentNode.removeChild(H), he = !0;
|
|
1595
|
+
}
|
|
1596
|
+
},
|
|
1597
|
+
_showClone: function(t) {
|
|
1598
|
+
if (t.lastPutMode !== "clone") {
|
|
1599
|
+
this._hideClone();
|
|
1600
|
+
return;
|
|
1601
|
+
}
|
|
1602
|
+
if (he) {
|
|
1603
|
+
if (G("showClone", this), g.eventCanceled)
|
|
1604
|
+
return;
|
|
1605
|
+
h.parentNode == I && !this.options.group.revertClone ? I.insertBefore(H, h) : _e ? I.insertBefore(H, _e) : I.appendChild(H), this.options.group.revertClone && this.animate(h, H), m(H, "display", ""), he = !1;
|
|
1606
|
+
}
|
|
1607
|
+
}
|
|
1608
|
+
};
|
|
1609
|
+
function pi(e) {
|
|
1610
|
+
e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
|
|
1611
|
+
}
|
|
1612
|
+
function Qe(e, t, n, a, o, i, r, l) {
|
|
1613
|
+
var c, f = e[W], p = f.options.onMove, u;
|
|
1614
|
+
return window.CustomEvent && !de && !Ge ? c = new CustomEvent("move", {
|
|
1615
|
+
bubbles: !0,
|
|
1616
|
+
cancelable: !0
|
|
1617
|
+
}) : (c = document.createEvent("Event"), c.initEvent("move", !0, !0)), c.to = t, c.from = e, c.dragged = n, c.draggedRect = a, c.related = o || t, c.relatedRect = i || T(t), c.willInsertAfter = l, c.originalEvent = r, e.dispatchEvent(c), p && (u = p.call(f, c, r)), u;
|
|
1618
|
+
}
|
|
1619
|
+
function Et(e) {
|
|
1620
|
+
e.draggable = !1;
|
|
1621
|
+
}
|
|
1622
|
+
function ui() {
|
|
1623
|
+
qt = !1;
|
|
1624
|
+
}
|
|
1625
|
+
function hi(e, t, n) {
|
|
1626
|
+
var a = T(Te(n.el, 0, n.options, !0)), o = Tn(n.el, n.options, C), i = 10;
|
|
1627
|
+
return t ? e.clientX < o.left - i || e.clientY < a.top && e.clientX < a.right : e.clientY < o.top - i || e.clientY < a.bottom && e.clientX < a.left;
|
|
1628
|
+
}
|
|
1629
|
+
function bi(e, t, n) {
|
|
1630
|
+
var a = T(Jt(n.el, n.options.draggable)), o = Tn(n.el, n.options, C), i = 10;
|
|
1631
|
+
return t ? e.clientX > o.right + i || e.clientY > a.bottom && e.clientX > a.left : e.clientY > o.bottom + i || e.clientX > a.right && e.clientY > a.top;
|
|
1632
|
+
}
|
|
1633
|
+
function mi(e, t, n, a, o, i, r, l) {
|
|
1634
|
+
var c = a ? e.clientY : e.clientX, f = a ? n.height : n.width, p = a ? n.top : n.left, u = a ? n.bottom : n.right, b = !1;
|
|
1635
|
+
if (!r) {
|
|
1636
|
+
if (l && ot < f * o) {
|
|
1637
|
+
if (!Ue && (Ve === 1 ? c > p + f * i / 2 : c < u - f * i / 2) && (Ue = !0), Ue)
|
|
1638
|
+
b = !0;
|
|
1639
|
+
else if (Ve === 1 ? c < p + ot : c > u - ot)
|
|
1640
|
+
return -Ve;
|
|
1641
|
+
} else if (c > p + f * (1 - o) / 2 && c < u - f * (1 - o) / 2)
|
|
1642
|
+
return yi(t);
|
|
1643
|
+
}
|
|
1644
|
+
return b = b || r, b && (c < p + f * i / 2 || c > u - f * i / 2) ? c > p + f / 2 ? 1 : -1 : 0;
|
|
1645
|
+
}
|
|
1646
|
+
function yi(e) {
|
|
1647
|
+
return A(h) < A(e) ? 1 : -1;
|
|
1648
|
+
}
|
|
1649
|
+
function gi(e) {
|
|
1650
|
+
for (var t = e.tagName + e.className + e.src + e.href + e.textContent, n = t.length, a = 0; n--; )
|
|
1651
|
+
a += t.charCodeAt(n);
|
|
1652
|
+
return a.toString(36);
|
|
1653
|
+
}
|
|
1654
|
+
function vi(e) {
|
|
1655
|
+
ft.length = 0;
|
|
1656
|
+
for (var t = e.getElementsByTagName("input"), n = t.length; n--; ) {
|
|
1657
|
+
var a = t[n];
|
|
1658
|
+
a.checked && ft.push(a);
|
|
1659
|
+
}
|
|
1660
|
+
}
|
|
1661
|
+
function st(e) {
|
|
1662
|
+
return setTimeout(e, 0);
|
|
1663
|
+
}
|
|
1664
|
+
function Yt(e) {
|
|
1665
|
+
return clearTimeout(e);
|
|
1666
|
+
}
|
|
1667
|
+
ht && x(document, "touchmove", function(e) {
|
|
1668
|
+
(g.active || Se) && e.cancelable && e.preventDefault();
|
|
1669
|
+
});
|
|
1670
|
+
g.utils = {
|
|
1671
|
+
on: x,
|
|
1672
|
+
off: w,
|
|
1673
|
+
css: m,
|
|
1674
|
+
find: Dn,
|
|
1675
|
+
is: function(t, n) {
|
|
1676
|
+
return !!Q(t, n, t, !1);
|
|
1677
|
+
},
|
|
1678
|
+
extend: ni,
|
|
1679
|
+
throttle: Sn,
|
|
1680
|
+
closest: Q,
|
|
1681
|
+
toggleClass: P,
|
|
1682
|
+
clone: Qt,
|
|
1683
|
+
index: A,
|
|
1684
|
+
nextTick: st,
|
|
1685
|
+
cancelNextTick: Yt,
|
|
1686
|
+
detectDirection: Hn,
|
|
1687
|
+
getChild: Te
|
|
1688
|
+
};
|
|
1689
|
+
g.get = function(e) {
|
|
1690
|
+
return e[W];
|
|
1691
|
+
};
|
|
1692
|
+
g.mount = function() {
|
|
1693
|
+
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
|
|
1694
|
+
t[n] = arguments[n];
|
|
1695
|
+
t[0].constructor === Array && (t = t[0]), t.forEach(function(a) {
|
|
1696
|
+
if (!a.prototype || !a.prototype.constructor)
|
|
1697
|
+
throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(a));
|
|
1698
|
+
a.utils && (g.utils = se(se({}, g.utils), a.utils)), qe.mount(a);
|
|
1699
|
+
});
|
|
1700
|
+
};
|
|
1701
|
+
g.create = function(e, t) {
|
|
1702
|
+
return new g(e, t);
|
|
1703
|
+
};
|
|
1704
|
+
g.version = Qa;
|
|
1705
|
+
var L = [], ze, Xt, Kt = !1, Dt, St, pt, je;
|
|
1706
|
+
function _i() {
|
|
1707
|
+
function e() {
|
|
1708
|
+
this.defaults = {
|
|
1709
|
+
scroll: !0,
|
|
1710
|
+
forceAutoScrollFallback: !1,
|
|
1711
|
+
scrollSensitivity: 30,
|
|
1712
|
+
scrollSpeed: 10,
|
|
1713
|
+
bubbleScroll: !0
|
|
1714
|
+
};
|
|
1715
|
+
for (var t in this)
|
|
1716
|
+
t.charAt(0) === "_" && typeof this[t] == "function" && (this[t] = this[t].bind(this));
|
|
1717
|
+
}
|
|
1718
|
+
return e.prototype = {
|
|
1719
|
+
dragStarted: function(n) {
|
|
1720
|
+
var a = n.originalEvent;
|
|
1721
|
+
this.sortable.nativeDraggable ? x(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? x(document, "pointermove", this._handleFallbackAutoScroll) : a.touches ? x(document, "touchmove", this._handleFallbackAutoScroll) : x(document, "mousemove", this._handleFallbackAutoScroll);
|
|
1722
|
+
},
|
|
1723
|
+
dragOverCompleted: function(n) {
|
|
1724
|
+
var a = n.originalEvent;
|
|
1725
|
+
!this.options.dragOverBubble && !a.rootEl && this._handleAutoScroll(a);
|
|
1726
|
+
},
|
|
1727
|
+
drop: function() {
|
|
1728
|
+
this.sortable.nativeDraggable ? w(document, "dragover", this._handleAutoScroll) : (w(document, "pointermove", this._handleFallbackAutoScroll), w(document, "touchmove", this._handleFallbackAutoScroll), w(document, "mousemove", this._handleFallbackAutoScroll)), yn(), rt(), ai();
|
|
1729
|
+
},
|
|
1730
|
+
nulling: function() {
|
|
1731
|
+
pt = Xt = ze = Kt = je = Dt = St = null, L.length = 0;
|
|
1732
|
+
},
|
|
1733
|
+
_handleFallbackAutoScroll: function(n) {
|
|
1734
|
+
this._handleAutoScroll(n, !0);
|
|
1735
|
+
},
|
|
1736
|
+
_handleAutoScroll: function(n, a) {
|
|
1737
|
+
var o = this, i = (n.touches ? n.touches[0] : n).clientX, r = (n.touches ? n.touches[0] : n).clientY, l = document.elementFromPoint(i, r);
|
|
1738
|
+
if (pt = n, a || this.options.forceAutoScrollFallback || Ge || de || Be) {
|
|
1739
|
+
Ot(n, this.options, l, a);
|
|
1740
|
+
var c = be(l, !0);
|
|
1741
|
+
Kt && (!je || i !== Dt || r !== St) && (je && yn(), je = setInterval(function() {
|
|
1742
|
+
var f = be(document.elementFromPoint(i, r), !0);
|
|
1743
|
+
f !== c && (c = f, rt()), Ot(n, o.options, f, a);
|
|
1744
|
+
}, 10), Dt = i, St = r);
|
|
1745
|
+
} else {
|
|
1746
|
+
if (!this.options.bubbleScroll || be(l, !0) === oe()) {
|
|
1747
|
+
rt();
|
|
1748
|
+
return;
|
|
1749
|
+
}
|
|
1750
|
+
Ot(n, this.options, be(l, !1), !1);
|
|
1751
|
+
}
|
|
1752
|
+
}
|
|
1753
|
+
}, ee(e, {
|
|
1754
|
+
pluginName: "scroll",
|
|
1755
|
+
initializeByDefault: !0
|
|
1756
|
+
});
|
|
1757
|
+
}
|
|
1758
|
+
function rt() {
|
|
1759
|
+
L.forEach(function(e) {
|
|
1760
|
+
clearInterval(e.pid);
|
|
1761
|
+
}), L = [];
|
|
1762
|
+
}
|
|
1763
|
+
function yn() {
|
|
1764
|
+
clearInterval(je);
|
|
1765
|
+
}
|
|
1766
|
+
var Ot = Sn(function(e, t, n, a) {
|
|
1767
|
+
if (t.scroll) {
|
|
1768
|
+
var o = (e.touches ? e.touches[0] : e).clientX, i = (e.touches ? e.touches[0] : e).clientY, r = t.scrollSensitivity, l = t.scrollSpeed, c = oe(), f = !1, p;
|
|
1769
|
+
Xt !== n && (Xt = n, rt(), ze = t.scroll, p = t.scrollFn, ze === !0 && (ze = be(n, !0)));
|
|
1770
|
+
var u = 0, b = ze;
|
|
1771
|
+
do {
|
|
1772
|
+
var v = b, y = T(v), k = y.top, S = y.bottom, V = y.left, z = y.right, U = y.width, D = y.height, ae = void 0, ie = void 0, me = v.scrollWidth, Ie = v.scrollHeight, Y = m(v), He = v.scrollLeft, ce = v.scrollTop;
|
|
1773
|
+
v === c ? (ae = U < me && (Y.overflowX === "auto" || Y.overflowX === "scroll" || Y.overflowX === "visible"), ie = D < Ie && (Y.overflowY === "auto" || Y.overflowY === "scroll" || Y.overflowY === "visible")) : (ae = U < me && (Y.overflowX === "auto" || Y.overflowX === "scroll"), ie = D < Ie && (Y.overflowY === "auto" || Y.overflowY === "scroll"));
|
|
1774
|
+
var Pe = ae && (Math.abs(z - o) <= r && He + U < me) - (Math.abs(V - o) <= r && !!He), re = ie && (Math.abs(S - i) <= r && ce + D < Ie) - (Math.abs(k - i) <= r && !!ce);
|
|
1775
|
+
if (!L[u])
|
|
1776
|
+
for (var ye = 0; ye <= u; ye++)
|
|
1777
|
+
L[ye] || (L[ye] = {});
|
|
1778
|
+
(L[u].vx != Pe || L[u].vy != re || L[u].el !== v) && (L[u].el = v, L[u].vx = Pe, L[u].vy = re, clearInterval(L[u].pid), (Pe != 0 || re != 0) && (f = !0, L[u].pid = setInterval((function() {
|
|
1779
|
+
a && this.layer === 0 && g.active._onTouchMove(pt);
|
|
1780
|
+
var Ne = L[this.layer].vy ? L[this.layer].vy * l : 0, fe = L[this.layer].vx ? L[this.layer].vx * l : 0;
|
|
1781
|
+
typeof p == "function" && p.call(g.dragged.parentNode[W], fe, Ne, e, pt, L[this.layer].el) !== "continue" || On(L[this.layer].el, fe, Ne);
|
|
1782
|
+
}).bind({
|
|
1783
|
+
layer: u
|
|
1784
|
+
}), 24))), u++;
|
|
1785
|
+
} while (t.bubbleScroll && b !== c && (b = be(b, !1)));
|
|
1786
|
+
Kt = f;
|
|
1787
|
+
}
|
|
1788
|
+
}, 30), $n = function(t) {
|
|
1789
|
+
var n = t.originalEvent, a = t.putSortable, o = t.dragEl, i = t.activeSortable, r = t.dispatchSortableEvent, l = t.hideGhostForTarget, c = t.unhideGhostForTarget;
|
|
1790
|
+
if (n) {
|
|
1791
|
+
var f = a || i;
|
|
1792
|
+
l();
|
|
1793
|
+
var p = n.changedTouches && n.changedTouches.length ? n.changedTouches[0] : n, u = document.elementFromPoint(p.clientX, p.clientY);
|
|
1794
|
+
c(), f && !f.el.contains(u) && (r("spill"), this.onSpill({
|
|
1795
|
+
dragEl: o,
|
|
1796
|
+
putSortable: a
|
|
1797
|
+
}));
|
|
1798
|
+
}
|
|
1799
|
+
};
|
|
1800
|
+
function en() {
|
|
1801
|
+
}
|
|
1802
|
+
en.prototype = {
|
|
1803
|
+
startIndex: null,
|
|
1804
|
+
dragStart: function(t) {
|
|
1805
|
+
var n = t.oldDraggableIndex;
|
|
1806
|
+
this.startIndex = n;
|
|
1807
|
+
},
|
|
1808
|
+
onSpill: function(t) {
|
|
1809
|
+
var n = t.dragEl, a = t.putSortable;
|
|
1810
|
+
this.sortable.captureAnimationState(), a && a.captureAnimationState();
|
|
1811
|
+
var o = Te(this.sortable.el, this.startIndex, this.options);
|
|
1812
|
+
o ? this.sortable.el.insertBefore(n, o) : this.sortable.el.appendChild(n), this.sortable.animateAll(), a && a.animateAll();
|
|
1813
|
+
},
|
|
1814
|
+
drop: $n
|
|
1815
|
+
};
|
|
1816
|
+
ee(en, {
|
|
1817
|
+
pluginName: "revertOnSpill"
|
|
1818
|
+
});
|
|
1819
|
+
function tn() {
|
|
1820
|
+
}
|
|
1821
|
+
tn.prototype = {
|
|
1822
|
+
onSpill: function(t) {
|
|
1823
|
+
var n = t.dragEl, a = t.putSortable, o = a || this.sortable;
|
|
1824
|
+
o.captureAnimationState(), n.parentNode && n.parentNode.removeChild(n), o.animateAll();
|
|
1825
|
+
},
|
|
1826
|
+
drop: $n
|
|
1827
|
+
};
|
|
1828
|
+
ee(tn, {
|
|
1829
|
+
pluginName: "removeOnSpill"
|
|
1830
|
+
});
|
|
1831
|
+
var J;
|
|
1832
|
+
function Ci() {
|
|
1833
|
+
function e() {
|
|
1834
|
+
this.defaults = {
|
|
1835
|
+
swapClass: "sortable-swap-highlight"
|
|
1836
|
+
};
|
|
1837
|
+
}
|
|
1838
|
+
return e.prototype = {
|
|
1839
|
+
dragStart: function(n) {
|
|
1840
|
+
var a = n.dragEl;
|
|
1841
|
+
J = a;
|
|
1842
|
+
},
|
|
1843
|
+
dragOverValid: function(n) {
|
|
1844
|
+
var a = n.completed, o = n.target, i = n.onMove, r = n.activeSortable, l = n.changed, c = n.cancel;
|
|
1845
|
+
if (r.options.swap) {
|
|
1846
|
+
var f = this.sortable.el, p = this.options;
|
|
1847
|
+
if (o && o !== f) {
|
|
1848
|
+
var u = J;
|
|
1849
|
+
i(o) !== !1 ? (P(o, p.swapClass, !0), J = o) : J = null, u && u !== J && P(u, p.swapClass, !1);
|
|
1850
|
+
}
|
|
1851
|
+
l(), a(!0), c();
|
|
1852
|
+
}
|
|
1853
|
+
},
|
|
1854
|
+
drop: function(n) {
|
|
1855
|
+
var a = n.activeSortable, o = n.putSortable, i = n.dragEl, r = o || this.sortable, l = this.options;
|
|
1856
|
+
J && P(J, l.swapClass, !1), J && (l.swap || o && o.options.swap) && i !== J && (r.captureAnimationState(), r !== a && a.captureAnimationState(), ki(i, J), r.animateAll(), r !== a && a.animateAll());
|
|
1857
|
+
},
|
|
1858
|
+
nulling: function() {
|
|
1859
|
+
J = null;
|
|
1860
|
+
}
|
|
1861
|
+
}, ee(e, {
|
|
1862
|
+
pluginName: "swap",
|
|
1863
|
+
eventProperties: function() {
|
|
1864
|
+
return {
|
|
1865
|
+
swapItem: J
|
|
1866
|
+
};
|
|
1867
|
+
}
|
|
1868
|
+
});
|
|
1869
|
+
}
|
|
1870
|
+
function ki(e, t) {
|
|
1871
|
+
var n = e.parentNode, a = t.parentNode, o, i;
|
|
1872
|
+
!n || !a || n.isEqualNode(t) || a.isEqualNode(e) || (o = A(e), i = A(t), n.isEqualNode(a) && o < i && i++, n.insertBefore(t, n.children[o]), a.insertBefore(e, a.children[i]));
|
|
1873
|
+
}
|
|
1874
|
+
var _ = [], X = [], $e, ne, Fe = !1, q = !1, De = !1, O, Me, et;
|
|
1875
|
+
function wi() {
|
|
1876
|
+
function e(t) {
|
|
1877
|
+
for (var n in this)
|
|
1878
|
+
n.charAt(0) === "_" && typeof this[n] == "function" && (this[n] = this[n].bind(this));
|
|
1879
|
+
t.options.avoidImplicitDeselect || (t.options.supportPointer ? x(document, "pointerup", this._deselectMultiDrag) : (x(document, "mouseup", this._deselectMultiDrag), x(document, "touchend", this._deselectMultiDrag))), x(document, "keydown", this._checkKeyDown), x(document, "keyup", this._checkKeyUp), this.defaults = {
|
|
1880
|
+
selectedClass: "sortable-selected",
|
|
1881
|
+
multiDragKey: null,
|
|
1882
|
+
avoidImplicitDeselect: !1,
|
|
1883
|
+
setData: function(o, i) {
|
|
1884
|
+
var r = "";
|
|
1885
|
+
_.length && ne === t ? _.forEach(function(l, c) {
|
|
1886
|
+
r += (c ? ", " : "") + l.textContent;
|
|
1887
|
+
}) : r = i.textContent, o.setData("Text", r);
|
|
1888
|
+
}
|
|
1889
|
+
};
|
|
1890
|
+
}
|
|
1891
|
+
return e.prototype = {
|
|
1892
|
+
multiDragKeyDown: !1,
|
|
1893
|
+
isMultiDrag: !1,
|
|
1894
|
+
delayStartGlobal: function(n) {
|
|
1895
|
+
var a = n.dragEl;
|
|
1896
|
+
O = a;
|
|
1897
|
+
},
|
|
1898
|
+
delayEnded: function() {
|
|
1899
|
+
this.isMultiDrag = ~_.indexOf(O);
|
|
1900
|
+
},
|
|
1901
|
+
setupClone: function(n) {
|
|
1902
|
+
var a = n.sortable, o = n.cancel;
|
|
1903
|
+
if (this.isMultiDrag) {
|
|
1904
|
+
for (var i = 0; i < _.length; i++)
|
|
1905
|
+
X.push(Qt(_[i])), X[i].sortableIndex = _[i].sortableIndex, X[i].draggable = !1, X[i].style["will-change"] = "", P(X[i], this.options.selectedClass, !1), _[i] === O && P(X[i], this.options.chosenClass, !1);
|
|
1906
|
+
a._hideClone(), o();
|
|
1907
|
+
}
|
|
1908
|
+
},
|
|
1909
|
+
clone: function(n) {
|
|
1910
|
+
var a = n.sortable, o = n.rootEl, i = n.dispatchSortableEvent, r = n.cancel;
|
|
1911
|
+
this.isMultiDrag && (this.options.removeCloneOnHide || _.length && ne === a && (gn(!0, o), i("clone"), r()));
|
|
1912
|
+
},
|
|
1913
|
+
showClone: function(n) {
|
|
1914
|
+
var a = n.cloneNowShown, o = n.rootEl, i = n.cancel;
|
|
1915
|
+
this.isMultiDrag && (gn(!1, o), X.forEach(function(r) {
|
|
1916
|
+
m(r, "display", "");
|
|
1917
|
+
}), a(), et = !1, i());
|
|
1918
|
+
},
|
|
1919
|
+
hideClone: function(n) {
|
|
1920
|
+
var a = this, o = n.cloneNowHidden, i = n.cancel;
|
|
1921
|
+
this.isMultiDrag && (X.forEach(function(r) {
|
|
1922
|
+
m(r, "display", "none"), a.options.removeCloneOnHide && r.parentNode && r.parentNode.removeChild(r);
|
|
1923
|
+
}), o(), et = !0, i());
|
|
1924
|
+
},
|
|
1925
|
+
dragStartGlobal: function(n) {
|
|
1926
|
+
!this.isMultiDrag && ne && ne.multiDrag._deselectMultiDrag(), _.forEach(function(a) {
|
|
1927
|
+
a.sortableIndex = A(a);
|
|
1928
|
+
}), _ = _.sort(function(a, o) {
|
|
1929
|
+
return a.sortableIndex - o.sortableIndex;
|
|
1930
|
+
}), De = !0;
|
|
1931
|
+
},
|
|
1932
|
+
dragStarted: function(n) {
|
|
1933
|
+
var a = this, o = n.sortable;
|
|
1934
|
+
if (this.isMultiDrag) {
|
|
1935
|
+
if (this.options.sort && (o.captureAnimationState(), this.options.animation)) {
|
|
1936
|
+
_.forEach(function(r) {
|
|
1937
|
+
r !== O && m(r, "position", "absolute");
|
|
1938
|
+
});
|
|
1939
|
+
var i = T(O, !1, !0, !0);
|
|
1940
|
+
_.forEach(function(r) {
|
|
1941
|
+
r !== O && un(r, i);
|
|
1942
|
+
}), q = !0, Fe = !0;
|
|
1943
|
+
}
|
|
1944
|
+
o.animateAll(function() {
|
|
1945
|
+
q = !1, Fe = !1, a.options.animation && _.forEach(function(r) {
|
|
1946
|
+
_t(r);
|
|
1947
|
+
}), a.options.sort && tt();
|
|
1948
|
+
});
|
|
1949
|
+
}
|
|
1950
|
+
},
|
|
1951
|
+
dragOver: function(n) {
|
|
1952
|
+
var a = n.target, o = n.completed, i = n.cancel;
|
|
1953
|
+
q && ~_.indexOf(a) && (o(!1), i());
|
|
1954
|
+
},
|
|
1955
|
+
revert: function(n) {
|
|
1956
|
+
var a = n.fromSortable, o = n.rootEl, i = n.sortable, r = n.dragRect;
|
|
1957
|
+
_.length > 1 && (_.forEach(function(l) {
|
|
1958
|
+
i.addAnimationState({
|
|
1959
|
+
target: l,
|
|
1960
|
+
rect: q ? T(l) : r
|
|
1961
|
+
}), _t(l), l.fromRect = r, a.removeAnimationState(l);
|
|
1962
|
+
}), q = !1, xi(!this.options.removeCloneOnHide, o));
|
|
1963
|
+
},
|
|
1964
|
+
dragOverCompleted: function(n) {
|
|
1965
|
+
var a = n.sortable, o = n.isOwner, i = n.insertion, r = n.activeSortable, l = n.parentEl, c = n.putSortable, f = this.options;
|
|
1966
|
+
if (i) {
|
|
1967
|
+
if (o && r._hideClone(), Fe = !1, f.animation && _.length > 1 && (q || !o && !r.options.sort && !c)) {
|
|
1968
|
+
var p = T(O, !1, !0, !0);
|
|
1969
|
+
_.forEach(function(b) {
|
|
1970
|
+
b !== O && (un(b, p), l.appendChild(b));
|
|
1971
|
+
}), q = !0;
|
|
1972
|
+
}
|
|
1973
|
+
if (!o)
|
|
1974
|
+
if (q || tt(), _.length > 1) {
|
|
1975
|
+
var u = et;
|
|
1976
|
+
r._showClone(a), r.options.animation && !et && u && X.forEach(function(b) {
|
|
1977
|
+
r.addAnimationState({
|
|
1978
|
+
target: b,
|
|
1979
|
+
rect: Me
|
|
1980
|
+
}), b.fromRect = Me, b.thisAnimationDuration = null;
|
|
1981
|
+
});
|
|
1982
|
+
} else
|
|
1983
|
+
r._showClone(a);
|
|
1984
|
+
}
|
|
1985
|
+
},
|
|
1986
|
+
dragOverAnimationCapture: function(n) {
|
|
1987
|
+
var a = n.dragRect, o = n.isOwner, i = n.activeSortable;
|
|
1988
|
+
if (_.forEach(function(l) {
|
|
1989
|
+
l.thisAnimationDuration = null;
|
|
1990
|
+
}), i.options.animation && !o && i.multiDrag.isMultiDrag) {
|
|
1991
|
+
Me = ee({}, a);
|
|
1992
|
+
var r = Ce(O, !0);
|
|
1993
|
+
Me.top -= r.f, Me.left -= r.e;
|
|
1994
|
+
}
|
|
1995
|
+
},
|
|
1996
|
+
dragOverAnimationComplete: function() {
|
|
1997
|
+
q && (q = !1, tt());
|
|
1998
|
+
},
|
|
1999
|
+
drop: function(n) {
|
|
2000
|
+
var a = n.originalEvent, o = n.rootEl, i = n.parentEl, r = n.sortable, l = n.dispatchSortableEvent, c = n.oldIndex, f = n.putSortable, p = f || this.sortable;
|
|
2001
|
+
if (a) {
|
|
2002
|
+
var u = this.options, b = i.children;
|
|
2003
|
+
if (!De)
|
|
2004
|
+
if (u.multiDragKey && !this.multiDragKeyDown && this._deselectMultiDrag(), P(O, u.selectedClass, !~_.indexOf(O)), ~_.indexOf(O))
|
|
2005
|
+
_.splice(_.indexOf(O), 1), $e = null, Le({
|
|
2006
|
+
sortable: r,
|
|
2007
|
+
rootEl: o,
|
|
2008
|
+
name: "deselect",
|
|
2009
|
+
targetEl: O,
|
|
2010
|
+
originalEvent: a
|
|
2011
|
+
});
|
|
2012
|
+
else {
|
|
2013
|
+
if (_.push(O), Le({
|
|
2014
|
+
sortable: r,
|
|
2015
|
+
rootEl: o,
|
|
2016
|
+
name: "select",
|
|
2017
|
+
targetEl: O,
|
|
2018
|
+
originalEvent: a
|
|
2019
|
+
}), a.shiftKey && $e && r.el.contains($e)) {
|
|
2020
|
+
var v = A($e), y = A(O);
|
|
2021
|
+
if (~v && ~y && v !== y) {
|
|
2022
|
+
var k, S;
|
|
2023
|
+
for (y > v ? (S = v, k = y) : (S = y, k = v + 1); S < k; S++)
|
|
2024
|
+
~_.indexOf(b[S]) || (P(b[S], u.selectedClass, !0), _.push(b[S]), Le({
|
|
2025
|
+
sortable: r,
|
|
2026
|
+
rootEl: o,
|
|
2027
|
+
name: "select",
|
|
2028
|
+
targetEl: b[S],
|
|
2029
|
+
originalEvent: a
|
|
2030
|
+
}));
|
|
2031
|
+
}
|
|
2032
|
+
} else
|
|
2033
|
+
$e = O;
|
|
2034
|
+
ne = p;
|
|
2035
|
+
}
|
|
2036
|
+
if (De && this.isMultiDrag) {
|
|
2037
|
+
if (q = !1, (i[W].options.sort || i !== o) && _.length > 1) {
|
|
2038
|
+
var V = T(O), z = A(O, ":not(." + this.options.selectedClass + ")");
|
|
2039
|
+
if (!Fe && u.animation && (O.thisAnimationDuration = null), p.captureAnimationState(), !Fe && (u.animation && (O.fromRect = V, _.forEach(function(D) {
|
|
2040
|
+
if (D.thisAnimationDuration = null, D !== O) {
|
|
2041
|
+
var ae = q ? T(D) : V;
|
|
2042
|
+
D.fromRect = ae, p.addAnimationState({
|
|
2043
|
+
target: D,
|
|
2044
|
+
rect: ae
|
|
2045
|
+
});
|
|
2046
|
+
}
|
|
2047
|
+
})), tt(), _.forEach(function(D) {
|
|
2048
|
+
b[z] ? i.insertBefore(D, b[z]) : i.appendChild(D), z++;
|
|
2049
|
+
}), c === A(O))) {
|
|
2050
|
+
var U = !1;
|
|
2051
|
+
_.forEach(function(D) {
|
|
2052
|
+
if (D.sortableIndex !== A(D)) {
|
|
2053
|
+
U = !0;
|
|
2054
|
+
return;
|
|
2055
|
+
}
|
|
2056
|
+
}), U && (l("update"), l("sort"));
|
|
2057
|
+
}
|
|
2058
|
+
_.forEach(function(D) {
|
|
2059
|
+
_t(D);
|
|
2060
|
+
}), p.animateAll();
|
|
2061
|
+
}
|
|
2062
|
+
ne = p;
|
|
2063
|
+
}
|
|
2064
|
+
(o === i || f && f.lastPutMode !== "clone") && X.forEach(function(D) {
|
|
2065
|
+
D.parentNode && D.parentNode.removeChild(D);
|
|
2066
|
+
});
|
|
2067
|
+
}
|
|
2068
|
+
},
|
|
2069
|
+
nullingGlobal: function() {
|
|
2070
|
+
this.isMultiDrag = De = !1, X.length = 0;
|
|
2071
|
+
},
|
|
2072
|
+
destroyGlobal: function() {
|
|
2073
|
+
this._deselectMultiDrag(), w(document, "pointerup", this._deselectMultiDrag), w(document, "mouseup", this._deselectMultiDrag), w(document, "touchend", this._deselectMultiDrag), w(document, "keydown", this._checkKeyDown), w(document, "keyup", this._checkKeyUp);
|
|
2074
|
+
},
|
|
2075
|
+
_deselectMultiDrag: function(n) {
|
|
2076
|
+
if (!(typeof De < "u" && De) && ne === this.sortable && !(n && Q(n.target, this.options.draggable, this.sortable.el, !1)) && !(n && n.button !== 0))
|
|
2077
|
+
for (; _.length; ) {
|
|
2078
|
+
var a = _[0];
|
|
2079
|
+
P(a, this.options.selectedClass, !1), _.shift(), Le({
|
|
2080
|
+
sortable: this.sortable,
|
|
2081
|
+
rootEl: this.sortable.el,
|
|
2082
|
+
name: "deselect",
|
|
2083
|
+
targetEl: a,
|
|
2084
|
+
originalEvent: n
|
|
2085
|
+
});
|
|
2086
|
+
}
|
|
2087
|
+
},
|
|
2088
|
+
_checkKeyDown: function(n) {
|
|
2089
|
+
n.key === this.options.multiDragKey && (this.multiDragKeyDown = !0);
|
|
2090
|
+
},
|
|
2091
|
+
_checkKeyUp: function(n) {
|
|
2092
|
+
n.key === this.options.multiDragKey && (this.multiDragKeyDown = !1);
|
|
2093
|
+
}
|
|
2094
|
+
}, ee(e, {
|
|
2095
|
+
// Static methods & properties
|
|
2096
|
+
pluginName: "multiDrag",
|
|
2097
|
+
utils: {
|
|
2098
|
+
/**
|
|
2099
|
+
* Selects the provided multi-drag item
|
|
2100
|
+
* @param {HTMLElement} el The element to be selected
|
|
2101
|
+
*/
|
|
2102
|
+
select: function(n) {
|
|
2103
|
+
var a = n.parentNode[W];
|
|
2104
|
+
!a || !a.options.multiDrag || ~_.indexOf(n) || (ne && ne !== a && (ne.multiDrag._deselectMultiDrag(), ne = a), P(n, a.options.selectedClass, !0), _.push(n));
|
|
2105
|
+
},
|
|
2106
|
+
/**
|
|
2107
|
+
* Deselects the provided multi-drag item
|
|
2108
|
+
* @param {HTMLElement} el The element to be deselected
|
|
2109
|
+
*/
|
|
2110
|
+
deselect: function(n) {
|
|
2111
|
+
var a = n.parentNode[W], o = _.indexOf(n);
|
|
2112
|
+
!a || !a.options.multiDrag || !~o || (P(n, a.options.selectedClass, !1), _.splice(o, 1));
|
|
2113
|
+
}
|
|
2114
|
+
},
|
|
2115
|
+
eventProperties: function() {
|
|
2116
|
+
var n = this, a = [], o = [];
|
|
2117
|
+
return _.forEach(function(i) {
|
|
2118
|
+
a.push({
|
|
2119
|
+
multiDragElement: i,
|
|
2120
|
+
index: i.sortableIndex
|
|
2121
|
+
});
|
|
2122
|
+
var r;
|
|
2123
|
+
q && i !== O ? r = -1 : q ? r = A(i, ":not(." + n.options.selectedClass + ")") : r = A(i), o.push({
|
|
2124
|
+
multiDragElement: i,
|
|
2125
|
+
index: r
|
|
2126
|
+
});
|
|
2127
|
+
}), {
|
|
2128
|
+
items: qa(_),
|
|
2129
|
+
clones: [].concat(X),
|
|
2130
|
+
oldIndicies: a,
|
|
2131
|
+
newIndicies: o
|
|
2132
|
+
};
|
|
2133
|
+
},
|
|
2134
|
+
optionListeners: {
|
|
2135
|
+
multiDragKey: function(n) {
|
|
2136
|
+
return n = n.toLowerCase(), n === "ctrl" ? n = "Control" : n.length > 1 && (n = n.charAt(0).toUpperCase() + n.substr(1)), n;
|
|
2137
|
+
}
|
|
2138
|
+
}
|
|
2139
|
+
});
|
|
2140
|
+
}
|
|
2141
|
+
function xi(e, t) {
|
|
2142
|
+
_.forEach(function(n, a) {
|
|
2143
|
+
var o = t.children[n.sortableIndex + (e ? Number(a) : 0)];
|
|
2144
|
+
o ? t.insertBefore(n, o) : t.appendChild(n);
|
|
2145
|
+
});
|
|
2146
|
+
}
|
|
2147
|
+
function gn(e, t) {
|
|
2148
|
+
X.forEach(function(n, a) {
|
|
2149
|
+
var o = t.children[n.sortableIndex + (e ? Number(a) : 0)];
|
|
2150
|
+
o ? t.insertBefore(n, o) : t.appendChild(n);
|
|
2151
|
+
});
|
|
2152
|
+
}
|
|
2153
|
+
function tt() {
|
|
2154
|
+
_.forEach(function(e) {
|
|
2155
|
+
e !== O && e.parentNode && e.parentNode.removeChild(e);
|
|
2156
|
+
});
|
|
2157
|
+
}
|
|
2158
|
+
g.mount(new _i());
|
|
2159
|
+
g.mount(tn, en);
|
|
2160
|
+
g.mount(new Ci());
|
|
2161
|
+
g.mount(new wi());
|
|
2162
|
+
const Ei = ':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-form-config{width:inherit;display:flex;flex-direction:column;margin:1rem}.nylas-booking-form-config .header{padding:1rem;display:flex;justify-content:space-between}.nylas-booking-form-config .header .header_text h3{margin:0;font-size:16px;font-weight:500;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-booking-form-config .header .header_text 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-form-config .header .header_action{display:flex}.nylas-booking-form-config .header .header_action 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-form-config .content{padding:1rem;color:var(--nylas-base-900);font-size:16px;font-family:var(--nylas-font-family)}@media screen and (max-width: 504px){.nylas-booking-form-config .content{font-size:15px}}.nylas-booking-form-config .content .additional_fields{display:flex;flex-direction:column;gap:1rem;margin:1rem 0;position:relative;overflow:auto}@media screen and (max-width: 504px){.nylas-booking-form-config .content .additional_fields{gap:0.5rem;padding:0}}.nylas-booking-form-config .content .additional_fields .form-field{border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200);padding:1rem;user-select:none;background-color:white;position:relative}.nylas-booking-form-config .content .additional_fields .form-field.highlight{background-color:var(--nylas-base-200)}.nylas-booking-form-config .content .additional_fields .form-field .form-field_header{display:flex;justify-content:space-between;align-items:center}.nylas-booking-form-config .content .additional_fields .form-field .form-field_header .dragable{cursor:move}.nylas-booking-form-config .content .additional_fields .form-field .form-field_header .form-field_header_text{flex:1;text-align:left;padding-left:1rem}.nylas-booking-form-config .content .additional_fields .form-field .form-field_header .form-field_header_text h4{margin:0;font-size:16px;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-booking-form-config .content .additional_fields .form-field .form-field_header .form-field_header_text 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-form-config .content .additional_fields .form-field .form-field_header .form-field_header_actions{display:flex;align-items:center}.nylas-booking-form-config .content .additional_fields .form-field .form-field_header .form-field_header_actions .is-required{color:var(--nylas-base-500);background-color:var(--nylas-base-50);font-weight:600;padding:4px 8px;border-radius:var(--nylas-border-radius-2x)}.nylas-booking-form-config .content .additional_fields .form-field .form-field_header .form-field_header_actions button{border:none;background:transparent;height:40px;margin:0 1rem;cursor:pointer;color:var(--nylas-base-800)}.nylas-booking-form-config .content .additional_fields .form-field .form-field_header .form-field_header_actions button:hover,.nylas-booking-form-config .content .additional_fields .form-field .form-field_header .form-field_header_actions button:active{color:var(--nylas-primary)}.nylas-booking-form-config .content .additional_fields .form-field .form-field_header .form-field_header_actions .chevron{display:flex;align-self:center;cursor:pointer}.nylas-booking-form-config .content .additional_fields .form-field .form-field_header .form-field_header_actions .chevron:hover,.nylas-booking-form-config .content .additional_fields .form-field .form-field_header .form-field_header_actions .chevron:active{color:var(--nylas-primary)}.nylas-booking-form-config .content .additional_fields .form-field .form-field_header .form-field_header_actions .chevron.open{transform:rotate(90deg)}.nylas-booking-form-config .content .additional_fields .form-field .form-field_header .form-field_header_actions .chevron.closed{transform:rotate(270deg)}.nylas-booking-form-config .content .additional_fields .form-field .form-field_content{padding:1.5rem 0 0 2.7rem}.nylas-booking-form-config .content .additional_fields .form-field .form-field_content.hidden{display:none}.nylas-booking-form-config .content .additional_fields .form-field .form-field_content .inputs{display:flex}.nylas-booking-form-config .content .additional_fields .form-field .form-field_content .inputs .label-input{padding:0 1rem 0 0}.nylas-booking-form-config .content .additional_fields .form-field .form-field_content .inputs .required-input{display:flex}.nylas-booking-form-config .content .additional_fields .form-field .form-field_content .inputs .required-input label{padding:0.5rem}.nylas-booking-form-config .content .additional_fields .form-field .form-field_content .inputs .required-input input[type=checkbox]{transform:scale(1.3)}.nylas-booking-form-config .content .additional_fields .form-field .form-field_content .options-container h4{margin:0;font-size:16px;line-height:20px;font-weight:500;padding:0.5rem 0;color:var(--nylas-base-900);text-align:left}.nylas-booking-form-config .content .additional_fields .form-field .form-field_content .options-container button{border:none;background:transparent;height:40px;margin:1rem 0;cursor:pointer;color:var(--nylas-base-800);display:flex;align-items:center;justify-content:space-between}.nylas-booking-form-config .content .additional_fields .form-field .form-field_content .options-container button:hover,.nylas-booking-form-config .content .additional_fields .form-field .form-field_content .options-container button:active{color:var(--nylas-primary)}.nylas-booking-form-config .content .additional_fields .form-field .form-field_content .options-container .options{display:flex;flex-direction:column;gap:1rem}.nylas-booking-form-config .content .additional_fields .form-field .form-field_content .options-container .options .option{display:flex;justify-content:space-between;align-items:center}.nylas-booking-form-config .content .additional_fields .form-field .form-field_content .options-container .options .option button{border:none;background:transparent;height:40px;margin:0 1rem;cursor:pointer;color:var(--nylas-base-800)}.nylas-booking-form-config .content .additional_fields .form-field .form-field_content .options-container .options .option button:hover,.nylas-booking-form-config .content .additional_fields .form-field .form-field_content .options-container .options .option button:active{color:var(--nylas-primary)}', Di = Ei;
|
|
2163
|
+
var Si = function(e, t, n, a) {
|
|
2164
|
+
var o = arguments.length, i = o < 3 ? t : a === null ? a = Object.getOwnPropertyDescriptor(t, n) : a, r;
|
|
2165
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
2166
|
+
i = Reflect.decorate(e, t, n, a);
|
|
2167
|
+
else
|
|
2168
|
+
for (var l = e.length - 1; l >= 0; l--)
|
|
2169
|
+
(r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, n, i) : r(t, n)) || i);
|
|
2170
|
+
return o > 3 && i && Object.defineProperty(t, n, i), i;
|
|
2171
|
+
}, Tt = function(e, t) {
|
|
2172
|
+
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
2173
|
+
return Reflect.metadata(e, t);
|
|
2174
|
+
};
|
|
2175
|
+
const Fn = class {
|
|
2176
|
+
constructor(e) {
|
|
2177
|
+
E(this, e), this.valueChanged = R(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-form-config", this.additonalFields = [], this.formFields = [
|
|
2178
|
+
{
|
|
2179
|
+
type: "text",
|
|
2180
|
+
label: "Your name",
|
|
2181
|
+
key: "your_name",
|
|
2182
|
+
typeLabel: "Short text",
|
|
2183
|
+
readonly: !0,
|
|
2184
|
+
required: !0,
|
|
2185
|
+
isOpen: !1,
|
|
2186
|
+
order: 0
|
|
2187
|
+
},
|
|
2188
|
+
{
|
|
2189
|
+
type: "email",
|
|
2190
|
+
label: "Your Email",
|
|
2191
|
+
key: "your_email",
|
|
2192
|
+
typeLabel: "Email",
|
|
2193
|
+
readonly: !0,
|
|
2194
|
+
isOpen: !1,
|
|
2195
|
+
required: !0,
|
|
2196
|
+
order: 1
|
|
2197
|
+
},
|
|
2198
|
+
...this.additonalFields.sort((t, n) => t.order - n.order).map((t, n) => {
|
|
2199
|
+
const { typeLabel: a } = sn.find((o) => o.type === t.type);
|
|
2200
|
+
return t.order = n + 2, { ...t, isOpen: !1, typeLabel: a };
|
|
2201
|
+
})
|
|
2202
|
+
];
|
|
2203
|
+
}
|
|
2204
|
+
elementNameChangedHandler(e) {
|
|
2205
|
+
d("nylas-calendar-picker", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
2206
|
+
}
|
|
2207
|
+
connectedCallback() {
|
|
2208
|
+
d("nylas-booking-form-config", "connectedCallback");
|
|
2209
|
+
}
|
|
2210
|
+
disconnectedCallback() {
|
|
2211
|
+
d("nylas-booking-form-config", "disconnectedCallback");
|
|
2212
|
+
}
|
|
2213
|
+
componentWillLoad() {
|
|
2214
|
+
d("nylas-booking-form-config", "componentWillLoad"), this.host.setAttribute("name", this.name);
|
|
2215
|
+
}
|
|
2216
|
+
componentDidLoad() {
|
|
2217
|
+
var t;
|
|
2218
|
+
d("nylas-booking-form-config", "componentDidLoad");
|
|
2219
|
+
const e = (t = this.host.shadowRoot) == null ? void 0 : t.getElementById("fields");
|
|
2220
|
+
g.create(e, {
|
|
2221
|
+
animation: 150,
|
|
2222
|
+
swap: !0,
|
|
2223
|
+
swapClass: "highlight",
|
|
2224
|
+
onEnd: this.swapFields.bind(this),
|
|
2225
|
+
filter: ".fixed",
|
|
2226
|
+
onMove: (n) => !n.related.classList.contains("fixed")
|
|
2227
|
+
});
|
|
2228
|
+
}
|
|
2229
|
+
watchHandler(e) {
|
|
2230
|
+
const a = e.filter((o) => !o.readonly).sort((o, i) => o.order - i.order).map((o, i) => ({ ...{
|
|
2231
|
+
type: o.type,
|
|
2232
|
+
required: o.required,
|
|
2233
|
+
label: o.label,
|
|
2234
|
+
order: i + 1,
|
|
2235
|
+
options: o.options,
|
|
2236
|
+
key: o.key
|
|
2237
|
+
} })).reduce((o, i) => (o[i.key] = {
|
|
2238
|
+
type: i.type,
|
|
2239
|
+
required: i.required,
|
|
2240
|
+
order: i.order,
|
|
2241
|
+
options: i.options,
|
|
2242
|
+
label: i.label
|
|
2243
|
+
}, o), {});
|
|
2244
|
+
this.valueChanged.emit({
|
|
2245
|
+
value: a,
|
|
2246
|
+
name: this.name
|
|
2247
|
+
});
|
|
2248
|
+
}
|
|
2249
|
+
nylasFormDropdownChangedHandler(e) {
|
|
2250
|
+
const { name: t, value: n } = e.detail;
|
|
2251
|
+
if (t === "add-field") {
|
|
2252
|
+
const a = sn.find((l) => l.type === n), o = Math.max(...this.formFields.map((l) => l.order)), i = { ...a, order: o + 1 }, r = this.formFields.filter((l) => l.label.startsWith(a.label));
|
|
2253
|
+
if (r && r.length > 0) {
|
|
2254
|
+
const l = `${a.label} ${r.length + 1}`;
|
|
2255
|
+
i.label = l;
|
|
2256
|
+
const c = l.split(" ").join("_");
|
|
2257
|
+
i.key = c;
|
|
2258
|
+
}
|
|
2259
|
+
this.formFields = [...this.formFields, i];
|
|
2260
|
+
}
|
|
2261
|
+
}
|
|
2262
|
+
nylasFormInputChangedHandler(e) {
|
|
2263
|
+
const { name: t } = e.detail, [n, a] = t.split("_");
|
|
2264
|
+
a ? this.fieldOptionChange(parseInt(n), parseInt(a), e) : this.fieldLabelChange(parseInt(n), e);
|
|
2265
|
+
}
|
|
2266
|
+
swapFields(e) {
|
|
2267
|
+
const { oldIndex: t, newIndex: n } = e;
|
|
2268
|
+
if (t !== void 0 && n !== void 0 && t !== n) {
|
|
2269
|
+
const a = [...this.formFields].map((o) => o.order === t ? {
|
|
2270
|
+
...o,
|
|
2271
|
+
order: n
|
|
2272
|
+
} : o.order === n ? {
|
|
2273
|
+
...o,
|
|
2274
|
+
order: t
|
|
2275
|
+
} : o);
|
|
2276
|
+
this.formFields = a;
|
|
2277
|
+
}
|
|
2278
|
+
}
|
|
2279
|
+
fieldToggle(e) {
|
|
2280
|
+
this.formFields = this.formFields.map((t, n) => (e == n && (t.isOpen = !t.isOpen), t));
|
|
2281
|
+
}
|
|
2282
|
+
fieldRemove(e) {
|
|
2283
|
+
this.formFields = this.formFields.filter((t, n) => n !== e);
|
|
2284
|
+
}
|
|
2285
|
+
fieldRequired(e) {
|
|
2286
|
+
this.formFields = this.formFields.map((t, n) => (n === e && (t.required = !t.required), t));
|
|
2287
|
+
}
|
|
2288
|
+
fieldLabelChange(e, t) {
|
|
2289
|
+
const n = t.detail;
|
|
2290
|
+
this.formFields = this.formFields.map((a, o) => (o === e && (a.label = n.value), a));
|
|
2291
|
+
}
|
|
2292
|
+
fieldOptionAdd(e) {
|
|
2293
|
+
this.formFields = this.formFields.map((t, n) => (n === e && (t.options || (t.options = []), t.options = [...t.options, ""]), t));
|
|
2294
|
+
}
|
|
2295
|
+
fieldOptionRemove(e, t) {
|
|
2296
|
+
this.formFields = this.formFields.map((n, a) => (a === e && (n.options || (n.options = []), n.options = n.options.filter((o, i) => i !== t)), n));
|
|
2297
|
+
}
|
|
2298
|
+
fieldOptionChange(e, t, n) {
|
|
2299
|
+
this.formFields = this.formFields.map((a, o) => (o === e && (a.options || (a.options = []), a.options = a.options.map((i, r) => (r === t && (i = n.detail.value), i))), a));
|
|
2300
|
+
}
|
|
2301
|
+
render() {
|
|
2302
|
+
return s($, { key: "2a7bb5b2ee7caef3541054226ae026f9d61cfecf" }, s("div", { key: "0df0a49314526d603dcf00b4342f827c1ba76313", class: "nylas-booking-form-config" }, s("div", { key: "0b13698b3681aa00777ff1bc42ab1ba2008454a2", class: "header", part: "nbfc__header" }, s("div", { key: "de1a7adf65d1d247819c251e235b71e02b18e038", class: "header_text" }, s("h3", { key: "fb9ec159ba8c5ea894d73b737fac9848e5171a60" }, "Booking form"), s("p", { key: "59ec79e047a3ca87cd8ab6da7d0bb8595d81d8c5" }, "Customize the questions asked on the booking page.")), s("div", { key: "71405efb52d2972b232bb00625726a907c376dde", class: "header_action" }, s("select-dropdown", { key: "4288411410b255c86ba8d5056ec80d3681b97102", name: "add-field", exportparts: "sd_dropdown: nbfc__add_field, sd_dropdown-button: nbfc__add_field-button, sd_dropdown-content: nbfc__add_field-dropdown-content", options: ia, withSearch: !1, withChevron: !1, dropdownButtonText: "Add new type" }, s("span", { key: "6996c85d84233207956c3ed895a19a62c4488fae", slot: "select-icon" }, s("plus-icon", { key: "9c1bd64b45c664a47e1ed8188a083116b4a155ea", width: "15", height: "15" }))))), s("div", { key: "31c4029da44683be582d414b8efd977ac8ccf736", class: "content" }, s("div", { key: "7ed3b165c1925480dbdc02bb07f79188a1e55d0d", id: "fields", class: "additional_fields", part: "nbfc__additional_fields" }, this.formFields.map((e, t) => s("div", { class: `form-field draggable ${e.readonly && "fixed"}`, part: "nbfc__form_field", key: t }, s("div", { class: "form-field_header", part: "nbfc__form_field-header" }, s("span", { class: "dragable" }, s("dragable-icon", { width: "24", height: "25" })), s("div", { class: "form-field_header_text" }, s("h4", null, e.label), s("p", null, e.typeLabel)), s("div", { class: "form-field_header_actions" }, s("span", { class: "is-required" }, e.required ? "Required" : "Optional"), !e.readonly && s("button", { onClick: () => {
|
|
2303
|
+
this.fieldRemove(t);
|
|
2304
|
+
} }, s("close-icon", null)), s("span", { class: `chevron ${e.isOpen ? "open" : "closed"}`, onClick: () => {
|
|
2305
|
+
this.fieldToggle(t);
|
|
2306
|
+
} }, s("chevron-icon", { width: "24", height: "24" })))), s("div", { class: `form-field_content ${!e.isOpen && "hidden"}`, part: "nbfc__form_field-content" }, s("div", { class: "inputs" }, s("input-component", { class: "label-input", name: `${t}`, key: t, label: "Label", required: !1, readOnly: e.readonly, pattern: /^[a-zA-Z0-9\s]*$/, defaultValue: e.label }, s("div", { class: "required-input", slot: "additional-input" }, s("input", { type: "checkbox", name: `required_${e.order}`, id: `required_${e.order}`, onClick: () => {
|
|
2307
|
+
this.fieldRequired(t);
|
|
2308
|
+
}, checked: e.required, disabled: e.readonly }), s("label", { htmlFor: `required_${e.order}`, "aria-label": "Required" }, "Required")))), e.options != null && s("div", { class: "options-container" }, s("h4", null, "ALL OPTIONS"), s("div", { class: "options" }, e.options.map((n, a) => s("div", { class: "option" }, s("input-component", { key: a, name: `${t}_${a}`, label: e.typeLabel + " option " + (a + 1), required: !0, pattern: /^[a-zA-Z0-9\s]*$/, defaultValue: n }, a > 1 && s("div", { class: "required-input", slot: "additional-input" }, s("button", { onClick: () => {
|
|
2309
|
+
this.fieldOptionRemove(t, a);
|
|
2310
|
+
} }, s("close-icon", null))))))), s("button", { onClick: () => {
|
|
2311
|
+
this.fieldOptionAdd(t);
|
|
2312
|
+
}, part: "nap__add-time-range" }, s("add-circle-icon", null), " Add an option")))))))));
|
|
2313
|
+
}
|
|
2314
|
+
static get formAssociated() {
|
|
2315
|
+
return !0;
|
|
2316
|
+
}
|
|
2317
|
+
get host() {
|
|
2318
|
+
return F(this);
|
|
2319
|
+
}
|
|
2320
|
+
static get watchers() {
|
|
2321
|
+
return {
|
|
2322
|
+
name: ["elementNameChangedHandler"],
|
|
2323
|
+
formFields: ["watchHandler"]
|
|
2324
|
+
};
|
|
2325
|
+
}
|
|
2326
|
+
};
|
|
2327
|
+
Si([
|
|
2328
|
+
M({
|
|
2329
|
+
name: "nylas-booking-form-config",
|
|
2330
|
+
stateToProps: /* @__PURE__ */ new Map([["schedulerConfig.selectedConfiguration", "selectedConfiguration"]]),
|
|
2331
|
+
fireRegisterEvent: !0
|
|
2332
|
+
}),
|
|
2333
|
+
Tt("design:type", Function),
|
|
2334
|
+
Tt("design:paramtypes", []),
|
|
2335
|
+
Tt("design:returntype", void 0)
|
|
2336
|
+
], Fn.prototype, "render", null);
|
|
2337
|
+
Fn.style = Di;
|
|
2338
|
+
const Oi = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;width:inherit}.nylas-buffer-time{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200);text-align:left}.nylas-buffer-time .header{padding:1rem;border-bottom:1px solid var(--nylas-base-200)}.nylas-buffer-time .header h3{margin:0;font-size:1rem;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-buffer-time .header p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.nylas-buffer-time .nylas-buffer-time__body{display:grid;grid-template-columns:1fr auto}@media screen and (max-width: 768px){.nylas-buffer-time .nylas-buffer-time__body{grid-template-columns:1fr}}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__dropdown{padding:1rem;display:flex;flex-direction:column;gap:1rem;border-right:1px solid var(--nylas-base-200);color:var(--nylas-base-800)}@media screen and (max-width: 768px){.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__dropdown{border:none}}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__dropdown .nylas-buffer-time__row{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:1rem}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__dropdown .nylas-buffer-time__row label{width:200px}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__dropdown .nylas-buffer-time__row .dropdown-container{display:flex;gap:1rem;align-items:center;justify-content:flex-end}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview{width:208px;background:var(--nylas-base-25);border-bottom-right-radius:var(--nylas-border-radius-2x)}@media screen and (max-width: 768px){.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview{width:inherit;border-bottom-left-radius:var(--nylas-border-radius-2x)}}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview h4{font-size:14px;line-height:24px;color:var(--nylas-base-600);font-family:var(--nylas-font-family);font-weight:500;text-align:center;margin:0.75rem 0}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview .preview-container{padding:0 2rem 1rem}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview .preview-container .slot{background-color:transparent;border-top:1px solid var(--nylas-base-300)}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview .preview-container .slot.active{background-color:var(--nylas-base-100)}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview .preview-container .slot:last-of-type{border-bottom:1px solid var(--nylas-base-300)}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview .preview-container .event-slot{background-color:var(--nylas-base-600);border-top:1px solid var(--nylas-base-300)}.nylas-buffer-time .nylas-buffer-time__dropdown select-dropdown::part(sd_dropdown-button){width:104px;display:flex;justify-content:space-between;align-items:center;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);padding:1rem}.nylas-buffer-time .nylas-buffer-time__dropdown select-dropdown::part(sd_dropdown-content){width:100%}.nylas-buffer-time .nylas-buffer-time__dropdown select-dropdown::part(sd_dropdown-button-selected-label){max-width:calc(100% - 2rem);font-family:var(--nylas-font-family);font-size:16px;line-height:24px}', Ti = Oi;
|
|
2339
|
+
var Ii = function(e, t, n, a) {
|
|
2340
|
+
var o = arguments.length, i = o < 3 ? t : a === null ? a = Object.getOwnPropertyDescriptor(t, n) : a, r;
|
|
2341
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
2342
|
+
i = Reflect.decorate(e, t, n, a);
|
|
2343
|
+
else
|
|
2344
|
+
for (var l = e.length - 1; l >= 0; l--)
|
|
2345
|
+
(r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, n, i) : r(t, n)) || i);
|
|
2346
|
+
return o > 3 && i && Object.defineProperty(t, n, i), i;
|
|
2347
|
+
}, It = function(e, t) {
|
|
2348
|
+
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
2349
|
+
return Reflect.metadata(e, t);
|
|
2350
|
+
};
|
|
2351
|
+
const Mn = class {
|
|
2352
|
+
constructor(e) {
|
|
2353
|
+
E(this, e), this.valueChanged = R(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;
|
|
2354
|
+
}
|
|
2355
|
+
connectedCallback() {
|
|
2356
|
+
d("nylas-buffer-time", "connectedCallback");
|
|
2357
|
+
}
|
|
2358
|
+
disconnectedCallback() {
|
|
2359
|
+
d("nylas-buffer-time", "disconnectedCallback");
|
|
2360
|
+
}
|
|
2361
|
+
componentWillLoad() {
|
|
2362
|
+
d("nylas-buffer-time", "componentWillLoad"), this.host.setAttribute("name", this.name);
|
|
2363
|
+
}
|
|
2364
|
+
componentDidLoad() {
|
|
2365
|
+
if (d("nylas-buffer-time", "componentDidLoad"), typeof this.internals.setFormValue == "function") {
|
|
2366
|
+
const e = {
|
|
2367
|
+
before: this.selectedBeforeBufferTime,
|
|
2368
|
+
after: this.selectedAfterBufferTime
|
|
2369
|
+
};
|
|
2370
|
+
this.internals.setFormValue(JSON.stringify(e), this.name);
|
|
2371
|
+
}
|
|
2372
|
+
this.selectedAfterBufferTime = this.buffer.after, this.selectedBeforeBufferTime = this.buffer.before;
|
|
2373
|
+
}
|
|
2374
|
+
componentWillUpdate() {
|
|
2375
|
+
d("nylas-buffer-time", "componentWillUpdate");
|
|
2376
|
+
}
|
|
2377
|
+
componentDidUpdate() {
|
|
2378
|
+
d("nylas-buffer-time", "componentDidUpdate");
|
|
2379
|
+
}
|
|
2380
|
+
componentWillRender() {
|
|
2381
|
+
d("nylas-buffer-time", "componentWillRender");
|
|
2382
|
+
}
|
|
2383
|
+
componentDidRender() {
|
|
2384
|
+
d("nylas-buffer-time", "componentDidRender");
|
|
2385
|
+
}
|
|
2386
|
+
elementNameChangedHandler(e) {
|
|
2387
|
+
d("nylas-buffer-time", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
2388
|
+
}
|
|
2389
|
+
nylasFormDropdownChangedHandler(e) {
|
|
2390
|
+
d("nylas-buffer-time", "nylasFormDropdownChangedHandler", e.detail);
|
|
2391
|
+
const t = (n) => {
|
|
2392
|
+
const { value: a, name: o } = n.detail;
|
|
2393
|
+
o === "before-buffer-time" ? this.selectedBeforeBufferTime = parseInt(a) : o === "after-buffer-time" && (this.selectedAfterBufferTime = parseInt(a));
|
|
2394
|
+
const i = {
|
|
2395
|
+
before: this.selectedBeforeBufferTime,
|
|
2396
|
+
after: this.selectedAfterBufferTime
|
|
2397
|
+
};
|
|
2398
|
+
this.internals.setFormValue(JSON.stringify(i), "booking-calendar");
|
|
2399
|
+
};
|
|
2400
|
+
this.valueChanged.emit({ ...e.detail, valueChanged: t });
|
|
2401
|
+
}
|
|
2402
|
+
renderPreview() {
|
|
2403
|
+
const a = (r) => {
|
|
2404
|
+
const l = Math.floor(r / 30), c = r % 30 / 30 * 10;
|
|
2405
|
+
return {
|
|
2406
|
+
fullSlots: l,
|
|
2407
|
+
partialFillHeight: c
|
|
2408
|
+
};
|
|
2409
|
+
}, o = () => {
|
|
2410
|
+
const { fullSlots: r, partialFillHeight: l } = a(this.selectedBeforeBufferTime);
|
|
2411
|
+
return Array.from({ length: 4 }, (c, f) => {
|
|
2412
|
+
const p = this.selectedBeforeBufferTime > 0 && f > 4 - r - 1, u = this.selectedBeforeBufferTime > 0 && f === 4 - r - 1 && l > 0;
|
|
2413
|
+
let b = {};
|
|
2414
|
+
return p && !u ? b.backgroundColor = "var(--nylas-base-100)" : u && (b.background = `linear-gradient(to top, var(--nylas-base-100) ${l}px, transparent 0)`), s("div", { key: f, class: `slot ${p ? "active" : ""}`, style: {
|
|
2415
|
+
height: "10px",
|
|
2416
|
+
...b
|
|
2417
|
+
} });
|
|
2418
|
+
});
|
|
2419
|
+
}, i = () => {
|
|
2420
|
+
const { fullSlots: r, partialFillHeight: l } = a(this.selectedAfterBufferTime);
|
|
2421
|
+
return Array.from({ length: 4 }, (c, f) => {
|
|
2422
|
+
const p = this.selectedAfterBufferTime > 0 && f < r, u = f === r && l > 0;
|
|
2423
|
+
let b = {};
|
|
2424
|
+
return p && !u ? b.backgroundColor = "var(--nylas-base-100)" : u && (b.background = `linear-gradient(to bottom, var(--nylas-base-100) ${l}px, transparent 0)`), s("div", { key: f, class: `slot ${p ? "active" : ""}`, style: {
|
|
2425
|
+
height: "10px",
|
|
2426
|
+
...b
|
|
2427
|
+
} });
|
|
2428
|
+
});
|
|
2429
|
+
};
|
|
2430
|
+
return s("div", { class: "preview-container" }, o(), s("div", { class: "event-slot", style: { height: "20px" } }), i());
|
|
2431
|
+
}
|
|
2432
|
+
render() {
|
|
2433
|
+
const e = Array.from({ length: 25 }, (t, n) => {
|
|
2434
|
+
const a = n * 5;
|
|
2435
|
+
return {
|
|
2436
|
+
label: a.toString(),
|
|
2437
|
+
value: a
|
|
2438
|
+
};
|
|
2439
|
+
});
|
|
2440
|
+
return s($, null, s("div", { class: "nylas-buffer-time", part: "nbt" }, s("div", { class: "header", part: "nbt__header" }, s("h3", null, "Buffer time"), s("p", null, "Add buffer time before and after the event.")), s("div", { class: "nylas-buffer-time__body", part: "nbt__body" }, s("div", { class: "nylas-buffer-time__dropdown" }, s("div", { class: "nylas-buffer-time__row" }, s("label", null, "Before the event"), s("div", { class: "dropdown-container" }, s("select-dropdown", { id: "before-buffer-time", withSearch: !1, name: "before-buffer-time", exportparts: "sd_dropdown: nbt__dropdown-before, sd_dropdown-button: nbt__dropdown-button-before, sd_dropdown-content: nbt__dropdown-content-before", options: e, defaultSelectedOption: e.find((t) => t.value == this.selectedBeforeBufferTime) ?? e[0] }), s("span", null, "mins"))), s("div", { class: "nylas-buffer-time__row" }, s("label", null, "After the event"), s("div", { class: "dropdown-container" }, s("select-dropdown", { id: "after-buffer-time", withSearch: !1, name: "after-buffer-time", exportparts: "sd_dropdown: nbt__dropdown-after, sd_dropdown-button: nbt__dropdown-button-after, sd_dropdown-content: nbt__dropdown-content-after", options: e, defaultSelectedOption: e.find((t) => t.value == this.selectedAfterBufferTime) ?? e[0] }), s("span", null, "mins")))), s("div", { class: "nylas-buffer-time__preview", part: "nbt__preview" }, s("h4", null, "PREVIEW"), this.renderPreview()))));
|
|
2441
|
+
}
|
|
2442
|
+
static get formAssociated() {
|
|
2443
|
+
return !0;
|
|
2444
|
+
}
|
|
2445
|
+
get host() {
|
|
2446
|
+
return F(this);
|
|
2447
|
+
}
|
|
2448
|
+
static get watchers() {
|
|
2449
|
+
return {
|
|
2450
|
+
name: ["elementNameChangedHandler"]
|
|
2451
|
+
};
|
|
2452
|
+
}
|
|
2453
|
+
};
|
|
2454
|
+
Ii([
|
|
2455
|
+
M({
|
|
2456
|
+
name: "nylas-buffer-time",
|
|
2457
|
+
eventToProps: {
|
|
2458
|
+
valueChanged: async (e, t) => {
|
|
2459
|
+
const { valueChanged: n } = e.detail;
|
|
2460
|
+
n && n(e);
|
|
2461
|
+
}
|
|
2462
|
+
},
|
|
2463
|
+
fireRegisterEvent: !0
|
|
2464
|
+
}),
|
|
2465
|
+
It("design:type", Function),
|
|
2466
|
+
It("design:paramtypes", []),
|
|
2467
|
+
It("design:returntype", void 0)
|
|
2468
|
+
], Mn.prototype, "render", null);
|
|
2469
|
+
Mn.style = Ti;
|
|
2470
|
+
const Hi = ':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 .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-button--error){border:1px solid var(--nylas-error)}.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}', Pi = Hi;
|
|
2471
|
+
var Ni = function(e, t, n, a) {
|
|
2472
|
+
var o = arguments.length, i = o < 3 ? t : a === null ? a = Object.getOwnPropertyDescriptor(t, n) : a, r;
|
|
2473
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
2474
|
+
i = Reflect.decorate(e, t, n, a);
|
|
2475
|
+
else
|
|
2476
|
+
for (var l = e.length - 1; l >= 0; l--)
|
|
2477
|
+
(r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, n, i) : r(t, n)) || i);
|
|
2478
|
+
return o > 3 && i && Object.defineProperty(t, n, i), i;
|
|
2479
|
+
}, Ht = function(e, t) {
|
|
2480
|
+
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
2481
|
+
return Reflect.metadata(e, t);
|
|
2482
|
+
};
|
|
2483
|
+
const Ln = class {
|
|
2484
|
+
constructor(e) {
|
|
2485
|
+
E(this, e), this.valueChanged = R(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 = [], this.error = "";
|
|
2486
|
+
}
|
|
2487
|
+
elementNameChangedHandler(e) {
|
|
2488
|
+
d("nylas-calendar-picker", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
2489
|
+
}
|
|
2490
|
+
connectedCallback() {
|
|
2491
|
+
d("nylas-calendar-picker", "connectedCallback");
|
|
2492
|
+
}
|
|
2493
|
+
disconnectedCallback() {
|
|
2494
|
+
d("nylas-calendar-picker", "disconnectedCallback");
|
|
2495
|
+
}
|
|
2496
|
+
componentWillLoad() {
|
|
2497
|
+
d("nylas-calendar-picker", "componentWillLoad"), this.host.setAttribute("name", this.name);
|
|
2498
|
+
}
|
|
2499
|
+
componentDidLoad() {
|
|
2500
|
+
d("nylas-calendar-picker", "componentDidLoad"), typeof this.internals.setFormValue == "function" && (this.internals.setFormValue(this.defaultSelectedCalendars.toString(), "calendar"), this.valueChanged.emit({ value: this.defaultSelectedCalendars, name: this.name }));
|
|
2501
|
+
}
|
|
2502
|
+
componentWillUpdate() {
|
|
2503
|
+
d("nylas-calendar-picker", "componentWillUpdate");
|
|
2504
|
+
}
|
|
2505
|
+
componentDidUpdate() {
|
|
2506
|
+
d("nylas-calendar-picker", "componentDidUpdate");
|
|
2507
|
+
}
|
|
2508
|
+
componentWillRender() {
|
|
2509
|
+
d("nylas-calendar-picker", "componentWillRender");
|
|
2510
|
+
}
|
|
2511
|
+
componentDidRender() {
|
|
2512
|
+
d("nylas-calendar-picker", "componentDidRender");
|
|
2513
|
+
}
|
|
2514
|
+
selectedOptionsChangedHandler(e) {
|
|
2515
|
+
d("nylas-calendar-picker", "nylasFormDropdownChangedHandler", e.detail);
|
|
2516
|
+
const t = (n) => {
|
|
2517
|
+
const { value: a } = n.detail;
|
|
2518
|
+
this.selectedCalendars = [...a], this.selectedCalendars.length === 0 ? (this.error = "At least one calendar must be selected.", this.internals.setValidity({ customError: !0 }, "At least one calendar must be selected.")) : (this.error = "", this.internals.setValidity({})), this.internals.setFormValue(a.toString(), this.name);
|
|
2519
|
+
};
|
|
2520
|
+
this.valueChanged.emit({ ...e.detail, name: this.name, valueChangedHandler: t });
|
|
2521
|
+
}
|
|
2522
|
+
render() {
|
|
2523
|
+
var t;
|
|
2524
|
+
const e = ((t = this.calendars) == null ? void 0 : t.map((n) => {
|
|
2525
|
+
var a, o, i, r;
|
|
2526
|
+
return {
|
|
2527
|
+
value: n.id,
|
|
2528
|
+
label: n.name,
|
|
2529
|
+
selected: ((a = this.defaultSelectedCalendars) == null ? void 0 : a.includes(n.id)) || ((o = this.defaultSelectedCalendars) != null && o.includes("primary") || ((i = this.defaultSelectedCalendars) == null ? void 0 : i.length) === 0 ? n.id === ((r = this.currentUser) == null ? void 0 : r.email) || n.id === this.name.split("participant-")[1] : !1)
|
|
2530
|
+
};
|
|
2531
|
+
})) ?? [];
|
|
2532
|
+
return s($, null, s("div", { class: "nylas-calendar-picker", part: "ncp" }, e.length > 0 ? s("div", { class: "nylas-calendar-picker__dropdown" }, s("multi-select-dropdown", { name: this.name, options: e, error: this.error, exportparts: "msd_dropdown: ncp__dropdown, msd_dropdown-button: ncp__dropdown-button, msd_dropdown-content: ncp__dropdown-content" })) : s("div", { class: "nylas-calendar-picker__loading" }, s("span", { class: "label" }, "Select calendars that will be checked for availability ", s("info-icon", null)), s("div", { class: "loading-button" }, s("span", null, "Loading...")))));
|
|
2533
|
+
}
|
|
2534
|
+
static get formAssociated() {
|
|
2535
|
+
return !0;
|
|
2536
|
+
}
|
|
2537
|
+
get host() {
|
|
2538
|
+
return F(this);
|
|
2539
|
+
}
|
|
2540
|
+
static get watchers() {
|
|
2541
|
+
return {
|
|
2542
|
+
name: ["elementNameChangedHandler"]
|
|
2543
|
+
};
|
|
2544
|
+
}
|
|
2545
|
+
};
|
|
2546
|
+
Ni([
|
|
2547
|
+
M({
|
|
2548
|
+
name: "nylas-calendar-picker",
|
|
2549
|
+
stateToProps: /* @__PURE__ */ new Map([["schedulerConfig.currentUser", "currentUser"]]),
|
|
2550
|
+
eventToProps: {
|
|
2551
|
+
valueChanged: async (e, t) => {
|
|
2552
|
+
const { valueChangedHandler: n } = e.detail;
|
|
2553
|
+
n && n(e);
|
|
2554
|
+
}
|
|
2555
|
+
},
|
|
2556
|
+
fireRegisterEvent: !0
|
|
2557
|
+
}),
|
|
2558
|
+
Ht("design:type", Function),
|
|
2559
|
+
Ht("design:paramtypes", []),
|
|
2560
|
+
Ht("design:returntype", void 0)
|
|
2561
|
+
], Ln.prototype, "render", null);
|
|
2562
|
+
Ln.style = Pi;
|
|
2563
|
+
const Ai = ':host{--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.nylas-cancellation-policy{display:flex;flex-direction:column;gap:4px}.nylas-cancellation-policy label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:16px;font-style:normal;font-weight:400;line-height:150%;}.nylas-cancellation-policy label span.label-icon{margin-left:4px}.nylas-cancellation-policy label span.label-icon tooltip-component{display:flex}.nylas-cancellation-policy textarea{padding:12px 16px;border-width:1;resize:vertical;border-radius:8px;font-family:var(--nylas-font-family);font-size:16px;line-height:24px;border:1px solid var(--nylas-base-200)}.nylas-cancellation-policy textarea::-webkit-resizer{display:none}', $i = Ai;
|
|
2564
|
+
var Fi = function(e, t, n, a) {
|
|
2565
|
+
var o = arguments.length, i = o < 3 ? t : a === null ? a = Object.getOwnPropertyDescriptor(t, n) : a, r;
|
|
2566
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
2567
|
+
i = Reflect.decorate(e, t, n, a);
|
|
2568
|
+
else
|
|
2569
|
+
for (var l = e.length - 1; l >= 0; l--)
|
|
2570
|
+
(r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, n, i) : r(t, n)) || i);
|
|
2571
|
+
return o > 3 && i && Object.defineProperty(t, n, i), i;
|
|
2572
|
+
}, Pt = function(e, t) {
|
|
2573
|
+
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
2574
|
+
return Reflect.metadata(e, t);
|
|
2575
|
+
};
|
|
2576
|
+
const Rn = class {
|
|
2577
|
+
constructor(e) {
|
|
2578
|
+
var t, n;
|
|
2579
|
+
E(this, e), this.valueChanged = R(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.selectedConfiguration = void 0, this.cancellationPolicy = void 0, this.name = "cancelation-policy", this.message = this.cancellationPolicy || ((n = (t = this.selectedConfiguration) == null ? void 0 : t.scheduler) == null ? void 0 : n.cancellation_policy) || "";
|
|
2580
|
+
}
|
|
2581
|
+
elementNameChangedHandler(e) {
|
|
2582
|
+
d("nylas-cancellation-policy", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
2583
|
+
}
|
|
2584
|
+
selectedConfigurationChangedHandler(e, t) {
|
|
2585
|
+
var n, a;
|
|
2586
|
+
d("nylas-custom-booking-flow", "selectedConfigurationChangedHandler", e, t), (n = e == null ? void 0 : e.scheduler) != null && n.cancellation_policy && (this.message = (a = e == null ? void 0 : e.scheduler) == null ? void 0 : a.cancellation_policy);
|
|
2587
|
+
}
|
|
2588
|
+
connectedCallback() {
|
|
2589
|
+
d("nylas-cancellation-policy", "connectedCallback");
|
|
2590
|
+
}
|
|
2591
|
+
componentWillLoad() {
|
|
2592
|
+
d("nylas-cancellation-policy", "componentWillLoad"), this.host.setAttribute("name", this.name);
|
|
2593
|
+
}
|
|
2594
|
+
componentDidLoad() {
|
|
2595
|
+
d("nylas-cancellation-policy", "componentDidLoad");
|
|
2596
|
+
}
|
|
2597
|
+
disconnectedCallback() {
|
|
2598
|
+
d("nylas-cancellation-policy", "disconnectedCallback");
|
|
2599
|
+
}
|
|
2600
|
+
handleChange(e) {
|
|
2601
|
+
const t = ut(e.target.value);
|
|
2602
|
+
this.message = t, this.internals.setFormValue(t, this.name), this.valueChanged.emit({ value: t, name: this.name });
|
|
2603
|
+
}
|
|
2604
|
+
render() {
|
|
2605
|
+
return s($, { key: "a33c5325297071f02e6f888ed0a1666490c8f928" }, s("div", { key: "caec2d57a85988092730802db6aa9ce5af040304", class: "nylas-cancellation-policy", part: "ncpolicy" }, s("label", { key: "14e290e8424ee3aa362bd58b6036fe5228a511ec", htmlFor: this.name }, "Cancellation policy message", s("span", { key: "f8a8798ad54d7d846e1d162456ee61b24c1c38d5", class: "label-icon" }, s("tooltip-component", { key: "c817408f2bf3086038135dadbd6d1c2b112e2625" }, s("info-icon", { key: "2d08893d22943fac3544fef663707bb19dac04f3", slot: "tooltip-icon" }), s("span", { key: "112be966a2253f3e83b72d05454e83cb386c6ebb", slot: "tooltip-content" }, "Attendees receive this message if trying to cancel the event. Attendees are asked to provide a reason for cancellation.")))), s("textarea", { key: "e772bf8f32106aeccf31053724f0524c356d0603", id: this.name, part: "ncpolicy__textarea", name: this.name, value: this.message, maxlength: "250", onInput: (e) => this.handleChange(e) })));
|
|
2606
|
+
}
|
|
2607
|
+
static get formAssociated() {
|
|
2608
|
+
return !0;
|
|
2609
|
+
}
|
|
2610
|
+
get host() {
|
|
2611
|
+
return F(this);
|
|
2612
|
+
}
|
|
2613
|
+
static get watchers() {
|
|
2614
|
+
return {
|
|
2615
|
+
name: ["elementNameChangedHandler"],
|
|
2616
|
+
selectedConfiguration: ["selectedConfigurationChangedHandler"]
|
|
2617
|
+
};
|
|
2618
|
+
}
|
|
2619
|
+
};
|
|
2620
|
+
Fi([
|
|
2621
|
+
M({
|
|
2622
|
+
name: "nylas-cancellation-policy",
|
|
2623
|
+
stateToProps: /* @__PURE__ */ new Map([["schedulerConfig.selectedConfiguration", "selectedConfiguration"]]),
|
|
2624
|
+
eventToProps: {},
|
|
2625
|
+
fireRegisterEvent: !0
|
|
2626
|
+
}),
|
|
2627
|
+
Pt("design:type", Function),
|
|
2628
|
+
Pt("design:paramtypes", []),
|
|
2629
|
+
Pt("design:returntype", void 0)
|
|
2630
|
+
], Rn.prototype, "render", null);
|
|
2631
|
+
Rn.style = $i;
|
|
2632
|
+
const Mi = ':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-connected-calendars{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200)}.nylas-connected-calendars .header{padding:1rem}.nylas-connected-calendars .header h3{margin:0;font-size:16px;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-connected-calendars .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;display:flex;align-items:center;gap:4px}.nylas-connected-calendars .content .participant-container{padding-top:12px;border-top:1px solid var(--nylas-base-200)}.nylas-connected-calendars .content .participant-container .participant-title{display:flex;justify-content:space-between;align-items:center;padding:4px 16px 16px}.nylas-connected-calendars .content .participant-container .participant-title p{margin:0}.nylas-connected-calendars .content .participant-container .participant-title .participant-toggle{display:flex;gap:24px;align-items:center}.nylas-connected-calendars .content .participant-container .participant-title .participant-toggle .chevron{display:flex;align-self:center;cursor:pointer}.nylas-connected-calendars .content .participant-container .participant-title .participant-toggle .chevron:hover,.nylas-connected-calendars .content .participant-container .participant-title .participant-toggle .chevron:active{color:var(--nylas-primary)}.nylas-connected-calendars .content .participant-container .participant-title .participant-toggle .chevron.open{transform:rotate(90deg)}.nylas-connected-calendars .content .participant-container .participant-title .participant-toggle .chevron.closed{transform:rotate(270deg)}.nylas-connected-calendars .content .participant-container .participant-title .participant-toggle .chevron.disabled{cursor:not-allowed;color:var(--nylas-base-300)}.nylas-connected-calendars .content .participant-container .participant-title .participant-toggle .chevron.disabled:hover{color:var(--nylas-base-300)}nylas-calendar-picker::part(ncp){margin:0;border:none;border-top:1px solid var(--nylas-base-200);border-top-right-radius:0;border-top-left-radius:0}', Li = Mi;
|
|
2633
|
+
var Ri = function(e, t, n, a) {
|
|
2634
|
+
var o = arguments.length, i = o < 3 ? t : a === null ? a = Object.getOwnPropertyDescriptor(t, n) : a, r;
|
|
2635
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
2636
|
+
i = Reflect.decorate(e, t, n, a);
|
|
2637
|
+
else
|
|
2638
|
+
for (var l = e.length - 1; l >= 0; l--)
|
|
2639
|
+
(r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, n, i) : r(t, n)) || i);
|
|
2640
|
+
return o > 3 && i && Object.defineProperty(t, n, i), i;
|
|
2641
|
+
}, Nt = function(e, t) {
|
|
2642
|
+
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
2643
|
+
return Reflect.metadata(e, t);
|
|
2644
|
+
};
|
|
2645
|
+
const zn = class {
|
|
2646
|
+
constructor(e) {
|
|
2647
|
+
E(this, e), this.valueChanged = R(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 = "connected-calendars", this.participants = void 0, this.calendars = void 0, this.participantOptions = void 0, this.selectedCalendars = this.setParticipants(this.participants), this.participantCalendars = {}, this.participantDefaultSelectedCalendars = {};
|
|
2648
|
+
}
|
|
2649
|
+
elementNameChangedHandler(e) {
|
|
2650
|
+
d("nylas-connected-calendars", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
2651
|
+
}
|
|
2652
|
+
calendarsChangedHandler(e) {
|
|
2653
|
+
d("nylas-connected-calendars", "calendarsChangedHandler", e), this.participantCalendars = this.getParticipantCalendarOptions(this.participants, this.participantOptions);
|
|
2654
|
+
}
|
|
2655
|
+
participantsChangedHandler(e) {
|
|
2656
|
+
d("nylas-connected-calendars", "participantsChangedHandler", e), this.selectedCalendars = this.setParticipants(e), this.participantCalendars = this.getParticipantCalendarOptions(e, this.participantOptions);
|
|
2657
|
+
}
|
|
2658
|
+
participantOptionsChangedHandler(e) {
|
|
2659
|
+
d("nylas-calendar-picker", "participantOptionsChangedHandler", e), this.participantCalendars = this.getParticipantCalendarOptions(this.participants, e);
|
|
2660
|
+
}
|
|
2661
|
+
getParticipantCalendarOptions(e, t) {
|
|
2662
|
+
var o;
|
|
2663
|
+
const n = this.participants.find((i) => i.is_organizer), a = {};
|
|
2664
|
+
return t && e.filter((r) => t.some((l) => l.email === r.email)).forEach((r) => {
|
|
2665
|
+
var f, p, u;
|
|
2666
|
+
const l = t.find((b) => b.email === r.email);
|
|
2667
|
+
if (!l)
|
|
2668
|
+
return;
|
|
2669
|
+
this.participantDefaultSelectedCalendars[r.email] = ((f = r.availability) == null ? void 0 : f.calendar_ids) || [];
|
|
2670
|
+
const c = l.calendars ?? [];
|
|
2671
|
+
(u = (p = r.availability) == null ? void 0 : p.calendar_ids) == null || u.forEach((b) => {
|
|
2672
|
+
!c.some((v) => v.id === b) && b !== "primary" && c.push({ id: b, name: b });
|
|
2673
|
+
}), a[r.email] = c;
|
|
2674
|
+
}), n && (a[n.email] = this.calendars ?? [{ id: "primary", name: n.email }], this.participantDefaultSelectedCalendars[n.email] = ((o = n.availability) == null ? void 0 : o.calendar_ids) || []), a;
|
|
2675
|
+
}
|
|
2676
|
+
getUniqueCalendars(e) {
|
|
2677
|
+
return e.filter((t, n, a) => a.findIndex((o) => o.id === t.id) === n);
|
|
2678
|
+
}
|
|
2679
|
+
connectedCallback() {
|
|
2680
|
+
d("nylas-connected-calendars", "connectedCallback");
|
|
2681
|
+
}
|
|
2682
|
+
disconnectedCallback() {
|
|
2683
|
+
d("nylas-connected-calendars", "disconnectedCallback");
|
|
2684
|
+
}
|
|
2685
|
+
componentWillLoad() {
|
|
2686
|
+
d("nylas-connected-calendars", "componentWillLoad");
|
|
2687
|
+
}
|
|
2688
|
+
componentDidLoad() {
|
|
2689
|
+
d("nylas-connected-calendars", "componentDidLoad");
|
|
2690
|
+
}
|
|
2691
|
+
handleValueChanged(e) {
|
|
2692
|
+
d("[nylas-editor-tabs]", "handleValueChanged", e);
|
|
2693
|
+
const { name: t, value: n } = e.detail;
|
|
2694
|
+
if (!t.startsWith("participant-"))
|
|
2695
|
+
return;
|
|
2696
|
+
if (this.connectedCalendarsFormRef.checkValidity())
|
|
2697
|
+
this.internals.setValidity({});
|
|
2698
|
+
else {
|
|
2699
|
+
this.internals.setValidity({ customError: !0 }, "Please select at least one calendar for each participant.");
|
|
2700
|
+
return;
|
|
2701
|
+
}
|
|
2702
|
+
const a = t.split("participant-")[1];
|
|
2703
|
+
if (!this.selectedCalendars[a])
|
|
2704
|
+
return;
|
|
2705
|
+
this.selectedCalendars[a].calendars = n, this.selectedCalendars = { ...this.selectedCalendars };
|
|
2706
|
+
const o = {};
|
|
2707
|
+
this.participants.forEach((i) => {
|
|
2708
|
+
o[i.email] = this.selectedCalendars[i.email].calendars;
|
|
2709
|
+
}), this.internals.setFormValue(JSON.stringify(o), this.name), this.valueChanged.emit({ value: JSON.stringify(o), name: this.name });
|
|
2710
|
+
}
|
|
2711
|
+
setParticipants(e) {
|
|
2712
|
+
const t = {};
|
|
2713
|
+
return e.forEach((n) => {
|
|
2714
|
+
const a = !!n.is_organizer;
|
|
2715
|
+
t[n.email] = {
|
|
2716
|
+
isOpen: a,
|
|
2717
|
+
name: n.name || n.email,
|
|
2718
|
+
availability: n.availability
|
|
2719
|
+
};
|
|
2720
|
+
}), t;
|
|
2721
|
+
}
|
|
2722
|
+
render() {
|
|
2723
|
+
return s($, { key: "bc04f273cf87427c70f2ce0d296eac3d6ac7b6de" }, s("div", { key: "995bb5a0b4be6ab0ea856394bb81d3b5fa487915", class: "nylas-connected-calendars", part: "npca" }, s("div", { key: "d973e7b5e6c03b87835102a3409061cfb175fbbd", class: "header", part: "npca__header" }, s("h3", { key: "e7fdc1c368e38857578b48a87b244b000901dd0b" }, "Connected Calendars"), s("p", { key: "e2cb0d727e9d9dc11e58fb4299da5e335e020474" }, "Select the calendars to use for checking your availability.", s("tooltip-component", { key: "e93f320b8075f979509fe8f2b81024a939333a00" }, s("info-icon", { key: "1d7c7a2fca87460e84d855b334af8b78ca0cc6e1", slot: "tooltip-icon" }), s("span", { key: "f4246e370c18c35bcf20ef838ae6da4102234daa", 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.")))), s("div", { key: "cf514c92149d927d7cf5d8f535826987d0d63fce", class: "content", part: "npca__content" }, s("form", { key: "cbe2ffb59e474169079d2e3896dd1b12391d7487", ref: (e) => this.connectedCalendarsFormRef = e }, Object.keys(this.participantCalendars).map((e, t) => {
|
|
2724
|
+
const n = this.selectedCalendars[e], a = this.participantCalendars[e];
|
|
2725
|
+
if (!(!n || !n.name))
|
|
2726
|
+
return s("div", { class: "participant-container", part: "npca__participant-container", key: `participant-conatiner-${t}` }, s("div", { class: "participant-title", part: "npca__participant-title" }, s("p", null, "Set ", n.name, "'s connected calendars"), s("div", { class: "participant-toggle", part: "npca__participant-toggle--container" }, s("span", { class: `chevron ${n.isOpen ? "open" : "closed"}`, onClick: () => {
|
|
2727
|
+
this.selectedCalendars[e].isOpen = !n.isOpen, this.selectedCalendars = { ...this.selectedCalendars };
|
|
2728
|
+
} }, s("chevron-icon", { width: "24", height: "24" })))), n.isOpen && s("nylas-calendar-picker", { key: e, name: `participant-${e}`, calendars: a, defaultSelectedCalendars: this.participantDefaultSelectedCalendars[e] }));
|
|
2729
|
+
})))));
|
|
2730
|
+
}
|
|
2731
|
+
static get formAssociated() {
|
|
2732
|
+
return !0;
|
|
2733
|
+
}
|
|
2734
|
+
get host() {
|
|
2735
|
+
return F(this);
|
|
2736
|
+
}
|
|
2737
|
+
static get watchers() {
|
|
2738
|
+
return {
|
|
2739
|
+
name: ["elementNameChangedHandler"],
|
|
2740
|
+
calendars: ["calendarsChangedHandler"],
|
|
2741
|
+
participants: ["participantsChangedHandler"],
|
|
2742
|
+
participantOptions: ["participantOptionsChangedHandler"]
|
|
2743
|
+
};
|
|
2744
|
+
}
|
|
2745
|
+
};
|
|
2746
|
+
Ri([
|
|
2747
|
+
M({
|
|
2748
|
+
name: "nylas-connected-calendars",
|
|
2749
|
+
stateToProps: /* @__PURE__ */ new Map([
|
|
2750
|
+
["schedulerConfig.additionalParticipants", "participantOptions"],
|
|
2751
|
+
["schedulerConfig.calendars", "calendars"]
|
|
2752
|
+
]),
|
|
2753
|
+
eventToProps: {},
|
|
2754
|
+
fireRegisterEvent: !0
|
|
2755
|
+
}),
|
|
2756
|
+
Nt("design:type", Function),
|
|
2757
|
+
Nt("design:paramtypes", []),
|
|
2758
|
+
Nt("design:returntype", void 0)
|
|
2759
|
+
], zn.prototype, "render", null);
|
|
2760
|
+
zn.style = Li;
|
|
2761
|
+
const zi = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;width:inherit}.nylas-customize-booking-settings{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200)}.nylas-customize-booking-settings .header{padding:1rem;border-bottom:1px solid var(--nylas-base-200)}.nylas-customize-booking-settings .header h3{margin:0;font-size:1rem;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-customize-booking-settings .header p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.nylas-customize-booking-settings .nylas-customize-booking-settings__settings{display:flex;flex-direction:column;gap:1.5rem;padding:1rem;margin:1rem 0}.nylas-customize-booking-settings .nylas-customize-booking-settings__settings .nylas-customize-booking-settings__settings-div{display:flex;align-items:center;gap:4px}.label{margin-left:32px;font-size:16px;font-weight:400;color:var(--nylas-base-800);line-height:24px}.label .label-contents{margin:0;display:inline-block}@media screen and (max-width: 768px){.label .label-contents{display:block}}.label tooltip-component{display:inline-block}@media screen and (max-width: 768px){tooltip-component#guests::part(tc__content){left:58px}}tooltip-component#reschedule::part(tc__content){left:58px}@media screen and (max-width: 768px){tooltip-component#reschedule::part(tc__content){left:58px}}tooltip-component#cancel::part(tc__content){left:-58px}@media screen and (max-width: 768px){tooltip-component#cancel::part(tc__content){left:58px}}', ji = zi;
|
|
2762
|
+
var Bi = function(e, t, n, a) {
|
|
2763
|
+
var o = arguments.length, i = o < 3 ? t : a === null ? a = Object.getOwnPropertyDescriptor(t, n) : a, r;
|
|
2764
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
2765
|
+
i = Reflect.decorate(e, t, n, a);
|
|
2766
|
+
else
|
|
2767
|
+
for (var l = e.length - 1; l >= 0; l--)
|
|
2768
|
+
(r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, n, i) : r(t, n)) || i);
|
|
2769
|
+
return o > 3 && i && Object.defineProperty(t, n, i), i;
|
|
2770
|
+
}, At = function(e, t) {
|
|
2771
|
+
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
2772
|
+
return Reflect.metadata(e, t);
|
|
2773
|
+
};
|
|
2774
|
+
const jn = class {
|
|
2775
|
+
constructor(e) {
|
|
2776
|
+
var t, n, a, o, i, r;
|
|
2777
|
+
E(this, e), this.valueChanged = R(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.defaultHideAdditionalGuests = ((n = (t = this.selectedConfiguration) == null ? void 0 : t.scheduler) == null ? void 0 : n.hide_additional_guests) ?? !1, this.defaultHideCancellationOptions = ((o = (a = this.selectedConfiguration) == null ? void 0 : a.scheduler) == null ? void 0 : o.hide_cancellation_options) ?? !1, this.defaultHideReschedulingOptions = ((r = (i = this.selectedConfiguration) == null ? void 0 : i.scheduler) == null ? void 0 : r.hide_rescheduling_options) ?? !1, this.name = "customize-booking-settings", this.allowGuestsToInvite = this.defaultHideAdditionalGuests, this.hideCancellationOptions = this.defaultHideCancellationOptions, this.hideReschedulingOptions = this.defaultHideReschedulingOptions;
|
|
2778
|
+
}
|
|
2779
|
+
elementNameChangedHandler(e) {
|
|
2780
|
+
d("nylas-customize-booking-settings", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
2781
|
+
}
|
|
2782
|
+
selectedConfigurationChangedHandler(e) {
|
|
2783
|
+
var t, n, a;
|
|
2784
|
+
d("nylas-customize-booking-settings", "selectedConfigurationChangedHandler", e), this.allowGuestsToInvite = !((t = e == null ? void 0 : e.scheduler) != null && t.hide_additional_guests), this.hideCancellationOptions = ((n = e == null ? void 0 : e.scheduler) == null ? void 0 : n.hide_cancellation_options) ?? !1, this.hideReschedulingOptions = ((a = e == null ? void 0 : e.scheduler) == null ? void 0 : a.hide_rescheduling_options) ?? !1;
|
|
2785
|
+
}
|
|
2786
|
+
connectedCallback() {
|
|
2787
|
+
d("nylas-customize-booking-settings", "connectedCallback");
|
|
2788
|
+
}
|
|
2789
|
+
disconnectedCallback() {
|
|
2790
|
+
d("nylas-customize-booking-settings", "disconnectedCallback");
|
|
2791
|
+
}
|
|
2792
|
+
componentWillLoad() {
|
|
2793
|
+
d("nylas-customize-booking-settings", "componentWillLoad"), this.host.setAttribute("name", this.name);
|
|
2794
|
+
}
|
|
2795
|
+
componentDidLoad() {
|
|
2796
|
+
d("nylas-customize-booking-settings", "componentDidLoad");
|
|
2797
|
+
}
|
|
2798
|
+
componentWillUpdate() {
|
|
2799
|
+
d("nylas-customize-booking-settings", "componentWillUpdate");
|
|
2800
|
+
}
|
|
2801
|
+
componentDidUpdate() {
|
|
2802
|
+
d("nylas-customize-booking-settings", "componentDidUpdate");
|
|
2803
|
+
}
|
|
2804
|
+
componentWillRender() {
|
|
2805
|
+
d("nylas-customize-booking-settings", "componentWillRender");
|
|
2806
|
+
}
|
|
2807
|
+
componentDidRender() {
|
|
2808
|
+
d("nylas-customize-booking-settings", "componentDidRender");
|
|
2809
|
+
}
|
|
2810
|
+
checkboxToggledHandler(e) {
|
|
2811
|
+
const { name: t, checked: n } = e.detail;
|
|
2812
|
+
switch (t) {
|
|
2813
|
+
case "hide_additional_guests":
|
|
2814
|
+
this.allowGuestsToInvite = n;
|
|
2815
|
+
break;
|
|
2816
|
+
case "hide_cancellation_options":
|
|
2817
|
+
this.hideCancellationOptions = n;
|
|
2818
|
+
break;
|
|
2819
|
+
case "hide_rescheduling_options":
|
|
2820
|
+
this.hideReschedulingOptions = n;
|
|
2821
|
+
break;
|
|
2822
|
+
}
|
|
2823
|
+
this.valueChanged.emit({
|
|
2824
|
+
value: JSON.stringify({
|
|
2825
|
+
additionalGuestsHidden: !this.allowGuestsToInvite,
|
|
2826
|
+
hideCancellationOptions: this.hideCancellationOptions,
|
|
2827
|
+
hideReschedulingOptions: this.hideReschedulingOptions
|
|
2828
|
+
}),
|
|
2829
|
+
name: this.name
|
|
2830
|
+
}), this.internals.setFormValue(JSON.stringify({
|
|
2831
|
+
additionalGuestsHidden: !this.allowGuestsToInvite,
|
|
2832
|
+
hideCancellationOptions: this.hideCancellationOptions,
|
|
2833
|
+
hideReschedulingOptions: this.hideReschedulingOptions
|
|
2834
|
+
}), this.name);
|
|
2835
|
+
}
|
|
2836
|
+
render() {
|
|
2837
|
+
return s($, { key: "e4b8a58d1b11c5a48d09bcf65fc1424c1bc8daf6" }, s("div", { key: "5e7b2a4cf3dbf3a3aefce2023ee884a491aeb1a1", class: "nylas-customize-booking-settings", part: "ncbs" }, s("div", { key: "b00c2654d1e76cfd8bfd41970c233df638fbde58", class: "header", part: "ncbs__header" }, s("h3", { key: "73b3a57ed1156a07a9e50b7362116ae455bd0bde" }, "Additional settings"), s("p", { key: "1e3b02068249923ab49bbc9cb0dc0551e35cba41" }, "Booking settings for the event.")), s("div", { key: "db140f831c461db9aa1127bc2cbead906928ca40", class: "nylas-customize-booking-settings__settings", part: "ncbs__settings" }, s("div", { key: "0d467d726d9799a912ba48c010905830e87d250b", class: "nylas-customize-booking-settings__settings-div", part: "ncbs__settings-div , ncbs__additional_guests" }, s("checkbox-component", { key: "658c73f67a1edb4d2e2e5110fe8e1b8b9054c686", name: "hide_additional_guests", label: "Allow guests to invite additional guests.", checked: this.allowGuestsToInvite }, s("span", { key: "12924a967738ab95afa28d81a2ba69496a20c8fd", slot: "label", class: "label" }, s("p", { key: "700b4f9ffef5a1e9b138a394023379c8d8a59962", class: "label-contents" }, "Allow guests to invite additional guests to the booking."), s("tooltip-component", { key: "85459fa4975ffc814967a4b4ae568b8cf0563dca", id: "guests" }, s("info-icon", { key: "21a724b0a34d252350f2b4e76aa1785cf95fa022", slot: "tooltip-icon" }), s("span", { key: "c3233a8ef448e68a5e36e682c48b0fbf527c226c", slot: "tooltip-content" }, "Allow guests to invite additional guests to the event. If enabled, the guest will be able to add additional guests' email addresses."))))), s("div", { key: "2ee5df5d0b689b832b9387d102a4b9cb44d020c1", class: "nylas-customize-booking-settings__settings-div", part: "ncbs__settings-div , ncbs__rescheduling_options" }, s("checkbox-component", { key: "ca74819cc2c08f3da7b80841169258f8786b8dc5", name: "hide_rescheduling_options", label: "Hide 'Reschedule' option on booking page and emails.", checked: this.hideReschedulingOptions }, s("span", { key: "f0de48b03ff4873ac342dd4f4c1de38ce6053c8a", slot: "label", class: "label" }, s("p", { key: "4b950091bf6dad75f8501d2c2b31bc40e02c6dd2", class: "label-contents" }, "Hide the ", s("strong", { key: "1eea34c7676eff933a15d946cd38df9659497ad6" }, "Reschedule"), " button on the Scheduling Page and in the email notifications."), s("tooltip-component", { key: "61335a5bc86df23bdad167f7fec9839047590491", id: "reschedule" }, s("info-icon", { key: "6885ed94a12a3ecde75e9c701d8fda056d187a52", slot: "tooltip-icon" }), s("span", { key: "49eae7dadcb8fffff94d319dbf39b11096a7b8cc", slot: "tooltip-content" }, "If enabled, the guest will not be able to reschedule the booking."))))), s("div", { key: "0bcbfbfc90e03d20a6021603eebe825433dca793", class: "nylas-customize-booking-settings__settings-div", part: "ncbs__settings-div , ncbs__cancellation_options" }, s("checkbox-component", { key: "73cea5cfd2643d930fc45dbcecc7bf72b35d53bf", name: "hide_cancellation_options", label: "Hide 'Cancel' option on booking page and emails.", checked: this.hideCancellationOptions }, s("span", { key: "61224ee172a9a1a9e176e612ec549a69863c5cc6", slot: "label", class: "label" }, s("p", { key: "d2e344036e3a51e434d83650d55030aec3590c72", class: "label-contents" }, "Hide the ", s("strong", { key: "b3778bae9c6b4d7d3ebb9ba8af97099bc5d1e79d" }, "Cancel"), " button on the Scheduling Page and in the email notifications."), s("tooltip-component", { key: "0f17015840a4037e078b5d3df6fd1283de9a210c", id: "cancel" }, s("info-icon", { key: "aae84e684fedb05e632787f94b2b69fe0a18d989", slot: "tooltip-icon" }), s("span", { key: "c0d38e54cc25a2a141f53d19f2ca40824995c068", slot: "tooltip-content" }, "If enabled, the guest will not be able to cancel the booking."))))))));
|
|
2838
|
+
}
|
|
2839
|
+
static get formAssociated() {
|
|
2840
|
+
return !0;
|
|
2841
|
+
}
|
|
2842
|
+
get host() {
|
|
2843
|
+
return F(this);
|
|
2844
|
+
}
|
|
2845
|
+
static get watchers() {
|
|
2846
|
+
return {
|
|
2847
|
+
name: ["elementNameChangedHandler"],
|
|
2848
|
+
selectedConfiguration: ["selectedConfigurationChangedHandler"]
|
|
2849
|
+
};
|
|
2850
|
+
}
|
|
2851
|
+
};
|
|
2852
|
+
Bi([
|
|
2853
|
+
M({
|
|
2854
|
+
name: "nylas-customize-booking-settings",
|
|
2855
|
+
stateToProps: /* @__PURE__ */ new Map([["schedulerConfig.selectedConfiguration", "selectedConfiguration"]]),
|
|
2856
|
+
fireRegisterEvent: !0
|
|
2857
|
+
}),
|
|
2858
|
+
At("design:type", Function),
|
|
2859
|
+
At("design:paramtypes", []),
|
|
2860
|
+
At("design:returntype", void 0)
|
|
2861
|
+
], jn.prototype, "render", null);
|
|
2862
|
+
jn.style = ji;
|
|
2863
|
+
const Wi = ':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}', Zi = Wi;
|
|
2864
|
+
var Vi = function(e, t, n, a) {
|
|
2865
|
+
var o = arguments.length, i = o < 3 ? t : a === null ? a = Object.getOwnPropertyDescriptor(t, n) : a, r;
|
|
2866
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
2867
|
+
i = Reflect.decorate(e, t, n, a);
|
|
2868
|
+
else
|
|
2869
|
+
for (var l = e.length - 1; l >= 0; l--)
|
|
2870
|
+
(r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, n, i) : r(t, n)) || i);
|
|
2871
|
+
return o > 3 && i && Object.defineProperty(t, n, i), i;
|
|
2872
|
+
}, $t = function(e, t) {
|
|
2873
|
+
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
2874
|
+
return Reflect.metadata(e, t);
|
|
2875
|
+
};
|
|
2876
|
+
const Bn = class {
|
|
2877
|
+
constructor(e) {
|
|
2878
|
+
var t, n;
|
|
2879
|
+
E(this, e), this.valueChanged = R(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.selectedConfiguration = void 0, this.eventDescription = void 0, this.name = "description", this.description = this.eventDescription || ((n = (t = this.selectedConfiguration) == null ? void 0 : t.event_booking) == null ? void 0 : n.description) || "";
|
|
2880
|
+
}
|
|
2881
|
+
elementNameChangedHandler(e) {
|
|
2882
|
+
d("nylas-event-description", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
2883
|
+
}
|
|
2884
|
+
selectedConfigurationChangedHandler(e, t) {
|
|
2885
|
+
var n, a;
|
|
2886
|
+
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);
|
|
2887
|
+
}
|
|
2888
|
+
connectedCallback() {
|
|
2889
|
+
d("nylas-event-description", "connectedCallback");
|
|
2890
|
+
}
|
|
2891
|
+
componentWillLoad() {
|
|
2892
|
+
d("nylas-event-description", "componentWillLoad"), this.host.setAttribute("name", this.name);
|
|
2893
|
+
}
|
|
2894
|
+
componentDidLoad() {
|
|
2895
|
+
d("nylas-event-description", "componentDidLoad");
|
|
2896
|
+
}
|
|
2897
|
+
disconnectedCallback() {
|
|
2898
|
+
d("nylas-event-description", "disconnectedCallback");
|
|
2899
|
+
}
|
|
2900
|
+
handleChange(e) {
|
|
2901
|
+
const t = ut(e.target.value);
|
|
2902
|
+
this.description = t, this.internals.setFormValue(t, "description"), this.valueChanged.emit({ value: t, name: this.name });
|
|
2903
|
+
}
|
|
2904
|
+
render() {
|
|
2905
|
+
return s($, { key: "ac483c56982373fb625c6d1af54eed749ce820e2" }, s("div", { key: "3924853ea2c94d72bf2a04a319bee5fc61eb7642", class: "nylas-event-description", part: "nedesc" }, s("label", { key: "e8f9990a4f0766de9691080ef02b823c4cd6beb4", htmlFor: "description" }, "Event description", s("span", { key: "dc7fa731cc60ed6e59032cdb35d0b410de300750", class: "label-icon" }, s("tooltip-component", { key: "1c0b1a5a547227bf7d4f499cc7c319349ec26e2d" }, s("info-icon", { key: "e74034f5a5d8ab86c0d497b15c9cb8016d22f38e", slot: "tooltip-icon" }), s("span", { key: "c5efa1fc3adc9290e39d40f1f7998e0c6bdd3bf4", slot: "tooltip-content" }, "Provide any additional details for your event.")))), s("textarea", { key: "45d8cc241ab90a24ec437499234b02cc401fa720", id: "description", part: "nedesc__textarea", name: "description", value: this.description, maxlength: "8192", onInput: (e) => this.handleChange(e) })));
|
|
2906
|
+
}
|
|
2907
|
+
static get formAssociated() {
|
|
2908
|
+
return !0;
|
|
2909
|
+
}
|
|
2910
|
+
get host() {
|
|
2911
|
+
return F(this);
|
|
2912
|
+
}
|
|
2913
|
+
static get watchers() {
|
|
2914
|
+
return {
|
|
2915
|
+
name: ["elementNameChangedHandler"],
|
|
2916
|
+
selectedConfiguration: ["selectedConfigurationChangedHandler"]
|
|
2917
|
+
};
|
|
2918
|
+
}
|
|
2919
|
+
};
|
|
2920
|
+
Vi([
|
|
2921
|
+
M({
|
|
2922
|
+
name: "nylas-event-description",
|
|
2923
|
+
stateToProps: /* @__PURE__ */ new Map([["schedulerConfig.selectedConfiguration", "selectedConfiguration"]]),
|
|
2924
|
+
eventToProps: {},
|
|
2925
|
+
fireRegisterEvent: !0
|
|
2926
|
+
}),
|
|
2927
|
+
$t("design:type", Function),
|
|
2928
|
+
$t("design:paramtypes", []),
|
|
2929
|
+
$t("design:returntype", void 0)
|
|
2930
|
+
], Bn.prototype, "render", null);
|
|
2931
|
+
Bn.style = Zi;
|
|
2932
|
+
const Ui = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.nylas-event-duration{display:flex;flex-direction:column;gap:4px}.nylas-event-duration label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:16px;font-style:normal;font-weight:400;line-height:150%;}.nylas-event-duration label span.required{color:var(--nylas-error, #cc4841)}.nylas-event-duration label span.label-icon{margin-left:4px}.nylas-event-duration label span.label-icon tooltip-component{display:flex}.nylas-event-duration__wrapper{display:flex;align-items:center;gap:0.5rem}.nylas-event-duration__wrapper input{padding:12px 16px;border-width:1;border-radius:8px;border:1px solid var(--nylas-base-200);font-family:var(--nylas-font-family);font-size:16px;line-height:24px;width:48px}.nylas-event-duration__wrapper input-dropdown::part(id_dropdown-input){border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);padding:14px 16px;width:50px}.nylas-event-duration__wrapper input-dropdown::part(id_dropdown-content){width:100%;min-width:unset;height:200px}.nylas-event-duration__wrapper select-dropdown{width:120px}@media screen and (max-width: 768px){.nylas-event-duration__wrapper select-dropdown{width:100%}}.nylas-event-duration__wrapper select-dropdown::part(sd_dropdown-button){border:1px solid var(--nylas-base-200)}', Gi = Ui;
|
|
2933
|
+
var qi = function(e, t, n, a) {
|
|
2934
|
+
var o = arguments.length, i = o < 3 ? t : a === null ? a = Object.getOwnPropertyDescriptor(t, n) : a, r;
|
|
2935
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
2936
|
+
i = Reflect.decorate(e, t, n, a);
|
|
2937
|
+
else
|
|
2938
|
+
for (var l = e.length - 1; l >= 0; l--)
|
|
2939
|
+
(r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, n, i) : r(t, n)) || i);
|
|
2940
|
+
return o > 3 && i && Object.defineProperty(t, n, i), i;
|
|
2941
|
+
}, Ft = function(e, t) {
|
|
2942
|
+
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
2943
|
+
return Reflect.metadata(e, t);
|
|
2944
|
+
};
|
|
2945
|
+
const Wn = class {
|
|
2946
|
+
constructor(e) {
|
|
2947
|
+
E(this, e), this.valueChanged = R(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.selectedConfiguration = void 0, this.name = "duration", this.eventDurationMinutes = void 0, this.duration = this.eventDurationMinutes ? this.eventDurationMinutes >= 60 ? this.eventDurationMinutes / 60 : this.eventDurationMinutes : 30, this.durationMinutes = this.eventDurationMinutes ?? 30, this.durationIncrement = this.eventDurationMinutes && this.eventDurationMinutes >= 60 ? 60 : 1, this.durationMinutesOptions = [
|
|
2948
|
+
{ value: 15, label: "15" },
|
|
2949
|
+
{ value: 30, label: "30" },
|
|
2950
|
+
{ value: 45, label: "45" },
|
|
2951
|
+
{ value: 60, label: "60" }
|
|
2952
|
+
];
|
|
2953
|
+
}
|
|
2954
|
+
elementNameChangedHandler(e) {
|
|
2955
|
+
d("nylas-event-duration", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
2956
|
+
}
|
|
2957
|
+
selectedConfigurationChangedHandler(e) {
|
|
2958
|
+
var n;
|
|
2959
|
+
const t = (n = e == null ? void 0 : e.availability) == null ? void 0 : n.duration_minutes;
|
|
2960
|
+
t && (this.duration = t >= 60 ? t / 60 : t, this.durationMinutes = t ?? 30, this.durationIncrement = t >= 60 ? 60 : 1);
|
|
2961
|
+
}
|
|
2962
|
+
durationMinutesChangedHandler(e, t) {
|
|
2963
|
+
d("nylas-event-duration", "durationMinutesChangedHandler", e), e !== t && this.valueChanged.emit({ value: e.toString(), name: this.name });
|
|
2964
|
+
}
|
|
2965
|
+
connectedCallback() {
|
|
2966
|
+
d("nylas-event-duration", "connectedCallback");
|
|
2967
|
+
}
|
|
2968
|
+
componentWillLoad() {
|
|
2969
|
+
d("nylas-event-duration", "componentWillLoad"), this.host.setAttribute("name", this.name), this.setDurationMintueOptions();
|
|
2970
|
+
}
|
|
2971
|
+
componentDidLoad() {
|
|
2972
|
+
d("nylas-event-duration", "componentDidLoad"), this.internals.setFormValue(this.durationMinutes.toString(), "duration");
|
|
2973
|
+
}
|
|
2974
|
+
disconnectedCallback() {
|
|
2975
|
+
d("nylas-event-duration", "disconnectedCallback");
|
|
2976
|
+
}
|
|
2977
|
+
setDurationMintueOptions() {
|
|
2978
|
+
return this.durationIncrement === 1 ? this.durationMinutesOptions = [
|
|
2979
|
+
{ value: 15, label: "15" },
|
|
2980
|
+
{ value: 30, label: "30" },
|
|
2981
|
+
{ value: 45, label: "45" },
|
|
2982
|
+
{ value: 60, label: "60" }
|
|
2983
|
+
] : this.durationMinutesOptions = Array.from({ length: 23 }, (e, t) => ({ value: t + 1, label: (t + 1).toString() })), this.durationMinutesOptions;
|
|
2984
|
+
}
|
|
2985
|
+
handleChange(e) {
|
|
2986
|
+
this.duration = e.target.value, this.durationMinutes = this.duration * this.durationIncrement, this.internals.setFormValue(this.durationMinutes.toString(), this.name);
|
|
2987
|
+
}
|
|
2988
|
+
nylasFormDropdownChangedHandler(e) {
|
|
2989
|
+
d("nylas-calendar-picker", "nylasFormDropdownChangedHandler", e.detail);
|
|
2990
|
+
const { value: t } = e.detail;
|
|
2991
|
+
this.durationIncrement = parseInt(t), this.durationIncrement === 1 ? this.duration = 60 : this.duration = 1, this.setDurationMintueOptions(), this.durationMinutes = this.duration * this.durationIncrement, this.internals.setFormValue(this.durationMinutes.toString(), "duration");
|
|
2992
|
+
}
|
|
2993
|
+
inputOptionChangedHandler(e) {
|
|
2994
|
+
d("nylas-calendar-picker", "inputOptionChangedHandler", e.detail);
|
|
2995
|
+
const { value: t } = e.detail;
|
|
2996
|
+
this.duration = t, this.durationMinutes = this.duration * this.durationIncrement, this.internals.setFormValue(this.durationMinutes.toString(), this.name);
|
|
2997
|
+
}
|
|
2998
|
+
render() {
|
|
2999
|
+
const e = [
|
|
3000
|
+
{ value: 1, label: "minute" },
|
|
3001
|
+
{ value: 60, label: "hour" }
|
|
3002
|
+
];
|
|
3003
|
+
return s($, { key: "c8ab90c7a45ce6a5379552af0a9059b9d829e82c" }, s("div", { key: "d957e610bd31a55430235b0ca903905c8bf3706b", class: "nylas-event-duration", part: "ned" }, s("label", { key: "39324d77ad9da4bc0c1f36d15c28384f423c1976", htmlFor: "duration" }, "Event duration", s("span", { key: "8f222a8a5d03899ff06790133434028dd1a62cd4", class: "required" }, "*"), s("span", { key: "6b83c675faa33db229ded711eac8c1f565bc9a61", class: "label-icon" }, s("tooltip-component", { key: "01b7ba340e2883e5a22d4559f67feda4bc745109" }, s("info-icon", { key: "acbfa3dcbc994dec0e502ea9ded00612bf24b315", slot: "tooltip-icon" }), s("span", { key: "e691c2a8ce4953e448cb6850ab2648645ae688c0", slot: "tooltip-content" }, "Set the duration of your event.")))), s("div", { key: "294766a022ba73042705050bc2fbc294cd1433b4", class: "nylas-event-duration__wrapper" }, s("input-dropdown", { key: "9a61a9527ae4c9991dc1f1596fbed85a5dd57966", name: "event-duration", options: this.durationMinutesOptions, inputValue: this.duration.toString(), exportparts: "id_dropdown: ned__input_dropdown, id_dropdown-input: ned__input_dropdown-input, id_dropdown-content: ned__input_dropdown-content", defaultInputOption: this.durationMinutesOptions.find((t) => t.value == this.duration) ?? e[0] }), s("select-dropdown", { key: "edcda0700a80961b9a8b9f325288d70a1aa4e6f0", name: "event-duration", options: e, pluralizedLabel: this.duration > 1 ? "s" : "", exportparts: "sd_dropdown: ned__dropdown, sd_dropdown-button: ned__dropdown-button, sd_dropdown-content: ned__dropdown-content", defaultSelectedOption: e.find((t) => t.value == this.durationIncrement) ?? e[0], withSearch: !1 }))));
|
|
3004
|
+
}
|
|
3005
|
+
static get formAssociated() {
|
|
3006
|
+
return !0;
|
|
3007
|
+
}
|
|
3008
|
+
get host() {
|
|
3009
|
+
return F(this);
|
|
3010
|
+
}
|
|
3011
|
+
static get watchers() {
|
|
3012
|
+
return {
|
|
3013
|
+
name: ["elementNameChangedHandler"],
|
|
3014
|
+
selectedConfiguration: ["selectedConfigurationChangedHandler"],
|
|
3015
|
+
durationMinutes: ["durationMinutesChangedHandler"]
|
|
3016
|
+
};
|
|
3017
|
+
}
|
|
3018
|
+
};
|
|
3019
|
+
qi([
|
|
3020
|
+
M({
|
|
3021
|
+
name: "nylas-event-duration",
|
|
3022
|
+
stateToProps: /* @__PURE__ */ new Map([["schedulerConfig.selectedConfiguration", "selectedConfiguration"]]),
|
|
3023
|
+
eventToProps: {},
|
|
3024
|
+
fireRegisterEvent: !0
|
|
3025
|
+
}),
|
|
3026
|
+
Ft("design:type", Function),
|
|
3027
|
+
Ft("design:paramtypes", []),
|
|
3028
|
+
Ft("design:returntype", void 0)
|
|
3029
|
+
], Wn.prototype, "render", null);
|
|
3030
|
+
Wn.style = Gi;
|
|
3031
|
+
const Yi = ':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}', Xi = Yi;
|
|
3032
|
+
var Ki = function(e, t, n, a) {
|
|
3033
|
+
var o = arguments.length, i = o < 3 ? t : a === null ? a = Object.getOwnPropertyDescriptor(t, n) : a, r;
|
|
3034
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
3035
|
+
i = Reflect.decorate(e, t, n, a);
|
|
3036
|
+
else
|
|
3037
|
+
for (var l = e.length - 1; l >= 0; l--)
|
|
3038
|
+
(r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, n, i) : r(t, n)) || i);
|
|
3039
|
+
return o > 3 && i && Object.defineProperty(t, n, i), i;
|
|
3040
|
+
}, Mt = function(e, t) {
|
|
3041
|
+
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
3042
|
+
return Reflect.metadata(e, t);
|
|
3043
|
+
};
|
|
3044
|
+
const Zn = class {
|
|
3045
|
+
constructor(e) {
|
|
3046
|
+
E(this, e), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals);
|
|
3047
|
+
}
|
|
3048
|
+
connectedCallback() {
|
|
3049
|
+
d("nylas-event-info", "connectedCallback");
|
|
3050
|
+
}
|
|
3051
|
+
componentWillLoad() {
|
|
3052
|
+
d("nylas-event-info", "componentWillLoad");
|
|
3053
|
+
}
|
|
3054
|
+
componentDidLoad() {
|
|
3055
|
+
d("nylas-event-info", "componentDidLoad"), vn(["inputs"], this.el);
|
|
3056
|
+
}
|
|
3057
|
+
disconnectedCallback() {
|
|
3058
|
+
d("nylas-event-info", "disconnectedCallback");
|
|
3059
|
+
}
|
|
3060
|
+
render() {
|
|
3061
|
+
return s($, { key: "5f564432511a1351e5e8bdbac5dc0303765e0a6a" }, s("nylas-form-card", { key: "75284e8eb9d11dcb548ae40230eaaf9593031e0a" }, s("h1", { key: "1482f862ad8a2aee526dee6450630e6668ac9a96", slot: "header-title", class: "nylas-event-info__title" }, "Event information"), s("h3", { key: "d35b92677b59ed816c3403053d83e2a5083f0e31", slot: "header-subtitle", class: "nylas-event-info__subtitle" }, "Enter all event information."), s("div", { key: "9dcf97e73f85cb3187e9070c8b6c028a0bc723cc", slot: "content", class: "nylas-event-info__content" }, s("slot", { key: "fe970940fb8275e0679dafb724a38d94393a88e5", name: "inputs" }))));
|
|
3062
|
+
}
|
|
3063
|
+
static get formAssociated() {
|
|
3064
|
+
return !0;
|
|
3065
|
+
}
|
|
3066
|
+
get el() {
|
|
3067
|
+
return F(this);
|
|
3068
|
+
}
|
|
3069
|
+
};
|
|
3070
|
+
Ki([
|
|
3071
|
+
M({
|
|
3072
|
+
name: "nylas-event-info",
|
|
3073
|
+
eventToProps: {},
|
|
3074
|
+
fireRegisterEvent: !0
|
|
3075
|
+
}),
|
|
3076
|
+
Mt("design:type", Function),
|
|
3077
|
+
Mt("design:paramtypes", []),
|
|
3078
|
+
Mt("design:returntype", void 0)
|
|
3079
|
+
], Zn.prototype, "render", null);
|
|
3080
|
+
Zn.style = Xi;
|
|
3081
|
+
const Ji = ':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}', Qi = Ji;
|
|
3082
|
+
var eo = function(e, t, n, a) {
|
|
3083
|
+
var o = arguments.length, i = o < 3 ? t : a === null ? a = Object.getOwnPropertyDescriptor(t, n) : a, r;
|
|
3084
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
3085
|
+
i = Reflect.decorate(e, t, n, a);
|
|
3086
|
+
else
|
|
3087
|
+
for (var l = e.length - 1; l >= 0; l--)
|
|
3088
|
+
(r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, n, i) : r(t, n)) || i);
|
|
3089
|
+
return o > 3 && i && Object.defineProperty(t, n, i), i;
|
|
3090
|
+
}, Lt = function(e, t) {
|
|
3091
|
+
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
3092
|
+
return Reflect.metadata(e, t);
|
|
3093
|
+
};
|
|
3094
|
+
const Vn = class {
|
|
3095
|
+
constructor(e) {
|
|
3096
|
+
E(this, e), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals);
|
|
3097
|
+
}
|
|
3098
|
+
connectedCallback() {
|
|
3099
|
+
d("nylas-event-limits", "connectedCallback");
|
|
3100
|
+
}
|
|
3101
|
+
componentWillLoad() {
|
|
3102
|
+
d("nylas-event-limits", "componentWillLoad");
|
|
3103
|
+
}
|
|
3104
|
+
componentDidLoad() {
|
|
3105
|
+
d("nylas-event-limits", "componentDidLoad"), vn(["inputs"], this.el);
|
|
3106
|
+
}
|
|
3107
|
+
disconnectedCallback() {
|
|
3108
|
+
d("nylas-event-limits", "disconnectedCallback");
|
|
3109
|
+
}
|
|
3110
|
+
render() {
|
|
3111
|
+
return s($, { key: "81356f24164740aaf113f8fd84e3f6714ca829df" }, s("nylas-form-card", { key: "dfc9c16453647679008959338ae4c06ef69720da" }, s("h1", { key: "2b044c04c7f942152af886591deaf6a00461c59c", slot: "header-title", class: "nylas-event-limits__title" }, "Event limits"), s("h3", { key: "23d8271193ffd6d0f090a2a3d1088d57a5d3df30", slot: "header-subtitle", class: "nylas-event-limits__subtitle" }, "Manage event limits."), s("div", { key: "fc53feb009f6c2d89fb9a9c20de48f4384f46f86", slot: "content", class: "nylas-event-limits__content" }, s("slot", { key: "c0e67e0851c76273b8ee998181e1a0639ae5ab15", name: "inputs" }))));
|
|
3112
|
+
}
|
|
3113
|
+
static get formAssociated() {
|
|
3114
|
+
return !0;
|
|
3115
|
+
}
|
|
3116
|
+
get el() {
|
|
3117
|
+
return F(this);
|
|
3118
|
+
}
|
|
3119
|
+
};
|
|
3120
|
+
eo([
|
|
3121
|
+
M({
|
|
3122
|
+
name: "nylas-event-limits",
|
|
3123
|
+
eventToProps: {},
|
|
3124
|
+
fireRegisterEvent: !0
|
|
3125
|
+
}),
|
|
3126
|
+
Lt("design:type", Function),
|
|
3127
|
+
Lt("design:paramtypes", []),
|
|
3128
|
+
Lt("design:returntype", void 0)
|
|
3129
|
+
], Vn.prototype, "render", null);
|
|
3130
|
+
Vn.style = Qi;
|
|
3131
|
+
const to = ':host{--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.nylas-event-location{display:flex;flex-direction:column;gap:4px;font-family:var(--nylas-font-family)}.nylas-event-location label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:16px;font-style:normal;font-weight:400;line-height:150%;}.nylas-event-location label span.label-icon{margin-left:4px}.nylas-event-location label span.label-icon tooltip-component{display:flex}.nylas-event-location span[slot=select-icon]{border-right:1px solid var(--nylas-base-200);padding:16px 0.75rem 16px 0.5rem;border-radius:var(--nylas-border-radius-2x);border-bottom-right-radius:0;border-top-right-radius:0;height:20px}.nylas-event-location div.location-input{display:grid;grid-template-columns:auto 1fr;width:100%;gap:0.5rem}@media screen and (max-width: 768px){.nylas-event-location div.location-input{grid-template-columns:1fr}}.nylas-event-location div.location-input input{border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);padding:12px 16px;font-family:var(--nylas-font-family);font-size:16px;line-height:24px}.nylas-event-location select-dropdown{width:208px}@media screen and (max-width: 768px){.nylas-event-location select-dropdown{width:100%}}.nylas-event-location select-dropdown::part(sd_dropdown){width:100%}.nylas-event-location select-dropdown::part(sd_dropdown-content){left:calc(35px + 0.5rem)}.nylas-event-location select-dropdown::part(sd_dropdown-button){display:flex;justify-content:space-between;width:100%;border:1px solid var(--nylas-base-200);padding:0 0.5rem}.nylas-event-location select-dropdown::part(sd_dropdown-button-selected-label){display:inline-flex;align-self:center;padding:14px 0;font-family:var(--nylas-font-family);font-size:16px;line-height:24px}', no = to;
|
|
3132
|
+
var ao = function(e, t, n, a) {
|
|
3133
|
+
var o = arguments.length, i = o < 3 ? t : a === null ? a = Object.getOwnPropertyDescriptor(t, n) : a, r;
|
|
3134
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
3135
|
+
i = Reflect.decorate(e, t, n, a);
|
|
3136
|
+
else
|
|
3137
|
+
for (var l = e.length - 1; l >= 0; l--)
|
|
3138
|
+
(r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, n, i) : r(t, n)) || i);
|
|
3139
|
+
return o > 3 && i && Object.defineProperty(t, n, i), i;
|
|
3140
|
+
}, Rt = function(e, t) {
|
|
3141
|
+
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
3142
|
+
return Reflect.metadata(e, t);
|
|
3143
|
+
};
|
|
3144
|
+
const Un = class {
|
|
3145
|
+
constructor(e) {
|
|
3146
|
+
E(this, e), this.valueChanged = R(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.name = "location", this.userProvider = void 0, this.eventConferencing = void 0, this.conferenceProviders = void 0, this.selectedConfiguration = void 0, this.eventLocation = void 0, this.location = this.eventLocation ?? "", this.grantId = this.setDefaultGrantID(), this.selectedLocationOption = this.setDefaultLocationOption();
|
|
3147
|
+
}
|
|
3148
|
+
elementNameChangedHandler(e) {
|
|
3149
|
+
d("nylas-event-location", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
3150
|
+
}
|
|
3151
|
+
selectedConfigurationChangedHandler(e, t) {
|
|
3152
|
+
var o, i;
|
|
3153
|
+
d("nylas-custom-booking-flow", "selectedConfigurationChangedHandler", e, t);
|
|
3154
|
+
const n = (o = e == null ? void 0 : e.event_booking) == null ? void 0 : o.location;
|
|
3155
|
+
if ((i = e == null ? void 0 : e.event_booking) == null ? void 0 : i.conferencing) {
|
|
3156
|
+
this.selectedLocationOption = this.setDefaultLocationOption(), this.grantId = this.setDefaultGrantID(), this.location = n ?? "";
|
|
3157
|
+
return;
|
|
3158
|
+
}
|
|
3159
|
+
if (n) {
|
|
3160
|
+
this.selectedLocationOption = n ? "custom" : "none", this.location = n;
|
|
3161
|
+
return;
|
|
3162
|
+
}
|
|
3163
|
+
}
|
|
3164
|
+
eventLocationChangedHandler(e, t) {
|
|
3165
|
+
d("nylas-event-location", "eventLocationChangedHandler", e);
|
|
3166
|
+
}
|
|
3167
|
+
connectedCallback() {
|
|
3168
|
+
d("nylas-event-location", "connectedCallback");
|
|
3169
|
+
}
|
|
3170
|
+
componentWillLoad() {
|
|
3171
|
+
d("nylas-event-location", "componentWillLoad"), this.host.setAttribute("name", this.name);
|
|
3172
|
+
}
|
|
3173
|
+
componentDidLoad() {
|
|
3174
|
+
d("nylas-event-location", "componentDidLoad");
|
|
3175
|
+
}
|
|
3176
|
+
disconnectedCallback() {
|
|
3177
|
+
d("nylas-event-location", "disconnectedCallback");
|
|
3178
|
+
}
|
|
3179
|
+
nylasFormDropdownChangedHandler(e) {
|
|
3180
|
+
var n, a, o;
|
|
3181
|
+
this.selectedLocationOption = e.detail.value;
|
|
3182
|
+
let t;
|
|
3183
|
+
switch (this.selectedLocationOption) {
|
|
3184
|
+
case "none":
|
|
3185
|
+
this.location = "", this.setFormValue("", this.name), this.valueChanged.emit({ value: "", name: this.name }), this.valueChanged.emit({ value: JSON.stringify({}), name: "conference" });
|
|
3186
|
+
break;
|
|
3187
|
+
case "custom":
|
|
3188
|
+
this.valueChanged.emit({ value: JSON.stringify({}), name: "conference" });
|
|
3189
|
+
break;
|
|
3190
|
+
case "google":
|
|
3191
|
+
this.location = "", this.setFormValue("", this.name);
|
|
3192
|
+
const i = (n = this.conferenceProviders) == null ? void 0 : n.google;
|
|
3193
|
+
t = {
|
|
3194
|
+
provider: bt.google,
|
|
3195
|
+
autocreate: i ? {
|
|
3196
|
+
conf_grant_id: i
|
|
3197
|
+
} : {}
|
|
3198
|
+
}, this.valueChanged.emit({ value: JSON.stringify(t), name: "conference" }), this.valueChanged.emit({ value: "", name: this.name });
|
|
3199
|
+
break;
|
|
3200
|
+
case "microsoft":
|
|
3201
|
+
this.location = "", this.setFormValue("", this.name);
|
|
3202
|
+
const r = (a = this.conferenceProviders) == null ? void 0 : a.microsoft;
|
|
3203
|
+
t = {
|
|
3204
|
+
provider: bt.microsoft,
|
|
3205
|
+
autocreate: r ? {
|
|
3206
|
+
conf_grant_id: r
|
|
3207
|
+
} : {}
|
|
3208
|
+
}, this.valueChanged.emit({ value: JSON.stringify(t), name: "conference" }), this.valueChanged.emit({ value: "", name: this.name });
|
|
3209
|
+
break;
|
|
3210
|
+
case "zoom":
|
|
3211
|
+
this.location = "", this.setFormValue("", this.name);
|
|
3212
|
+
const l = (o = this.conferenceProviders) == null ? void 0 : o.zoom;
|
|
3213
|
+
t = {
|
|
3214
|
+
provider: bt.zoom,
|
|
3215
|
+
autocreate: l ? {
|
|
3216
|
+
conf_grant_id: l
|
|
3217
|
+
} : {}
|
|
3218
|
+
}, this.valueChanged.emit({ value: JSON.stringify(t), name: "conference" }), this.valueChanged.emit({ value: "", name: this.name });
|
|
3219
|
+
break;
|
|
3220
|
+
}
|
|
3221
|
+
}
|
|
3222
|
+
setDefaultLocationOption() {
|
|
3223
|
+
return this.eventConferencing != null && this.eventConferencing.provider != null && this.eventConferencing.autocreate != null ? oa[this.eventConferencing.provider] : this.eventLocation ? "custom" : "none";
|
|
3224
|
+
}
|
|
3225
|
+
setDefaultGrantID() {
|
|
3226
|
+
return this.eventConferencing != null && this.eventConferencing.autocreate != null ? this.eventConferencing.autocreate.conf_grant_id : "";
|
|
3227
|
+
}
|
|
3228
|
+
setFormValue(e, t) {
|
|
3229
|
+
typeof this.internals.setFormValue == "function" && this.internals.setFormValue(e, t);
|
|
3230
|
+
}
|
|
3231
|
+
handleChange(e) {
|
|
3232
|
+
const t = ut(e.target.value);
|
|
3233
|
+
this.location = t, this.setFormValue(t, this.name), this.valueChanged.emit({ value: t, name: this.name });
|
|
3234
|
+
}
|
|
3235
|
+
render() {
|
|
3236
|
+
const e = [
|
|
3237
|
+
{ value: "none", label: "None" },
|
|
3238
|
+
{ value: "custom", label: "Custom location" },
|
|
3239
|
+
{ value: "zoom", label: "Zoom Meeting" }
|
|
3240
|
+
];
|
|
3241
|
+
switch (this.userProvider) {
|
|
3242
|
+
case "google":
|
|
3243
|
+
e.push({ value: "google", label: "Google Meet" });
|
|
3244
|
+
break;
|
|
3245
|
+
case "microsoft":
|
|
3246
|
+
e.push({ value: "microsoft", label: "Microsoft Teams" });
|
|
3247
|
+
break;
|
|
3248
|
+
}
|
|
3249
|
+
const t = {
|
|
3250
|
+
none: s("location-off-icon", { key: "0bf1a447f95e05ceadbaf0902faa2d920e1b4e79" }),
|
|
3251
|
+
custom: s("location-icon", { key: "f7440a1b12d48fb270ea9de5a8671059108facd8" }),
|
|
3252
|
+
google: s("google-meet-icon", { key: "199a25e487a48b7207179412a7147f289f8d0def" }),
|
|
3253
|
+
microsoft: s("microsoft-teams-icon", { key: "b47c34ee073727a0310d1200731233b941e512b8" }),
|
|
3254
|
+
zoom: s("zoom-icon", { key: "3615491a2aa416e41e641c8139aeeb705ca15913" })
|
|
3255
|
+
};
|
|
3256
|
+
return s($, { key: "1fb50aa4c2fcec7873167251e6a7840493790ddb" }, s("div", { key: "433dd3321b4c28f6a7a5d4b8350091aa347f7801", class: "nylas-event-location", part: "nel" }, s("label", { key: "6e401ce5dfb5670c243d41e907ec8a49b591a69d", htmlFor: "location" }, "Location type", s("span", { key: "1aef726641f0175721c03612c410a0b005c5c3fc", class: "label-icon" }, s("tooltip-component", { key: "51ff81cf52c017a10ffbdbe101e22c5640a319d8" }, s("info-icon", { key: "d1e3ec173514e054995616cba51ed0d4bd48d85d", slot: "tooltip-icon" }), s("span", { key: "4715fb361cfc795f506f2b90b7a0f3dd213e8e4f", 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.")))), s("div", { key: "86de8f7fee6c267a9c36116e7430fa2857f46788", class: "location-input" }, s("select-dropdown", { key: "b01d435951f89cf02f41b6294025ca82635c8a50", withSearch: !1, name: "location", options: e.reverse(), 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" }, s("span", { key: "3b386ef7d0609684f9b00da1ce5641b32d0bab9b", slot: "select-icon" }, t[this.selectedLocationOption])), this.selectedLocationOption === "custom" && s("input", { type: "text", part: "nel__location", id: "location", name: "location", maxlength: "1024", value: this.location, onInput: (n) => this.handleChange(n) }))));
|
|
3257
|
+
}
|
|
3258
|
+
static get formAssociated() {
|
|
3259
|
+
return !0;
|
|
3260
|
+
}
|
|
3261
|
+
get host() {
|
|
3262
|
+
return F(this);
|
|
3263
|
+
}
|
|
3264
|
+
static get watchers() {
|
|
3265
|
+
return {
|
|
3266
|
+
name: ["elementNameChangedHandler"],
|
|
3267
|
+
selectedConfiguration: ["selectedConfigurationChangedHandler"],
|
|
3268
|
+
eventLocation: ["eventLocationChangedHandler"]
|
|
3269
|
+
};
|
|
3270
|
+
}
|
|
3271
|
+
};
|
|
3272
|
+
ao([
|
|
3273
|
+
M({
|
|
3274
|
+
name: "nylas-event-location",
|
|
3275
|
+
stateToProps: /* @__PURE__ */ new Map([
|
|
3276
|
+
["schedulerConfig.selectedConfiguration", "selectedConfiguration"],
|
|
3277
|
+
["schedulerConfig.conferenceProviders", "conferenceProviders"]
|
|
3278
|
+
]),
|
|
3279
|
+
eventToProps: {},
|
|
3280
|
+
fireRegisterEvent: !0
|
|
3281
|
+
}),
|
|
3282
|
+
Rt("design:type", Function),
|
|
3283
|
+
Rt("design:paramtypes", []),
|
|
3284
|
+
Rt("design:returntype", void 0)
|
|
3285
|
+
], Un.prototype, "render", null);
|
|
3286
|
+
Un.style = no;
|
|
3287
|
+
const io = ':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)}', oo = io;
|
|
3288
|
+
var so = function(e, t, n, a) {
|
|
3289
|
+
var o = arguments.length, i = o < 3 ? t : a === null ? a = Object.getOwnPropertyDescriptor(t, n) : a, r;
|
|
3290
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
3291
|
+
i = Reflect.decorate(e, t, n, a);
|
|
3292
|
+
else
|
|
3293
|
+
for (var l = e.length - 1; l >= 0; l--)
|
|
3294
|
+
(r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, n, i) : r(t, n)) || i);
|
|
3295
|
+
return o > 3 && i && Object.defineProperty(t, n, i), i;
|
|
3296
|
+
}, zt = function(e, t) {
|
|
3297
|
+
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
3298
|
+
return Reflect.metadata(e, t);
|
|
3299
|
+
};
|
|
3300
|
+
const Gn = class {
|
|
3301
|
+
constructor(e) {
|
|
3302
|
+
var t, n;
|
|
3303
|
+
E(this, e), this.valueChanged = R(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 = rn.map((a) => ({
|
|
3304
|
+
label: a.token,
|
|
3305
|
+
value: a.value,
|
|
3306
|
+
labelHTML: a
|
|
3307
|
+
})), this.filteredTokens = this.availableTokens, this.ariaActivedescendant = "", this.currentWord = { $value: "", fullText: "", index: -1, focusOffset: -1 }, this.validationError = "";
|
|
3308
|
+
}
|
|
3309
|
+
elementNameChangedHandler(e) {
|
|
3310
|
+
d("nylas-event-title", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
3311
|
+
}
|
|
3312
|
+
ariaActivedescendantChangedHandler(e) {
|
|
3313
|
+
var t, n;
|
|
3314
|
+
if (d("nylas-event-title", "ariaActivedescendantChangedHandler", e), e !== "") {
|
|
3315
|
+
const a = (t = this.host.shadowRoot) == null ? void 0 : t.getElementById(e);
|
|
3316
|
+
a == null || a.classList.add("active");
|
|
3317
|
+
} else {
|
|
3318
|
+
const a = (n = this.host.shadowRoot) == null ? void 0 : n.querySelectorAll(".token-options li.active");
|
|
3319
|
+
a == null || a.forEach((o) => o.classList.remove("active"));
|
|
3320
|
+
}
|
|
3321
|
+
}
|
|
3322
|
+
configChangedHandler(e) {
|
|
3323
|
+
var n;
|
|
3324
|
+
const t = (n = e == null ? void 0 : e.event_booking) == null ? void 0 : n.title;
|
|
3325
|
+
t && this.updateEventTitleFromProp(t);
|
|
3326
|
+
}
|
|
3327
|
+
connectedCallback() {
|
|
3328
|
+
d("nylas-event-title", "connectedCallback");
|
|
3329
|
+
}
|
|
3330
|
+
componentWillLoad() {
|
|
3331
|
+
d("nylas-event-title", "componentWillLoad"), this.host.setAttribute("name", this.name);
|
|
3332
|
+
}
|
|
3333
|
+
componentDidLoad() {
|
|
3334
|
+
d("nylas-event-title", "componentDidLoad"), this.updateEventTitleFromProp(this.eventTitle || "");
|
|
3335
|
+
}
|
|
3336
|
+
disconnectedCallback() {
|
|
3337
|
+
d("nylas-event-title", "disconnectedCallback");
|
|
3338
|
+
}
|
|
3339
|
+
formSubmittedHandler(e) {
|
|
3340
|
+
var t, n;
|
|
3341
|
+
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";
|
|
3342
|
+
}
|
|
3343
|
+
updateEventTitleFromProp(e) {
|
|
3344
|
+
var t, n;
|
|
3345
|
+
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 })));
|
|
3346
|
+
}
|
|
3347
|
+
highlightTokens(e) {
|
|
3348
|
+
let t = e;
|
|
3349
|
+
return rn.forEach((n) => {
|
|
3350
|
+
const a = n.value, o = new RegExp(`(\\${a})(?!\\w)`, "g");
|
|
3351
|
+
t = t.replace(o, '<span class="highlighted-tag">$1</span>');
|
|
3352
|
+
}), t;
|
|
3353
|
+
}
|
|
3354
|
+
getCurrentSelectionForBrowser() {
|
|
3355
|
+
var a, o, i;
|
|
3356
|
+
const e = (r, l, c, f) => {
|
|
3357
|
+
const p = r.replace(/[\u200B-\u200D\uFEFF]/g, ""), u = p.lastIndexOf("$"), b = p.substring(u).split(" ")[0];
|
|
3358
|
+
return {
|
|
3359
|
+
focusOffset: l,
|
|
3360
|
+
dollarIndex: u,
|
|
3361
|
+
lastWord: b,
|
|
3362
|
+
currentText: p,
|
|
3363
|
+
node: c,
|
|
3364
|
+
allSelected: f
|
|
3365
|
+
};
|
|
3366
|
+
}, t = (r) => {
|
|
3367
|
+
var l, c;
|
|
3368
|
+
return r.anchorOffset === 0 && r.focusOffset === ((c = (l = r.focusNode) == null ? void 0 : l.nodeValue) == null ? void 0 : c.length);
|
|
3369
|
+
};
|
|
3370
|
+
switch (aa()) {
|
|
3371
|
+
case "Chrome":
|
|
3372
|
+
const r = (a = this.host.shadowRoot) == null ? void 0 : a.getSelection(), l = r == null ? void 0 : r.focusNode, c = (l == null ? void 0 : l.nodeValue) || "", f = r && t(r);
|
|
3373
|
+
return e(c, (r == null ? void 0 : r.focusOffset) || -1, l, f);
|
|
3374
|
+
case "Firefox":
|
|
3375
|
+
const p = document.getSelection(), u = ((o = p == null ? void 0 : p.anchorNode) == null ? void 0 : o.nodeValue) || "", b = p && t(p);
|
|
3376
|
+
return e(u, (p == null ? void 0 : p.focusOffset) || -1, p == null ? void 0 : p.anchorNode, b);
|
|
3377
|
+
case "Safari":
|
|
3378
|
+
const v = window.getSelection(), y = v == null ? void 0 : v.getComposedRanges(this.host.shadowRoot)[0], k = ((i = y == null ? void 0 : y.startContainer) == null ? void 0 : i.nodeValue) || "", S = v && t(v);
|
|
3379
|
+
return e(k, (y == null ? void 0 : y.endOffset) || -1, y == null ? void 0 : y.startContainer, S);
|
|
3380
|
+
default:
|
|
3381
|
+
return console.warn("Browser not supported"), null;
|
|
3382
|
+
}
|
|
3383
|
+
}
|
|
3384
|
+
handleChange(e) {
|
|
3385
|
+
let t = e.target.textContent || "";
|
|
3386
|
+
t = ut(t);
|
|
3387
|
+
const n = this.getCurrentSelectionForBrowser();
|
|
3388
|
+
if (!n) {
|
|
3389
|
+
this.updateEventTitle(t), this.resetDropdown();
|
|
3390
|
+
return;
|
|
3391
|
+
}
|
|
3392
|
+
const { focusOffset: a, dollarIndex: o, lastWord: i, currentText: r } = n;
|
|
3393
|
+
if (o === -1 || a < o) {
|
|
3394
|
+
this.updateEventTitle(t), this.resetDropdown();
|
|
3395
|
+
return;
|
|
3396
|
+
}
|
|
3397
|
+
i.startsWith("$") ? (this.showTokens = !0, this.currentWord = {
|
|
3398
|
+
$value: i,
|
|
3399
|
+
fullText: r,
|
|
3400
|
+
index: o,
|
|
3401
|
+
focusOffset: a
|
|
3402
|
+
}, this.populateSuggestionsDropdown(i)) : this.resetDropdown(), this.updateEventTitle(t);
|
|
3403
|
+
}
|
|
3404
|
+
handleInputKeyDown(e) {
|
|
3405
|
+
var n, a, o, i;
|
|
3406
|
+
const t = this.getCurrentSelectionForBrowser();
|
|
3407
|
+
if (t != null && t.allSelected && !na(e) && (this.titleRef.innerHTML = ""), e.key === "Enter") {
|
|
3408
|
+
e.preventDefault();
|
|
3409
|
+
const r = (n = this.host.shadowRoot) == null ? void 0 : n.getElementById(this.ariaActivedescendant);
|
|
3410
|
+
r && (r.click(), this.ariaActivedescendant = "");
|
|
3411
|
+
} else if (e.key === "ArrowDown") {
|
|
3412
|
+
e.preventDefault();
|
|
3413
|
+
const r = (a = this.host.shadowRoot) == null ? void 0 : a.getElementById(this.ariaActivedescendant);
|
|
3414
|
+
if (r) {
|
|
3415
|
+
const l = r.nextElementSibling;
|
|
3416
|
+
l ? this.ariaActivedescendant = l.id : this.ariaActivedescendant = this.filteredTokens[0].label;
|
|
3417
|
+
} else
|
|
3418
|
+
this.ariaActivedescendant = this.filteredTokens[0].label;
|
|
3419
|
+
} else if (e.key === "ArrowUp") {
|
|
3420
|
+
e.preventDefault();
|
|
3421
|
+
const r = (o = this.host.shadowRoot) == null ? void 0 : o.getElementById(this.ariaActivedescendant);
|
|
3422
|
+
if (r) {
|
|
3423
|
+
const l = r.previousElementSibling;
|
|
3424
|
+
l ? this.ariaActivedescendant = l.id : this.ariaActivedescendant = this.filteredTokens[this.filteredTokens.length - 1].label;
|
|
3425
|
+
} else
|
|
3426
|
+
this.ariaActivedescendant = this.filteredTokens[this.filteredTokens.length - 1].label;
|
|
3427
|
+
} else
|
|
3428
|
+
e.key === "Escape" ? (e.preventDefault(), this.resetDropdown()) : (e.key === "Backspace" || e.key === "Delete") && (t != null && t.currentText.startsWith("${") && (i = t == null ? void 0 : t.node) != null && i.parentNode && t.node.parentNode.removeChild(t.node), (this.titleRef.textContent === "" || (t == null ? void 0 : t.currentText) === "" || t != null && t.allSelected) && (this.titleRef.innerHTML = ""));
|
|
3429
|
+
}
|
|
3430
|
+
selectOption(e, t) {
|
|
3431
|
+
var k;
|
|
3432
|
+
e.preventDefault();
|
|
3433
|
+
const n = this.currentWord.fullText, a = this.currentWord.$value;
|
|
3434
|
+
let o = this.titleRef.firstChild, i = null;
|
|
3435
|
+
for (; o; ) {
|
|
3436
|
+
if (o.nodeType === 3) {
|
|
3437
|
+
const S = ((k = o.textContent) == null ? void 0 : k.replace(/[\u200B-\u200D\uFEFF]/g, "")) || "", V = n.replace(/[\u200B-\u200D\uFEFF]/g, "");
|
|
3438
|
+
if (S.includes(V)) {
|
|
3439
|
+
i = o;
|
|
3440
|
+
break;
|
|
3441
|
+
}
|
|
3442
|
+
}
|
|
3443
|
+
o = o.nextSibling;
|
|
3444
|
+
}
|
|
3445
|
+
if (!i)
|
|
3446
|
+
return;
|
|
3447
|
+
const r = i.textContent || "", l = r.indexOf(a), c = r.substring(0, l), f = r.substring(l + a.length), p = document.createTextNode(c), u = document.createRange(), b = document.createElement("span");
|
|
3448
|
+
b.classList.add("highlighted-tag"), b.textContent = `${t.value}`;
|
|
3449
|
+
const v = document.createTextNode(f);
|
|
3450
|
+
if (f !== "")
|
|
3451
|
+
i.replaceWith(p, b, v), u.setStart(v, 1);
|
|
3452
|
+
else {
|
|
3453
|
+
const S = document.createTextNode("");
|
|
3454
|
+
i.replaceWith(p, b, S), u.setStart(S, 1);
|
|
3455
|
+
}
|
|
3456
|
+
this.resetDropdown(), this.titleRef.focus();
|
|
3457
|
+
const y = window.getSelection();
|
|
3458
|
+
u.collapse(!0), y == null || y.removeAllRanges(), y == null || y.addRange(u), this.updateEventTitle(this.titleRef.textContent || "");
|
|
3459
|
+
}
|
|
3460
|
+
populateSuggestionsDropdown(e = "") {
|
|
3461
|
+
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);
|
|
3462
|
+
}
|
|
3463
|
+
updateEventTitle(e) {
|
|
3464
|
+
var n, a, o;
|
|
3465
|
+
const t = e.replace(/ +/g, " ");
|
|
3466
|
+
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 });
|
|
3467
|
+
}
|
|
3468
|
+
resetDropdown() {
|
|
3469
|
+
this.showTokens = !1, this.ariaActivedescendant = "";
|
|
3470
|
+
}
|
|
3471
|
+
getLabelHTML(e) {
|
|
3472
|
+
return s("div", { class: "token-label" }, s("span", { class: "token" }, e.token), s("span", { class: "description" }, e.description));
|
|
3473
|
+
}
|
|
3474
|
+
render() {
|
|
3475
|
+
var e;
|
|
3476
|
+
return s($, { key: "ec414f2f4c738230078bed7b7c5477ba5fdbcb70" }, s("div", { key: "17f665e5f307c1b6510891e76daa765449958c3e", class: "nylas-event-title", part: "net" }, s("label", { key: "e4beac83e857bab219ec4276238f7953645c4711", htmlFor: "title" }, "Event title", s("span", { key: "3033d6ef407f2a3df94dc1f80be2f5e3c378abd0", class: "required" }, "*"), s("span", { key: "29dba11e88726329513ef15078eba34f103914de", class: "label-icon" }, s("tooltip-component", { key: "29a373fc979f15eb3527b9e5a446bd7518ee4562" }, s("info-icon", { key: "12f9a0190185b96a2090cdb0ca7a43f6342cc016", slot: "tooltip-icon" }), s("span", { key: "dd6e505591f9cded5bc70a812e448b44f1faa4e1", slot: "tooltip-content" }, "Enter a title for your event.")))), s("div", { key: "87807255004e909850b93d600b636d2d2e1d8ed1", class: {
|
|
3477
|
+
title: !0,
|
|
3478
|
+
error: this.validationError !== ""
|
|
3479
|
+
}, 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 && s("div", { class: "token-options", part: "net__dropdown-content" }, s("ul", { tabindex: "-1", role: "listbox", "aria-label": this.name, "aria-activedescendant": this.ariaActivedescendant }, this.filteredTokens.map((t) => s("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))))), s("span", { key: "3ba87900ffbc4b69c5f9fac01a8f9f577dd034c5", class: "help-text" }, "Create a dynamic templated event title by typing $."), this.validationError != "" && s("span", { class: "error-message" }, this.validationError)));
|
|
3480
|
+
}
|
|
3481
|
+
static get formAssociated() {
|
|
3482
|
+
return !0;
|
|
3483
|
+
}
|
|
3484
|
+
get host() {
|
|
3485
|
+
return F(this);
|
|
3486
|
+
}
|
|
3487
|
+
static get watchers() {
|
|
3488
|
+
return {
|
|
3489
|
+
name: ["elementNameChangedHandler"],
|
|
3490
|
+
ariaActivedescendant: ["ariaActivedescendantChangedHandler"],
|
|
3491
|
+
selectedConfiguration: ["configChangedHandler"]
|
|
3492
|
+
};
|
|
3493
|
+
}
|
|
3494
|
+
};
|
|
3495
|
+
so([
|
|
3496
|
+
M({
|
|
3497
|
+
name: "nylas-event-title",
|
|
3498
|
+
stateToProps: /* @__PURE__ */ new Map([["schedulerConfig.selectedConfiguration", "selectedConfiguration"]]),
|
|
3499
|
+
eventToProps: {},
|
|
3500
|
+
fireRegisterEvent: !0
|
|
3501
|
+
}),
|
|
3502
|
+
zt("design:type", Function),
|
|
3503
|
+
zt("design:paramtypes", []),
|
|
3504
|
+
zt("design:returntype", void 0)
|
|
3505
|
+
], Gn.prototype, "render", null);
|
|
3506
|
+
Gn.style = oo;
|
|
3507
|
+
const ro = ':host{--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.nylas-limit-future-bookings{display:flex;justify-content:space-between;font-family:var(--nylas-font-family)}@media screen and (max-width: 768px){.nylas-limit-future-bookings{flex-direction:column;gap:0.5rem}}.nylas-limit-future-bookings label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:16px;font-style:normal;font-weight:400;line-height:150%;}.nylas-limit-future-bookings label span.label-icon{margin-left:4px}.nylas-limit-future-bookings label span.label-icon tooltip-component{display:flex}select-dropdown::part(sd_dropdown-button){border:none}', lo = ro;
|
|
3508
|
+
var co = function(e, t, n, a) {
|
|
3509
|
+
var o = arguments.length, i = o < 3 ? t : a === null ? a = Object.getOwnPropertyDescriptor(t, n) : a, r;
|
|
3510
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
3511
|
+
i = Reflect.decorate(e, t, n, a);
|
|
3512
|
+
else
|
|
3513
|
+
for (var l = e.length - 1; l >= 0; l--)
|
|
3514
|
+
(r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, n, i) : r(t, n)) || i);
|
|
3515
|
+
return o > 3 && i && Object.defineProperty(t, n, i), i;
|
|
3516
|
+
}, jt = function(e, t) {
|
|
3517
|
+
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
3518
|
+
return Reflect.metadata(e, t);
|
|
3519
|
+
};
|
|
3520
|
+
const qn = class {
|
|
3521
|
+
constructor(e) {
|
|
3522
|
+
E(this, e), this.valueChanged = R(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";
|
|
3523
|
+
}
|
|
3524
|
+
elementNameChangedHandler(e) {
|
|
3525
|
+
d("nylas-limit-future-bookings", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
3526
|
+
}
|
|
3527
|
+
selectedConfigurationChangedHandler(e) {
|
|
3528
|
+
var n;
|
|
3529
|
+
const t = (n = e == null ? void 0 : e.scheduler) == null ? void 0 : n.available_days_in_future;
|
|
3530
|
+
t && this.updateNumberAndPeriodFromDays(t);
|
|
3531
|
+
}
|
|
3532
|
+
availableDaysInFutureChanged(e) {
|
|
3533
|
+
this.updateNumberAndPeriodFromDays(e);
|
|
3534
|
+
}
|
|
3535
|
+
connectedCallback() {
|
|
3536
|
+
d("nylas-limit-future-bookings", "connectedCallback");
|
|
3537
|
+
}
|
|
3538
|
+
componentWillLoad() {
|
|
3539
|
+
d("nylas-limit-future-bookings", "componentWillLoad"), this.host.setAttribute("name", this.name);
|
|
3540
|
+
}
|
|
3541
|
+
componentDidLoad() {
|
|
3542
|
+
var e;
|
|
3543
|
+
d("nylas-limit-future-bookings", "componentDidLoad"), this.availableDaysInFutureChanged(this.availableDaysInFuture ?? 1), typeof this.internals.setFormValue == "function" && this.internals.setFormValue(((e = this.availableDaysInFuture) == null ? void 0 : e.toString()) ?? "1", this.name);
|
|
3544
|
+
}
|
|
3545
|
+
disconnectedCallback() {
|
|
3546
|
+
d("nylas-limit-future-bookings", "disconnectedCallback");
|
|
3547
|
+
}
|
|
3548
|
+
timePeriodChangedHandler(e) {
|
|
3549
|
+
const { number: t, period: n } = e.detail;
|
|
3550
|
+
let a;
|
|
3551
|
+
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);
|
|
3552
|
+
}
|
|
3553
|
+
updateNumberAndPeriodFromDays(e) {
|
|
3554
|
+
let t, n;
|
|
3555
|
+
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;
|
|
3556
|
+
}
|
|
3557
|
+
render() {
|
|
3558
|
+
return s($, { key: "9619078c85fcf4bb3177e237c0dbed1873283677" }, s("div", { key: "33c715cf0b41a805c44bf87bf522277fa8f2cc8c", class: "nylas-limit-future-bookings", part: "nlfb" }, s("label", { key: "d4faaca2c9356d9522ea04e16a20cbce034feb42" }, "Limit future bookings", s("span", { key: "e57cc58b91ed5b9e4ecce20011226b56832596dd", class: "label-icon" }, s("tooltip-component", { key: "c6022a7c569cf839420c25f7f018caa6045989f5" }, s("info-icon", { key: "85c32f3ff152f55a0f33b6e6986b38f8760e3d5a", slot: "tooltip-icon" }), s("span", { key: "bc2ec5df56452c736376059574e05ca250c94b06", slot: "tooltip-content" }, "The limit on how far in the future bookings can be made.")))), s("time-period-selector", { key: "342fd70055d41804b00a52d4e88fa6d4573fd770", 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 })));
|
|
3559
|
+
}
|
|
3560
|
+
static get formAssociated() {
|
|
3561
|
+
return !0;
|
|
3562
|
+
}
|
|
3563
|
+
get host() {
|
|
3564
|
+
return F(this);
|
|
3565
|
+
}
|
|
3566
|
+
static get watchers() {
|
|
3567
|
+
return {
|
|
3568
|
+
name: ["elementNameChangedHandler"],
|
|
3569
|
+
selectedConfiguration: ["selectedConfigurationChangedHandler"],
|
|
3570
|
+
availableDaysInFuture: ["availableDaysInFutureChanged"]
|
|
3571
|
+
};
|
|
3572
|
+
}
|
|
3573
|
+
};
|
|
3574
|
+
co([
|
|
3575
|
+
M({
|
|
3576
|
+
name: "nylas-limit-future-bookings",
|
|
3577
|
+
stateToProps: /* @__PURE__ */ new Map([["schedulerConfig.selectedConfiguration", "selectedConfiguration"]]),
|
|
3578
|
+
eventToProps: {},
|
|
3579
|
+
fireRegisterEvent: !0
|
|
3580
|
+
}),
|
|
3581
|
+
jt("design:type", Function),
|
|
3582
|
+
jt("design:paramtypes", []),
|
|
3583
|
+
jt("design:returntype", void 0)
|
|
3584
|
+
], qn.prototype, "render", null);
|
|
3585
|
+
qn.style = lo;
|
|
3586
|
+
const fo = ':host{--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.nylas-min-booking-notice{display:flex;justify-content:space-between;font-family:var(--nylas-font-family)}@media screen and (max-width: 768px){.nylas-min-booking-notice{flex-direction:column;gap:0.5rem}}.nylas-min-booking-notice label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:16px;font-style:normal;font-weight:400;line-height:150%;}.nylas-min-booking-notice label span.label-icon{margin-left:4px}.nylas-min-booking-notice label span.label-icon tooltip-component{display:flex}select-dropdown::part(sd_dropdown-button){border:none}', po = fo;
|
|
3587
|
+
var uo = function(e, t, n, a) {
|
|
3588
|
+
var o = arguments.length, i = o < 3 ? t : a === null ? a = Object.getOwnPropertyDescriptor(t, n) : a, r;
|
|
3589
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
3590
|
+
i = Reflect.decorate(e, t, n, a);
|
|
3591
|
+
else
|
|
3592
|
+
for (var l = e.length - 1; l >= 0; l--)
|
|
3593
|
+
(r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, n, i) : r(t, n)) || i);
|
|
3594
|
+
return o > 3 && i && Object.defineProperty(t, n, i), i;
|
|
3595
|
+
}, Bt = function(e, t) {
|
|
3596
|
+
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
3597
|
+
return Reflect.metadata(e, t);
|
|
3598
|
+
};
|
|
3599
|
+
const Yn = class {
|
|
3600
|
+
constructor(e) {
|
|
3601
|
+
E(this, e), this.valueChanged = R(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.selectedConfiguration = void 0, this.minBookingNotice = void 0, this.name = "min-booking-notice", this.selectedNumber = 1, this.selectedPeriod = "hour";
|
|
3602
|
+
}
|
|
3603
|
+
elementNameChangedHandler(e) {
|
|
3604
|
+
d("nylas-min-booking-notice", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
3605
|
+
}
|
|
3606
|
+
selectedConfigurationChangedHandler(e) {
|
|
3607
|
+
var n;
|
|
3608
|
+
const t = (n = e == null ? void 0 : e.scheduler) == null ? void 0 : n.min_booking_notice;
|
|
3609
|
+
t && this.updateNumberAndPeriodFromMinutes(t);
|
|
3610
|
+
}
|
|
3611
|
+
availableDaysInFutureChanged(e) {
|
|
3612
|
+
this.updateNumberAndPeriodFromMinutes(e);
|
|
3613
|
+
}
|
|
3614
|
+
connectedCallback() {
|
|
3615
|
+
d("nylas-min-booking-notice", "connectedCallback");
|
|
3616
|
+
}
|
|
3617
|
+
componentWillLoad() {
|
|
3618
|
+
d("nylas-min-booking-notice", "componentWillLoad"), this.host.setAttribute("name", this.name);
|
|
3619
|
+
}
|
|
3620
|
+
componentDidLoad() {
|
|
3621
|
+
var e;
|
|
3622
|
+
d("nylas-min-booking-notice", "componentDidLoad"), this.availableDaysInFutureChanged(this.minBookingNotice ?? 1), typeof this.internals.setFormValue == "function" && this.internals.setFormValue(((e = this.minBookingNotice) == null ? void 0 : e.toString()) ?? "1", this.name);
|
|
3623
|
+
}
|
|
3624
|
+
disconnectedCallback() {
|
|
3625
|
+
d("nylas-min-booking-notice", "disconnectedCallback");
|
|
3626
|
+
}
|
|
3627
|
+
timePeriodChangedHandler(e) {
|
|
3628
|
+
const { number: t, period: n } = e.detail;
|
|
3629
|
+
let a;
|
|
3630
|
+
const o = 60, i = o * 24, r = i * 7, l = i * 30;
|
|
3631
|
+
n === "minute" ? a = t : n === "hour" ? a = t * o : n === "day" ? a = t * i : n === "week" ? a = t * r : n === "month" ? a = t * l : a = 0, this.valueChanged.emit({ value: a, name: "minBookingNotice" }), typeof this.internals.setFormValue == "function" && this.internals.setFormValue(a.toString(), this.name);
|
|
3632
|
+
}
|
|
3633
|
+
updateNumberAndPeriodFromMinutes(e) {
|
|
3634
|
+
let i, r;
|
|
3635
|
+
e >= 43200 ? (i = Math.floor(e / 43200), r = "month") : e >= 10080 ? (i = Math.floor(e / 10080), r = "week") : e >= 1440 ? (i = Math.floor(e / 1440), r = "day") : e >= 60 ? (i = Math.floor(e / 60), r = "hour") : (i = e, r = "minute"), this.selectedNumber = i, this.selectedPeriod = r;
|
|
3636
|
+
}
|
|
3637
|
+
render() {
|
|
3638
|
+
return s($, { key: "bd833e18283227a6bdd3dbc7a31ea3fad8f487c7" }, s("div", { key: "eb735390e9644c920241c56fa95381d32bfa5757", class: "nylas-min-booking-notice", part: "nmbn" }, s("label", { key: "cadbc8177600db67d31d61d6e754ea1ec7fbc2cb" }, "Minimum booking notice", s("span", { key: "426c9c599909b9ee5222c424c44f0acfbfca3b3c", class: "label-icon" }, s("tooltip-component", { key: "bab939e943f9fa0f9e8ee9a3e31b80d124b65198" }, s("info-icon", { key: "1930ebd1c8685617777df5a97e809651cffa6459", slot: "tooltip-icon" }), s("span", { key: "280f3a204dd1e33952ed6ffa7fbbee536bbbb2f0", slot: "tooltip-content" }, "The minimum amount of time in the future that a new booking can be made.")))), s("time-period-selector", { key: "5a274c50050454a110dbab33085a320e71e72524", id: "min-booking-notice", exportparts: "tps__number-dropdown: nmbn__number-dropdown, tps__number-dropdown-button: nmbn__number-dropdown-button, tps__number-dropdown-content: nmbn__number-dropdown-content, tps__period-dropdown: nmbn__period-dropdown, tps__period-dropdown-button: nmbn__period-dropdown-button, tps__period-dropdown-content: nmbn__period-dropdown-content", timePeriods: ["minute", "hour", "day", "week"], defaultSelectedNumber: this.selectedNumber, defaultSelectedPeriod: this.selectedPeriod })));
|
|
3639
|
+
}
|
|
3640
|
+
static get formAssociated() {
|
|
3641
|
+
return !0;
|
|
3642
|
+
}
|
|
3643
|
+
get host() {
|
|
3644
|
+
return F(this);
|
|
3645
|
+
}
|
|
3646
|
+
static get watchers() {
|
|
3647
|
+
return {
|
|
3648
|
+
name: ["elementNameChangedHandler"],
|
|
3649
|
+
selectedConfiguration: ["selectedConfigurationChangedHandler"],
|
|
3650
|
+
availableDaysInFuture: ["availableDaysInFutureChanged"]
|
|
3651
|
+
};
|
|
3652
|
+
}
|
|
3653
|
+
};
|
|
3654
|
+
uo([
|
|
3655
|
+
M({
|
|
3656
|
+
name: "nylas-min-booking-notice",
|
|
3657
|
+
stateToProps: /* @__PURE__ */ new Map([["schedulerConfig.selectedConfiguration", "selectedConfiguration"]]),
|
|
3658
|
+
eventToProps: {},
|
|
3659
|
+
fireRegisterEvent: !0
|
|
3660
|
+
}),
|
|
3661
|
+
Bt("design:type", Function),
|
|
3662
|
+
Bt("design:paramtypes", []),
|
|
3663
|
+
Bt("design:returntype", void 0)
|
|
3664
|
+
], Yn.prototype, "render", null);
|
|
3665
|
+
Yn.style = po;
|
|
3666
|
+
const ho = ':host{--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.nylas-min-cancellation-notice{display:flex;justify-content:space-between;font-family:var(--nylas-font-family)}@media screen and (max-width: 768px){.nylas-min-cancellation-notice{flex-direction:column;gap:0.5rem}}.nylas-min-cancellation-notice label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:16px;font-style:normal;font-weight:400;line-height:150%;}.nylas-min-cancellation-notice label span.label-icon{margin-left:4px}.nylas-min-cancellation-notice label span.label-icon tooltip-component{display:flex}select-dropdown::part(sd_dropdown-button){border:none}', bo = ho;
|
|
3667
|
+
var mo = function(e, t, n, a) {
|
|
3668
|
+
var o = arguments.length, i = o < 3 ? t : a === null ? a = Object.getOwnPropertyDescriptor(t, n) : a, r;
|
|
3669
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
3670
|
+
i = Reflect.decorate(e, t, n, a);
|
|
3671
|
+
else
|
|
3672
|
+
for (var l = e.length - 1; l >= 0; l--)
|
|
3673
|
+
(r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, n, i) : r(t, n)) || i);
|
|
3674
|
+
return o > 3 && i && Object.defineProperty(t, n, i), i;
|
|
3675
|
+
}, Wt = function(e, t) {
|
|
3676
|
+
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
3677
|
+
return Reflect.metadata(e, t);
|
|
3678
|
+
};
|
|
3679
|
+
const Xn = class {
|
|
3680
|
+
constructor(e) {
|
|
3681
|
+
E(this, e), this.valueChanged = R(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";
|
|
3682
|
+
}
|
|
3683
|
+
elementNameChangedHandler(e) {
|
|
3684
|
+
d("nylas-min-cancellation-notice", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
3685
|
+
}
|
|
3686
|
+
selectedConfigurationChangedHandler(e) {
|
|
3687
|
+
var n;
|
|
3688
|
+
const t = (n = e == null ? void 0 : e.scheduler) == null ? void 0 : n.min_cancellation_notice;
|
|
3689
|
+
t && this.updateNumberAndPeriodFromMinutes(t);
|
|
3690
|
+
}
|
|
3691
|
+
availableDaysInFutureChanged(e) {
|
|
3692
|
+
this.updateNumberAndPeriodFromMinutes(e);
|
|
3693
|
+
}
|
|
3694
|
+
connectedCallback() {
|
|
3695
|
+
d("nylas-min-cancellation-notice", "connectedCallback");
|
|
3696
|
+
}
|
|
3697
|
+
componentWillLoad() {
|
|
3698
|
+
d("nylas-min-cancellation-notice", "componentWillLoad"), this.host.setAttribute("name", this.name);
|
|
3699
|
+
}
|
|
3700
|
+
componentDidLoad() {
|
|
3701
|
+
var e;
|
|
3702
|
+
d("nylas-min-cancellation-notice", "componentDidLoad"), this.availableDaysInFutureChanged(this.minCancellationNotice ?? 1), typeof this.internals.setFormValue == "function" && this.internals.setFormValue(((e = this.minCancellationNotice) == null ? void 0 : e.toString()) ?? "1", this.name);
|
|
3703
|
+
}
|
|
3704
|
+
disconnectedCallback() {
|
|
3705
|
+
d("nylas-min-cancellation-notice", "disconnectedCallback");
|
|
3706
|
+
}
|
|
3707
|
+
timePeriodChangedHandler(e) {
|
|
3708
|
+
const { number: t, period: n } = e.detail;
|
|
3709
|
+
let a;
|
|
3710
|
+
const o = 60, i = o * 24, r = i * 7, l = i * 30;
|
|
3711
|
+
n === "minute" ? a = t : n === "hour" ? a = t * o : n === "day" ? a = t * i : n === "week" ? a = t * r : n === "month" ? a = t * l : a = 0, this.valueChanged.emit({ value: a, name: "minCancellationNotice" }), typeof this.internals.setFormValue == "function" && this.internals.setFormValue(a.toString(), this.name);
|
|
3712
|
+
}
|
|
3713
|
+
updateNumberAndPeriodFromMinutes(e) {
|
|
3714
|
+
let i, r;
|
|
3715
|
+
e >= 43200 ? (i = Math.floor(e / 43200), r = "month") : e >= 10080 ? (i = Math.floor(e / 10080), r = "week") : e >= 1440 ? (i = Math.floor(e / 1440), r = "day") : e >= 60 ? (i = Math.floor(e / 60), r = "hour") : (i = e, r = "minute"), this.selectedNumber = i, this.selectedPeriod = r;
|
|
3716
|
+
}
|
|
3717
|
+
render() {
|
|
3718
|
+
return s($, { key: "a459f2a93a07bc2b6a6e8bbf8084754906ac6e8b" }, s("div", { key: "9a640710d97f00b1c4f45a1329c0ab2e93326517", class: "nylas-min-cancellation-notice", part: "nmcn" }, s("label", { key: "32af2f1e14a05c941c4c63182446ef8dcbf5fe33" }, "Minimum cancellation notice", s("span", { key: "a6962e01d36d950010c52122a5765cc00dac3c6d", class: "label-icon" }, s("tooltip-component", { key: "08db7c4b05e1c4f6587765bd4a0a2ade19e40865" }, s("info-icon", { key: "0c48bf5cc04d12bca21974193c091bb95ddc5c61", slot: "tooltip-icon" }), s("span", { key: "b8ebeb7f6e00ff52250d8462ce19f35e4ef2a070", slot: "tooltip-content" }, "The minimum amount of time required to cancel a booking.")))), s("time-period-selector", { key: "c14474ef1b27ba397d6d5636e3b17b479a816cde", 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 })));
|
|
3719
|
+
}
|
|
3720
|
+
static get formAssociated() {
|
|
3721
|
+
return !0;
|
|
3722
|
+
}
|
|
3723
|
+
get host() {
|
|
3724
|
+
return F(this);
|
|
3725
|
+
}
|
|
3726
|
+
static get watchers() {
|
|
3727
|
+
return {
|
|
3728
|
+
name: ["elementNameChangedHandler"],
|
|
3729
|
+
selectedConfiguration: ["selectedConfigurationChangedHandler"],
|
|
3730
|
+
availableDaysInFuture: ["availableDaysInFutureChanged"]
|
|
3731
|
+
};
|
|
3732
|
+
}
|
|
3733
|
+
};
|
|
3734
|
+
mo([
|
|
3735
|
+
M({
|
|
3736
|
+
name: "nylas-min-cancellation-notice",
|
|
3737
|
+
stateToProps: /* @__PURE__ */ new Map([["schedulerConfig.selectedConfiguration", "selectedConfiguration"]]),
|
|
3738
|
+
eventToProps: {},
|
|
3739
|
+
fireRegisterEvent: !0
|
|
3740
|
+
}),
|
|
3741
|
+
Wt("design:type", Function),
|
|
3742
|
+
Wt("design:paramtypes", []),
|
|
3743
|
+
Wt("design:returntype", void 0)
|
|
3744
|
+
], Xn.prototype, "render", null);
|
|
3745
|
+
Xn.style = bo;
|
|
3746
|
+
const yo = ':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-participant-booking-calendars{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200)}.nylas-participant-booking-calendars .header{padding:1rem}.nylas-participant-booking-calendars .header h3{margin:0;font-size:16px;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-participant-booking-calendars .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;display:flex;align-items:center;gap:4px}.nylas-participant-booking-calendars .content .participant-container{padding-top:12px;border-top:1px solid var(--nylas-base-200)}.nylas-participant-booking-calendars .content .participant-container .participant-title{display:flex;justify-content:space-between;align-items:center;padding:4px 16px 16px}.nylas-participant-booking-calendars .content .participant-container .participant-title p{margin:0}.nylas-participant-booking-calendars .content .participant-container .participant-title .participant-toggle{display:flex;gap:24px;align-items:center}.nylas-participant-booking-calendars .content .participant-container .participant-title .participant-toggle .chevron{display:flex;align-self:center;cursor:pointer}.nylas-participant-booking-calendars .content .participant-container .participant-title .participant-toggle .chevron:hover,.nylas-participant-booking-calendars .content .participant-container .participant-title .participant-toggle .chevron:active{color:var(--nylas-primary)}.nylas-participant-booking-calendars .content .participant-container .participant-title .participant-toggle .chevron.open{transform:rotate(90deg)}.nylas-participant-booking-calendars .content .participant-container .participant-title .participant-toggle .chevron.closed{transform:rotate(270deg)}.nylas-participant-booking-calendars .content .participant-container .participant-title .participant-toggle .chevron.disabled{cursor:not-allowed;color:var(--nylas-base-300)}.nylas-participant-booking-calendars .content .participant-container .participant-title .participant-toggle .chevron.disabled:hover{color:var(--nylas-base-300)}nylas-booking-calendar-picker::part(nbcp){margin:0;border:none;border-top:1px solid var(--nylas-base-200);border-top-right-radius:0;border-top-left-radius:0}', go = yo;
|
|
3747
|
+
var vo = function(e, t, n, a) {
|
|
3748
|
+
var o = arguments.length, i = o < 3 ? t : a === null ? a = Object.getOwnPropertyDescriptor(t, n) : a, r;
|
|
3749
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
3750
|
+
i = Reflect.decorate(e, t, n, a);
|
|
3751
|
+
else
|
|
3752
|
+
for (var l = e.length - 1; l >= 0; l--)
|
|
3753
|
+
(r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, n, i) : r(t, n)) || i);
|
|
3754
|
+
return o > 3 && i && Object.defineProperty(t, n, i), i;
|
|
3755
|
+
}, Zt = function(e, t) {
|
|
3756
|
+
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
3757
|
+
return Reflect.metadata(e, t);
|
|
3758
|
+
};
|
|
3759
|
+
const Kn = class {
|
|
3760
|
+
constructor(e) {
|
|
3761
|
+
E(this, e), this.valueChanged = R(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 = "participant-booking-calendars", this.participants = void 0, this.calendars = void 0, this.participantOptions = void 0, this.selectedCalendars = this.setParticipants(this.participants), this.participantCalendars = {}, this.participantDefaultSelectedCalendar = {};
|
|
3762
|
+
}
|
|
3763
|
+
elementNameChangedHandler(e) {
|
|
3764
|
+
d("nylas-participant-booking-calendars", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
3765
|
+
}
|
|
3766
|
+
calendarsChangedHandler(e) {
|
|
3767
|
+
d("nylas-participant-booking-calendars", "calendarsChangedHandler", e), this.participantCalendars = this.getParticipantCalendarOptions(this.participants, this.participantOptions);
|
|
3768
|
+
}
|
|
3769
|
+
participantsChangedHandler(e) {
|
|
3770
|
+
d("nylas-participant-booking-calendars", "participantsChangedHandler", e), this.selectedCalendars = this.setParticipants(e), this.participantCalendars = this.getParticipantCalendarOptions(e, this.participantOptions);
|
|
3771
|
+
}
|
|
3772
|
+
participantOptionsChangedHandler(e) {
|
|
3773
|
+
d("nylas-calendar-picker", "participantOptionsChangedHandler", e), this.participantCalendars = this.getParticipantCalendarOptions(this.participants, e);
|
|
3774
|
+
}
|
|
3775
|
+
selectedConfigurationChangedHandler(e) {
|
|
3776
|
+
d("nylas-participant-booking-calendars", "selectedConfigurationChangedHandler", e), this.participantCalendars = this.getParticipantCalendarOptions(this.participants, this.participantOptions);
|
|
3777
|
+
}
|
|
3778
|
+
getParticipantCalendarOptions(e, t) {
|
|
3779
|
+
var i, r, l, c;
|
|
3780
|
+
const n = this.participants.find((f) => f.is_organizer), a = {}, o = ((l = (r = (i = this.selectedConfiguration) == null ? void 0 : i.availability) == null ? void 0 : r.availability_rules) == null ? void 0 : l.availability_method) !== "collective";
|
|
3781
|
+
return t && o && e.filter((p) => t.some((u) => u.email === p.email)).forEach((p) => {
|
|
3782
|
+
var v;
|
|
3783
|
+
const u = t.find((y) => y.email === p.email);
|
|
3784
|
+
if (!u)
|
|
3785
|
+
return;
|
|
3786
|
+
this.participantDefaultSelectedCalendar[p.email] = ((v = p.booking) == null ? void 0 : v.calendar_id) ?? "primary";
|
|
3787
|
+
const b = u.calendars ?? [];
|
|
3788
|
+
a[p.email] = b;
|
|
3789
|
+
}), n && (a[n.email] = this.calendars ?? [{ id: "primary", name: n.email }], this.participantDefaultSelectedCalendar[n.email] = ((c = n == null ? void 0 : n.booking) == null ? void 0 : c.calendar_id) ?? "primary"), a;
|
|
3790
|
+
}
|
|
3791
|
+
getUniqueCalendars(e) {
|
|
3792
|
+
return e.filter((t, n, a) => a.findIndex((o) => o.id === t.id) === n);
|
|
3793
|
+
}
|
|
3794
|
+
connectedCallback() {
|
|
3795
|
+
d("nylas-participant-booking-calendars", "connectedCallback");
|
|
3796
|
+
}
|
|
3797
|
+
disconnectedCallback() {
|
|
3798
|
+
d("nylas-participant-booking-calendars", "disconnectedCallback");
|
|
3799
|
+
}
|
|
3800
|
+
componentWillLoad() {
|
|
3801
|
+
d("nylas-participant-booking-calendars", "componentWillLoad");
|
|
3802
|
+
}
|
|
3803
|
+
componentDidLoad() {
|
|
3804
|
+
d("nylas-participant-booking-calendars", "componentDidLoad");
|
|
3805
|
+
}
|
|
3806
|
+
handleValueChanged(e) {
|
|
3807
|
+
d("[nylas-editor-tabs]", "handleValueChanged", e);
|
|
3808
|
+
const { name: t, value: n } = e.detail;
|
|
3809
|
+
if (!t.startsWith("participant-booking-"))
|
|
3810
|
+
return;
|
|
3811
|
+
if (this.bookingCalendarsFormRef.checkValidity())
|
|
3812
|
+
this.internals.setValidity({});
|
|
3813
|
+
else {
|
|
3814
|
+
this.internals.setValidity({ customError: !0 }, "Please select at least one calendar for each participant.");
|
|
3815
|
+
return;
|
|
3816
|
+
}
|
|
3817
|
+
const a = t.split("participant-booking-")[1];
|
|
3818
|
+
if (!this.selectedCalendars[a])
|
|
3819
|
+
return;
|
|
3820
|
+
this.selectedCalendars[a].calendar = n, this.selectedCalendars = { ...this.selectedCalendars };
|
|
3821
|
+
const o = {};
|
|
3822
|
+
this.participants.forEach((i) => {
|
|
3823
|
+
o[i.email] = this.selectedCalendars[i.email].calendar;
|
|
3824
|
+
}), this.internals.setFormValue(JSON.stringify(o), this.name), this.valueChanged.emit({ value: JSON.stringify(o), name: this.name });
|
|
3825
|
+
}
|
|
3826
|
+
setParticipants(e) {
|
|
3827
|
+
const t = {};
|
|
3828
|
+
return e.forEach((n) => {
|
|
3829
|
+
var o;
|
|
3830
|
+
const a = !!n.is_organizer;
|
|
3831
|
+
t[n.email] = {
|
|
3832
|
+
isOpen: a,
|
|
3833
|
+
calendar: ((o = n.booking) == null ? void 0 : o.calendar_id) || "primary",
|
|
3834
|
+
name: n.name || n.email
|
|
3835
|
+
};
|
|
3836
|
+
}), t;
|
|
3837
|
+
}
|
|
3838
|
+
render() {
|
|
3839
|
+
return s($, { key: "97b846a061a8b0b08b05ff6df3ef2bdf3621ca51" }, s("div", { key: "23fcc1b5fe6e582ef7c9c5038db429b0f8b3b44e", class: "nylas-participant-booking-calendars", part: "npbc" }, s("div", { key: "fcc1490fb2afd2215e06249cfdb0b79c501a8da3", class: "header", part: "npbc__header" }, s("h3", { key: "6f3c5b61fbd366b30fd5ea58bc8b821ccb776e70" }, "Calendar booking"), s("p", { key: "6ed622e8b5cea3fd8855af816734a5735da1383c" }, "Select the calendar where you want to add event bookings.", s("tooltip-component", { key: "4af3e0f1a0c41f6c2ab117c478ccd8e02e597546" }, s("info-icon", { key: "e6968611366f843c5a44c24344a87a1138738953", slot: "tooltip-icon" }), s("span", { key: "c6ce8f91a5dc109f9551dd3873c03275c2334b2e", slot: "tooltip-content" }, "The calendar will be used to create events.")))), s("div", { key: "3d8e49986a680e466321af273b922a059f7937a0", class: "content", part: "npbc__content" }, s("form", { key: "39550f7fc12cff3f1e1fa19531d18cef5a2d2c9d", ref: (e) => this.bookingCalendarsFormRef = e }, Object.keys(this.participantCalendars).map((e, t) => {
|
|
3840
|
+
const n = this.selectedCalendars[e], a = this.participantCalendars[e];
|
|
3841
|
+
if (!(!n || !n.name))
|
|
3842
|
+
return s("div", { class: "participant-container", part: "npbc__participant-container", key: `participant-conatiner-${t}` }, s("div", { class: "participant-title", part: "npbc__participant-title" }, s("p", null, "Set ", n.name, "'s booking calendar"), s("div", { class: "participant-toggle", part: "npbc__participant-toggle--container" }, s("span", { class: `chevron ${n.isOpen ? "open" : "closed"}`, onClick: () => {
|
|
3843
|
+
this.selectedCalendars[e].isOpen = !n.isOpen, this.selectedCalendars = { ...this.selectedCalendars };
|
|
3844
|
+
} }, s("chevron-icon", { width: "24", height: "24" })))), n.isOpen && s("nylas-booking-calendar-picker", { key: e, name: `participant-booking-${e}`, calendars: a, hideHeader: !0, defaultBookingCalendar: this.participantDefaultSelectedCalendar[e] }));
|
|
3845
|
+
})))));
|
|
3846
|
+
}
|
|
3847
|
+
static get formAssociated() {
|
|
3848
|
+
return !0;
|
|
3849
|
+
}
|
|
3850
|
+
get host() {
|
|
3851
|
+
return F(this);
|
|
3852
|
+
}
|
|
3853
|
+
static get watchers() {
|
|
3854
|
+
return {
|
|
3855
|
+
name: ["elementNameChangedHandler"],
|
|
3856
|
+
calendars: ["calendarsChangedHandler"],
|
|
3857
|
+
participants: ["participantsChangedHandler"],
|
|
3858
|
+
participantOptions: ["participantOptionsChangedHandler"],
|
|
3859
|
+
selectedConfiguration: ["selectedConfigurationChangedHandler"]
|
|
3860
|
+
};
|
|
3861
|
+
}
|
|
3862
|
+
};
|
|
3863
|
+
vo([
|
|
3864
|
+
M({
|
|
3865
|
+
name: "nylas-participant-booking-calendars",
|
|
3866
|
+
stateToProps: /* @__PURE__ */ new Map([
|
|
3867
|
+
["schedulerConfig.additionalParticipants", "participantOptions"],
|
|
3868
|
+
["schedulerConfig.calendars", "calendars"],
|
|
3869
|
+
["schedulerConfig.selectedConfiguration", "selectedConfiguration"]
|
|
3870
|
+
]),
|
|
3871
|
+
eventToProps: {},
|
|
3872
|
+
fireRegisterEvent: !0
|
|
3873
|
+
}),
|
|
3874
|
+
Zt("design:type", Function),
|
|
3875
|
+
Zt("design:paramtypes", []),
|
|
3876
|
+
Zt("design:returntype", void 0)
|
|
3877
|
+
], Kn.prototype, "render", null);
|
|
3878
|
+
Kn.style = go;
|
|
3879
|
+
const _o = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;width:inherit}.nylas-participants-custom-availability{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200)}.nylas-participants-custom-availability .header{padding:1rem}.nylas-participants-custom-availability .header h3{margin:0;font-size:16px;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-participants-custom-availability .header p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.nylas-participants-custom-availability .content .participant-container{padding-top:8px;border-top:1px solid var(--nylas-base-200)}.nylas-participants-custom-availability .content .participant-container .participant-title{display:flex;justify-content:space-between;align-items:center;padding:4px 16px 12px}.nylas-participants-custom-availability .content .participant-container .participant-title p{margin:0}.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle{display:flex;gap:24px;align-items:center}.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle .chevron{display:flex;align-self:center;cursor:pointer}.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle .chevron:hover,.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle .chevron:active{color:var(--nylas-primary)}.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle .chevron.open{transform:rotate(90deg)}.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle .chevron.closed{transform:rotate(270deg)}.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle .chevron.disabled{cursor:not-allowed;color:var(--nylas-base-300)}.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle .chevron.disabled:hover{color:var(--nylas-base-300)}.nylas-participants-custom-availability .content .participant-container nylas-availability-picker::part(nap){margin:0;border:none}', Co = _o;
|
|
3880
|
+
var ko = function(e, t, n, a) {
|
|
3881
|
+
var o = arguments.length, i = o < 3 ? t : a === null ? a = Object.getOwnPropertyDescriptor(t, n) : a, r;
|
|
3882
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
3883
|
+
i = Reflect.decorate(e, t, n, a);
|
|
3884
|
+
else
|
|
3885
|
+
for (var l = e.length - 1; l >= 0; l--)
|
|
3886
|
+
(r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, n, i) : r(t, n)) || i);
|
|
3887
|
+
return o > 3 && i && Object.defineProperty(t, n, i), i;
|
|
3888
|
+
}, Vt = function(e, t) {
|
|
3889
|
+
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
3890
|
+
return Reflect.metadata(e, t);
|
|
3891
|
+
};
|
|
3892
|
+
const Jn = class {
|
|
3893
|
+
constructor(e) {
|
|
3894
|
+
E(this, e), this.valueChanged = R(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 = "participant-custom-availability", this.participants = void 0, this.selectedParticipants = this.setParticipants(this.participants);
|
|
3895
|
+
}
|
|
3896
|
+
elementNameChangedHandler(e) {
|
|
3897
|
+
d("nylas-participants-custom-availability", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
3898
|
+
}
|
|
3899
|
+
selectedConfigurationChangedHandler(e, t) {
|
|
3900
|
+
d("nylas-participants-custom-availability", "selectedConfigurationChangedHandler", e, t), e != null && e.participants ? this.selectedParticipants = this.setParticipants(e == null ? void 0 : e.participants) : this.selectedParticipants = this.setParticipants(this.participants);
|
|
3901
|
+
}
|
|
3902
|
+
connectedCallback() {
|
|
3903
|
+
d("nylas-participants-custom-availability", "connectedCallback");
|
|
3904
|
+
}
|
|
3905
|
+
disconnectedCallback() {
|
|
3906
|
+
d("nylas-participants-custom-availability", "disconnectedCallback");
|
|
3907
|
+
}
|
|
3908
|
+
componentWillLoad() {
|
|
3909
|
+
d("nylas-participants-custom-availability", "componentWillLoad");
|
|
3910
|
+
}
|
|
3911
|
+
componentDidLoad() {
|
|
3912
|
+
d("nylas-participants-custom-availability", "componentDidLoad");
|
|
3913
|
+
}
|
|
3914
|
+
nylasFormSwitchToggledHandler(e) {
|
|
3915
|
+
d("nylas-participants-custom-availability", "nylasFormSwitchToggledHandler", e.detail), this.selectedParticipants[e.detail.name].isOpen = e.detail.checked, this.selectedParticipants[e.detail.name].setCustom = e.detail.checked, this.selectedParticipants = { ...this.selectedParticipants };
|
|
3916
|
+
}
|
|
3917
|
+
handleValueChanged(e) {
|
|
3918
|
+
d("[nylas-editor-tabs]", "handleValueChanged", e);
|
|
3919
|
+
const { name: t, value: n } = e.detail;
|
|
3920
|
+
if (!t.startsWith("participant-"))
|
|
3921
|
+
return;
|
|
3922
|
+
if (this.participantFormRef.checkValidity())
|
|
3923
|
+
this.internals.setValidity({});
|
|
3924
|
+
else {
|
|
3925
|
+
this.internals.setValidity({ customError: !0 }, "Please fix the overlapping time ranges.");
|
|
3926
|
+
return;
|
|
3927
|
+
}
|
|
3928
|
+
const a = JSON.parse(n), o = t.split("-")[2];
|
|
3929
|
+
if (!this.selectedParticipants[o])
|
|
3930
|
+
return;
|
|
3931
|
+
this.selectedParticipants[o].openHours = a.openHours, this.selectedParticipants = { ...this.selectedParticipants };
|
|
3932
|
+
const i = {};
|
|
3933
|
+
this.participants.forEach((r) => {
|
|
3934
|
+
i[r.email] = this.selectedParticipants[r.email].openHours;
|
|
3935
|
+
}), this.internals.setFormValue(JSON.stringify(i), this.name), this.valueChanged.emit({ value: JSON.stringify(i), name: this.name });
|
|
3936
|
+
}
|
|
3937
|
+
setParticipants(e) {
|
|
3938
|
+
const t = {};
|
|
3939
|
+
return e.forEach((n) => {
|
|
3940
|
+
var a, o;
|
|
3941
|
+
t[n.email] = {
|
|
3942
|
+
isOpen: !1,
|
|
3943
|
+
setCustom: !!((a = n.availability) != null && a.open_hours),
|
|
3944
|
+
openHours: ((o = n.availability) == null ? void 0 : o.open_hours) || [],
|
|
3945
|
+
name: n.name || n.email,
|
|
3946
|
+
availability: n.availability
|
|
3947
|
+
};
|
|
3948
|
+
}), t;
|
|
3949
|
+
}
|
|
3950
|
+
render() {
|
|
3951
|
+
return s($, { key: "da2a8ed076766966c2641cb289e7a77f21f97611" }, s("div", { key: "9de6ae4e3b5c6c38e38e153b1a631ed7648e8b7a", class: "nylas-participants-custom-availability", part: "npca" }, s("div", { key: "268669affec9d2d64cf938fcbbf2bd43c5f0547e", class: "header", part: "npca__header" }, s("h3", { key: "7a3f44f6f6d2a695db3ffa7c82cd321172278bf8" }, "Availability for participants"), s("p", { key: "e3ab81070c057ae8f67c5d9eed1b4568ceb15ed9" }, "If not set, the general availability on the Availability tab is used.")), s("div", { key: "32d038875e83abc33b01216db579158ee059d7fe", class: "content", part: "npca__content" }, s("form", { key: "4b28c90d66a6d8ca06dfdded7771df301fb37777", ref: (e) => this.participantFormRef = e }, Object.keys(this.selectedParticipants).map((e, t) => {
|
|
3952
|
+
var a, o;
|
|
3953
|
+
const n = this.selectedParticipants[e];
|
|
3954
|
+
if (!(!n || !n.name || !n.availability))
|
|
3955
|
+
return s("div", { class: "participant-container", part: "npca__participant-container", key: `participant-conatiner-${t}` }, s("div", { class: "participant-title", part: "npca__participant-title" }, s("p", null, "Set ", n.name, "'s custom availability"), s("div", { class: "participant-toggle", part: "npca__participant-toggle--container" }, s("toggle-switch", { exportparts: "ts_label: npca__toggle-label, ts_input: npca_toggle-input, ts_slider: npca_toggle-slider", name: e, checked: !!n.openHours && n.openHours.length > 0 }), s("span", { class: `chevron ${n.isOpen ? "open" : "closed"} ${n.setCustom ? "" : "disabled"}`, onClick: () => {
|
|
3956
|
+
n.setCustom && (this.selectedParticipants[e].isOpen = !n.isOpen, this.selectedParticipants = { ...this.selectedParticipants });
|
|
3957
|
+
} }, s("chevron-icon", { width: "24", height: "24" })))), n.isOpen && s("nylas-availability-picker", { key: t, name: `participant-${t}-${e}`, openHours: n.openHours, defaultTimezone: (o = (a = n.openHours) == null ? void 0 : a[0]) == null ? void 0 : o.timezone, hideHeader: !0 }));
|
|
3958
|
+
})))));
|
|
3959
|
+
}
|
|
3960
|
+
static get formAssociated() {
|
|
3961
|
+
return !0;
|
|
3962
|
+
}
|
|
3963
|
+
get host() {
|
|
3964
|
+
return F(this);
|
|
3965
|
+
}
|
|
3966
|
+
static get watchers() {
|
|
3967
|
+
return {
|
|
3968
|
+
name: ["elementNameChangedHandler"],
|
|
3969
|
+
selectedConfiguration: ["selectedConfigurationChangedHandler"]
|
|
3970
|
+
};
|
|
3971
|
+
}
|
|
3972
|
+
};
|
|
3973
|
+
ko([
|
|
3974
|
+
M({
|
|
3975
|
+
name: "nylas-participants-custom-availability",
|
|
3976
|
+
stateToProps: /* @__PURE__ */ new Map([["schedulerConfig.selectedConfiguration", "selectedConfiguration"]]),
|
|
3977
|
+
eventToProps: {},
|
|
3978
|
+
fireRegisterEvent: !0
|
|
3979
|
+
}),
|
|
3980
|
+
Vt("design:type", Function),
|
|
3981
|
+
Vt("design:paramtypes", []),
|
|
3982
|
+
Vt("design:returntype", void 0)
|
|
3983
|
+
], Jn.prototype, "render", null);
|
|
3984
|
+
Jn.style = Co;
|
|
3985
|
+
const wo = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;width:inherit}.nylas-timeslot-interval{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200)}.nylas-timeslot-interval .header{padding:1rem;border-bottom:1px solid var(--nylas-base-200)}.nylas-timeslot-interval .header h3{margin:0;font-size:1rem;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-timeslot-interval .header p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.nylas-timeslot-interval .nylas-timeslot-interval__dropdown{padding:1rem;display:flex;flex-direction:column;gap:4px}.nylas-timeslot-interval .nylas-timeslot-interval__dropdown span.label{display:flex;align-items:center;gap:4px;color:var(--nylas-base-800)}.nylas-timeslot-interval .nylas-timeslot-interval__dropdown span.label tooltip-component{display:flex}.nylas-timeslot-interval .nylas-timeslot-interval__dropdown select-dropdown{margin-bottom:1.5rem}.nylas-timeslot-interval .nylas-timeslot-interval__dropdown select-dropdown::part(sd_dropdown){width:100%}.nylas-timeslot-interval .nylas-timeslot-interval__dropdown select-dropdown::part(sd_dropdown-content){width:100%;max-width:unset}.nylas-timeslot-interval .nylas-timeslot-interval__dropdown select-dropdown::part(sd_dropdown-button){width:100%;display:flex;justify-content:space-between;align-items:center;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);padding:1rem}.nylas-timeslot-interval .nylas-timeslot-interval__dropdown select-dropdown::part(sd_dropdown-button-selected-label){max-width:calc(100% - 2rem);font-family:var(--nylas-font-family);font-size:16px;line-height:24px}', xo = wo;
|
|
3986
|
+
var Eo = function(e, t, n, a) {
|
|
3987
|
+
var o = arguments.length, i = o < 3 ? t : a === null ? a = Object.getOwnPropertyDescriptor(t, n) : a, r;
|
|
3988
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
3989
|
+
i = Reflect.decorate(e, t, n, a);
|
|
3990
|
+
else
|
|
3991
|
+
for (var l = e.length - 1; l >= 0; l--)
|
|
3992
|
+
(r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, n, i) : r(t, n)) || i);
|
|
3993
|
+
return o > 3 && i && Object.defineProperty(t, n, i), i;
|
|
3994
|
+
}, Ut = function(e, t) {
|
|
3995
|
+
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
3996
|
+
return Reflect.metadata(e, t);
|
|
3997
|
+
};
|
|
3998
|
+
const nt = 15, Qn = class {
|
|
3999
|
+
constructor(e) {
|
|
4000
|
+
var t, n, a, o, i, r;
|
|
4001
|
+
E(this, e), this.valueChanged = R(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.selectedConfiguration = void 0, this.name = "timeslot-picker", this.eventDurationMinutes = (n = (t = this.selectedConfiguration) == null ? void 0 : t.availability) == null ? void 0 : n.duration_minutes, this.defaultIntervalMinutes = ((o = (a = this.selectedConfiguration) == null ? void 0 : a.availability) == null ? void 0 : o.interval_minutes) ?? this.eventDurationMinutes ?? 10, this.defaultRoundTo = ((r = (i = this.selectedConfiguration) == null ? void 0 : i.availability) == null ? void 0 : r.round_to) ?? void 0, this.selectedInterval = this.defaultIntervalMinutes, this.selectedRoundTo = !!(this.defaultRoundTo && this.defaultRoundTo === this.defaultIntervalMinutes);
|
|
4002
|
+
}
|
|
4003
|
+
elementNameChangedHandler(e) {
|
|
4004
|
+
d("nylas-timeslot-interval", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
4005
|
+
}
|
|
4006
|
+
selectedConfigurationChangedHandler(e) {
|
|
4007
|
+
var t, n;
|
|
4008
|
+
d("nylas-timeslot-interval", "selectedConfigurationChangedHandler", e), this.defaultIntervalMinutes = ((t = e.availability) == null ? void 0 : t.interval_minutes) ?? this.eventDurationMinutes ?? 10, this.defaultRoundTo = ((n = e.availability) == null ? void 0 : n.round_to) ?? void 0, this.selectedInterval = this.defaultIntervalMinutes, this.selectedRoundTo = !!(this.defaultRoundTo && this.defaultRoundTo === this.defaultIntervalMinutes);
|
|
4009
|
+
}
|
|
4010
|
+
connectedCallback() {
|
|
4011
|
+
d("nylas-timeslot-interval", "connectedCallback");
|
|
4012
|
+
}
|
|
4013
|
+
disconnectedCallback() {
|
|
4014
|
+
d("nylas-timeslot-interval", "disconnectedCallback");
|
|
4015
|
+
}
|
|
4016
|
+
componentWillLoad() {
|
|
4017
|
+
d("nylas-timeslot-interval", "componentWillLoad"), this.host.setAttribute("name", this.name);
|
|
4018
|
+
}
|
|
4019
|
+
componentDidLoad() {
|
|
4020
|
+
d("nylas-timeslot-interval", "componentDidLoad");
|
|
4021
|
+
}
|
|
4022
|
+
componentWillUpdate() {
|
|
4023
|
+
d("nylas-timeslot-interval", "componentWillUpdate");
|
|
4024
|
+
}
|
|
4025
|
+
componentDidUpdate() {
|
|
4026
|
+
d("nylas-timeslot-interval", "componentDidUpdate");
|
|
4027
|
+
}
|
|
4028
|
+
componentWillRender() {
|
|
4029
|
+
d("nylas-timeslot-interval", "componentWillRender");
|
|
4030
|
+
}
|
|
4031
|
+
componentDidRender() {
|
|
4032
|
+
d("nylas-timeslot-interval", "componentDidRender");
|
|
4033
|
+
}
|
|
4034
|
+
nylasFormDropdownChangedHandler(e) {
|
|
4035
|
+
d("nylas-timeslot-interval", "nylasFormDropdownChangedHandler", e.detail), e.detail.value === "duration" ? this.selectedInterval = this.eventDurationMinutes ?? 10 : this.selectedInterval = parseInt(e.detail.value), console.log("nylasFormDropdownChanged selectedRoundTo", this.selectedRoundTo), this.valueChanged.emit({
|
|
4036
|
+
value: JSON.stringify({
|
|
4037
|
+
interval: this.selectedInterval,
|
|
4038
|
+
roundTo: this.selectedRoundTo ? this.selectedInterval : nt
|
|
4039
|
+
}),
|
|
4040
|
+
name: this.name
|
|
4041
|
+
}), typeof this.internals.setFormValue == "function" && this.internals.setFormValue(JSON.stringify({ interval: this.selectedInterval, roundTo: this.selectedRoundTo ? this.selectedInterval : nt }), this.name);
|
|
4042
|
+
}
|
|
4043
|
+
nylasFormRadioChangedHandler(e) {
|
|
4044
|
+
d("nylas-timeslot-interval", "nylasFormRadioChangedHandler", e.detail), e.detail.value === "no-rounding" ? this.selectedRoundTo = !1 : this.selectedRoundTo = !0, console.log("selectedRoundTo", this.selectedRoundTo), this.valueChanged.emit({
|
|
4045
|
+
value: JSON.stringify({
|
|
4046
|
+
interval: this.selectedInterval,
|
|
4047
|
+
roundTo: this.selectedRoundTo ? this.selectedInterval : nt
|
|
4048
|
+
}),
|
|
4049
|
+
name: this.name
|
|
4050
|
+
}), typeof this.internals.setFormValue == "function" && this.internals.setFormValue(JSON.stringify({ interval: this.selectedInterval, roundTo: this.selectedRoundTo ? this.selectedInterval : nt }), this.name);
|
|
4051
|
+
}
|
|
4052
|
+
render() {
|
|
4053
|
+
const e = [
|
|
4054
|
+
{ value: "duration", label: "Length of the booking" },
|
|
4055
|
+
{ value: "5", label: "5 mins" },
|
|
4056
|
+
{ value: "10", label: "10 mins" },
|
|
4057
|
+
{ value: "15", label: "15 mins" },
|
|
4058
|
+
{ value: "20", label: "20 mins" },
|
|
4059
|
+
{ value: "30", label: "30 mins" },
|
|
4060
|
+
{ value: "45", label: "45 mins" },
|
|
4061
|
+
{ value: "60", label: "60 mins" }
|
|
4062
|
+
];
|
|
4063
|
+
return s($, { key: "74ed43cccb282e8de5cff14d7966b79deee55daf" }, s("div", { key: "5b3bbf89048551b553aabf468ca475cdefdad341", class: "nylas-timeslot-interval", part: "nti" }, s("div", { key: "04aec403481c8870063b8704a9ac880c11e3071e", class: "header", part: "nti__header" }, s("h3", { key: "35a9bd6d07a4a89a8dde8be1f252e5210fc21f2e" }, "Time slot settings"), s("p", { key: "b889b033a82475a832abb0b480a3c648a2f99172" }, "Manage time slot settings.")), s("div", { key: "c37caaec6d8fd3326bef84024ab32e6e4ac5464f", class: "nylas-timeslot-interval__dropdown" }, s("span", { key: "723a6719aee58e8ed767c541fd45929024e348bf", class: "label", part: "nti__input-label" }, "Select a time slot interval."), s("select-dropdown", { key: "b621f8df10b400e944c65da1dc7d18c63886edcc", name: "booking-calendar", options: e, withSearch: !1, exportparts: "sd_dropdown: nti__dropdown, sd_dropdown-button: nti__dropdown-button, sd_dropdown-content: nti__dropdown-content", defaultSelectedOption: this.defaultIntervalMinutes == this.eventDurationMinutes ? e[0] : e.find((t) => t.value == this.defaultIntervalMinutes.toString()) ?? e[0] }), s("span", { key: "c98907d3660086deb3bb66aede6d3834190f9a69", slot: "label", class: "label", part: "nti__input-label" }, "Select the time slot rounding type", s("tooltip-component", { key: "e4f6f0f75ab80a99612c622b111f4500d12cb05d" }, s("info-icon", { key: "aa3e8de015f4c63511694f4cad1513615a87d738", slot: "tooltip-icon" }), s("span", { key: "9e0653df752fad754c51aa79438f75deab9bedb1", slot: "tooltip-content" }, "Select if you want to round the time slots to the nearest interval."))), s("radio-button-group", { key: "b534ab334dd45491b7bfd287675fb67e24f82c99", name: "interval-preference", defaultSelectedValue: this.defaultRoundTo && this.defaultRoundTo === this.defaultIntervalMinutes ? "rounding" : "no-rounding", options: [
|
|
4064
|
+
{ value: "no-rounding", label: "Default", description: "Time slots will be rounded to the nearest quarter-hour." },
|
|
4065
|
+
{
|
|
4066
|
+
value: "rounding",
|
|
4067
|
+
label: "Interval rounding",
|
|
4068
|
+
description: "Time slots will begin at times rounded to the interval value."
|
|
4069
|
+
}
|
|
4070
|
+
] }))));
|
|
4071
|
+
}
|
|
4072
|
+
static get formAssociated() {
|
|
4073
|
+
return !0;
|
|
4074
|
+
}
|
|
4075
|
+
get host() {
|
|
4076
|
+
return F(this);
|
|
4077
|
+
}
|
|
4078
|
+
static get watchers() {
|
|
4079
|
+
return {
|
|
4080
|
+
name: ["elementNameChangedHandler"],
|
|
4081
|
+
selectedConfiguration: ["selectedConfigurationChangedHandler"]
|
|
4082
|
+
};
|
|
4083
|
+
}
|
|
4084
|
+
};
|
|
4085
|
+
Eo([
|
|
4086
|
+
M({
|
|
4087
|
+
name: "nylas-timeslot-interval",
|
|
4088
|
+
stateToProps: /* @__PURE__ */ new Map([["schedulerConfig.selectedConfiguration", "selectedConfiguration"]]),
|
|
4089
|
+
fireRegisterEvent: !0
|
|
4090
|
+
}),
|
|
4091
|
+
Ut("design:type", Function),
|
|
4092
|
+
Ut("design:paramtypes", []),
|
|
4093
|
+
Ut("design:returntype", void 0)
|
|
4094
|
+
], Qn.prototype, "render", null);
|
|
4095
|
+
Qn.style = xo;
|
|
4096
|
+
const Do = ".sc-people-icon-h{display:flex}", So = Do, Oo = class {
|
|
4097
|
+
constructor(e) {
|
|
4098
|
+
E(this, e), this.width = "20", this.height = "20";
|
|
4099
|
+
}
|
|
4100
|
+
render() {
|
|
4101
|
+
return s("svg", { key: "5988d6a752795c93676e48b9a3f3989ebe4e3a5f", xmlns: "http://www.w3.org/2000/svg", width: this.width, height: this.height, fill: "none", viewBox: "0 0 20 20" }, s("path", { key: "25b7fd2d045c637815cc8e76cd9406d2ae9bc127", fill: "currentColor", d: "M11 10a2 2 0 0 1 2 2v1.5c0 2.054-2.088 3.5-5.5 3.5S2 15.554 2 13.5V12a2 2 0 0 1 2-2h7Zm0 1H4a1 1 0 0 0-1 1v1.5C3 14.907 4.579 16 7.5 16c2.921 0 4.5-1.093 4.5-2.5V12a1 1 0 0 0-1-1Zm5-1a2 2 0 0 1 2 2v.5c0 2.089-1.568 3.5-4.5 3.5-.141 0-.28-.003-.414-.01.208-.242.382-.502.522-.781l.097-.213h.039C15.976 14.931 17 13.96 17 12.5V12a1 1 0 0 0-1-1h-2.171a3 3 0 0 0-.594-1H16ZM7.5 2a3.5 3.5 0 1 1 0 7 3.5 3.5 0 0 1 0-7Zm7 2a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5Zm-7-1a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5Zm7 2a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Z" }));
|
|
4102
|
+
}
|
|
4103
|
+
};
|
|
4104
|
+
Oo.style = So;
|
|
4105
|
+
const To = ".sc-plus-icon-h{display:flex}", Io = To, Ho = class {
|
|
4106
|
+
constructor(e) {
|
|
4107
|
+
E(this, e), this.width = "20", this.height = "20";
|
|
4108
|
+
}
|
|
4109
|
+
render() {
|
|
4110
|
+
return s("svg", { key: "c58a1023ad8c0ccaf503be873804b12fcfc06961", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, s("path", { key: "1512de7f63c2ee92e44711ec13b0c79ac2521c41", d: "M8.5 1C8.5 0.723858 8.27614 0.5 8 0.5C7.72386 0.5 7.5 0.723858 7.5 1V7.5H1C0.723858 7.5 0.5 7.72386 0.5 8C0.5 8.27614 0.723858 8.5 1 8.5H7.5V15C7.5 15.2761 7.72386 15.5 8 15.5C8.27614 15.5 8.5 15.2761 8.5 15V8.5H15C15.2761 8.5 15.5 8.27614 15.5 8C15.5 7.72386 15.2761 7.5 15 7.5H8.5V1Z", fill: "currentColor" }));
|
|
4111
|
+
}
|
|
4112
|
+
};
|
|
4113
|
+
Ho.style = Io;
|
|
4114
|
+
const Po = '.switch{--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;display:inline-block;height:34px;position:relative;width:60px}.switch input{display:none}.slider{background-color:var(--nylas-base-300);bottom:0;cursor:pointer;left:0;position:absolute;right:0;top:0;transition:0.4s}.slider:before{background-color:var(--nylas-base-0);bottom:4px;content:"";height:32px;left:4px;position:absolute;transition:0.4s;width:32px}input:checked+.slider{background-color:var(--nylas-success)}input:checked+.slider:before{transform:translateX(32px)}.slider.round{border-radius:35px;width:72px;height:40px}.slider.round:before{border-radius:50%}', No = Po, Ao = class {
|
|
4115
|
+
constructor(e) {
|
|
4116
|
+
E(this, e), this.nylasFormSwitchToggled = R(this, "nylasFormSwitchToggled", 7), this.name = "toggle-switch", this.checked = !1, this.label = "", this.isChecked = this.checked;
|
|
4117
|
+
}
|
|
4118
|
+
componentWillLoad() {
|
|
4119
|
+
this.isChecked = this.checked;
|
|
4120
|
+
}
|
|
4121
|
+
toggleCheck() {
|
|
4122
|
+
this.isChecked = !this.isChecked, this.nylasFormSwitchToggled.emit({
|
|
4123
|
+
checked: this.isChecked,
|
|
4124
|
+
name: this.name,
|
|
4125
|
+
label: this.label
|
|
4126
|
+
});
|
|
4127
|
+
}
|
|
4128
|
+
render() {
|
|
4129
|
+
return s("label", { key: "330614e95b8c2edb0ec307d146126db6f5b59c86", class: "switch", part: "ts_label" }, s("input", { key: "0dae0bc7ea4691985a26704fcb71679a8dc3e365", type: "checkbox", part: "ts_input", name: this.name, checked: this.isChecked, onChange: () => this.toggleCheck() }), s("div", { key: "2c89de3075f6e459d271acd93fb82367b1bbd5a4", class: "slider round", part: "ts_slider" }));
|
|
4130
|
+
}
|
|
4131
|
+
};
|
|
4132
|
+
Ao.style = No;
|
|
4133
|
+
const $o = ".sc-zoom-icon-h{display:flex}", Fo = $o, Mo = class {
|
|
4134
|
+
constructor(e) {
|
|
4135
|
+
E(this, e), this.width = "20", this.height = "20";
|
|
4136
|
+
}
|
|
4137
|
+
render() {
|
|
4138
|
+
return s("svg", { key: "db95d60b06f8da8febf3f37f84618f10b539417c", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, s("path", { key: "942288d352fca96585aa86d9c053ba8c485e91c9", d: "M19.7495 6.85792C19.2077 3.4745 16.5255 0.792345 13.1421 0.250451C12.1175 0.0865155 11.0702 0 10 0C8.92992 0 7.88256 0.0865155 6.85797 0.250451C3.47453 0.792345 0.792373 3.4745 0.250478 6.85792C0.0865433 7.87796 0 8.92987 0 10C0 11.0701 0.0865433 12.1175 0.250478 13.1421C0.792373 16.5255 3.47453 19.2077 6.85797 19.7495C7.88256 19.9135 8.92992 20 10 20C11.0702 20 12.1175 19.9135 13.1421 19.7495C16.5255 19.2077 19.2077 16.5255 19.7495 13.1421C19.9135 12.122 20 11.0701 20 10C20 8.92987 19.9135 7.88251 19.7495 6.85792Z", fill: "url(#paint0_linear_22_6272)" }), s("path", { key: "306cb69e79b801f83a8ea5756d6861fa1b8cc4c5", d: "M12.154 12.1676C12.154 12.7596 11.6759 13.2377 11.0839 13.2377H6.42995C5.24598 13.2377 4.28516 12.2769 4.28516 11.0929V7.87794C4.28516 7.28596 4.76328 6.80786 5.35527 6.80786H10.0092C11.1932 6.80786 12.154 7.7687 12.154 8.95267V12.1676ZM14.8589 7.09475L13.2879 8.27412C13.0193 8.47448 12.8598 8.79324 12.8598 9.13022V10.9153C12.8598 11.2523 13.0193 11.5711 13.2879 11.7714L14.8589 12.9508C15.2141 13.2149 15.715 12.9645 15.715 12.5228V7.5228C15.715 7.08109 15.2096 6.83063 14.8589 7.09475Z", fill: "white" }), s("defs", { key: "a887f03bc96926b386498ae79ae939a407c2eac5" }, s("linearGradient", { key: "0f90d6106727a28ad71a1a9aa8927dc1d650bf91", id: "paint0_linear_22_6272", x1: "10", y1: "19.9954", x2: "10", y2: "-0.00455379", gradientUnits: "userSpaceOnUse" }, s("stop", { key: "88c8863a3ef0379ce1140a43767758c5675cf0bf", "stop-color": "#003FAE" }), s("stop", { key: "6ac917031ed36c119aad680492af465134632684", offset: "0.02", "stop-color": "#0142B7" }), s("stop", { key: "89f24e45a2c0d5e0deb56e17c04e8718abb3e78e", offset: "0.09", "stop-color": "#044BD1" }), s("stop", { key: "cc470aa0c5930a722006a6108b713f797316183c", offset: "0.16", "stop-color": "#0752E5" }), s("stop", { key: "a8d6dc9ae9747e23b9438aa68a8df0fd937e8895", offset: "0.24", "stop-color": "#0958F4" }), s("stop", { key: "b085a61b26e0e955ff3c44630a3526ae2b7d86cd", offset: "0.34", "stop-color": "#0A5BFC" }), s("stop", { key: "494487f616d46962b9211faf752f0baef50acf49", offset: "0.5", "stop-color": "#0B5CFF" }))));
|
|
4139
|
+
}
|
|
4140
|
+
};
|
|
4141
|
+
Mo.style = Fo;
|
|
4142
|
+
export {
|
|
4143
|
+
la as calendar_agenda_fill_icon,
|
|
4144
|
+
fa as calendar_agenda_icon,
|
|
4145
|
+
ha as calendar_info_icon,
|
|
4146
|
+
ya as calendar_patterns_icon,
|
|
4147
|
+
_a as dragable_icon,
|
|
4148
|
+
wa as flow_icon,
|
|
4149
|
+
Da as google_meet_icon,
|
|
4150
|
+
Ta as location_icon,
|
|
4151
|
+
Pa as location_off_icon,
|
|
4152
|
+
$a as microsoft_teams_icon,
|
|
4153
|
+
_n as nylas_additional_participants,
|
|
4154
|
+
Cn as nylas_availability_picker,
|
|
4155
|
+
kn as nylas_booking_calendar_picker,
|
|
4156
|
+
Fn as nylas_booking_form_config,
|
|
4157
|
+
Mn as nylas_buffer_time,
|
|
4158
|
+
Ln as nylas_calendar_picker,
|
|
4159
|
+
Rn as nylas_cancellation_policy,
|
|
4160
|
+
zn as nylas_connected_calendars,
|
|
4161
|
+
jn as nylas_customize_booking_settings,
|
|
4162
|
+
Bn as nylas_event_description,
|
|
4163
|
+
Wn as nylas_event_duration,
|
|
4164
|
+
Zn as nylas_event_info,
|
|
4165
|
+
Vn as nylas_event_limits,
|
|
4166
|
+
Un as nylas_event_location,
|
|
4167
|
+
Gn as nylas_event_title,
|
|
4168
|
+
qn as nylas_limit_future_bookings,
|
|
4169
|
+
Yn as nylas_min_booking_notice,
|
|
4170
|
+
Xn as nylas_min_cancellation_notice,
|
|
4171
|
+
Kn as nylas_participant_booking_calendars,
|
|
4172
|
+
Jn as nylas_participants_custom_availability,
|
|
4173
|
+
Qn as nylas_timeslot_interval,
|
|
4174
|
+
Oo as people_icon,
|
|
4175
|
+
Ho as plus_icon,
|
|
4176
|
+
Ao as toggle_switch,
|
|
4177
|
+
Mo as zoom_icon
|
|
4178
|
+
};
|