@nylas/react 2.0.6 → 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-f6f8b5e5.js → add-circle-icon_2.entry-a3daf6c4.js} +6 -4
- package/dist/archive-icon.entry-46ad0ff3.cjs +1 -0
- package/dist/{archive-icon.entry-b3a76711.js → archive-icon.entry-d5141486.js} +6 -4
- package/dist/{arrow-icon.entry-9b3441aa.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-0749a116.js → bold-icon.entry-c117b4cf.js} +6 -4
- package/dist/button-component_2.entry-8cd4c5f3.cjs +1 -0
- package/dist/{button-component_2.entry-6eb55e97.js → button-component_2.entry-e68caa9b.js} +5 -3
- package/dist/{calendar-agenda-fill-icon_37.entry-4adf73a2.js → calendar-agenda-fill-icon_37.entry-52bdc8b3.js} +201 -198
- 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-2a29cb3f.js → calendar-cancel-icon.entry-f5f1d499.js} +8 -6
- package/dist/{calendar-check-icon.entry-c12b63ea.js → calendar-check-icon.entry-55320137.js} +6 -4
- package/dist/calendar-check-icon.entry-72108702.cjs +1 -0
- package/dist/{calendar-icon.entry-e82a5169.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-59612a67.js → checkbox-component.entry-89fa6edd.js} +3 -1
- package/dist/checkbox-group_4.entry-30e8af17.cjs +28 -0
- package/dist/{checkbox-group_4.entry-7df47ad4.js → checkbox-group_4.entry-51f03009.js} +6 -3
- package/dist/checkmark-circle-icon.entry-ae11049d.cjs +1 -0
- package/dist/{checkmark-circle-icon.entry-677b0def.js → checkmark-circle-icon.entry-dfe67e22.js} +8 -6
- package/dist/{checkmark-icon_15.entry-9fd0ec58.js → checkmark-icon_15.entry-4c3979db.js} +21 -18
- package/dist/checkmark-icon_15.entry-e59c0f53.cjs +5 -0
- package/dist/{chevron-icon_3.entry-f0ad71d9.js → chevron-icon_3.entry-1f3c3ca6.js} +3 -1
- 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-e7472d5f.js → clock-icon_4.entry-78878cb8.js} +3 -1
- package/dist/customParseFormat-b5d95b34-a6b6fcba.cjs +1 -0
- package/dist/{customParseFormat-eeec04f5-3ad26beb.js → customParseFormat-b5d95b34-ce80820c.js} +1 -1
- package/dist/delete-icon.entry-a8c0bf03.cjs +1 -0
- package/dist/{delete-icon.entry-813429d7.js → delete-icon.entry-cebdc90f.js} +7 -5
- package/dist/document-refresh-icon.entry-2d9a529d.cjs +1 -0
- package/dist/{document-refresh-icon.entry-c224c778.js → document-refresh-icon.entry-8780a2b8.js} +3 -1
- package/dist/{feedbackSync-0ebd0eda-e12b00d5.cjs → feedbackSync-92220b42-fbebe1f9.cjs} +1 -1
- package/dist/{feedbackSync-0ebd0eda-803c3ebe.js → feedbackSync-92220b42-fd5f5610.js} +1 -1
- package/dist/folder-icon.entry-3e61ccca.cjs +1 -0
- package/dist/{folder-icon.entry-9c1f7c41.js → folder-icon.entry-6ffd5191.js} +6 -4
- package/dist/forward-icon.entry-c7d88db8.cjs +1 -0
- package/dist/{forward-icon.entry-4ac22c16.js → forward-icon.entry-c9c4bf5b.js} +5 -3
- package/dist/globe-icon.entry-0b93cab8.cjs +1 -0
- package/dist/{globe-icon.entry-7798c93b.js → globe-icon.entry-7c0dca7b.js} +5 -3
- package/dist/{google-logo-icon_6.entry-b198c90a.js → google-logo-icon_6.entry-deef91ee.js} +177 -174
- 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-fa6dc1dc.js → google-meet-icon_5.entry-f8b5a92a.js} +3 -1
- package/dist/{inbox-icon.entry-1b123e64.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-57d4a08f-b0a2ca19.cjs → index.es-488bc919-d02dd50a.cjs} +1 -1
- package/dist/{index.es-57d4a08f-184cbc01.js → index.es-488bc919-ea63a7e9.js} +1 -1
- package/dist/info-icon_2.entry-442b9097.cjs +1 -0
- package/dist/{info-icon_2.entry-f8b72d08.js → info-icon_2.entry-60fb8648.js} +3 -1
- package/dist/{input-component.entry-44607977.js → input-component.entry-5898a52e.js} +19 -16
- package/dist/input-component.entry-7274fd28.cjs +1 -0
- package/dist/{input-dropdown_2.entry-6898b420.js → input-dropdown_2.entry-4534436c.js} +4 -1
- package/dist/input-dropdown_2.entry-9b72f637.cjs +1 -0
- package/dist/{italic-icon.entry-16aa1ada.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/multi-select-dropdown.entry-77752d46.cjs +1 -0
- package/dist/{multi-select-dropdown.entry-50133d29.js → multi-select-dropdown.entry-9c9d05c1.js} +4 -1
- package/dist/{nylas-booked-event-card_11.entry-56768a09.js → nylas-booked-event-card_11.entry-32b2e9f1.js} +139 -136
- 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-df957150.js → nylas-date-component_2.entry-a869519f.js} +10 -7
- package/dist/{nylas-form-card.entry-7724e61f.js → nylas-form-card.entry-5390459f.js} +9 -6
- 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-af763b6c.js → nylas-notification_2.entry-f46e88e5.js} +4 -1
- package/dist/{nylas-scheduler-editor.entry-0e4ba46d.js → nylas-scheduler-editor.entry-40a48f47.js} +93 -35
- package/dist/nylas-scheduler-editor.entry-e29fdf07.cjs +2 -0
- package/dist/{nylas-scheduling.entry-1b207e91.js → nylas-scheduling.entry-115b1752.js} +17 -14
- package/dist/nylas-scheduling.entry-79cb1d9c.cjs +1 -0
- package/dist/person-icon.entry-2cae306c.cjs +1 -0
- package/dist/{person-icon.entry-f2979577.js → person-icon.entry-fd668b89.js} +6 -4
- package/dist/{play-icon.entry-d387df5d.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-45dbd2df.js → radio-button-group.entry-9df82cd0.js} +7 -5
- 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-777cff27.js → refresh-icon.entry-c56e5623.js} +8 -6
- package/dist/register-component-3acd57e7-5a79a90a.cjs +1 -0
- package/dist/{register-component-0aad9e3d-b395364a.js → register-component-3acd57e7-cb09c05e.js} +15 -14
- package/dist/{reply-all-icon.entry-e2dd6da9.js → reply-all-icon.entry-32e0e000.js} +7 -5
- package/dist/reply-all-icon.entry-68388f97.cjs +1 -0
- package/dist/{reply-icon.entry-00a97d9f.js → reply-icon.entry-3ac2e736.js} +6 -4
- package/dist/reply-icon.entry-e616a9a4.cjs +1 -0
- package/dist/{sent-icon.entry-949cf214.js → sent-icon.entry-0622ed04.js} +6 -4
- package/dist/sent-icon.entry-543eb3c4.cjs +1 -0
- package/dist/{spam-icon.entry-3baf9e79.js → spam-icon.entry-74bcfd4f.js} +3 -1
- package/dist/spam-icon.entry-e341ee3e.cjs +1 -0
- package/dist/{star-icon.entry-9fdb278b.js → star-icon.entry-864d2bf9.js} +5 -3
- package/dist/star-icon.entry-c90d40f6.cjs +1 -0
- package/dist/{stop-icon.entry-efa1ea66.js → stop-icon.entry-835908c5.js} +3 -1
- package/dist/stop-icon.entry-ffc46b42.cjs +1 -0
- package/dist/{textarea-component.entry-7c6fc4d8.js → textarea-component.entry-6adcf6a6.js} +12 -9
- package/dist/textarea-component.entry-dae8eb5c.cjs +1 -0
- package/dist/toggle-switch.entry-5ee29867.cjs +1 -0
- package/dist/{toggle-switch.entry-a0295d17.js → toggle-switch.entry-ff2ccb75.js} +7 -5
- package/dist/{translate-icon.entry-219cab17.js → translate-icon.entry-372dd808.js} +3 -1
- package/dist/translate-icon.entry-5606067d.cjs +1 -0
- package/dist/{trash-fill-icon.entry-03c90559.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-58fa18b5.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-45ada3b4-31e3ed72.cjs +0 -1
- package/dist/abstract-provider-45ada3b4-abd3105d.js +0 -187
- package/dist/add-circle-icon_2.entry-48953f9c.cjs +0 -1
- package/dist/archive-icon.entry-e2880dc7.cjs +0 -1
- package/dist/arrow-icon.entry-84d1e26c.cjs +0 -1
- package/dist/bold-icon.entry-e1d8ab5e.cjs +0 -1
- package/dist/button-component_2.entry-1a817230.cjs +0 -1
- package/dist/calendar-agenda-fill-icon_37.entry-0ca8b9f4.cjs +0 -6
- package/dist/calendar-cancel-icon.entry-e0dee585.cjs +0 -1
- package/dist/calendar-check-icon.entry-7f96d456.cjs +0 -1
- package/dist/calendar-icon.entry-a2d19ff2.cjs +0 -1
- package/dist/checkbox-component.entry-ddce70bc.cjs +0 -1
- package/dist/checkbox-group_4.entry-3311da64.cjs +0 -28
- package/dist/checkmark-circle-icon.entry-67df713b.cjs +0 -1
- package/dist/checkmark-icon_15.entry-2121e1b7.cjs +0 -5
- package/dist/chevron-icon_3.entry-1a42235c.cjs +0 -1
- package/dist/clock-icon_4.entry-88822a84.cjs +0 -1
- package/dist/customParseFormat-eeec04f5-d5957784.cjs +0 -1
- package/dist/delete-icon.entry-3cb58910.cjs +0 -1
- package/dist/document-refresh-icon.entry-ae361b0b.cjs +0 -1
- package/dist/folder-icon.entry-107841af.cjs +0 -1
- package/dist/forward-icon.entry-6cec1f94.cjs +0 -1
- package/dist/globe-icon.entry-909c1382.cjs +0 -1
- package/dist/google-logo-icon_6.entry-1f4ad364.cjs +0 -2
- package/dist/google-meet-icon_5.entry-82d87e77.cjs +0 -1
- package/dist/inbox-icon.entry-84f96d31.cjs +0 -1
- package/dist/index-140eb219.js +0 -24953
- package/dist/index-d8a42c15.cjs +0 -118
- package/dist/info-icon_2.entry-f09e7dae.cjs +0 -1
- package/dist/input-component.entry-fd38953d.cjs +0 -1
- package/dist/input-dropdown_2.entry-4c2e5e1a.cjs +0 -1
- package/dist/italic-icon.entry-beef2254.cjs +0 -1
- package/dist/multi-select-dropdown.entry-c82cd6d4.cjs +0 -1
- package/dist/nylas-booked-event-card_11.entry-eb4b3c5c.cjs +0 -1
- package/dist/nylas-date-component_2.entry-93f2f352.cjs +0 -1
- package/dist/nylas-form-card.entry-4d95a4ad.cjs +0 -1
- package/dist/nylas-notification_2.entry-448c2cb8.cjs +0 -1
- package/dist/nylas-scheduler-editor.entry-e36cdd9d.cjs +0 -2
- package/dist/nylas-scheduling.entry-904dd10e.cjs +0 -1
- package/dist/person-icon.entry-70d46ca6.cjs +0 -1
- package/dist/play-icon.entry-c2cf0b12.cjs +0 -1
- package/dist/radio-button-group.entry-94e06176.cjs +0 -1
- package/dist/refresh-icon.entry-5ab20f26.cjs +0 -1
- package/dist/register-component-0aad9e3d-d2f2e543.cjs +0 -1
- package/dist/reply-all-icon.entry-3c90510e.cjs +0 -1
- package/dist/reply-icon.entry-d96478be.cjs +0 -1
- package/dist/sent-icon.entry-2d16da4e.cjs +0 -1
- package/dist/spam-icon.entry-7ee61730.cjs +0 -1
- package/dist/star-icon.entry-dc702d73.cjs +0 -1
- package/dist/stop-icon.entry-b5ae7e55.cjs +0 -1
- package/dist/textarea-component.entry-247aca42.cjs +0 -1
- package/dist/toggle-switch.entry-d52b0338.cjs +0 -1
- package/dist/translate-icon.entry-985b3b29.cjs +0 -1
- package/dist/trash-fill-icon.entry-4dfd7d24.cjs +0 -1
- package/dist/underline-icon.entry-c60b77a6.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" })
|
|
@@ -118,13 +121,13 @@ function bt({ id: e, formState: t, activeTab: a }, s) {
|
|
|
118
121
|
}
|
|
119
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);
|
|
@@ -137,17 +140,17 @@ const Ke = class {
|
|
|
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
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) ?? "",
|
|
@@ -195,7 +198,7 @@ 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
|
}
|
|
@@ -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",
|
|
@@ -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,7 +289,7 @@ 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
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: "",
|
|
@@ -306,9 +309,9 @@ 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
|
}
|
|
314
317
|
themeConfigChangedHandler(e, t) {
|
|
@@ -328,7 +331,7 @@ const Ke = class {
|
|
|
328
331
|
message: e.message,
|
|
329
332
|
type: e.type,
|
|
330
333
|
category: e.category,
|
|
331
|
-
title: e.title ||
|
|
334
|
+
title: e.title || r.t("genericErrorTitle")
|
|
332
335
|
}, (t = this.error) != null && t.message && this.showErrorNotification(this.error);
|
|
333
336
|
}
|
|
334
337
|
async resetError() {
|
|
@@ -350,7 +353,7 @@ const Ke = class {
|
|
|
350
353
|
var t, a;
|
|
351
354
|
b("[nylas-editor-tabs]", "componentDidLoad"), this.enableUserFeedback && !Je() && Ve({
|
|
352
355
|
dsn: "https://9d5731f1c77ca84c9ed3fb9b3ccf7ee1@o74852.ingest.us.sentry.io/4507889638178816",
|
|
353
|
-
release: "2.0
|
|
356
|
+
release: "2.1.0",
|
|
354
357
|
integrations: (s) => [
|
|
355
358
|
...s.filter((l) => !1),
|
|
356
359
|
qe({
|
|
@@ -379,7 +382,7 @@ const Ke = class {
|
|
|
379
382
|
this.showFeedbackModal = !1;
|
|
380
383
|
}
|
|
381
384
|
feedbackSubmittedHandler(e) {
|
|
382
|
-
var s, l,
|
|
385
|
+
var s, l, i, o, d, c;
|
|
383
386
|
const a = {
|
|
384
387
|
eventId: Ze("Scheduler Editor User Feedback", {
|
|
385
388
|
extra: {
|
|
@@ -394,8 +397,8 @@ const Ke = class {
|
|
|
394
397
|
captureContext: {
|
|
395
398
|
tags: {
|
|
396
399
|
"nylas-web-element": "nylas-scheduler-editor",
|
|
397
|
-
"nylas-web-element-version": "2.0
|
|
398
|
-
"nylas-config-id": (
|
|
400
|
+
"nylas-web-element-version": "2.1.0",
|
|
401
|
+
"nylas-config-id": (i = this.selectedConfiguration) == null ? void 0 : i.id,
|
|
399
402
|
"nylas-slug": (o = this.selectedConfiguration) == null ? void 0 : o.slug,
|
|
400
403
|
"host-url": window.location.href
|
|
401
404
|
},
|
|
@@ -420,9 +423,9 @@ const Ke = class {
|
|
|
420
423
|
});
|
|
421
424
|
}
|
|
422
425
|
getFormStateFromConfig(e) {
|
|
423
|
-
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;
|
|
424
427
|
let t = (a = e == null ? void 0 : e.participants) == null ? void 0 : a.find((P) => P.is_organizer);
|
|
425
|
-
return !t && ((l = (s = e == null ? void 0 : e.availability) == null ? void 0 : s.availability_rules) == null ? void 0 : l.availability_method) !== "collective" && (t = (
|
|
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) => {
|
|
426
429
|
var H;
|
|
427
430
|
return P.email === ((H = this.currentUser) == null ? void 0 : H.email);
|
|
428
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."), {
|
|
@@ -530,9 +533,9 @@ const Ke = class {
|
|
|
530
533
|
this.formState.participantOpenHours = a;
|
|
531
534
|
break;
|
|
532
535
|
}
|
|
533
|
-
case "participant-custom-availability-specific-
|
|
536
|
+
case "participant-custom-availability-specific-time": {
|
|
534
537
|
const a = JSON.parse(e.toString());
|
|
535
|
-
this.formState.
|
|
538
|
+
this.formState.participantSpecificTimeAvailability = a;
|
|
536
539
|
break;
|
|
537
540
|
}
|
|
538
541
|
case "additional-fields":
|
|
@@ -589,20 +592,20 @@ const Ke = class {
|
|
|
589
592
|
e.preventDefault(), this.showFeedbackModal = !0;
|
|
590
593
|
}
|
|
591
594
|
render() {
|
|
592
|
-
var e, t, a, s, l,
|
|
593
|
-
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: {
|
|
594
597
|
"tab-content": !0,
|
|
595
598
|
fadeIn: this.loaded
|
|
596
|
-
}, 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:
|
|
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: {
|
|
597
600
|
"unsaved-changes": this.hasUnsavedChanges && !this.changesSaved,
|
|
598
601
|
"saved-changes": this.changesSaved,
|
|
599
602
|
error: ((a = this.error) == null ? void 0 : a.message) !== "",
|
|
600
603
|
"error-full-width": ((s = this.error) == null ? void 0 : s.message) !== "" && this.action === "create"
|
|
601
|
-
} }, ((l = this.error) == null ? void 0 : l.message) == "" && this.hasUnsavedChanges && !this.changesSaved ?
|
|
602
|
-
o.preventDefault(), this.previewButtonClicked.emit(this.host).defaultPrevented || window.open(
|
|
603
|
-
}, 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) => {
|
|
604
607
|
o.preventDefault(), this.cancelButtonClick.emit(), this.host.resetError();
|
|
605
|
-
}, 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));
|
|
606
609
|
}
|
|
607
610
|
get host() {
|
|
608
611
|
return pe(this);
|
|
@@ -630,21 +633,21 @@ yt([
|
|
|
630
633
|
]),
|
|
631
634
|
eventToProps: {
|
|
632
635
|
schedulerConfigChanged: async (e, t) => {
|
|
633
|
-
const { resetLoadingState: a, host: s, action: l, config:
|
|
636
|
+
const { resetLoadingState: a, host: s, action: l, config: i } = e.detail, o = (d, c) => {
|
|
634
637
|
const [p, h] = d;
|
|
635
638
|
!p && h ? s.setError({
|
|
636
|
-
message: h.message ||
|
|
639
|
+
message: h.message || r.t("genericErrorTitle"),
|
|
637
640
|
type: _.Error,
|
|
638
641
|
category: v.Component,
|
|
639
642
|
title: c
|
|
640
643
|
}) : p && !h && l === "create" && (s.schedulerConfigCreatedEventHandler({ config: p, action: l, host: s }), t.schedulerConfigStore.set("selectedEventType", void 0)), a && a(e);
|
|
641
644
|
};
|
|
642
645
|
if (l === "edit") {
|
|
643
|
-
const d = await t.schedulerConfig.updateConfiguration(
|
|
644
|
-
o(d,
|
|
646
|
+
const d = await t.schedulerConfig.updateConfiguration(i);
|
|
647
|
+
o(d, r.t("nylasEditorTabs.updateConfigError"));
|
|
645
648
|
} else {
|
|
646
|
-
const d = await t.schedulerConfig.createConfiguration(
|
|
647
|
-
o(d,
|
|
649
|
+
const d = await t.schedulerConfig.createConfiguration(i);
|
|
650
|
+
o(d, r.t("nylasEditorTabs.createConfigError"));
|
|
648
651
|
}
|
|
649
652
|
},
|
|
650
653
|
cancelButtonClick: async (e, t) => {
|
|
@@ -681,7 +684,7 @@ var g;
|
|
|
681
684
|
})(g || (g = {}));
|
|
682
685
|
function gt({ id: e, formState: t, activeTab: a }, s) {
|
|
683
686
|
return n(
|
|
684
|
-
|
|
687
|
+
le,
|
|
685
688
|
null,
|
|
686
689
|
a === g.CalendarView && n(
|
|
687
690
|
"div",
|
|
@@ -720,7 +723,7 @@ function gt({ id: e, formState: t, activeTab: a }, s) {
|
|
|
720
723
|
{ key: `communications-${e}`, class: { hide: a !== g.Communications } },
|
|
721
724
|
n("nylas-disable-emails", { name: "disable-emails", exportparts: "nde, nde__toggle-label, nde_toggle-input, nde_toggle-slider" }),
|
|
722
725
|
!(t != null && t.disableEmails) && n(
|
|
723
|
-
|
|
726
|
+
le,
|
|
724
727
|
null,
|
|
725
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" }),
|
|
726
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" })
|
|
@@ -742,13 +745,13 @@ function gt({ id: e, formState: t, activeTab: a }, s) {
|
|
|
742
745
|
}
|
|
743
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;
|
|
744
747
|
var _t = function(e, t, a, s) {
|
|
745
|
-
var l = arguments.length,
|
|
748
|
+
var l = arguments.length, i = l < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, a) : s, o;
|
|
746
749
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
747
|
-
|
|
750
|
+
i = Reflect.decorate(e, t, a, s);
|
|
748
751
|
else
|
|
749
752
|
for (var d = e.length - 1; d >= 0; d--)
|
|
750
|
-
(o = e[d]) && (
|
|
751
|
-
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;
|
|
752
755
|
}, ge = function(e, t) {
|
|
753
756
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
754
757
|
return Reflect.metadata(e, t);
|
|
@@ -756,22 +759,22 @@ var _t = function(e, t, a, s) {
|
|
|
756
759
|
const Ye = class {
|
|
757
760
|
constructor(e) {
|
|
758
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) => {
|
|
759
|
-
var x, V, P, H, M, K, ne, oe, W, se,
|
|
762
|
+
var x, V, P, H, M, K, ne, oe, W, se, ie;
|
|
760
763
|
t.preventDefault();
|
|
761
764
|
const a = await this.formSubmitted.emit();
|
|
762
765
|
if (b("[nylas-editor-tabs-group]", "formSubmissionHandler", a), !this.formRef.checkValidity() || a.defaultPrevented) {
|
|
763
766
|
await this.host.setError({
|
|
764
|
-
message: this.formRef.validationMessage ||
|
|
767
|
+
message: this.formRef.validationMessage || r.t("fixFormErrors"),
|
|
765
768
|
type: _.Error,
|
|
766
769
|
category: v.Component,
|
|
767
|
-
title:
|
|
770
|
+
title: r.t("nylasEditorTabs.formErrorTitle")
|
|
768
771
|
});
|
|
769
772
|
return;
|
|
770
773
|
}
|
|
771
774
|
this.isLoading = !0, this.hasUnsavedChanges = !1;
|
|
772
775
|
const l = this.updateFormState();
|
|
773
776
|
b("[nylas-editor-tabs-group]", "formState", l);
|
|
774
|
-
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, $ = {
|
|
775
778
|
...((x = this.selectedConfiguration) == null ? void 0 : x.id) && { id: this.selectedConfiguration.id },
|
|
776
779
|
slug: R,
|
|
777
780
|
name: E,
|
|
@@ -801,7 +804,7 @@ const Ye = class {
|
|
|
801
804
|
}
|
|
802
805
|
}, j = _e(this.selectedConfiguration, $ || {}), G = this.action === "create" ? j : $;
|
|
803
806
|
delete G.availability, delete G.participants, delete G.event_booking;
|
|
804
|
-
const J = (
|
|
807
|
+
const J = (re) => {
|
|
805
808
|
this.isLoading = !1, this.changesSaved = !0, setTimeout(() => {
|
|
806
809
|
this.changesSaved = !1;
|
|
807
810
|
}, 3e3);
|
|
@@ -811,8 +814,8 @@ const Ye = class {
|
|
|
811
814
|
const Y = {
|
|
812
815
|
name: ((V = this.currentUser) == null ? void 0 : V.name) ?? ((P = this.currentUser) == null ? void 0 : P.email) ?? "",
|
|
813
816
|
email: ((H = this.currentUser) == null ? void 0 : H.email) ?? ""
|
|
814
|
-
}, q = ((M = this.calendars) == null ? void 0 : M.find((
|
|
815
|
-
title:
|
|
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,
|
|
816
819
|
description: o,
|
|
817
820
|
location: N ? void 0 : c,
|
|
818
821
|
conferencing: c ? void 0 : N,
|
|
@@ -820,7 +823,7 @@ const Ye = class {
|
|
|
820
823
|
start_time: ((oe = C == null ? void 0 : C.when) == null ? void 0 : oe.start_time) ?? 0,
|
|
821
824
|
end_time: ((W = C == null ? void 0 : C.when) == null ? void 0 : W.end_time) ?? 0,
|
|
822
825
|
start_timezone: ((se = C == null ? void 0 : C.when) == null ? void 0 : se.start_timezone) ?? "",
|
|
823
|
-
end_timezone: ((
|
|
826
|
+
end_timezone: ((ie = C == null ? void 0 : C.when) == null ? void 0 : ie.end_timezone) ?? ""
|
|
824
827
|
},
|
|
825
828
|
recurrence: (C == null ? void 0 : C.recurrence) ?? [],
|
|
826
829
|
calendar_id: d || (q == null ? void 0 : q.id) || "primary",
|
|
@@ -830,19 +833,19 @@ const Ye = class {
|
|
|
830
833
|
};
|
|
831
834
|
this.schedulerConfigChanged.emit({ groupEvent: X || void 0, config: G, resetLoadingState: J, action: this.action, host: this.host });
|
|
832
835
|
}, this.checkForBookingFormErrors = (t) => {
|
|
833
|
-
var
|
|
836
|
+
var i;
|
|
834
837
|
let a = !1, s = "";
|
|
835
|
-
const l = (
|
|
838
|
+
const l = (i = t.scheduler) == null ? void 0 : i.additional_fields;
|
|
836
839
|
return l && (s = "", Object.entries(l).forEach((o) => {
|
|
837
840
|
const d = o[1];
|
|
838
841
|
if (d.label === "") {
|
|
839
|
-
s +=
|
|
842
|
+
s += r.t("nylasEditorTabs.bookingFormError_label", { type: d.type }), a = !0;
|
|
840
843
|
return;
|
|
841
844
|
}
|
|
842
845
|
if (d.options) {
|
|
843
846
|
for (const c of d.options)
|
|
844
847
|
if (c.trim() === "") {
|
|
845
|
-
s +=
|
|
848
|
+
s += r.t("nylasEditorTabs.bookingFormError_option", { label: d.label, type: d.type }), a = !0;
|
|
846
849
|
break;
|
|
847
850
|
}
|
|
848
851
|
}
|
|
@@ -850,7 +853,7 @@ const Ye = class {
|
|
|
850
853
|
message: s,
|
|
851
854
|
type: _.Error,
|
|
852
855
|
category: v.Component,
|
|
853
|
-
title:
|
|
856
|
+
title: r.t("nylasEditorTabs.bookingFormError")
|
|
854
857
|
})), a;
|
|
855
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 = {
|
|
856
859
|
message: "",
|
|
@@ -865,12 +868,12 @@ const Ye = class {
|
|
|
865
868
|
}, e != null && e.id ? this.action = "edit" : this.action = "create";
|
|
866
869
|
}
|
|
867
870
|
selectedGroupEventChangedHandler(e) {
|
|
868
|
-
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;
|
|
869
872
|
b("[nylas-editor-tabs-group]", "selectedGroupEventChangedHandler", e, this.selectedConfiguration), this.formState = {
|
|
870
873
|
...this.formState,
|
|
871
874
|
title: (a = (t = this.selectedGroupEvent) == null ? void 0 : t.event) == null ? void 0 : a.title,
|
|
872
875
|
description: (l = (s = this.selectedGroupEvent) == null ? void 0 : s.event) == null ? void 0 : l.description,
|
|
873
|
-
location: (o = (
|
|
876
|
+
location: (o = (i = this.selectedGroupEvent) == null ? void 0 : i.event) == null ? void 0 : o.location,
|
|
874
877
|
conferencing: (c = (d = this.selectedGroupEvent) == null ? void 0 : d.event) == null ? void 0 : c.conferencing,
|
|
875
878
|
eventCapacity: (h = (p = this.selectedGroupEvent) == null ? void 0 : p.group_event_info) == null ? void 0 : h.capacity,
|
|
876
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) => ({
|
|
@@ -895,9 +898,9 @@ const Ye = class {
|
|
|
895
898
|
});
|
|
896
899
|
}
|
|
897
900
|
selectedLanguageChangedHandler(e, t) {
|
|
898
|
-
e !== t && (
|
|
901
|
+
e !== t && (r.changeLanguage(e), this.error && this.error.message && (this.error = {
|
|
899
902
|
...this.error,
|
|
900
|
-
message:
|
|
903
|
+
message: r.t("fixFormErrors")
|
|
901
904
|
}, this.showErrorNotification(this.error)));
|
|
902
905
|
}
|
|
903
906
|
themeConfigChangedHandler(e, t) {
|
|
@@ -917,7 +920,7 @@ const Ye = class {
|
|
|
917
920
|
message: e.message,
|
|
918
921
|
type: e.type,
|
|
919
922
|
category: e.category,
|
|
920
|
-
title: e.title ||
|
|
923
|
+
title: e.title || r.t("genericErrorTitle")
|
|
921
924
|
}, (t = this.error) != null && t.message && this.showErrorNotification(this.error);
|
|
922
925
|
}
|
|
923
926
|
async resetError() {
|
|
@@ -939,9 +942,9 @@ const Ye = class {
|
|
|
939
942
|
var t, a, s;
|
|
940
943
|
b("[nylas-editor-tabs-group]", "componentDidLoad"), this.enableUserFeedback && !Je() && Ve({
|
|
941
944
|
dsn: "https://9d5731f1c77ca84c9ed3fb9b3ccf7ee1@o74852.ingest.us.sentry.io/4507889638178816",
|
|
942
|
-
release: "2.0
|
|
945
|
+
release: "2.1.0",
|
|
943
946
|
integrations: (l) => [
|
|
944
|
-
...l.filter((
|
|
947
|
+
...l.filter((i) => !1),
|
|
945
948
|
qe({
|
|
946
949
|
colorScheme: "system",
|
|
947
950
|
autoInject: !1
|
|
@@ -978,7 +981,7 @@ const Ye = class {
|
|
|
978
981
|
captureContext: {
|
|
979
982
|
tags: {
|
|
980
983
|
"nylas-web-element": "nylas-scheduler-editor",
|
|
981
|
-
"nylas-web-element-version": "2.0
|
|
984
|
+
"nylas-web-element-version": "2.1.0"
|
|
982
985
|
},
|
|
983
986
|
extra: {
|
|
984
987
|
configId: (s = this.selectedConfiguration) == null ? void 0 : s.id,
|
|
@@ -992,32 +995,32 @@ const Ye = class {
|
|
|
992
995
|
this.groupEventImportTriggered.emit({ groupEvent: e.detail, configId: ((t = this.selectedConfiguration) == null ? void 0 : t.id) ?? "", host: this.host });
|
|
993
996
|
}
|
|
994
997
|
saveGroupEventChangesHandler(e) {
|
|
995
|
-
var s, l,
|
|
998
|
+
var s, l, i, o, d, c, p, h, f;
|
|
996
999
|
b("saveGroupEventChangesHandler", e.detail, this.selectedGroupEvent);
|
|
997
1000
|
const t = this.formRef.checkValidity(), a = this.getGroupEventDetailsFromFormState();
|
|
998
1001
|
if (this.resetError(), a.title || this.setError({
|
|
999
|
-
message:
|
|
1002
|
+
message: r.t("nylasEditorTabsGroup.eventTitleRequired"),
|
|
1000
1003
|
type: _.Error,
|
|
1001
1004
|
category: v.Component,
|
|
1002
|
-
title:
|
|
1005
|
+
title: r.t("nylasEditorTabs.formErrorTitle")
|
|
1003
1006
|
}), (!((s = a.when) != null && s.start_time) || !((l = a.when) != null && l.end_time)) && this.setError({
|
|
1004
|
-
message:
|
|
1007
|
+
message: r.t("nylasEditorTabsGroup.eventTimeRequired"),
|
|
1005
1008
|
type: _.Error,
|
|
1006
1009
|
category: v.Component,
|
|
1007
|
-
title:
|
|
1008
|
-
}), (
|
|
1009
|
-
message:
|
|
1010
|
+
title: r.t("nylasEditorTabs.formErrorTitle")
|
|
1011
|
+
}), (i = a.participants) != null && i.length || this.setError({
|
|
1012
|
+
message: r.t("nylasEditorTabsGroup.participantsRequired"),
|
|
1010
1013
|
type: _.Error,
|
|
1011
1014
|
category: v.Component,
|
|
1012
|
-
title:
|
|
1015
|
+
title: r.t("nylasEditorTabs.formErrorTitle")
|
|
1013
1016
|
}), (o = a.participants) != null && o.length && ((d = a.participants) != null && d.some((w) => !w.email)) && this.setError({
|
|
1014
|
-
message:
|
|
1017
|
+
message: r.t("nylasEditorTabsGroup.participantEmailRequired"),
|
|
1015
1018
|
type: _.Error,
|
|
1016
1019
|
category: v.Component,
|
|
1017
|
-
title:
|
|
1020
|
+
title: r.t("nylasEditorTabs.formErrorTitle")
|
|
1018
1021
|
}), ((c = this.error) == null ? void 0 : c.message) !== "" || !t) {
|
|
1019
1022
|
this.saveGroupEventChangesError.emit({
|
|
1020
|
-
error: ((p = this.error) == null ? void 0 : p.message) ??
|
|
1023
|
+
error: ((p = this.error) == null ? void 0 : p.message) ?? r.t("nylasEditorTabsGroup.errorOccured"),
|
|
1021
1024
|
configId: ((h = this.selectedConfiguration) == null ? void 0 : h.id) ?? "",
|
|
1022
1025
|
host: this.host
|
|
1023
1026
|
});
|
|
@@ -1046,7 +1049,7 @@ const Ye = class {
|
|
|
1046
1049
|
const t = e.detail, a = {
|
|
1047
1050
|
name: ((o = this.currentUser) == null ? void 0 : o.name) ?? ((d = this.currentUser) == null ? void 0 : d.email) ?? "",
|
|
1048
1051
|
email: ((c = this.currentUser) == null ? void 0 : c.email) ?? ""
|
|
1049
|
-
}, 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 = {
|
|
1050
1053
|
title: t.title,
|
|
1051
1054
|
description: t.description,
|
|
1052
1055
|
location: l ? void 0 : t.location,
|
|
@@ -1058,7 +1061,7 @@ const Ye = class {
|
|
|
1058
1061
|
calendar_id: (s == null ? void 0 : s.id) || "primary",
|
|
1059
1062
|
capacity: t.eventCapacity
|
|
1060
1063
|
};
|
|
1061
|
-
this.groupEventCreateTriggered.emit({ groupEvent:
|
|
1064
|
+
this.groupEventCreateTriggered.emit({ groupEvent: i, configId: ((w = this.selectedConfiguration) == null ? void 0 : w.id) ?? "", host: this.host });
|
|
1062
1065
|
}
|
|
1063
1066
|
showErrorNotification(e) {
|
|
1064
1067
|
this.nylasSchedulerError.emit({
|
|
@@ -1078,7 +1081,7 @@ const Ye = class {
|
|
|
1078
1081
|
const e = ((f = this.calendars) == null ? void 0 : f.find((R) => R.is_primary)) ?? ((w = this.calendars) == null ? void 0 : w[0]), t = {
|
|
1079
1082
|
name: ((T = this.currentUser) == null ? void 0 : T.name) ?? ((O = this.currentUser) == null ? void 0 : O.email) ?? "",
|
|
1080
1083
|
email: ((U = this.currentUser) == null ? void 0 : U.email) ?? ""
|
|
1081
|
-
}, 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;
|
|
1082
1085
|
return {
|
|
1083
1086
|
title: s,
|
|
1084
1087
|
description: l,
|
|
@@ -1091,20 +1094,20 @@ const Ye = class {
|
|
|
1091
1094
|
end_timezone: ((D = p == null ? void 0 : p.when) == null ? void 0 : D.end_timezone) ?? ""
|
|
1092
1095
|
},
|
|
1093
1096
|
recurrence: (p == null ? void 0 : p.recurrence) ?? [],
|
|
1094
|
-
calendar_id:
|
|
1097
|
+
calendar_id: i || (e == null ? void 0 : e.id) || "primary",
|
|
1095
1098
|
participants: h != null && h.length ? h : a,
|
|
1096
1099
|
organizer: t,
|
|
1097
1100
|
capacity: c || 10
|
|
1098
1101
|
};
|
|
1099
1102
|
}
|
|
1100
1103
|
getFormStateFromConfig(e) {
|
|
1101
|
-
var t, a, s, l,
|
|
1104
|
+
var t, a, s, l, i, o, d, c, p, h, f, w, T, O;
|
|
1102
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."), {
|
|
1103
1106
|
additionalFields: ((t = e == null ? void 0 : e.scheduler) == null ? void 0 : t.additional_fields) ?? {},
|
|
1104
1107
|
bookingType: ((a = e == null ? void 0 : e.group_booking) == null ? void 0 : a.booking_type) ?? "booking",
|
|
1105
1108
|
cancellationPolicy: ((s = e == null ? void 0 : e.scheduler) == null ? void 0 : s.cancellation_policy) ?? "",
|
|
1106
1109
|
minCancellationNotice: ((l = e == null ? void 0 : e.scheduler) == null ? void 0 : l.min_cancellation_notice) ?? 0,
|
|
1107
|
-
minBookingNotice: ((
|
|
1110
|
+
minBookingNotice: ((i = e == null ? void 0 : e.scheduler) == null ? void 0 : i.min_booking_notice) ?? 60,
|
|
1108
1111
|
hideCancellationOptions: ((o = e == null ? void 0 : e.scheduler) == null ? void 0 : o.hide_cancellation_options) ?? !1,
|
|
1109
1112
|
hideReschedulingOptions: ((d = e == null ? void 0 : e.scheduler) == null ? void 0 : d.hide_rescheduling_options) ?? !1,
|
|
1110
1113
|
reminders: (c = e == null ? void 0 : e.group_booking) == null ? void 0 : c.reminders,
|
|
@@ -1215,19 +1218,19 @@ const Ye = class {
|
|
|
1215
1218
|
e.preventDefault(), this.showFeedbackModal = !0;
|
|
1216
1219
|
}
|
|
1217
1220
|
render() {
|
|
1218
|
-
var e, t, a, s, l,
|
|
1221
|
+
var e, t, a, s, l, i;
|
|
1219
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) => {
|
|
1220
1223
|
this.setActiveTab(o, g.CalendarView);
|
|
1221
|
-
} }, 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: {
|
|
1222
1225
|
"unsaved-changes": this.hasUnsavedChanges && !this.changesSaved,
|
|
1223
1226
|
"saved-changes": this.changesSaved,
|
|
1224
1227
|
error: ((a = this.error) == null ? void 0 : a.message) !== "",
|
|
1225
1228
|
"error-full-width": ((s = this.error) == null ? void 0 : s.message) !== "" && this.action === "create"
|
|
1226
|
-
} }, ((l = this.error) == null ? void 0 : l.message) == "" && this.hasUnsavedChanges && !this.changesSaved && this.activeTab !== g.CalendarView ?
|
|
1227
|
-
o.preventDefault(), this.previewButtonClicked.emit(this.host).defaultPrevented || window.open(
|
|
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");
|
|
1228
1231
|
}, variant: "basic" }, n("eye-icon", null)), n("button-component", { key: "8fc79265e7819c0aeeba204f9f4e1ed6502ce5a1", type: "button", disabled: this.isLoading, clickHandler: (o) => {
|
|
1229
1232
|
o.preventDefault(), this.cancelButtonClick.emit(), this.host.resetError();
|
|
1230
|
-
}, 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));
|
|
1231
1234
|
}
|
|
1232
1235
|
get host() {
|
|
1233
1236
|
return pe(this);
|
|
@@ -1257,25 +1260,25 @@ _t([
|
|
|
1257
1260
|
]),
|
|
1258
1261
|
eventToProps: {
|
|
1259
1262
|
schedulerConfigChanged: async (e, t) => {
|
|
1260
|
-
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) => {
|
|
1261
1264
|
const [h, f] = c;
|
|
1262
1265
|
!h && f ? s.setError({
|
|
1263
|
-
message: f.message ||
|
|
1266
|
+
message: f.message || r.t("genericErrorTitle"),
|
|
1264
1267
|
type: _.Error,
|
|
1265
1268
|
category: v.Component,
|
|
1266
1269
|
title: p
|
|
1267
1270
|
}) : h && !f && l === "create" && s.schedulerConfigCreatedEventHandler({ config: h, action: l, host: s });
|
|
1268
1271
|
};
|
|
1269
1272
|
if (l === "edit") {
|
|
1270
|
-
const c = await t.schedulerConfig.updateConfiguration(
|
|
1271
|
-
d(c,
|
|
1273
|
+
const c = await t.schedulerConfig.updateConfiguration(i);
|
|
1274
|
+
d(c, r.t("nylasEditorTabs.updateConfigError")), a && a(e);
|
|
1272
1275
|
} else {
|
|
1273
|
-
const c = await t.schedulerConfig.createConfiguration(
|
|
1274
|
-
d(c,
|
|
1276
|
+
const c = await t.schedulerConfig.createConfiguration(i);
|
|
1277
|
+
d(c, r.t("nylasEditorTabs.createConfigError"));
|
|
1275
1278
|
const [p, h] = c, f = p == null ? void 0 : p.id;
|
|
1276
1279
|
if (f && o) {
|
|
1277
1280
|
const w = await t.schedulerConfig.createGroupEvent(o, f);
|
|
1278
|
-
d(w,
|
|
1281
|
+
d(w, r.t("nylasEditorTabsGroup.createGroupEventError"));
|
|
1279
1282
|
}
|
|
1280
1283
|
a && a(e);
|
|
1281
1284
|
}
|
|
@@ -1296,39 +1299,39 @@ _t([
|
|
|
1296
1299
|
b("[nylas-editor-tabs-group]", "schedulerConfigCreated", e);
|
|
1297
1300
|
},
|
|
1298
1301
|
groupEventUpdateTriggered: async (e, t) => {
|
|
1299
|
-
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;
|
|
1300
1303
|
!d && c && s.setError({
|
|
1301
|
-
message: c.message ||
|
|
1304
|
+
message: c.message || r.t("genericErrorTitle"),
|
|
1302
1305
|
type: _.Error,
|
|
1303
1306
|
category: v.Component,
|
|
1304
|
-
title:
|
|
1307
|
+
title: r.t("nylasEditorTabsGroup.updateGroupEventError")
|
|
1305
1308
|
});
|
|
1306
1309
|
},
|
|
1307
1310
|
groupEventDeleteTriggered: async (e, t) => {
|
|
1308
|
-
const { groupEvent: a, chosenOption: s, configId: l, host:
|
|
1309
|
-
!d && c &&
|
|
1310
|
-
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"),
|
|
1311
1314
|
type: _.Error,
|
|
1312
1315
|
category: v.Component,
|
|
1313
|
-
title:
|
|
1316
|
+
title: r.t("nylasEditorTabsGroup.deleteGroupEventError")
|
|
1314
1317
|
});
|
|
1315
1318
|
},
|
|
1316
1319
|
groupEventCreateTriggered: async (e, t) => {
|
|
1317
|
-
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;
|
|
1318
1321
|
!o && d && l.setError({
|
|
1319
|
-
message: d.message ||
|
|
1322
|
+
message: d.message || r.t("genericErrorTitle"),
|
|
1320
1323
|
type: _.Error,
|
|
1321
1324
|
category: v.Component,
|
|
1322
|
-
title:
|
|
1325
|
+
title: r.t("nylasEditorTabsGroup.createGroupEventError")
|
|
1323
1326
|
});
|
|
1324
1327
|
},
|
|
1325
1328
|
groupEventImportTriggered: async (e, t) => {
|
|
1326
|
-
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;
|
|
1327
1330
|
if (!o && d && l.setError({
|
|
1328
|
-
message: d.message ||
|
|
1331
|
+
message: d.message || r.t("genericErrorTitle"),
|
|
1329
1332
|
type: _.Error,
|
|
1330
1333
|
category: v.Component,
|
|
1331
|
-
title:
|
|
1334
|
+
title: r.t("nylasEditorTabsGroup.importGroupEventError")
|
|
1332
1335
|
}), o && o.import_failed && o.import_failed.length > 0) {
|
|
1333
1336
|
const c = o.import_failed.map((p) => p.reason).join(`
|
|
1334
1337
|
`);
|
|
@@ -1336,7 +1339,7 @@ _t([
|
|
|
1336
1339
|
message: c,
|
|
1337
1340
|
type: _.Error,
|
|
1338
1341
|
category: v.Component,
|
|
1339
|
-
title:
|
|
1342
|
+
title: r.t("nylasEditorTabsGroup.importGroupEventError")
|
|
1340
1343
|
}), setTimeout(() => {
|
|
1341
1344
|
l.resetError();
|
|
1342
1345
|
}, 5e3);
|
|
@@ -1361,13 +1364,13 @@ _t([
|
|
|
1361
1364
|
Ye.style = mt;
|
|
1362
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;
|
|
1363
1366
|
var wt = function(e, t, a, s) {
|
|
1364
|
-
var l = arguments.length,
|
|
1367
|
+
var l = arguments.length, i = l < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, a) : s, o;
|
|
1365
1368
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
1366
|
-
|
|
1369
|
+
i = Reflect.decorate(e, t, a, s);
|
|
1367
1370
|
else
|
|
1368
1371
|
for (var d = e.length - 1; d >= 0; d--)
|
|
1369
|
-
(o = e[d]) && (
|
|
1370
|
-
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;
|
|
1371
1374
|
}, fe = function(e, t) {
|
|
1372
1375
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
1373
1376
|
return Reflect.metadata(e, t);
|
|
@@ -1389,7 +1392,7 @@ const Qe = class {
|
|
|
1389
1392
|
this.disableNextPageButton = !1, this.currentCursor = e;
|
|
1390
1393
|
}
|
|
1391
1394
|
selectedLanguageChangedHandler(e, t) {
|
|
1392
|
-
e !== t &&
|
|
1395
|
+
e !== t && r.changeLanguage(e);
|
|
1393
1396
|
}
|
|
1394
1397
|
themeConfigChangedHandler(e, t) {
|
|
1395
1398
|
e !== t && this.applyThemeConfig(e);
|
|
@@ -1422,10 +1425,10 @@ const Qe = class {
|
|
|
1422
1425
|
this.deleteConfigurationId = (l = this.configurations[s]) == null ? void 0 : l.id;
|
|
1423
1426
|
break;
|
|
1424
1427
|
case "preview":
|
|
1425
|
-
window.open(
|
|
1428
|
+
window.open(de(this.schedulerPreviewLink, this.configurations[s]), "_blank");
|
|
1426
1429
|
break;
|
|
1427
1430
|
case "copy":
|
|
1428
|
-
await navigator.clipboard.writeText(
|
|
1431
|
+
await navigator.clipboard.writeText(de(this.schedulerPreviewLink, this.configurations[s]));
|
|
1429
1432
|
break;
|
|
1430
1433
|
}
|
|
1431
1434
|
}
|
|
@@ -1446,7 +1449,7 @@ const Qe = class {
|
|
|
1446
1449
|
message: e.message,
|
|
1447
1450
|
type: e.type,
|
|
1448
1451
|
category: e.category,
|
|
1449
|
-
title: e.title ||
|
|
1452
|
+
title: e.title || r.t("genericErrorTitle")
|
|
1450
1453
|
}, (t = this.error) != null && t.message && this.showErrorNotification(this.error);
|
|
1451
1454
|
}
|
|
1452
1455
|
async hideDeleteConfirmation() {
|
|
@@ -1492,11 +1495,11 @@ const Qe = class {
|
|
|
1492
1495
|
};
|
|
1493
1496
|
switch (e) {
|
|
1494
1497
|
case "preview":
|
|
1495
|
-
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"));
|
|
1496
1499
|
case "copy":
|
|
1497
|
-
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"));
|
|
1498
1501
|
case "delete":
|
|
1499
|
-
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"));
|
|
1500
1503
|
default:
|
|
1501
1504
|
return "";
|
|
1502
1505
|
}
|
|
@@ -1519,29 +1522,29 @@ const Qe = class {
|
|
|
1519
1522
|
}
|
|
1520
1523
|
render() {
|
|
1521
1524
|
var e;
|
|
1522
|
-
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: () => {
|
|
1523
1526
|
this.createButtonClick.emit(this.host);
|
|
1524
|
-
} },
|
|
1527
|
+
} }, r.t("createNewSchedulingPageButtonText")))), n("div", { class: "configurations" }, n("div", { class: "table-container" }, n("table", { class: {
|
|
1525
1528
|
"no-configurations": this.state !== "loading" && (!this.configurations || this.configurations.length === 0)
|
|
1526
1529
|
} }, n("tr", { class: {
|
|
1527
1530
|
hide: this.state === "loading" || this.configurations && this.configurations.length === 0
|
|
1528
|
-
} }, 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: () => {
|
|
1529
1532
|
this.createButtonClick.emit(this.host);
|
|
1530
|
-
} },
|
|
1533
|
+
} }, r.t("createNewSchedulingPageButtonText"))))), this.state !== "loading" && ((e = this.configurations) == null ? void 0 : e.map((t, a) => {
|
|
1531
1534
|
var o, d, c, p;
|
|
1532
|
-
const s = (a === this.configurations.length - 1 || a === this.configurations.length - 2) && this.configurations.length > 3, l = t,
|
|
1533
|
-
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) => {
|
|
1534
1537
|
h.preventDefault(), this.editButtonLoadingId = `edit-${a}`, this.editButtonClick.emit({ host: this.host, configuration: t });
|
|
1535
|
-
} }, 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: {
|
|
1536
1539
|
last: s
|
|
1537
1540
|
}, name: "actions", options: [
|
|
1538
1541
|
{ value: `preview-${a}`, label: "Preview", labelHTML: this.getActionLabelHTML("preview") },
|
|
1539
1542
|
{ value: `copy-${a}`, label: "Copy link", labelHTML: this.getActionLabelHTML("copy") },
|
|
1540
1543
|
{ value: `delete-${a}`, label: "Delete", labelHTML: this.getActionLabelHTML("delete") }
|
|
1541
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" }))));
|
|
1542
|
-
})))), 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" },
|
|
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: {
|
|
1543
1546
|
footer: !0
|
|
1544
|
-
} }, 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")}`)))));
|
|
1545
1548
|
}
|
|
1546
1549
|
get host() {
|
|
1547
1550
|
return pe(this);
|
|
@@ -1568,13 +1571,13 @@ wt([
|
|
|
1568
1571
|
initListConfigurations: async (e, t) => {
|
|
1569
1572
|
const { host: a, cursor: s } = e.detail;
|
|
1570
1573
|
await a.setState("loading");
|
|
1571
|
-
const [l,
|
|
1572
|
-
if (!l &&
|
|
1574
|
+
const [l, i] = await t.schedulerConfig.getConfigurations(s);
|
|
1575
|
+
if (!l && i && i.message) {
|
|
1573
1576
|
await a.setState("error"), await a.setError({
|
|
1574
|
-
message:
|
|
1577
|
+
message: i.message,
|
|
1575
1578
|
type: _.Error,
|
|
1576
1579
|
category: v.Component,
|
|
1577
|
-
title:
|
|
1580
|
+
title: r.t("nylasEditorTabs.getConfigsError")
|
|
1578
1581
|
});
|
|
1579
1582
|
return;
|
|
1580
1583
|
}
|
|
@@ -1586,21 +1589,21 @@ wt([
|
|
|
1586
1589
|
a.length === 1 ? (t.schedulerConfigStore.state.action = "create", t.schedulerConfigStore.state.selectedEventType = I[a[0][0]]) : t.schedulerConfigStore.state.action = "create-select";
|
|
1587
1590
|
},
|
|
1588
1591
|
deleteButtonClick: async (e, t) => {
|
|
1589
|
-
const { host: a, configuration: s } = e.detail, [l,
|
|
1590
|
-
!l &&
|
|
1591
|
-
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,
|
|
1592
1595
|
type: _.Error,
|
|
1593
1596
|
category: v.Component,
|
|
1594
|
-
title:
|
|
1597
|
+
title: r.t("nylasEditorTabs.deleteConfigError")
|
|
1595
1598
|
})), await a.hideDeleteConfirmation();
|
|
1596
1599
|
},
|
|
1597
1600
|
editButtonClick: async (e, t) => {
|
|
1598
1601
|
const { host: a, configuration: s } = e.detail;
|
|
1599
1602
|
if (s.type === "group") {
|
|
1600
|
-
const { startTime: l, endTime:
|
|
1603
|
+
const { startTime: l, endTime: i } = at((/* @__PURE__ */ new Date()).toISOString(), "week");
|
|
1601
1604
|
t.schedulerConfigStore.state.calendarViewDateRange = {
|
|
1602
1605
|
start_time: l.toString(),
|
|
1603
|
-
end_time:
|
|
1606
|
+
end_time: i.toString()
|
|
1604
1607
|
};
|
|
1605
1608
|
const [o, d] = await t.schedulerConfig.getGroupEvents(s.id, s);
|
|
1606
1609
|
if (!o && d && d.message) {
|
|
@@ -1608,7 +1611,7 @@ wt([
|
|
|
1608
1611
|
message: d.message,
|
|
1609
1612
|
type: _.Error,
|
|
1610
1613
|
category: v.Component,
|
|
1611
|
-
title:
|
|
1614
|
+
title: r.t("nylasEditorTabsGroup.getGroupEventsError")
|
|
1612
1615
|
}), a.hideEditButtonLoading();
|
|
1613
1616
|
return;
|
|
1614
1617
|
}
|
|
@@ -1625,13 +1628,13 @@ wt([
|
|
|
1625
1628
|
Qe.style = Ct;
|
|
1626
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;
|
|
1627
1630
|
var Et = function(e, t, a, s) {
|
|
1628
|
-
var l = arguments.length,
|
|
1631
|
+
var l = arguments.length, i = l < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, a) : s, o;
|
|
1629
1632
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
1630
|
-
|
|
1633
|
+
i = Reflect.decorate(e, t, a, s);
|
|
1631
1634
|
else
|
|
1632
1635
|
for (var d = e.length - 1; d >= 0; d--)
|
|
1633
|
-
(o = e[d]) && (
|
|
1634
|
-
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;
|
|
1635
1638
|
}, me = function(e, t) {
|
|
1636
1639
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
1637
1640
|
return Reflect.metadata(e, t);
|
|
@@ -1662,7 +1665,7 @@ const Xe = class {
|
|
|
1662
1665
|
b("nylas-select-event-type", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
1663
1666
|
}
|
|
1664
1667
|
selectedLanguageChangedHandler(e, t) {
|
|
1665
|
-
e !== t &&
|
|
1668
|
+
e !== t && r.changeLanguage(e);
|
|
1666
1669
|
}
|
|
1667
1670
|
themeConfigChangedHandler(e, t) {
|
|
1668
1671
|
e !== t && this.applyThemeConfig(e);
|
|
@@ -1673,7 +1676,7 @@ const Xe = class {
|
|
|
1673
1676
|
this.host.style.setProperty(`${t}`, a);
|
|
1674
1677
|
}
|
|
1675
1678
|
render() {
|
|
1676
|
-
var
|
|
1679
|
+
var i;
|
|
1677
1680
|
const e = {
|
|
1678
1681
|
"one-on-one": "one_on_one",
|
|
1679
1682
|
collective: "collective",
|
|
@@ -1682,37 +1685,37 @@ const Xe = class {
|
|
|
1682
1685
|
group: "group"
|
|
1683
1686
|
}, t = [
|
|
1684
1687
|
{
|
|
1685
|
-
label:
|
|
1688
|
+
label: r.t("nylasSelectEventType.eventTypeOptions.oneOnOne.label"),
|
|
1686
1689
|
value: I.one_on_one,
|
|
1687
|
-
description:
|
|
1690
|
+
description: r.t("nylasSelectEventType.eventTypeOptions.oneOnOne.desc")
|
|
1688
1691
|
},
|
|
1689
1692
|
{
|
|
1690
|
-
label:
|
|
1693
|
+
label: r.t("nylasSelectEventType.eventTypeOptions.collective.label"),
|
|
1691
1694
|
value: I.collective,
|
|
1692
|
-
description:
|
|
1695
|
+
description: r.t("nylasSelectEventType.eventTypeOptions.collective.desc")
|
|
1693
1696
|
},
|
|
1694
1697
|
{
|
|
1695
|
-
label:
|
|
1698
|
+
label: r.t("nylasSelectEventType.eventTypeOptions.maxFairness.label"),
|
|
1696
1699
|
value: I.max_fairness,
|
|
1697
|
-
description:
|
|
1700
|
+
description: r.t("nylasSelectEventType.eventTypeOptions.maxFairness.desc")
|
|
1698
1701
|
},
|
|
1699
1702
|
{
|
|
1700
|
-
label:
|
|
1703
|
+
label: r.t("nylasSelectEventType.eventTypeOptions.maxAvailability.label"),
|
|
1701
1704
|
value: I.max_availability,
|
|
1702
|
-
description:
|
|
1705
|
+
description: r.t("nylasSelectEventType.eventTypeOptions.maxAvailability.desc")
|
|
1703
1706
|
},
|
|
1704
1707
|
{
|
|
1705
|
-
label:
|
|
1708
|
+
label: r.t("nylasSelectEventType.eventTypeOptions.group.label"),
|
|
1706
1709
|
value: I.group,
|
|
1707
|
-
description:
|
|
1710
|
+
description: r.t("nylasSelectEventType.eventTypeOptions.group.desc")
|
|
1708
1711
|
}
|
|
1709
|
-
], 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) => {
|
|
1710
1713
|
const d = o.value, c = e[d];
|
|
1711
1714
|
return console.log("key", d, this.enableEventTypes ? this.enableEventTypes[c] : "no enableEventTypes"), a.includes(d) && !s ? !1 : this.enableEventTypes && this.enableEventTypes[c];
|
|
1712
1715
|
}) : t;
|
|
1713
|
-
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) => {
|
|
1714
1717
|
this.returnToAllSchedulingPagesEvent.emit();
|
|
1715
|
-
} }, 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) => {
|
|
1716
1719
|
this.createEventTypeSelected.emit({ eventType: o.value });
|
|
1717
1720
|
}, part: `nset__content__event-type-option-${o.value}` }, n("h4", null, o.label), n("p", null, o.description)))))));
|
|
1718
1721
|
}
|