@nylas/react 2.0.4 → 2.1.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/dist/add-circle-icon_2.entry-8c3bb0bb.cjs +1 -0
- package/dist/{add-circle-icon_2.entry-e59a5b4d.js → add-circle-icon_2.entry-a3daf6c4.js} +6 -4
- package/dist/archive-icon.entry-46ad0ff3.cjs +1 -0
- package/dist/{archive-icon.entry-ea5667df.js → archive-icon.entry-d5141486.js} +6 -4
- package/dist/{arrow-icon.entry-1f766862.js → arrow-icon.entry-1b89ce78.js} +6 -4
- package/dist/arrow-icon.entry-f696de4f.cjs +1 -0
- package/dist/bold-icon.entry-7827cd4e.cjs +1 -0
- package/dist/{bold-icon.entry-240950a6.js → bold-icon.entry-c117b4cf.js} +6 -4
- package/dist/button-component_2.entry-8cd4c5f3.cjs +1 -0
- package/dist/{button-component_2.entry-96785a34.js → button-component_2.entry-e68caa9b.js} +5 -3
- package/dist/{calendar-agenda-fill-icon_37.entry-e732ee2e.js → calendar-agenda-fill-icon_37.entry-52bdc8b3.js} +1478 -1210
- package/dist/calendar-agenda-fill-icon_37.entry-8c592cfa.cjs +6 -0
- package/dist/calendar-cancel-icon.entry-7facfa05.cjs +1 -0
- package/dist/{calendar-cancel-icon.entry-7543c684.js → calendar-cancel-icon.entry-f5f1d499.js} +8 -6
- package/dist/{calendar-check-icon.entry-aba54652.js → calendar-check-icon.entry-55320137.js} +6 -4
- package/dist/calendar-check-icon.entry-72108702.cjs +1 -0
- package/dist/{calendar-icon.entry-2cb3b7d1.js → calendar-icon.entry-afea361e.js} +9 -7
- package/dist/calendar-icon.entry-f5c6730f.cjs +1 -0
- package/dist/checkbox-component.entry-5722d263.cjs +1 -0
- package/dist/checkbox-component.entry-89fa6edd.js +54 -0
- package/dist/checkbox-group_4.entry-30e8af17.cjs +28 -0
- package/dist/{checkbox-group_4.entry-04561314.js → checkbox-group_4.entry-51f03009.js} +289 -245
- package/dist/checkmark-circle-icon.entry-ae11049d.cjs +1 -0
- package/dist/{checkmark-circle-icon.entry-1f788efc.js → checkmark-circle-icon.entry-dfe67e22.js} +8 -6
- package/dist/{checkmark-icon_15.entry-146c1cb0.js → checkmark-icon_15.entry-4c3979db.js} +408 -332
- package/dist/checkmark-icon_15.entry-e59c0f53.cjs +5 -0
- package/dist/{chevron-icon_3.entry-637338b5.js → chevron-icon_3.entry-1f3c3ca6.js} +21 -10
- package/dist/chevron-icon_3.entry-ea791750.cjs +1 -0
- package/dist/clock-icon_4.entry-172fed74.cjs +1 -0
- package/dist/{clock-icon_4.entry-e69395a2.js → clock-icon_4.entry-78878cb8.js} +3 -1
- package/dist/customParseFormat-b5d95b34-a6b6fcba.cjs +1 -0
- package/dist/{customParseFormat-8be9be1b-2464f2ba.js → customParseFormat-b5d95b34-ce80820c.js} +1 -1
- package/dist/delete-icon.entry-a8c0bf03.cjs +1 -0
- package/dist/{delete-icon.entry-8a956edd.js → delete-icon.entry-cebdc90f.js} +7 -5
- package/dist/document-refresh-icon.entry-2d9a529d.cjs +1 -0
- package/dist/{document-refresh-icon.entry-5f58f367.js → document-refresh-icon.entry-8780a2b8.js} +3 -1
- package/dist/{feedbackSync-3db3713c-701d2eb9.cjs → feedbackSync-92220b42-fbebe1f9.cjs} +1 -1
- package/dist/{feedbackSync-3db3713c-aadf336b.js → feedbackSync-92220b42-fd5f5610.js} +1 -1
- package/dist/folder-icon.entry-3e61ccca.cjs +1 -0
- package/dist/{folder-icon.entry-e5d7a651.js → folder-icon.entry-6ffd5191.js} +6 -4
- package/dist/forward-icon.entry-c7d88db8.cjs +1 -0
- package/dist/{forward-icon.entry-59be8165.js → forward-icon.entry-c9c4bf5b.js} +5 -3
- package/dist/globe-icon.entry-0b93cab8.cjs +1 -0
- package/dist/{globe-icon.entry-0fe4a4bb.js → globe-icon.entry-7c0dca7b.js} +5 -3
- package/dist/{google-logo-icon_6.entry-799511df.js → google-logo-icon_6.entry-deef91ee.js} +283 -237
- package/dist/google-logo-icon_6.entry-e25ce3e7.cjs +2 -0
- package/dist/google-meet-icon_5.entry-214347f0.cjs +1 -0
- package/dist/{google-meet-icon_5.entry-e753ba28.js → google-meet-icon_5.entry-f8b5a92a.js} +3 -1
- package/dist/{inbox-icon.entry-61132337.js → inbox-icon.entry-873062c3.js} +7 -5
- package/dist/inbox-icon.entry-f08f2fd5.cjs +1 -0
- package/dist/index-025be398.js +7187 -0
- package/dist/index-c510313d-1318f67a.js +289 -0
- package/dist/index-c510313d-b0508eee.cjs +1 -0
- package/dist/index-f42fe591.cjs +65 -0
- package/dist/{index.es-9e756df7-fa75b01e.cjs → index.es-488bc919-d02dd50a.cjs} +1 -1
- package/dist/{index.es-9e756df7-42d8a4cf.js → index.es-488bc919-ea63a7e9.js} +1 -1
- package/dist/info-icon_2.entry-442b9097.cjs +1 -0
- package/dist/{info-icon_2.entry-8d2750ce.js → info-icon_2.entry-60fb8648.js} +3 -1
- package/dist/{input-component.entry-2e134e2a.js → input-component.entry-5898a52e.js} +22 -10
- package/dist/input-component.entry-7274fd28.cjs +1 -0
- package/dist/{input-dropdown_2.entry-1a02e672.js → input-dropdown_2.entry-4534436c.js} +33 -9
- package/dist/input-dropdown_2.entry-9b72f637.cjs +1 -0
- package/dist/{italic-icon.entry-0ec2793b.js → italic-icon.entry-62052cd8.js} +6 -4
- package/dist/italic-icon.entry-9bdbbd37.cjs +1 -0
- package/dist/lib/connect/index.d.ts +6 -0
- package/dist/lib/connect/types.d.ts +2 -0
- package/dist/lib/connect/useNylasConnect.d.ts +28 -0
- package/dist/lib/connect/useNylasConnect.test.d.ts +1 -0
- package/dist/lib/elements/index.d.ts +1 -1
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/notetaker/SendNotetaker/SendNotetaker.d.ts +3 -2
- package/dist/lib/notetaker/VideoPlayer/VideoPlayer.d.ts +2 -0
- package/dist/multi-select-dropdown.entry-77752d46.cjs +1 -0
- package/dist/{multi-select-dropdown.entry-15e887be.js → multi-select-dropdown.entry-9c9d05c1.js} +42 -30
- package/dist/{nylas-booked-event-card_11.entry-98bcc904.js → nylas-booked-event-card_11.entry-32b2e9f1.js} +188 -185
- package/dist/nylas-booked-event-card_11.entry-4aba5146.cjs +1 -0
- package/dist/nylas-date-component_2.entry-6b058796.cjs +1 -0
- package/dist/{nylas-date-component_2.entry-6a98a5bf.js → nylas-date-component_2.entry-a869519f.js} +91 -70
- package/dist/nylas-form-card.entry-5390459f.js +75 -0
- package/dist/nylas-form-card.entry-c2f34d73.cjs +1 -0
- package/dist/nylas-notification_2.entry-054392cf.cjs +1 -0
- package/dist/{nylas-notification_2.entry-320a5a65.js → nylas-notification_2.entry-f46e88e5.js} +4 -1
- package/dist/{nylas-scheduler-editor.entry-aa62c689.js → nylas-scheduler-editor.entry-40a48f47.js} +129 -60
- package/dist/nylas-scheduler-editor.entry-e29fdf07.cjs +2 -0
- package/dist/{nylas-scheduling.entry-aec79de5.js → nylas-scheduling.entry-115b1752.js} +203 -190
- package/dist/nylas-scheduling.entry-79cb1d9c.cjs +1 -0
- package/dist/person-icon.entry-2cae306c.cjs +1 -0
- package/dist/{person-icon.entry-23cbe5dd.js → person-icon.entry-fd668b89.js} +6 -4
- package/dist/{play-icon.entry-4a529bd2.js → play-icon.entry-7fc3c0fd.js} +5 -3
- package/dist/play-icon.entry-9989a520.cjs +1 -0
- package/dist/radio-button-group.entry-03385b5f.cjs +1 -0
- package/dist/{radio-button-group.entry-04b7ff59.js → radio-button-group.entry-9df82cd0.js} +21 -10
- package/dist/react.cjs +1 -1
- package/dist/react.js +142 -127
- package/dist/refresh-icon.entry-310954ba.cjs +1 -0
- package/dist/{refresh-icon.entry-61ced881.js → refresh-icon.entry-c56e5623.js} +8 -6
- package/dist/register-component-3acd57e7-5a79a90a.cjs +1 -0
- package/dist/{register-component-8bbd6492-0d8737fd.js → register-component-3acd57e7-cb09c05e.js} +15 -14
- package/dist/{reply-all-icon.entry-83509aaf.js → reply-all-icon.entry-32e0e000.js} +7 -5
- package/dist/reply-all-icon.entry-68388f97.cjs +1 -0
- package/dist/{reply-icon.entry-131ade31.js → reply-icon.entry-3ac2e736.js} +6 -4
- package/dist/reply-icon.entry-e616a9a4.cjs +1 -0
- package/dist/{sent-icon.entry-72fd8f16.js → sent-icon.entry-0622ed04.js} +6 -4
- package/dist/sent-icon.entry-543eb3c4.cjs +1 -0
- package/dist/{spam-icon.entry-7594c792.js → spam-icon.entry-74bcfd4f.js} +3 -1
- package/dist/spam-icon.entry-e341ee3e.cjs +1 -0
- package/dist/{star-icon.entry-adbe1bb3.js → star-icon.entry-864d2bf9.js} +5 -3
- package/dist/star-icon.entry-c90d40f6.cjs +1 -0
- package/dist/{stop-icon.entry-e95993f2.js → stop-icon.entry-835908c5.js} +3 -1
- package/dist/stop-icon.entry-ffc46b42.cjs +1 -0
- package/dist/{textarea-component.entry-f5d74fb8.js → textarea-component.entry-6adcf6a6.js} +29 -10
- package/dist/textarea-component.entry-dae8eb5c.cjs +1 -0
- package/dist/toggle-switch.entry-5ee29867.cjs +1 -0
- package/dist/toggle-switch.entry-ff2ccb75.js +51 -0
- package/dist/{translate-icon.entry-01cbe664.js → translate-icon.entry-372dd808.js} +3 -1
- package/dist/translate-icon.entry-5606067d.cjs +1 -0
- package/dist/{trash-fill-icon.entry-b39ff771.js → trash-fill-icon.entry-01b4379e.js} +3 -1
- package/dist/trash-fill-icon.entry-daed6c0a.cjs +1 -0
- package/dist/underline-icon.entry-2020ee64.cjs +1 -0
- package/dist/{underline-icon.entry-39179a2e.js → underline-icon.entry-464b900d.js} +5 -3
- package/dist/utils-31933f5d-15041585.js +17878 -0
- package/dist/utils-31933f5d-1d4c81ab.cjs +54 -0
- package/package.json +4 -3
- package/dist/abstract-provider-97cdbfea-5837e17f.cjs +0 -1
- package/dist/abstract-provider-97cdbfea-6b0e3547.js +0 -187
- package/dist/add-circle-icon_2.entry-96ef4ded.cjs +0 -1
- package/dist/archive-icon.entry-49b4e0fd.cjs +0 -1
- package/dist/arrow-icon.entry-5aefd7de.cjs +0 -1
- package/dist/bold-icon.entry-1a4955df.cjs +0 -1
- package/dist/button-component_2.entry-357fa02a.cjs +0 -1
- package/dist/calendar-agenda-fill-icon_37.entry-5e405c00.cjs +0 -6
- package/dist/calendar-cancel-icon.entry-55d746cf.cjs +0 -1
- package/dist/calendar-check-icon.entry-63d33f23.cjs +0 -1
- package/dist/calendar-icon.entry-e13add9b.cjs +0 -1
- package/dist/checkbox-component.entry-8341a8d6.cjs +0 -1
- package/dist/checkbox-component.entry-da122544.js +0 -43
- package/dist/checkbox-group_4.entry-8854d522.cjs +0 -28
- package/dist/checkmark-circle-icon.entry-e637e20e.cjs +0 -1
- package/dist/checkmark-icon_15.entry-a265f687.cjs +0 -5
- package/dist/chevron-icon_3.entry-6c38b5e5.cjs +0 -1
- package/dist/clock-icon_4.entry-aa4117dc.cjs +0 -1
- package/dist/customParseFormat-8be9be1b-7ad95d87.cjs +0 -1
- package/dist/delete-icon.entry-af0cc45b.cjs +0 -1
- package/dist/document-refresh-icon.entry-45931416.cjs +0 -1
- package/dist/folder-icon.entry-cb80c172.cjs +0 -1
- package/dist/forward-icon.entry-c792734b.cjs +0 -1
- package/dist/globe-icon.entry-9ecf0255.cjs +0 -1
- package/dist/google-logo-icon_6.entry-60924f34.cjs +0 -2
- package/dist/google-meet-icon_5.entry-3841313d.cjs +0 -1
- package/dist/inbox-icon.entry-2b450378.cjs +0 -1
- package/dist/index-2084ffd9.js +0 -24884
- package/dist/index-e9dc7971.cjs +0 -118
- package/dist/info-icon_2.entry-c547775c.cjs +0 -1
- package/dist/input-component.entry-b1086460.cjs +0 -1
- package/dist/input-dropdown_2.entry-cb163dc3.cjs +0 -1
- package/dist/italic-icon.entry-6a3a5464.cjs +0 -1
- package/dist/multi-select-dropdown.entry-daccefd5.cjs +0 -1
- package/dist/nylas-booked-event-card_11.entry-3cdf8015.cjs +0 -1
- package/dist/nylas-date-component_2.entry-5d4f54fa.cjs +0 -1
- package/dist/nylas-form-card.entry-22851b77.cjs +0 -1
- package/dist/nylas-form-card.entry-a997084f.js +0 -58
- package/dist/nylas-notification_2.entry-4638126b.cjs +0 -1
- package/dist/nylas-scheduler-editor.entry-82e0f79e.cjs +0 -2
- package/dist/nylas-scheduling.entry-9cef581a.cjs +0 -1
- package/dist/person-icon.entry-01a6a976.cjs +0 -1
- package/dist/play-icon.entry-33443687.cjs +0 -1
- package/dist/radio-button-group.entry-65155787.cjs +0 -1
- package/dist/refresh-icon.entry-e4ea4811.cjs +0 -1
- package/dist/register-component-8bbd6492-d9a23f3c.cjs +0 -1
- package/dist/reply-all-icon.entry-c64d923b.cjs +0 -1
- package/dist/reply-icon.entry-4edfbb70.cjs +0 -1
- package/dist/sent-icon.entry-e4f6a3ef.cjs +0 -1
- package/dist/spam-icon.entry-c531c188.cjs +0 -1
- package/dist/star-icon.entry-a75255ff.cjs +0 -1
- package/dist/stop-icon.entry-079b28c6.cjs +0 -1
- package/dist/textarea-component.entry-920a81ac.cjs +0 -1
- package/dist/toggle-switch.entry-33273409.js +0 -34
- package/dist/toggle-switch.entry-ba6b4f33.cjs +0 -1
- package/dist/translate-icon.entry-f33632d6.cjs +0 -1
- package/dist/trash-fill-icon.entry-298eece8.cjs +0 -1
- package/dist/underline-icon.entry-3704187c.cjs +0 -1
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import { r as b, h as
|
|
2
|
-
import { R as
|
|
1
|
+
import { r as b, h as l, c as m, g as x, H as C } from "./index-025be398.js";
|
|
2
|
+
import { R as w } from "./register-component-3acd57e7-cb09c05e.js";
|
|
3
|
+
import { b as d, K as q, i as c, q as R, L as S, H as V, M } from "./utils-31933f5d-15041585.js";
|
|
3
4
|
import { E as k, P as E, f as J } from "./constants-f51538ef-e0a5f026.js";
|
|
5
|
+
import "@nylas/web-elements";
|
|
4
6
|
import "react";
|
|
7
|
+
import "@nylas/connect";
|
|
5
8
|
import "react/jsx-runtime";
|
|
6
9
|
import "react-dom";
|
|
7
10
|
const G = ".sc-checkmark-icon-h{display:flex}", X = G, Q = class {
|
|
@@ -9,7 +12,7 @@ const G = ".sc-checkmark-icon-h{display:flex}", X = G, Q = class {
|
|
|
9
12
|
b(this, e), this.width = "18", this.height = "14";
|
|
10
13
|
}
|
|
11
14
|
render() {
|
|
12
|
-
return
|
|
15
|
+
return l("svg", { key: "a739b30f83d6510e6644045ba736860eb524c838", width: this.width, height: this.height, viewBox: "0 0 18 14", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, l("path", { key: "9621004de9b8789eab6f4d0616ae0ff25124fd44", 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
16
|
}
|
|
14
17
|
};
|
|
15
18
|
Q.style = X;
|
|
@@ -18,7 +21,7 @@ const Y = ".sc-copy-icon-h{display:flex}", ee = Y, te = class {
|
|
|
18
21
|
b(this, e), this.width = "16", this.height = "16";
|
|
19
22
|
}
|
|
20
23
|
render() {
|
|
21
|
-
return
|
|
24
|
+
return l("svg", { key: "af5249494e43163c59f43f0e21ff4a9063566023", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, l("path", { key: "d1b78a39d0dd7ce2a3823d54e2e0dbd5f260c188", 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
25
|
}
|
|
23
26
|
};
|
|
24
27
|
te.style = ee;
|
|
@@ -27,25 +30,25 @@ const ne = ".sc-dragable-icon-h{display:flex}", ae = ne, oe = class {
|
|
|
27
30
|
b(this, e), this.width = "20", this.height = "20";
|
|
28
31
|
}
|
|
29
32
|
render() {
|
|
30
|
-
return
|
|
33
|
+
return l("svg", { key: "e4d3ba685832139b22eb5b024479e22f2ddfc811", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, l("path", { key: "68f15598ca1251c3926a3b88adb0947f1a5b6b4a", 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
34
|
}
|
|
32
35
|
};
|
|
33
36
|
oe.style = ae;
|
|
34
|
-
const
|
|
37
|
+
const se = ".sc-eye-icon-h{display:flex}", le = se, ie = class {
|
|
35
38
|
constructor(e) {
|
|
36
39
|
b(this, e), this.width = "17", this.height = "10";
|
|
37
40
|
}
|
|
38
41
|
render() {
|
|
39
|
-
return
|
|
42
|
+
return l("svg", { key: "2b2a63f9602d85c9661986eb2dd8e220a02e5570", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, l("path", { key: "8609bab91f97b282d80282736ce38f895e7b6fc1", 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
43
|
}
|
|
41
44
|
};
|
|
42
|
-
ie.style =
|
|
45
|
+
ie.style = le;
|
|
43
46
|
const re = ".sc-feedback-icon-h{display:flex}", ce = re, de = class {
|
|
44
47
|
constructor(e) {
|
|
45
48
|
b(this, e), this.width = "11", this.height = "14";
|
|
46
49
|
}
|
|
47
50
|
render() {
|
|
48
|
-
return
|
|
51
|
+
return l("svg", { key: "0cef0443a3b22ffa2bd9be587f55175bef8557cf", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, l("path", { key: "20631452d3f3bc031b79d3337eda08143db490e4", 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
52
|
}
|
|
50
53
|
};
|
|
51
54
|
de.style = ce;
|
|
@@ -80,11 +83,11 @@ const fe = ':host{display:block;position:relative;--nylas-primary:#2563eb;--nyla
|
|
|
80
83
|
!e.composedPath().includes(this.el) && this.isOpen && (this.isOpen = !1);
|
|
81
84
|
}
|
|
82
85
|
render() {
|
|
83
|
-
return
|
|
86
|
+
return l("div", { key: "354f7c502fadd2c6a30619365b9939523d9cd770", class: "color-picker-container", part: "icp_color-picker", tabindex: "0", onKeyDown: (e) => this.handleKeyDown(e) }, l("input", { key: "cc5803d2e90064b15137717043581f24cf80fda3", 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) }), l("label", { key: "75e26e605a36d5a3505f41dbdad576484b14ac43", 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 }, l("span", { key: "9a321653073ef9aa8a9372e291bd04244b6dfe46", class: "selected-option", part: "icp_color-picker-button-selected-label" }, this.selectedColor || "Select a color"), l("span", { key: "62ed4fb1337b47735c823b8e164bb8bb57325ffd", class: {
|
|
84
87
|
open: this.isOpen,
|
|
85
88
|
closed: !this.isOpen,
|
|
86
89
|
chevron: !0
|
|
87
|
-
}, "aria-hidden": "true" },
|
|
90
|
+
}, "aria-hidden": "true" }, l("chevron-icon", { key: "5c304ff53cfc6d3632f4fbbd8415c318301b4e38", width: "16", height: "16" })), this.errorMessage && l("span", { class: "error help-text" }, this.errorMessage)));
|
|
88
91
|
}
|
|
89
92
|
get el() {
|
|
90
93
|
return x(this);
|
|
@@ -92,21 +95,21 @@ const fe = ':host{display:block;position:relative;--nylas-primary:#2563eb;--nyla
|
|
|
92
95
|
};
|
|
93
96
|
ye.style = pe;
|
|
94
97
|
const he = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--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,
|
|
96
|
-
var r = arguments.length,
|
|
98
|
+
var be = function(e, t, n, o) {
|
|
99
|
+
var r = arguments.length, s = r < 3 ? t : o === null ? o = Object.getOwnPropertyDescriptor(t, n) : o, a;
|
|
97
100
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
98
|
-
|
|
101
|
+
s = Reflect.decorate(e, t, n, o);
|
|
99
102
|
else
|
|
100
103
|
for (var i = e.length - 1; i >= 0; i--)
|
|
101
|
-
(
|
|
102
|
-
return r > 3 &&
|
|
104
|
+
(a = e[i]) && (s = (r < 3 ? a(s) : r > 3 ? a(t, n, s) : a(t, n)) || s);
|
|
105
|
+
return r > 3 && s && Object.defineProperty(t, n, s), s;
|
|
103
106
|
}, O = function(e, t) {
|
|
104
107
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
105
108
|
return Reflect.metadata(e, t);
|
|
106
109
|
};
|
|
107
110
|
const N = class {
|
|
108
111
|
constructor(e) {
|
|
109
|
-
b(this, e), this.nylasFormInputImageUrlInvalid = m(this, "nylasFormInputImageUrlInvalid", 7), 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.componentType = "image-url", this.imageUrl = "", this.errorMessage = "", this.name = "input-image-url", this.currentImageUrl = this.imageUrl, this.error = "";
|
|
112
|
+
b(this, e), this.nylasFormInputImageUrlInvalid = m(this, "nylasFormInputImageUrlInvalid", 7), 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.componentType = "image-url", this.imageUrl = "", this.themeConfig = void 0, this.errorMessage = "", this.name = "input-image-url", this.currentImageUrl = this.imageUrl, this.error = "";
|
|
110
113
|
}
|
|
111
114
|
connectedCallback() {
|
|
112
115
|
d("nylas-image-input", "connectedCallback");
|
|
@@ -118,7 +121,7 @@ const N = class {
|
|
|
118
121
|
d("nylas-image-input", "componentWillLoad"), this.host.setAttribute("name", this.name), this.host.setAttribute("component-type", this.componentType);
|
|
119
122
|
}
|
|
120
123
|
componentDidLoad() {
|
|
121
|
-
d("nylas-image-input", "componentDidLoad"), this.currentImageUrl = this.imageUrl, this.setImage(this.imageUrl, !1);
|
|
124
|
+
d("nylas-image-input", "componentDidLoad"), this.currentImageUrl = this.imageUrl, this.setImage(this.imageUrl, !1), this.applyThemeConfig(this.themeConfig);
|
|
122
125
|
}
|
|
123
126
|
componentWillUpdate() {
|
|
124
127
|
d("nylas-image-input", "componentWillUpdate");
|
|
@@ -138,13 +141,21 @@ const N = class {
|
|
|
138
141
|
errorMessageChangedHandler(e) {
|
|
139
142
|
d("nylas-image-input", "errorMessageChangedHandler", e), this.error && (this.error = e);
|
|
140
143
|
}
|
|
144
|
+
themeConfigChangedHandler(e, t) {
|
|
145
|
+
e !== t && this.applyThemeConfig(e);
|
|
146
|
+
}
|
|
147
|
+
applyThemeConfig(e) {
|
|
148
|
+
if (e)
|
|
149
|
+
for (const [t, n] of Object.entries(e))
|
|
150
|
+
this.host.style.setProperty(`${t}`, n);
|
|
151
|
+
}
|
|
141
152
|
async nylasFormInputChangedHandler(e) {
|
|
142
|
-
const { name: t, value:
|
|
143
|
-
t === this.name && this.setImage(
|
|
153
|
+
const { name: t, value: n } = e.detail;
|
|
154
|
+
t === this.name && this.setImage(n);
|
|
144
155
|
}
|
|
145
156
|
async nylasFormInputBlurHandler(e) {
|
|
146
|
-
const { name: t, value:
|
|
147
|
-
t === this.name && this.setImage(
|
|
157
|
+
const { name: t, value: n } = e.detail;
|
|
158
|
+
t === this.name && this.setImage(n);
|
|
148
159
|
}
|
|
149
160
|
setImage(e, t = !0) {
|
|
150
161
|
this.error = "", q(e).then(() => {
|
|
@@ -154,7 +165,7 @@ const N = class {
|
|
|
154
165
|
});
|
|
155
166
|
}
|
|
156
167
|
render() {
|
|
157
|
-
return
|
|
168
|
+
return l(C, { key: "3ba309394a934b49e5fe958b2b35689db17ed25a" }, l("div", { key: "35364f7a937b885e295814931619162caf41b849", class: "logo-container" }, l("div", { key: "7b4714a223160fb8700f9ea240c96a86370360dd", class: "input-container" }, l("input-component", { key: "443b31dfa78de24cf3720bc985a0d8a723ea0f85", name: this.name, id: this.name, type: "text", required: !1, themeConfig: this.themeConfig, exportparts: "ic_input: iiu__logo-input-textfield", defaultValue: this.imageUrl ?? "" }), this.error && l("span", { class: "error-message" }, this.error)), this.currentImageUrl && !this.error && l("div", { class: "logo" }, l("img", { src: this.currentImageUrl, alt: "Logo" }))));
|
|
158
169
|
}
|
|
159
170
|
static get formAssociated() {
|
|
160
171
|
return !0;
|
|
@@ -165,17 +176,18 @@ const N = class {
|
|
|
165
176
|
static get watchers() {
|
|
166
177
|
return {
|
|
167
178
|
name: ["elementNameChangedHandler"],
|
|
168
|
-
errorMessage: ["errorMessageChangedHandler"]
|
|
179
|
+
errorMessage: ["errorMessageChangedHandler"],
|
|
180
|
+
themeConfig: ["themeConfigChangedHandler"]
|
|
169
181
|
};
|
|
170
182
|
}
|
|
171
183
|
};
|
|
172
184
|
be([
|
|
173
|
-
|
|
185
|
+
w({
|
|
174
186
|
name: "nylas-image-input",
|
|
175
187
|
eventToProps: {
|
|
176
188
|
valueChanged: async (e, t) => {
|
|
177
|
-
const { valueChanged:
|
|
178
|
-
|
|
189
|
+
const { valueChanged: n } = e.detail;
|
|
190
|
+
n && n(e);
|
|
179
191
|
}
|
|
180
192
|
}
|
|
181
193
|
}),
|
|
@@ -184,32 +196,35 @@ be([
|
|
|
184
196
|
O("design:returntype", void 0)
|
|
185
197
|
], N.prototype, "render", null);
|
|
186
198
|
N.style = ue;
|
|
187
|
-
const ge = ':host{display:block;margin:1rem;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--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,
|
|
189
|
-
var r = arguments.length,
|
|
199
|
+
const ge = ':host{display:block;margin:1rem;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--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;background-color:var(--nylas-base-25)}.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;color:var(--nylas-base-800)}.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;color:var(--nylas-base-800)}.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;
|
|
200
|
+
var ve = function(e, t, n, o) {
|
|
201
|
+
var r = arguments.length, s = r < 3 ? t : o === null ? o = Object.getOwnPropertyDescriptor(t, n) : o, a;
|
|
190
202
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
191
|
-
|
|
203
|
+
s = Reflect.decorate(e, t, n, o);
|
|
192
204
|
else
|
|
193
205
|
for (var i = e.length - 1; i >= 0; i--)
|
|
194
|
-
(
|
|
195
|
-
return r > 3 &&
|
|
206
|
+
(a = e[i]) && (s = (r < 3 ? a(s) : r > 3 ? a(t, n, s) : a(t, n)) || s);
|
|
207
|
+
return r > 3 && s && Object.defineProperty(t, n, s), s;
|
|
196
208
|
}, I = function(e, t) {
|
|
197
209
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
198
210
|
return Reflect.metadata(e, t);
|
|
199
211
|
};
|
|
200
212
|
const z = class {
|
|
201
213
|
constructor(e) {
|
|
202
|
-
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.name = "participants", this.selectedConfiguration = void 0, this.currentUser = void 0, this.currentUserCalendars = void 0, this.participantOptions = void 0, this.eventParticipants = void 0, this.roundRobinConfig = void 0, this.selectedLanguage = void 0, this.participants = this.eventParticipants ?? [], this.participantErrors = {}, this.includeOrganizerAsParticipant = !0, this.isRoundRobinConfig = !1, this.error = "", this.requiredError = "", this.patternError = "";
|
|
214
|
+
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.name = "participants", this.selectedConfiguration = void 0, this.currentUser = void 0, this.currentUserCalendars = void 0, this.participantOptions = void 0, this.eventParticipants = void 0, this.roundRobinConfig = void 0, this.selectedLanguage = void 0, this.themeConfig = void 0, this.participants = this.eventParticipants ?? [], this.participantErrors = {}, this.includeOrganizerAsParticipant = !0, this.isRoundRobinConfig = !1, this.error = "", this.requiredError = "", this.patternError = "";
|
|
203
215
|
}
|
|
204
216
|
elementNameChangedHandler(e) {
|
|
205
217
|
d("nylas-additional-participants", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
206
218
|
}
|
|
207
|
-
selectedConfigurationAndCurrentUserChangedHandler(e, t,
|
|
208
|
-
d("nylas-additional-participants", "selectedConfigurationAndCurrentUserChangedHandler", e, this.currentUser),
|
|
219
|
+
selectedConfigurationAndCurrentUserChangedHandler(e, t, n) {
|
|
220
|
+
d("nylas-additional-participants", "selectedConfigurationAndCurrentUserChangedHandler", e, this.currentUser), n === "selectedConfiguration" ? this.updateState(e, this.currentUser, !1) : n === "currentUser" && this.updateState(this.selectedConfiguration, e, !1);
|
|
209
221
|
}
|
|
210
222
|
selectedLanguageChangedHandler(e, t) {
|
|
211
223
|
e !== t && (c.changeLanguage(e), this.requiredError = c.t("fieldRequired", { field: c.t("email") }), this.patternError = c.t("invalidInputFormat", { field: c.t("email") }), this.error && (this.error = c.t("nylasAdditionalParticipants.error")));
|
|
212
224
|
}
|
|
225
|
+
themeConfigChangedHandler(e, t) {
|
|
226
|
+
e !== t && this.applyThemeConfig(e);
|
|
227
|
+
}
|
|
213
228
|
connectedCallback() {
|
|
214
229
|
d("nylas-additional-participants", "connectedCallback");
|
|
215
230
|
}
|
|
@@ -222,37 +237,37 @@ const z = class {
|
|
|
222
237
|
disconnectedCallback() {
|
|
223
238
|
d("nylas-additional-participants", "disconnectedCallback");
|
|
224
239
|
}
|
|
225
|
-
updateState(e, t,
|
|
226
|
-
var o, r,
|
|
227
|
-
this.isRoundRobinConfig = (r = (o = e == null ? void 0 : e.availability) == null ? void 0 : o.availability_rules) != null && r.availability_method ? ((
|
|
240
|
+
updateState(e, t, n = !0) {
|
|
241
|
+
var o, r, s, a;
|
|
242
|
+
this.isRoundRobinConfig = (r = (o = e == null ? void 0 : e.availability) == null ? void 0 : o.availability_rules) != null && r.availability_method ? ((a = (s = e == null ? void 0 : e.availability) == null ? void 0 : s.availability_rules) == null ? void 0 : a.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(n);
|
|
228
243
|
}
|
|
229
244
|
get isInternalsAvailable() {
|
|
230
245
|
return this.internals !== void 0 && typeof this.internals.setFormValue == "function" && typeof this.internals.setValidity == "function";
|
|
231
246
|
}
|
|
232
247
|
onInputOptionChanged(e) {
|
|
233
|
-
var
|
|
248
|
+
var s, a, i, f;
|
|
234
249
|
d("nylas-additional-participants", "onInputOptionChanged");
|
|
235
|
-
const t = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/,
|
|
250
|
+
const t = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/, n = e.detail.name, o = (s = this.participantOptions) == null ? void 0 : s.find((p) => p.email === e.detail.value);
|
|
236
251
|
if (!o && this.isRoundRobinConfig) {
|
|
237
|
-
this.isInternalsAvailable && this.internals.setValidity({ customError: !0 }, "For round robin configuration, participant should be selected from the dropdown."), this.participantErrors[
|
|
252
|
+
this.isInternalsAvailable && this.internals.setValidity({ customError: !0 }, "For round robin configuration, participant should be selected from the dropdown."), this.participantErrors[n] = "For round robin page, participant should be selected from the dropdown.", this.participants[n].is_valid = !1, this.participants = [...this.participants];
|
|
238
253
|
return;
|
|
239
254
|
} else if (!o && !t.test(e.detail.value)) {
|
|
240
|
-
this.isInternalsAvailable && this.internals.setValidity({ customError: !0 }, c.t("nylasAdditionalParticipants.error_email")), this.participantErrors[
|
|
255
|
+
this.isInternalsAvailable && this.internals.setValidity({ customError: !0 }, c.t("nylasAdditionalParticipants.error_email")), this.participantErrors[n] = c.t("nylasAdditionalParticipants.error_email"), this.participants[n].is_valid = !1, this.participants = [...this.participants];
|
|
241
256
|
return;
|
|
242
257
|
} else
|
|
243
|
-
this.participantErrors[
|
|
244
|
-
this.participants[
|
|
245
|
-
const r = (
|
|
246
|
-
this.participants[
|
|
258
|
+
this.participantErrors[n] = "", this.participants[n].is_valid = !0, this.isInternalsAvailable && this.internals.setValidity({});
|
|
259
|
+
this.participants[n].email = e.detail.value;
|
|
260
|
+
const r = (a = o == null ? void 0 : o.calendars) == null ? void 0 : a.find((p) => p.is_primary);
|
|
261
|
+
this.participants[n].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[n].booking = o && this.isRoundRobinConfig && (r != null && r.id) ? { calendar_id: r.id } : this.isRoundRobinConfig && ((f = o == null ? void 0 : o.calendars[0]) != null && f.id) ? { calendar_id: o.calendars[0].id } : void 0, this.participants[n].name = (o == null ? void 0 : o.name) || e.detail.value, this.participants = [...this.participants], this.updateFormValue();
|
|
247
262
|
}
|
|
248
263
|
updateOrganizerAsParticipant(e = !0) {
|
|
249
|
-
var
|
|
264
|
+
var n, o, r, s, a, i, f;
|
|
250
265
|
const t = this.participants.find((p) => {
|
|
251
266
|
var h;
|
|
252
267
|
return p.email === ((h = this.currentUser) == null ? void 0 : h.email);
|
|
253
268
|
});
|
|
254
|
-
if (this.isRoundRobinConfig && !t && ((
|
|
255
|
-
const p = ((r = (o = this.currentUserCalendars) == null ? void 0 : o.find((h) => h.is_primary)) == null ? void 0 : r.id) || ((
|
|
269
|
+
if (this.isRoundRobinConfig && !t && ((n = this.currentUser) != null && n.email)) {
|
|
270
|
+
const p = ((r = (o = this.currentUserCalendars) == null ? void 0 : o.find((h) => h.is_primary)) == null ? void 0 : r.id) || ((a = (s = this.currentUserCalendars) == null ? void 0 : s[0]) == null ? void 0 : a.id) || "primary";
|
|
256
271
|
this.participants = [
|
|
257
272
|
{
|
|
258
273
|
name: (i = this.currentUser) == null ? void 0 : i.name,
|
|
@@ -274,25 +289,30 @@ const z = class {
|
|
|
274
289
|
d("nylas-additional-participants", "addParticipant"), this.participants = [...this.participants, { name: "", email: "", is_organizer: !1 }], this.updateFormValue();
|
|
275
290
|
}
|
|
276
291
|
removeParticipant(e) {
|
|
277
|
-
d("nylas-additional-participants", "removeParticipant"), this.participants = this.participants.filter((t,
|
|
292
|
+
d("nylas-additional-participants", "removeParticipant"), this.participants = this.participants.filter((t, n) => n !== e), this.updateFormValue();
|
|
278
293
|
}
|
|
279
294
|
updateFormValue(e = !0) {
|
|
280
295
|
d("nylas-additional-participants", "updateFormValue");
|
|
281
|
-
const t = this.isRoundRobinConfig ? this.includeOrganizerAsParticipant ? this.participants : this.participants.filter((
|
|
296
|
+
const t = this.isRoundRobinConfig ? this.includeOrganizerAsParticipant ? this.participants : this.participants.filter((n) => !n.is_organizer) : this.participants;
|
|
282
297
|
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 }));
|
|
283
298
|
}
|
|
284
299
|
getArrayDifference(e, t) {
|
|
285
300
|
return e.filter((o) => !t.some((r) => o.email === r.email)).map((o) => ({ value: o.email, label: o.email }));
|
|
286
301
|
}
|
|
302
|
+
applyThemeConfig(e) {
|
|
303
|
+
if (e)
|
|
304
|
+
for (const [t, n] of Object.entries(e))
|
|
305
|
+
this.host.style.setProperty(`${t}`, n);
|
|
306
|
+
}
|
|
287
307
|
render() {
|
|
288
|
-
return
|
|
308
|
+
return l(C, { key: "8f567ae6775e709c0d2046cb0e072039e6aa22f6", part: "nadtnlpart" }, l("nylas-form-card", { key: "9797400fad8fc093f6a909270ddfa7baf192ac8d", exportparts: "nfc, nfc__header", themeConfig: this.themeConfig }, l("h3", { key: "e4a4a618db2fb686a0f307727eafb15fc67e464f", slot: "header-title", class: "nylas-additional-participants__title", part: "nadtnlpart__title" }, c.t("nylasAdditionalParticipants.headerTitle")), l("p", { key: "30fe99e55ec458a1772492d39652072b4df893c6", slot: "header-subtitle", class: "nylas-additional-participants__subtitle", part: "nadtnlpart__subtitle" }, c.t("nylasAdditionalParticipants.headerSubTitle")), l("div", { key: "f5fcde3ccb7493850b02ef17cbfc73e54560c045", slot: "content", class: "nylas-additional-participants__content", part: "nadtnlpart__content" }, l("div", { key: "25f5adaf1b9e1f4c2d4cc3a98e4becba334a34b0" }, this.participants.map((e, t) => l("div", { class: "nylas-additional-participants__input_group", part: "nadtnlpart__input_group" }, !e.is_organizer && l("label", null, `${c.t("nylasAdditionalParticipants.participant")} ${t}`), l("div", { part: "nadtnlpart__input_wrapper", class: {
|
|
289
309
|
"nylas-additional-participants__input_wrapper": !0,
|
|
290
310
|
"nylas-additional-participants__input_wrapper_organizer": (e == null ? void 0 : e.is_organizer) === !0,
|
|
291
311
|
"nylas-additional-participants__input_wrapper_invalid": e.is_valid === !1,
|
|
292
312
|
error: e.is_valid === !1
|
|
293
|
-
} },
|
|
313
|
+
} }, l("div", { class: { "nylas-additional-participants__input": !0, organizer: (e == null ? void 0 : e.is_organizer) === !0 }, part: "nadtnlpart__input" }, e.is_organizer ? l("input-component", { class: "label-input", name: `${t}`, key: t, label: c.t("nylasAdditionalParticipants.organizer"), required: !1, requiredError: this.requiredError, patternError: this.patternError, readOnly: e.is_organizer, defaultValue: e.email, themeConfig: this.themeConfig }, this.isRoundRobinConfig && l("div", { class: "required-input", slot: "additional-input" }, l("input", { type: "checkbox", name: "organizer_participant", id: "organizer_participant", onClick: () => {
|
|
294
314
|
this.includeOrganizerAsParticipant = !this.includeOrganizerAsParticipant, this.updateFormValue();
|
|
295
|
-
}, checked: this.includeOrganizerAsParticipant }),
|
|
315
|
+
}, checked: this.includeOrganizerAsParticipant }), l("label", { htmlFor: "organizer_participant", "aria-label": "Include as participant" }, l("span", { class: "org-as-participant", part: "nadtnlpart__org-as-participant" }, c.t("nylasAdditionalParticipants.organizerAsParticipant")), l("tooltip-component", { id: "organizer_participant_tooltip" }, l("info-icon", { slot: "tooltip-icon" }), l("span", { slot: "tooltip-content" }, l("strong", null, c.t("nylasAdditionalParticipants.tooltip.includeOrganizer"), ":"), " ", c.t("nylasAdditionalParticipants.tooltip.includeOrganizerDesc"), " ", l("br", null), l("strong", null, c.t("nylasAdditionalParticipants.tooltip.excludeOrganizer"), ":"), " ", c.t("nylasAdditionalParticipants.tooltip.excludeOrganizerDesc")))))) : l("input-dropdown", { id: `${t}`, name: `${t}`, filterable: !0, inputValue: e.email, options: this.getArrayDifference(this.participantOptions || [], this.participants), themeConfig: this.themeConfig }), !e.is_organizer && l("button", { onClick: () => this.removeParticipant(t), part: "nadtnlpart__remove-participant" }, l("close-icon", null)))), !e.is_valid && l("p", { class: "nylas-additional-participants__error", part: "nadtnlpart__error" }, this.participantErrors[t]))), l("p", { key: "8878a1424302cbf36cf0a3a3a945c9a2ab63f1cd", class: "nylas-additional-participants__error", part: "nadtnlpart__error" }, this.error)), l("button", { key: "ffc743095240b2b14cedab52178fcec10a5f9d40", class: "nylas-additional-participants__add", part: "nadtnlpart__add-participant", onClick: () => this.addParticipant() }, l("add-circle-icon", { key: "b7c9581fd3aa18b846ae908ca49bbfaebf3f86e0" }), " ", l("span", { key: "9ae4f72925cd53c2fef4600dd6ec806ff513e211" }, this.participants.length > 1 ? c.t("nylasAdditionalParticipants.addParticipant", { context: "next" }) : c.t("nylasAdditionalParticipants.addParticipant", { context: "first" }))))));
|
|
296
316
|
}
|
|
297
317
|
static get formAssociated() {
|
|
298
318
|
return !0;
|
|
@@ -305,19 +325,21 @@ const z = class {
|
|
|
305
325
|
name: ["elementNameChangedHandler"],
|
|
306
326
|
currentUser: ["selectedConfigurationAndCurrentUserChangedHandler"],
|
|
307
327
|
selectedConfiguration: ["selectedConfigurationAndCurrentUserChangedHandler"],
|
|
308
|
-
selectedLanguage: ["selectedLanguageChangedHandler"]
|
|
328
|
+
selectedLanguage: ["selectedLanguageChangedHandler"],
|
|
329
|
+
themeConfig: ["themeConfigChangedHandler"]
|
|
309
330
|
};
|
|
310
331
|
}
|
|
311
332
|
};
|
|
312
333
|
ve([
|
|
313
|
-
|
|
334
|
+
w({
|
|
314
335
|
name: "nylas-additional-participants",
|
|
315
336
|
stateToProps: /* @__PURE__ */ new Map([
|
|
316
337
|
["schedulerConfig.additionalParticipants", "participantOptions"],
|
|
317
338
|
["schedulerConfig.selectedConfiguration", "selectedConfiguration"],
|
|
318
339
|
["schedulerConfig.currentUser", "currentUser"],
|
|
319
340
|
["schedulerConfig.calendars", "currentUserCalendars"],
|
|
320
|
-
["schedulerConfig.selectedLanguage", "selectedLanguage"]
|
|
341
|
+
["schedulerConfig.selectedLanguage", "selectedLanguage"],
|
|
342
|
+
["schedulerConfig.themeConfig", "themeConfig"]
|
|
321
343
|
]),
|
|
322
344
|
eventToProps: {},
|
|
323
345
|
fireRegisterEvent: !0
|
|
@@ -327,38 +349,38 @@ ve([
|
|
|
327
349
|
I("design:returntype", void 0)
|
|
328
350
|
], z.prototype, "render", null);
|
|
329
351
|
z.style = me;
|
|
330
|
-
const xe = ':host{--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--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;
|
|
331
|
-
var
|
|
332
|
-
var r = arguments.length,
|
|
352
|
+
const xe = ':host{--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--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;background-color:var(--nylas-base-0);}.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;background-color:var(--nylas-base-0)}.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;
|
|
353
|
+
var Ce = function(e, t, n, o) {
|
|
354
|
+
var r = arguments.length, s = r < 3 ? t : o === null ? o = Object.getOwnPropertyDescriptor(t, n) : o, a;
|
|
333
355
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
334
|
-
|
|
356
|
+
s = Reflect.decorate(e, t, n, o);
|
|
335
357
|
else
|
|
336
358
|
for (var i = e.length - 1; i >= 0; i--)
|
|
337
|
-
(
|
|
338
|
-
return r > 3 &&
|
|
339
|
-
},
|
|
359
|
+
(a = e[i]) && (s = (r < 3 ? a(s) : r > 3 ? a(t, n, s) : a(t, n)) || s);
|
|
360
|
+
return r > 3 && s && Object.defineProperty(t, n, s), s;
|
|
361
|
+
}, P = function(e, t) {
|
|
340
362
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
341
363
|
return Reflect.metadata(e, t);
|
|
342
364
|
};
|
|
343
365
|
const B = class {
|
|
344
366
|
constructor(e) {
|
|
345
|
-
var t,
|
|
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 = (
|
|
347
|
-
label:
|
|
348
|
-
value:
|
|
349
|
-
labelHTML:
|
|
367
|
+
var t, n, o, r;
|
|
368
|
+
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 = (n = (t = this.selectedConfiguration) == null ? void 0 : t.event_booking) == null ? void 0 : n.description, this.name = "description", this.selectedLanguage = void 0, this.hideAutoPopulateButton = !1, this.noTemplates = !1, this.themeConfig = void 0, 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((s) => ({
|
|
369
|
+
label: s.token,
|
|
370
|
+
value: s.value,
|
|
371
|
+
labelHTML: s
|
|
350
372
|
})), this.filteredTokens = this.availableTokens, this.ariaActivedescendant = "", this.currentWord = { $value: "", fullText: "", index: -1, focusOffset: -1 }, this.validationError = "", this.additionalFieldTokens = [];
|
|
351
373
|
}
|
|
352
374
|
elementNameChangedHandler(e) {
|
|
353
375
|
d("nylas-event-description", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
354
376
|
}
|
|
355
377
|
selectedConfigurationChangedHandler(e) {
|
|
356
|
-
var
|
|
378
|
+
var s, a;
|
|
357
379
|
d("nylas-custom-booking-flow", "selectedConfigurationChangedHandler", e);
|
|
358
|
-
const t = ((
|
|
380
|
+
const t = ((s = e == null ? void 0 : e.event_booking) == null ? void 0 : s.description) || this.eventDescription || "", n = ((a = e == null ? void 0 : e.scheduler) == null ? void 0 : a.additional_fields) || {}, r = (Object.keys(n) || []).map((i) => ({
|
|
359
381
|
token: `$${i}`,
|
|
360
382
|
value: `\${${i}}`,
|
|
361
|
-
description:
|
|
383
|
+
description: n[i].label || ""
|
|
362
384
|
}));
|
|
363
385
|
this.additionalFieldTokens = [...r], this.availableTokens = [...k, ...r].map((i) => ({
|
|
364
386
|
label: i.token,
|
|
@@ -370,12 +392,20 @@ const B = class {
|
|
|
370
392
|
if (e === t)
|
|
371
393
|
return;
|
|
372
394
|
c.changeLanguage(e);
|
|
373
|
-
const
|
|
395
|
+
const n = {
|
|
374
396
|
$invitee: "invitee",
|
|
375
397
|
$invitee_email: "inviteeEmail",
|
|
376
398
|
$duration: "duration"
|
|
377
399
|
};
|
|
378
|
-
this.availableTokens = this.availableTokens.map((o) => (
|
|
400
|
+
this.availableTokens = this.availableTokens.map((o) => (n[o.label] && (o.labelHTML.description = c.t(`nylasEventTitle.eventTitleTokenDescription.${n[o.label]}`)), o)), this.filteredTokens = [...this.availableTokens];
|
|
401
|
+
}
|
|
402
|
+
themeConfigChangedHandler(e, t) {
|
|
403
|
+
e !== t && this.applyThemeConfig(e);
|
|
404
|
+
}
|
|
405
|
+
applyThemeConfig(e) {
|
|
406
|
+
if (e)
|
|
407
|
+
for (const [t, n] of Object.entries(e))
|
|
408
|
+
this.host.style.setProperty(`${t}`, n);
|
|
379
409
|
}
|
|
380
410
|
connectedCallback() {
|
|
381
411
|
d("nylas-event-description", "connectedCallback");
|
|
@@ -390,17 +420,17 @@ const B = class {
|
|
|
390
420
|
d("nylas-event-description", "disconnectedCallback");
|
|
391
421
|
}
|
|
392
422
|
valueChangedHandler(e) {
|
|
393
|
-
const { name: t, value:
|
|
423
|
+
const { name: t, value: n } = e.detail;
|
|
394
424
|
if (t === "additional-fields") {
|
|
395
|
-
const o = JSON.parse(
|
|
396
|
-
token: `$${
|
|
397
|
-
value: `\${${
|
|
398
|
-
description: o[
|
|
425
|
+
const o = JSON.parse(n.toString()), s = (Object.keys(o) || []).map((a) => ({
|
|
426
|
+
token: `$${a}`,
|
|
427
|
+
value: `\${${a}}`,
|
|
428
|
+
description: o[a].label || ""
|
|
399
429
|
}));
|
|
400
|
-
this.additionalFieldTokens = [...
|
|
401
|
-
label:
|
|
402
|
-
value:
|
|
403
|
-
labelHTML:
|
|
430
|
+
this.additionalFieldTokens = [...s], this.availableTokens = [...k, ...s].map((a) => ({
|
|
431
|
+
label: a.token,
|
|
432
|
+
value: a.value,
|
|
433
|
+
labelHTML: a
|
|
404
434
|
})), this.filteredTokens = [...this.availableTokens];
|
|
405
435
|
}
|
|
406
436
|
}
|
|
@@ -411,15 +441,15 @@ const B = class {
|
|
|
411
441
|
}
|
|
412
442
|
highlightTokens(e) {
|
|
413
443
|
let t = e;
|
|
414
|
-
return [...k, ...this.additionalFieldTokens].forEach((
|
|
415
|
-
const o =
|
|
444
|
+
return [...k, ...this.additionalFieldTokens].forEach((n) => {
|
|
445
|
+
const o = n.value, r = new RegExp(`(\\${o})(?!\\w)`, "g");
|
|
416
446
|
t = (t == null ? void 0 : t.replace(r, '<span class="highlighted-tag">$1</span>')) || "";
|
|
417
447
|
}), t;
|
|
418
448
|
}
|
|
419
449
|
getCurrentSelectionForBrowser() {
|
|
420
|
-
var o, r,
|
|
421
|
-
const e = (
|
|
422
|
-
const h =
|
|
450
|
+
var o, r, s;
|
|
451
|
+
const e = (a, i, f, p) => {
|
|
452
|
+
const h = a.replace(/[\u200B-\u200D\uFEFF]/g, ""), y = h.lastIndexOf("$"), u = h.substring(y).split(" ")[0];
|
|
423
453
|
return {
|
|
424
454
|
focusOffset: i,
|
|
425
455
|
dollarIndex: y,
|
|
@@ -428,21 +458,21 @@ const B = class {
|
|
|
428
458
|
node: f,
|
|
429
459
|
allSelected: p
|
|
430
460
|
};
|
|
431
|
-
}, t = (
|
|
461
|
+
}, t = (a) => {
|
|
432
462
|
var i, f;
|
|
433
|
-
return
|
|
463
|
+
return a.anchorOffset === 0 && a.focusOffset === ((f = (i = a.focusNode) == null ? void 0 : i.nodeValue) == null ? void 0 : f.length);
|
|
434
464
|
};
|
|
435
465
|
switch (M()) {
|
|
436
466
|
case "Chrome": {
|
|
437
|
-
const
|
|
438
|
-
return e(f, (
|
|
467
|
+
const a = (o = this.host.shadowRoot) == null ? void 0 : o.getSelection(), i = a == null ? void 0 : a.focusNode, f = (i == null ? void 0 : i.nodeValue) || "", p = a && t(a);
|
|
468
|
+
return e(f, (a == null ? void 0 : a.focusOffset) || -1, i, p);
|
|
439
469
|
}
|
|
440
470
|
case "Firefox": {
|
|
441
|
-
const
|
|
442
|
-
return e(i, (
|
|
471
|
+
const a = document.getSelection(), i = ((r = a == null ? void 0 : a.anchorNode) == null ? void 0 : r.nodeValue) || "", f = a && t(a);
|
|
472
|
+
return e(i, (a == null ? void 0 : a.focusOffset) || -1, a == null ? void 0 : a.anchorNode, f);
|
|
443
473
|
}
|
|
444
474
|
case "Safari": {
|
|
445
|
-
const
|
|
475
|
+
const a = window.getSelection(), i = a == null ? void 0 : a.getComposedRanges(this.host.shadowRoot)[0], f = ((s = i == null ? void 0 : i.startContainer) == null ? void 0 : s.nodeValue) || "", p = a && t(a);
|
|
446
476
|
return e(f, (i == null ? void 0 : i.endOffset) || -1, i == null ? void 0 : i.startContainer, p);
|
|
447
477
|
}
|
|
448
478
|
default:
|
|
@@ -451,32 +481,32 @@ const B = class {
|
|
|
451
481
|
}
|
|
452
482
|
handleChange(e) {
|
|
453
483
|
let t = e.target.textContent || "";
|
|
454
|
-
t =
|
|
455
|
-
const
|
|
456
|
-
if (!
|
|
484
|
+
t = R(t);
|
|
485
|
+
const n = this.getCurrentSelectionForBrowser();
|
|
486
|
+
if (!n) {
|
|
457
487
|
this.updateEventDescription(t), this.resetDropdown();
|
|
458
488
|
return;
|
|
459
489
|
}
|
|
460
|
-
const { focusOffset: o, dollarIndex: r, lastWord:
|
|
490
|
+
const { focusOffset: o, dollarIndex: r, lastWord: s, currentText: a } = n;
|
|
461
491
|
if (r === -1 || o < r) {
|
|
462
492
|
this.updateEventDescription(t), this.resetDropdown();
|
|
463
493
|
return;
|
|
464
494
|
}
|
|
465
|
-
|
|
466
|
-
$value:
|
|
467
|
-
fullText:
|
|
495
|
+
s.startsWith("$") ? (this.showTokens = !0, this.currentWord = {
|
|
496
|
+
$value: s,
|
|
497
|
+
fullText: a,
|
|
468
498
|
index: r,
|
|
469
499
|
focusOffset: o
|
|
470
|
-
}, this.populateSuggestionsDropdown(
|
|
500
|
+
}, this.populateSuggestionsDropdown(s)) : this.resetDropdown(), this.updateEventDescription(t);
|
|
471
501
|
}
|
|
472
502
|
handleInputKeyDown(e) {
|
|
473
|
-
var
|
|
503
|
+
var n, o, r, s;
|
|
474
504
|
const t = this.getCurrentSelectionForBrowser();
|
|
475
|
-
if (t != null && t.allSelected && !
|
|
505
|
+
if (t != null && t.allSelected && !S(e) && (this.descriptionRef.innerHTML = ""), e.key === "Enter") {
|
|
476
506
|
e.preventDefault();
|
|
477
|
-
const
|
|
478
|
-
if (
|
|
479
|
-
|
|
507
|
+
const a = (n = this.host.shadowRoot) == null ? void 0 : n.getElementById(this.ariaActivedescendant);
|
|
508
|
+
if (a)
|
|
509
|
+
a.click(), this.ariaActivedescendant = "";
|
|
480
510
|
else {
|
|
481
511
|
const i = t == null ? void 0 : t.node, f = (t == null ? void 0 : t.focusOffset) || 0;
|
|
482
512
|
if (!i || f === -1 || this.descriptionRef.childNodes.length === 0) {
|
|
@@ -500,52 +530,52 @@ const B = class {
|
|
|
500
530
|
}
|
|
501
531
|
} else if (e.key === "ArrowDown") {
|
|
502
532
|
this.showTokens && e.preventDefault();
|
|
503
|
-
const
|
|
504
|
-
if (
|
|
505
|
-
const i =
|
|
533
|
+
const a = (o = this.host.shadowRoot) == null ? void 0 : o.getElementById(this.ariaActivedescendant);
|
|
534
|
+
if (a) {
|
|
535
|
+
const i = a.nextElementSibling;
|
|
506
536
|
i ? this.ariaActivedescendant = i.id : this.ariaActivedescendant = this.filteredTokens[0].label;
|
|
507
537
|
} else
|
|
508
538
|
this.ariaActivedescendant = this.filteredTokens[0].label;
|
|
509
539
|
} else if (e.key === "ArrowUp") {
|
|
510
540
|
this.showTokens && e.preventDefault();
|
|
511
|
-
const
|
|
512
|
-
if (
|
|
513
|
-
const i =
|
|
541
|
+
const a = (r = this.host.shadowRoot) == null ? void 0 : r.getElementById(this.ariaActivedescendant);
|
|
542
|
+
if (a) {
|
|
543
|
+
const i = a.previousElementSibling;
|
|
514
544
|
i ? this.ariaActivedescendant = i.id : this.ariaActivedescendant = this.filteredTokens[this.filteredTokens.length - 1].label;
|
|
515
545
|
} else
|
|
516
546
|
this.ariaActivedescendant = this.filteredTokens[this.filteredTokens.length - 1].label;
|
|
517
547
|
} else if (e.key === "Escape")
|
|
518
548
|
e.preventDefault(), this.resetDropdown();
|
|
519
549
|
else if (e.key === "Backspace" || e.key === "Delete") {
|
|
520
|
-
const
|
|
521
|
-
t != null && t.currentText.startsWith("${") &&
|
|
550
|
+
const a = (s = t == null ? void 0 : t.node) == null ? void 0 : s.parentNode;
|
|
551
|
+
t != null && t.currentText.startsWith("${") && a && a.nodeName === "SPAN" && (e.preventDefault(), a.removeChild(t.node), a.remove(), this.resetDropdown()), (this.descriptionRef.textContent === "" || t != null && t.allSelected) && (this.descriptionRef.innerHTML = "", this.updateEventDescription(""));
|
|
522
552
|
}
|
|
523
553
|
}
|
|
524
554
|
selectOption(e, t) {
|
|
525
555
|
var T;
|
|
526
556
|
e.preventDefault();
|
|
527
|
-
const
|
|
528
|
-
let r = this.descriptionRef.firstChild,
|
|
557
|
+
const n = this.currentWord.fullText, o = this.currentWord.$value;
|
|
558
|
+
let r = this.descriptionRef.firstChild, s = null;
|
|
529
559
|
for (; r; ) {
|
|
530
560
|
if (r.nodeType === 3) {
|
|
531
|
-
const v = ((T = r.textContent) == null ? void 0 : T.replace(/[\u200B-\u200D\uFEFF]/g, "")) || "", L =
|
|
561
|
+
const v = ((T = r.textContent) == null ? void 0 : T.replace(/[\u200B-\u200D\uFEFF]/g, "")) || "", L = n.replace(/[\u200B-\u200D\uFEFF]/g, "");
|
|
532
562
|
if (v.includes(L)) {
|
|
533
|
-
|
|
563
|
+
s = r;
|
|
534
564
|
break;
|
|
535
565
|
}
|
|
536
566
|
}
|
|
537
567
|
r = r.nextSibling;
|
|
538
568
|
}
|
|
539
|
-
if (!
|
|
569
|
+
if (!s)
|
|
540
570
|
return;
|
|
541
|
-
const
|
|
571
|
+
const a = s.textContent || "", i = a.indexOf(o), f = a.substring(0, i), p = a.substring(i + o.length), h = document.createTextNode(f), y = document.createRange(), u = document.createElement("span");
|
|
542
572
|
u.classList.add("highlighted-tag"), u.textContent = `${t.value}`;
|
|
543
573
|
const _ = document.createTextNode(p);
|
|
544
574
|
if (p !== "")
|
|
545
|
-
|
|
575
|
+
s.replaceWith(h, u, _), y.setStart(_, 1);
|
|
546
576
|
else {
|
|
547
577
|
const v = document.createTextNode("");
|
|
548
|
-
|
|
578
|
+
s.replaceWith(h, u, v), y.setStart(v, 1);
|
|
549
579
|
}
|
|
550
580
|
this.resetDropdown(), this.descriptionRef.focus();
|
|
551
581
|
const g = window.getSelection();
|
|
@@ -558,32 +588,32 @@ const B = class {
|
|
|
558
588
|
return typeof this.internals < "u" && typeof this.internals.setValidity == "function" && typeof this.internals.setFormValue == "function";
|
|
559
589
|
}
|
|
560
590
|
updateEventDescription(e) {
|
|
561
|
-
var
|
|
591
|
+
var n;
|
|
562
592
|
const t = e.replace(/ +/g, " ");
|
|
563
|
-
this.isInternalsAvailable && ((
|
|
593
|
+
this.isInternalsAvailable && ((n = this.internals) == null || n.setFormValue(t, this.name)), this.valueChanged.emit({ value: t, name: this.name });
|
|
564
594
|
}
|
|
565
595
|
resetDropdown() {
|
|
566
596
|
this.showTokens = !1, this.ariaActivedescendant = "";
|
|
567
597
|
}
|
|
568
598
|
getLabelHTML(e) {
|
|
569
|
-
return
|
|
599
|
+
return l("div", { class: "token-label" }, l("span", { class: "token" }, e.token), l("span", { class: "description" }, e.description));
|
|
570
600
|
}
|
|
571
601
|
handleAddAdditionalFields() {
|
|
572
602
|
if (this.additionalFieldTokens.length === 0)
|
|
573
603
|
return;
|
|
574
|
-
const e = this.descriptionRef.innerHTML, t = "--- Additional Fields ---",
|
|
575
|
-
let
|
|
604
|
+
const e = this.descriptionRef.innerHTML, t = "--- Additional Fields ---", n = "--- End Additional Fields ---", o = e.indexOf(t), r = e.indexOf(n);
|
|
605
|
+
let s = t + `
|
|
576
606
|
`;
|
|
577
607
|
this.additionalFieldTokens.forEach((i) => {
|
|
578
|
-
|
|
608
|
+
s += `${i.description}: ${i.value}
|
|
579
609
|
`;
|
|
580
|
-
}),
|
|
581
|
-
let
|
|
582
|
-
o !== -1 && r !== -1 ?
|
|
610
|
+
}), s += n;
|
|
611
|
+
let a;
|
|
612
|
+
o !== -1 && r !== -1 ? a = e.substring(0, o) + s + e.substring(r + n.length) : a = e + s, this.updateEventDescriptionFromProp(a), this.updateEventDescription(a);
|
|
583
613
|
}
|
|
584
614
|
render() {
|
|
585
615
|
var e;
|
|
586
|
-
return
|
|
616
|
+
return l(C, { key: "9ccddd8582abc61f2dddd757a4c0b421ca75718b" }, l("div", { key: "06234e9529c43410161c40ac752fa6f0413daa6b", class: "nylas-event-description", part: "nedesc" }, l("label", { key: "c908c2dbd967208f92e72fab292b32527d645d0f", htmlFor: "description" }, c.t("nylasEventDescription.headerTitle"), l("span", { key: "90f417361636dc3d35d36be47e96b9cb2075294c", class: "label-icon" }, l("tooltip-component", { key: "d1bd3235457855d341c07be94a1d865995b21dac" }, l("info-icon", { key: "0ddd3a4af6dad47dec07fb5d6e490de8b174c4c3", slot: "tooltip-icon" }), l("span", { key: "b80a0cf4324dd728e32afc689327b5fb29a59fe8", slot: "tooltip-content" }, c.t("nylasEventDescription.tooltip.desc"))))), l("div", { key: "cf413dda764a5c41faafb1d95aecd1725e40eea3", 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 && l("div", { class: "token-options", part: "nedesc__dropdown-content" }, l("ul", { tabindex: "-1", role: "listbox", "aria-label": this.name, "aria-activedescendant": this.ariaActivedescendant }, this.filteredTokens.map((t) => l("li", { tabindex: "0", key: t.label, id: t.label, class: { active: this.ariaActivedescendant === t.label }, onClick: (n) => this.selectOption(n, t), role: "option" }, this.getLabelHTML(t.labelHTML))))), !this.noTemplates && l("span", { class: "help-text" }, c.t("nylasEventTitle.helpText", { context: "start", field: c.t("nylasEventTitle.description") }), " ", l("code", null, "$"), " ", c.t("nylasEventTitle.helpText", { context: "end" }), l("span", { class: "label-icon" }, l("tooltip-component", null, l("info-icon", { slot: "tooltip-icon", width: "13", height: "13" }), l("span", { slot: "tooltip-content" }, c.t("nylasEventTitle.tooltip.desc"), " ", l("code", null, "${invitee}"))))), !this.noTemplates && !this.hideAutoPopulateButton && l("span", { class: "add-additional-fields" }, l("button-component", { variant: "basic", onClick: () => this.handleAddAdditionalFields() }, c.t("nylasEventDescription.addAdditionalFields.buttonText")), l("span", { class: "label-icon" }, l("tooltip-component", null, l("info-icon", { slot: "tooltip-icon" }), l("span", { slot: "tooltip-content" }, c.t("nylasEventDescription.addAdditionalFields.tooltip.desc"), " ", l("code", null, "${invitee}")))))));
|
|
587
617
|
}
|
|
588
618
|
static get formAssociated() {
|
|
589
619
|
return !0;
|
|
@@ -595,45 +625,55 @@ const B = class {
|
|
|
595
625
|
return {
|
|
596
626
|
name: ["elementNameChangedHandler"],
|
|
597
627
|
selectedConfiguration: ["selectedConfigurationChangedHandler"],
|
|
598
|
-
selectedLanguage: ["selectedLanguageChangedHandler"]
|
|
628
|
+
selectedLanguage: ["selectedLanguageChangedHandler"],
|
|
629
|
+
themeConfig: ["themeConfigChangedHandler"]
|
|
599
630
|
};
|
|
600
631
|
}
|
|
601
632
|
};
|
|
602
|
-
|
|
603
|
-
|
|
633
|
+
Ce([
|
|
634
|
+
w({
|
|
604
635
|
name: "nylas-event-description",
|
|
605
636
|
stateToProps: /* @__PURE__ */ new Map([
|
|
606
637
|
["schedulerConfig.selectedConfiguration", "selectedConfiguration"],
|
|
607
|
-
["schedulerConfig.selectedLanguage", "selectedLanguage"]
|
|
638
|
+
["schedulerConfig.selectedLanguage", "selectedLanguage"],
|
|
639
|
+
["schedulerConfig.themeConfig", "themeConfig"]
|
|
608
640
|
]),
|
|
609
641
|
eventToProps: {},
|
|
610
642
|
fireRegisterEvent: !0
|
|
611
643
|
}),
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
644
|
+
P("design:type", Function),
|
|
645
|
+
P("design:paramtypes", []),
|
|
646
|
+
P("design:returntype", void 0)
|
|
615
647
|
], B.prototype, "render", null);
|
|
616
648
|
B.style = ke;
|
|
617
|
-
const
|
|
618
|
-
var Te = function(e, t,
|
|
619
|
-
var r = arguments.length,
|
|
649
|
+
const we = ':host{display:block;margin:1rem;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--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;background-color:var(--nylas-base-25)}.nylas-event-info__block{display:flex;justify-content:space-between;gap:0.5rem}', _e = we;
|
|
650
|
+
var Te = function(e, t, n, o) {
|
|
651
|
+
var r = arguments.length, s = r < 3 ? t : o === null ? o = Object.getOwnPropertyDescriptor(t, n) : o, a;
|
|
620
652
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
621
|
-
|
|
653
|
+
s = Reflect.decorate(e, t, n, o);
|
|
622
654
|
else
|
|
623
655
|
for (var i = e.length - 1; i >= 0; i--)
|
|
624
|
-
(
|
|
625
|
-
return r > 3 &&
|
|
626
|
-
},
|
|
656
|
+
(a = e[i]) && (s = (r < 3 ? a(s) : r > 3 ? a(t, n, s) : a(t, n)) || s);
|
|
657
|
+
return r > 3 && s && Object.defineProperty(t, n, s), s;
|
|
658
|
+
}, A = function(e, t) {
|
|
627
659
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
628
660
|
return Reflect.metadata(e, t);
|
|
629
661
|
};
|
|
630
|
-
const
|
|
662
|
+
const j = class {
|
|
631
663
|
constructor(e) {
|
|
632
|
-
b(this, e), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.selectedLanguage = void 0;
|
|
664
|
+
b(this, e), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.selectedLanguage = void 0, this.themeConfig = void 0;
|
|
633
665
|
}
|
|
634
666
|
selectedLanguageChangedHandler(e, t) {
|
|
635
667
|
e !== t && c.changeLanguage(e);
|
|
636
668
|
}
|
|
669
|
+
themeConfigChangedHandler(e, t) {
|
|
670
|
+
e !== t && this.applyThemeConfig(e);
|
|
671
|
+
}
|
|
672
|
+
applyThemeConfig(e) {
|
|
673
|
+
if (e)
|
|
674
|
+
for (const [t, n] of Object.entries(e))
|
|
675
|
+
this.el.style.setProperty(`${t}`, n);
|
|
676
|
+
}
|
|
637
677
|
connectedCallback() {
|
|
638
678
|
d("nylas-event-info", "connectedCallback");
|
|
639
679
|
}
|
|
@@ -647,7 +687,7 @@ const U = class {
|
|
|
647
687
|
d("nylas-event-info", "disconnectedCallback");
|
|
648
688
|
}
|
|
649
689
|
render() {
|
|
650
|
-
return
|
|
690
|
+
return l(C, { key: "a62edaabd2210706d4ef9f671973a40fcbcb8d52" }, l("nylas-form-card", { key: "6bfbb55c126393559f7f00587fd7b009c0c42422", exportparts: "nfc__header: nei__header" }, l("h1", { key: "b05d0fa0528248fee82584e1ac594c68d17b1b8f", slot: "header-title", class: "nylas-event-info__title", part: "nei__title" }, c.t("nylasEventInfo.headerTitle")), l("div", { key: "5a589ed5c86d6fb4327110618af4fe320840a062", slot: "content", class: "nylas-event-info__content" }, l("slot", { key: "74c8f5de152d7efce914f8968342b84b3b4d5d35", name: "inputs" }))));
|
|
651
691
|
}
|
|
652
692
|
static get formAssociated() {
|
|
653
693
|
return !0;
|
|
@@ -657,39 +697,43 @@ const U = class {
|
|
|
657
697
|
}
|
|
658
698
|
static get watchers() {
|
|
659
699
|
return {
|
|
660
|
-
selectedLanguage: ["selectedLanguageChangedHandler"]
|
|
700
|
+
selectedLanguage: ["selectedLanguageChangedHandler"],
|
|
701
|
+
themeConfig: ["themeConfigChangedHandler"]
|
|
661
702
|
};
|
|
662
703
|
}
|
|
663
704
|
};
|
|
664
705
|
Te([
|
|
665
|
-
|
|
706
|
+
w({
|
|
666
707
|
name: "nylas-event-info",
|
|
667
|
-
stateToProps: /* @__PURE__ */ new Map([
|
|
708
|
+
stateToProps: /* @__PURE__ */ new Map([
|
|
709
|
+
["schedulerConfig.selectedLanguage", "selectedLanguage"],
|
|
710
|
+
["schedulerConfig.themeConfig", "themeConfig"]
|
|
711
|
+
]),
|
|
668
712
|
eventToProps: {},
|
|
669
713
|
fireRegisterEvent: !0
|
|
670
714
|
}),
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
],
|
|
675
|
-
|
|
676
|
-
const Ee = ':host{--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--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}', Le = Ee;
|
|
677
|
-
var Oe = function(e, t,
|
|
678
|
-
var r = arguments.length,
|
|
715
|
+
A("design:type", Function),
|
|
716
|
+
A("design:paramtypes", []),
|
|
717
|
+
A("design:returntype", void 0)
|
|
718
|
+
], j.prototype, "render", null);
|
|
719
|
+
j.style = _e;
|
|
720
|
+
const Ee = ':host{--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--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;background-color:var(--nylas-base-0);color:var(--nylas-base-900)}.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}', Le = Ee;
|
|
721
|
+
var Oe = function(e, t, n, o) {
|
|
722
|
+
var r = arguments.length, s = r < 3 ? t : o === null ? o = Object.getOwnPropertyDescriptor(t, n) : o, a;
|
|
679
723
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
680
|
-
|
|
724
|
+
s = Reflect.decorate(e, t, n, o);
|
|
681
725
|
else
|
|
682
726
|
for (var i = e.length - 1; i >= 0; i--)
|
|
683
|
-
(
|
|
684
|
-
return r > 3 &&
|
|
685
|
-
},
|
|
727
|
+
(a = e[i]) && (s = (r < 3 ? a(s) : r > 3 ? a(t, n, s) : a(t, n)) || s);
|
|
728
|
+
return r > 3 && s && Object.defineProperty(t, n, s), s;
|
|
729
|
+
}, $ = function(e, t) {
|
|
686
730
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
687
731
|
return Reflect.metadata(e, t);
|
|
688
732
|
};
|
|
689
733
|
const W = class {
|
|
690
734
|
constructor(e) {
|
|
691
735
|
var t;
|
|
692
|
-
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.name = "location", this.currentUser = void 0, this.userProvider = void 0, this.eventConferencing = void 0, this.conferenceProviders = void 0, this.selectedConfiguration = void 0, this.eventLocation = void 0, this.selectedLanguage = void 0, this.location = this.eventLocation ?? "", this.grantId = this.eventConferencing ? this.setDefaultGrantID(this.eventConferencing) : "", this.selectedLocationOption = void 0, this.userProviderState = this.userProvider ?? ((t = this.currentUser) == null ? void 0 : t.provider) ?? "", this.locationOptions = [
|
|
736
|
+
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.name = "location", this.currentUser = void 0, this.userProvider = void 0, this.eventConferencing = void 0, this.conferenceProviders = void 0, this.selectedConfiguration = void 0, this.eventLocation = void 0, this.selectedLanguage = void 0, this.themeConfig = void 0, this.location = this.eventLocation ?? "", this.grantId = this.eventConferencing ? this.setDefaultGrantID(this.eventConferencing) : "", this.selectedLocationOption = void 0, this.userProviderState = this.userProvider ?? ((t = this.currentUser) == null ? void 0 : t.provider) ?? "", this.locationOptions = [
|
|
693
737
|
{ value: "none", label: c.t("nylasEventLocation.conferenceOptions.none"), labelHTML: this.getLabelHTML("none") },
|
|
694
738
|
{ value: "custom", label: c.t("nylasEventLocation.conferenceOptions.custom"), labelHTML: this.getLabelHTML("custom") }
|
|
695
739
|
];
|
|
@@ -700,8 +744,8 @@ const W = class {
|
|
|
700
744
|
selectedConfigurationChangedHandler(e) {
|
|
701
745
|
var o, r;
|
|
702
746
|
d("nylas-custom-booking-flow", "selectedConfigurationChangedHandler", e);
|
|
703
|
-
const t = ((o = e == null ? void 0 : e.event_booking) == null ? void 0 : o.location) || this.eventLocation,
|
|
704
|
-
|
|
747
|
+
const t = ((o = e == null ? void 0 : e.event_booking) == null ? void 0 : o.location) || this.eventLocation, n = ((r = e == null ? void 0 : e.event_booking) == null ? void 0 : r.conferencing) || this.eventConferencing;
|
|
748
|
+
n != null && n.provider ? (this.selectedLocationOption = this.setDefaultLocationOption(n, t ?? ""), this.grantId = this.setDefaultGrantID(n), this.location = t || "") : t ? (this.selectedLocationOption = t ? "custom" : "none", this.location = t) : (this.selectedLocationOption = "none", this.location = "");
|
|
705
749
|
}
|
|
706
750
|
currentUserChangedHandler(e) {
|
|
707
751
|
d("nylas-custom-booking-flow", "currentUserChangedHandler", e), e != null && e.provider && (this.userProviderState = e == null ? void 0 : e.provider, this.setLocationOptionsForProvider(this.userProviderState));
|
|
@@ -713,10 +757,18 @@ const W = class {
|
|
|
713
757
|
if (e === t)
|
|
714
758
|
return;
|
|
715
759
|
c.changeLanguage(e), this.locationOptions.map((o) => o.value).forEach((o) => {
|
|
716
|
-
const r = this.locationOptions.findIndex((
|
|
760
|
+
const r = this.locationOptions.findIndex((s) => s.value === o);
|
|
717
761
|
this.locationOptions[r].label = c.t(`nylasEventLocation.conferenceOptions.${o}`), this.locationOptions[r].labelHTML = this.getLabelHTML(o);
|
|
718
762
|
}), this.locationOptions = [...this.locationOptions];
|
|
719
763
|
}
|
|
764
|
+
themeConfigChangedHandler(e, t) {
|
|
765
|
+
e !== t && this.applyThemeConfig(e);
|
|
766
|
+
}
|
|
767
|
+
applyThemeConfig(e) {
|
|
768
|
+
if (e)
|
|
769
|
+
for (const [t, n] of Object.entries(e))
|
|
770
|
+
this.host.style.setProperty(`${t}`, n);
|
|
771
|
+
}
|
|
720
772
|
connectedCallback() {
|
|
721
773
|
d("nylas-event-location", "connectedCallback");
|
|
722
774
|
}
|
|
@@ -724,23 +776,23 @@ const W = class {
|
|
|
724
776
|
d("nylas-event-location", "componentWillLoad"), this.host.setAttribute("name", this.name);
|
|
725
777
|
}
|
|
726
778
|
componentDidLoad() {
|
|
727
|
-
var t,
|
|
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 ?? ((
|
|
779
|
+
var t, n, o, r;
|
|
780
|
+
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 ?? ((n = this.currentUser) == null ? void 0 : n.provider) ?? "", this.setLocationOptionsForProvider(this.userProviderState);
|
|
729
781
|
const e = (o = this.internals) == null ? void 0 : o.form;
|
|
730
782
|
if (e) {
|
|
731
|
-
const
|
|
732
|
-
|
|
783
|
+
const s = new FormData(e);
|
|
784
|
+
s.set("conference", this.getConferencePayload()), s.set(this.name, this.location);
|
|
733
785
|
}
|
|
734
|
-
(r = this.conferenceProviders) != null && r.zoom && !this.locationOptions.some((
|
|
786
|
+
(r = this.conferenceProviders) != null && r.zoom && !this.locationOptions.some((s) => s.value === "zoom") && this.locationOptions.push({ value: "zoom", label: c.t("nylasEventLocation.conferenceOptions.zoom"), labelHTML: this.getLabelHTML("zoom") });
|
|
735
787
|
}
|
|
736
788
|
disconnectedCallback() {
|
|
737
789
|
d("nylas-event-location", "disconnectedCallback");
|
|
738
790
|
}
|
|
739
791
|
getConferencePayload() {
|
|
740
|
-
var
|
|
792
|
+
var n;
|
|
741
793
|
if (this.selectedLocationOption === "custom" || this.selectedLocationOption === "none")
|
|
742
794
|
return JSON.stringify(null);
|
|
743
|
-
const e = (
|
|
795
|
+
const e = (n = this.conferenceProviders) == null ? void 0 : n[this.selectedLocationOption], t = {
|
|
744
796
|
provider: E[this.selectedLocationOption],
|
|
745
797
|
autocreate: e ? {
|
|
746
798
|
conf_grant_id: e
|
|
@@ -749,7 +801,7 @@ const W = class {
|
|
|
749
801
|
return JSON.stringify(t);
|
|
750
802
|
}
|
|
751
803
|
nylasFormDropdownChangedHandler(e) {
|
|
752
|
-
var
|
|
804
|
+
var n, o, r;
|
|
753
805
|
this.selectedLocationOption = e.detail.value;
|
|
754
806
|
let t;
|
|
755
807
|
switch (this.selectedLocationOption) {
|
|
@@ -763,33 +815,33 @@ const W = class {
|
|
|
763
815
|
}
|
|
764
816
|
case "google": {
|
|
765
817
|
this.location = "", this.setFormValue("", this.name);
|
|
766
|
-
const
|
|
818
|
+
const s = (n = this.conferenceProviders) == null ? void 0 : n.google;
|
|
767
819
|
t = {
|
|
768
820
|
provider: E.google,
|
|
769
|
-
autocreate:
|
|
770
|
-
conf_grant_id:
|
|
821
|
+
autocreate: s ? {
|
|
822
|
+
conf_grant_id: s
|
|
771
823
|
} : {}
|
|
772
824
|
}, this.valueChanged.emit({ value: JSON.stringify(t), name: "conference" }), this.valueChanged.emit({ value: "", name: this.name });
|
|
773
825
|
break;
|
|
774
826
|
}
|
|
775
827
|
case "microsoft": {
|
|
776
828
|
this.location = "", this.setFormValue("", this.name);
|
|
777
|
-
const
|
|
829
|
+
const s = (o = this.conferenceProviders) == null ? void 0 : o.microsoft;
|
|
778
830
|
t = {
|
|
779
831
|
provider: E.microsoft,
|
|
780
|
-
autocreate:
|
|
781
|
-
conf_grant_id:
|
|
832
|
+
autocreate: s ? {
|
|
833
|
+
conf_grant_id: s
|
|
782
834
|
} : {}
|
|
783
835
|
}, this.valueChanged.emit({ value: JSON.stringify(t), name: "conference" }), this.valueChanged.emit({ value: "", name: this.name });
|
|
784
836
|
break;
|
|
785
837
|
}
|
|
786
838
|
case "zoom": {
|
|
787
839
|
this.location = "", this.setFormValue("", this.name);
|
|
788
|
-
const
|
|
840
|
+
const s = (r = this.conferenceProviders) == null ? void 0 : r.zoom;
|
|
789
841
|
t = {
|
|
790
842
|
provider: E.zoom,
|
|
791
|
-
autocreate:
|
|
792
|
-
conf_grant_id:
|
|
843
|
+
autocreate: s ? {
|
|
844
|
+
conf_grant_id: s
|
|
793
845
|
} : {}
|
|
794
846
|
}, this.valueChanged.emit({ value: JSON.stringify(t), name: "conference" }), this.valueChanged.emit({ value: "", name: this.name });
|
|
795
847
|
break;
|
|
@@ -817,37 +869,37 @@ const W = class {
|
|
|
817
869
|
typeof this.internals.setFormValue == "function" && this.internals.setFormValue(e, t);
|
|
818
870
|
}
|
|
819
871
|
handleChange(e) {
|
|
820
|
-
const t =
|
|
872
|
+
const t = R(e.target.value);
|
|
821
873
|
this.location = t, this.setFormValue(t, this.name), this.valueChanged.emit({ value: t, name: this.name });
|
|
822
874
|
}
|
|
823
875
|
getIcon(e) {
|
|
824
876
|
switch (e) {
|
|
825
877
|
case "none":
|
|
826
|
-
return
|
|
878
|
+
return l("location-off-icon", null);
|
|
827
879
|
case "custom":
|
|
828
|
-
return
|
|
880
|
+
return l("location-icon", null);
|
|
829
881
|
case "google":
|
|
830
|
-
return
|
|
882
|
+
return l("google-meet-icon", null);
|
|
831
883
|
case "microsoft":
|
|
832
|
-
return
|
|
884
|
+
return l("microsoft-teams-icon", null);
|
|
833
885
|
case "zoom":
|
|
834
|
-
return
|
|
886
|
+
return l("zoom-icon", null);
|
|
835
887
|
}
|
|
836
888
|
}
|
|
837
889
|
getLabelHTML(e) {
|
|
838
|
-
return
|
|
890
|
+
return l("span", { class: "location-label", style: {
|
|
839
891
|
display: "flex",
|
|
840
892
|
alignItems: "center",
|
|
841
893
|
gap: "16px",
|
|
842
894
|
width: "-webkit-fill-available"
|
|
843
|
-
} }, this.getIcon(e),
|
|
895
|
+
} }, this.getIcon(e), l("span", { class: "location-text", style: {
|
|
844
896
|
fontSize: "14px",
|
|
845
897
|
fontWeight: "400"
|
|
846
898
|
} }, c.t(`nylasEventLocation.conferenceOptions.${e}`)));
|
|
847
899
|
}
|
|
848
900
|
render() {
|
|
849
901
|
const e = typeof this.selectedLocationOption < "u" ? this.locationOptions.find((t) => t.value == this.selectedLocationOption) : null;
|
|
850
|
-
return
|
|
902
|
+
return l(C, { key: "40dea8ec89029dc596695a8725987a8630087938" }, l("div", { key: "dad47c8d7121d1944db1b4aaecfc3f49acb8b55d", class: "nylas-event-location", part: "nel" }, l("label", { key: "ccae6484ae7b506fab9f302463a10a3bfc85b28b", htmlFor: "location" }, c.t("nylasEventLocation.headerTitle"), l("span", { key: "15e158e30f2d7e4734b651ebc1a0499447c3cc5e", class: "label-icon" }, l("tooltip-component", { key: "2a27de9e4ce28a3de891cfa83b3fd41e3d7aa604" }, l("info-icon", { key: "9c6b96cb3923a779453e9f272221b8bed6d2a29e", slot: "tooltip-icon" }), l("span", { key: "a5447aca3cc65264f59601d6617d45ceb57aebb1", slot: "tooltip-content" }, c.t("nylasEventLocation.tooltip.desc"))))), l("div", { key: "b35c29edd2bdf321c01ffb9c34216d2200ab3b13", class: "location-input" }, l("select-dropdown", { key: "0c303b54cf2ff2f3df72b540a640fcaa5cf33784", withSearch: !1, name: "location", options: this.locationOptions, defaultSelectedOption: e, themeConfig: this.themeConfig, exportparts: "sd_dropdown: nel__dropdown, sd_dropdown-button: nel__dropdown-button, sd_dropdown-content: nel__dropdown-content" }, l("span", { key: "1174247972b83c97d09a6c9621bd049294a0aaaf", slot: "select-icon" }, this.getIcon(this.selectedLocationOption))), this.selectedLocationOption === "custom" && l("input", { type: "text", part: "nel__location", id: "location", name: "location", maxlength: "1024", value: this.location, onInput: (t) => this.handleChange(t) }))));
|
|
851
903
|
}
|
|
852
904
|
static get formAssociated() {
|
|
853
905
|
return !0;
|
|
@@ -861,44 +913,46 @@ const W = class {
|
|
|
861
913
|
selectedConfiguration: ["selectedConfigurationChangedHandler"],
|
|
862
914
|
currentUser: ["currentUserChangedHandler"],
|
|
863
915
|
conferenceProviders: ["conferenceProvidersChanged"],
|
|
864
|
-
selectedLanguage: ["selectedLanguageChangedHandler"]
|
|
916
|
+
selectedLanguage: ["selectedLanguageChangedHandler"],
|
|
917
|
+
themeConfig: ["themeConfigChangedHandler"]
|
|
865
918
|
};
|
|
866
919
|
}
|
|
867
920
|
};
|
|
868
921
|
Oe([
|
|
869
|
-
|
|
922
|
+
w({
|
|
870
923
|
name: "nylas-event-location",
|
|
871
924
|
stateToProps: /* @__PURE__ */ new Map([
|
|
872
925
|
["schedulerConfig.selectedConfiguration", "selectedConfiguration"],
|
|
873
926
|
["schedulerConfig.conferenceProviders", "conferenceProviders"],
|
|
874
927
|
["schedulerConfig.currentUser", "currentUser"],
|
|
875
|
-
["schedulerConfig.selectedLanguage", "selectedLanguage"]
|
|
928
|
+
["schedulerConfig.selectedLanguage", "selectedLanguage"],
|
|
929
|
+
["schedulerConfig.themeConfig", "themeConfig"]
|
|
876
930
|
]),
|
|
877
931
|
eventToProps: {},
|
|
878
932
|
fireRegisterEvent: !0
|
|
879
933
|
}),
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
934
|
+
$("design:type", Function),
|
|
935
|
+
$("design:paramtypes", []),
|
|
936
|
+
$("design:returntype", void 0)
|
|
883
937
|
], W.prototype, "render", null);
|
|
884
938
|
W.style = Le;
|
|
885
|
-
const Ie = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--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)}',
|
|
886
|
-
var
|
|
887
|
-
var r = arguments.length,
|
|
939
|
+
const Ie = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--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;color:var(--nylas-base-900)}.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;background-color:var(--nylas-base-0)}.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)}', Pe = Ie;
|
|
940
|
+
var Ae = function(e, t, n, o) {
|
|
941
|
+
var r = arguments.length, s = r < 3 ? t : o === null ? o = Object.getOwnPropertyDescriptor(t, n) : o, a;
|
|
888
942
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
889
|
-
|
|
943
|
+
s = Reflect.decorate(e, t, n, o);
|
|
890
944
|
else
|
|
891
945
|
for (var i = e.length - 1; i >= 0; i--)
|
|
892
|
-
(
|
|
893
|
-
return r > 3 &&
|
|
894
|
-
},
|
|
946
|
+
(a = e[i]) && (s = (r < 3 ? a(s) : r > 3 ? a(t, n, s) : a(t, n)) || s);
|
|
947
|
+
return r > 3 && s && Object.defineProperty(t, n, s), s;
|
|
948
|
+
}, D = function(e, t) {
|
|
895
949
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
896
950
|
return Reflect.metadata(e, t);
|
|
897
951
|
};
|
|
898
|
-
const
|
|
952
|
+
const U = class {
|
|
899
953
|
constructor(e) {
|
|
900
|
-
var t,
|
|
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 = (
|
|
954
|
+
var t, n;
|
|
955
|
+
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 = (n = (t = this.selectedConfiguration) == null ? void 0 : t.event_booking) == null ? void 0 : n.title, this.name = "title", this.selectedLanguage = void 0, this.noTemplates = !1, this.themeConfig = void 0, this.showTokens = !1, this.availableTokens = k.map((o) => ({
|
|
902
956
|
label: o.token,
|
|
903
957
|
value: o.value,
|
|
904
958
|
labelHTML: o
|
|
@@ -908,21 +962,21 @@ const j = class {
|
|
|
908
962
|
d("[nylas-event-title]", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
909
963
|
}
|
|
910
964
|
ariaActivedescendantChangedHandler(e) {
|
|
911
|
-
var t,
|
|
965
|
+
var t, n;
|
|
912
966
|
if (d("[nylas-event-title]", "ariaActivedescendantChangedHandler", e), e !== "") {
|
|
913
967
|
const o = (t = this.host.shadowRoot) == null ? void 0 : t.getElementById(e);
|
|
914
968
|
o == null || o.classList.add("active");
|
|
915
969
|
} else {
|
|
916
|
-
const o = (
|
|
970
|
+
const o = (n = this.host.shadowRoot) == null ? void 0 : n.querySelectorAll(".token-options li.active");
|
|
917
971
|
o == null || o.forEach((r) => r.classList.remove("active"));
|
|
918
972
|
}
|
|
919
973
|
}
|
|
920
974
|
configChangedHandler(e) {
|
|
921
|
-
var
|
|
922
|
-
const t = (
|
|
975
|
+
var s, a;
|
|
976
|
+
const t = (s = e == null ? void 0 : e.event_booking) == null ? void 0 : s.title, n = ((a = e == null ? void 0 : e.scheduler) == null ? void 0 : a.additional_fields) || {}, r = (Object.keys(n) || []).map((i) => ({
|
|
923
977
|
token: `$${i}`,
|
|
924
978
|
value: `\${${i}}`,
|
|
925
|
-
description:
|
|
979
|
+
description: n[i].label || ""
|
|
926
980
|
}));
|
|
927
981
|
this.additionalFieldTokens = [...r], this.availableTokens = [...k, ...r].map((i) => ({
|
|
928
982
|
label: i.token,
|
|
@@ -934,12 +988,20 @@ const j = class {
|
|
|
934
988
|
if (e === t)
|
|
935
989
|
return;
|
|
936
990
|
c.changeLanguage(e);
|
|
937
|
-
const
|
|
991
|
+
const n = {
|
|
938
992
|
$invitee: "invitee",
|
|
939
993
|
$invitee_email: "inviteeEmail",
|
|
940
994
|
$duration: "duration"
|
|
941
995
|
};
|
|
942
|
-
this.availableTokens = this.availableTokens.map((o) => (
|
|
996
|
+
this.availableTokens = this.availableTokens.map((o) => (n[o.label] && (o.labelHTML.description = c.t(`nylasEventTitle.eventTitleTokenDescription.${n[o.label]}`)), o)), this.filteredTokens = [...this.availableTokens];
|
|
997
|
+
}
|
|
998
|
+
themeConfigChangedHandler(e, t) {
|
|
999
|
+
e !== t && this.applyThemeConfig(e);
|
|
1000
|
+
}
|
|
1001
|
+
applyThemeConfig(e) {
|
|
1002
|
+
if (e)
|
|
1003
|
+
for (const [t, n] of Object.entries(e))
|
|
1004
|
+
this.host.style.setProperty(`${t}`, n);
|
|
943
1005
|
}
|
|
944
1006
|
connectedCallback() {
|
|
945
1007
|
d("[nylas-event-title]", "connectedCallback");
|
|
@@ -948,50 +1010,50 @@ const j = class {
|
|
|
948
1010
|
d("[nylas-event-title]", "componentWillLoad"), this.host.setAttribute("name", this.name);
|
|
949
1011
|
}
|
|
950
1012
|
componentDidLoad() {
|
|
951
|
-
var t,
|
|
1013
|
+
var t, n, o, r;
|
|
952
1014
|
d("[nylas-event-title]", "componentDidLoad");
|
|
953
1015
|
let e = this.eventTitle || this.configEventTitle;
|
|
954
|
-
(
|
|
1016
|
+
(n = (t = this.selectedConfiguration) == null ? void 0 : t.event_booking) != null && n.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));
|
|
955
1017
|
}
|
|
956
1018
|
disconnectedCallback() {
|
|
957
1019
|
d("[nylas-event-title]", "disconnectedCallback");
|
|
958
1020
|
}
|
|
959
1021
|
formSubmittedHandler(e) {
|
|
960
|
-
var t,
|
|
961
|
-
d("[nylas-event-title]", "formSubmittedHandler", e), (
|
|
1022
|
+
var t, n;
|
|
1023
|
+
d("[nylas-event-title]", "formSubmittedHandler", e), (n = (t = this.internals) == null ? void 0 : t.validity) != null && n.valid ? this.validationError = "" : this.validationError = "eventTitleRequired";
|
|
962
1024
|
}
|
|
963
1025
|
valueChangedHandler(e) {
|
|
964
|
-
const { name: t, value:
|
|
1026
|
+
const { name: t, value: n } = e.detail;
|
|
965
1027
|
if (t === "additional-fields") {
|
|
966
|
-
const o = JSON.parse(
|
|
967
|
-
token: `$${
|
|
968
|
-
value: `\${${
|
|
969
|
-
description: o[
|
|
1028
|
+
const o = JSON.parse(n.toString()), s = (Object.keys(o) || []).map((a) => ({
|
|
1029
|
+
token: `$${a}`,
|
|
1030
|
+
value: `\${${a}}`,
|
|
1031
|
+
description: o[a].label || ""
|
|
970
1032
|
}));
|
|
971
|
-
this.additionalFieldTokens = [...
|
|
972
|
-
label:
|
|
973
|
-
value:
|
|
974
|
-
labelHTML:
|
|
1033
|
+
this.additionalFieldTokens = [...s], this.availableTokens = [...k, ...s].map((a) => ({
|
|
1034
|
+
label: a.token,
|
|
1035
|
+
value: a.value,
|
|
1036
|
+
labelHTML: a
|
|
975
1037
|
})), this.filteredTokens = [...this.availableTokens];
|
|
976
1038
|
}
|
|
977
1039
|
}
|
|
978
1040
|
updateEventTitleFromProp(e) {
|
|
979
|
-
var
|
|
1041
|
+
var n, o, r;
|
|
980
1042
|
d("[nylas-event-title]", "eventTitleChangedHandler", e);
|
|
981
1043
|
const t = e || this.configEventTitle;
|
|
982
|
-
this.titleRef && (this.titleRef.innerHTML = this.highlightTokens(t), typeof this.internals.setValidity == "function" && (!t || t === "" ? (this.titleRef.focus(), (
|
|
1044
|
+
this.titleRef && (this.titleRef.innerHTML = this.highlightTokens(t), typeof this.internals.setValidity == "function" && (!t || t === "" ? (this.titleRef.focus(), (n = this.internals) == null || n.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)))));
|
|
983
1045
|
}
|
|
984
1046
|
highlightTokens(e) {
|
|
985
1047
|
let t = e;
|
|
986
|
-
return [...k, ...this.additionalFieldTokens].forEach((
|
|
987
|
-
const o =
|
|
1048
|
+
return [...k, ...this.additionalFieldTokens].forEach((n) => {
|
|
1049
|
+
const o = n.value, r = new RegExp(`(\\${o})(?!\\w)`, "g");
|
|
988
1050
|
t = (t == null ? void 0 : t.replace(r, '<span class="highlighted-tag">$1</span>')) || "";
|
|
989
1051
|
}), t;
|
|
990
1052
|
}
|
|
991
1053
|
getCurrentSelectionForBrowser() {
|
|
992
|
-
var o, r,
|
|
993
|
-
const e = (
|
|
994
|
-
const h =
|
|
1054
|
+
var o, r, s;
|
|
1055
|
+
const e = (a, i, f, p) => {
|
|
1056
|
+
const h = a.replace(/[\u200B-\u200D\uFEFF]/g, ""), y = h.lastIndexOf("$"), u = h.substring(y).split(" ")[0];
|
|
995
1057
|
return {
|
|
996
1058
|
focusOffset: i,
|
|
997
1059
|
dollarIndex: y,
|
|
@@ -1000,21 +1062,21 @@ const j = class {
|
|
|
1000
1062
|
node: f,
|
|
1001
1063
|
allSelected: p
|
|
1002
1064
|
};
|
|
1003
|
-
}, t = (
|
|
1065
|
+
}, t = (a) => {
|
|
1004
1066
|
var i, f;
|
|
1005
|
-
return
|
|
1067
|
+
return a.anchorOffset === 0 && a.focusOffset === ((f = (i = a.focusNode) == null ? void 0 : i.nodeValue) == null ? void 0 : f.length);
|
|
1006
1068
|
};
|
|
1007
1069
|
switch (M()) {
|
|
1008
1070
|
case "Chrome": {
|
|
1009
|
-
const
|
|
1010
|
-
return e(f, (
|
|
1071
|
+
const a = (o = this.host.shadowRoot) == null ? void 0 : o.getSelection(), i = a == null ? void 0 : a.focusNode, f = (i == null ? void 0 : i.nodeValue) || "", p = a && t(a);
|
|
1072
|
+
return e(f, (a == null ? void 0 : a.focusOffset) || -1, i, p);
|
|
1011
1073
|
}
|
|
1012
1074
|
case "Firefox": {
|
|
1013
|
-
const
|
|
1014
|
-
return e(i, (
|
|
1075
|
+
const a = document.getSelection(), i = ((r = a == null ? void 0 : a.anchorNode) == null ? void 0 : r.nodeValue) || "", f = a && t(a);
|
|
1076
|
+
return e(i, (a == null ? void 0 : a.focusOffset) || -1, a == null ? void 0 : a.anchorNode, f);
|
|
1015
1077
|
}
|
|
1016
1078
|
case "Safari": {
|
|
1017
|
-
const
|
|
1079
|
+
const a = window.getSelection(), i = a == null ? void 0 : a.getComposedRanges(this.host.shadowRoot)[0], f = ((s = i == null ? void 0 : i.startContainer) == null ? void 0 : s.nodeValue) || "", p = a && t(a);
|
|
1018
1080
|
return e(f, (i == null ? void 0 : i.endOffset) || -1, i == null ? void 0 : i.startContainer, p);
|
|
1019
1081
|
}
|
|
1020
1082
|
default:
|
|
@@ -1023,30 +1085,30 @@ const j = class {
|
|
|
1023
1085
|
}
|
|
1024
1086
|
handleChange(e) {
|
|
1025
1087
|
let t = e.target.textContent || "";
|
|
1026
|
-
t =
|
|
1027
|
-
const
|
|
1028
|
-
if (!
|
|
1088
|
+
t = R(t);
|
|
1089
|
+
const n = this.getCurrentSelectionForBrowser();
|
|
1090
|
+
if (!n) {
|
|
1029
1091
|
this.updateEventTitle(t), this.resetDropdown();
|
|
1030
1092
|
return;
|
|
1031
1093
|
}
|
|
1032
|
-
const { focusOffset: o, dollarIndex: r, lastWord:
|
|
1094
|
+
const { focusOffset: o, dollarIndex: r, lastWord: s, currentText: a } = n;
|
|
1033
1095
|
if (r === -1 || o < r) {
|
|
1034
1096
|
this.updateEventTitle(t), this.resetDropdown();
|
|
1035
1097
|
return;
|
|
1036
1098
|
}
|
|
1037
|
-
|
|
1038
|
-
$value:
|
|
1039
|
-
fullText:
|
|
1099
|
+
s.startsWith("$") ? (this.showTokens = !0, this.currentWord = {
|
|
1100
|
+
$value: s,
|
|
1101
|
+
fullText: a,
|
|
1040
1102
|
index: r,
|
|
1041
1103
|
focusOffset: o
|
|
1042
|
-
}, this.populateSuggestionsDropdown(
|
|
1104
|
+
}, this.populateSuggestionsDropdown(s)) : this.resetDropdown(), this.updateEventTitle(t);
|
|
1043
1105
|
}
|
|
1044
1106
|
handleInputKeyDown(e) {
|
|
1045
|
-
var
|
|
1107
|
+
var n, o, r, s, a;
|
|
1046
1108
|
const t = this.getCurrentSelectionForBrowser();
|
|
1047
|
-
if (t != null && t.allSelected && !
|
|
1109
|
+
if (t != null && t.allSelected && !S(e) && (this.titleRef.innerHTML = ""), e.key === "Enter") {
|
|
1048
1110
|
e.preventDefault();
|
|
1049
|
-
const i = (
|
|
1111
|
+
const i = (n = this.host.shadowRoot) == null ? void 0 : n.getElementById(this.ariaActivedescendant);
|
|
1050
1112
|
i && (i.click(), this.ariaActivedescendant = "");
|
|
1051
1113
|
} else if (e.key === "ArrowDown") {
|
|
1052
1114
|
e.preventDefault();
|
|
@@ -1067,35 +1129,35 @@ const j = class {
|
|
|
1067
1129
|
} else if (e.key === "Escape")
|
|
1068
1130
|
e.preventDefault(), this.resetDropdown();
|
|
1069
1131
|
else if (e.key === "Backspace" || e.key === "Delete") {
|
|
1070
|
-
const i = (
|
|
1071
|
-
t != null && t.currentText.startsWith("${") && i && i.nodeName === "SPAN" && (e.preventDefault(), i.removeChild(t.node), i.remove(), this.resetDropdown(), this.updateEventTitle(((
|
|
1132
|
+
const i = (s = t == null ? void 0 : t.node) == null ? void 0 : s.parentNode;
|
|
1133
|
+
t != null && t.currentText.startsWith("${") && i && i.nodeName === "SPAN" && (e.preventDefault(), i.removeChild(t.node), i.remove(), this.resetDropdown(), this.updateEventTitle(((a = this.titleRef) == null ? void 0 : a.textContent) || "")), (this.titleRef.textContent === "" || t != null && t.allSelected) && (this.titleRef.innerHTML = "", this.updateEventTitle(""));
|
|
1072
1134
|
}
|
|
1073
1135
|
}
|
|
1074
1136
|
selectOption(e, t) {
|
|
1075
1137
|
var T;
|
|
1076
1138
|
e.preventDefault();
|
|
1077
|
-
const
|
|
1078
|
-
let r = this.titleRef.firstChild,
|
|
1139
|
+
const n = this.currentWord.fullText, o = this.currentWord.$value;
|
|
1140
|
+
let r = this.titleRef.firstChild, s = null;
|
|
1079
1141
|
for (; r; ) {
|
|
1080
1142
|
if (r.nodeType === 3) {
|
|
1081
|
-
const v = ((T = r.textContent) == null ? void 0 : T.replace(/[\u200B-\u200D\uFEFF]/g, "")) || "", L =
|
|
1143
|
+
const v = ((T = r.textContent) == null ? void 0 : T.replace(/[\u200B-\u200D\uFEFF]/g, "")) || "", L = n.replace(/[\u200B-\u200D\uFEFF]/g, "");
|
|
1082
1144
|
if (v.includes(L)) {
|
|
1083
|
-
|
|
1145
|
+
s = r;
|
|
1084
1146
|
break;
|
|
1085
1147
|
}
|
|
1086
1148
|
}
|
|
1087
1149
|
r = r.nextSibling;
|
|
1088
1150
|
}
|
|
1089
|
-
if (!
|
|
1151
|
+
if (!s)
|
|
1090
1152
|
return;
|
|
1091
|
-
const
|
|
1153
|
+
const a = s.textContent || "", i = a.indexOf(o), f = a.substring(0, i), p = a.substring(i + o.length), h = document.createTextNode(f), y = document.createRange(), u = document.createElement("span");
|
|
1092
1154
|
u.classList.add("highlighted-tag"), u.textContent = `${t.value}`;
|
|
1093
1155
|
const _ = document.createTextNode(p);
|
|
1094
1156
|
if (p !== "")
|
|
1095
|
-
|
|
1157
|
+
s.replaceWith(h, u, _), y.setStart(_, 1);
|
|
1096
1158
|
else {
|
|
1097
1159
|
const v = document.createTextNode("");
|
|
1098
|
-
|
|
1160
|
+
s.replaceWith(h, u, v), y.setStart(v, 1);
|
|
1099
1161
|
}
|
|
1100
1162
|
this.resetDropdown(), this.titleRef.focus();
|
|
1101
1163
|
const g = window.getSelection();
|
|
@@ -1108,22 +1170,22 @@ const j = class {
|
|
|
1108
1170
|
return typeof this.internals < "u" && typeof this.internals.setValidity == "function" && typeof this.internals.setFormValue == "function";
|
|
1109
1171
|
}
|
|
1110
1172
|
updateEventTitle(e, t = !1) {
|
|
1111
|
-
var o, r,
|
|
1112
|
-
const
|
|
1113
|
-
|
|
1173
|
+
var o, r, s;
|
|
1174
|
+
const n = e.replace(/ +/g, " ");
|
|
1175
|
+
n === "" || /^[\s]*$/.test(n) ? (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 && ((s = this.internals) == null || s.setFormValue(n, this.name)), t || this.valueChanged.emit({ value: n, name: this.name });
|
|
1114
1176
|
}
|
|
1115
1177
|
resetDropdown() {
|
|
1116
1178
|
this.showTokens = !1, this.ariaActivedescendant = "";
|
|
1117
1179
|
}
|
|
1118
1180
|
getLabelHTML(e) {
|
|
1119
|
-
return
|
|
1181
|
+
return l("div", { class: "token-label" }, l("span", { class: "token" }, e.token), l("span", { class: "description" }, e.description));
|
|
1120
1182
|
}
|
|
1121
1183
|
render() {
|
|
1122
1184
|
var e;
|
|
1123
|
-
return
|
|
1185
|
+
return l(C, { key: "c6da12f405f1743fad3fcdebc253943e82849e1a" }, l("div", { key: "d66fa4c93ba12409991bc981ec6e7171113872f4", class: "nylas-event-title", part: "net" }, l("label", { key: "3c77424914867eaae8e71e5d3c13f459074b8256", htmlFor: "title" }, c.t("nylasEventTitle.headerTitle"), l("span", { key: "09f56d087b243ee8832331d9bc3c83073e1d9adb", class: "required" }, "*")), l("div", { key: "ec015f8e45422cb8f6593d7bab2db7e34caf69da", class: {
|
|
1124
1186
|
title: !0,
|
|
1125
1187
|
error: this.validationError !== ""
|
|
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 &&
|
|
1188
|
+
}, 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 && l("div", { class: "token-options", part: "net__dropdown-content" }, l("ul", { tabindex: "-1", role: "listbox", "aria-label": this.name, "aria-activedescendant": this.ariaActivedescendant }, this.filteredTokens.map((t) => l("li", { tabindex: "0", key: t.label, id: t.label, class: { active: this.ariaActivedescendant === t.label }, onClick: (n) => this.selectOption(n, t), role: "option" }, this.getLabelHTML(t.labelHTML))))), !this.noTemplates && l("span", { class: "help-text" }, c.t("nylasEventTitle.helpText", { context: "start", field: c.t("nylasEventTitle.title") }), " ", l("code", null, "$"), " ", c.t("nylasEventTitle.helpText", { context: "end" }), l("span", { class: "label-icon" }, l("tooltip-component", null, l("info-icon", { slot: "tooltip-icon" }), l("span", { slot: "tooltip-content" }, c.t("nylasEventTitle.tooltip.desc"), " ", l("code", null, "${invitee}"))))), this.validationError != "" && l("span", { class: "error-message" }, c.t(`nylasEventTitle.${this.validationError}`))));
|
|
1127
1189
|
}
|
|
1128
1190
|
static get formAssociated() {
|
|
1129
1191
|
return !0;
|
|
@@ -1136,39 +1198,41 @@ const j = class {
|
|
|
1136
1198
|
name: ["elementNameChangedHandler"],
|
|
1137
1199
|
ariaActivedescendant: ["ariaActivedescendantChangedHandler"],
|
|
1138
1200
|
selectedConfiguration: ["configChangedHandler"],
|
|
1139
|
-
selectedLanguage: ["selectedLanguageChangedHandler"]
|
|
1201
|
+
selectedLanguage: ["selectedLanguageChangedHandler"],
|
|
1202
|
+
themeConfig: ["themeConfigChangedHandler"]
|
|
1140
1203
|
};
|
|
1141
1204
|
}
|
|
1142
1205
|
};
|
|
1143
|
-
|
|
1144
|
-
|
|
1206
|
+
Ae([
|
|
1207
|
+
w({
|
|
1145
1208
|
name: "nylas-event-title",
|
|
1146
1209
|
stateToProps: /* @__PURE__ */ new Map([
|
|
1147
1210
|
["schedulerConfig.selectedConfiguration", "selectedConfiguration"],
|
|
1148
|
-
["schedulerConfig.selectedLanguage", "selectedLanguage"]
|
|
1211
|
+
["schedulerConfig.selectedLanguage", "selectedLanguage"],
|
|
1212
|
+
["schedulerConfig.themeConfig", "themeConfig"]
|
|
1149
1213
|
]),
|
|
1150
1214
|
eventToProps: {},
|
|
1151
1215
|
fireRegisterEvent: !0
|
|
1152
1216
|
}),
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
],
|
|
1157
|
-
|
|
1158
|
-
const
|
|
1159
|
-
var
|
|
1160
|
-
var r = arguments.length,
|
|
1217
|
+
D("design:type", Function),
|
|
1218
|
+
D("design:paramtypes", []),
|
|
1219
|
+
D("design:returntype", void 0)
|
|
1220
|
+
], U.prototype, "render", null);
|
|
1221
|
+
U.style = Pe;
|
|
1222
|
+
const $e = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--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)}', De = $e;
|
|
1223
|
+
var Fe = function(e, t, n, o) {
|
|
1224
|
+
var r = arguments.length, s = r < 3 ? t : o === null ? o = Object.getOwnPropertyDescriptor(t, n) : o, a;
|
|
1161
1225
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
1162
|
-
|
|
1226
|
+
s = Reflect.decorate(e, t, n, o);
|
|
1163
1227
|
else
|
|
1164
1228
|
for (var i = e.length - 1; i >= 0; i--)
|
|
1165
|
-
(
|
|
1166
|
-
return r > 3 &&
|
|
1167
|
-
},
|
|
1229
|
+
(a = e[i]) && (s = (r < 3 ? a(s) : r > 3 ? a(t, n, s) : a(t, n)) || s);
|
|
1230
|
+
return r > 3 && s && Object.defineProperty(t, n, s), s;
|
|
1231
|
+
}, F = function(e, t) {
|
|
1168
1232
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
1169
1233
|
return Reflect.metadata(e, t);
|
|
1170
1234
|
};
|
|
1171
|
-
const
|
|
1235
|
+
const K = class {
|
|
1172
1236
|
constructor(e) {
|
|
1173
1237
|
b(this, e), this.feedbackModalClosed = m(this, "feedbackModalClosed", 7), this.feedbackSubmitted = m(this, "feedbackSubmitted", 7), this.triggerValidation = m(this, "triggerValidation", 7), this.handleConfirmBookingButtonClicked = () => {
|
|
1174
1238
|
this.triggerValidation.emit().defaultPrevented || this.feedbackSubmitted.emit({ feedback: this.feedbackMessage });
|
|
@@ -1186,8 +1250,8 @@ const Z = class {
|
|
|
1186
1250
|
}
|
|
1187
1251
|
applyThemeConfig(e) {
|
|
1188
1252
|
if (e)
|
|
1189
|
-
for (const [t,
|
|
1190
|
-
this.host.style.setProperty(`${t}`,
|
|
1253
|
+
for (const [t, n] of Object.entries(e))
|
|
1254
|
+
this.host.style.setProperty(`${t}`, n);
|
|
1191
1255
|
}
|
|
1192
1256
|
handleFormInputChanged(e) {
|
|
1193
1257
|
d("[nylas-feedback-form] Form input changed"), e.detail.value && (this.triggerValidation.emit(), e.detail.name === "feedback" && (this.feedbackMessage = e.detail.value));
|
|
@@ -1196,16 +1260,16 @@ const Z = class {
|
|
|
1196
1260
|
e.preventDefault(), e.stopImmediatePropagation(), this.feedbackModalClosed.emit();
|
|
1197
1261
|
}
|
|
1198
1262
|
render() {
|
|
1199
|
-
return
|
|
1263
|
+
return l(C, { key: "3dfba1b006f09a9ac9ccdd03a659784b86df25d4", part: "nfbf" }, l("div", { key: "f548f82b9689115b254815c0a6b940d1450ada04", class: "card-wrapper", part: "nfbfc__card" }, l("div", { key: "3e1be6b2ff7d6818b677f09772cde78edb4c7ef1", class: "close-button" }, l("button-component", { key: "dd98523ad84cc745f24daa400bb41753d103c3c6", tooltip: "Close", id: "close", variant: "invisible", onClick: (e) => this.closeModal(e), part: "nfbf__close-button" }, l("close-icon", { key: "0b919c2be114e231ff8eb7121536b6c24dfb7158" }))), l("div", { key: "2c62e429a6871d1dc6a34df4fc37440e61e9e041", class: "header" }, l("h2", { key: "8c1009dc5a853bb0cbc21b64958353c95a0ca140", slot: "card-title", part: "nfbf__title" }, c.t("feedbackFormTitle"))), l("div", { key: "b16e5a7c0e3b299d6ee9a74d154aa3628e9d4d25", class: "description title-desc" }, l("p", { key: "00675ebd52e88ed101df5710b3bded1f6424c274" }, c.t("feedbackFormDescription"))), l("textarea-component", { key: "7b021701b44eb5b3ba02ee3191d3866489f4ec8a", label: c.t("feedbackMessageLabel"), required: !0, maxLength: 500, part: "nfbf__description", name: "feedback", placeholder: c.t("feedbackMessagePlaceholder") }), l("div", { key: "def91af529f167b1fac0cc078f79cec67b961a1a", class: "description footer-desc" }, l("p", { key: "ad346ef93ae4a25fd5478284ff5415eb62b54f26" }, "By sending this report, you agree to Nylas’ access to the data necessary to respond to this issue, subject to Nylas’", " ", l("a", { key: "cd6a79cf548346d92d04264c4ff7244a032c3977", href: "https://www.nylas.com/privacy-policy/", target: "_blank", rel: "nofollow noreferrer noopener" }, "Privacy Policy"), ".")), l("div", { key: "5dfee1045b6711f5cf7d15009c86c0fd9b76b137", class: {
|
|
1200
1264
|
footer: !0
|
|
1201
|
-
} },
|
|
1265
|
+
} }, l("button-component", { key: "45894bd04b89365c83d7e2a07e8a62ee7c94b6c0", variant: "invisible", onClick: (e) => this.closeModal(e), part: "nfbf__button-outline nfbf__cancel-cta" }, `${c.t("feedbackModalCloseButton")}`), l("button-component", { key: "ac586974014c3e3b6b454a8b830585b76bc1f290", variant: "primary", onClick: this.handleConfirmBookingButtonClicked, part: "nfbf__button-outline nfbf__reschedule-cta" }, `${c.t("feedbackModalSubmitButton")}`))));
|
|
1202
1266
|
}
|
|
1203
1267
|
get host() {
|
|
1204
1268
|
return x(this);
|
|
1205
1269
|
}
|
|
1206
1270
|
};
|
|
1207
|
-
|
|
1208
|
-
|
|
1271
|
+
Fe([
|
|
1272
|
+
w({
|
|
1209
1273
|
name: "nylas-feedback-form",
|
|
1210
1274
|
stateToProps: /* @__PURE__ */ new Map([]),
|
|
1211
1275
|
eventToProps: {
|
|
@@ -1215,27 +1279,27 @@ $e([
|
|
|
1215
1279
|
localPropsToProp: /* @__PURE__ */ new Map([["themeConfig", "themeConfig"]]),
|
|
1216
1280
|
fireRegisterEvent: !0
|
|
1217
1281
|
}),
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
],
|
|
1222
|
-
|
|
1223
|
-
const
|
|
1224
|
-
var
|
|
1225
|
-
var r = arguments.length,
|
|
1282
|
+
F("design:type", Function),
|
|
1283
|
+
F("design:paramtypes", []),
|
|
1284
|
+
F("design:returntype", void 0)
|
|
1285
|
+
], K.prototype, "render", null);
|
|
1286
|
+
K.style = De;
|
|
1287
|
+
const He = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--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)}', Re = He;
|
|
1288
|
+
var Se = function(e, t, n, o) {
|
|
1289
|
+
var r = arguments.length, s = r < 3 ? t : o === null ? o = Object.getOwnPropertyDescriptor(t, n) : o, a;
|
|
1226
1290
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
1227
|
-
|
|
1291
|
+
s = Reflect.decorate(e, t, n, o);
|
|
1228
1292
|
else
|
|
1229
1293
|
for (var i = e.length - 1; i >= 0; i--)
|
|
1230
|
-
(
|
|
1231
|
-
return r > 3 &&
|
|
1232
|
-
},
|
|
1294
|
+
(a = e[i]) && (s = (r < 3 ? a(s) : r > 3 ? a(t, n, s) : a(t, n)) || s);
|
|
1295
|
+
return r > 3 && s && Object.defineProperty(t, n, s), s;
|
|
1296
|
+
}, H = function(e, t) {
|
|
1233
1297
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
1234
1298
|
return Reflect.metadata(e, t);
|
|
1235
1299
|
};
|
|
1236
|
-
const
|
|
1300
|
+
const Z = class {
|
|
1237
1301
|
constructor(e) {
|
|
1238
|
-
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.name = "reminder-time", this.eventReminderTimeMinutes = void 0, this.selectedLanguage = void 0, this.selectedNumber = void 0, this.selectedPeriod = void 0, this.errorState = !1;
|
|
1302
|
+
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.name = "reminder-time", this.eventReminderTimeMinutes = void 0, this.selectedLanguage = void 0, this.themeConfig = void 0, this.selectedNumber = void 0, this.selectedPeriod = void 0, this.errorState = !1;
|
|
1239
1303
|
}
|
|
1240
1304
|
elementNameChangedHandler(e) {
|
|
1241
1305
|
d("nylas-reminder-time", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
@@ -1246,6 +1310,9 @@ const K = class {
|
|
|
1246
1310
|
selectedLanguageChangedHandler(e, t) {
|
|
1247
1311
|
e !== t && c.changeLanguage(e);
|
|
1248
1312
|
}
|
|
1313
|
+
themeConfigChangedHandler(e, t) {
|
|
1314
|
+
e !== t && this.applyThemeConfig(e);
|
|
1315
|
+
}
|
|
1249
1316
|
connectedCallback() {
|
|
1250
1317
|
d("nylas-reminder-time", "connectedCallback");
|
|
1251
1318
|
}
|
|
@@ -1258,6 +1325,11 @@ const K = class {
|
|
|
1258
1325
|
disconnectedCallback() {
|
|
1259
1326
|
d("nylas-reminder-time", "disconnectedCallback");
|
|
1260
1327
|
}
|
|
1328
|
+
applyThemeConfig(e) {
|
|
1329
|
+
if (e)
|
|
1330
|
+
for (const [t, n] of Object.entries(e))
|
|
1331
|
+
this.host.style.setProperty(`${t}`, n);
|
|
1332
|
+
}
|
|
1261
1333
|
nylasSuggestReminderMinutesHandler(e) {
|
|
1262
1334
|
const { minutes: t } = e.detail;
|
|
1263
1335
|
this.errorState = !1, this.valueChanged.emit({ value: t.toString(), name: this.name }), this.isInternalsAvailable && this.internals.setFormValue(t.toString(), this.name), this.updateNumberAndPeriodFromMinutes(t + 7), setTimeout(() => {
|
|
@@ -1265,25 +1337,25 @@ const K = class {
|
|
|
1265
1337
|
}, 10);
|
|
1266
1338
|
}
|
|
1267
1339
|
timePeriodChangedHandler(e) {
|
|
1268
|
-
const { number: t, period:
|
|
1340
|
+
const { number: t, period: n } = e.detail;
|
|
1269
1341
|
let o;
|
|
1270
|
-
const r = 60,
|
|
1271
|
-
|
|
1342
|
+
const r = 60, s = r * 24, a = s * 7, i = s * 30;
|
|
1343
|
+
n === "minute" ? o = t : n === "hour" ? o = t * r : n === "day" ? o = t * s : n === "week" ? o = t * a : n === "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);
|
|
1272
1344
|
}
|
|
1273
1345
|
updateNumberAndPeriodFromMinutes(e) {
|
|
1274
|
-
let
|
|
1275
|
-
e === 0 ? (
|
|
1346
|
+
let s, a;
|
|
1347
|
+
e === 0 ? (s = 0, a = "minute") : e >= 43200 && e % 43200 === 0 ? (s = Math.floor(e / 43200), a = "month") : e >= 10080 && e % 10080 === 0 ? (s = Math.floor(e / 10080), a = "week") : e >= 1440 && e % 1440 === 0 ? (s = Math.floor(e / 1440), a = "day") : e >= 60 && e % 60 === 0 ? (s = Math.floor(e / 60), a = "hour") : (s = e, a = "minute"), this.selectedNumber = s, this.selectedPeriod = a;
|
|
1276
1348
|
}
|
|
1277
1349
|
get isInternalsAvailable() {
|
|
1278
1350
|
return this.internals !== void 0 && typeof this.internals.setFormValue == "function" && typeof this.internals.setValidity == "function";
|
|
1279
1351
|
}
|
|
1280
1352
|
render() {
|
|
1281
1353
|
const e = typeof this.selectedNumber == "number" && typeof this.selectedPeriod == "string";
|
|
1282
|
-
return
|
|
1354
|
+
return l(C, { key: "8496d67f55d981e506f577ad20197af8438bd408" }, l("div", { key: "d92c02476f1db6fe56d3045884dd381ed899af8c", class: "nylas-reminder-time", part: "nrt" }, l("div", { key: "79b615876498bcf00f51eaf22779fb54b4c398dc", class: "nylas-reminder-time__wrapper" }, e && l("time-period-selector", { id: "limit-future-bookings", part: "nrt__time-period-selector", hasError: this.errorState, timePeriods: [
|
|
1283
1355
|
{ value: "minute", label: c.t("timeDuration", { context: "minute" }) },
|
|
1284
1356
|
{ value: "hour", label: c.t("timeDuration", { context: "hour" }) },
|
|
1285
1357
|
{ value: "day", label: c.t("timePeriod", { context: "day" }) }
|
|
1286
|
-
], exportparts: "tps__number-dropdown: nrt__number-dropdown, tps__number-dropdown-button: nrt__number-dropdown-button, tps__number-dropdown-content: nrt__number-dropdown-content, tps__period-dropdown: nrt__period-dropdown, tps__period-dropdown-button: nrt__period-dropdown-button, tps__period-dropdown-content: nrt__period-dropdown-content", defaultSelectedNumber: this.selectedNumber, defaultSelectedPeriod: this.selectedPeriod }))));
|
|
1358
|
+
], exportparts: "tps__number-dropdown: nrt__number-dropdown, tps__number-dropdown-button: nrt__number-dropdown-button, tps__number-dropdown-content: nrt__number-dropdown-content, tps__period-dropdown: nrt__period-dropdown, tps__period-dropdown-button: nrt__period-dropdown-button, tps__period-dropdown-content: nrt__period-dropdown-content", defaultSelectedNumber: this.selectedNumber, defaultSelectedPeriod: this.selectedPeriod, themeConfig: this.themeConfig }))));
|
|
1287
1359
|
}
|
|
1288
1360
|
static get formAssociated() {
|
|
1289
1361
|
return !0;
|
|
@@ -1295,28 +1367,32 @@ const K = class {
|
|
|
1295
1367
|
return {
|
|
1296
1368
|
name: ["elementNameChangedHandler"],
|
|
1297
1369
|
eventReminderTimeMinutes: ["eventReminderTimeMinutesChangedHandler"],
|
|
1298
|
-
selectedLanguage: ["selectedLanguageChangedHandler"]
|
|
1370
|
+
selectedLanguage: ["selectedLanguageChangedHandler"],
|
|
1371
|
+
themeConfig: ["themeConfigChangedHandler"]
|
|
1299
1372
|
};
|
|
1300
1373
|
}
|
|
1301
1374
|
};
|
|
1302
|
-
|
|
1303
|
-
|
|
1375
|
+
Se([
|
|
1376
|
+
w({
|
|
1304
1377
|
name: "nylas-reminder-time",
|
|
1305
|
-
stateToProps: /* @__PURE__ */ new Map([
|
|
1378
|
+
stateToProps: /* @__PURE__ */ new Map([
|
|
1379
|
+
["schedulerConfig.selectedLanguage", "selectedLanguage"],
|
|
1380
|
+
["schedulerConfig.themeConfig", "themeConfig"]
|
|
1381
|
+
]),
|
|
1306
1382
|
eventToProps: {},
|
|
1307
1383
|
fireRegisterEvent: !0
|
|
1308
1384
|
}),
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
],
|
|
1313
|
-
|
|
1385
|
+
H("design:type", Function),
|
|
1386
|
+
H("design:paramtypes", []),
|
|
1387
|
+
H("design:returntype", void 0)
|
|
1388
|
+
], Z.prototype, "render", null);
|
|
1389
|
+
Z.style = Re;
|
|
1314
1390
|
const Me = ".sc-trash-icon-h{display:flex}", Ne = Me, ze = class {
|
|
1315
1391
|
constructor(e) {
|
|
1316
1392
|
b(this, e), this.width = "20", this.height = "21";
|
|
1317
1393
|
}
|
|
1318
1394
|
render() {
|
|
1319
|
-
return
|
|
1395
|
+
return l("svg", { key: "cd43bcf8a91abf12501571439a02652afeff0b0f", width: this.width, height: this.height, viewBox: "0 0 20 21", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, l("path", { key: "2870e48a14d2a84175298a75d47e3224a10385a4", 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" }));
|
|
1320
1396
|
}
|
|
1321
1397
|
};
|
|
1322
1398
|
ze.style = Ne;
|
|
@@ -1330,10 +1406,10 @@ export {
|
|
|
1330
1406
|
N as input_image_url,
|
|
1331
1407
|
z as nylas_additional_participants,
|
|
1332
1408
|
B as nylas_event_description,
|
|
1333
|
-
|
|
1409
|
+
j as nylas_event_info,
|
|
1334
1410
|
W as nylas_event_location,
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1411
|
+
U as nylas_event_title,
|
|
1412
|
+
K as nylas_feedback_form,
|
|
1413
|
+
Z as nylas_reminder_time,
|
|
1338
1414
|
ze as trash_icon
|
|
1339
1415
|
};
|