@nylas/react 2.0.1 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{abstract-provider-efe136bd-b4663c02.cjs → abstract-provider-bdb7d9b4-12a95387.cjs} +1 -1
- package/dist/{abstract-provider-efe136bd-2041bdce.js → abstract-provider-bdb7d9b4-22cf4a74.js} +1 -1
- package/dist/{add-circle-icon_2.entry-ea1692a4.js → add-circle-icon_2.entry-0ff79148.js} +1 -1
- package/dist/{add-circle-icon_2.entry-5204c48a.cjs → add-circle-icon_2.entry-d56f519c.cjs} +1 -1
- package/dist/{archive-icon.entry-c2c66bca.cjs → archive-icon.entry-6ab120ff.cjs} +1 -1
- package/dist/{archive-icon.entry-0b585dff.js → archive-icon.entry-aaff46ec.js} +1 -1
- package/dist/{arrow-icon.entry-9d471162.cjs → arrow-icon.entry-d57cf44f.cjs} +1 -1
- package/dist/{arrow-icon.entry-2e61394e.js → arrow-icon.entry-d8fcbc1f.js} +1 -1
- package/dist/{bold-icon.entry-5c37622f.cjs → bold-icon.entry-0f23543d.cjs} +1 -1
- package/dist/{bold-icon.entry-8ef1b653.js → bold-icon.entry-e48075a4.js} +1 -1
- package/dist/{button-component_2.entry-8335ee1e.cjs → button-component_2.entry-3d622397.cjs} +1 -1
- package/dist/{button-component_2.entry-c906230f.js → button-component_2.entry-5db80bec.js} +1 -1
- package/dist/calendar-agenda-fill-icon_36.entry-75d7cd5b.cjs +6 -0
- package/dist/{calendar-agenda-fill-icon_36.entry-5f184433.js → calendar-agenda-fill-icon_36.entry-78fc2e0d.js} +835 -835
- package/dist/{calendar-cancel-icon.entry-dd6ac4db.js → calendar-cancel-icon.entry-8b43441c.js} +1 -1
- package/dist/{calendar-cancel-icon.entry-65a4a34e.cjs → calendar-cancel-icon.entry-9546c7c3.cjs} +1 -1
- package/dist/calendar-check-icon.entry-4e6abda7.js +16 -0
- package/dist/{calendar-check-icon_2.entry-ded15038.cjs → calendar-check-icon.entry-a03b249a.cjs} +1 -1
- package/dist/{calendar-icon.entry-a2a1ddbc.js → calendar-icon.entry-5b622c12.js} +1 -1
- package/dist/{calendar-icon.entry-ca512dd6.cjs → calendar-icon.entry-cd4b0ec4.cjs} +1 -1
- package/dist/{checkbox-component_2.entry-d6128246.js → checkbox-component_2.entry-82f4b1f2.js} +1 -1
- package/dist/{checkbox-component_2.entry-d79b5d1d.cjs → checkbox-component_2.entry-c9c8a87d.cjs} +1 -1
- package/dist/{checkbox-group_4.entry-2946c7ef.cjs → checkbox-group_4.entry-5a4f0ed2.cjs} +1 -1
- package/dist/{checkbox-group_4.entry-e5145451.js → checkbox-group_4.entry-b2a5b2b2.js} +3 -3
- package/dist/checkmark-circle-icon.entry-30582af4.js +16 -0
- package/dist/checkmark-circle-icon.entry-9617301c.cjs +1 -0
- package/dist/{checkmark-icon_15.entry-6e92e93e.js → checkmark-icon_15.entry-01536ed2.js} +33 -33
- package/dist/{checkmark-icon_15.entry-a75a1825.cjs → checkmark-icon_15.entry-c5eaad9b.cjs} +2 -2
- package/dist/{chevron-icon_3.entry-9193a885.cjs → chevron-icon_3.entry-26f14744.cjs} +1 -1
- package/dist/{chevron-icon_3.entry-6eaa3513.js → chevron-icon_3.entry-517447a6.js} +1 -1
- package/dist/{clock-icon_4.entry-ae2272f4.cjs → clock-icon_4.entry-5351318c.cjs} +1 -1
- package/dist/{clock-icon_4.entry-2c93270e.js → clock-icon_4.entry-7ea1274d.js} +1 -1
- package/dist/{customParseFormat-edc38d83-fa9c77d9.cjs → customParseFormat-f0d21eb3-769d6bf2.cjs} +1 -1
- package/dist/{customParseFormat-edc38d83-b3722499.js → customParseFormat-f0d21eb3-904f1e57.js} +1 -1
- package/dist/{delete-icon.entry-6684eba6.js → delete-icon.entry-02e44ba1.js} +1 -1
- package/dist/{delete-icon.entry-b9e4f2c7.cjs → delete-icon.entry-64b61f5c.cjs} +1 -1
- package/dist/{document-refresh-icon.entry-7afe6163.cjs → document-refresh-icon.entry-2f599a22.cjs} +1 -1
- package/dist/{document-refresh-icon.entry-fba9f60b.js → document-refresh-icon.entry-fcaa84ad.js} +1 -1
- package/dist/{feedbackSync-e4378c0b-23289195.js → feedbackSync-b9c9e719-b54b3268.js} +1 -1
- package/dist/{feedbackSync-e4378c0b-7876d067.cjs → feedbackSync-b9c9e719-bee3fea1.cjs} +1 -1
- package/dist/{folder-icon.entry-b1632bf3.cjs → folder-icon.entry-55c123dc.cjs} +1 -1
- package/dist/{folder-icon.entry-430c6b47.js → folder-icon.entry-f4862c1b.js} +1 -1
- package/dist/{forward-icon.entry-5e53da76.js → forward-icon.entry-4a41e94f.js} +1 -1
- package/dist/{forward-icon.entry-7626dcca.cjs → forward-icon.entry-82719382.cjs} +1 -1
- package/dist/{globe-icon_2.entry-bbb0a6ce.cjs → globe-icon_2.entry-3f0e408e.cjs} +1 -1
- package/dist/{globe-icon_2.entry-646eae41.js → globe-icon_2.entry-8f5c79b2.js} +2 -2
- package/dist/{google-logo-icon_6.entry-e39dd9cb.cjs → google-logo-icon_6.entry-9c91c3d4.cjs} +1 -1
- package/dist/{google-logo-icon_6.entry-5951a546.js → google-logo-icon_6.entry-b331ab60.js} +8 -8
- package/dist/{google-meet-icon_5.entry-c13e0738.cjs → google-meet-icon_5.entry-e3d44d56.cjs} +1 -1
- package/dist/{google-meet-icon_5.entry-a54c83da.js → google-meet-icon_5.entry-eb9f7d93.js} +1 -1
- package/dist/{inbox-icon.entry-7bee82b3.js → inbox-icon.entry-a385095d.js} +1 -1
- package/dist/{inbox-icon.entry-911b047a.cjs → inbox-icon.entry-fa9085cd.cjs} +1 -1
- package/dist/{index-71f61ea9.js → index-ad781fbc.js} +5585 -5490
- package/dist/index-dc6efb5e.cjs +118 -0
- package/dist/{index.es-6a9d55cf-458ba0e0.cjs → index.es-ccb2a286-9a2c0934.cjs} +1 -1
- package/dist/{index.es-6a9d55cf-122c27e0.js → index.es-ccb2a286-dfa2bfbe.js} +1 -1
- package/dist/{info-icon_2.entry-471b836b.cjs → info-icon_2.entry-9f32753b.cjs} +1 -1
- package/dist/{info-icon_2.entry-6ff2f004.js → info-icon_2.entry-c18a111e.js} +1 -1
- package/dist/{input-component.entry-781b584c.js → input-component.entry-eae64f46.js} +1 -1
- package/dist/{input-component.entry-b6a9b4cb.cjs → input-component.entry-ff9e04c9.cjs} +1 -1
- package/dist/{input-dropdown_2.entry-1feebcba.js → input-dropdown_2.entry-1b55ef0c.js} +1 -1
- package/dist/{input-dropdown_2.entry-c71d14ff.cjs → input-dropdown_2.entry-67d6d292.cjs} +1 -1
- package/dist/{italic-icon.entry-9ef7f4a2.js → italic-icon.entry-4266a817.js} +1 -1
- package/dist/{italic-icon.entry-16debde5.cjs → italic-icon.entry-843feb2b.cjs} +1 -1
- package/dist/{multi-select-dropdown.entry-1b27c746.js → multi-select-dropdown.entry-854265ef.js} +1 -1
- package/dist/{multi-select-dropdown.entry-0a6f9417.cjs → multi-select-dropdown.entry-ca9acf75.cjs} +1 -1
- package/dist/nylas-booked-event-card_11.entry-8d3e2019.cjs +1 -0
- package/dist/{nylas-booked-event-card_11.entry-802671ee.js → nylas-booked-event-card_11.entry-ccf30d91.js} +138 -107
- package/dist/{nylas-form-card.entry-7da9a312.js → nylas-form-card.entry-481ede48.js} +2 -2
- package/dist/{nylas-form-card.entry-59a837c9.cjs → nylas-form-card.entry-58162c72.cjs} +1 -1
- package/dist/{nylas-notification_2.entry-b16bb805.js → nylas-notification_2.entry-7d3ed3b0.js} +1 -1
- package/dist/{nylas-notification_2.entry-8f8bad34.cjs → nylas-notification_2.entry-dffa3ff6.cjs} +1 -1
- package/dist/{nylas-scheduler-editor.entry-e33e11fb.cjs → nylas-scheduler-editor.entry-9744694a.cjs} +2 -2
- package/dist/{nylas-scheduler-editor.entry-cbe3e1e3.js → nylas-scheduler-editor.entry-aa079dff.js} +5 -5
- package/dist/nylas-scheduling.entry-7441979c.js +988 -0
- package/dist/nylas-scheduling.entry-b1fcb48f.cjs +1 -0
- package/dist/{person-icon.entry-6232e6fd.js → person-icon.entry-23a69633.js} +1 -1
- package/dist/{person-icon.entry-beb26b48.cjs → person-icon.entry-acf4d22b.cjs} +1 -1
- package/dist/{play-icon.entry-16a1c1ac.js → play-icon.entry-4e7884d4.js} +1 -1
- package/dist/{play-icon.entry-9060d0d8.cjs → play-icon.entry-aa088180.cjs} +1 -1
- package/dist/{radio-button-group.entry-5a3728cd.js → radio-button-group.entry-243d7988.js} +1 -1
- package/dist/{radio-button-group.entry-6935c39d.cjs → radio-button-group.entry-cea225c8.cjs} +1 -1
- package/dist/react.cjs +1 -1
- package/dist/react.js +1 -1
- package/dist/{refresh-icon.entry-2411b2e1.cjs → refresh-icon.entry-96cb008f.cjs} +1 -1
- package/dist/{refresh-icon.entry-4f56e72b.js → refresh-icon.entry-d1603555.js} +1 -1
- package/dist/{register-component-a1c3d7b4-774feacc.js → register-component-9d4ceee5-46f58baf.js} +1 -1
- package/dist/{register-component-a1c3d7b4-97d7a6f5.cjs → register-component-9d4ceee5-6fabc42c.cjs} +1 -1
- package/dist/{reply-all-icon.entry-b4b6926b.cjs → reply-all-icon.entry-537f7718.cjs} +1 -1
- package/dist/{reply-all-icon.entry-b4b917ec.js → reply-all-icon.entry-6fae7288.js} +1 -1
- package/dist/{reply-icon.entry-454545ed.cjs → reply-icon.entry-72fa6e4c.cjs} +1 -1
- package/dist/{reply-icon.entry-24f6f4c6.js → reply-icon.entry-ae114e35.js} +1 -1
- package/dist/{sent-icon.entry-d9a79336.cjs → sent-icon.entry-30a6ac17.cjs} +1 -1
- package/dist/{sent-icon.entry-fa59ce85.js → sent-icon.entry-b10d5e26.js} +1 -1
- package/dist/{spam-icon.entry-da39987e.cjs → spam-icon.entry-357aa525.cjs} +1 -1
- package/dist/{spam-icon.entry-fb18a08b.js → spam-icon.entry-bed45849.js} +1 -1
- package/dist/{star-icon.entry-406472c1.js → star-icon.entry-010349a5.js} +1 -1
- package/dist/{star-icon.entry-833f35a7.cjs → star-icon.entry-53c85ebb.cjs} +1 -1
- package/dist/{stop-icon.entry-1b6ae838.js → stop-icon.entry-18f650bf.js} +1 -1
- package/dist/{stop-icon.entry-3258db59.cjs → stop-icon.entry-20af3bf5.cjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/{textarea-component.entry-0ae18897.cjs → textarea-component.entry-b19642f1.cjs} +1 -1
- package/dist/{textarea-component.entry-569a281e.js → textarea-component.entry-e6120440.js} +1 -1
- package/dist/{toggle-switch.entry-dc3f796b.js → toggle-switch.entry-32b0e964.js} +1 -1
- package/dist/{toggle-switch.entry-60d75f16.cjs → toggle-switch.entry-becdda2c.cjs} +1 -1
- package/dist/{translate-icon.entry-297cf20f.js → translate-icon.entry-2308a8e4.js} +1 -1
- package/dist/{translate-icon.entry-c183ecb5.cjs → translate-icon.entry-7cb7a479.cjs} +1 -1
- package/dist/{trash-fill-icon.entry-3d8a2e5e.js → trash-fill-icon.entry-7f410c82.js} +1 -1
- package/dist/{trash-fill-icon.entry-94d4f66c.cjs → trash-fill-icon.entry-c70b9326.cjs} +1 -1
- package/dist/{underline-icon.entry-50d1e766.cjs → underline-icon.entry-23f478f3.cjs} +1 -1
- package/dist/{underline-icon.entry-4a9105c7.js → underline-icon.entry-58ef1a9f.js} +1 -1
- package/package.json +2 -2
- package/dist/calendar-agenda-fill-icon_36.entry-59c0a997.cjs +0 -6
- package/dist/calendar-check-icon_2.entry-f9b50bb8.js +0 -26
- package/dist/index-f769bc2a.cjs +0 -118
- package/dist/nylas-booked-event-card_11.entry-74fba802.cjs +0 -1
- package/dist/nylas-scheduling.entry-4223e50b.cjs +0 -1
- package/dist/nylas-scheduling.entry-6fb094a8.js +0 -968
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as x, h as i, a as S, b as
|
|
2
|
-
import { R as
|
|
1
|
+
import { r as x, h as i, a as S, b as d, i as c, K as ge, L as ie, M as Zn, H as O, g as H, O as Yn, y as jn, P as fa, Q as he } from "./index-ad781fbc.js";
|
|
2
|
+
import { R as D } from "./register-component-9d4ceee5-46f58baf.js";
|
|
3
3
|
import { D as ya, T as Xn, d as Kn, F as Vn, L as nt, a as Qn } from "./constants-f51538ef-e0a5f026.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import "react/jsx-runtime";
|
|
@@ -13,7 +13,7 @@ const at = ".sc-calendar-agenda-fill-icon-h{display:flex}", tt = at, lt = class
|
|
|
13
13
|
}
|
|
14
14
|
};
|
|
15
15
|
lt.style = tt;
|
|
16
|
-
const ot = ".sc-calendar-agenda-icon-h{display:flex}", it = ot,
|
|
16
|
+
const ot = ".sc-calendar-agenda-icon-h{display:flex}", it = ot, rt = class {
|
|
17
17
|
constructor(e) {
|
|
18
18
|
x(this, e), this.width = "20", this.height = "20";
|
|
19
19
|
}
|
|
@@ -21,8 +21,8 @@ const ot = ".sc-calendar-agenda-icon-h{display:flex}", it = ot, st = class {
|
|
|
21
21
|
return i("svg", { key: "73067881feeacd7becb2872f91f78229996f06dd", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, i("path", { key: "b8cc97d711af2084d8f199f1d26225f895f4d873", d: "M14 11.5C14 12.8807 12.8807 14 11.5 14H2.5C1.11929 14 0 12.8807 0 11.5V2.5C0 1.11929 1.11929 0 2.5 0H11.5C12.8807 0 14 1.11929 14 2.5V11.5ZM13 11.5V2.5C13 1.67157 12.3284 1 11.5 1H2.5C1.67157 1 1 1.67157 1 2.5V11.5C1 12.3284 1.67157 13 2.5 13H11.5C12.3284 13 13 12.3284 13 11.5ZM11 3.5C11 3.74546 10.8231 3.94961 10.5899 3.99194L10.5 4H3.5C3.22386 4 3 3.77614 3 3.5C3 3.25454 3.17688 3.05039 3.41012 3.00806L3.5 3H10.5C10.7761 3 11 3.22386 11 3.5ZM11 7C11 7.24546 10.8231 7.44961 10.5899 7.49194L10.5 7.5H3.5C3.22386 7.5 3 7.27614 3 7C3 6.75454 3.17688 6.55039 3.41012 6.50806L3.5 6.5H10.5C10.7761 6.5 11 6.72386 11 7ZM11 10.5C11 10.7455 10.8231 10.9496 10.5899 10.9919L10.5 11H3.5C3.22386 11 3 10.7761 3 10.5C3 10.2545 3.17688 10.0504 3.41012 10.0081L3.5 10H10.5C10.7761 10 11 10.2239 11 10.5Z", fill: "currentColor" }));
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
|
-
|
|
25
|
-
const
|
|
24
|
+
rt.style = it;
|
|
25
|
+
const st = ".sc-calendar-info-icon-h{display:flex}", ct = st, dt = class {
|
|
26
26
|
constructor(e) {
|
|
27
27
|
x(this, e), this.width = "20", this.height = "20";
|
|
28
28
|
}
|
|
@@ -69,12 +69,12 @@ const _t = ".sc-flow-icon-h{display:flex}", Ct = _t, wt = class {
|
|
|
69
69
|
wt.style = Ct;
|
|
70
70
|
const kt = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff;width:inherit}.nylas-availability-picker{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200)}.nylas-availability-picker .header{padding:1rem}.nylas-availability-picker .header h3{margin:0;font-size:16px;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-availability-picker .header p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left;display:flex;align-items:center;gap:4px}.nylas-availability-picker .content{padding:1rem;color:var(--nylas-base-900);font-size:16px;font-family:var(--nylas-font-family);border-top:1px solid var(--nylas-base-200)}@media screen and (max-width: 504px){.nylas-availability-picker .content{font-size:15px}}.nylas-availability-picker .content .select-timezone{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--nylas-base-200);padding-bottom:1rem;gap:1rem}.nylas-availability-picker .content .select-timezone h4{display:flex;gap:0.5rem;align-items:center;margin:0;font-size:16px;font-weight:500;line-height:20px}@media screen and (max-width: 504px){.nylas-availability-picker .content .select-timezone h4{font-size:15px}}.nylas-availability-picker .content .availability{display:flex;flex-direction:column;gap:1rem;padding:0 0.5rem;margin:1rem 0}@media screen and (max-width: 504px){.nylas-availability-picker .content .availability{gap:0.5rem;padding:0}}.nylas-availability-picker .content .availability .availability-day{display:grid;grid-template-columns:minmax(auto, 65px) 1fr minmax(auto, 40px);gap:1rem;align-items:baseline}@media screen and (max-width: 768px){.nylas-availability-picker .content .availability .availability-day{grid-template-columns:78px 1fr auto}}@media screen and (max-width: 504px){.nylas-availability-picker .content .availability .availability-day{display:inline-grid;gap:8px;grid-template-columns:60px 1fr auto}}.nylas-availability-picker .content .availability .availability-day .day{display:flex;gap:0.5rem;align-items:center}@media screen and (max-width: 504px){.nylas-availability-picker .content .availability .availability-day .day{gap:0.25rem}}.nylas-availability-picker .content .availability .availability-day .day input[type=checkbox]{transform:scale(1.3)}.nylas-availability-picker .content .availability .availability-day .time-ranges span.unavailable{height:48px;display:flex;align-items:center;justify-content:center}.nylas-availability-picker .content .availability .availability-day .time-ranges .time-range{display:flex;gap:1.5rem;justify-content:space-between;align-items:baseline}@media screen and (max-width: 504px){.nylas-availability-picker .content .availability .availability-day .time-ranges .time-range{justify-content:unset;gap:0.5rem}}.nylas-availability-picker .content .availability .availability-day .time-ranges .time-range .pickers{display:flex;gap:1rem}@media screen and (max-width: 504px){.nylas-availability-picker .content .availability .availability-day .time-ranges .time-range .pickers{gap:0.5rem}}.nylas-availability-picker .content .availability .availability-day .time-ranges .time-range .pickers span{margin-top:0.75rem}.nylas-availability-picker .content .availability .availability-day .time-ranges .time-range:not(:last-of-type){margin-bottom:1rem}.nylas-availability-picker .content .availability .availability-day .time-ranges p.error{color:var(--nylas-error)}.nylas-availability-picker .content .availability .availability-day button{border:none;background:transparent;height:40px;cursor:pointer;color:var(--nylas-base-800)}.nylas-availability-picker .content .availability .availability-day button:hover,.nylas-availability-picker .content .availability .availability-day button:active{color:var(--nylas-primary)}select-dropdown{width:auto}select-dropdown::part(sd_dropdown-button){justify-content:initial}', xt = kt;
|
|
71
71
|
var Et = function(e, n, a, t) {
|
|
72
|
-
var o = arguments.length, l = o < 3 ? n : t === null ? t = Object.getOwnPropertyDescriptor(n, a) : t,
|
|
72
|
+
var o = arguments.length, l = o < 3 ? n : t === null ? t = Object.getOwnPropertyDescriptor(n, a) : t, r;
|
|
73
73
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
74
74
|
l = Reflect.decorate(e, n, a, t);
|
|
75
75
|
else
|
|
76
|
-
for (var
|
|
77
|
-
(
|
|
76
|
+
for (var s = e.length - 1; s >= 0; s--)
|
|
77
|
+
(r = e[s]) && (l = (o < 3 ? r(l) : o > 3 ? r(n, a, l) : r(n, a)) || l);
|
|
78
78
|
return o > 3 && l && Object.defineProperty(n, a, l), l;
|
|
79
79
|
}, an = function(e, n) {
|
|
80
80
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
@@ -93,7 +93,7 @@ const pa = class {
|
|
|
93
93
|
}, this.timezone = "", this.overlapDays = {};
|
|
94
94
|
}
|
|
95
95
|
elementNameChangedHandler(e) {
|
|
96
|
-
|
|
96
|
+
d("nylas-calendar-picker", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
97
97
|
}
|
|
98
98
|
configChangedHandler(e) {
|
|
99
99
|
var t, o, l;
|
|
@@ -106,12 +106,12 @@ const pa = class {
|
|
|
106
106
|
if (Object.keys(e).forEach((o) => {
|
|
107
107
|
const l = e[o];
|
|
108
108
|
if (l.length > 0) {
|
|
109
|
-
const
|
|
110
|
-
|
|
109
|
+
const r = this.getOverlaps(l);
|
|
110
|
+
r.length > 0 && (a[o] = r);
|
|
111
111
|
}
|
|
112
112
|
}), this.overlapDays = a, Object.keys(a).length > 0) {
|
|
113
113
|
const o = (t = this.host.shadowRoot) == null ? void 0 : t.getElementById(Object.keys(a)[0]);
|
|
114
|
-
o && (
|
|
114
|
+
o && (d("nylas-availability-picker", "The time ranges are overlapping. Overlap: ", a), this.isInternalsAvailable && this.internals.setValidity({ customError: !0 }, "Overlapping time ranges found", o));
|
|
115
115
|
} else
|
|
116
116
|
this.isInternalsAvailable && this.internals.setValidity({ customError: !1 }), this.isInternalsAvailable && this.internals.setFormValue(JSON.stringify({
|
|
117
117
|
openHours: this.scheduleToOpenHours(this.schedule),
|
|
@@ -126,7 +126,7 @@ const pa = class {
|
|
|
126
126
|
});
|
|
127
127
|
}
|
|
128
128
|
selectedLanguageChangedHandler(e, n) {
|
|
129
|
-
e !== n &&
|
|
129
|
+
e !== n && c.changeLanguage(e);
|
|
130
130
|
}
|
|
131
131
|
nylasFormDropdownChangedHandler(e) {
|
|
132
132
|
const { name: n, value: a } = e.detail;
|
|
@@ -143,16 +143,16 @@ const pa = class {
|
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
145
|
connectedCallback() {
|
|
146
|
-
|
|
146
|
+
d("nylas-availability-picker", "connectedCallback");
|
|
147
147
|
}
|
|
148
148
|
disconnectedCallback() {
|
|
149
|
-
|
|
149
|
+
d("nylas-availability-picker", "disconnectedCallback");
|
|
150
150
|
}
|
|
151
151
|
componentWillLoad() {
|
|
152
|
-
|
|
152
|
+
d("nylas-availability-picker", "componentWillLoad"), this.host.setAttribute("name", this.name);
|
|
153
153
|
}
|
|
154
154
|
componentDidLoad() {
|
|
155
|
-
|
|
155
|
+
d("nylas-availability-picker", "componentDidLoad"), this.selectedConfiguration ? this.configChangedHandler(this.selectedConfiguration) : (this.timezone = this.defaultTimezone, this.openHours && this.openHoursToSchedule(this.openHours));
|
|
156
156
|
const e = {
|
|
157
157
|
openHours: this.scheduleToOpenHours(this.schedule),
|
|
158
158
|
timezone: this.timezone
|
|
@@ -179,24 +179,24 @@ const pa = class {
|
|
|
179
179
|
if (n.length === 0)
|
|
180
180
|
this.schedule[e] = [{ start: "09:00am", end: "05:00pm" }];
|
|
181
181
|
else {
|
|
182
|
-
const o = n.map((
|
|
183
|
-
start: ge(
|
|
184
|
-
end: ge(
|
|
185
|
-
})).sort((
|
|
182
|
+
const o = n.map((r) => ({
|
|
183
|
+
start: ge(r.start),
|
|
184
|
+
end: ge(r.end)
|
|
185
|
+
})).sort((r, s) => r.start - s.start), l = o[o.length - 1].end;
|
|
186
186
|
if (l + 60 <= t)
|
|
187
187
|
this.schedule[e].push({
|
|
188
188
|
start: ie(he(l)),
|
|
189
189
|
end: ie(he(l + 60))
|
|
190
190
|
});
|
|
191
191
|
else {
|
|
192
|
-
let
|
|
192
|
+
let r = !1;
|
|
193
193
|
if (o[0].start > a + 60 && (this.schedule[e].push({
|
|
194
194
|
start: ie(he(a)),
|
|
195
195
|
end: ie(he(a + 60))
|
|
196
|
-
}),
|
|
197
|
-
for (let
|
|
198
|
-
const f = o[
|
|
199
|
-
if (o[
|
|
196
|
+
}), r = !0), !r)
|
|
197
|
+
for (let s = 0; s < o.length - 1; s++) {
|
|
198
|
+
const f = o[s].end;
|
|
199
|
+
if (o[s + 1].start - f >= 60) {
|
|
200
200
|
this.schedule[e].push({
|
|
201
201
|
start: ie(he(f)),
|
|
202
202
|
end: ie(he(f + 60))
|
|
@@ -212,8 +212,8 @@ const pa = class {
|
|
|
212
212
|
this.schedule[e].splice(n, 1), this.schedule = { ...this.schedule }, this.scheduleChanged(this.schedule);
|
|
213
213
|
}
|
|
214
214
|
setTime(e) {
|
|
215
|
-
const { key: n, value: a } = e.detail, [t, o] = n.split("_"), [l,
|
|
216
|
-
o === "start" ? this.schedule[l][
|
|
215
|
+
const { key: n, value: a } = e.detail, [t, o] = n.split("_"), [l, r] = t.split(":");
|
|
216
|
+
o === "start" ? this.schedule[l][r].start = a : o === "end" && (this.schedule[l][r].end = a), this.internals.setValidity({ customError: !1 }), this.schedule = { ...this.schedule }, this.scheduleChanged(this.schedule);
|
|
217
217
|
}
|
|
218
218
|
setFormError(e) {
|
|
219
219
|
var l;
|
|
@@ -232,9 +232,9 @@ const pa = class {
|
|
|
232
232
|
};
|
|
233
233
|
e.forEach((a) => {
|
|
234
234
|
a.days.forEach((t) => {
|
|
235
|
-
const o = this.getDayKey(t), l = ie(a.start),
|
|
235
|
+
const o = this.getDayKey(t), l = ie(a.start), r = ie(a.end), s = { start: l, end: r };
|
|
236
236
|
let f = !1;
|
|
237
|
-
n[o] && (f = n[o].some((y) => y.start ===
|
|
237
|
+
n[o] && (f = n[o].some((y) => y.start === s.start && y.end === s.end)), f || (n[o] ? n[o].push(s) : n[o] = [s]);
|
|
238
238
|
});
|
|
239
239
|
}), this.schedule = n, this.scheduleChanged(this.schedule, !1);
|
|
240
240
|
}
|
|
@@ -244,10 +244,10 @@ const pa = class {
|
|
|
244
244
|
scheduleToOpenHours(e) {
|
|
245
245
|
const n = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"], a = /* @__PURE__ */ new Map();
|
|
246
246
|
n.forEach((o, l) => {
|
|
247
|
-
e[o] && e[o].forEach((
|
|
248
|
-
const
|
|
247
|
+
e[o] && e[o].forEach((r) => {
|
|
248
|
+
const s = Zn(r.start), f = Zn(r.end), y = `${s}-${f}`;
|
|
249
249
|
if (!a.has(y))
|
|
250
|
-
a.set(y, { days: [l], start:
|
|
250
|
+
a.set(y, { days: [l], start: s, end: f });
|
|
251
251
|
else {
|
|
252
252
|
const u = a.get(y);
|
|
253
253
|
u && (u.days.push(l), a.set(y, u));
|
|
@@ -269,14 +269,14 @@ const pa = class {
|
|
|
269
269
|
label: Xn[a],
|
|
270
270
|
value: a
|
|
271
271
|
})), n = e.find((a) => a.value === this.timezone);
|
|
272
|
-
return i(O, { key: "be484e8f8b3e1c359674ab43c676da1a6a3ea523" }, i("div", { key: "224ad64626ed2f21663a1fd1c17659cbe8c79eab", class: "nylas-availability-picker", part: "nap" }, !this.hideHeader && i("div", { class: "header", part: "nap__header" }, i("h3", null,
|
|
272
|
+
return i(O, { key: "be484e8f8b3e1c359674ab43c676da1a6a3ea523" }, i("div", { key: "224ad64626ed2f21663a1fd1c17659cbe8c79eab", class: "nylas-availability-picker", part: "nap" }, !this.hideHeader && i("div", { class: "header", part: "nap__header" }, i("h3", null, c.t("nylasAvailabilityPicker.headerTitle")), i("p", null, c.t("nylasAvailabilityPicker.headerSubTitle"), i("tooltip-component", null, i("info-icon", { slot: "tooltip-icon" }), i("span", { slot: "tooltip-content" }, c.t("nylasAvailabilityPicker.tooltip.desc"))))), i("div", { key: "c72d5a34de6538bdc159fbf29746dfe8d797e751", class: "content" }, i("div", { key: "b5d260f05ea19917ac102e5b6314fa9f095368f4", class: "select-timezone", part: "nap__select-timezone" }, i("h4", { key: "7d663e16d41d811024455e9e47552a3659e47bf7", class: "sub-header" }, c.t("nylasAvailabilityPicker.selectTimezone")), (n == null ? void 0 : n.label) && i("select-dropdown", { name: "timezone", searchPlaceholder: c.t("search"), exportparts: "sd_dropdown: nap__timezone-container, sd_dropdown-button: nap__timezone-button, sd_dropdown-content: nap__timezone-dropdown-content", options: e, defaultSelectedOption: n }, i("span", { slot: "select-icon" }, i("globe-icon", { width: "20", height: "20" })))), i("div", { key: "3fded3d9c8210cdcac73f5ee334d15b20c82fa3e", class: "availability", part: "nap__availability" }, Object.keys(this.schedule).map((a) => {
|
|
273
273
|
const t = a, o = this.schedule[a];
|
|
274
274
|
return i("div", { class: "availability-day" }, i("div", { class: "day", part: "nap__day" }, i("input", { type: "checkbox", name: t, id: t, checked: o.length > 0, onClick: () => {
|
|
275
275
|
o.length > 0 ? this.schedule[t] = [] : this.schedule[t] = [{ start: "09:00am", end: "05:00pm" }], this.schedule = { ...this.schedule }, this.scheduleChanged(this.schedule);
|
|
276
|
-
} }), i("label", { htmlFor: t, "aria-label": "Select day" },
|
|
276
|
+
} }), i("label", { htmlFor: t, "aria-label": "Select day" }, c.t(`nylasAvailabilityPicker.days.${t}`))), i("div", { class: "time-ranges", part: "nap__time-ranges" }, o.length ? null : i("span", { class: "unavailable" }, c.t("nylasAvailabilityPicker.unavailable")), o.length > 0 && o.map((l, r) => {
|
|
277
277
|
var y, u;
|
|
278
|
-
const
|
|
279
|
-
return i("div", { class: "time-range", part: "nap__time-range" }, i("div", { class: "pickers" }, i("nylas-time-window-picker", { id:
|
|
278
|
+
const s = `${a}:${r}_start`, f = `${a}:${r}_end`;
|
|
279
|
+
return i("div", { class: "time-range", part: "nap__time-range" }, i("div", { class: "pickers" }, i("nylas-time-window-picker", { id: s, hasError: (y = this.overlapDays[t]) == null ? void 0 : y.includes(r), time: l.start, name: s, key: s, language: this.selectedLanguage, exportparts: "time-picker: nap__time-picker-container, time-input: nap__time-picker-input, times: nap__time-picker-times" }), i("span", null, " - "), i("nylas-time-window-picker", { id: f, hasError: (u = this.overlapDays[t]) == null ? void 0 : u.includes(r), time: l.end, name: f, key: f, minimumStartTime: l.start, language: this.selectedLanguage, exportparts: "time-picker: nap__time-picker-container, time-input: nap__time-picker-input, times: nap__time-picker-times" })), i("button", { onClick: () => this.removeTimeRange(t, r) }, i("close-icon", null)));
|
|
280
280
|
}), i("p", { class: "error" }, this.overlapDays[t] ? "Overlapping time ranges" : "")), i("div", null, o.length > 0 ? i("button", { onClick: () => this.addTimeRange(t), part: "nap__add-time-range" }, i("add-circle-icon", null)) : null));
|
|
281
281
|
})))));
|
|
282
282
|
}
|
|
@@ -295,7 +295,7 @@ const pa = class {
|
|
|
295
295
|
}
|
|
296
296
|
};
|
|
297
297
|
Et([
|
|
298
|
-
|
|
298
|
+
D({
|
|
299
299
|
name: "nylas-availability-picker",
|
|
300
300
|
stateToProps: /* @__PURE__ */ new Map([
|
|
301
301
|
["schedulerConfig.selectedConfiguration", "selectedConfiguration"],
|
|
@@ -310,12 +310,12 @@ Et([
|
|
|
310
310
|
pa.style = xt;
|
|
311
311
|
const St = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-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}.nylas-booking-calendar-picker{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200)}.nylas-booking-calendar-picker .header{padding:1rem;border-bottom:1px solid var(--nylas-base-200)}.nylas-booking-calendar-picker .header h3{margin:0;font-size:16px;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-booking-calendar-picker .header p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left;display:flex;align-items:center;gap:4px}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__loading{padding-bottom:1rem;display:flex;flex-direction:column;gap:4px}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__loading .label{display:flex;align-items:center;gap:0.5rem;margin:1rem 1rem 0;color:var(--nylas-base-800)}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__loading .loading-button{margin:0 1rem;padding:0;width:inherit;height:48px;color:var(--nylas-base-900);font-size:16px;cursor:not-allowed;display:flex;gap:0.5rem;justify-content:space-between;align-items:center;background:transparent;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__loading .loading-button span{padding:0 1rem}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__dropdown{padding:1rem;display:flex;flex-direction:column;gap:4px}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__dropdown span.label{display:flex;align-items:center;gap:4px;color:var(--nylas-base-800)}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__dropdown span.label tooltip-component{display:flex}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__dropdown select-dropdown::part(sd_dropdown){width:100%}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__dropdown select-dropdown::part(sd_dropdown-content){width:100%;max-width:unset}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__dropdown select-dropdown::part(sd_dropdown-button){width:100%;display:flex;justify-content:space-between;align-items:center;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__dropdown select-dropdown::part(sd_dropdown-button-selected-label){max-width:calc(100% - 2rem);font-family:var(--nylas-font-family);font-size:16px;line-height:24px}', Ot = St;
|
|
312
312
|
var Ht = function(e, n, a, t) {
|
|
313
|
-
var o = arguments.length, l = o < 3 ? n : t === null ? t = Object.getOwnPropertyDescriptor(n, a) : t,
|
|
313
|
+
var o = arguments.length, l = o < 3 ? n : t === null ? t = Object.getOwnPropertyDescriptor(n, a) : t, r;
|
|
314
314
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
315
315
|
l = Reflect.decorate(e, n, a, t);
|
|
316
316
|
else
|
|
317
|
-
for (var
|
|
318
|
-
(
|
|
317
|
+
for (var s = e.length - 1; s >= 0; s--)
|
|
318
|
+
(r = e[s]) && (l = (o < 3 ? r(l) : o > 3 ? r(n, a, l) : r(n, a)) || l);
|
|
319
319
|
return o > 3 && l && Object.defineProperty(n, a, l), l;
|
|
320
320
|
}, tn = function(e, n) {
|
|
321
321
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
@@ -326,46 +326,46 @@ const ua = class {
|
|
|
326
326
|
x(this, e), this.valueChanged = S(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.calendars = void 0, this.currentUser = void 0, this.currentUserCalendars = void 0, this.name = "booking-calendar", this.defaultBookingCalendar = "", this.hideHeader = !1, this.expressFlow = !1, this.selectedLanguage = void 0, this.selectedCalendar = "";
|
|
327
327
|
}
|
|
328
328
|
connectedCallback() {
|
|
329
|
-
|
|
329
|
+
d("nylas-booking-calendar-picker", "connectedCallback");
|
|
330
330
|
}
|
|
331
331
|
disconnectedCallback() {
|
|
332
|
-
|
|
332
|
+
d("nylas-booking-calendar-picker", "disconnectedCallback");
|
|
333
333
|
}
|
|
334
334
|
componentWillLoad() {
|
|
335
|
-
|
|
335
|
+
d("nylas-booking-calendar-picker", "componentWillLoad"), this.host.setAttribute("name", this.name);
|
|
336
336
|
}
|
|
337
337
|
componentDidLoad() {
|
|
338
338
|
var a, t, o, l;
|
|
339
|
-
|
|
340
|
-
const e = (t = (a = this.calendars) == null ? void 0 : a.find((
|
|
339
|
+
d("nylas-booking-calendar-picker", "componentDidLoad");
|
|
340
|
+
const e = (t = (a = this.calendars) == null ? void 0 : a.find((r) => r.is_primary)) == null ? void 0 : t.id, n = (l = (o = this.calendars) == null ? void 0 : o[0]) == null ? void 0 : l.id;
|
|
341
341
|
this.defaultBookingCalendar = this.defaultBookingCalendar || e || n || "", this.isInternalsAvailable && this.internals.setFormValue(this.defaultBookingCalendar.toString(), this.name), this.selectedCalendar = this.defaultBookingCalendar;
|
|
342
342
|
}
|
|
343
343
|
componentWillUpdate() {
|
|
344
|
-
|
|
344
|
+
d("nylas-booking-calendar-picker", "componentWillUpdate");
|
|
345
345
|
}
|
|
346
346
|
componentDidUpdate() {
|
|
347
|
-
|
|
347
|
+
d("nylas-booking-calendar-picker", "componentDidUpdate");
|
|
348
348
|
}
|
|
349
349
|
componentWillRender() {
|
|
350
|
-
|
|
350
|
+
d("nylas-booking-calendar-picker", "componentWillRender");
|
|
351
351
|
}
|
|
352
352
|
componentDidRender() {
|
|
353
|
-
|
|
353
|
+
d("nylas-booking-calendar-picker", "componentDidRender");
|
|
354
354
|
}
|
|
355
355
|
get isInternalsAvailable() {
|
|
356
356
|
return this.internals !== void 0 && typeof this.internals.setFormValue == "function";
|
|
357
357
|
}
|
|
358
358
|
elementNameChangedHandler(e) {
|
|
359
|
-
|
|
359
|
+
d("nylas-booking-calendar-picker", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
360
360
|
}
|
|
361
361
|
currentUserCalendarsChangedHandler(e) {
|
|
362
|
-
|
|
362
|
+
d("nylas-booking-calendar-picker", "currentUserCalendarsChangedHandler", e), this.currentUserCalendars = e;
|
|
363
363
|
}
|
|
364
364
|
selectedLanguageChangedHandler(e, n) {
|
|
365
|
-
e !== n &&
|
|
365
|
+
e !== n && c.changeLanguage(e);
|
|
366
366
|
}
|
|
367
367
|
nylasFormDropdownChangedHandler(e) {
|
|
368
|
-
|
|
368
|
+
d("nylas-booking-calendar-picker", "nylasFormDropdownChangedHandler", e.detail), this.isInternalsAvailable && this.internals.setValidity({});
|
|
369
369
|
const n = (a) => {
|
|
370
370
|
const { value: t } = a.detail;
|
|
371
371
|
this.selectedCalendar = t, this.isInternalsAvailable && this.internals.setFormValue(t.toString(), this.name);
|
|
@@ -374,14 +374,14 @@ const ua = class {
|
|
|
374
374
|
}
|
|
375
375
|
render() {
|
|
376
376
|
var o, l;
|
|
377
|
-
const e = ((o = this.currentUserCalendars) == null ? void 0 : o.map((
|
|
378
|
-
value:
|
|
379
|
-
label:
|
|
380
|
-
}))) ?? [], n = ((l = this.calendars) == null ? void 0 : l.map((
|
|
381
|
-
value:
|
|
382
|
-
label:
|
|
383
|
-
}))) ?? [], a = (n == null ? void 0 : n.length) > 0 ? n : e || [], t = a.find((
|
|
384
|
-
return i(O, null, i("div", { class: "nylas-booking-calendar-picker", part: "nbcp" }, !this.hideHeader && i("div", { class: "header", part: "nbcp__header" }, i("h3", null,
|
|
377
|
+
const e = ((o = this.currentUserCalendars) == null ? void 0 : o.map((r) => ({
|
|
378
|
+
value: r.id,
|
|
379
|
+
label: r.name
|
|
380
|
+
}))) ?? [], n = ((l = this.calendars) == null ? void 0 : l.map((r) => ({
|
|
381
|
+
value: r.id,
|
|
382
|
+
label: r.name
|
|
383
|
+
}))) ?? [], a = (n == null ? void 0 : n.length) > 0 ? n : e || [], t = a.find((r) => r.value == this.defaultBookingCalendar);
|
|
384
|
+
return i(O, null, i("div", { class: "nylas-booking-calendar-picker", part: "nbcp" }, !this.hideHeader && i("div", { class: "header", part: "nbcp__header" }, i("h3", null, c.t("nylasBookingCalendarPicker.headerTitle")), i("p", null, c.t("nylasBookingCalendarPicker.headerSubTitle"), i("tooltip-component", null, i("info-icon", { slot: "tooltip-icon" }), i("span", { slot: "tooltip-content" }, c.t("nylasBookingCalendarPicker.tooltip.desc"))))), a.length > 0 ? i("div", { class: "nylas-booking-calendar-picker__dropdown" }, i("select-dropdown", { name: "booking-calendar", options: [{ value: "", label: c.t("nylasBookingCalendarPicker.selectOptionLabel") }, ...a], withSearch: !1, required: this.expressFlow, emptyValue: c.t("nylasBookingCalendarPicker.selectOptionLabel"), errorMessage: c.t("nylasBookingCalendarPicker.selectCalendarErrorMessage"), exportparts: "sd_dropdown: nbcp__dropdown, sd_dropdown-button: nbcp__dropdown-button, sd_dropdown-content: nbcp__dropdown-content", defaultSelectedOption: t || null })) : i("div", { class: "nylas-booking-calendar-picker__loading" }, i("span", { class: "label" }, c.t("nylasBookingCalendarPicker.tooltip.desc"), " ", i("info-icon", null)), i("div", { class: "loading-button" }, i("span", null, c.t("loading"), "...")))));
|
|
385
385
|
}
|
|
386
386
|
static get formAssociated() {
|
|
387
387
|
return !0;
|
|
@@ -398,7 +398,7 @@ const ua = class {
|
|
|
398
398
|
}
|
|
399
399
|
};
|
|
400
400
|
Ht([
|
|
401
|
-
|
|
401
|
+
D({
|
|
402
402
|
name: "nylas-booking-calendar-picker",
|
|
403
403
|
stateToProps: /* @__PURE__ */ new Map([
|
|
404
404
|
["schedulerConfig.calendars", "currentUserCalendars"],
|
|
@@ -418,14 +418,14 @@ Ht([
|
|
|
418
418
|
tn("design:returntype", void 0)
|
|
419
419
|
], ua.prototype, "render", null);
|
|
420
420
|
ua.style = Ot;
|
|
421
|
-
const
|
|
422
|
-
var
|
|
423
|
-
var o = arguments.length, l = o < 3 ? n : t === null ? t = Object.getOwnPropertyDescriptor(n, a) : t,
|
|
421
|
+
const Dt = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-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}.nylas-booking-confirmation-redirect{width:inherit;display:flex;flex-direction:column}.nylas-booking-confirmation-redirect .nylas-booking-confirmation-redirect__dropdown span.label{display:flex;align-items:center;gap:4px;margin-bottom:4px;color:var(--nylas-base-800)}.nylas-booking-confirmation-redirect .nylas-booking-confirmation-redirect__dropdown span.label tooltip-component{display:flex}.nylas-booking-confirmation-redirect .nylas-booking-confirmation-redirect__dropdown select-dropdown::part(sd_dropdown){width:100%}.nylas-booking-confirmation-redirect .nylas-booking-confirmation-redirect__dropdown select-dropdown::part(sd_dropdown-button){width:100%;display:flex;justify-content:space-between;align-items:center;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);padding:1rem}.nylas-booking-confirmation-redirect .nylas-booking-confirmation-redirect__dropdown select-dropdown::part(sd_dropdown-content){width:100%;max-width:unset}.nylas-booking-confirmation-redirect .nylas-booking-confirmation-redirect__dropdown select-dropdown::part(sd_dropdown-button-selected-label){max-width:calc(100% - 2rem);font-family:var(--nylas-font-family);font-size:16px;line-height:24px}.nylas-booking-confirmation-redirect .nylas-booking-confirmation-redirect__dropdown input-component::part(ic__input_wrapper){margin-top:1rem}.nylas-booking-confirmation-redirect .nylas-booking-confirmation-redirect__dropdown span.error-message{color:var(--nylas-error)}', Lt = Dt;
|
|
422
|
+
var Ft = function(e, n, a, t) {
|
|
423
|
+
var o = arguments.length, l = o < 3 ? n : t === null ? t = Object.getOwnPropertyDescriptor(n, a) : t, r;
|
|
424
424
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
425
425
|
l = Reflect.decorate(e, n, a, t);
|
|
426
426
|
else
|
|
427
|
-
for (var
|
|
428
|
-
(
|
|
427
|
+
for (var s = e.length - 1; s >= 0; s--)
|
|
428
|
+
(r = e[s]) && (l = (o < 3 ? r(l) : o > 3 ? r(n, a, l) : r(n, a)) || l);
|
|
429
429
|
return o > 3 && l && Object.defineProperty(n, a, l), l;
|
|
430
430
|
}, ln = function(e, n) {
|
|
431
431
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
@@ -433,44 +433,44 @@ var It = function(e, n, a, t) {
|
|
|
433
433
|
};
|
|
434
434
|
const ma = class {
|
|
435
435
|
constructor(e) {
|
|
436
|
-
x(this, e), this.valueChanged = S(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.selectedConfiguration = void 0, this.name = "confirmation-redirect", this.redirectUrl = "", this.redirectUrlErrorMessage = "", this.selectedLanguage = void 0, this.currentRedirectUrl = "", this.acceptUrl = void 0, this.componentLoaded = !1;
|
|
436
|
+
x(this, e), this.valueChanged = S(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.selectedConfiguration = void 0, this.name = "confirmation-redirect", this.redirectUrl = "", this.redirectUrlErrorMessage = "", this.selectedLanguage = void 0, this.currentRedirectUrl = "", this.acceptUrl = void 0, this.componentLoaded = !1, this.requiredError = "", this.patternError = "";
|
|
437
437
|
}
|
|
438
438
|
elementNameChangedHandler(e) {
|
|
439
|
-
|
|
439
|
+
d("nylas-booking-confirmation-redirect", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
440
440
|
}
|
|
441
441
|
selectedConfigurationChangedHandler(e) {
|
|
442
442
|
var n, a, t;
|
|
443
|
-
|
|
443
|
+
d("nylas-booking-confirmation-redirect", "selectedConfigurationChangedHandler", e), (n = e == null ? void 0 : e.scheduler) != null && n.confirmation_redirect_url && (this.currentRedirectUrl = (a = e == null ? void 0 : e.scheduler) == null ? void 0 : a.confirmation_redirect_url, this.acceptUrl = ((t = e == null ? void 0 : e.scheduler) == null ? void 0 : t.confirmation_redirect_url) !== "");
|
|
444
444
|
}
|
|
445
445
|
selectedLanguageChangedHandler(e, n) {
|
|
446
|
-
e !== n &&
|
|
446
|
+
e !== n && (c.changeLanguage(e), this.requiredError = c.t("fieldRequired", { field: c.t("redirectUrl") }), this.patternError = c.t("invalidInputFormat", { field: c.t("redirectUrl") }));
|
|
447
447
|
}
|
|
448
448
|
connectedCallback() {
|
|
449
|
-
|
|
449
|
+
d("nylas-booking-confirmation-redirect", "connectedCallback");
|
|
450
450
|
}
|
|
451
451
|
disconnectedCallback() {
|
|
452
|
-
|
|
452
|
+
d("nylas-booking-confirmation-redirect", "disconnectedCallback");
|
|
453
453
|
}
|
|
454
454
|
componentWillLoad() {
|
|
455
|
-
|
|
455
|
+
d("nylas-booking-confirmation-redirect", "componentWillLoad"), this.host.setAttribute("name", this.name);
|
|
456
456
|
}
|
|
457
457
|
componentDidLoad() {
|
|
458
|
-
|
|
458
|
+
d("nylas-booking-confirmation-redirect", "componentDidLoad"), this.selectedConfiguration ? this.selectedConfigurationChangedHandler(this.selectedConfiguration) : (this.currentRedirectUrl = this.redirectUrl, this.acceptUrl = this.redirectUrl !== ""), this.componentLoaded = !0, typeof this.internals.setFormValue == "function" && this.internals.setFormValue(this.currentRedirectUrl.toString(), this.name);
|
|
459
459
|
}
|
|
460
460
|
componentWillUpdate() {
|
|
461
|
-
|
|
461
|
+
d("nylas-booking-confirmation-redirect", "componentWillUpdate");
|
|
462
462
|
}
|
|
463
463
|
componentDidUpdate() {
|
|
464
|
-
|
|
464
|
+
d("nylas-booking-confirmation-redirect", "componentDidUpdate");
|
|
465
465
|
}
|
|
466
466
|
componentWillRender() {
|
|
467
|
-
|
|
467
|
+
d("nylas-booking-confirmation-redirect", "componentWillRender");
|
|
468
468
|
}
|
|
469
469
|
componentDidRender() {
|
|
470
|
-
|
|
470
|
+
d("nylas-booking-confirmation-redirect", "componentDidRender");
|
|
471
471
|
}
|
|
472
472
|
nylasFormDropdownChangedHandler(e) {
|
|
473
|
-
|
|
473
|
+
d("nylas-booking-confirmation-redirect", "nylasFormDropdownChangedHandler", e.detail);
|
|
474
474
|
const { name: n, value: a } = e.detail;
|
|
475
475
|
n === "confirmation-redirect-dropdown" && (a === "custom" ? this.acceptUrl = !0 : (this.acceptUrl = !1, this.internals.setFormValue("", this.name), this.valueChanged.emit({ name: this.name, value: "" })));
|
|
476
476
|
}
|
|
@@ -478,7 +478,7 @@ const ma = class {
|
|
|
478
478
|
const { name: n, value: a } = e.detail;
|
|
479
479
|
if (this.currentRedirectUrl = a, this.acceptUrl && n === "confirmation-redirect") {
|
|
480
480
|
if (this.redirectUrlErrorMessage = "", !Yn(this.currentRedirectUrl)) {
|
|
481
|
-
this.internals.setValidity({ customError: !0 }, "
|
|
481
|
+
this.internals.setValidity({ customError: !0 }, c.t("nylasBookingConfirmationRedirect.customRedirectUrlErrorMessage")), this.redirectUrlErrorMessage = c.t("nylasBookingConfirmationRedirect.customRedirectUrlErrorMessage");
|
|
482
482
|
return;
|
|
483
483
|
}
|
|
484
484
|
this.internals.setValidity({});
|
|
@@ -490,20 +490,20 @@ const ma = class {
|
|
|
490
490
|
}
|
|
491
491
|
}
|
|
492
492
|
formSubmittedHandler(e) {
|
|
493
|
-
this.acceptUrl && !Yn(this.currentRedirectUrl) ? (this.internals.setValidity({ customError: !0 }, "
|
|
493
|
+
this.acceptUrl && !Yn(this.currentRedirectUrl) ? (this.internals.setValidity({ customError: !0 }, c.t("nylasBookingConfirmationRedirect.customRedirectUrlErrorMessage")), this.redirectUrlErrorMessage = c.t("nylasBookingConfirmationRedirect.customRedirectUrlErrorMessage")) : this.internals.setValidity({});
|
|
494
494
|
}
|
|
495
495
|
render() {
|
|
496
496
|
const e = [
|
|
497
497
|
{
|
|
498
|
-
label:
|
|
498
|
+
label: c.t("nylasBookingConfirmationRedirect.redirectOption", { context: "default" }),
|
|
499
499
|
value: "default"
|
|
500
500
|
},
|
|
501
501
|
{
|
|
502
|
-
label:
|
|
502
|
+
label: c.t("nylasBookingConfirmationRedirect.redirectOption", { context: "custom" }),
|
|
503
503
|
value: "custom"
|
|
504
504
|
}
|
|
505
505
|
];
|
|
506
|
-
return i(O, { key: "
|
|
506
|
+
return i(O, { key: "3f0b860be075b40c1c4c128b3300de4ecccd8057" }, i("div", { key: "75bd98cf98b22ede61543e1c6d4cb3e1a2fab868", class: "nylas-booking-confirmation-redirect", part: "nbcr" }, e.length > 0 && i("div", { class: "nylas-booking-confirmation-redirect__dropdown" }, i("span", { class: "label" }, c.t("nylasBookingConfirmationRedirect.dropdownLabel"), i("tooltip-component", null, i("info-icon", { slot: "tooltip-icon" }), i("span", { slot: "tooltip-content" }, c.t("nylasBookingConfirmationRedirect.tooltip.desc")))), this.componentLoaded && i("select-dropdown", { name: "confirmation-redirect-dropdown", options: e, withSearch: !1, defaultSelectedOption: e.find((n) => n.value === (this.acceptUrl ? "custom" : "default")), exportparts: "sd_dropdown: nbcr__dropdown, sd_dropdown-button: nbcr__dropdown-button, sd_dropdown-content: nbcr__dropdown-content" }), this.acceptUrl && i("div", null, i("input-component", { name: "confirmation-redirect", id: "confirmation-redirect", type: "text", placeholder: c.t("nylasBookingConfirmationRedirect.customRedirectUrlPlaceholder"), required: !1, part: "ic__input_wrapper: nbcr__input-textfield", requiredError: this.requiredError, patternError: this.patternError, defaultValue: this.currentRedirectUrl }), this.redirectUrlErrorMessage && i("span", { class: "error-message" }, this.redirectUrlErrorMessage)))));
|
|
507
507
|
}
|
|
508
508
|
static get formAssociated() {
|
|
509
509
|
return !0;
|
|
@@ -519,8 +519,8 @@ const ma = class {
|
|
|
519
519
|
};
|
|
520
520
|
}
|
|
521
521
|
};
|
|
522
|
-
|
|
523
|
-
|
|
522
|
+
Ft([
|
|
523
|
+
D({
|
|
524
524
|
name: "nylas-booking-confirmation-redirect",
|
|
525
525
|
stateToProps: /* @__PURE__ */ new Map([
|
|
526
526
|
["schedulerConfig.selectedConfiguration", "selectedConfiguration"],
|
|
@@ -538,15 +538,15 @@ It([
|
|
|
538
538
|
ln("design:paramtypes", []),
|
|
539
539
|
ln("design:returntype", void 0)
|
|
540
540
|
], ma.prototype, "render", null);
|
|
541
|
-
ma.style =
|
|
542
|
-
const
|
|
541
|
+
ma.style = Lt;
|
|
542
|
+
const It = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff;width:inherit}.nylas-booking-confirmation-type{width:inherit;display:flex;flex-direction:column;margin-bottom:1rem}.nylas-booking-confirmation-type .nylas-booking-confirmation-type__dropdown span.label{display:flex;align-items:center;gap:4px;color:var(--nylas-base-800)}.nylas-booking-confirmation-type .nylas-booking-confirmation-type__dropdown span.label tooltip-component{display:flex}.nylas-booking-confirmation-type .nylas-booking-confirmation-type__dropdown select-dropdown::part(sd_dropdown){width:100%}.nylas-booking-confirmation-type .nylas-booking-confirmation-type__dropdown select-dropdown::part(sd_dropdown-button){width:100%;display:flex;justify-content:space-between;align-items:center;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);padding:1rem}.nylas-booking-confirmation-type .nylas-booking-confirmation-type__dropdown select-dropdown::part(sd_dropdown-content){width:100%;max-width:unset}.nylas-booking-confirmation-type .nylas-booking-confirmation-type__dropdown select-dropdown::part(sd_dropdown-button-selected-label){max-width:calc(100% - 2rem);font-family:var(--nylas-font-family);font-size:16px;line-height:24px}', Tt = It;
|
|
543
543
|
var $t = function(e, n, a, t) {
|
|
544
|
-
var o = arguments.length, l = o < 3 ? n : t === null ? t = Object.getOwnPropertyDescriptor(n, a) : t,
|
|
544
|
+
var o = arguments.length, l = o < 3 ? n : t === null ? t = Object.getOwnPropertyDescriptor(n, a) : t, r;
|
|
545
545
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
546
546
|
l = Reflect.decorate(e, n, a, t);
|
|
547
547
|
else
|
|
548
|
-
for (var
|
|
549
|
-
(
|
|
548
|
+
for (var s = e.length - 1; s >= 0; s--)
|
|
549
|
+
(r = e[s]) && (l = (o < 3 ? r(l) : o > 3 ? r(n, a, l) : r(n, a)) || l);
|
|
550
550
|
return o > 3 && l && Object.defineProperty(n, a, l), l;
|
|
551
551
|
}, on = function(e, n) {
|
|
552
552
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
@@ -558,44 +558,44 @@ const ga = class {
|
|
|
558
558
|
x(this, e), this.valueChanged = S(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.selectedConfiguration = void 0, this.name = "confirmation-type", this.bookingType = "booking", this.showComponent = ((a = (n = this.selectedConfiguration) == null ? void 0 : n.event_booking) == null ? void 0 : a.booking_type) !== "custom-confirmation", this.selectedLanguage = void 0, this.selectedBookingType = void 0, this.showDropdown = void 0;
|
|
559
559
|
}
|
|
560
560
|
elementNameChangedHandler(e) {
|
|
561
|
-
|
|
561
|
+
d("nylas-booking-confirmation-type", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
562
562
|
}
|
|
563
563
|
selectedConfigurationChangedHandler(e) {
|
|
564
564
|
var n, a, t, o;
|
|
565
|
-
|
|
565
|
+
d("nylas-booking-confirmation-type", "selectedConfigurationChangedHandler", e), (n = e == null ? void 0 : e.event_booking) != null && n.booking_type && (this.selectedBookingType = (a = e == null ? void 0 : e.event_booking) == null ? void 0 : a.booking_type, this.showDropdown = ((t = e == null ? void 0 : e.event_booking) == null ? void 0 : t.booking_type) !== "custom-confirmation" && !!((o = e == null ? void 0 : e.scheduler) != null && o.organizer_confirmation_url), this.isInternalsAvailable && this.internals.setFormValue(this.selectedBookingType.toString(), this.name));
|
|
566
566
|
}
|
|
567
567
|
selectedLanguageChangedHandler(e, n) {
|
|
568
|
-
e !== n &&
|
|
568
|
+
e !== n && c.changeLanguage(e);
|
|
569
569
|
}
|
|
570
570
|
connectedCallback() {
|
|
571
|
-
|
|
571
|
+
d("nylas-booking-confirmation-type", "connectedCallback");
|
|
572
572
|
}
|
|
573
573
|
disconnectedCallback() {
|
|
574
|
-
|
|
574
|
+
d("nylas-booking-confirmation-type", "disconnectedCallback");
|
|
575
575
|
}
|
|
576
576
|
componentWillLoad() {
|
|
577
|
-
|
|
577
|
+
d("nylas-booking-confirmation-type", "componentWillLoad"), this.host.setAttribute("name", this.name);
|
|
578
578
|
}
|
|
579
579
|
componentDidLoad() {
|
|
580
|
-
|
|
580
|
+
d("nylas-booking-confirmation-type", "componentDidLoad"), this.selectedConfiguration ? this.selectedConfigurationChangedHandler(this.selectedConfiguration) : (this.selectedBookingType = this.bookingType || "booking", this.showDropdown = this.showComponent), this.isInternalsAvailable && this.internals.setFormValue(this.selectedBookingType.toString(), this.name);
|
|
581
581
|
}
|
|
582
582
|
componentWillUpdate() {
|
|
583
|
-
|
|
583
|
+
d("nylas-booking-confirmation-type", "componentWillUpdate");
|
|
584
584
|
}
|
|
585
585
|
componentDidUpdate() {
|
|
586
|
-
|
|
586
|
+
d("nylas-booking-confirmation-type", "componentDidUpdate");
|
|
587
587
|
}
|
|
588
588
|
componentWillRender() {
|
|
589
|
-
|
|
589
|
+
d("nylas-booking-confirmation-type", "componentWillRender");
|
|
590
590
|
}
|
|
591
591
|
componentDidRender() {
|
|
592
|
-
|
|
592
|
+
d("nylas-booking-confirmation-type", "componentDidRender");
|
|
593
593
|
}
|
|
594
594
|
get isInternalsAvailable() {
|
|
595
595
|
return typeof this.internals.setFormValue == "function" && typeof this.internals.setFormValue == "function";
|
|
596
596
|
}
|
|
597
597
|
nylasFormDropdownChangedHandler(e) {
|
|
598
|
-
|
|
598
|
+
d("nylas-booking-confirmation-type", "nylasFormDropdownChangedHandler", e.detail);
|
|
599
599
|
const n = (a) => {
|
|
600
600
|
const { value: t } = a.detail;
|
|
601
601
|
this.selectedBookingType = t, this.internals.setFormValue(t.toString(), this.name);
|
|
@@ -605,15 +605,15 @@ const ga = class {
|
|
|
605
605
|
render() {
|
|
606
606
|
const e = [
|
|
607
607
|
{
|
|
608
|
-
label:
|
|
608
|
+
label: c.t("nylasBookingConfirmationType.bookingOption", { context: "booking" }),
|
|
609
609
|
value: "booking"
|
|
610
610
|
},
|
|
611
611
|
{
|
|
612
|
-
label:
|
|
612
|
+
label: c.t("nylasBookingConfirmationType.bookingOption", { context: "organizerConfirmation" }),
|
|
613
613
|
value: "organizer-confirmation"
|
|
614
614
|
}
|
|
615
615
|
];
|
|
616
|
-
return i(O, { key: "d7a8b1d66ca61c17b00d8d891358a31268f10461" }, this.showDropdown && i("div", { class: "nylas-booking-confirmation-type", part: "nbct" }, e.length > 0 && i("div", { class: "nylas-booking-confirmation-type__dropdown" }, i("span", { class: "label" },
|
|
616
|
+
return i(O, { key: "d7a8b1d66ca61c17b00d8d891358a31268f10461" }, this.showDropdown && i("div", { class: "nylas-booking-confirmation-type", part: "nbct" }, e.length > 0 && i("div", { class: "nylas-booking-confirmation-type__dropdown" }, i("span", { class: "label" }, c.t("nylasBookingConfirmationType.dropdownLabel"), i("tooltip-component", null, i("info-icon", { slot: "tooltip-icon" }), i("span", { slot: "tooltip-content" }, c.t("nylasBookingConfirmationType.tooltip.desc")))), this.selectedBookingType && i("select-dropdown", { name: "booking-type", options: e, withSearch: !1, exportparts: "sd_dropdown: nbct__dropdown, sd_dropdown-button: nbct__dropdown-button, sd_dropdown-content: nbct__dropdown-content", defaultSelectedOption: e.find((n) => n.value == this.selectedBookingType) }))));
|
|
617
617
|
}
|
|
618
618
|
static get formAssociated() {
|
|
619
619
|
return !0;
|
|
@@ -630,7 +630,7 @@ const ga = class {
|
|
|
630
630
|
}
|
|
631
631
|
};
|
|
632
632
|
$t([
|
|
633
|
-
|
|
633
|
+
D({
|
|
634
634
|
name: "nylas-booking-confirmation-type",
|
|
635
635
|
stateToProps: /* @__PURE__ */ new Map([
|
|
636
636
|
["schedulerConfig.selectedConfiguration", "selectedConfiguration"],
|
|
@@ -710,7 +710,7 @@ function Pt(e, n) {
|
|
|
710
710
|
o = t[l], !(n.indexOf(o) >= 0) && (a[o] = e[o]);
|
|
711
711
|
return a;
|
|
712
712
|
}
|
|
713
|
-
function
|
|
713
|
+
function Rt(e, n) {
|
|
714
714
|
if (e == null)
|
|
715
715
|
return {};
|
|
716
716
|
var a = Pt(e, n), t, o;
|
|
@@ -721,12 +721,12 @@ function At(e, n) {
|
|
|
721
721
|
}
|
|
722
722
|
return a;
|
|
723
723
|
}
|
|
724
|
-
var
|
|
724
|
+
var At = "1.15.6";
|
|
725
725
|
function ne(e) {
|
|
726
726
|
if (typeof window < "u" && window.navigator)
|
|
727
727
|
return !!/* @__PURE__ */ navigator.userAgent.match(e);
|
|
728
728
|
}
|
|
729
|
-
var te = ne(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),
|
|
729
|
+
var te = ne(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), Re = ne(/Edge/i), na = ne(/firefox/i), Ie = ne(/safari/i) && !ne(/chrome/i) && !ne(/android/i), Wn = ne(/iP(ad|od|hone)/i), ha = ne(/chrome/i) && ne(/android/i), ba = {
|
|
730
730
|
capture: !1,
|
|
731
731
|
passive: !1
|
|
732
732
|
};
|
|
@@ -813,22 +813,22 @@ function V() {
|
|
|
813
813
|
}
|
|
814
814
|
function $(e, n, a, t, o) {
|
|
815
815
|
if (!(!e.getBoundingClientRect && e !== window)) {
|
|
816
|
-
var l,
|
|
817
|
-
if (e !== window && e.parentNode && e !== V() ? (l = e.getBoundingClientRect(),
|
|
816
|
+
var l, r, s, f, y, u, p;
|
|
817
|
+
if (e !== window && e.parentNode && e !== V() ? (l = e.getBoundingClientRect(), r = l.top, s = l.left, f = l.bottom, y = l.right, u = l.height, p = l.width) : (r = 0, s = 0, f = window.innerHeight, y = window.innerWidth, u = window.innerHeight, p = window.innerWidth), (n || a) && e !== window && (o = o || e.parentNode, !te))
|
|
818
818
|
do
|
|
819
819
|
if (o && o.getBoundingClientRect && (h(o, "transform") !== "none" || a && h(o, "position") !== "static")) {
|
|
820
820
|
var g = o.getBoundingClientRect();
|
|
821
|
-
|
|
821
|
+
r -= g.top + parseInt(h(o, "border-top-width")), s -= g.left + parseInt(h(o, "border-left-width")), f = r + l.height, y = s + l.width;
|
|
822
822
|
break;
|
|
823
823
|
}
|
|
824
824
|
while (o = o.parentNode);
|
|
825
825
|
if (t && e !== window) {
|
|
826
826
|
var v = we(o || e), _ = v && v.a, w = v && v.d;
|
|
827
|
-
v && (
|
|
827
|
+
v && (r /= w, s /= _, p /= _, u /= w, f = r + u, y = s + p);
|
|
828
828
|
}
|
|
829
829
|
return {
|
|
830
|
-
top:
|
|
831
|
-
left:
|
|
830
|
+
top: r,
|
|
831
|
+
left: s,
|
|
832
832
|
bottom: f,
|
|
833
833
|
right: y,
|
|
834
834
|
width: p,
|
|
@@ -838,8 +838,8 @@ function $(e, n, a, t, o) {
|
|
|
838
838
|
}
|
|
839
839
|
function ta(e, n, a) {
|
|
840
840
|
for (var t = ce(e, !0), o = $(e)[n]; t; ) {
|
|
841
|
-
var l = $(t)[a],
|
|
842
|
-
if (a === "top" || a === "left" ?
|
|
841
|
+
var l = $(t)[a], r = void 0;
|
|
842
|
+
if (a === "top" || a === "left" ? r = o >= l : r = o <= l, !r)
|
|
843
843
|
return t;
|
|
844
844
|
if (t === V())
|
|
845
845
|
break;
|
|
@@ -848,10 +848,10 @@ function ta(e, n, a) {
|
|
|
848
848
|
return !1;
|
|
849
849
|
}
|
|
850
850
|
function ke(e, n, a, t) {
|
|
851
|
-
for (var o = 0, l = 0,
|
|
852
|
-
if (
|
|
851
|
+
for (var o = 0, l = 0, r = e.children; l < r.length; ) {
|
|
852
|
+
if (r[l].style.display !== "none" && r[l] !== b.ghost && (t || r[l] !== b.dragged) && X(r[l], a.draggable, e, !1)) {
|
|
853
853
|
if (o === n)
|
|
854
|
-
return
|
|
854
|
+
return r[l];
|
|
855
855
|
o++;
|
|
856
856
|
}
|
|
857
857
|
l++;
|
|
@@ -875,8 +875,8 @@ function la(e) {
|
|
|
875
875
|
var n = 0, a = 0, t = V();
|
|
876
876
|
if (e)
|
|
877
877
|
do {
|
|
878
|
-
var o = we(e), l = o.a,
|
|
879
|
-
n += e.scrollLeft * l, a += e.scrollTop *
|
|
878
|
+
var o = we(e), l = o.a, r = o.d;
|
|
879
|
+
n += e.scrollLeft * l, a += e.scrollTop * r;
|
|
880
880
|
} while (e !== t && (e = e.parentNode));
|
|
881
881
|
return [n, a];
|
|
882
882
|
}
|
|
@@ -913,7 +913,7 @@ function zt(e, n) {
|
|
|
913
913
|
n.hasOwnProperty(a) && (e[a] = n[a]);
|
|
914
914
|
return e;
|
|
915
915
|
}
|
|
916
|
-
function
|
|
916
|
+
function rn(e, n) {
|
|
917
917
|
return Math.round(e.top) === Math.round(n.top) && Math.round(e.left) === Math.round(n.left) && Math.round(e.height) === Math.round(n.height) && Math.round(e.width) === Math.round(n.width);
|
|
918
918
|
}
|
|
919
919
|
var Te;
|
|
@@ -940,10 +940,10 @@ function ka(e) {
|
|
|
940
940
|
function xa(e, n, a) {
|
|
941
941
|
var t = {};
|
|
942
942
|
return Array.from(e.children).forEach(function(o) {
|
|
943
|
-
var l,
|
|
943
|
+
var l, r, s, f;
|
|
944
944
|
if (!(!X(o, n.draggable, e, !1) || o.animated || o === a)) {
|
|
945
945
|
var y = $(o);
|
|
946
|
-
t.left = Math.min((l = t.left) !== null && l !== void 0 ? l : 1 / 0, y.left), t.top = Math.min((
|
|
946
|
+
t.left = Math.min((l = t.left) !== null && l !== void 0 ? l : 1 / 0, y.left), t.top = Math.min((r = t.top) !== null && r !== void 0 ? r : 1 / 0, y.top), t.right = Math.max((s = t.right) !== null && s !== void 0 ? s : -1 / 0, y.right), t.bottom = Math.max((f = t.bottom) !== null && f !== void 0 ? f : -1 / 0, y.bottom);
|
|
947
947
|
}
|
|
948
948
|
}), t.width = t.right - t.left, t.height = t.bottom - t.top, t.x = t.left, t.y = t.top, t;
|
|
949
949
|
}
|
|
@@ -962,8 +962,8 @@ function jt() {
|
|
|
962
962
|
});
|
|
963
963
|
var l = Q({}, e[e.length - 1].rect);
|
|
964
964
|
if (o.thisAnimationDuration) {
|
|
965
|
-
var
|
|
966
|
-
|
|
965
|
+
var r = we(o, !0);
|
|
966
|
+
r && (l.top -= r.f, l.left -= r.e);
|
|
967
967
|
}
|
|
968
968
|
o.fromRect = l;
|
|
969
969
|
}
|
|
@@ -984,24 +984,24 @@ function jt() {
|
|
|
984
984
|
clearTimeout(n), typeof t == "function" && t();
|
|
985
985
|
return;
|
|
986
986
|
}
|
|
987
|
-
var l = !1,
|
|
988
|
-
e.forEach(function(
|
|
989
|
-
var f = 0, y =
|
|
990
|
-
w && (p.top -= w.f, p.left -= w.e), y.toRect = p, y.thisAnimationDuration &&
|
|
991
|
-
(_.top - p.top) / (_.left - p.left) === (u.top - p.top) / (u.left - p.left) && (f = Ut(_, g, v, o.options)),
|
|
987
|
+
var l = !1, r = 0;
|
|
988
|
+
e.forEach(function(s) {
|
|
989
|
+
var f = 0, y = s.target, u = y.fromRect, p = $(y), g = y.prevFromRect, v = y.prevToRect, _ = s.rect, w = we(y, !0);
|
|
990
|
+
w && (p.top -= w.f, p.left -= w.e), y.toRect = p, y.thisAnimationDuration && rn(g, p) && !rn(u, p) && // Make sure animatingRect is on line between toRect & fromRect
|
|
991
|
+
(_.top - p.top) / (_.left - p.left) === (u.top - p.top) / (u.left - p.left) && (f = Ut(_, g, v, o.options)), rn(p, u) || (y.prevFromRect = u, y.prevToRect = p, f || (f = o.options.animation), o.animate(y, _, p, f)), f && (l = !0, r = Math.max(r, f), clearTimeout(y.animationResetTimer), y.animationResetTimer = setTimeout(function() {
|
|
992
992
|
y.animationTime = 0, y.prevFromRect = null, y.fromRect = null, y.prevToRect = null, y.thisAnimationDuration = null;
|
|
993
993
|
}, f), y.thisAnimationDuration = f);
|
|
994
994
|
}), clearTimeout(n), l ? n = setTimeout(function() {
|
|
995
995
|
typeof t == "function" && t();
|
|
996
|
-
},
|
|
996
|
+
}, r) : typeof t == "function" && t(), e = [];
|
|
997
997
|
},
|
|
998
|
-
animate: function(t, o, l,
|
|
999
|
-
if (
|
|
998
|
+
animate: function(t, o, l, r) {
|
|
999
|
+
if (r) {
|
|
1000
1000
|
h(t, "transition", ""), h(t, "transform", "");
|
|
1001
|
-
var
|
|
1002
|
-
t.animatingX = !!u, t.animatingY = !!p, h(t, "transform", "translate3d(" + u + "px," + p + "px,0)"), this.forRepaintDummy = Wt(t), h(t, "transition", "transform " +
|
|
1001
|
+
var s = we(this.el), f = s && s.a, y = s && s.d, u = (o.left - l.left) / (f || 1), p = (o.top - l.top) / (y || 1);
|
|
1002
|
+
t.animatingX = !!u, t.animatingY = !!p, h(t, "transform", "translate3d(" + u + "px," + p + "px,0)"), this.forRepaintDummy = Wt(t), h(t, "transition", "transform " + r + "ms" + (this.options.easing ? " " + this.options.easing : "")), h(t, "transform", "translate3d(0,0,0)"), typeof t.animated == "number" && clearTimeout(t.animated), t.animated = setTimeout(function() {
|
|
1003
1003
|
h(t, "transition", ""), h(t, "transform", ""), t.animated = !1, t.animatingX = !1, t.animatingY = !1;
|
|
1004
|
-
},
|
|
1004
|
+
}, r);
|
|
1005
1005
|
}
|
|
1006
1006
|
}
|
|
1007
1007
|
};
|
|
@@ -1012,12 +1012,12 @@ function Wt(e) {
|
|
|
1012
1012
|
function Ut(e, n, a, t) {
|
|
1013
1013
|
return Math.sqrt(Math.pow(n.top - e.top, 2) + Math.pow(n.left - e.left, 2)) / Math.sqrt(Math.pow(n.top - a.top, 2) + Math.pow(n.left - a.left, 2)) * t.animation;
|
|
1014
1014
|
}
|
|
1015
|
-
var be = [],
|
|
1015
|
+
var be = [], sn = {
|
|
1016
1016
|
initializeByDefault: !0
|
|
1017
|
-
},
|
|
1017
|
+
}, Ae = {
|
|
1018
1018
|
mount: function(n) {
|
|
1019
|
-
for (var a in
|
|
1020
|
-
|
|
1019
|
+
for (var a in sn)
|
|
1020
|
+
sn.hasOwnProperty(a) && !(a in n) && (n[a] = sn[a]);
|
|
1021
1021
|
be.forEach(function(t) {
|
|
1022
1022
|
if (t.pluginName === n.pluginName)
|
|
1023
1023
|
throw "Sortable: Cannot mount plugin ".concat(n.pluginName, " more than once");
|
|
@@ -1029,26 +1029,26 @@ var be = [], rn = {
|
|
|
1029
1029
|
o.eventCanceled = !0;
|
|
1030
1030
|
};
|
|
1031
1031
|
var l = n + "Global";
|
|
1032
|
-
be.forEach(function(
|
|
1033
|
-
a[
|
|
1032
|
+
be.forEach(function(r) {
|
|
1033
|
+
a[r.pluginName] && (a[r.pluginName][l] && a[r.pluginName][l](Q({
|
|
1034
1034
|
sortable: a
|
|
1035
|
-
}, t)), a.options[
|
|
1035
|
+
}, t)), a.options[r.pluginName] && a[r.pluginName][n] && a[r.pluginName][n](Q({
|
|
1036
1036
|
sortable: a
|
|
1037
1037
|
}, t)));
|
|
1038
1038
|
});
|
|
1039
1039
|
},
|
|
1040
1040
|
initializePlugins: function(n, a, t, o) {
|
|
1041
|
-
be.forEach(function(
|
|
1042
|
-
var f =
|
|
1043
|
-
if (!(!n.options[f] && !
|
|
1044
|
-
var y = new
|
|
1041
|
+
be.forEach(function(s) {
|
|
1042
|
+
var f = s.pluginName;
|
|
1043
|
+
if (!(!n.options[f] && !s.initializeByDefault)) {
|
|
1044
|
+
var y = new s(n, a, n.options);
|
|
1045
1045
|
y.sortable = n, y.options = n.options, n[f] = y, ae(t, y.defaults);
|
|
1046
1046
|
}
|
|
1047
1047
|
});
|
|
1048
1048
|
for (var l in n.options)
|
|
1049
1049
|
if (n.options.hasOwnProperty(l)) {
|
|
1050
|
-
var
|
|
1051
|
-
typeof
|
|
1050
|
+
var r = this.modifyOption(n, l, n.options[l]);
|
|
1051
|
+
typeof r < "u" && (n.options[l] = r);
|
|
1052
1052
|
}
|
|
1053
1053
|
},
|
|
1054
1054
|
getEventProperties: function(n, a) {
|
|
@@ -1065,50 +1065,50 @@ var be = [], rn = {
|
|
|
1065
1065
|
}
|
|
1066
1066
|
};
|
|
1067
1067
|
function qt(e) {
|
|
1068
|
-
var n = e.sortable, a = e.rootEl, t = e.name, o = e.targetEl, l = e.cloneEl,
|
|
1068
|
+
var n = e.sortable, a = e.rootEl, t = e.name, o = e.targetEl, l = e.cloneEl, r = e.toEl, s = e.fromEl, f = e.oldIndex, y = e.newIndex, u = e.oldDraggableIndex, p = e.newDraggableIndex, g = e.originalEvent, v = e.putSortable, _ = e.extraEventProperties;
|
|
1069
1069
|
if (n = n || a && a[j], !!n) {
|
|
1070
1070
|
var w, P = n.options, N = "on" + t.charAt(0).toUpperCase() + t.substr(1);
|
|
1071
|
-
window.CustomEvent && !te && !
|
|
1071
|
+
window.CustomEvent && !te && !Re ? w = new CustomEvent(t, {
|
|
1072
1072
|
bubbles: !0,
|
|
1073
1073
|
cancelable: !0
|
|
1074
|
-
}) : (w = document.createEvent("Event"), w.initEvent(t, !0, !0)), w.to =
|
|
1075
|
-
var
|
|
1076
|
-
for (var Z in
|
|
1077
|
-
w[Z] =
|
|
1074
|
+
}) : (w = document.createEvent("Event"), w.initEvent(t, !0, !0)), w.to = r || a, w.from = s || a, w.item = o || a, w.clone = l, w.oldIndex = f, w.newIndex = y, w.oldDraggableIndex = u, w.newDraggableIndex = p, w.originalEvent = g, w.pullMode = v ? v.lastPutMode : void 0;
|
|
1075
|
+
var R = Q(Q({}, _), Ae.getEventProperties(t, n));
|
|
1076
|
+
for (var Z in R)
|
|
1077
|
+
w[Z] = R[Z];
|
|
1078
1078
|
a && a.dispatchEvent(w), P[N] && P[N].call(n, w);
|
|
1079
1079
|
}
|
|
1080
1080
|
}
|
|
1081
1081
|
var Jt = ["evt"], B = function(n, a) {
|
|
1082
|
-
var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, o = t.evt, l =
|
|
1083
|
-
|
|
1082
|
+
var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, o = t.evt, l = Rt(t, Jt);
|
|
1083
|
+
Ae.pluginEvent.bind(b)(n, a, Q({
|
|
1084
1084
|
dragEl: m,
|
|
1085
|
-
parentEl:
|
|
1085
|
+
parentEl: I,
|
|
1086
1086
|
ghostEl: C,
|
|
1087
|
-
rootEl:
|
|
1087
|
+
rootEl: L,
|
|
1088
1088
|
nextEl: me,
|
|
1089
1089
|
lastDownEl: Je,
|
|
1090
|
-
cloneEl:
|
|
1091
|
-
cloneHidden:
|
|
1092
|
-
dragStarted:
|
|
1093
|
-
putSortable:
|
|
1090
|
+
cloneEl: F,
|
|
1091
|
+
cloneHidden: se,
|
|
1092
|
+
dragStarted: De,
|
|
1093
|
+
putSortable: A,
|
|
1094
1094
|
activeSortable: b.active,
|
|
1095
1095
|
originalEvent: o,
|
|
1096
1096
|
oldIndex: Ce,
|
|
1097
1097
|
oldDraggableIndex: $e,
|
|
1098
1098
|
newIndex: J,
|
|
1099
|
-
newDraggableIndex:
|
|
1099
|
+
newDraggableIndex: re,
|
|
1100
1100
|
hideGhostForTarget: Ha,
|
|
1101
|
-
unhideGhostForTarget:
|
|
1101
|
+
unhideGhostForTarget: Da,
|
|
1102
1102
|
cloneNowHidden: function() {
|
|
1103
|
-
|
|
1103
|
+
se = !0;
|
|
1104
1104
|
},
|
|
1105
1105
|
cloneNowShown: function() {
|
|
1106
|
-
|
|
1106
|
+
se = !1;
|
|
1107
1107
|
},
|
|
1108
|
-
dispatchSortableEvent: function(
|
|
1108
|
+
dispatchSortableEvent: function(s) {
|
|
1109
1109
|
z({
|
|
1110
1110
|
sortable: a,
|
|
1111
|
-
name:
|
|
1111
|
+
name: s,
|
|
1112
1112
|
originalEvent: o
|
|
1113
1113
|
});
|
|
1114
1114
|
}
|
|
@@ -1116,17 +1116,17 @@ var Jt = ["evt"], B = function(n, a) {
|
|
|
1116
1116
|
};
|
|
1117
1117
|
function z(e) {
|
|
1118
1118
|
qt(Q({
|
|
1119
|
-
putSortable:
|
|
1120
|
-
cloneEl:
|
|
1119
|
+
putSortable: A,
|
|
1120
|
+
cloneEl: F,
|
|
1121
1121
|
targetEl: m,
|
|
1122
|
-
rootEl:
|
|
1122
|
+
rootEl: L,
|
|
1123
1123
|
oldIndex: Ce,
|
|
1124
1124
|
oldDraggableIndex: $e,
|
|
1125
1125
|
newIndex: J,
|
|
1126
|
-
newDraggableIndex:
|
|
1126
|
+
newDraggableIndex: re
|
|
1127
1127
|
}, e));
|
|
1128
1128
|
}
|
|
1129
|
-
var m,
|
|
1129
|
+
var m, I, C, L, me, Je, F, se, Ce, J, $e, re, ze, A, _e = !1, Ke = !1, Ve = [], pe, Y, cn, dn, oa, ia, De, ve, Ne, Pe = !1, Be = !1, Ge, M, fn = [], An = !1, Qe = [], nn = typeof document < "u", je = Wn, ra = Re || te ? "cssFloat" : "float", Gt = nn && !ha && !Wn && "draggable" in document.createElement("div"), Ea = function() {
|
|
1130
1130
|
if (nn) {
|
|
1131
1131
|
if (te)
|
|
1132
1132
|
return !1;
|
|
@@ -1134,42 +1134,42 @@ var m, F, C, D, me, Je, I, re, Ce, J, $e, se, ze, R, _e = !1, Ke = !1, Ve = [],
|
|
|
1134
1134
|
return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
|
|
1135
1135
|
}
|
|
1136
1136
|
}(), Sa = function(n, a) {
|
|
1137
|
-
var t = h(n), o = parseInt(t.width) - parseInt(t.paddingLeft) - parseInt(t.paddingRight) - parseInt(t.borderLeftWidth) - parseInt(t.borderRightWidth), l = ke(n, 0, a),
|
|
1137
|
+
var t = h(n), o = parseInt(t.width) - parseInt(t.paddingLeft) - parseInt(t.paddingRight) - parseInt(t.borderLeftWidth) - parseInt(t.borderRightWidth), l = ke(n, 0, a), r = ke(n, 1, a), s = l && h(l), f = r && h(r), y = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + $(l).width, u = f && parseInt(f.marginLeft) + parseInt(f.marginRight) + $(r).width;
|
|
1138
1138
|
if (t.display === "flex")
|
|
1139
1139
|
return t.flexDirection === "column" || t.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
1140
1140
|
if (t.display === "grid")
|
|
1141
1141
|
return t.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
1142
|
-
if (l &&
|
|
1143
|
-
var p =
|
|
1144
|
-
return
|
|
1142
|
+
if (l && s.float && s.float !== "none") {
|
|
1143
|
+
var p = s.float === "left" ? "left" : "right";
|
|
1144
|
+
return r && (f.clear === "both" || f.clear === p) ? "vertical" : "horizontal";
|
|
1145
1145
|
}
|
|
1146
|
-
return l && (
|
|
1146
|
+
return l && (s.display === "block" || s.display === "flex" || s.display === "table" || s.display === "grid" || y >= o && t[ra] === "none" || r && t[ra] === "none" && y + u > o) ? "vertical" : "horizontal";
|
|
1147
1147
|
}, Zt = function(n, a, t) {
|
|
1148
|
-
var o = t ? n.left : n.top, l = t ? n.right : n.bottom,
|
|
1149
|
-
return o ===
|
|
1148
|
+
var o = t ? n.left : n.top, l = t ? n.right : n.bottom, r = t ? n.width : n.height, s = t ? a.left : a.top, f = t ? a.right : a.bottom, y = t ? a.width : a.height;
|
|
1149
|
+
return o === s || l === f || o + r / 2 === s + y / 2;
|
|
1150
1150
|
}, Yt = function(n, a) {
|
|
1151
1151
|
var t;
|
|
1152
1152
|
return Ve.some(function(o) {
|
|
1153
1153
|
var l = o[j].options.emptyInsertThreshold;
|
|
1154
1154
|
if (!(!l || Un(o))) {
|
|
1155
|
-
var
|
|
1156
|
-
if (
|
|
1155
|
+
var r = $(o), s = n >= r.left - l && n <= r.right + l, f = a >= r.top - l && a <= r.bottom + l;
|
|
1156
|
+
if (s && f)
|
|
1157
1157
|
return t = o;
|
|
1158
1158
|
}
|
|
1159
1159
|
}), t;
|
|
1160
1160
|
}, Oa = function(n) {
|
|
1161
|
-
function a(l,
|
|
1162
|
-
return function(
|
|
1163
|
-
var p =
|
|
1164
|
-
if (l == null && (
|
|
1161
|
+
function a(l, r) {
|
|
1162
|
+
return function(s, f, y, u) {
|
|
1163
|
+
var p = s.options.group.name && f.options.group.name && s.options.group.name === f.options.group.name;
|
|
1164
|
+
if (l == null && (r || p))
|
|
1165
1165
|
return !0;
|
|
1166
1166
|
if (l == null || l === !1)
|
|
1167
1167
|
return !1;
|
|
1168
|
-
if (
|
|
1168
|
+
if (r && l === "clone")
|
|
1169
1169
|
return l;
|
|
1170
1170
|
if (typeof l == "function")
|
|
1171
|
-
return a(l(
|
|
1172
|
-
var g = (
|
|
1171
|
+
return a(l(s, f, y, u), r)(s, f, y, u);
|
|
1172
|
+
var g = (r ? s : f).options.group.name;
|
|
1173
1173
|
return l === !0 || typeof l == "string" && l === g || l.join && l.indexOf(g) > -1;
|
|
1174
1174
|
};
|
|
1175
1175
|
}
|
|
@@ -1179,7 +1179,7 @@ var m, F, C, D, me, Je, I, re, Ce, J, $e, se, ze, R, _e = !1, Ke = !1, Ve = [],
|
|
|
1179
1179
|
}), t.name = o.name, t.checkPull = a(o.pull, !0), t.checkPut = a(o.put), t.revertClone = o.revertClone, n.group = t;
|
|
1180
1180
|
}, Ha = function() {
|
|
1181
1181
|
!Ea && C && h(C, "display", "none");
|
|
1182
|
-
},
|
|
1182
|
+
}, Da = function() {
|
|
1183
1183
|
!Ea && C && h(C, "display", "");
|
|
1184
1184
|
};
|
|
1185
1185
|
nn && !ha && document.addEventListener("click", function(e) {
|
|
@@ -1229,8 +1229,8 @@ function b(e, n) {
|
|
|
1229
1229
|
preventOnFilter: !0,
|
|
1230
1230
|
animation: 0,
|
|
1231
1231
|
easing: null,
|
|
1232
|
-
setData: function(
|
|
1233
|
-
|
|
1232
|
+
setData: function(r, s) {
|
|
1233
|
+
r.setData("Text", s.textContent);
|
|
1234
1234
|
},
|
|
1235
1235
|
dropBubble: !1,
|
|
1236
1236
|
dragoverBubble: !1,
|
|
@@ -1247,10 +1247,10 @@ function b(e, n) {
|
|
|
1247
1247
|
y: 0
|
|
1248
1248
|
},
|
|
1249
1249
|
// Disabled on Safari: #1571; Enabled on Safari IOS: #2244
|
|
1250
|
-
supportPointer: b.supportPointer !== !1 && "PointerEvent" in window && (!
|
|
1250
|
+
supportPointer: b.supportPointer !== !1 && "PointerEvent" in window && (!Ie || Wn),
|
|
1251
1251
|
emptyInsertThreshold: 5
|
|
1252
1252
|
};
|
|
1253
|
-
|
|
1253
|
+
Ae.initializePlugins(this, e, a);
|
|
1254
1254
|
for (var t in a)
|
|
1255
1255
|
!(t in n) && (n[t] = a[t]);
|
|
1256
1256
|
Oa(n);
|
|
@@ -1269,8 +1269,8 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
1269
1269
|
},
|
|
1270
1270
|
_onTapStart: function(n) {
|
|
1271
1271
|
if (n.cancelable) {
|
|
1272
|
-
var a = this, t = this.el, o = this.options, l = o.preventOnFilter,
|
|
1273
|
-
if (ll(t), !m && !(/mousedown|pointerdown/.test(
|
|
1272
|
+
var a = this, t = this.el, o = this.options, l = o.preventOnFilter, r = n.type, s = n.touches && n.touches[0] || n.pointerType && n.pointerType === "touch" && n, f = (s || n).target, y = n.target.shadowRoot && (n.path && n.path[0] || n.composedPath && n.composedPath()[0]) || f, u = o.filter;
|
|
1273
|
+
if (ll(t), !m && !(/mousedown|pointerdown/.test(r) && n.button !== 0 || o.disabled) && !y.isContentEditable && !(!this.nativeDraggable && Ie && f && f.tagName.toUpperCase() === "SELECT") && (f = X(f, o.draggable, t, !1), !(f && f.animated) && Je !== f)) {
|
|
1274
1274
|
if (Ce = G(f), $e = G(f, o.draggable), typeof u == "function") {
|
|
1275
1275
|
if (u.call(this, n, f, this)) {
|
|
1276
1276
|
z({
|
|
@@ -1301,15 +1301,15 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
1301
1301
|
l && n.preventDefault();
|
|
1302
1302
|
return;
|
|
1303
1303
|
}
|
|
1304
|
-
o.handle && !X(y, o.handle, t, !1) || this._prepareDragStart(n,
|
|
1304
|
+
o.handle && !X(y, o.handle, t, !1) || this._prepareDragStart(n, s, f);
|
|
1305
1305
|
}
|
|
1306
1306
|
}
|
|
1307
1307
|
},
|
|
1308
1308
|
_prepareDragStart: function(n, a, t) {
|
|
1309
|
-
var o = this, l = o.el,
|
|
1309
|
+
var o = this, l = o.el, r = o.options, s = l.ownerDocument, f;
|
|
1310
1310
|
if (t && !m && t.parentNode === l) {
|
|
1311
1311
|
var y = $(t);
|
|
1312
|
-
if (
|
|
1312
|
+
if (L = l, m = t, I = m.parentNode, me = m.nextSibling, Je = t, ze = r.group, b.dragged = m, pe = {
|
|
1313
1313
|
target: m,
|
|
1314
1314
|
clientX: (a || n).clientX,
|
|
1315
1315
|
clientY: (a || n).clientY
|
|
@@ -1324,17 +1324,17 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
1324
1324
|
sortable: o,
|
|
1325
1325
|
name: "choose",
|
|
1326
1326
|
originalEvent: n
|
|
1327
|
-
}), q(m,
|
|
1328
|
-
},
|
|
1327
|
+
}), q(m, r.chosenClass, !0);
|
|
1328
|
+
}, r.ignore.split(",").forEach(function(u) {
|
|
1329
1329
|
_a(m, u.trim(), yn);
|
|
1330
|
-
}), E(
|
|
1330
|
+
}), E(s, "dragover", ue), E(s, "mousemove", ue), E(s, "touchmove", ue), r.supportPointer ? (E(s, "pointerup", o._onDrop), !this.nativeDraggable && E(s, "pointercancel", o._onDrop)) : (E(s, "mouseup", o._onDrop), E(s, "touchend", o._onDrop), E(s, "touchcancel", o._onDrop)), na && this.nativeDraggable && (this.options.touchStartThreshold = 4, m.draggable = !0), B("delayStart", this, {
|
|
1331
1331
|
evt: n
|
|
1332
|
-
}),
|
|
1332
|
+
}), r.delay && (!r.delayOnTouchOnly || a) && (!this.nativeDraggable || !(Re || te))) {
|
|
1333
1333
|
if (b.eventCanceled) {
|
|
1334
1334
|
this._onDrop();
|
|
1335
1335
|
return;
|
|
1336
1336
|
}
|
|
1337
|
-
|
|
1337
|
+
r.supportPointer ? (E(s, "pointerup", o._disableDelayedDrag), E(s, "pointercancel", o._disableDelayedDrag)) : (E(s, "mouseup", o._disableDelayedDrag), E(s, "touchend", o._disableDelayedDrag), E(s, "touchcancel", o._disableDelayedDrag)), E(s, "mousemove", o._delayedDragTouchMoveHandler), E(s, "touchmove", o._delayedDragTouchMoveHandler), r.supportPointer && E(s, "pointermove", o._delayedDragTouchMoveHandler), o._dragStartTimer = setTimeout(f, r.delay);
|
|
1338
1338
|
} else
|
|
1339
1339
|
f();
|
|
1340
1340
|
}
|
|
@@ -1351,7 +1351,7 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
1351
1351
|
k(n, "mouseup", this._disableDelayedDrag), k(n, "touchend", this._disableDelayedDrag), k(n, "touchcancel", this._disableDelayedDrag), k(n, "pointerup", this._disableDelayedDrag), k(n, "pointercancel", this._disableDelayedDrag), k(n, "mousemove", this._delayedDragTouchMoveHandler), k(n, "touchmove", this._delayedDragTouchMoveHandler), k(n, "pointermove", this._delayedDragTouchMoveHandler);
|
|
1352
1352
|
},
|
|
1353
1353
|
_triggerDragStart: function(n, a) {
|
|
1354
|
-
a = a || n.pointerType == "touch" && n, !this.nativeDraggable || a ? this.options.supportPointer ? E(document, "pointermove", this._onTouchMove) : a ? E(document, "touchmove", this._onTouchMove) : E(document, "mousemove", this._onTouchMove) : (E(m, "dragend", this), E(
|
|
1354
|
+
a = a || n.pointerType == "touch" && n, !this.nativeDraggable || a ? this.options.supportPointer ? E(document, "pointermove", this._onTouchMove) : a ? E(document, "touchmove", this._onTouchMove) : E(document, "mousemove", this._onTouchMove) : (E(m, "dragend", this), E(L, "dragstart", this._onDragStart));
|
|
1355
1355
|
try {
|
|
1356
1356
|
document.selection ? Ze(function() {
|
|
1357
1357
|
document.selection.empty();
|
|
@@ -1360,7 +1360,7 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
1360
1360
|
}
|
|
1361
1361
|
},
|
|
1362
1362
|
_dragStarted: function(n, a) {
|
|
1363
|
-
if (_e = !1,
|
|
1363
|
+
if (_e = !1, L && m) {
|
|
1364
1364
|
B("dragStarted", this, {
|
|
1365
1365
|
evt: a
|
|
1366
1366
|
}), this.nativeDraggable && E(document, "dragover", Xt);
|
|
@@ -1392,19 +1392,19 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
1392
1392
|
}
|
|
1393
1393
|
n = a;
|
|
1394
1394
|
} while (a = va(a));
|
|
1395
|
-
|
|
1395
|
+
Da();
|
|
1396
1396
|
}
|
|
1397
1397
|
},
|
|
1398
1398
|
_onTouchMove: function(n) {
|
|
1399
1399
|
if (pe) {
|
|
1400
|
-
var a = this.options, t = a.fallbackTolerance, o = a.fallbackOffset, l = n.touches ? n.touches[0] : n,
|
|
1400
|
+
var a = this.options, t = a.fallbackTolerance, o = a.fallbackOffset, l = n.touches ? n.touches[0] : n, r = C && we(C, !0), s = C && r && r.a, f = C && r && r.d, y = je && M && la(M), u = (l.clientX - pe.clientX + o.x) / (s || 1) + (y ? y[0] - fn[0] : 0) / (s || 1), p = (l.clientY - pe.clientY + o.y) / (f || 1) + (y ? y[1] - fn[1] : 0) / (f || 1);
|
|
1401
1401
|
if (!b.active && !_e) {
|
|
1402
1402
|
if (t && Math.max(Math.abs(l.clientX - this._lastX), Math.abs(l.clientY - this._lastY)) < t)
|
|
1403
1403
|
return;
|
|
1404
1404
|
this._onDragStart(n, !0);
|
|
1405
1405
|
}
|
|
1406
1406
|
if (C) {
|
|
1407
|
-
|
|
1407
|
+
r ? (r.e += u - (cn || 0), r.f += p - (dn || 0)) : r = {
|
|
1408
1408
|
a: 1,
|
|
1409
1409
|
b: 0,
|
|
1410
1410
|
c: 0,
|
|
@@ -1412,7 +1412,7 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
1412
1412
|
e: u,
|
|
1413
1413
|
f: p
|
|
1414
1414
|
};
|
|
1415
|
-
var g = "matrix(".concat(
|
|
1415
|
+
var g = "matrix(".concat(r.a, ",").concat(r.b, ",").concat(r.c, ",").concat(r.d, ",").concat(r.e, ",").concat(r.f, ")");
|
|
1416
1416
|
h(C, "webkitTransform", g), h(C, "mozTransform", g), h(C, "msTransform", g), h(C, "transform", g), cn = u, dn = p, Y = l;
|
|
1417
1417
|
}
|
|
1418
1418
|
n.cancelable && n.preventDefault();
|
|
@@ -1420,7 +1420,7 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
1420
1420
|
},
|
|
1421
1421
|
_appendGhost: function() {
|
|
1422
1422
|
if (!C) {
|
|
1423
|
-
var n = this.options.fallbackOnBody ? document.body :
|
|
1423
|
+
var n = this.options.fallbackOnBody ? document.body : L, a = $(m, !0, je, !0, n), t = this.options;
|
|
1424
1424
|
if (je) {
|
|
1425
1425
|
for (M = n; h(M, "position") === "static" && h(M, "transform") === "none" && M !== document; )
|
|
1426
1426
|
M = M.parentNode;
|
|
@@ -1437,32 +1437,32 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
1437
1437
|
this._onDrop();
|
|
1438
1438
|
return;
|
|
1439
1439
|
}
|
|
1440
|
-
B("setupClone", this), b.eventCanceled || (
|
|
1441
|
-
B("clone", t), !b.eventCanceled && (t.options.removeCloneOnHide ||
|
|
1440
|
+
B("setupClone", this), b.eventCanceled || (F = ka(m), F.removeAttribute("id"), F.draggable = !1, F.style["will-change"] = "", this._hideClone(), q(F, this.options.chosenClass, !1), b.clone = F), t.cloneId = Ze(function() {
|
|
1441
|
+
B("clone", t), !b.eventCanceled && (t.options.removeCloneOnHide || L.insertBefore(F, m), t._hideClone(), z({
|
|
1442
1442
|
sortable: t,
|
|
1443
1443
|
name: "clone"
|
|
1444
1444
|
}));
|
|
1445
|
-
}), !a && q(m, l.dragClass, !0), a ? (Ke = !0, t._loopId = setInterval(t._emulateDragOver, 50)) : (k(document, "mouseup", t._onDrop), k(document, "touchend", t._onDrop), k(document, "touchcancel", t._onDrop), o && (o.effectAllowed = "move", l.setData && l.setData.call(t, o, m)), E(document, "drop", t), h(m, "transform", "translateZ(0)")), _e = !0, t._dragStartId = Ze(t._dragStarted.bind(t, a, n)), E(document, "selectstart", t),
|
|
1445
|
+
}), !a && q(m, l.dragClass, !0), a ? (Ke = !0, t._loopId = setInterval(t._emulateDragOver, 50)) : (k(document, "mouseup", t._onDrop), k(document, "touchend", t._onDrop), k(document, "touchcancel", t._onDrop), o && (o.effectAllowed = "move", l.setData && l.setData.call(t, o, m)), E(document, "drop", t), h(m, "transform", "translateZ(0)")), _e = !0, t._dragStartId = Ze(t._dragStarted.bind(t, a, n)), E(document, "selectstart", t), De = !0, window.getSelection().removeAllRanges(), Ie && h(document.body, "user-select", "none");
|
|
1446
1446
|
},
|
|
1447
1447
|
// Returns true - if no further action is needed (either inserted or another condition)
|
|
1448
1448
|
_onDragOver: function(n) {
|
|
1449
|
-
var a = this.el, t = n.target, o, l,
|
|
1450
|
-
if (
|
|
1449
|
+
var a = this.el, t = n.target, o, l, r, s = this.options, f = s.group, y = b.active, u = ze === f, p = s.sort, g = A || y, v, _ = this, w = !1;
|
|
1450
|
+
if (An)
|
|
1451
1451
|
return;
|
|
1452
1452
|
function P(He, Qa) {
|
|
1453
1453
|
B(He, _, Q({
|
|
1454
1454
|
evt: n,
|
|
1455
1455
|
isOwner: u,
|
|
1456
1456
|
axis: v ? "vertical" : "horizontal",
|
|
1457
|
-
revert:
|
|
1457
|
+
revert: r,
|
|
1458
1458
|
dragRect: o,
|
|
1459
1459
|
targetRect: l,
|
|
1460
1460
|
canSort: p,
|
|
1461
1461
|
fromSortable: g,
|
|
1462
1462
|
target: t,
|
|
1463
|
-
completed:
|
|
1463
|
+
completed: R,
|
|
1464
1464
|
onMove: function(Gn, et) {
|
|
1465
|
-
return We(
|
|
1465
|
+
return We(L, a, m, o, Gn, $(Gn), n, et);
|
|
1466
1466
|
},
|
|
1467
1467
|
changed: Z
|
|
1468
1468
|
}, Qa));
|
|
@@ -1470,66 +1470,66 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
1470
1470
|
function N() {
|
|
1471
1471
|
P("dragOverAnimationCapture"), _.captureAnimationState(), _ !== g && g.captureAnimationState();
|
|
1472
1472
|
}
|
|
1473
|
-
function
|
|
1473
|
+
function R(He) {
|
|
1474
1474
|
return P("dragOverCompleted", {
|
|
1475
1475
|
insertion: He
|
|
1476
|
-
}), He && (u ? y._hideClone() : y._showClone(_), _ !== g && (q(m,
|
|
1476
|
+
}), He && (u ? y._hideClone() : y._showClone(_), _ !== g && (q(m, A ? A.options.ghostClass : y.options.ghostClass, !1), q(m, s.ghostClass, !0)), A !== _ && _ !== b.active ? A = _ : _ === b.active && A && (A = null), g === _ && (_._ignoreWhileAnimating = t), _.animateAll(function() {
|
|
1477
1477
|
P("dragOverAnimationComplete"), _._ignoreWhileAnimating = null;
|
|
1478
|
-
}), _ !== g && (g.animateAll(), g._ignoreWhileAnimating = null)), (t === m && !m.animated || t === a && !t.animated) && (ve = null), !
|
|
1478
|
+
}), _ !== g && (g.animateAll(), g._ignoreWhileAnimating = null)), (t === m && !m.animated || t === a && !t.animated) && (ve = null), !s.dragoverBubble && !n.rootEl && t !== document && (m.parentNode[j]._isOutsideThisEl(n.target), !He && ue(n)), !s.dragoverBubble && n.stopPropagation && n.stopPropagation(), w = !0;
|
|
1479
1479
|
}
|
|
1480
1480
|
function Z() {
|
|
1481
|
-
J = G(m),
|
|
1481
|
+
J = G(m), re = G(m, s.draggable), z({
|
|
1482
1482
|
sortable: _,
|
|
1483
1483
|
name: "change",
|
|
1484
1484
|
toEl: a,
|
|
1485
1485
|
newIndex: J,
|
|
1486
|
-
newDraggableIndex:
|
|
1486
|
+
newDraggableIndex: re,
|
|
1487
1487
|
originalEvent: n
|
|
1488
1488
|
});
|
|
1489
1489
|
}
|
|
1490
|
-
if (n.preventDefault !== void 0 && n.cancelable && n.preventDefault(), t = X(t,
|
|
1490
|
+
if (n.preventDefault !== void 0 && n.cancelable && n.preventDefault(), t = X(t, s.draggable, a, !0), P("dragOver"), b.eventCanceled)
|
|
1491
1491
|
return w;
|
|
1492
1492
|
if (m.contains(n.target) || t.animated && t.animatingX && t.animatingY || _._ignoreWhileAnimating === t)
|
|
1493
|
-
return
|
|
1494
|
-
if (Ke = !1, y && !
|
|
1493
|
+
return R(!1);
|
|
1494
|
+
if (Ke = !1, y && !s.disabled && (u ? p || (r = I !== L) : A === this || (this.lastPutMode = ze.checkPull(this, y, m, n)) && f.checkPut(this, y, m, n))) {
|
|
1495
1495
|
if (v = this._getDirection(n, t) === "vertical", o = $(m), P("dragOverValid"), b.eventCanceled)
|
|
1496
1496
|
return w;
|
|
1497
|
-
if (
|
|
1498
|
-
return
|
|
1499
|
-
var W = Un(a,
|
|
1497
|
+
if (r)
|
|
1498
|
+
return I = L, N(), this._hideClone(), P("revert"), b.eventCanceled || (me ? L.insertBefore(m, me) : L.appendChild(m)), R(!0);
|
|
1499
|
+
var W = Un(a, s.draggable);
|
|
1500
1500
|
if (!W || el(n, v, this) && !W.animated) {
|
|
1501
1501
|
if (W === m)
|
|
1502
|
-
return
|
|
1503
|
-
if (W && a === n.target && (t = W), t && (l = $(t)), We(
|
|
1504
|
-
return N(), W && W.nextSibling ? a.insertBefore(m, W.nextSibling) : a.appendChild(m),
|
|
1502
|
+
return R(!1);
|
|
1503
|
+
if (W && a === n.target && (t = W), t && (l = $(t)), We(L, a, m, o, t, l, n, !!t) !== !1)
|
|
1504
|
+
return N(), W && W.nextSibling ? a.insertBefore(m, W.nextSibling) : a.appendChild(m), I = a, Z(), R(!0);
|
|
1505
1505
|
} else if (W && Qt(n, v, this)) {
|
|
1506
|
-
var de = ke(a, 0,
|
|
1506
|
+
var de = ke(a, 0, s, !0);
|
|
1507
1507
|
if (de === m)
|
|
1508
|
-
return
|
|
1509
|
-
if (t = de, l = $(t), We(
|
|
1510
|
-
return N(), a.insertBefore(m, de),
|
|
1508
|
+
return R(!1);
|
|
1509
|
+
if (t = de, l = $(t), We(L, a, m, o, t, l, n, !1) !== !1)
|
|
1510
|
+
return N(), a.insertBefore(m, de), I = a, Z(), R(!0);
|
|
1511
1511
|
} else if (t.parentNode === a) {
|
|
1512
1512
|
l = $(t);
|
|
1513
1513
|
var K = 0, fe, xe = m.parentNode !== a, U = !Zt(m.animated && m.toRect || o, t.animated && t.toRect || l, v), Ee = v ? "top" : "left", le = ta(t, "top", "top") || ta(m, "top", "top"), Se = le ? le.scrollTop : void 0;
|
|
1514
|
-
ve !== t && (fe = l[Ee], Pe = !1, Be = !U &&
|
|
1514
|
+
ve !== t && (fe = l[Ee], Pe = !1, Be = !U && s.invertSwap || xe), K = nl(n, t, l, v, U ? 1 : s.swapThreshold, s.invertedSwapThreshold == null ? s.swapThreshold : s.invertedSwapThreshold, Be, ve === t);
|
|
1515
1515
|
var ee;
|
|
1516
1516
|
if (K !== 0) {
|
|
1517
1517
|
var ye = G(m);
|
|
1518
1518
|
do
|
|
1519
|
-
ye -= K, ee =
|
|
1519
|
+
ye -= K, ee = I.children[ye];
|
|
1520
1520
|
while (ee && (h(ee, "display") === "none" || ee === C));
|
|
1521
1521
|
}
|
|
1522
1522
|
if (K === 0 || ee === t)
|
|
1523
|
-
return
|
|
1523
|
+
return R(!1);
|
|
1524
1524
|
ve = t, Ne = K;
|
|
1525
1525
|
var Oe = t.nextElementSibling, oe = !1;
|
|
1526
1526
|
oe = K === 1;
|
|
1527
|
-
var Me = We(
|
|
1527
|
+
var Me = We(L, a, m, o, t, l, n, oe);
|
|
1528
1528
|
if (Me !== !1)
|
|
1529
|
-
return (Me === 1 || Me === -1) && (oe = Me === 1),
|
|
1529
|
+
return (Me === 1 || Me === -1) && (oe = Me === 1), An = !0, setTimeout(Vt, 30), N(), oe && !Oe ? a.appendChild(m) : t.parentNode.insertBefore(m, oe ? Oe : t), le && wa(le, 0, Se - le.scrollTop), I = m.parentNode, fe !== void 0 && !Be && (Ge = Math.abs(fe - $(t)[Ee])), Z(), R(!0);
|
|
1530
1530
|
}
|
|
1531
1531
|
if (a.contains(m))
|
|
1532
|
-
return
|
|
1532
|
+
return R(!1);
|
|
1533
1533
|
}
|
|
1534
1534
|
return !1;
|
|
1535
1535
|
},
|
|
@@ -1543,60 +1543,60 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
1543
1543
|
},
|
|
1544
1544
|
_onDrop: function(n) {
|
|
1545
1545
|
var a = this.el, t = this.options;
|
|
1546
|
-
if (J = G(m),
|
|
1546
|
+
if (J = G(m), re = G(m, t.draggable), B("drop", this, {
|
|
1547
1547
|
evt: n
|
|
1548
|
-
}),
|
|
1548
|
+
}), I = m && m.parentNode, J = G(m), re = G(m, t.draggable), b.eventCanceled) {
|
|
1549
1549
|
this._nulling();
|
|
1550
1550
|
return;
|
|
1551
1551
|
}
|
|
1552
|
-
_e = !1, Be = !1, Pe = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), Mn(this.cloneId), Mn(this._dragStartId), this.nativeDraggable && (k(document, "drop", this), k(a, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(),
|
|
1552
|
+
_e = !1, Be = !1, Pe = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), Mn(this.cloneId), Mn(this._dragStartId), this.nativeDraggable && (k(document, "drop", this), k(a, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), Ie && h(document.body, "user-select", ""), h(m, "transform", ""), n && (De && (n.cancelable && n.preventDefault(), !t.dropBubble && n.stopPropagation()), C && C.parentNode && C.parentNode.removeChild(C), (L === I || A && A.lastPutMode !== "clone") && F && F.parentNode && F.parentNode.removeChild(F), m && (this.nativeDraggable && k(m, "dragend", this), yn(m), m.style["will-change"] = "", De && !_e && q(m, A ? A.options.ghostClass : this.options.ghostClass, !1), q(m, this.options.chosenClass, !1), z({
|
|
1553
1553
|
sortable: this,
|
|
1554
1554
|
name: "unchoose",
|
|
1555
|
-
toEl:
|
|
1555
|
+
toEl: I,
|
|
1556
1556
|
newIndex: null,
|
|
1557
1557
|
newDraggableIndex: null,
|
|
1558
1558
|
originalEvent: n
|
|
1559
|
-
}),
|
|
1560
|
-
rootEl:
|
|
1559
|
+
}), L !== I ? (J >= 0 && (z({
|
|
1560
|
+
rootEl: I,
|
|
1561
1561
|
name: "add",
|
|
1562
|
-
toEl:
|
|
1563
|
-
fromEl:
|
|
1562
|
+
toEl: I,
|
|
1563
|
+
fromEl: L,
|
|
1564
1564
|
originalEvent: n
|
|
1565
1565
|
}), z({
|
|
1566
1566
|
sortable: this,
|
|
1567
1567
|
name: "remove",
|
|
1568
|
-
toEl:
|
|
1568
|
+
toEl: I,
|
|
1569
1569
|
originalEvent: n
|
|
1570
1570
|
}), z({
|
|
1571
|
-
rootEl:
|
|
1571
|
+
rootEl: I,
|
|
1572
1572
|
name: "sort",
|
|
1573
|
-
toEl:
|
|
1574
|
-
fromEl:
|
|
1573
|
+
toEl: I,
|
|
1574
|
+
fromEl: L,
|
|
1575
1575
|
originalEvent: n
|
|
1576
1576
|
}), z({
|
|
1577
1577
|
sortable: this,
|
|
1578
1578
|
name: "sort",
|
|
1579
|
-
toEl:
|
|
1579
|
+
toEl: I,
|
|
1580
1580
|
originalEvent: n
|
|
1581
|
-
})),
|
|
1581
|
+
})), A && A.save()) : J !== Ce && J >= 0 && (z({
|
|
1582
1582
|
sortable: this,
|
|
1583
1583
|
name: "update",
|
|
1584
|
-
toEl:
|
|
1584
|
+
toEl: I,
|
|
1585
1585
|
originalEvent: n
|
|
1586
1586
|
}), z({
|
|
1587
1587
|
sortable: this,
|
|
1588
1588
|
name: "sort",
|
|
1589
|
-
toEl:
|
|
1589
|
+
toEl: I,
|
|
1590
1590
|
originalEvent: n
|
|
1591
|
-
})), b.active && ((J == null || J === -1) && (J = Ce,
|
|
1591
|
+
})), b.active && ((J == null || J === -1) && (J = Ce, re = $e), z({
|
|
1592
1592
|
sortable: this,
|
|
1593
1593
|
name: "end",
|
|
1594
|
-
toEl:
|
|
1594
|
+
toEl: I,
|
|
1595
1595
|
originalEvent: n
|
|
1596
1596
|
}), this.save()))), this._nulling();
|
|
1597
1597
|
},
|
|
1598
1598
|
_nulling: function() {
|
|
1599
|
-
B("nulling", this),
|
|
1599
|
+
B("nulling", this), L = m = I = C = me = F = Je = se = pe = Y = De = J = re = Ce = $e = ve = Ne = A = ze = b.dragged = b.ghost = b.clone = b.active = null, Qe.forEach(function(n) {
|
|
1600
1600
|
n.checked = !0;
|
|
1601
1601
|
}), Qe.length = cn = dn = 0;
|
|
1602
1602
|
},
|
|
@@ -1620,8 +1620,8 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
1620
1620
|
* @returns {String[]}
|
|
1621
1621
|
*/
|
|
1622
1622
|
toArray: function() {
|
|
1623
|
-
for (var n = [], a, t = this.el.children, o = 0, l = t.length,
|
|
1624
|
-
a = t[o], X(a,
|
|
1623
|
+
for (var n = [], a, t = this.el.children, o = 0, l = t.length, r = this.options; o < l; o++)
|
|
1624
|
+
a = t[o], X(a, r.draggable, this.el, !1) && n.push(a.getAttribute(r.dataIdAttr) || tl(a));
|
|
1625
1625
|
return n;
|
|
1626
1626
|
},
|
|
1627
1627
|
/**
|
|
@@ -1630,9 +1630,9 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
1630
1630
|
*/
|
|
1631
1631
|
sort: function(n, a) {
|
|
1632
1632
|
var t = {}, o = this.el;
|
|
1633
|
-
this.toArray().forEach(function(l,
|
|
1634
|
-
var
|
|
1635
|
-
X(
|
|
1633
|
+
this.toArray().forEach(function(l, r) {
|
|
1634
|
+
var s = o.children[r];
|
|
1635
|
+
X(s, this.options.draggable, o, !1) && (t[l] = s);
|
|
1636
1636
|
}, this), a && this.captureAnimationState(), n.forEach(function(l) {
|
|
1637
1637
|
t[l] && (o.removeChild(t[l]), o.appendChild(t[l]));
|
|
1638
1638
|
}), a && this.animateAll();
|
|
@@ -1663,7 +1663,7 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
1663
1663
|
var t = this.options;
|
|
1664
1664
|
if (a === void 0)
|
|
1665
1665
|
return t[n];
|
|
1666
|
-
var o =
|
|
1666
|
+
var o = Ae.modifyOption(this, n, a);
|
|
1667
1667
|
typeof o < "u" ? t[n] = o : t[n] = a, n === "group" && Oa(t);
|
|
1668
1668
|
},
|
|
1669
1669
|
/**
|
|
@@ -1677,10 +1677,10 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
1677
1677
|
}), this._onDrop(), this._disableDelayedDragEvents(), Ve.splice(Ve.indexOf(this.el), 1), this.el = n = null;
|
|
1678
1678
|
},
|
|
1679
1679
|
_hideClone: function() {
|
|
1680
|
-
if (!
|
|
1680
|
+
if (!se) {
|
|
1681
1681
|
if (B("hideClone", this), b.eventCanceled)
|
|
1682
1682
|
return;
|
|
1683
|
-
h(
|
|
1683
|
+
h(F, "display", "none"), this.options.removeCloneOnHide && F.parentNode && F.parentNode.removeChild(F), se = !0;
|
|
1684
1684
|
}
|
|
1685
1685
|
},
|
|
1686
1686
|
_showClone: function(n) {
|
|
@@ -1688,28 +1688,28 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
1688
1688
|
this._hideClone();
|
|
1689
1689
|
return;
|
|
1690
1690
|
}
|
|
1691
|
-
if (
|
|
1691
|
+
if (se) {
|
|
1692
1692
|
if (B("showClone", this), b.eventCanceled)
|
|
1693
1693
|
return;
|
|
1694
|
-
m.parentNode ==
|
|
1694
|
+
m.parentNode == L && !this.options.group.revertClone ? L.insertBefore(F, m) : me ? L.insertBefore(F, me) : L.appendChild(F), this.options.group.revertClone && this.animate(m, F), h(F, "display", ""), se = !1;
|
|
1695
1695
|
}
|
|
1696
1696
|
}
|
|
1697
1697
|
};
|
|
1698
1698
|
function Kt(e) {
|
|
1699
1699
|
e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
|
|
1700
1700
|
}
|
|
1701
|
-
function We(e, n, a, t, o, l,
|
|
1701
|
+
function We(e, n, a, t, o, l, r, s) {
|
|
1702
1702
|
var f, y = e[j], u = y.options.onMove, p;
|
|
1703
|
-
return window.CustomEvent && !te && !
|
|
1703
|
+
return window.CustomEvent && !te && !Re ? f = new CustomEvent("move", {
|
|
1704
1704
|
bubbles: !0,
|
|
1705
1705
|
cancelable: !0
|
|
1706
|
-
}) : (f = document.createEvent("Event"), f.initEvent("move", !0, !0)), f.to = n, f.from = e, f.dragged = a, f.draggedRect = t, f.related = o || n, f.relatedRect = l || $(n), f.willInsertAfter =
|
|
1706
|
+
}) : (f = document.createEvent("Event"), f.initEvent("move", !0, !0)), f.to = n, f.from = e, f.dragged = a, f.draggedRect = t, f.related = o || n, f.relatedRect = l || $(n), f.willInsertAfter = s, f.originalEvent = r, e.dispatchEvent(f), u && (p = u.call(y, f, r)), p;
|
|
1707
1707
|
}
|
|
1708
1708
|
function yn(e) {
|
|
1709
1709
|
e.draggable = !1;
|
|
1710
1710
|
}
|
|
1711
1711
|
function Vt() {
|
|
1712
|
-
|
|
1712
|
+
An = !1;
|
|
1713
1713
|
}
|
|
1714
1714
|
function Qt(e, n, a) {
|
|
1715
1715
|
var t = $(ke(a.el, 0, a.options, !0)), o = xa(a.el, a.options, C), l = 10;
|
|
@@ -1719,10 +1719,10 @@ function el(e, n, a) {
|
|
|
1719
1719
|
var t = $(Un(a.el, a.options.draggable)), o = xa(a.el, a.options, C), l = 10;
|
|
1720
1720
|
return n ? e.clientX > o.right + l || e.clientY > t.bottom && e.clientX > t.left : e.clientY > o.bottom + l || e.clientX > t.right && e.clientY > t.top;
|
|
1721
1721
|
}
|
|
1722
|
-
function nl(e, n, a, t, o, l,
|
|
1722
|
+
function nl(e, n, a, t, o, l, r, s) {
|
|
1723
1723
|
var f = t ? e.clientY : e.clientX, y = t ? a.height : a.width, u = t ? a.top : a.left, p = t ? a.bottom : a.right, g = !1;
|
|
1724
|
-
if (!
|
|
1725
|
-
if (
|
|
1724
|
+
if (!r) {
|
|
1725
|
+
if (s && Ge < y * o) {
|
|
1726
1726
|
if (!Pe && (Ne === 1 ? f > u + y * l / 2 : f < p - y * l / 2) && (Pe = !0), Pe)
|
|
1727
1727
|
g = !0;
|
|
1728
1728
|
else if (Ne === 1 ? f < u + Ge : f > p - Ge)
|
|
@@ -1730,7 +1730,7 @@ function nl(e, n, a, t, o, l, s, r) {
|
|
|
1730
1730
|
} else if (f > u + y * (1 - o) / 2 && f < p - y * (1 - o) / 2)
|
|
1731
1731
|
return al(n);
|
|
1732
1732
|
}
|
|
1733
|
-
return g = g ||
|
|
1733
|
+
return g = g || r, g && (f < u + y * l / 2 || f > p - y * l / 2) ? f > u + y / 2 ? 1 : -1 : 0;
|
|
1734
1734
|
}
|
|
1735
1735
|
function al(e) {
|
|
1736
1736
|
return G(m) < G(e) ? 1 : -1;
|
|
@@ -1785,14 +1785,14 @@ b.mount = function() {
|
|
|
1785
1785
|
n[0].constructor === Array && (n = n[0]), n.forEach(function(t) {
|
|
1786
1786
|
if (!t.prototype || !t.prototype.constructor)
|
|
1787
1787
|
throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));
|
|
1788
|
-
t.utils && (b.utils = Q(Q({}, b.utils), t.utils)),
|
|
1788
|
+
t.utils && (b.utils = Q(Q({}, b.utils), t.utils)), Ae.mount(t);
|
|
1789
1789
|
});
|
|
1790
1790
|
};
|
|
1791
1791
|
b.create = function(e, n) {
|
|
1792
1792
|
return new b(e, n);
|
|
1793
1793
|
};
|
|
1794
|
-
b.version =
|
|
1795
|
-
var T = [],
|
|
1794
|
+
b.version = At;
|
|
1795
|
+
var T = [], Le, zn, Bn = !1, pn, un, en, Fe;
|
|
1796
1796
|
function ol() {
|
|
1797
1797
|
function e() {
|
|
1798
1798
|
this.defaults = {
|
|
@@ -1815,29 +1815,29 @@ function ol() {
|
|
|
1815
1815
|
!this.options.dragOverBubble && !t.rootEl && this._handleAutoScroll(t);
|
|
1816
1816
|
},
|
|
1817
1817
|
drop: function() {
|
|
1818
|
-
this.sortable.nativeDraggable ? k(document, "dragover", this._handleAutoScroll) : (k(document, "pointermove", this._handleFallbackAutoScroll), k(document, "touchmove", this._handleFallbackAutoScroll), k(document, "mousemove", this._handleFallbackAutoScroll)),
|
|
1818
|
+
this.sortable.nativeDraggable ? k(document, "dragover", this._handleAutoScroll) : (k(document, "pointermove", this._handleFallbackAutoScroll), k(document, "touchmove", this._handleFallbackAutoScroll), k(document, "mousemove", this._handleFallbackAutoScroll)), sa(), Ye(), Bt();
|
|
1819
1819
|
},
|
|
1820
1820
|
nulling: function() {
|
|
1821
|
-
en = zn =
|
|
1821
|
+
en = zn = Le = Bn = Fe = pn = un = null, T.length = 0;
|
|
1822
1822
|
},
|
|
1823
1823
|
_handleFallbackAutoScroll: function(a) {
|
|
1824
1824
|
this._handleAutoScroll(a, !0);
|
|
1825
1825
|
},
|
|
1826
1826
|
_handleAutoScroll: function(a, t) {
|
|
1827
|
-
var o = this, l = (a.touches ? a.touches[0] : a).clientX,
|
|
1828
|
-
if (en = a, t || this.options.forceAutoScrollFallback ||
|
|
1829
|
-
mn(a, this.options,
|
|
1830
|
-
var f = ce(
|
|
1831
|
-
Bn && (!
|
|
1832
|
-
var y = ce(document.elementFromPoint(l,
|
|
1827
|
+
var o = this, l = (a.touches ? a.touches[0] : a).clientX, r = (a.touches ? a.touches[0] : a).clientY, s = document.elementFromPoint(l, r);
|
|
1828
|
+
if (en = a, t || this.options.forceAutoScrollFallback || Re || te || Ie) {
|
|
1829
|
+
mn(a, this.options, s, t);
|
|
1830
|
+
var f = ce(s, !0);
|
|
1831
|
+
Bn && (!Fe || l !== pn || r !== un) && (Fe && sa(), Fe = setInterval(function() {
|
|
1832
|
+
var y = ce(document.elementFromPoint(l, r), !0);
|
|
1833
1833
|
y !== f && (f = y, Ye()), mn(a, o.options, y, t);
|
|
1834
|
-
}, 10), pn = l, un =
|
|
1834
|
+
}, 10), pn = l, un = r);
|
|
1835
1835
|
} else {
|
|
1836
|
-
if (!this.options.bubbleScroll || ce(
|
|
1836
|
+
if (!this.options.bubbleScroll || ce(s, !0) === V()) {
|
|
1837
1837
|
Ye();
|
|
1838
1838
|
return;
|
|
1839
1839
|
}
|
|
1840
|
-
mn(a, this.options, ce(
|
|
1840
|
+
mn(a, this.options, ce(s, !1), !1);
|
|
1841
1841
|
}
|
|
1842
1842
|
}
|
|
1843
1843
|
}, ae(e, {
|
|
@@ -1850,24 +1850,24 @@ function Ye() {
|
|
|
1850
1850
|
clearInterval(e.pid);
|
|
1851
1851
|
}), T = [];
|
|
1852
1852
|
}
|
|
1853
|
-
function
|
|
1854
|
-
clearInterval(
|
|
1853
|
+
function sa() {
|
|
1854
|
+
clearInterval(Fe);
|
|
1855
1855
|
}
|
|
1856
1856
|
var mn = Ca(function(e, n, a, t) {
|
|
1857
1857
|
if (n.scroll) {
|
|
1858
|
-
var o = (e.touches ? e.touches[0] : e).clientX, l = (e.touches ? e.touches[0] : e).clientY,
|
|
1859
|
-
zn !== a && (zn = a, Ye(),
|
|
1860
|
-
var p = 0, g =
|
|
1858
|
+
var o = (e.touches ? e.touches[0] : e).clientX, l = (e.touches ? e.touches[0] : e).clientY, r = n.scrollSensitivity, s = n.scrollSpeed, f = V(), y = !1, u;
|
|
1859
|
+
zn !== a && (zn = a, Ye(), Le = n.scroll, u = n.scrollFn, Le === !0 && (Le = ce(a, !0)));
|
|
1860
|
+
var p = 0, g = Le;
|
|
1861
1861
|
do {
|
|
1862
|
-
var v = g, _ = $(v), w = _.top, P = _.bottom, N = _.left,
|
|
1862
|
+
var v = g, _ = $(v), w = _.top, P = _.bottom, N = _.left, R = _.right, Z = _.width, W = _.height, de = void 0, K = void 0, fe = v.scrollWidth, xe = v.scrollHeight, U = h(v), Ee = v.scrollLeft, le = v.scrollTop;
|
|
1863
1863
|
v === f ? (de = Z < fe && (U.overflowX === "auto" || U.overflowX === "scroll" || U.overflowX === "visible"), K = W < xe && (U.overflowY === "auto" || U.overflowY === "scroll" || U.overflowY === "visible")) : (de = Z < fe && (U.overflowX === "auto" || U.overflowX === "scroll"), K = W < xe && (U.overflowY === "auto" || U.overflowY === "scroll"));
|
|
1864
|
-
var Se = de && (Math.abs(
|
|
1864
|
+
var Se = de && (Math.abs(R - o) <= r && Ee + Z < fe) - (Math.abs(N - o) <= r && !!Ee), ee = K && (Math.abs(P - l) <= r && le + W < xe) - (Math.abs(w - l) <= r && !!le);
|
|
1865
1865
|
if (!T[p])
|
|
1866
1866
|
for (var ye = 0; ye <= p; ye++)
|
|
1867
1867
|
T[ye] || (T[ye] = {});
|
|
1868
1868
|
(T[p].vx != Se || T[p].vy != ee || T[p].el !== v) && (T[p].el = v, T[p].vx = Se, T[p].vy = ee, clearInterval(T[p].pid), (Se != 0 || ee != 0) && (y = !0, T[p].pid = setInterval((function() {
|
|
1869
1869
|
t && this.layer === 0 && b.active._onTouchMove(en);
|
|
1870
|
-
var Oe = T[this.layer].vy ? T[this.layer].vy *
|
|
1870
|
+
var Oe = T[this.layer].vy ? T[this.layer].vy * s : 0, oe = T[this.layer].vx ? T[this.layer].vx * s : 0;
|
|
1871
1871
|
typeof u == "function" && u.call(b.dragged.parentNode[j], oe, Oe, e, en, T[this.layer].el) !== "continue" || wa(T[this.layer].el, oe, Oe);
|
|
1872
1872
|
}).bind({
|
|
1873
1873
|
layer: p
|
|
@@ -1875,13 +1875,13 @@ var mn = Ca(function(e, n, a, t) {
|
|
|
1875
1875
|
} while (n.bubbleScroll && g !== f && (g = ce(g, !1)));
|
|
1876
1876
|
Bn = y;
|
|
1877
1877
|
}
|
|
1878
|
-
}, 30),
|
|
1879
|
-
var a = n.originalEvent, t = n.putSortable, o = n.dragEl, l = n.activeSortable,
|
|
1878
|
+
}, 30), La = function(n) {
|
|
1879
|
+
var a = n.originalEvent, t = n.putSortable, o = n.dragEl, l = n.activeSortable, r = n.dispatchSortableEvent, s = n.hideGhostForTarget, f = n.unhideGhostForTarget;
|
|
1880
1880
|
if (a) {
|
|
1881
1881
|
var y = t || l;
|
|
1882
|
-
|
|
1882
|
+
s();
|
|
1883
1883
|
var u = a.changedTouches && a.changedTouches.length ? a.changedTouches[0] : a, p = document.elementFromPoint(u.clientX, u.clientY);
|
|
1884
|
-
f(), y && !y.el.contains(p) && (
|
|
1884
|
+
f(), y && !y.el.contains(p) && (r("spill"), this.onSpill({
|
|
1885
1885
|
dragEl: o,
|
|
1886
1886
|
putSortable: t
|
|
1887
1887
|
}));
|
|
@@ -1901,7 +1901,7 @@ qn.prototype = {
|
|
|
1901
1901
|
var o = ke(this.sortable.el, this.startIndex, this.options);
|
|
1902
1902
|
o ? this.sortable.el.insertBefore(a, o) : this.sortable.el.appendChild(a), this.sortable.animateAll(), t && t.animateAll();
|
|
1903
1903
|
},
|
|
1904
|
-
drop:
|
|
1904
|
+
drop: La
|
|
1905
1905
|
};
|
|
1906
1906
|
ae(qn, {
|
|
1907
1907
|
pluginName: "revertOnSpill"
|
|
@@ -1913,27 +1913,27 @@ Jn.prototype = {
|
|
|
1913
1913
|
var a = n.dragEl, t = n.putSortable, o = t || this.sortable;
|
|
1914
1914
|
o.captureAnimationState(), a.parentNode && a.parentNode.removeChild(a), o.animateAll();
|
|
1915
1915
|
},
|
|
1916
|
-
drop:
|
|
1916
|
+
drop: La
|
|
1917
1917
|
};
|
|
1918
1918
|
ae(Jn, {
|
|
1919
1919
|
pluginName: "removeOnSpill"
|
|
1920
1920
|
});
|
|
1921
1921
|
b.mount(new ol());
|
|
1922
1922
|
b.mount(Jn, qn);
|
|
1923
|
-
const il = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff;width:inherit}.nylas-booking-form-config{width:inherit;display:flex;flex-direction:column;margin:1rem;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}.nylas-booking-form-config .header{padding:1rem;display:flex;justify-content:space-between;border-bottom:1px solid var(--nylas-base-200)}.nylas-booking-form-config .header .header_text h3{margin:0;font-size:16px;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-booking-form-config .header .header_text p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.nylas-booking-form-config .header .header_action{display:flex}.nylas-booking-form-config .header .header_action select-dropdown::part(sd_dropdown-button){width:100%;display:flex;justify-content:space-between;align-items:center;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);padding:1rem}.nylas-booking-form-config .content{padding:1rem;color:var(--nylas-base-900);font-size:16px;font-family:var(--nylas-font-family)}@media screen and (max-width: 504px){.nylas-booking-form-config .content{font-size:15px}}.nylas-booking-form-config .content .additional_fields{display:flex;flex-direction:column;gap:1rem;position:relative;overflow:auto}.nylas-booking-form-config .content .additional_fields.static_fields{margin-bottom:1rem}@media screen and (max-width: 504px){.nylas-booking-form-config .content .additional_fields{gap:0.5rem;padding:0}}.nylas-booking-form-config .content .additional_fields .form-field{border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200);padding:1rem;user-select:none;background-color:white;position:relative}.nylas-booking-form-config .content .additional_fields .form-field.highlight{background-color:var(--nylas-base-200)}.nylas-booking-form-config .content .additional_fields .form-field .form-field_header{display:flex;justify-content:space-between;align-items:center}.nylas-booking-form-config .content .additional_fields .form-field .form-field_header .dragable{cursor:move}.nylas-booking-form-config .content .additional_fields .form-field .form-field_header .form-field_header_text{flex:1;text-align:left;padding-left:1rem}.nylas-booking-form-config .content .additional_fields .form-field .form-field_header .form-field_header_text h4{margin:0;font-size:16px;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-booking-form-config .content .additional_fields .form-field .form-field_header .form-field_header_text p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.nylas-booking-form-config .content .additional_fields .form-field .form-field_header .form-field_header_actions{display:flex;align-items:center}.nylas-booking-form-config .content .additional_fields .form-field .form-field_header .form-field_header_actions .is-required{color:var(--nylas-base-500);background-color:var(--nylas-base-50);font-weight:600;padding:4px 8px;border-radius:var(--nylas-border-radius-2x)}.nylas-booking-form-config .content .additional_fields .form-field .form-field_header .form-field_header_actions button{border:none;background:transparent;height:40px;margin:0 1rem;cursor:pointer;color:var(--nylas-base-800)}.nylas-booking-form-config .content .additional_fields .form-field .form-field_header .form-field_header_actions button:hover,.nylas-booking-form-config .content .additional_fields .form-field .form-field_header .form-field_header_actions button:active{color:var(--nylas-primary)}.nylas-booking-form-config .content .additional_fields .form-field .form-field_header .form-field_header_actions .chevron{display:flex;align-self:center;cursor:pointer}.nylas-booking-form-config .content .additional_fields .form-field .form-field_header .form-field_header_actions .chevron:hover,.nylas-booking-form-config .content .additional_fields .form-field .form-field_header .form-field_header_actions .chevron:active{color:var(--nylas-primary)}.nylas-booking-form-config .content .additional_fields .form-field .form-field_header .form-field_header_actions .chevron.open{transform:rotate(90deg)}.nylas-booking-form-config .content .additional_fields .form-field .form-field_header .form-field_header_actions .chevron.closed{transform:rotate(270deg)}.nylas-booking-form-config .content .additional_fields .form-field span.error{opacity:1;color:var(--nylas-error);margin-top:8px;transition:opacity 0.3s ease-out}.nylas-booking-form-config .content .additional_fields .form-field span.error.fade-out{opacity:0}.nylas-booking-form-config .content .additional_fields .form-field .form-field_content{padding:1.5rem 0 0 2.7rem}.nylas-booking-form-config .content .additional_fields .form-field .form-field_content.hidden{display:none}.nylas-booking-form-config .content .additional_fields .form-field .form-field_content .inputs{display:flex;flex-direction:column;gap:0.5rem}.nylas-booking-form-config .content .additional_fields .form-field .form-field_content .inputs .label-input{padding:0 1rem 0 0}.nylas-booking-form-config .content .additional_fields .form-field .form-field_content .inputs .required-input{display:flex}.nylas-booking-form-config .content .additional_fields .form-field .form-field_content .inputs .required-input label{padding:0.5rem}.nylas-booking-form-config .content .additional_fields .form-field .form-field_content .inputs .required-input input[type=checkbox]{transform:scale(1.3)}.nylas-booking-form-config .content .additional_fields .form-field .form-field_content .options-container h4{margin:0;font-size:16px;line-height:20px;font-weight:500;padding:0.5rem 0;color:var(--nylas-base-900);text-align:left}.nylas-booking-form-config .content .additional_fields .form-field .form-field_content .options-container button{border:none;background:transparent;height:40px;margin:1rem 0;cursor:pointer;color:var(--nylas-base-800);display:flex;align-items:center;justify-content:space-between}.nylas-booking-form-config .content .additional_fields .form-field .form-field_content .options-container button:hover,.nylas-booking-form-config .content .additional_fields .form-field .form-field_content .options-container button:active{color:var(--nylas-primary)}.nylas-booking-form-config .content .additional_fields .form-field .form-field_content .options-container .options{display:flex;flex-direction:column;gap:1rem}.nylas-booking-form-config .content .additional_fields .form-field .form-field_content .options-container .options .option{display:flex;justify-content:space-between;align-items:center}.nylas-booking-form-config .content .additional_fields .form-field .form-field_content .options-container .options .option button{border:none;background:transparent;height:40px;margin:0 1rem;cursor:pointer;color:var(--nylas-base-800)}.nylas-booking-form-config .content .additional_fields .form-field .form-field_content .options-container .options .option button:hover,.nylas-booking-form-config .content .additional_fields .form-field .form-field_content .options-container .options .option button:active{color:var(--nylas-primary)}',
|
|
1924
|
-
var
|
|
1925
|
-
var o = arguments.length, l = o < 3 ? n : t === null ? t = Object.getOwnPropertyDescriptor(n, a) : t,
|
|
1923
|
+
const il = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff;width:inherit}.nylas-booking-form-config{width:inherit;display:flex;flex-direction:column;margin:1rem;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}.nylas-booking-form-config .header{padding:1rem;display:flex;justify-content:space-between;border-bottom:1px solid var(--nylas-base-200)}.nylas-booking-form-config .header .header_text h3{margin:0;font-size:16px;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-booking-form-config .header .header_text p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.nylas-booking-form-config .header .header_action{display:flex}.nylas-booking-form-config .header .header_action select-dropdown::part(sd_dropdown-button){width:100%;display:flex;justify-content:space-between;align-items:center;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);padding:1rem}.nylas-booking-form-config .content{padding:1rem;color:var(--nylas-base-900);font-size:16px;font-family:var(--nylas-font-family)}@media screen and (max-width: 504px){.nylas-booking-form-config .content{font-size:15px}}.nylas-booking-form-config .content .additional_fields{display:flex;flex-direction:column;gap:1rem;position:relative;overflow:auto}.nylas-booking-form-config .content .additional_fields.static_fields{margin-bottom:1rem}@media screen and (max-width: 504px){.nylas-booking-form-config .content .additional_fields{gap:0.5rem;padding:0}}.nylas-booking-form-config .content .additional_fields .form-field{border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200);padding:1rem;user-select:none;background-color:white;position:relative}.nylas-booking-form-config .content .additional_fields .form-field.highlight{background-color:var(--nylas-base-200)}.nylas-booking-form-config .content .additional_fields .form-field .form-field_header{display:flex;justify-content:space-between;align-items:center}.nylas-booking-form-config .content .additional_fields .form-field .form-field_header .dragable{cursor:move}.nylas-booking-form-config .content .additional_fields .form-field .form-field_header .form-field_header_text{flex:1;text-align:left;padding-left:1rem}.nylas-booking-form-config .content .additional_fields .form-field .form-field_header .form-field_header_text h4{margin:0;font-size:16px;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-booking-form-config .content .additional_fields .form-field .form-field_header .form-field_header_text p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.nylas-booking-form-config .content .additional_fields .form-field .form-field_header .form-field_header_actions{display:flex;align-items:center}.nylas-booking-form-config .content .additional_fields .form-field .form-field_header .form-field_header_actions .is-required{color:var(--nylas-base-500);background-color:var(--nylas-base-50);font-weight:600;padding:4px 8px;border-radius:var(--nylas-border-radius-2x)}.nylas-booking-form-config .content .additional_fields .form-field .form-field_header .form-field_header_actions button{border:none;background:transparent;height:40px;margin:0 1rem;cursor:pointer;color:var(--nylas-base-800)}.nylas-booking-form-config .content .additional_fields .form-field .form-field_header .form-field_header_actions button:hover,.nylas-booking-form-config .content .additional_fields .form-field .form-field_header .form-field_header_actions button:active{color:var(--nylas-primary)}.nylas-booking-form-config .content .additional_fields .form-field .form-field_header .form-field_header_actions .chevron{display:flex;align-self:center;cursor:pointer}.nylas-booking-form-config .content .additional_fields .form-field .form-field_header .form-field_header_actions .chevron:hover,.nylas-booking-form-config .content .additional_fields .form-field .form-field_header .form-field_header_actions .chevron:active{color:var(--nylas-primary)}.nylas-booking-form-config .content .additional_fields .form-field .form-field_header .form-field_header_actions .chevron.open{transform:rotate(90deg)}.nylas-booking-form-config .content .additional_fields .form-field .form-field_header .form-field_header_actions .chevron.closed{transform:rotate(270deg)}.nylas-booking-form-config .content .additional_fields .form-field span.error{opacity:1;color:var(--nylas-error);margin-top:8px;transition:opacity 0.3s ease-out}.nylas-booking-form-config .content .additional_fields .form-field span.error.fade-out{opacity:0}.nylas-booking-form-config .content .additional_fields .form-field .form-field_content{padding:1.5rem 0 0 2.7rem}.nylas-booking-form-config .content .additional_fields .form-field .form-field_content.hidden{display:none}.nylas-booking-form-config .content .additional_fields .form-field .form-field_content .inputs{display:flex;flex-direction:column;gap:0.5rem}.nylas-booking-form-config .content .additional_fields .form-field .form-field_content .inputs .label-input{padding:0 1rem 0 0}.nylas-booking-form-config .content .additional_fields .form-field .form-field_content .inputs .required-input{display:flex}.nylas-booking-form-config .content .additional_fields .form-field .form-field_content .inputs .required-input label{padding:0.5rem}.nylas-booking-form-config .content .additional_fields .form-field .form-field_content .inputs .required-input input[type=checkbox]{transform:scale(1.3)}.nylas-booking-form-config .content .additional_fields .form-field .form-field_content .options-container h4{margin:0;font-size:16px;line-height:20px;font-weight:500;padding:0.5rem 0;color:var(--nylas-base-900);text-align:left}.nylas-booking-form-config .content .additional_fields .form-field .form-field_content .options-container button{border:none;background:transparent;height:40px;margin:1rem 0;cursor:pointer;color:var(--nylas-base-800);display:flex;align-items:center;justify-content:space-between}.nylas-booking-form-config .content .additional_fields .form-field .form-field_content .options-container button:hover,.nylas-booking-form-config .content .additional_fields .form-field .form-field_content .options-container button:active{color:var(--nylas-primary)}.nylas-booking-form-config .content .additional_fields .form-field .form-field_content .options-container .options{display:flex;flex-direction:column;gap:1rem}.nylas-booking-form-config .content .additional_fields .form-field .form-field_content .options-container .options .option{display:flex;justify-content:space-between;align-items:center}.nylas-booking-form-config .content .additional_fields .form-field .form-field_content .options-container .options .option button{border:none;background:transparent;height:40px;margin:0 1rem;cursor:pointer;color:var(--nylas-base-800)}.nylas-booking-form-config .content .additional_fields .form-field .form-field_content .options-container .options .option button:hover,.nylas-booking-form-config .content .additional_fields .form-field .form-field_content .options-container .options .option button:active{color:var(--nylas-primary)}', rl = il;
|
|
1924
|
+
var sl = function(e, n, a, t) {
|
|
1925
|
+
var o = arguments.length, l = o < 3 ? n : t === null ? t = Object.getOwnPropertyDescriptor(n, a) : t, r;
|
|
1926
1926
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
1927
1927
|
l = Reflect.decorate(e, n, a, t);
|
|
1928
1928
|
else
|
|
1929
|
-
for (var
|
|
1930
|
-
(
|
|
1929
|
+
for (var s = e.length - 1; s >= 0; s--)
|
|
1930
|
+
(r = e[s]) && (l = (o < 3 ? r(l) : o > 3 ? r(n, a, l) : r(n, a)) || l);
|
|
1931
1931
|
return o > 3 && l && Object.defineProperty(n, a, l), l;
|
|
1932
1932
|
}, gn = function(e, n) {
|
|
1933
1933
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
1934
1934
|
return Reflect.metadata(e, n);
|
|
1935
1935
|
};
|
|
1936
|
-
const ca = ["dropdown", "radio_button"], da = ["multi_select"],
|
|
1936
|
+
const ca = ["dropdown", "radio_button"], da = ["multi_select"], Fa = class {
|
|
1937
1937
|
constructor(e) {
|
|
1938
1938
|
x(this, e), this.valueChanged = S(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.selectedConfiguration = void 0, this.name = "additional-fields", this.additionalFields = void 0, this.selectedLanguage = void 0, this.staticFields = [
|
|
1939
1939
|
{
|
|
@@ -1958,39 +1958,39 @@ const ca = ["dropdown", "radio_button"], da = ["multi_select"], Ia = class {
|
|
|
1958
1958
|
fieldLabelKey: "your_email",
|
|
1959
1959
|
order: 1
|
|
1960
1960
|
}
|
|
1961
|
-
], this.formFields = void 0, this.formFieldsOrder = void 0, this.count = 0, this.watchFields = void 0, this.fieldTypes = Kn.map((n) => ({ label:
|
|
1961
|
+
], this.formFields = void 0, this.formFieldsOrder = void 0, this.count = 0, this.watchFields = void 0, this.fieldTypes = Kn.map((n) => ({ label: c.t(`nylasBookingFormConfig.fieldType.${n.value}`), value: n.value }));
|
|
1962
1962
|
}
|
|
1963
1963
|
elementNameChangedHandler(e) {
|
|
1964
|
-
|
|
1964
|
+
d("nylas-calendar-picker", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
1965
1965
|
}
|
|
1966
1966
|
selectedConfigurationChangedHandler(e) {
|
|
1967
1967
|
this.updateFormFields(e, !1);
|
|
1968
1968
|
}
|
|
1969
1969
|
selectedLanguageChangedHandler(e, n) {
|
|
1970
|
-
e !== n && (
|
|
1970
|
+
e !== n && (c.changeLanguage(e), this.fieldTypes = Kn.map((a) => ({ label: c.t(`nylasBookingFormConfig.fieldType.${a.value}`), value: a.value })));
|
|
1971
1971
|
}
|
|
1972
1972
|
connectedCallback() {
|
|
1973
|
-
|
|
1973
|
+
d("nylas-booking-form-config", "connectedCallback");
|
|
1974
1974
|
}
|
|
1975
1975
|
disconnectedCallback() {
|
|
1976
|
-
|
|
1976
|
+
d("nylas-booking-form-config", "disconnectedCallback");
|
|
1977
1977
|
}
|
|
1978
1978
|
componentWillLoad() {
|
|
1979
|
-
|
|
1979
|
+
d("nylas-booking-form-config", "componentWillLoad"), this.host.setAttribute("name", this.name), this.formFields = [], this.formFieldsChangedHandler(this.formFields, !1);
|
|
1980
1980
|
}
|
|
1981
1981
|
componentDidLoad() {
|
|
1982
|
-
|
|
1982
|
+
d("nylas-booking-form-config", "componentDidLoad"), this.selectedConfiguration && this.updateFormFields(this.selectedConfiguration, !1);
|
|
1983
1983
|
}
|
|
1984
1984
|
get isInternalsAvailable() {
|
|
1985
1985
|
return this.internals !== void 0 && typeof this.internals.setFormValue == "function";
|
|
1986
1986
|
}
|
|
1987
1987
|
updateFormFields(e, n = !0) {
|
|
1988
|
-
var o, l,
|
|
1988
|
+
var o, l, r, s;
|
|
1989
1989
|
this.watchFields = {
|
|
1990
1990
|
title: ((o = e == null ? void 0 : e.event_booking) == null ? void 0 : o.title) || "",
|
|
1991
1991
|
description: ((l = e == null ? void 0 : e.event_booking) == null ? void 0 : l.description) || ""
|
|
1992
1992
|
};
|
|
1993
|
-
const a = Object.entries(((
|
|
1993
|
+
const a = Object.entries(((r = e == null ? void 0 : e.scheduler) == null ? void 0 : r.additional_fields) || {}).map(([f, y]) => ({ ...y, key: f })) || this.additionalFields || [];
|
|
1994
1994
|
this.formFields = [
|
|
1995
1995
|
...a.sort((f, y) => f.order - y.order).map((f, y) => {
|
|
1996
1996
|
const u = Vn.find((v) => v.type === f.type);
|
|
@@ -2000,7 +2000,7 @@ const ca = ["dropdown", "radio_button"], da = ["multi_select"], Ia = class {
|
|
|
2000
2000
|
return { ...f, order: g - 1, isOpen: !1, typeLabel: p, fieldLabelKey: f.type };
|
|
2001
2001
|
})
|
|
2002
2002
|
], this.formFields = [...this.formFields], this.formFieldsChangedHandler(this.formFields, n);
|
|
2003
|
-
const t = (
|
|
2003
|
+
const t = (s = this.host.shadowRoot) == null ? void 0 : s.getElementById("fields");
|
|
2004
2004
|
b.create(t, {
|
|
2005
2005
|
animation: 150,
|
|
2006
2006
|
swap: !0,
|
|
@@ -2013,22 +2013,22 @@ const ca = ["dropdown", "radio_button"], da = ["multi_select"], Ia = class {
|
|
|
2013
2013
|
});
|
|
2014
2014
|
}
|
|
2015
2015
|
formFieldsChangedHandler(e, n = !0) {
|
|
2016
|
-
const o = (e || []).filter((l) => !l.readonly).sort((l,
|
|
2016
|
+
const o = (e || []).filter((l) => !l.readonly).sort((l, r) => l.order - r.order).map((l, r) => ({ ...{
|
|
2017
2017
|
type: l.type,
|
|
2018
2018
|
required: l.required,
|
|
2019
2019
|
label: l.label,
|
|
2020
|
-
order:
|
|
2020
|
+
order: r + 1,
|
|
2021
2021
|
options: l.options,
|
|
2022
2022
|
key: l.key,
|
|
2023
2023
|
default: l.default,
|
|
2024
2024
|
fieldLabelKey: l.fieldLabelKey
|
|
2025
|
-
} })).reduce((l,
|
|
2026
|
-
type:
|
|
2027
|
-
required:
|
|
2028
|
-
order:
|
|
2029
|
-
options:
|
|
2030
|
-
label:
|
|
2031
|
-
default:
|
|
2025
|
+
} })).reduce((l, r) => (r.key && (l[r.key] = {
|
|
2026
|
+
type: r.type,
|
|
2027
|
+
required: r.required,
|
|
2028
|
+
order: r.order,
|
|
2029
|
+
options: r.options,
|
|
2030
|
+
label: r.label,
|
|
2031
|
+
default: r.default
|
|
2032
2032
|
}), l), {});
|
|
2033
2033
|
this.isInternalsAvailable && this.internals.setFormValue(JSON.stringify(o), this.name), n && this.valueChanged.emit({
|
|
2034
2034
|
value: JSON.stringify(o),
|
|
@@ -2050,8 +2050,8 @@ const ca = ["dropdown", "radio_button"], da = ["multi_select"], Ia = class {
|
|
|
2050
2050
|
nylasFormDropdownChangedHandler(e) {
|
|
2051
2051
|
const { name: n, value: a } = e.detail;
|
|
2052
2052
|
if (n === "add-field") {
|
|
2053
|
-
const t = Vn.find((f) => f.type === a), o = Math.max(...this.formFields.map((f) => f.order)), l = this.formFields.filter((f) => f.type === t.type && f.key !== void 0).map((f) => f.key),
|
|
2054
|
-
this.formFields = [...this.formFields,
|
|
2053
|
+
const t = Vn.find((f) => f.type === a), o = Math.max(...this.formFields.map((f) => f.order)), l = this.formFields.filter((f) => f.type === t.type && f.key !== void 0).map((f) => f.key), r = this.findNextMissingNumber(l), s = { ...t, label: t.label, key: `${t.type}_${t.label.split(" ").join("-")}_${r}`, order: o + 1 };
|
|
2054
|
+
this.formFields = [...this.formFields, s], this.formFieldsChangedHandler(this.formFields);
|
|
2055
2055
|
} else if (n.includes("-default-value")) {
|
|
2056
2056
|
const t = parseInt(n.split("-")[0] || "0");
|
|
2057
2057
|
let o = a;
|
|
@@ -2087,8 +2087,8 @@ const ca = ["dropdown", "radio_button"], da = ["multi_select"], Ia = class {
|
|
|
2087
2087
|
if (n == null || a == null || n === a)
|
|
2088
2088
|
return;
|
|
2089
2089
|
const t = [...this.formFields], [o] = t.splice(n, 1);
|
|
2090
|
-
t.splice(a, 0, o), t.forEach((l,
|
|
2091
|
-
l.order =
|
|
2090
|
+
t.splice(a, 0, o), t.forEach((l, r) => {
|
|
2091
|
+
l.order = r + 1;
|
|
2092
2092
|
}), this.formFields = t, this.formFieldsChangedHandler(this.formFields);
|
|
2093
2093
|
}
|
|
2094
2094
|
fieldToggle(e) {
|
|
@@ -2123,29 +2123,29 @@ const ca = ["dropdown", "radio_button"], da = ["multi_select"], Ia = class {
|
|
|
2123
2123
|
this.formFields = this.formFields.map((a, t) => (t === e && (a.options || (a.options = []), a.options = a.options.filter((o, l) => l !== n)), a)), this.formFieldsChangedHandler(this.formFields);
|
|
2124
2124
|
}
|
|
2125
2125
|
fieldOptionChange(e, n, a) {
|
|
2126
|
-
this.formFields = this.formFields.map((t, o) => (o === e && (t.options || (t.options = []), t.options = t.options.map((l,
|
|
2126
|
+
this.formFields = this.formFields.map((t, o) => (o === e && (t.options || (t.options = []), t.options = t.options.map((l, r) => (r === n && (l = a.detail.value), l))), t)), this.formFieldsChangedHandler(this.formFields);
|
|
2127
2127
|
}
|
|
2128
2128
|
fieldDefaultValueChanged(e, n) {
|
|
2129
2129
|
this.formFields = this.formFields.map((a, t) => (t === e && (a.default = n.detail.value), a)), this.formFieldsChangedHandler(this.formFields);
|
|
2130
2130
|
}
|
|
2131
2131
|
render() {
|
|
2132
2132
|
var e;
|
|
2133
|
-
return i(O, { key: "20f0aeab89c822407ffaf1f96edf15d49440a72f" }, i("div", { key: "79ed7c953897d5b319adbdd9f09f6da1851622c1", class: "nylas-booking-form-config", part: "nbfc" }, i("div", { key: "2805f58cd85ee3252037aa340ebf65185f2d8d9e", class: "header", part: "nbfc__header" }, i("div", { key: "2467bd598226df19e9eb00d7a7288c9492270599", class: "header_text" }, i("h3", { key: "e5d7ede40d90f7e2c25c46fc192040a138e7f1fa" },
|
|
2133
|
+
return i(O, { key: "20f0aeab89c822407ffaf1f96edf15d49440a72f" }, i("div", { key: "79ed7c953897d5b319adbdd9f09f6da1851622c1", class: "nylas-booking-form-config", part: "nbfc" }, i("div", { key: "2805f58cd85ee3252037aa340ebf65185f2d8d9e", class: "header", part: "nbfc__header" }, i("div", { key: "2467bd598226df19e9eb00d7a7288c9492270599", class: "header_text" }, i("h3", { key: "e5d7ede40d90f7e2c25c46fc192040a138e7f1fa" }, c.t("nylasBookingFormConfig.headerTitle")), i("p", { key: "6118c71c1e3c9fd531aca31b95ae764f186b98a8" }, c.t("nylasBookingFormConfig.headerSubTitle"))), i("div", { key: "84f7d998d1cc8918183406fe19da487356b5a0d5", class: "header_action" }, i("select-dropdown", { key: "35c60cb0e733b7602c01cfe16793faaa80d21629", name: "add-field", exportparts: "sd_dropdown: nbfc__add_field, sd_dropdown-button: nbfc__add_field-button, sd_dropdown-content: nbfc__add_field-dropdown-content", options: this.fieldTypes, withSearch: !1, withChevron: !1, dropdownButtonText: c.t("nylasBookingFormConfig.dropdownButtonText") }, i("span", { key: "81819f5ed73e5e826bb9374d382699c69a4852e8", slot: "select-icon" }, i("plus-icon", { key: "1c8df2d966e00e48338559e436eac3c59aa4054c", width: "15", height: "15" }))))), i("div", { key: "4bbff378cf59553922de4d8c2ad7fda4765889b9", class: "content" }, i("div", { key: "c9679c35f96c072a558360dec003acefba62f7dc", class: "additional_fields static_fields", part: "nbfc__static_fields" }, this.staticFields.map((n, a) => i("div", { class: `form-field draggable ${n.readonly && "fixed"}`, part: "nbfc__form_field", key: a }, i("div", { class: "form-field_header", part: "nbfc__form_field-header" }, i("span", { class: "dragable" }, i("dragable-icon", { width: "24", height: "25" })), i("div", { class: "form-field_header_text" }, i("h4", null, c.t(`nylasBookingFormConfig.fieldLabel.${n.fieldLabelKey}`)), i("p", null, c.t(`nylasBookingFormConfig.fieldType.${n.type}`))), i("div", { class: "form-field_header_actions" }, i("span", { class: "is-required" }, n.required ? c.t("required") : c.t("optional")), i("span", { class: `chevron ${n.isOpen ? "open" : "closed"}`, onClick: () => {
|
|
2134
2134
|
this.staticFieldToggle(a);
|
|
2135
|
-
} }, i("chevron-icon", { width: "24", height: "24" })))), i("div", { class: `form-field_content ${!n.isOpen && "hidden"}`, part: "nbfc__form_field-content" }, i("div", { class: "inputs" }, i("input-component", { class: "label-input", name: `${a}`, key: a, label:
|
|
2135
|
+
} }, i("chevron-icon", { width: "24", height: "24" })))), i("div", { class: `form-field_content ${!n.isOpen && "hidden"}`, part: "nbfc__form_field-content" }, i("div", { class: "inputs" }, i("input-component", { class: "label-input", name: `${a}`, key: a, label: c.t("nylasBookingFormConfig.label"), required: !1, readOnly: n.readonly, defaultValue: n.label }, i("div", { class: "required-input", slot: "additional-input" }, i("input", { type: "checkbox", name: `required_${n.order}`, id: `required_${n.order}`, onClick: () => {
|
|
2136
2136
|
this.fieldRequired(a);
|
|
2137
|
-
}, checked: n.required, disabled: n.readonly }), i("label", { htmlFor: `required_${n.order}`, "aria-label": "Required" },
|
|
2137
|
+
}, checked: n.required, disabled: n.readonly }), i("label", { htmlFor: `required_${n.order}`, "aria-label": "Required" }, c.t("required"))))))))), i("div", { key: "165f7e84613393e33a8216224e09ea35a5b2a13a", id: "fields", class: "additional_fields", part: "nbfc__additional_fields" }, (e = this.formFields) == null ? void 0 : e.map((n, a) => {
|
|
2138
2138
|
var t, o;
|
|
2139
|
-
return i("div", { class: `form-field draggable ${n != null && n.readonly ? "fixed" : ""}`, part: "nbfc__form_field", key: n.key }, i("div", { class: "form-field_header", part: "nbfc__form_field-header" }, i("span", { class: "dragable" }, i("dragable-icon", { width: "24", height: "25" })), i("div", { class: "form-field_header_text" }, i("h4", null, n.label ||
|
|
2140
|
-
const l = this.watchFields.title,
|
|
2139
|
+
return i("div", { class: `form-field draggable ${n != null && n.readonly ? "fixed" : ""}`, part: "nbfc__form_field", key: n.key }, i("div", { class: "form-field_header", part: "nbfc__form_field-header" }, i("span", { class: "dragable" }, i("dragable-icon", { width: "24", height: "25" })), i("div", { class: "form-field_header_text" }, i("h4", null, n.label || c.t(`nylasBookingFormConfig.fieldLabel.${n.fieldLabelKey}`)), i("p", null, c.t(`nylasBookingFormConfig.fieldType.${n.type}`))), i("div", { class: "form-field_header_actions" }, i("span", { class: "is-required" }, n.required ? c.t("required") : c.t("optional")), !n.readonly && i("button", { onClick: () => {
|
|
2140
|
+
const l = this.watchFields.title, r = this.watchFields.description;
|
|
2141
2141
|
if (l && n.key && l.includes(n.key)) {
|
|
2142
|
-
n.error =
|
|
2142
|
+
n.error = c.t("nylasBookingFormConfig.fieldInTitleError"), this.formFields = [...this.formFields], this.formFieldsChangedHandler(this.formFields), setTimeout(() => {
|
|
2143
2143
|
n.error = "", this.formFields = [...this.formFields], this.formFieldsChangedHandler(this.formFields);
|
|
2144
2144
|
}, 3e3);
|
|
2145
2145
|
return;
|
|
2146
2146
|
}
|
|
2147
|
-
if (
|
|
2148
|
-
n.error =
|
|
2147
|
+
if (r && n.key && r.includes(n.key)) {
|
|
2148
|
+
n.error = c.t("nylasBookingFormConfig.fieldInDescriptionError"), this.formFields = [...this.formFields], this.formFieldsChangedHandler(this.formFields), setTimeout(() => {
|
|
2149
2149
|
n.error = "", this.formFields = [...this.formFields], this.formFieldsChangedHandler(this.formFields);
|
|
2150
2150
|
}, 3e3);
|
|
2151
2151
|
return;
|
|
@@ -2156,16 +2156,16 @@ const ca = ["dropdown", "radio_button"], da = ["multi_select"], Ia = class {
|
|
|
2156
2156
|
} }, i("chevron-icon", { width: "24", height: "24" })))), i("span", { class: {
|
|
2157
2157
|
error: !0,
|
|
2158
2158
|
"fade-out": !(n != null && n.error) || n.error === ""
|
|
2159
|
-
} }, n.error), i("div", { class: `form-field_content ${!n.isOpen && "hidden"}`, part: "nbfc__form_field-content" }, i("div", { class: "inputs" }, i("input-component", { class: "label-input", name: `${a}`, key: `${a}-${n.key}-label`, label:
|
|
2159
|
+
} }, n.error), i("div", { class: `form-field_content ${!n.isOpen && "hidden"}`, part: "nbfc__form_field-content" }, i("div", { class: "inputs" }, i("input-component", { class: "label-input", name: `${a}`, key: `${a}-${n.key}-label`, label: c.t("nylasBookingFormConfig.label"), required: !1, readOnly: n.readonly, defaultValue: n.label }, i("div", { class: "required-input", slot: "additional-input" }, i("input", { type: "checkbox", name: `required_${a}`, id: `required_${a}`, onClick: () => {
|
|
2160
2160
|
this.fieldRequired(a);
|
|
2161
|
-
}, checked: n.required, disabled: n.readonly }), i("label", { htmlFor: `required_${a}`, "aria-label": "Required" },
|
|
2162
|
-
{ value: "null", label:
|
|
2161
|
+
}, checked: n.required, disabled: n.readonly }), i("label", { htmlFor: `required_${a}`, "aria-label": "Required" }, c.t("required")))), !n.readonly && ca.includes(n.type) && i("select-dropdown", { name: `${a}-${n.key}-default-value`, key: `${a}-${n.key}-default-value`, label: c.t("nylasBookingFormConfig.defaultValue"), required: !1, readOnly: n.readonly, options: [
|
|
2162
|
+
{ value: "null", label: c.t("nylasBookingCalendarPicker.selectOptionLabel") },
|
|
2163
2163
|
...((t = n.options) == null ? void 0 : t.map((l) => ({ value: l, label: l }))) || []
|
|
2164
|
-
], emptyValue:
|
|
2165
|
-
this.fieldOptionRemove(a,
|
|
2164
|
+
], emptyValue: c.t("nylasBookingCalendarPicker.selectOptionLabel"), withSearch: !1 }), !n.readonly && n.type === "checkbox" && i("select-dropdown", { name: `${a}-${n.key}-default-value`, key: `${a}-${n.key}-default-value`, label: c.t("nylasBookingFormConfig.defaultValue"), required: !1, readOnly: n.readonly, options: [{ value: "null", label: c.t("nylasBookingCalendarPicker.selectOptionLabel") }, ...["true", "false"].map((l) => ({ value: l, label: l }))], emptyValue: c.t("nylasBookingCalendarPicker.selectOptionLabel"), withSearch: !1 }), !n.readonly && da.includes(n.type) && i("multi-select-dropdown", { name: `${a}-${n.key}-default-value`, key: `${a}-${n.key}-default-value`, label: c.t("nylasBookingFormConfig.defaultValue"), required: !1, selectAtLeastOneOptionLabel: c.t("selectOneOrMoreOptions"), multipleOptionsSelectedLabel: c.t("multipleOptionsSelected"), readOnly: n.readonly, options: ((o = n.options) == null ? void 0 : o.filter((l) => !!l && l !== null).map((l) => ({ value: l, label: l }))) || [] }), !n.readonly && n.type !== "date" && n.type !== "checkbox" && !ca.includes(n.type) && !da.includes(n.type) && i("input-component", { class: "default-value", name: `default-value-${a}`, key: `${a}-${n.key}-default-value`, label: c.t("nylasBookingFormConfig.defaultValue"), required: !1, readOnly: n.readonly, defaultValue: n.default }), !n.readonly && n.type === "date" && i("nylas-date-component", { class: "default-value", name: `default-value-${a}`, key: `${a}-${n.key}-default-value`, label: c.t("nylasBookingFormConfig.defaultValue"), required: !1, readOnly: n.readonly, defaultValue: n.default })), n.options != null && i("div", { class: "options-container" }, i("h4", null, c.t("nylasBookingFormConfig.allOptionsHeader")), i("div", { class: "options" }, n.options.map((l, r) => i("div", { class: "option" }, i("input-component", { key: r, name: `${a}_${r}`, label: n.typeLabel + " option " + (r + 1), required: !0, defaultValue: l }, r > 1 && i("div", { class: "required-input", slot: "additional-input" }, i("button", { onClick: () => {
|
|
2165
|
+
this.fieldOptionRemove(a, r);
|
|
2166
2166
|
} }, i("close-icon", null))))))), i("button", { onClick: () => {
|
|
2167
2167
|
this.fieldOptionAdd(a);
|
|
2168
|
-
}, part: "nap__add-time-range" }, i("add-circle-icon", null), " ",
|
|
2168
|
+
}, part: "nap__add-time-range" }, i("add-circle-icon", null), " ", c.t("nylasBookingFormConfig.addOption")))));
|
|
2169
2169
|
})))));
|
|
2170
2170
|
}
|
|
2171
2171
|
static get formAssociated() {
|
|
@@ -2182,8 +2182,8 @@ const ca = ["dropdown", "radio_button"], da = ["multi_select"], Ia = class {
|
|
|
2182
2182
|
};
|
|
2183
2183
|
}
|
|
2184
2184
|
};
|
|
2185
|
-
|
|
2186
|
-
|
|
2185
|
+
sl([
|
|
2186
|
+
D({
|
|
2187
2187
|
name: "nylas-booking-form-config",
|
|
2188
2188
|
stateToProps: /* @__PURE__ */ new Map([
|
|
2189
2189
|
["schedulerConfig.selectedConfiguration", "selectedConfiguration"],
|
|
@@ -2194,64 +2194,64 @@ rl([
|
|
|
2194
2194
|
gn("design:type", Function),
|
|
2195
2195
|
gn("design:paramtypes", []),
|
|
2196
2196
|
gn("design:returntype", void 0)
|
|
2197
|
-
],
|
|
2198
|
-
|
|
2197
|
+
], Fa.prototype, "render", null);
|
|
2198
|
+
Fa.style = rl;
|
|
2199
2199
|
const cl = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff;width:inherit}.nylas-buffer-time{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200);text-align:left}.nylas-buffer-time .header{padding:1rem;border-bottom:1px solid var(--nylas-base-200)}.nylas-buffer-time .header h3{margin:0;font-size:16px;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-buffer-time .header p{display:flex;gap:4px;align-items:center;margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.nylas-buffer-time .nylas-buffer-time__body{display:grid;grid-template-columns:1fr auto}@media screen and (max-width: 768px){.nylas-buffer-time .nylas-buffer-time__body{grid-template-columns:1fr}}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__dropdown{padding:1rem;display:flex;flex-direction:column;gap:1rem;border-right:1px solid var(--nylas-base-200);color:var(--nylas-base-800)}@media screen and (max-width: 768px){.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__dropdown{border:none}}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__dropdown .nylas-buffer-time__row{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:1rem}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__dropdown .nylas-buffer-time__row label{width:200px}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__dropdown .nylas-buffer-time__row .dropdown-container{display:flex;gap:1rem;align-items:center;justify-content:flex-end}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__dropdown .nylas-buffer-time__row .dropdown-container span{width:-webkit-fill-available;width:fill-available;width:-moz-available;text-align:end}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview{width:208px;background:var(--nylas-base-25);border-bottom-right-radius:var(--nylas-border-radius-2x)}@media screen and (max-width: 768px){.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview{width:inherit;border-bottom-left-radius:var(--nylas-border-radius-2x)}}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview h4{font-size:14px;line-height:24px;color:var(--nylas-base-600);font-family:var(--nylas-font-family);font-weight:500;text-align:center;margin:0.75rem 0}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview .preview-container{padding:0 2rem 1rem}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview .preview-container .slot{background-color:transparent;border-top:1px solid var(--nylas-base-300)}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview .preview-container .slot.active{background-color:var(--nylas-base-100)}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview .preview-container .slot:last-of-type{border-bottom:1px solid var(--nylas-base-300)}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview .preview-container .event-slot{background-color:var(--nylas-base-600);border-top:1px solid var(--nylas-base-300)}.nylas-buffer-time .nylas-buffer-time__dropdown select-dropdown::part(sd_dropdown-button){width:104px;display:flex;justify-content:space-between;align-items:center;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);padding:14px}.nylas-buffer-time .nylas-buffer-time__dropdown select-dropdown::part(sd_dropdown-content){width:100%}.nylas-buffer-time .nylas-buffer-time__dropdown select-dropdown::part(sd_dropdown-button-selected-label){max-width:calc(100% - 2rem);font-family:var(--nylas-font-family);font-size:16px;line-height:24px}', dl = cl;
|
|
2200
2200
|
var fl = function(e, n, a, t) {
|
|
2201
|
-
var o = arguments.length, l = o < 3 ? n : t === null ? t = Object.getOwnPropertyDescriptor(n, a) : t,
|
|
2201
|
+
var o = arguments.length, l = o < 3 ? n : t === null ? t = Object.getOwnPropertyDescriptor(n, a) : t, r;
|
|
2202
2202
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
2203
2203
|
l = Reflect.decorate(e, n, a, t);
|
|
2204
2204
|
else
|
|
2205
|
-
for (var
|
|
2206
|
-
(
|
|
2205
|
+
for (var s = e.length - 1; s >= 0; s--)
|
|
2206
|
+
(r = e[s]) && (l = (o < 3 ? r(l) : o > 3 ? r(n, a, l) : r(n, a)) || l);
|
|
2207
2207
|
return o > 3 && l && Object.defineProperty(n, a, l), l;
|
|
2208
2208
|
}, hn = function(e, n) {
|
|
2209
2209
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
2210
2210
|
return Reflect.metadata(e, n);
|
|
2211
2211
|
};
|
|
2212
|
-
const
|
|
2212
|
+
const Ia = class {
|
|
2213
2213
|
constructor(e) {
|
|
2214
2214
|
var n, a, t;
|
|
2215
2215
|
x(this, e), this.valueChanged = S(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.selectedConfiguration = void 0, this.name = "buffer-time", this.buffer = ((t = (a = (n = this.selectedConfiguration) == null ? void 0 : n.availability) == null ? void 0 : a.availability_rules) == null ? void 0 : t.buffer) ?? { before: 0, after: 0 }, this.selectedLanguage = void 0, this.selectedBeforeBufferTime = this.buffer.before, this.selectedAfterBufferTime = this.buffer.after, this.componentLoaded = !1;
|
|
2216
2216
|
}
|
|
2217
2217
|
connectedCallback() {
|
|
2218
|
-
|
|
2218
|
+
d("nylas-buffer-time", "connectedCallback");
|
|
2219
2219
|
}
|
|
2220
2220
|
disconnectedCallback() {
|
|
2221
|
-
|
|
2221
|
+
d("nylas-buffer-time", "disconnectedCallback");
|
|
2222
2222
|
}
|
|
2223
2223
|
componentWillLoad() {
|
|
2224
|
-
|
|
2224
|
+
d("nylas-buffer-time", "componentWillLoad"), this.host.setAttribute("name", this.name);
|
|
2225
2225
|
}
|
|
2226
2226
|
componentDidLoad() {
|
|
2227
|
-
|
|
2227
|
+
d("nylas-buffer-time", "componentDidLoad"), this.selectedConfiguration ? this.selectedConfigurationChangedHandler(this.selectedConfiguration) : (this.selectedBeforeBufferTime = this.buffer.before, this.selectedAfterBufferTime = this.buffer.after), this.updateFormValue(!1), this.componentLoaded = !0;
|
|
2228
2228
|
}
|
|
2229
2229
|
componentWillUpdate() {
|
|
2230
|
-
|
|
2230
|
+
d("nylas-buffer-time", "componentWillUpdate");
|
|
2231
2231
|
}
|
|
2232
2232
|
componentDidUpdate() {
|
|
2233
|
-
|
|
2233
|
+
d("nylas-buffer-time", "componentDidUpdate");
|
|
2234
2234
|
}
|
|
2235
2235
|
componentWillRender() {
|
|
2236
|
-
|
|
2236
|
+
d("nylas-buffer-time", "componentWillRender");
|
|
2237
2237
|
}
|
|
2238
2238
|
componentDidRender() {
|
|
2239
|
-
|
|
2239
|
+
d("nylas-buffer-time", "componentDidRender");
|
|
2240
2240
|
}
|
|
2241
2241
|
elementNameChangedHandler(e) {
|
|
2242
|
-
|
|
2242
|
+
d("nylas-buffer-time", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
2243
2243
|
}
|
|
2244
2244
|
selectedConfigurationChangedHandler(e) {
|
|
2245
2245
|
var a, t;
|
|
2246
|
-
|
|
2246
|
+
d("nylas-buffer-time", "selectedConfigurationChangedHandler", e);
|
|
2247
2247
|
const n = (t = (a = e == null ? void 0 : e.availability) == null ? void 0 : a.availability_rules) == null ? void 0 : t.buffer;
|
|
2248
2248
|
this.selectedAfterBufferTime = n != null && n.after ? n.after : this.buffer.after, this.selectedBeforeBufferTime = n != null && n.before ? n.before : this.buffer.before, this.updateFormValue(!1);
|
|
2249
2249
|
}
|
|
2250
2250
|
selectedLanguageChangedHandler(e, n) {
|
|
2251
|
-
e !== n &&
|
|
2251
|
+
e !== n && c.changeLanguage(e);
|
|
2252
2252
|
}
|
|
2253
2253
|
nylasFormDropdownChangedHandler(e) {
|
|
2254
|
-
|
|
2254
|
+
d("nylas-buffer-time", "nylasFormDropdownChangedHandler", e.detail);
|
|
2255
2255
|
const { value: n, name: a } = e.detail;
|
|
2256
2256
|
a === "before-buffer-time" ? this.selectedBeforeBufferTime = parseInt(n) : a === "after-buffer-time" && (this.selectedAfterBufferTime = parseInt(n)), this.updateFormValue();
|
|
2257
2257
|
}
|
|
@@ -2266,26 +2266,26 @@ const Fa = class {
|
|
|
2266
2266
|
this.isInternalsAvailable && this.internals.setFormValue(JSON.stringify(n), this.name), e && this.valueChanged.emit({ value: JSON.stringify(n), name: this.name });
|
|
2267
2267
|
}
|
|
2268
2268
|
renderPreview() {
|
|
2269
|
-
const t = (
|
|
2270
|
-
const
|
|
2269
|
+
const t = (r) => {
|
|
2270
|
+
const s = Math.floor(r / 30), f = r % 30 / 30 * 10;
|
|
2271
2271
|
return {
|
|
2272
|
-
fullSlots:
|
|
2272
|
+
fullSlots: s,
|
|
2273
2273
|
partialFillHeight: f
|
|
2274
2274
|
};
|
|
2275
2275
|
}, o = () => {
|
|
2276
|
-
const { fullSlots:
|
|
2276
|
+
const { fullSlots: r, partialFillHeight: s } = t(this.selectedBeforeBufferTime);
|
|
2277
2277
|
return Array.from({ length: 4 }, (f, y) => {
|
|
2278
|
-
const u = this.selectedBeforeBufferTime > 0 && y > 4 -
|
|
2279
|
-
return u && !p ? g.backgroundColor = "var(--nylas-base-100)" : p && (g.background = `linear-gradient(to top, var(--nylas-base-100) ${
|
|
2278
|
+
const u = this.selectedBeforeBufferTime > 0 && y > 4 - r - 1, p = this.selectedBeforeBufferTime > 0 && y === 4 - r - 1 && s > 0, g = {};
|
|
2279
|
+
return u && !p ? g.backgroundColor = "var(--nylas-base-100)" : p && (g.background = `linear-gradient(to top, var(--nylas-base-100) ${s}px, transparent 0)`), i("div", { key: y, class: `slot ${u ? "active" : ""}`, style: {
|
|
2280
2280
|
height: "10px",
|
|
2281
2281
|
...g
|
|
2282
2282
|
} });
|
|
2283
2283
|
});
|
|
2284
2284
|
}, l = () => {
|
|
2285
|
-
const { fullSlots:
|
|
2285
|
+
const { fullSlots: r, partialFillHeight: s } = t(this.selectedAfterBufferTime);
|
|
2286
2286
|
return Array.from({ length: 4 }, (f, y) => {
|
|
2287
|
-
const u = this.selectedAfterBufferTime > 0 && y <
|
|
2288
|
-
return u && !p ? g.backgroundColor = "var(--nylas-base-100)" : p && (g.background = `linear-gradient(to bottom, var(--nylas-base-100) ${
|
|
2287
|
+
const u = this.selectedAfterBufferTime > 0 && y < r, p = y === r && s > 0, g = {};
|
|
2288
|
+
return u && !p ? g.backgroundColor = "var(--nylas-base-100)" : p && (g.background = `linear-gradient(to bottom, var(--nylas-base-100) ${s}px, transparent 0)`), i("div", { key: y, class: `slot ${u ? "active" : ""}`, style: {
|
|
2289
2289
|
height: "10px",
|
|
2290
2290
|
...g
|
|
2291
2291
|
} });
|
|
@@ -2301,7 +2301,7 @@ const Fa = class {
|
|
|
2301
2301
|
value: t.toString()
|
|
2302
2302
|
};
|
|
2303
2303
|
});
|
|
2304
|
-
return i(O, null, i("div", { class: "nylas-buffer-time", part: "nbt" }, i("div", { class: "header", part: "nbt__header" }, i("h3", null,
|
|
2304
|
+
return i(O, null, i("div", { class: "nylas-buffer-time", part: "nbt" }, i("div", { class: "header", part: "nbt__header" }, i("h3", null, c.t("nylasBufferTime.headerTitle")), i("p", null, c.t("nylasBufferTime.headerSubTitle"), i("tooltip-component", null, i("info-icon", { slot: "tooltip-icon" }), i("span", { slot: "tooltip-content" }, c.t("nylasBufferTime.tooltip.desc"))))), i("div", { class: "nylas-buffer-time__body", part: "nbt__body" }, i("div", { class: "nylas-buffer-time__dropdown" }, i("div", { class: "nylas-buffer-time__row" }, i("label", null, c.t("nylasBufferTime.beforeBufferLabel")), i("div", { class: "dropdown-container" }, this.componentLoaded && i("select-dropdown", { id: "before-buffer-time", withSearch: !1, name: "before-buffer-time", exportparts: "sd_dropdown: nbt__dropdown-before, sd_dropdown-button: nbt__dropdown-button-before, sd_dropdown-content: nbt__dropdown-content-before", options: e, defaultSelectedOption: e.find((n) => n.value === this.selectedBeforeBufferTime.toString()) }), i("span", null, c.t("nylasBufferTime.minutesShort")))), i("div", { class: "nylas-buffer-time__row" }, i("label", null, c.t("nylasBufferTime.afterBufferLabel")), i("div", { class: "dropdown-container" }, this.componentLoaded && i("select-dropdown", { id: "after-buffer-time", withSearch: !1, name: "after-buffer-time", exportparts: "sd_dropdown: nbt__dropdown-after, sd_dropdown-button: nbt__dropdown-button-after, sd_dropdown-content: nbt__dropdown-content-after", options: e, defaultSelectedOption: e.find((n) => n.value === this.selectedAfterBufferTime.toString()) }), i("span", null, c.t("nylasBufferTime.minutesShort"))))), i("div", { class: "nylas-buffer-time__preview", part: "nbt__preview" }, i("h4", null, c.t("nylasBufferTime.previewHeader")), this.renderPreview()))));
|
|
2305
2305
|
}
|
|
2306
2306
|
static get formAssociated() {
|
|
2307
2307
|
return !0;
|
|
@@ -2318,7 +2318,7 @@ const Fa = class {
|
|
|
2318
2318
|
}
|
|
2319
2319
|
};
|
|
2320
2320
|
fl([
|
|
2321
|
-
|
|
2321
|
+
D({
|
|
2322
2322
|
name: "nylas-buffer-time",
|
|
2323
2323
|
stateToProps: /* @__PURE__ */ new Map([
|
|
2324
2324
|
["schedulerConfig.selectedConfiguration", "selectedConfiguration"],
|
|
@@ -2335,16 +2335,16 @@ fl([
|
|
|
2335
2335
|
hn("design:type", Function),
|
|
2336
2336
|
hn("design:paramtypes", []),
|
|
2337
2337
|
hn("design:returntype", void 0)
|
|
2338
|
-
],
|
|
2339
|
-
|
|
2338
|
+
], Ia.prototype, "render", null);
|
|
2339
|
+
Ia.style = dl;
|
|
2340
2340
|
const yl = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff;width:inherit}.nylas-calendar-picker{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200)}.nylas-calendar-picker .nylas-calendar-picker__loading{padding-bottom:1rem;display:flex;flex-direction:column;gap:4px}.nylas-calendar-picker .nylas-calendar-picker__loading .label{display:flex;align-items:center;gap:0.5rem;margin:1rem 1rem 0;color:var(--nylas-base-800)}.nylas-calendar-picker .nylas-calendar-picker__loading .label tooltip-component{display:flex}.nylas-calendar-picker .nylas-calendar-picker__loading .loading-button{margin:0 1rem;padding:0;width:inherit;height:48px;color:var(--nylas-base-900);font-size:16px;cursor:not-allowed;display:flex;gap:0.5rem;justify-content:space-between;align-items:center;background:transparent;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}.nylas-calendar-picker .nylas-calendar-picker__loading .loading-button span{padding:0 1rem}.nylas-calendar-picker .nylas-calendar-picker__dropdown{padding:1rem}.nylas-calendar-picker .nylas-calendar-picker__dropdown multi-select-dropdown::part(msd_dropdown){width:100%;display:flex;flex-direction:column;gap:4px}.nylas-calendar-picker .nylas-calendar-picker__dropdown multi-select-dropdown::part(msd_dropdown-button){width:100%;display:flex;justify-content:space-between;align-items:center;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);padding:1rem}.nylas-calendar-picker .nylas-calendar-picker__dropdown multi-select-dropdown::part(msd_dropdown-button--error){border:1px solid var(--nylas-error)}.nylas-calendar-picker .nylas-calendar-picker__dropdown multi-select-dropdown::part(msd_dropdown-content){width:100%;max-width:unset;margin-top:-0.5rem}.nylas-calendar-picker .nylas-calendar-picker__dropdown multi-select-dropdown::part(msd_dropdown-button-selected-label){max-width:calc(100% - 2rem);font-family:var(--nylas-font-family);font-size:16px;line-height:24px}', pl = yl;
|
|
2341
2341
|
var ul = function(e, n, a, t) {
|
|
2342
|
-
var o = arguments.length, l = o < 3 ? n : t === null ? t = Object.getOwnPropertyDescriptor(n, a) : t,
|
|
2342
|
+
var o = arguments.length, l = o < 3 ? n : t === null ? t = Object.getOwnPropertyDescriptor(n, a) : t, r;
|
|
2343
2343
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
2344
2344
|
l = Reflect.decorate(e, n, a, t);
|
|
2345
2345
|
else
|
|
2346
|
-
for (var
|
|
2347
|
-
(
|
|
2346
|
+
for (var s = e.length - 1; s >= 0; s--)
|
|
2347
|
+
(r = e[s]) && (l = (o < 3 ? r(l) : o > 3 ? r(n, a, l) : r(n, a)) || l);
|
|
2348
2348
|
return o > 3 && l && Object.defineProperty(n, a, l), l;
|
|
2349
2349
|
}, bn = function(e, n) {
|
|
2350
2350
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
@@ -2355,54 +2355,54 @@ const Ta = class {
|
|
|
2355
2355
|
x(this, e), this.valueChanged = S(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 = "calendar", this.currentUser = void 0, this.calendars = void 0, this.defaultSelectedCalendars = [], this.selectedLanguage = void 0, this.selectedCalendars = [], this.error = "";
|
|
2356
2356
|
}
|
|
2357
2357
|
elementNameChangedHandler(e) {
|
|
2358
|
-
|
|
2358
|
+
d("nylas-calendar-picker", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
2359
2359
|
}
|
|
2360
2360
|
selectedLanguageChangedHandler(e, n) {
|
|
2361
|
-
e !== n && (
|
|
2361
|
+
e !== n && (c.changeLanguage(e), this.error && (this.error = c.t("nylasCalendarPicker.selectAtLeastOneCalendar")));
|
|
2362
2362
|
}
|
|
2363
2363
|
connectedCallback() {
|
|
2364
|
-
|
|
2364
|
+
d("nylas-calendar-picker", "connectedCallback");
|
|
2365
2365
|
}
|
|
2366
2366
|
disconnectedCallback() {
|
|
2367
|
-
|
|
2367
|
+
d("nylas-calendar-picker", "disconnectedCallback");
|
|
2368
2368
|
}
|
|
2369
2369
|
componentWillLoad() {
|
|
2370
|
-
|
|
2370
|
+
d("nylas-calendar-picker", "componentWillLoad"), this.host.setAttribute("name", this.name);
|
|
2371
2371
|
}
|
|
2372
2372
|
componentDidLoad() {
|
|
2373
|
-
|
|
2373
|
+
d("nylas-calendar-picker", "componentDidLoad"), typeof this.internals.setFormValue == "function" && this.internals.setFormValue(this.defaultSelectedCalendars.toString(), this.name);
|
|
2374
2374
|
}
|
|
2375
2375
|
componentWillUpdate() {
|
|
2376
|
-
|
|
2376
|
+
d("nylas-calendar-picker", "componentWillUpdate");
|
|
2377
2377
|
}
|
|
2378
2378
|
componentDidUpdate() {
|
|
2379
|
-
|
|
2379
|
+
d("nylas-calendar-picker", "componentDidUpdate");
|
|
2380
2380
|
}
|
|
2381
2381
|
componentWillRender() {
|
|
2382
|
-
|
|
2382
|
+
d("nylas-calendar-picker", "componentWillRender");
|
|
2383
2383
|
}
|
|
2384
2384
|
componentDidRender() {
|
|
2385
|
-
|
|
2385
|
+
d("nylas-calendar-picker", "componentDidRender");
|
|
2386
2386
|
}
|
|
2387
2387
|
selectedOptionsChangedHandler(e) {
|
|
2388
|
-
|
|
2388
|
+
d("nylas-calendar-picker", "nylasFormDropdownChangedHandler", e.detail);
|
|
2389
2389
|
const n = (a) => {
|
|
2390
2390
|
const { value: t } = a.detail;
|
|
2391
|
-
this.selectedCalendars = [...t], this.selectedCalendars.length === 0 ? (this.error =
|
|
2391
|
+
this.selectedCalendars = [...t], this.selectedCalendars.length === 0 ? (this.error = c.t("nylasCalendarPicker.selectAtLeastOneCalendar"), this.internals.setValidity({ customError: !0 }, this.error)) : (this.error = "", this.internals.setValidity({})), this.internals.setFormValue(t.toString(), this.name);
|
|
2392
2392
|
};
|
|
2393
2393
|
this.valueChanged.emit({ ...e.detail, name: this.name, valueChangedHandler: n });
|
|
2394
2394
|
}
|
|
2395
2395
|
render() {
|
|
2396
2396
|
var n;
|
|
2397
2397
|
const e = ((n = this.calendars) == null ? void 0 : n.map((a) => {
|
|
2398
|
-
var t, o, l,
|
|
2398
|
+
var t, o, l, r;
|
|
2399
2399
|
return {
|
|
2400
2400
|
value: a.id,
|
|
2401
2401
|
label: a.name,
|
|
2402
|
-
selected: ((t = this.defaultSelectedCalendars) == null ? void 0 : t.includes(a.id)) || ((o = this.defaultSelectedCalendars) != null && o.includes("primary") || ((l = this.defaultSelectedCalendars) == null ? void 0 : l.length) === 0 ? a.id === ((
|
|
2402
|
+
selected: ((t = this.defaultSelectedCalendars) == null ? void 0 : t.includes(a.id)) || ((o = this.defaultSelectedCalendars) != null && o.includes("primary") || ((l = this.defaultSelectedCalendars) == null ? void 0 : l.length) === 0 ? a.id === ((r = this.currentUser) == null ? void 0 : r.email) || a.id === this.name.split("participant-")[1] : !1)
|
|
2403
2403
|
};
|
|
2404
2404
|
})) ?? [];
|
|
2405
|
-
return i(O, null, i("div", { class: "nylas-calendar-picker", part: "ncp" }, e.length > 0 ? i("div", { class: "nylas-calendar-picker__dropdown" }, i("multi-select-dropdown", { name: this.name, options: e, selectAtLeastOneOptionLabel:
|
|
2405
|
+
return i(O, null, i("div", { class: "nylas-calendar-picker", part: "ncp" }, e.length > 0 ? i("div", { class: "nylas-calendar-picker__dropdown" }, i("multi-select-dropdown", { name: this.name, options: e, selectAtLeastOneOptionLabel: c.t("selectOneOrMoreOptions"), multipleOptionsSelectedLabel: c.t("multipleOptionsSelected"), error: this.error, exportparts: "msd_dropdown: ncp__dropdown, msd_dropdown-button: ncp__dropdown-button, msd_dropdown-content: ncp__dropdown-content" })) : i("div", { class: "nylas-calendar-picker__loading" }, i("span", { class: "label" }, c.t("nylasCalendarPicker.calendarPickerLabel"), " ", i("info-icon", null)), i("div", { class: "loading-button" }, i("span", null, c.t("loading"), "...")))));
|
|
2406
2406
|
}
|
|
2407
2407
|
static get formAssociated() {
|
|
2408
2408
|
return !0;
|
|
@@ -2418,7 +2418,7 @@ const Ta = class {
|
|
|
2418
2418
|
}
|
|
2419
2419
|
};
|
|
2420
2420
|
ul([
|
|
2421
|
-
|
|
2421
|
+
D({
|
|
2422
2422
|
name: "nylas-calendar-picker",
|
|
2423
2423
|
stateToProps: /* @__PURE__ */ new Map([
|
|
2424
2424
|
["schedulerConfig.currentUser", "currentUser"],
|
|
@@ -2439,12 +2439,12 @@ ul([
|
|
|
2439
2439
|
Ta.style = pl;
|
|
2440
2440
|
const ml = ':host{--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff}.nylas-cancellation-policy{display:flex;flex-direction:column;gap:4px}.nylas-cancellation-policy label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:16px;font-style:normal;font-weight:400;line-height:150%;}.nylas-cancellation-policy label span.label-icon{margin-left:4px}.nylas-cancellation-policy label span.label-icon tooltip-component{display:flex}.nylas-cancellation-policy textarea{padding:12px 16px;border-width:1;resize:vertical;border-radius:8px;font-family:var(--nylas-font-family);font-size:16px;line-height:24px;border:1px solid var(--nylas-base-200)}.nylas-cancellation-policy textarea::-webkit-resizer{display:none}', gl = ml;
|
|
2441
2441
|
var hl = function(e, n, a, t) {
|
|
2442
|
-
var o = arguments.length, l = o < 3 ? n : t === null ? t = Object.getOwnPropertyDescriptor(n, a) : t,
|
|
2442
|
+
var o = arguments.length, l = o < 3 ? n : t === null ? t = Object.getOwnPropertyDescriptor(n, a) : t, r;
|
|
2443
2443
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
2444
2444
|
l = Reflect.decorate(e, n, a, t);
|
|
2445
2445
|
else
|
|
2446
|
-
for (var
|
|
2447
|
-
(
|
|
2446
|
+
for (var s = e.length - 1; s >= 0; s--)
|
|
2447
|
+
(r = e[s]) && (l = (o < 3 ? r(l) : o > 3 ? r(n, a, l) : r(n, a)) || l);
|
|
2448
2448
|
return o > 3 && l && Object.defineProperty(n, a, l), l;
|
|
2449
2449
|
}, vn = function(e, n) {
|
|
2450
2450
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
@@ -2455,33 +2455,33 @@ const $a = class {
|
|
|
2455
2455
|
x(this, e), this.valueChanged = S(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.selectedConfiguration = void 0, this.cancellationPolicy = void 0, this.name = "cancelation-policy", this.selectedLanguage = void 0, this.message = void 0;
|
|
2456
2456
|
}
|
|
2457
2457
|
elementNameChangedHandler(e) {
|
|
2458
|
-
|
|
2458
|
+
d("nylas-cancellation-policy", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
2459
2459
|
}
|
|
2460
2460
|
selectedConfigurationChangedHandler(e) {
|
|
2461
2461
|
var n;
|
|
2462
|
-
|
|
2462
|
+
d("nylas-custom-booking-flow", "selectedConfigurationChangedHandler", e), this.message = ((n = e == null ? void 0 : e.scheduler) == null ? void 0 : n.cancellation_policy) || this.cancellationPolicy || "";
|
|
2463
2463
|
}
|
|
2464
2464
|
selectedLanguageChangedHandler(e, n) {
|
|
2465
|
-
e !== n &&
|
|
2465
|
+
e !== n && c.changeLanguage(e);
|
|
2466
2466
|
}
|
|
2467
2467
|
connectedCallback() {
|
|
2468
|
-
|
|
2468
|
+
d("nylas-cancellation-policy", "connectedCallback");
|
|
2469
2469
|
}
|
|
2470
2470
|
componentWillLoad() {
|
|
2471
|
-
|
|
2471
|
+
d("nylas-cancellation-policy", "componentWillLoad"), this.host.setAttribute("name", this.name);
|
|
2472
2472
|
}
|
|
2473
2473
|
componentDidLoad() {
|
|
2474
|
-
|
|
2474
|
+
d("nylas-cancellation-policy", "componentDidLoad"), this.selectedConfiguration ? this.selectedConfigurationChangedHandler(this.selectedConfiguration) : this.message = this.cancellationPolicy || "";
|
|
2475
2475
|
}
|
|
2476
2476
|
disconnectedCallback() {
|
|
2477
|
-
|
|
2477
|
+
d("nylas-cancellation-policy", "disconnectedCallback");
|
|
2478
2478
|
}
|
|
2479
2479
|
handleChange(e) {
|
|
2480
2480
|
const n = jn(e.target.value);
|
|
2481
2481
|
this.message = n, this.internals.setFormValue(n, this.name), this.valueChanged.emit({ value: n, name: this.name });
|
|
2482
2482
|
}
|
|
2483
2483
|
render() {
|
|
2484
|
-
return i(O, { key: "f60529ebedba533044eb12193ca7d98a655206ec" }, i("div", { key: "3141f903629853ce469c6545cc6632632a1921c5", class: "nylas-cancellation-policy", part: "ncpolicy" }, i("label", { key: "6650e991b482bc4abe327d7a6e118b80a2d049ea", htmlFor: this.name },
|
|
2484
|
+
return i(O, { key: "f60529ebedba533044eb12193ca7d98a655206ec" }, i("div", { key: "3141f903629853ce469c6545cc6632632a1921c5", class: "nylas-cancellation-policy", part: "ncpolicy" }, i("label", { key: "6650e991b482bc4abe327d7a6e118b80a2d049ea", htmlFor: this.name }, c.t("nylasCancellationPolicy.cancellationPolicyLabel"), i("span", { key: "2759ece1e0ca31e1b037a09d8f946745b0f56ac7", class: "label-icon" }, i("tooltip-component", { key: "a56898a05f83a9ad4fc0397a744ea61b92c95908" }, i("info-icon", { key: "ff718a84a962e0c97228ef98ba49c4e3d0b50ca5", slot: "tooltip-icon" }), i("span", { key: "14f7a568b0ff38a978bbb8d23ba51207fadc52fe", slot: "tooltip-content" }, c.t("nylasCancellationPolicy.tooltip.desc"))))), i("textarea", { key: "209ce7d84e3b618261c1b0bbea7ba50322e70ec1", id: this.name, part: "ncpolicy__textarea", name: this.name, value: this.message, maxlength: "250", onInput: (e) => this.handleChange(e) })));
|
|
2485
2485
|
}
|
|
2486
2486
|
static get formAssociated() {
|
|
2487
2487
|
return !0;
|
|
@@ -2498,7 +2498,7 @@ const $a = class {
|
|
|
2498
2498
|
}
|
|
2499
2499
|
};
|
|
2500
2500
|
hl([
|
|
2501
|
-
|
|
2501
|
+
D({
|
|
2502
2502
|
name: "nylas-cancellation-policy",
|
|
2503
2503
|
stateToProps: /* @__PURE__ */ new Map([
|
|
2504
2504
|
["schedulerConfig.selectedConfiguration", "selectedConfiguration"],
|
|
@@ -2514,12 +2514,12 @@ hl([
|
|
|
2514
2514
|
$a.style = gl;
|
|
2515
2515
|
const bl = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff;width:inherit}.nylas-confirmation-email{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200);text-align:left}.nylas-confirmation-email .header{padding:1rem;display:grid;grid-template-columns:1fr auto;border-bottom:1px solid var(--nylas-base-200)}.nylas-confirmation-email .header h3{border-radius:var(--nylas-border-radius-2x);margin:0;font-size:16px;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-confirmation-email .header p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.nylas-confirmation-email .header .confirmation-email-toggle{display:flex;gap:24px;align-items:center}.nylas-confirmation-email .header .confirmation-email-toggle .chevron{display:flex;align-self:center;cursor:pointer}.nylas-confirmation-email .header .confirmation-email-toggle .chevron:hover,.nylas-confirmation-email .header .confirmation-email-toggle .chevron:active{color:var(--nylas-primary)}.nylas-confirmation-email .header .confirmation-email-toggle .chevron.open{transform:rotate(90deg)}.nylas-confirmation-email .header .confirmation-email-toggle .chevron.closed{transform:rotate(270deg)}.nylas-confirmation-email .header .confirmation-email-toggle .chevron.disabled{cursor:not-allowed;color:var(--nylas-base-300)}.nylas-confirmation-email .header .confirmation-email-toggle .chevron.disabled:hover{color:var(--nylas-base-300)}.nylas-confirmation-email .nylas-confirmation-email__body{display:grid;grid-template-columns:1fr auto;background-color:var(--nylas-base-25);border-radius:var(--nylas-border-radius-2x)}@media screen and (max-width: 768px){.nylas-confirmation-email .nylas-confirmation-email__body{grid-template-columns:1fr}}.nylas-confirmation-email .nylas-confirmation-email__body .nylas-confirmation-email__section{padding:1rem;display:flex;flex-direction:column;gap:1rem;color:var(--nylas-base-800)}@media screen and (max-width: 768px){.nylas-confirmation-email .nylas-confirmation-email__body .nylas-confirmation-email__section{border:none}}.nylas-confirmation-email .nylas-confirmation-email__body .nylas-confirmation-email__section .nylas-confirmation-email__row{display:grid;grid-template-columns:1fr auto;align-items:center;gap:1rem}.nylas-confirmation-email .nylas-confirmation-email__body .nylas-confirmation-email__section .nylas-confirmation-email__row.full-width-col{grid-template-columns:1fr;border-top:1px solid var(--nylas-base-200);padding-top:1.25rem;margin:0.25rem 0}.nylas-confirmation-email .nylas-confirmation-email__body .nylas-confirmation-email__section .nylas-confirmation-email__row label{display:flex;align-items:center}.nylas-confirmation-email .nylas-confirmation-email__body .nylas-confirmation-email__section .nylas-confirmation-email__row label span.required{color:var(--nylas-error, #cc4841)}.nylas-confirmation-email .nylas-confirmation-email__body .nylas-confirmation-email__section .nylas-confirmation-email__row label span.label-icon{margin-left:4px}.nylas-confirmation-email .nylas-confirmation-email__body .nylas-confirmation-email__section .nylas-confirmation-email__row label span.label-icon tooltip-component{display:flex}.nylas-confirmation-email .nylas-confirmation-email__body .nylas-confirmation-email__section .nylas-confirmation-email__row p{margin:0.25rem 0 0 0;font-size:16px;font-weight:500;line-height:24px;color:var(--nylas-base-900)}.nylas-confirmation-email .nylas-confirmation-email__body .nylas-confirmation-email__section .nylas-confirmation-email__row .company-logo-container{display:flex;gap:32px;width:100%}.nylas-confirmation-email .nylas-confirmation-email__body .nylas-confirmation-email__section .nylas-confirmation-email__row .company-logo-container .input-container{display:flex;flex-direction:column;flex:1}.nylas-confirmation-email .nylas-confirmation-email__body .nylas-confirmation-email__section .nylas-confirmation-email__row .company-logo-container .company-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}.nylas-confirmation-email .nylas-confirmation-email__body .nylas-confirmation-email__section .nylas-confirmation-email__row .company-logo-container .company-logo img{max-height:100%;max-width:100%;object-fit:contain;object-position:center}.nylas-confirmation-email .nylas-confirmation-email__body .nylas-confirmation-email__section .nylas-confirmation-email__row span.selected-value{font-weight:500}.nylas-confirmation-email .nylas-confirmation-email__body .nylas-confirmation-email__section .subsection{display:flex;flex-direction:column;gap:1rem}.nylas-confirmation-email .nylas-confirmation-email__body .nylas-confirmation-email__section .subsection h3{margin:0;font-size:16px;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-confirmation-email .nylas-confirmation-email__body .nylas-confirmation-email__section .subsection .input-container{display:flex;flex-direction:column;gap:0.25rem}.nylas-confirmation-email .nylas-confirmation-email__body .nylas-confirmation-email__section .subsection .input-container 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-confirmation-email .nylas-confirmation-email__body .nylas-confirmation-email__preview{width:208px;background:var(--nylas-base-25);border-bottom-right-radius:var(--nylas-border-radius-2x)}@media screen and (max-width: 768px){.nylas-confirmation-email .nylas-confirmation-email__body .nylas-confirmation-email__preview{width:inherit;border-bottom-left-radius:var(--nylas-border-radius-2x)}}.nylas-confirmation-email .nylas-confirmation-email__body .nylas-confirmation-email__preview h4{font-size:14px;line-height:24px;color:var(--nylas-base-600);font-family:var(--nylas-font-family);font-weight:500;text-align:center;margin:0.75rem 0}.nylas-confirmation-email .nylas-confirmation-email__body .nylas-confirmation-email__preview .preview-container{padding:0 2rem 1rem}.nylas-confirmation-email .nylas-confirmation-email__body .nylas-confirmation-email__preview .preview-container .slot{background-color:transparent;border-top:1px solid var(--nylas-base-300)}.nylas-confirmation-email .nylas-confirmation-email__body .nylas-confirmation-email__preview .preview-container .slot.active{background-color:var(--nylas-base-100)}.nylas-confirmation-email .nylas-confirmation-email__body .nylas-confirmation-email__preview .preview-container .slot:last-of-type{border-bottom:1px solid var(--nylas-base-300)}.nylas-confirmation-email .nylas-confirmation-email__body .nylas-confirmation-email__preview .preview-container .event-slot{background-color:var(--nylas-base-600);border-top:1px solid var(--nylas-base-300)}.nylas-confirmation-email .nylas-confirmation-email__body span.error-message{color:var(--nylas-error)}.nylas-confirmation-email .nylas-confirmation-email__body span.help-text{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.nylas-confirmation-email .nylas-confirmation-email__summary{padding:0.75rem 1rem;display:grid;grid-template-columns:auto 1fr;column-gap:1rem}.nylas-confirmation-email .nylas-confirmation-email__summary p{margin:0;display:flex;align-items:center;column-gap:4px;font-size:0.875rem;font-weight:400;line-height:21px;color:var(--nylas-base-600);text-align:left}.nylas-confirmation-email .nylas-confirmation-email__summary p span.summary-icon{display:flex;justify-content:center;min-width:20px}toggle-switch{padding-right:8px}', vl = bl;
|
|
2516
2516
|
var _l = function(e, n, a, t) {
|
|
2517
|
-
var o = arguments.length, l = o < 3 ? n : t === null ? t = Object.getOwnPropertyDescriptor(n, a) : t,
|
|
2517
|
+
var o = arguments.length, l = o < 3 ? n : t === null ? t = Object.getOwnPropertyDescriptor(n, a) : t, r;
|
|
2518
2518
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
2519
2519
|
l = Reflect.decorate(e, n, a, t);
|
|
2520
2520
|
else
|
|
2521
|
-
for (var
|
|
2522
|
-
(
|
|
2521
|
+
for (var s = e.length - 1; s >= 0; s--)
|
|
2522
|
+
(r = e[s]) && (l = (o < 3 ? r(l) : o > 3 ? r(n, a, l) : r(n, a)) || l);
|
|
2523
2523
|
return o > 3 && l && Object.defineProperty(n, a, l), l;
|
|
2524
2524
|
}, _n = function(e, n) {
|
|
2525
2525
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
@@ -2527,34 +2527,34 @@ var _l = function(e, n, a, t) {
|
|
|
2527
2527
|
};
|
|
2528
2528
|
const Na = class {
|
|
2529
2529
|
constructor(e) {
|
|
2530
|
-
x(this, e), this.valueChanged = S(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.confirmationEmailTemplate = {}, this.participants = [], this.name = "confirmation-email-template", this.nylasBranding = !0, this.isOpen = !1, this.selectedLanguage = void 0, this.confirmationEmail = void 0, this.isConfirmationEmailOpen = this.isOpen, this.participantsState = this.participants, this.invalidImageErrorMessage =
|
|
2530
|
+
x(this, e), this.valueChanged = S(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.confirmationEmailTemplate = {}, this.participants = [], this.name = "confirmation-email-template", this.nylasBranding = !0, this.isOpen = !1, this.selectedLanguage = void 0, this.confirmationEmail = void 0, this.isConfirmationEmailOpen = this.isOpen, this.participantsState = this.participants, this.invalidImageErrorMessage = c.t("nylasConfirmationEmail.error.invalidImageUrl");
|
|
2531
2531
|
}
|
|
2532
2532
|
connectedCallback() {
|
|
2533
|
-
|
|
2533
|
+
d("nylas-confirmation-email", "connectedCallback");
|
|
2534
2534
|
}
|
|
2535
2535
|
disconnectedCallback() {
|
|
2536
|
-
|
|
2536
|
+
d("nylas-confirmation-email", "disconnectedCallback");
|
|
2537
2537
|
}
|
|
2538
2538
|
componentWillLoad() {
|
|
2539
|
-
|
|
2539
|
+
d("nylas-confirmation-email", "componentWillLoad"), this.host.setAttribute("name", this.name);
|
|
2540
2540
|
}
|
|
2541
2541
|
componentDidLoad() {
|
|
2542
2542
|
var e;
|
|
2543
|
-
|
|
2543
|
+
d("nylas-confirmation-email", "componentDidLoad"), this.selectedConfiguration ? this.selectedConfigurationChangedHandler(this.selectedConfiguration) : (this.confirmationEmail = { ...this.confirmationEmailTemplate }, typeof ((e = this.confirmationEmail) == null ? void 0 : e.show_nylas_branding) > "u" && this.nylasBranding ? this.confirmationEmail = { ...this.confirmationEmail, show_nylas_branding: !0 } : this.nylasBranding || (this.confirmationEmail = { ...this.confirmationEmail, show_nylas_branding: !1 }), this.isConfirmationEmailOpen = this.isOpen, this.participantsState = this.participants);
|
|
2544
2544
|
}
|
|
2545
2545
|
elementNameChangedHandler(e) {
|
|
2546
|
-
|
|
2546
|
+
d("nylas-confirmation-email", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
2547
2547
|
}
|
|
2548
2548
|
selectedConfigurationChangedHandler(e) {
|
|
2549
2549
|
var n, a, t, o;
|
|
2550
|
-
|
|
2550
|
+
d("nylas-confirmation-email", "selectedConfigurationChangedHandler", e), this.confirmationEmail = { ...((n = e == null ? void 0 : e.scheduler) == null ? void 0 : n.email_template) || this.confirmationEmailTemplate }, typeof ((a = this.confirmationEmail) == null ? void 0 : a.show_nylas_branding) > "u" && this.nylasBranding ? this.confirmationEmail = { ...this.confirmationEmail, show_nylas_branding: !0 } : this.nylasBranding || (this.confirmationEmail = { ...this.confirmationEmail, show_nylas_branding: !1 }), this.isConfirmationEmailOpen = !((o = (t = e == null ? void 0 : e.event_booking) == null ? void 0 : t.reminders) != null && o.length), this.participantsState = (e == null ? void 0 : e.participants) || this.participants;
|
|
2551
2551
|
}
|
|
2552
2552
|
nylasBrandingChangedHandler(e) {
|
|
2553
2553
|
var n;
|
|
2554
|
-
|
|
2554
|
+
d("nylas-confirmation-email", "nylasBrandingChangedHandler", e), typeof ((n = this.confirmationEmail) == null ? void 0 : n.show_nylas_branding) > "u" && e ? this.confirmationEmail = { ...this.confirmationEmail, show_nylas_branding: !0 } : e || (this.confirmationEmail = { ...this.confirmationEmail, show_nylas_branding: !1 });
|
|
2555
2555
|
}
|
|
2556
2556
|
selectedLanguageChangedHandler(e, n) {
|
|
2557
|
-
e !== n && (this.invalidImageErrorMessage =
|
|
2557
|
+
e !== n && (this.invalidImageErrorMessage = c.t("nylasConfirmationEmail.error.invalidImageUrl"), c.changeLanguage(e));
|
|
2558
2558
|
}
|
|
2559
2559
|
async nylasFormInputChangeHandler(e) {
|
|
2560
2560
|
var o, l;
|
|
@@ -2562,19 +2562,19 @@ const Na = class {
|
|
|
2562
2562
|
n === "confirmation-email-title" ? (this.confirmationEmail = { ...this.confirmationEmail, booking_confirmed: { ...((l = this.confirmationEmail) == null ? void 0 : l.booking_confirmed) || {}, title: a } }, this.internals.setFormValue(JSON.stringify(this.confirmationEmail), this.name), this.valueChanged.emit({ value: JSON.stringify(this.confirmationEmail), name: this.name })) : n === "confirmation-email-body" && t === "multi_line_text" && this.handleEmailBodyChange(e);
|
|
2563
2563
|
}
|
|
2564
2564
|
valueChangedHandler(e) {
|
|
2565
|
-
|
|
2565
|
+
d("nylas-confirmation-email", "valueChangedHandler", e.detail);
|
|
2566
2566
|
const { value: n, name: a } = e.detail;
|
|
2567
2567
|
a === "confirmation-email-logo" && (this.confirmationEmail = { ...this.confirmationEmail, logo: n }, this.valueChanged.emit({ value: JSON.stringify(this.confirmationEmail), name: this.name }), typeof this.internals.setValidity == "function" && typeof this.internals.setFormValue == "function" && (this.internals.setFormValue(JSON.stringify(this.confirmationEmail), this.name), this.internals.setValidity({})));
|
|
2568
2568
|
}
|
|
2569
2569
|
async nylasFormInputImageUrlInvalidHandler(e) {
|
|
2570
2570
|
const { value: n, name: a } = e.detail;
|
|
2571
|
-
a === "confirmation-email-logo" && typeof this.internals.setValidity == "function" && this.internals.setValidity({ customError: !0 },
|
|
2571
|
+
a === "confirmation-email-logo" && typeof this.internals.setValidity == "function" && this.internals.setValidity({ customError: !0 }, c.t("nylasConfirmationEmail.error.invalidImageUrl") || n);
|
|
2572
2572
|
}
|
|
2573
2573
|
nyalsFormSwitchToggledHandler(e) {
|
|
2574
|
-
|
|
2574
|
+
d("nylas-confirmation-email", "nyalsFormSwitchToggledHandler", e.detail), e.detail.name === "confirmation-email-show-branding" && (this.confirmationEmail = { ...this.confirmationEmail, show_nylas_branding: e.detail.checked }, this.internals.setFormValue(JSON.stringify(this.confirmationEmail), this.name), this.valueChanged.emit({ value: JSON.stringify(this.confirmationEmail), name: this.name }));
|
|
2575
2575
|
}
|
|
2576
2576
|
updateConfirmationFormValue() {
|
|
2577
|
-
|
|
2577
|
+
d("nylas-confirmation-email", "updateConfirmationFormValue"), this.internals.setFormValue(JSON.stringify(this.confirmationEmail), this.name), this.valueChanged.emit({ value: JSON.stringify(this.confirmationEmail), name: this.name });
|
|
2578
2578
|
}
|
|
2579
2579
|
toggleConfirmationEmail() {
|
|
2580
2580
|
this.isConfirmationEmailOpen = !this.isConfirmationEmailOpen;
|
|
@@ -2585,11 +2585,11 @@ const Na = class {
|
|
|
2585
2585
|
this.confirmationEmail = { ...this.confirmationEmail, booking_confirmed: { ...((a = this.confirmationEmail) == null ? void 0 : a.booking_confirmed) || {}, body: n } }, this.internals.setFormValue(JSON.stringify(this.confirmationEmail), this.name), this.valueChanged.emit({ value: JSON.stringify(this.confirmationEmail), name: this.name });
|
|
2586
2586
|
}
|
|
2587
2587
|
render() {
|
|
2588
|
-
var a, t, o, l,
|
|
2588
|
+
var a, t, o, l, r, s, f, y;
|
|
2589
2589
|
const e = this.participantsState.find((u) => u.is_organizer), n = (e == null ? void 0 : e.name) || (e == null ? void 0 : e.email);
|
|
2590
|
-
return i(O, { key: "f97ea75387183c592ff2d7c125c1749cd5786540" }, i("div", { key: "9a28805654e4c8fb4778d821b92c45cb8c616730", class: "nylas-confirmation-email", part: "nce" }, i("div", { key: "3c9f7313a008cfbe506a211b46b361da4447a481", class: "header", part: "nce__header" }, i("div", { key: "4c980155e1b10a49b50202a6c34e45c3d8882e22" }, i("h3", { key: "e56be66a98d11404875372d40ea1bca5564c1ba1" }, (
|
|
2590
|
+
return i(O, { key: "f97ea75387183c592ff2d7c125c1749cd5786540" }, i("div", { key: "9a28805654e4c8fb4778d821b92c45cb8c616730", class: "nylas-confirmation-email", part: "nce" }, i("div", { key: "3c9f7313a008cfbe506a211b46b361da4447a481", class: "header", part: "nce__header" }, i("div", { key: "4c980155e1b10a49b50202a6c34e45c3d8882e22" }, i("h3", { key: "e56be66a98d11404875372d40ea1bca5564c1ba1" }, (t = (a = this.confirmationEmail) == null ? void 0 : a.booking_confirmed) != null && t.title || n ? c.t("nylasConfirmationEmail.headerTitle_withOrganizer", { organizerName: n }) : c.t("nylasConfirmationEmail.headerTitle")), i("p", { key: "bf710ceb827923da51a2ab5e79217491d39cbc66" }, c.t("nylasConfirmationEmail.headerSubTitle"))), this.isConfirmationEmailOpen ? i("div", { class: "confirmation-email-toggle", part: "nce__confirmation-email-toggle--container" }, i("span", { class: `chevron ${this.isConfirmationEmailOpen ? "open" : "closed"} `, onClick: () => this.toggleConfirmationEmail() }, i("chevron-icon", { width: "24", height: "24" }))) : i("button-component", { variant: "basic", clickHandler: (u) => {
|
|
2591
2591
|
u.preventDefault(), this.toggleConfirmationEmail();
|
|
2592
|
-
} }, i("edit-icon", { width: "16", height: "16" }),
|
|
2592
|
+
} }, i("edit-icon", { width: "16", height: "16" }), c.t("nylasConfirmationEmail.editButtonText"))), this.isConfirmationEmailOpen ? i("div", { class: "nylas-confirmation-email__body", part: "nce__body" }, i("div", { class: "nylas-confirmation-email__section" }, this.nylasBranding && i("div", { class: "nylas-confirmation-email__row" }, i("label", null, c.t("nylasConfirmationEmail.nylasBranding.label"), i("span", { class: "label-icon" }, i("tooltip-component", null, i("info-icon", { slot: "tooltip-icon" }), i("span", { slot: "tooltip-content" }, c.t("nylasConfirmationEmail.nylasBranding.tooltip.desc"))))), i("toggle-switch", { exportparts: "ts_label: nce__toggle-label, ts_input: nce_toggle-input, ts_slider: nce_toggle-slider", name: "confirmation-email-show-branding", checked: (o = this.confirmationEmail) == null ? void 0 : o.show_nylas_branding })), i("div", { class: "nylas-confirmation-email__row" }, i("div", { class: "subsection" }, i("div", { class: "input-container" }, i("label", null, c.t("nylasConfirmationEmail.companyLogoUrl.label"), i("span", { class: "label-icon" }, i("tooltip-component", null, i("info-icon", { slot: "tooltip-icon" }), i("span", { slot: "tooltip-content" }, c.t("nylasConfirmationEmail.companyLogoUrl.tooltip.desc"))))), this.confirmationEmail && i("input-image-url", { name: "confirmation-email-logo", exportparts: "iiu__logo-input-textfield: nce__input-image-url", errorMessage: this.invalidImageErrorMessage, imageUrl: ((l = this.confirmationEmail) == null ? void 0 : l.logo) ?? "" })))), i("div", { class: "nylas-confirmation-email__row full-width-col" }, i("div", { class: "subsection" }, i("h3", null, c.t("nylasConfirmationEmail.emailMessage.header")), i("div", { class: "input-container" }, i("label", { htmlFor: "title" }, c.t("nylasConfirmationEmail.emailMessage.label"), i("span", { class: "label-icon" }, i("tooltip-component", null, i("info-icon", { slot: "tooltip-icon" }), i("span", { slot: "tooltip-content" }, c.t("nylasConfirmationEmail.emailMessage.tooltip.desc"))))), i("input-component", { name: "confirmation-email-title", maxLength: 60, placeholder: n ? c.t("nylasConfirmationEmail.headerTitle_withOrganizer", { organizerName: n }) : c.t("nylasConfirmationEmail.headerTitle"), defaultValue: ((s = (r = this.confirmationEmail) == null ? void 0 : r.booking_confirmed) == null ? void 0 : s.title) ?? "" })), i("div", { class: "input-container" }, i("textarea-component", { label: c.t("nylasConfirmationEmail.emailMessage.additionalInfoLabel"), name: "confirmation-email-body", id: "confirmation-email-body", placeholder: c.t("nylasConfirmationEmail.emailMessage.additionalInfoPlaceholder"), tooltip: c.t("nylasConfirmationEmail.emailMessage.additionalInfoTooltip"), maxLength: 500, defaultValue: ((y = (f = this.confirmationEmail) == null ? void 0 : f.booking_confirmed) == null ? void 0 : y.body) ?? "" })))))) : i("div", { class: "nylas-confirmation-email__summary", part: "nce__summary" }, i("p", null, i("span", { class: "summary-icon" }, i("person-clipboard-icon", null)), c.t("nylasConfirmationEmail.allHosts")), i("p", null, i("span", { class: "summary-icon" }, i("clock-icon", null)), c.t("nylasConfirmationEmail.immediatelyUponBooking")))));
|
|
2593
2593
|
}
|
|
2594
2594
|
static get formAssociated() {
|
|
2595
2595
|
return !0;
|
|
@@ -2607,7 +2607,7 @@ const Na = class {
|
|
|
2607
2607
|
}
|
|
2608
2608
|
};
|
|
2609
2609
|
_l([
|
|
2610
|
-
|
|
2610
|
+
D({
|
|
2611
2611
|
name: "nylas-confirmation-email",
|
|
2612
2612
|
stateToProps: /* @__PURE__ */ new Map([
|
|
2613
2613
|
["schedulerConfig.selectedConfiguration", "selectedConfiguration"],
|
|
@@ -2629,12 +2629,12 @@ _l([
|
|
|
2629
2629
|
Na.style = vl;
|
|
2630
2630
|
const Cl = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff;width:inherit}.nylas-connected-calendars{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200)}.nylas-connected-calendars .header{padding:1rem}.nylas-connected-calendars .header h3{margin:0;font-size:16px;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-connected-calendars .header p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left;display:flex;align-items:center;gap:4px}.nylas-connected-calendars .content .participant-container{padding-top:12px;border-top:1px solid var(--nylas-base-200)}.nylas-connected-calendars .content .participant-container .participant-title{display:flex;justify-content:space-between;align-items:center;padding:4px 16px 16px}.nylas-connected-calendars .content .participant-container .participant-title p{margin:0}.nylas-connected-calendars .content .participant-container .participant-title .participant-toggle{display:flex;gap:24px;align-items:center}.nylas-connected-calendars .content .participant-container .participant-title .participant-toggle .chevron{display:flex;align-self:center;cursor:pointer}.nylas-connected-calendars .content .participant-container .participant-title .participant-toggle .chevron:hover,.nylas-connected-calendars .content .participant-container .participant-title .participant-toggle .chevron:active{color:var(--nylas-primary)}.nylas-connected-calendars .content .participant-container .participant-title .participant-toggle .chevron.open{transform:rotate(90deg)}.nylas-connected-calendars .content .participant-container .participant-title .participant-toggle .chevron.closed{transform:rotate(270deg)}.nylas-connected-calendars .content .participant-container .participant-title .participant-toggle .chevron.disabled{cursor:not-allowed;color:var(--nylas-base-300)}.nylas-connected-calendars .content .participant-container .participant-title .participant-toggle .chevron.disabled:hover{color:var(--nylas-base-300)}nylas-calendar-picker::part(ncp){margin:0;border:none;border-top:1px solid var(--nylas-base-200);border-top-right-radius:0;border-top-left-radius:0}', wl = Cl;
|
|
2631
2631
|
var kl = function(e, n, a, t) {
|
|
2632
|
-
var o = arguments.length, l = o < 3 ? n : t === null ? t = Object.getOwnPropertyDescriptor(n, a) : t,
|
|
2632
|
+
var o = arguments.length, l = o < 3 ? n : t === null ? t = Object.getOwnPropertyDescriptor(n, a) : t, r;
|
|
2633
2633
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
2634
2634
|
l = Reflect.decorate(e, n, a, t);
|
|
2635
2635
|
else
|
|
2636
|
-
for (var
|
|
2637
|
-
(
|
|
2636
|
+
for (var s = e.length - 1; s >= 0; s--)
|
|
2637
|
+
(r = e[s]) && (l = (o < 3 ? r(l) : o > 3 ? r(n, a, l) : r(n, a)) || l);
|
|
2638
2638
|
return o > 3 && l && Object.defineProperty(n, a, l), l;
|
|
2639
2639
|
}, Cn = function(e, n) {
|
|
2640
2640
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
@@ -2646,28 +2646,28 @@ const Pa = class {
|
|
|
2646
2646
|
x(this, e), this.valueChanged = S(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.name = "connected-calendars", this.selectedConfiguration = void 0, this.participants = ((n = this.selectedConfiguration) == null ? void 0 : n.participants) || [], this.calendars = void 0, this.participantOptions = void 0, this.selectedLanguage = void 0, this.selectedCalendars = this.setParticipants(this.participants), this.participantCalendars = {}, this.participantDefaultSelectedCalendars = {};
|
|
2647
2647
|
}
|
|
2648
2648
|
elementNameChangedHandler(e) {
|
|
2649
|
-
|
|
2649
|
+
d("nylas-connected-calendars", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
2650
2650
|
}
|
|
2651
2651
|
calendarsChangedHandler(e) {
|
|
2652
|
-
|
|
2652
|
+
d("nylas-connected-calendars", "calendarsChangedHandler", e), this.selectedCalendars = this.setParticipants(this.participants), this.participantCalendars = this.getParticipantCalendarOptions(this.participants, this.participantOptions), this.setInternalFormValue();
|
|
2653
2653
|
}
|
|
2654
2654
|
participantsChangedHandler(e) {
|
|
2655
|
-
|
|
2655
|
+
d("nylas-connected-calendars", "participantsChangedHandler", e), this.selectedCalendars = this.setParticipants(e), this.participantCalendars = this.getParticipantCalendarOptions(e, this.participantOptions);
|
|
2656
2656
|
}
|
|
2657
2657
|
participantOptionsChangedHandler(e) {
|
|
2658
|
-
|
|
2658
|
+
d("nylas-calendar-picker", "participantOptionsChangedHandler", e), this.selectedCalendars = this.setParticipants(this.participants), this.participantCalendars = this.getParticipantCalendarOptions(this.participants, e), this.setInternalFormValue();
|
|
2659
2659
|
}
|
|
2660
2660
|
selectedConfigurationChangedHandler(e) {
|
|
2661
|
-
|
|
2661
|
+
d("nylas-calendar-picker", "selectedConfigurationChangedHandler", e);
|
|
2662
2662
|
const n = (e == null ? void 0 : e.participants) || this.participants;
|
|
2663
2663
|
n && n.length > 0 && (this.selectedCalendars = this.setParticipants(n), this.participantCalendars = this.getParticipantCalendarOptions(n, this.participantOptions), this.setInternalFormValue());
|
|
2664
2664
|
}
|
|
2665
2665
|
selectedLanguageChangedHandler(e, n) {
|
|
2666
|
-
e !== n &&
|
|
2666
|
+
e !== n && c.changeLanguage(e);
|
|
2667
2667
|
}
|
|
2668
2668
|
getParticipantCalendarOptions(e, n) {
|
|
2669
|
-
var l,
|
|
2670
|
-
const a = e == null ? void 0 : e.find((y) => y.is_organizer), t = ((
|
|
2669
|
+
var l, r, s, f;
|
|
2670
|
+
const a = e == null ? void 0 : e.find((y) => y.is_organizer), t = ((s = (r = (l = this.selectedConfiguration) == null ? void 0 : l.availability) == null ? void 0 : r.availability_rules) == null ? void 0 : s.availability_method) !== "collective", o = {};
|
|
2671
2671
|
if (n) {
|
|
2672
2672
|
const y = e == null ? void 0 : e.filter((p) => n.some((g) => g.email === p.email)), u = e == null ? void 0 : e.filter((p) => !n.some((g) => g.email === p.email));
|
|
2673
2673
|
y == null || y.forEach((p) => {
|
|
@@ -2678,7 +2678,7 @@ const Pa = class {
|
|
|
2678
2678
|
this.participantDefaultSelectedCalendars[p.email] = ((_ = p.availability) == null ? void 0 : _.calendar_ids) || [];
|
|
2679
2679
|
const v = g.calendars ?? [];
|
|
2680
2680
|
(P = (w = p.availability) == null ? void 0 : w.calendar_ids) == null || P.forEach((N) => {
|
|
2681
|
-
!(v != null && v.some((
|
|
2681
|
+
!(v != null && v.some((R) => R.id === N)) && N !== "primary" && v.push({ id: N, name: N });
|
|
2682
2682
|
}), o[p.email] = v;
|
|
2683
2683
|
}), t && (u == null || u.forEach((p) => {
|
|
2684
2684
|
var g, v, _, w;
|
|
@@ -2688,30 +2688,30 @@ const Pa = class {
|
|
|
2688
2688
|
return a && (o[a.email] = this.calendars ?? [{ id: "primary", name: a.email }], this.participantDefaultSelectedCalendars[a.email] = ((f = a.availability) == null ? void 0 : f.calendar_ids) || []), o;
|
|
2689
2689
|
}
|
|
2690
2690
|
connectedCallback() {
|
|
2691
|
-
|
|
2691
|
+
d("nylas-connected-calendars", "connectedCallback");
|
|
2692
2692
|
}
|
|
2693
2693
|
disconnectedCallback() {
|
|
2694
|
-
|
|
2694
|
+
d("nylas-connected-calendars", "disconnectedCallback");
|
|
2695
2695
|
}
|
|
2696
2696
|
componentWillLoad() {
|
|
2697
|
-
|
|
2697
|
+
d("nylas-connected-calendars", "componentWillLoad");
|
|
2698
2698
|
}
|
|
2699
2699
|
componentDidLoad() {
|
|
2700
2700
|
var e, n;
|
|
2701
|
-
|
|
2701
|
+
d("nylas-connected-calendars", "componentDidLoad"), this.selectedConfiguration ? (this.selectedCalendars = this.setParticipants((e = this.selectedConfiguration) == null ? void 0 : e.participants), this.participantCalendars = this.getParticipantCalendarOptions((n = this.selectedConfiguration) == null ? void 0 : n.participants, this.participantOptions), this.setInternalFormValue()) : (this.selectedCalendars = this.setParticipants(this.participants), this.participantCalendars = this.getParticipantCalendarOptions(this.participants, this.participantOptions), this.setInternalFormValue());
|
|
2702
2702
|
}
|
|
2703
2703
|
get isInternalsAvailable() {
|
|
2704
2704
|
return this.internals !== void 0 && typeof this.internals.setFormValue == "function";
|
|
2705
2705
|
}
|
|
2706
2706
|
handleValueChanged(e) {
|
|
2707
|
-
|
|
2707
|
+
d("[nylas-editor-tabs]", "handleValueChanged", e);
|
|
2708
2708
|
const { name: n, value: a } = e.detail;
|
|
2709
2709
|
if (!n.startsWith("participant-"))
|
|
2710
2710
|
return;
|
|
2711
2711
|
if (this.connectedCalendarsFormRef.checkValidity())
|
|
2712
2712
|
this.internals.setValidity({});
|
|
2713
2713
|
else {
|
|
2714
|
-
this.internals.setValidity({ customError: !0 },
|
|
2714
|
+
this.internals.setValidity({ customError: !0 }, c.t("nylasConnectedCalendars.selectAtLeastOneCalendar"));
|
|
2715
2715
|
return;
|
|
2716
2716
|
}
|
|
2717
2717
|
const t = n.split("participant-")[1];
|
|
@@ -2726,13 +2726,13 @@ const Pa = class {
|
|
|
2726
2726
|
setParticipants(e) {
|
|
2727
2727
|
const n = {};
|
|
2728
2728
|
return e == null || e.forEach((a) => {
|
|
2729
|
-
var t, o, l,
|
|
2729
|
+
var t, o, l, r;
|
|
2730
2730
|
if ((t = a == null ? void 0 : a.availability) != null && t.calendar_ids && ((l = (o = a == null ? void 0 : a.availability) == null ? void 0 : o.calendar_ids) == null ? void 0 : l.length) > 0) {
|
|
2731
|
-
const
|
|
2731
|
+
const s = !!a.is_organizer;
|
|
2732
2732
|
n[a.email] = {
|
|
2733
|
-
isOpen:
|
|
2733
|
+
isOpen: s,
|
|
2734
2734
|
name: a.name || a.email,
|
|
2735
|
-
calendars: (
|
|
2735
|
+
calendars: (r = a.availability) == null ? void 0 : r.calendar_ids
|
|
2736
2736
|
};
|
|
2737
2737
|
}
|
|
2738
2738
|
}), n;
|
|
@@ -2744,10 +2744,10 @@ const Pa = class {
|
|
|
2744
2744
|
}), this.isInternalsAvailable && this.internals.setFormValue(JSON.stringify(e), this.name);
|
|
2745
2745
|
}
|
|
2746
2746
|
render() {
|
|
2747
|
-
return i(O, { key: "bcb62cb98553019ec61e5d743270a083ff36e81c" }, i("div", { key: "7b63f01d524c0841465f83b6c3ea896f388965d2", class: "nylas-connected-calendars", part: "nccals" }, i("div", { key: "df8c6f5600f17eb68a823c3cc1c322169565743d", class: "header", part: "nccals__header" }, i("h3", { key: "b10e3bfa548e128b04369985120bc5340051a8e4" },
|
|
2747
|
+
return i(O, { key: "bcb62cb98553019ec61e5d743270a083ff36e81c" }, i("div", { key: "7b63f01d524c0841465f83b6c3ea896f388965d2", class: "nylas-connected-calendars", part: "nccals" }, i("div", { key: "df8c6f5600f17eb68a823c3cc1c322169565743d", class: "header", part: "nccals__header" }, i("h3", { key: "b10e3bfa548e128b04369985120bc5340051a8e4" }, c.t("nylasConnectedCalendars.headerTitle")), i("p", { key: "42338af3633d6e8d46e840fc326fd761e81933fb" }, c.t("nylasConnectedCalendars.headerSubTitle"), i("tooltip-component", { key: "fa3196bbc6bdcfebb27774a01eaedc610658c55d" }, i("info-icon", { key: "f564baf11a052af2780535e2c25d4b60f9c9c2fa", slot: "tooltip-icon" }), i("span", { key: "554ed1515075fabf377816fe0437252b2cd081d4", slot: "tooltip-content" }, c.t("nylasConnectedCalendars.tooltip.desc"))))), i("div", { key: "8af6552815526854745083e3bbf5c1531293fc6c", class: "content", part: "nccals__content" }, i("form", { key: "a5b2f09404b2a3d6bfc03b25f12f82d9fe8fb5e8", ref: (e) => this.connectedCalendarsFormRef = e }, Object.keys(this.participantCalendars).map((e, n) => {
|
|
2748
2748
|
const a = this.selectedCalendars[e], t = this.participantCalendars[e];
|
|
2749
2749
|
if (!(!a || !a.name))
|
|
2750
|
-
return i("div", { class: "participant-container", part: "nccals__container", key: `participant-conatiner-${n}` }, i("div", { class: "participant-title", part: "nccals__title" }, i("p", null,
|
|
2750
|
+
return i("div", { class: "participant-container", part: "nccals__container", key: `participant-conatiner-${n}` }, i("div", { class: "participant-title", part: "nccals__title" }, i("p", null, c.t("nylasConnectedCalendars.participantCalendarTitle", { participantName: a.name })), i("div", { class: "participant-toggle", part: "nccals__toggle-container" }, i("span", { class: `chevron ${a.isOpen ? "open" : "closed"}`, onClick: () => {
|
|
2751
2751
|
this.selectedCalendars[e].isOpen = !a.isOpen, this.selectedCalendars = { ...this.selectedCalendars };
|
|
2752
2752
|
} }, i("chevron-icon", { width: "24", height: "24" })))), a.isOpen && i("nylas-calendar-picker", { key: e, name: `participant-${e}`, calendars: t, defaultSelectedCalendars: this.participantDefaultSelectedCalendars[e] }));
|
|
2753
2753
|
})))));
|
|
@@ -2770,7 +2770,7 @@ const Pa = class {
|
|
|
2770
2770
|
}
|
|
2771
2771
|
};
|
|
2772
2772
|
kl([
|
|
2773
|
-
|
|
2773
|
+
D({
|
|
2774
2774
|
name: "nylas-connected-calendars",
|
|
2775
2775
|
stateToProps: /* @__PURE__ */ new Map([
|
|
2776
2776
|
["schedulerConfig.additionalParticipants", "participantOptions"],
|
|
@@ -2788,38 +2788,38 @@ kl([
|
|
|
2788
2788
|
Pa.style = wl;
|
|
2789
2789
|
const xl = ':host{display:block;margin:1rem;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff}.nylas-custom-booking-flow__title{color:var(--nylas-base-900);font-size:16px;font-style:normal;font-weight:600;line-height:20px;margin:0;text-align:left}.nylas-custom-booking-flow__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-custom-booking-flow__content{padding:1rem;display:flex;flex-direction:column;gap:1rem}.nylas-custom-booking-flow__block{display:flex;justify-content:space-between;gap:0.5rem}', El = xl;
|
|
2790
2790
|
var Sl = function(e, n, a, t) {
|
|
2791
|
-
var o = arguments.length, l = o < 3 ? n : t === null ? t = Object.getOwnPropertyDescriptor(n, a) : t,
|
|
2791
|
+
var o = arguments.length, l = o < 3 ? n : t === null ? t = Object.getOwnPropertyDescriptor(n, a) : t, r;
|
|
2792
2792
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
2793
2793
|
l = Reflect.decorate(e, n, a, t);
|
|
2794
2794
|
else
|
|
2795
|
-
for (var
|
|
2796
|
-
(
|
|
2795
|
+
for (var s = e.length - 1; s >= 0; s--)
|
|
2796
|
+
(r = e[s]) && (l = (o < 3 ? r(l) : o > 3 ? r(n, a, l) : r(n, a)) || l);
|
|
2797
2797
|
return o > 3 && l && Object.defineProperty(n, a, l), l;
|
|
2798
2798
|
}, wn = function(e, n) {
|
|
2799
2799
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
2800
2800
|
return Reflect.metadata(e, n);
|
|
2801
2801
|
};
|
|
2802
|
-
const
|
|
2802
|
+
const Ra = class {
|
|
2803
2803
|
constructor(e) {
|
|
2804
2804
|
x(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;
|
|
2805
2805
|
}
|
|
2806
2806
|
selectedLanguageChangedHandler(e, n) {
|
|
2807
|
-
e !== n &&
|
|
2807
|
+
e !== n && c.changeLanguage(e);
|
|
2808
2808
|
}
|
|
2809
2809
|
connectedCallback() {
|
|
2810
|
-
|
|
2810
|
+
d("nylas-custom-booking-flow", "connectedCallback");
|
|
2811
2811
|
}
|
|
2812
2812
|
disconnectedCallback() {
|
|
2813
|
-
|
|
2813
|
+
d("nylas-custom-booking-flow", "disconnectedCallback");
|
|
2814
2814
|
}
|
|
2815
2815
|
componentWillLoad() {
|
|
2816
|
-
|
|
2816
|
+
d("nylas-custom-booking-flow", "componentWillLoad");
|
|
2817
2817
|
}
|
|
2818
2818
|
componentDidLoad() {
|
|
2819
|
-
|
|
2819
|
+
d("nylas-custom-booking-flow", "componentDidLoad"), fa(["inputs"], this.el);
|
|
2820
2820
|
}
|
|
2821
2821
|
render() {
|
|
2822
|
-
return i(O, { key: "d3e66761b8b87fa0e110d2f781714cd1571a4b81", part: "ncbflow" }, i("nylas-form-card", { key: "12dc4b22aef0225eb0a40bd262d9f354acecc3c1", exportparts: "nfc__header: ncbflow__header" }, i("h1", { key: "3f73196ebf0086ad13f8bca15bfaf1f4b2231294", slot: "header-title", class: "nylas-custom-booking-flow__title", part: "ncbflow__title" },
|
|
2822
|
+
return i(O, { key: "d3e66761b8b87fa0e110d2f781714cd1571a4b81", part: "ncbflow" }, i("nylas-form-card", { key: "12dc4b22aef0225eb0a40bd262d9f354acecc3c1", exportparts: "nfc__header: ncbflow__header" }, i("h1", { key: "3f73196ebf0086ad13f8bca15bfaf1f4b2231294", slot: "header-title", class: "nylas-custom-booking-flow__title", part: "ncbflow__title" }, c.t("nylasCustomBookingFlow.headerTitle")), i("div", { key: "725ac895815660a38f7d1dc0a39473c1725939f0", slot: "content", class: "nylas-custom-booking-flow__content", part: "ncbflow__content" }, i("slot", { key: "a93ae3ed92a6d56641e388766674dfe62256cc7a", name: "inputs" }))));
|
|
2823
2823
|
}
|
|
2824
2824
|
static get formAssociated() {
|
|
2825
2825
|
return !0;
|
|
@@ -2834,7 +2834,7 @@ const Aa = class {
|
|
|
2834
2834
|
}
|
|
2835
2835
|
};
|
|
2836
2836
|
Sl([
|
|
2837
|
-
|
|
2837
|
+
D({
|
|
2838
2838
|
name: "nylas-custom-booking-flow",
|
|
2839
2839
|
eventToProps: {},
|
|
2840
2840
|
stateToProps: /* @__PURE__ */ new Map([["schedulerConfig.selectedLanguage", "selectedLanguage"]]),
|
|
@@ -2843,57 +2843,57 @@ Sl([
|
|
|
2843
2843
|
wn("design:type", Function),
|
|
2844
2844
|
wn("design:paramtypes", []),
|
|
2845
2845
|
wn("design:returntype", void 0)
|
|
2846
|
-
],
|
|
2847
|
-
|
|
2846
|
+
], Ra.prototype, "render", null);
|
|
2847
|
+
Ra.style = El;
|
|
2848
2848
|
const Ol = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff;width:inherit}.nylas-custom-event-slug{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200);text-align:left}.nylas-custom-event-slug .header{padding:1rem;display:grid;grid-template-columns:1fr auto}.nylas-custom-event-slug .header h3{border-radius:var(--nylas-border-radius-2x);margin:0;font-size:16px;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-custom-event-slug .header p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.nylas-custom-event-slug .header .drawer-toggle{display:flex;gap:24px;align-items:center}.nylas-custom-event-slug .header .drawer-toggle .chevron{display:flex;align-self:center;cursor:pointer}.nylas-custom-event-slug .header .drawer-toggle .chevron:hover,.nylas-custom-event-slug .header .drawer-toggle .chevron:active{color:var(--nylas-primary)}.nylas-custom-event-slug .header .drawer-toggle .chevron.open{transform:rotate(90deg)}.nylas-custom-event-slug .header .drawer-toggle .chevron.closed{transform:rotate(270deg)}.nylas-custom-event-slug .header .drawer-toggle .chevron.disabled{cursor:not-allowed;color:var(--nylas-base-300)}.nylas-custom-event-slug .header .drawer-toggle .chevron.disabled:hover{color:var(--nylas-base-300)}.nylas-custom-event-slug .nylas-custom-event-slug__body{display:grid;grid-template-columns:1fr;background-color:var(--nylas-base-25);border-radius:0 0 var(--nylas-border-radius-2x) var(--nylas-border-radius-2x);border-top:1px solid var(--nylas-base-200)}@media screen and (max-width: 768px){.nylas-custom-event-slug .nylas-custom-event-slug__body{grid-template-columns:1fr}}.nylas-custom-event-slug .nylas-custom-event-slug__body .nylas-custom-event-slug__section{padding:1rem;display:flex;flex-direction:column;gap:1rem;color:var(--nylas-base-800)}@media screen and (max-width: 768px){.nylas-custom-event-slug .nylas-custom-event-slug__body .nylas-custom-event-slug__section{border:none}}.nylas-custom-event-slug .nylas-custom-event-slug__body .nylas-custom-event-slug__section .nylas-custom-event-slug__row{display:flex;align-items:center;gap:1rem}.nylas-custom-event-slug .nylas-custom-event-slug__body .nylas-custom-event-slug__section .nylas-custom-event-slug__row label{display:flex;align-items:center}.nylas-custom-event-slug .nylas-custom-event-slug__body .nylas-custom-event-slug__section .nylas-custom-event-slug__row label span.required{color:var(--nylas-error, #cc4841)}.nylas-custom-event-slug .nylas-custom-event-slug__body .nylas-custom-event-slug__section .nylas-custom-event-slug__row label span.label-icon{margin-left:4px}.nylas-custom-event-slug .nylas-custom-event-slug__body .nylas-custom-event-slug__section .nylas-custom-event-slug__row label span.label-icon tooltip-component{display:flex}.nylas-custom-event-slug .nylas-custom-event-slug__body .nylas-custom-event-slug__section .nylas-custom-event-slug__row p{margin:0.25rem 0 0 0;font-size:16px;font-weight:500;line-height:24px;color:var(--nylas-base-900)}.nylas-custom-event-slug .nylas-custom-event-slug__body .nylas-custom-event-slug__section .nylas-custom-event-slug__row .input-container{width:100%}.nylas-custom-event-slug .nylas-custom-event-slug__body span.error-message{color:var(--nylas-error)}.nylas-custom-event-slug .nylas-custom-event-slug__body span.help-text{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.nylas-custom-event-slug .nylas-custom-event-slug__input-wrapper{display:flex;height:48px;padding-left:16px;align-items:center;gap:8px;align-self:stretch;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-300);background:var(--nylas-base-0);width:-webkit-fill-available;color:var(--nylas-base-900);font-size:16px;font-style:normal;font-weight:400;line-height:150%;width:-moz-available;width:-webkit-fill-available;display:flex;flex-direction:row;gap:0.125rem;border-radius:var(--nylas-border-radius-2x);z-index:1}.nylas-custom-event-slug .nylas-custom-event-slug__input-wrapper:focus{outline-color:var(--nylas-primary)}.nylas-custom-event-slug .nylas-custom-event-slug__input-wrapper.error{border-radius:var(--nylas-border-radius-2x);font-weight:600;border-color:var(--nylas-error);border-width:2px}.nylas-custom-event-slug .nylas-custom-event-slug__input-wrapper.error::placeholder{font-weight:400}.nylas-custom-event-slug .nylas-custom-event-slug__input-wrapper::placeholder{color:var(--nylas-base-300)}.nylas-custom-event-slug .nylas-custom-event-slug__input-wrapper.focus{outline:2px solid var(--nylas-primary)}.nylas-custom-event-slug .nylas-custom-event-slug__input-wrapper.error{border-color:var(--nylas-error);outline:none}.nylas-custom-event-slug .nylas-custom-event-slug__input-wrapper input-component::part(ic__input){outline:none;border:none;width:100%;font-size:16px;height:auto;padding-left:0px}.nylas-custom-event-slug .nylas-custom-event-slug__input-wrapper .prefix{z-index:0;margin-top:1px;color:var(--nylas-base-400);font-weight:500;font-size:24px}.nylas-custom-event-slug .nylas-custom-event-slug__input-wrapper .icon{margin-right:0.25rem;padding:0 0.75rem;height:100%;display:flex;align-items:center;right:0;cursor:pointer;user-select:none}.nylas-custom-event-slug .nylas-custom-event-slug__input-wrapper .icon.disabled{cursor:not-allowed}.nylas-custom-event-slug .nylas-custom-event-slug__input-wrapper .icon:hover svg path{fill:var(--nylas-primary)}.nylas-custom-event-slug .nylas-custom-event-slug__input-wrapper .icon:active svg path{fill:var(--nylas-base-500)}.nylas-custom-event-slug .nylas-custom-event-slug__input-wrapper .icon .copied{display:flex;align-items:center;font-size:0.875rem;gap:0.125rem}', Hl = Ol;
|
|
2849
|
-
var
|
|
2850
|
-
var o = arguments.length, l = o < 3 ? n : t === null ? t = Object.getOwnPropertyDescriptor(n, a) : t,
|
|
2849
|
+
var Dl = function(e, n, a, t) {
|
|
2850
|
+
var o = arguments.length, l = o < 3 ? n : t === null ? t = Object.getOwnPropertyDescriptor(n, a) : t, r;
|
|
2851
2851
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
2852
2852
|
l = Reflect.decorate(e, n, a, t);
|
|
2853
2853
|
else
|
|
2854
|
-
for (var
|
|
2855
|
-
(
|
|
2854
|
+
for (var s = e.length - 1; s >= 0; s--)
|
|
2855
|
+
(r = e[s]) && (l = (o < 3 ? r(l) : o > 3 ? r(n, a, l) : r(n, a)) || l);
|
|
2856
2856
|
return o > 3 && l && Object.defineProperty(n, a, l), l;
|
|
2857
2857
|
}, kn = function(e, n) {
|
|
2858
2858
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
2859
2859
|
return Reflect.metadata(e, n);
|
|
2860
2860
|
};
|
|
2861
|
-
const
|
|
2861
|
+
const Aa = class {
|
|
2862
2862
|
constructor(e) {
|
|
2863
|
-
x(this, e), this.valueChanged = S(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.defaultUrlSlug = void 0, this.isOpen = !0, this.slugErrorMessage = "", this.name = "custom-event-slug", this.requiresSlug = !1, this.selectedLanguage = void 0, this.urlSlug = void 0, this.focus = !1, this.copied = !1;
|
|
2863
|
+
x(this, e), this.valueChanged = S(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.defaultUrlSlug = void 0, this.isOpen = !0, this.slugErrorMessage = "", this.name = "custom-event-slug", this.requiresSlug = !1, this.selectedLanguage = void 0, this.urlSlug = void 0, this.focus = !1, this.copied = !1, this.requiredError = c.t("fieldRequired", { field: "Slug" }), this.patternError = c.t("invalidInputFormat", { field: "Slug" });
|
|
2864
2864
|
}
|
|
2865
2865
|
connectedCallback() {
|
|
2866
|
-
|
|
2866
|
+
d("nylas-custom-event-slug", "connectedCallback");
|
|
2867
2867
|
}
|
|
2868
2868
|
disconnectedCallback() {
|
|
2869
|
-
|
|
2869
|
+
d("nylas-custom-event-slug", "disconnectedCallback");
|
|
2870
2870
|
}
|
|
2871
2871
|
componentWillLoad() {
|
|
2872
|
-
|
|
2872
|
+
d("nylas-custom-event-slug", "componentWillLoad"), this.host.setAttribute("name", this.name);
|
|
2873
2873
|
}
|
|
2874
2874
|
componentDidLoad() {
|
|
2875
|
-
|
|
2875
|
+
d("nylas-custom-event-slug", "componentDidLoad"), this.selectedConfiguration ? this.selectedConfigurationChangedHandler(this.selectedConfiguration) : (console.log("No selected configuration found"), this.urlSlug = this.defaultUrlSlug || "");
|
|
2876
2876
|
}
|
|
2877
2877
|
componentWillUpdate() {
|
|
2878
|
-
|
|
2878
|
+
d("nylas-custom-event-slug", "componentWillUpdate");
|
|
2879
2879
|
}
|
|
2880
2880
|
componentDidUpdate() {
|
|
2881
|
-
|
|
2881
|
+
d("nylas-custom-event-slug", "componentDidUpdate");
|
|
2882
2882
|
}
|
|
2883
2883
|
componentWillRender() {
|
|
2884
|
-
|
|
2884
|
+
d("nylas-custom-event-slug", "componentWillRender");
|
|
2885
2885
|
}
|
|
2886
2886
|
componentDidRender() {
|
|
2887
|
-
|
|
2887
|
+
d("nylas-custom-event-slug", "componentDidRender");
|
|
2888
2888
|
}
|
|
2889
2889
|
elementNameChangedHandler(e) {
|
|
2890
|
-
|
|
2890
|
+
d("nylas-custom-event-slug", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
2891
2891
|
}
|
|
2892
2892
|
selectedConfigurationChangedHandler(e) {
|
|
2893
|
-
|
|
2893
|
+
d("nylas-custom-booking-flow", "selectedConfigurationChangedHandler", e), this.urlSlug = (e == null ? void 0 : e.slug) || this.defaultUrlSlug || "";
|
|
2894
2894
|
}
|
|
2895
2895
|
selectedLanguageChangedHandler(e, n) {
|
|
2896
|
-
e !== n &&
|
|
2896
|
+
e !== n && (c.changeLanguage(e), this.requiredError = c.t("fieldRequired", { field: "Slug" }), this.patternError = c.t("invalidInputFormat", { field: "Slug" }));
|
|
2897
2897
|
}
|
|
2898
2898
|
async nylasFormInputChangeHandler(e) {
|
|
2899
2899
|
const { name: n, value: a } = e.detail;
|
|
@@ -2903,14 +2903,14 @@ const Ra = class {
|
|
|
2903
2903
|
this.focus = !0;
|
|
2904
2904
|
}
|
|
2905
2905
|
async nylasFormInputBlurHandler() {
|
|
2906
|
-
if (this.slugErrorMessage = "", this.internals.setValidity({}), this.focus = !1, this.requiresSlug && this.urlSlug === "") {
|
|
2907
|
-
this.internals.setValidity({ customError: !0 }, "
|
|
2906
|
+
if (this.slugErrorMessage = "", this.internals.setValidity({}), this.focus = !1, this.requiresSlug && this.urlSlug.trim() === "") {
|
|
2907
|
+
this.internals.setValidity({ customError: !0 }, c.t("nylasCustomEventSlug.slugRequiredErrorMessage")), this.slugErrorMessage = c.t("nylasCustomEventSlug.slugRequiredErrorMessage");
|
|
2908
2908
|
return;
|
|
2909
2909
|
}
|
|
2910
|
-
/^[A-Za-z0-
|
|
2910
|
+
/^[A-Za-z0-9._-]*$/.test(this.urlSlug.trim()) || (this.internals.setValidity({ customError: !0 }, c.t("nylasCustomEventSlug.slugErrorMessage")), this.slugErrorMessage = c.t("nylasCustomEventSlug.slugErrorMessage"));
|
|
2911
2911
|
}
|
|
2912
2912
|
formSubmittedHandler(e) {
|
|
2913
|
-
|
|
2913
|
+
d("nylas-event-title", "formSubmittedHandler", e), this.nylasFormInputBlurHandler();
|
|
2914
2914
|
}
|
|
2915
2915
|
toggleDrawer() {
|
|
2916
2916
|
this.isOpen = !this.isOpen;
|
|
@@ -2928,7 +2928,7 @@ const Ra = class {
|
|
|
2928
2928
|
if (!this.requiresSlug)
|
|
2929
2929
|
return null;
|
|
2930
2930
|
const e = typeof this.urlSlug < "u";
|
|
2931
|
-
return i(O, null, i("div", { class: "nylas-custom-event-slug", part: "nces" }, i("div", { class: "header", part: "nces__header" }, i("div", null, i("h3", null,
|
|
2931
|
+
return i(O, null, i("div", { class: "nylas-custom-event-slug", part: "nces" }, i("div", { class: "header", part: "nces__header" }, i("div", null, i("h3", null, c.t("nylasCustomEventSlug.headerTitle")), i("p", null, c.t("nylasCustomEventSlug.headerSubTitle"))), i("div", { class: "drawer-toggle", part: "nces__drawer-toggle--container" }, i("span", { class: `chevron ${this.isOpen ? "open" : "closed"} `, onClick: () => this.toggleDrawer() }, i("chevron-icon", { width: "24", height: "24" })))), this.isOpen && i("div", { class: "nylas-custom-event-slug__body", part: "nces__body" }, i("div", { class: "nylas-custom-event-slug__section" }, i("div", { class: "nylas-custom-event-slug__row" }, i("div", { class: "input-container" }, i("label", null, c.t("nylasCustomEventSlug.eventSlugLabel"), i("span", { class: "label-icon" }, i("tooltip-component", null, i("info-icon", { slot: "tooltip-icon" }), i("span", { slot: "tooltip-content" }, c.t("nylasCustomEventSlug.tooltip.desc"))))), i("div", { class: { "nylas-custom-event-slug__input-wrapper": !0, focus: this.focus, error: !!this.slugErrorMessage } }, i("div", { slot: "prefix", class: "prefix" }, "/"), e && i("input-component", { name: "event-slug", id: "event-slug", type: "text", required: !1, placeholder: "my-link-name", exportparts: "ic_input: nces__input-textfield", defaultValue: this.urlSlug, requiredError: this.requiredError, patternError: this.patternError }), i("div", { slot: "icon", class: { icon: !0, disabled: !this.urlSlug }, onClick: () => !this.copied && !!this.urlSlug && this.copyToClipboard() }, this.copied ? i("div", { class: "copied" }, i("checkmark-icon", { width: "12", height: "18" }), " ", c.t("nylasCustomEventSlug.copied")) : i("copy-icon", { width: "12", height: "18" }))), this.slugErrorMessage && i("span", { class: "error-message" }, this.slugErrorMessage)))))));
|
|
2932
2932
|
}
|
|
2933
2933
|
static get formAssociated() {
|
|
2934
2934
|
return !0;
|
|
@@ -2944,8 +2944,8 @@ const Ra = class {
|
|
|
2944
2944
|
};
|
|
2945
2945
|
}
|
|
2946
2946
|
};
|
|
2947
|
-
|
|
2948
|
-
|
|
2947
|
+
Dl([
|
|
2948
|
+
D({
|
|
2949
2949
|
name: "nylas-custom-event-slug",
|
|
2950
2950
|
stateToProps: /* @__PURE__ */ new Map([
|
|
2951
2951
|
["schedulerConfig.requiresSlug", "requiresSlug"],
|
|
@@ -2963,16 +2963,16 @@ Ll([
|
|
|
2963
2963
|
kn("design:type", Function),
|
|
2964
2964
|
kn("design:paramtypes", []),
|
|
2965
2965
|
kn("design:returntype", void 0)
|
|
2966
|
-
],
|
|
2967
|
-
|
|
2968
|
-
const
|
|
2969
|
-
var
|
|
2970
|
-
var o = arguments.length, l = o < 3 ? n : t === null ? t = Object.getOwnPropertyDescriptor(n, a) : t,
|
|
2966
|
+
], Aa.prototype, "render", null);
|
|
2967
|
+
Aa.style = Hl;
|
|
2968
|
+
const Ll = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff;width:inherit}.nylas-customize-booking-settings{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200)}.nylas-customize-booking-settings .header{padding:1rem;border-bottom:1px solid var(--nylas-base-200)}.nylas-customize-booking-settings .header h3{margin:0;font-size:16px;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-customize-booking-settings .header p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.nylas-customize-booking-settings .nylas-customize-booking-settings__settings{display:flex;flex-direction:column;gap:1.5rem;padding:1rem;margin:1rem 0}.nylas-customize-booking-settings .nylas-customize-booking-settings__settings .nylas-customize-booking-settings__settings-div{display:flex;align-items:center;gap:4px}.label{margin-left:32px;font-size:16px;font-weight:400;color:var(--nylas-base-800);line-height:24px}.label .label-contents{margin:0;display:inline-block}@media screen and (max-width: 768px){.label .label-contents{display:block}}.label tooltip-component{display:inline-block}@media screen and (max-width: 768px){tooltip-component#guests::part(tc__content){left:58px}}tooltip-component#reschedule::part(tc__content){left:58px}@media screen and (max-width: 768px){tooltip-component#reschedule::part(tc__content){left:58px}}tooltip-component#cancel::part(tc__content){left:-58px}@media screen and (max-width: 768px){tooltip-component#cancel::part(tc__content){left:58px}}', Fl = Ll;
|
|
2969
|
+
var Il = function(e, n, a, t) {
|
|
2970
|
+
var o = arguments.length, l = o < 3 ? n : t === null ? t = Object.getOwnPropertyDescriptor(n, a) : t, r;
|
|
2971
2971
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
2972
2972
|
l = Reflect.decorate(e, n, a, t);
|
|
2973
2973
|
else
|
|
2974
|
-
for (var
|
|
2975
|
-
(
|
|
2974
|
+
for (var s = e.length - 1; s >= 0; s--)
|
|
2975
|
+
(r = e[s]) && (l = (o < 3 ? r(l) : o > 3 ? r(n, a, l) : r(n, a)) || l);
|
|
2976
2976
|
return o > 3 && l && Object.defineProperty(n, a, l), l;
|
|
2977
2977
|
}, xn = function(e, n) {
|
|
2978
2978
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
@@ -2980,42 +2980,42 @@ var Fl = function(e, n, a, t) {
|
|
|
2980
2980
|
};
|
|
2981
2981
|
const Ma = class {
|
|
2982
2982
|
constructor(e) {
|
|
2983
|
-
var n, a, t, o, l,
|
|
2984
|
-
x(this, e), this.valueChanged = S(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.selectedConfiguration = void 0, this.defaultHideAdditionalGuests = ((a = (n = this.selectedConfiguration) == null ? void 0 : n.scheduler) == null ? void 0 : a.hide_additional_guests) ?? !1, this.defaultHideCancellationOptions = ((o = (t = this.selectedConfiguration) == null ? void 0 : t.scheduler) == null ? void 0 : o.hide_cancellation_options) ?? !1, this.defaultHideReschedulingOptions = ((
|
|
2983
|
+
var n, a, t, o, l, r;
|
|
2984
|
+
x(this, e), this.valueChanged = S(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.selectedConfiguration = void 0, this.defaultHideAdditionalGuests = ((a = (n = this.selectedConfiguration) == null ? void 0 : n.scheduler) == null ? void 0 : a.hide_additional_guests) ?? !1, this.defaultHideCancellationOptions = ((o = (t = this.selectedConfiguration) == null ? void 0 : t.scheduler) == null ? void 0 : o.hide_cancellation_options) ?? !1, this.defaultHideReschedulingOptions = ((r = (l = this.selectedConfiguration) == null ? void 0 : l.scheduler) == null ? void 0 : r.hide_rescheduling_options) ?? !1, this.name = "customize-booking-settings", this.selectedLanguage = void 0, this.showSettings = ["allowGuestsToInvite", "hideCancellationOptions", "hideReschedulingOptions"], this.allowGuestsToInvite = void 0, this.hideCancellationOptions = void 0, this.hideReschedulingOptions = void 0;
|
|
2985
2985
|
}
|
|
2986
2986
|
elementNameChangedHandler(e) {
|
|
2987
|
-
|
|
2987
|
+
d("nylas-customize-booking-settings", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
2988
2988
|
}
|
|
2989
2989
|
selectedConfigurationChangedHandler(e) {
|
|
2990
2990
|
var n, a, t;
|
|
2991
|
-
|
|
2991
|
+
d("nylas-customize-booking-settings", "selectedConfigurationChangedHandler", e), this.allowGuestsToInvite = !((n = e == null ? void 0 : e.scheduler) != null && n.hide_additional_guests), this.hideCancellationOptions = ((a = e == null ? void 0 : e.scheduler) == null ? void 0 : a.hide_cancellation_options) ?? !1, this.hideReschedulingOptions = ((t = e == null ? void 0 : e.scheduler) == null ? void 0 : t.hide_rescheduling_options) ?? !1, this.handleSettingValues(!1);
|
|
2992
2992
|
}
|
|
2993
2993
|
selectedLanguageChangedHandler(e, n) {
|
|
2994
|
-
e !== n &&
|
|
2994
|
+
e !== n && c.changeLanguage(e);
|
|
2995
2995
|
}
|
|
2996
2996
|
connectedCallback() {
|
|
2997
|
-
|
|
2997
|
+
d("nylas-customize-booking-settings", "connectedCallback");
|
|
2998
2998
|
}
|
|
2999
2999
|
disconnectedCallback() {
|
|
3000
|
-
|
|
3000
|
+
d("nylas-customize-booking-settings", "disconnectedCallback");
|
|
3001
3001
|
}
|
|
3002
3002
|
componentWillLoad() {
|
|
3003
|
-
|
|
3003
|
+
d("nylas-customize-booking-settings", "componentWillLoad"), this.host.setAttribute("name", this.name);
|
|
3004
3004
|
}
|
|
3005
3005
|
componentDidLoad() {
|
|
3006
|
-
|
|
3006
|
+
d("nylas-customize-booking-settings", "componentDidLoad"), this.selectedConfiguration ? this.selectedConfigurationChangedHandler(this.selectedConfiguration) : (this.allowGuestsToInvite = !this.defaultHideAdditionalGuests, this.hideCancellationOptions = this.defaultHideCancellationOptions, this.hideReschedulingOptions = this.defaultHideReschedulingOptions, this.handleSettingValues(!1));
|
|
3007
3007
|
}
|
|
3008
3008
|
componentWillUpdate() {
|
|
3009
|
-
|
|
3009
|
+
d("nylas-customize-booking-settings", "componentWillUpdate");
|
|
3010
3010
|
}
|
|
3011
3011
|
componentDidUpdate() {
|
|
3012
|
-
|
|
3012
|
+
d("nylas-customize-booking-settings", "componentDidUpdate");
|
|
3013
3013
|
}
|
|
3014
3014
|
componentWillRender() {
|
|
3015
|
-
|
|
3015
|
+
d("nylas-customize-booking-settings", "componentWillRender");
|
|
3016
3016
|
}
|
|
3017
3017
|
componentDidRender() {
|
|
3018
|
-
|
|
3018
|
+
d("nylas-customize-booking-settings", "componentDidRender");
|
|
3019
3019
|
}
|
|
3020
3020
|
checkboxToggledHandler(e) {
|
|
3021
3021
|
const { name: n, checked: a } = e.detail;
|
|
@@ -3051,7 +3051,7 @@ const Ma = class {
|
|
|
3051
3051
|
}
|
|
3052
3052
|
render() {
|
|
3053
3053
|
const e = typeof this.hideCancellationOptions == "boolean" && typeof this.hideReschedulingOptions == "boolean" && typeof this.allowGuestsToInvite == "boolean", n = this.showSettings.includes("allowGuestsToInvite");
|
|
3054
|
-
return i(O, { key: "8e687df3a2a2f3fcc5a35786766a80a91944c3bc" }, e && i("div", { class: "nylas-customize-booking-settings", part: "ncbs" }, i("div", { class: "header", part: "ncbs__header" }, i("h3", null,
|
|
3054
|
+
return i(O, { key: "8e687df3a2a2f3fcc5a35786766a80a91944c3bc" }, e && i("div", { class: "nylas-customize-booking-settings", part: "ncbs" }, i("div", { class: "header", part: "ncbs__header" }, i("h3", null, c.t("nylasCustomizeBookingSettings.headerTitle")), i("p", null, c.t("nylasCustomizeBookingSettings.headerSubTitle"))), i("div", { class: "nylas-customize-booking-settings__settings", part: "ncbs__settings" }, n && i("div", { class: "nylas-customize-booking-settings__settings-div", part: "ncbs__settings-div , ncbs__additional_guests" }, i("checkbox-component", { name: "hide_additional_guests", label: c.t("nylasCustomizeBookingSettings.allowGuests.label"), checked: this.allowGuestsToInvite }, i("span", { slot: "label", class: "label" }, i("p", { class: "label-contents" }, c.t("nylasCustomizeBookingSettings.allowGuests.label", { interpolation: { escapeValue: !1, escape: (a) => `${a}`, useRawValueToEscape: !0 } }))))), i("div", { class: "nylas-customize-booking-settings__settings-div", part: "ncbs__settings-div , ncbs__rescheduling_options" }, i("checkbox-component", { name: "hide_rescheduling_options", label: "Hide 'Reschedule' option on booking page and emails.", checked: this.hideReschedulingOptions }, i("span", { slot: "label", class: "label" }, i("p", { class: "label-contents" }, c.t("nylasCustomizeBookingSettings.hideReschedule.label")), i("tooltip-component", { id: "reschedule" }, i("info-icon", { slot: "tooltip-icon" }), i("span", { slot: "tooltip-content" }, c.t("nylasCustomizeBookingSettings.hideReschedule.tooltip.desc")))))), i("div", { class: "nylas-customize-booking-settings__settings-div", part: "ncbs__settings-div , ncbs__cancellation_options" }, i("checkbox-component", { name: "hide_cancellation_options", label: "Hide 'Cancel' option on booking page and emails.", checked: this.hideCancellationOptions }, i("span", { slot: "label", class: "label" }, i("p", { class: "label-contents" }, c.t("nylasCustomizeBookingSettings.hideCancel.label")), i("tooltip-component", { id: "cancel" }, i("info-icon", { slot: "tooltip-icon" }), i("span", { slot: "tooltip-content" }, c.t("nylasCustomizeBookingSettings.hideCancel.tooltip.desc")))))))));
|
|
3055
3055
|
}
|
|
3056
3056
|
static get formAssociated() {
|
|
3057
3057
|
return !0;
|
|
@@ -3067,8 +3067,8 @@ const Ma = class {
|
|
|
3067
3067
|
};
|
|
3068
3068
|
}
|
|
3069
3069
|
};
|
|
3070
|
-
|
|
3071
|
-
|
|
3070
|
+
Il([
|
|
3071
|
+
D({
|
|
3072
3072
|
name: "nylas-customize-booking-settings",
|
|
3073
3073
|
stateToProps: /* @__PURE__ */ new Map([
|
|
3074
3074
|
["schedulerConfig.selectedConfiguration", "selectedConfiguration"],
|
|
@@ -3080,15 +3080,15 @@ Fl([
|
|
|
3080
3080
|
xn("design:paramtypes", []),
|
|
3081
3081
|
xn("design:returntype", void 0)
|
|
3082
3082
|
], Ma.prototype, "render", null);
|
|
3083
|
-
Ma.style =
|
|
3083
|
+
Ma.style = Fl;
|
|
3084
3084
|
const Tl = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff;width:inherit}.nylas-disable-emails{border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);margin:1rem}.header{padding:1rem;display:grid;grid-template-columns:1fr auto;border-bottom:1px solid var(--nylas-base-200)}.header h3{border-radius:var(--nylas-border-radius-2x);margin:0;font-size:16px;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.header p{display:flex;gap:4px;align-items:center;margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.header .drawer-toggle{display:flex;gap:24px;align-items:center}.header .drawer-toggle .chevron{display:flex;align-self:center;cursor:pointer}.header .drawer-toggle .chevron:hover,.header .drawer-toggle .chevron:active{color:var(--nylas-primary)}.header .drawer-toggle .chevron.open{transform:rotate(90deg)}.header .drawer-toggle .chevron.closed{transform:rotate(270deg)}.header .drawer-toggle .chevron.disabled{cursor:not-allowed;color:var(--nylas-base-300)}.header .drawer-toggle .chevron.disabled:hover{color:var(--nylas-base-300)}.toggle{display:flex;align-items:center;justify-content:space-between;padding:0;margin:16px}.toggle label{display:inline-flex;align-items:center;gap:8px}.toggle toggle-switch{margin-right:12px}.toggle select-dropdown{width:auto}', $l = Tl;
|
|
3085
3085
|
var Nl = function(e, n, a, t) {
|
|
3086
|
-
var o = arguments.length, l = o < 3 ? n : t === null ? t = Object.getOwnPropertyDescriptor(n, a) : t,
|
|
3086
|
+
var o = arguments.length, l = o < 3 ? n : t === null ? t = Object.getOwnPropertyDescriptor(n, a) : t, r;
|
|
3087
3087
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
3088
3088
|
l = Reflect.decorate(e, n, a, t);
|
|
3089
3089
|
else
|
|
3090
|
-
for (var
|
|
3091
|
-
(
|
|
3090
|
+
for (var s = e.length - 1; s >= 0; s--)
|
|
3091
|
+
(r = e[s]) && (l = (o < 3 ? r(l) : o > 3 ? r(n, a, l) : r(n, a)) || l);
|
|
3092
3092
|
return o > 3 && l && Object.defineProperty(n, a, l), l;
|
|
3093
3093
|
}, En = function(e, n) {
|
|
3094
3094
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
@@ -3099,38 +3099,38 @@ const za = class {
|
|
|
3099
3099
|
x(this, e), this.valueChanged = S(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.selectedConfiguration = void 0, this.name = "disable-emails", this.selectedLanguage = void 0, this.organizerLocale = this.selectedLanguage || "en", this.disableEmails = !1;
|
|
3100
3100
|
}
|
|
3101
3101
|
connectedCallback() {
|
|
3102
|
-
|
|
3102
|
+
d("nylas-disable-emails", "connectedCallback");
|
|
3103
3103
|
}
|
|
3104
3104
|
disconnectedCallback() {
|
|
3105
|
-
|
|
3105
|
+
d("nylas-disable-emails", "disconnectedCallback");
|
|
3106
3106
|
}
|
|
3107
3107
|
componentWillLoad() {
|
|
3108
|
-
|
|
3108
|
+
d("nylas-disable-emails", "componentWillLoad"), this.host.setAttribute("name", this.name);
|
|
3109
3109
|
}
|
|
3110
3110
|
componentDidLoad() {
|
|
3111
|
-
var t, o, l,
|
|
3112
|
-
|
|
3111
|
+
var t, o, l, r, s, f, y, u;
|
|
3112
|
+
d("nylas-disable-emails", "componentDidLoad");
|
|
3113
3113
|
const e = ((l = (o = (t = this.selectedConfiguration) == null ? void 0 : t.scheduler) == null ? void 0 : o.email_template) == null ? void 0 : l.organizer_locale) || this.selectedLanguage || "en";
|
|
3114
3114
|
this.organizerLocale = e;
|
|
3115
|
-
const a = ((
|
|
3115
|
+
const a = ((r = this.selectedConfiguration) == null ? void 0 : r.group_booking) !== void 0 ? (f = (s = this.selectedConfiguration) == null ? void 0 : s.group_booking) == null ? void 0 : f.disable_emails : (u = (y = this.selectedConfiguration) == null ? void 0 : y.event_booking) == null ? void 0 : u.disable_emails;
|
|
3116
3116
|
this.disableEmails = a || !1, this.handleSettingValue(!1);
|
|
3117
3117
|
}
|
|
3118
3118
|
elementNameChangedHandler(e) {
|
|
3119
|
-
|
|
3119
|
+
d("nylas-disable-emails", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
3120
3120
|
}
|
|
3121
3121
|
selectedLanguageChangedHandler(e, n) {
|
|
3122
|
-
e !== n &&
|
|
3122
|
+
e !== n && c.changeLanguage(e);
|
|
3123
3123
|
}
|
|
3124
3124
|
selectedConfigurationChangedHandler(e, n) {
|
|
3125
|
-
var o, l,
|
|
3125
|
+
var o, l, r, s;
|
|
3126
3126
|
if (e === n)
|
|
3127
3127
|
return;
|
|
3128
3128
|
this.organizerLocale = ((l = (o = e.scheduler) == null ? void 0 : o.email_template) == null ? void 0 : l.organizer_locale) || this.selectedLanguage || "en", this.handleSettingValue(!1);
|
|
3129
|
-
const t = (e == null ? void 0 : e.group_booking) !== void 0 ? (
|
|
3129
|
+
const t = (e == null ? void 0 : e.group_booking) !== void 0 ? (r = e == null ? void 0 : e.group_booking) == null ? void 0 : r.disable_emails : (s = e == null ? void 0 : e.event_booking) == null ? void 0 : s.disable_emails;
|
|
3130
3130
|
this.disableEmails = t || !1, this.handleSettingValue(!1);
|
|
3131
3131
|
}
|
|
3132
3132
|
nyalsFormSwitchToggledHandler(e) {
|
|
3133
|
-
|
|
3133
|
+
d("nylas-confirmation-email", "nyalsFormSwitchToggledHandler", e.detail);
|
|
3134
3134
|
const { checked: n } = e.detail;
|
|
3135
3135
|
e.detail.name === "disable-emails" && (this.disableEmails = !n, this.handleSettingValue());
|
|
3136
3136
|
}
|
|
@@ -3154,12 +3154,12 @@ const za = class {
|
|
|
3154
3154
|
}), this.name);
|
|
3155
3155
|
}
|
|
3156
3156
|
render() {
|
|
3157
|
-
var t, o, l,
|
|
3157
|
+
var t, o, l, r, s;
|
|
3158
3158
|
const e = Object.keys(Qn).map((f) => ({
|
|
3159
3159
|
label: Qn[f],
|
|
3160
3160
|
value: f
|
|
3161
|
-
})), a = ((t = this.selectedConfiguration) == null ? void 0 : t.group_booking) !== void 0 ? (l = (o = this.selectedConfiguration) == null ? void 0 : o.group_booking) == null ? void 0 : l.disable_emails : (
|
|
3162
|
-
return i(O, { key: "61c656e8493effefc64d68b07bf663350d854630" }, i("div", { key: "e3e32aea50842e2e9c1426fd639eb0dab573a989", class: "nylas-disable-emails", part: "nde" }, i("div", { key: "621732af92baada7bc6c06408ff9a51674cc158c", class: "header", part: "nde__header" }, i("div", { key: "8f882d8b83994abc4c73219701979d2287411edb" }, i("h3", { key: "a81f9e1b64dac3621ee45eb3d6dc1709f61c272b" },
|
|
3161
|
+
})), a = ((t = this.selectedConfiguration) == null ? void 0 : t.group_booking) !== void 0 ? (l = (o = this.selectedConfiguration) == null ? void 0 : o.group_booking) == null ? void 0 : l.disable_emails : (s = (r = this.selectedConfiguration) == null ? void 0 : r.event_booking) == null ? void 0 : s.disable_emails;
|
|
3162
|
+
return i(O, { key: "61c656e8493effefc64d68b07bf663350d854630" }, i("div", { key: "e3e32aea50842e2e9c1426fd639eb0dab573a989", class: "nylas-disable-emails", part: "nde" }, i("div", { key: "621732af92baada7bc6c06408ff9a51674cc158c", class: "header", part: "nde__header" }, i("div", { key: "8f882d8b83994abc4c73219701979d2287411edb" }, i("h3", { key: "a81f9e1b64dac3621ee45eb3d6dc1709f61c272b" }, c.t("eventCommunicationsTitle")), i("p", { key: "c52741d9875a3f3c8df86e1a5d104783a7934c5e" }, c.t("eventCommunicationsDescription")))), i("div", { key: "5a08c4030ba531402a9a4bb42153eb8d4968dfd6", class: "toggle", part: "nde__toggle" }, i("label", { key: "9f2c2a5d4f07e2882d598d0f7f8a90d7f4ec5758" }, c.t("nylasConfirmationEmail.confirmationEmail.label"), i("span", { key: "8743fdc4d47c1ad833656629a7096610436ddccd", class: "label-icon" }, i("tooltip-component", { key: "a92ff3a415b36a68fd94eff0a4b2f0d825fbfbb6" }, i("info-icon", { key: "eb0806cdc0690f2d7f6e515a691569b683099c09", slot: "tooltip-icon" }), i("span", { key: "45f1a35f845617099c9b8d786dc5762a46ca374e", slot: "tooltip-content" }, " ", c.t("nylasConfirmationEmail.confirmationEmail.tooltip.desc"))))), i("toggle-switch", { key: "984d924370c58341ac73cce774c26b910d54a52b", exportparts: "ts_label: nde__toggle-label, ts_input: nde_toggle-input, ts_slider: nde_toggle-slider", name: "disable-emails", checked: !a })), i("div", { key: "50524c61fa7d56e401a76b7f53a08e83b7498cc6", class: "toggle", part: "nde__toggle" }, i("label", { key: "e72bac6b8d355a2d87cdb98e058e3564555c2783" }, c.t("nylasConfirmationEmail.confirmationEmail.language"), i("span", { key: "ec813fa7ca1cb750b55c75f0954664dcb4625995", class: "label-icon" }, i("tooltip-component", { key: "5efbf9e93637e15b93e4baa786131534424d8896" }, i("info-icon", { key: "5e2e302326c873d637e7892d508d83636e81a20b", slot: "tooltip-icon" }), i("span", { key: "b6a1e85100d303079c2efb4833d9b98fe74326c6", slot: "tooltip-content" }, " ", c.t("nylasConfirmationEmail.confirmationEmail.tooltip.language"))))), i("select-dropdown", { key: "d1b12b65f4dcb88781400ec594611e6a41f86c0f", name: "organizer-locale", options: e, searchPlaceholder: c.t("search"), withChevron: !1, defaultSelectedOption: e.find((f) => f.value == this.organizerLocale), exportparts: "sd_dropdown: nse__language-dropdown, sd_dropdown-button: nse__language-drop-button, sd_dropdown-content: nse__language-drop-content, sd_dropdown_label: nse__language-drop-label" }, i("span", { key: "52a4959de14fb93cdcb0f624d0b86e768f302a5b", slot: "select-icon" }, i("translate-icon", { key: "5c0aa2784847c6b858b833606c661d593e7cd40c", width: "20", height: "20" }))))));
|
|
3163
3163
|
}
|
|
3164
3164
|
static get formAssociated() {
|
|
3165
3165
|
return !0;
|
|
@@ -3176,7 +3176,7 @@ const za = class {
|
|
|
3176
3176
|
}
|
|
3177
3177
|
};
|
|
3178
3178
|
Nl([
|
|
3179
|
-
|
|
3179
|
+
D({
|
|
3180
3180
|
name: "nylas-disable-emails",
|
|
3181
3181
|
stateToProps: /* @__PURE__ */ new Map([
|
|
3182
3182
|
["schedulerConfig.selectedLanguage", "selectedLanguage"],
|
|
@@ -3195,14 +3195,14 @@ Nl([
|
|
|
3195
3195
|
En("design:returntype", void 0)
|
|
3196
3196
|
], za.prototype, "render", null);
|
|
3197
3197
|
za.style = $l;
|
|
3198
|
-
const Pl = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff}.nylas-event-duration{display:flex;flex-direction:column;gap:4px}.nylas-event-duration label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:16px;font-style:normal;font-weight:400;line-height:150%;}.nylas-event-duration label span.required{color:var(--nylas-error, #cc4841)}.nylas-event-duration label span.label-icon{margin-left:4px}.nylas-event-duration label span.label-icon tooltip-component{display:flex}.nylas-event-duration__error-container{max-height:0;opacity:0;overflow:hidden;transition:max-height 0.3s ease, opacity 0.3s ease}.nylas-event-duration__error-container.visible{max-height:20px;opacity:1}.nylas-event-duration__error-container .nylas-event-duration__error{color:var(--nylas-error);font-family:var(--nylas-font-family);font-size:12px;font-style:normal;font-weight:400;line-height:150%;}.nylas-event-duration__wrapper{display:flex;align-items:center;gap:0.5rem}.nylas-event-duration__wrapper input{padding:12px 16px;border-width:1;border-radius:8px;border:1px solid var(--nylas-base-200);font-family:var(--nylas-font-family);font-size:16px;line-height:24px;width:48px}.nylas-event-duration__wrapper input-dropdown::part(id_dropdown-input){border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);padding:14px 16px}.nylas-event-duration__wrapper input-dropdown::part(id_dropdown-content){width:100%;min-width:unset;height:200px}.nylas-event-duration__wrapper input-dropdown{width:80px}.nylas-event-duration__wrapper input-dropdown.error::part(id_dropdown-input){border:1px solid var(--nylas-error)}.nylas-event-duration__wrapper select-dropdown{width:120px}@media screen and (max-width: 768px){.nylas-event-duration__wrapper select-dropdown{width:100%}}.nylas-event-duration__wrapper select-dropdown::part(sd_dropdown-button){border:1px solid var(--nylas-base-200)}',
|
|
3199
|
-
var
|
|
3200
|
-
var o = arguments.length, l = o < 3 ? n : t === null ? t = Object.getOwnPropertyDescriptor(n, a) : t,
|
|
3198
|
+
const Pl = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff}.nylas-event-duration{display:flex;flex-direction:column;gap:4px}.nylas-event-duration label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:16px;font-style:normal;font-weight:400;line-height:150%;}.nylas-event-duration label span.required{color:var(--nylas-error, #cc4841)}.nylas-event-duration label span.label-icon{margin-left:4px}.nylas-event-duration label span.label-icon tooltip-component{display:flex}.nylas-event-duration__error-container{max-height:0;opacity:0;overflow:hidden;transition:max-height 0.3s ease, opacity 0.3s ease}.nylas-event-duration__error-container.visible{max-height:20px;opacity:1}.nylas-event-duration__error-container .nylas-event-duration__error{color:var(--nylas-error);font-family:var(--nylas-font-family);font-size:12px;font-style:normal;font-weight:400;line-height:150%;}.nylas-event-duration__wrapper{display:flex;align-items:center;gap:0.5rem}.nylas-event-duration__wrapper input{padding:12px 16px;border-width:1;border-radius:8px;border:1px solid var(--nylas-base-200);font-family:var(--nylas-font-family);font-size:16px;line-height:24px;width:48px}.nylas-event-duration__wrapper input-dropdown::part(id_dropdown-input){border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);padding:14px 16px}.nylas-event-duration__wrapper input-dropdown::part(id_dropdown-content){width:100%;min-width:unset;height:200px}.nylas-event-duration__wrapper input-dropdown{width:80px}.nylas-event-duration__wrapper input-dropdown.error::part(id_dropdown-input){border:1px solid var(--nylas-error)}.nylas-event-duration__wrapper select-dropdown{width:120px}@media screen and (max-width: 768px){.nylas-event-duration__wrapper select-dropdown{width:100%}}.nylas-event-duration__wrapper select-dropdown::part(sd_dropdown-button){border:1px solid var(--nylas-base-200)}', Rl = Pl;
|
|
3199
|
+
var Al = function(e, n, a, t) {
|
|
3200
|
+
var o = arguments.length, l = o < 3 ? n : t === null ? t = Object.getOwnPropertyDescriptor(n, a) : t, r;
|
|
3201
3201
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
3202
3202
|
l = Reflect.decorate(e, n, a, t);
|
|
3203
3203
|
else
|
|
3204
|
-
for (var
|
|
3205
|
-
(
|
|
3204
|
+
for (var s = e.length - 1; s >= 0; s--)
|
|
3205
|
+
(r = e[s]) && (l = (o < 3 ? r(l) : o > 3 ? r(n, a, l) : r(n, a)) || l);
|
|
3206
3206
|
return o > 3 && l && Object.defineProperty(n, a, l), l;
|
|
3207
3207
|
}, Sn = function(e, n) {
|
|
3208
3208
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
@@ -3218,7 +3218,7 @@ const Ba = class {
|
|
|
3218
3218
|
];
|
|
3219
3219
|
}
|
|
3220
3220
|
elementNameChangedHandler(e) {
|
|
3221
|
-
|
|
3221
|
+
d("nylas-event-duration", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
3222
3222
|
}
|
|
3223
3223
|
selectedConfigurationChangedHandler(e) {
|
|
3224
3224
|
var a;
|
|
@@ -3226,19 +3226,19 @@ const Ba = class {
|
|
|
3226
3226
|
n && (this.duration = n >= 60 ? n / 60 : n, this.durationMinutes = n || 30, this.durationIncrement = n >= 60 ? 60 : 1, this.isInternalsAvailable && this.internals.setFormValue(this.durationMinutes.toString(), "duration"));
|
|
3227
3227
|
}
|
|
3228
3228
|
selectedLanguageChangedHandler(e, n) {
|
|
3229
|
-
e !== n && (
|
|
3229
|
+
e !== n && (c.changeLanguage(e), this.error && this.validateDuration());
|
|
3230
3230
|
}
|
|
3231
3231
|
connectedCallback() {
|
|
3232
|
-
|
|
3232
|
+
d("nylas-event-duration", "connectedCallback");
|
|
3233
3233
|
}
|
|
3234
3234
|
componentWillLoad() {
|
|
3235
|
-
|
|
3235
|
+
d("nylas-event-duration", "componentWillLoad"), this.host.setAttribute("name", this.name);
|
|
3236
3236
|
}
|
|
3237
3237
|
componentDidLoad() {
|
|
3238
|
-
|
|
3238
|
+
d("nylas-event-duration", "componentDidLoad"), this.selectedConfiguration && this.selectedConfigurationChangedHandler(this.selectedConfiguration), this.duration = this.duration ? this.duration : this.eventDurationMinutes ? this.eventDurationMinutes >= 60 ? this.eventDurationMinutes / 60 : this.eventDurationMinutes : 30, this.durationMinutes = this.durationMinutes ? this.durationMinutes : this.duration ? this.duration : 30, this.durationIncrement = this.durationIncrement ? this.durationIncrement : this.duration >= 60 ? 60 : 1, this.setDurationMintueOptions(), this.isInternalsAvailable && this.internals.setFormValue(this.durationMinutes.toString(), "duration");
|
|
3239
3239
|
}
|
|
3240
3240
|
disconnectedCallback() {
|
|
3241
|
-
|
|
3241
|
+
d("nylas-event-duration", "disconnectedCallback");
|
|
3242
3242
|
}
|
|
3243
3243
|
get isInternalsAvailable() {
|
|
3244
3244
|
return typeof this.internals < "u" && typeof this.internals.setFormValue == "function";
|
|
@@ -3252,24 +3252,24 @@ const Ba = class {
|
|
|
3252
3252
|
] : this.durationMinutesOptions = Array.from({ length: 23 }, (e, n) => ({ value: (n + 1).toString(), label: (n + 1).toString() })), this.durationMinutesOptions;
|
|
3253
3253
|
}
|
|
3254
3254
|
validateDuration() {
|
|
3255
|
-
return this.durationMinutes % 5 !== 0 ? (this.error =
|
|
3255
|
+
return this.durationMinutes % 5 !== 0 ? (this.error = c.t("nylasEventDuration.error.durationMustBeMultipleOf5"), this.isInternalsAvailable && this.internals.setValidity({ customError: !0 }, this.error)) : this.durationMinutes <= 0 ? (this.error = c.t("nylasEventDuration.error.durationMustBeGreaterThan0"), this.isInternalsAvailable && this.internals.setValidity({ customError: !0 }, this.error)) : (this.error = "", this.isInternalsAvailable && this.internals.setValidity({})), this.error;
|
|
3256
3256
|
}
|
|
3257
3257
|
nylasFormDropdownChangedHandler(e) {
|
|
3258
|
-
|
|
3258
|
+
d("nylas-calendar-picker", "nylasFormDropdownChangedHandler", e.detail);
|
|
3259
3259
|
const { value: n } = e.detail;
|
|
3260
3260
|
this.durationIncrement = parseInt(n.toString()), this.durationIncrement === 1 ? this.duration = 60 : this.duration = 1, this.setDurationMintueOptions(), this.durationMinutes = this.duration * this.durationIncrement, this.validateDuration() === "" && (this.isInternalsAvailable && this.internals.setFormValue(this.durationMinutes.toString(), this.name), this.valueChanged.emit({ value: this.durationMinutes.toString(), name: this.name }));
|
|
3261
3261
|
}
|
|
3262
3262
|
inputOptionChangedHandler(e) {
|
|
3263
|
-
|
|
3263
|
+
d("nylas-calendar-picker", "inputOptionChangedHandler", e.detail);
|
|
3264
3264
|
const { value: n } = e.detail;
|
|
3265
3265
|
this.duration = parseFloat(n.toString()), this.durationMinutes = this.duration * this.durationIncrement, this.validateDuration() === "" && (this.isInternalsAvailable && this.internals.setFormValue(this.durationMinutes.toString(), this.name), this.valueChanged.emit({ value: this.durationMinutes.toString(), name: this.name }));
|
|
3266
3266
|
}
|
|
3267
3267
|
render() {
|
|
3268
3268
|
const e = [
|
|
3269
|
-
{ value: 1 .toString(), label:
|
|
3270
|
-
{ value: 60 .toString(), label:
|
|
3269
|
+
{ value: 1 .toString(), label: c.t("timeDuration", { context: "minute" }) },
|
|
3270
|
+
{ value: 60 .toString(), label: c.t("timeDuration", { context: "hour" }) }
|
|
3271
3271
|
];
|
|
3272
|
-
return i(O, { key: "bee74ed5eb48a1bc48dc362f078d7171e8a34257" }, i("div", { key: "5a04f4235b729b9ef3c8bdd85d154aff975736a2", class: "nylas-event-duration", part: "ned" }, i("label", { key: "a66b0a5879cbdc7fdec1e1fe43385cea6a961a91", htmlFor: "duration" },
|
|
3272
|
+
return i(O, { key: "bee74ed5eb48a1bc48dc362f078d7171e8a34257" }, i("div", { key: "5a04f4235b729b9ef3c8bdd85d154aff975736a2", class: "nylas-event-duration", part: "ned" }, i("label", { key: "a66b0a5879cbdc7fdec1e1fe43385cea6a961a91", htmlFor: "duration" }, c.t("nylasEventDuration.headerTitle"), i("span", { key: "9c7b52f52a84a8ed7d956d7e3c3dd27386eacec4", class: "required" }, "*")), i("div", { key: "266a3ed77da606bfbed95157fa2ca4aaafe27a2b", class: "nylas-event-duration__wrapper" }, i("input-dropdown", { key: "7b3a65e9fb1d687b03cec7b0e9df10e8a873ebcf", class: this.error ? "error" : "", name: "event-duration", options: this.durationMinutesOptions, inputValue: this.duration.toString(), exportparts: "id_dropdown: ned__input_dropdown, id_dropdown-input: ned__input_dropdown-input, id_dropdown-content: ned__input_dropdown-content", defaultInputOption: this.durationMinutesOptions.find((n) => n.value === this.duration.toString()) }), this.durationIncrement && i("select-dropdown", { name: "event-duration", options: e, pluralizedLabel: this.duration > 1 ? c.t(`time.${this.durationIncrement === 60 ? "hours" : "minutes"}`) : c.t(`time.${this.durationIncrement === 60 ? "hour" : "minute"}`), exportparts: "sd_dropdown: ned__dropdown, sd_dropdown-button: ned__dropdown-button, sd_dropdown-content: ned__dropdown-content", defaultSelectedOption: e.find((n) => n.value === this.durationIncrement.toString()), withSearch: !1 })), i("div", { key: "ab0e152a7d9858325b968ed4f01827c3b14cac3a", class: `nylas-event-duration__error-container ${this.error ? "visible" : ""}`, part: "ned__error-container" }, i("div", { key: "1bfc3072b3e2b51d46247f3eebcbdf917df121e8", class: "nylas-event-duration__error", part: "ned__error" }, this.error))));
|
|
3273
3273
|
}
|
|
3274
3274
|
static get formAssociated() {
|
|
3275
3275
|
return !0;
|
|
@@ -3285,8 +3285,8 @@ const Ba = class {
|
|
|
3285
3285
|
};
|
|
3286
3286
|
}
|
|
3287
3287
|
};
|
|
3288
|
-
|
|
3289
|
-
|
|
3288
|
+
Al([
|
|
3289
|
+
D({
|
|
3290
3290
|
name: "nylas-event-duration",
|
|
3291
3291
|
stateToProps: /* @__PURE__ */ new Map([
|
|
3292
3292
|
["schedulerConfig.selectedConfiguration", "selectedConfiguration"],
|
|
@@ -3299,15 +3299,15 @@ Rl([
|
|
|
3299
3299
|
Sn("design:paramtypes", []),
|
|
3300
3300
|
Sn("design:returntype", void 0)
|
|
3301
3301
|
], Ba.prototype, "render", null);
|
|
3302
|
-
Ba.style =
|
|
3302
|
+
Ba.style = Rl;
|
|
3303
3303
|
const Ml = ':host{display:block;margin:1rem;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff}.nylas-event-limits__title{color:var(--nylas-base-900);font-size:16px;font-style:normal;font-weight:600;line-height:20px;margin:0;text-align:left}.nylas-event-limits__subtitle{color:var(--nylas-base-600);font-size:14px;font-style:normal;font-weight:400;line-height:20px;margin:0.25rem 0px 0px;text-align:left}.nylas-event-limits__content{padding:1rem;display:flex;flex-direction:column;gap:1rem}.nylas-event-limits__block{display:flex;justify-content:space-between;gap:0.5rem}', zl = Ml;
|
|
3304
3304
|
var Bl = function(e, n, a, t) {
|
|
3305
|
-
var o = arguments.length, l = o < 3 ? n : t === null ? t = Object.getOwnPropertyDescriptor(n, a) : t,
|
|
3305
|
+
var o = arguments.length, l = o < 3 ? n : t === null ? t = Object.getOwnPropertyDescriptor(n, a) : t, r;
|
|
3306
3306
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
3307
3307
|
l = Reflect.decorate(e, n, a, t);
|
|
3308
3308
|
else
|
|
3309
|
-
for (var
|
|
3310
|
-
(
|
|
3309
|
+
for (var s = e.length - 1; s >= 0; s--)
|
|
3310
|
+
(r = e[s]) && (l = (o < 3 ? r(l) : o > 3 ? r(n, a, l) : r(n, a)) || l);
|
|
3311
3311
|
return o > 3 && l && Object.defineProperty(n, a, l), l;
|
|
3312
3312
|
}, On = function(e, n) {
|
|
3313
3313
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
@@ -3318,22 +3318,22 @@ const ja = class {
|
|
|
3318
3318
|
x(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;
|
|
3319
3319
|
}
|
|
3320
3320
|
selectedLanguageChangedHandler(e, n) {
|
|
3321
|
-
e !== n &&
|
|
3321
|
+
e !== n && c.changeLanguage(e);
|
|
3322
3322
|
}
|
|
3323
3323
|
connectedCallback() {
|
|
3324
|
-
|
|
3324
|
+
d("nylas-event-limits", "connectedCallback");
|
|
3325
3325
|
}
|
|
3326
3326
|
componentWillLoad() {
|
|
3327
|
-
|
|
3327
|
+
d("nylas-event-limits", "componentWillLoad");
|
|
3328
3328
|
}
|
|
3329
3329
|
componentDidLoad() {
|
|
3330
|
-
|
|
3330
|
+
d("nylas-event-limits", "componentDidLoad"), fa(["inputs"], this.el);
|
|
3331
3331
|
}
|
|
3332
3332
|
disconnectedCallback() {
|
|
3333
|
-
|
|
3333
|
+
d("nylas-event-limits", "disconnectedCallback");
|
|
3334
3334
|
}
|
|
3335
3335
|
render() {
|
|
3336
|
-
return i(O, { key: "55aa3f8056c94943e6c6d3586dbd6ef1cf6b341d" }, i("nylas-form-card", { key: "9c8447aca415e05387da72b42ef19920eb9fdfc6", exportparts: "nfc__header: nel__header" }, i("h1", { key: "7ce1d22ea30b7ee2c233388395afdbfd74addff7", slot: "header-title", class: "nylas-event-limits__title" },
|
|
3336
|
+
return i(O, { key: "55aa3f8056c94943e6c6d3586dbd6ef1cf6b341d" }, i("nylas-form-card", { key: "9c8447aca415e05387da72b42ef19920eb9fdfc6", exportparts: "nfc__header: nel__header" }, i("h1", { key: "7ce1d22ea30b7ee2c233388395afdbfd74addff7", slot: "header-title", class: "nylas-event-limits__title" }, c.t("nylasEventLimits.headerTitle")), i("div", { key: "1e5e870fd33c10751694b5690381f8827e91725c", slot: "content", class: "nylas-event-limits__content" }, i("slot", { key: "44c884363860d449efaa5a394ad73e91d6d3a8fa", name: "inputs" }))));
|
|
3337
3337
|
}
|
|
3338
3338
|
static get formAssociated() {
|
|
3339
3339
|
return !0;
|
|
@@ -3348,7 +3348,7 @@ const ja = class {
|
|
|
3348
3348
|
}
|
|
3349
3349
|
};
|
|
3350
3350
|
Bl([
|
|
3351
|
-
|
|
3351
|
+
D({
|
|
3352
3352
|
name: "nylas-event-limits",
|
|
3353
3353
|
stateToProps: /* @__PURE__ */ new Map([["schedulerConfig.selectedLanguage", "selectedLanguage"]]),
|
|
3354
3354
|
eventToProps: {},
|
|
@@ -3361,12 +3361,12 @@ Bl([
|
|
|
3361
3361
|
ja.style = zl;
|
|
3362
3362
|
const jl = ':host{--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff}.nylas-limit-future-bookings{display:flex;justify-content:space-between;font-family:var(--nylas-font-family)}@media screen and (max-width: 768px){.nylas-limit-future-bookings{flex-direction:column;gap:0.5rem}}.nylas-limit-future-bookings label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:16px;font-style:normal;font-weight:400;line-height:150%;}.nylas-limit-future-bookings label span.label-icon{margin-left:4px}.nylas-limit-future-bookings label span.label-icon tooltip-component{display:flex}select-dropdown::part(sd_dropdown-button){border:none}', Wl = jl;
|
|
3363
3363
|
var Ul = function(e, n, a, t) {
|
|
3364
|
-
var o = arguments.length, l = o < 3 ? n : t === null ? t = Object.getOwnPropertyDescriptor(n, a) : t,
|
|
3364
|
+
var o = arguments.length, l = o < 3 ? n : t === null ? t = Object.getOwnPropertyDescriptor(n, a) : t, r;
|
|
3365
3365
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
3366
3366
|
l = Reflect.decorate(e, n, a, t);
|
|
3367
3367
|
else
|
|
3368
|
-
for (var
|
|
3369
|
-
(
|
|
3368
|
+
for (var s = e.length - 1; s >= 0; s--)
|
|
3369
|
+
(r = e[s]) && (l = (o < 3 ? r(l) : o > 3 ? r(n, a, l) : r(n, a)) || l);
|
|
3370
3370
|
return o > 3 && l && Object.defineProperty(n, a, l), l;
|
|
3371
3371
|
}, Hn = function(e, n) {
|
|
3372
3372
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
@@ -3377,7 +3377,7 @@ const Wa = class {
|
|
|
3377
3377
|
x(this, e), this.valueChanged = S(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.selectedConfiguration = void 0, this.availableDaysInFuture = void 0, this.name = "limit-future-bookings", this.selectedLanguage = void 0, this.selectedNumber = void 0, this.selectedPeriod = void 0;
|
|
3378
3378
|
}
|
|
3379
3379
|
elementNameChangedHandler(e) {
|
|
3380
|
-
|
|
3380
|
+
d("nylas-limit-future-bookings", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
3381
3381
|
}
|
|
3382
3382
|
selectedConfigurationChangedHandler(e) {
|
|
3383
3383
|
var a;
|
|
@@ -3385,19 +3385,19 @@ const Wa = class {
|
|
|
3385
3385
|
n && this.updateNumberAndPeriodFromDays(n), typeof this.internals.setFormValue == "function" && this.internals.setFormValue(n == null ? void 0 : n.toString(), this.name);
|
|
3386
3386
|
}
|
|
3387
3387
|
selectedLanguageChangedHandler(e, n) {
|
|
3388
|
-
e !== n &&
|
|
3388
|
+
e !== n && c.changeLanguage(e);
|
|
3389
3389
|
}
|
|
3390
3390
|
connectedCallback() {
|
|
3391
|
-
|
|
3391
|
+
d("nylas-limit-future-bookings", "connectedCallback");
|
|
3392
3392
|
}
|
|
3393
3393
|
componentWillLoad() {
|
|
3394
|
-
|
|
3394
|
+
d("nylas-limit-future-bookings", "componentWillLoad"), this.host.setAttribute("name", this.name);
|
|
3395
3395
|
}
|
|
3396
3396
|
componentDidLoad() {
|
|
3397
|
-
|
|
3397
|
+
d("nylas-limit-future-bookings", "componentDidLoad"), this.selectedConfiguration ? this.selectedConfigurationChangedHandler(this.selectedConfiguration) : this.updateNumberAndPeriodFromDays(this.availableDaysInFuture || 1);
|
|
3398
3398
|
}
|
|
3399
3399
|
disconnectedCallback() {
|
|
3400
|
-
|
|
3400
|
+
d("nylas-limit-future-bookings", "disconnectedCallback");
|
|
3401
3401
|
}
|
|
3402
3402
|
timePeriodChangedHandler(e) {
|
|
3403
3403
|
const { number: n, period: a } = e.detail;
|
|
@@ -3410,10 +3410,10 @@ const Wa = class {
|
|
|
3410
3410
|
}
|
|
3411
3411
|
render() {
|
|
3412
3412
|
const e = typeof this.selectedNumber == "number" && typeof this.selectedPeriod == "string";
|
|
3413
|
-
return i(O, { key: "8221f933532a38bdfc81a2ff8f60323086a6ad9d" }, i("div", { key: "8b35407fd6b210f0e0c78a531e4389b5396c6916", class: "nylas-limit-future-bookings", part: "nlfb" }, i("label", { key: "4ecb5b9fa899977d3d0cc859fdbacae76b10f052" },
|
|
3414
|
-
{ value: "day", label:
|
|
3415
|
-
{ value: "week", label:
|
|
3416
|
-
{ value: "month", label:
|
|
3413
|
+
return i(O, { key: "8221f933532a38bdfc81a2ff8f60323086a6ad9d" }, i("div", { key: "8b35407fd6b210f0e0c78a531e4389b5396c6916", class: "nylas-limit-future-bookings", part: "nlfb" }, i("label", { key: "4ecb5b9fa899977d3d0cc859fdbacae76b10f052" }, c.t("nylasLimitFutureBookings.headerTitle"), i("span", { key: "6befc7d1bd356152b641fe866957dadd6b5fd028", class: "label-icon" }, i("tooltip-component", { key: "9fcfb7a3a7d4a9b37d9e9ac209823528800ebd9a" }, i("info-icon", { key: "4befbc048bc024b26864261e7762a487c5553218", slot: "tooltip-icon" }), i("span", { key: "8de1d3a29453d93531c7197966e979f80a317e10", slot: "tooltip-content" }, c.t("nylasLimitFutureBookings.tooltip.desc"))))), e && i("time-period-selector", { id: "limit-future-bookings", timePeriods: [
|
|
3414
|
+
{ value: "day", label: c.t("timePeriod", { context: "day" }) },
|
|
3415
|
+
{ value: "week", label: c.t("timePeriod", { context: "week" }) },
|
|
3416
|
+
{ value: "month", label: c.t("timePeriod", { context: "month" }) }
|
|
3417
3417
|
], exportparts: "tps__number-dropdown: nlfb__number-dropdown, tps__number-dropdown-button: nlfb__number-dropdown-button, tps__number-dropdown-content: nlfb__number-dropdown-content, tps__period-dropdown: nlfb__period-dropdown, tps__period-dropdown-button: nlfb__period-dropdown-button, tps__period-dropdown-content: nlfb__period-dropdown-content", defaultSelectedNumber: this.selectedNumber, defaultSelectedPeriod: this.selectedPeriod })));
|
|
3418
3418
|
}
|
|
3419
3419
|
static get formAssociated() {
|
|
@@ -3431,7 +3431,7 @@ const Wa = class {
|
|
|
3431
3431
|
}
|
|
3432
3432
|
};
|
|
3433
3433
|
Ul([
|
|
3434
|
-
|
|
3434
|
+
D({
|
|
3435
3435
|
name: "nylas-limit-future-bookings",
|
|
3436
3436
|
stateToProps: /* @__PURE__ */ new Map([
|
|
3437
3437
|
["schedulerConfig.selectedConfiguration", "selectedConfiguration"],
|
|
@@ -3447,14 +3447,14 @@ Ul([
|
|
|
3447
3447
|
Wa.style = Wl;
|
|
3448
3448
|
const ql = ':host{--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff}.nylas-min-booking-notice{display:flex;justify-content:space-between;font-family:var(--nylas-font-family)}@media screen and (max-width: 768px){.nylas-min-booking-notice{flex-direction:column;gap:0.5rem}}.nylas-min-booking-notice label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:16px;font-style:normal;font-weight:400;line-height:150%;}.nylas-min-booking-notice label span.label-icon{margin-left:4px}.nylas-min-booking-notice label span.label-icon tooltip-component{display:flex}select-dropdown::part(sd_dropdown-button){border:none}', Jl = ql;
|
|
3449
3449
|
var Gl = function(e, n, a, t) {
|
|
3450
|
-
var o = arguments.length, l = o < 3 ? n : t === null ? t = Object.getOwnPropertyDescriptor(n, a) : t,
|
|
3450
|
+
var o = arguments.length, l = o < 3 ? n : t === null ? t = Object.getOwnPropertyDescriptor(n, a) : t, r;
|
|
3451
3451
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
3452
3452
|
l = Reflect.decorate(e, n, a, t);
|
|
3453
3453
|
else
|
|
3454
|
-
for (var
|
|
3455
|
-
(
|
|
3454
|
+
for (var s = e.length - 1; s >= 0; s--)
|
|
3455
|
+
(r = e[s]) && (l = (o < 3 ? r(l) : o > 3 ? r(n, a, l) : r(n, a)) || l);
|
|
3456
3456
|
return o > 3 && l && Object.defineProperty(n, a, l), l;
|
|
3457
|
-
},
|
|
3457
|
+
}, Dn = function(e, n) {
|
|
3458
3458
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
3459
3459
|
return Reflect.metadata(e, n);
|
|
3460
3460
|
};
|
|
@@ -3463,7 +3463,7 @@ const Ua = class {
|
|
|
3463
3463
|
x(this, e), this.valueChanged = S(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.selectedConfiguration = void 0, this.name = "min-booking-notice", this.minBookingNotice = void 0, this.selectedLanguage = void 0, this.selectedNumber = void 0, this.selectedPeriod = void 0;
|
|
3464
3464
|
}
|
|
3465
3465
|
elementNameChangedHandler(e) {
|
|
3466
|
-
|
|
3466
|
+
d("nylas-min-booking-notice", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
3467
3467
|
}
|
|
3468
3468
|
selectedConfigurationChangedHandler(e) {
|
|
3469
3469
|
var a, t;
|
|
@@ -3471,37 +3471,37 @@ const Ua = class {
|
|
|
3471
3471
|
this.updateNumberAndPeriodFromMinutes(n), typeof this.internals.setFormValue == "function" && this.internals.setFormValue(n == null ? void 0 : n.toString(), this.name);
|
|
3472
3472
|
}
|
|
3473
3473
|
selectedLanguageChangedHandler(e, n) {
|
|
3474
|
-
e !== n &&
|
|
3474
|
+
e !== n && c.changeLanguage(e);
|
|
3475
3475
|
}
|
|
3476
3476
|
connectedCallback() {
|
|
3477
|
-
|
|
3477
|
+
d("nylas-min-booking-notice", "connectedCallback");
|
|
3478
3478
|
}
|
|
3479
3479
|
componentWillLoad() {
|
|
3480
|
-
|
|
3480
|
+
d("nylas-min-booking-notice", "componentWillLoad"), this.host.setAttribute("name", this.name);
|
|
3481
3481
|
}
|
|
3482
3482
|
componentDidLoad() {
|
|
3483
|
-
|
|
3483
|
+
d("nylas-min-booking-notice", "componentDidLoad"), this.selectedConfiguration ? this.selectedConfigurationChangedHandler(this.selectedConfiguration) : this.updateNumberAndPeriodFromMinutes(this.minBookingNotice || 1);
|
|
3484
3484
|
}
|
|
3485
3485
|
disconnectedCallback() {
|
|
3486
|
-
|
|
3486
|
+
d("nylas-min-booking-notice", "disconnectedCallback");
|
|
3487
3487
|
}
|
|
3488
3488
|
timePeriodChangedHandler(e) {
|
|
3489
3489
|
const { number: n, period: a } = e.detail;
|
|
3490
3490
|
let t;
|
|
3491
|
-
const o = 60, l = o * 24,
|
|
3492
|
-
a === "minute" ? t = n : a === "hour" ? t = n * o : a === "day" ? t = n * l : a === "week" ? t = n *
|
|
3491
|
+
const o = 60, l = o * 24, r = l * 7, s = l * 30;
|
|
3492
|
+
a === "minute" ? t = n : a === "hour" ? t = n * o : a === "day" ? t = n * l : a === "week" ? t = n * r : a === "month" ? t = n * s : t = 0, this.valueChanged.emit({ value: t, name: this.name }), typeof this.internals.setFormValue == "function" && this.internals.setFormValue(t.toString(), this.name);
|
|
3493
3493
|
}
|
|
3494
3494
|
updateNumberAndPeriodFromMinutes(e) {
|
|
3495
|
-
let l,
|
|
3496
|
-
e === 0 ? (l = 0,
|
|
3495
|
+
let l, r;
|
|
3496
|
+
e === 0 ? (l = 0, r = "minute") : e >= 43200 && e % 43200 === 0 ? (l = Math.floor(e / 43200), r = "month") : e >= 10080 && e % 10080 === 0 ? (l = Math.floor(e / 10080), r = "week") : e >= 1440 && e % 1440 === 0 ? (l = Math.floor(e / 1440), r = "day") : e >= 60 && e % 60 === 0 ? (l = Math.floor(e / 60), r = "hour") : (l = e, r = "minute"), this.selectedNumber = l, this.selectedPeriod = r;
|
|
3497
3497
|
}
|
|
3498
3498
|
render() {
|
|
3499
3499
|
const e = typeof this.selectedNumber == "number" && typeof this.selectedPeriod == "string";
|
|
3500
|
-
return i(O, { key: "82e8ce461e4bedcb56757764cf3036d633965689" }, i("div", { key: "a7b740ef8f1226c42bbb5cda4b2b152296a4a4fc", class: "nylas-min-booking-notice", part: "nmbn" }, i("label", { key: "8cad7e417eee3ef06a6f7269e9208ae3f02284d5" },
|
|
3501
|
-
{ value: "minute", label:
|
|
3502
|
-
{ value: "hour", label:
|
|
3503
|
-
{ value: "day", label:
|
|
3504
|
-
{ value: "week", label:
|
|
3500
|
+
return i(O, { key: "82e8ce461e4bedcb56757764cf3036d633965689" }, i("div", { key: "a7b740ef8f1226c42bbb5cda4b2b152296a4a4fc", class: "nylas-min-booking-notice", part: "nmbn" }, i("label", { key: "8cad7e417eee3ef06a6f7269e9208ae3f02284d5" }, c.t("nylasMinBookingNotice.headerTitle"), i("span", { key: "6b9262824dd82e020721e51ea0ba085b51bdb12b", class: "label-icon" }, i("tooltip-component", { key: "209364c2a20e445766e71ddf40fc864bbd64aa27" }, i("info-icon", { key: "edef52629cb74cbf1d0ba4e2a2ea9f407344976e", slot: "tooltip-icon" }), i("span", { key: "346a631408e9a060975c77343effc0133f9a0e3e", slot: "tooltip-content" }, c.t("nylasMinBookingNotice.tooltip.desc"))))), e && i("time-period-selector", { id: "min-booking-notice", exportparts: "tps__number-dropdown: nmbn__number-dropdown, tps__number-dropdown-button: nmbn__number-dropdown-button, tps__number-dropdown-content: nmbn__number-dropdown-content, tps__period-dropdown: nmbn__period-dropdown, tps__period-dropdown-button: nmbn__period-dropdown-button, tps__period-dropdown-content: nmbn__period-dropdown-content", timePeriods: [
|
|
3501
|
+
{ value: "minute", label: c.t("timeDuration", { context: "minute" }) },
|
|
3502
|
+
{ value: "hour", label: c.t("timeDuration", { context: "hour" }) },
|
|
3503
|
+
{ value: "day", label: c.t("timePeriod", { context: "day" }) },
|
|
3504
|
+
{ value: "week", label: c.t("timePeriod", { context: "week" }) }
|
|
3505
3505
|
], defaultSelectedNumber: this.selectedNumber, defaultSelectedPeriod: this.selectedPeriod })));
|
|
3506
3506
|
}
|
|
3507
3507
|
static get formAssociated() {
|
|
@@ -3519,7 +3519,7 @@ const Ua = class {
|
|
|
3519
3519
|
}
|
|
3520
3520
|
};
|
|
3521
3521
|
Gl([
|
|
3522
|
-
|
|
3522
|
+
D({
|
|
3523
3523
|
name: "nylas-min-booking-notice",
|
|
3524
3524
|
stateToProps: /* @__PURE__ */ new Map([
|
|
3525
3525
|
["schedulerConfig.selectedConfiguration", "selectedConfiguration"],
|
|
@@ -3528,21 +3528,21 @@ Gl([
|
|
|
3528
3528
|
eventToProps: {},
|
|
3529
3529
|
fireRegisterEvent: !0
|
|
3530
3530
|
}),
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
|
|
3531
|
+
Dn("design:type", Function),
|
|
3532
|
+
Dn("design:paramtypes", []),
|
|
3533
|
+
Dn("design:returntype", void 0)
|
|
3534
3534
|
], Ua.prototype, "render", null);
|
|
3535
3535
|
Ua.style = Jl;
|
|
3536
3536
|
const Zl = ':host{--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff}.nylas-min-cancellation-notice{display:flex;justify-content:space-between;font-family:var(--nylas-font-family)}@media screen and (max-width: 768px){.nylas-min-cancellation-notice{flex-direction:column;gap:0.5rem}}.nylas-min-cancellation-notice label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:16px;font-style:normal;font-weight:400;line-height:150%;}.nylas-min-cancellation-notice label span.label-icon{margin-left:4px}.nylas-min-cancellation-notice label span.label-icon tooltip-component{display:flex}select-dropdown::part(sd_dropdown-button){border:none}', Yl = Zl;
|
|
3537
3537
|
var Xl = function(e, n, a, t) {
|
|
3538
|
-
var o = arguments.length, l = o < 3 ? n : t === null ? t = Object.getOwnPropertyDescriptor(n, a) : t,
|
|
3538
|
+
var o = arguments.length, l = o < 3 ? n : t === null ? t = Object.getOwnPropertyDescriptor(n, a) : t, r;
|
|
3539
3539
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
3540
3540
|
l = Reflect.decorate(e, n, a, t);
|
|
3541
3541
|
else
|
|
3542
|
-
for (var
|
|
3543
|
-
(
|
|
3542
|
+
for (var s = e.length - 1; s >= 0; s--)
|
|
3543
|
+
(r = e[s]) && (l = (o < 3 ? r(l) : o > 3 ? r(n, a, l) : r(n, a)) || l);
|
|
3544
3544
|
return o > 3 && l && Object.defineProperty(n, a, l), l;
|
|
3545
|
-
},
|
|
3545
|
+
}, Ln = function(e, n) {
|
|
3546
3546
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
3547
3547
|
return Reflect.metadata(e, n);
|
|
3548
3548
|
};
|
|
@@ -3551,7 +3551,7 @@ const qa = class {
|
|
|
3551
3551
|
x(this, e), this.valueChanged = S(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.selectedConfiguration = void 0, this.name = "min-cancellation-notice", this.minCancellationNotice = void 0, this.selectedLanguage = void 0, this.selectedNumber = void 0, this.selectedPeriod = void 0;
|
|
3552
3552
|
}
|
|
3553
3553
|
elementNameChangedHandler(e) {
|
|
3554
|
-
|
|
3554
|
+
d("nylas-min-cancellation-notice", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
3555
3555
|
}
|
|
3556
3556
|
selectedConfigurationChangedHandler(e) {
|
|
3557
3557
|
var a, t;
|
|
@@ -3559,37 +3559,37 @@ const qa = class {
|
|
|
3559
3559
|
typeof n == "number" && this.updateNumberAndPeriodFromMinutes(n), typeof this.internals.setFormValue == "function" && this.internals.setFormValue(n == null ? void 0 : n.toString(), this.name);
|
|
3560
3560
|
}
|
|
3561
3561
|
selectedLanguageChangedHandler(e, n) {
|
|
3562
|
-
e !== n &&
|
|
3562
|
+
e !== n && c.changeLanguage(e);
|
|
3563
3563
|
}
|
|
3564
3564
|
connectedCallback() {
|
|
3565
|
-
|
|
3565
|
+
d("nylas-min-cancellation-notice", "connectedCallback");
|
|
3566
3566
|
}
|
|
3567
3567
|
componentWillLoad() {
|
|
3568
|
-
|
|
3568
|
+
d("nylas-min-cancellation-notice", "componentWillLoad"), this.host.setAttribute("name", this.name);
|
|
3569
3569
|
}
|
|
3570
3570
|
componentDidLoad() {
|
|
3571
|
-
|
|
3571
|
+
d("nylas-min-cancellation-notice", "componentDidLoad"), this.selectedConfiguration ? this.selectedConfigurationChangedHandler(this.selectedConfiguration) : this.updateNumberAndPeriodFromMinutes(this.minCancellationNotice || 0);
|
|
3572
3572
|
}
|
|
3573
3573
|
disconnectedCallback() {
|
|
3574
|
-
|
|
3574
|
+
d("nylas-min-cancellation-notice", "disconnectedCallback");
|
|
3575
3575
|
}
|
|
3576
3576
|
timePeriodChangedHandler(e) {
|
|
3577
3577
|
const { number: n, period: a } = e.detail;
|
|
3578
3578
|
let t;
|
|
3579
|
-
const o = 60, l = o * 24,
|
|
3580
|
-
a === "minute" ? t = n : a === "hour" ? t = n * o : a === "day" ? t = n * l : a === "week" ? t = n *
|
|
3579
|
+
const o = 60, l = o * 24, r = l * 7, s = l * 30;
|
|
3580
|
+
a === "minute" ? t = n : a === "hour" ? t = n * o : a === "day" ? t = n * l : a === "week" ? t = n * r : a === "month" ? t = n * s : t = 0, this.valueChanged.emit({ value: t, name: this.name }), typeof this.internals.setFormValue == "function" && this.internals.setFormValue(t.toString(), this.name);
|
|
3581
3581
|
}
|
|
3582
3582
|
updateNumberAndPeriodFromMinutes(e) {
|
|
3583
|
-
let l,
|
|
3584
|
-
e === 0 ? (l = 0,
|
|
3583
|
+
let l, r;
|
|
3584
|
+
e === 0 ? (l = 0, r = "minute") : e % 43200 === 0 && e >= 43200 ? (l = e / 43200, r = "month") : e % 10080 === 0 && e >= 10080 ? (l = e / 10080, r = "week") : e % 1440 === 0 && e >= 1440 ? (l = e / 1440, r = "day") : e % 60 === 0 && e >= 60 ? (l = e / 60, r = "hour") : (l = e, r = "minute"), this.selectedNumber = l, this.selectedPeriod = r;
|
|
3585
3585
|
}
|
|
3586
3586
|
render() {
|
|
3587
3587
|
const e = typeof this.selectedNumber == "number" && typeof this.selectedPeriod == "string";
|
|
3588
|
-
return i(O, { key: "26e4bff1673300d24fb6bc892c1bb1cde17ded02" }, i("div", { key: "5934d449056ebfb549ce260e6fc59d6e0ac17589", class: "nylas-min-cancellation-notice", part: "nmcn" }, i("label", { key: "5669707844f090c2f93fd90aca0c44a38bc5ac26" },
|
|
3589
|
-
{ value: "minute", label:
|
|
3590
|
-
{ value: "hour", label:
|
|
3591
|
-
{ value: "day", label:
|
|
3592
|
-
{ value: "week", label:
|
|
3588
|
+
return i(O, { key: "26e4bff1673300d24fb6bc892c1bb1cde17ded02" }, i("div", { key: "5934d449056ebfb549ce260e6fc59d6e0ac17589", class: "nylas-min-cancellation-notice", part: "nmcn" }, i("label", { key: "5669707844f090c2f93fd90aca0c44a38bc5ac26" }, c.t("nylasMinCancellationNotice.headerTitle"), i("span", { key: "6e43fa5c118898d369296e878102a6276a6d428e", class: "label-icon" }, i("tooltip-component", { key: "990a9c2042cece0dcadfe802bbcbf920e4aa2c12" }, i("info-icon", { key: "42f00991ae4b53ec2b36663ceeabe6a3b6d35d09", slot: "tooltip-icon" }), i("span", { key: "2417a3202b996dfe5a0598aee6e7b3c23f758bb6", slot: "tooltip-content" }, c.t("nylasMinCancellationNotice.tooltip.desc"))))), e && i("time-period-selector", { id: "min-cancellation-notice", exportparts: "tps__number-dropdown: nmcn__number-dropdown, tps__number-dropdown-button: nmcn__number-dropdown-button, tps__number-dropdown-content: nmcn__number-dropdown-content, tps__period-dropdown: nmcn__period-dropdown, tps__period-dropdown-button: nmcn__period-dropdown-button, tps__period-dropdown-content: nmcn__period-dropdown-content", timePeriods: [
|
|
3589
|
+
{ value: "minute", label: c.t("timeDuration", { context: "minute" }) },
|
|
3590
|
+
{ value: "hour", label: c.t("timeDuration", { context: "hour" }) },
|
|
3591
|
+
{ value: "day", label: c.t("timePeriod", { context: "day" }) },
|
|
3592
|
+
{ value: "week", label: c.t("timePeriod", { context: "week" }) }
|
|
3593
3593
|
], defaultSelectedNumber: this.selectedNumber, defaultSelectedPeriod: this.selectedPeriod })));
|
|
3594
3594
|
}
|
|
3595
3595
|
static get formAssociated() {
|
|
@@ -3607,7 +3607,7 @@ const qa = class {
|
|
|
3607
3607
|
}
|
|
3608
3608
|
};
|
|
3609
3609
|
Xl([
|
|
3610
|
-
|
|
3610
|
+
D({
|
|
3611
3611
|
name: "nylas-min-cancellation-notice",
|
|
3612
3612
|
stateToProps: /* @__PURE__ */ new Map([
|
|
3613
3613
|
["schedulerConfig.selectedConfiguration", "selectedConfiguration"],
|
|
@@ -3616,21 +3616,21 @@ Xl([
|
|
|
3616
3616
|
eventToProps: {},
|
|
3617
3617
|
fireRegisterEvent: !0
|
|
3618
3618
|
}),
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3619
|
+
Ln("design:type", Function),
|
|
3620
|
+
Ln("design:paramtypes", []),
|
|
3621
|
+
Ln("design:returntype", void 0)
|
|
3622
3622
|
], qa.prototype, "render", null);
|
|
3623
3623
|
qa.style = Yl;
|
|
3624
3624
|
const Kl = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff;width:inherit}.nylas-page-name{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200);text-align:left}.nylas-page-name .header{padding:1rem;display:grid;grid-template-columns:1fr auto}.nylas-page-name .header h3{border-radius:var(--nylas-border-radius-2x);margin:0;font-size:16px;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-page-name .header p{display:flex;gap:4px;align-items:center;margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.nylas-page-name .header p .required-asterisk{color:var(--nylas-error)}.nylas-page-name .header .drawer-toggle{display:flex;gap:24px;align-items:center}.nylas-page-name .header .drawer-toggle .chevron{display:flex;align-self:center;cursor:pointer}.nylas-page-name .header .drawer-toggle .chevron:hover,.nylas-page-name .header .drawer-toggle .chevron:active{color:var(--nylas-primary)}.nylas-page-name .header .drawer-toggle .chevron.open{transform:rotate(90deg)}.nylas-page-name .header .drawer-toggle .chevron.closed{transform:rotate(270deg)}.nylas-page-name .header .drawer-toggle .chevron.disabled{cursor:not-allowed;color:var(--nylas-base-300)}.nylas-page-name .header .drawer-toggle .chevron.disabled:hover{color:var(--nylas-base-300)}.nylas-page-name .nylas-page-name__body{display:grid;grid-template-columns:1fr;background-color:var(--nylas-base-25);border-radius:0 0 var(--nylas-border-radius-2x) var(--nylas-border-radius-2x);border-top:1px solid var(--nylas-base-200)}@media screen and (max-width: 768px){.nylas-page-name .nylas-page-name__body{grid-template-columns:1fr}}.nylas-page-name .nylas-page-name__body .nylas-page-name__section{padding:1rem;display:flex;flex-direction:column;gap:1rem;color:var(--nylas-base-800)}@media screen and (max-width: 768px){.nylas-page-name .nylas-page-name__body .nylas-page-name__section{border:none}}.nylas-page-name .nylas-page-name__body .nylas-page-name__section .nylas-page-name__row{display:flex;align-items:center;gap:1rem}.nylas-page-name .nylas-page-name__body .nylas-page-name__section .nylas-page-name__row label{display:flex;align-items:center}.nylas-page-name .nylas-page-name__body .nylas-page-name__section .nylas-page-name__row label span.required{color:var(--nylas-error, #cc4841)}.nylas-page-name .nylas-page-name__body .nylas-page-name__section .nylas-page-name__row p{margin:0.25rem 0 0 0;font-size:16px;font-weight:500;line-height:24px;color:var(--nylas-base-900)}.nylas-page-name .nylas-page-name__body .nylas-page-name__section .nylas-page-name__row .input-container{width:100%}.nylas-page-name .nylas-page-name__body .nylas-page-name__section .nylas-page-name__row .input-container span.error-message{color:var(--nylas-error)}.nylas-page-name .nylas-page-name__input-wrapper{display:flex;height:48px;padding-left:16px;align-items:center;gap:8px;align-self:stretch;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-300);background:var(--nylas-base-0);width:-webkit-fill-available;color:var(--nylas-base-900);font-size:16px;font-style:normal;font-weight:400;line-height:150%;width:-moz-available;width:-webkit-fill-available;display:flex;flex-direction:row;gap:0.125rem;border-radius:var(--nylas-border-radius-2x);z-index:1}.nylas-page-name .nylas-page-name__input-wrapper:focus{outline-color:var(--nylas-primary)}.nylas-page-name .nylas-page-name__input-wrapper.error{border-radius:var(--nylas-border-radius-2x);font-weight:600;border-color:var(--nylas-error);border-width:2px}.nylas-page-name .nylas-page-name__input-wrapper.error::placeholder{font-weight:400}.nylas-page-name .nylas-page-name__input-wrapper::placeholder{color:var(--nylas-base-300)}.nylas-page-name .nylas-page-name__input-wrapper.error{border:1px solid var(--nylas-error)}.nylas-page-name .nylas-page-name__input-wrapper input-component::part(ic__input){outline:none;border:none;width:100%;font-size:16px;height:auto;padding-left:0px}', Vl = Kl;
|
|
3625
3625
|
var Ql = function(e, n, a, t) {
|
|
3626
|
-
var o = arguments.length, l = o < 3 ? n : t === null ? t = Object.getOwnPropertyDescriptor(n, a) : t,
|
|
3626
|
+
var o = arguments.length, l = o < 3 ? n : t === null ? t = Object.getOwnPropertyDescriptor(n, a) : t, r;
|
|
3627
3627
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
3628
3628
|
l = Reflect.decorate(e, n, a, t);
|
|
3629
3629
|
else
|
|
3630
|
-
for (var
|
|
3631
|
-
(
|
|
3630
|
+
for (var s = e.length - 1; s >= 0; s--)
|
|
3631
|
+
(r = e[s]) && (l = (o < 3 ? r(l) : o > 3 ? r(n, a, l) : r(n, a)) || l);
|
|
3632
3632
|
return o > 3 && l && Object.defineProperty(n, a, l), l;
|
|
3633
|
-
},
|
|
3633
|
+
}, Fn = function(e, n) {
|
|
3634
3634
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
3635
3635
|
return Reflect.metadata(e, n);
|
|
3636
3636
|
};
|
|
@@ -3639,37 +3639,37 @@ const Ja = class {
|
|
|
3639
3639
|
x(this, e), this.valueChanged = S(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.selectedConfiguration = void 0, this.name = "page-name", this.pageName = void 0, this.showToggle = !0, this.isOpen = !0, this.required = !1, this.selectedLanguage = void 0, this.requirePageName = !1, this.currentPageName = void 0, this.pageNameErrorMessage = void 0;
|
|
3640
3640
|
}
|
|
3641
3641
|
connectedCallback() {
|
|
3642
|
-
|
|
3642
|
+
d("nylas-page-name", "connectedCallback");
|
|
3643
3643
|
}
|
|
3644
3644
|
disconnectedCallback() {
|
|
3645
|
-
|
|
3645
|
+
d("nylas-page-name", "disconnectedCallback");
|
|
3646
3646
|
}
|
|
3647
3647
|
componentWillLoad() {
|
|
3648
|
-
|
|
3648
|
+
d("nylas-page-name", "componentWillLoad"), this.host.setAttribute("name", this.name);
|
|
3649
3649
|
}
|
|
3650
3650
|
componentDidLoad() {
|
|
3651
|
-
|
|
3651
|
+
d("nylas-page-name", "componentDidLoad"), this.selectedConfiguration ? this.selectedConfigurationChangedHandler(this.selectedConfiguration) : this.currentPageName = this.pageName ?? "", this.isInternalsAvailable && this.internals.setFormValue(JSON.stringify(this.currentPageName), this.name);
|
|
3652
3652
|
}
|
|
3653
3653
|
componentWillUpdate() {
|
|
3654
|
-
|
|
3654
|
+
d("nylas-page-name", "componentWillUpdate");
|
|
3655
3655
|
}
|
|
3656
3656
|
componentDidUpdate() {
|
|
3657
|
-
|
|
3657
|
+
d("nylas-page-name", "componentDidUpdate");
|
|
3658
3658
|
}
|
|
3659
3659
|
componentWillRender() {
|
|
3660
|
-
|
|
3660
|
+
d("nylas-page-name", "componentWillRender");
|
|
3661
3661
|
}
|
|
3662
3662
|
componentDidRender() {
|
|
3663
|
-
|
|
3663
|
+
d("nylas-page-name", "componentDidRender");
|
|
3664
3664
|
}
|
|
3665
3665
|
elementNameChangedHandler(e) {
|
|
3666
|
-
|
|
3666
|
+
d("nylas-page-name", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
3667
3667
|
}
|
|
3668
3668
|
selectedConfigurationChangedHandler(e) {
|
|
3669
|
-
|
|
3669
|
+
d("nylas-custom-booking-flow", "selectedConfigurationChangedHandler", e), this.currentPageName = (e == null ? void 0 : e.name) ?? this.pageName ?? "", this.isInternalsAvailable && this.internals.setFormValue(JSON.stringify(this.currentPageName), this.name);
|
|
3670
3670
|
}
|
|
3671
3671
|
selectedLanguageChangedHandler(e, n) {
|
|
3672
|
-
e !== n &&
|
|
3672
|
+
e !== n && c.changeLanguage(e);
|
|
3673
3673
|
}
|
|
3674
3674
|
get isInternalsAvailable() {
|
|
3675
3675
|
return this.internals !== void 0 && typeof this.internals.setFormValue == "function" && typeof this.internals.setValidity == "function";
|
|
@@ -3677,7 +3677,7 @@ const Ja = class {
|
|
|
3677
3677
|
async nylasFormInputChangeHandler(e) {
|
|
3678
3678
|
const { name: n, value: a } = e.detail;
|
|
3679
3679
|
if (!a && this.requirePageName) {
|
|
3680
|
-
this.isInternalsAvailable && this.internals.setValidity({ customError: !0 },
|
|
3680
|
+
this.isInternalsAvailable && this.internals.setValidity({ customError: !0 }, c.t("nylasPageName.pageNameError")), this.pageNameErrorMessage = c.t("nylasPageName.pageNameError");
|
|
3681
3681
|
return;
|
|
3682
3682
|
} else
|
|
3683
3683
|
this.isInternalsAvailable && this.internals.setValidity({ customError: !1 }), this.pageNameErrorMessage = "";
|
|
@@ -3688,7 +3688,7 @@ const Ja = class {
|
|
|
3688
3688
|
}
|
|
3689
3689
|
render() {
|
|
3690
3690
|
const e = typeof this.currentPageName < "u";
|
|
3691
|
-
return i(O, { key: "48dc81f6cb19070851dec5ba6c7288f9a8c96552" }, i("div", { key: "1a544a206cf53ade88c5e3a1c3c91ca2503f0aed", class: "nylas-page-name", part: "nces" }, i("div", { key: "b0ccdb0931a83fdd9084a34debab17425377e16c", class: "header", part: "nces__header" }, i("div", { key: "5975d11765fb2c677b686066edd23c2e561e012b" }, i("h3", { key: "0432bb19ca842840ebebdb2cfdc32d1b602d2ac0" },
|
|
3691
|
+
return i(O, { key: "48dc81f6cb19070851dec5ba6c7288f9a8c96552" }, i("div", { key: "1a544a206cf53ade88c5e3a1c3c91ca2503f0aed", class: "nylas-page-name", part: "nces" }, i("div", { key: "b0ccdb0931a83fdd9084a34debab17425377e16c", class: "header", part: "nces__header" }, i("div", { key: "5975d11765fb2c677b686066edd23c2e561e012b" }, i("h3", { key: "0432bb19ca842840ebebdb2cfdc32d1b602d2ac0" }, c.t("nylasPageName.headerTitle")), i("p", { key: "294de668835f0ed720dc5aa64a6105b37ebdcb51" }, c.t("nylasPageName.headerSubTitle"), i("tooltip-component", { key: "99e9365195756044d20a656a916c97254323a0f8" }, i("info-icon", { key: "92afd20dd5eaa225da5f10f7709fe5cacdd9d6b0", slot: "tooltip-icon" }), i("span", { key: "8151a4fe52ed5a0f2872a11b69e2a7aa7955583a", slot: "tooltip-content" }, c.t("nylasPageName.tooltip.desc"))), this.requirePageName && i("span", { class: "required-asterisk" }, "*"))), this.showToggle && i("div", { class: "drawer-toggle", part: "nces__drawer-toggle--container" }, i("span", { class: `chevron ${this.isOpen ? "open" : "closed"} `, onClick: () => this.toggleDrawer() }, i("chevron-icon", { width: "24", height: "24" })))), this.isOpen && i("div", { class: "nylas-page-name__body", part: "nces__body" }, i("div", { class: "nylas-page-name__section" }, i("div", { class: "nylas-page-name__row" }, i("div", { class: "input-container" }, i("div", { class: { "nylas-page-name__input-wrapper": !0, error: !!this.pageNameErrorMessage } }, e && i("input-component", { name: "page-name", id: "page-name", type: "text", required: !1, exportparts: "ic_input: npn__input-textfield", defaultValue: this.currentPageName ?? "" })), this.pageNameErrorMessage && i("span", { class: "error-message" }, this.pageNameErrorMessage)))))));
|
|
3692
3692
|
}
|
|
3693
3693
|
static get formAssociated() {
|
|
3694
3694
|
return !0;
|
|
@@ -3705,7 +3705,7 @@ const Ja = class {
|
|
|
3705
3705
|
}
|
|
3706
3706
|
};
|
|
3707
3707
|
Ql([
|
|
3708
|
-
|
|
3708
|
+
D({
|
|
3709
3709
|
name: "nylas-page-name",
|
|
3710
3710
|
stateToProps: /* @__PURE__ */ new Map([
|
|
3711
3711
|
["schedulerConfig.selectedConfiguration", "selectedConfiguration"],
|
|
@@ -3719,21 +3719,21 @@ Ql([
|
|
|
3719
3719
|
},
|
|
3720
3720
|
fireRegisterEvent: !0
|
|
3721
3721
|
}),
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3722
|
+
Fn("design:type", Function),
|
|
3723
|
+
Fn("design:paramtypes", []),
|
|
3724
|
+
Fn("design:returntype", void 0)
|
|
3725
3725
|
], Ja.prototype, "render", null);
|
|
3726
3726
|
Ja.style = Vl;
|
|
3727
3727
|
const eo = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff;width:inherit}.nylas-page-styling{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200);text-align:left}.nylas-page-styling .hidden{display:none}.nylas-page-styling.no-border{border:none}.nylas-page-styling .header{padding:1rem;display:grid;grid-template-columns:1fr auto;border-bottom:1px solid var(--nylas-base-200)}.nylas-page-styling .header h3{border-radius:var(--nylas-border-radius-2x);margin:0;font-size:16px;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-page-styling .header p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.nylas-page-styling .header .drawer-toggle{display:flex;gap:24px;align-items:center}.nylas-page-styling .header .drawer-toggle .chevron{display:flex;align-self:center;cursor:pointer}.nylas-page-styling .header .drawer-toggle .chevron:hover,.nylas-page-styling .header .drawer-toggle .chevron:active{color:var(--nylas-primary)}.nylas-page-styling .header .drawer-toggle .chevron.open{transform:rotate(90deg)}.nylas-page-styling .header .drawer-toggle .chevron.closed{transform:rotate(270deg)}.nylas-page-styling .header .drawer-toggle .chevron.disabled{cursor:not-allowed;color:var(--nylas-base-300)}.nylas-page-styling .header .drawer-toggle .chevron.disabled:hover{color:var(--nylas-base-300)}.nylas-page-styling .nylas-page-styling__body{display:grid;grid-template-columns:1fr auto;background-color:var(--nylas-base-25);border-radius:0 0 var(--nylas-border-radius-2x)}@media screen and (max-width: 768px){.nylas-page-styling .nylas-page-styling__body{grid-template-columns:1fr}}.nylas-page-styling .nylas-page-styling__body .nylas-page-styling__section{padding:1rem;display:flex;flex-direction:column;gap:1rem;color:var(--nylas-base-800)}.nylas-page-styling .nylas-page-styling__body .nylas-page-styling__section.no-padding{padding:0}@media screen and (max-width: 768px){.nylas-page-styling .nylas-page-styling__body .nylas-page-styling__section{border:none}}.nylas-page-styling .nylas-page-styling__body .nylas-page-styling__section .nylas-page-styling__row{display:grid;grid-template-columns:1fr;align-items:center}.nylas-page-styling .nylas-page-styling__body .nylas-page-styling__section .nylas-page-styling__row label{display:flex;align-items:center}.nylas-page-styling .nylas-page-styling__body .nylas-page-styling__section .nylas-page-styling__row label span.required{color:var(--nylas-error, #cc4841)}.nylas-page-styling .nylas-page-styling__body .nylas-page-styling__section .nylas-page-styling__row label span.label-icon{margin-left:4px}.nylas-page-styling .nylas-page-styling__body .nylas-page-styling__section .nylas-page-styling__row label span.label-icon tooltip-component{display:flex}.nylas-page-styling .nylas-page-styling__body .nylas-page-styling__section .nylas-page-styling__row p{margin:0.25rem 0 0 0;font-size:16px;font-weight:500;line-height:24px;color:var(--nylas-base-900)}.nylas-page-styling .nylas-page-styling__body .nylas-page-styling__section .nylas-page-styling__row .subsection{display:flex;flex-direction:column;gap:1rem}.nylas-page-styling .nylas-page-styling__body .nylas-page-styling__section .nylas-page-styling__row .subsection.hide{display:none}.nylas-page-styling .nylas-page-styling__body .nylas-page-styling__section .nylas-page-styling__row .subsection h3{margin:0;font-size:16px;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-page-styling .nylas-page-styling__body .nylas-page-styling__section .nylas-page-styling__row .subsection .input-container,.nylas-page-styling .nylas-page-styling__body .nylas-page-styling__section .nylas-page-styling__row .subsection>*{display:flex;flex-direction:column;column-gap:2rem;row-gap:0.25rem;width:100%;flex:1}.nylas-page-styling .nylas-page-styling__body .nylas-page-styling__section .nylas-page-styling__row .subsection .input-container textarea,.nylas-page-styling .nylas-page-styling__body .nylas-page-styling__section .nylas-page-styling__row .subsection>* 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-page-styling .nylas-page-styling__body span.error-message{color:var(--nylas-error)}.nylas-page-styling .nylas-page-styling__body span.help-text{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}', no = eo;
|
|
3728
3728
|
var ao = function(e, n, a, t) {
|
|
3729
|
-
var o = arguments.length, l = o < 3 ? n : t === null ? t = Object.getOwnPropertyDescriptor(n, a) : t,
|
|
3729
|
+
var o = arguments.length, l = o < 3 ? n : t === null ? t = Object.getOwnPropertyDescriptor(n, a) : t, r;
|
|
3730
3730
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
3731
3731
|
l = Reflect.decorate(e, n, a, t);
|
|
3732
3732
|
else
|
|
3733
|
-
for (var
|
|
3734
|
-
(
|
|
3733
|
+
for (var s = e.length - 1; s >= 0; s--)
|
|
3734
|
+
(r = e[s]) && (l = (o < 3 ? r(l) : o > 3 ? r(n, a, l) : r(n, a)) || l);
|
|
3735
3735
|
return o > 3 && l && Object.defineProperty(n, a, l), l;
|
|
3736
|
-
},
|
|
3736
|
+
}, In = function(e, n) {
|
|
3737
3737
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
3738
3738
|
return Reflect.metadata(e, n);
|
|
3739
3739
|
};
|
|
@@ -3742,37 +3742,37 @@ const Ga = class {
|
|
|
3742
3742
|
x(this, e), this.valueChanged = S(this, "valueChanged", 7), this.bookingFormSubmitted = S(this, "bookingFormSubmitted", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.selectedConfiguration = void 0, this.name = "page-styling", this.appearance = void 0, this.isOpen = !0, this.selectedLanguage = void 0, this.currentAppearance = void 0, this.customInputsSlot = null;
|
|
3743
3743
|
}
|
|
3744
3744
|
connectedCallback() {
|
|
3745
|
-
|
|
3745
|
+
d("nylas-page-styling", "connectedCallback");
|
|
3746
3746
|
}
|
|
3747
3747
|
disconnectedCallback() {
|
|
3748
|
-
|
|
3748
|
+
d("nylas-page-styling", "disconnectedCallback");
|
|
3749
3749
|
}
|
|
3750
3750
|
componentWillLoad() {
|
|
3751
|
-
|
|
3751
|
+
d("nylas-page-styling", "componentWillLoad"), this.host.setAttribute("name", this.name);
|
|
3752
3752
|
}
|
|
3753
3753
|
componentDidLoad() {
|
|
3754
|
-
|
|
3754
|
+
d("nylas-page-styling", "componentDidLoad"), this.selectedConfiguration && this.selectedConfigurationChangedHandler(this.selectedConfiguration);
|
|
3755
3755
|
}
|
|
3756
3756
|
componentWillUpdate() {
|
|
3757
|
-
|
|
3757
|
+
d("nylas-page-styling", "componentWillUpdate");
|
|
3758
3758
|
}
|
|
3759
3759
|
componentDidUpdate() {
|
|
3760
|
-
|
|
3760
|
+
d("nylas-page-styling", "componentDidUpdate");
|
|
3761
3761
|
}
|
|
3762
3762
|
componentWillRender() {
|
|
3763
|
-
|
|
3763
|
+
d("nylas-page-styling", "componentWillRender");
|
|
3764
3764
|
}
|
|
3765
3765
|
componentDidRender() {
|
|
3766
|
-
|
|
3766
|
+
d("nylas-page-styling", "componentDidRender");
|
|
3767
3767
|
}
|
|
3768
3768
|
elementNameChangedHandler(e) {
|
|
3769
|
-
|
|
3769
|
+
d("nylas-page-styling", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
3770
3770
|
}
|
|
3771
3771
|
selectedLanguageChangedHandler(e, n) {
|
|
3772
|
-
e !== n &&
|
|
3772
|
+
e !== n && c.changeLanguage(e);
|
|
3773
3773
|
}
|
|
3774
3774
|
customInputsSlotChangedHandler(e) {
|
|
3775
|
-
|
|
3775
|
+
d("nylas-page-styling", "customInputsSlotChangedHandler", e);
|
|
3776
3776
|
const n = this.currentAppearance;
|
|
3777
3777
|
function a(t) {
|
|
3778
3778
|
if (t.hasAttribute && t.hasAttribute("name")) {
|
|
@@ -3786,8 +3786,8 @@ const Ga = class {
|
|
|
3786
3786
|
else if (l === "color-picker")
|
|
3787
3787
|
t.setAttribute("default-selected-color", n[o]);
|
|
3788
3788
|
else if (l === "select-dropdown") {
|
|
3789
|
-
const
|
|
3790
|
-
t.setAttribute("default-selected-option", JSON.stringify(
|
|
3789
|
+
const r = t.getAttribute("options"), s = r ? JSON.parse(r).find((f) => f.value === n[o]) : null;
|
|
3790
|
+
t.setAttribute("default-selected-option", JSON.stringify(s));
|
|
3791
3791
|
} else
|
|
3792
3792
|
l === "image-url" ? t.setAttribute("image-url", n[o]) : t.setAttribute("default-value", n[o]);
|
|
3793
3793
|
}
|
|
@@ -3806,8 +3806,8 @@ const Ga = class {
|
|
|
3806
3806
|
try {
|
|
3807
3807
|
const l = JSON.parse(o);
|
|
3808
3808
|
if (n.options = l, a === "select-dropdown" && t && t in this.currentAppearance) {
|
|
3809
|
-
const
|
|
3810
|
-
n.setAttribute("default-selected-option", JSON.stringify(
|
|
3809
|
+
const r = l.find((s) => s.value === this.currentAppearance[t]);
|
|
3810
|
+
n.setAttribute("default-selected-option", JSON.stringify(r));
|
|
3811
3811
|
}
|
|
3812
3812
|
} catch (l) {
|
|
3813
3813
|
console.error("Error parsing options", l);
|
|
@@ -3824,9 +3824,9 @@ const Ga = class {
|
|
|
3824
3824
|
}), n;
|
|
3825
3825
|
}
|
|
3826
3826
|
selectedConfigurationChangedHandler(e) {
|
|
3827
|
-
var
|
|
3828
|
-
|
|
3829
|
-
const n = document.querySelector("nylas-scheduler-editor"), a = (
|
|
3827
|
+
var s, f;
|
|
3828
|
+
d("nylas-page-styling", "selectedConfigurationChangedHandler", e), this.currentAppearance = (e == null ? void 0 : e.appearance) || {};
|
|
3829
|
+
const n = document.querySelector("nylas-scheduler-editor"), a = (s = n == null ? void 0 : n.shadowRoot) == null ? void 0 : s.querySelector('slot[name="custom-page-style-inputs"]');
|
|
3830
3830
|
if (!a)
|
|
3831
3831
|
return;
|
|
3832
3832
|
const t = document.createElement("div"), o = a == null ? void 0 : a.assignedElements({ flatten: !0 });
|
|
@@ -3834,9 +3834,9 @@ const Ga = class {
|
|
|
3834
3834
|
const u = this.cloneAndCopyProps(y);
|
|
3835
3835
|
this.customInputsSlotChangedHandler(u), t.appendChild(u);
|
|
3836
3836
|
});
|
|
3837
|
-
const l = (f = this.host.shadowRoot) == null ? void 0 : f.querySelector(".nylas-page-styling"),
|
|
3838
|
-
|
|
3839
|
-
|
|
3837
|
+
const l = (f = this.host.shadowRoot) == null ? void 0 : f.querySelector(".nylas-page-styling"), r = l == null ? void 0 : l.querySelector(".nylas-page-styling__body .subsection");
|
|
3838
|
+
r && (r.innerHTML = "", t.childNodes.forEach((y) => {
|
|
3839
|
+
r.appendChild(y);
|
|
3840
3840
|
}), this.customInputsSlot = t);
|
|
3841
3841
|
}
|
|
3842
3842
|
checkIfElementIsInSlot(e) {
|
|
@@ -3864,12 +3864,12 @@ const Ga = class {
|
|
|
3864
3864
|
}
|
|
3865
3865
|
}
|
|
3866
3866
|
nylasFormDropdownChangedHandler(e) {
|
|
3867
|
-
|
|
3867
|
+
d("nylas-page-styling", "nylasFormDropdownChangedHandler", e.detail);
|
|
3868
3868
|
const { value: n, name: a } = e.detail;
|
|
3869
3869
|
this.checkIfElementIsInSlot(a) && (a === "color" ? this.currentAppearance = { ...this.currentAppearance, color: n } : this.currentAppearance = { ...this.currentAppearance, [a]: n }, this.updateConfirmationFormValue());
|
|
3870
3870
|
}
|
|
3871
3871
|
valueChangedHandler(e) {
|
|
3872
|
-
|
|
3872
|
+
d("nylas-page-styling", "valueChangedHandler", e.detail);
|
|
3873
3873
|
const { value: n, name: a } = e.detail;
|
|
3874
3874
|
this.checkIfElementIsInSlot(a) && (this.currentAppearance = { ...this.currentAppearance, [a]: n }, this.updateConfirmationFormValue(!1));
|
|
3875
3875
|
}
|
|
@@ -3882,13 +3882,13 @@ const Ga = class {
|
|
|
3882
3882
|
this.checkIfElementIsInSlot(a) && (this.currentAppearance = { ...this.currentAppearance, [a]: n }, this.updateConfirmationFormValue());
|
|
3883
3883
|
}
|
|
3884
3884
|
updateConfirmationFormValue(e = !0) {
|
|
3885
|
-
|
|
3885
|
+
d("nylas-page-styling", "updateConfirmationFormValue"), this.internals.setFormValue(JSON.stringify(this.currentAppearance), this.name), e && this.valueChanged.emit({ value: JSON.stringify(this.currentAppearance), name: this.name });
|
|
3886
3886
|
}
|
|
3887
3887
|
toggleConfirmationEmail() {
|
|
3888
3888
|
this.isOpen = !this.isOpen;
|
|
3889
3889
|
}
|
|
3890
3890
|
render() {
|
|
3891
|
-
return i(O, { key: "a2e2afc8af6ace07e0aee58b55b2ff98804902f4" }, i("div", { key: "8e52ba854d6645abcff00e1785d884b979144ad9", part: "nps", class: { "nylas-page-styling": !0, "no-border": !this.customInputsSlot } }, this.customInputsSlot ? i("div", { class: "header", part: "nps__header" }, i("div", null, i("h3", null,
|
|
3891
|
+
return i(O, { key: "a2e2afc8af6ace07e0aee58b55b2ff98804902f4" }, i("div", { key: "8e52ba854d6645abcff00e1785d884b979144ad9", part: "nps", class: { "nylas-page-styling": !0, "no-border": !this.customInputsSlot } }, this.customInputsSlot ? i("div", { class: "header", part: "nps__header" }, i("div", null, i("h3", null, c.t("nylasPageStyling.headerTitle"))), i("div", { class: "drawer-toggle", part: "nps__drawer-toggle--container" }, i("span", { class: `chevron ${this.isOpen ? "open" : "closed"} `, onClick: () => this.toggleConfirmationEmail() }, i("chevron-icon", { width: "24", height: "24" })))) : null, i("div", { key: "429cdb734583f5cc542a3604a8066afb740bfbac", class: "hidden" }, i("input-color-picker", { key: "c0e506aa822d0d6a8c4f9e8676161d98a8a37191", name: "color-picker" })), i("div", { key: "b5549e43ff51e0d141beec0180befeea0a31e307", id: "nylas-page-styling__body", class: "nylas-page-styling__body", part: "nps__body" }, i("div", { key: "c84050ea2848dc0c58ff9574e2fd57feab38a4db", class: { "nylas-page-styling__section": !0, "no-padding": !this.customInputsSlot } }, i("div", { key: "909faf8dc17b58f49a5b3f7783d3b1d9b6fbe283", class: "nylas-page-styling__row" }, i("div", { key: "ea673d1ba6f04eb25ba3a6b9898f23bde10a5749", class: { subsection: !0, hide: !this.isOpen } }))))));
|
|
3892
3892
|
}
|
|
3893
3893
|
static get formAssociated() {
|
|
3894
3894
|
return !0;
|
|
@@ -3905,7 +3905,7 @@ const Ga = class {
|
|
|
3905
3905
|
}
|
|
3906
3906
|
};
|
|
3907
3907
|
ao([
|
|
3908
|
-
|
|
3908
|
+
D({
|
|
3909
3909
|
name: "nylas-page-styling",
|
|
3910
3910
|
stateToProps: /* @__PURE__ */ new Map([
|
|
3911
3911
|
["schedulerConfig.selectedConfiguration", "selectedConfiguration"],
|
|
@@ -3919,19 +3919,19 @@ ao([
|
|
|
3919
3919
|
},
|
|
3920
3920
|
fireRegisterEvent: !0
|
|
3921
3921
|
}),
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3922
|
+
In("design:type", Function),
|
|
3923
|
+
In("design:paramtypes", []),
|
|
3924
|
+
In("design:returntype", void 0)
|
|
3925
3925
|
], Ga.prototype, "render", null);
|
|
3926
3926
|
Ga.style = no;
|
|
3927
3927
|
const to = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff;width:inherit}.nylas-participant-booking-calendars{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200)}.nylas-participant-booking-calendars .header{padding:1rem}.nylas-participant-booking-calendars .header h3{margin:0;font-size:16px;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-participant-booking-calendars .header p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left;display:flex;align-items:center;gap:4px}.nylas-participant-booking-calendars .content .participant-container{padding-top:12px;border-top:1px solid var(--nylas-base-200)}.nylas-participant-booking-calendars .content .participant-container .participant-title{display:flex;justify-content:space-between;align-items:center;padding:4px 16px 16px}.nylas-participant-booking-calendars .content .participant-container .participant-title p{margin:0}.nylas-participant-booking-calendars .content .participant-container .participant-title .participant-toggle{display:flex;gap:24px;align-items:center}.nylas-participant-booking-calendars .content .participant-container .participant-title .participant-toggle .chevron{display:flex;align-self:center;cursor:pointer}.nylas-participant-booking-calendars .content .participant-container .participant-title .participant-toggle .chevron:hover,.nylas-participant-booking-calendars .content .participant-container .participant-title .participant-toggle .chevron:active{color:var(--nylas-primary)}.nylas-participant-booking-calendars .content .participant-container .participant-title .participant-toggle .chevron.open{transform:rotate(90deg)}.nylas-participant-booking-calendars .content .participant-container .participant-title .participant-toggle .chevron.closed{transform:rotate(270deg)}.nylas-participant-booking-calendars .content .participant-container .participant-title .participant-toggle .chevron.disabled{cursor:not-allowed;color:var(--nylas-base-300)}.nylas-participant-booking-calendars .content .participant-container .participant-title .participant-toggle .chevron.disabled:hover{color:var(--nylas-base-300)}nylas-booking-calendar-picker::part(nbcp){margin:0;border:none;border-top:1px solid var(--nylas-base-200);border-top-right-radius:0;border-top-left-radius:0}', lo = to;
|
|
3928
3928
|
var oo = function(e, n, a, t) {
|
|
3929
|
-
var o = arguments.length, l = o < 3 ? n : t === null ? t = Object.getOwnPropertyDescriptor(n, a) : t,
|
|
3929
|
+
var o = arguments.length, l = o < 3 ? n : t === null ? t = Object.getOwnPropertyDescriptor(n, a) : t, r;
|
|
3930
3930
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
3931
3931
|
l = Reflect.decorate(e, n, a, t);
|
|
3932
3932
|
else
|
|
3933
|
-
for (var
|
|
3934
|
-
(
|
|
3933
|
+
for (var s = e.length - 1; s >= 0; s--)
|
|
3934
|
+
(r = e[s]) && (l = (o < 3 ? r(l) : o > 3 ? r(n, a, l) : r(n, a)) || l);
|
|
3935
3935
|
return o > 3 && l && Object.defineProperty(n, a, l), l;
|
|
3936
3936
|
}, Tn = function(e, n) {
|
|
3937
3937
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
@@ -3943,28 +3943,28 @@ const Za = class {
|
|
|
3943
3943
|
x(this, e), this.valueChanged = S(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.selectedConfiguration = void 0, this.name = "participant-booking-calendars", this.participants = ((n = this.selectedConfiguration) == null ? void 0 : n.participants) || [], this.calendars = void 0, this.participantOptions = void 0, this.selectedLanguage = void 0, this.selectedCalendars = this.setParticipants(this.participants), this.participantCalendars = {}, this.participantDefaultSelectedCalendar = {};
|
|
3944
3944
|
}
|
|
3945
3945
|
elementNameChangedHandler(e) {
|
|
3946
|
-
|
|
3946
|
+
d("nylas-participant-booking-calendars", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
3947
3947
|
}
|
|
3948
3948
|
calendarsChangedHandler(e) {
|
|
3949
|
-
|
|
3949
|
+
d("nylas-participant-booking-calendars", "calendarsChangedHandler", e), this.participantCalendars = this.getParticipantCalendarOptions(this.participants, this.participantOptions);
|
|
3950
3950
|
}
|
|
3951
3951
|
participantsChangedHandler(e) {
|
|
3952
|
-
|
|
3952
|
+
d("nylas-participant-booking-calendars", "participantsChangedHandler", e), this.selectedCalendars = this.setParticipants(e), this.participantCalendars = this.getParticipantCalendarOptions(e, this.participantOptions);
|
|
3953
3953
|
}
|
|
3954
3954
|
participantOptionsChangedHandler(e) {
|
|
3955
|
-
|
|
3955
|
+
d("nylas-calendar-picker", "participantOptionsChangedHandler", e), this.participantCalendars = this.getParticipantCalendarOptions(this.participants, e);
|
|
3956
3956
|
}
|
|
3957
3957
|
selectedConfigurationChangedHandler(e) {
|
|
3958
|
-
|
|
3958
|
+
d("nylas-participant-booking-calendars", "selectedConfigurationChangedHandler", e);
|
|
3959
3959
|
const n = (e == null ? void 0 : e.participants) || this.participants;
|
|
3960
3960
|
n && n.length > 0 && (this.selectedCalendars = this.setParticipants(n), this.participantCalendars = this.getParticipantCalendarOptions(n, this.participantOptions));
|
|
3961
3961
|
}
|
|
3962
3962
|
selectedLanguageChangedHandler(e, n) {
|
|
3963
|
-
e !== n &&
|
|
3963
|
+
e !== n && c.changeLanguage(e);
|
|
3964
3964
|
}
|
|
3965
3965
|
getParticipantCalendarOptions(e, n) {
|
|
3966
|
-
var l,
|
|
3967
|
-
const a = e == null ? void 0 : e.find((y) => y.is_organizer), t = {}, o = ((
|
|
3966
|
+
var l, r, s, f;
|
|
3967
|
+
const a = e == null ? void 0 : e.find((y) => y.is_organizer), t = {}, o = ((s = (r = (l = this.selectedConfiguration) == null ? void 0 : l.availability) == null ? void 0 : r.availability_rules) == null ? void 0 : s.availability_method) !== "collective";
|
|
3968
3968
|
if (n && o) {
|
|
3969
3969
|
const y = e == null ? void 0 : e.filter((p) => n.some((g) => g.email === p.email)), u = e == null ? void 0 : e.filter((p) => !n.some((g) => g.email === p.email));
|
|
3970
3970
|
y == null || y.forEach((p) => {
|
|
@@ -3983,27 +3983,27 @@ const Za = class {
|
|
|
3983
3983
|
return a && (t[a.email] = this.calendars ?? [{ id: "primary", name: a.email }], this.participantDefaultSelectedCalendar[a.email] = ((f = a == null ? void 0 : a.booking) == null ? void 0 : f.calendar_id) ?? "primary"), t;
|
|
3984
3984
|
}
|
|
3985
3985
|
connectedCallback() {
|
|
3986
|
-
|
|
3986
|
+
d("nylas-participant-booking-calendars", "connectedCallback");
|
|
3987
3987
|
}
|
|
3988
3988
|
disconnectedCallback() {
|
|
3989
|
-
|
|
3989
|
+
d("nylas-participant-booking-calendars", "disconnectedCallback");
|
|
3990
3990
|
}
|
|
3991
3991
|
componentWillLoad() {
|
|
3992
|
-
|
|
3992
|
+
d("nylas-participant-booking-calendars", "componentWillLoad");
|
|
3993
3993
|
}
|
|
3994
3994
|
componentDidLoad() {
|
|
3995
3995
|
var e, n;
|
|
3996
|
-
|
|
3996
|
+
d("nylas-participant-booking-calendars", "componentDidLoad"), this.selectedConfiguration ? (this.selectedCalendars = this.setParticipants((e = this.selectedConfiguration) == null ? void 0 : e.participants), this.participantCalendars = this.getParticipantCalendarOptions((n = this.selectedConfiguration) == null ? void 0 : n.participants, this.participantOptions)) : (this.selectedCalendars = this.setParticipants(this.participants), this.participantCalendars = this.getParticipantCalendarOptions(this.participants, this.participantOptions));
|
|
3997
3997
|
}
|
|
3998
3998
|
handleValueChanged(e) {
|
|
3999
|
-
|
|
3999
|
+
d("[nylas-editor-tabs]", "handleValueChanged", e);
|
|
4000
4000
|
const { name: n, value: a } = e.detail;
|
|
4001
4001
|
if (!n.startsWith("participant-booking-"))
|
|
4002
4002
|
return;
|
|
4003
4003
|
if (this.bookingCalendarsFormRef.checkValidity())
|
|
4004
4004
|
this.internals.setValidity({});
|
|
4005
4005
|
else {
|
|
4006
|
-
this.internals.setValidity({ customError: !0 },
|
|
4006
|
+
this.internals.setValidity({ customError: !0 }, c.t("nylasParticipantBookingCalendars.selectAtLeastOneCalendar"));
|
|
4007
4007
|
return;
|
|
4008
4008
|
}
|
|
4009
4009
|
const t = n.split("participant-booking-")[1];
|
|
@@ -4012,8 +4012,8 @@ const Za = class {
|
|
|
4012
4012
|
this.selectedCalendars[t].calendar = a, this.selectedCalendars = { ...this.selectedCalendars };
|
|
4013
4013
|
const o = {};
|
|
4014
4014
|
Object.keys(this.selectedCalendars).forEach((l) => {
|
|
4015
|
-
var
|
|
4016
|
-
o[l] = (
|
|
4015
|
+
var r;
|
|
4016
|
+
o[l] = (r = this.selectedCalendars[l]) == null ? void 0 : r.calendar;
|
|
4017
4017
|
}), this.internals.setFormValue(JSON.stringify(o), this.name), this.valueChanged.emit({ value: JSON.stringify(o), name: this.name });
|
|
4018
4018
|
}
|
|
4019
4019
|
setParticipants(e) {
|
|
@@ -4031,10 +4031,10 @@ const Za = class {
|
|
|
4031
4031
|
}), n;
|
|
4032
4032
|
}
|
|
4033
4033
|
render() {
|
|
4034
|
-
return i(O, { key: "c2b83da3995838d673c8b3ed18418e849d6b58fd" }, i("div", { key: "fb958f1c1b88541ee8ef85c96707efcb16db6510", class: "nylas-participant-booking-calendars", part: "npbc" }, i("div", { key: "f86d56b924605c56979eb702a79c30cc8a666d6d", class: "header", part: "npbc__header" }, i("h3", { key: "b31cefbc25927a25ecc3ffa07ce15f3b3ddd1987" },
|
|
4034
|
+
return i(O, { key: "c2b83da3995838d673c8b3ed18418e849d6b58fd" }, i("div", { key: "fb958f1c1b88541ee8ef85c96707efcb16db6510", class: "nylas-participant-booking-calendars", part: "npbc" }, i("div", { key: "f86d56b924605c56979eb702a79c30cc8a666d6d", class: "header", part: "npbc__header" }, i("h3", { key: "b31cefbc25927a25ecc3ffa07ce15f3b3ddd1987" }, c.t("nylasParticipantBookingCalendars.headerTitle")), i("p", { key: "f3ff6410ac9b70ff65a8227385792203fdd807a1" }, c.t("nylasParticipantBookingCalendars.headerSubTitle"))), i("div", { key: "78537bb4cd178ed8aae2b7fa2dc8c91398974954", class: "content", part: "npbc__content" }, i("form", { key: "1863572c4c4c50972eb759778d66a175065ca1bd", ref: (e) => this.bookingCalendarsFormRef = e }, this.participantCalendars && Object.keys(this.participantCalendars).map((e, n) => {
|
|
4035
4035
|
const a = this.selectedCalendars[e], t = this.participantCalendars[e];
|
|
4036
4036
|
if (!(!a || !a.name))
|
|
4037
|
-
return i("div", { class: "participant-container", part: "npbc__participant-container", key: `participant-conatiner-${n}` }, i("div", { class: "participant-title", part: "npbc__participant-title" }, i("p", null,
|
|
4037
|
+
return i("div", { class: "participant-container", part: "npbc__participant-container", key: `participant-conatiner-${n}` }, i("div", { class: "participant-title", part: "npbc__participant-title" }, i("p", null, c.t("nylasParticipantBookingCalendars.participantBookingCalendarTitle", { participantName: a.name })), i("div", { class: "participant-toggle", part: "npbc__participant-toggle-container" }, i("span", { class: `chevron ${a.isOpen ? "open" : "closed"}`, onClick: () => {
|
|
4038
4038
|
this.selectedCalendars[e].isOpen = !a.isOpen, this.selectedCalendars = { ...this.selectedCalendars };
|
|
4039
4039
|
} }, i("chevron-icon", { width: "24", height: "24" })))), a.isOpen && i("nylas-booking-calendar-picker", { key: e, name: `participant-booking-${e}`, calendars: t, hideHeader: !0, defaultBookingCalendar: this.participantDefaultSelectedCalendar[e] }));
|
|
4040
4040
|
})))));
|
|
@@ -4057,7 +4057,7 @@ const Za = class {
|
|
|
4057
4057
|
}
|
|
4058
4058
|
};
|
|
4059
4059
|
oo([
|
|
4060
|
-
|
|
4060
|
+
D({
|
|
4061
4061
|
name: "nylas-participant-booking-calendars",
|
|
4062
4062
|
stateToProps: /* @__PURE__ */ new Map([
|
|
4063
4063
|
["schedulerConfig.additionalParticipants", "participantOptions"],
|
|
@@ -4073,14 +4073,14 @@ oo([
|
|
|
4073
4073
|
Tn("design:returntype", void 0)
|
|
4074
4074
|
], Za.prototype, "render", null);
|
|
4075
4075
|
Za.style = lo;
|
|
4076
|
-
const io = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-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}.nylas-participants-custom-availability{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200)}.nylas-participants-custom-availability .header{padding:1rem}.nylas-participants-custom-availability .header h3{margin:0;font-size:16px;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-participants-custom-availability .header p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.nylas-participants-custom-availability .content .participant-container{padding-top:8px;border-top:1px solid var(--nylas-base-200)}.nylas-participants-custom-availability .content .participant-container .participant-title{display:flex;justify-content:space-between;align-items:center;padding:4px 16px 12px}.nylas-participants-custom-availability .content .participant-container .participant-title p{margin:0}.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle{display:flex;gap:24px;align-items:center}.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle .chevron{display:flex;align-self:center;cursor:pointer}.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle .chevron:hover,.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle .chevron:active{color:var(--nylas-primary)}.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle .chevron.open{transform:rotate(90deg)}.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle .chevron.closed{transform:rotate(270deg)}.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle .chevron.disabled{cursor:not-allowed;color:var(--nylas-base-300)}.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle .chevron.disabled:hover{color:var(--nylas-base-300)}.nylas-participants-custom-availability .content .participant-container nylas-availability-picker::part(nap){margin:0;border:none}',
|
|
4077
|
-
var
|
|
4078
|
-
var o = arguments.length, l = o < 3 ? n : t === null ? t = Object.getOwnPropertyDescriptor(n, a) : t,
|
|
4076
|
+
const io = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-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}.nylas-participants-custom-availability{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200)}.nylas-participants-custom-availability .header{padding:1rem}.nylas-participants-custom-availability .header h3{margin:0;font-size:16px;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-participants-custom-availability .header p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.nylas-participants-custom-availability .content .participant-container{padding-top:8px;border-top:1px solid var(--nylas-base-200)}.nylas-participants-custom-availability .content .participant-container .participant-title{display:flex;justify-content:space-between;align-items:center;padding:4px 16px 12px}.nylas-participants-custom-availability .content .participant-container .participant-title p{margin:0}.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle{display:flex;gap:24px;align-items:center}.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle .chevron{display:flex;align-self:center;cursor:pointer}.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle .chevron:hover,.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle .chevron:active{color:var(--nylas-primary)}.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle .chevron.open{transform:rotate(90deg)}.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle .chevron.closed{transform:rotate(270deg)}.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle .chevron.disabled{cursor:not-allowed;color:var(--nylas-base-300)}.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle .chevron.disabled:hover{color:var(--nylas-base-300)}.nylas-participants-custom-availability .content .participant-container nylas-availability-picker::part(nap){margin:0;border:none}', ro = io;
|
|
4077
|
+
var so = function(e, n, a, t) {
|
|
4078
|
+
var o = arguments.length, l = o < 3 ? n : t === null ? t = Object.getOwnPropertyDescriptor(n, a) : t, r;
|
|
4079
4079
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
4080
4080
|
l = Reflect.decorate(e, n, a, t);
|
|
4081
4081
|
else
|
|
4082
|
-
for (var
|
|
4083
|
-
(
|
|
4082
|
+
for (var s = e.length - 1; s >= 0; s--)
|
|
4083
|
+
(r = e[s]) && (l = (o < 3 ? r(l) : o > 3 ? r(n, a, l) : r(n, a)) || l);
|
|
4084
4084
|
return o > 3 && l && Object.defineProperty(n, a, l), l;
|
|
4085
4085
|
}, $n = function(e, n) {
|
|
4086
4086
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
@@ -4092,39 +4092,39 @@ const Ya = class {
|
|
|
4092
4092
|
x(this, e), this.valueChanged = S(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.selectedConfiguration = void 0, this.name = "participant-custom-availability", this.participants = ((n = this.selectedConfiguration) == null ? void 0 : n.participants) || [], this.selectedLanguage = void 0, this.selectedParticipants = this.setParticipants(this.participants);
|
|
4093
4093
|
}
|
|
4094
4094
|
elementNameChangedHandler(e) {
|
|
4095
|
-
|
|
4095
|
+
d("nylas-participants-custom-availability", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
4096
4096
|
}
|
|
4097
4097
|
participantsChangedHandler(e, n) {
|
|
4098
|
-
|
|
4098
|
+
d("nylas-participants-custom-availability", "participantsChangedHandler", e, n), !(!e || !n || JSON.stringify(e) === JSON.stringify(n)) && (this.selectedParticipants = this.setParticipants(e));
|
|
4099
4099
|
}
|
|
4100
4100
|
selectedConfigurationChangedHandler(e, n) {
|
|
4101
|
-
|
|
4101
|
+
d("nylas-participants-custom-availability", "selectedConfigurationChangedHandler", e, n), !(!e || !n || JSON.stringify(e) === JSON.stringify(n)) && e != null && e.participants && (this.selectedParticipants = this.setParticipants(e == null ? void 0 : e.participants));
|
|
4102
4102
|
}
|
|
4103
4103
|
selectedLanguageChangedHandler(e, n) {
|
|
4104
|
-
e !== n &&
|
|
4104
|
+
e !== n && c.changeLanguage(e);
|
|
4105
4105
|
}
|
|
4106
4106
|
connectedCallback() {
|
|
4107
|
-
|
|
4107
|
+
d("nylas-participants-custom-availability", "connectedCallback");
|
|
4108
4108
|
}
|
|
4109
4109
|
disconnectedCallback() {
|
|
4110
|
-
|
|
4110
|
+
d("nylas-participants-custom-availability", "disconnectedCallback");
|
|
4111
4111
|
}
|
|
4112
4112
|
componentWillLoad() {
|
|
4113
|
-
|
|
4113
|
+
d("nylas-participants-custom-availability", "componentWillLoad");
|
|
4114
4114
|
}
|
|
4115
4115
|
componentDidLoad() {
|
|
4116
4116
|
var e;
|
|
4117
|
-
|
|
4117
|
+
d("nylas-participants-custom-availability", "componentDidLoad"), this.selectedConfiguration ? this.selectedParticipants = this.setParticipants((e = this.selectedConfiguration) == null ? void 0 : e.participants) : this.selectedParticipants = this.setParticipants(this.participants);
|
|
4118
4118
|
}
|
|
4119
4119
|
nylasFormSwitchToggledHandler(e) {
|
|
4120
|
-
var l,
|
|
4121
|
-
|
|
4122
|
-
const n = (l = this.selectedConfiguration) == null ? void 0 : l.participants.find((N) => N.email === e.detail.name), a = ((
|
|
4120
|
+
var l, r, s, f, y, u, p, g, v, _, w, P;
|
|
4121
|
+
d("nylas-participants-custom-availability", "nylasFormSwitchToggledHandler", e.detail);
|
|
4122
|
+
const n = (l = this.selectedConfiguration) == null ? void 0 : l.participants.find((N) => N.email === e.detail.name), a = ((r = n == null ? void 0 : n.availability) == null ? void 0 : r.open_hours) || [], t = (a == null ? void 0 : a.length) > 0 ? a : ((y = (f = (s = this.selectedConfiguration) == null ? void 0 : s.availability) == null ? void 0 : f.availability_rules) == null ? void 0 : y.default_open_hours) || [], o = a && a.length > 0 ? n == null ? void 0 : n.timezone : ((_ = (v = (g = (p = (u = this.selectedConfiguration) == null ? void 0 : u.availability) == null ? void 0 : p.availability_rules) == null ? void 0 : g.default_open_hours) == null ? void 0 : v.at(0)) == null ? void 0 : _.timezone) || ((P = (w = this.selectedConfiguration) == null ? void 0 : w.event_booking) == null ? void 0 : P.timezone) || window.Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
4123
4123
|
this.selectedParticipants[e.detail.name].isOpen = e.detail.checked, this.selectedParticipants[e.detail.name].setCustom = e.detail.checked, this.selectedParticipants[e.detail.name].openHours = e.detail.checked ? (t == null ? void 0 : t.length) > 0 ? t : ya : [], this.selectedParticipants[e.detail.name].timezone = e.detail.checked ? o : void 0, this.selectedParticipants = { ...this.selectedParticipants }, this.updateFormValue();
|
|
4124
4124
|
}
|
|
4125
4125
|
handleValueChanged(e) {
|
|
4126
|
-
var
|
|
4127
|
-
|
|
4126
|
+
var s, f, y;
|
|
4127
|
+
d("[nylas-editor-tabs]", "handleValueChanged", e);
|
|
4128
4128
|
const { name: n, value: a } = e.detail;
|
|
4129
4129
|
if (!n.startsWith("participant-"))
|
|
4130
4130
|
return;
|
|
@@ -4138,8 +4138,8 @@ const Ya = class {
|
|
|
4138
4138
|
const t = JSON.parse(a), o = n.split("-")[2];
|
|
4139
4139
|
if (!this.selectedParticipants[o])
|
|
4140
4140
|
return;
|
|
4141
|
-
const l = t.openHours || [],
|
|
4142
|
-
this.selectedParticipants[o].openHours =
|
|
4141
|
+
const l = t.openHours || [], r = (l == null ? void 0 : l.length) > 0 ? l : ((y = (f = (s = this.selectedConfiguration) == null ? void 0 : s.availability) == null ? void 0 : f.availability_rules) == null ? void 0 : y.default_open_hours) || [];
|
|
4142
|
+
this.selectedParticipants[o].openHours = r, this.selectedParticipants = { ...this.selectedParticipants }, this.updateFormValue();
|
|
4143
4143
|
}
|
|
4144
4144
|
updateFormValue() {
|
|
4145
4145
|
const e = {};
|
|
@@ -4165,11 +4165,11 @@ const Ya = class {
|
|
|
4165
4165
|
return this.internals !== void 0 && typeof this.internals.setFormValue == "function" && typeof this.internals.setValidity == "function";
|
|
4166
4166
|
}
|
|
4167
4167
|
render() {
|
|
4168
|
-
return i(O, { key: "2d2837e4d4771accfd3a902dacf1eb614150fb37" }, i("div", { key: "addcacf8a1d68b173dc02ecaeb662f2eb650de52", class: "nylas-participants-custom-availability", part: "npca" }, i("div", { key: "16834714aa8b3bc29f51f03b8742fd137bf23ae0", class: "header", part: "npca__header" }, i("h3", { key: "9f30489d89e9480f713fcdddf8a981ec059a4eb5" },
|
|
4168
|
+
return i(O, { key: "2d2837e4d4771accfd3a902dacf1eb614150fb37" }, i("div", { key: "addcacf8a1d68b173dc02ecaeb662f2eb650de52", class: "nylas-participants-custom-availability", part: "npca" }, i("div", { key: "16834714aa8b3bc29f51f03b8742fd137bf23ae0", class: "header", part: "npca__header" }, i("h3", { key: "9f30489d89e9480f713fcdddf8a981ec059a4eb5" }, c.t("nylasParticipantCustomAvailability.headerTitle")), i("p", { key: "e4eab7c44d58b3257249c9e974562d7bcaf37e32" }, c.t("nylasParticipantCustomAvailability.headerSubTitle"))), i("div", { key: "dd6c6f6569a656b96ad7466c7b1378c7d332a7d6", class: "content", part: "npca__content" }, i("form", { key: "b3ddef24777b0b865808eb990c25dc863468d625", ref: (e) => this.participantFormRef = e }, Object.keys(this.selectedParticipants).map((e, n) => {
|
|
4169
4169
|
var o;
|
|
4170
4170
|
const a = this.selectedParticipants[e], t = ((o = a.availability) == null ? void 0 : o.open_hours) || [];
|
|
4171
4171
|
if (!(!a || !a.name || !a.availability))
|
|
4172
|
-
return i("div", { class: "participant-container", part: "npca__participant-container", key: `participant-conatiner-${n}` }, i("div", { class: "participant-title", part: "npca__participant-title" }, i("p", null,
|
|
4172
|
+
return i("div", { class: "participant-container", part: "npca__participant-container", key: `participant-conatiner-${n}` }, i("div", { class: "participant-title", part: "npca__participant-title" }, i("p", null, c.t("nylasParticipantCustomAvailability.participantOpenHoursTitle", { participantName: a.name })), i("div", { class: "participant-toggle", part: "npca__participant-toggle--container" }, i("toggle-switch", { exportparts: "ts_label: npca__toggle-label, ts_input: npca_toggle-input, ts_slider: npca_toggle-slider", name: e, checked: !!(a != null && a.openHours) && (a == null ? void 0 : a.openHours.length) > 0 }), i("span", { class: `chevron ${a.isOpen ? "open" : "closed"} ${a.setCustom ? "" : "disabled"}`, onClick: () => {
|
|
4173
4173
|
a.setCustom && (this.selectedParticipants[e].isOpen = !a.isOpen, this.selectedParticipants = { ...this.selectedParticipants });
|
|
4174
4174
|
} }, i("chevron-icon", { width: "24", height: "24" })))), a.isOpen && i("nylas-availability-picker", { key: n, name: `participant-${n}-${e}`, openHours: t, defaultTimezone: a.timezone, hideHeader: !0 }));
|
|
4175
4175
|
})))));
|
|
@@ -4189,8 +4189,8 @@ const Ya = class {
|
|
|
4189
4189
|
};
|
|
4190
4190
|
}
|
|
4191
4191
|
};
|
|
4192
|
-
|
|
4193
|
-
|
|
4192
|
+
so([
|
|
4193
|
+
D({
|
|
4194
4194
|
name: "nylas-participants-custom-availability",
|
|
4195
4195
|
stateToProps: /* @__PURE__ */ new Map([
|
|
4196
4196
|
["schedulerConfig.selectedConfiguration", "selectedConfiguration"],
|
|
@@ -4203,15 +4203,15 @@ ro([
|
|
|
4203
4203
|
$n("design:paramtypes", []),
|
|
4204
4204
|
$n("design:returntype", void 0)
|
|
4205
4205
|
], Ya.prototype, "render", null);
|
|
4206
|
-
Ya.style =
|
|
4206
|
+
Ya.style = ro;
|
|
4207
4207
|
const co = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff;width:inherit}.cards-container{margin-bottom:4rem}.cards-container .nylas-reminder-email{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200);text-align:left}.cards-container .nylas-reminder-email .reminder-open-close-toggle{display:flex;gap:16px}.cards-container .nylas-reminder-email .reminder-open-close-toggle .chevron{display:flex;align-self:center;cursor:pointer}.cards-container .nylas-reminder-email .reminder-open-close-toggle .chevron:hover,.cards-container .nylas-reminder-email .reminder-open-close-toggle .chevron:active{color:var(--nylas-primary)}.cards-container .nylas-reminder-email .reminder-open-close-toggle .chevron.open{transform:rotate(90deg)}.cards-container .nylas-reminder-email .reminder-open-close-toggle .chevron.closed{transform:rotate(270deg)}.cards-container .nylas-reminder-email .reminder-open-close-toggle .chevron.disabled{cursor:not-allowed;color:var(--nylas-base-300)}.cards-container .nylas-reminder-email .reminder-open-close-toggle .chevron.disabled:hover{color:var(--nylas-base-300)}.cards-container .nylas-reminder-email .header{padding:1rem;display:grid;grid-template-columns:1fr auto;border-bottom:1px solid var(--nylas-base-200)}.cards-container .nylas-reminder-email .header h3{border-radius:var(--nylas-border-radius-2x);margin:0;font-size:16px;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.cards-container .nylas-reminder-email .header p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.cards-container .nylas-reminder-email .header .confirmation-email-toggle{display:flex;gap:24px;align-items:center}.cards-container .nylas-reminder-email .header .confirmation-email-toggle .chevron{display:flex;align-self:center;cursor:pointer}.cards-container .nylas-reminder-email .header .confirmation-email-toggle .chevron:hover,.cards-container .nylas-reminder-email .header .confirmation-email-toggle .chevron:active{color:var(--nylas-primary)}.cards-container .nylas-reminder-email .header .confirmation-email-toggle .chevron.open{transform:rotate(90deg)}.cards-container .nylas-reminder-email .header .confirmation-email-toggle .chevron.closed{transform:rotate(270deg)}.cards-container .nylas-reminder-email .header .confirmation-email-toggle .chevron.disabled{cursor:not-allowed;color:var(--nylas-base-300)}.cards-container .nylas-reminder-email .header .confirmation-email-toggle .chevron.disabled:hover{color:var(--nylas-base-300)}.cards-container .nylas-reminder-email .nylas-reminder-email__body{display:grid;grid-template-columns:1fr auto;background-color:var(--nylas-base-25);border-radius:var(--nylas-border-radius-2x)}@media screen and (max-width: 768px){.cards-container .nylas-reminder-email .nylas-reminder-email__body{grid-template-columns:1fr}}.cards-container .nylas-reminder-email .nylas-reminder-email__body .nylas-reminder-email__section{padding:1rem;display:flex;flex-direction:column;gap:1rem;color:var(--nylas-base-800)}@media screen and (max-width: 768px){.cards-container .nylas-reminder-email .nylas-reminder-email__body .nylas-reminder-email__section{border:none}}.cards-container .nylas-reminder-email .nylas-reminder-email__body .nylas-reminder-email__section .nylas-reminder-email__block{display:flex;flex-direction:column;gap:0.5rem;border-top:1px solid var(--nylas-base-200);padding-top:1rem;margin-top:0.5rem}.cards-container .nylas-reminder-email .nylas-reminder-email__body .nylas-reminder-email__section .nylas-reminder-email__row{display:grid;grid-template-columns:1fr auto;align-items:center;gap:1rem}.cards-container .nylas-reminder-email .nylas-reminder-email__body .nylas-reminder-email__section .nylas-reminder-email__row.full-width-col{grid-template-columns:1fr}.cards-container .nylas-reminder-email .nylas-reminder-email__body .nylas-reminder-email__section .nylas-reminder-email__row label{display:flex;align-items:center}.cards-container .nylas-reminder-email .nylas-reminder-email__body .nylas-reminder-email__section .nylas-reminder-email__row label span.required{color:var(--nylas-error, #cc4841)}.cards-container .nylas-reminder-email .nylas-reminder-email__body .nylas-reminder-email__section .nylas-reminder-email__row label span.label-icon{margin-left:4px}.cards-container .nylas-reminder-email .nylas-reminder-email__body .nylas-reminder-email__section .nylas-reminder-email__row label span.label-icon tooltip-component{display:flex}.cards-container .nylas-reminder-email .nylas-reminder-email__body .nylas-reminder-email__section .nylas-reminder-email__row p.error-message{color:var(--nylas-error);display:flex;align-items:center}.cards-container .nylas-reminder-email .nylas-reminder-email__body .nylas-reminder-email__section .nylas-reminder-email__row p.error-message button-component button{color:blue}.cards-container .nylas-reminder-email .nylas-reminder-email__body .nylas-reminder-email__section .nylas-reminder-email__row p.error-message button-component button:hover{color:var(--nylas-primary)}.cards-container .nylas-reminder-email .nylas-reminder-email__body .nylas-reminder-email__section .nylas-reminder-email__row p{margin:0.25rem 0 0 0;font-size:16px;font-weight:500;line-height:24px;color:var(--nylas-base-900)}.cards-container .nylas-reminder-email .nylas-reminder-email__body .nylas-reminder-email__section .nylas-reminder-email__row .company-logo-container{display:flex;gap:32px;width:100%}.cards-container .nylas-reminder-email .nylas-reminder-email__body .nylas-reminder-email__section .nylas-reminder-email__row .company-logo-container .input-container{display:flex;flex-direction:column;flex:1}.cards-container .nylas-reminder-email .nylas-reminder-email__body .nylas-reminder-email__section .nylas-reminder-email__row .company-logo-container .company-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}.cards-container .nylas-reminder-email .nylas-reminder-email__body .nylas-reminder-email__section .nylas-reminder-email__row .company-logo-container .company-logo img{max-height:100%;max-width:100%;object-fit:contain;object-position:center}.cards-container .nylas-reminder-email .nylas-reminder-email__body .nylas-reminder-email__section .nylas-reminder-email__row span.selected-value{font-weight:500}.cards-container .nylas-reminder-email .nylas-reminder-email__body .nylas-reminder-email__section .subsection{display:flex;flex-direction:column;gap:1rem}.cards-container .nylas-reminder-email .nylas-reminder-email__body .nylas-reminder-email__section .subsection h3{margin:0;font-size:16px;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.cards-container .nylas-reminder-email .nylas-reminder-email__body .nylas-reminder-email__section .subsection .input-container{display:flex;flex-direction:column;gap:0.25rem}.cards-container .nylas-reminder-email .nylas-reminder-email__body .nylas-reminder-email__section .subsection .input-container 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)}.cards-container .nylas-reminder-email .nylas-reminder-email__body .nylas-reminder-email__preview{width:208px;background:var(--nylas-base-25);border-bottom-right-radius:var(--nylas-border-radius-2x)}@media screen and (max-width: 768px){.cards-container .nylas-reminder-email .nylas-reminder-email__body .nylas-reminder-email__preview{width:inherit;border-bottom-left-radius:var(--nylas-border-radius-2x)}}.cards-container .nylas-reminder-email .nylas-reminder-email__body .nylas-reminder-email__preview h4{font-size:14px;line-height:24px;color:var(--nylas-base-600);font-family:var(--nylas-font-family);font-weight:500;text-align:center;margin:0.75rem 0}.cards-container .nylas-reminder-email .nylas-reminder-email__body .nylas-reminder-email__preview .preview-container{padding:0 2rem 1rem}.cards-container .nylas-reminder-email .nylas-reminder-email__body .nylas-reminder-email__preview .preview-container .slot{background-color:transparent;border-top:1px solid var(--nylas-base-300)}.cards-container .nylas-reminder-email .nylas-reminder-email__body .nylas-reminder-email__preview .preview-container .slot.active{background-color:var(--nylas-base-100)}.cards-container .nylas-reminder-email .nylas-reminder-email__body .nylas-reminder-email__preview .preview-container .slot:last-of-type{border-bottom:1px solid var(--nylas-base-300)}.cards-container .nylas-reminder-email .nylas-reminder-email__body .nylas-reminder-email__preview .preview-container .event-slot{background-color:var(--nylas-base-600);border-top:1px solid var(--nylas-base-300)}.cards-container .nylas-reminder-email .nylas-reminder-email__body span.error-message{color:var(--nylas-error)}.cards-container .nylas-reminder-email .nylas-reminder-email__body span.help-text{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.cards-container .nylas-reminder-email .nylas-reminder-email__summary{padding:0.75rem 1rem;display:grid;grid-template-columns:auto 1fr;column-gap:1rem}.cards-container .nylas-reminder-email .nylas-reminder-email__summary p{margin:0;display:flex;align-items:center;column-gap:4px;font-size:0.875rem;font-weight:400;line-height:21px;color:var(--nylas-base-600);text-align:left}.cards-container .nylas-reminder-email .nylas-reminder-email__summary p span.summary-icon{display:flex;justify-content:center;min-width:20px}sp-divider{background-color:var(--nylas-base-200);height:1px;margin:0.25rem 0}button-component.create-reminder button{margin:1rem;width:calc(100% - 2rem)}button-component.delete-btn button{color:var(--nylas-error) !important}', fo = co;
|
|
4208
4208
|
var yo = function(e, n, a, t) {
|
|
4209
|
-
var o = arguments.length, l = o < 3 ? n : t === null ? t = Object.getOwnPropertyDescriptor(n, a) : t,
|
|
4209
|
+
var o = arguments.length, l = o < 3 ? n : t === null ? t = Object.getOwnPropertyDescriptor(n, a) : t, r;
|
|
4210
4210
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
4211
4211
|
l = Reflect.decorate(e, n, a, t);
|
|
4212
4212
|
else
|
|
4213
|
-
for (var
|
|
4214
|
-
(
|
|
4213
|
+
for (var s = e.length - 1; s >= 0; s--)
|
|
4214
|
+
(r = e[s]) && (l = (o < 3 ? r(l) : o > 3 ? r(n, a, l) : r(n, a)) || l);
|
|
4215
4215
|
return o > 3 && l && Object.defineProperty(n, a, l), l;
|
|
4216
4216
|
}, Nn = function(e, n) {
|
|
4217
4217
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
@@ -4223,60 +4223,60 @@ const Xa = class {
|
|
|
4223
4223
|
x(this, e), this.valueChanged = S(this, "valueChanged", 7), this.nylasSuggestReminderMinutes = S(this, "nylasSuggestReminderMinutes", 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.eventReminders = void 0, this.name = "reminder-overrides", this.selectedLanguage = void 0, this.reminders = ((a = (n = this.selectedConfiguration) == null ? void 0 : n.event_booking) == null ? void 0 : a.reminders) ?? ((o = (t = this.selectedConfiguration) == null ? void 0 : t.group_booking) == null ? void 0 : o.reminders) ?? this.eventReminders ?? [], this.reminderErrors = {}, this.participants = ((l = this.selectedConfiguration) == null ? void 0 : l.participants) ?? [], this.clearError = !1;
|
|
4224
4224
|
}
|
|
4225
4225
|
connectedCallback() {
|
|
4226
|
-
|
|
4226
|
+
d("nylas-reminder-emails", "connectedCallback");
|
|
4227
4227
|
}
|
|
4228
4228
|
disconnectedCallback() {
|
|
4229
|
-
|
|
4229
|
+
d("nylas-reminder-emails", "disconnectedCallback");
|
|
4230
4230
|
}
|
|
4231
4231
|
componentWillLoad() {
|
|
4232
|
-
|
|
4232
|
+
d("nylas-reminder-emails", "componentWillLoad"), this.host.setAttribute("name", this.name);
|
|
4233
4233
|
}
|
|
4234
4234
|
componentDidLoad() {
|
|
4235
|
-
|
|
4235
|
+
d("nylas-reminder-emails", "componentDidLoad"), this.selectedConfiguration ? this.selectedConfigurationChangedHandler(this.selectedConfiguration) : (this.reminders = this.eventReminders ?? [], this.updateRemindersFormValue(!1));
|
|
4236
4236
|
}
|
|
4237
4237
|
componentWillUpdate() {
|
|
4238
|
-
|
|
4238
|
+
d("nylas-reminder-emails", "componentWillUpdate");
|
|
4239
4239
|
}
|
|
4240
4240
|
componentDidUpdate() {
|
|
4241
|
-
|
|
4241
|
+
d("nylas-reminder-emails", "componentDidUpdate");
|
|
4242
4242
|
}
|
|
4243
4243
|
componentWillRender() {
|
|
4244
|
-
|
|
4244
|
+
d("nylas-reminder-emails", "componentWillRender");
|
|
4245
4245
|
}
|
|
4246
4246
|
componentDidRender() {
|
|
4247
|
-
|
|
4247
|
+
d("nylas-reminder-emails", "componentDidRender");
|
|
4248
4248
|
}
|
|
4249
4249
|
elementNameChangedHandler(e) {
|
|
4250
|
-
|
|
4250
|
+
d("nylas-reminder-emails", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
4251
4251
|
}
|
|
4252
4252
|
selectedConfigurationChangedHandler(e) {
|
|
4253
4253
|
var t, o;
|
|
4254
|
-
|
|
4254
|
+
d("nylas-reminder-emails", "selectedConfigurationChangedHandler", e);
|
|
4255
4255
|
const n = e, a = e;
|
|
4256
4256
|
this.reminders = ((t = n == null ? void 0 : n.event_booking) == null ? void 0 : t.reminders) ?? ((o = a == null ? void 0 : a.group_booking) == null ? void 0 : o.reminders) ?? [], this.participants = (n == null ? void 0 : n.participants) ?? [], this.updateRemindersFormValue(!1);
|
|
4257
4257
|
}
|
|
4258
4258
|
selectedLanguageChangedHandler(e, n) {
|
|
4259
|
-
e !== n &&
|
|
4259
|
+
e !== n && c.changeLanguage(e);
|
|
4260
4260
|
}
|
|
4261
4261
|
handleValueChanged(e) {
|
|
4262
|
-
|
|
4262
|
+
d("nylas-reminder-emails", "handleValueChanged", e);
|
|
4263
4263
|
const { name: n, value: a } = e.detail;
|
|
4264
4264
|
if (n.startsWith("reminder-time-")) {
|
|
4265
4265
|
const t = parseInt(a) % 5;
|
|
4266
4266
|
if (t !== 0) {
|
|
4267
4267
|
this.reminderErrors[n] = {
|
|
4268
|
-
error:
|
|
4268
|
+
error: c.t("nylasReminderEmails.reminderMinutesValidationError"),
|
|
4269
4269
|
suggestion: parseInt(a) + (5 - t)
|
|
4270
4270
|
}, this.reminderErrors = { ...this.reminderErrors }, this.internals.setValidity({ customError: !0 }, "Reminder time must be a multiple of 5");
|
|
4271
4271
|
return;
|
|
4272
4272
|
} else
|
|
4273
4273
|
delete this.reminderErrors[n], this.reminderErrors = { ...this.reminderErrors }, this.internals.setValidity({ customError: !1 });
|
|
4274
|
-
const [o, l] = n.split(/(\d+)/),
|
|
4275
|
-
|
|
4274
|
+
const [o, l] = n.split(/(\d+)/), r = [...this.reminders];
|
|
4275
|
+
r[l].minutes_before_event = parseInt(a), this.reminders = [...r], this.updateRemindersFormValue();
|
|
4276
4276
|
}
|
|
4277
4277
|
}
|
|
4278
4278
|
handleNylasFormDropdownChanged(e) {
|
|
4279
|
-
|
|
4279
|
+
d("nylas-reminder-emails", "handleNylasFormDropdownChanged", e);
|
|
4280
4280
|
const { name: n, value: a } = e.detail;
|
|
4281
4281
|
if (!n.startsWith("recipient-"))
|
|
4282
4282
|
return;
|
|
@@ -4284,7 +4284,7 @@ const Xa = class {
|
|
|
4284
4284
|
l[o].recipient = a, this.reminders = [...l], this.updateRemindersFormValue();
|
|
4285
4285
|
}
|
|
4286
4286
|
handleNylasFormInputChanged(e) {
|
|
4287
|
-
|
|
4287
|
+
d("nylas-reminder-emails", "handleNylasFormInputChanged", e);
|
|
4288
4288
|
const { name: n, value: a } = e.detail;
|
|
4289
4289
|
if (!n.startsWith("reminder-subject-"))
|
|
4290
4290
|
return;
|
|
@@ -4293,7 +4293,7 @@ const Xa = class {
|
|
|
4293
4293
|
}
|
|
4294
4294
|
addReminder() {
|
|
4295
4295
|
var n;
|
|
4296
|
-
|
|
4296
|
+
d("nylas-reminder-emails", "addReminder");
|
|
4297
4297
|
const e = ((n = this.selectedConfiguration) == null ? void 0 : n.type) === "group" ? "guest" : "all";
|
|
4298
4298
|
this.reminders = [
|
|
4299
4299
|
...this.reminders,
|
|
@@ -4312,7 +4312,7 @@ const Xa = class {
|
|
|
4312
4312
|
return this.internals !== void 0 && typeof this.internals.setFormValue == "function";
|
|
4313
4313
|
}
|
|
4314
4314
|
updateRemindersFormValue(e = !0) {
|
|
4315
|
-
|
|
4315
|
+
d("nylas-reminder-emails", "updateRemindersFormValue");
|
|
4316
4316
|
const n = this.reminders.map((a) => {
|
|
4317
4317
|
const t = { ...a };
|
|
4318
4318
|
return t != null && t.editing && delete t.editing, t;
|
|
@@ -4325,13 +4325,13 @@ const Xa = class {
|
|
|
4325
4325
|
formatReminderTime(e) {
|
|
4326
4326
|
switch (!0) {
|
|
4327
4327
|
case e > 24 * 60:
|
|
4328
|
-
return `${(e / 60 / 24).toFixed(2)} ${
|
|
4328
|
+
return `${(e / 60 / 24).toFixed(2)} ${c.t("time.days")}`;
|
|
4329
4329
|
case e === 24 * 60:
|
|
4330
|
-
return `1 ${
|
|
4330
|
+
return `1 ${c.t("time.days")}`;
|
|
4331
4331
|
case (e > 90 || e === 60):
|
|
4332
|
-
return `${(e / 60).toFixed(2)} ${
|
|
4332
|
+
return `${(e / 60).toFixed(2)} ${c.t("time.hours")}`;
|
|
4333
4333
|
default:
|
|
4334
|
-
return `${e} ${e > 1 ?
|
|
4334
|
+
return `${e} ${e > 1 ? c.t("time.minutes") : c.t("time.minute")} `;
|
|
4335
4335
|
}
|
|
4336
4336
|
}
|
|
4337
4337
|
render() {
|
|
@@ -4339,33 +4339,33 @@ const Xa = class {
|
|
|
4339
4339
|
const e = (a = this.participants.find((o) => o.is_organizer)) == null ? void 0 : a.name;
|
|
4340
4340
|
let n = [
|
|
4341
4341
|
{
|
|
4342
|
-
label:
|
|
4342
|
+
label: c.t("nylasReminderEmails.recipientOptions", { context: "all" }),
|
|
4343
4343
|
value: "all"
|
|
4344
4344
|
},
|
|
4345
4345
|
{
|
|
4346
|
-
label:
|
|
4346
|
+
label: c.t("nylasReminderEmails.recipientOptions", { context: "guest" }),
|
|
4347
4347
|
value: "guest"
|
|
4348
4348
|
},
|
|
4349
4349
|
{
|
|
4350
|
-
label:
|
|
4350
|
+
label: c.t("nylasReminderEmails.recipientOptions", { context: "host" }),
|
|
4351
4351
|
value: "host"
|
|
4352
4352
|
}
|
|
4353
4353
|
];
|
|
4354
4354
|
return ((t = this.selectedConfiguration) == null ? void 0 : t.type) === "group" && (n = n.filter((o) => o.value !== "all")), i(O, { key: "a14f383c9531076b75a3c8848b1a866199675f95" }, i("div", { key: "bfa9969c2318b4f3c23bc159524da0f05b571b51", class: "cards-container" }, this.reminders.map((o, l) => {
|
|
4355
|
-
var
|
|
4356
|
-
return o.type !== "webhook" ? i("div", { class: "nylas-reminder-email", part: "nre" }, i("div", { class: "header", part: "nre__header" }, i("div", null, i("h3", null,
|
|
4355
|
+
var r, s, f, y;
|
|
4356
|
+
return o.type !== "webhook" ? i("div", { class: "nylas-reminder-email", part: "nre" }, i("div", { class: "header", part: "nre__header" }, i("div", null, i("h3", null, e ? c.t("nylasReminderEmails.headerTitle_withOrganizer", { organizerName: ` ${e}` }) : c.t("nylasReminderEmails.headerTitle")), i("p", null, c.t("nylasReminderEmails.headerSubTitle"))), o.editing ? i("div", { class: "reminder-open-close-toggle" }, i("button-component", { variant: "basic", class: "delete-btn", tooltip: "Delete reminder", key: `delete -${l} `, clickHandler: (u) => {
|
|
4357
4357
|
u.preventDefault(), this.deleteReminder(l);
|
|
4358
4358
|
} }, i("trash-icon", { width: "16", height: "16" })), i("span", { class: `chevron ${o.editing ? "open" : "closed"}`, onClick: () => {
|
|
4359
4359
|
o.editing = !o.editing, this.reminders = [...this.reminders];
|
|
4360
4360
|
} }, i("chevron-icon", { width: "24", height: "24" }))) : i("button-component", { variant: "basic", key: `edit-${l} `, clickHandler: (u) => {
|
|
4361
4361
|
u.preventDefault(), o.editing = !0, this.reminders = [...this.reminders];
|
|
4362
|
-
} }, i("edit-icon", { width: "16", height: "16" }),
|
|
4362
|
+
} }, i("edit-icon", { width: "16", height: "16" }), c.t("nylasReminderEmails.editButtonText"))), o.editing ? i("div", { class: "nylas-reminder-email__body", part: "nre__body" }, i("div", { class: "nylas-reminder-email__section" }, i("div", { class: "nylas-reminder-email__row" }, i("label", null, c.t("nylasReminderEmails.emailRecipients.label")), i("select-dropdown", { name: `recipient-${l}`, options: n, defaultSelectedOption: n.find((u) => u.value === o.recipient) ?? n[0], withSearch: !1 })), i("div", { class: "nylas-reminder-email__row" }, i("label", null, c.t("nylasReminderEmails.sendConfirmation.label"), i("span", { class: "label-icon" }, i("tooltip-component", null, i("info-icon", { slot: "tooltip-icon" }), i("span", { slot: "tooltip-content" }, c.t("nylasReminderEmails.sendConfirmation.tooltip.desc"))))), i("div", null, i("nylas-reminder-time", { name: `reminder-time-${l}`, eventReminderTimeMinutes: o.minutes_before_event, exportparts: "nrt, nrt__number-dropdown, nrt__number-dropdown-button, nrt__number-dropdown-content, nrt__period-dropdown, nrt__period-dropdown-button, nrt__period-dropdown-content, nrt__time-period-selector" }), ((r = this.reminderErrors[`reminder-time-${l}`]) == null ? void 0 : r.error) && i("p", { class: "error-message" }, (s = this.reminderErrors[`reminder-time-${l}`]) == null ? void 0 : s.error, " ", i("button-component", { variant: "invisible", onClick: (u) => {
|
|
4363
4363
|
var p;
|
|
4364
4364
|
this.nylasSuggestReminderMinutes.emit({ minutes: (p = this.reminderErrors[`reminder-time-${l}`]) == null ? void 0 : p.suggestion });
|
|
4365
|
-
} }, (f = this.reminderErrors[`reminder-time-${l}`]) == null ? void 0 : f.suggestion)))), i("div", { class: "nylas-reminder-email__block" }, i("label", null,
|
|
4366
|
-
})), i("button-component", { key: "
|
|
4365
|
+
} }, (f = this.reminderErrors[`reminder-time-${l}`]) == null ? void 0 : f.suggestion)))), i("div", { class: "nylas-reminder-email__block" }, i("label", null, c.t("nylasReminderEmails.emailSubject.label")), i("input-component", { name: `reminder-subject-${l}`, maxLength: 60, placeholder: e ? c.t("nylasReminderEmails.emailSubject.placeholder_withOrganizer", { organizerName: e }) : c.t("nylasReminderEmails.emailSubject.placeholder"), defaultValue: (o == null ? void 0 : o.email_subject) || "" })))) : i("div", { class: "nylas-reminder-email__summary", part: "nre__summary" }, i("p", null, i("span", { class: "summary-icon" }, i("person-clipboard-icon", null)), (y = n.find((u) => u.value === o.recipient)) == null ? void 0 : y.label), i("p", null, i("span", { class: "summary-icon" }, i("clock-icon", null)), this.formatReminderTime(o.minutes_before_event), " ", c.t("nylasReminderEmails.beforeTheEvent")))) : null;
|
|
4366
|
+
})), i("button-component", { key: "c3ed905e5bb3a2dfd208e2ee15d687af5bce77b7", class: "create-reminder", variant: "basic", clickHandler: (o) => {
|
|
4367
4367
|
o.preventDefault(), this.addReminder();
|
|
4368
|
-
} }, i("plus-icon", { key: "
|
|
4368
|
+
} }, i("plus-icon", { key: "7ad8981e96e6bafc71a8ee0853412b40d04063c8", width: "16", height: "16" }), c.t("nylasReminderEmails.newReminderButtonText")));
|
|
4369
4369
|
}
|
|
4370
4370
|
static get formAssociated() {
|
|
4371
4371
|
return !0;
|
|
@@ -4382,7 +4382,7 @@ const Xa = class {
|
|
|
4382
4382
|
}
|
|
4383
4383
|
};
|
|
4384
4384
|
yo([
|
|
4385
|
-
|
|
4385
|
+
D({
|
|
4386
4386
|
name: "nylas-reminder-emails",
|
|
4387
4387
|
stateToProps: /* @__PURE__ */ new Map([
|
|
4388
4388
|
["schedulerConfig.selectedConfiguration", "selectedConfiguration"],
|
|
@@ -4403,12 +4403,12 @@ yo([
|
|
|
4403
4403
|
Xa.style = fo;
|
|
4404
4404
|
const po = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff;width:inherit}.nylas-scheduling-method{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200)}.nylas-scheduling-method .header{padding:1rem;border-bottom:1px solid var(--nylas-base-200)}.nylas-scheduling-method .header h3{margin:0;font-size:16px;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-scheduling-method .nylas-scheduling-method__dropdown{padding:1rem;display:flex;flex-direction:column;gap:4px}.nylas-scheduling-method .nylas-scheduling-method__dropdown span.nylas-scheduling-method__dropdown-label{display:flex;align-items:center;gap:4px;color:var(--nylas-base-800);margin:0.25rem 0 0 0;font-size:14px;font-weight:400;line-height:20px;text-align:left}.nylas-scheduling-method .nylas-scheduling-method__dropdown span.nylas-scheduling-method__dropdown-label tooltip-component{display:flex}.nylas-scheduling-method .nylas-scheduling-method__dropdown select-dropdown::part(sd_dropdown){width:100%}.nylas-scheduling-method .nylas-scheduling-method__dropdown select-dropdown::part(sd_dropdown-content){width:100%;max-width:unset}.nylas-scheduling-method .nylas-scheduling-method__dropdown select-dropdown::part(sd_dropdown-button){width:100%;display:flex;justify-content:space-between;align-items:center;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}.nylas-scheduling-method .nylas-scheduling-method__dropdown select-dropdown::part(sd_dropdown-button-selected-label){max-width:calc(100% - 2rem);font-family:var(--nylas-font-family);font-size:16px;line-height:24px}.nylas-scheduling-method .nylas-scheduling-method__dropdown input-component::part(ic__input){background:var(--nylas-base-50);outline:none;cursor:not-allowed}', uo = po;
|
|
4405
4405
|
var mo = function(e, n, a, t) {
|
|
4406
|
-
var o = arguments.length, l = o < 3 ? n : t === null ? t = Object.getOwnPropertyDescriptor(n, a) : t,
|
|
4406
|
+
var o = arguments.length, l = o < 3 ? n : t === null ? t = Object.getOwnPropertyDescriptor(n, a) : t, r;
|
|
4407
4407
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
4408
4408
|
l = Reflect.decorate(e, n, a, t);
|
|
4409
4409
|
else
|
|
4410
|
-
for (var
|
|
4411
|
-
(
|
|
4410
|
+
for (var s = e.length - 1; s >= 0; s--)
|
|
4411
|
+
(r = e[s]) && (l = (o < 3 ? r(l) : o > 3 ? r(n, a, l) : r(n, a)) || l);
|
|
4412
4412
|
return o > 3 && l && Object.defineProperty(n, a, l), l;
|
|
4413
4413
|
}, Pn = function(e, n) {
|
|
4414
4414
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
@@ -4419,37 +4419,37 @@ const Ka = class {
|
|
|
4419
4419
|
x(this, e), this.valueChanged = S(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.selectedConfiguration = void 0, this.name = "availability-method", this.participantOptions = void 0, this.readOnly = !1, this.selectedLanguage = void 0, this.showSubTitle = !1, this.selectedBookingType = "";
|
|
4420
4420
|
}
|
|
4421
4421
|
connectedCallback() {
|
|
4422
|
-
|
|
4422
|
+
d("nylas-scheduling-method", "connectedCallback");
|
|
4423
4423
|
}
|
|
4424
4424
|
disconnectedCallback() {
|
|
4425
|
-
|
|
4425
|
+
d("nylas-scheduling-method", "disconnectedCallback");
|
|
4426
4426
|
}
|
|
4427
4427
|
componentWillLoad() {
|
|
4428
|
-
|
|
4428
|
+
d("nylas-scheduling-method", "componentWillLoad"), this.host.setAttribute("name", this.name);
|
|
4429
4429
|
}
|
|
4430
4430
|
componentDidLoad() {
|
|
4431
4431
|
var n, a, t, o;
|
|
4432
|
-
|
|
4432
|
+
d("nylas-scheduling-method", "componentDidLoad");
|
|
4433
4433
|
const e = (o = (t = (a = (n = this.selectedConfiguration) == null ? void 0 : n.availability) == null ? void 0 : a.availability_rules) == null ? void 0 : t.availability_method) == null ? void 0 : o.toString();
|
|
4434
4434
|
e && typeof this.internals.setFormValue == "function" && this.internals.setFormValue(e, this.name), this.selectedBookingType = e || "collective";
|
|
4435
4435
|
}
|
|
4436
4436
|
componentWillUpdate() {
|
|
4437
|
-
|
|
4437
|
+
d("nylas-scheduling-method", "componentWillUpdate");
|
|
4438
4438
|
}
|
|
4439
4439
|
componentDidUpdate() {
|
|
4440
|
-
|
|
4440
|
+
d("nylas-scheduling-method", "componentDidUpdate");
|
|
4441
4441
|
}
|
|
4442
4442
|
componentWillRender() {
|
|
4443
|
-
|
|
4443
|
+
d("nylas-scheduling-method", "componentWillRender");
|
|
4444
4444
|
}
|
|
4445
4445
|
componentDidRender() {
|
|
4446
|
-
|
|
4446
|
+
d("nylas-scheduling-method", "componentDidRender");
|
|
4447
4447
|
}
|
|
4448
4448
|
elementNameChangedHandler(e) {
|
|
4449
|
-
|
|
4449
|
+
d("nylas-scheduling-method", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
4450
4450
|
}
|
|
4451
4451
|
selectedLanguageChangedHandler(e, n) {
|
|
4452
|
-
e !== n &&
|
|
4452
|
+
e !== n && c.changeLanguage(e);
|
|
4453
4453
|
}
|
|
4454
4454
|
selectedConfigurationChangedHandler(e, n) {
|
|
4455
4455
|
var t, o;
|
|
@@ -4457,7 +4457,7 @@ const Ka = class {
|
|
|
4457
4457
|
this.internals.setFormValue(a, this.name), this.selectedBookingType = a || "collective";
|
|
4458
4458
|
}
|
|
4459
4459
|
nylasFormDropdownChangedHandler(e) {
|
|
4460
|
-
|
|
4460
|
+
d("nylas-scheduling-method", "nylasFormDropdownChangedHandler", e.detail);
|
|
4461
4461
|
const n = (a) => {
|
|
4462
4462
|
const { value: t } = a.detail;
|
|
4463
4463
|
t && (this.selectedBookingType = t, this.internals.setFormValue(t, this.name));
|
|
@@ -4465,13 +4465,13 @@ const Ka = class {
|
|
|
4465
4465
|
this.valueChanged.emit({ value: e.detail.value, name: this.name, valueChanged: n });
|
|
4466
4466
|
}
|
|
4467
4467
|
render() {
|
|
4468
|
-
var t, o, l,
|
|
4468
|
+
var t, o, l, r, s, f;
|
|
4469
4469
|
const e = [
|
|
4470
|
-
{ label:
|
|
4471
|
-
{ label:
|
|
4472
|
-
{ label:
|
|
4473
|
-
], n = (
|
|
4474
|
-
return (n || !a) && !this.readOnly ? null : i(O, null, i("div", { class: "nylas-scheduling-method", part: "nsm" }, i("div", { class: "header", part: "nsm__header" }, i("h3", null,
|
|
4470
|
+
{ label: c.t("nylasSchedulingMethod.schedulingMethodOptions", { context: "collective" }), value: "collective" },
|
|
4471
|
+
{ label: c.t("nylasSchedulingMethod.schedulingMethodOptions", { context: "maxFairness" }), value: "max-fairness" },
|
|
4472
|
+
{ label: c.t("nylasSchedulingMethod.schedulingMethodOptions", { context: "maxAvailability" }), value: "max-availability" }
|
|
4473
|
+
], n = (r = (l = (o = (t = this.selectedConfiguration) == null ? void 0 : t.availability) == null ? void 0 : o.availability_rules) == null ? void 0 : l.availability_method) == null ? void 0 : r.toString(), a = this.participantOptions && ((s = this.participantOptions) == null ? void 0 : s.length) > 0 && !!this.participantOptions[0].email && !!this.participantOptions[0].name && !!this.participantOptions[0].calendars && this.participantOptions[0].calendars.length > 0;
|
|
4474
|
+
return (n || !a) && !this.readOnly ? null : i(O, null, i("div", { class: "nylas-scheduling-method", part: "nsm" }, i("div", { class: "header", part: "nsm__header" }, i("h3", null, c.t("nylasSchedulingMethod.headerTitle"))), i("div", { class: "nylas-scheduling-method__dropdown" }, this.showSubTitle && i("span", { class: "nylas-scheduling-method__dropdown-label" }, c.t("nylasSchedulingMethod.headerSubTitle"), i("tooltip-component", null, i("info-icon", { slot: "tooltip-icon" }), i("span", { slot: "tooltip-content" }, i("strong", null, c.t("nylasSchedulingMethod.tooltip.standard.label")), i("br", null), "- ", c.t("nylasSchedulingMethod.tooltip.standard.desc"), i("br", null), i("br", null), i("strong", null, c.t("nylasSchedulingMethod.tooltip.maxFairness.label")), i("br", null), "- ", c.t("nylasSchedulingMethod.tooltip.maxFairness.desc"), i("br", null), i("br", null), i("strong", null, c.t("nylasSchedulingMethod.tooltip.maxAvailability.label")), i("br", null), "- ", c.t("nylasSchedulingMethod.tooltip.maxAvailability.desc"), i("br", null)))), this.readOnly ? i("input-component", { name: "availability-method-read-only", type: "text", exportparts: "ic__label: nsm__input-label, ic__input: nsm__input, ic__input_wrapper: nsm__input_wrapper", readOnly: !0, defaultValue: ((f = e.find((y) => y.value == n)) == null ? void 0 : f.label) ?? e[0].label }) : i("select-dropdown", { name: this.name, options: e, withSearch: !1, exportparts: "sd_dropdown: nsm__dropdown, sd_dropdown-button: nsm__dropdown-button, sd_dropdown-content: nsm__dropdown-content", defaultSelectedOption: e.find((y) => y.value == n) ?? e[0] }))));
|
|
4475
4475
|
}
|
|
4476
4476
|
static get formAssociated() {
|
|
4477
4477
|
return !0;
|
|
@@ -4488,7 +4488,7 @@ const Ka = class {
|
|
|
4488
4488
|
}
|
|
4489
4489
|
};
|
|
4490
4490
|
mo([
|
|
4491
|
-
|
|
4491
|
+
D({
|
|
4492
4492
|
name: "nylas-scheduling-method",
|
|
4493
4493
|
stateToProps: /* @__PURE__ */ new Map([
|
|
4494
4494
|
["schedulerConfig.selectedConfiguration", "selectedConfiguration"],
|
|
@@ -4510,14 +4510,14 @@ mo([
|
|
|
4510
4510
|
Ka.style = uo;
|
|
4511
4511
|
const go = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff;width:inherit}.nylas-timeslot-interval{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200)}.nylas-timeslot-interval .header{padding:1rem;border-bottom:1px solid var(--nylas-base-200)}.nylas-timeslot-interval .header h3{margin:0;font-size:16px;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-timeslot-interval .header p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.nylas-timeslot-interval .nylas-timeslot-interval__dropdown{padding:1rem;display:flex;flex-direction:column;gap:4px}.nylas-timeslot-interval .nylas-timeslot-interval__dropdown span.label{display:flex;align-items:center;gap:4px;color:var(--nylas-base-800)}.nylas-timeslot-interval .nylas-timeslot-interval__dropdown span.label tooltip-component{display:flex}.nylas-timeslot-interval .nylas-timeslot-interval__dropdown select-dropdown{margin-bottom:1.5rem}.nylas-timeslot-interval .nylas-timeslot-interval__dropdown select-dropdown::part(sd_dropdown){width:100%}.nylas-timeslot-interval .nylas-timeslot-interval__dropdown select-dropdown::part(sd_dropdown-content){width:100%;max-width:unset}.nylas-timeslot-interval .nylas-timeslot-interval__dropdown select-dropdown::part(sd_dropdown-button){width:100%;display:flex;justify-content:space-between;align-items:center;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);padding:1rem}.nylas-timeslot-interval .nylas-timeslot-interval__dropdown select-dropdown::part(sd_dropdown-button-selected-label){max-width:calc(100% - 2rem);font-family:var(--nylas-font-family);font-size:16px;line-height:24px}', ho = go;
|
|
4512
4512
|
var bo = function(e, n, a, t) {
|
|
4513
|
-
var o = arguments.length, l = o < 3 ? n : t === null ? t = Object.getOwnPropertyDescriptor(n, a) : t,
|
|
4513
|
+
var o = arguments.length, l = o < 3 ? n : t === null ? t = Object.getOwnPropertyDescriptor(n, a) : t, r;
|
|
4514
4514
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
4515
4515
|
l = Reflect.decorate(e, n, a, t);
|
|
4516
4516
|
else
|
|
4517
|
-
for (var
|
|
4518
|
-
(
|
|
4517
|
+
for (var s = e.length - 1; s >= 0; s--)
|
|
4518
|
+
(r = e[s]) && (l = (o < 3 ? r(l) : o > 3 ? r(n, a, l) : r(n, a)) || l);
|
|
4519
4519
|
return o > 3 && l && Object.defineProperty(n, a, l), l;
|
|
4520
|
-
},
|
|
4520
|
+
}, Rn = function(e, n) {
|
|
4521
4521
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
4522
4522
|
return Reflect.metadata(e, n);
|
|
4523
4523
|
};
|
|
@@ -4527,30 +4527,30 @@ const Ue = 15, Va = class {
|
|
|
4527
4527
|
x(this, e), this.valueChanged = S(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.selectedConfiguration = void 0, this.name = "timeslot-picker", this.eventDurationMinutes = (a = (n = this.selectedConfiguration) == null ? void 0 : n.availability) == null ? void 0 : a.duration_minutes, this.selectedLanguage = void 0, this.internalEventDurationMinutes = void 0, this.selectedInterval = void 0, this.selectedRoundTo = void 0, this.componentLoaded = !1;
|
|
4528
4528
|
}
|
|
4529
4529
|
elementNameChangedHandler(e) {
|
|
4530
|
-
|
|
4530
|
+
d("nylas-timeslot-interval", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
4531
4531
|
}
|
|
4532
4532
|
selectedConfigurationChangedHandler(e) {
|
|
4533
|
-
var t, o, l,
|
|
4534
|
-
|
|
4533
|
+
var t, o, l, r;
|
|
4534
|
+
d("nylas-timeslot-interval", "selectedConfigurationChangedHandler", e), this.internalEventDurationMinutes = ((t = e == null ? void 0 : e.availability) == null ? void 0 : t.duration_minutes) ?? this.eventDurationMinutes ?? 30;
|
|
4535
4535
|
const n = ((o = e == null ? void 0 : e.availability) == null ? void 0 : o.interval_minutes) ?? this.internalEventDurationMinutes ?? 30;
|
|
4536
4536
|
this.selectedInterval = ((l = e == null ? void 0 : e.availability) == null ? void 0 : l.interval_minutes) ?? n ?? 10;
|
|
4537
|
-
const a = ((
|
|
4537
|
+
const a = ((r = e == null ? void 0 : e.availability) == null ? void 0 : r.round_to) || null;
|
|
4538
4538
|
this.selectedRoundTo = !!(a && a === n);
|
|
4539
4539
|
}
|
|
4540
4540
|
selectedLanguageChangedHandler(e, n) {
|
|
4541
|
-
e !== n &&
|
|
4541
|
+
e !== n && c.changeLanguage(e);
|
|
4542
4542
|
}
|
|
4543
4543
|
connectedCallback() {
|
|
4544
|
-
|
|
4544
|
+
d("nylas-timeslot-interval", "connectedCallback");
|
|
4545
4545
|
}
|
|
4546
4546
|
disconnectedCallback() {
|
|
4547
|
-
|
|
4547
|
+
d("nylas-timeslot-interval", "disconnectedCallback");
|
|
4548
4548
|
}
|
|
4549
4549
|
componentWillLoad() {
|
|
4550
|
-
|
|
4550
|
+
d("nylas-timeslot-interval", "componentWillLoad"), this.host.setAttribute("name", this.name);
|
|
4551
4551
|
}
|
|
4552
4552
|
componentDidLoad() {
|
|
4553
|
-
if (
|
|
4553
|
+
if (d("nylas-timeslot-interval", "componentDidLoad"), this.selectedConfiguration)
|
|
4554
4554
|
this.selectedConfigurationChangedHandler(this.selectedConfiguration);
|
|
4555
4555
|
else {
|
|
4556
4556
|
this.internalEventDurationMinutes = this.eventDurationMinutes ?? 30;
|
|
@@ -4560,19 +4560,19 @@ const Ue = 15, Va = class {
|
|
|
4560
4560
|
this.componentLoaded = !0;
|
|
4561
4561
|
}
|
|
4562
4562
|
componentWillUpdate() {
|
|
4563
|
-
|
|
4563
|
+
d("nylas-timeslot-interval", "componentWillUpdate");
|
|
4564
4564
|
}
|
|
4565
4565
|
componentDidUpdate() {
|
|
4566
|
-
|
|
4566
|
+
d("nylas-timeslot-interval", "componentDidUpdate");
|
|
4567
4567
|
}
|
|
4568
4568
|
componentWillRender() {
|
|
4569
|
-
|
|
4569
|
+
d("nylas-timeslot-interval", "componentWillRender");
|
|
4570
4570
|
}
|
|
4571
4571
|
componentDidRender() {
|
|
4572
|
-
|
|
4572
|
+
d("nylas-timeslot-interval", "componentDidRender");
|
|
4573
4573
|
}
|
|
4574
4574
|
nylasFormDropdownChangedHandler(e) {
|
|
4575
|
-
|
|
4575
|
+
d("nylas-timeslot-interval", "nylasFormDropdownChangedHandler", e.detail), e.detail.value === "duration" ? this.selectedInterval = this.internalEventDurationMinutes ?? 10 : this.selectedInterval = parseInt(e.detail.value), this.valueChanged.emit({
|
|
4576
4576
|
value: JSON.stringify({
|
|
4577
4577
|
interval: this.selectedInterval,
|
|
4578
4578
|
roundTo: this.selectedRoundTo ? this.selectedInterval : Ue
|
|
@@ -4581,7 +4581,7 @@ const Ue = 15, Va = class {
|
|
|
4581
4581
|
}), typeof this.internals.setFormValue == "function" && this.internals.setFormValue(JSON.stringify({ interval: this.selectedInterval, roundTo: this.selectedRoundTo ? this.selectedInterval : Ue }), this.name);
|
|
4582
4582
|
}
|
|
4583
4583
|
nylasFormRadioChangedHandler(e) {
|
|
4584
|
-
|
|
4584
|
+
d("nylas-timeslot-interval", "nylasFormRadioChangedHandler", e.detail), e.detail.value === "no-rounding" ? this.selectedRoundTo = !1 : this.selectedRoundTo = !0, this.valueChanged.emit({
|
|
4585
4585
|
value: JSON.stringify({
|
|
4586
4586
|
interval: this.selectedInterval,
|
|
4587
4587
|
roundTo: this.selectedRoundTo ? this.selectedInterval : Ue
|
|
@@ -4591,25 +4591,25 @@ const Ue = 15, Va = class {
|
|
|
4591
4591
|
}
|
|
4592
4592
|
render() {
|
|
4593
4593
|
const e = [
|
|
4594
|
-
{ value: "duration", label:
|
|
4595
|
-
{ value: "5", label: `5 ${
|
|
4596
|
-
{ value: "10", label: `10 ${
|
|
4597
|
-
{ value: "15", label: `15 ${
|
|
4598
|
-
{ value: "20", label: `20 ${
|
|
4599
|
-
{ value: "30", label: `30 ${
|
|
4600
|
-
{ value: "45", label: `45 ${
|
|
4601
|
-
{ value: "60", label: `60 ${
|
|
4594
|
+
{ value: "duration", label: c.t("nylasTimeslotInterval.lengthOfMeeting") },
|
|
4595
|
+
{ value: "5", label: `5 ${c.t("nylasTimeslotInterval.minutesShort")}` },
|
|
4596
|
+
{ value: "10", label: `10 ${c.t("nylasTimeslotInterval.minutesShort")}` },
|
|
4597
|
+
{ value: "15", label: `15 ${c.t("nylasTimeslotInterval.minutesShort")}` },
|
|
4598
|
+
{ value: "20", label: `20 ${c.t("nylasTimeslotInterval.minutesShort")}` },
|
|
4599
|
+
{ value: "30", label: `30 ${c.t("nylasTimeslotInterval.minutesShort")}` },
|
|
4600
|
+
{ value: "45", label: `45 ${c.t("nylasTimeslotInterval.minutesShort")}` },
|
|
4601
|
+
{ value: "60", label: `60 ${c.t("nylasTimeslotInterval.minutesShort")}` }
|
|
4602
4602
|
], n = typeof this.selectedInterval < "u" ? this.selectedInterval == this.internalEventDurationMinutes ? e[0] : e.find((a) => a.value == this.selectedInterval.toString()) ?? e[0] : void 0;
|
|
4603
|
-
return i(O, { key: "2aa58e54587a744c677dbf4b003abd3fa14c37fc" }, i("div", { key: "fddae80f16cf4ec5b93c74bf5d45b4b7b543ec60", class: "nylas-timeslot-interval", part: "nti" }, i("div", { key: "ff8a2e492f4d1fde6aba065d76bce11d6a184c4e", class: "header", part: "nti__header" }, i("h3", { key: "367bd8bd5f2949574132409109030528d03c18d3" },
|
|
4603
|
+
return i(O, { key: "2aa58e54587a744c677dbf4b003abd3fa14c37fc" }, i("div", { key: "fddae80f16cf4ec5b93c74bf5d45b4b7b543ec60", class: "nylas-timeslot-interval", part: "nti" }, i("div", { key: "ff8a2e492f4d1fde6aba065d76bce11d6a184c4e", class: "header", part: "nti__header" }, i("h3", { key: "367bd8bd5f2949574132409109030528d03c18d3" }, c.t("nylasTimeslotInterval.headerTitle"))), i("div", { key: "6d2d0bb341ca2c0cb1121de5afad874bd5e8090d", class: "nylas-timeslot-interval__dropdown" }, i("span", { key: "21608859e39b3ded5007090377feed1d0f54f868", class: "label", part: "nti__input-label" }, c.t("nylasTimeslotInterval.timeslotInterval.label")), (n == null ? void 0 : n.label) && i("select-dropdown", { name: "interval-minutes", options: e, withSearch: !1, exportparts: "sd_dropdown: nti__dropdown, sd_dropdown-button: nti__dropdown-button, sd_dropdown-content: nti__dropdown-content", defaultSelectedOption: n }), i("span", { key: "d8de089cad61b48ce07f8b3ccdf503759e3bb377", slot: "label", class: "label", part: "nti__input-label" }, c.t("nylasTimeslotInterval.timeslotRounding.label"), i("tooltip-component", { key: "e95e8dc5ccf68914d331c98f929a6f0a3456e3ee" }, i("info-icon", { key: "a07cc67390b570a614b61a7c8577046b29180b1f", slot: "tooltip-icon" }), i("span", { key: "6b649bf635c07fb5a3fe78d27f3742c8da0d8b92", slot: "tooltip-content" }, c.t("nylasTimeslotInterval.timeslotRounding.tooltip.desc")))), this.componentLoaded && i("radio-button-group", { name: "interval-preference", defaultSelectedValue: this.selectedRoundTo ? "rounding" : "no-rounding", options: [
|
|
4604
4604
|
{
|
|
4605
4605
|
value: "no-rounding",
|
|
4606
|
-
label:
|
|
4607
|
-
description:
|
|
4606
|
+
label: c.t("nylasTimeslotInterval.timeslotRoundingOptions.noRounding.label"),
|
|
4607
|
+
description: c.t("nylasTimeslotInterval.timeslotRoundingOptions.noRounding.desc")
|
|
4608
4608
|
},
|
|
4609
4609
|
{
|
|
4610
4610
|
value: "rounding",
|
|
4611
|
-
label:
|
|
4612
|
-
description:
|
|
4611
|
+
label: c.t("nylasTimeslotInterval.timeslotRoundingOptions.rounding.label"),
|
|
4612
|
+
description: c.t("nylasTimeslotInterval.timeslotRoundingOptions.rounding.desc")
|
|
4613
4613
|
}
|
|
4614
4614
|
] }))));
|
|
4615
4615
|
}
|
|
@@ -4628,7 +4628,7 @@ const Ue = 15, Va = class {
|
|
|
4628
4628
|
}
|
|
4629
4629
|
};
|
|
4630
4630
|
bo([
|
|
4631
|
-
|
|
4631
|
+
D({
|
|
4632
4632
|
name: "nylas-timeslot-interval",
|
|
4633
4633
|
stateToProps: /* @__PURE__ */ new Map([
|
|
4634
4634
|
["schedulerConfig.selectedConfiguration", "selectedConfiguration"],
|
|
@@ -4636,9 +4636,9 @@ bo([
|
|
|
4636
4636
|
]),
|
|
4637
4637
|
fireRegisterEvent: !0
|
|
4638
4638
|
}),
|
|
4639
|
-
|
|
4640
|
-
|
|
4641
|
-
|
|
4639
|
+
Rn("design:type", Function),
|
|
4640
|
+
Rn("design:paramtypes", []),
|
|
4641
|
+
Rn("design:returntype", void 0)
|
|
4642
4642
|
], Va.prototype, "render", null);
|
|
4643
4643
|
Va.style = ho;
|
|
4644
4644
|
const vo = ".sc-paintbrush-fill-icon-h{display:flex}", _o = vo, Co = class {
|
|
@@ -4670,7 +4670,7 @@ const Eo = ".sc-people-icon-h{display:flex}", So = Eo, Oo = class {
|
|
|
4670
4670
|
Oo.style = So;
|
|
4671
4671
|
export {
|
|
4672
4672
|
lt as calendar_agenda_fill_icon,
|
|
4673
|
-
|
|
4673
|
+
rt as calendar_agenda_icon,
|
|
4674
4674
|
dt as calendar_info_icon,
|
|
4675
4675
|
pt as calendar_patterns_icon,
|
|
4676
4676
|
gt as envelope_fill_icon,
|
|
@@ -4680,14 +4680,14 @@ export {
|
|
|
4680
4680
|
ua as nylas_booking_calendar_picker,
|
|
4681
4681
|
ma as nylas_booking_confirmation_redirect,
|
|
4682
4682
|
ga as nylas_booking_confirmation_type,
|
|
4683
|
-
|
|
4684
|
-
|
|
4683
|
+
Fa as nylas_booking_form_config,
|
|
4684
|
+
Ia as nylas_buffer_time,
|
|
4685
4685
|
Ta as nylas_calendar_picker,
|
|
4686
4686
|
$a as nylas_cancellation_policy,
|
|
4687
4687
|
Na as nylas_confirmation_email,
|
|
4688
4688
|
Pa as nylas_connected_calendars,
|
|
4689
|
-
|
|
4690
|
-
|
|
4689
|
+
Ra as nylas_custom_booking_flow,
|
|
4690
|
+
Aa as nylas_custom_event_slug,
|
|
4691
4691
|
Ma as nylas_customize_booking_settings,
|
|
4692
4692
|
za as nylas_disable_emails,
|
|
4693
4693
|
Ba as nylas_event_duration,
|