@nylas/react 2.0.4 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/add-circle-icon_2.entry-8c3bb0bb.cjs +1 -0
- package/dist/{add-circle-icon_2.entry-e59a5b4d.js → add-circle-icon_2.entry-a3daf6c4.js} +6 -4
- package/dist/archive-icon.entry-46ad0ff3.cjs +1 -0
- package/dist/{archive-icon.entry-ea5667df.js → archive-icon.entry-d5141486.js} +6 -4
- package/dist/{arrow-icon.entry-1f766862.js → arrow-icon.entry-1b89ce78.js} +6 -4
- package/dist/arrow-icon.entry-f696de4f.cjs +1 -0
- package/dist/bold-icon.entry-7827cd4e.cjs +1 -0
- package/dist/{bold-icon.entry-240950a6.js → bold-icon.entry-c117b4cf.js} +6 -4
- package/dist/button-component_2.entry-8cd4c5f3.cjs +1 -0
- package/dist/{button-component_2.entry-96785a34.js → button-component_2.entry-e68caa9b.js} +5 -3
- package/dist/{calendar-agenda-fill-icon_37.entry-e732ee2e.js → calendar-agenda-fill-icon_37.entry-52bdc8b3.js} +1478 -1210
- package/dist/calendar-agenda-fill-icon_37.entry-8c592cfa.cjs +6 -0
- package/dist/calendar-cancel-icon.entry-7facfa05.cjs +1 -0
- package/dist/{calendar-cancel-icon.entry-7543c684.js → calendar-cancel-icon.entry-f5f1d499.js} +8 -6
- package/dist/{calendar-check-icon.entry-aba54652.js → calendar-check-icon.entry-55320137.js} +6 -4
- package/dist/calendar-check-icon.entry-72108702.cjs +1 -0
- package/dist/{calendar-icon.entry-2cb3b7d1.js → calendar-icon.entry-afea361e.js} +9 -7
- package/dist/calendar-icon.entry-f5c6730f.cjs +1 -0
- package/dist/checkbox-component.entry-5722d263.cjs +1 -0
- package/dist/checkbox-component.entry-89fa6edd.js +54 -0
- package/dist/checkbox-group_4.entry-30e8af17.cjs +28 -0
- package/dist/{checkbox-group_4.entry-04561314.js → checkbox-group_4.entry-51f03009.js} +289 -245
- package/dist/checkmark-circle-icon.entry-ae11049d.cjs +1 -0
- package/dist/{checkmark-circle-icon.entry-1f788efc.js → checkmark-circle-icon.entry-dfe67e22.js} +8 -6
- package/dist/{checkmark-icon_15.entry-146c1cb0.js → checkmark-icon_15.entry-4c3979db.js} +408 -332
- package/dist/checkmark-icon_15.entry-e59c0f53.cjs +5 -0
- package/dist/{chevron-icon_3.entry-637338b5.js → chevron-icon_3.entry-1f3c3ca6.js} +21 -10
- package/dist/chevron-icon_3.entry-ea791750.cjs +1 -0
- package/dist/clock-icon_4.entry-172fed74.cjs +1 -0
- package/dist/{clock-icon_4.entry-e69395a2.js → clock-icon_4.entry-78878cb8.js} +3 -1
- package/dist/customParseFormat-b5d95b34-a6b6fcba.cjs +1 -0
- package/dist/{customParseFormat-8be9be1b-2464f2ba.js → customParseFormat-b5d95b34-ce80820c.js} +1 -1
- package/dist/delete-icon.entry-a8c0bf03.cjs +1 -0
- package/dist/{delete-icon.entry-8a956edd.js → delete-icon.entry-cebdc90f.js} +7 -5
- package/dist/document-refresh-icon.entry-2d9a529d.cjs +1 -0
- package/dist/{document-refresh-icon.entry-5f58f367.js → document-refresh-icon.entry-8780a2b8.js} +3 -1
- package/dist/{feedbackSync-3db3713c-701d2eb9.cjs → feedbackSync-92220b42-fbebe1f9.cjs} +1 -1
- package/dist/{feedbackSync-3db3713c-aadf336b.js → feedbackSync-92220b42-fd5f5610.js} +1 -1
- package/dist/folder-icon.entry-3e61ccca.cjs +1 -0
- package/dist/{folder-icon.entry-e5d7a651.js → folder-icon.entry-6ffd5191.js} +6 -4
- package/dist/forward-icon.entry-c7d88db8.cjs +1 -0
- package/dist/{forward-icon.entry-59be8165.js → forward-icon.entry-c9c4bf5b.js} +5 -3
- package/dist/globe-icon.entry-0b93cab8.cjs +1 -0
- package/dist/{globe-icon.entry-0fe4a4bb.js → globe-icon.entry-7c0dca7b.js} +5 -3
- package/dist/{google-logo-icon_6.entry-799511df.js → google-logo-icon_6.entry-deef91ee.js} +283 -237
- package/dist/google-logo-icon_6.entry-e25ce3e7.cjs +2 -0
- package/dist/google-meet-icon_5.entry-214347f0.cjs +1 -0
- package/dist/{google-meet-icon_5.entry-e753ba28.js → google-meet-icon_5.entry-f8b5a92a.js} +3 -1
- package/dist/{inbox-icon.entry-61132337.js → inbox-icon.entry-873062c3.js} +7 -5
- package/dist/inbox-icon.entry-f08f2fd5.cjs +1 -0
- package/dist/index-025be398.js +7187 -0
- package/dist/index-c510313d-1318f67a.js +289 -0
- package/dist/index-c510313d-b0508eee.cjs +1 -0
- package/dist/index-f42fe591.cjs +65 -0
- package/dist/{index.es-9e756df7-fa75b01e.cjs → index.es-488bc919-d02dd50a.cjs} +1 -1
- package/dist/{index.es-9e756df7-42d8a4cf.js → index.es-488bc919-ea63a7e9.js} +1 -1
- package/dist/info-icon_2.entry-442b9097.cjs +1 -0
- package/dist/{info-icon_2.entry-8d2750ce.js → info-icon_2.entry-60fb8648.js} +3 -1
- package/dist/{input-component.entry-2e134e2a.js → input-component.entry-5898a52e.js} +22 -10
- package/dist/input-component.entry-7274fd28.cjs +1 -0
- package/dist/{input-dropdown_2.entry-1a02e672.js → input-dropdown_2.entry-4534436c.js} +33 -9
- package/dist/input-dropdown_2.entry-9b72f637.cjs +1 -0
- package/dist/{italic-icon.entry-0ec2793b.js → italic-icon.entry-62052cd8.js} +6 -4
- package/dist/italic-icon.entry-9bdbbd37.cjs +1 -0
- package/dist/lib/connect/index.d.ts +6 -0
- package/dist/lib/connect/types.d.ts +2 -0
- package/dist/lib/connect/useNylasConnect.d.ts +28 -0
- package/dist/lib/connect/useNylasConnect.test.d.ts +1 -0
- package/dist/lib/elements/index.d.ts +1 -1
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/notetaker/SendNotetaker/SendNotetaker.d.ts +3 -2
- package/dist/lib/notetaker/VideoPlayer/VideoPlayer.d.ts +2 -0
- package/dist/multi-select-dropdown.entry-77752d46.cjs +1 -0
- package/dist/{multi-select-dropdown.entry-15e887be.js → multi-select-dropdown.entry-9c9d05c1.js} +42 -30
- package/dist/{nylas-booked-event-card_11.entry-98bcc904.js → nylas-booked-event-card_11.entry-32b2e9f1.js} +188 -185
- package/dist/nylas-booked-event-card_11.entry-4aba5146.cjs +1 -0
- package/dist/nylas-date-component_2.entry-6b058796.cjs +1 -0
- package/dist/{nylas-date-component_2.entry-6a98a5bf.js → nylas-date-component_2.entry-a869519f.js} +91 -70
- package/dist/nylas-form-card.entry-5390459f.js +75 -0
- package/dist/nylas-form-card.entry-c2f34d73.cjs +1 -0
- package/dist/nylas-notification_2.entry-054392cf.cjs +1 -0
- package/dist/{nylas-notification_2.entry-320a5a65.js → nylas-notification_2.entry-f46e88e5.js} +4 -1
- package/dist/{nylas-scheduler-editor.entry-aa62c689.js → nylas-scheduler-editor.entry-40a48f47.js} +129 -60
- package/dist/nylas-scheduler-editor.entry-e29fdf07.cjs +2 -0
- package/dist/{nylas-scheduling.entry-aec79de5.js → nylas-scheduling.entry-115b1752.js} +203 -190
- package/dist/nylas-scheduling.entry-79cb1d9c.cjs +1 -0
- package/dist/person-icon.entry-2cae306c.cjs +1 -0
- package/dist/{person-icon.entry-23cbe5dd.js → person-icon.entry-fd668b89.js} +6 -4
- package/dist/{play-icon.entry-4a529bd2.js → play-icon.entry-7fc3c0fd.js} +5 -3
- package/dist/play-icon.entry-9989a520.cjs +1 -0
- package/dist/radio-button-group.entry-03385b5f.cjs +1 -0
- package/dist/{radio-button-group.entry-04b7ff59.js → radio-button-group.entry-9df82cd0.js} +21 -10
- package/dist/react.cjs +1 -1
- package/dist/react.js +142 -127
- package/dist/refresh-icon.entry-310954ba.cjs +1 -0
- package/dist/{refresh-icon.entry-61ced881.js → refresh-icon.entry-c56e5623.js} +8 -6
- package/dist/register-component-3acd57e7-5a79a90a.cjs +1 -0
- package/dist/{register-component-8bbd6492-0d8737fd.js → register-component-3acd57e7-cb09c05e.js} +15 -14
- package/dist/{reply-all-icon.entry-83509aaf.js → reply-all-icon.entry-32e0e000.js} +7 -5
- package/dist/reply-all-icon.entry-68388f97.cjs +1 -0
- package/dist/{reply-icon.entry-131ade31.js → reply-icon.entry-3ac2e736.js} +6 -4
- package/dist/reply-icon.entry-e616a9a4.cjs +1 -0
- package/dist/{sent-icon.entry-72fd8f16.js → sent-icon.entry-0622ed04.js} +6 -4
- package/dist/sent-icon.entry-543eb3c4.cjs +1 -0
- package/dist/{spam-icon.entry-7594c792.js → spam-icon.entry-74bcfd4f.js} +3 -1
- package/dist/spam-icon.entry-e341ee3e.cjs +1 -0
- package/dist/{star-icon.entry-adbe1bb3.js → star-icon.entry-864d2bf9.js} +5 -3
- package/dist/star-icon.entry-c90d40f6.cjs +1 -0
- package/dist/{stop-icon.entry-e95993f2.js → stop-icon.entry-835908c5.js} +3 -1
- package/dist/stop-icon.entry-ffc46b42.cjs +1 -0
- package/dist/{textarea-component.entry-f5d74fb8.js → textarea-component.entry-6adcf6a6.js} +29 -10
- package/dist/textarea-component.entry-dae8eb5c.cjs +1 -0
- package/dist/toggle-switch.entry-5ee29867.cjs +1 -0
- package/dist/toggle-switch.entry-ff2ccb75.js +51 -0
- package/dist/{translate-icon.entry-01cbe664.js → translate-icon.entry-372dd808.js} +3 -1
- package/dist/translate-icon.entry-5606067d.cjs +1 -0
- package/dist/{trash-fill-icon.entry-b39ff771.js → trash-fill-icon.entry-01b4379e.js} +3 -1
- package/dist/trash-fill-icon.entry-daed6c0a.cjs +1 -0
- package/dist/underline-icon.entry-2020ee64.cjs +1 -0
- package/dist/{underline-icon.entry-39179a2e.js → underline-icon.entry-464b900d.js} +5 -3
- package/dist/utils-31933f5d-15041585.js +17878 -0
- package/dist/utils-31933f5d-1d4c81ab.cjs +54 -0
- package/package.json +4 -3
- package/dist/abstract-provider-97cdbfea-5837e17f.cjs +0 -1
- package/dist/abstract-provider-97cdbfea-6b0e3547.js +0 -187
- package/dist/add-circle-icon_2.entry-96ef4ded.cjs +0 -1
- package/dist/archive-icon.entry-49b4e0fd.cjs +0 -1
- package/dist/arrow-icon.entry-5aefd7de.cjs +0 -1
- package/dist/bold-icon.entry-1a4955df.cjs +0 -1
- package/dist/button-component_2.entry-357fa02a.cjs +0 -1
- package/dist/calendar-agenda-fill-icon_37.entry-5e405c00.cjs +0 -6
- package/dist/calendar-cancel-icon.entry-55d746cf.cjs +0 -1
- package/dist/calendar-check-icon.entry-63d33f23.cjs +0 -1
- package/dist/calendar-icon.entry-e13add9b.cjs +0 -1
- package/dist/checkbox-component.entry-8341a8d6.cjs +0 -1
- package/dist/checkbox-component.entry-da122544.js +0 -43
- package/dist/checkbox-group_4.entry-8854d522.cjs +0 -28
- package/dist/checkmark-circle-icon.entry-e637e20e.cjs +0 -1
- package/dist/checkmark-icon_15.entry-a265f687.cjs +0 -5
- package/dist/chevron-icon_3.entry-6c38b5e5.cjs +0 -1
- package/dist/clock-icon_4.entry-aa4117dc.cjs +0 -1
- package/dist/customParseFormat-8be9be1b-7ad95d87.cjs +0 -1
- package/dist/delete-icon.entry-af0cc45b.cjs +0 -1
- package/dist/document-refresh-icon.entry-45931416.cjs +0 -1
- package/dist/folder-icon.entry-cb80c172.cjs +0 -1
- package/dist/forward-icon.entry-c792734b.cjs +0 -1
- package/dist/globe-icon.entry-9ecf0255.cjs +0 -1
- package/dist/google-logo-icon_6.entry-60924f34.cjs +0 -2
- package/dist/google-meet-icon_5.entry-3841313d.cjs +0 -1
- package/dist/inbox-icon.entry-2b450378.cjs +0 -1
- package/dist/index-2084ffd9.js +0 -24884
- package/dist/index-e9dc7971.cjs +0 -118
- package/dist/info-icon_2.entry-c547775c.cjs +0 -1
- package/dist/input-component.entry-b1086460.cjs +0 -1
- package/dist/input-dropdown_2.entry-cb163dc3.cjs +0 -1
- package/dist/italic-icon.entry-6a3a5464.cjs +0 -1
- package/dist/multi-select-dropdown.entry-daccefd5.cjs +0 -1
- package/dist/nylas-booked-event-card_11.entry-3cdf8015.cjs +0 -1
- package/dist/nylas-date-component_2.entry-5d4f54fa.cjs +0 -1
- package/dist/nylas-form-card.entry-22851b77.cjs +0 -1
- package/dist/nylas-form-card.entry-a997084f.js +0 -58
- package/dist/nylas-notification_2.entry-4638126b.cjs +0 -1
- package/dist/nylas-scheduler-editor.entry-82e0f79e.cjs +0 -2
- package/dist/nylas-scheduling.entry-9cef581a.cjs +0 -1
- package/dist/person-icon.entry-01a6a976.cjs +0 -1
- package/dist/play-icon.entry-33443687.cjs +0 -1
- package/dist/radio-button-group.entry-65155787.cjs +0 -1
- package/dist/refresh-icon.entry-e4ea4811.cjs +0 -1
- package/dist/register-component-8bbd6492-d9a23f3c.cjs +0 -1
- package/dist/reply-all-icon.entry-c64d923b.cjs +0 -1
- package/dist/reply-icon.entry-4edfbb70.cjs +0 -1
- package/dist/sent-icon.entry-e4f6a3ef.cjs +0 -1
- package/dist/spam-icon.entry-c531c188.cjs +0 -1
- package/dist/star-icon.entry-a75255ff.cjs +0 -1
- package/dist/stop-icon.entry-079b28c6.cjs +0 -1
- package/dist/textarea-component.entry-920a81ac.cjs +0 -1
- package/dist/toggle-switch.entry-33273409.js +0 -34
- package/dist/toggle-switch.entry-ba6b4f33.cjs +0 -1
- package/dist/translate-icon.entry-f33632d6.cjs +0 -1
- package/dist/trash-fill-icon.entry-298eece8.cjs +0 -1
- package/dist/underline-icon.entry-3704187c.cjs +0 -1
|
@@ -1,27 +1,30 @@
|
|
|
1
|
-
import { r as w,
|
|
2
|
-
import { R as L } from "./register-component-
|
|
1
|
+
import { r as w, c as f, h as o, H as k, g as E } from "./index-025be398.js";
|
|
2
|
+
import { R as L } from "./register-component-3acd57e7-cb09c05e.js";
|
|
3
|
+
import { i, b as d, h as we, o as xe, s as ve, q as Fe, a as ae, u as Oe, t as Me, f as Ce, r as F, v as He, w as $e, x as O, y as Ne, z as qe, A as Ae, C as N } from "./utils-31933f5d-15041585.js";
|
|
3
4
|
import { c as S, T as j, a as _e } from "./constants-f51538ef-e0a5f026.js";
|
|
5
|
+
import "@nylas/web-elements";
|
|
4
6
|
import "react";
|
|
7
|
+
import "@nylas/connect";
|
|
5
8
|
import "react/jsx-runtime";
|
|
6
9
|
import "react-dom";
|
|
7
10
|
const Ze = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff}.nylas-booked-event-card{height:inherit;display:flex;flex-direction:column;justify-content:space-between;align-items:center;font-family:var(--nylas-font-family)}.event-card-wrapper{display:flex;align-items:center;flex-direction:column;background-color:var(--nylas-base-0);color:var(--nylas-base-900);border-radius:var(--nylas-border-radius-3x);position:relative;margin-top:1rem;margin-bottom:2rem;width:424px;box-shadow:0px 1px 4px rgba(0, 0, 0, 0.1), 0px 3px 6px rgba(0, 0, 0, 0.06)}@media screen and (max-width: 768px){.event-card-wrapper{width:100%;border-radius:0px}}.calendar-icon{display:flex;align-items:center;justify-content:center;width:3rem;height:3rem;border-radius:50%;position:absolute;top:-1.25rem;left:50%;transform:translateX(-50%);background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200);color:var(--nylas-base-700)}.booked-event-header{margin:1.5rem 0;overflow-wrap:anywhere;display:flex;align-items:center;flex-direction:column;font-size:16px;font-weight:400;border-bottom:1px solid var(--nylas-base-200);width:inherit;padding:0 0 1.5rem}.booked-event-header h2{color:var(--nylas-base-600);margin-top:1.5rem;margin-bottom:0.25rem;font-size:1.125rem;font-weight:600}.booked-event-header .card-description{text-align:center}.booking-date-time,.booking-participants{padding:0 1rem;margin-top:1.5rem;margin-left:3rem;display:flex;flex-direction:column;justify-content:space-between;align-self:flex-start;position:relative}.booking-date-time svg,.booking-participants svg{color:var(--nylas-base-700);position:absolute;left:-10px}.booking-date-time .block,.booking-participants .block{display:block}.booking-date-time h3,.booking-participants h3{color:var(--nylas-base-600);margin:0;font-size:16px;font-weight:600;line-height:1.25rem;text-align:justify;margin-bottom:4px}.booking-date-time p,.booking-participants p{font-size:16px;margin:0;font-weight:400;text-align:justify;color:var(--nylas-base-800)}.booking-participants{margin-bottom:1.5rem}.booked-event-timezone{display:flex;color:var(--nylas-base-600);margin-bottom:1.5rem;gap:4px;margin:2rem;align-items:center;align-self:flex-end}.button-container{width:inherit}.footer{padding:0.5rem;display:grid;grid-template-columns:1fr 1fr;gap:0.5rem;box-sizing:border-box;background-color:var(--nylas-base-25);border-top:1px solid var(--nylas-base-200);width:100%;border-radius:0 0 var(--nylas-border-radius-2x) var(--nylas-border-radius-2x)}.footer.no-template-cols{grid-template-columns:1fr}.footer.no-footer{display:none}sp-divider{background-color:var(--nylas-base-200);height:1px}calendar-check-icon{display:flex;align-items:center;justify-content:center;height:100%}', Ge = Ze;
|
|
8
|
-
var We = function(e, a, n,
|
|
9
|
-
var
|
|
11
|
+
var We = function(e, a, n, r) {
|
|
12
|
+
var l = arguments.length, t = l < 3 ? a : r === null ? r = Object.getOwnPropertyDescriptor(a, n) : r, s;
|
|
10
13
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
11
|
-
t = Reflect.decorate(e, a, n,
|
|
14
|
+
t = Reflect.decorate(e, a, n, r);
|
|
12
15
|
else
|
|
13
16
|
for (var c = e.length - 1; c >= 0; c--)
|
|
14
|
-
(s = e[c]) && (t = (
|
|
15
|
-
return
|
|
16
|
-
},
|
|
17
|
+
(s = e[c]) && (t = (l < 3 ? s(t) : l > 3 ? s(a, n, t) : s(a, n)) || t);
|
|
18
|
+
return l > 3 && t && Object.defineProperty(a, n, t), t;
|
|
19
|
+
}, q = function(e, a) {
|
|
17
20
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
18
21
|
return Reflect.metadata(e, a);
|
|
19
22
|
};
|
|
20
23
|
const Te = class {
|
|
21
24
|
constructor(e) {
|
|
22
25
|
w(this, e), this.cancelBookingButtonClicked = f(this, "cancelBookingButtonClicked", 7), this.rescheduleButtonClicked = f(this, "rescheduleButtonClicked", 7), this.rescheduleBookedEventError = f(this, "rescheduleBookedEventError", 7), this.cancelBookedEventValidationError = f(this, "cancelBookedEventValidationError", 7), this.handleCancelBookingButtonClicked = () => {
|
|
23
|
-
var
|
|
24
|
-
const a = new Date(this.selectedTimeslot.start_time), n = (t = (
|
|
26
|
+
var l, t;
|
|
27
|
+
const a = new Date(this.selectedTimeslot.start_time), n = (t = (l = this.configSettings) == null ? void 0 : l.scheduler) == null ? void 0 : t.min_cancellation_notice;
|
|
25
28
|
if (!n) {
|
|
26
29
|
this.cancelBookingButtonClicked.emit({ bookingId: this.eventInfo.booking_id });
|
|
27
30
|
return;
|
|
@@ -62,7 +65,7 @@ const Te = class {
|
|
|
62
65
|
d("[nylas-booked-event-card] Component will load");
|
|
63
66
|
}
|
|
64
67
|
async componentDidLoad() {
|
|
65
|
-
var n,
|
|
68
|
+
var n, r;
|
|
66
69
|
d("[nylas-booked-event-card] Component did load"), this.eventInfo || console.warn('[nylas-booked-event-card] "eventInfo" prop missing. Please provide the event info to display the event details in the booked event card component.'), this.bookingInfo || console.warn('[nylas-booked-event-card] "bookingInfo" prop missing. Please provide the booking info to display the guest details in the booked event card component.'), this.applyThemeConfig(this.themeConfig);
|
|
67
70
|
const e = S[this.selectedLanguage || "en"], a = new Intl.DateTimeFormat(e, {
|
|
68
71
|
hour: "2-digit",
|
|
@@ -70,7 +73,7 @@ const Te = class {
|
|
|
70
73
|
timeZone: this.selectedTimezone,
|
|
71
74
|
hour12: this.hour12
|
|
72
75
|
});
|
|
73
|
-
this.startTime = a.format((n = this.selectedTimeslot) == null ? void 0 : n.start_time), this.endTime = a.format((
|
|
76
|
+
this.startTime = a.format((n = this.selectedTimeslot) == null ? void 0 : n.start_time), this.endTime = a.format((r = this.selectedTimeslot) == null ? void 0 : r.end_time);
|
|
74
77
|
}
|
|
75
78
|
applyThemeConfig(e) {
|
|
76
79
|
if (e)
|
|
@@ -78,13 +81,13 @@ const Te = class {
|
|
|
78
81
|
this.host.style.setProperty(`${a}`, n);
|
|
79
82
|
}
|
|
80
83
|
render() {
|
|
81
|
-
var n,
|
|
84
|
+
var n, r, l, t, s, c, m, g, C, x, B, D, u, p, T, R;
|
|
82
85
|
const e = (n = this.configSettings) == null ? void 0 : n.booking_type, a = e && e !== "booking";
|
|
83
|
-
return o(k, { key: "0762e32091a5674187788413717366b6213a28fd", part: "nbec" }, o("div", { key: "9cb934481989459e30f9fc718e20855f0f186027", class: "nylas-booked-event-card" }, o("div", { key: "e7b810785f800f82f0c73eaa665cd56bb9406c85", class: "booked-event-timezone" }, o("globe-icon", { key: "3c29fd04b4fc90e0a6583285cbf872ec840ec0d6" }), j[this.selectedTimezone]), o("div", { key: "e7f4406d8c3b110d84cb1d99e5ab8db89954e2f4", class: "event-card-wrapper", part: "nbec__card" }, o("div", { key: "c656687daf9b51190341d35db6c338a9a61df3a2", class: "calendar-icon" }, o("calendar-check-icon", { key: "e1f5cdfa288db54a537f4250d65e2ab0279fb84e" })), o("div", { key: "50e125630023b8dd19d537d20374f9a5464a1547", class: "booked-event-header" }, o("h2", { key: "24e6e52952321065ee1e63c34d55cd1891edeafc", slot: "card-title", part: "nbec__title" }, this.rescheduleBookingId && !this.isLoading ? `${i.t("bookingRescheduled")}` : a && !this.isLoading ? `${i.t("bookingSent")}` : `${i.t("bookingConfirmed")}`, "!"), o("div", { key: "cb07bf7f3685624f2b50bcba569399ba084ab00d", class: "card-description", part: "nbec__description" }, a ? i.t("bookingSentDescription") : o("span", null, i.t("bookingConfirmedDescription")))), o("div", { key: "bceb86109e1a9ae6f2c1d98e0267e7f73d763aae", class: "booking-date-time" }, o("checkmark-circle-icon", { key: "0e6fdd3cb183e4d00c6c31fe368eefb01d0465d8" }), o("h3", { key: "c7561d2be55109d69650aa41bb6d356018e1973b" }, i.t("bookingDateAndTimeHeader")), o("p", { key: "31818a7c4a89014438b7af5e722f49728918cc27" }, (
|
|
86
|
+
return o(k, { key: "0762e32091a5674187788413717366b6213a28fd", part: "nbec" }, o("div", { key: "9cb934481989459e30f9fc718e20855f0f186027", class: "nylas-booked-event-card" }, o("div", { key: "e7b810785f800f82f0c73eaa665cd56bb9406c85", class: "booked-event-timezone" }, o("globe-icon", { key: "3c29fd04b4fc90e0a6583285cbf872ec840ec0d6" }), j[this.selectedTimezone]), o("div", { key: "e7f4406d8c3b110d84cb1d99e5ab8db89954e2f4", class: "event-card-wrapper", part: "nbec__card" }, o("div", { key: "c656687daf9b51190341d35db6c338a9a61df3a2", class: "calendar-icon" }, o("calendar-check-icon", { key: "e1f5cdfa288db54a537f4250d65e2ab0279fb84e" })), o("div", { key: "50e125630023b8dd19d537d20374f9a5464a1547", class: "booked-event-header" }, o("h2", { key: "24e6e52952321065ee1e63c34d55cd1891edeafc", slot: "card-title", part: "nbec__title" }, this.rescheduleBookingId && !this.isLoading ? `${i.t("bookingRescheduled")}` : a && !this.isLoading ? `${i.t("bookingSent")}` : `${i.t("bookingConfirmed")}`, "!"), o("div", { key: "cb07bf7f3685624f2b50bcba569399ba084ab00d", class: "card-description", part: "nbec__description" }, a ? i.t("bookingSentDescription") : o("span", null, i.t("bookingConfirmedDescription")))), o("div", { key: "bceb86109e1a9ae6f2c1d98e0267e7f73d763aae", class: "booking-date-time" }, o("checkmark-circle-icon", { key: "0e6fdd3cb183e4d00c6c31fe368eefb01d0465d8" }), o("h3", { key: "c7561d2be55109d69650aa41bb6d356018e1973b" }, i.t("bookingDateAndTimeHeader")), o("p", { key: "31818a7c4a89014438b7af5e722f49728918cc27" }, (r = this.selectedTimeslot) != null && r.start_time ? we(xe((l = this.selectedTimeslot) == null ? void 0 : l.start_time, this.selectedTimezone, S[this.selectedLanguage])) : "-", " ", o("br", { key: "7fcd531af1cea5464ab08f9043aabb4cde0a91db" }), this.startTime, " - ", this.endTime)), o("div", { key: "8d2d827677bf300ad2b0f4dc2c28ac3777971af1", class: "booking-participants" }), !a && o("div", { class: "button-container" }, o("div", { class: {
|
|
84
87
|
footer: !0,
|
|
85
|
-
"no-footer": ((s = (t = this.configSettings) == null ? void 0 : t.scheduler) == null ? void 0 : s.hide_cancellation_options) && ((
|
|
88
|
+
"no-footer": ((s = (t = this.configSettings) == null ? void 0 : t.scheduler) == null ? void 0 : s.hide_cancellation_options) && ((m = (c = this.configSettings) == null ? void 0 : c.scheduler) == null ? void 0 : m.hide_rescheduling_options) || ((g = this.configSettings) == null ? void 0 : g.booking_type) === "organizer-confirmation",
|
|
86
89
|
"no-template-cols": !!((x = (C = this.configSettings) == null ? void 0 : C.scheduler) != null && x.hide_cancellation_options) || !!((D = (B = this.configSettings) == null ? void 0 : B.scheduler) != null && D.hide_rescheduling_options)
|
|
87
|
-
} }, !((
|
|
90
|
+
} }, !((p = (u = this.configSettings) == null ? void 0 : u.scheduler) != null && p.hide_cancellation_options) && o("button-component", { variant: "destructive", onClick: this.handleCancelBookingButtonClicked, part: "nbec__button-outline nbec__cancel-cta" }, `${i.t("cancelBookingButton")}`), !((R = (T = this.configSettings) == null ? void 0 : T.scheduler) != null && R.hide_rescheduling_options) && o("button-component", { variant: "basic", onClick: this.handleRescheduleButtonClicked, disabled: this.isLoading, part: "nbec__button-outline nbec__reschedule-cta" }, `${i.t("rescheduleBookingButton")}`))))));
|
|
88
91
|
}
|
|
89
92
|
get host() {
|
|
90
93
|
return E(this);
|
|
@@ -115,8 +118,8 @@ We([
|
|
|
115
118
|
a.scheduler.setCancel(e.detail.bookingId);
|
|
116
119
|
},
|
|
117
120
|
rescheduleButtonClicked: async (e, a) => {
|
|
118
|
-
const n = await a.scheduler.setReschedule(e.detail.bookingId), { errorHandler:
|
|
119
|
-
|
|
121
|
+
const n = await a.scheduler.setReschedule(e.detail.bookingId), { errorHandler: r } = e.detail;
|
|
122
|
+
r && (!n || "error" in n) && r(n);
|
|
120
123
|
},
|
|
121
124
|
rescheduleBookedEventError: async (e, a) => {
|
|
122
125
|
d("nylas-booked-event-card", "rescheduleBookedEventError", e.detail);
|
|
@@ -127,21 +130,21 @@ We([
|
|
|
127
130
|
},
|
|
128
131
|
fireRegisterEvent: !0
|
|
129
132
|
}),
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
+
q("design:type", Function),
|
|
134
|
+
q("design:paramtypes", []),
|
|
135
|
+
q("design:returntype", void 0)
|
|
133
136
|
], Te.prototype, "render", null);
|
|
134
137
|
Te.style = Ge;
|
|
135
138
|
const Ue = ':host{display:block;height:100%;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff}.nylas-booking-form{width:100%;padding:1.5rem;box-sizing:border-box;height:450px;overflow-y:auto;height:100%}form{height:100%;display:flex;flex-direction:column;justify-content:space-between;align-items:center}.cta{width:100%;display:grid;grid-template-columns:1fr 1fr;gap:0.5rem;align-items:flex-start;justify-content:space-between;gap:0.5rem;padding:14px;box-sizing:border-box;border-top:1px solid var(--nylas-base-200)}@media screen and (max-width: 768px){.cta{grid-template-columns:1fr}}.input-wrapper{width:100%;display:flex;flex-direction:column;align-items:flex-start;gap:4px;margin-bottom:1rem}.input-wrapper input::placeholder{color:var(--nylas-base-300)}.input-wrapper label,.input-wrapper input{font-family:var(--nylas-font-family);font-size:16px}.input-wrapper .help-text{margin:0;color:var(--nylas-error)}.button-wrapper{width:100%;align-items:flex-start;height:max-content;position:relative}.button-content{display:flex;gap:4px;align-items:center}input[type=text],input[type=email]{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%}input[type=text]:focus,input[type=email]:focus{outline-color:var(--nylas-primary)}input[type=text].error,input[type=email].error{border-radius:var(--nylas-border-radius-2x);font-weight:600;border-color:var(--nylas-error);border-width:2px}input[type=text].error::placeholder,input[type=email].error::placeholder{font-weight:400}input[type=text]::placeholder,input[type=email]::placeholder{color:var(--nylas-base-300)}input[type=text].guest-email,input[type=email].guest-email{color:var(--nylas-base-900);padding-right:52px}label{display:flex;color:var(--nylas-base-800, #293056);font-size:14px;font-style:normal;font-weight:400;line-height:150%}label.error{color:var(--nylas-error)}label span.required{color:var(--nylas-error);padding:0 0.25rem}button-component.remove-guest{position:absolute;height:51px;right:0}button-component.remove-guest.error button{border-color:var(--nylas-error)}button-component.remove-guest button{height:inherit;border-top-left-radius:initial;border-bottom-left-radius:initial;border:none !important;border-left:1px solid var(--nylas-base-300) !important}button-component.remove-guest button:hover,button-component.remove-guest button:focus{outline:1px solid var(--nylas-primary) !important;color:var(--nylas-primary)}button-component.back button{--dot-color:var(--nylas-base-800)}.guest-email-input{position:relative;display:flex;width:100%}multi-select-dropdown::part(msd_dropdown-label){margin-bottom:4px}multi-select-dropdown::part(msd_dropdown_error){font-size:16px}multi-select-dropdown::part(msd_dropdown-button){height:52px;border-color:var(--nylas-base-300)}multi-select-dropdown::part(msd_dropdown-button--error){border-width:2px;border-color:var(--nylas-error)}', Ye = Ue;
|
|
136
|
-
var Xe = function(e, a, n,
|
|
137
|
-
var
|
|
139
|
+
var Xe = function(e, a, n, r) {
|
|
140
|
+
var l = arguments.length, t = l < 3 ? a : r === null ? r = Object.getOwnPropertyDescriptor(a, n) : r, s;
|
|
138
141
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
139
|
-
t = Reflect.decorate(e, a, n,
|
|
142
|
+
t = Reflect.decorate(e, a, n, r);
|
|
140
143
|
else
|
|
141
144
|
for (var c = e.length - 1; c >= 0; c--)
|
|
142
|
-
(s = e[c]) && (t = (
|
|
143
|
-
return
|
|
144
|
-
},
|
|
145
|
+
(s = e[c]) && (t = (l < 3 ? s(t) : l > 3 ? s(a, n, t) : s(a, n)) || t);
|
|
146
|
+
return l > 3 && t && Object.defineProperty(a, n, t), t;
|
|
147
|
+
}, A = function(e, a) {
|
|
145
148
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
146
149
|
return Reflect.metadata(e, a);
|
|
147
150
|
};
|
|
@@ -149,8 +152,8 @@ const M = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-
|
|
|
149
152
|
constructor(e) {
|
|
150
153
|
w(this, e), this.nameChanged = f(this, "nameChanged", 7), this.emailChanged = f(this, "emailChanged", 7), this.backButtonClicked = f(this, "backButtonClicked", 7), this.detailsConfirmed = f(this, "detailsConfirmed", 7), this.bookingFormError = f(this, "bookingFormError", 7), this.bookingFormSubmitted = f(this, "bookingFormSubmitted", 7), this.handleGuestChange = (a, n) => {
|
|
151
154
|
this.resetGuestEmailError(a);
|
|
152
|
-
const
|
|
153
|
-
|
|
155
|
+
const r = [...this.guestEmails];
|
|
156
|
+
r[a] = ve(n), this.guestEmails = [...r];
|
|
154
157
|
}, this.handleGuestBlur = (a, n) => {
|
|
155
158
|
if (this.resetGuestEmailError(a), n === "") {
|
|
156
159
|
this.guestEmailErrors[a] = i.t("fieldRequired", { field: i.t("email") });
|
|
@@ -165,31 +168,31 @@ const M = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-
|
|
|
165
168
|
a.preventDefault(), this.guestEmails = [...this.guestEmails, ""];
|
|
166
169
|
}, this.removeGuestButtonClickHandler = (a, n) => {
|
|
167
170
|
a.preventDefault(), this.resetGuestEmailError(n);
|
|
168
|
-
const
|
|
169
|
-
|
|
171
|
+
const r = [...this.guestEmails];
|
|
172
|
+
r.splice(n, 1), this.guestEmails = [...r];
|
|
170
173
|
}, this.handleBackButtonClicked = (a) => {
|
|
171
174
|
a.preventDefault(), this.backButtonLoading = !0, this.backButtonClicked.emit();
|
|
172
175
|
}, this.bookButtonClickedHandler = async (a) => {
|
|
173
|
-
var
|
|
176
|
+
var g, C, x, B, D;
|
|
174
177
|
if (a.preventDefault(), this.bookingFormSubmitted.emit().defaultPrevented)
|
|
175
178
|
return;
|
|
176
179
|
d("nylas-booking-form", "bookButtonClickedHandler", this.bookingInfo);
|
|
177
|
-
const
|
|
178
|
-
if (!
|
|
180
|
+
const r = this.name, l = this.email;
|
|
181
|
+
if (!r || r === "") {
|
|
179
182
|
this.isNameValid = !1, this.validationError.name = i.t("fieldRequired", { field: i.t("name") }) || "Name is required", this.bookingFormError.emit({
|
|
180
183
|
title: "Booking form error",
|
|
181
184
|
description: "Name is required"
|
|
182
185
|
});
|
|
183
186
|
return;
|
|
184
187
|
}
|
|
185
|
-
if (!
|
|
188
|
+
if (!l || l === "") {
|
|
186
189
|
this.isEmailValid = !1, this.validationError.email = i.t("fieldRequired", { field: i.t("email") }) || "Email is required", this.bookingFormError.emit({
|
|
187
190
|
title: "Booking form error",
|
|
188
191
|
description: "Email is required"
|
|
189
192
|
});
|
|
190
193
|
return;
|
|
191
194
|
}
|
|
192
|
-
if (!M.test(
|
|
195
|
+
if (!M.test(l)) {
|
|
193
196
|
this.isEmailValid = !1, this.validationError.email = i.t("invalidInputFormat", { field: i.t("email") }), this.bookingFormError.emit({
|
|
194
197
|
title: "Booking form error",
|
|
195
198
|
description: i.t("invalidInputFormat", { field: i.t("email") }) || "Invalid email"
|
|
@@ -199,8 +202,8 @@ const M = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-
|
|
|
199
202
|
let t = [];
|
|
200
203
|
if (this.guestEmails.length > 0) {
|
|
201
204
|
let u = !1;
|
|
202
|
-
if (this.guestEmails.forEach((
|
|
203
|
-
|
|
205
|
+
if (this.guestEmails.forEach((p, T) => {
|
|
206
|
+
p === "" ? (u = !0, this.guestEmailErrors = { ...this.guestEmailErrors, [T]: i.t("fieldRequired", { field: i.t("email") }) }) : M.test(p) || (u = !0, this.guestEmailErrors = { ...this.guestEmailErrors, [T]: i.t("invalidInputFormat", { field: i.t("email") }) });
|
|
204
207
|
}), u) {
|
|
205
208
|
this.bookingFormError.emit({
|
|
206
209
|
title: "Booking form error",
|
|
@@ -208,20 +211,20 @@ const M = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-
|
|
|
208
211
|
});
|
|
209
212
|
return;
|
|
210
213
|
}
|
|
211
|
-
t = this.guestEmails.map((
|
|
214
|
+
t = this.guestEmails.map((p) => ({ name: p.trim(), email: p.trim() }));
|
|
212
215
|
}
|
|
213
|
-
const s = {}, c = ((C = (
|
|
214
|
-
(D = this.bookingInfo) != null && D.additionalFields && Object.entries(this.bookingInfo.additionalFields).forEach(([u,
|
|
215
|
-
u in c && typeof
|
|
216
|
-
}), Object.entries(c).forEach(([u,
|
|
216
|
+
const s = {}, c = ((C = (g = this.configSettings) == null ? void 0 : g.scheduler) == null ? void 0 : C.additional_fields) || {}, m = ((B = (x = this.configSettings) == null ? void 0 : x.booking) == null ? void 0 : B.additional_fields) || {};
|
|
217
|
+
(D = this.bookingInfo) != null && D.additionalFields && Object.entries(this.bookingInfo.additionalFields).forEach(([u, p]) => {
|
|
218
|
+
u in c && typeof p.value < "u" && (s[u] = p.value);
|
|
219
|
+
}), Object.entries(c).forEach(([u, p]) => {
|
|
217
220
|
if (!(u in s)) {
|
|
218
|
-
const T =
|
|
221
|
+
const T = m[u] || p.default || "";
|
|
219
222
|
s[u] = T;
|
|
220
223
|
}
|
|
221
224
|
}), this.detailsConfirmed.emit({
|
|
222
225
|
primaryParticipant: {
|
|
223
|
-
name:
|
|
224
|
-
email:
|
|
226
|
+
name: r,
|
|
227
|
+
email: l
|
|
225
228
|
},
|
|
226
229
|
guests: t,
|
|
227
230
|
additionalFields: { ...s, ...this.additionalFields }
|
|
@@ -248,8 +251,8 @@ const M = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-
|
|
|
248
251
|
e && e.primaryParticipant && (this.name = e.primaryParticipant.name || this.name, this.email = e.primaryParticipant.email || this.email), e != null && e.guests && Array.isArray(e.guests) && (this.guestEmails = e.guests.map((a) => a.email));
|
|
249
252
|
}
|
|
250
253
|
configSettingsChangedHandler(e) {
|
|
251
|
-
var a, n,
|
|
252
|
-
!((n = (a = this.bookingInfo) == null ? void 0 : a.primaryParticipant) != null && n.name) && e && ((
|
|
254
|
+
var a, n, r, l, t, s, c, m, g, C;
|
|
255
|
+
!((n = (a = this.bookingInfo) == null ? void 0 : a.primaryParticipant) != null && n.name) && e && ((l = (r = e.booking) == null ? void 0 : r.guest) != null && l.name) && (this.name = e.booking.guest.name || this.name), !((s = (t = this.bookingInfo) == null ? void 0 : t.primaryParticipant) != null && s.email) && e && ((m = (c = e.booking) == null ? void 0 : c.guest) != null && m.email) && (this.email = e.booking.guest.email || this.email), !((g = this.bookingInfo) != null && g.guests) && ((C = e == null ? void 0 : e.booking) != null && C.additional_guests) && Array.isArray(e.booking.additional_guests) && (this.guestEmails = e.booking.additional_guests.map((x) => x.email));
|
|
253
256
|
}
|
|
254
257
|
themeConfigChanged(e) {
|
|
255
258
|
this.applyThemeConfig(e);
|
|
@@ -269,22 +272,22 @@ const M = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-
|
|
|
269
272
|
"multi-select-dropdown"
|
|
270
273
|
], n = [];
|
|
271
274
|
if (e) {
|
|
272
|
-
const
|
|
273
|
-
Array.from(
|
|
275
|
+
const r = (l) => {
|
|
276
|
+
Array.from(l.children).forEach((t) => {
|
|
274
277
|
const s = t.tagName.toLowerCase();
|
|
275
|
-
a.includes(s) && n.push(t),
|
|
278
|
+
a.includes(s) && n.push(t), r(t);
|
|
276
279
|
});
|
|
277
280
|
};
|
|
278
|
-
|
|
281
|
+
r(e);
|
|
279
282
|
}
|
|
280
283
|
return n;
|
|
281
284
|
}
|
|
282
285
|
applyThemeConfig(e) {
|
|
283
286
|
if (e)
|
|
284
287
|
for (const [a, n] of Object.entries(e))
|
|
285
|
-
this.host.style.setProperty(`${a}`, n), this.iterateFormComponents().forEach((
|
|
288
|
+
this.host.style.setProperty(`${a}`, n), this.iterateFormComponents().forEach((l) => {
|
|
286
289
|
var t;
|
|
287
|
-
|
|
290
|
+
l.style.setProperty(`${a}`, n), (t = l.shadowRoot) == null || t.host.style.setProperty(`${a}`, n);
|
|
288
291
|
});
|
|
289
292
|
}
|
|
290
293
|
changeName(e) {
|
|
@@ -351,49 +354,49 @@ const M = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-
|
|
|
351
354
|
this.updateAdditionalFields(e.detail.name, e.detail.value);
|
|
352
355
|
}
|
|
353
356
|
render() {
|
|
354
|
-
var a, n,
|
|
357
|
+
var a, n, r, l, t, s, c, m, g, C, x, B, D, u, p, T, R, ne, te, oe, re;
|
|
355
358
|
const e = !!((a = this.selectedTimeslot) != null && a.event_id) && !!((n = this.selectedTimeslot) != null && n.capacity);
|
|
356
|
-
return o(k, { key: "6659bdd250a39e69ecd8a4468b4f5bf5f3ced414" }, o("form", { key: "ee7e0b97a449cdb18fa474bb5950ebc34922265d", onSubmit: (_) => this.bookButtonClickedHandler(_), ref: (_) => this.formRef = _, noValidate: !0 }, o("div", { key: "b59b81ef1c13449b1e49608ef6faeebbce3fef4d", class: "nylas-booking-form", part: "nbf" }, o("div", { key: "cf75db4476ff5f8b013cbd349038a5945b9aecb0", class: "input-wrapper", part: "nbf__input-wrapper" }, o("input-component", { key: "
|
|
359
|
+
return o(k, { key: "6659bdd250a39e69ecd8a4468b4f5bf5f3ced414" }, o("form", { key: "ee7e0b97a449cdb18fa474bb5950ebc34922265d", onSubmit: (_) => this.bookButtonClickedHandler(_), ref: (_) => this.formRef = _, noValidate: !0 }, o("div", { key: "b59b81ef1c13449b1e49608ef6faeebbce3fef4d", class: "nylas-booking-form", part: "nbf" }, o("div", { key: "cf75db4476ff5f8b013cbd349038a5945b9aecb0", class: "input-wrapper", part: "nbf__input-wrapper" }, o("input-component", { key: "63959a4c6c06cef6dc5d8990ddfbe89965433f28", label: i.t("name"), name: "name", id: "name", defaultValue: ((l = (r = this.bookingInfo) == null ? void 0 : r.primaryParticipant) == null ? void 0 : l.name) || ((c = (s = (t = this.configSettings) == null ? void 0 : t.booking) == null ? void 0 : s.guest) == null ? void 0 : c.name) || this.name, placeholder: i.t("namePlaceholder"), type: "text", readOnly: ((g = (m = this.bookingInfo) == null ? void 0 : m.primaryParticipant) == null ? void 0 : g.nameReadOnly) || !1, required: !0, requiredError: this.nameRequiredError, patternError: this.namePatternError, themeConfig: this.themeConfig, part: "nbf__input-textfield" })), o("div", { key: "191fc64123d86e5e9e54b53749cdc35e334f21e2", class: "input-wrapper", part: "nbf__input-wrapper" }, o("input-component", { key: "8ef51518ac8ddee866148a6654463143a00a466e", label: i.t("email"), name: "email", id: "email", pattern: M, defaultValue: ((x = (C = this.bookingInfo) == null ? void 0 : C.primaryParticipant) == null ? void 0 : x.email) || ((u = (D = (B = this.configSettings) == null ? void 0 : B.booking) == null ? void 0 : D.guest) == null ? void 0 : u.email) || this.email, placeholder: i.t("emailPlaceholder"), type: "email", readOnly: ((T = (p = this.bookingInfo) == null ? void 0 : p.primaryParticipant) == null ? void 0 : T.emailReadOnly) || !1, required: !0, requiredError: this.emailRequiredError, patternError: this.emailPatternError, themeConfig: this.themeConfig, part: "nbf__input-textfield" })), ((ne = (R = this.configSettings) == null ? void 0 : R.scheduler) == null ? void 0 : ne.hide_additional_guests) !== !0 && o("div", { class: "input-wrapper", part: "nbf__input-wrapper" }, this.guestEmails.map((_, y) => o("div", { class: "input-wrapper button-wrapper" }, o("label", { class: {
|
|
357
360
|
error: !!this.guestEmailErrors[y]
|
|
358
361
|
} }, i.t("guestEmail")), o("div", { class: "guest-email-input" }, o("input", { type: "email", id: `guest-email-${y}`, maxLength: 100, class: {
|
|
359
362
|
"guest-email": !0,
|
|
360
363
|
error: !!this.guestEmailErrors[y]
|
|
361
|
-
}, placeholder: i.t("guestEmailPlaceholder"), value: _, "data-index": y, part: "nbf__input-textfield", onBlur: (
|
|
364
|
+
}, placeholder: i.t("guestEmailPlaceholder"), value: _, "data-index": y, part: "nbf__input-textfield", onBlur: (h) => {
|
|
362
365
|
var b;
|
|
363
|
-
return this.handleGuestBlur(y, (b =
|
|
364
|
-
}, onInput: (
|
|
366
|
+
return this.handleGuestBlur(y, (b = h.target) == null ? void 0 : b.value);
|
|
367
|
+
}, onInput: (h) => {
|
|
365
368
|
var b;
|
|
366
|
-
return this.handleGuestChange(y, (b =
|
|
367
|
-
} }), o("button-component", { variant: "basic", tooltip: "Remove guest", onClick: (
|
|
369
|
+
return this.handleGuestChange(y, (b = h.target) == null ? void 0 : b.value);
|
|
370
|
+
} }), o("button-component", { variant: "basic", tooltip: "Remove guest", onClick: (h) => this.removeGuestButtonClickHandler(h, y), class: {
|
|
368
371
|
"remove-guest": !0,
|
|
369
372
|
error: !!this.guestEmailErrors[y]
|
|
370
|
-
} }, o("close-icon", null))), o("p", { class: "help-text" }, this.guestEmailErrors[y]))), !e && o("button-component", { class: "add-guest", variant: "invisible", part: "nbf__button-ghost", onClick: (_) => this.addGuestButtonClickedHandler(_) }, o("div", { class: "button-content" }, o("add-circle-icon", { slot: "icon" }), this.guestEmails.length > 0 ? `${i.t("addAnotherGuest")}` : `${i.t("addGuest")}`))), (
|
|
371
|
-
var
|
|
372
|
-
const y = _[1],
|
|
373
|
+
} }, o("close-icon", null))), o("p", { class: "help-text" }, this.guestEmailErrors[y]))), !e && o("button-component", { class: "add-guest", variant: "invisible", part: "nbf__button-ghost", onClick: (_) => this.addGuestButtonClickedHandler(_) }, o("div", { class: "button-content" }, o("add-circle-icon", { slot: "icon" }), this.guestEmails.length > 0 ? `${i.t("addAnotherGuest")}` : `${i.t("addGuest")}`))), (re = Object.entries(((oe = (te = this.configSettings) == null ? void 0 : te.scheduler) == null ? void 0 : oe.additional_fields) || {})) == null ? void 0 : re.sort((_, y) => _[1].order - y[1].order).map((_) => {
|
|
374
|
+
var le, se, ie, ce, de, fe, ye, be, he, ge, me, ue, pe, ke;
|
|
375
|
+
const y = _[1], h = y.label, b = _[0], v = ((ie = (se = (le = this.bookingInfo) == null ? void 0 : le.additionalFields) == null ? void 0 : se[b]) == null ? void 0 : ie.value) || ((fe = (de = (ce = this.configSettings) == null ? void 0 : ce.booking) == null ? void 0 : de.additional_fields) == null ? void 0 : fe[b]) || y.default || "", z = ((he = (be = (ye = this.bookingInfo) == null ? void 0 : ye.additionalFields) == null ? void 0 : be[b]) == null ? void 0 : he.readOnly) || !1;
|
|
373
376
|
switch (y.type) {
|
|
374
377
|
case "dropdown":
|
|
375
|
-
return o("div", { class: "input-wrapper", part: "nbf__input-wrapper" }, o("select-dropdown", { label:
|
|
378
|
+
return o("div", { class: "input-wrapper", part: "nbf__input-wrapper" }, o("select-dropdown", { label: h, name: b, id: b, readOnly: z, withSearch: !1, emptyValue: i.t("nylasBookingCalendarPicker.selectOptionLabel"), defaultSelectedOption: v ? { value: v, label: v } : void 0, options: [
|
|
376
379
|
{ value: "", label: i.t("nylasBookingCalendarPicker.selectOptionLabel") },
|
|
377
380
|
...((ge = y.options) == null ? void 0 : ge.map((I) => ({ value: I, label: I }))) || []
|
|
378
|
-
], required: y.required, errorMessage: i.t("fieldRequired", { field:
|
|
381
|
+
], required: y.required, themeConfig: this.themeConfig, errorMessage: i.t("fieldRequired", { field: h }), exportparts: "sd_dropdown: nbf__dropdown, sd_dropdown-button: nbf__dropdown-button, sd_dropdown-content: nbf__dropdown-content" }));
|
|
379
382
|
case "checkbox":
|
|
380
|
-
return o("div", { class: "input-wrapper", part: "nbf__input-wrapper" }, o("checkbox-component", { readOnly: z, label:
|
|
383
|
+
return o("div", { class: "input-wrapper", part: "nbf__input-wrapper" }, o("checkbox-component", { readOnly: z, label: h, name: b, id: b, checked: v === "true", required: y.required, themeConfig: this.themeConfig, errorMessage: i.t("fieldRequired", { field: h }), part: "nbf__checkbox-component" }));
|
|
381
384
|
case "radio_button":
|
|
382
|
-
return o("div", { class: "input-wrapper", part: "nbf__input-wrapper" }, o("radio-button-group", { label:
|
|
385
|
+
return o("div", { class: "input-wrapper", part: "nbf__input-wrapper" }, o("radio-button-group", { label: h, name: b, id: b, readOnly: z, defaultSelectedValue: v && ((me = y.options) != null && me.includes(v)) ? v : ((ue = y.options) == null ? void 0 : ue[0]) || "", options: (pe = y.options) == null ? void 0 : pe.map((I) => ({ value: I, label: I })), required: y.required, themeConfig: this.themeConfig, errorMessage: i.t("fieldRequired", { field: h }), part: "nbf__radio-button-group" }));
|
|
383
386
|
case "multi_line_text":
|
|
384
|
-
return o("div", { class: "input-wrapper", part: "nbf__input-wrapper" }, o("textarea-component", { readOnly: z, label:
|
|
387
|
+
return o("div", { class: "input-wrapper", part: "nbf__input-wrapper" }, o("textarea-component", { readOnly: z, label: h, defaultValue: v, name: b, id: b, required: y.required, themeConfig: this.themeConfig, errorMessage: i.t("fieldRequired", { field: h }), part: "nbf__textarea-component" }));
|
|
385
388
|
case "date":
|
|
386
|
-
return o("div", { class: "input-wrapper", part: "nbf__input-wrapper" }, o("nylas-date-component", { readOnly: z, label:
|
|
389
|
+
return o("div", { class: "input-wrapper", part: "nbf__input-wrapper" }, o("nylas-date-component", { readOnly: z, label: h, defaultValue: v, name: b, id: b, required: y.required, themeConfig: this.themeConfig, errorMessage: i.t("invalidDate"), patternError: i.t("invalidInputFormat", { field: h }), requiredError: i.t("fieldRequired", { field: h }), part: "nbf__date-component" }));
|
|
387
390
|
case "multi_select": {
|
|
388
391
|
const I = (v == null ? void 0 : v.split(",").map((P) => P.trim())) || [];
|
|
389
|
-
return o("div", null, o("multi-select-dropdown", { label:
|
|
392
|
+
return o("div", null, o("multi-select-dropdown", { label: h, name: b, id: b, readOnly: z, selectAtLeastOneOptionLabel: i.t("selectOneOrMoreOptions"), multipleOptionsSelectedLabel: i.t("multipleOptionsSelected"), options: (ke = y.options) == null ? void 0 : ke.map((P) => ({ value: P, label: P, selected: I.includes(P) })), required: y.required, themeConfig: this.themeConfig, errorMessage: i.t("selectAtLeastOneOption"), exportparts: "msd_dropdown: nbf__ms_dropdown, msd_dropdown-label: nbf__ms_dropdown-label, msd_dropdown-button: nbf__ms_dropdown-button, msd_dropdown-content: nbf__ms_dropdown-content, msd_dropdown_error: nbf__ms_dropdown_error, msd_dropdown-button--error: nbf__ms_dropdown-button--error" }));
|
|
390
393
|
}
|
|
391
394
|
case "metadata":
|
|
392
395
|
return null;
|
|
393
396
|
default:
|
|
394
|
-
return o("div", { class: "input-wrapper", part: "nbf__input-wrapper" }, o("input-component", { label:
|
|
397
|
+
return o("div", { class: "input-wrapper", part: "nbf__input-wrapper" }, o("input-component", { label: h, name: b, id: b, type: y.type, readOnly: z, defaultValue: v || "", requiredError: i.t("fieldRequired", { field: h }), patternError: i.t("invalidInputFormat", { field: h }), required: y.required, part: "nbf__input-textfield", themeConfig: this.themeConfig }));
|
|
395
398
|
}
|
|
396
|
-
})), o("div", { key: "
|
|
399
|
+
})), o("div", { key: "85adf1a2d5868610b7d4f0d597553b5ec98772ef", class: "cta" }, o("button-component", { key: "a622fcc6240b1119dbc56ddf55fdc8b00e462787", variant: "basic", class: "back", part: "nbf__button-outline", isLoading: this.backButtonLoading && this.isLoading, onClick: this.handleBackButtonClicked }, o("slot", { key: "9c2cc61227918ebc7ac6d8aff80f40c51db00b11", name: "booking-form-back-label" }, `${i.t("backButton")}`)), o("button-component", { key: "abebcf397d96c21398f9f61ac5aeb45d75c8ad87", variant: "primary", isLoading: !this.backButtonLoading && this.isLoading, disabled: this.isLoading, part: "nbf__button-primary", type: "submit" }, o("slot", { key: "cecc83e97ea18b0766b37d9fd729d9ed4d4f06d6", name: "booking-form-book-label" }, `${i.t("bookNowButton")}`)))));
|
|
397
400
|
}
|
|
398
401
|
get host() {
|
|
399
402
|
return E(this);
|
|
@@ -441,20 +444,20 @@ Xe([
|
|
|
441
444
|
},
|
|
442
445
|
fireRegisterEvent: !0
|
|
443
446
|
}),
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
+
A("design:type", Function),
|
|
448
|
+
A("design:paramtypes", []),
|
|
449
|
+
A("design:returntype", void 0)
|
|
447
450
|
], Ee.prototype, "render", null);
|
|
448
451
|
Ee.style = Ye;
|
|
449
452
|
const Je = ':host{--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff;display:block;width:400px;font-family:var(--nylas-font-family)}.nylas-cancel-booking-form{display:flex;align-items:center;flex-direction:column;background-color:var(--nylas-base-0);color:var(--nylas-base-800);border-radius:var(--nylas-border-radius-2x);padding:1.5rem;position:relative;box-shadow:0px 1px 4px rgba(0, 0, 0, 0.1), 0px 3px 6px rgba(0, 0, 0, 0.06)}.nylas-cancel-booking-form form{width:100%}.nylas-cancel-booking-form__title{font-size:18px;font-weight:600;margin-bottom:0;color:var(--nylas-base-900)}.nylas-cancel-booking-form__description{font-size:16px;font-style:normal;font-weight:400;line-height:140%;color:var(--nylas-base-600);padding-bottom:1.25rem}.nylas-cancel-booking-form__calendar-icon{width:3rem;height:3rem;border-radius:50%;position:absolute;top:-1.25rem;left:50%;transform:translateX(-50%);background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200)}calendar-cancel-icon{display:flex;align-items:center;justify-content:center;height:100%}.footer{display:grid;grid-template-columns:1fr 1fr;width:100%;padding-top:1.25rem;gap:1rem;border-top:1px solid var(--nylas-base-200);margin-top:1.25rem}', Ke = Je;
|
|
450
|
-
var Qe = function(e, a, n,
|
|
451
|
-
var
|
|
453
|
+
var Qe = function(e, a, n, r) {
|
|
454
|
+
var l = arguments.length, t = l < 3 ? a : r === null ? r = Object.getOwnPropertyDescriptor(a, n) : r, s;
|
|
452
455
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
453
|
-
t = Reflect.decorate(e, a, n,
|
|
456
|
+
t = Reflect.decorate(e, a, n, r);
|
|
454
457
|
else
|
|
455
458
|
for (var c = e.length - 1; c >= 0; c--)
|
|
456
|
-
(s = e[c]) && (t = (
|
|
457
|
-
return
|
|
459
|
+
(s = e[c]) && (t = (l < 3 ? s(t) : l > 3 ? s(a, n, t) : s(a, n)) || t);
|
|
460
|
+
return l > 3 && t && Object.defineProperty(a, n, t), t;
|
|
458
461
|
}, Z = function(e, a) {
|
|
459
462
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
460
463
|
return Reflect.metadata(e, a);
|
|
@@ -464,25 +467,25 @@ const Le = class {
|
|
|
464
467
|
var a, n;
|
|
465
468
|
w(this, e), this.goBackButtonClicked = f(this, "goBackButtonClicked", 7), this.cancelBookingFormSubmitted = f(this, "cancelBookingFormSubmitted", 7), this.triggerValidation = f(this, "triggerValidation", 7), this.cancelBookedEventError = f(this, "cancelBookedEventError", 7), this.cancelBookingFormError = f(this, "cancelBookingFormError", 7), this.handleGoBackClicked = () => {
|
|
466
469
|
this.goBackButtonClicked.emit();
|
|
467
|
-
}, this.handleSubmitCancelBooking = (
|
|
468
|
-
var s, c,
|
|
469
|
-
if (this.triggerValidation.emit({}),
|
|
470
|
+
}, this.handleSubmitCancelBooking = (r) => {
|
|
471
|
+
var s, c, m;
|
|
472
|
+
if (this.triggerValidation.emit({}), r.preventDefault(), !this.cancellationReason) {
|
|
470
473
|
this.cancellationError = i.t("cancellationErrorMessage"), this.cancelBookingFormError.emit({ title: i.t("cancelBokingFormError"), description: i.t("cancellationErrorMessage") });
|
|
471
474
|
return;
|
|
472
475
|
}
|
|
473
|
-
const
|
|
474
|
-
if (this.selectedTimeslot &&
|
|
476
|
+
const l = (c = (s = this.configSettings) == null ? void 0 : s.scheduler) == null ? void 0 : c.min_cancellation_notice;
|
|
477
|
+
if (this.selectedTimeslot && l && new Date((m = this.selectedTimeslot) == null ? void 0 : m.start_time).getTime() - l * 60 * 1e3 < (/* @__PURE__ */ new Date()).getTime()) {
|
|
475
478
|
this.cancelBookedEventError.emit({
|
|
476
479
|
error: {
|
|
477
480
|
title: i.t("cancellationErrorTitle"),
|
|
478
|
-
message: i.t("minimumCancellationNoticeErrorMessage", { minCancellationNotice:
|
|
481
|
+
message: i.t("minimumCancellationNoticeErrorMessage", { minCancellationNotice: l })
|
|
479
482
|
}
|
|
480
483
|
});
|
|
481
484
|
return;
|
|
482
485
|
}
|
|
483
486
|
d(`[nylas-cancel-booking-form] Cancel booking form submitted with reason: ${this.cancellationReason}`);
|
|
484
|
-
const t = (
|
|
485
|
-
this.cancelBookedEventError.emit(
|
|
487
|
+
const t = (g) => {
|
|
488
|
+
this.cancelBookedEventError.emit(g);
|
|
486
489
|
};
|
|
487
490
|
this.cancelBookingId ? this.cancelBookingFormSubmitted.emit({ bookingId: this.cancelBookingId, action: "cancel", reason: this.cancellationReason, errorHandler: t }) : this.rejectBookingId && this.cancelBookingFormSubmitted.emit({ bookingId: this.rejectBookingId, action: "reject", reason: this.cancellationReason, errorHandler: t });
|
|
488
491
|
}, this.cancelBookingId = void 0, this.rejectBookingId = void 0, this.selectedTimeslot = void 0, this.configSettings = void 0, this.eventInfo = void 0, this.isLoading = void 0, this.themeConfig = void 0, this.selectedLanguage = void 0, this.cancellationReason = "", this.cancellationError = "", this.cancellationPolicy = ((n = (a = this.configSettings) == null ? void 0 : a.scheduler) == null ? void 0 : n.cancellation_policy) || "Your current timeslot will become available to others.";
|
|
@@ -512,8 +515,8 @@ const Le = class {
|
|
|
512
515
|
applyThemeConfig(e) {
|
|
513
516
|
var a;
|
|
514
517
|
if (e)
|
|
515
|
-
for (const [n,
|
|
516
|
-
this.host.style.setProperty(`${n}`,
|
|
518
|
+
for (const [n, r] of Object.entries(e))
|
|
519
|
+
this.host.style.setProperty(`${n}`, r), (a = this.textareaRef) == null || a.style.setProperty(`${n}`, r);
|
|
517
520
|
}
|
|
518
521
|
handleNylasFormInputChanged(e) {
|
|
519
522
|
this.triggerValidation.emit({}), e.detail.name === "cancel-reason" && (this.cancellationReason = e.detail.value, this.cancellationError = e.detail.error);
|
|
@@ -548,17 +551,17 @@ Qe([
|
|
|
548
551
|
]),
|
|
549
552
|
eventToProps: {
|
|
550
553
|
cancelBookingFormSubmitted: async (e, a) => {
|
|
551
|
-
const { action: n, errorHandler:
|
|
554
|
+
const { action: n, errorHandler: r } = e.detail;
|
|
552
555
|
if (n === "cancel") {
|
|
553
|
-
const
|
|
554
|
-
|
|
556
|
+
const l = await a.scheduler.cancelBooking(e.detail.bookingId, e.detail.reason);
|
|
557
|
+
r && (!l || "error" in l) && r(l);
|
|
555
558
|
} else if (n === "reject") {
|
|
556
|
-
const
|
|
559
|
+
const l = await a.scheduler.updateBooking({
|
|
557
560
|
bookingId: e.detail.bookingId,
|
|
558
561
|
status: "cancelled",
|
|
559
562
|
reason: e.detail.reason
|
|
560
563
|
});
|
|
561
|
-
|
|
564
|
+
r && (!l || "error" in l) && r(l);
|
|
562
565
|
}
|
|
563
566
|
},
|
|
564
567
|
goBackButtonClicked: async (e, a) => {
|
|
@@ -579,14 +582,14 @@ Qe([
|
|
|
579
582
|
], Le.prototype, "render", null);
|
|
580
583
|
Le.style = Ke;
|
|
581
584
|
const Ve = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff}.nylas-cancelled-event-card{height:inherit;display:flex;flex-direction:column;justify-content:space-between;align-items:center;font-family:var(--nylas-font-family);width:400px;background-color:var(--nylas-base-0);color:var(--nylas-base-800);border-radius:var(--nylas-border-radius-2x);padding:1.5rem;position:relative;box-shadow:0px 1px 4px rgba(0, 0, 0, 0.1), 0px 3px 6px rgba(0, 0, 0, 0.06)}@media screen and (max-width: 768px){.nylas-cancelled-event-card{width:inherit}}.nylas-cancelled-event-card__title{font-size:18px;font-weight:600;line-height:24px;color:var(--nylas-base-900);text-align:center}.nylas-cancelled-event-description{font-size:16px;font-weight:500;color:var(--nylas-base-600)}.nylas-cancelled-event-card__calendar-icon{width:3rem;height:3rem;border-radius:50%;position:absolute;top:-1.25rem;left:50%;transform:translateX(-50%);background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200)}.nylas-cancelled-event-card__cta{width:100%;display:flex;flex-direction:row;align-items:flex-start;margin-top:1rem}calendar-cancel-icon{display:flex;align-items:center;justify-content:center;height:100%}button-component{width:100%}', ea = Ve;
|
|
582
|
-
var aa = function(e, a, n,
|
|
583
|
-
var
|
|
585
|
+
var aa = function(e, a, n, r) {
|
|
586
|
+
var l = arguments.length, t = l < 3 ? a : r === null ? r = Object.getOwnPropertyDescriptor(a, n) : r, s;
|
|
584
587
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
585
|
-
t = Reflect.decorate(e, a, n,
|
|
588
|
+
t = Reflect.decorate(e, a, n, r);
|
|
586
589
|
else
|
|
587
590
|
for (var c = e.length - 1; c >= 0; c--)
|
|
588
|
-
(s = e[c]) && (t = (
|
|
589
|
-
return
|
|
591
|
+
(s = e[c]) && (t = (l < 3 ? s(t) : l > 3 ? s(a, n, t) : s(a, n)) || t);
|
|
592
|
+
return l > 3 && t && Object.defineProperty(a, n, t), t;
|
|
590
593
|
}, G = function(e, a) {
|
|
591
594
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
592
595
|
return Reflect.metadata(e, a);
|
|
@@ -648,8 +651,8 @@ aa([
|
|
|
648
651
|
]),
|
|
649
652
|
eventToProps: {
|
|
650
653
|
closeCancelEventCardClicked: async (e, a) => {
|
|
651
|
-
const n = await a.scheduler.resetCancel(), { errorHandler:
|
|
652
|
-
|
|
654
|
+
const n = await a.scheduler.resetCancel(), { errorHandler: r } = e.detail;
|
|
655
|
+
r && (!n || "error" in n) && r(n);
|
|
653
656
|
},
|
|
654
657
|
cancelledEventCardError: async (e, a) => {
|
|
655
658
|
d("nylas-cancelled-event-card", "cancelledEventCardError", e.detail);
|
|
@@ -663,14 +666,14 @@ aa([
|
|
|
663
666
|
], Be.prototype, "render", null);
|
|
664
667
|
Be.style = ea;
|
|
665
668
|
const na = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff}.nylas-confirmed-event-card{height:inherit;display:flex;flex-direction:column;justify-content:space-between;align-items:center;font-family:var(--nylas-font-family);width:400px;background-color:var(--nylas-base-0);color:var(--nylas-base-800);border-radius:var(--nylas-border-radius-2x);padding:1.5rem;position:relative;box-shadow:0px 1px 4px rgba(0, 0, 0, 0.1), 0px 3px 6px rgba(0, 0, 0, 0.06)}@media screen and (max-width: 768px){.nylas-confirmed-event-card{width:inherit}}.nylas-confirmed-event-card__title{font-size:18px;font-weight:600;line-height:24px;color:var(--nylas-base-900);text-align:center}.nylas-confirmed-event-description{font-size:16px;font-weight:500;color:var(--nylas-base-600)}.nylas-confirmed-event-card__calendar-icon{width:3rem;height:3rem;border-radius:50%;position:absolute;top:-1.25rem;left:50%;transform:translateX(-50%);background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200)}.nylas-confirmed-event-card__cta{width:100%;display:flex;flex-direction:row;align-items:flex-start;margin-top:1rem}calendar-check-icon{display:flex;align-items:center;justify-content:center;height:100%}button-component{width:100%}', ta = na;
|
|
666
|
-
var oa = function(e, a, n,
|
|
667
|
-
var
|
|
669
|
+
var oa = function(e, a, n, r) {
|
|
670
|
+
var l = arguments.length, t = l < 3 ? a : r === null ? r = Object.getOwnPropertyDescriptor(a, n) : r, s;
|
|
668
671
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
669
|
-
t = Reflect.decorate(e, a, n,
|
|
672
|
+
t = Reflect.decorate(e, a, n, r);
|
|
670
673
|
else
|
|
671
674
|
for (var c = e.length - 1; c >= 0; c--)
|
|
672
|
-
(s = e[c]) && (t = (
|
|
673
|
-
return
|
|
675
|
+
(s = e[c]) && (t = (l < 3 ? s(t) : l > 3 ? s(a, n, t) : s(a, n)) || t);
|
|
676
|
+
return l > 3 && t && Object.defineProperty(a, n, t), t;
|
|
674
677
|
}, W = function(e, a) {
|
|
675
678
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
676
679
|
return Reflect.metadata(e, a);
|
|
@@ -732,8 +735,8 @@ oa([
|
|
|
732
735
|
]),
|
|
733
736
|
eventToProps: {
|
|
734
737
|
closeConfirmEventCardClicked: async (e, a) => {
|
|
735
|
-
const n = await a.scheduler.resetConfirm(), { errorHandler:
|
|
736
|
-
|
|
738
|
+
const n = await a.scheduler.resetConfirm(), { errorHandler: r } = e.detail;
|
|
739
|
+
r && (!n || "error" in n) && r(n);
|
|
737
740
|
}
|
|
738
741
|
},
|
|
739
742
|
fireRegisterEvent: !0
|
|
@@ -744,23 +747,23 @@ oa([
|
|
|
744
747
|
], De.prototype, "render", null);
|
|
745
748
|
De.style = ta;
|
|
746
749
|
const U = /* @__PURE__ */ new Date(), Y = /* @__PURE__ */ new Date();
|
|
747
|
-
function $(e, a, n,
|
|
748
|
-
function
|
|
750
|
+
function $(e, a, n, r) {
|
|
751
|
+
function l(t) {
|
|
749
752
|
return e(t = arguments.length === 0 ? /* @__PURE__ */ new Date() : /* @__PURE__ */ new Date(+t)), t;
|
|
750
753
|
}
|
|
751
|
-
return
|
|
752
|
-
const s =
|
|
754
|
+
return l.floor = (t) => (e(t = /* @__PURE__ */ new Date(+t)), t), l.ceil = (t) => (e(t = new Date(t - 1)), a(t, 1), e(t), t), l.round = (t) => {
|
|
755
|
+
const s = l(t), c = l.ceil(t);
|
|
753
756
|
return t - s < c - t ? s : c;
|
|
754
|
-
},
|
|
755
|
-
const
|
|
756
|
-
if (t =
|
|
757
|
-
return
|
|
758
|
-
let
|
|
757
|
+
}, l.offset = (t, s) => (a(t = /* @__PURE__ */ new Date(+t), s == null ? 1 : Math.floor(s)), t), l.range = (t, s, c) => {
|
|
758
|
+
const m = [];
|
|
759
|
+
if (t = l.ceil(t), c = c == null ? 1 : Math.floor(c), !(t < s) || !(c > 0))
|
|
760
|
+
return m;
|
|
761
|
+
let g;
|
|
759
762
|
do
|
|
760
|
-
|
|
761
|
-
while (
|
|
762
|
-
return
|
|
763
|
-
},
|
|
763
|
+
m.push(g = /* @__PURE__ */ new Date(+t)), a(t, c), e(t);
|
|
764
|
+
while (g < t && t < s);
|
|
765
|
+
return m;
|
|
766
|
+
}, l.filter = (t) => $((s) => {
|
|
764
767
|
if (s >= s)
|
|
765
768
|
for (; e(s), !t(s); )
|
|
766
769
|
s.setTime(s - 1);
|
|
@@ -774,9 +777,9 @@ function $(e, a, n, l) {
|
|
|
774
777
|
for (; --c >= 0; )
|
|
775
778
|
for (; a(s, 1), !t(s); )
|
|
776
779
|
;
|
|
777
|
-
}), n && (
|
|
780
|
+
}), n && (l.count = (t, s) => (U.setTime(+t), Y.setTime(+s), e(U), e(Y), Math.floor(n(U, Y))), l.every = (t) => (t = Math.floor(t), !isFinite(t) || !(t > 0) ? null : t > 1 ? l.filter(r ? (s) => r(s) % t === 0 : (s) => l.count(0, s) % t === 0) : l)), l;
|
|
778
781
|
}
|
|
779
|
-
const
|
|
782
|
+
const ra = 1e3, ze = ra * 60, la = ze * 60, H = la * 24, X = $(
|
|
780
783
|
(e) => e.setHours(0, 0, 0, 0),
|
|
781
784
|
(e, a) => e.setDate(e.getDate() + a),
|
|
782
785
|
(e, a) => (a - e - (a.getTimezoneOffset() - e.getTimezoneOffset()) * ze) / H,
|
|
@@ -793,14 +796,14 @@ $((e) => {
|
|
|
793
796
|
e.setUTCDate(e.getUTCDate() + a);
|
|
794
797
|
}, (e, a) => (a - e) / H, (e) => Math.floor(e / H));
|
|
795
798
|
const sa = ':host{display:block;min-height:444px;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff}@media screen and (max-width: 768px){:host{min-height:auto}}.nylas-date-picker{display:flex;gap:1rem;flex-direction:column}.header{margin:0 0.5rem;height:48px}.header h2{font-size:1.3125rem;font-weight:400;line-height:1rem;color:var(--nylas-base-800)}.header h2 strong{font-weight:600}.title{margin:0 -1.25rem;display:flex;flex-direction:column;padding:0 1.5rem;gap:0.5rem;border-bottom:1px solid var(--nylas-base-200);font-family:var(--nylas-font-family);color:var(--nylas-base-800)}.title h1{max-width:376px;margin-bottom:0;font-size:18px;line-height:20px;font-weight:600;display:flex;gap:0.5rem;align-items:center}.title p{margin-top:0;font-size:16px;display:flex;gap:0.5rem;align-items:center}@keyframes pulsate{0%{background-color:var(--nylas-base-50)}50%{background-color:var(--nylas-base-100)}100%{background-color:var(--nylas-base-50)}}.dates{display:grid;justify-items:center;grid-template-columns:repeat(7, 1fr);gap:0.5rem;margin-bottom:24px}.dates .date{position:relative;display:flex;flex-direction:row;justify-content:center;align-items:center;height:48px;width:48px;min-width:2rem;min-height:2rem;cursor:pointer;border-radius:var(--nylas-border-radius-2x);font-size:16px;font-weight:600;font-family:inherit;color:var(--nylas-base-text);background-color:var(--nylas-base-100);cursor:pointer;border:none}@media screen and (max-width: 768px){.dates .date{width:-webkit-fill-available;width:-moz-available;width:fill-available}}@media screen and (max-width: 412px){.dates .date{height:38px;min-width:none}}.dates .date:hover:not(:disabled){box-shadow:0 0 0 2px var(--nylas-base-500) inset}.dates .date.date.current-month{color:var(--nylas-base-800)}.dates .date.date.selected{background-color:var(--nylas-primary);color:var(--nylas-base-0);font-weight:700}.dates .date.date.day-skeleton{color:var(--nylas-base-300)}.dates .date:disabled{color:var(--nylas-base-300);background-color:transparent;font-weight:400;cursor:not-allowed}.dates .day{font-size:12px;color:var(--nylas-base-800);font-weight:600;letter-spacing:0.5px;height:32px;display:flex;align-items:center}@media screen and (max-width: 768px){.dates .day{font-size:14px}}.dates .date.day-skeleton{height:48px;width:48px;border-radius:var(--nylas-border-radius-2x);animation:pulsate 1.5s infinite ease-in-out;background-color:var(--nylas-base-50)}@media screen and (max-width: 412px){.dates .date.day-skeleton{width:38px;height:38px;min-width:none}}.dates .date.current-day::after{content:"";position:absolute;bottom:6px;left:50%;transform:translateX(-50%);width:6px;height:6px;border-radius:50%;background-color:var(--nylas-base-500)}.dates .date.current-day.selected::after{background-color:var(--nylas-base-100)}.pagination{display:flex;flex-direction:row;justify-content:space-between;align-items:center;min-width:92px}.pagination .chevron-right{transform:rotate(180deg)}.pagination .button{display:flex;flex-direction:row;justify-content:center;align-items:center;height:3vh;width:3vh;min-width:3em;min-height:3em;cursor:pointer;border-radius:var(--nylas-border-radius-2x);background-color:transparent;color:var(--nylas-base-800);cursor:pointer;border:none}.pagination .button:hover{background-color:var(--nylas-base-50)}.pagination .button:active{background-color:var(--nylas-base-100)}.pagination .button:disabled{background-color:transparent;color:var(--nylas-base-300);cursor:not-allowed}.flex-row{display:flex;flex-direction:row;justify-content:space-between;align-items:center;color:var(--nylas-base-500)}', ia = sa;
|
|
796
|
-
var ca = function(e, a, n,
|
|
797
|
-
var
|
|
799
|
+
var ca = function(e, a, n, r) {
|
|
800
|
+
var l = arguments.length, t = l < 3 ? a : r === null ? r = Object.getOwnPropertyDescriptor(a, n) : r, s;
|
|
798
801
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
799
|
-
t = Reflect.decorate(e, a, n,
|
|
802
|
+
t = Reflect.decorate(e, a, n, r);
|
|
800
803
|
else
|
|
801
804
|
for (var c = e.length - 1; c >= 0; c--)
|
|
802
|
-
(s = e[c]) && (t = (
|
|
803
|
-
return
|
|
805
|
+
(s = e[c]) && (t = (l < 3 ? s(t) : l > 3 ? s(a, n, t) : s(a, n)) || t);
|
|
806
|
+
return l > 3 && t && Object.defineProperty(a, n, t), t;
|
|
804
807
|
}, J = function(e, a) {
|
|
805
808
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
806
809
|
return Reflect.metadata(e, a);
|
|
@@ -812,8 +815,8 @@ const Ie = class {
|
|
|
812
815
|
w(this, e), this.dateSelected = f(this, "dateSelected", 7), this.monthChanged = f(this, "monthChanged", 7), this.selectableDates = void 0, this.configSettings = void 0, this.themeConfig = void 0, this.selectedTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone, this.selectedDate = void 0, this.selectedLanguage = void 0, this.isLoading = void 0, this.eventDuration = void 0, this.month = this.selectedDate || /* @__PURE__ */ new Date(), this.dates = this.getDates(), this.disableNextMonthButton = !1, this.selectableDatesTimezone = [];
|
|
813
816
|
}
|
|
814
817
|
configSettingsChanged(e) {
|
|
815
|
-
var
|
|
816
|
-
const a = new Date(this.month.getFullYear(), this.month.getMonth() + 1, 1), n = (
|
|
818
|
+
var l;
|
|
819
|
+
const a = new Date(this.month.getFullYear(), this.month.getMonth() + 1, 1), n = (l = e == null ? void 0 : e.scheduler) == null ? void 0 : l.available_days_in_future;
|
|
817
820
|
if (n === void 0)
|
|
818
821
|
return;
|
|
819
822
|
Ce(/* @__PURE__ */ new Date(), n).getTime() < a.getTime() ? this.disableNextMonthButton = !0 : this.disableNextMonthButton = !1;
|
|
@@ -829,8 +832,8 @@ const Ie = class {
|
|
|
829
832
|
}
|
|
830
833
|
convertDatesToTimezone(e, a) {
|
|
831
834
|
return !e || e.length === 0 ? [] : e.map((n) => {
|
|
832
|
-
const
|
|
833
|
-
return new Date(
|
|
835
|
+
const r = ae(n).tz(a);
|
|
836
|
+
return new Date(r.year(), r.month(), r.date());
|
|
834
837
|
});
|
|
835
838
|
}
|
|
836
839
|
selectedTimezoneChanged(e) {
|
|
@@ -861,9 +864,9 @@ const Ie = class {
|
|
|
861
864
|
this.dateSelected.emit(e);
|
|
862
865
|
}
|
|
863
866
|
changeMonth(e) {
|
|
864
|
-
var
|
|
867
|
+
var l, t;
|
|
865
868
|
this.month = new Date(this.month.getFullYear(), this.month.getMonth() + e, 1);
|
|
866
|
-
const a = new Date(this.month.getFullYear(), this.month.getMonth() + 1, 1), n = (t = (
|
|
869
|
+
const a = new Date(this.month.getFullYear(), this.month.getMonth() + 1, 1), n = (t = (l = this.configSettings) == null ? void 0 : l.scheduler) == null ? void 0 : t.available_days_in_future;
|
|
867
870
|
Ce(/* @__PURE__ */ new Date(), n).getTime() < a.getTime() ? this.disableNextMonthButton = !0 : this.disableNextMonthButton = !1, this.dates = this.getDates(), this.monthChanged.emit(this.month);
|
|
868
871
|
}
|
|
869
872
|
isSelected(e, a, n) {
|
|
@@ -873,8 +876,8 @@ const Ie = class {
|
|
|
873
876
|
return !e || !this.selectableDatesTimezone || this.selectableDatesTimezone.length === 0 ? !0 : !this.selectableDatesTimezone.some((a) => e.getFullYear() === a.getFullYear() && e.getMonth() === a.getMonth() && e.getDate() === a.getDate());
|
|
874
877
|
}
|
|
875
878
|
render() {
|
|
876
|
-
var e, a, n,
|
|
877
|
-
return o(k, { key: "ecd613f2fec98a00bbb10ac6363097ebede0185d", part: "ndp" }, o("div", { key: "33bb461fca297b69b85ab9f8d17cddb51593dde8", class: "nylas-date-picker" }, o("div", { key: "4da1d51d7bb36838923263563c2f6b1331542fda", class: "title", part: "ndp__title" }, (e = this.configSettings) != null && e.name ? o("h1", null, (a = this.configSettings) == null ? void 0 : a.name) : ((
|
|
879
|
+
var e, a, n, r, l, t;
|
|
880
|
+
return o(k, { key: "ecd613f2fec98a00bbb10ac6363097ebede0185d", part: "ndp" }, o("div", { key: "33bb461fca297b69b85ab9f8d17cddb51593dde8", class: "nylas-date-picker" }, o("div", { key: "4da1d51d7bb36838923263563c2f6b1331542fda", class: "title", part: "ndp__title" }, (e = this.configSettings) != null && e.name ? o("h1", null, (a = this.configSettings) == null ? void 0 : a.name) : ((r = (n = this.configSettings) == null ? void 0 : n.organizer) == null ? void 0 : r.name) && o("h1", null, o("person-icon", null), ((t = (l = this.configSettings) == null ? void 0 : l.organizer) == null ? void 0 : t.name) || "Organizer"), o("p", { key: "8ad906a6b34220b4d35f8dcd1c642d14c3f7293a" }, o("clock-icon", { key: "11d2b21b9ba5fb9a31f9694fc2eaa417b6743957" }), this.eventDuration ? Ne(this.eventDuration) : `- ${i.t("time.minutes")}`)), o("div", { key: "676de20b5616fdbb439567ca27f972040a086b70", class: "header flex-row" }, o("h2", { key: "aa60c555eb8bd7b3ef1ee033b8fc1b74f5a78cdb", part: "ndp__month-header" }, o("strong", { key: "7661ad8cf3c91063617a953aba02c74202910803" }, qe(this.month.toLocaleDateString("en-US", { month: "long" }).toLowerCase())), " ", this.month.toLocaleDateString(void 0, { year: "numeric" })), o("div", { key: "dc4087fff602efe458a75b542cf845e6c1599532", class: "pagination" }, o("button", { key: "34754cf95f2645641597a82b66805e1d92e8122d", title: "Previous month", onClick: () => this.changeMonth(-1), class: { "chevron-left": !0, button: !0 }, disabled: this.month <= /* @__PURE__ */ new Date(), part: "ndp__month-button" }, o("chevron-icon", { key: "376aba646a4910ab430ec239f6ccab083df41334" })), o("button", { key: "01e5e39d56246416bc9270f6a0c2d32202db339a", title: "Next month", onClick: () => this.changeMonth(1), class: { "chevron-right": !0, button: !0 }, disabled: this.disableNextMonthButton, part: "ndp__month-button" }, o("chevron-icon", { key: "492223b45186485d55e403a16d75e08c25a070f5" })))), o("div", { key: "c506414f7ae93d4b995054afa18a313ce02c2ca6", class: "dates" }, [
|
|
878
881
|
i.t("days.sunday"),
|
|
879
882
|
i.t("days.monday"),
|
|
880
883
|
i.t("days.tuesday"),
|
|
@@ -883,17 +886,17 @@ const Ie = class {
|
|
|
883
886
|
i.t("days.friday"),
|
|
884
887
|
i.t("days.saturday")
|
|
885
888
|
].map((s) => o("div", { class: "day", part: "ndp__day" }, s)), this.dates.map((s, c) => {
|
|
886
|
-
var
|
|
887
|
-
const
|
|
889
|
+
var g;
|
|
890
|
+
const m = this.isDisabled(s);
|
|
888
891
|
return this.isLoading ? o("button", { disabled: !0, class: {
|
|
889
892
|
"date day-skeleton": !0,
|
|
890
893
|
"current-month": F(s, this.month)
|
|
891
894
|
}, style: { animationDelay: `${c * 20}ms` }, part: "ndp__date ndp__date--disabled" }, s.getDate()) : o("button", { class: {
|
|
892
895
|
date: !0,
|
|
893
|
-
selected: !!(this.selectedDate && O(s, this.selectedDate) && this.selectableDates && ((
|
|
896
|
+
selected: !!(this.selectedDate && O(s, this.selectedDate) && this.selectableDates && ((g = this.selectableDates) == null ? void 0 : g.length) > 0),
|
|
894
897
|
"current-day": O(s, /* @__PURE__ */ new Date()),
|
|
895
898
|
"current-month": F(s, this.month)
|
|
896
|
-
}, "aria-label": s.toLocaleDateString(void 0, { dateStyle: "full" }), disabled:
|
|
899
|
+
}, "aria-label": s.toLocaleDateString(void 0, { dateStyle: "full" }), disabled: m, onClick: () => this.selectDate(s), part: `ndp__date ${this.isSelected(s, this.selectedDate, this.selectableDates) ? "ndp__date--selected" : ""} ${O(s, /* @__PURE__ */ new Date()) ? "ndp__date--current-day" : ""} ${F(s, this.month) ? "ndp__date--current-month" : ""}` }, s.getDate());
|
|
897
900
|
}))));
|
|
898
901
|
}
|
|
899
902
|
get host() {
|
|
@@ -939,14 +942,14 @@ ca([
|
|
|
939
942
|
], Ie.prototype, "render", null);
|
|
940
943
|
Ie.style = ia;
|
|
941
944
|
const da = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff}.nylas-locale-switch{display:flex;flex-direction:row;justify-content:space-between;align-items:center;border-left:none;border-right:none;color:var(--nylas-base-50);font-size:14px;font-weight:600;cursor:pointer;transition:all 0.2s ease-in-out;font-family:inherit}@media screen and (max-width: 768px){.nylas-locale-switch{font-size:16px}}.select-wrapper{display:flex;align-items:center;gap:0.5rem}select{border:none;background:transparent;cursor:pointer;outline:none;background-color:transparent;margin:0 0 1px;padding:4px;vertical-align:middle}select#timezone{width:140px}select#language{width:80px}span.timezone-label{display:flex;width:-webkit-fill-available;justify-content:space-between}select-dropdown{width:auto}select-dropdown::part(sd_dropdown-button){border:none;padding:10px}select-dropdown::part(sd_dropdown-content){max-width:306px}@media screen and (max-width: 768px){select-dropdown::part(sd_dropdown-button-selected-label){max-width:80px}select-dropdown::part(sd_dropdown-content){width:100%;max-width:none}}', fa = da;
|
|
942
|
-
var ya = function(e, a, n,
|
|
943
|
-
var
|
|
945
|
+
var ya = function(e, a, n, r) {
|
|
946
|
+
var l = arguments.length, t = l < 3 ? a : r === null ? r = Object.getOwnPropertyDescriptor(a, n) : r, s;
|
|
944
947
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
945
|
-
t = Reflect.decorate(e, a, n,
|
|
948
|
+
t = Reflect.decorate(e, a, n, r);
|
|
946
949
|
else
|
|
947
950
|
for (var c = e.length - 1; c >= 0; c--)
|
|
948
|
-
(s = e[c]) && (t = (
|
|
949
|
-
return
|
|
951
|
+
(s = e[c]) && (t = (l < 3 ? s(t) : l > 3 ? s(a, n, t) : s(a, n)) || t);
|
|
952
|
+
return l > 3 && t && Object.defineProperty(a, n, t), t;
|
|
950
953
|
}, K = function(e, a) {
|
|
951
954
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
952
955
|
return Reflect.metadata(e, a);
|
|
@@ -975,8 +978,8 @@ const Se = class {
|
|
|
975
978
|
applyThemeConfig(e) {
|
|
976
979
|
var a, n;
|
|
977
980
|
if (e)
|
|
978
|
-
for (const [
|
|
979
|
-
this.host.style.setProperty(`${
|
|
981
|
+
for (const [r, l] of Object.entries(e))
|
|
982
|
+
this.host.style.setProperty(`${r}`, l), (a = this.timezoneRef) == null || a.style.setProperty(`${r}`, l), (n = this.languageRef) == null || n.style.setProperty(`${r}`, l);
|
|
980
983
|
}
|
|
981
984
|
changeTimezone(e) {
|
|
982
985
|
this.selectedTimezone = e, this.timezoneChanged.emit(e);
|
|
@@ -989,7 +992,7 @@ const Se = class {
|
|
|
989
992
|
a === "timezone" ? this.changeTimezone(n) : a === "language" && this.changeLanguage(n);
|
|
990
993
|
}
|
|
991
994
|
getTimezoneLabelHTML(e) {
|
|
992
|
-
const a =
|
|
995
|
+
const a = Ae(e);
|
|
993
996
|
return o("span", { class: "timezone-label", style: {
|
|
994
997
|
display: "flex",
|
|
995
998
|
alignItems: "center",
|
|
@@ -1061,15 +1064,15 @@ const ba = ".sc-nylas-logo-h{display:flex}", ha = ba, ga = class {
|
|
|
1061
1064
|
}
|
|
1062
1065
|
};
|
|
1063
1066
|
ga.style = ha;
|
|
1064
|
-
const
|
|
1065
|
-
var pa = function(e, a, n,
|
|
1066
|
-
var
|
|
1067
|
+
const ma = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff}.event-card-wrapper{height:inherit;display:flex;flex-direction:column;justify-content:space-between;align-items:center;font-family:var(--nylas-font-family);background-color:var(--nylas-base-0);color:var(--nylas-base-900);border-radius:var(--nylas-border-radius-3x);position:relative;margin-top:1rem;width:424px;box-shadow:0px 1px 4px rgba(0, 0, 0, 0.1), 0px 3px 6px rgba(0, 0, 0, 0.06)}@media screen and (max-width: 768px){.event-card-wrapper{width:100%;border-radius:0px}}.calendar-icon{display:flex;align-items:center;justify-content:center;width:3rem;height:3rem;border-radius:50%;position:absolute;top:-1.25rem;left:50%;transform:translateX(-50%);background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200);color:var(--nylas-base-700)}.booked-event-header{margin:1.5rem 4rem;overflow-wrap:anywhere;display:flex;align-items:center;flex-direction:column;font-size:16px;font-weight:400}.booked-event-header h2{color:var(--nylas-base-600);margin-top:1.5rem;margin-bottom:0.25rem;font-size:1.125rem;font-weight:600}.manage-booking-description{border-top:1px solid var(--nylas-base-200)}.manage-booking-description p{font-size:16px;margin:1rem;padding:0.5rem 1rem;font-weight:400;color:var(--nylas-base-800)}.footer{padding:0.5rem;display:grid;grid-template-columns:1fr 1fr;gap:0.5rem;box-sizing:border-box;background-color:var(--nylas-base-25);width:100%;border-radius:0 0 var(--nylas-border-radius-2x) var(--nylas-border-radius-2x)}.footer.no-template-cols{grid-template-columns:1fr}.footer.no-footer{display:none}sp-divider{background-color:var(--nylas-base-200);height:1px}calendar-check-icon{display:flex;align-items:center;justify-content:center;height:100%}button-component{--dot-color:var(--nylas-base-700)}', ua = ma;
|
|
1068
|
+
var pa = function(e, a, n, r) {
|
|
1069
|
+
var l = arguments.length, t = l < 3 ? a : r === null ? r = Object.getOwnPropertyDescriptor(a, n) : r, s;
|
|
1067
1070
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
1068
|
-
t = Reflect.decorate(e, a, n,
|
|
1071
|
+
t = Reflect.decorate(e, a, n, r);
|
|
1069
1072
|
else
|
|
1070
1073
|
for (var c = e.length - 1; c >= 0; c--)
|
|
1071
|
-
(s = e[c]) && (t = (
|
|
1072
|
-
return
|
|
1074
|
+
(s = e[c]) && (t = (l < 3 ? s(t) : l > 3 ? s(a, n, t) : s(a, n)) || t);
|
|
1075
|
+
return l > 3 && t && Object.defineProperty(a, n, t), t;
|
|
1073
1076
|
}, Q = function(e, a) {
|
|
1074
1077
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
1075
1078
|
return Reflect.metadata(e, a);
|
|
@@ -1140,11 +1143,11 @@ pa([
|
|
|
1140
1143
|
a.scheduler.setReject(e.detail.bookingId);
|
|
1141
1144
|
},
|
|
1142
1145
|
confirmBookingButtonClicked: async (e, a) => {
|
|
1143
|
-
const { host: n } = e.detail,
|
|
1146
|
+
const { host: n } = e.detail, r = await a.scheduler.updateBooking({
|
|
1144
1147
|
bookingId: e.detail.bookingId,
|
|
1145
1148
|
status: "confirmed"
|
|
1146
|
-
}), { errorHandler:
|
|
1147
|
-
|
|
1149
|
+
}), { errorHandler: l } = e.detail;
|
|
1150
|
+
l && (!r || "error" in r) && l(r), await n.resetAction();
|
|
1148
1151
|
}
|
|
1149
1152
|
},
|
|
1150
1153
|
fireRegisterEvent: !0
|
|
@@ -1153,16 +1156,16 @@ pa([
|
|
|
1153
1156
|
Q("design:paramtypes", []),
|
|
1154
1157
|
Q("design:returntype", void 0)
|
|
1155
1158
|
], Re.prototype, "render", null);
|
|
1156
|
-
Re.style =
|
|
1159
|
+
Re.style = ua;
|
|
1157
1160
|
const ka = ':host{--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff;display:block;position:relative;height:inherit;display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:var(--nylas-font-family)}.event-card{display:flex;align-items:center;flex-direction:column;gap:4px;width:calc(100% - 3rem);background-color:var(--nylas-base-0);color:var(--nylas-base-800);border-radius:var(--nylas-border-radius-2x);padding:3rem 1.5rem 1.5rem 1.5rem;position:relative;box-shadow:0px 1px 3px 0px rgba(0, 0, 0, 0.1), 0px 1px 2px 0px rgba(0, 0, 0, 0.06)}@media screen and (max-width: 768px){.event-card{margin-bottom:2rem}}.nylas-selected-event-card__date{font-size:min(max(16px, 3vw), 18px);font-weight:600}.nylas-selected-event-card__time{font-size:16px;font-weight:500}.calendar-icon{width:3rem;height:3rem;border-radius:50%;position:absolute;top:-1.25rem;left:50%;transform:translateX(-50%);background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200)}calendar-icon{display:flex;align-items:center;justify-content:center;height:100%}.event-timezone{display:flex;color:var(--nylas-base-600);margin-bottom:8px;gap:4px;align-items:center}@media screen and (max-width: 768px){.event-timezone{margin-bottom:16px}}', va = ka;
|
|
1158
|
-
var Ca = function(e, a, n,
|
|
1159
|
-
var
|
|
1161
|
+
var Ca = function(e, a, n, r) {
|
|
1162
|
+
var l = arguments.length, t = l < 3 ? a : r === null ? r = Object.getOwnPropertyDescriptor(a, n) : r, s;
|
|
1160
1163
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
1161
|
-
t = Reflect.decorate(e, a, n,
|
|
1164
|
+
t = Reflect.decorate(e, a, n, r);
|
|
1162
1165
|
else
|
|
1163
1166
|
for (var c = e.length - 1; c >= 0; c--)
|
|
1164
|
-
(s = e[c]) && (t = (
|
|
1165
|
-
return
|
|
1167
|
+
(s = e[c]) && (t = (l < 3 ? s(t) : l > 3 ? s(a, n, t) : s(a, n)) || t);
|
|
1168
|
+
return l > 3 && t && Object.defineProperty(a, n, t), t;
|
|
1166
1169
|
}, V = function(e, a) {
|
|
1167
1170
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
1168
1171
|
return Reflect.metadata(e, a);
|
|
@@ -1185,7 +1188,7 @@ const Pe = class {
|
|
|
1185
1188
|
d("[nylas-selected-event-card] Component will load");
|
|
1186
1189
|
}
|
|
1187
1190
|
async componentDidLoad() {
|
|
1188
|
-
var n,
|
|
1191
|
+
var n, r;
|
|
1189
1192
|
d("[nylas-selected-event-card] Component did load"), this.selectedDate || console.warn('[nylas-selected-event-card] "selectedDate" prop is not provided.'), this.selectedTimeslot || console.warn('[nylas-selected-event-card] "selectedTimeslot" prop is not provided.'), this.applyThemeConfig(this.themeConfig);
|
|
1190
1193
|
const e = S[this.selectedLanguage || "en"], a = new Intl.DateTimeFormat(e, {
|
|
1191
1194
|
hour: "2-digit",
|
|
@@ -1193,7 +1196,7 @@ const Pe = class {
|
|
|
1193
1196
|
timeZone: this.selectedTimezone,
|
|
1194
1197
|
hour12: this.hour12
|
|
1195
1198
|
});
|
|
1196
|
-
this.startTime = a.format(new Date((n = this.selectedTimeslot) == null ? void 0 : n.start_time)), this.endTime = a.format(new Date((
|
|
1199
|
+
this.startTime = a.format(new Date((n = this.selectedTimeslot) == null ? void 0 : n.start_time)), this.endTime = a.format(new Date((r = this.selectedTimeslot) == null ? void 0 : r.end_time));
|
|
1197
1200
|
}
|
|
1198
1201
|
applyThemeConfig(e) {
|
|
1199
1202
|
if (e)
|
|
@@ -1234,14 +1237,14 @@ Ca([
|
|
|
1234
1237
|
], Pe.prototype, "render", null);
|
|
1235
1238
|
Pe.style = va;
|
|
1236
1239
|
const _a = ':host{display:block;height:calc(100% - 48px);--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff}.time-picker-wrapper{display:flex;flex-direction:column;height:100%}.timeslots{position:relative;display:flex;flex-direction:column;gap:0.75rem;align-items:center;overflow-y:scroll;padding:0.5rem 1.5rem 1.5rem;flex:1}.time{box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:4px 12px;gap:0.5rem;font-size:16px;font-weight:500;font-family:inherit;width:100%;height:48px;color:var(--nylas-base-800);background:var(--nylas-base-0);border:none;outline:1.5px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);flex:none;order:4;align-self:stretch;flex-grow:0;cursor:pointer}.time:hover,.time:focus{color:var(--nylas-primary);outline-color:var(--nylas-primary)}.time.selected{font-weight:600;color:var(--nylas-primary);outline:2px solid var(--nylas-primary);border-color:transparent;box-shadow:0 0 0 2px var(--nylas-primary)}.time .time-label{display:flex;flex-direction:column;align-items:center;gap:4px}.time .time-label span.spots{font-size:14px;font-family:var(--nylas-font-family);font-weight:400;color:var(--nylas-base-600)}.empty{text-align:center;padding:0 1.5rem;color:var(--nylas-base-600);font-size:min(max(12px, 2vw), 14px);height:450px;display:flex;align-items:center;justify-content:center}@keyframes pulsate{0%{background-color:var(--nylas-base-50)}50%{background-color:var(--nylas-base-100)}100%{background-color:var(--nylas-base-50)}}.loading{padding:0 1.5rem}.loading .timeslot-skeleton{width:100%;height:4rem;background-color:var(--nylas-base-50);margin-bottom:0.5rem;border-radius:var(--nylas-border-radius-2x);animation:pulsate 1.5s infinite ease-in-out}.footer{width:100%;padding:14px;box-sizing:border-box;border-top:1px solid var(--nylas-base-200)}', wa = _a;
|
|
1237
|
-
var xa = function(e, a, n,
|
|
1238
|
-
var
|
|
1240
|
+
var xa = function(e, a, n, r) {
|
|
1241
|
+
var l = arguments.length, t = l < 3 ? a : r === null ? r = Object.getOwnPropertyDescriptor(a, n) : r, s;
|
|
1239
1242
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
1240
|
-
t = Reflect.decorate(e, a, n,
|
|
1243
|
+
t = Reflect.decorate(e, a, n, r);
|
|
1241
1244
|
else
|
|
1242
1245
|
for (var c = e.length - 1; c >= 0; c--)
|
|
1243
|
-
(s = e[c]) && (t = (
|
|
1244
|
-
return
|
|
1246
|
+
(s = e[c]) && (t = (l < 3 ? s(t) : l > 3 ? s(a, n, t) : s(a, n)) || t);
|
|
1247
|
+
return l > 3 && t && Object.defineProperty(a, n, t), t;
|
|
1245
1248
|
}, ee = function(e, a) {
|
|
1246
1249
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
1247
1250
|
return Reflect.metadata(e, a);
|
|
@@ -1262,7 +1265,7 @@ const je = class {
|
|
|
1262
1265
|
selectedDateChanged(e) {
|
|
1263
1266
|
var a;
|
|
1264
1267
|
if (d("[nylas-timeslot-picker] Selected date changed", { newVal: e }), e && (this.selectedTimeslotIndex = "", typeof e < "u")) {
|
|
1265
|
-
const n = (a = this.availability) == null ? void 0 : a.filter((
|
|
1268
|
+
const n = (a = this.availability) == null ? void 0 : a.filter((r) => N(r.start_time, e, this.selectedTimezone)).map((r) => r);
|
|
1266
1269
|
this.times = n || [];
|
|
1267
1270
|
}
|
|
1268
1271
|
}
|
|
@@ -1294,8 +1297,8 @@ const je = class {
|
|
|
1294
1297
|
this.host.style.setProperty(`${a}`, n);
|
|
1295
1298
|
}
|
|
1296
1299
|
getTimeslotId(e, a) {
|
|
1297
|
-
const n = new Date(e.start_time),
|
|
1298
|
-
return `${n.toLocaleDateString()}-${a}${
|
|
1300
|
+
const n = new Date(e.start_time), r = e.event_id;
|
|
1301
|
+
return `${n.toLocaleDateString()}-${a}${r ? `-${r}` : ""}`;
|
|
1299
1302
|
}
|
|
1300
1303
|
onClickSelectTime(e, a) {
|
|
1301
1304
|
d("[nylas-timeslot-picker] Time selected", e, a), this.selectedTimeslotIndex = this.getTimeslotId(e, a), this.timeslotSelected.emit({
|
|
@@ -1323,20 +1326,20 @@ const je = class {
|
|
|
1323
1326
|
render() {
|
|
1324
1327
|
const e = S[this.selectedLanguage || "en"];
|
|
1325
1328
|
if (this.isLoading)
|
|
1326
|
-
return o(k, null, o("div", { class: "loading" }, new Array(6).fill(0).map((n,
|
|
1329
|
+
return o(k, null, o("div", { class: "loading" }, new Array(6).fill(0).map((n, r) => o("div", { class: "timeslot-skeleton", style: { animationDelay: `${r * 20}ms` } }))));
|
|
1327
1330
|
if (this.availability && this.availability.length === 0)
|
|
1328
1331
|
return o(k, null, o("div", { class: "empty" }, o("span", null, "No dates available")));
|
|
1329
1332
|
const a = this.times.filter((n) => {
|
|
1330
|
-
const
|
|
1331
|
-
return !(
|
|
1333
|
+
const r = (n == null ? void 0 : n.event_id) || (n == null ? void 0 : n.master_id), l = typeof (n == null ? void 0 : n.capacity) == "number" && (n == null ? void 0 : n.capacity) > 0;
|
|
1334
|
+
return !(r && !l);
|
|
1332
1335
|
});
|
|
1333
|
-
return (!this.times || this.times.length === 0 || a.length === 0) && this.selectedDate ? o(k, null, o("div", { class: "empty" }, o("span", null, "No time slots available for selected date"))) : this.selectedDate ? o(k, { part: "ntp" }, o("div", { class: "time-picker-wrapper", part: "ntp__time-picker-wrapper" }, o("div", { class: "timeslots", part: "ntp__timeslots" }, a.map((n,
|
|
1336
|
+
return (!this.times || this.times.length === 0 || a.length === 0) && this.selectedDate ? o(k, null, o("div", { class: "empty" }, o("span", null, "No time slots available for selected date"))) : this.selectedDate ? o(k, { part: "ntp" }, o("div", { class: "time-picker-wrapper", part: "ntp__time-picker-wrapper" }, o("div", { class: "timeslots", part: "ntp__timeslots" }, a.map((n, r) => {
|
|
1334
1337
|
var s, c;
|
|
1335
|
-
const
|
|
1338
|
+
const l = typeof (n == null ? void 0 : n.capacity) == "number" && (n == null ? void 0 : n.capacity) > 0, t = this.selectedTimeslotIndex == this.getTimeslotId(n, r);
|
|
1336
1339
|
return o("button", { part: `ntp__timeslot ${((c = (s = this.selectedTimeslot) == null ? void 0 : s.start_time) == null ? void 0 : c.getTime()) === n.start_time.getTime() ? "ntp__timeslot--selected" : ""}`, class: {
|
|
1337
1340
|
time: !0,
|
|
1338
1341
|
selected: typeof this.selectedTimeslot < "u" && t
|
|
1339
|
-
}, onClick: () => this.onClickSelectTime(n,
|
|
1342
|
+
}, onClick: () => this.onClickSelectTime(n, r), onMouseEnter: () => this.handleMouseEnter(r), onMouseLeave: () => this.handleMouseLeave() }, o("div", { class: "time-label", part: "ntp__time-label" }, this.hoveredTimeslotIndex == r || t ? this.getTimeSlotLabel(n) : n.start_time.toLocaleTimeString(e, { hour: "2-digit", minute: "2-digit", timeZone: this.selectedTimezone, hour12: this.hour12 }), o("span", { class: "spots" }, l ? i.t("spotsLeft", { count: n == null ? void 0 : n.capacity }) : null)));
|
|
1340
1343
|
})), this.selectedTimeslot && o("div", { class: "footer" }, o("button-component", { variant: "primary", onClick: (n) => this.handleConfirmedTimeslot(n, this.selectedTimeslot), part: "ntp__button-primary" }, o("slot", { name: "timeslot-picker-cta-label" }, i.t("nextButton")))))) : o(k, null);
|
|
1341
1344
|
}
|
|
1342
1345
|
get host() {
|
|
@@ -1369,14 +1372,14 @@ xa([
|
|
|
1369
1372
|
d("nylas-timeslot-picker", "timeslotSelected", e.detail), a.scheduler.selectTime(e.detail);
|
|
1370
1373
|
},
|
|
1371
1374
|
timeslotConfirmed: async (e, a) => {
|
|
1372
|
-
var
|
|
1375
|
+
var l;
|
|
1373
1376
|
d("nylas-timeslot-picker", "timeslotConfirmed", e.detail);
|
|
1374
|
-
const { timeslot: n, host:
|
|
1377
|
+
const { timeslot: n, host: r } = e.detail;
|
|
1375
1378
|
if (n && (n != null && n.event_id) && (n != null && n.capacity)) {
|
|
1376
1379
|
const t = await a.scheduler.validateGroupEventTimeslot(n);
|
|
1377
1380
|
if (t && "error" in t) {
|
|
1378
|
-
const s = ((
|
|
1379
|
-
s === "Event is full" ?
|
|
1381
|
+
const s = ((l = t.error) == null ? void 0 : l.message) || "An error occurred while validating the timeslot";
|
|
1382
|
+
s === "Event is full" ? r.emitValidateTimeslotError(s, "info") : r.emitValidateTimeslotError(s, "error");
|
|
1380
1383
|
}
|
|
1381
1384
|
} else
|
|
1382
1385
|
a.scheduler.toggleAdditionalData(!0);
|