@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,12 +1,15 @@
|
|
|
1
|
-
import { r as te, h as n,
|
|
2
|
-
import { R as be } from "./register-component-
|
|
3
|
-
import {
|
|
1
|
+
import { r as te, h as n, c as m, H as ce, g as pe, F as le } from "./index-025be398.js";
|
|
2
|
+
import { R as be } from "./register-component-3acd57e7-cb09c05e.js";
|
|
3
|
+
import { b, i as r, m as _e, l as de, g as at } from "./utils-31933f5d-15041585.js";
|
|
4
|
+
import { n as _ } from "./index.es-488bc919-ea63a7e9.js";
|
|
4
5
|
import { C as I, D as $e, e as ot, b as st } from "./constants-f51538ef-e0a5f026.js";
|
|
5
|
-
import { E as v, i as Je, a as Ve, c as Ze, b as We, f as qe } from "./feedbackSync-
|
|
6
|
+
import { E as v, i as Je, a as Ve, c as Ze, b as We, f as qe } from "./feedbackSync-92220b42-fd5f5610.js";
|
|
7
|
+
import "@nylas/web-elements";
|
|
6
8
|
import "react";
|
|
9
|
+
import "@nylas/connect";
|
|
7
10
|
import "react/jsx-runtime";
|
|
8
11
|
import "react-dom";
|
|
9
|
-
const
|
|
12
|
+
const it = ".sc-google-logo-icon-h{display:flex}", rt = it, lt = class {
|
|
10
13
|
constructor(e) {
|
|
11
14
|
te(this, e), this.width = "24", this.height = "24";
|
|
12
15
|
}
|
|
@@ -14,7 +17,7 @@ const rt = ".sc-google-logo-icon-h{display:flex}", it = rt, lt = class {
|
|
|
14
17
|
return n("svg", { key: "eb0615e5875a4d560edb09dd85fcf0b8bbeb5458", width: this.width, height: this.height, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, n("g", { key: "7d040d5b5bc8cf89eabff2ed2695f99bea692b4e", "clip-path": "url(#clip0_959_12452)" }, n("path", { key: "4ddc28c0799291a0c23538444f1c7f5a35959cac", d: "M23.745 12.27C23.745 11.48 23.675 10.73 23.555 10H12.255V14.51H18.725C18.435 15.99 17.585 17.24 16.325 18.09V21.09H20.185C22.445 19 23.745 15.92 23.745 12.27Z", fill: "#4285F4" }), n("path", { key: "d5b051bacfa0110b66c99273ba6fd591a68237d1", d: "M12.255 24C15.495 24 18.205 22.92 20.185 21.09L16.325 18.09C15.245 18.81 13.875 19.25 12.255 19.25C9.12504 19.25 6.47505 17.14 5.52505 14.29H1.54504V17.38C3.51504 21.3 7.56504 24 12.255 24Z", fill: "#34A853" }), n("path", { key: "6fc0685305b1c96ce35fbf87ccab73f161d648c0", d: "M5.52501 14.2901C5.27501 13.5701 5.145 12.8001 5.145 12.0001C5.145 11.2001 5.28501 10.4301 5.52501 9.71012V6.62012H1.545C0.725004 8.24012 0.255005 10.0601 0.255005 12.0001C0.255005 13.9401 0.725004 15.7601 1.545 17.3801L5.52501 14.2901Z", fill: "#FBBC05" }), n("path", { key: "5946c791195dd03d48b4938d8698ba8e01a7a0b3", d: "M12.255 4.75C14.025 4.75 15.605 5.36 16.855 6.55L20.275 3.13C18.205 1.19 15.495 0 12.255 0C7.56504 0 3.51504 2.7 1.54504 6.62L5.52505 9.71C6.47505 6.86 9.12504 4.75 12.255 4.75Z", fill: "#EA4335" })), n("defs", { key: "9d33e98420dbd0f952496686fd02f41894ab49f4" }, n("clipPath", { key: "dd192b07d7651bbd74375c1a31e0f3027d9b9a10", id: "clip0_959_12452" }, n("rect", { key: "98c2344df7d506d2579cd793d89fb42feeace8fd", width: 24, height: 24, fill: "white" }))));
|
|
15
18
|
}
|
|
16
19
|
};
|
|
17
|
-
lt.style =
|
|
20
|
+
lt.style = rt;
|
|
18
21
|
const dt = ".sc-microsoft-logo-icon-h{display:flex}", ct = dt, pt = class {
|
|
19
22
|
constructor(e) {
|
|
20
23
|
te(this, e), this.width = "22", this.height = "22";
|
|
@@ -30,7 +33,7 @@ var u;
|
|
|
30
33
|
})(u || (u = {}));
|
|
31
34
|
function bt({ id: e, formState: t, activeTab: a }, s) {
|
|
32
35
|
return n(
|
|
33
|
-
|
|
36
|
+
le,
|
|
34
37
|
null,
|
|
35
38
|
n(
|
|
36
39
|
"div",
|
|
@@ -90,7 +93,7 @@ function bt({ id: e, formState: t, activeTab: a }, s) {
|
|
|
90
93
|
{ key: `communications-${e}`, class: { hide: a !== u.Communications } },
|
|
91
94
|
n("nylas-disable-emails", { name: "disable-emails", exportparts: "nde, nde__toggle-label, nde_toggle-input, nde_toggle-slider" }),
|
|
92
95
|
!(t != null && t.disableEmails) && n(
|
|
93
|
-
|
|
96
|
+
le,
|
|
94
97
|
null,
|
|
95
98
|
n("nylas-confirmation-email", { name: "confirmation-email-template", exportparts: "nce, nce__tab-heading, nce__header, nce__body, nce__confirmation-email-toggle--container, nce__summary, nce__reminder-input_dropdown, nce__reminder-input_dropdown-input, nce__reminder-input_dropdown-content" }),
|
|
96
99
|
n("nylas-reminder-emails", { name: "reminder-overrides", exportparts: "nre, nre__tab-heading, nre__header, nre__body, nre__confirmation-email-toggle--container, nre__summary, nrt, nrt__number-dropdown, nrt__number-dropdown-button, nrt__number-dropdown-content, nrt__period-dropdown, nrt__period-dropdown-button, nrt__period-dropdown-content, nrt__time-period-selector" })
|
|
@@ -116,15 +119,15 @@ function bt({ id: e, formState: t, activeTab: a }, s) {
|
|
|
116
119
|
)
|
|
117
120
|
);
|
|
118
121
|
}
|
|
119
|
-
const ut = '.sc-nylas-editor-tabs-h{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}.scheduler-editor.sc-nylas-editor-tabs{display:flex;flex-direction:column;height:inherit}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs{height:calc(100% - 80px);display:grid;grid-template-columns:minmax(224px, 25%) 1fr}@media screen and (max-width: 768px){.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs{display:table-column-group;height:auto}}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs{display:flex;flex-direction:column;border-right:1px solid var(--nylas-base-200);background-color:var(--nylas-base-25)}@media screen and (max-width: 768px){.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs{border-right:none}}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.sc-nylas-editor-tabs{display:flex;align-items:center;text-align:left;gap:0.5rem;padding:0.5rem 1rem;color:var(--nylas-base-900);background:var(--nylas-base-0);border:none;height:56px;font-family:var(--nylas-font-family);font-size:16px;font-weight:500;line-height:24px;cursor:pointer}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.sc-nylas-editor-tabs:not(:first-of-type){margin-top:0.25rem}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.sc-nylas-editor-tabs:last-of-type{margin-bottom:0.25rem}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.active.sc-nylas-editor-tabs{font-weight:600;background:var(--nylas-base-0);color:var(--nylas-primary);border-left:4px solid var(--nylas-primary);box-shadow:0px 1px 2px 0px rgba(0, 0, 0, 0.0588235294);box-shadow:0px 1px 3px 0px rgba(0, 0, 0, 0.1019607843)}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.hide.sc-nylas-editor-tabs{display:none}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs{max-width:692px;overflow-y:auto;overflow-x:hidden}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs .hide.sc-nylas-editor-tabs{display:none}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-info.sc-nylas-editor-tabs,.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-limits.sc-nylas-editor-tabs{width:inherit}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-info.sc-nylas-editor-tabs div[slot=inputs].sc-nylas-editor-tabs,.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-limits.sc-nylas-editor-tabs div[slot=inputs].sc-nylas-editor-tabs{display:flex;flex-direction:column;gap:1rem}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs .tab-header.sc-nylas-editor-tabs{display:flex;flex-direction:column;margin:1rem 1rem 0.5rem;row-gap:4px}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs .tab-header.sc-nylas-editor-tabs h3.sc-nylas-editor-tabs{margin:0;font-size:16px;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs .tab-header.sc-nylas-editor-tabs p.sc-nylas-editor-tabs{margin:0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.footer.sc-nylas-editor-tabs{display:flex;justify-content:space-between;align-items:center;gap:1rem;min-height:80px;padding:0 1rem;border-top:1px solid var(--nylas-base-200)}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs{flex-direction:column;height:auto}}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs .preview.sc-nylas-editor-tabs{margin-top:1rem;width:100%}}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs{display:flex;justify-content:flex-end;align-items:center;justify-self:flex-end;gap:1rem}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs{flex-direction:column-reverse;width:100%}}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.sc-nylas-editor-tabs{max-width:524px}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.unsaved-changes.sc-nylas-editor-tabs{color:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.saved-changes.sc-nylas-editor-tabs{color:var(--nylas-success)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.error.sc-nylas-editor-tabs{color:var(--nylas-error)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.error-full-width.sc-nylas-editor-tabs{max-width:660px}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button-component.sc-nylas-editor-tabs{width:100%}}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs{background:var(--nylas-primary);color:var(--nylas-base-0);height:48px;border:none;border-radius:var(--nylas-border-radius-2x);font-size:16px;line-height:24px;padding:0 1rem;cursor:pointer;width:148px}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:hover{background:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:active{background:var(--nylas-base-800)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:disabled{background:var(--nylas-base-300);cursor:not-allowed}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs span.sc-nylas-editor-tabs{display:flex;align-items:center;justify-content:center;gap:0.5rem}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button-component.save-changes.sc-nylas-editor-tabs{min-width:140px}button-component#report-issue.sc-nylas-editor-tabs{width:auto}nylas-feedback-form.sc-nylas-editor-tabs{position:absolute;top:0;height:100%;width:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;background:rgba(0, 0, 0, 0.6);z-index:2;border-radius:inherit}', ht = ut;
|
|
122
|
+
const ut = '.sc-nylas-editor-tabs-h{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}.scheduler-editor.sc-nylas-editor-tabs{display:flex;flex-direction:column;height:inherit}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs{height:calc(100% - 80px);display:grid;grid-template-columns:minmax(224px, 25%) 1fr}@media screen and (max-width: 768px){.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs{display:table-column-group;height:auto}}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs{display:flex;flex-direction:column;border-right:1px solid var(--nylas-base-200);background-color:var(--nylas-base-25)}@media screen and (max-width: 768px){.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs{border-right:none}}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.sc-nylas-editor-tabs{display:flex;align-items:center;text-align:left;gap:0.5rem;padding:0.5rem 1rem;color:var(--nylas-base-900);background:var(--nylas-base-0);border:none;height:56px;font-family:var(--nylas-font-family);font-size:16px;font-weight:500;line-height:24px;cursor:pointer}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.sc-nylas-editor-tabs:not(:first-of-type){margin-top:0.25rem}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.sc-nylas-editor-tabs:last-of-type{margin-bottom:0.25rem}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.active.sc-nylas-editor-tabs{font-weight:600;background:var(--nylas-base-0);color:var(--nylas-primary);border-left:4px solid var(--nylas-primary);box-shadow:0px 1px 2px 0px rgba(0, 0, 0, 0.0588235294);box-shadow:0px 1px 3px 0px rgba(0, 0, 0, 0.1019607843)}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.hide.sc-nylas-editor-tabs{display:none}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs{max-width:692px;overflow-y:auto;overflow-x:hidden;transition:opacity 0.05s ease-in;opacity:0}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.fadeIn.sc-nylas-editor-tabs{opacity:1}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs .hide.sc-nylas-editor-tabs{display:none}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-info.sc-nylas-editor-tabs,.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-limits.sc-nylas-editor-tabs{width:inherit}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-info.sc-nylas-editor-tabs div[slot=inputs].sc-nylas-editor-tabs,.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-limits.sc-nylas-editor-tabs div[slot=inputs].sc-nylas-editor-tabs{display:flex;flex-direction:column;gap:1rem}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs .tab-header.sc-nylas-editor-tabs{display:flex;flex-direction:column;margin:1rem 1rem 0.5rem;row-gap:4px}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs .tab-header.sc-nylas-editor-tabs h3.sc-nylas-editor-tabs{margin:0;font-size:16px;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs .tab-header.sc-nylas-editor-tabs p.sc-nylas-editor-tabs{margin:0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.footer.sc-nylas-editor-tabs{display:flex;justify-content:space-between;align-items:center;gap:1rem;min-height:80px;padding:0 1rem;border-top:1px solid var(--nylas-base-200)}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs{flex-direction:column;height:auto}}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs .preview.sc-nylas-editor-tabs{margin-top:1rem;width:100%}}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs{display:flex;justify-content:flex-end;align-items:center;justify-self:flex-end;gap:1rem}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs{flex-direction:column-reverse;width:100%}}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.sc-nylas-editor-tabs{max-width:524px}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.unsaved-changes.sc-nylas-editor-tabs{color:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.saved-changes.sc-nylas-editor-tabs{color:var(--nylas-success)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.error.sc-nylas-editor-tabs{color:var(--nylas-error)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.error-full-width.sc-nylas-editor-tabs{max-width:660px}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button-component.sc-nylas-editor-tabs{width:100%}}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs{background:var(--nylas-primary);color:var(--nylas-base-0);height:48px;border:none;border-radius:var(--nylas-border-radius-2x);font-size:16px;line-height:24px;padding:0 1rem;cursor:pointer;width:148px}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:hover{background:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:active{background:var(--nylas-base-800)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:disabled{background:var(--nylas-base-300);cursor:not-allowed}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs span.sc-nylas-editor-tabs{display:flex;align-items:center;justify-content:center;gap:0.5rem}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button-component.save-changes.sc-nylas-editor-tabs{min-width:140px}button-component#report-issue.sc-nylas-editor-tabs{width:auto}nylas-feedback-form.sc-nylas-editor-tabs{position:absolute;top:0;height:100%;width:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;background:rgba(0, 0, 0, 0.6);z-index:2;border-radius:inherit}', ht = ut;
|
|
120
123
|
var yt = function(e, t, a, s) {
|
|
121
|
-
var l = arguments.length,
|
|
124
|
+
var l = arguments.length, i = l < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, a) : s, o;
|
|
122
125
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
123
|
-
|
|
126
|
+
i = Reflect.decorate(e, t, a, s);
|
|
124
127
|
else
|
|
125
128
|
for (var d = e.length - 1; d >= 0; d--)
|
|
126
|
-
(o = e[d]) && (
|
|
127
|
-
return l > 3 &&
|
|
129
|
+
(o = e[d]) && (i = (l < 3 ? o(i) : l > 3 ? o(t, a, i) : o(t, a)) || i);
|
|
130
|
+
return l > 3 && i && Object.defineProperty(t, a, i), i;
|
|
128
131
|
}, ye = function(e, t) {
|
|
129
132
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
130
133
|
return Reflect.metadata(e, t);
|
|
@@ -132,24 +135,24 @@ var yt = function(e, t, a, s) {
|
|
|
132
135
|
const Ke = class {
|
|
133
136
|
constructor(e) {
|
|
134
137
|
te(this, e), this.schedulerConfigChanged = m(this, "schedulerConfigChanged", 7), this.schedulerConfigCreated = m(this, "schedulerConfigCreated", 7), this.cancelButtonClick = m(this, "cancelButtonClick", 7), this.formSubmitted = m(this, "formSubmitted", 7), this.previewButtonClicked = m(this, "previewButtonClicked", 7), this.schedulerEditorFormUpdated = m(this, "schedulerEditorFormUpdated", 7), this.nylasSchedulerError = m(this, "nylasSchedulerError", 6), this.dismissNotification = m(this, "dismissNotification", 7), this.formSubmissionHandler = async (t) => {
|
|
135
|
-
var ve, we, ke,
|
|
138
|
+
var ve, Ce, we, ke, xe, Ee, Se, Te, Le, Fe, Oe, Be, Pe, He, Ne, ze, Ie;
|
|
136
139
|
t.preventDefault();
|
|
137
140
|
const a = await this.formSubmitted.emit();
|
|
138
141
|
if (b("[nylas-editor-tabs]", "formSubmissionHandler", a), !this.formRef.checkValidity() || a.defaultPrevented) {
|
|
139
142
|
this.setError({
|
|
140
|
-
message: this.formRef.validationMessage ||
|
|
143
|
+
message: this.formRef.validationMessage || r.t("fixFormErrors"),
|
|
141
144
|
type: _.Error,
|
|
142
145
|
category: v.Component,
|
|
143
|
-
title:
|
|
146
|
+
title: r.t("nylasEditorTabs.formErrorTitle")
|
|
144
147
|
});
|
|
145
148
|
return;
|
|
146
149
|
}
|
|
147
150
|
this.isLoading = !0, this.hasUnsavedChanges = !1;
|
|
148
151
|
const l = this.updateFormState();
|
|
149
152
|
b("[nylas-editor-tabs]", "formState", l);
|
|
150
|
-
const { title:
|
|
153
|
+
const { title: i, description: o, duration: d, availability: c, bookingCalendar: p, location: h, bookingType: f, buffer: w, availableDaysInFuture: T, minCancellationNotice: O, minBookingNotice: U, cancellationPolicy: N, timeslotInterval: L, additionalGuestsHidden: z, hideCancellationOptions: D, hideReschedulingOptions: R, participants: F, participantOpenHours: E, participantSpecificTimeAvailability: B, additionalFields: C, participantCalendars: k, conferencing: A, participantBookingCalendars: S, reminders: $, emailTemplate: j, redirectUrl: G, availabilityMethod: J, slug: Z, appearance: Y, name: q, disableEmails: Q, organizerLocale: X } = l, x = ((Ce = (ve = this.selectedConfiguration) == null ? void 0 : ve.participants) == null ? void 0 : Ce.find((y) => y.is_organizer)) || (F == null ? void 0 : F.find((y) => y.is_organizer)), V = k && (x != null && x.email) ? k[x == null ? void 0 : x.email] : [], P = ((we = x == null ? void 0 : x.booking) == null ? void 0 : we.calendar_id) || p, H = d ? parseInt(d) : 30, M = F && (F == null ? void 0 : F.length) > 0 ? F : [
|
|
151
154
|
{
|
|
152
|
-
name: (x == null ? void 0 : x.name) ?? ((
|
|
155
|
+
name: (x == null ? void 0 : x.name) ?? ((ke = this.currentUser) == null ? void 0 : ke.name) ?? "",
|
|
153
156
|
email: (x == null ? void 0 : x.email) ?? ((xe = this.currentUser) == null ? void 0 : xe.email) ?? "",
|
|
154
157
|
is_organizer: !0,
|
|
155
158
|
timezone: (c == null ? void 0 : c.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
@@ -170,14 +173,14 @@ const Ke = class {
|
|
|
170
173
|
slug: Z,
|
|
171
174
|
name: q,
|
|
172
175
|
availability: {
|
|
173
|
-
duration_minutes:
|
|
174
|
-
interval_minutes: (L == null ? void 0 : L.interval) ??
|
|
176
|
+
duration_minutes: H,
|
|
177
|
+
interval_minutes: (L == null ? void 0 : L.interval) ?? H,
|
|
175
178
|
round_to: L == null ? void 0 : L.roundTo,
|
|
176
179
|
availability_rules: {
|
|
177
180
|
availability_method: K,
|
|
178
|
-
buffer:
|
|
181
|
+
buffer: w || { before: 0, after: 0 },
|
|
179
182
|
default_open_hours: (c == null ? void 0 : c.openHours) ?? ((Pe = (Be = (Oe = this.selectedConfiguration) == null ? void 0 : Oe.availability) == null ? void 0 : Be.availability_rules) == null ? void 0 : Pe.default_open_hours) ?? $e,
|
|
180
|
-
round_robin_group_id: ((ze = (
|
|
183
|
+
round_robin_group_id: ((ze = (Ne = (He = this.selectedConfiguration) == null ? void 0 : He.availability) == null ? void 0 : Ne.availability_rules) == null ? void 0 : ze.round_robin_group_id) ?? ""
|
|
181
184
|
}
|
|
182
185
|
},
|
|
183
186
|
participants: [
|
|
@@ -185,7 +188,7 @@ const Ke = class {
|
|
|
185
188
|
var Ge, Ue, De, Re, je, Me;
|
|
186
189
|
let ee = (c == null ? void 0 : c.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
187
190
|
if ((Ge = E == null ? void 0 : E[y.email]) != null && Ge.length && (ee = (De = (Ue = E == null ? void 0 : E[y.email]) == null ? void 0 : Ue[0]) == null ? void 0 : De.timezone), y.is_organizer) {
|
|
188
|
-
const Ae = S != null && S[y.email] ? S == null ? void 0 : S[y.email] : P || "primary", he =
|
|
191
|
+
const Ae = S != null && S[y.email] ? S == null ? void 0 : S[y.email] : P || "primary", he = k != null && k[y.email] ? k == null ? void 0 : k[y.email] : V != null && V.length ? V : ["primary"], nt = he.length === 1 && he[0] === "primary";
|
|
189
192
|
return {
|
|
190
193
|
name: y.name ?? "",
|
|
191
194
|
email: y.email,
|
|
@@ -195,13 +198,13 @@ const Ke = class {
|
|
|
195
198
|
calendar_ids: nt ? [Ae] : he,
|
|
196
199
|
open_hours: (E == null ? void 0 : E[y.email]) ?? ((Re = y.availability) == null ? void 0 : Re.open_hours) ?? []
|
|
197
200
|
},
|
|
198
|
-
|
|
201
|
+
specific_time_availability: (B == null ? void 0 : B[y.email]) ?? y.specific_time_availability ?? [],
|
|
199
202
|
booking: {
|
|
200
203
|
calendar_id: Ae
|
|
201
204
|
}
|
|
202
205
|
};
|
|
203
206
|
}
|
|
204
|
-
const ae = S != null && S[y.email] ? { calendar_id: S == null ? void 0 : S[y.email] } : (y == null ? void 0 : y.booking) ?? void 0, ue = (
|
|
207
|
+
const ae = S != null && S[y.email] ? { calendar_id: S == null ? void 0 : S[y.email] } : (y == null ? void 0 : y.booking) ?? void 0, ue = (k == null ? void 0 : k[y.email]) ?? ((je = y.availability) == null ? void 0 : je.calendar_ids) ?? ["primary"], tt = ue.length === 1 && ue[0] === "primary";
|
|
205
208
|
return {
|
|
206
209
|
...y,
|
|
207
210
|
timezone: ee,
|
|
@@ -210,12 +213,12 @@ const Ke = class {
|
|
|
210
213
|
open_hours: (E == null ? void 0 : E[y.email]) ?? ((Me = y.availability) == null ? void 0 : Me.open_hours) ?? []
|
|
211
214
|
} : void 0,
|
|
212
215
|
booking: ae,
|
|
213
|
-
|
|
216
|
+
specific_time_availability: (B == null ? void 0 : B[y.email]) ?? y.specific_time_availability ?? []
|
|
214
217
|
};
|
|
215
218
|
}) : []
|
|
216
219
|
],
|
|
217
220
|
event_booking: {
|
|
218
|
-
title: (
|
|
221
|
+
title: (i == null ? void 0 : i.toString()) ?? "",
|
|
219
222
|
description: (o == null ? void 0 : o.toString()) ?? "",
|
|
220
223
|
location: (h == null ? void 0 : h.toString()) ?? "",
|
|
221
224
|
booking_type: (f == null ? void 0 : f.toString()) ?? "booking",
|
|
@@ -225,14 +228,14 @@ const Ke = class {
|
|
|
225
228
|
disable_emails: typeof Q == "boolean" ? Q : !1
|
|
226
229
|
},
|
|
227
230
|
scheduler: {
|
|
228
|
-
cancellation_policy:
|
|
231
|
+
cancellation_policy: N ?? "",
|
|
229
232
|
available_days_in_future: T ?? 30,
|
|
230
233
|
min_cancellation_notice: O ?? 0,
|
|
231
234
|
min_booking_notice: U ?? 60,
|
|
232
235
|
hide_additional_guests: z ?? !1,
|
|
233
236
|
hide_cancellation_options: D ?? !1,
|
|
234
237
|
hide_rescheduling_options: R ?? !1,
|
|
235
|
-
additional_fields:
|
|
238
|
+
additional_fields: C,
|
|
236
239
|
email_template: j ? {
|
|
237
240
|
...j,
|
|
238
241
|
organizer_locale: X || "en",
|
|
@@ -247,38 +250,38 @@ const Ke = class {
|
|
|
247
250
|
this.isLoading = !1, this.changesSaved = !0, setTimeout(() => {
|
|
248
251
|
this.changesSaved = !1;
|
|
249
252
|
}, 5e3);
|
|
250
|
-
},
|
|
253
|
+
}, ie = this.checkForBookingFormErrors(W), re = ((Ie = this.configurations) == null ? void 0 : Ie.find((y) => {
|
|
251
254
|
var ee;
|
|
252
255
|
return y.id === ((ee = this.selectedConfiguration) == null ? void 0 : ee.id);
|
|
253
|
-
})) || {}, et = this.checkForOrganizerConfirmationError(_e(W,
|
|
254
|
-
|
|
256
|
+
})) || {}, et = this.checkForOrganizerConfirmationError(_e(W, re));
|
|
257
|
+
ie || et || this.schedulerConfigChanged.emit({ config: W, resetLoadingState: se, action: this.action, host: this.host });
|
|
255
258
|
}, this.isConfigRoundRobin = (t) => {
|
|
256
|
-
var a, s, l,
|
|
257
|
-
return ((s = (a = t == null ? void 0 : t.availability) == null ? void 0 : a.availability_rules) == null ? void 0 : s.availability_method) === "max-availability" || ((
|
|
259
|
+
var a, s, l, i;
|
|
260
|
+
return ((s = (a = t == null ? void 0 : t.availability) == null ? void 0 : a.availability_rules) == null ? void 0 : s.availability_method) === "max-availability" || ((i = (l = t.availability) == null ? void 0 : l.availability_rules) == null ? void 0 : i.availability_method) === "max-fairness";
|
|
258
261
|
}, this.checkForOrganizerConfirmationError = (t) => {
|
|
259
262
|
var o, d;
|
|
260
263
|
let a = !1, s = "";
|
|
261
|
-
const l = ((o = t.event_booking) == null ? void 0 : o.booking_type) === "organizer-confirmation",
|
|
262
|
-
return l && !
|
|
264
|
+
const l = ((o = t.event_booking) == null ? void 0 : o.booking_type) === "organizer-confirmation", i = (d = t.scheduler) == null ? void 0 : d.organizer_confirmation_url;
|
|
265
|
+
return l && !i && (s += "Organizer confirmation URL is required when using organizer confirmation booking type.", a = !0), a && (this.isLoading = !1, this.host.setError({
|
|
263
266
|
message: s,
|
|
264
267
|
type: _.Error,
|
|
265
268
|
category: v.Component,
|
|
266
269
|
title: "Error:"
|
|
267
270
|
})), a;
|
|
268
271
|
}, this.checkForBookingFormErrors = (t) => {
|
|
269
|
-
var
|
|
272
|
+
var i;
|
|
270
273
|
let a = !1, s = "";
|
|
271
|
-
const l = (
|
|
274
|
+
const l = (i = t.scheduler) == null ? void 0 : i.additional_fields;
|
|
272
275
|
return l && (s = "", Object.entries(l).forEach((o) => {
|
|
273
276
|
const d = o[1];
|
|
274
277
|
if (d.label === "") {
|
|
275
|
-
s +=
|
|
278
|
+
s += r.t("nylasEditorTabs.bookingFormError_label", { type: d.type }), a = !0;
|
|
276
279
|
return;
|
|
277
280
|
}
|
|
278
281
|
if (d.options) {
|
|
279
282
|
for (const c of d.options)
|
|
280
283
|
if (c.trim() === "") {
|
|
281
|
-
s +=
|
|
284
|
+
s += r.t("nylasEditorTabs.bookingFormError_option", { label: d.label, type: d.type }), a = !0;
|
|
282
285
|
break;
|
|
283
286
|
}
|
|
284
287
|
}
|
|
@@ -286,9 +289,9 @@ const Ke = class {
|
|
|
286
289
|
message: s,
|
|
287
290
|
type: _.Error,
|
|
288
291
|
category: v.Component,
|
|
289
|
-
title:
|
|
292
|
+
title: r.t("nylasEditorTabs.bookingFormError")
|
|
290
293
|
})), a;
|
|
291
|
-
}, this.calendars = void 0, this.selectedConfiguration = void 0, this.configurations = void 0, this.currentUser = void 0, this.schedulerPreviewLink = "", this.mode = "app", this.hideEditorTabs = [], this.enableUserFeedback = !0, this.selectedLanguage = void 0, this.selectedEventType = void 0, this.action = "create", this.showFeedbackModal = !1, this.activeTab = u.EventInfo, this.isLoading = !1, this.hasUnsavedChanges = !1, this.changesSaved = !1, this.formState = {}, this.error = {
|
|
294
|
+
}, this.calendars = void 0, this.selectedConfiguration = void 0, this.configurations = void 0, this.currentUser = void 0, this.schedulerPreviewLink = "", this.mode = "app", this.hideEditorTabs = [], this.enableUserFeedback = !0, this.selectedLanguage = void 0, this.selectedEventType = void 0, this.themeConfig = void 0, this.action = "create", this.showFeedbackModal = !1, this.activeTab = u.EventInfo, this.isLoading = !1, this.hasUnsavedChanges = !1, this.changesSaved = !1, this.loaded = !1, this.formState = {}, this.error = {
|
|
292
295
|
message: "",
|
|
293
296
|
type: _.Error,
|
|
294
297
|
category: v.Component,
|
|
@@ -306,11 +309,19 @@ const Ke = class {
|
|
|
306
309
|
});
|
|
307
310
|
}
|
|
308
311
|
selectedLanguageChangedHandler(e, t) {
|
|
309
|
-
e !== t && (
|
|
312
|
+
e !== t && (r.changeLanguage(e), this.error && this.error.message && (this.error = {
|
|
310
313
|
...this.error,
|
|
311
|
-
message:
|
|
314
|
+
message: r.t("fixFormErrors")
|
|
312
315
|
}, this.showErrorNotification(this.error)));
|
|
313
316
|
}
|
|
317
|
+
themeConfigChangedHandler(e, t) {
|
|
318
|
+
e !== t && this.applyThemeConfig(e);
|
|
319
|
+
}
|
|
320
|
+
applyThemeConfig(e) {
|
|
321
|
+
if (e)
|
|
322
|
+
for (const [t, a] of Object.entries(e))
|
|
323
|
+
this.host.style.setProperty(`${t}`, a);
|
|
324
|
+
}
|
|
314
325
|
async schedulerConfigCreatedEventHandler(e) {
|
|
315
326
|
return this.schedulerConfigCreated.emit(e);
|
|
316
327
|
}
|
|
@@ -320,7 +331,7 @@ const Ke = class {
|
|
|
320
331
|
message: e.message,
|
|
321
332
|
type: e.type,
|
|
322
333
|
category: e.category,
|
|
323
|
-
title: e.title ||
|
|
334
|
+
title: e.title || r.t("genericErrorTitle")
|
|
324
335
|
}, (t = this.error) != null && t.message && this.showErrorNotification(this.error);
|
|
325
336
|
}
|
|
326
337
|
async resetError() {
|
|
@@ -342,7 +353,7 @@ const Ke = class {
|
|
|
342
353
|
var t, a;
|
|
343
354
|
b("[nylas-editor-tabs]", "componentDidLoad"), this.enableUserFeedback && !Je() && Ve({
|
|
344
355
|
dsn: "https://9d5731f1c77ca84c9ed3fb9b3ccf7ee1@o74852.ingest.us.sentry.io/4507889638178816",
|
|
345
|
-
release: "2.0
|
|
356
|
+
release: "2.1.0",
|
|
346
357
|
integrations: (s) => [
|
|
347
358
|
...s.filter((l) => !1),
|
|
348
359
|
qe({
|
|
@@ -354,7 +365,7 @@ const Ke = class {
|
|
|
354
365
|
beforeSend: () => null
|
|
355
366
|
}), (t = this.selectedConfiguration) != null && t.id && this.configChangedHandler(this.selectedConfiguration);
|
|
356
367
|
const e = (a = this.host.querySelector("button.tab:not(.hide)")) == null ? void 0 : a.name;
|
|
357
|
-
e && (this.activeTab = e);
|
|
368
|
+
e && (this.activeTab = e), this.loaded = !0;
|
|
358
369
|
}
|
|
359
370
|
disconnectedCallback() {
|
|
360
371
|
b("[nylas-editor-tabs]", "disconnectedCallback");
|
|
@@ -371,7 +382,7 @@ const Ke = class {
|
|
|
371
382
|
this.showFeedbackModal = !1;
|
|
372
383
|
}
|
|
373
384
|
feedbackSubmittedHandler(e) {
|
|
374
|
-
var s, l,
|
|
385
|
+
var s, l, i, o, d, c;
|
|
375
386
|
const a = {
|
|
376
387
|
eventId: Ze("Scheduler Editor User Feedback", {
|
|
377
388
|
extra: {
|
|
@@ -386,8 +397,8 @@ const Ke = class {
|
|
|
386
397
|
captureContext: {
|
|
387
398
|
tags: {
|
|
388
399
|
"nylas-web-element": "nylas-scheduler-editor",
|
|
389
|
-
"nylas-web-element-version": "2.0
|
|
390
|
-
"nylas-config-id": (
|
|
400
|
+
"nylas-web-element-version": "2.1.0",
|
|
401
|
+
"nylas-config-id": (i = this.selectedConfiguration) == null ? void 0 : i.id,
|
|
391
402
|
"nylas-slug": (o = this.selectedConfiguration) == null ? void 0 : o.slug,
|
|
392
403
|
"host-url": window.location.href
|
|
393
404
|
},
|
|
@@ -412,45 +423,45 @@ const Ke = class {
|
|
|
412
423
|
});
|
|
413
424
|
}
|
|
414
425
|
getFormStateFromConfig(e) {
|
|
415
|
-
var a, s, l,
|
|
426
|
+
var a, s, l, i, o, d, c, p, h, f, w, T, O, U, N, L, z, D, R, F, E, B, C, k, A, S, $, j, G, J, Z, Y, q, Q, X, x, V;
|
|
416
427
|
let t = (a = e == null ? void 0 : e.participants) == null ? void 0 : a.find((P) => P.is_organizer);
|
|
417
|
-
return !t && ((l = (s = e == null ? void 0 : e.availability) == null ? void 0 : s.availability_rules) == null ? void 0 : l.availability_method) !== "collective" && (t = (
|
|
418
|
-
var
|
|
419
|
-
return P.email === ((
|
|
428
|
+
return !t && ((l = (s = e == null ? void 0 : e.availability) == null ? void 0 : s.availability_rules) == null ? void 0 : l.availability_method) !== "collective" && (t = (i = e == null ? void 0 : e.participants) == null ? void 0 : i.find((P) => {
|
|
429
|
+
var H;
|
|
430
|
+
return P.email === ((H = this.currentUser) == null ? void 0 : H.email);
|
|
420
431
|
}), t && (t.is_organizer = !0)), e != null && e.appearance && console.info("Appearance settings have been returned from the given configuration; please remember to grab them from the configSettingsLoaded event and apply them as desired."), {
|
|
421
432
|
title: ((o = e == null ? void 0 : e.event_booking) == null ? void 0 : o.title) ?? "",
|
|
422
433
|
description: ((d = e == null ? void 0 : e.event_booking) == null ? void 0 : d.description) ?? "",
|
|
423
434
|
duration: ((p = (c = e == null ? void 0 : e.availability) == null ? void 0 : c.duration_minutes) == null ? void 0 : p.toString()) ?? "30",
|
|
424
435
|
availability: {
|
|
425
436
|
timezone: ((h = e == null ? void 0 : e.event_booking) == null ? void 0 : h.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
426
|
-
openHours: ((
|
|
437
|
+
openHours: ((w = (f = e == null ? void 0 : e.availability) == null ? void 0 : f.availability_rules) == null ? void 0 : w.default_open_hours) ?? $e
|
|
427
438
|
},
|
|
428
439
|
additionalFields: ((T = e == null ? void 0 : e.scheduler) == null ? void 0 : T.additional_fields) ?? {},
|
|
429
440
|
conferencing: ((O = e == null ? void 0 : e.event_booking) == null ? void 0 : O.conferencing) ?? {},
|
|
430
441
|
calendarIds: ((U = t == null ? void 0 : t.availability) == null ? void 0 : U.calendar_ids) ?? [],
|
|
431
442
|
participants: (e == null ? void 0 : e.participants) ?? [],
|
|
432
|
-
bookingCalendar: ((
|
|
443
|
+
bookingCalendar: ((N = t == null ? void 0 : t.booking) == null ? void 0 : N.calendar_id) ?? (t == null ? void 0 : t.email) ?? "",
|
|
433
444
|
location: ((L = e == null ? void 0 : e.event_booking) == null ? void 0 : L.location) ?? "",
|
|
434
445
|
bookingType: ((z = e == null ? void 0 : e.event_booking) == null ? void 0 : z.booking_type) ?? "booking",
|
|
435
446
|
buffer: ((R = (D = e == null ? void 0 : e.availability) == null ? void 0 : D.availability_rules) == null ? void 0 : R.buffer) ?? { before: 0, after: 0 },
|
|
436
447
|
cancellationPolicy: ((F = e == null ? void 0 : e.scheduler) == null ? void 0 : F.cancellation_policy) ?? "",
|
|
437
448
|
availableDaysInFuture: ((E = e == null ? void 0 : e.scheduler) == null ? void 0 : E.available_days_in_future) ?? 30,
|
|
438
449
|
minCancellationNotice: ((B = e == null ? void 0 : e.scheduler) == null ? void 0 : B.min_cancellation_notice) ?? 0,
|
|
439
|
-
minBookingNotice: ((
|
|
450
|
+
minBookingNotice: ((C = e == null ? void 0 : e.scheduler) == null ? void 0 : C.min_booking_notice) ?? 60,
|
|
440
451
|
timeslotInterval: {
|
|
441
|
-
interval: ((
|
|
452
|
+
interval: ((k = e == null ? void 0 : e.availability) == null ? void 0 : k.interval_minutes) ?? ((A = e == null ? void 0 : e.availability) == null ? void 0 : A.duration_minutes),
|
|
442
453
|
roundTo: (S = e == null ? void 0 : e.availability) == null ? void 0 : S.round_to
|
|
443
454
|
},
|
|
444
455
|
additionalGuestsHidden: (($ = e == null ? void 0 : e.scheduler) == null ? void 0 : $.hide_additional_guests) ?? !1,
|
|
445
456
|
hideCancellationOptions: ((j = e == null ? void 0 : e.scheduler) == null ? void 0 : j.hide_cancellation_options) ?? !1,
|
|
446
457
|
hideReschedulingOptions: ((G = e == null ? void 0 : e.scheduler) == null ? void 0 : G.hide_rescheduling_options) ?? !1,
|
|
447
|
-
participantBookingCalendars: ((J = e == null ? void 0 : e.participants) == null ? void 0 : J.reduce((P,
|
|
458
|
+
participantBookingCalendars: ((J = e == null ? void 0 : e.participants) == null ? void 0 : J.reduce((P, H) => {
|
|
448
459
|
var M, K;
|
|
449
|
-
return (M =
|
|
460
|
+
return (M = H.booking) != null && M.calendar_id && (P[H.email] = (K = H.booking) == null ? void 0 : K.calendar_id), P;
|
|
450
461
|
})) ?? {},
|
|
451
|
-
participantCalendars: ((Z = e == null ? void 0 : e.participants) == null ? void 0 : Z.reduce((P,
|
|
462
|
+
participantCalendars: ((Z = e == null ? void 0 : e.participants) == null ? void 0 : Z.reduce((P, H) => {
|
|
452
463
|
var M;
|
|
453
|
-
return P[
|
|
464
|
+
return P[H.email] = (M = H.availability) == null ? void 0 : M.calendar_ids, P;
|
|
454
465
|
}, {})) ?? {},
|
|
455
466
|
reminders: (Y = e == null ? void 0 : e.event_booking) == null ? void 0 : Y.reminders,
|
|
456
467
|
emailTemplate: (q = e == null ? void 0 : e.scheduler) == null ? void 0 : q.email_template,
|
|
@@ -522,9 +533,9 @@ const Ke = class {
|
|
|
522
533
|
this.formState.participantOpenHours = a;
|
|
523
534
|
break;
|
|
524
535
|
}
|
|
525
|
-
case "participant-custom-availability-specific-
|
|
536
|
+
case "participant-custom-availability-specific-time": {
|
|
526
537
|
const a = JSON.parse(e.toString());
|
|
527
|
-
this.formState.
|
|
538
|
+
this.formState.participantSpecificTimeAvailability = a;
|
|
528
539
|
break;
|
|
529
540
|
}
|
|
530
541
|
case "additional-fields":
|
|
@@ -581,17 +592,20 @@ const Ke = class {
|
|
|
581
592
|
e.preventDefault(), this.showFeedbackModal = !0;
|
|
582
593
|
}
|
|
583
594
|
render() {
|
|
584
|
-
var e, t, a, s, l,
|
|
585
|
-
return b("[nylas-editor-tabs]", "render", this.formState), n(ce, { key: "
|
|
595
|
+
var e, t, a, s, l, i;
|
|
596
|
+
return b("[nylas-editor-tabs]", "render", this.formState), n(ce, { key: "d6de6e647a438f943144dcf2a18b8ea02346e0bc" }, n("nylas-notification", { key: "795d417d7862ff3158056ac723f391aa0df9ba58" }), n("form", { key: "b3885ab861807c55e0afe513bbab779c3d1852fb", onSubmit: this.formSubmissionHandler, class: "scheduler-editor", ref: (o) => this.formRef = o, noValidate: !0 }, this.mode === "app" ? n("div", { class: "form-contents", part: "editor__form-contents net__form-contents" }, n("div", { class: "tabs", part: "editor__tabs net__tabs" }, n("button", { name: u.EventInfo, class: { tab: !0, active: this.activeTab == u.EventInfo, hide: this.hideTab(u.EventInfo) }, part: "editortab__event-info net__tab-event-info", onClick: (o) => this.setActiveTab(o, u.EventInfo) }, n("calendar-info-icon", { width: "16", height: "16" }), r.t("eventInfoTab")), n("button", { name: u.Availability, class: { tab: !0, active: this.activeTab == u.Availability, hide: this.hideTab(u.Availability) }, part: "editortab__availability net__tab-availability", onClick: (o) => this.setActiveTab(o, u.Availability) }, n("calendar-patterns-icon", { width: "16", height: "16" }), r.t("availabilityTab")), n("button", { name: u.Participants, class: { tab: !0, active: this.activeTab == u.Participants, hide: this.hideTab(u.Participants) }, part: "editortab__participants net__tab-participants", onClick: (o) => this.setActiveTab(o, u.Participants) }, n("people-icon", { width: "16", height: "16" }), r.t("participantsTab")), n("button", { name: u.BookingOptions, class: { tab: !0, active: this.activeTab == u.BookingOptions, hide: this.hideTab(u.BookingOptions) }, part: "editortab__booking-options net__tab-booking-options", onClick: (o) => this.setActiveTab(o, u.BookingOptions) }, n("flow-icon", { width: "16", height: "16" }), r.t("bookingOptionsTab")), n("button", { name: u.BookingForm, class: { tab: !0, active: this.activeTab == "bookingForm", hide: this.hideTab(u.BookingForm) }, part: "editortab__booking-form net__tab-booking-form", onClick: (o) => this.setActiveTab(o, u.BookingForm) }, this.activeTab == u.BookingForm ? n("calendar-agenda-fill-icon", { width: "16", height: "16" }) : n("calendar-agenda-icon", { width: "16", height: "16" }), r.t("bookingFormTab")), n("button", { name: u.Communications, class: { tab: !0, active: this.activeTab == "communications", hide: this.hideTab(u.Communications) }, onClick: (o) => this.setActiveTab(o, u.Communications), part: "editortab__communications net__tab-communications" }, this.activeTab == u.Communications ? n("envelope-fill-icon", { width: "16", height: "16" }) : n("envelope-icon", { width: "16", height: "16" }), r.t("communicationsTab")), n("button", { name: u.PageStyles, class: { tab: !0, active: this.activeTab == "pageStyles", hide: this.hideTab(u.PageStyles) }, onClick: (o) => this.setActiveTab(o, u.PageStyles), part: "editortab__page-styles net__tab-page-styles" }, this.activeTab == u.PageStyles ? n("paintbrush-fill-icon", { width: "16", height: "16" }) : n("paintbrush-icon", { width: "16", height: "16" }), r.t("pageStylesTab"))), n("div", { class: {
|
|
597
|
+
"tab-content": !0,
|
|
598
|
+
fadeIn: this.loaded
|
|
599
|
+
}, part: "editor__tab-content net__tab-content" }, n(bt, { formState: this.formState, activeTab: this.activeTab, currentUser: this.currentUser, calendars: this.calendars, id: ((e = this.selectedConfiguration) == null ? void 0 : e.id) ?? "new", i18next: r }))) : n("div", { class: "composable", key: (t = this.selectedConfiguration) == null ? void 0 : t.id }, n("slot", null)), n("div", { key: "a7611ff8dc0c82d3c6d9f3d3d3c9f8b34f0d30c3", class: "footer", part: "editor__footer net__footer" }, n("div", { key: "2e448c950a6278a1c9864c8ceb61adf42a0eff81", class: "preview", part: "editor__footer-preview net__footer-preview" }, this.enableUserFeedback && n("button-component", { title: "Share your feedback", id: "report-issue", variant: "basic", onClick: (o) => this.onFeedbackClick(o) }, n("feedback-icon", null))), n("div", { key: "7580eeb4b356093c1bdc69fbc108db7f05abeed9", class: "buttons", part: "editor__footer-buttons net__footer-buttons" }, n("p", { key: "14f425d8a5b78602c03459959cb138f3ca0d8acd", class: {
|
|
586
600
|
"unsaved-changes": this.hasUnsavedChanges && !this.changesSaved,
|
|
587
601
|
"saved-changes": this.changesSaved,
|
|
588
602
|
error: ((a = this.error) == null ? void 0 : a.message) !== "",
|
|
589
603
|
"error-full-width": ((s = this.error) == null ? void 0 : s.message) !== "" && this.action === "create"
|
|
590
|
-
} }, ((l = this.error) == null ? void 0 : l.message) == "" && this.hasUnsavedChanges && !this.changesSaved ?
|
|
591
|
-
o.preventDefault(), this.previewButtonClicked.emit(this.host).defaultPrevented || window.open(
|
|
592
|
-
}, variant: "basic" }, n("eye-icon", null)), n("button-component", { key: "
|
|
604
|
+
} }, ((l = this.error) == null ? void 0 : l.message) == "" && this.hasUnsavedChanges && !this.changesSaved ? r.t("unsavedChangesLabel") : ((i = this.error) == null ? void 0 : i.message) == "" && this.changesSaved ? `${r.t("changesSavedLabel")}!` : ""), this.schedulerPreviewLink !== "" && this.action === "edit" && n("button-component", { title: "Preview", type: "button", disabled: this.isLoading, clickHandler: (o) => {
|
|
605
|
+
o.preventDefault(), this.previewButtonClicked.emit(this.host).defaultPrevented || window.open(de(this.schedulerPreviewLink, this.selectedConfiguration), "_blank");
|
|
606
|
+
}, variant: "basic" }, n("eye-icon", null)), n("button-component", { key: "eee37b3b9ff4fcff14891a681f544e7b617cb22d", type: "button", disabled: this.isLoading, clickHandler: (o) => {
|
|
593
607
|
o.preventDefault(), this.cancelButtonClick.emit(), this.host.resetError();
|
|
594
|
-
}, variant: "basic", part: "editor__footer-cancel net__footer-cancel" },
|
|
608
|
+
}, variant: "basic", part: "editor__footer-cancel net__footer-cancel" }, r.t("cancelButton")), n("button-component", { key: "e4a8bc0a8d3af872005595f2581a388ce3eac659", class: { "save-changes": this.action === "edit" }, type: "submit", disabled: this.isLoading, part: "editor__footer-cta, net__footer-cta" }, this.isLoading ? n("span", null, r.t("savingButtonText"), n("loading-icon", null), " ") : this.action === "create" ? `${r.t("createButtonText")}` : `${r.t("saveChangesButtonText")}`)))), this.showFeedbackModal && n("nylas-feedback-form", null));
|
|
595
609
|
}
|
|
596
610
|
get host() {
|
|
597
611
|
return pe(this);
|
|
@@ -600,7 +614,8 @@ const Ke = class {
|
|
|
600
614
|
return {
|
|
601
615
|
selectedConfiguration: ["configChangedHandler"],
|
|
602
616
|
currentUser: ["userChangedHandler"],
|
|
603
|
-
selectedLanguage: ["selectedLanguageChangedHandler"]
|
|
617
|
+
selectedLanguage: ["selectedLanguageChangedHandler"],
|
|
618
|
+
themeConfig: ["themeConfigChangedHandler"]
|
|
604
619
|
};
|
|
605
620
|
}
|
|
606
621
|
};
|
|
@@ -613,25 +628,26 @@ yt([
|
|
|
613
628
|
["schedulerConfig.currentUser", "currentUser"],
|
|
614
629
|
["schedulerConfig.configurations", "configurations"],
|
|
615
630
|
["schedulerConfig.selectedLanguage", "selectedLanguage"],
|
|
616
|
-
["schedulerConfig.selectedEventType", "selectedEventType"]
|
|
631
|
+
["schedulerConfig.selectedEventType", "selectedEventType"],
|
|
632
|
+
["schedulerConfig.themeConfig", "themeConfig"]
|
|
617
633
|
]),
|
|
618
634
|
eventToProps: {
|
|
619
635
|
schedulerConfigChanged: async (e, t) => {
|
|
620
|
-
const { resetLoadingState: a, host: s, action: l, config:
|
|
636
|
+
const { resetLoadingState: a, host: s, action: l, config: i } = e.detail, o = (d, c) => {
|
|
621
637
|
const [p, h] = d;
|
|
622
638
|
!p && h ? s.setError({
|
|
623
|
-
message: h.message ||
|
|
639
|
+
message: h.message || r.t("genericErrorTitle"),
|
|
624
640
|
type: _.Error,
|
|
625
641
|
category: v.Component,
|
|
626
642
|
title: c
|
|
627
643
|
}) : p && !h && l === "create" && (s.schedulerConfigCreatedEventHandler({ config: p, action: l, host: s }), t.schedulerConfigStore.set("selectedEventType", void 0)), a && a(e);
|
|
628
644
|
};
|
|
629
645
|
if (l === "edit") {
|
|
630
|
-
const d = await t.schedulerConfig.updateConfiguration(
|
|
631
|
-
o(d,
|
|
646
|
+
const d = await t.schedulerConfig.updateConfiguration(i);
|
|
647
|
+
o(d, r.t("nylasEditorTabs.updateConfigError"));
|
|
632
648
|
} else {
|
|
633
|
-
const d = await t.schedulerConfig.createConfiguration(
|
|
634
|
-
o(d,
|
|
649
|
+
const d = await t.schedulerConfig.createConfiguration(i);
|
|
650
|
+
o(d, r.t("nylasEditorTabs.createConfigError"));
|
|
635
651
|
}
|
|
636
652
|
},
|
|
637
653
|
cancelButtonClick: async (e, t) => {
|
|
@@ -668,7 +684,7 @@ var g;
|
|
|
668
684
|
})(g || (g = {}));
|
|
669
685
|
function gt({ id: e, formState: t, activeTab: a }, s) {
|
|
670
686
|
return n(
|
|
671
|
-
|
|
687
|
+
le,
|
|
672
688
|
null,
|
|
673
689
|
a === g.CalendarView && n(
|
|
674
690
|
"div",
|
|
@@ -685,7 +701,7 @@ function gt({ id: e, formState: t, activeTab: a }, s) {
|
|
|
685
701
|
n(
|
|
686
702
|
"div",
|
|
687
703
|
{ slot: "inputs" },
|
|
688
|
-
n("nylas-booking-confirmation-type", { name: "confirmation-type", exportparts: "nbct, nbct__header, nbct__dropdown, nbct__dropdown-button, nbct__dropdown-content" }),
|
|
704
|
+
n("nylas-booking-confirmation-type", { name: "confirmation-type", showComponent: !1, exportparts: "nbct, nbct__header, nbct__dropdown, nbct__dropdown-button, nbct__dropdown-content" }),
|
|
689
705
|
n("nylas-booking-confirmation-redirect", { name: "confirmation-redirect", exportparts: "nbcr, nbcr__header, nbcr__dropdown, nbcr__dropdown-button, nbcr__dropdown-content, nbcr__input-textfield" })
|
|
690
706
|
)
|
|
691
707
|
),
|
|
@@ -707,7 +723,7 @@ function gt({ id: e, formState: t, activeTab: a }, s) {
|
|
|
707
723
|
{ key: `communications-${e}`, class: { hide: a !== g.Communications } },
|
|
708
724
|
n("nylas-disable-emails", { name: "disable-emails", exportparts: "nde, nde__toggle-label, nde_toggle-input, nde_toggle-slider" }),
|
|
709
725
|
!(t != null && t.disableEmails) && n(
|
|
710
|
-
|
|
726
|
+
le,
|
|
711
727
|
null,
|
|
712
728
|
n("nylas-confirmation-email", { name: "confirmation-email-template", exportparts: "nce, nce__tab-heading, nce__header, nce__body, nce__confirmation-email-toggle--container, nce__summary, nce__reminder-input_dropdown, nce__reminder-input_dropdown-input, nce__reminder-input_dropdown-content" }),
|
|
713
729
|
n("nylas-reminder-emails", { name: "reminder-overrides", exportparts: "nre, nre__tab-heading, nre__header, nre__body, nre__confirmation-email-toggle--container, nre__summary, nrt, nrt__number-dropdown, nrt__number-dropdown-button, nrt__number-dropdown-content, nrt__period-dropdown, nrt__period-dropdown-button, nrt__period-dropdown-content, nrt__time-period-selector" })
|
|
@@ -729,13 +745,13 @@ function gt({ id: e, formState: t, activeTab: a }, s) {
|
|
|
729
745
|
}
|
|
730
746
|
const ft = '.sc-nylas-editor-tabs-group-h{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}.scheduler-editor.sc-nylas-editor-tabs-group{display:flex;flex-direction:column;height:inherit;position:relative}.scheduler-editor.sc-nylas-editor-tabs-group div.return-to-calendar-view.sc-nylas-editor-tabs-group{display:flex;border-bottom:1px solid var(--nylas-base-200)}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group{display:grid;grid-template-columns:minmax(224px, 25%) 1fr;height:auto;overflow-y:auto;min-height:calc(100% - 80px - 48px)}@media screen and (max-width: 768px){.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group{display:table-column-group;height:auto;min-height:calc(100% - 80px - 196px - 48px)}}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tabs.sc-nylas-editor-tabs-group{display:flex;flex-direction:column;border-right:1px solid var(--nylas-base-200);background-color:var(--nylas-base-25)}@media screen and (max-width: 768px){.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tabs.sc-nylas-editor-tabs-group{border-right:none}}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tabs.sc-nylas-editor-tabs-group .tab.sc-nylas-editor-tabs-group{display:flex;align-items:center;text-align:left;gap:0.5rem;padding:0.5rem 1rem;color:var(--nylas-base-900);background:var(--nylas-base-0);border:none;height:56px;font-family:var(--nylas-font-family);font-size:16px;font-weight:500;line-height:24px;cursor:pointer}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tabs.sc-nylas-editor-tabs-group .tab.sc-nylas-editor-tabs-group:not(:first-of-type){margin-top:0.25rem}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tabs.sc-nylas-editor-tabs-group .tab.sc-nylas-editor-tabs-group:last-of-type{margin-bottom:0.25rem}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tabs.sc-nylas-editor-tabs-group .tab.active.sc-nylas-editor-tabs-group{font-weight:600;background:var(--nylas-base-0);color:var(--nylas-primary);border-left:4px solid var(--nylas-primary);box-shadow:0px 1px 2px 0px rgba(0, 0, 0, 0.0588235294);box-shadow:0px 1px 3px 0px rgba(0, 0, 0, 0.1019607843)}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tabs.sc-nylas-editor-tabs-group .tab.hide.sc-nylas-editor-tabs-group{display:none}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group{max-width:692px;overflow-y:auto;overflow-x:hidden}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group .hide.sc-nylas-editor-tabs-group{display:none}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group .calendar-view.sc-nylas-editor-tabs-group{position:absolute;top:0;left:0;height:calc(100% - 80px);width:-webkit-fill-available;background:var(--nylas-base-0)}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group nylas-event-info.sc-nylas-editor-tabs-group,.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group nylas-event-limits.sc-nylas-editor-tabs-group{width:inherit}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group nylas-event-info.sc-nylas-editor-tabs-group div[slot=inputs].sc-nylas-editor-tabs-group,.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group nylas-event-limits.sc-nylas-editor-tabs-group div[slot=inputs].sc-nylas-editor-tabs-group{display:flex;flex-direction:column;gap:1rem}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group .tab-header.sc-nylas-editor-tabs-group{display:flex;flex-direction:column;margin:1rem 1rem 0.5rem;row-gap:4px}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group .tab-header.sc-nylas-editor-tabs-group h3.sc-nylas-editor-tabs-group{margin:0;font-size:16px;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.scheduler-editor.sc-nylas-editor-tabs-group .form-contents.sc-nylas-editor-tabs-group .tab-content.sc-nylas-editor-tabs-group .tab-header.sc-nylas-editor-tabs-group p.sc-nylas-editor-tabs-group{margin:0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.footer.sc-nylas-editor-tabs-group{display:flex;justify-content:space-between;align-items:center;gap:1rem;min-height:80px;padding:0 1rem;border-top:1px solid var(--nylas-base-200)}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs-group{flex-direction:column;height:auto;z-index:2}}.footer.sc-nylas-editor-tabs-group .preview.sc-nylas-editor-tabs-group{display:flex;gap:16px}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs-group .preview.sc-nylas-editor-tabs-group{margin-top:1rem;width:100%}}.footer.sc-nylas-editor-tabs-group .preview.sc-nylas-editor-tabs-group button-component.page-settings-button.sc-nylas-editor-tabs-group{min-width:140px}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group{display:flex;justify-content:flex-end;align-items:center;justify-self:flex-end;gap:1rem}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group{flex-direction:column-reverse;width:100%}}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group .footer-buttons__row.sc-nylas-editor-tabs-group{display:flex;gap:16px}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group .footer-buttons__row.sc-nylas-editor-tabs-group{width:100%}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group .footer-buttons__row.sc-nylas-editor-tabs-group button-component[title=Preview].sc-nylas-editor-tabs-group{width:48px}}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group p.sc-nylas-editor-tabs-group{max-width:524px}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group p.unsaved-changes.sc-nylas-editor-tabs-group{color:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group p.saved-changes.sc-nylas-editor-tabs-group{color:var(--nylas-success)}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group p.error.sc-nylas-editor-tabs-group{color:var(--nylas-error)}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group p.error-full-width.sc-nylas-editor-tabs-group{max-width:660px}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group button-component.sc-nylas-editor-tabs-group{width:100%}}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group button.sc-nylas-editor-tabs-group{background:var(--nylas-primary);color:var(--nylas-base-0);height:48px;border:none;border-radius:var(--nylas-border-radius-2x);font-size:16px;line-height:24px;padding:0 1rem;cursor:pointer;width:148px}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group button.sc-nylas-editor-tabs-group:hover{background:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group button.sc-nylas-editor-tabs-group:active{background:var(--nylas-base-800)}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group button.sc-nylas-editor-tabs-group:disabled{background:var(--nylas-base-300);cursor:not-allowed}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group button.sc-nylas-editor-tabs-group span.sc-nylas-editor-tabs-group{display:flex;align-items:center;justify-content:center;gap:0.5rem}.footer.sc-nylas-editor-tabs-group .buttons.sc-nylas-editor-tabs-group button-component.save-changes.sc-nylas-editor-tabs-group{min-width:140px}button-component#report-issue.sc-nylas-editor-tabs-group{width:auto}nylas-feedback-form.sc-nylas-editor-tabs-group{position:absolute;top:0;height:100%;width:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;background:rgba(0, 0, 0, 0.6);z-index:2;border-radius:inherit}', mt = ft;
|
|
731
747
|
var _t = function(e, t, a, s) {
|
|
732
|
-
var l = arguments.length,
|
|
748
|
+
var l = arguments.length, i = l < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, a) : s, o;
|
|
733
749
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
734
|
-
|
|
750
|
+
i = Reflect.decorate(e, t, a, s);
|
|
735
751
|
else
|
|
736
752
|
for (var d = e.length - 1; d >= 0; d--)
|
|
737
|
-
(o = e[d]) && (
|
|
738
|
-
return l > 3 &&
|
|
753
|
+
(o = e[d]) && (i = (l < 3 ? o(i) : l > 3 ? o(t, a, i) : o(t, a)) || i);
|
|
754
|
+
return l > 3 && i && Object.defineProperty(t, a, i), i;
|
|
739
755
|
}, ge = function(e, t) {
|
|
740
756
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
741
757
|
return Reflect.metadata(e, t);
|
|
@@ -743,28 +759,28 @@ var _t = function(e, t, a, s) {
|
|
|
743
759
|
const Ye = class {
|
|
744
760
|
constructor(e) {
|
|
745
761
|
te(this, e), this.schedulerConfigChanged = m(this, "schedulerConfigChanged", 7), this.schedulerConfigCreated = m(this, "schedulerConfigCreated", 7), this.cancelButtonClick = m(this, "cancelButtonClick", 7), this.formSubmitted = m(this, "formSubmitted", 7), this.previewButtonClicked = m(this, "previewButtonClicked", 7), this.schedulerEditorFormUpdated = m(this, "schedulerEditorFormUpdated", 7), this.groupEventCreateTriggered = m(this, "groupEventCreateTriggered", 7), this.groupEventUpdateTriggered = m(this, "groupEventUpdateTriggered", 7), this.groupEventDeleteTriggered = m(this, "groupEventDeleteTriggered", 7), this.groupEventImportTriggered = m(this, "groupEventImportTriggered", 7), this.saveGroupEventChangesError = m(this, "saveGroupEventChangesError", 7), this.nylasSchedulerError = m(this, "nylasSchedulerError", 6), this.dismissNotification = m(this, "dismissNotification", 6), this.formSubmissionHandler = async (t) => {
|
|
746
|
-
var x, V, P,
|
|
762
|
+
var x, V, P, H, M, K, ne, oe, W, se, ie;
|
|
747
763
|
t.preventDefault();
|
|
748
764
|
const a = await this.formSubmitted.emit();
|
|
749
765
|
if (b("[nylas-editor-tabs-group]", "formSubmissionHandler", a), !this.formRef.checkValidity() || a.defaultPrevented) {
|
|
750
766
|
await this.host.setError({
|
|
751
|
-
message: this.formRef.validationMessage ||
|
|
767
|
+
message: this.formRef.validationMessage || r.t("fixFormErrors"),
|
|
752
768
|
type: _.Error,
|
|
753
769
|
category: v.Component,
|
|
754
|
-
title:
|
|
770
|
+
title: r.t("nylasEditorTabs.formErrorTitle")
|
|
755
771
|
});
|
|
756
772
|
return;
|
|
757
773
|
}
|
|
758
774
|
this.isLoading = !0, this.hasUnsavedChanges = !1;
|
|
759
775
|
const l = this.updateFormState();
|
|
760
776
|
b("[nylas-editor-tabs-group]", "formState", l);
|
|
761
|
-
const { title:
|
|
777
|
+
const { title: i, description: o, bookingCalendar: d, location: c, bookingType: p, minCancellationNotice: h, minBookingNotice: f, cancellationPolicy: w, hideCancellationOptions: T, hideReschedulingOptions: O, additionalFields: U, conferencing: N, reminders: L, emailTemplate: z, redirectUrl: D, slug: R, appearance: F, name: E, eventCapacity: B, eventTimeslot: C, participants: k, disableEmails: A, organizerLocale: S } = l, $ = {
|
|
762
778
|
...((x = this.selectedConfiguration) == null ? void 0 : x.id) && { id: this.selectedConfiguration.id },
|
|
763
779
|
slug: R,
|
|
764
780
|
name: E,
|
|
765
781
|
type: this.selectedEventType === I.group ? I.group : void 0,
|
|
766
782
|
scheduler: {
|
|
767
|
-
cancellation_policy:
|
|
783
|
+
cancellation_policy: w ?? "",
|
|
768
784
|
min_cancellation_notice: h ?? 0,
|
|
769
785
|
min_booking_notice: f ?? 60,
|
|
770
786
|
hide_cancellation_options: T ?? !1,
|
|
@@ -782,13 +798,13 @@ const Ye = class {
|
|
|
782
798
|
booking_type: p || "booking",
|
|
783
799
|
disable_emails: typeof A == "boolean" ? A : !1,
|
|
784
800
|
reminders: L,
|
|
785
|
-
conferencing:
|
|
801
|
+
conferencing: N,
|
|
786
802
|
calendar_id: d || "primary",
|
|
787
803
|
default_capacity: B || 10
|
|
788
804
|
}
|
|
789
805
|
}, j = _e(this.selectedConfiguration, $ || {}), G = this.action === "create" ? j : $;
|
|
790
806
|
delete G.availability, delete G.participants, delete G.event_booking;
|
|
791
|
-
const J = (
|
|
807
|
+
const J = (re) => {
|
|
792
808
|
this.isLoading = !1, this.changesSaved = !0, setTimeout(() => {
|
|
793
809
|
this.changesSaved = !1;
|
|
794
810
|
}, 3e3);
|
|
@@ -797,39 +813,39 @@ const Ye = class {
|
|
|
797
813
|
return;
|
|
798
814
|
const Y = {
|
|
799
815
|
name: ((V = this.currentUser) == null ? void 0 : V.name) ?? ((P = this.currentUser) == null ? void 0 : P.email) ?? "",
|
|
800
|
-
email: ((
|
|
801
|
-
}, q = ((M = this.calendars) == null ? void 0 : M.find((
|
|
802
|
-
title:
|
|
816
|
+
email: ((H = this.currentUser) == null ? void 0 : H.email) ?? ""
|
|
817
|
+
}, q = ((M = this.calendars) == null ? void 0 : M.find((re) => re.is_primary)) ?? ((K = this.calendars) == null ? void 0 : K[0]), Q = [{ ...Y, is_organizer: !0 }], X = (ne = this.selectedConfiguration) != null && ne.id ? void 0 : {
|
|
818
|
+
title: i,
|
|
803
819
|
description: o,
|
|
804
|
-
location:
|
|
805
|
-
conferencing: c ? void 0 :
|
|
820
|
+
location: N ? void 0 : c,
|
|
821
|
+
conferencing: c ? void 0 : N,
|
|
806
822
|
when: {
|
|
807
|
-
start_time: ((oe =
|
|
808
|
-
end_time: ((W =
|
|
809
|
-
start_timezone: ((se =
|
|
810
|
-
end_timezone: ((
|
|
823
|
+
start_time: ((oe = C == null ? void 0 : C.when) == null ? void 0 : oe.start_time) ?? 0,
|
|
824
|
+
end_time: ((W = C == null ? void 0 : C.when) == null ? void 0 : W.end_time) ?? 0,
|
|
825
|
+
start_timezone: ((se = C == null ? void 0 : C.when) == null ? void 0 : se.start_timezone) ?? "",
|
|
826
|
+
end_timezone: ((ie = C == null ? void 0 : C.when) == null ? void 0 : ie.end_timezone) ?? ""
|
|
811
827
|
},
|
|
812
|
-
recurrence: (
|
|
828
|
+
recurrence: (C == null ? void 0 : C.recurrence) ?? [],
|
|
813
829
|
calendar_id: d || (q == null ? void 0 : q.id) || "primary",
|
|
814
|
-
participants:
|
|
830
|
+
participants: k != null && k.length ? k : Q,
|
|
815
831
|
organizer: Y,
|
|
816
832
|
capacity: B || 10
|
|
817
833
|
};
|
|
818
834
|
this.schedulerConfigChanged.emit({ groupEvent: X || void 0, config: G, resetLoadingState: J, action: this.action, host: this.host });
|
|
819
835
|
}, this.checkForBookingFormErrors = (t) => {
|
|
820
|
-
var
|
|
836
|
+
var i;
|
|
821
837
|
let a = !1, s = "";
|
|
822
|
-
const l = (
|
|
838
|
+
const l = (i = t.scheduler) == null ? void 0 : i.additional_fields;
|
|
823
839
|
return l && (s = "", Object.entries(l).forEach((o) => {
|
|
824
840
|
const d = o[1];
|
|
825
841
|
if (d.label === "") {
|
|
826
|
-
s +=
|
|
842
|
+
s += r.t("nylasEditorTabs.bookingFormError_label", { type: d.type }), a = !0;
|
|
827
843
|
return;
|
|
828
844
|
}
|
|
829
845
|
if (d.options) {
|
|
830
846
|
for (const c of d.options)
|
|
831
847
|
if (c.trim() === "") {
|
|
832
|
-
s +=
|
|
848
|
+
s += r.t("nylasEditorTabs.bookingFormError_option", { label: d.label, type: d.type }), a = !0;
|
|
833
849
|
break;
|
|
834
850
|
}
|
|
835
851
|
}
|
|
@@ -837,9 +853,9 @@ const Ye = class {
|
|
|
837
853
|
message: s,
|
|
838
854
|
type: _.Error,
|
|
839
855
|
category: v.Component,
|
|
840
|
-
title:
|
|
856
|
+
title: r.t("nylasEditorTabs.bookingFormError")
|
|
841
857
|
})), a;
|
|
842
|
-
}, this.calendars = void 0, this.selectedConfiguration = void 0, this.configurations = void 0, this.currentUser = void 0, this.schedulerPreviewLink = "", this.mode = "app", this.hideEditorTabs = [], this.enableUserFeedback = !0, this.selectedLanguage = void 0, this.selectedEventType = void 0, this.selectedGroupEvent = void 0, this.action = "create", this.showFeedbackModal = !1, this.activeTab = g.CalendarView, this.isLoading = !1, this.componentLoaded = !1, this.hasUnsavedChanges = !1, this.changesSaved = !1, this.formState = {}, this.error = {
|
|
858
|
+
}, this.calendars = void 0, this.selectedConfiguration = void 0, this.configurations = void 0, this.currentUser = void 0, this.schedulerPreviewLink = "", this.mode = "app", this.hideEditorTabs = [], this.enableUserFeedback = !0, this.selectedLanguage = void 0, this.selectedEventType = void 0, this.selectedGroupEvent = void 0, this.themeConfig = void 0, this.action = "create", this.showFeedbackModal = !1, this.activeTab = g.CalendarView, this.isLoading = !1, this.componentLoaded = !1, this.hasUnsavedChanges = !1, this.changesSaved = !1, this.formState = {}, this.error = {
|
|
843
859
|
message: "",
|
|
844
860
|
type: _.Error,
|
|
845
861
|
category: v.Component,
|
|
@@ -852,25 +868,25 @@ const Ye = class {
|
|
|
852
868
|
}, e != null && e.id ? this.action = "edit" : this.action = "create";
|
|
853
869
|
}
|
|
854
870
|
selectedGroupEventChangedHandler(e) {
|
|
855
|
-
var t, a, s, l,
|
|
871
|
+
var t, a, s, l, i, o, d, c, p, h, f, w, T, O, U, N, L, z, D, R, F, E, B, C, k, A, S, $, j, G, J;
|
|
856
872
|
b("[nylas-editor-tabs-group]", "selectedGroupEventChangedHandler", e, this.selectedConfiguration), this.formState = {
|
|
857
873
|
...this.formState,
|
|
858
874
|
title: (a = (t = this.selectedGroupEvent) == null ? void 0 : t.event) == null ? void 0 : a.title,
|
|
859
875
|
description: (l = (s = this.selectedGroupEvent) == null ? void 0 : s.event) == null ? void 0 : l.description,
|
|
860
|
-
location: (o = (
|
|
876
|
+
location: (o = (i = this.selectedGroupEvent) == null ? void 0 : i.event) == null ? void 0 : o.location,
|
|
861
877
|
conferencing: (c = (d = this.selectedGroupEvent) == null ? void 0 : d.event) == null ? void 0 : c.conferencing,
|
|
862
878
|
eventCapacity: (h = (p = this.selectedGroupEvent) == null ? void 0 : p.group_event_info) == null ? void 0 : h.capacity,
|
|
863
|
-
participants: (T = (
|
|
879
|
+
participants: (T = (w = (f = this.selectedGroupEvent) == null ? void 0 : f.group_event_info) == null ? void 0 : w.participants) == null ? void 0 : T.map((Z) => ({
|
|
864
880
|
name: Z.name,
|
|
865
881
|
email: Z.email,
|
|
866
882
|
is_organizer: !!Z.is_organizer
|
|
867
883
|
})),
|
|
868
884
|
eventTimeslot: (U = (O = this.selectedGroupEvent) == null ? void 0 : O.event) != null && U.when ? {
|
|
869
885
|
when: {
|
|
870
|
-
start_time: (z = (L = (
|
|
886
|
+
start_time: (z = (L = (N = this.selectedGroupEvent) == null ? void 0 : N.event) == null ? void 0 : L.when) == null ? void 0 : z.start_time,
|
|
871
887
|
end_time: (F = (R = (D = this.selectedGroupEvent) == null ? void 0 : D.event) == null ? void 0 : R.when) == null ? void 0 : F.end_time,
|
|
872
|
-
start_timezone: (
|
|
873
|
-
end_timezone: (S = (A = (
|
|
888
|
+
start_timezone: (C = (B = (E = this.selectedGroupEvent) == null ? void 0 : E.event) == null ? void 0 : B.when) == null ? void 0 : C.start_timezone,
|
|
889
|
+
end_timezone: (S = (A = (k = this.selectedGroupEvent) == null ? void 0 : k.event) == null ? void 0 : A.when) == null ? void 0 : S.end_timezone
|
|
874
890
|
},
|
|
875
891
|
recurrence: (j = ($ = this.selectedGroupEvent) == null ? void 0 : $.group_event_info) != null && j.rrule ? (J = (G = this.selectedGroupEvent) == null ? void 0 : G.group_event_info) == null ? void 0 : J.rrule : []
|
|
876
892
|
} : void 0
|
|
@@ -882,11 +898,19 @@ const Ye = class {
|
|
|
882
898
|
});
|
|
883
899
|
}
|
|
884
900
|
selectedLanguageChangedHandler(e, t) {
|
|
885
|
-
e !== t && (
|
|
901
|
+
e !== t && (r.changeLanguage(e), this.error && this.error.message && (this.error = {
|
|
886
902
|
...this.error,
|
|
887
|
-
message:
|
|
903
|
+
message: r.t("fixFormErrors")
|
|
888
904
|
}, this.showErrorNotification(this.error)));
|
|
889
905
|
}
|
|
906
|
+
themeConfigChangedHandler(e, t) {
|
|
907
|
+
e !== t && this.applyThemeConfig(e);
|
|
908
|
+
}
|
|
909
|
+
applyThemeConfig(e) {
|
|
910
|
+
if (e)
|
|
911
|
+
for (const [t, a] of Object.entries(e))
|
|
912
|
+
this.host.style.setProperty(`${t}`, a);
|
|
913
|
+
}
|
|
890
914
|
async schedulerConfigCreatedEventHandler(e) {
|
|
891
915
|
return this.schedulerConfigCreated.emit(e);
|
|
892
916
|
}
|
|
@@ -896,7 +920,7 @@ const Ye = class {
|
|
|
896
920
|
message: e.message,
|
|
897
921
|
type: e.type,
|
|
898
922
|
category: e.category,
|
|
899
|
-
title: e.title ||
|
|
923
|
+
title: e.title || r.t("genericErrorTitle")
|
|
900
924
|
}, (t = this.error) != null && t.message && this.showErrorNotification(this.error);
|
|
901
925
|
}
|
|
902
926
|
async resetError() {
|
|
@@ -918,9 +942,9 @@ const Ye = class {
|
|
|
918
942
|
var t, a, s;
|
|
919
943
|
b("[nylas-editor-tabs-group]", "componentDidLoad"), this.enableUserFeedback && !Je() && Ve({
|
|
920
944
|
dsn: "https://9d5731f1c77ca84c9ed3fb9b3ccf7ee1@o74852.ingest.us.sentry.io/4507889638178816",
|
|
921
|
-
release: "2.0
|
|
945
|
+
release: "2.1.0",
|
|
922
946
|
integrations: (l) => [
|
|
923
|
-
...l.filter((
|
|
947
|
+
...l.filter((i) => !1),
|
|
924
948
|
qe({
|
|
925
949
|
colorScheme: "system",
|
|
926
950
|
autoInject: !1
|
|
@@ -957,7 +981,7 @@ const Ye = class {
|
|
|
957
981
|
captureContext: {
|
|
958
982
|
tags: {
|
|
959
983
|
"nylas-web-element": "nylas-scheduler-editor",
|
|
960
|
-
"nylas-web-element-version": "2.0
|
|
984
|
+
"nylas-web-element-version": "2.1.0"
|
|
961
985
|
},
|
|
962
986
|
extra: {
|
|
963
987
|
configId: (s = this.selectedConfiguration) == null ? void 0 : s.id,
|
|
@@ -971,32 +995,32 @@ const Ye = class {
|
|
|
971
995
|
this.groupEventImportTriggered.emit({ groupEvent: e.detail, configId: ((t = this.selectedConfiguration) == null ? void 0 : t.id) ?? "", host: this.host });
|
|
972
996
|
}
|
|
973
997
|
saveGroupEventChangesHandler(e) {
|
|
974
|
-
var s, l,
|
|
998
|
+
var s, l, i, o, d, c, p, h, f;
|
|
975
999
|
b("saveGroupEventChangesHandler", e.detail, this.selectedGroupEvent);
|
|
976
1000
|
const t = this.formRef.checkValidity(), a = this.getGroupEventDetailsFromFormState();
|
|
977
1001
|
if (this.resetError(), a.title || this.setError({
|
|
978
|
-
message:
|
|
1002
|
+
message: r.t("nylasEditorTabsGroup.eventTitleRequired"),
|
|
979
1003
|
type: _.Error,
|
|
980
1004
|
category: v.Component,
|
|
981
|
-
title:
|
|
1005
|
+
title: r.t("nylasEditorTabs.formErrorTitle")
|
|
982
1006
|
}), (!((s = a.when) != null && s.start_time) || !((l = a.when) != null && l.end_time)) && this.setError({
|
|
983
|
-
message:
|
|
1007
|
+
message: r.t("nylasEditorTabsGroup.eventTimeRequired"),
|
|
984
1008
|
type: _.Error,
|
|
985
1009
|
category: v.Component,
|
|
986
|
-
title:
|
|
987
|
-
}), (
|
|
988
|
-
message:
|
|
1010
|
+
title: r.t("nylasEditorTabs.formErrorTitle")
|
|
1011
|
+
}), (i = a.participants) != null && i.length || this.setError({
|
|
1012
|
+
message: r.t("nylasEditorTabsGroup.participantsRequired"),
|
|
989
1013
|
type: _.Error,
|
|
990
1014
|
category: v.Component,
|
|
991
|
-
title:
|
|
992
|
-
}), (o = a.participants) != null && o.length && ((d = a.participants) != null && d.some((
|
|
993
|
-
message:
|
|
1015
|
+
title: r.t("nylasEditorTabs.formErrorTitle")
|
|
1016
|
+
}), (o = a.participants) != null && o.length && ((d = a.participants) != null && d.some((w) => !w.email)) && this.setError({
|
|
1017
|
+
message: r.t("nylasEditorTabsGroup.participantEmailRequired"),
|
|
994
1018
|
type: _.Error,
|
|
995
1019
|
category: v.Component,
|
|
996
|
-
title:
|
|
1020
|
+
title: r.t("nylasEditorTabs.formErrorTitle")
|
|
997
1021
|
}), ((c = this.error) == null ? void 0 : c.message) !== "" || !t) {
|
|
998
1022
|
this.saveGroupEventChangesError.emit({
|
|
999
|
-
error: ((p = this.error) == null ? void 0 : p.message) ??
|
|
1023
|
+
error: ((p = this.error) == null ? void 0 : p.message) ?? r.t("nylasEditorTabsGroup.errorOccured"),
|
|
1000
1024
|
configId: ((h = this.selectedConfiguration) == null ? void 0 : h.id) ?? "",
|
|
1001
1025
|
host: this.host
|
|
1002
1026
|
});
|
|
@@ -1021,11 +1045,11 @@ const Ye = class {
|
|
|
1021
1045
|
});
|
|
1022
1046
|
}
|
|
1023
1047
|
createGroupEventHandler(e) {
|
|
1024
|
-
var o, d, c, p, h, f,
|
|
1048
|
+
var o, d, c, p, h, f, w;
|
|
1025
1049
|
const t = e.detail, a = {
|
|
1026
1050
|
name: ((o = this.currentUser) == null ? void 0 : o.name) ?? ((d = this.currentUser) == null ? void 0 : d.email) ?? "",
|
|
1027
1051
|
email: ((c = this.currentUser) == null ? void 0 : c.email) ?? ""
|
|
1028
|
-
}, s = ((p = this.calendars) == null ? void 0 : p.find((T) => T.is_primary)) ?? ((h = this.calendars) == null ? void 0 : h[0]), l = ((f = this.formState) == null ? void 0 : f.conferencing) || t.conferencing,
|
|
1052
|
+
}, s = ((p = this.calendars) == null ? void 0 : p.find((T) => T.is_primary)) ?? ((h = this.calendars) == null ? void 0 : h[0]), l = ((f = this.formState) == null ? void 0 : f.conferencing) || t.conferencing, i = {
|
|
1029
1053
|
title: t.title,
|
|
1030
1054
|
description: t.description,
|
|
1031
1055
|
location: l ? void 0 : t.location,
|
|
@@ -1037,7 +1061,7 @@ const Ye = class {
|
|
|
1037
1061
|
calendar_id: (s == null ? void 0 : s.id) || "primary",
|
|
1038
1062
|
capacity: t.eventCapacity
|
|
1039
1063
|
};
|
|
1040
|
-
this.groupEventCreateTriggered.emit({ groupEvent:
|
|
1064
|
+
this.groupEventCreateTriggered.emit({ groupEvent: i, configId: ((w = this.selectedConfiguration) == null ? void 0 : w.id) ?? "", host: this.host });
|
|
1041
1065
|
}
|
|
1042
1066
|
showErrorNotification(e) {
|
|
1043
1067
|
this.nylasSchedulerError.emit({
|
|
@@ -1053,37 +1077,37 @@ const Ye = class {
|
|
|
1053
1077
|
});
|
|
1054
1078
|
}
|
|
1055
1079
|
getGroupEventDetailsFromFormState() {
|
|
1056
|
-
var f,
|
|
1057
|
-
const e = ((f = this.calendars) == null ? void 0 : f.find((R) => R.is_primary)) ?? ((
|
|
1080
|
+
var f, w, T, O, U, N, L, z, D;
|
|
1081
|
+
const e = ((f = this.calendars) == null ? void 0 : f.find((R) => R.is_primary)) ?? ((w = this.calendars) == null ? void 0 : w[0]), t = {
|
|
1058
1082
|
name: ((T = this.currentUser) == null ? void 0 : T.name) ?? ((O = this.currentUser) == null ? void 0 : O.email) ?? "",
|
|
1059
1083
|
email: ((U = this.currentUser) == null ? void 0 : U.email) ?? ""
|
|
1060
|
-
}, a = [{ ...t, is_organizer: !0 }], { title: s, description: l, bookingCalendar:
|
|
1084
|
+
}, a = [{ ...t, is_organizer: !0 }], { title: s, description: l, bookingCalendar: i, location: o, conferencing: d, eventCapacity: c, eventTimeslot: p, participants: h } = this.formState;
|
|
1061
1085
|
return {
|
|
1062
1086
|
title: s,
|
|
1063
1087
|
description: l,
|
|
1064
1088
|
location: d ? void 0 : o,
|
|
1065
1089
|
conferencing: o ? void 0 : d,
|
|
1066
1090
|
when: {
|
|
1067
|
-
start_time: ((
|
|
1091
|
+
start_time: ((N = p == null ? void 0 : p.when) == null ? void 0 : N.start_time) ?? 0,
|
|
1068
1092
|
end_time: ((L = p == null ? void 0 : p.when) == null ? void 0 : L.end_time) ?? 0,
|
|
1069
1093
|
start_timezone: ((z = p == null ? void 0 : p.when) == null ? void 0 : z.start_timezone) ?? "",
|
|
1070
1094
|
end_timezone: ((D = p == null ? void 0 : p.when) == null ? void 0 : D.end_timezone) ?? ""
|
|
1071
1095
|
},
|
|
1072
1096
|
recurrence: (p == null ? void 0 : p.recurrence) ?? [],
|
|
1073
|
-
calendar_id:
|
|
1097
|
+
calendar_id: i || (e == null ? void 0 : e.id) || "primary",
|
|
1074
1098
|
participants: h != null && h.length ? h : a,
|
|
1075
1099
|
organizer: t,
|
|
1076
1100
|
capacity: c || 10
|
|
1077
1101
|
};
|
|
1078
1102
|
}
|
|
1079
1103
|
getFormStateFromConfig(e) {
|
|
1080
|
-
var t, a, s, l,
|
|
1104
|
+
var t, a, s, l, i, o, d, c, p, h, f, w, T, O;
|
|
1081
1105
|
return e != null && e.appearance && console.info("Appearance settings have been returned from the given configuration; please remember to grab them from the configSettingsLoaded event and apply them as desired."), {
|
|
1082
1106
|
additionalFields: ((t = e == null ? void 0 : e.scheduler) == null ? void 0 : t.additional_fields) ?? {},
|
|
1083
1107
|
bookingType: ((a = e == null ? void 0 : e.group_booking) == null ? void 0 : a.booking_type) ?? "booking",
|
|
1084
1108
|
cancellationPolicy: ((s = e == null ? void 0 : e.scheduler) == null ? void 0 : s.cancellation_policy) ?? "",
|
|
1085
1109
|
minCancellationNotice: ((l = e == null ? void 0 : e.scheduler) == null ? void 0 : l.min_cancellation_notice) ?? 0,
|
|
1086
|
-
minBookingNotice: ((
|
|
1110
|
+
minBookingNotice: ((i = e == null ? void 0 : e.scheduler) == null ? void 0 : i.min_booking_notice) ?? 60,
|
|
1087
1111
|
hideCancellationOptions: ((o = e == null ? void 0 : e.scheduler) == null ? void 0 : o.hide_cancellation_options) ?? !1,
|
|
1088
1112
|
hideReschedulingOptions: ((d = e == null ? void 0 : e.scheduler) == null ? void 0 : d.hide_rescheduling_options) ?? !1,
|
|
1089
1113
|
reminders: (c = e == null ? void 0 : e.group_booking) == null ? void 0 : c.reminders,
|
|
@@ -1093,7 +1117,7 @@ const Ye = class {
|
|
|
1093
1117
|
appearance: e == null ? void 0 : e.appearance,
|
|
1094
1118
|
name: e == null ? void 0 : e.name,
|
|
1095
1119
|
bookingCalendar: (f = e == null ? void 0 : e.group_booking) == null ? void 0 : f.calendar_id,
|
|
1096
|
-
disableEmails: (
|
|
1120
|
+
disableEmails: (w = e == null ? void 0 : e.group_booking) == null ? void 0 : w.disable_emails,
|
|
1097
1121
|
organizerLocale: (O = (T = e == null ? void 0 : e.scheduler) == null ? void 0 : T.email_template) == null ? void 0 : O.organizer_locale
|
|
1098
1122
|
};
|
|
1099
1123
|
}
|
|
@@ -1194,19 +1218,19 @@ const Ye = class {
|
|
|
1194
1218
|
e.preventDefault(), this.showFeedbackModal = !0;
|
|
1195
1219
|
}
|
|
1196
1220
|
render() {
|
|
1197
|
-
var e, t, a, s, l,
|
|
1198
|
-
return b("[nylas-editor-tabs-group]", "render", this.formState), n(ce, { key: "
|
|
1221
|
+
var e, t, a, s, l, i;
|
|
1222
|
+
return b("[nylas-editor-tabs-group]", "render", this.formState), n(ce, { key: "76c493a97bfd6a0ba5a98233a2d4fecd29e73f4f" }, n("nylas-notification", { key: "28d9095c59ca8eb5a8bc2a10358263dd8b478657" }), n("form", { key: "70d81a11affc5eaa0d493f71a7da42588b7d2ea2", onSubmit: this.formSubmissionHandler, class: "scheduler-editor", ref: (o) => this.formRef = o, noValidate: !0 }, this.mode === "app" ? n("div", { class: "return-to-calendar-view", part: "editor__return-to-calendar-view net__return-to-calendar-view" }, n("button-component", { id: "return-to-calendar-view-button", variant: "invisible", part: "nset__header__back-button", type: "button", onClick: (o) => {
|
|
1199
1223
|
this.setActiveTab(o, g.CalendarView);
|
|
1200
|
-
} }, n("chevron-icon", { width: "16", height: "16" }), n("span", null,
|
|
1224
|
+
} }, n("chevron-icon", { width: "16", height: "16" }), n("span", null, r.t("returnToCalendarView")))) : null, this.mode === "app" ? n("div", { class: "form-contents", part: "editor__form-contents net__form-contents" }, n("div", { class: "tabs", part: "editor__tabs net__tabs" }, n("button", { name: g.BookingOptions, class: { tab: !0, active: this.activeTab == g.BookingOptions, hide: this.hideTab(g.BookingOptions) }, part: "editortab__booking-options net__tab-booking-options", onClick: (o) => this.setActiveTab(o, g.BookingOptions) }, n("flow-icon", { width: "16", height: "16" }), r.t("bookingOptionsTab")), n("button", { name: g.BookingForm, class: { tab: !0, active: this.activeTab == g.BookingForm, hide: this.hideTab(g.BookingForm) }, part: "editortab__booking-form net__tab-booking-form", onClick: (o) => this.setActiveTab(o, g.BookingForm) }, this.activeTab == g.BookingForm ? n("calendar-agenda-fill-icon", { width: "16", height: "16" }) : n("calendar-agenda-icon", { width: "16", height: "16" }), r.t("bookingFormTab")), n("button", { name: g.Communications, class: { tab: !0, active: this.activeTab == g.Communications, hide: this.hideTab(g.Communications) }, onClick: (o) => this.setActiveTab(o, g.Communications), part: "editortab__communications net__tab-communications" }, this.activeTab == g.Communications ? n("envelope-fill-icon", { width: "16", height: "16" }) : n("envelope-icon", { width: "16", height: "16" }), r.t("communicationsTab")), n("button", { name: g.PageStyles, class: { tab: !0, active: this.activeTab == g.PageStyles, hide: this.hideTab(g.PageStyles) }, onClick: (o) => this.setActiveTab(o, g.PageStyles), part: "editortab__page-styles net__tab-page-styles" }, this.activeTab == g.PageStyles ? n("paintbrush-fill-icon", { width: "16", height: "16" }) : n("paintbrush-icon", { width: "16", height: "16" }), r.t("pageStylesTab"))), n("div", { class: "tab-content", part: "editor__tab-content net__tab-content" }, n(gt, { formState: this.formState, activeTab: this.activeTab, currentUser: this.currentUser, calendars: this.calendars, id: ((e = this.selectedConfiguration) == null ? void 0 : e.id) ?? "new", i18next: r }))) : n("div", { class: "composable", key: (t = this.selectedConfiguration) == null ? void 0 : t.id }, n("slot", null)), n("div", { key: "dd5ef485c1aa6955264379915867a5bda111a2b5", class: "footer", part: "editor__footer net__footer" }, n("div", { key: "5431c3dd9e45ee66cbd22c038546f6e97b82aff1", class: "preview", part: "editor__footer-preview net__footer-preview" }, this.enableUserFeedback && n("button-component", { title: "Share your feedback", id: "report-issue", variant: "basic", onClick: (o) => this.onFeedbackClick(o) }, n("feedback-icon", null)), this.activeTab === g.CalendarView && n("button-component", { class: "page-settings-button", title: "Go to page settings", id: "page-settings", variant: "basic", onClick: (o) => this.setActiveTab(o, g.BookingOptions) }, r.t("pageSettingsButton"))), n("div", { key: "c2369b6564211918ab7aa31123e01cb4f98d943d", class: "buttons", part: "editor__footer-buttons net__footer-buttons" }, n("p", { key: "ffbd97cdaa59620c641c5a2adac0af76633ff043", class: {
|
|
1201
1225
|
"unsaved-changes": this.hasUnsavedChanges && !this.changesSaved,
|
|
1202
1226
|
"saved-changes": this.changesSaved,
|
|
1203
1227
|
error: ((a = this.error) == null ? void 0 : a.message) !== "",
|
|
1204
1228
|
"error-full-width": ((s = this.error) == null ? void 0 : s.message) !== "" && this.action === "create"
|
|
1205
|
-
} }, ((l = this.error) == null ? void 0 : l.message) == "" && this.hasUnsavedChanges && !this.changesSaved && this.activeTab !== g.CalendarView ?
|
|
1206
|
-
o.preventDefault(), this.previewButtonClicked.emit(this.host).defaultPrevented || window.open(
|
|
1207
|
-
}, variant: "basic" }, n("eye-icon", null)), n("button-component", { key: "
|
|
1229
|
+
} }, ((l = this.error) == null ? void 0 : l.message) == "" && this.hasUnsavedChanges && !this.changesSaved && this.activeTab !== g.CalendarView ? r.t("unsavedChangesLabel") : ((i = this.error) == null ? void 0 : i.message) == "" && this.changesSaved ? `${r.t("changesSavedLabel")}!` : ""), n("div", { key: "4edf752dbbf6dd86f97da5cf285afde1f56f900f", class: "footer-buttons__row" }, this.schedulerPreviewLink !== "" && this.action === "edit" && n("button-component", { title: "Preview", type: "button", disabled: this.isLoading, clickHandler: (o) => {
|
|
1230
|
+
o.preventDefault(), this.previewButtonClicked.emit(this.host).defaultPrevented || window.open(de(this.schedulerPreviewLink, this.selectedConfiguration), "_blank");
|
|
1231
|
+
}, variant: "basic" }, n("eye-icon", null)), n("button-component", { key: "8fc79265e7819c0aeeba204f9f4e1ed6502ce5a1", type: "button", disabled: this.isLoading, clickHandler: (o) => {
|
|
1208
1232
|
o.preventDefault(), this.cancelButtonClick.emit(), this.host.resetError();
|
|
1209
|
-
}, variant: "basic", part: "editor__footer-cancel net__footer-cancel" },
|
|
1233
|
+
}, variant: "basic", part: "editor__footer-cancel net__footer-cancel" }, r.t("cancelButton")), n("button-component", { key: "04509263358df45457a593c11f6b5625aedba833", class: { "save-changes": this.action === "edit" }, type: "submit", disabled: this.isLoading, part: "editor__footer-cta, net__footer-cta" }, this.componentLoaded ? this.isLoading ? n("span", null, r.t("savingButtonText"), n("loading-icon", null), " ") : this.action === "create" ? `${r.t("createButtonText")}` : `${r.t("saveChangesButtonText")}` : n("span", null, n("loading-icon", null), " ")))))), this.showFeedbackModal && n("nylas-feedback-form", null));
|
|
1210
1234
|
}
|
|
1211
1235
|
get host() {
|
|
1212
1236
|
return pe(this);
|
|
@@ -1216,7 +1240,8 @@ const Ye = class {
|
|
|
1216
1240
|
selectedConfiguration: ["configChangedHandler"],
|
|
1217
1241
|
selectedGroupEvent: ["selectedGroupEventChangedHandler"],
|
|
1218
1242
|
currentUser: ["userChangedHandler"],
|
|
1219
|
-
selectedLanguage: ["selectedLanguageChangedHandler"]
|
|
1243
|
+
selectedLanguage: ["selectedLanguageChangedHandler"],
|
|
1244
|
+
themeConfig: ["themeConfigChangedHandler"]
|
|
1220
1245
|
};
|
|
1221
1246
|
}
|
|
1222
1247
|
};
|
|
@@ -1230,29 +1255,30 @@ _t([
|
|
|
1230
1255
|
["schedulerConfig.configurations", "configurations"],
|
|
1231
1256
|
["schedulerConfig.selectedLanguage", "selectedLanguage"],
|
|
1232
1257
|
["schedulerConfig.selectedEventType", "selectedEventType"],
|
|
1233
|
-
["schedulerConfig.selectedGroupEvent", "selectedGroupEvent"]
|
|
1258
|
+
["schedulerConfig.selectedGroupEvent", "selectedGroupEvent"],
|
|
1259
|
+
["schedulerConfig.themeConfig", "themeConfig"]
|
|
1234
1260
|
]),
|
|
1235
1261
|
eventToProps: {
|
|
1236
1262
|
schedulerConfigChanged: async (e, t) => {
|
|
1237
|
-
const { resetLoadingState: a, host: s, action: l, config:
|
|
1263
|
+
const { resetLoadingState: a, host: s, action: l, config: i, groupEvent: o } = e.detail, d = (c, p) => {
|
|
1238
1264
|
const [h, f] = c;
|
|
1239
1265
|
!h && f ? s.setError({
|
|
1240
|
-
message: f.message ||
|
|
1266
|
+
message: f.message || r.t("genericErrorTitle"),
|
|
1241
1267
|
type: _.Error,
|
|
1242
1268
|
category: v.Component,
|
|
1243
1269
|
title: p
|
|
1244
1270
|
}) : h && !f && l === "create" && s.schedulerConfigCreatedEventHandler({ config: h, action: l, host: s });
|
|
1245
1271
|
};
|
|
1246
1272
|
if (l === "edit") {
|
|
1247
|
-
const c = await t.schedulerConfig.updateConfiguration(
|
|
1248
|
-
d(c,
|
|
1273
|
+
const c = await t.schedulerConfig.updateConfiguration(i);
|
|
1274
|
+
d(c, r.t("nylasEditorTabs.updateConfigError")), a && a(e);
|
|
1249
1275
|
} else {
|
|
1250
|
-
const c = await t.schedulerConfig.createConfiguration(
|
|
1251
|
-
d(c,
|
|
1276
|
+
const c = await t.schedulerConfig.createConfiguration(i);
|
|
1277
|
+
d(c, r.t("nylasEditorTabs.createConfigError"));
|
|
1252
1278
|
const [p, h] = c, f = p == null ? void 0 : p.id;
|
|
1253
1279
|
if (f && o) {
|
|
1254
|
-
const
|
|
1255
|
-
d(
|
|
1280
|
+
const w = await t.schedulerConfig.createGroupEvent(o, f);
|
|
1281
|
+
d(w, r.t("nylasEditorTabsGroup.createGroupEventError"));
|
|
1256
1282
|
}
|
|
1257
1283
|
a && a(e);
|
|
1258
1284
|
}
|
|
@@ -1273,39 +1299,39 @@ _t([
|
|
|
1273
1299
|
b("[nylas-editor-tabs-group]", "schedulerConfigCreated", e);
|
|
1274
1300
|
},
|
|
1275
1301
|
groupEventUpdateTriggered: async (e, t) => {
|
|
1276
|
-
const { groupEvent: a, host: s, chosenOption: l, configId:
|
|
1302
|
+
const { groupEvent: a, host: s, chosenOption: l, configId: i } = e.detail, o = await t.schedulerConfig.updateGroupEvent(a, l, i), [d, c] = o;
|
|
1277
1303
|
!d && c && s.setError({
|
|
1278
|
-
message: c.message ||
|
|
1304
|
+
message: c.message || r.t("genericErrorTitle"),
|
|
1279
1305
|
type: _.Error,
|
|
1280
1306
|
category: v.Component,
|
|
1281
|
-
title:
|
|
1307
|
+
title: r.t("nylasEditorTabsGroup.updateGroupEventError")
|
|
1282
1308
|
});
|
|
1283
1309
|
},
|
|
1284
1310
|
groupEventDeleteTriggered: async (e, t) => {
|
|
1285
|
-
const { groupEvent: a, chosenOption: s, configId: l, host:
|
|
1286
|
-
!d && c &&
|
|
1287
|
-
message: c.message ||
|
|
1311
|
+
const { groupEvent: a, chosenOption: s, configId: l, host: i } = e.detail, o = await t.schedulerConfig.deleteGroupEvent(a, s, l), [d, c] = o;
|
|
1312
|
+
!d && c && i.setError({
|
|
1313
|
+
message: c.message || r.t("genericErrorTitle"),
|
|
1288
1314
|
type: _.Error,
|
|
1289
1315
|
category: v.Component,
|
|
1290
|
-
title:
|
|
1316
|
+
title: r.t("nylasEditorTabsGroup.deleteGroupEventError")
|
|
1291
1317
|
});
|
|
1292
1318
|
},
|
|
1293
1319
|
groupEventCreateTriggered: async (e, t) => {
|
|
1294
|
-
const { groupEvent: a, configId: s, host: l } = e.detail,
|
|
1320
|
+
const { groupEvent: a, configId: s, host: l } = e.detail, i = await t.schedulerConfig.createGroupEvent(a, s), [o, d] = i;
|
|
1295
1321
|
!o && d && l.setError({
|
|
1296
|
-
message: d.message ||
|
|
1322
|
+
message: d.message || r.t("genericErrorTitle"),
|
|
1297
1323
|
type: _.Error,
|
|
1298
1324
|
category: v.Component,
|
|
1299
|
-
title:
|
|
1325
|
+
title: r.t("nylasEditorTabsGroup.createGroupEventError")
|
|
1300
1326
|
});
|
|
1301
1327
|
},
|
|
1302
1328
|
groupEventImportTriggered: async (e, t) => {
|
|
1303
|
-
const { groupEvent: a, configId: s, host: l } = e.detail,
|
|
1329
|
+
const { groupEvent: a, configId: s, host: l } = e.detail, i = await t.schedulerConfig.importGroupEvent([a], s), [o, d] = i;
|
|
1304
1330
|
if (!o && d && l.setError({
|
|
1305
|
-
message: d.message ||
|
|
1331
|
+
message: d.message || r.t("genericErrorTitle"),
|
|
1306
1332
|
type: _.Error,
|
|
1307
1333
|
category: v.Component,
|
|
1308
|
-
title:
|
|
1334
|
+
title: r.t("nylasEditorTabsGroup.importGroupEventError")
|
|
1309
1335
|
}), o && o.import_failed && o.import_failed.length > 0) {
|
|
1310
1336
|
const c = o.import_failed.map((p) => p.reason).join(`
|
|
1311
1337
|
`);
|
|
@@ -1313,7 +1339,7 @@ _t([
|
|
|
1313
1339
|
message: c,
|
|
1314
1340
|
type: _.Error,
|
|
1315
1341
|
category: v.Component,
|
|
1316
|
-
title:
|
|
1342
|
+
title: r.t("nylasEditorTabsGroup.importGroupEventError")
|
|
1317
1343
|
}), setTimeout(() => {
|
|
1318
1344
|
l.resetError();
|
|
1319
1345
|
}, 5e3);
|
|
@@ -1336,22 +1362,22 @@ _t([
|
|
|
1336
1362
|
ge("design:returntype", void 0)
|
|
1337
1363
|
], Ye.prototype, "render", null);
|
|
1338
1364
|
Ye.style = mt;
|
|
1339
|
-
const vt = ':host{display:grid;grid-auto-flow:row;width:100%;font-family:inherit;font-optical-sizing:auto;--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}.header{display:flex;align-items:center;justify-content:space-between;margin-bottom:1rem;gap:1rem}@media screen and (max-width: 768px){.header{flex-direction:column;gap:0.5rem;align-items:unset}}.header h2{margin:0;font-size:1.25rem;color:var(--nylas-base-900);font-weight:600}.header p{margin:0;font-size:16px;color:var(--nylas-base-700)}.header .actions{justify-self:end}@media screen and (max-width: 768px){.header .actions{width:100%}}.configurations{border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);background:var(--nylas-base-0);height:100%;display:flex;flex-direction:column;position:relative;overflow-y:hidden}.configurations .table-container{overflow-y:auto;flex:1}@media screen and (max-width: 768px){.configurations .table-container{min-height:624px}}.configurations .table-container table{width:100%;border-spacing:0;border-collapse:collapse;font-family:inherit;height:max-content}.configurations .table-container table.no-configurations{height:100%}.configurations .table-container table tr{color:var(--nylas-base-800);border-bottom:1px solid var(--nylas-base-200);font-family:inherit}.configurations .table-container table tr.hide{display:none}.configurations .table-container table th{font-weight:600;text-transform:uppercase;font-size:14px;line-height:20px}.configurations .table-container table tr.no-configurations td>div{display:flex;height:100%;justify-content:center;align-items:center;flex-direction:column;padding:var(--nylas-border-radius-3x)}.configurations .table-container table tr.no-configurations td>div h3{margin:0 0 1rem 0;color:var(--nylas-base-700)}.configurations .table-container table tr.no-configurations td>div p{margin:0 0 1rem 0;color:var(--nylas-base-600)}.configurations .table-container table tr.no-configurations td>div calendar-icon{margin-bottom:1rem;color:var(--nylas-base-200)}.configurations .table-container table th,.configurations .table-container table td{text-align:left;padding:1rem;font-family:inherit}.configurations .table-container table .actions{display:flex;justify-content:flex-end;gap:1rem;text-align:right}.configurations .table-container table .actions button-component.edit-button{min-width:98px}@media screen and (max-width: 768px){.configurations .table-container table .actions{flex-direction:column;gap:0.5rem}}.configurations .table-container table .actions select-dropdown.last::part(sd_dropdown-content){bottom:54px}.configurations .table-container table .title{width:100%;max-width:300px}@media screen and (max-width: 768px){.configurations .table-container table .title{max-width:96px}}.configurations .table-container table .title div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.configurations .table-container table .title div.config-event-title{font-weight:600}.configurations .table-container table .title div.config-event-description{font-size:0.75rem}.configurations .pagination{padding:1rem;position:sticky;top:100%;display:flex;justify-content:flex-end;gap:0.5rem;background:
|
|
1340
|
-
var
|
|
1341
|
-
var l = arguments.length,
|
|
1365
|
+
const vt = ':host{display:grid;grid-auto-flow:row;width:100%;font-family:inherit;font-optical-sizing:auto;--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}.header{display:flex;align-items:center;justify-content:space-between;margin-bottom:1rem;gap:1rem}@media screen and (max-width: 768px){.header{flex-direction:column;gap:0.5rem;align-items:unset}}.header h2{margin:0;font-size:1.25rem;color:var(--nylas-base-900);font-weight:600}.header p{margin:0;font-size:16px;color:var(--nylas-base-700)}.header .actions{justify-self:end}@media screen and (max-width: 768px){.header .actions{width:100%}}.configurations{border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);background:var(--nylas-base-0);height:100%;display:flex;flex-direction:column;position:relative;overflow-y:hidden}.configurations .table-container{overflow-y:auto;flex:1}@media screen and (max-width: 768px){.configurations .table-container{min-height:624px}}.configurations .table-container table{width:100%;border-spacing:0;border-collapse:collapse;font-family:inherit;height:max-content}.configurations .table-container table.no-configurations{height:100%}.configurations .table-container table tr{color:var(--nylas-base-800);border-bottom:1px solid var(--nylas-base-200);font-family:inherit}.configurations .table-container table tr.hide{display:none}.configurations .table-container table th{font-weight:600;text-transform:uppercase;font-size:14px;line-height:20px}.configurations .table-container table tr.no-configurations td>div{display:flex;height:100%;justify-content:center;align-items:center;flex-direction:column;padding:var(--nylas-border-radius-3x)}.configurations .table-container table tr.no-configurations td>div h3{margin:0 0 1rem 0;color:var(--nylas-base-700)}.configurations .table-container table tr.no-configurations td>div p{margin:0 0 1rem 0;color:var(--nylas-base-600)}.configurations .table-container table tr.no-configurations td>div calendar-icon{margin-bottom:1rem;color:var(--nylas-base-200)}.configurations .table-container table th,.configurations .table-container table td{text-align:left;padding:1rem;font-family:inherit}.configurations .table-container table .actions{display:flex;justify-content:flex-end;gap:1rem;text-align:right}.configurations .table-container table .actions button-component.edit-button{min-width:98px}@media screen and (max-width: 768px){.configurations .table-container table .actions{flex-direction:column;gap:0.5rem}}.configurations .table-container table .actions select-dropdown.last::part(sd_dropdown-content){bottom:54px}.configurations .table-container table .title{width:100%;max-width:300px}@media screen and (max-width: 768px){.configurations .table-container table .title{max-width:96px}}.configurations .table-container table .title div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.configurations .table-container table .title div.config-event-title{font-weight:600}.configurations .table-container table .title div.config-event-description{font-size:0.75rem}.configurations .pagination{padding:1rem;position:sticky;top:100%;display:flex;justify-content:flex-end;gap:0.5rem;background:var(--nylas-base-0);width:calc(100% - 2rem);z-index:2}.configurations .pagination td.arrows{display:flex;justify-content:flex-end;gap:0.5rem}.configurations .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);border:1px solid var(--nylas-base-300);background-color:transparent;color:var(--nylas-base-800);cursor:pointer}.configurations .pagination button:hover:not(:disabled){border:1px solid var(--nylas-primary)}.configurations .pagination button:active{border:1px solid var(--nylas-base-800)}.configurations .pagination button:disabled{border:1px solid var(--nylas-base-100);background-color:transparent;color:var(--nylas-base-300);cursor:not-allowed}.configurations .pagination button.right{transform:rotate(180deg)}.error-container{margin-top:1.5rem}.error-container .error{color:var(--nylas-error);padding:0.5rem 0;margin:1rem 0 0}button-component#copy button{width:108px}select-dropdown{width:auto;color:inherit}select-dropdown::part(sd_dropdown-button){display:block;height:48px;padding:0px 16px 8px}@media screen and (max-width: 768px){select-dropdown::part(sd_dropdown-button){width:92px}}select-dropdown::part(sd_dropdown-content){width:120px;right:0}select-dropdown::part(sd_dropdown-labelhtml){display:flex;gap:0.5rem;align-items:center;color:var(--nylas-base-900)}select-dropdown::part(sd_dropdown-labelhtml):hover{color:var(--nylas-primary)}.card-wrapper{position:absolute;top:0;left:0;height:calc(100% + 4rem);width:-webkit-fill-available;width:-moz-available;width:fill-available;display:flex;flex-direction:column;justify-content:center;align-items:center;background:rgba(0, 0, 0, 0.6);z-index:2;border-radius:var(--nylas-border-radius-2x)}@media screen and (max-width: 768px){.card-wrapper{justify-content:start;height:100%}}.card-modal{background:var(--nylas-base-0);display:flex;flex-direction:column;font-family:var(--nylas-font-family);background-color:var(--nylas-base-0);color:var(--nylas-base-900);border-radius:var(--nylas-border-radius-3x);padding:32px;width:562px;box-shadow:0px 1px 4px rgba(0, 0, 0, 0.1), 0px 3px 6px rgba(0, 0, 0, 0.06)}@media screen and (max-width: 768px){.card-modal{width:auto;border-radius:0px}}.description.title-desc{margin-bottom:2rem}.description p{margin:0;font-size:18px;color:var(--nylas-base-600)}.footer{margin-top:1rem;padding-top:1rem;display:flex;justify-content:flex-end;gap:0.5rem;box-sizing:border-box;background-color:var(--nylas-base-25);width:100%;border-radius:0 0 var(--nylas-border-radius-2x) var(--nylas-border-radius-2x)}.close-button{width:100%;display:flex;justify-content:flex-end}.close-button button-component button{padding:0;height:auto}.close-button button-component button:hover{background-color:transparent !important}button-component{--dot-color:var(--nylas-base-700)}', Ct = vt;
|
|
1366
|
+
var wt = function(e, t, a, s) {
|
|
1367
|
+
var l = arguments.length, i = l < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, a) : s, o;
|
|
1342
1368
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
1343
|
-
|
|
1369
|
+
i = Reflect.decorate(e, t, a, s);
|
|
1344
1370
|
else
|
|
1345
1371
|
for (var d = e.length - 1; d >= 0; d--)
|
|
1346
|
-
(o = e[d]) && (
|
|
1347
|
-
return l > 3 &&
|
|
1372
|
+
(o = e[d]) && (i = (l < 3 ? o(i) : l > 3 ? o(t, a, i) : o(t, a)) || i);
|
|
1373
|
+
return l > 3 && i && Object.defineProperty(t, a, i), i;
|
|
1348
1374
|
}, fe = function(e, t) {
|
|
1349
1375
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
1350
1376
|
return Reflect.metadata(e, t);
|
|
1351
1377
|
};
|
|
1352
1378
|
const Qe = class {
|
|
1353
1379
|
constructor(e) {
|
|
1354
|
-
te(this, e), this.initListConfigurations = m(this, "initListConfigurations", 7), this.createButtonClick = m(this, "createButtonClick", 7), this.editButtonClick = m(this, "editButtonClick", 7), this.deleteButtonClick = m(this, "deleteButtonClick", 7), this.nylasSchedulerError = m(this, "nylasSchedulerError", 6), this.dismissNotification = m(this, "dismissNotification", 6), this.configurations = [], this.selectedLanguage = void 0, this.schedulerPreviewLink = "", this.listConfigurationsNextCursor = void 0, this.state = "loading", this.error = {
|
|
1380
|
+
te(this, e), this.initListConfigurations = m(this, "initListConfigurations", 7), this.createButtonClick = m(this, "createButtonClick", 7), this.editButtonClick = m(this, "editButtonClick", 7), this.deleteButtonClick = m(this, "deleteButtonClick", 7), this.nylasSchedulerError = m(this, "nylasSchedulerError", 6), this.dismissNotification = m(this, "dismissNotification", 6), this.configurations = [], this.selectedLanguage = void 0, this.schedulerPreviewLink = "", this.listConfigurationsNextCursor = void 0, this.themeConfig = void 0, this.state = "loading", this.error = {
|
|
1355
1381
|
message: "",
|
|
1356
1382
|
type: _.Error,
|
|
1357
1383
|
category: v.Component,
|
|
@@ -1366,7 +1392,10 @@ const Qe = class {
|
|
|
1366
1392
|
this.disableNextPageButton = !1, this.currentCursor = e;
|
|
1367
1393
|
}
|
|
1368
1394
|
selectedLanguageChangedHandler(e, t) {
|
|
1369
|
-
e !== t &&
|
|
1395
|
+
e !== t && r.changeLanguage(e);
|
|
1396
|
+
}
|
|
1397
|
+
themeConfigChangedHandler(e, t) {
|
|
1398
|
+
e !== t && this.applyThemeConfig(e);
|
|
1370
1399
|
}
|
|
1371
1400
|
connectedCallback() {
|
|
1372
1401
|
b("[nylas-list-configurations]", "connectedCallback");
|
|
@@ -1382,6 +1411,11 @@ const Qe = class {
|
|
|
1382
1411
|
disconnectedCallback() {
|
|
1383
1412
|
b("[nylas-list-configurations]", "disconnectedCallback");
|
|
1384
1413
|
}
|
|
1414
|
+
applyThemeConfig(e) {
|
|
1415
|
+
if (e)
|
|
1416
|
+
for (const [t, a] of Object.entries(e))
|
|
1417
|
+
this.host.style.setProperty(`${t}`, a);
|
|
1418
|
+
}
|
|
1385
1419
|
async handleNylasFormDropdownChanged(e) {
|
|
1386
1420
|
var l;
|
|
1387
1421
|
b("[nylas-list-configurations]", "handleNylasFormDropdownChanged", e.detail);
|
|
@@ -1391,10 +1425,10 @@ const Qe = class {
|
|
|
1391
1425
|
this.deleteConfigurationId = (l = this.configurations[s]) == null ? void 0 : l.id;
|
|
1392
1426
|
break;
|
|
1393
1427
|
case "preview":
|
|
1394
|
-
window.open(
|
|
1428
|
+
window.open(de(this.schedulerPreviewLink, this.configurations[s]), "_blank");
|
|
1395
1429
|
break;
|
|
1396
1430
|
case "copy":
|
|
1397
|
-
await navigator.clipboard.writeText(
|
|
1431
|
+
await navigator.clipboard.writeText(de(this.schedulerPreviewLink, this.configurations[s]));
|
|
1398
1432
|
break;
|
|
1399
1433
|
}
|
|
1400
1434
|
}
|
|
@@ -1415,7 +1449,7 @@ const Qe = class {
|
|
|
1415
1449
|
message: e.message,
|
|
1416
1450
|
type: e.type,
|
|
1417
1451
|
category: e.category,
|
|
1418
|
-
title: e.title ||
|
|
1452
|
+
title: e.title || r.t("genericErrorTitle")
|
|
1419
1453
|
}, (t = this.error) != null && t.message && this.showErrorNotification(this.error);
|
|
1420
1454
|
}
|
|
1421
1455
|
async hideDeleteConfirmation() {
|
|
@@ -1461,11 +1495,11 @@ const Qe = class {
|
|
|
1461
1495
|
};
|
|
1462
1496
|
switch (e) {
|
|
1463
1497
|
case "preview":
|
|
1464
|
-
return n("span", { style: t }, n("eye-icon", { width: "16", height: "16" }),
|
|
1498
|
+
return n("span", { style: t }, n("eye-icon", { width: "16", height: "16" }), r.t("nylasListConfigurations.previewButtonText"));
|
|
1465
1499
|
case "copy":
|
|
1466
|
-
return n("span", { style: t }, n("copy-icon", { width: "16", height: "16" }),
|
|
1500
|
+
return n("span", { style: t }, n("copy-icon", { width: "16", height: "16" }), r.t("nylasListConfigurations.copyLinkButtonText"));
|
|
1467
1501
|
case "delete":
|
|
1468
|
-
return n("span", { style: { ...t, ...a } }, n("delete-icon", { width: "15", height: "17" }),
|
|
1502
|
+
return n("span", { style: { ...t, ...a } }, n("delete-icon", { width: "15", height: "17" }), r.t("nylasListConfigurations.deleteButtonText"));
|
|
1469
1503
|
default:
|
|
1470
1504
|
return "";
|
|
1471
1505
|
}
|
|
@@ -1488,29 +1522,29 @@ const Qe = class {
|
|
|
1488
1522
|
}
|
|
1489
1523
|
render() {
|
|
1490
1524
|
var e;
|
|
1491
|
-
return n(ce, null, n("nylas-notification", null), n("div", { class: "header" }, n("div", { class: "description" }, n("h2", null,
|
|
1525
|
+
return n(ce, null, n("nylas-notification", null), n("div", { class: "header" }, n("div", { class: "description" }, n("h2", null, r.t("allSchedulingPages")), n("p", null, r.t("createAndManageSchedulingPages"))), this.configurations && this.configurations.length > 0 && n("div", { class: "actions" }, n("button-component", { part: "nlc__create-new-cta", clickHandler: () => {
|
|
1492
1526
|
this.createButtonClick.emit(this.host);
|
|
1493
|
-
} },
|
|
1527
|
+
} }, r.t("createNewSchedulingPageButtonText")))), n("div", { class: "configurations" }, n("div", { class: "table-container" }, n("table", { class: {
|
|
1494
1528
|
"no-configurations": this.state !== "loading" && (!this.configurations || this.configurations.length === 0)
|
|
1495
1529
|
} }, n("tr", { class: {
|
|
1496
1530
|
hide: this.state === "loading" || this.configurations && this.configurations.length === 0
|
|
1497
|
-
} }, n("th", null,
|
|
1531
|
+
} }, n("th", null, r.t("pageTitle")), n("th", null, r.t("durationTitle")), n("th", null)), this.state === "loading" && n("tr", { class: "no-configurations" }, n("td", { colSpan: 3 }, n("div", null, n("h3", null, r.t("loading"), "..."), n("p", null, r.t("loadingPagesDescription"))))), this.state !== "loading" && (!this.configurations || this.configurations.length === 0) && n("tr", { class: "no-configurations" }, n("td", { colSpan: 3 }, n("div", null, n("calendar-icon", { width: "48", height: "48" }), n("h3", null, r.t("noSchedulingPages")), n("p", null, r.t("createFirstSchedulingPage")), n("button-component", { part: "nlc__create-new-cta", clickHandler: () => {
|
|
1498
1532
|
this.createButtonClick.emit(this.host);
|
|
1499
|
-
} },
|
|
1533
|
+
} }, r.t("createNewSchedulingPageButtonText"))))), this.state !== "loading" && ((e = this.configurations) == null ? void 0 : e.map((t, a) => {
|
|
1500
1534
|
var o, d, c, p;
|
|
1501
|
-
const s = (a === this.configurations.length - 1 || a === this.configurations.length - 2) && this.configurations.length > 3, l = t,
|
|
1502
|
-
return n("tr", { key: t == null ? void 0 : t.id }, n("td", null, n("div", { class: "title" }, n("div", { class: "config-event-title", title: (o =
|
|
1535
|
+
const s = (a === this.configurations.length - 1 || a === this.configurations.length - 2) && this.configurations.length > 3, l = t, i = t;
|
|
1536
|
+
return n("tr", { key: t == null ? void 0 : t.id }, n("td", null, n("div", { class: "title" }, n("div", { class: "config-event-title", title: (o = i == null ? void 0 : i.event_booking) == null ? void 0 : o.title }, ((d = i == null ? void 0 : i.event_booking) == null ? void 0 : d.title) || (l == null ? void 0 : l.name)), n("div", { class: "config-event-description" }, (c = i == null ? void 0 : i.event_booking) == null ? void 0 : c.description))), n("td", null, n("div", { class: "duration" }, this.getDurationString((p = i == null ? void 0 : i.availability) == null ? void 0 : p.duration_minutes))), n("td", null, n("div", { class: "actions" }, n("button-component", { class: "edit-button", variant: "basic", key: `edit-${a}`, disabled: this.editButtonLoadingId === `edit-${a}`, isLoading: this.editButtonLoadingId === `edit-${a}`, clickHandler: (h) => {
|
|
1503
1537
|
h.preventDefault(), this.editButtonLoadingId = `edit-${a}`, this.editButtonClick.emit({ host: this.host, configuration: t });
|
|
1504
|
-
} }, this.editButtonLoadingId === `edit-${a}` ? null : n("edit-icon", { width: "16", height: "16" }),
|
|
1538
|
+
} }, this.editButtonLoadingId === `edit-${a}` ? null : n("edit-icon", { width: "16", height: "16" }), r.t("editSchedulingPageButtonText")), n("select-dropdown", { class: {
|
|
1505
1539
|
last: s
|
|
1506
1540
|
}, name: "actions", options: [
|
|
1507
1541
|
{ value: `preview-${a}`, label: "Preview", labelHTML: this.getActionLabelHTML("preview") },
|
|
1508
1542
|
{ value: `copy-${a}`, label: "Copy link", labelHTML: this.getActionLabelHTML("copy") },
|
|
1509
1543
|
{ value: `delete-${a}`, label: "Delete", labelHTML: this.getActionLabelHTML("delete") }
|
|
1510
|
-
], defaultSelectedOption: { value: "", label: "" }, dropdownButtonText: "...", withSearch: !1, withChevron: !1, exportparts: "sd_dropdown: actions__dropdown, sd_dropdown-button: actions__dropdown-button, sd_dropdown-content: actions__dropdown-content, actions-Copy, actions-Preview, actions-Delete" }))));
|
|
1511
|
-
})))), n("div", { class: "pagination" }, n("button", { class: "arrow left", onClick: () => this.previousPageClickedHandler(), disabled: this.previousCursors.length <= 0 }, n("chevron-icon", null)), n("button", { class: "arrow right", onClick: () => this.nextPageClickedHandler(), disabled: this.disableNextPageButton }, n("chevron-icon", null)))), !!this.deleteConfigurationId && n("div", { class: "card-wrapper" }, n("div", { class: "card-modal" }, n("div", { class: "close-button" }, n("button-component", { tooltip: "Close", id: "close", variant: "invisible", onClick: (t) => this.closeModal(t), part: "nfbf__close-button" }, n("close-icon", null))), n("div", { class: "header" }, n("h2", { slot: "card-title", part: "nfbf__title" },
|
|
1544
|
+
], defaultSelectedOption: { value: "", label: "" }, dropdownButtonText: "...", withSearch: !1, withChevron: !1, themeConfig: this.themeConfig, exportparts: "sd_dropdown: actions__dropdown, sd_dropdown-button: actions__dropdown-button, sd_dropdown-content: actions__dropdown-content, actions-Copy, actions-Preview, actions-Delete" }))));
|
|
1545
|
+
})))), n("div", { class: "pagination" }, n("button", { class: "arrow left", onClick: () => this.previousPageClickedHandler(), disabled: this.previousCursors.length <= 0 }, n("chevron-icon", null)), n("button", { class: "arrow right", onClick: () => this.nextPageClickedHandler(), disabled: this.disableNextPageButton }, n("chevron-icon", null)))), !!this.deleteConfigurationId && n("div", { class: "card-wrapper" }, n("div", { class: "card-modal" }, n("div", { class: "close-button" }, n("button-component", { tooltip: "Close", id: "close", variant: "invisible", onClick: (t) => this.closeModal(t), part: "nfbf__close-button" }, n("close-icon", null))), n("div", { class: "header" }, n("h2", { slot: "card-title", part: "nfbf__title" }, r.t("deleteSchedulingPageTitle"))), n("div", { class: "description title-desc" }, n("p", null, r.t("deleteSchedulingPageDescription"))), n("div", { class: {
|
|
1512
1546
|
footer: !0
|
|
1513
|
-
} }, n("button-component", { variant: "basic", onClick: (t) => this.closeModal(t), part: "nfbf__button-outline nfbf__cancel-cta" }, `${
|
|
1547
|
+
} }, n("button-component", { variant: "basic", onClick: (t) => this.closeModal(t), part: "nfbf__button-outline nfbf__cancel-cta" }, `${r.t("deleteSchedulingPageCancelButton")}`), n("button-component", { variant: "destructive", onClick: (t) => this.handleConfirmDeleteButtonClicked(t), disabled: this.showDeleteButtonLoading, isLoading: this.showDeleteButtonLoading, part: "nfbf__button-outline nfbf__reschedule-cta" }, `${r.t("deleteSchedulingPageConfirmButton")}`)))));
|
|
1514
1548
|
}
|
|
1515
1549
|
get host() {
|
|
1516
1550
|
return pe(this);
|
|
@@ -1518,30 +1552,32 @@ const Qe = class {
|
|
|
1518
1552
|
static get watchers() {
|
|
1519
1553
|
return {
|
|
1520
1554
|
listConfigurationsNextCursor: ["listConfigurationsNextCursorChangedHandler"],
|
|
1521
|
-
selectedLanguage: ["selectedLanguageChangedHandler"]
|
|
1555
|
+
selectedLanguage: ["selectedLanguageChangedHandler"],
|
|
1556
|
+
themeConfig: ["themeConfigChangedHandler"]
|
|
1522
1557
|
};
|
|
1523
1558
|
}
|
|
1524
1559
|
};
|
|
1525
|
-
|
|
1560
|
+
wt([
|
|
1526
1561
|
be({
|
|
1527
1562
|
name: "nylas-list-configurations",
|
|
1528
1563
|
stateToProps: /* @__PURE__ */ new Map([
|
|
1529
1564
|
["schedulerConfig.configurations", "configurations"],
|
|
1530
1565
|
["schedulerConfig.listConfigurationsNextCursor", "listConfigurationsNextCursor"],
|
|
1531
|
-
["schedulerConfig.selectedLanguage", "selectedLanguage"]
|
|
1566
|
+
["schedulerConfig.selectedLanguage", "selectedLanguage"],
|
|
1567
|
+
["schedulerConfig.themeConfig", "themeConfig"]
|
|
1532
1568
|
]),
|
|
1533
1569
|
localPropsToProp: /* @__PURE__ */ new Map([["schedulerPreviewLink", "schedulerPreviewLink"]]),
|
|
1534
1570
|
eventToProps: {
|
|
1535
1571
|
initListConfigurations: async (e, t) => {
|
|
1536
1572
|
const { host: a, cursor: s } = e.detail;
|
|
1537
1573
|
await a.setState("loading");
|
|
1538
|
-
const [l,
|
|
1539
|
-
if (!l &&
|
|
1574
|
+
const [l, i] = await t.schedulerConfig.getConfigurations(s);
|
|
1575
|
+
if (!l && i && i.message) {
|
|
1540
1576
|
await a.setState("error"), await a.setError({
|
|
1541
|
-
message:
|
|
1577
|
+
message: i.message,
|
|
1542
1578
|
type: _.Error,
|
|
1543
1579
|
category: v.Component,
|
|
1544
|
-
title:
|
|
1580
|
+
title: r.t("nylasEditorTabs.getConfigsError")
|
|
1545
1581
|
});
|
|
1546
1582
|
return;
|
|
1547
1583
|
}
|
|
@@ -1553,21 +1589,21 @@ kt([
|
|
|
1553
1589
|
a.length === 1 ? (t.schedulerConfigStore.state.action = "create", t.schedulerConfigStore.state.selectedEventType = I[a[0][0]]) : t.schedulerConfigStore.state.action = "create-select";
|
|
1554
1590
|
},
|
|
1555
1591
|
deleteButtonClick: async (e, t) => {
|
|
1556
|
-
const { host: a, configuration: s } = e.detail, [l,
|
|
1557
|
-
!l &&
|
|
1558
|
-
message:
|
|
1592
|
+
const { host: a, configuration: s } = e.detail, [l, i] = await t.schedulerConfig.deleteConfiguration(s.id);
|
|
1593
|
+
!l && i && i.message && (await a.setState("error"), await a.setError({
|
|
1594
|
+
message: i.message,
|
|
1559
1595
|
type: _.Error,
|
|
1560
1596
|
category: v.Component,
|
|
1561
|
-
title:
|
|
1597
|
+
title: r.t("nylasEditorTabs.deleteConfigError")
|
|
1562
1598
|
})), await a.hideDeleteConfirmation();
|
|
1563
1599
|
},
|
|
1564
1600
|
editButtonClick: async (e, t) => {
|
|
1565
1601
|
const { host: a, configuration: s } = e.detail;
|
|
1566
1602
|
if (s.type === "group") {
|
|
1567
|
-
const { startTime: l, endTime:
|
|
1603
|
+
const { startTime: l, endTime: i } = at((/* @__PURE__ */ new Date()).toISOString(), "week");
|
|
1568
1604
|
t.schedulerConfigStore.state.calendarViewDateRange = {
|
|
1569
1605
|
start_time: l.toString(),
|
|
1570
|
-
end_time:
|
|
1606
|
+
end_time: i.toString()
|
|
1571
1607
|
};
|
|
1572
1608
|
const [o, d] = await t.schedulerConfig.getGroupEvents(s.id, s);
|
|
1573
1609
|
if (!o && d && d.message) {
|
|
@@ -1575,7 +1611,7 @@ kt([
|
|
|
1575
1611
|
message: d.message,
|
|
1576
1612
|
type: _.Error,
|
|
1577
1613
|
category: v.Component,
|
|
1578
|
-
title:
|
|
1614
|
+
title: r.t("nylasEditorTabsGroup.getGroupEventsError")
|
|
1579
1615
|
}), a.hideEditButtonLoading();
|
|
1580
1616
|
return;
|
|
1581
1617
|
}
|
|
@@ -1589,16 +1625,16 @@ kt([
|
|
|
1589
1625
|
fe("design:paramtypes", []),
|
|
1590
1626
|
fe("design:returntype", void 0)
|
|
1591
1627
|
], Qe.prototype, "render", null);
|
|
1592
|
-
Qe.style =
|
|
1593
|
-
const
|
|
1628
|
+
Qe.style = Ct;
|
|
1629
|
+
const kt = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff;width:inherit}.nylas-select-event-type{height:inherit;overflow-y:auto}.nylas-select-event-type div.header{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--nylas-base-200)}.nylas-select-event-type div.header h2{font-size:18px;padding:0 24px;line-height:24px;margin:0;font-weight:600;color:var(--nylas-base-800)}.nylas-select-event-type div.header button-component button{background:transparent;border:none;cursor:pointer}.nylas-select-event-type div.header button-component button:hover,.nylas-select-event-type div.header button-component button:active{color:var(--nylas-primary);background-color:transparent}.nylas-select-event-type div.header button-component button:disabled{cursor:not-allowed}.nylas-select-event-type div.content{padding:40px}.nylas-select-event-type div.content h3{margin:0 0 32px 0;font-size:18px;line-height:24px;font-weight:600}.nylas-select-event-type div.content div.event-type{display:flex;flex-direction:column;gap:8px}.nylas-select-event-type div.content div.event-type div.event-type-option{padding:16px;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-3x);width:inherit;cursor:pointer;display:flex;flex-direction:column;gap:8px}.nylas-select-event-type div.content div.event-type div.event-type-option h4{margin:0;font-size:16px;line-height:24px;font-weight:600;color:var(--nylas-base-900)}.nylas-select-event-type div.content div.event-type div.event-type-option p{margin:0;font-size:14px;line-height:21px;font-weight:400;color:var(--nylas-base-800)}', xt = kt;
|
|
1594
1630
|
var Et = function(e, t, a, s) {
|
|
1595
|
-
var l = arguments.length,
|
|
1631
|
+
var l = arguments.length, i = l < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, a) : s, o;
|
|
1596
1632
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
1597
|
-
|
|
1633
|
+
i = Reflect.decorate(e, t, a, s);
|
|
1598
1634
|
else
|
|
1599
1635
|
for (var d = e.length - 1; d >= 0; d--)
|
|
1600
|
-
(o = e[d]) && (
|
|
1601
|
-
return l > 3 &&
|
|
1636
|
+
(o = e[d]) && (i = (l < 3 ? o(i) : l > 3 ? o(t, a, i) : o(t, a)) || i);
|
|
1637
|
+
return l > 3 && i && Object.defineProperty(t, a, i), i;
|
|
1602
1638
|
}, me = function(e, t) {
|
|
1603
1639
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
1604
1640
|
return Reflect.metadata(e, t);
|
|
@@ -1611,7 +1647,7 @@ const Xe = class {
|
|
|
1611
1647
|
max_fairness: !0,
|
|
1612
1648
|
max_availability: !0,
|
|
1613
1649
|
group: !0
|
|
1614
|
-
};
|
|
1650
|
+
}, this.themeConfig = void 0;
|
|
1615
1651
|
}
|
|
1616
1652
|
connectedCallback() {
|
|
1617
1653
|
b("nylas-select-event-type", "connectedCallback");
|
|
@@ -1629,10 +1665,18 @@ const Xe = class {
|
|
|
1629
1665
|
b("nylas-select-event-type", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
1630
1666
|
}
|
|
1631
1667
|
selectedLanguageChangedHandler(e, t) {
|
|
1632
|
-
e !== t &&
|
|
1668
|
+
e !== t && r.changeLanguage(e);
|
|
1669
|
+
}
|
|
1670
|
+
themeConfigChangedHandler(e, t) {
|
|
1671
|
+
e !== t && this.applyThemeConfig(e);
|
|
1672
|
+
}
|
|
1673
|
+
applyThemeConfig(e) {
|
|
1674
|
+
if (e)
|
|
1675
|
+
for (const [t, a] of Object.entries(e))
|
|
1676
|
+
this.host.style.setProperty(`${t}`, a);
|
|
1633
1677
|
}
|
|
1634
1678
|
render() {
|
|
1635
|
-
var
|
|
1679
|
+
var i;
|
|
1636
1680
|
const e = {
|
|
1637
1681
|
"one-on-one": "one_on_one",
|
|
1638
1682
|
collective: "collective",
|
|
@@ -1641,37 +1685,37 @@ const Xe = class {
|
|
|
1641
1685
|
group: "group"
|
|
1642
1686
|
}, t = [
|
|
1643
1687
|
{
|
|
1644
|
-
label:
|
|
1688
|
+
label: r.t("nylasSelectEventType.eventTypeOptions.oneOnOne.label"),
|
|
1645
1689
|
value: I.one_on_one,
|
|
1646
|
-
description:
|
|
1690
|
+
description: r.t("nylasSelectEventType.eventTypeOptions.oneOnOne.desc")
|
|
1647
1691
|
},
|
|
1648
1692
|
{
|
|
1649
|
-
label:
|
|
1693
|
+
label: r.t("nylasSelectEventType.eventTypeOptions.collective.label"),
|
|
1650
1694
|
value: I.collective,
|
|
1651
|
-
description:
|
|
1695
|
+
description: r.t("nylasSelectEventType.eventTypeOptions.collective.desc")
|
|
1652
1696
|
},
|
|
1653
1697
|
{
|
|
1654
|
-
label:
|
|
1698
|
+
label: r.t("nylasSelectEventType.eventTypeOptions.maxFairness.label"),
|
|
1655
1699
|
value: I.max_fairness,
|
|
1656
|
-
description:
|
|
1700
|
+
description: r.t("nylasSelectEventType.eventTypeOptions.maxFairness.desc")
|
|
1657
1701
|
},
|
|
1658
1702
|
{
|
|
1659
|
-
label:
|
|
1703
|
+
label: r.t("nylasSelectEventType.eventTypeOptions.maxAvailability.label"),
|
|
1660
1704
|
value: I.max_availability,
|
|
1661
|
-
description:
|
|
1705
|
+
description: r.t("nylasSelectEventType.eventTypeOptions.maxAvailability.desc")
|
|
1662
1706
|
},
|
|
1663
1707
|
{
|
|
1664
|
-
label:
|
|
1708
|
+
label: r.t("nylasSelectEventType.eventTypeOptions.group.label"),
|
|
1665
1709
|
value: I.group,
|
|
1666
|
-
description:
|
|
1710
|
+
description: r.t("nylasSelectEventType.eventTypeOptions.group.desc")
|
|
1667
1711
|
}
|
|
1668
|
-
], a = [I.collective, I.max_availability, I.max_fairness], s = this.participantOptions && ((
|
|
1712
|
+
], a = [I.collective, I.max_availability, I.max_fairness], s = this.participantOptions && ((i = this.participantOptions) == null ? void 0 : i.length) > 0 && !!this.participantOptions[0].email && !!this.participantOptions[0].name && !!this.participantOptions[0].calendars && this.participantOptions[0].calendars.length > 0, l = this.enableEventTypes ? t.filter((o) => {
|
|
1669
1713
|
const d = o.value, c = e[d];
|
|
1670
1714
|
return console.log("key", d, this.enableEventTypes ? this.enableEventTypes[c] : "no enableEventTypes"), a.includes(d) && !s ? !1 : this.enableEventTypes && this.enableEventTypes[c];
|
|
1671
1715
|
}) : t;
|
|
1672
|
-
return n(ce, null, n("div", { class: "nylas-select-event-type", part: "nset" }, n("div", { class: "header", part: "nset__header" }, n("h2", null,
|
|
1716
|
+
return n(ce, null, n("div", { class: "nylas-select-event-type", part: "nset" }, n("div", { class: "header", part: "nset__header" }, n("h2", null, r.t("nylasSelectEventType.createEventHeaderTitle")), n("button-component", { variant: "invisible", part: "nset__header__back-button", onClick: (o) => {
|
|
1673
1717
|
this.returnToAllSchedulingPagesEvent.emit();
|
|
1674
|
-
} }, n("chevron-icon", { width: "16", height: "16" }), n("span", null,
|
|
1718
|
+
} }, n("chevron-icon", { width: "16", height: "16" }), n("span", null, r.t("nylasSelectEventType.returnToAllSchedulingPages")))), n("div", { class: "content", part: "nset__content" }, n("h3", null, r.t("nylasSelectEventType.eventTypeHeaderTitle")), n("div", { class: "event-type", part: "nset__content__event-type" }, l.length === 0 && n("p", null, r.t("nylasSelectEventType.noEventTypesEnabled")), l.map((o) => n("div", { class: "event-type-option", onClick: (d) => {
|
|
1675
1719
|
this.createEventTypeSelected.emit({ eventType: o.value });
|
|
1676
1720
|
}, part: `nset__content__event-type-option-${o.value}` }, n("h4", null, o.label), n("p", null, o.description)))))));
|
|
1677
1721
|
}
|
|
@@ -1681,7 +1725,8 @@ const Xe = class {
|
|
|
1681
1725
|
static get watchers() {
|
|
1682
1726
|
return {
|
|
1683
1727
|
name: ["elementNameChangedHandler"],
|
|
1684
|
-
selectedLanguage: ["selectedLanguageChangedHandler"]
|
|
1728
|
+
selectedLanguage: ["selectedLanguageChangedHandler"],
|
|
1729
|
+
themeConfig: ["themeConfigChangedHandler"]
|
|
1685
1730
|
};
|
|
1686
1731
|
}
|
|
1687
1732
|
};
|
|
@@ -1691,7 +1736,8 @@ Et([
|
|
|
1691
1736
|
stateToProps: /* @__PURE__ */ new Map([
|
|
1692
1737
|
["schedulerConfig.selectedLanguage", "selectedLanguage"],
|
|
1693
1738
|
["schedulerConfig.additionalParticipants", "participantOptions"],
|
|
1694
|
-
["schedulerConfig.enableEventTypes", "enableEventTypes"]
|
|
1739
|
+
["schedulerConfig.enableEventTypes", "enableEventTypes"],
|
|
1740
|
+
["schedulerConfig.themeConfig", "themeConfig"]
|
|
1695
1741
|
]),
|
|
1696
1742
|
eventToProps: {
|
|
1697
1743
|
returnToAllSchedulingPagesEvent: async (e, t) => {
|