@nylas/react 1.4.4 → 2.0.0
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/README.md +7 -0
- package/dist/add-circle-icon_2.entry-8a1c55bc.cjs +1 -0
- package/dist/{add-circle-icon_2.entry-615fc101.js → add-circle-icon_2.entry-b4bbcfee.js} +3 -3
- package/dist/archive-icon.entry-a2492cf3.js +16 -0
- package/dist/archive-icon.entry-e48d2356.cjs +1 -0
- package/dist/{arrow-icon.entry-da152ec2.js → arrow-icon.entry-9414299f.js} +5 -5
- package/dist/arrow-icon.entry-b1ecb2aa.cjs +1 -0
- package/dist/{bold-icon.entry-61046c15.js → bold-icon.entry-b72aed9f.js} +4 -4
- package/dist/{bold-icon.entry-58679992.cjs → bold-icon.entry-c781e9c1.cjs} +1 -1
- package/dist/{button-component_2.entry-db53e00a.js → button-component_2.entry-36e49459.js} +9 -9
- package/dist/{button-component_2.entry-53bfdc19.cjs → button-component_2.entry-73f76545.cjs} +1 -1
- package/dist/calendar-agenda-fill-icon_36.entry-e9b92e0e.cjs +6 -0
- package/dist/{calendar-agenda-fill-icon_36.entry-76796ea7.js → calendar-agenda-fill-icon_36.entry-efa7ad26.js} +100 -100
- package/dist/{calendar-cancel-icon.entry-e5032d71.cjs → calendar-cancel-icon.entry-01c388eb.cjs} +1 -1
- package/dist/{calendar-cancel-icon.entry-f3b8ae99.js → calendar-cancel-icon.entry-0f739a8a.js} +4 -4
- package/dist/{calendar-check-icon_2.entry-7303362a.cjs → calendar-check-icon_2.entry-5febbadf.cjs} +1 -1
- package/dist/{calendar-check-icon_2.entry-27dc91f7.js → calendar-check-icon_2.entry-dfb0036d.js} +3 -3
- package/dist/{calendar-icon.entry-4f432baf.cjs → calendar-icon.entry-9743e0b7.cjs} +1 -1
- package/dist/{calendar-icon.entry-48fc45d6.js → calendar-icon.entry-f197396d.js} +2 -2
- package/dist/{checkbox-component.entry-8fad4faf.cjs → checkbox-component.entry-1aa5782f.cjs} +1 -1
- package/dist/{checkbox-component.entry-a15ffc4c.js → checkbox-component.entry-72a6aa72.js} +4 -4
- package/dist/checkmark-icon_15.entry-35dd97b7.cjs +5 -0
- package/dist/{checkmark-icon_15.entry-9f926a70.js → checkmark-icon_15.entry-5c09cff5.js} +225 -223
- package/dist/{chevron-icon_3.entry-5130fbba.js → chevron-icon_3.entry-4a72f211.js} +6 -6
- package/dist/chevron-icon_3.entry-e0608b7c.cjs +1 -0
- package/dist/{clock-icon_4.entry-40a393c9.js → clock-icon_4.entry-0afe79c2.js} +8 -8
- package/dist/{clock-icon_4.entry-ac65deae.cjs → clock-icon_4.entry-202ce025.cjs} +1 -1
- package/dist/constants-f51538ef-cd2a67c4.cjs +1 -0
- package/dist/{constants-3d8016e3-3c080f00.js → constants-f51538ef-e0a5f026.js} +27 -32
- package/dist/{customParseFormat-a4d9ea69-763f219e.cjs → customParseFormat-d1de5ed0-65a0bba3.cjs} +1 -1
- package/dist/{customParseFormat-a4d9ea69-7caebeb2.js → customParseFormat-d1de5ed0-c0ef002d.js} +1 -1
- package/dist/{delete-icon.entry-78e44eba.js → delete-icon.entry-580bfcc9.js} +4 -4
- package/dist/{delete-icon.entry-770dac8c.cjs → delete-icon.entry-762ac892.cjs} +1 -1
- package/dist/{document-refresh-icon.entry-d331f844.cjs → document-refresh-icon.entry-4e0f0c61.cjs} +1 -1
- package/dist/document-refresh-icon.entry-e500b4e3.js +16 -0
- package/dist/elements/index.d.ts +0 -8
- package/dist/{feedbackSync-57bb471a-ee800a95.js → feedbackSync-172f942c-42124493.js} +1 -1
- package/dist/{feedbackSync-57bb471a-5afb7715.cjs → feedbackSync-172f942c-62f72bd2.cjs} +1 -1
- package/dist/{folder-icon.entry-163e0aee.cjs → folder-icon.entry-2694e253.cjs} +1 -1
- package/dist/{folder-icon.entry-42650400.js → folder-icon.entry-54c3cc66.js} +2 -2
- package/dist/{forward-icon.entry-d60b6e31.js → forward-icon.entry-5e540f05.js} +5 -5
- package/dist/{forward-icon.entry-0a499b38.cjs → forward-icon.entry-f07102d8.cjs} +1 -1
- package/dist/{globe-icon_2.entry-19359092.cjs → globe-icon_2.entry-14a4c168.cjs} +1 -1
- package/dist/{globe-icon_2.entry-5afa8049.js → globe-icon_2.entry-aaceb196.js} +90 -80
- package/dist/{google-logo-icon_6.entry-d2febb78.js → google-logo-icon_6.entry-00d40db2.js} +473 -439
- package/dist/google-logo-icon_6.entry-fa76ffe3.cjs +2 -0
- package/dist/{google-meet-icon_5.entry-4a94137f.cjs → google-meet-icon_5.entry-6c20e149.cjs} +1 -1
- package/dist/{google-meet-icon_5.entry-7b1b36f2.js → google-meet-icon_5.entry-f1f05903.js} +12 -12
- package/dist/inbox-icon.entry-9a4628f2.cjs +1 -0
- package/dist/inbox-icon.entry-aa78ba8c.js +16 -0
- package/dist/index-1e75512f.cjs +57 -0
- package/dist/{index-9243e481.js → index-e8380973.js} +5687 -4802
- package/dist/{index.es-13ff6710-0f748bd2.cjs → index.es-fc8588de-034ead51.cjs} +6 -6
- package/dist/{index.es-13ff6710-73fa05e6.js → index.es-fc8588de-c943eef6.js} +827 -1065
- package/dist/{info-icon_2.entry-ba869bab.js → info-icon_2.entry-b3b313ab.js} +3 -3
- package/dist/{info-icon_2.entry-6667923a.cjs → info-icon_2.entry-bbcefb9a.cjs} +1 -1
- package/dist/{input-component.entry-7396acf1.js → input-component.entry-401b9ba5.js} +9 -9
- package/dist/{input-component.entry-db84f917.cjs → input-component.entry-ec8e8e7c.cjs} +1 -1
- package/dist/input-dropdown_2.entry-8cb11601.cjs +1 -0
- package/dist/{input-dropdown_2.entry-20f2031b.js → input-dropdown_2.entry-c37f392c.js} +6 -6
- package/dist/italic-icon.entry-0e85d0d9.js +16 -0
- package/dist/italic-icon.entry-6675558a.cjs +1 -0
- package/dist/{multi-select-dropdown_2.entry-81740b34.js → multi-select-dropdown_2.entry-3eecf18a.js} +22 -16
- package/dist/{multi-select-dropdown_2.entry-8e07b42b.cjs → multi-select-dropdown_2.entry-e37c501d.cjs} +1 -1
- package/dist/{nylas-booked-event-card_12.entry-e56c8e92.js → nylas-booked-event-card_12.entry-e7464ae7.js} +226 -224
- package/dist/nylas-booked-event-card_12.entry-fddc9ab8.cjs +1 -0
- package/dist/{nylas-event-calendar_3.entry-2504c7c0.js → nylas-event-calendar_3.entry-9abd46c2.js} +2360 -2238
- package/dist/nylas-event-calendar_3.entry-e6669bbf.cjs +11 -0
- package/dist/{nylas-form-card.entry-98903549.js → nylas-form-card.entry-a3186807.js} +3 -3
- package/dist/{nylas-form-card.entry-c406e3d3.cjs → nylas-form-card.entry-cbb00fba.cjs} +1 -1
- package/dist/nylas-scheduler-editor.entry-5c92901a.cjs +2 -0
- package/dist/{nylas-scheduler-editor.entry-670cc0b8.js → nylas-scheduler-editor.entry-7b188a38.js} +83 -50
- package/dist/nylas-scheduling.entry-970240f6.cjs +1 -0
- package/dist/nylas-scheduling.entry-e9929b03.js +968 -0
- package/dist/{person-icon.entry-bdaa899b.cjs → person-icon.entry-8998fdb8.cjs} +1 -1
- package/dist/{person-icon.entry-3bca6e51.js → person-icon.entry-d2856f08.js} +4 -4
- package/dist/{play-icon.entry-ecc86e85.cjs → play-icon.entry-99eb969b.cjs} +1 -1
- package/dist/play-icon.entry-f949a80f.js +16 -0
- package/dist/{radio-button-group.entry-9851076c.js → radio-button-group.entry-bc3b12fd.js} +2 -2
- package/dist/{radio-button-group.entry-6965ad34.cjs → radio-button-group.entry-d66edd04.cjs} +1 -1
- package/dist/react.cjs +1 -1
- package/dist/react.js +96 -104
- package/dist/{refresh-icon.entry-90d52ab3.cjs → refresh-icon.entry-99d1982d.cjs} +1 -1
- package/dist/{refresh-icon.entry-d776c4a7.js → refresh-icon.entry-d6df8b1c.js} +2 -2
- package/dist/{register-component-02a05665-2e992621.js → register-component-62d792d4-448b6a43.js} +1 -1
- package/dist/{register-component-02a05665-75652287.cjs → register-component-62d792d4-c6e7d129.cjs} +1 -1
- package/dist/{reply-all-icon.entry-24f7c0fe.js → reply-all-icon.entry-7ebf01a0.js} +2 -2
- package/dist/{reply-all-icon.entry-6e49eb03.cjs → reply-all-icon.entry-d7c44139.cjs} +1 -1
- package/dist/{reply-icon.entry-7fff25c9.cjs → reply-icon.entry-058c00e8.cjs} +1 -1
- package/dist/{reply-icon.entry-d5d26d65.js → reply-icon.entry-d1622d85.js} +5 -5
- package/dist/sent-icon.entry-6c604512.cjs +1 -0
- package/dist/sent-icon.entry-fe12bc2f.js +16 -0
- package/dist/spam-icon.entry-45e5292e.cjs +1 -0
- package/dist/spam-icon.entry-b97c7709.js +16 -0
- package/dist/{star-icon.entry-3c57a35c.cjs → star-icon.entry-4db13fdb.cjs} +1 -1
- package/dist/{star-icon.entry-c2e743a9.js → star-icon.entry-98b80645.js} +6 -6
- package/dist/{stop-icon.entry-0b9563d5.js → stop-icon.entry-0290fd30.js} +2 -2
- package/dist/{stop-icon.entry-cf4c4e63.cjs → stop-icon.entry-9d7b53fd.cjs} +1 -1
- package/dist/{textarea-component.entry-2eccc173.cjs → textarea-component.entry-9b474ab5.cjs} +1 -1
- package/dist/{textarea-component.entry-60e7a4d0.js → textarea-component.entry-a62c257b.js} +2 -2
- package/dist/{toggle-switch.entry-612744fd.cjs → toggle-switch.entry-5dbfcd48.cjs} +1 -1
- package/dist/{toggle-switch.entry-0a6b01e6.js → toggle-switch.entry-e423b793.js} +2 -2
- package/dist/{translate-icon.entry-ede5f77d.js → translate-icon.entry-60c55a2e.js} +4 -4
- package/dist/{translate-icon.entry-8adc4146.cjs → translate-icon.entry-f82fa6fc.cjs} +1 -1
- package/dist/trash-fill-icon.entry-095caae3.cjs +1 -0
- package/dist/trash-fill-icon.entry-825055fd.js +16 -0
- package/dist/{underline-icon.entry-d2fe2da6.cjs → underline-icon.entry-0807a43d.cjs} +1 -1
- package/dist/{underline-icon.entry-b2b43ba2.js → underline-icon.entry-40028bc6.js} +2 -2
- package/dist/{warning-icon.entry-0a5c7337.js → warning-icon.entry-24e37759.js} +2 -2
- package/dist/{warning-icon.entry-85822f4d.cjs → warning-icon.entry-fce7c14f.cjs} +1 -1
- package/package.json +2 -2
- package/dist/add-circle-icon_2.entry-e616ece6.cjs +0 -1
- package/dist/archive-icon.entry-41938a61.cjs +0 -1
- package/dist/archive-icon.entry-bd81d2d9.js +0 -16
- package/dist/arrow-icon.entry-4103be57.cjs +0 -1
- package/dist/calendar-agenda-fill-icon_36.entry-917e4a9d.cjs +0 -6
- package/dist/checkmark-icon_15.entry-08c8b107.cjs +0 -5
- package/dist/chevron-icon_3.entry-2f75c3c4.cjs +0 -1
- package/dist/constants-3d8016e3-fd6c3848.cjs +0 -1
- package/dist/document-refresh-icon.entry-f6dfe744.js +0 -16
- package/dist/google-logo-icon_6.entry-896a10a5.cjs +0 -2
- package/dist/inbox-icon.entry-24ec450f.cjs +0 -1
- package/dist/inbox-icon.entry-b71acde0.js +0 -16
- package/dist/index-efb6db79.cjs +0 -57
- package/dist/input-dropdown_2.entry-0c219620.cjs +0 -1
- package/dist/italic-icon.entry-a9324a8a.cjs +0 -1
- package/dist/italic-icon.entry-c42f8112.js +0 -16
- package/dist/notebook-store-b61693cd-5657061b.js +0 -14
- package/dist/notebook-store-b61693cd-6515d345.cjs +0 -5
- package/dist/nylas-booked-event-card_12.entry-7c7afae5.cjs +0 -1
- package/dist/nylas-call-summary.entry-4bf7284f.cjs +0 -1
- package/dist/nylas-call-summary.entry-ad6fb46a.js +0 -16
- package/dist/nylas-event-calendar_3.entry-f747f6a8.cjs +0 -6
- package/dist/nylas-if-state.entry-6b071705.cjs +0 -1
- package/dist/nylas-if-state.entry-7468854a.js +0 -95
- package/dist/nylas-key-points.entry-7af8da1a.cjs +0 -1
- package/dist/nylas-key-points.entry-c186445e.js +0 -29
- package/dist/nylas-login.entry-171bd025.cjs +0 -1
- package/dist/nylas-login.entry-d85c1473.js +0 -74
- package/dist/nylas-provider.entry-ab1f6886.js +0 -265
- package/dist/nylas-provider.entry-e4231b93.cjs +0 -1
- package/dist/nylas-scheduler-editor.entry-d522ca98.cjs +0 -2
- package/dist/nylas-scheduling.entry-9e81c6fc.js +0 -439
- package/dist/nylas-scheduling.entry-c52edb14.cjs +0 -1
- package/dist/nylas-transcript.entry-a1fa7e17.cjs +0 -6
- package/dist/nylas-transcript.entry-fb39b5af.js +0 -128
- package/dist/nylas-video-player.entry-25e8cd9a.js +0 -39
- package/dist/nylas-video-player.entry-89842545.cjs +0 -1
- package/dist/nylas-video-preview.entry-28a0bd60.cjs +0 -1
- package/dist/nylas-video-preview.entry-80171531.js +0 -16
- package/dist/play-icon.entry-d548464e.js +0 -16
- package/dist/scheduler-config-store-d6729d8d-50920e8c.js +0 -29
- package/dist/scheduler-config-store-d6729d8d-a0bdda83.cjs +0 -1
- package/dist/scheduler-store-fe9e85a4-1dcfddfa.js +0 -533
- package/dist/scheduler-store-fe9e85a4-baabf78a.cjs +0 -1
- package/dist/sent-icon.entry-42ce5bcb.cjs +0 -1
- package/dist/sent-icon.entry-858fe83e.js +0 -16
- package/dist/spam-icon.entry-0827144e.js +0 -16
- package/dist/spam-icon.entry-bf1a48b6.cjs +0 -1
- package/dist/trash-fill-icon.entry-b6456ec8.cjs +0 -1
- package/dist/trash-fill-icon.entry-d48f72c5.js +0 -16
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as b, h as s,
|
|
2
|
-
import { R as C } from "./register-component-
|
|
3
|
-
import {
|
|
1
|
+
import { r as b, h as s, a as m, g as x, b as d, S as V, H as w, i as c, y as S, T as H, P as q, U as M } from "./index-e8380973.js";
|
|
2
|
+
import { R as C } from "./register-component-62d792d4-448b6a43.js";
|
|
3
|
+
import { E as k, P as L, f as J } from "./constants-f51538ef-e0a5f026.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import "react/jsx-runtime";
|
|
6
6
|
import "react-dom";
|
|
@@ -9,7 +9,7 @@ const G = ".sc-checkmark-icon-h{display:flex}", X = G, Q = class {
|
|
|
9
9
|
b(this, e), this.width = "18", this.height = "14";
|
|
10
10
|
}
|
|
11
11
|
render() {
|
|
12
|
-
return s("svg", { key: "
|
|
12
|
+
return s("svg", { key: "699339a6d94d61e7cc7f92c2fb62f0b44e885efb", width: this.width, height: this.height, viewBox: "0 0 18 14", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, s("path", { key: "6b01ad94e56fba570fb48b47e6bb9cb92a1302ce", d: "M1.53033 7.46967C1.23744 7.17678 0.762563 7.17678 0.46967 7.46967C0.176777 7.76256 0.176777 8.23744 0.46967 8.53033L4.96967 13.0303C5.26256 13.3232 5.73744 13.3232 6.03033 13.0303L17.0303 2.03033C17.3232 1.73744 17.3232 1.26256 17.0303 0.96967C16.7374 0.676777 16.2626 0.676777 15.9697 0.96967L5.5 11.4393L1.53033 7.46967Z", fill: "#293056" }));
|
|
13
13
|
}
|
|
14
14
|
};
|
|
15
15
|
Q.style = X;
|
|
@@ -18,7 +18,7 @@ const Y = ".sc-copy-icon-h{display:flex}", ee = Y, te = class {
|
|
|
18
18
|
b(this, e), this.width = "16", this.height = "16";
|
|
19
19
|
}
|
|
20
20
|
render() {
|
|
21
|
-
return s("svg", { key: "
|
|
21
|
+
return s("svg", { key: "2bf5e59bc27eb162523938398016bf11c1a76110", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, s("path", { key: "46952d1222b2696b650941cb13752731ef67e5cc", d: "M4 0.75C2.89543 0.75 2 1.64543 2 2.75V12.75C2 13.8546 2.89543 14.75 4 14.75H10C11.1046 14.75 12 13.8546 12 12.75V2.75C12 1.64543 11.1046 0.75 10 0.75H4ZM3 2.75C3 2.19772 3.44772 1.75 4 1.75H10C10.5523 1.75 11 2.19772 11 2.75V12.75C11 13.3023 10.5523 13.75 10 13.75H4C3.44772 13.75 3 13.3023 3 12.75V2.75ZM0 4.75001C0 4.00973 0.402199 3.36339 1 3.01758V13.25C1 14.6307 2.11929 15.75 3.5 15.75H9.73244C9.38663 16.3478 8.74028 16.75 8 16.75H3.5C1.567 16.75 0 15.183 0 13.25V4.75001Z", fill: "currentColor" }));
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
24
|
te.style = ee;
|
|
@@ -27,7 +27,7 @@ const ne = ".sc-dragable-icon-h{display:flex}", ae = ne, oe = class {
|
|
|
27
27
|
b(this, e), this.width = "20", this.height = "20";
|
|
28
28
|
}
|
|
29
29
|
render() {
|
|
30
|
-
return s("svg", { key: "
|
|
30
|
+
return s("svg", { key: "ad690a6d222f7d6df960f2d38ae45cfac50956d5", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, s("path", { key: "0aa73c1d7008f40987d1277e940a0ac4e744e45e", 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" }));
|
|
31
31
|
}
|
|
32
32
|
};
|
|
33
33
|
oe.style = ae;
|
|
@@ -36,7 +36,7 @@ const le = ".sc-eye-icon-h{display:flex}", se = le, ie = class {
|
|
|
36
36
|
b(this, e), this.width = "17", this.height = "10";
|
|
37
37
|
}
|
|
38
38
|
render() {
|
|
39
|
-
return s("svg", { key: "
|
|
39
|
+
return s("svg", { key: "10253ad592e978f5c929dffddf8d9a67c20fa7b9", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, s("path", { key: "63a32cf99c4a4f4ea3c166f6fceae0dc34bfb9ba", d: "M1.75909 6.60214C2.44254 3.32689 5.29437 1 8.50002 1C11.7057 1 14.5574 3.32688 15.2409 6.60215C15.2974 6.87246 15.5622 7.04587 15.8325 6.98946C16.1029 6.93304 16.2763 6.66817 16.2199 6.39785C15.4425 2.67312 12.1934 0 8.50002 0C4.8066 0 1.55742 2.67311 0.780175 6.39786C0.723767 6.66818 0.897177 6.93305 1.1675 6.98946C1.43782 7.04587 1.70268 6.87246 1.75909 6.60214ZM8.5 3C6.567 3 5 4.567 5 6.5C5 8.433 6.567 10 8.5 10C10.433 10 12 8.433 12 6.5C12 4.567 10.433 3 8.5 3ZM6 6.5C6 5.11929 7.11929 4 8.5 4C9.88071 4 11 5.11929 11 6.5C11 7.88071 9.88071 9 8.5 9C7.11929 9 6 7.88071 6 6.5Z", fill: "currentColor" }));
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
42
|
ie.style = se;
|
|
@@ -45,11 +45,11 @@ const re = ".sc-feedback-icon-h{display:flex}", ce = re, de = class {
|
|
|
45
45
|
b(this, e), this.width = "11", this.height = "14";
|
|
46
46
|
}
|
|
47
47
|
render() {
|
|
48
|
-
return s("svg", { key: "
|
|
48
|
+
return s("svg", { key: "e6307b595e82d545bbe7617c2018467584e06db7", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, s("path", { key: "1f23cecc1cf9f93957c4f0ddbd33b6f9835c16df", d: "M0.5 8.875C0.5 8.875 1.125 8.25 3 8.25C4.875 8.25 6.125 9.5 8 9.5C9.875 9.5 10.5 8.875 10.5 8.875V1.375C10.5 1.375 9.875 2 8 2C6.125 2 4.875 0.75 3 0.75C1.125 0.75 0.5 1.375 0.5 1.375V8.875ZM0.5 8.875V13.25", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round" }));
|
|
49
49
|
}
|
|
50
50
|
};
|
|
51
51
|
de.style = ce;
|
|
52
|
-
const
|
|
52
|
+
const pe = ':host{display:block;position:relative;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff;width:100%}@media screen and (max-width: 768px){:host{position:unset}}label{display:flex;color:var(--nylas-base-800, #293056);font-size:14px;font-style:normal;font-weight:400;line-height:150%;flex-direction:column;gap:4px;font-family:var(--nylas-font-family);font-size:16px;color:var(--nylas-base-800)}label.error{color:var(--nylas-error)}label span.required{color:var(--nylas-error);padding:0 0.25rem}label p{margin:0}label .error{color:var(--nylas-error)}.color-picker-container{display:flex;height:48px;padding-left:16px;align-items:center;gap:8px;align-self:stretch;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-300);background:var(--nylas-base-0);width:-webkit-fill-available;color:var(--nylas-base-900);font-size:16px;font-style:normal;font-weight:400;line-height:150%;width:-moz-available;width:-webkit-fill-available;padding-left:0;gap:0;overflow:hidden}.color-picker-container:focus{outline-color:var(--nylas-primary)}.color-picker-container.error{border-radius:var(--nylas-border-radius-2x);font-weight:600;border-color:var(--nylas-error);border-width:2px}.color-picker-container.error::placeholder{font-weight:400}.color-picker-container::placeholder{color:var(--nylas-base-300)}.color-picker-container input{display:flex;align-items:center;height:100%;appearance:none;border:none;border-right:1px solid var(--nylas-base-200);background:transparent}.color-picker-container input::-webkit-color-swatch{min-width:30px;border-radius:0.25rem;border:1px solid var(--nylas-base-200);margin:0.25rem}.color-picker-container input::-moz-color-swatch{min-width:30px;border-radius:0.25rem;border:1px solid var(--nylas-base-200);margin:0.25rem}.color-picker-container.error{border:1px solid var(--nylas-error)}.color-picker-container:hover,.color-picker-container:active{outline:1px solid var(--nylas-primary)}.color-picker-container:active{outline:2px solid var(--nylas-primary)}.color-picker-container label{width:100%}.labelBtn{color:var(--nylas-base-800);padding:14px;font-size:16px;font-family:var(--nylas-font-family);cursor:pointer;display:flex;flex-direction:row;justify-content:space-between;width:100%;gap:0.5rem;background:transparent;border:none}.labelBtn.error{border:1px solid var(--nylas-error)}.labelBtn.focus{background:transparent}.labelBtn:hover,.labelBtn:active{outline:1px solid var(--nylas-primary)}.labelBtn span.chevron{display:flex;align-self:center}.labelBtn span.open{transform:rotate(90deg)}.labelBtn span.closed{transform:rotate(270deg)}.labelBtn span.selected-option{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;max-width:144px;font-size:14px;line-height:20px}@media screen and (max-width: 768px){.labelBtn span.selected-option{max-width:124px;font-size:16px}}', fe = pe, ye = class {
|
|
53
53
|
constructor(e) {
|
|
54
54
|
b(this, e), this.nylasFormDropdownChanged = m(this, "nylasFormDropdownChanged", 7), this.componentType = "color-picker", this.name = void 0, this.defaultSelectedColor = void 0, this.selectedColor = this.defaultSelectedColor, this.isOpen = !1, this.ariaActivedescendant = "", this.errorMessage = "";
|
|
55
55
|
}
|
|
@@ -80,26 +80,26 @@ const fe = ':host{display:block;position:relative;--nylas-primary:#2563eb;--nyla
|
|
|
80
80
|
!e.composedPath().includes(this.el) && this.isOpen && (this.isOpen = !1);
|
|
81
81
|
}
|
|
82
82
|
render() {
|
|
83
|
-
return s("div", { key: "
|
|
83
|
+
return s("div", { key: "f9c521701cd470659c66f055d8e07b9454370584", class: "color-picker-container", part: "icp_color-picker", tabindex: "0", onKeyDown: (e) => this.handleKeyDown(e) }, s("input", { key: "035e80fb3b5731ad2680065592709523d360f956", type: "color", ref: (e) => this.inputRef = e, id: this.name, name: this.name, value: this.selectedColor, tabindex: "-1", onFocus: () => this.handleFocus(), onBlur: () => this.handleBlur(), onInput: (e) => this.handleInput(e), onChange: (e) => this.handleChange(e), onKeyDown: (e) => this.handleKeyDown(e) }), s("label", { key: "7ff3d8307445e4296f2055d081e901dd0ad3e003", part: "icp_color-picker-button", htmlFor: this.name, class: { labelBtn: !0, open: this.isOpen, error: !!this.errorMessage }, "aria-haspopup": "listbox", "aria-expanded": this.isOpen ? "true" : "false", "aria-label": this.name }, s("span", { key: "f6128f6e40b1ff84684302abaa320fa98a4fe979", class: "selected-option", part: "icp_color-picker-button-selected-label" }, this.selectedColor || "Select a color"), s("span", { key: "ad62b12c5d9690e158a7c0e79cfd64e94e0ff881", class: {
|
|
84
84
|
open: this.isOpen,
|
|
85
85
|
closed: !this.isOpen,
|
|
86
86
|
chevron: !0
|
|
87
|
-
}, "aria-hidden": "true" }, s("chevron-icon", { key: "
|
|
87
|
+
}, "aria-hidden": "true" }, s("chevron-icon", { key: "1298e07f3974d76c677e14a1e5196040ef3b9a4e", width: "16", height: "16" })), this.errorMessage && s("span", { class: "error help-text" }, this.errorMessage)));
|
|
88
88
|
}
|
|
89
89
|
get el() {
|
|
90
90
|
return x(this);
|
|
91
91
|
}
|
|
92
92
|
};
|
|
93
|
-
ye.style =
|
|
93
|
+
ye.style = fe;
|
|
94
94
|
const he = ':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-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff;width:inherit}.logo-container{display:flex;flex-direction:row;gap:2rem}.logo-container .input-container{flex:1}.logo-container .input-container span.error-message{color:var(--nylas-error)}.logo-container .logo{display:flex;justify-content:center;align-items:center;width:200px;height:100px;border:var(--nylas-base-200) solid 1px;border-radius:var(--nylas-border-radius-2x);overflow:hidden;padding:10px}.logo-container .logo img{max-height:100%;max-width:100%;object-fit:contain;object-position:center}', ue = he;
|
|
95
|
-
var be = function(e, t, a,
|
|
96
|
-
var r = arguments.length,
|
|
95
|
+
var be = function(e, t, a, o) {
|
|
96
|
+
var r = arguments.length, l = r < 3 ? t : o === null ? o = Object.getOwnPropertyDescriptor(t, a) : o, n;
|
|
97
97
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
98
|
-
|
|
98
|
+
l = Reflect.decorate(e, t, a, o);
|
|
99
99
|
else
|
|
100
100
|
for (var i = e.length - 1; i >= 0; i--)
|
|
101
|
-
(n = e[i]) && (
|
|
102
|
-
return r > 3 &&
|
|
101
|
+
(n = e[i]) && (l = (r < 3 ? n(l) : r > 3 ? n(t, a, l) : n(t, a)) || l);
|
|
102
|
+
return r > 3 && l && Object.defineProperty(t, a, l), l;
|
|
103
103
|
}, O = function(e, t) {
|
|
104
104
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
105
105
|
return Reflect.metadata(e, t);
|
|
@@ -154,7 +154,7 @@ const N = class {
|
|
|
154
154
|
});
|
|
155
155
|
}
|
|
156
156
|
render() {
|
|
157
|
-
return s(w, { key: "
|
|
157
|
+
return s(w, { key: "ecb95d9769c73a884a5dcf0ce909e963c2cca127" }, s("div", { key: "9febd63d49714ea30e656486e637e03516272f87", class: "logo-container" }, s("div", { key: "564ba6822425b64e9bdfbeae6179f1ebee0ed4eb", class: "input-container" }, s("input-component", { key: "4f02e23c20e15dbca8343f278ea3ab8e385621b7", name: this.name, id: this.name, type: "text", required: !1, exportparts: "ic_input: iiu__logo-input-textfield", defaultValue: this.imageUrl ?? "" }), this.error && s("span", { class: "error-message" }, this.error)), this.currentImageUrl && !this.error && s("div", { class: "logo" }, s("img", { src: this.currentImageUrl, alt: "Logo" }))));
|
|
158
158
|
}
|
|
159
159
|
static get formAssociated() {
|
|
160
160
|
return !0;
|
|
@@ -185,14 +185,14 @@ be([
|
|
|
185
185
|
], N.prototype, "render", null);
|
|
186
186
|
N.style = ue;
|
|
187
187
|
const ge = ':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-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff}.nylas-additional-participants__title{color:var(--nylas-base-900);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 label span.org-as-participant{width:max-content}.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{border:none}.nylas-additional-participants__input{flex:1;display:flex;justify-content:space-between}.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__input input-component::part(ic__input){background:var(--nylas-base-50)}.nylas-additional-participants__input input-component::part(ic__label){font-size:14px}.nylas-additional-participants__input input-component div.required-input{display:flex;gap:4px}.nylas-additional-participants__input input-component div.required-input label{display:flex;gap:4px;align-items:center}.nylas-additional-participants__input input-component div.required-input label tooltip-component#organizer_participant_tooltip::part(tc__content){left:-84px}.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)}', me = ge;
|
|
188
|
-
var ve = function(e, t, a,
|
|
189
|
-
var r = arguments.length,
|
|
188
|
+
var ve = function(e, t, a, o) {
|
|
189
|
+
var r = arguments.length, l = r < 3 ? t : o === null ? o = Object.getOwnPropertyDescriptor(t, a) : o, n;
|
|
190
190
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
191
|
-
|
|
191
|
+
l = Reflect.decorate(e, t, a, o);
|
|
192
192
|
else
|
|
193
193
|
for (var i = e.length - 1; i >= 0; i--)
|
|
194
|
-
(n = e[i]) && (
|
|
195
|
-
return r > 3 &&
|
|
194
|
+
(n = e[i]) && (l = (r < 3 ? n(l) : r > 3 ? n(t, a, l) : n(t, a)) || l);
|
|
195
|
+
return r > 3 && l && Object.defineProperty(t, a, l), l;
|
|
196
196
|
}, I = function(e, t) {
|
|
197
197
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
198
198
|
return Reflect.metadata(e, t);
|
|
@@ -223,44 +223,46 @@ const z = class {
|
|
|
223
223
|
d("nylas-additional-participants", "disconnectedCallback");
|
|
224
224
|
}
|
|
225
225
|
updateState(e, t, a = !0) {
|
|
226
|
-
var
|
|
227
|
-
this.isRoundRobinConfig = (r = (
|
|
226
|
+
var o, r, l, n;
|
|
227
|
+
this.isRoundRobinConfig = (r = (o = e == null ? void 0 : e.availability) == null ? void 0 : o.availability_rules) != null && r.availability_method ? ((n = (l = e == null ? void 0 : e.availability) == null ? void 0 : l.availability_rules) == null ? void 0 : n.availability_method) !== "collective" : !1, this.participants = (e == null ? void 0 : e.participants) || this.eventParticipants || [], this.includeOrganizerAsParticipant = !!(this.isRoundRobinConfig && this.participants.find((i) => i.email === (t == null ? void 0 : t.email))), this.updateOrganizerAsParticipant(a);
|
|
228
228
|
}
|
|
229
229
|
get isInternalsAvailable() {
|
|
230
230
|
return this.internals !== void 0 && typeof this.internals.setFormValue == "function" && typeof this.internals.setValidity == "function";
|
|
231
231
|
}
|
|
232
232
|
onInputOptionChanged(e) {
|
|
233
|
-
var
|
|
233
|
+
var l, n, i, p;
|
|
234
234
|
d("nylas-additional-participants", "onInputOptionChanged");
|
|
235
|
-
const t = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/, a = e.detail.name,
|
|
236
|
-
if (!
|
|
235
|
+
const t = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/, a = e.detail.name, o = (l = this.participantOptions) == null ? void 0 : l.find((f) => f.email === e.detail.value);
|
|
236
|
+
if (!o && this.isRoundRobinConfig) {
|
|
237
237
|
this.isInternalsAvailable && this.internals.setValidity({ customError: !0 }, "For round robin configuration, participant should be selected from the dropdown."), this.participantErrors[a] = "For round robin page, participant should be selected from the dropdown.", this.participants[a].is_valid = !1, this.participants = [...this.participants];
|
|
238
238
|
return;
|
|
239
|
-
} else if (!
|
|
239
|
+
} else if (!o && !t.test(e.detail.value)) {
|
|
240
240
|
this.isInternalsAvailable && this.internals.setValidity({ customError: !0 }, "Please enter a valid email address"), this.participantErrors[a] = "Please enter a valid email address", this.participants[a].is_valid = !1, this.participants = [...this.participants];
|
|
241
241
|
return;
|
|
242
242
|
} else
|
|
243
243
|
this.participantErrors[a] = "", this.participants[a].is_valid = !0, this.isInternalsAvailable && this.internals.setValidity({});
|
|
244
|
-
this.participants[a].email = e.detail.value
|
|
244
|
+
this.participants[a].email = e.detail.value;
|
|
245
|
+
const r = (n = o == null ? void 0 : o.calendars) == null ? void 0 : n.find((f) => f.is_primary);
|
|
246
|
+
this.participants[a].availability = o && (r != null && r.id) ? { calendar_ids: [r.id] } : (i = o == null ? void 0 : o.calendars[0]) != null && i.id ? { calendar_ids: [o.calendars[0].id] } : void 0, this.participants[a].booking = o && this.isRoundRobinConfig && (r != null && r.id) ? { calendar_id: r.id } : (p = o == null ? void 0 : o.calendars[0]) != null && p.id ? { calendar_id: o.calendars[0].id } : void 0, this.participants[a].name = (o == null ? void 0 : o.name) || e.detail.value, this.participants = [...this.participants], this.updateFormValue();
|
|
245
247
|
}
|
|
246
248
|
updateOrganizerAsParticipant(e = !0) {
|
|
247
|
-
var a,
|
|
248
|
-
const t = this.participants.find((
|
|
249
|
+
var a, o, r, l, n, i, p;
|
|
250
|
+
const t = this.participants.find((f) => {
|
|
249
251
|
var h;
|
|
250
|
-
return
|
|
252
|
+
return f.email === ((h = this.currentUser) == null ? void 0 : h.email);
|
|
251
253
|
});
|
|
252
254
|
if (this.isRoundRobinConfig && !t && ((a = this.currentUser) != null && a.email)) {
|
|
253
|
-
const
|
|
255
|
+
const f = ((r = (o = this.currentUserCalendars) == null ? void 0 : o.find((h) => h.is_primary)) == null ? void 0 : r.id) || ((n = (l = this.currentUserCalendars) == null ? void 0 : l[0]) == null ? void 0 : n.id) || "primary";
|
|
254
256
|
this.participants = [
|
|
255
257
|
{
|
|
256
258
|
name: (i = this.currentUser) == null ? void 0 : i.name,
|
|
257
|
-
email: (
|
|
259
|
+
email: (p = this.currentUser) == null ? void 0 : p.email,
|
|
258
260
|
is_organizer: !0,
|
|
259
261
|
availability: {
|
|
260
|
-
calendar_ids: [
|
|
262
|
+
calendar_ids: [f]
|
|
261
263
|
},
|
|
262
264
|
booking: {
|
|
263
|
-
calendar_id:
|
|
265
|
+
calendar_id: f
|
|
264
266
|
}
|
|
265
267
|
},
|
|
266
268
|
...this.participants
|
|
@@ -280,17 +282,17 @@ const z = class {
|
|
|
280
282
|
t.length === 0 ? (this.error = c.t("nylasAdditionalParticipants.error"), this.isInternalsAvailable && this.internals.setValidity({ customError: !0 }, this.error)) : (this.isInternalsAvailable && this.internals.setValidity({}), this.error = "", this.isInternalsAvailable && this.internals.setFormValue(JSON.stringify(t), this.name), e && this.valueChanged.emit({ value: JSON.stringify(t), name: this.name }));
|
|
281
283
|
}
|
|
282
284
|
getArrayDifference(e, t) {
|
|
283
|
-
return e.filter((
|
|
285
|
+
return e.filter((o) => !t.some((r) => o.email === r.email)).map((o) => ({ value: o.email, label: o.email }));
|
|
284
286
|
}
|
|
285
287
|
render() {
|
|
286
|
-
return s(w, { key: "
|
|
288
|
+
return s(w, { key: "c890f9e8afbecede4650f2653d6859a7dd1d227a", part: "nadtnlpart" }, s("nylas-form-card", { key: "ed0209e086710f260bfee048969b59ce54391d04", exportparts: "nfc, nfc__header" }, s("h3", { key: "9016e1b759291ce2c3ed033e2c4fbcc717bd73fa", slot: "header-title", class: "nylas-additional-participants__title", part: "nadtnlpart__title" }, c.t("nylasAdditionalParticipants.headerTitle")), s("p", { key: "c942ac3e280252e59f41a14b4d51a783b01445ab", slot: "header-subtitle", class: "nylas-additional-participants__subtitle", part: "nadtnlpart__subtitle" }, c.t("nylasAdditionalParticipants.headerSubTitle")), s("div", { key: "dfd5384e7740bd8793f82a48ace945f92754115b", slot: "content", class: "nylas-additional-participants__content", part: "nadtnlpart__content" }, s("div", { key: "8bc6f94be42a1c367f41d17213220c69e863a9f5" }, this.participants.map((e, t) => s("div", { class: "nylas-additional-participants__input_group", part: "nadtnlpart__input_group" }, !e.is_organizer && s("label", null, `${c.t("nylasAdditionalParticipants.participant")} ${t}`), s("div", { part: "nadtnlpart__input_wrapper", class: {
|
|
287
289
|
"nylas-additional-participants__input_wrapper": !0,
|
|
288
290
|
"nylas-additional-participants__input_wrapper_organizer": (e == null ? void 0 : e.is_organizer) === !0,
|
|
289
291
|
"nylas-additional-participants__input_wrapper_invalid": e.is_valid === !1,
|
|
290
292
|
error: e.is_valid === !1
|
|
291
293
|
} }, s("div", { class: { "nylas-additional-participants__input": !0, organizer: (e == null ? void 0 : e.is_organizer) === !0 }, part: "nadtnlpart__input" }, e.is_organizer ? s("input-component", { class: "label-input", name: `${t}`, key: t, label: c.t("nylasAdditionalParticipants.organizer"), required: !1, readOnly: e.is_organizer, defaultValue: e.email }, this.isRoundRobinConfig && s("div", { class: "required-input", slot: "additional-input" }, s("input", { type: "checkbox", name: "organizer_participant", id: "organizer_participant", onClick: () => {
|
|
292
294
|
this.includeOrganizerAsParticipant = !this.includeOrganizerAsParticipant, this.updateFormValue();
|
|
293
|
-
}, checked: this.includeOrganizerAsParticipant }), s("label", { htmlFor: "organizer_participant", "aria-label": "Include as participant" }, s("span", { class: "org-as-participant", part: "nadtnlpart__org-as-participant" }, c.t("nylasAdditionalParticipants.organizerAsParticipant")), s("tooltip-component", { id: "organizer_participant_tooltip" }, s("info-icon", { slot: "tooltip-icon" }), s("span", { slot: "tooltip-content" }, s("strong", null, c.t("nylasAdditionalParticipants.tooltip.includeOrganizer"), ":"), " ", c.t("nylasAdditionalParticipants.tooltip.includeOrganizerDesc"), " ", s("br", null), s("strong", null, c.t("nylasAdditionalParticipants.tooltip.excludeOrganizer"), ":"), " ", c.t("nylasAdditionalParticipants.tooltip.excludeOrganizerDesc")))))) : s("input-dropdown", { id: `${t}`, name: `${t}`, filterable: !0, inputValue: e.email, options: this.getArrayDifference(this.participantOptions || [], this.participants) }), !e.is_organizer && s("button", { onClick: () => this.removeParticipant(t), part: "nadtnlpart__remove-participant" }, s("close-icon", null)))), !e.is_valid && s("p", { class: "nylas-additional-participants__error", part: "nadtnlpart__error" }, this.participantErrors[t]))), s("p", { key: "
|
|
295
|
+
}, checked: this.includeOrganizerAsParticipant }), s("label", { htmlFor: "organizer_participant", "aria-label": "Include as participant" }, s("span", { class: "org-as-participant", part: "nadtnlpart__org-as-participant" }, c.t("nylasAdditionalParticipants.organizerAsParticipant")), s("tooltip-component", { id: "organizer_participant_tooltip" }, s("info-icon", { slot: "tooltip-icon" }), s("span", { slot: "tooltip-content" }, s("strong", null, c.t("nylasAdditionalParticipants.tooltip.includeOrganizer"), ":"), " ", c.t("nylasAdditionalParticipants.tooltip.includeOrganizerDesc"), " ", s("br", null), s("strong", null, c.t("nylasAdditionalParticipants.tooltip.excludeOrganizer"), ":"), " ", c.t("nylasAdditionalParticipants.tooltip.excludeOrganizerDesc")))))) : s("input-dropdown", { id: `${t}`, name: `${t}`, filterable: !0, inputValue: e.email, options: this.getArrayDifference(this.participantOptions || [], this.participants) }), !e.is_organizer && s("button", { onClick: () => this.removeParticipant(t), part: "nadtnlpart__remove-participant" }, s("close-icon", null)))), !e.is_valid && s("p", { class: "nylas-additional-participants__error", part: "nadtnlpart__error" }, this.participantErrors[t]))), s("p", { key: "fd000c95c503b6f7c4e04db236b9b2579aadfd55", class: "nylas-additional-participants__error", part: "nadtnlpart__error" }, this.error)), s("button", { key: "97bff64edb72de3d7c3aa80c9ce5d614f2b631f2", class: "nylas-additional-participants__add", part: "nadtnlpart__add-participant", onClick: () => this.addParticipant() }, s("add-circle-icon", { key: "6c631cd08a7970beae81b7afa82f673137f89200" }), " ", s("span", { key: "2b50e06593e323c6445f3833ca57a2b26dd15021" }, this.participants.length > 1 ? c.t("nylasAdditionalParticipants.addParticipant", { context: "next" }) : c.t("nylasAdditionalParticipants.addParticipant", { context: "first" }))))));
|
|
294
296
|
}
|
|
295
297
|
static get formAssociated() {
|
|
296
298
|
return !0;
|
|
@@ -326,34 +328,34 @@ ve([
|
|
|
326
328
|
], z.prototype, "render", null);
|
|
327
329
|
z.style = me;
|
|
328
330
|
const xe = ':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-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff}.nylas-event-description{display:flex;flex-direction:column;gap:4px;position:relative}.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}.nylas-event-description div.event-description{padding:12px 16px;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);white-space:nowrap;scrollbar-width:thin;min-height:50px;overflow-y:auto;white-space:pre-wrap;line-height:1.5;}.nylas-event-description div.event-description::-webkit-scrollbar{width:6px;height:6px}.nylas-event-description div.event-description.error{border-color:var(--nylas-error);border-width:2px;outline:none}.nylas-event-description span.add-additional-fields{display:flex;align-items:center;gap:8px}.nylas-event-description span.add-additional-fields button-component button{height:35px}.nylas-event-description span.help-text{display:inline-block;gap:4px;align-items:center;color:var(--nylas-base-500);font-size:14px;font-style:normal;font-weight:400;line-height:21px;position:relative}.nylas-event-description span.help-text span.label-icon{display:inline-block}.nylas-event-description span.help-text span.label-icon tooltip-component::part(tc__container){position:unset}.nylas-event-description span.help-text span.label-icon tooltip-component::part(tc__content){position:absolute;top:4px;left:50%;transform:translateX(-50%)}.nylas-event-description .highlighted-tag{background-color:var(--nylas-base-200);border-radius:var(--nylas-border-radius);padding:2px 5px;margin-left:4px;margin-bottom:4px;display:inline-block;vertical-align:baseline}.nylas-event-description .token-options{display:block;background-color:var(--nylas-base-0);width:100%;max-height:336px;margin-top:28px;overflow:auto;z-index:1;border-radius:4px;position:absolute;bottom:108px;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){.nylas-event-description .token-options{right:0;width:325px;max-width:unset}}.nylas-event-description .token-options ul{padding:0;list-style-type:none;color:var(--nylas-base-900);max-height:336px;margin:0}.nylas-event-description .token-options ul li{padding:16px, 12px, 16px, 12px;color:var(--nylas-base-900);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}.nylas-event-description .token-options ul li .token-label{display:flex;flex-direction:column;font-weight:400}.nylas-event-description .token-options ul li .token-label .token{color:var(--nylas-abse-900);font-size:16px;line-height:24px}.nylas-event-description .token-options ul li .token-label .description{color:var(--nylas-base-600);font-size:14px;line-height:21px}.nylas-event-description .token-options ul li:hover,.nylas-event-description .token-options ul li:focus,.nylas-event-description .token-options ul li:active,.nylas-event-description .token-options ul li.active{background-color:var(--nylas-base-100)}.nylas-event-description .token-options ul li:hover .token-label .token,.nylas-event-description .token-options ul li:focus .token-label .token,.nylas-event-description .token-options ul li:active .token-label .token,.nylas-event-description .token-options ul li.active .token-label .token{color:var(--nylas-primary)}.nylas-event-description .token-options .selected{background-color:var(--nylas-base-100)}', ke = xe;
|
|
329
|
-
var we = function(e, t, a,
|
|
330
|
-
var r = arguments.length,
|
|
331
|
+
var we = function(e, t, a, o) {
|
|
332
|
+
var r = arguments.length, l = r < 3 ? t : o === null ? o = Object.getOwnPropertyDescriptor(t, a) : o, n;
|
|
331
333
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
332
|
-
|
|
334
|
+
l = Reflect.decorate(e, t, a, o);
|
|
333
335
|
else
|
|
334
336
|
for (var i = e.length - 1; i >= 0; i--)
|
|
335
|
-
(n = e[i]) && (
|
|
336
|
-
return r > 3 &&
|
|
337
|
+
(n = e[i]) && (l = (r < 3 ? n(l) : r > 3 ? n(t, a, l) : n(t, a)) || l);
|
|
338
|
+
return r > 3 && l && Object.defineProperty(t, a, l), l;
|
|
337
339
|
}, A = function(e, t) {
|
|
338
340
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
339
341
|
return Reflect.metadata(e, t);
|
|
340
342
|
};
|
|
341
343
|
const B = class {
|
|
342
344
|
constructor(e) {
|
|
343
|
-
var t, a,
|
|
344
|
-
b(this, e), this.valueChanged = m(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 = (a = (t = this.selectedConfiguration) == null ? void 0 : t.event_booking) == null ? void 0 : a.description, this.name = "description", this.selectedLanguage = void 0, this.hideAutoPopulateButton = !1, this.description = this.eventDescription || ((r = (
|
|
345
|
-
label:
|
|
346
|
-
value:
|
|
347
|
-
labelHTML:
|
|
345
|
+
var t, a, o, r;
|
|
346
|
+
b(this, e), this.valueChanged = m(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 = (a = (t = this.selectedConfiguration) == null ? void 0 : t.event_booking) == null ? void 0 : a.description, this.name = "description", this.selectedLanguage = void 0, this.hideAutoPopulateButton = !1, this.noTemplates = !1, this.description = this.eventDescription || ((r = (o = this.selectedConfiguration) == null ? void 0 : o.event_booking) == null ? void 0 : r.description) || "", this.showTokens = !1, this.availableTokens = k.map((l) => ({
|
|
347
|
+
label: l.token,
|
|
348
|
+
value: l.value,
|
|
349
|
+
labelHTML: l
|
|
348
350
|
})), this.filteredTokens = this.availableTokens, this.ariaActivedescendant = "", this.currentWord = { $value: "", fullText: "", index: -1, focusOffset: -1 }, this.validationError = "", this.additionalFieldTokens = [];
|
|
349
351
|
}
|
|
350
352
|
elementNameChangedHandler(e) {
|
|
351
353
|
d("nylas-event-description", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
352
354
|
}
|
|
353
355
|
selectedConfigurationChangedHandler(e) {
|
|
354
|
-
var
|
|
356
|
+
var l, n;
|
|
355
357
|
d("nylas-custom-booking-flow", "selectedConfigurationChangedHandler", e);
|
|
356
|
-
const t = ((
|
|
358
|
+
const t = ((l = e == null ? void 0 : e.event_booking) == null ? void 0 : l.description) || this.eventDescription || "", a = ((n = e == null ? void 0 : e.scheduler) == null ? void 0 : n.additional_fields) || {}, r = (Object.keys(a) || []).map((i) => ({
|
|
357
359
|
token: `$${i}`,
|
|
358
360
|
value: `\${${i}}`,
|
|
359
361
|
description: a[i].label || ""
|
|
@@ -373,7 +375,7 @@ const B = class {
|
|
|
373
375
|
$invitee_email: "inviteeEmail",
|
|
374
376
|
$duration: "duration"
|
|
375
377
|
};
|
|
376
|
-
this.availableTokens = this.availableTokens.map((
|
|
378
|
+
this.availableTokens = this.availableTokens.map((o) => (a[o.label] && (o.labelHTML.description = c.t(`nylasEventTitle.eventTitleTokenDescription.${a[o.label]}`)), o)), this.filteredTokens = [...this.availableTokens];
|
|
377
379
|
}
|
|
378
380
|
connectedCallback() {
|
|
379
381
|
d("nylas-event-description", "connectedCallback");
|
|
@@ -390,12 +392,12 @@ const B = class {
|
|
|
390
392
|
valueChangedHandler(e) {
|
|
391
393
|
const { name: t, value: a } = e.detail;
|
|
392
394
|
if (t === "additional-fields") {
|
|
393
|
-
const
|
|
395
|
+
const o = JSON.parse(a.toString()), l = (Object.keys(o) || []).map((n) => ({
|
|
394
396
|
token: `$${n}`,
|
|
395
397
|
value: `\${${n}}`,
|
|
396
|
-
description:
|
|
398
|
+
description: o[n].label || ""
|
|
397
399
|
}));
|
|
398
|
-
this.additionalFieldTokens = [...
|
|
400
|
+
this.additionalFieldTokens = [...l], this.availableTokens = [...k, ...l].map((n) => ({
|
|
399
401
|
label: n.token,
|
|
400
402
|
value: n.value,
|
|
401
403
|
labelHTML: n
|
|
@@ -410,38 +412,38 @@ const B = class {
|
|
|
410
412
|
highlightTokens(e) {
|
|
411
413
|
let t = e;
|
|
412
414
|
return [...k, ...this.additionalFieldTokens].forEach((a) => {
|
|
413
|
-
const
|
|
415
|
+
const o = a.value, r = new RegExp(`(\\${o})(?!\\w)`, "g");
|
|
414
416
|
t = (t == null ? void 0 : t.replace(r, '<span class="highlighted-tag">$1</span>')) || "";
|
|
415
417
|
}), t;
|
|
416
418
|
}
|
|
417
419
|
getCurrentSelectionForBrowser() {
|
|
418
|
-
var
|
|
419
|
-
const e = (n, i,
|
|
420
|
+
var o, r, l;
|
|
421
|
+
const e = (n, i, p, f) => {
|
|
420
422
|
const h = n.replace(/[\u200B-\u200D\uFEFF]/g, ""), y = h.lastIndexOf("$"), u = h.substring(y).split(" ")[0];
|
|
421
423
|
return {
|
|
422
424
|
focusOffset: i,
|
|
423
425
|
dollarIndex: y,
|
|
424
426
|
lastWord: u,
|
|
425
427
|
currentText: h,
|
|
426
|
-
node:
|
|
427
|
-
allSelected:
|
|
428
|
+
node: p,
|
|
429
|
+
allSelected: f
|
|
428
430
|
};
|
|
429
431
|
}, t = (n) => {
|
|
430
|
-
var i,
|
|
431
|
-
return n.anchorOffset === 0 && n.focusOffset === ((
|
|
432
|
+
var i, p;
|
|
433
|
+
return n.anchorOffset === 0 && n.focusOffset === ((p = (i = n.focusNode) == null ? void 0 : i.nodeValue) == null ? void 0 : p.length);
|
|
432
434
|
};
|
|
433
435
|
switch (M()) {
|
|
434
436
|
case "Chrome": {
|
|
435
|
-
const n = (
|
|
436
|
-
return e(
|
|
437
|
+
const n = (o = this.host.shadowRoot) == null ? void 0 : o.getSelection(), i = n == null ? void 0 : n.focusNode, p = (i == null ? void 0 : i.nodeValue) || "", f = n && t(n);
|
|
438
|
+
return e(p, (n == null ? void 0 : n.focusOffset) || -1, i, f);
|
|
437
439
|
}
|
|
438
440
|
case "Firefox": {
|
|
439
|
-
const n = document.getSelection(), i = ((r = n == null ? void 0 : n.anchorNode) == null ? void 0 : r.nodeValue) || "",
|
|
440
|
-
return e(i, (n == null ? void 0 : n.focusOffset) || -1, n == null ? void 0 : n.anchorNode,
|
|
441
|
+
const n = document.getSelection(), i = ((r = n == null ? void 0 : n.anchorNode) == null ? void 0 : r.nodeValue) || "", p = n && t(n);
|
|
442
|
+
return e(i, (n == null ? void 0 : n.focusOffset) || -1, n == null ? void 0 : n.anchorNode, p);
|
|
441
443
|
}
|
|
442
444
|
case "Safari": {
|
|
443
|
-
const n = window.getSelection(), i = n == null ? void 0 : n.getComposedRanges(this.host.shadowRoot)[0],
|
|
444
|
-
return e(
|
|
445
|
+
const n = window.getSelection(), i = n == null ? void 0 : n.getComposedRanges(this.host.shadowRoot)[0], p = ((l = i == null ? void 0 : i.startContainer) == null ? void 0 : l.nodeValue) || "", f = n && t(n);
|
|
446
|
+
return e(p, (i == null ? void 0 : i.endOffset) || -1, i == null ? void 0 : i.startContainer, f);
|
|
445
447
|
}
|
|
446
448
|
default:
|
|
447
449
|
return console.warn("Browser not supported"), null;
|
|
@@ -449,48 +451,48 @@ const B = class {
|
|
|
449
451
|
}
|
|
450
452
|
handleChange(e) {
|
|
451
453
|
let t = e.target.textContent || "";
|
|
452
|
-
t =
|
|
454
|
+
t = S(t);
|
|
453
455
|
const a = this.getCurrentSelectionForBrowser();
|
|
454
456
|
if (!a) {
|
|
455
457
|
this.updateEventDescription(t), this.resetDropdown();
|
|
456
458
|
return;
|
|
457
459
|
}
|
|
458
|
-
const { focusOffset:
|
|
459
|
-
if (r === -1 ||
|
|
460
|
+
const { focusOffset: o, dollarIndex: r, lastWord: l, currentText: n } = a;
|
|
461
|
+
if (r === -1 || o < r) {
|
|
460
462
|
this.updateEventDescription(t), this.resetDropdown();
|
|
461
463
|
return;
|
|
462
464
|
}
|
|
463
|
-
|
|
464
|
-
$value:
|
|
465
|
+
l.startsWith("$") ? (this.showTokens = !0, this.currentWord = {
|
|
466
|
+
$value: l,
|
|
465
467
|
fullText: n,
|
|
466
468
|
index: r,
|
|
467
|
-
focusOffset:
|
|
468
|
-
}, this.populateSuggestionsDropdown(
|
|
469
|
+
focusOffset: o
|
|
470
|
+
}, this.populateSuggestionsDropdown(l)) : this.resetDropdown(), this.updateEventDescription(t);
|
|
469
471
|
}
|
|
470
472
|
handleInputKeyDown(e) {
|
|
471
|
-
var a,
|
|
473
|
+
var a, o, r, l;
|
|
472
474
|
const t = this.getCurrentSelectionForBrowser();
|
|
473
|
-
if (t != null && t.allSelected && !
|
|
475
|
+
if (t != null && t.allSelected && !H(e) && (this.descriptionRef.innerHTML = ""), e.key === "Enter") {
|
|
474
476
|
e.preventDefault();
|
|
475
477
|
const n = (a = this.host.shadowRoot) == null ? void 0 : a.getElementById(this.ariaActivedescendant);
|
|
476
478
|
if (n)
|
|
477
479
|
n.click(), this.ariaActivedescendant = "";
|
|
478
480
|
else {
|
|
479
|
-
const i = t == null ? void 0 : t.node,
|
|
480
|
-
if (!i ||
|
|
481
|
-
const
|
|
481
|
+
const i = t == null ? void 0 : t.node, p = (t == null ? void 0 : t.focusOffset) || 0;
|
|
482
|
+
if (!i || p === -1 || this.descriptionRef.childNodes.length === 0) {
|
|
483
|
+
const f = document.createTextNode(`
|
|
482
484
|
`);
|
|
483
|
-
this.descriptionRef.insertBefore(
|
|
485
|
+
this.descriptionRef.insertBefore(f, this.descriptionRef.firstChild);
|
|
484
486
|
const h = document.createRange();
|
|
485
|
-
h.setStart(
|
|
487
|
+
h.setStart(f, 1), h.collapse(!0);
|
|
486
488
|
const y = window.getSelection();
|
|
487
489
|
y == null || y.removeAllRanges(), y == null || y.addRange(h);
|
|
488
490
|
} else if (i.nodeType === Node.TEXT_NODE) {
|
|
489
|
-
const
|
|
490
|
-
` +
|
|
491
|
+
const f = i.nodeValue || "", h = f.slice(0, p) + `
|
|
492
|
+
` + f.slice(p);
|
|
491
493
|
i.nodeValue = h;
|
|
492
494
|
const y = document.createRange();
|
|
493
|
-
y.setStart(i,
|
|
495
|
+
y.setStart(i, p + 1), y.collapse(!0);
|
|
494
496
|
const u = window.getSelection();
|
|
495
497
|
u == null || u.removeAllRanges(), u == null || u.addRange(y);
|
|
496
498
|
}
|
|
@@ -498,7 +500,7 @@ const B = class {
|
|
|
498
500
|
}
|
|
499
501
|
} else if (e.key === "ArrowDown") {
|
|
500
502
|
this.showTokens && e.preventDefault();
|
|
501
|
-
const n = (
|
|
503
|
+
const n = (o = this.host.shadowRoot) == null ? void 0 : o.getElementById(this.ariaActivedescendant);
|
|
502
504
|
if (n) {
|
|
503
505
|
const i = n.nextElementSibling;
|
|
504
506
|
i ? this.ariaActivedescendant = i.id : this.ariaActivedescendant = this.filteredTokens[0].label;
|
|
@@ -515,35 +517,35 @@ const B = class {
|
|
|
515
517
|
} else if (e.key === "Escape")
|
|
516
518
|
e.preventDefault(), this.resetDropdown();
|
|
517
519
|
else if (e.key === "Backspace" || e.key === "Delete") {
|
|
518
|
-
const n = (
|
|
520
|
+
const n = (l = t == null ? void 0 : t.node) == null ? void 0 : l.parentNode;
|
|
519
521
|
t != null && t.currentText.startsWith("${") && n && n.nodeName === "SPAN" && (e.preventDefault(), n.removeChild(t.node), n.remove(), this.resetDropdown()), (this.descriptionRef.textContent === "" || t != null && t.allSelected) && (this.descriptionRef.innerHTML = "", this.updateEventDescription(""));
|
|
520
522
|
}
|
|
521
523
|
}
|
|
522
524
|
selectOption(e, t) {
|
|
523
525
|
var T;
|
|
524
526
|
e.preventDefault();
|
|
525
|
-
const a = this.currentWord.fullText,
|
|
526
|
-
let r = this.descriptionRef.firstChild,
|
|
527
|
+
const a = this.currentWord.fullText, o = this.currentWord.$value;
|
|
528
|
+
let r = this.descriptionRef.firstChild, l = null;
|
|
527
529
|
for (; r; ) {
|
|
528
530
|
if (r.nodeType === 3) {
|
|
529
531
|
const v = ((T = r.textContent) == null ? void 0 : T.replace(/[\u200B-\u200D\uFEFF]/g, "")) || "", E = a.replace(/[\u200B-\u200D\uFEFF]/g, "");
|
|
530
532
|
if (v.includes(E)) {
|
|
531
|
-
|
|
533
|
+
l = r;
|
|
532
534
|
break;
|
|
533
535
|
}
|
|
534
536
|
}
|
|
535
537
|
r = r.nextSibling;
|
|
536
538
|
}
|
|
537
|
-
if (!
|
|
539
|
+
if (!l)
|
|
538
540
|
return;
|
|
539
|
-
const n =
|
|
541
|
+
const n = l.textContent || "", i = n.indexOf(o), p = n.substring(0, i), f = n.substring(i + o.length), h = document.createTextNode(p), y = document.createRange(), u = document.createElement("span");
|
|
540
542
|
u.classList.add("highlighted-tag"), u.textContent = `${t.value}`;
|
|
541
|
-
const _ = document.createTextNode(
|
|
542
|
-
if (
|
|
543
|
-
|
|
543
|
+
const _ = document.createTextNode(f);
|
|
544
|
+
if (f !== "")
|
|
545
|
+
l.replaceWith(h, u, _), y.setStart(_, 1);
|
|
544
546
|
else {
|
|
545
547
|
const v = document.createTextNode("");
|
|
546
|
-
|
|
548
|
+
l.replaceWith(h, u, v), y.setStart(v, 1);
|
|
547
549
|
}
|
|
548
550
|
this.resetDropdown(), this.descriptionRef.focus();
|
|
549
551
|
const g = window.getSelection();
|
|
@@ -569,19 +571,19 @@ const B = class {
|
|
|
569
571
|
handleAddAdditionalFields() {
|
|
570
572
|
if (this.additionalFieldTokens.length === 0)
|
|
571
573
|
return;
|
|
572
|
-
const e = this.descriptionRef.innerHTML, t = "--- Additional Fields ---", a = "--- End Additional Fields ---",
|
|
573
|
-
let
|
|
574
|
+
const e = this.descriptionRef.innerHTML, t = "--- Additional Fields ---", a = "--- End Additional Fields ---", o = e.indexOf(t), r = e.indexOf(a);
|
|
575
|
+
let l = t + `
|
|
574
576
|
`;
|
|
575
577
|
this.additionalFieldTokens.forEach((i) => {
|
|
576
|
-
|
|
578
|
+
l += `${i.description}: ${i.value}
|
|
577
579
|
`;
|
|
578
|
-
}),
|
|
580
|
+
}), l += a;
|
|
579
581
|
let n;
|
|
580
|
-
|
|
582
|
+
o !== -1 && r !== -1 ? n = e.substring(0, o) + l + e.substring(r + a.length) : n = e + l, this.updateEventDescriptionFromProp(n), this.updateEventDescription(n);
|
|
581
583
|
}
|
|
582
584
|
render() {
|
|
583
585
|
var e;
|
|
584
|
-
return s(w, { key: "
|
|
586
|
+
return s(w, { key: "22675b5fed7bbca517109629eae72cbcc92b21a9" }, s("div", { key: "16c888f9635a3d6a40e1caaa98a032044a29abe1", class: "nylas-event-description", part: "nedesc" }, s("label", { key: "05f549d01ea2477c208c4e27f41ae7c5d3487ce9", htmlFor: "description" }, c.t("nylasEventDescription.headerTitle"), s("span", { key: "5355ed1517f58fc6c07ce121be35998154a166cc", class: "label-icon" }, s("tooltip-component", { key: "2efa954b0f0ee944b5b88039d97d72fa0d3ec46e" }, s("info-icon", { key: "e6c02583a6668f0c25771183a7a11d4c0de87887", slot: "tooltip-icon" }), s("span", { key: "ff003ecf4ba64e385fc50edff5c4a621a3600e5e", slot: "tooltip-content" }, c.t("nylasEventDescription.tooltip.desc"))))), s("div", { key: "296a0a0321ab1b1be9f3b6e89bcf9f58da8b6969", id: "event-description", class: { "event-description": !0 }, part: "nedesc__textarea", contentEditable: "true", onInput: (t) => this.handleChange(t), onKeyDown: (t) => this.handleInputKeyDown(t), ref: (t) => this.descriptionRef = t }), !this.noTemplates && this.showTokens && ((e = this.filteredTokens) == null ? void 0 : e.length) > 0 && s("div", { class: "token-options", part: "nedesc__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: (a) => this.selectOption(a, t), role: "option" }, this.getLabelHTML(t.labelHTML))))), !this.noTemplates && s("span", { class: "help-text" }, c.t("nylasEventTitle.helpText", { context: "start", field: c.t("nylasEventTitle.description") }), " ", s("code", null, "$"), " ", c.t("nylasEventTitle.helpText", { context: "end" }), s("span", { class: "label-icon" }, s("tooltip-component", null, s("info-icon", { slot: "tooltip-icon", width: "13", height: "13" }), s("span", { slot: "tooltip-content" }, c.t("nylasEventTitle.tooltip.desc"), " ", s("code", null, "${invitee}"))))), !this.noTemplates && !this.hideAutoPopulateButton && s("span", { class: "add-additional-fields" }, s("button-component", { variant: "basic", onClick: () => this.handleAddAdditionalFields() }, c.t("nylasEventDescription.addAdditionalFields.buttonText")), s("span", { class: "label-icon" }, s("tooltip-component", null, s("info-icon", { slot: "tooltip-icon" }), s("span", { slot: "tooltip-content" }, c.t("nylasEventDescription.addAdditionalFields.tooltip.desc"), " ", s("code", null, "${invitee}")))))));
|
|
585
587
|
}
|
|
586
588
|
static get formAssociated() {
|
|
587
589
|
return !0;
|
|
@@ -613,14 +615,14 @@ we([
|
|
|
613
615
|
], B.prototype, "render", null);
|
|
614
616
|
B.style = ke;
|
|
615
617
|
const Ce = ':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-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff}.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}', _e = Ce;
|
|
616
|
-
var Te = function(e, t, a,
|
|
617
|
-
var r = arguments.length,
|
|
618
|
+
var Te = function(e, t, a, o) {
|
|
619
|
+
var r = arguments.length, l = r < 3 ? t : o === null ? o = Object.getOwnPropertyDescriptor(t, a) : o, n;
|
|
618
620
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
619
|
-
|
|
621
|
+
l = Reflect.decorate(e, t, a, o);
|
|
620
622
|
else
|
|
621
623
|
for (var i = e.length - 1; i >= 0; i--)
|
|
622
|
-
(n = e[i]) && (
|
|
623
|
-
return r > 3 &&
|
|
624
|
+
(n = e[i]) && (l = (r < 3 ? n(l) : r > 3 ? n(t, a, l) : n(t, a)) || l);
|
|
625
|
+
return r > 3 && l && Object.defineProperty(t, a, l), l;
|
|
624
626
|
}, D = function(e, t) {
|
|
625
627
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
626
628
|
return Reflect.metadata(e, t);
|
|
@@ -645,7 +647,7 @@ const U = class {
|
|
|
645
647
|
d("nylas-event-info", "disconnectedCallback");
|
|
646
648
|
}
|
|
647
649
|
render() {
|
|
648
|
-
return s(w, { key: "
|
|
650
|
+
return s(w, { key: "d40cf8e0103c03622c97c5f5855564d420ecde78" }, s("nylas-form-card", { key: "e9283642c76c332ff1566940870ced7ff4817624", exportparts: "nfc__header: nei__header" }, s("h1", { key: "ebdfd68cb6ca4235b2aa216199b58a317f4166d3", slot: "header-title", class: "nylas-event-info__title", part: "nei__title" }, c.t("nylasEventInfo.headerTitle")), s("div", { key: "949bc14a5addccd6a189dd6cd86ea9faafc95256", slot: "content", class: "nylas-event-info__content" }, s("slot", { key: "f9641d789ae88e2b53a71444e40ce1a1a17132cc", name: "inputs" }))));
|
|
649
651
|
}
|
|
650
652
|
static get formAssociated() {
|
|
651
653
|
return !0;
|
|
@@ -672,14 +674,14 @@ Te([
|
|
|
672
674
|
], U.prototype, "render", null);
|
|
673
675
|
U.style = _e;
|
|
674
676
|
const Le = ':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-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff}.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}', Ee = Le;
|
|
675
|
-
var Oe = function(e, t, a,
|
|
676
|
-
var r = arguments.length,
|
|
677
|
+
var Oe = function(e, t, a, o) {
|
|
678
|
+
var r = arguments.length, l = r < 3 ? t : o === null ? o = Object.getOwnPropertyDescriptor(t, a) : o, n;
|
|
677
679
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
678
|
-
|
|
680
|
+
l = Reflect.decorate(e, t, a, o);
|
|
679
681
|
else
|
|
680
682
|
for (var i = e.length - 1; i >= 0; i--)
|
|
681
|
-
(n = e[i]) && (
|
|
682
|
-
return r > 3 &&
|
|
683
|
+
(n = e[i]) && (l = (r < 3 ? n(l) : r > 3 ? n(t, a, l) : n(t, a)) || l);
|
|
684
|
+
return r > 3 && l && Object.defineProperty(t, a, l), l;
|
|
683
685
|
}, P = function(e, t) {
|
|
684
686
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
685
687
|
return Reflect.metadata(e, t);
|
|
@@ -696,9 +698,9 @@ const W = class {
|
|
|
696
698
|
d("nylas-event-location", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
697
699
|
}
|
|
698
700
|
selectedConfigurationChangedHandler(e) {
|
|
699
|
-
var
|
|
701
|
+
var o, r;
|
|
700
702
|
d("nylas-custom-booking-flow", "selectedConfigurationChangedHandler", e);
|
|
701
|
-
const t = ((
|
|
703
|
+
const t = ((o = e == null ? void 0 : e.event_booking) == null ? void 0 : o.location) || this.eventLocation, a = ((r = e == null ? void 0 : e.event_booking) == null ? void 0 : r.conferencing) || this.eventConferencing;
|
|
702
704
|
a != null && a.provider ? (this.selectedLocationOption = this.setDefaultLocationOption(a, t ?? ""), this.grantId = this.setDefaultGrantID(a), this.location = t || "") : t ? (this.selectedLocationOption = t ? "custom" : "none", this.location = t) : (this.selectedLocationOption = "none", this.location = "");
|
|
703
705
|
}
|
|
704
706
|
currentUserChangedHandler(e) {
|
|
@@ -710,9 +712,9 @@ const W = class {
|
|
|
710
712
|
selectedLanguageChangedHandler(e, t) {
|
|
711
713
|
if (e === t)
|
|
712
714
|
return;
|
|
713
|
-
c.changeLanguage(e), this.locationOptions.map((
|
|
714
|
-
const r = this.locationOptions.findIndex((
|
|
715
|
-
this.locationOptions[r].label = c.t(`nylasEventLocation.conferenceOptions.${
|
|
715
|
+
c.changeLanguage(e), this.locationOptions.map((o) => o.value).forEach((o) => {
|
|
716
|
+
const r = this.locationOptions.findIndex((l) => l.value === o);
|
|
717
|
+
this.locationOptions[r].label = c.t(`nylasEventLocation.conferenceOptions.${o}`), this.locationOptions[r].labelHTML = this.getLabelHTML(o);
|
|
716
718
|
}), this.locationOptions = [...this.locationOptions];
|
|
717
719
|
}
|
|
718
720
|
connectedCallback() {
|
|
@@ -722,14 +724,14 @@ const W = class {
|
|
|
722
724
|
d("nylas-event-location", "componentWillLoad"), this.host.setAttribute("name", this.name);
|
|
723
725
|
}
|
|
724
726
|
componentDidLoad() {
|
|
725
|
-
var t, a,
|
|
727
|
+
var t, a, o, r;
|
|
726
728
|
d("nylas-event-location", "componentDidLoad"), (t = this.selectedConfiguration) != null && t.event_booking ? this.selectedConfigurationChangedHandler(this.selectedConfiguration) : (this.selectedLocationOption = this.setDefaultLocationOption(this.eventConferencing || null, this.eventLocation ?? ""), this.location = this.eventLocation ?? ""), this.userProviderState = this.userProvider ?? ((a = this.currentUser) == null ? void 0 : a.provider) ?? "", this.setLocationOptionsForProvider(this.userProviderState);
|
|
727
|
-
const e = (
|
|
729
|
+
const e = (o = this.internals) == null ? void 0 : o.form;
|
|
728
730
|
if (e) {
|
|
729
|
-
const
|
|
730
|
-
|
|
731
|
+
const l = new FormData(e);
|
|
732
|
+
l.set("conference", this.getConferencePayload()), l.set(this.name, this.location);
|
|
731
733
|
}
|
|
732
|
-
(r = this.conferenceProviders) != null && r.zoom && !this.locationOptions.some((
|
|
734
|
+
(r = this.conferenceProviders) != null && r.zoom && !this.locationOptions.some((l) => l.value === "zoom") && this.locationOptions.push({ value: "zoom", label: c.t("nylasEventLocation.conferenceOptions.zoom"), labelHTML: this.getLabelHTML("zoom") });
|
|
733
735
|
}
|
|
734
736
|
disconnectedCallback() {
|
|
735
737
|
d("nylas-event-location", "disconnectedCallback");
|
|
@@ -747,7 +749,7 @@ const W = class {
|
|
|
747
749
|
return JSON.stringify(t);
|
|
748
750
|
}
|
|
749
751
|
nylasFormDropdownChangedHandler(e) {
|
|
750
|
-
var a,
|
|
752
|
+
var a, o, r;
|
|
751
753
|
this.selectedLocationOption = e.detail.value;
|
|
752
754
|
let t;
|
|
753
755
|
switch (this.selectedLocationOption) {
|
|
@@ -761,33 +763,33 @@ const W = class {
|
|
|
761
763
|
}
|
|
762
764
|
case "google": {
|
|
763
765
|
this.location = "", this.setFormValue("", this.name);
|
|
764
|
-
const
|
|
766
|
+
const l = (a = this.conferenceProviders) == null ? void 0 : a.google;
|
|
765
767
|
t = {
|
|
766
768
|
provider: L.google,
|
|
767
|
-
autocreate:
|
|
768
|
-
conf_grant_id:
|
|
769
|
+
autocreate: l ? {
|
|
770
|
+
conf_grant_id: l
|
|
769
771
|
} : {}
|
|
770
772
|
}, this.valueChanged.emit({ value: JSON.stringify(t), name: "conference" }), this.valueChanged.emit({ value: "", name: this.name });
|
|
771
773
|
break;
|
|
772
774
|
}
|
|
773
775
|
case "microsoft": {
|
|
774
776
|
this.location = "", this.setFormValue("", this.name);
|
|
775
|
-
const
|
|
777
|
+
const l = (o = this.conferenceProviders) == null ? void 0 : o.microsoft;
|
|
776
778
|
t = {
|
|
777
779
|
provider: L.microsoft,
|
|
778
|
-
autocreate:
|
|
779
|
-
conf_grant_id:
|
|
780
|
+
autocreate: l ? {
|
|
781
|
+
conf_grant_id: l
|
|
780
782
|
} : {}
|
|
781
783
|
}, this.valueChanged.emit({ value: JSON.stringify(t), name: "conference" }), this.valueChanged.emit({ value: "", name: this.name });
|
|
782
784
|
break;
|
|
783
785
|
}
|
|
784
786
|
case "zoom": {
|
|
785
787
|
this.location = "", this.setFormValue("", this.name);
|
|
786
|
-
const
|
|
788
|
+
const l = (r = this.conferenceProviders) == null ? void 0 : r.zoom;
|
|
787
789
|
t = {
|
|
788
790
|
provider: L.zoom,
|
|
789
|
-
autocreate:
|
|
790
|
-
conf_grant_id:
|
|
791
|
+
autocreate: l ? {
|
|
792
|
+
conf_grant_id: l
|
|
791
793
|
} : {}
|
|
792
794
|
}, this.valueChanged.emit({ value: JSON.stringify(t), name: "conference" }), this.valueChanged.emit({ value: "", name: this.name });
|
|
793
795
|
break;
|
|
@@ -815,7 +817,7 @@ const W = class {
|
|
|
815
817
|
typeof this.internals.setFormValue == "function" && this.internals.setFormValue(e, t);
|
|
816
818
|
}
|
|
817
819
|
handleChange(e) {
|
|
818
|
-
const t =
|
|
820
|
+
const t = S(e.target.value);
|
|
819
821
|
this.location = t, this.setFormValue(t, this.name), this.valueChanged.emit({ value: t, name: this.name });
|
|
820
822
|
}
|
|
821
823
|
getIcon(e) {
|
|
@@ -845,7 +847,7 @@ const W = class {
|
|
|
845
847
|
}
|
|
846
848
|
render() {
|
|
847
849
|
const e = typeof this.selectedLocationOption < "u" ? this.locationOptions.find((t) => t.value == this.selectedLocationOption) : null;
|
|
848
|
-
return s(w, { key: "
|
|
850
|
+
return s(w, { key: "9e541c1a84428cc8ba0f3383cdd9393cdf3508c5" }, s("div", { key: "d2a3ff466623debe31d4efdf68c116278972e8c9", class: "nylas-event-location", part: "nel" }, s("label", { key: "f7b1497042b857b8d024fcd9000d84e1014f4679", htmlFor: "location" }, c.t("nylasEventLocation.headerTitle"), s("span", { key: "ee06d02e9145a730bc103a891871dfd3e77f561c", class: "label-icon" }, s("tooltip-component", { key: "b041e52abc869fe79ee9762d4e37b2ed7e0367ef" }, s("info-icon", { key: "67deef561d61bbb002b0bceb9389f56f836503ed", slot: "tooltip-icon" }), s("span", { key: "f335668f735450e9b60eb23ce4c0f404150012fa", slot: "tooltip-content" }, c.t("nylasEventLocation.tooltip.desc"))))), s("div", { key: "5c2cdf07d348428156ee73505a1fe3e77706df58", class: "location-input" }, s("select-dropdown", { key: "e827bb9b663cfdb6c9bb1604c524fb4550d6fdcb", withSearch: !1, name: "location", options: this.locationOptions, defaultSelectedOption: e, exportparts: "sd_dropdown: nel__dropdown, sd_dropdown-button: nel__dropdown-button, sd_dropdown-content: nel__dropdown-content" }, s("span", { key: "192e17fe34f6c06a3ea426577cce37dcbc39f7ee", slot: "select-icon" }, this.getIcon(this.selectedLocationOption))), this.selectedLocationOption === "custom" && s("input", { type: "text", part: "nel__location", id: "location", name: "location", maxlength: "1024", value: this.location, onInput: (t) => this.handleChange(t) }))));
|
|
849
851
|
}
|
|
850
852
|
static get formAssociated() {
|
|
851
853
|
return !0;
|
|
@@ -880,15 +882,15 @@ Oe([
|
|
|
880
882
|
P("design:returntype", void 0)
|
|
881
883
|
], W.prototype, "render", null);
|
|
882
884
|
W.style = Ee;
|
|
883
|
-
const Ie = ':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-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff}.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:
|
|
884
|
-
var De = function(e, t, a,
|
|
885
|
-
var r = arguments.length,
|
|
885
|
+
const Ie = ':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-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff}.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:auto;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);border-width:2px;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{display:inline-block;gap:4px;align-items:center;color:var(--nylas-base-500);font-size:14px;font-style:normal;font-weight:400;line-height:21px;position:relative}.nylas-event-title span.help-text span.label-icon{display:inline-block}.nylas-event-title span.help-text span.label-icon tooltip-component::part(tc__container){position:unset}.nylas-event-title span.help-text span.label-icon tooltip-component::part(tc__content){position:absolute;top:4px;left:50%;transform:translateX(-50%)}.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:var(--nylas-base-900);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)}', Ae = Ie;
|
|
886
|
+
var De = function(e, t, a, o) {
|
|
887
|
+
var r = arguments.length, l = r < 3 ? t : o === null ? o = Object.getOwnPropertyDescriptor(t, a) : o, n;
|
|
886
888
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
887
|
-
|
|
889
|
+
l = Reflect.decorate(e, t, a, o);
|
|
888
890
|
else
|
|
889
891
|
for (var i = e.length - 1; i >= 0; i--)
|
|
890
|
-
(n = e[i]) && (
|
|
891
|
-
return r > 3 &&
|
|
892
|
+
(n = e[i]) && (l = (r < 3 ? n(l) : r > 3 ? n(t, a, l) : n(t, a)) || l);
|
|
893
|
+
return r > 3 && l && Object.defineProperty(t, a, l), l;
|
|
892
894
|
}, $ = function(e, t) {
|
|
893
895
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
894
896
|
return Reflect.metadata(e, t);
|
|
@@ -896,10 +898,10 @@ var De = function(e, t, a, l) {
|
|
|
896
898
|
const j = class {
|
|
897
899
|
constructor(e) {
|
|
898
900
|
var t, a;
|
|
899
|
-
b(this, e), this.valueChanged = m(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 = (a = (t = this.selectedConfiguration) == null ? void 0 : t.event_booking) == null ? void 0 : a.title, this.name = "title", this.selectedLanguage = void 0, this.showTokens = !1, this.availableTokens = k.map((
|
|
900
|
-
label:
|
|
901
|
-
value:
|
|
902
|
-
labelHTML:
|
|
901
|
+
b(this, e), this.valueChanged = m(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 = (a = (t = this.selectedConfiguration) == null ? void 0 : t.event_booking) == null ? void 0 : a.title, this.name = "title", this.selectedLanguage = void 0, this.noTemplates = !1, this.showTokens = !1, this.availableTokens = k.map((o) => ({
|
|
902
|
+
label: o.token,
|
|
903
|
+
value: o.value,
|
|
904
|
+
labelHTML: o
|
|
903
905
|
})), this.filteredTokens = this.availableTokens, this.ariaActivedescendant = "", this.currentWord = { $value: "", fullText: "", index: -1, focusOffset: -1 }, this.validationError = "", this.configEventTitle = "", this.additionalFieldTokens = [];
|
|
904
906
|
}
|
|
905
907
|
elementNameChangedHandler(e) {
|
|
@@ -908,16 +910,16 @@ const j = class {
|
|
|
908
910
|
ariaActivedescendantChangedHandler(e) {
|
|
909
911
|
var t, a;
|
|
910
912
|
if (d("[nylas-event-title]", "ariaActivedescendantChangedHandler", e), e !== "") {
|
|
911
|
-
const
|
|
912
|
-
|
|
913
|
+
const o = (t = this.host.shadowRoot) == null ? void 0 : t.getElementById(e);
|
|
914
|
+
o == null || o.classList.add("active");
|
|
913
915
|
} else {
|
|
914
|
-
const
|
|
915
|
-
|
|
916
|
+
const o = (a = this.host.shadowRoot) == null ? void 0 : a.querySelectorAll(".token-options li.active");
|
|
917
|
+
o == null || o.forEach((r) => r.classList.remove("active"));
|
|
916
918
|
}
|
|
917
919
|
}
|
|
918
920
|
configChangedHandler(e) {
|
|
919
|
-
var
|
|
920
|
-
const t = (
|
|
921
|
+
var l, n;
|
|
922
|
+
const t = (l = e == null ? void 0 : e.event_booking) == null ? void 0 : l.title, a = ((n = e == null ? void 0 : e.scheduler) == null ? void 0 : n.additional_fields) || {}, r = (Object.keys(a) || []).map((i) => ({
|
|
921
923
|
token: `$${i}`,
|
|
922
924
|
value: `\${${i}}`,
|
|
923
925
|
description: a[i].label || ""
|
|
@@ -937,7 +939,7 @@ const j = class {
|
|
|
937
939
|
$invitee_email: "inviteeEmail",
|
|
938
940
|
$duration: "duration"
|
|
939
941
|
};
|
|
940
|
-
this.availableTokens = this.availableTokens.map((
|
|
942
|
+
this.availableTokens = this.availableTokens.map((o) => (a[o.label] && (o.labelHTML.description = c.t(`nylasEventTitle.eventTitleTokenDescription.${a[o.label]}`)), o)), this.filteredTokens = [...this.availableTokens];
|
|
941
943
|
}
|
|
942
944
|
connectedCallback() {
|
|
943
945
|
d("[nylas-event-title]", "connectedCallback");
|
|
@@ -946,10 +948,10 @@ const j = class {
|
|
|
946
948
|
d("[nylas-event-title]", "componentWillLoad"), this.host.setAttribute("name", this.name);
|
|
947
949
|
}
|
|
948
950
|
componentDidLoad() {
|
|
949
|
-
var t, a,
|
|
951
|
+
var t, a, o, r;
|
|
950
952
|
d("[nylas-event-title]", "componentDidLoad");
|
|
951
953
|
let e = this.eventTitle || this.configEventTitle;
|
|
952
|
-
(a = (t = this.selectedConfiguration) == null ? void 0 : t.event_booking) != null && a.title && (e = (r = (
|
|
954
|
+
(a = (t = this.selectedConfiguration) == null ? void 0 : t.event_booking) != null && a.title && (e = (r = (o = this.selectedConfiguration) == null ? void 0 : o.event_booking) == null ? void 0 : r.title), e && (this.updateEventTitleFromProp(e), this.updateEventTitle(e, !0));
|
|
953
955
|
}
|
|
954
956
|
disconnectedCallback() {
|
|
955
957
|
d("[nylas-event-title]", "disconnectedCallback");
|
|
@@ -961,12 +963,12 @@ const j = class {
|
|
|
961
963
|
valueChangedHandler(e) {
|
|
962
964
|
const { name: t, value: a } = e.detail;
|
|
963
965
|
if (t === "additional-fields") {
|
|
964
|
-
const
|
|
966
|
+
const o = JSON.parse(a.toString()), l = (Object.keys(o) || []).map((n) => ({
|
|
965
967
|
token: `$${n}`,
|
|
966
968
|
value: `\${${n}}`,
|
|
967
|
-
description:
|
|
969
|
+
description: o[n].label || ""
|
|
968
970
|
}));
|
|
969
|
-
this.additionalFieldTokens = [...
|
|
971
|
+
this.additionalFieldTokens = [...l], this.availableTokens = [...k, ...l].map((n) => ({
|
|
970
972
|
label: n.token,
|
|
971
973
|
value: n.value,
|
|
972
974
|
labelHTML: n
|
|
@@ -974,46 +976,46 @@ const j = class {
|
|
|
974
976
|
}
|
|
975
977
|
}
|
|
976
978
|
updateEventTitleFromProp(e) {
|
|
977
|
-
var a,
|
|
979
|
+
var a, o, r;
|
|
978
980
|
d("[nylas-event-title]", "eventTitleChangedHandler", e);
|
|
979
981
|
const t = e || this.configEventTitle;
|
|
980
|
-
this.titleRef && (this.titleRef.innerHTML = this.highlightTokens(t), typeof this.internals.setValidity == "function" && (!t || t === "" ? (this.titleRef.focus(), (a = this.internals) == null || a.setValidity({ customError: !0 }, "Event title is required", this.titleRef)) : ((
|
|
982
|
+
this.titleRef && (this.titleRef.innerHTML = this.highlightTokens(t), typeof this.internals.setValidity == "function" && (!t || t === "" ? (this.titleRef.focus(), (a = this.internals) == null || a.setValidity({ customError: !0 }, "Event title is required", this.titleRef)) : ((o = this.internals) == null || o.setValidity({ customError: !1 }), this.isInternalsAvailable && ((r = this.internals) == null || r.setFormValue(t, this.name)))));
|
|
981
983
|
}
|
|
982
984
|
highlightTokens(e) {
|
|
983
985
|
let t = e;
|
|
984
986
|
return [...k, ...this.additionalFieldTokens].forEach((a) => {
|
|
985
|
-
const
|
|
987
|
+
const o = a.value, r = new RegExp(`(\\${o})(?!\\w)`, "g");
|
|
986
988
|
t = (t == null ? void 0 : t.replace(r, '<span class="highlighted-tag">$1</span>')) || "";
|
|
987
989
|
}), t;
|
|
988
990
|
}
|
|
989
991
|
getCurrentSelectionForBrowser() {
|
|
990
|
-
var
|
|
991
|
-
const e = (n, i,
|
|
992
|
+
var o, r, l;
|
|
993
|
+
const e = (n, i, p, f) => {
|
|
992
994
|
const h = n.replace(/[\u200B-\u200D\uFEFF]/g, ""), y = h.lastIndexOf("$"), u = h.substring(y).split(" ")[0];
|
|
993
995
|
return {
|
|
994
996
|
focusOffset: i,
|
|
995
997
|
dollarIndex: y,
|
|
996
998
|
lastWord: u,
|
|
997
999
|
currentText: h,
|
|
998
|
-
node:
|
|
999
|
-
allSelected:
|
|
1000
|
+
node: p,
|
|
1001
|
+
allSelected: f
|
|
1000
1002
|
};
|
|
1001
1003
|
}, t = (n) => {
|
|
1002
|
-
var i,
|
|
1003
|
-
return n.anchorOffset === 0 && n.focusOffset === ((
|
|
1004
|
+
var i, p;
|
|
1005
|
+
return n.anchorOffset === 0 && n.focusOffset === ((p = (i = n.focusNode) == null ? void 0 : i.nodeValue) == null ? void 0 : p.length);
|
|
1004
1006
|
};
|
|
1005
1007
|
switch (M()) {
|
|
1006
1008
|
case "Chrome": {
|
|
1007
|
-
const n = (
|
|
1008
|
-
return e(
|
|
1009
|
+
const n = (o = this.host.shadowRoot) == null ? void 0 : o.getSelection(), i = n == null ? void 0 : n.focusNode, p = (i == null ? void 0 : i.nodeValue) || "", f = n && t(n);
|
|
1010
|
+
return e(p, (n == null ? void 0 : n.focusOffset) || -1, i, f);
|
|
1009
1011
|
}
|
|
1010
1012
|
case "Firefox": {
|
|
1011
|
-
const n = document.getSelection(), i = ((r = n == null ? void 0 : n.anchorNode) == null ? void 0 : r.nodeValue) || "",
|
|
1012
|
-
return e(i, (n == null ? void 0 : n.focusOffset) || -1, n == null ? void 0 : n.anchorNode,
|
|
1013
|
+
const n = document.getSelection(), i = ((r = n == null ? void 0 : n.anchorNode) == null ? void 0 : r.nodeValue) || "", p = n && t(n);
|
|
1014
|
+
return e(i, (n == null ? void 0 : n.focusOffset) || -1, n == null ? void 0 : n.anchorNode, p);
|
|
1013
1015
|
}
|
|
1014
1016
|
case "Safari": {
|
|
1015
|
-
const n = window.getSelection(), i = n == null ? void 0 : n.getComposedRanges(this.host.shadowRoot)[0],
|
|
1016
|
-
return e(
|
|
1017
|
+
const n = window.getSelection(), i = n == null ? void 0 : n.getComposedRanges(this.host.shadowRoot)[0], p = ((l = i == null ? void 0 : i.startContainer) == null ? void 0 : l.nodeValue) || "", f = n && t(n);
|
|
1018
|
+
return e(p, (i == null ? void 0 : i.endOffset) || -1, i == null ? void 0 : i.startContainer, f);
|
|
1017
1019
|
}
|
|
1018
1020
|
default:
|
|
1019
1021
|
return console.warn("Browser not supported"), null;
|
|
@@ -1021,79 +1023,79 @@ const j = class {
|
|
|
1021
1023
|
}
|
|
1022
1024
|
handleChange(e) {
|
|
1023
1025
|
let t = e.target.textContent || "";
|
|
1024
|
-
t =
|
|
1026
|
+
t = S(t);
|
|
1025
1027
|
const a = this.getCurrentSelectionForBrowser();
|
|
1026
1028
|
if (!a) {
|
|
1027
1029
|
this.updateEventTitle(t), this.resetDropdown();
|
|
1028
1030
|
return;
|
|
1029
1031
|
}
|
|
1030
|
-
const { focusOffset:
|
|
1031
|
-
if (r === -1 ||
|
|
1032
|
+
const { focusOffset: o, dollarIndex: r, lastWord: l, currentText: n } = a;
|
|
1033
|
+
if (r === -1 || o < r) {
|
|
1032
1034
|
this.updateEventTitle(t), this.resetDropdown();
|
|
1033
1035
|
return;
|
|
1034
1036
|
}
|
|
1035
|
-
|
|
1036
|
-
$value:
|
|
1037
|
+
l.startsWith("$") ? (this.showTokens = !0, this.currentWord = {
|
|
1038
|
+
$value: l,
|
|
1037
1039
|
fullText: n,
|
|
1038
1040
|
index: r,
|
|
1039
|
-
focusOffset:
|
|
1040
|
-
}, this.populateSuggestionsDropdown(
|
|
1041
|
+
focusOffset: o
|
|
1042
|
+
}, this.populateSuggestionsDropdown(l)) : this.resetDropdown(), this.updateEventTitle(t);
|
|
1041
1043
|
}
|
|
1042
1044
|
handleInputKeyDown(e) {
|
|
1043
|
-
var a,
|
|
1045
|
+
var a, o, r, l, n;
|
|
1044
1046
|
const t = this.getCurrentSelectionForBrowser();
|
|
1045
|
-
if (t != null && t.allSelected && !
|
|
1047
|
+
if (t != null && t.allSelected && !H(e) && (this.titleRef.innerHTML = ""), e.key === "Enter") {
|
|
1046
1048
|
e.preventDefault();
|
|
1047
1049
|
const i = (a = this.host.shadowRoot) == null ? void 0 : a.getElementById(this.ariaActivedescendant);
|
|
1048
1050
|
i && (i.click(), this.ariaActivedescendant = "");
|
|
1049
1051
|
} else if (e.key === "ArrowDown") {
|
|
1050
1052
|
e.preventDefault();
|
|
1051
|
-
const i = (
|
|
1053
|
+
const i = (o = this.host.shadowRoot) == null ? void 0 : o.getElementById(this.ariaActivedescendant);
|
|
1052
1054
|
if (i) {
|
|
1053
|
-
const
|
|
1054
|
-
|
|
1055
|
+
const p = i.nextElementSibling;
|
|
1056
|
+
p ? this.ariaActivedescendant = p.id : this.ariaActivedescendant = this.filteredTokens[0].label;
|
|
1055
1057
|
} else
|
|
1056
1058
|
this.ariaActivedescendant = this.filteredTokens[0].label;
|
|
1057
1059
|
} else if (e.key === "ArrowUp") {
|
|
1058
1060
|
e.preventDefault();
|
|
1059
1061
|
const i = (r = this.host.shadowRoot) == null ? void 0 : r.getElementById(this.ariaActivedescendant);
|
|
1060
1062
|
if (i) {
|
|
1061
|
-
const
|
|
1062
|
-
|
|
1063
|
+
const p = i.previousElementSibling;
|
|
1064
|
+
p ? this.ariaActivedescendant = p.id : this.ariaActivedescendant = this.filteredTokens[this.filteredTokens.length - 1].label;
|
|
1063
1065
|
} else
|
|
1064
1066
|
this.ariaActivedescendant = this.filteredTokens[this.filteredTokens.length - 1].label;
|
|
1065
1067
|
} else if (e.key === "Escape")
|
|
1066
1068
|
e.preventDefault(), this.resetDropdown();
|
|
1067
1069
|
else if (e.key === "Backspace" || e.key === "Delete") {
|
|
1068
|
-
const i = (
|
|
1070
|
+
const i = (l = t == null ? void 0 : t.node) == null ? void 0 : l.parentNode;
|
|
1069
1071
|
t != null && t.currentText.startsWith("${") && i && i.nodeName === "SPAN" && (e.preventDefault(), i.removeChild(t.node), i.remove(), this.resetDropdown(), this.updateEventTitle(((n = this.titleRef) == null ? void 0 : n.textContent) || "")), (this.titleRef.textContent === "" || t != null && t.allSelected) && (this.titleRef.innerHTML = "", this.updateEventTitle(""));
|
|
1070
1072
|
}
|
|
1071
1073
|
}
|
|
1072
1074
|
selectOption(e, t) {
|
|
1073
1075
|
var T;
|
|
1074
1076
|
e.preventDefault();
|
|
1075
|
-
const a = this.currentWord.fullText,
|
|
1076
|
-
let r = this.titleRef.firstChild,
|
|
1077
|
+
const a = this.currentWord.fullText, o = this.currentWord.$value;
|
|
1078
|
+
let r = this.titleRef.firstChild, l = null;
|
|
1077
1079
|
for (; r; ) {
|
|
1078
1080
|
if (r.nodeType === 3) {
|
|
1079
1081
|
const v = ((T = r.textContent) == null ? void 0 : T.replace(/[\u200B-\u200D\uFEFF]/g, "")) || "", E = a.replace(/[\u200B-\u200D\uFEFF]/g, "");
|
|
1080
1082
|
if (v.includes(E)) {
|
|
1081
|
-
|
|
1083
|
+
l = r;
|
|
1082
1084
|
break;
|
|
1083
1085
|
}
|
|
1084
1086
|
}
|
|
1085
1087
|
r = r.nextSibling;
|
|
1086
1088
|
}
|
|
1087
|
-
if (!
|
|
1089
|
+
if (!l)
|
|
1088
1090
|
return;
|
|
1089
|
-
const n =
|
|
1091
|
+
const n = l.textContent || "", i = n.indexOf(o), p = n.substring(0, i), f = n.substring(i + o.length), h = document.createTextNode(p), y = document.createRange(), u = document.createElement("span");
|
|
1090
1092
|
u.classList.add("highlighted-tag"), u.textContent = `${t.value}`;
|
|
1091
|
-
const _ = document.createTextNode(
|
|
1092
|
-
if (
|
|
1093
|
-
|
|
1093
|
+
const _ = document.createTextNode(f);
|
|
1094
|
+
if (f !== "")
|
|
1095
|
+
l.replaceWith(h, u, _), y.setStart(_, 1);
|
|
1094
1096
|
else {
|
|
1095
1097
|
const v = document.createTextNode("");
|
|
1096
|
-
|
|
1098
|
+
l.replaceWith(h, u, v), y.setStart(v, 1);
|
|
1097
1099
|
}
|
|
1098
1100
|
this.resetDropdown(), this.titleRef.focus();
|
|
1099
1101
|
const g = window.getSelection();
|
|
@@ -1106,9 +1108,9 @@ const j = class {
|
|
|
1106
1108
|
return typeof this.internals < "u" && typeof this.internals.setValidity == "function" && typeof this.internals.setFormValue == "function";
|
|
1107
1109
|
}
|
|
1108
1110
|
updateEventTitle(e, t = !1) {
|
|
1109
|
-
var
|
|
1111
|
+
var o, r, l;
|
|
1110
1112
|
const a = e.replace(/ +/g, " ");
|
|
1111
|
-
a === "" || /^[\s]*$/.test(a) ? (this.validationError = "eventTitleRequired", this.isInternalsAvailable && ((
|
|
1113
|
+
a === "" || /^[\s]*$/.test(a) ? (this.validationError = "eventTitleRequired", this.isInternalsAvailable && ((o = this.internals) == null || o.setValidity({ customError: !0 }, "Event title is required", this.titleRef))) : (this.validationError = "", this.isInternalsAvailable && ((r = this.internals) == null || r.setValidity({ customError: !1 }))), this.isInternalsAvailable && ((l = this.internals) == null || l.setFormValue(a, this.name)), t || this.valueChanged.emit({ value: a, name: this.name });
|
|
1112
1114
|
}
|
|
1113
1115
|
resetDropdown() {
|
|
1114
1116
|
this.showTokens = !1, this.ariaActivedescendant = "";
|
|
@@ -1118,10 +1120,10 @@ const j = class {
|
|
|
1118
1120
|
}
|
|
1119
1121
|
render() {
|
|
1120
1122
|
var e;
|
|
1121
|
-
return s(w, { key: "
|
|
1123
|
+
return s(w, { key: "82d877ce83823d86e6794caa07c9b4761523bb93" }, s("div", { key: "b97274fd9221bd8e21390b951074b60dff6eddcf", class: "nylas-event-title", part: "net" }, s("label", { key: "6313ef273c9468915f313c2a9d15f4428e74d3ed", htmlFor: "title" }, c.t("nylasEventTitle.headerTitle"), s("span", { key: "41b89ee75850a7597b75013de036d398d6b8e4a9", class: "required" }, "*")), s("div", { key: "94d600363804e2d88260475a3ebb0159537fa7c2", class: {
|
|
1122
1124
|
title: !0,
|
|
1123
1125
|
error: this.validationError !== ""
|
|
1124
|
-
}, 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: (a) => this.selectOption(a, t), role: "option" }, this.getLabelHTML(t.labelHTML))))), s("span", {
|
|
1126
|
+
}, part: "net__title", ref: (t) => this.titleRef = t, contentEditable: "true", onInput: (t) => this.handleChange(t), onKeyDown: (t) => this.handleInputKeyDown(t) }), !this.noTemplates && 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: (a) => this.selectOption(a, t), role: "option" }, this.getLabelHTML(t.labelHTML))))), !this.noTemplates && s("span", { class: "help-text" }, c.t("nylasEventTitle.helpText", { context: "start", field: c.t("nylasEventTitle.title") }), " ", s("code", null, "$"), " ", c.t("nylasEventTitle.helpText", { context: "end" }), s("span", { class: "label-icon" }, s("tooltip-component", null, s("info-icon", { slot: "tooltip-icon" }), s("span", { slot: "tooltip-content" }, c.t("nylasEventTitle.tooltip.desc"), " ", s("code", null, "${invitee}"))))), this.validationError != "" && s("span", { class: "error-message" }, c.t(`nylasEventTitle.${this.validationError}`))));
|
|
1125
1127
|
}
|
|
1126
1128
|
static get formAssociated() {
|
|
1127
1129
|
return !0;
|
|
@@ -1154,14 +1156,14 @@ De([
|
|
|
1154
1156
|
], j.prototype, "render", null);
|
|
1155
1157
|
j.style = Ae;
|
|
1156
1158
|
const Pe = ':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-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff}.card-wrapper{background:var(--nylas-base-0);display:flex;flex-direction:column;font-family:var(--nylas-font-family);background-color:var(--nylas-base-0);color:var(--nylas-base-900);border-radius:var(--nylas-border-radius-3x);position:relative;padding:32px;width:562px;box-shadow:0px 1px 4px rgba(0, 0, 0, 0.1), 0px 3px 6px rgba(0, 0, 0, 0.06)}@media screen and (max-width: 768px){.card-wrapper{width:100%;border-radius:0px}}.header{overflow-wrap:anywhere;display:flex;flex-direction:column;font-size:16px;font-weight:400}.header h2{color:var(--nylas-base-900);font-size:24px;font-weight:600;text-align:left;margin:0}.description.title-desc{margin-bottom:2rem}.description.footer-desc{margin-top:2rem}.description.footer-desc a{color:var(--nylas-primary);text-decoration:none}.description p{margin:0;font-size:18px;color:var(--nylas-base-600)}.footer{margin-top:1rem;padding-top:1rem;display:flex;justify-content:flex-end;gap:0.5rem;box-sizing:border-box;background-color:var(--nylas-base-25);width:100%;border-radius:0 0 var(--nylas-border-radius-2x) var(--nylas-border-radius-2x)}.close-button{width:100%;display:flex;justify-content:flex-end}.close-button button-component button{padding:0;height:auto}.close-button button-component button:hover{background-color:transparent !important}button-component{--dot-color:var(--nylas-base-700)}', $e = Pe;
|
|
1157
|
-
var Fe = function(e, t, a,
|
|
1158
|
-
var r = arguments.length,
|
|
1159
|
+
var Fe = function(e, t, a, o) {
|
|
1160
|
+
var r = arguments.length, l = r < 3 ? t : o === null ? o = Object.getOwnPropertyDescriptor(t, a) : o, n;
|
|
1159
1161
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
1160
|
-
|
|
1162
|
+
l = Reflect.decorate(e, t, a, o);
|
|
1161
1163
|
else
|
|
1162
1164
|
for (var i = e.length - 1; i >= 0; i--)
|
|
1163
|
-
(n = e[i]) && (
|
|
1164
|
-
return r > 3 &&
|
|
1165
|
+
(n = e[i]) && (l = (r < 3 ? n(l) : r > 3 ? n(t, a, l) : n(t, a)) || l);
|
|
1166
|
+
return r > 3 && l && Object.defineProperty(t, a, l), l;
|
|
1165
1167
|
}, F = function(e, t) {
|
|
1166
1168
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
1167
1169
|
return Reflect.metadata(e, t);
|
|
@@ -1194,9 +1196,9 @@ const Z = class {
|
|
|
1194
1196
|
e.preventDefault(), e.stopImmediatePropagation(), this.feedbackModalClosed.emit();
|
|
1195
1197
|
}
|
|
1196
1198
|
render() {
|
|
1197
|
-
return s(w, { key: "
|
|
1199
|
+
return s(w, { key: "04e680bfe8f75e2afb9ef2f4b865cc7b13c1a2e8", part: "nfbf" }, s("div", { key: "796507d0a9abd2515fb9c54346754298f0dd78b5", class: "card-wrapper", part: "nfbfc__card" }, s("div", { key: "55f46924919fab64a280c19155db6f5849b0460a", class: "close-button" }, s("button-component", { key: "ffb571c6d8b3c061e92b7159fd615b16b9e03af8", tooltip: "Close", id: "close", variant: "invisible", onClick: (e) => this.closeModal(e), part: "nfbf__close-button" }, s("close-icon", { key: "363b4923edab96c1ed65339ba1b30c4a84794d0d" }))), s("div", { key: "cfca96b9ef61ae6947ae1c3a4b8afcb4346f6549", class: "header" }, s("h2", { key: "29d1b5143aa8fbc10c6b5a5b9d68cabfb4c7080d", slot: "card-title", part: "nfbf__title" }, c.t("feedbackFormTitle"))), s("div", { key: "8ff6d80eb1323c460d638dbe842d800b7c7fc7fe", class: "description title-desc" }, s("p", { key: "73f86e9c94908bd6d768d63ee8715406970ddb74" }, c.t("feedbackFormDescription"))), s("textarea-component", { key: "a9e107b674dff4ca7d2e8cf5afb5c8db5c1644f8", label: c.t("feedbackMessageLabel"), required: !0, maxLength: 500, part: "nfbf__description", name: "feedback", placeholder: c.t("feedbackMessagePlaceholder") }), s("div", { key: "eb9b2ed3ec97838c16cdec0d3ffec3c791340908", class: "description footer-desc" }, s("p", { key: "ea072ae23e780a3a305da98c734cb4725142d9fd" }, "By sending this report, you agree to Nylas’ access to the data necessary to respond to this issue, subject to Nylas’", " ", s("a", { key: "5f11c5c4dcb90001e296cff799008684aa860b33", href: "https://www.nylas.com/privacy-policy/", target: "_blank", rel: "nofollow noreferrer noopener" }, "Privacy Policy"), ".")), s("div", { key: "a98efe0c85a27aa261cfbbe5cd5f010892d2a256", class: {
|
|
1198
1200
|
footer: !0
|
|
1199
|
-
} }, s("button-component", { key: "
|
|
1201
|
+
} }, s("button-component", { key: "0023f7bd86c7d7bf4139697c75d2a658dab2dc61", variant: "invisible", onClick: (e) => this.closeModal(e), part: "nfbf__button-outline nfbf__cancel-cta" }, `${c.t("feedbackModalCloseButton")}`), s("button-component", { key: "c9a2a3aed708375e2aa57d8b412a1a60ac2228ce", variant: "primary", onClick: this.handleConfirmBookingButtonClicked, part: "nfbf__button-outline nfbf__reschedule-cta" }, `${c.t("feedbackModalSubmitButton")}`))));
|
|
1200
1202
|
}
|
|
1201
1203
|
get host() {
|
|
1202
1204
|
return x(this);
|
|
@@ -1218,15 +1220,15 @@ Fe([
|
|
|
1218
1220
|
F("design:returntype", void 0)
|
|
1219
1221
|
], Z.prototype, "render", null);
|
|
1220
1222
|
Z.style = $e;
|
|
1221
|
-
const Re = ':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-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff}.nylas-reminder-time{display:flex;flex-direction:column;gap:4px}.nylas-reminder-time label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:16px;font-style:normal;font-weight:400;line-height:150%;}.nylas-reminder-time label span.required{color:var(--nylas-error, #cc4841)}.nylas-reminder-time label span.label-icon{margin-left:4px}.nylas-reminder-time label span.label-icon tooltip-component{display:flex}.nylas-reminder-time__wrapper{display:flex;align-items:center;justify-content:flex-end;gap:0.5rem}.nylas-reminder-time__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-reminder-time__wrapper input-dropdown::part(id_dropdown-input){border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);padding:14px 16px
|
|
1222
|
-
var
|
|
1223
|
-
var r = arguments.length,
|
|
1223
|
+
const Re = ':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-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff}.nylas-reminder-time{display:flex;flex-direction:column;gap:4px}.nylas-reminder-time label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:16px;font-style:normal;font-weight:400;line-height:150%;}.nylas-reminder-time label span.required{color:var(--nylas-error, #cc4841)}.nylas-reminder-time label span.label-icon{margin-left:4px}.nylas-reminder-time label span.label-icon tooltip-component{display:flex}.nylas-reminder-time__wrapper{display:flex;align-items:center;justify-content:flex-end;gap:0.5rem}.nylas-reminder-time__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-reminder-time__wrapper input-dropdown{width:80px}.nylas-reminder-time__wrapper input-dropdown::part(id_dropdown-input){border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);padding:14px 16px}.nylas-reminder-time__wrapper input-dropdown::part(id_dropdown-content){width:100%;min-width:unset;height:160px}.nylas-reminder-time__wrapper select-dropdown{width:120px}@media screen and (max-width: 768px){.nylas-reminder-time__wrapper select-dropdown{width:100%}}.nylas-reminder-time__wrapper select-dropdown::part(sd_dropdown-button){border:1px solid var(--nylas-base-200)}', Se = Re;
|
|
1224
|
+
var He = function(e, t, a, o) {
|
|
1225
|
+
var r = arguments.length, l = r < 3 ? t : o === null ? o = Object.getOwnPropertyDescriptor(t, a) : o, n;
|
|
1224
1226
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
1225
|
-
|
|
1227
|
+
l = Reflect.decorate(e, t, a, o);
|
|
1226
1228
|
else
|
|
1227
1229
|
for (var i = e.length - 1; i >= 0; i--)
|
|
1228
|
-
(n = e[i]) && (
|
|
1229
|
-
return r > 3 &&
|
|
1230
|
+
(n = e[i]) && (l = (r < 3 ? n(l) : r > 3 ? n(t, a, l) : n(t, a)) || l);
|
|
1231
|
+
return r > 3 && l && Object.defineProperty(t, a, l), l;
|
|
1230
1232
|
}, R = function(e, t) {
|
|
1231
1233
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
1232
1234
|
return Reflect.metadata(e, t);
|
|
@@ -1264,20 +1266,20 @@ const K = class {
|
|
|
1264
1266
|
}
|
|
1265
1267
|
timePeriodChangedHandler(e) {
|
|
1266
1268
|
const { number: t, period: a } = e.detail;
|
|
1267
|
-
let
|
|
1268
|
-
const r = 60,
|
|
1269
|
-
a === "minute" ?
|
|
1269
|
+
let o;
|
|
1270
|
+
const r = 60, l = r * 24, n = l * 7, i = l * 30;
|
|
1271
|
+
a === "minute" ? o = t : a === "hour" ? o = t * r : a === "day" ? o = t * l : a === "week" ? o = t * n : a === "month" ? o = t * i : o = 0, this.errorState = o % 5 !== 0, this.valueChanged.emit({ value: o, name: this.name }), this.isInternalsAvailable && this.internals.setFormValue(o.toString(), this.name);
|
|
1270
1272
|
}
|
|
1271
1273
|
updateNumberAndPeriodFromMinutes(e) {
|
|
1272
|
-
let
|
|
1273
|
-
e === 0 ? (
|
|
1274
|
+
let l, n;
|
|
1275
|
+
e === 0 ? (l = 0, n = "minute") : e >= 43200 && e % 43200 === 0 ? (l = Math.floor(e / 43200), n = "month") : e >= 10080 && e % 10080 === 0 ? (l = Math.floor(e / 10080), n = "week") : e >= 1440 && e % 1440 === 0 ? (l = Math.floor(e / 1440), n = "day") : e >= 60 && e % 60 === 0 ? (l = Math.floor(e / 60), n = "hour") : (l = e, n = "minute"), this.selectedNumber = l, this.selectedPeriod = n;
|
|
1274
1276
|
}
|
|
1275
1277
|
get isInternalsAvailable() {
|
|
1276
1278
|
return this.internals !== void 0 && typeof this.internals.setFormValue == "function" && typeof this.internals.setValidity == "function";
|
|
1277
1279
|
}
|
|
1278
1280
|
render() {
|
|
1279
1281
|
const e = typeof this.selectedNumber == "number" && typeof this.selectedPeriod == "string";
|
|
1280
|
-
return s(w, { key: "
|
|
1282
|
+
return s(w, { key: "d3e847bbb91457385c67cca15d9d55e56a5902d0" }, s("div", { key: "8cd77993b124c817f54acc85e01505bdb9e33d13", class: "nylas-reminder-time", part: "nrt" }, s("div", { key: "c74a7bc5cfdcb3e4cc08fcd16999ac940c51e42f", class: "nylas-reminder-time__wrapper" }, e && s("time-period-selector", { id: "limit-future-bookings", part: "nrt__time-period-selector", hasError: this.errorState, timePeriods: [
|
|
1281
1283
|
{ value: "minute", label: c.t("timeDuration", { context: "minute" }) },
|
|
1282
1284
|
{ value: "hour", label: c.t("timeDuration", { context: "hour" }) },
|
|
1283
1285
|
{ value: "day", label: c.t("timePeriod", { context: "day" }) }
|
|
@@ -1297,7 +1299,7 @@ const K = class {
|
|
|
1297
1299
|
};
|
|
1298
1300
|
}
|
|
1299
1301
|
};
|
|
1300
|
-
|
|
1302
|
+
He([
|
|
1301
1303
|
C({
|
|
1302
1304
|
name: "nylas-reminder-time",
|
|
1303
1305
|
stateToProps: /* @__PURE__ */ new Map([["schedulerConfig.selectedLanguage", "selectedLanguage"]]),
|
|
@@ -1308,13 +1310,13 @@ Se([
|
|
|
1308
1310
|
R("design:paramtypes", []),
|
|
1309
1311
|
R("design:returntype", void 0)
|
|
1310
1312
|
], K.prototype, "render", null);
|
|
1311
|
-
K.style =
|
|
1313
|
+
K.style = Se;
|
|
1312
1314
|
const Me = ".sc-trash-icon-h{display:flex}", Ne = Me, ze = class {
|
|
1313
1315
|
constructor(e) {
|
|
1314
1316
|
b(this, e), this.width = "20", this.height = "21";
|
|
1315
1317
|
}
|
|
1316
1318
|
render() {
|
|
1317
|
-
return s("svg", { key: "
|
|
1319
|
+
return s("svg", { key: "855a813c5ce8e75dea9c5b0d8b2b41b604085f17", width: this.width, height: this.height, viewBox: "0 0 20 21", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, s("path", { key: "700bf081b7bc3441a4c052bb2919fa513b661839", d: "M10 0.25C11.733 0.25 13.1492 1.60645 13.2449 3.31558L13.25 3.5H18.5C18.9142 3.5 19.25 3.83579 19.25 4.25C19.25 4.6297 18.9678 4.94349 18.6018 4.99315L18.5 5H17.704L16.4239 18.0192C16.2912 19.3683 15.1984 20.41 13.8626 20.4945L13.6871 20.5H6.31293C4.95734 20.5 3.81365 19.5145 3.59883 18.1934L3.57614 18.0192L2.295 5H1.5C1.1203 5 0.806509 4.71785 0.756847 4.35177L0.75 4.25C0.75 3.8703 1.03215 3.55651 1.39823 3.50685L1.5 3.5H6.75C6.75 1.70507 8.20507 0.25 10 0.25ZM16.197 5H3.802L5.06893 17.8724C5.12768 18.4696 5.60033 18.9343 6.18585 18.9936L6.31293 19H13.6871C14.2872 19 14.7959 18.5751 14.9123 17.9982L14.9311 17.8724L16.197 5ZM11.75 7.75C12.1297 7.75 12.4435 8.03215 12.4932 8.39823L12.5 8.5V15.5C12.5 15.9142 12.1642 16.25 11.75 16.25C11.3703 16.25 11.0565 15.9678 11.0068 15.6018L11 15.5V8.5C11 8.08579 11.3358 7.75 11.75 7.75ZM8.25 7.75C8.6297 7.75 8.94349 8.03215 8.99315 8.39823L9 8.5V15.5C9 15.9142 8.66421 16.25 8.25 16.25C7.8703 16.25 7.55651 15.9678 7.50685 15.6018L7.5 15.5V8.5C7.5 8.08579 7.83579 7.75 8.25 7.75ZM10 1.75C9.08183 1.75 8.32881 2.45711 8.2558 3.35647L8.25 3.5H11.75C11.75 2.5335 10.9665 1.75 10 1.75Z", fill: "currentColor" }));
|
|
1318
1320
|
}
|
|
1319
1321
|
};
|
|
1320
1322
|
ze.style = Ne;
|