@nylas/react 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/abstract-provider-efe136bd-2041bdce.js +187 -0
- package/dist/abstract-provider-efe136bd-b4663c02.cjs +1 -0
- package/dist/add-circle-icon_2.entry-5204c48a.cjs +1 -0
- package/dist/add-circle-icon_2.entry-ea1692a4.js +26 -0
- package/dist/archive-icon.entry-0b585dff.js +16 -0
- package/dist/archive-icon.entry-c2c66bca.cjs +1 -0
- package/dist/{arrow-icon.entry-9414299f.js → arrow-icon.entry-2e61394e.js} +5 -5
- package/dist/arrow-icon.entry-9d471162.cjs +1 -0
- package/dist/{bold-icon.entry-c781e9c1.cjs → bold-icon.entry-5c37622f.cjs} +1 -1
- package/dist/{bold-icon.entry-b72aed9f.js → bold-icon.entry-8ef1b653.js} +2 -2
- package/dist/{button-component_2.entry-73f76545.cjs → button-component_2.entry-8335ee1e.cjs} +1 -1
- package/dist/{button-component_2.entry-36e49459.js → button-component_2.entry-c906230f.js} +9 -9
- package/dist/calendar-agenda-fill-icon_36.entry-59c0a997.cjs +6 -0
- package/dist/{calendar-agenda-fill-icon_36.entry-efa7ad26.js → calendar-agenda-fill-icon_36.entry-5f184433.js} +900 -881
- package/dist/{calendar-cancel-icon.entry-01c388eb.cjs → calendar-cancel-icon.entry-65a4a34e.cjs} +1 -1
- package/dist/{calendar-cancel-icon.entry-0f739a8a.js → calendar-cancel-icon.entry-dd6ac4db.js} +5 -5
- package/dist/{calendar-check-icon_2.entry-5febbadf.cjs → calendar-check-icon_2.entry-ded15038.cjs} +1 -1
- package/dist/{calendar-check-icon_2.entry-dfb0036d.js → calendar-check-icon_2.entry-f9b50bb8.js} +3 -3
- package/dist/{calendar-icon.entry-f197396d.js → calendar-icon.entry-a2a1ddbc.js} +2 -2
- package/dist/{calendar-icon.entry-9743e0b7.cjs → calendar-icon.entry-ca512dd6.cjs} +1 -1
- package/dist/checkbox-component_2.entry-d6128246.js +115 -0
- package/dist/checkbox-component_2.entry-d79b5d1d.cjs +1 -0
- package/dist/checkbox-group_4.entry-2946c7ef.cjs +28 -0
- package/dist/{nylas-event-calendar_3.entry-9abd46c2.js → checkbox-group_4.entry-e5145451.js} +1038 -923
- package/dist/{checkmark-icon_15.entry-5c09cff5.js → checkmark-icon_15.entry-6e92e93e.js} +19 -19
- package/dist/{checkmark-icon_15.entry-35dd97b7.cjs → checkmark-icon_15.entry-a75a1825.cjs} +2 -2
- package/dist/{chevron-icon_3.entry-4a72f211.js → chevron-icon_3.entry-6eaa3513.js} +16 -16
- package/dist/{chevron-icon_3.entry-e0608b7c.cjs → chevron-icon_3.entry-9193a885.cjs} +1 -1
- package/dist/{clock-icon_4.entry-0afe79c2.js → clock-icon_4.entry-2c93270e.js} +8 -8
- package/dist/{clock-icon_4.entry-202ce025.cjs → clock-icon_4.entry-ae2272f4.cjs} +1 -1
- package/dist/{customParseFormat-d1de5ed0-c0ef002d.js → customParseFormat-edc38d83-b3722499.js} +1 -1
- package/dist/{customParseFormat-d1de5ed0-65a0bba3.cjs → customParseFormat-edc38d83-fa9c77d9.cjs} +1 -1
- package/dist/{delete-icon.entry-580bfcc9.js → delete-icon.entry-6684eba6.js} +2 -2
- package/dist/{delete-icon.entry-762ac892.cjs → delete-icon.entry-b9e4f2c7.cjs} +1 -1
- package/dist/{document-refresh-icon.entry-4e0f0c61.cjs → document-refresh-icon.entry-7afe6163.cjs} +1 -1
- package/dist/document-refresh-icon.entry-fba9f60b.js +16 -0
- package/dist/{feedbackSync-172f942c-42124493.js → feedbackSync-e4378c0b-23289195.js} +811 -798
- package/dist/{feedbackSync-172f942c-62f72bd2.cjs → feedbackSync-e4378c0b-7876d067.cjs} +26 -26
- package/dist/{folder-icon.entry-54c3cc66.js → folder-icon.entry-430c6b47.js} +4 -4
- package/dist/{folder-icon.entry-2694e253.cjs → folder-icon.entry-b1632bf3.cjs} +1 -1
- package/dist/{forward-icon.entry-5e540f05.js → forward-icon.entry-5e53da76.js} +2 -2
- package/dist/{forward-icon.entry-f07102d8.cjs → forward-icon.entry-7626dcca.cjs} +1 -1
- package/dist/{globe-icon_2.entry-aaceb196.js → globe-icon_2.entry-646eae41.js} +20 -20
- package/dist/{globe-icon_2.entry-14a4c168.cjs → globe-icon_2.entry-bbb0a6ce.cjs} +1 -1
- package/dist/{google-logo-icon_6.entry-00d40db2.js → google-logo-icon_6.entry-5951a546.js} +682 -488
- package/dist/google-logo-icon_6.entry-e39dd9cb.cjs +2 -0
- package/dist/{google-meet-icon_5.entry-f1f05903.js → google-meet-icon_5.entry-a54c83da.js} +14 -14
- package/dist/{google-meet-icon_5.entry-6c20e149.cjs → google-meet-icon_5.entry-c13e0738.cjs} +1 -1
- package/dist/inbox-icon.entry-7bee82b3.js +16 -0
- package/dist/inbox-icon.entry-911b047a.cjs +1 -0
- package/dist/index-71f61ea9.js +24544 -0
- package/dist/index-f769bc2a.cjs +118 -0
- package/dist/index.d.ts +1 -4
- package/dist/index.es-6a9d55cf-122c27e0.js +2724 -0
- package/dist/index.es-6a9d55cf-458ba0e0.cjs +7 -0
- package/dist/{info-icon_2.entry-bbcefb9a.cjs → info-icon_2.entry-471b836b.cjs} +1 -1
- package/dist/{info-icon_2.entry-b3b313ab.js → info-icon_2.entry-6ff2f004.js} +3 -3
- package/dist/{input-component.entry-401b9ba5.js → input-component.entry-781b584c.js} +12 -12
- package/dist/{input-component.entry-ec8e8e7c.cjs → input-component.entry-b6a9b4cb.cjs} +1 -1
- package/dist/{input-dropdown_2.entry-c37f392c.js → input-dropdown_2.entry-1feebcba.js} +3 -3
- package/dist/{input-dropdown_2.entry-8cb11601.cjs → input-dropdown_2.entry-c71d14ff.cjs} +1 -1
- package/dist/{italic-icon.entry-6675558a.cjs → italic-icon.entry-16debde5.cjs} +1 -1
- package/dist/italic-icon.entry-9ef7f4a2.js +16 -0
- package/dist/{elements → lib/elements}/index.d.ts +1 -1
- package/dist/lib/index.d.ts +5 -0
- package/dist/lib/main.d.ts +0 -0
- package/dist/lib/notetaker/CalendarSync/CalendarSync.d.ts +37 -0
- package/dist/lib/notetaker/CalendarSync/CalendarSync.spec.d.ts +0 -0
- package/dist/lib/notetaker/SendNotetaker/SendNotetaker.d.ts +31 -0
- package/dist/lib/notetaker/SendNotetaker/SendNotetaker.spec.d.ts +1 -0
- package/dist/lib/notetaker/Transcript/Transcript.d.ts +23 -0
- package/dist/lib/notetaker/Transcript/Transcript.spec.d.ts +0 -0
- package/dist/lib/notetaker/VideoPlayer/VideoPlayer.d.ts +22 -0
- package/dist/lib/notetaker/VideoPlayer/VideoPlayer.spec.d.ts +1 -0
- package/dist/lib/notetaker/index.d.ts +9 -0
- package/dist/lib/notetaker/lib/constants.d.ts +12 -0
- package/dist/lib/notetaker/lib/http-client.d.ts +2 -0
- package/dist/lib/notetaker/lib/primitives.d.ts +66 -0
- package/dist/lib/notetaker/lib/store.d.ts +7 -0
- package/dist/lib/notetaker/types.d.ts +42 -0
- package/dist/multi-select-dropdown.entry-0a6f9417.cjs +1 -0
- package/dist/multi-select-dropdown.entry-1b27c746.js +121 -0
- package/dist/nylas-booked-event-card_11.entry-74fba802.cjs +1 -0
- package/dist/{nylas-booked-event-card_12.entry-e7464ae7.js → nylas-booked-event-card_11.entry-802671ee.js} +469 -534
- package/dist/{nylas-form-card.entry-cbb00fba.cjs → nylas-form-card.entry-59a837c9.cjs} +1 -1
- package/dist/{nylas-form-card.entry-a3186807.js → nylas-form-card.entry-7da9a312.js} +3 -3
- package/dist/nylas-notification_2.entry-8f8bad34.cjs +1 -0
- package/dist/nylas-notification_2.entry-b16bb805.js +85 -0
- package/dist/{nylas-scheduler-editor.entry-7b188a38.js → nylas-scheduler-editor.entry-cbe3e1e3.js} +160 -136
- package/dist/nylas-scheduler-editor.entry-e33e11fb.cjs +2 -0
- package/dist/nylas-scheduling.entry-4223e50b.cjs +1 -0
- package/dist/{nylas-scheduling.entry-e9929b03.js → nylas-scheduling.entry-6fb094a8.js} +295 -295
- package/dist/{person-icon.entry-d2856f08.js → person-icon.entry-6232e6fd.js} +7 -7
- package/dist/{person-icon.entry-8998fdb8.cjs → person-icon.entry-beb26b48.cjs} +1 -1
- package/dist/play-icon.entry-16a1c1ac.js +16 -0
- package/dist/{play-icon.entry-99eb969b.cjs → play-icon.entry-9060d0d8.cjs} +1 -1
- package/dist/{radio-button-group.entry-bc3b12fd.js → radio-button-group.entry-5a3728cd.js} +2 -2
- package/dist/{radio-button-group.entry-d66edd04.cjs → radio-button-group.entry-6935c39d.cjs} +1 -1
- package/dist/react.cjs +1 -1
- package/dist/react.js +135 -126
- package/dist/{refresh-icon.entry-99d1982d.cjs → refresh-icon.entry-2411b2e1.cjs} +1 -1
- package/dist/{refresh-icon.entry-d6df8b1c.js → refresh-icon.entry-4f56e72b.js} +2 -2
- package/dist/{register-component-62d792d4-448b6a43.js → register-component-a1c3d7b4-774feacc.js} +1 -1
- package/dist/{register-component-62d792d4-c6e7d129.cjs → register-component-a1c3d7b4-97d7a6f5.cjs} +1 -1
- package/dist/{reply-all-icon.entry-d7c44139.cjs → reply-all-icon.entry-b4b6926b.cjs} +1 -1
- package/dist/{reply-all-icon.entry-7ebf01a0.js → reply-all-icon.entry-b4b917ec.js} +2 -2
- package/dist/{reply-icon.entry-d1622d85.js → reply-icon.entry-24f6f4c6.js} +5 -5
- package/dist/{reply-icon.entry-058c00e8.cjs → reply-icon.entry-454545ed.cjs} +1 -1
- package/dist/sent-icon.entry-d9a79336.cjs +1 -0
- package/dist/sent-icon.entry-fa59ce85.js +16 -0
- package/dist/spam-icon.entry-da39987e.cjs +1 -0
- package/dist/spam-icon.entry-fb18a08b.js +16 -0
- package/dist/{star-icon.entry-98b80645.js → star-icon.entry-406472c1.js} +4 -4
- package/dist/{star-icon.entry-4db13fdb.cjs → star-icon.entry-833f35a7.cjs} +1 -1
- package/dist/{stop-icon.entry-0290fd30.js → stop-icon.entry-1b6ae838.js} +2 -2
- package/dist/{stop-icon.entry-9d7b53fd.cjs → stop-icon.entry-3258db59.cjs} +1 -1
- package/dist/style.css +1 -0
- package/dist/test/vitest.setup.d.ts +0 -0
- package/dist/{textarea-component.entry-9b474ab5.cjs → textarea-component.entry-0ae18897.cjs} +1 -1
- package/dist/{textarea-component.entry-a62c257b.js → textarea-component.entry-569a281e.js} +2 -2
- package/dist/{toggle-switch.entry-5dbfcd48.cjs → toggle-switch.entry-60d75f16.cjs} +1 -1
- package/dist/{toggle-switch.entry-e423b793.js → toggle-switch.entry-dc3f796b.js} +4 -4
- package/dist/{translate-icon.entry-60c55a2e.js → translate-icon.entry-297cf20f.js} +4 -4
- package/dist/{translate-icon.entry-f82fa6fc.cjs → translate-icon.entry-c183ecb5.cjs} +1 -1
- package/dist/trash-fill-icon.entry-3d8a2e5e.js +16 -0
- package/dist/trash-fill-icon.entry-94d4f66c.cjs +1 -0
- package/dist/{underline-icon.entry-40028bc6.js → underline-icon.entry-4a9105c7.js} +2 -2
- package/dist/{underline-icon.entry-0807a43d.cjs → underline-icon.entry-50d1e766.cjs} +1 -1
- package/package.json +41 -17
- package/dist/add-circle-icon_2.entry-8a1c55bc.cjs +0 -1
- package/dist/add-circle-icon_2.entry-b4bbcfee.js +0 -26
- package/dist/archive-icon.entry-a2492cf3.js +0 -16
- package/dist/archive-icon.entry-e48d2356.cjs +0 -1
- package/dist/arrow-icon.entry-b1ecb2aa.cjs +0 -1
- package/dist/calendar-agenda-fill-icon_36.entry-e9b92e0e.cjs +0 -6
- package/dist/checkbox-component.entry-1aa5782f.cjs +0 -1
- package/dist/checkbox-component.entry-72a6aa72.js +0 -43
- package/dist/document-refresh-icon.entry-e500b4e3.js +0 -16
- package/dist/google-logo-icon_6.entry-fa76ffe3.cjs +0 -2
- package/dist/inbox-icon.entry-9a4628f2.cjs +0 -1
- package/dist/inbox-icon.entry-aa78ba8c.js +0 -16
- package/dist/index-1e75512f.cjs +0 -57
- package/dist/index-e8380973.js +0 -18492
- package/dist/index.es-fc8588de-034ead51.cjs +0 -7
- package/dist/index.es-fc8588de-c943eef6.js +0 -2908
- package/dist/italic-icon.entry-0e85d0d9.js +0 -16
- package/dist/multi-select-dropdown_2.entry-3eecf18a.js +0 -193
- package/dist/multi-select-dropdown_2.entry-e37c501d.cjs +0 -1
- package/dist/nylas-booked-event-card_12.entry-fddc9ab8.cjs +0 -1
- package/dist/nylas-event-calendar_3.entry-e6669bbf.cjs +0 -11
- package/dist/nylas-scheduler-editor.entry-5c92901a.cjs +0 -2
- package/dist/nylas-scheduling.entry-970240f6.cjs +0 -1
- package/dist/play-icon.entry-f949a80f.js +0 -16
- package/dist/sent-icon.entry-6c604512.cjs +0 -1
- package/dist/sent-icon.entry-fe12bc2f.js +0 -16
- package/dist/spam-icon.entry-45e5292e.cjs +0 -1
- package/dist/spam-icon.entry-b97c7709.js +0 -16
- package/dist/trash-fill-icon.entry-095caae3.cjs +0 -1
- package/dist/trash-fill-icon.entry-825055fd.js +0 -16
- package/dist/warning-icon.entry-24e37759.js +0 -16
- package/dist/warning-icon.entry-fce7c14f.cjs +0 -1
- /package/dist/{elements → lib/elements}/react-component-lib/createComponent.d.ts +0 -0
- /package/dist/{elements → lib/elements}/react-component-lib/createOverlayComponent.d.ts +0 -0
- /package/dist/{elements → lib/elements}/react-component-lib/index.d.ts +0 -0
- /package/dist/{elements → lib/elements}/react-component-lib/interfaces.d.ts +0 -0
- /package/dist/{elements → lib/elements}/react-component-lib/utils/attachProps.d.ts +0 -0
- /package/dist/{elements → lib/elements}/react-component-lib/utils/case.d.ts +0 -0
- /package/dist/{elements → lib/elements}/react-component-lib/utils/dev.d.ts +0 -0
- /package/dist/{elements → lib/elements}/react-component-lib/utils/index.d.ts +0 -0
|
@@ -1,35 +1,36 @@
|
|
|
1
|
-
import { r as
|
|
2
|
-
import { R as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { r as te, h as n, a as _, b, i, q as _e, s as le, H as ce, g as pe, F as de, j as nt } from "./index-71f61ea9.js";
|
|
2
|
+
import { R as be } from "./register-component-a1c3d7b4-774feacc.js";
|
|
3
|
+
import { n as v } from "./index.es-6a9d55cf-122c27e0.js";
|
|
4
|
+
import { C as z, D as $e, e as at, b as ot } from "./constants-f51538ef-e0a5f026.js";
|
|
5
|
+
import { E as w, i as Je, a as Ve, c as Ze, b as We, f as qe } from "./feedbackSync-e4378c0b-23289195.js";
|
|
5
6
|
import "react";
|
|
6
7
|
import "react/jsx-runtime";
|
|
7
8
|
import "react-dom";
|
|
8
|
-
const
|
|
9
|
+
const st = ".sc-google-logo-icon-h{display:flex}", rt = st, it = class {
|
|
9
10
|
constructor(e) {
|
|
10
|
-
|
|
11
|
+
te(this, e), this.width = "24", this.height = "24";
|
|
11
12
|
}
|
|
12
13
|
render() {
|
|
13
|
-
return n("svg", { key: "
|
|
14
|
+
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" }))));
|
|
14
15
|
}
|
|
15
16
|
};
|
|
16
|
-
|
|
17
|
-
const
|
|
17
|
+
it.style = rt;
|
|
18
|
+
const lt = ".sc-microsoft-logo-icon-h{display:flex}", dt = lt, ct = class {
|
|
18
19
|
constructor(e) {
|
|
19
|
-
|
|
20
|
+
te(this, e), this.width = "22", this.height = "22";
|
|
20
21
|
}
|
|
21
22
|
render() {
|
|
22
|
-
return n("svg", { key: "
|
|
23
|
+
return n("svg", { key: "a6a6af29ed81710f3f493d849c90871991e0be0f", width: this.width, height: this.height, viewBox: "0 0 22 22", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, n("path", { key: "025c40cab8337a37897481fb47580f219b3ad528", d: "M0.043457 0.043457H10.4782V10.4782H0.043457V0.043457Z", fill: "#F35325" }), n("path", { key: "d7e67a46de5217cfa54f8973616616a9fd4fb474", d: "M11.5217 0.043457H21.9565V10.4782H11.5217V0.043457Z", fill: "#81BC06" }), n("path", { key: "2f4162db32fb29afb4f88c3070e59e8dc574a732", d: "M0.043457 11.5217H10.4782V21.9565H0.043457V11.5217Z", fill: "#05A6F0" }), n("path", { key: "4ec074b89f50e66765e199ae112d063ca21b541a", d: "M11.5217 11.5217H21.9565V21.9565H11.5217V11.5217Z", fill: "#FFBA08" }));
|
|
23
24
|
}
|
|
24
25
|
};
|
|
25
|
-
|
|
26
|
+
ct.style = dt;
|
|
26
27
|
var u;
|
|
27
28
|
(function(e) {
|
|
28
29
|
e.EventInfo = "eventInfo", e.Availability = "availability", e.BookingOptions = "bookingOptions", e.Communications = "communications", e.Participants = "participants", e.BookingForm = "bookingForm", e.PageStyles = "pageStyles";
|
|
29
30
|
})(u || (u = {}));
|
|
30
|
-
function
|
|
31
|
+
function pt({ id: e, formState: t, activeTab: a }, s) {
|
|
31
32
|
return n(
|
|
32
|
-
|
|
33
|
+
de,
|
|
33
34
|
null,
|
|
34
35
|
n(
|
|
35
36
|
"div",
|
|
@@ -89,7 +90,7 @@ function dt({ id: e, formState: t, activeTab: a }, o) {
|
|
|
89
90
|
{ key: `communications-${e}`, class: { hide: a !== u.Communications } },
|
|
90
91
|
n("nylas-disable-emails", { name: "disable-emails", exportparts: "nde, nde__toggle-label, nde_toggle-input, nde_toggle-slider" }),
|
|
91
92
|
!(t != null && t.disableEmails) && n(
|
|
92
|
-
|
|
93
|
+
de,
|
|
93
94
|
null,
|
|
94
95
|
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" }),
|
|
95
96
|
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" })
|
|
@@ -106,7 +107,7 @@ function dt({ id: e, formState: t, activeTab: a }, o) {
|
|
|
106
107
|
{ key: `page-styles-${e}`, class: { hide: a !== u.PageStyles } },
|
|
107
108
|
n("nylas-custom-event-slug", { name: "custom-event-slug", exportparts: "nces, nces__body, nces__header, nces__drawer-toggle--container, nces__input-textfield" }),
|
|
108
109
|
n("nylas-page-name", { name: "page-name", exportparts: "npn, npn__body, npn__header, npn__drawer-toggle--container, npn__input-textfield" }),
|
|
109
|
-
n("nylas-page-styling", { name: "page-styling", exportparts: "nps, nps__header, nps__drawer-toggle--container, nps__body, nps__title-input-textfield, nps__company-logo-input-textfield, nps__color-picker, nps__color-picker-button, nps__color-picker-button-label, nps__color-picker-selected-label, nps__submit-button-label-input-textfield, nps__message-textarea" },
|
|
110
|
+
n("nylas-page-styling", { name: "page-styling", exportparts: "nps, nps__header, nps__drawer-toggle--container, nps__body, nps__title-input-textfield, nps__company-logo-input-textfield, nps__color-picker, nps__color-picker-button, nps__color-picker-button-label, nps__color-picker-selected-label, nps__submit-button-label-input-textfield, nps__message-textarea" }, s)
|
|
110
111
|
),
|
|
111
112
|
n(
|
|
112
113
|
"div",
|
|
@@ -115,36 +116,41 @@ function dt({ id: e, formState: t, activeTab: a }, o) {
|
|
|
115
116
|
)
|
|
116
117
|
);
|
|
117
118
|
}
|
|
118
|
-
const
|
|
119
|
-
var
|
|
120
|
-
var
|
|
119
|
+
const bt = '.sc-nylas-editor-tabs-h{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff}.scheduler-editor.sc-nylas-editor-tabs{display:flex;flex-direction:column;height:inherit}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs{height:calc(100% - 80px);display:grid;grid-template-columns:minmax(224px, 25%) 1fr}@media screen and (max-width: 768px){.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs{display:table-column-group;height:auto}}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs{display:flex;flex-direction:column;border-right:1px solid var(--nylas-base-200);background-color:var(--nylas-base-25)}@media screen and (max-width: 768px){.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs{border-right:none}}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.sc-nylas-editor-tabs{display:flex;align-items:center;text-align:left;gap:0.5rem;padding:0.5rem 1rem;color:var(--nylas-base-900);background:var(--nylas-base-0);border:none;height:56px;font-family:var(--nylas-font-family);font-size:16px;font-weight:500;line-height:24px;cursor:pointer}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.sc-nylas-editor-tabs:not(:first-of-type){margin-top:0.25rem}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.sc-nylas-editor-tabs:last-of-type{margin-bottom:0.25rem}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.active.sc-nylas-editor-tabs{font-weight:600;background:var(--nylas-base-0);color:var(--nylas-primary);border-left:4px solid var(--nylas-primary);box-shadow:0px 1px 2px 0px rgba(0, 0, 0, 0.0588235294);box-shadow:0px 1px 3px 0px rgba(0, 0, 0, 0.1019607843)}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.hide.sc-nylas-editor-tabs{display:none}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs{max-width:692px;overflow-y:auto;overflow-x:hidden}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs .hide.sc-nylas-editor-tabs{display:none}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-info.sc-nylas-editor-tabs,.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-limits.sc-nylas-editor-tabs{width:inherit}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-info.sc-nylas-editor-tabs div[slot=inputs].sc-nylas-editor-tabs,.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-limits.sc-nylas-editor-tabs div[slot=inputs].sc-nylas-editor-tabs{display:flex;flex-direction:column;gap:1rem}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs .tab-header.sc-nylas-editor-tabs{display:flex;flex-direction:column;margin:1rem 1rem 0.5rem;row-gap:4px}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs .tab-header.sc-nylas-editor-tabs h3.sc-nylas-editor-tabs{margin:0;font-size:16px;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs .tab-header.sc-nylas-editor-tabs p.sc-nylas-editor-tabs{margin:0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.footer.sc-nylas-editor-tabs{display:flex;justify-content:space-between;align-items:center;gap:1rem;min-height:80px;padding:0 1rem;border-top:1px solid var(--nylas-base-200)}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs{flex-direction:column;height:auto}}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs .preview.sc-nylas-editor-tabs{margin-top:1rem;width:100%}}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs{display:flex;justify-content:flex-end;align-items:center;justify-self:flex-end;gap:1rem}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs{flex-direction:column-reverse;width:100%}}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.sc-nylas-editor-tabs{max-width:524px}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.unsaved-changes.sc-nylas-editor-tabs{color:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.saved-changes.sc-nylas-editor-tabs{color:var(--nylas-success)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.error.sc-nylas-editor-tabs{color:var(--nylas-error)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.error-full-width.sc-nylas-editor-tabs{max-width:660px}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button-component.sc-nylas-editor-tabs{width:100%}}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs{background:var(--nylas-primary);color:var(--nylas-base-0);height:48px;border:none;border-radius:var(--nylas-border-radius-2x);font-size:16px;line-height:24px;padding:0 1rem;cursor:pointer;width:148px}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:hover{background:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:active{background:var(--nylas-base-800)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:disabled{background:var(--nylas-base-300);cursor:not-allowed}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs span.sc-nylas-editor-tabs{display:flex;align-items:center;justify-content:center;gap:0.5rem}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button-component.save-changes.sc-nylas-editor-tabs{min-width:140px}button-component#report-issue.sc-nylas-editor-tabs{width:auto}nylas-feedback-form.sc-nylas-editor-tabs{position:absolute;top:0;height:100%;width:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;background:rgba(0, 0, 0, 0.6);z-index:2;border-radius:inherit}', ut = bt;
|
|
120
|
+
var ht = function(e, t, a, s) {
|
|
121
|
+
var l = arguments.length, r = l < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, a) : s, o;
|
|
121
122
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
122
|
-
|
|
123
|
+
r = Reflect.decorate(e, t, a, s);
|
|
123
124
|
else
|
|
124
|
-
for (var
|
|
125
|
-
(
|
|
126
|
-
return
|
|
127
|
-
},
|
|
125
|
+
for (var d = e.length - 1; d >= 0; d--)
|
|
126
|
+
(o = e[d]) && (r = (l < 3 ? o(r) : l > 3 ? o(t, a, r) : o(t, a)) || r);
|
|
127
|
+
return l > 3 && r && Object.defineProperty(t, a, r), r;
|
|
128
|
+
}, ye = function(e, t) {
|
|
128
129
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
129
130
|
return Reflect.metadata(e, t);
|
|
130
131
|
};
|
|
131
|
-
const
|
|
132
|
+
const Ke = class {
|
|
132
133
|
constructor(e) {
|
|
133
|
-
|
|
134
|
-
var
|
|
134
|
+
te(this, e), this.schedulerConfigChanged = _(this, "schedulerConfigChanged", 7), this.schedulerConfigCreated = _(this, "schedulerConfigCreated", 7), this.cancelButtonClick = _(this, "cancelButtonClick", 7), this.formSubmitted = _(this, "formSubmitted", 7), this.previewButtonClicked = _(this, "previewButtonClicked", 7), this.schedulerEditorFormUpdated = _(this, "schedulerEditorFormUpdated", 7), this.nylasSchedulerError = _(this, "nylasSchedulerError", 6), this.dismissNotification = _(this, "dismissNotification", 7), this.formSubmissionHandler = async (t) => {
|
|
135
|
+
var ve, we, ke, Ce, xe, Ee, Se, Te, Le, Fe, Oe, Be, Pe, He, Ne, ze, Ie;
|
|
135
136
|
t.preventDefault();
|
|
136
137
|
const a = await this.formSubmitted.emit();
|
|
137
138
|
if (b("[nylas-editor-tabs]", "formSubmissionHandler", a), !this.formRef.checkValidity() || a.defaultPrevented) {
|
|
138
|
-
this.
|
|
139
|
+
this.setError({
|
|
140
|
+
message: this.formRef.validationMessage || i.t("fixFormErrors"),
|
|
141
|
+
type: v.Error,
|
|
142
|
+
category: w.Component,
|
|
143
|
+
title: i.t("nylasEditorTabs.formErrorTitle")
|
|
144
|
+
});
|
|
139
145
|
return;
|
|
140
146
|
}
|
|
141
147
|
this.isLoading = !0, this.hasUnsavedChanges = !1;
|
|
142
|
-
const
|
|
143
|
-
b("[nylas-editor-tabs]", "formState",
|
|
144
|
-
const { title:
|
|
148
|
+
const l = this.updateFormState();
|
|
149
|
+
b("[nylas-editor-tabs]", "formState", l);
|
|
150
|
+
const { title: r, description: o, duration: d, availability: c, bookingCalendar: p, location: h, bookingType: m, buffer: k, availableDaysInFuture: S, minCancellationNotice: F, minBookingNotice: I, cancellationPolicy: P, timeslotInterval: T, additionalGuestsHidden: H, hideCancellationOptions: G, hideReschedulingOptions: j, participants: L, participantOpenHours: x, additionalFields: M, participantCalendars: y, conferencing: U, participantBookingCalendars: C, reminders: $, emailTemplate: D, redirectUrl: J, availabilityMethod: N, slug: V, appearance: Z, name: Q, disableEmails: W, organizerLocale: X } = l, E = ((we = (ve = this.selectedConfiguration) == null ? void 0 : ve.participants) == null ? void 0 : we.find((f) => f.is_organizer)) || (L == null ? void 0 : L.find((f) => f.is_organizer)), A = y && (E != null && E.email) ? y[E == null ? void 0 : E.email] : [], K = ((ke = E == null ? void 0 : E.booking) == null ? void 0 : ke.calendar_id) || p, O = d ? parseInt(d) : 30, B = L && (L == null ? void 0 : L.length) > 0 ? L : [
|
|
145
151
|
{
|
|
146
|
-
name: (
|
|
147
|
-
email: (
|
|
152
|
+
name: (E == null ? void 0 : E.name) ?? ((Ce = this.currentUser) == null ? void 0 : Ce.name) ?? "",
|
|
153
|
+
email: (E == null ? void 0 : E.email) ?? ((xe = this.currentUser) == null ? void 0 : xe.email) ?? "",
|
|
148
154
|
is_organizer: !0,
|
|
149
155
|
timezone: (c == null ? void 0 : c.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
150
156
|
availability: {
|
|
@@ -156,121 +162,136 @@ const We = class {
|
|
|
156
162
|
}
|
|
157
163
|
}
|
|
158
164
|
];
|
|
159
|
-
let
|
|
160
|
-
this.selectedEventType && this.selectedEventType !==
|
|
161
|
-
const
|
|
162
|
-
...((
|
|
163
|
-
version: ((
|
|
164
|
-
slug:
|
|
165
|
-
name:
|
|
165
|
+
let R = N || (((Te = (Se = (Ee = this.selectedConfiguration) == null ? void 0 : Ee.availability) == null ? void 0 : Se.availability_rules) == null ? void 0 : Te.availability_method) ?? "collective");
|
|
166
|
+
this.selectedEventType && this.selectedEventType !== z.group && (R = this.selectedEventType === z.one_on_one ? z.collective : this.selectedEventType), console.log("availabilityMethodSelected", R);
|
|
167
|
+
const Y = {
|
|
168
|
+
...((Le = this.selectedConfiguration) == null ? void 0 : Le.id) && { id: this.selectedConfiguration.id },
|
|
169
|
+
version: ((Fe = this.selectedConfiguration) == null ? void 0 : Fe.version) ?? "1.0.0",
|
|
170
|
+
slug: V,
|
|
171
|
+
name: Q,
|
|
166
172
|
availability: {
|
|
167
|
-
duration_minutes:
|
|
168
|
-
interval_minutes: (
|
|
169
|
-
round_to:
|
|
173
|
+
duration_minutes: O,
|
|
174
|
+
interval_minutes: (T == null ? void 0 : T.interval) ?? O,
|
|
175
|
+
round_to: T == null ? void 0 : T.roundTo,
|
|
170
176
|
availability_rules: {
|
|
171
|
-
availability_method:
|
|
172
|
-
buffer:
|
|
173
|
-
default_open_hours: (c == null ? void 0 : c.openHours) ?? ((
|
|
174
|
-
round_robin_group_id: ((
|
|
177
|
+
availability_method: R,
|
|
178
|
+
buffer: k || { before: 0, after: 0 },
|
|
179
|
+
default_open_hours: (c == null ? void 0 : c.openHours) ?? ((Pe = (Be = (Oe = this.selectedConfiguration) == null ? void 0 : Oe.availability) == null ? void 0 : Be.availability_rules) == null ? void 0 : Pe.default_open_hours) ?? $e,
|
|
180
|
+
round_robin_group_id: ((ze = (Ne = (He = this.selectedConfiguration) == null ? void 0 : He.availability) == null ? void 0 : Ne.availability_rules) == null ? void 0 : ze.round_robin_group_id) ?? ""
|
|
175
181
|
}
|
|
176
182
|
},
|
|
177
183
|
participants: [
|
|
178
|
-
...
|
|
179
|
-
var
|
|
180
|
-
let
|
|
181
|
-
if ((
|
|
182
|
-
const
|
|
184
|
+
...B ? B.map((f) => {
|
|
185
|
+
var Ge, Ue, De, Re, je, Me;
|
|
186
|
+
let ee = (c == null ? void 0 : c.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
187
|
+
if ((Ge = x == null ? void 0 : x[f.email]) != null && Ge.length && (ee = (De = (Ue = x == null ? void 0 : x[f.email]) == null ? void 0 : Ue[0]) == null ? void 0 : De.timezone), f.is_organizer) {
|
|
188
|
+
const Ae = C != null && C[f.email] ? C == null ? void 0 : C[f.email] : K || "primary", he = y != null && y[f.email] ? y == null ? void 0 : y[f.email] : A != null && A.length ? A : ["primary"], tt = he.length === 1 && he[0] === "primary";
|
|
183
189
|
return {
|
|
184
|
-
name:
|
|
185
|
-
email:
|
|
190
|
+
name: f.name ?? "",
|
|
191
|
+
email: f.email,
|
|
186
192
|
is_organizer: !0,
|
|
187
|
-
timezone:
|
|
193
|
+
timezone: ee,
|
|
188
194
|
availability: {
|
|
189
|
-
calendar_ids:
|
|
190
|
-
open_hours: (
|
|
195
|
+
calendar_ids: tt ? [Ae] : he,
|
|
196
|
+
open_hours: (x == null ? void 0 : x[f.email]) ?? ((Re = f.availability) == null ? void 0 : Re.open_hours) ?? []
|
|
191
197
|
},
|
|
192
198
|
booking: {
|
|
193
|
-
calendar_id:
|
|
199
|
+
calendar_id: Ae
|
|
194
200
|
}
|
|
195
201
|
};
|
|
196
202
|
}
|
|
197
|
-
const
|
|
203
|
+
const ne = C != null && C[f.email] ? { calendar_id: C == null ? void 0 : C[f.email] } : (f == null ? void 0 : f.booking) ?? void 0, ue = (y == null ? void 0 : y[f.email]) ?? ((je = f.availability) == null ? void 0 : je.calendar_ids) ?? ["primary"], et = ue.length === 1 && ue[0] === "primary";
|
|
198
204
|
return {
|
|
199
|
-
...
|
|
200
|
-
timezone:
|
|
201
|
-
availability:
|
|
202
|
-
calendar_ids:
|
|
203
|
-
open_hours: (
|
|
205
|
+
...f,
|
|
206
|
+
timezone: ee,
|
|
207
|
+
availability: f.availability ? {
|
|
208
|
+
calendar_ids: et && typeof ne < "u" ? [ne == null ? void 0 : ne.calendar_id] : ue,
|
|
209
|
+
open_hours: (x == null ? void 0 : x[f.email]) ?? ((Me = f.availability) == null ? void 0 : Me.open_hours) ?? []
|
|
204
210
|
} : void 0,
|
|
205
|
-
booking:
|
|
211
|
+
booking: ne
|
|
206
212
|
};
|
|
207
213
|
}) : []
|
|
208
214
|
],
|
|
209
215
|
event_booking: {
|
|
210
|
-
title: (
|
|
211
|
-
description: (
|
|
212
|
-
location: (
|
|
216
|
+
title: (r == null ? void 0 : r.toString()) ?? "",
|
|
217
|
+
description: (o == null ? void 0 : o.toString()) ?? "",
|
|
218
|
+
location: (h == null ? void 0 : h.toString()) ?? "",
|
|
213
219
|
booking_type: (m == null ? void 0 : m.toString()) ?? "booking",
|
|
214
220
|
timezone: (c == null ? void 0 : c.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
215
221
|
conferencing: U,
|
|
216
|
-
reminders:
|
|
217
|
-
disable_emails: typeof
|
|
222
|
+
reminders: $,
|
|
223
|
+
disable_emails: typeof W == "boolean" ? W : !1
|
|
218
224
|
},
|
|
219
225
|
scheduler: {
|
|
220
|
-
cancellation_policy:
|
|
221
|
-
available_days_in_future:
|
|
222
|
-
min_cancellation_notice:
|
|
223
|
-
min_booking_notice:
|
|
224
|
-
hide_additional_guests:
|
|
225
|
-
hide_cancellation_options:
|
|
226
|
-
hide_rescheduling_options:
|
|
226
|
+
cancellation_policy: P ?? "",
|
|
227
|
+
available_days_in_future: S ?? 30,
|
|
228
|
+
min_cancellation_notice: F ?? 0,
|
|
229
|
+
min_booking_notice: I ?? 60,
|
|
230
|
+
hide_additional_guests: H ?? !1,
|
|
231
|
+
hide_cancellation_options: G ?? !1,
|
|
232
|
+
hide_rescheduling_options: j ?? !1,
|
|
227
233
|
additional_fields: M,
|
|
228
|
-
email_template:
|
|
229
|
-
...
|
|
230
|
-
organizer_locale:
|
|
231
|
-
logo:
|
|
234
|
+
email_template: D ? {
|
|
235
|
+
...D,
|
|
236
|
+
organizer_locale: X || "en",
|
|
237
|
+
logo: D.logo || ""
|
|
232
238
|
} : void 0,
|
|
233
|
-
confirmation_redirect_url:
|
|
239
|
+
confirmation_redirect_url: J
|
|
234
240
|
},
|
|
235
|
-
appearance:
|
|
236
|
-
},
|
|
237
|
-
this.isConfigRoundRobin(
|
|
238
|
-
const
|
|
241
|
+
appearance: Z
|
|
242
|
+
}, ae = _e(this.selectedConfiguration, Y || {}), q = this.action === "create" ? ae : Y;
|
|
243
|
+
this.isConfigRoundRobin(q) && (q.participants = q.participants.map((f) => ({ ...f, is_organizer: void 0 })));
|
|
244
|
+
const oe = (f) => {
|
|
239
245
|
this.isLoading = !1, this.changesSaved = !0, setTimeout(() => {
|
|
240
246
|
this.changesSaved = !1;
|
|
241
247
|
}, 5e3);
|
|
242
|
-
},
|
|
243
|
-
var
|
|
244
|
-
return
|
|
245
|
-
})) || {},
|
|
246
|
-
|
|
248
|
+
}, se = this.checkForBookingFormErrors(q), re = ((Ie = this.configurations) == null ? void 0 : Ie.find((f) => {
|
|
249
|
+
var ee;
|
|
250
|
+
return f.id === ((ee = this.selectedConfiguration) == null ? void 0 : ee.id);
|
|
251
|
+
})) || {}, ie = this.checkForOrganizerConfirmationError(_e(q, re));
|
|
252
|
+
se || ie || this.schedulerConfigChanged.emit({ config: q, resetLoadingState: oe, action: this.action, host: this.host });
|
|
247
253
|
}, this.isConfigRoundRobin = (t) => {
|
|
248
|
-
var a,
|
|
249
|
-
return ((
|
|
254
|
+
var a, s, l, r;
|
|
255
|
+
return ((s = (a = t == null ? void 0 : t.availability) == null ? void 0 : a.availability_rules) == null ? void 0 : s.availability_method) === "max-availability" || ((r = (l = t.availability) == null ? void 0 : l.availability_rules) == null ? void 0 : r.availability_method) === "max-fairness";
|
|
250
256
|
}, this.checkForOrganizerConfirmationError = (t) => {
|
|
251
|
-
var
|
|
252
|
-
let a = !1,
|
|
253
|
-
const
|
|
254
|
-
return
|
|
257
|
+
var o, d;
|
|
258
|
+
let a = !1, s = "";
|
|
259
|
+
const l = ((o = t.event_booking) == null ? void 0 : o.booking_type) === "organizer-confirmation", r = (d = t.scheduler) == null ? void 0 : d.organizer_confirmation_url;
|
|
260
|
+
return l && !r && (s += "Organizer confirmation URL is required when using organizer confirmation booking type.", a = !0), a && (this.isLoading = !1, this.host.setError({
|
|
261
|
+
message: s,
|
|
262
|
+
type: v.Error,
|
|
263
|
+
category: w.Component,
|
|
264
|
+
title: "Error:"
|
|
265
|
+
})), a;
|
|
255
266
|
}, this.checkForBookingFormErrors = (t) => {
|
|
256
|
-
var
|
|
257
|
-
let a = !1,
|
|
258
|
-
const
|
|
259
|
-
return
|
|
260
|
-
const
|
|
261
|
-
if (
|
|
262
|
-
|
|
267
|
+
var r;
|
|
268
|
+
let a = !1, s = "";
|
|
269
|
+
const l = (r = t.scheduler) == null ? void 0 : r.additional_fields;
|
|
270
|
+
return l && (s = "", Object.entries(l).forEach((o) => {
|
|
271
|
+
const d = o[1];
|
|
272
|
+
if (d.label === "") {
|
|
273
|
+
s += i.t("nylasEditorTabs.bookingFormError_label", { type: d.type }), a = !0;
|
|
263
274
|
return;
|
|
264
275
|
}
|
|
265
|
-
if (
|
|
266
|
-
for (const c of
|
|
276
|
+
if (d.options) {
|
|
277
|
+
for (const c of d.options)
|
|
267
278
|
if (c.trim() === "") {
|
|
268
|
-
|
|
279
|
+
s += i.t("nylasEditorTabs.bookingFormError_option", { label: d.label, type: d.type }), a = !0;
|
|
269
280
|
break;
|
|
270
281
|
}
|
|
271
282
|
}
|
|
272
|
-
})), a && (this.isLoading = !1, this.host.setError(
|
|
273
|
-
|
|
283
|
+
})), a && (this.isLoading = !1, this.host.setError({
|
|
284
|
+
message: s,
|
|
285
|
+
type: v.Error,
|
|
286
|
+
category: w.Component,
|
|
287
|
+
title: i.t("nylasEditorTabs.bookingFormError")
|
|
288
|
+
})), a;
|
|
289
|
+
}, this.calendars = void 0, this.selectedConfiguration = void 0, this.configurations = void 0, this.currentUser = void 0, this.schedulerPreviewLink = "", this.mode = "app", this.hideEditorTabs = [], this.enableUserFeedback = !0, this.selectedLanguage = void 0, this.selectedEventType = void 0, this.action = "create", this.showFeedbackModal = !1, this.activeTab = u.EventInfo, this.isLoading = !1, this.hasUnsavedChanges = !1, this.changesSaved = !1, this.formState = {}, this.error = {
|
|
290
|
+
message: "",
|
|
291
|
+
type: v.Error,
|
|
292
|
+
category: w.Component,
|
|
293
|
+
title: ""
|
|
294
|
+
};
|
|
274
295
|
}
|
|
275
296
|
configChangedHandler(e) {
|
|
276
297
|
b("[nylas-editor-tabs]", "configChangedHandler", e, this.selectedConfiguration), this.formState = {
|
|
@@ -283,13 +304,31 @@ const We = class {
|
|
|
283
304
|
});
|
|
284
305
|
}
|
|
285
306
|
selectedLanguageChangedHandler(e, t) {
|
|
286
|
-
e !== t && (
|
|
307
|
+
e !== t && (i.changeLanguage(e), this.error && this.error.message && (this.error = {
|
|
308
|
+
...this.error,
|
|
309
|
+
message: i.t("fixFormErrors")
|
|
310
|
+
}, this.showErrorNotification(this.error)));
|
|
287
311
|
}
|
|
288
312
|
async schedulerConfigCreatedEventHandler(e) {
|
|
289
313
|
return this.schedulerConfigCreated.emit(e);
|
|
290
314
|
}
|
|
291
315
|
async setError(e) {
|
|
292
|
-
|
|
316
|
+
var t;
|
|
317
|
+
this.error = {
|
|
318
|
+
message: e.message,
|
|
319
|
+
type: e.type,
|
|
320
|
+
category: e.category,
|
|
321
|
+
title: e.title || i.t("genericErrorTitle")
|
|
322
|
+
}, (t = this.error) != null && t.message && this.showErrorNotification(this.error);
|
|
323
|
+
}
|
|
324
|
+
async resetError() {
|
|
325
|
+
var e, t;
|
|
326
|
+
(e = this.error) != null && e.message && this.dismissNotification.emit({ id: (t = this.error) == null ? void 0 : t.message.split(" ").join("-"), host: this.host }), this.error = {
|
|
327
|
+
message: "",
|
|
328
|
+
type: v.Error,
|
|
329
|
+
category: w.Component,
|
|
330
|
+
title: ""
|
|
331
|
+
};
|
|
293
332
|
}
|
|
294
333
|
connectedCallback() {
|
|
295
334
|
b("[nylas-editor-tabs]", "connectedCallback");
|
|
@@ -299,12 +338,12 @@ const We = class {
|
|
|
299
338
|
}
|
|
300
339
|
componentDidLoad() {
|
|
301
340
|
var t, a;
|
|
302
|
-
b("[nylas-editor-tabs]", "componentDidLoad"), this.enableUserFeedback && !
|
|
341
|
+
b("[nylas-editor-tabs]", "componentDidLoad"), this.enableUserFeedback && !Je() && Ve({
|
|
303
342
|
dsn: "https://9d5731f1c77ca84c9ed3fb9b3ccf7ee1@o74852.ingest.us.sentry.io/4507889638178816",
|
|
304
|
-
release: "2.0.
|
|
305
|
-
integrations: (
|
|
306
|
-
...
|
|
307
|
-
|
|
343
|
+
release: "2.0.1",
|
|
344
|
+
integrations: (s) => [
|
|
345
|
+
...s.filter((l) => !1),
|
|
346
|
+
qe({
|
|
308
347
|
colorScheme: "system",
|
|
309
348
|
autoInject: !1
|
|
310
349
|
})
|
|
@@ -321,7 +360,7 @@ const We = class {
|
|
|
321
360
|
handleValueChanged(e) {
|
|
322
361
|
b("[nylas-editor-tabs]", "handleValueChanged", e);
|
|
323
362
|
const { name: t, value: a } = e.detail;
|
|
324
|
-
console.log("name", t, "value", a), this.setFormState(a, t), this.formState = { ...this.formState }, this.
|
|
363
|
+
console.log("name", t, "value", a), this.setFormState(a, t), this.formState = { ...this.formState }, this.resetError(), at.includes(t) && (this.hasUnsavedChanges = !0), this.schedulerEditorFormUpdated.emit({
|
|
325
364
|
value: e.detail.value,
|
|
326
365
|
name: e.detail.name
|
|
327
366
|
});
|
|
@@ -330,82 +369,95 @@ const We = class {
|
|
|
330
369
|
this.showFeedbackModal = !1;
|
|
331
370
|
}
|
|
332
371
|
feedbackSubmittedHandler(e) {
|
|
333
|
-
var
|
|
372
|
+
var s, l, r, o, d, c;
|
|
334
373
|
const a = {
|
|
335
|
-
eventId:
|
|
374
|
+
eventId: Ze("Scheduler Editor User Feedback", {
|
|
336
375
|
extra: {
|
|
337
|
-
configId: (
|
|
338
|
-
slug: (
|
|
376
|
+
configId: (s = this.selectedConfiguration) == null ? void 0 : s.id,
|
|
377
|
+
slug: (l = this.selectedConfiguration) == null ? void 0 : l.slug
|
|
339
378
|
}
|
|
340
379
|
}),
|
|
341
380
|
message: e.detail.feedback
|
|
342
381
|
};
|
|
343
|
-
|
|
382
|
+
We(a, {
|
|
344
383
|
includeReplay: !0,
|
|
345
384
|
captureContext: {
|
|
346
385
|
tags: {
|
|
347
386
|
"nylas-web-element": "nylas-scheduler-editor",
|
|
348
|
-
"nylas-web-element-version": "2.0.
|
|
349
|
-
"nylas-config-id": (
|
|
350
|
-
"nylas-slug": (
|
|
387
|
+
"nylas-web-element-version": "2.0.1",
|
|
388
|
+
"nylas-config-id": (r = this.selectedConfiguration) == null ? void 0 : r.id,
|
|
389
|
+
"nylas-slug": (o = this.selectedConfiguration) == null ? void 0 : o.slug,
|
|
351
390
|
"host-url": window.location.href
|
|
352
391
|
},
|
|
353
392
|
extra: {
|
|
354
|
-
configId: (
|
|
393
|
+
configId: (d = this.selectedConfiguration) == null ? void 0 : d.id,
|
|
355
394
|
slug: (c = this.selectedConfiguration) == null ? void 0 : c.slug
|
|
356
395
|
}
|
|
357
396
|
}
|
|
358
397
|
}), this.showFeedbackModal = !1;
|
|
359
398
|
}
|
|
399
|
+
showErrorNotification(e) {
|
|
400
|
+
e.message && this.nylasSchedulerError.emit({
|
|
401
|
+
notification: {
|
|
402
|
+
title: e.title,
|
|
403
|
+
category: e.category || w.Component,
|
|
404
|
+
type: e.type || v.Error,
|
|
405
|
+
description: e.message,
|
|
406
|
+
id: e.message.split(" ").join("-"),
|
|
407
|
+
ttl: "none"
|
|
408
|
+
},
|
|
409
|
+
host: this.host
|
|
410
|
+
});
|
|
411
|
+
}
|
|
360
412
|
getFormStateFromConfig(e) {
|
|
361
|
-
var a,
|
|
362
|
-
let t = (a = e == null ? void 0 : e.participants) == null ? void 0 : a.find((
|
|
363
|
-
return !t && ((
|
|
364
|
-
var
|
|
365
|
-
return
|
|
413
|
+
var a, s, l, r, o, d, c, p, h, m, k, S, F, I, P, T, H, G, j, L, x, M, y, U, C, $, D, J, N, V, Z, Q, W, X, E, A, K;
|
|
414
|
+
let t = (a = e == null ? void 0 : e.participants) == null ? void 0 : a.find((O) => O.is_organizer);
|
|
415
|
+
return !t && ((l = (s = e == null ? void 0 : e.availability) == null ? void 0 : s.availability_rules) == null ? void 0 : l.availability_method) !== "collective" && (t = (r = e == null ? void 0 : e.participants) == null ? void 0 : r.find((O) => {
|
|
416
|
+
var B;
|
|
417
|
+
return O.email === ((B = this.currentUser) == null ? void 0 : B.email);
|
|
366
418
|
}), 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."), {
|
|
367
|
-
title: ((
|
|
368
|
-
description: ((
|
|
419
|
+
title: ((o = e == null ? void 0 : e.event_booking) == null ? void 0 : o.title) ?? "",
|
|
420
|
+
description: ((d = e == null ? void 0 : e.event_booking) == null ? void 0 : d.description) ?? "",
|
|
369
421
|
duration: ((p = (c = e == null ? void 0 : e.availability) == null ? void 0 : c.duration_minutes) == null ? void 0 : p.toString()) ?? "30",
|
|
370
422
|
availability: {
|
|
371
|
-
timezone: ((
|
|
372
|
-
openHours: ((
|
|
423
|
+
timezone: ((h = e == null ? void 0 : e.event_booking) == null ? void 0 : h.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
424
|
+
openHours: ((k = (m = e == null ? void 0 : e.availability) == null ? void 0 : m.availability_rules) == null ? void 0 : k.default_open_hours) ?? $e
|
|
373
425
|
},
|
|
374
|
-
additionalFields: ((
|
|
375
|
-
conferencing: ((
|
|
376
|
-
calendarIds: ((
|
|
426
|
+
additionalFields: ((S = e == null ? void 0 : e.scheduler) == null ? void 0 : S.additional_fields) ?? {},
|
|
427
|
+
conferencing: ((F = e == null ? void 0 : e.event_booking) == null ? void 0 : F.conferencing) ?? {},
|
|
428
|
+
calendarIds: ((I = t == null ? void 0 : t.availability) == null ? void 0 : I.calendar_ids) ?? [],
|
|
377
429
|
participants: (e == null ? void 0 : e.participants) ?? [],
|
|
378
|
-
bookingCalendar: ((
|
|
379
|
-
location: ((
|
|
380
|
-
bookingType: ((
|
|
381
|
-
buffer: ((
|
|
382
|
-
cancellationPolicy: ((
|
|
383
|
-
availableDaysInFuture: ((
|
|
430
|
+
bookingCalendar: ((P = t == null ? void 0 : t.booking) == null ? void 0 : P.calendar_id) ?? (t == null ? void 0 : t.email) ?? "",
|
|
431
|
+
location: ((T = e == null ? void 0 : e.event_booking) == null ? void 0 : T.location) ?? "",
|
|
432
|
+
bookingType: ((H = e == null ? void 0 : e.event_booking) == null ? void 0 : H.booking_type) ?? "booking",
|
|
433
|
+
buffer: ((j = (G = e == null ? void 0 : e.availability) == null ? void 0 : G.availability_rules) == null ? void 0 : j.buffer) ?? { before: 0, after: 0 },
|
|
434
|
+
cancellationPolicy: ((L = e == null ? void 0 : e.scheduler) == null ? void 0 : L.cancellation_policy) ?? "",
|
|
435
|
+
availableDaysInFuture: ((x = e == null ? void 0 : e.scheduler) == null ? void 0 : x.available_days_in_future) ?? 30,
|
|
384
436
|
minCancellationNotice: ((M = e == null ? void 0 : e.scheduler) == null ? void 0 : M.min_cancellation_notice) ?? 0,
|
|
385
|
-
minBookingNotice: ((
|
|
437
|
+
minBookingNotice: ((y = e == null ? void 0 : e.scheduler) == null ? void 0 : y.min_booking_notice) ?? 60,
|
|
386
438
|
timeslotInterval: {
|
|
387
|
-
interval: ((U = e == null ? void 0 : e.availability) == null ? void 0 : U.interval_minutes) ?? ((
|
|
388
|
-
roundTo: (
|
|
439
|
+
interval: ((U = e == null ? void 0 : e.availability) == null ? void 0 : U.interval_minutes) ?? ((C = e == null ? void 0 : e.availability) == null ? void 0 : C.duration_minutes),
|
|
440
|
+
roundTo: ($ = e == null ? void 0 : e.availability) == null ? void 0 : $.round_to
|
|
389
441
|
},
|
|
390
|
-
additionalGuestsHidden: ((
|
|
391
|
-
hideCancellationOptions: ((
|
|
392
|
-
hideReschedulingOptions: ((
|
|
393
|
-
participantBookingCalendars: ((
|
|
394
|
-
var
|
|
395
|
-
return (
|
|
442
|
+
additionalGuestsHidden: ((D = e == null ? void 0 : e.scheduler) == null ? void 0 : D.hide_additional_guests) ?? !1,
|
|
443
|
+
hideCancellationOptions: ((J = e == null ? void 0 : e.scheduler) == null ? void 0 : J.hide_cancellation_options) ?? !1,
|
|
444
|
+
hideReschedulingOptions: ((N = e == null ? void 0 : e.scheduler) == null ? void 0 : N.hide_rescheduling_options) ?? !1,
|
|
445
|
+
participantBookingCalendars: ((V = e == null ? void 0 : e.participants) == null ? void 0 : V.reduce((O, B) => {
|
|
446
|
+
var R, Y;
|
|
447
|
+
return (R = B.booking) != null && R.calendar_id && (O[B.email] = (Y = B.booking) == null ? void 0 : Y.calendar_id), O;
|
|
396
448
|
})) ?? {},
|
|
397
|
-
participantCalendars: ((
|
|
398
|
-
var
|
|
399
|
-
return
|
|
449
|
+
participantCalendars: ((Z = e == null ? void 0 : e.participants) == null ? void 0 : Z.reduce((O, B) => {
|
|
450
|
+
var R;
|
|
451
|
+
return O[B.email] = (R = B.availability) == null ? void 0 : R.calendar_ids, O;
|
|
400
452
|
}, {})) ?? {},
|
|
401
|
-
reminders: (
|
|
402
|
-
emailTemplate: (
|
|
403
|
-
redirectUrl: (
|
|
453
|
+
reminders: (Q = e == null ? void 0 : e.event_booking) == null ? void 0 : Q.reminders,
|
|
454
|
+
emailTemplate: (W = e == null ? void 0 : e.scheduler) == null ? void 0 : W.email_template,
|
|
455
|
+
redirectUrl: (X = e == null ? void 0 : e.scheduler) == null ? void 0 : X.confirmation_redirect_url,
|
|
404
456
|
slug: e == null ? void 0 : e.slug,
|
|
405
457
|
appearance: e == null ? void 0 : e.appearance,
|
|
406
458
|
name: e == null ? void 0 : e.name,
|
|
407
|
-
disableEmails: (
|
|
408
|
-
organizerLocale: (
|
|
459
|
+
disableEmails: (E = e == null ? void 0 : e.event_booking) == null ? void 0 : E.disable_emails,
|
|
460
|
+
organizerLocale: (K = (A = e == null ? void 0 : e.scheduler) == null ? void 0 : A.email_template) == null ? void 0 : K.organizer_locale
|
|
409
461
|
};
|
|
410
462
|
}
|
|
411
463
|
setFormState(e, t) {
|
|
@@ -478,8 +530,8 @@ const We = class {
|
|
|
478
530
|
this.formState.emailTemplate = JSON.parse(e.toString());
|
|
479
531
|
break;
|
|
480
532
|
case "disable-emails": {
|
|
481
|
-
const { disableEmails: a, organizerLocale:
|
|
482
|
-
this.formState.disableEmails = a, this.formState.organizerLocale =
|
|
533
|
+
const { disableEmails: a, organizerLocale: s } = JSON.parse(e.toString());
|
|
534
|
+
this.formState.disableEmails = a, this.formState.organizerLocale = s;
|
|
483
535
|
break;
|
|
484
536
|
}
|
|
485
537
|
case "reminder-overrides":
|
|
@@ -522,20 +574,20 @@ const We = class {
|
|
|
522
574
|
e.preventDefault(), this.showFeedbackModal = !0;
|
|
523
575
|
}
|
|
524
576
|
render() {
|
|
525
|
-
var e, t;
|
|
526
|
-
return b("[nylas-editor-tabs]", "render", this.formState), n(
|
|
577
|
+
var e, t, a, s, l, r;
|
|
578
|
+
return b("[nylas-editor-tabs]", "render", this.formState), n(ce, { key: "f0b2f93d4dfabf59fa928e870e7af76570ac6336" }, n("nylas-notification", { key: "7e37ff4917cafd361b25e07e856d7b0453929eb2" }), n("form", { key: "bd3ca664b062446e6093c7a197ddcdd398fbd58c", 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" }), i.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" }), i.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" }), i.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" }), i.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" }), i.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" }), i.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" }), i.t("pageStylesTab"))), n("div", { class: "tab-content", part: "editor__tab-content net__tab-content" }, n(pt, { formState: this.formState, activeTab: this.activeTab, currentUser: this.currentUser, calendars: this.calendars, id: ((e = this.selectedConfiguration) == null ? void 0 : e.id) ?? "new", i18next: i }))) : n("div", { class: "composable", key: (t = this.selectedConfiguration) == null ? void 0 : t.id }, n("slot", null)), n("div", { key: "9e8d7e5aa02656528d7038968d0cf6032c8ed8c1", class: "footer", part: "editor__footer net__footer" }, n("div", { key: "b4222c7530033584fdb945cd006f75b3dba1afa9", 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: "1c04acfb85e835a4335c3998422cb43d102ef2f0", class: "buttons", part: "editor__footer-buttons net__footer-buttons" }, n("p", { key: "303c5d952f4f8e96c54d133f20fffcc77cd2a2ef", class: {
|
|
527
579
|
"unsaved-changes": this.hasUnsavedChanges && !this.changesSaved,
|
|
528
580
|
"saved-changes": this.changesSaved,
|
|
529
|
-
error: this.error !== "",
|
|
530
|
-
"error-full-width": this.error !== "" && this.action === "create"
|
|
531
|
-
} }, this.error
|
|
532
|
-
|
|
533
|
-
}, variant: "basic" }, n("eye-icon", null)), n("button-component", { key: "
|
|
534
|
-
|
|
535
|
-
}, variant: "basic", part: "editor__footer-cancel net__footer-cancel" },
|
|
581
|
+
error: ((a = this.error) == null ? void 0 : a.message) !== "",
|
|
582
|
+
"error-full-width": ((s = this.error) == null ? void 0 : s.message) !== "" && this.action === "create"
|
|
583
|
+
} }, ((l = this.error) == null ? void 0 : l.message) == "" && this.hasUnsavedChanges && !this.changesSaved ? i.t("unsavedChangesLabel") : ((r = this.error) == null ? void 0 : r.message) == "" && this.changesSaved ? `${i.t("changesSavedLabel")}!` : ""), this.schedulerPreviewLink !== "" && this.action === "edit" && n("button-component", { title: "Preview", type: "button", disabled: this.isLoading, clickHandler: (o) => {
|
|
584
|
+
o.preventDefault(), this.previewButtonClicked.emit(this.host).defaultPrevented || window.open(le(this.schedulerPreviewLink, this.selectedConfiguration), "_blank");
|
|
585
|
+
}, variant: "basic" }, n("eye-icon", null)), n("button-component", { key: "ceabbc710e864739e6049334c99c8f9210824e27", type: "button", disabled: this.isLoading, clickHandler: (o) => {
|
|
586
|
+
o.preventDefault(), this.cancelButtonClick.emit(), this.host.resetError();
|
|
587
|
+
}, variant: "basic", part: "editor__footer-cancel net__footer-cancel" }, i.t("backButton")), n("button-component", { key: "890a200707328b747773e99b2f6bc07f7a1d5db9", class: { "save-changes": this.action === "edit" }, type: "submit", disabled: this.isLoading, part: "editor__footer-cta, net__footer-cta" }, this.isLoading ? n("span", null, i.t("savingButtonText"), n("loading-icon", null), " ") : this.action === "create" ? `${i.t("createButtonText")}` : `${i.t("saveChangesButtonText")}`)))), this.showFeedbackModal && n("nylas-feedback-form", null));
|
|
536
588
|
}
|
|
537
589
|
get host() {
|
|
538
|
-
return
|
|
590
|
+
return pe(this);
|
|
539
591
|
}
|
|
540
592
|
static get watchers() {
|
|
541
593
|
return {
|
|
@@ -545,8 +597,8 @@ const We = class {
|
|
|
545
597
|
};
|
|
546
598
|
}
|
|
547
599
|
};
|
|
548
|
-
|
|
549
|
-
|
|
600
|
+
ht([
|
|
601
|
+
be({
|
|
550
602
|
name: "nylas-editor-tabs",
|
|
551
603
|
stateToProps: /* @__PURE__ */ new Map([
|
|
552
604
|
["schedulerConfig.calendars", "calendars"],
|
|
@@ -558,16 +610,21 @@ bt([
|
|
|
558
610
|
]),
|
|
559
611
|
eventToProps: {
|
|
560
612
|
schedulerConfigChanged: async (e, t) => {
|
|
561
|
-
const { resetLoadingState: a, host:
|
|
562
|
-
const [
|
|
563
|
-
!
|
|
613
|
+
const { resetLoadingState: a, host: s, action: l, config: r } = e.detail, o = (d, c) => {
|
|
614
|
+
const [p, h] = d;
|
|
615
|
+
!p && h ? s.setError({
|
|
616
|
+
message: h.message || i.t("genericErrorTitle"),
|
|
617
|
+
type: v.Error,
|
|
618
|
+
category: w.Component,
|
|
619
|
+
title: c
|
|
620
|
+
}) : p && !h && l === "create" && (s.schedulerConfigCreatedEventHandler({ config: p, action: l, host: s }), t.schedulerConfigStore.set("selectedEventType", void 0)), a && a(e);
|
|
564
621
|
};
|
|
565
|
-
if (
|
|
566
|
-
const
|
|
567
|
-
|
|
622
|
+
if (l === "edit") {
|
|
623
|
+
const d = await t.schedulerConfig.updateConfiguration(r);
|
|
624
|
+
o(d, i.t("nylasEditorTabs.updateConfigError"));
|
|
568
625
|
} else {
|
|
569
|
-
const
|
|
570
|
-
|
|
626
|
+
const d = await t.schedulerConfig.createConfiguration(r);
|
|
627
|
+
o(d, i.t("nylasEditorTabs.createConfigError"));
|
|
571
628
|
}
|
|
572
629
|
},
|
|
573
630
|
cancelButtonClick: async (e, t) => {
|
|
@@ -593,27 +650,27 @@ bt([
|
|
|
593
650
|
]),
|
|
594
651
|
fireRegisterEvent: !0
|
|
595
652
|
}),
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
],
|
|
600
|
-
|
|
601
|
-
var
|
|
653
|
+
ye("design:type", Function),
|
|
654
|
+
ye("design:paramtypes", []),
|
|
655
|
+
ye("design:returntype", void 0)
|
|
656
|
+
], Ke.prototype, "render", null);
|
|
657
|
+
Ke.style = ut;
|
|
658
|
+
var g;
|
|
602
659
|
(function(e) {
|
|
603
660
|
e.BookingOptions = "bookingOptions", e.Communications = "communications", e.BookingForm = "bookingForm", e.PageStyles = "pageStyles", e.CalendarView = "calendarView";
|
|
604
|
-
})(
|
|
605
|
-
function
|
|
661
|
+
})(g || (g = {}));
|
|
662
|
+
function yt({ id: e, formState: t, activeTab: a }, s) {
|
|
606
663
|
return n(
|
|
607
|
-
|
|
664
|
+
de,
|
|
608
665
|
null,
|
|
609
|
-
a ===
|
|
666
|
+
a === g.CalendarView && n(
|
|
610
667
|
"div",
|
|
611
|
-
{ key: `calendar-view-${e}`, class: { hide: a !==
|
|
668
|
+
{ key: `calendar-view-${e}`, class: { hide: a !== g.CalendarView, "calendar-view": !0 } },
|
|
612
669
|
n("nylas-event-calendar", null)
|
|
613
670
|
),
|
|
614
671
|
n(
|
|
615
672
|
"div",
|
|
616
|
-
{ key: `booking-options-${e}`, class: { hide: a !==
|
|
673
|
+
{ key: `booking-options-${e}`, class: { hide: a !== g.BookingOptions } },
|
|
617
674
|
n("nylas-scheduling-method", { name: "availability-method", readOnly: !0, exportparts: "nsm, nsm__header, nsm__input-label, nsm__dropdown, nsm__dropdown-button, nsm__dropdown-content" }),
|
|
618
675
|
n(
|
|
619
676
|
"nylas-custom-booking-flow",
|
|
@@ -640,10 +697,10 @@ function ut({ id: e, formState: t, activeTab: a }, o) {
|
|
|
640
697
|
),
|
|
641
698
|
n(
|
|
642
699
|
"div",
|
|
643
|
-
{ key: `communications-${e}`, class: { hide: a !==
|
|
700
|
+
{ key: `communications-${e}`, class: { hide: a !== g.Communications } },
|
|
644
701
|
n("nylas-disable-emails", { name: "disable-emails", exportparts: "nde, nde__toggle-label, nde_toggle-input, nde_toggle-slider" }),
|
|
645
702
|
!(t != null && t.disableEmails) && n(
|
|
646
|
-
|
|
703
|
+
de,
|
|
647
704
|
null,
|
|
648
705
|
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" }),
|
|
649
706
|
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" })
|
|
@@ -651,121 +708,136 @@ function ut({ id: e, formState: t, activeTab: a }, o) {
|
|
|
651
708
|
),
|
|
652
709
|
n(
|
|
653
710
|
"div",
|
|
654
|
-
{ key: `page-styles-${e}`, class: { hide: a !==
|
|
711
|
+
{ key: `page-styles-${e}`, class: { hide: a !== g.PageStyles } },
|
|
655
712
|
n("nylas-custom-event-slug", { name: "custom-event-slug", exportparts: "nces, nces__body, nces__header, nces__drawer-toggle--container, nces__input-textfield" }),
|
|
656
713
|
n("nylas-page-name", { name: "page-name", requirePageName: !0, exportparts: "npn, npn__body, npn__header, npn__drawer-toggle--container, npn__input-textfield" }),
|
|
657
|
-
n("nylas-page-styling", { name: "page-styling", exportparts: "nps, nps__header, nps__drawer-toggle--container, nps__body, nps__title-input-textfield, nps__company-logo-input-textfield, nps__color-picker, nps__color-picker-button, nps__color-picker-button-label, nps__color-picker-selected-label, nps__submit-button-label-input-textfield, nps__message-textarea" },
|
|
714
|
+
n("nylas-page-styling", { name: "page-styling", exportparts: "nps, nps__header, nps__drawer-toggle--container, nps__body, nps__title-input-textfield, nps__company-logo-input-textfield, nps__color-picker, nps__color-picker-button, nps__color-picker-button-label, nps__color-picker-selected-label, nps__submit-button-label-input-textfield, nps__message-textarea" }, s)
|
|
658
715
|
),
|
|
659
716
|
n(
|
|
660
717
|
"div",
|
|
661
|
-
{ key: `booking-form-${e}`, class: { hide: a !==
|
|
718
|
+
{ key: `booking-form-${e}`, class: { hide: a !== g.BookingForm } },
|
|
662
719
|
n("nylas-booking-form-config", { name: "additional-fields", exportparts: "nbfc, nbfc__header, nbfc__add_field, nbfc__add_field-button, nbfc__add_field-content, nbfc__static_fields, nbfc__additional_fields, nbfc__form-field, nbfc__form-field-header, nbfc__form-field-content" })
|
|
663
720
|
)
|
|
664
721
|
);
|
|
665
722
|
}
|
|
666
|
-
const ht = '.sc-nylas-editor-tabs-group-h{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff}.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 .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}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}', yt = ht;
|
|
667
|
-
var
|
|
668
|
-
var
|
|
723
|
+
const gt = '.sc-nylas-editor-tabs-group-h{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff}.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}', ft = gt;
|
|
724
|
+
var mt = function(e, t, a, s) {
|
|
725
|
+
var l = arguments.length, r = l < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, a) : s, o;
|
|
669
726
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
670
|
-
|
|
727
|
+
r = Reflect.decorate(e, t, a, s);
|
|
671
728
|
else
|
|
672
|
-
for (var
|
|
673
|
-
(
|
|
674
|
-
return
|
|
675
|
-
},
|
|
729
|
+
for (var d = e.length - 1; d >= 0; d--)
|
|
730
|
+
(o = e[d]) && (r = (l < 3 ? o(r) : l > 3 ? o(t, a, r) : o(t, a)) || r);
|
|
731
|
+
return l > 3 && r && Object.defineProperty(t, a, r), r;
|
|
732
|
+
}, ge = function(e, t) {
|
|
676
733
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
677
734
|
return Reflect.metadata(e, t);
|
|
678
735
|
};
|
|
679
|
-
const
|
|
736
|
+
const Ye = class {
|
|
680
737
|
constructor(e) {
|
|
681
|
-
|
|
682
|
-
var
|
|
738
|
+
te(this, e), this.schedulerConfigChanged = _(this, "schedulerConfigChanged", 7), this.schedulerConfigCreated = _(this, "schedulerConfigCreated", 7), this.cancelButtonClick = _(this, "cancelButtonClick", 7), this.formSubmitted = _(this, "formSubmitted", 7), this.previewButtonClicked = _(this, "previewButtonClicked", 7), this.schedulerEditorFormUpdated = _(this, "schedulerEditorFormUpdated", 7), this.groupEventCreateTriggered = _(this, "groupEventCreateTriggered", 7), this.groupEventUpdateTriggered = _(this, "groupEventUpdateTriggered", 7), this.groupEventDeleteTriggered = _(this, "groupEventDeleteTriggered", 7), this.groupEventImportTriggered = _(this, "groupEventImportTriggered", 7), this.saveGroupEventChangesError = _(this, "saveGroupEventChangesError", 7), this.nylasSchedulerError = _(this, "nylasSchedulerError", 6), this.dismissNotification = _(this, "dismissNotification", 6), this.formSubmissionHandler = async (t) => {
|
|
739
|
+
var A, K, O, B, R, Y, ae, q, oe, se, re;
|
|
683
740
|
t.preventDefault();
|
|
684
741
|
const a = await this.formSubmitted.emit();
|
|
685
742
|
if (b("[nylas-editor-tabs-group]", "formSubmissionHandler", a), !this.formRef.checkValidity() || a.defaultPrevented) {
|
|
686
|
-
|
|
743
|
+
await this.host.setError({
|
|
744
|
+
message: this.formRef.validationMessage || i.t("fixFormErrors"),
|
|
745
|
+
type: v.Error,
|
|
746
|
+
category: w.Component,
|
|
747
|
+
title: i.t("nylasEditorTabs.formErrorTitle")
|
|
748
|
+
});
|
|
687
749
|
return;
|
|
688
750
|
}
|
|
689
751
|
this.isLoading = !0, this.hasUnsavedChanges = !1;
|
|
690
|
-
const
|
|
691
|
-
b("[nylas-editor-tabs-group]", "formState",
|
|
692
|
-
const { title:
|
|
693
|
-
...((
|
|
694
|
-
slug:
|
|
695
|
-
name:
|
|
696
|
-
type: this.selectedEventType ===
|
|
752
|
+
const l = this.updateFormState();
|
|
753
|
+
b("[nylas-editor-tabs-group]", "formState", l);
|
|
754
|
+
const { title: r, description: o, bookingCalendar: d, location: c, bookingType: p, minCancellationNotice: h, minBookingNotice: m, cancellationPolicy: k, hideCancellationOptions: S, hideReschedulingOptions: F, additionalFields: I, conferencing: P, reminders: T, emailTemplate: H, redirectUrl: G, slug: j, appearance: L, name: x, eventCapacity: M, eventTimeslot: y, participants: U, disableEmails: C, organizerLocale: $ } = l, D = {
|
|
755
|
+
...((A = this.selectedConfiguration) == null ? void 0 : A.id) && { id: this.selectedConfiguration.id },
|
|
756
|
+
slug: j,
|
|
757
|
+
name: x,
|
|
758
|
+
type: this.selectedEventType === z.group ? z.group : void 0,
|
|
697
759
|
scheduler: {
|
|
698
|
-
cancellation_policy:
|
|
699
|
-
min_cancellation_notice:
|
|
760
|
+
cancellation_policy: k ?? "",
|
|
761
|
+
min_cancellation_notice: h ?? 0,
|
|
700
762
|
min_booking_notice: m ?? 60,
|
|
701
|
-
hide_cancellation_options:
|
|
702
|
-
hide_rescheduling_options:
|
|
703
|
-
additional_fields:
|
|
704
|
-
email_template:
|
|
705
|
-
...
|
|
706
|
-
organizer_locale:
|
|
707
|
-
logo:
|
|
763
|
+
hide_cancellation_options: S ?? !1,
|
|
764
|
+
hide_rescheduling_options: F ?? !1,
|
|
765
|
+
additional_fields: I,
|
|
766
|
+
email_template: H ? {
|
|
767
|
+
...H,
|
|
768
|
+
organizer_locale: $ || "en",
|
|
769
|
+
logo: H.logo || ""
|
|
708
770
|
} : void 0,
|
|
709
|
-
confirmation_redirect_url:
|
|
771
|
+
confirmation_redirect_url: G
|
|
710
772
|
},
|
|
711
|
-
appearance:
|
|
773
|
+
appearance: L,
|
|
712
774
|
group_booking: {
|
|
713
775
|
booking_type: p || "booking",
|
|
714
|
-
disable_emails: typeof
|
|
715
|
-
reminders:
|
|
716
|
-
conferencing:
|
|
717
|
-
calendar_id:
|
|
776
|
+
disable_emails: typeof C == "boolean" ? C : !1,
|
|
777
|
+
reminders: T,
|
|
778
|
+
conferencing: P,
|
|
779
|
+
calendar_id: d || "primary",
|
|
718
780
|
default_capacity: M || 10
|
|
719
781
|
}
|
|
720
|
-
},
|
|
721
|
-
delete
|
|
722
|
-
const
|
|
782
|
+
}, J = _e(this.selectedConfiguration, D || {}), N = this.action === "create" ? J : D;
|
|
783
|
+
delete N.availability, delete N.participants, delete N.event_booking;
|
|
784
|
+
const V = (ie) => {
|
|
723
785
|
this.isLoading = !1, this.changesSaved = !0, setTimeout(() => {
|
|
724
786
|
this.changesSaved = !1;
|
|
725
787
|
}, 3e3);
|
|
726
788
|
};
|
|
727
|
-
if (this.checkForBookingFormErrors(
|
|
789
|
+
if (this.checkForBookingFormErrors(N))
|
|
728
790
|
return;
|
|
729
|
-
const
|
|
730
|
-
name: ((
|
|
731
|
-
email: ((
|
|
732
|
-
},
|
|
733
|
-
title:
|
|
734
|
-
description:
|
|
735
|
-
location:
|
|
736
|
-
conferencing: c ? void 0 :
|
|
791
|
+
const Q = {
|
|
792
|
+
name: ((K = this.currentUser) == null ? void 0 : K.name) ?? ((O = this.currentUser) == null ? void 0 : O.email) ?? "",
|
|
793
|
+
email: ((B = this.currentUser) == null ? void 0 : B.email) ?? ""
|
|
794
|
+
}, W = ((R = this.calendars) == null ? void 0 : R.find((ie) => ie.is_primary)) ?? ((Y = this.calendars) == null ? void 0 : Y[0]), X = [{ ...Q, is_organizer: !0 }], E = (ae = this.selectedConfiguration) != null && ae.id ? void 0 : {
|
|
795
|
+
title: r,
|
|
796
|
+
description: o,
|
|
797
|
+
location: P ? void 0 : c,
|
|
798
|
+
conferencing: c ? void 0 : P,
|
|
737
799
|
when: {
|
|
738
|
-
start_time: ((
|
|
739
|
-
end_time: ((
|
|
740
|
-
start_timezone: ((
|
|
741
|
-
end_timezone: ((
|
|
800
|
+
start_time: ((q = y == null ? void 0 : y.when) == null ? void 0 : q.start_time) ?? 0,
|
|
801
|
+
end_time: ((oe = y == null ? void 0 : y.when) == null ? void 0 : oe.end_time) ?? 0,
|
|
802
|
+
start_timezone: ((se = y == null ? void 0 : y.when) == null ? void 0 : se.start_timezone) ?? "",
|
|
803
|
+
end_timezone: ((re = y == null ? void 0 : y.when) == null ? void 0 : re.end_timezone) ?? ""
|
|
742
804
|
},
|
|
743
|
-
recurrence: (
|
|
744
|
-
calendar_id:
|
|
745
|
-
participants: U != null && U.length ? U :
|
|
746
|
-
organizer:
|
|
805
|
+
recurrence: (y == null ? void 0 : y.recurrence) ?? [],
|
|
806
|
+
calendar_id: d || (W == null ? void 0 : W.id) || "primary",
|
|
807
|
+
participants: U != null && U.length ? U : X,
|
|
808
|
+
organizer: Q,
|
|
747
809
|
capacity: M || 10
|
|
748
810
|
};
|
|
749
|
-
this.schedulerConfigChanged.emit({ groupEvent:
|
|
811
|
+
this.schedulerConfigChanged.emit({ groupEvent: E || void 0, config: N, resetLoadingState: V, action: this.action, host: this.host });
|
|
750
812
|
}, this.checkForBookingFormErrors = (t) => {
|
|
751
|
-
var
|
|
752
|
-
let a = !1,
|
|
753
|
-
const
|
|
754
|
-
return
|
|
755
|
-
const
|
|
756
|
-
if (
|
|
757
|
-
|
|
813
|
+
var r;
|
|
814
|
+
let a = !1, s = "";
|
|
815
|
+
const l = (r = t.scheduler) == null ? void 0 : r.additional_fields;
|
|
816
|
+
return l && (s = "", Object.entries(l).forEach((o) => {
|
|
817
|
+
const d = o[1];
|
|
818
|
+
if (d.label === "") {
|
|
819
|
+
s += i.t("nylasEditorTabs.bookingFormError_label", { type: d.type }), a = !0;
|
|
758
820
|
return;
|
|
759
821
|
}
|
|
760
|
-
if (
|
|
761
|
-
for (const c of
|
|
822
|
+
if (d.options) {
|
|
823
|
+
for (const c of d.options)
|
|
762
824
|
if (c.trim() === "") {
|
|
763
|
-
|
|
825
|
+
s += i.t("nylasEditorTabs.bookingFormError_option", { label: d.label, type: d.type }), a = !0;
|
|
764
826
|
break;
|
|
765
827
|
}
|
|
766
828
|
}
|
|
767
|
-
})), a && (this.isLoading = !1, this.host.setError(
|
|
768
|
-
|
|
829
|
+
})), a && (this.isLoading = !1, this.host.setError({
|
|
830
|
+
message: s,
|
|
831
|
+
type: v.Error,
|
|
832
|
+
category: w.Component,
|
|
833
|
+
title: i.t("nylasEditorTabs.bookingFormError")
|
|
834
|
+
})), a;
|
|
835
|
+
}, this.calendars = void 0, this.selectedConfiguration = void 0, this.configurations = void 0, this.currentUser = void 0, this.schedulerPreviewLink = "", this.mode = "app", this.hideEditorTabs = [], this.enableUserFeedback = !0, this.selectedLanguage = void 0, this.selectedEventType = void 0, this.selectedGroupEvent = void 0, this.action = "create", this.showFeedbackModal = !1, this.activeTab = g.CalendarView, this.isLoading = !1, this.componentLoaded = !1, this.hasUnsavedChanges = !1, this.changesSaved = !1, this.formState = {}, this.error = {
|
|
836
|
+
message: "",
|
|
837
|
+
type: v.Error,
|
|
838
|
+
category: w.Component,
|
|
839
|
+
title: ""
|
|
840
|
+
};
|
|
769
841
|
}
|
|
770
842
|
configChangedHandler(e) {
|
|
771
843
|
b("[nylas-editor-tabs-group]", "configChangedHandler", e, this.selectedConfiguration), this.formState = {
|
|
@@ -773,27 +845,27 @@ const qe = class {
|
|
|
773
845
|
}, e != null && e.id ? this.action = "edit" : this.action = "create";
|
|
774
846
|
}
|
|
775
847
|
selectedGroupEventChangedHandler(e) {
|
|
776
|
-
var t, a,
|
|
848
|
+
var t, a, s, l, r, o, d, c, p, h, m, k, S, F, I, P, T, H, G, j, L, x, M, y, U, C, $, D, J, N, V;
|
|
777
849
|
b("[nylas-editor-tabs-group]", "selectedGroupEventChangedHandler", e, this.selectedConfiguration), this.formState = {
|
|
778
850
|
...this.formState,
|
|
779
851
|
title: (a = (t = this.selectedGroupEvent) == null ? void 0 : t.event) == null ? void 0 : a.title,
|
|
780
|
-
description: (
|
|
781
|
-
location: (
|
|
782
|
-
conferencing: (c = (
|
|
783
|
-
eventCapacity: (
|
|
784
|
-
participants: (
|
|
785
|
-
name:
|
|
786
|
-
email:
|
|
787
|
-
is_organizer: !!
|
|
852
|
+
description: (l = (s = this.selectedGroupEvent) == null ? void 0 : s.event) == null ? void 0 : l.description,
|
|
853
|
+
location: (o = (r = this.selectedGroupEvent) == null ? void 0 : r.event) == null ? void 0 : o.location,
|
|
854
|
+
conferencing: (c = (d = this.selectedGroupEvent) == null ? void 0 : d.event) == null ? void 0 : c.conferencing,
|
|
855
|
+
eventCapacity: (h = (p = this.selectedGroupEvent) == null ? void 0 : p.group_event_info) == null ? void 0 : h.capacity,
|
|
856
|
+
participants: (S = (k = (m = this.selectedGroupEvent) == null ? void 0 : m.group_event_info) == null ? void 0 : k.participants) == null ? void 0 : S.map((Z) => ({
|
|
857
|
+
name: Z.name,
|
|
858
|
+
email: Z.email,
|
|
859
|
+
is_organizer: !!Z.is_organizer
|
|
788
860
|
})),
|
|
789
|
-
eventTimeslot: (
|
|
861
|
+
eventTimeslot: (I = (F = this.selectedGroupEvent) == null ? void 0 : F.event) != null && I.when ? {
|
|
790
862
|
when: {
|
|
791
|
-
start_time: (
|
|
792
|
-
end_time: (
|
|
793
|
-
start_timezone: (
|
|
794
|
-
end_timezone: (
|
|
863
|
+
start_time: (H = (T = (P = this.selectedGroupEvent) == null ? void 0 : P.event) == null ? void 0 : T.when) == null ? void 0 : H.start_time,
|
|
864
|
+
end_time: (L = (j = (G = this.selectedGroupEvent) == null ? void 0 : G.event) == null ? void 0 : j.when) == null ? void 0 : L.end_time,
|
|
865
|
+
start_timezone: (y = (M = (x = this.selectedGroupEvent) == null ? void 0 : x.event) == null ? void 0 : M.when) == null ? void 0 : y.start_timezone,
|
|
866
|
+
end_timezone: ($ = (C = (U = this.selectedGroupEvent) == null ? void 0 : U.event) == null ? void 0 : C.when) == null ? void 0 : $.end_timezone
|
|
795
867
|
},
|
|
796
|
-
recurrence: (
|
|
868
|
+
recurrence: (J = (D = this.selectedGroupEvent) == null ? void 0 : D.group_event_info) != null && J.rrule ? (V = (N = this.selectedGroupEvent) == null ? void 0 : N.group_event_info) == null ? void 0 : V.rrule : []
|
|
797
869
|
} : void 0
|
|
798
870
|
};
|
|
799
871
|
}
|
|
@@ -803,16 +875,31 @@ const qe = class {
|
|
|
803
875
|
});
|
|
804
876
|
}
|
|
805
877
|
selectedLanguageChangedHandler(e, t) {
|
|
806
|
-
e !== t &&
|
|
878
|
+
e !== t && (i.changeLanguage(e), this.error && this.error.message && (this.error = {
|
|
879
|
+
...this.error,
|
|
880
|
+
message: i.t("fixFormErrors")
|
|
881
|
+
}, this.showErrorNotification(this.error)));
|
|
807
882
|
}
|
|
808
883
|
async schedulerConfigCreatedEventHandler(e) {
|
|
809
884
|
return this.schedulerConfigCreated.emit(e);
|
|
810
885
|
}
|
|
811
886
|
async setError(e) {
|
|
812
|
-
|
|
887
|
+
var t;
|
|
888
|
+
this.error = {
|
|
889
|
+
message: e.message,
|
|
890
|
+
type: e.type,
|
|
891
|
+
category: e.category,
|
|
892
|
+
title: e.title || i.t("genericErrorTitle")
|
|
893
|
+
}, (t = this.error) != null && t.message && this.showErrorNotification(this.error);
|
|
813
894
|
}
|
|
814
895
|
async resetError() {
|
|
815
|
-
|
|
896
|
+
var e, t;
|
|
897
|
+
(e = this.error) != null && e.message && this.dismissNotification.emit({ id: (t = this.error) == null ? void 0 : t.message.split(" ").join("-"), host: this.host }), this.error = {
|
|
898
|
+
message: "",
|
|
899
|
+
type: v.Error,
|
|
900
|
+
category: w.Component,
|
|
901
|
+
title: ""
|
|
902
|
+
};
|
|
816
903
|
}
|
|
817
904
|
connectedCallback() {
|
|
818
905
|
b("[nylas-editor-tabs-group]", "connectedCallback");
|
|
@@ -821,13 +908,13 @@ const qe = class {
|
|
|
821
908
|
b("[nylas-editor-tabs-group]", "componentWillLoad"), this.formState = this.getFormStateFromConfig(this.selectedConfiguration);
|
|
822
909
|
}
|
|
823
910
|
componentDidLoad() {
|
|
824
|
-
var t, a,
|
|
825
|
-
b("[nylas-editor-tabs-group]", "componentDidLoad"), this.enableUserFeedback && !
|
|
911
|
+
var t, a, s;
|
|
912
|
+
b("[nylas-editor-tabs-group]", "componentDidLoad"), this.enableUserFeedback && !Je() && Ve({
|
|
826
913
|
dsn: "https://9d5731f1c77ca84c9ed3fb9b3ccf7ee1@o74852.ingest.us.sentry.io/4507889638178816",
|
|
827
|
-
release: "2.0.
|
|
828
|
-
integrations: (
|
|
829
|
-
...
|
|
830
|
-
|
|
914
|
+
release: "2.0.1",
|
|
915
|
+
integrations: (l) => [
|
|
916
|
+
...l.filter((r) => !1),
|
|
917
|
+
qe({
|
|
831
918
|
colorScheme: "system",
|
|
832
919
|
autoInject: !1
|
|
833
920
|
})
|
|
@@ -836,7 +923,7 @@ const qe = class {
|
|
|
836
923
|
beforeSend: () => null
|
|
837
924
|
}), (t = this.selectedConfiguration) != null && t.id && this.configChangedHandler(this.selectedConfiguration);
|
|
838
925
|
const e = (a = this.host.querySelector("button.tab:not(.hide)")) == null ? void 0 : a.name;
|
|
839
|
-
e && ((
|
|
926
|
+
e && ((s = this.hideEditorTabs) != null && s.includes(this.activeTab)) && (this.activeTab = e), this.updateFormState(), this.componentLoaded = !0;
|
|
840
927
|
}
|
|
841
928
|
disconnectedCallback() {
|
|
842
929
|
b("[nylas-editor-tabs-group]", "disconnectedCallback");
|
|
@@ -844,7 +931,7 @@ const qe = class {
|
|
|
844
931
|
handleValueChanged(e) {
|
|
845
932
|
b("[nylas-editor-tabs-group]", "handleValueChanged", e);
|
|
846
933
|
const { name: t, value: a } = e.detail;
|
|
847
|
-
console.log("name", t, "value", a), this.setFormState(a, t), this.formState = { ...this.formState },
|
|
934
|
+
console.log("name", t, "value", a), this.setFormState(a, t), this.formState = { ...this.formState }, ot.includes(t) && (this.hasUnsavedChanges = !0), this.host.resetError(), this.schedulerEditorFormUpdated.emit({
|
|
848
935
|
value: e.detail.value,
|
|
849
936
|
name: e.detail.name
|
|
850
937
|
});
|
|
@@ -853,21 +940,21 @@ const qe = class {
|
|
|
853
940
|
this.showFeedbackModal = !1;
|
|
854
941
|
}
|
|
855
942
|
feedbackSubmittedHandler(e) {
|
|
856
|
-
var
|
|
943
|
+
var s, l;
|
|
857
944
|
const a = {
|
|
858
|
-
eventId:
|
|
945
|
+
eventId: Ze("Scheduler Editor User Feedback"),
|
|
859
946
|
message: e.detail.feedback
|
|
860
947
|
};
|
|
861
|
-
|
|
948
|
+
We(a, {
|
|
862
949
|
includeReplay: !0,
|
|
863
950
|
captureContext: {
|
|
864
951
|
tags: {
|
|
865
952
|
"nylas-web-element": "nylas-scheduler-editor",
|
|
866
|
-
"nylas-web-element-version": "2.0.
|
|
953
|
+
"nylas-web-element-version": "2.0.1"
|
|
867
954
|
},
|
|
868
955
|
extra: {
|
|
869
|
-
configId: (
|
|
870
|
-
slug: (
|
|
956
|
+
configId: (s = this.selectedConfiguration) == null ? void 0 : s.id,
|
|
957
|
+
slug: (l = this.selectedConfiguration) == null ? void 0 : l.slug
|
|
871
958
|
}
|
|
872
959
|
}
|
|
873
960
|
}), this.showFeedbackModal = !1;
|
|
@@ -877,13 +964,33 @@ const qe = class {
|
|
|
877
964
|
this.groupEventImportTriggered.emit({ groupEvent: e.detail, configId: ((t = this.selectedConfiguration) == null ? void 0 : t.id) ?? "", host: this.host });
|
|
878
965
|
}
|
|
879
966
|
saveGroupEventChangesHandler(e) {
|
|
880
|
-
var
|
|
967
|
+
var s, l, r, o, d, c, p, h, m;
|
|
881
968
|
b("saveGroupEventChangesHandler", e.detail, this.selectedGroupEvent);
|
|
882
969
|
const t = this.formRef.checkValidity(), a = this.getGroupEventDetailsFromFormState();
|
|
883
|
-
if (this.resetError(), a.title || this.setError(
|
|
970
|
+
if (this.resetError(), a.title || this.setError({
|
|
971
|
+
message: i.t("nylasEditorTabsGroup.eventTitleRequired"),
|
|
972
|
+
type: v.Error,
|
|
973
|
+
category: w.Component,
|
|
974
|
+
title: i.t("nylasEditorTabs.formErrorTitle")
|
|
975
|
+
}), (!((s = a.when) != null && s.start_time) || !((l = a.when) != null && l.end_time)) && this.setError({
|
|
976
|
+
message: i.t("nylasEditorTabsGroup.eventTimeRequired"),
|
|
977
|
+
type: v.Error,
|
|
978
|
+
category: w.Component,
|
|
979
|
+
title: i.t("nylasEditorTabs.formErrorTitle")
|
|
980
|
+
}), (r = a.participants) != null && r.length || this.setError({
|
|
981
|
+
message: i.t("nylasEditorTabsGroup.participantsRequired"),
|
|
982
|
+
type: v.Error,
|
|
983
|
+
category: w.Component,
|
|
984
|
+
title: i.t("nylasEditorTabs.formErrorTitle")
|
|
985
|
+
}), (o = a.participants) != null && o.length && ((d = a.participants) != null && d.some((k) => !k.email)) && this.setError({
|
|
986
|
+
message: i.t("nylasEditorTabsGroup.participantEmailRequired"),
|
|
987
|
+
type: v.Error,
|
|
988
|
+
category: w.Component,
|
|
989
|
+
title: i.t("nylasEditorTabs.formErrorTitle")
|
|
990
|
+
}), ((c = this.error) == null ? void 0 : c.message) !== "" || !t) {
|
|
884
991
|
this.saveGroupEventChangesError.emit({
|
|
885
|
-
error: this.error
|
|
886
|
-
configId: ((
|
|
992
|
+
error: ((p = this.error) == null ? void 0 : p.message) ?? i.t("nylasEditorTabsGroup.errorOccured"),
|
|
993
|
+
configId: ((h = this.selectedConfiguration) == null ? void 0 : h.id) ?? "",
|
|
887
994
|
host: this.host
|
|
888
995
|
});
|
|
889
996
|
return;
|
|
@@ -891,7 +998,7 @@ const qe = class {
|
|
|
891
998
|
this.groupEventUpdateTriggered.emit({
|
|
892
999
|
groupEvent: a,
|
|
893
1000
|
chosenOption: e.detail.action,
|
|
894
|
-
configId: ((
|
|
1001
|
+
configId: ((m = this.selectedConfiguration) == null ? void 0 : m.id) ?? "",
|
|
895
1002
|
host: this.host
|
|
896
1003
|
});
|
|
897
1004
|
}
|
|
@@ -907,67 +1014,80 @@ const qe = class {
|
|
|
907
1014
|
});
|
|
908
1015
|
}
|
|
909
1016
|
createGroupEventHandler(e) {
|
|
910
|
-
var
|
|
1017
|
+
var o, d, c, p, h, m, k;
|
|
911
1018
|
const t = e.detail, a = {
|
|
912
|
-
name: ((
|
|
1019
|
+
name: ((o = this.currentUser) == null ? void 0 : o.name) ?? ((d = this.currentUser) == null ? void 0 : d.email) ?? "",
|
|
913
1020
|
email: ((c = this.currentUser) == null ? void 0 : c.email) ?? ""
|
|
914
|
-
},
|
|
1021
|
+
}, s = ((p = this.calendars) == null ? void 0 : p.find((S) => S.is_primary)) ?? ((h = this.calendars) == null ? void 0 : h[0]), l = ((m = this.formState) == null ? void 0 : m.conferencing) || t.conferencing, r = {
|
|
915
1022
|
title: t.title,
|
|
916
1023
|
description: t.description,
|
|
917
|
-
location:
|
|
1024
|
+
location: l ? void 0 : t.location,
|
|
918
1025
|
participants: t.participants,
|
|
919
1026
|
organizer: a,
|
|
920
|
-
conferencing: t.location ? {} :
|
|
1027
|
+
conferencing: t.location ? {} : l,
|
|
921
1028
|
when: t.eventTimeslot.when,
|
|
922
1029
|
recurrence: t.eventTimeslot.recurrence,
|
|
923
|
-
calendar_id: (
|
|
1030
|
+
calendar_id: (s == null ? void 0 : s.id) || "primary",
|
|
924
1031
|
capacity: t.eventCapacity
|
|
925
1032
|
};
|
|
926
|
-
this.groupEventCreateTriggered.emit({ groupEvent:
|
|
1033
|
+
this.groupEventCreateTriggered.emit({ groupEvent: r, configId: ((k = this.selectedConfiguration) == null ? void 0 : k.id) ?? "", host: this.host });
|
|
1034
|
+
}
|
|
1035
|
+
showErrorNotification(e) {
|
|
1036
|
+
this.nylasSchedulerError.emit({
|
|
1037
|
+
notification: {
|
|
1038
|
+
title: e.title,
|
|
1039
|
+
category: e.category || w.Component,
|
|
1040
|
+
type: e.type || v.Error,
|
|
1041
|
+
description: e.message,
|
|
1042
|
+
id: e.message.split(" ").join("-"),
|
|
1043
|
+
ttl: "none"
|
|
1044
|
+
},
|
|
1045
|
+
host: this.host
|
|
1046
|
+
});
|
|
927
1047
|
}
|
|
928
1048
|
getGroupEventDetailsFromFormState() {
|
|
929
|
-
var m,
|
|
930
|
-
const e = ((m = this.calendars) == null ? void 0 : m.find((
|
|
931
|
-
name: ((
|
|
932
|
-
email: ((
|
|
933
|
-
}, a = [{ ...t, is_organizer: !0 }], { title:
|
|
1049
|
+
var m, k, S, F, I, P, T, H, G;
|
|
1050
|
+
const e = ((m = this.calendars) == null ? void 0 : m.find((j) => j.is_primary)) ?? ((k = this.calendars) == null ? void 0 : k[0]), t = {
|
|
1051
|
+
name: ((S = this.currentUser) == null ? void 0 : S.name) ?? ((F = this.currentUser) == null ? void 0 : F.email) ?? "",
|
|
1052
|
+
email: ((I = this.currentUser) == null ? void 0 : I.email) ?? ""
|
|
1053
|
+
}, a = [{ ...t, is_organizer: !0 }], { title: s, description: l, bookingCalendar: r, location: o, conferencing: d, eventCapacity: c, eventTimeslot: p, participants: h } = this.formState;
|
|
934
1054
|
return {
|
|
935
|
-
title:
|
|
936
|
-
description:
|
|
937
|
-
location:
|
|
938
|
-
conferencing:
|
|
1055
|
+
title: s,
|
|
1056
|
+
description: l,
|
|
1057
|
+
location: d ? void 0 : o,
|
|
1058
|
+
conferencing: o ? void 0 : d,
|
|
939
1059
|
when: {
|
|
940
|
-
start_time: ((
|
|
941
|
-
end_time: ((
|
|
942
|
-
start_timezone: ((
|
|
943
|
-
end_timezone: ((
|
|
1060
|
+
start_time: ((P = p == null ? void 0 : p.when) == null ? void 0 : P.start_time) ?? 0,
|
|
1061
|
+
end_time: ((T = p == null ? void 0 : p.when) == null ? void 0 : T.end_time) ?? 0,
|
|
1062
|
+
start_timezone: ((H = p == null ? void 0 : p.when) == null ? void 0 : H.start_timezone) ?? "",
|
|
1063
|
+
end_timezone: ((G = p == null ? void 0 : p.when) == null ? void 0 : G.end_timezone) ?? ""
|
|
944
1064
|
},
|
|
945
1065
|
recurrence: (p == null ? void 0 : p.recurrence) ?? [],
|
|
946
|
-
calendar_id:
|
|
947
|
-
participants:
|
|
1066
|
+
calendar_id: r || (e == null ? void 0 : e.id) || "primary",
|
|
1067
|
+
participants: h != null && h.length ? h : a,
|
|
948
1068
|
organizer: t,
|
|
949
1069
|
capacity: c || 10
|
|
950
1070
|
};
|
|
951
1071
|
}
|
|
952
1072
|
getFormStateFromConfig(e) {
|
|
953
|
-
var t, a,
|
|
1073
|
+
var t, a, s, l, r, o, d, c, p, h, m, k, S, F;
|
|
954
1074
|
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."), {
|
|
955
1075
|
additionalFields: ((t = e == null ? void 0 : e.scheduler) == null ? void 0 : t.additional_fields) ?? {},
|
|
956
1076
|
bookingType: ((a = e == null ? void 0 : e.group_booking) == null ? void 0 : a.booking_type) ?? "booking",
|
|
957
|
-
cancellationPolicy: ((
|
|
958
|
-
minCancellationNotice: ((
|
|
959
|
-
minBookingNotice: ((
|
|
960
|
-
hideCancellationOptions: ((
|
|
961
|
-
hideReschedulingOptions: ((
|
|
1077
|
+
cancellationPolicy: ((s = e == null ? void 0 : e.scheduler) == null ? void 0 : s.cancellation_policy) ?? "",
|
|
1078
|
+
minCancellationNotice: ((l = e == null ? void 0 : e.scheduler) == null ? void 0 : l.min_cancellation_notice) ?? 0,
|
|
1079
|
+
minBookingNotice: ((r = e == null ? void 0 : e.scheduler) == null ? void 0 : r.min_booking_notice) ?? 60,
|
|
1080
|
+
hideCancellationOptions: ((o = e == null ? void 0 : e.scheduler) == null ? void 0 : o.hide_cancellation_options) ?? !1,
|
|
1081
|
+
hideReschedulingOptions: ((d = e == null ? void 0 : e.scheduler) == null ? void 0 : d.hide_rescheduling_options) ?? !1,
|
|
962
1082
|
reminders: (c = e == null ? void 0 : e.group_booking) == null ? void 0 : c.reminders,
|
|
963
1083
|
emailTemplate: (p = e == null ? void 0 : e.scheduler) == null ? void 0 : p.email_template,
|
|
964
|
-
redirectUrl: (
|
|
1084
|
+
redirectUrl: (h = e == null ? void 0 : e.scheduler) == null ? void 0 : h.confirmation_redirect_url,
|
|
965
1085
|
slug: e == null ? void 0 : e.slug,
|
|
966
1086
|
appearance: e == null ? void 0 : e.appearance,
|
|
967
1087
|
name: e == null ? void 0 : e.name,
|
|
968
1088
|
bookingCalendar: (m = e == null ? void 0 : e.group_booking) == null ? void 0 : m.calendar_id,
|
|
969
|
-
disableEmails: (
|
|
970
|
-
organizerLocale: (
|
|
1089
|
+
disableEmails: (k = e == null ? void 0 : e.group_booking) == null ? void 0 : k.disable_emails,
|
|
1090
|
+
organizerLocale: (F = (S = e == null ? void 0 : e.scheduler) == null ? void 0 : S.email_template) == null ? void 0 : F.organizer_locale
|
|
971
1091
|
};
|
|
972
1092
|
}
|
|
973
1093
|
setFormState(e, t) {
|
|
@@ -1030,10 +1150,10 @@ const qe = class {
|
|
|
1030
1150
|
break;
|
|
1031
1151
|
case "participants": {
|
|
1032
1152
|
const a = JSON.parse(e.toString());
|
|
1033
|
-
this.formState.participants = a.map((
|
|
1034
|
-
name:
|
|
1035
|
-
email:
|
|
1036
|
-
is_organizer:
|
|
1153
|
+
this.formState.participants = a.map((s) => ({
|
|
1154
|
+
name: s.name,
|
|
1155
|
+
email: s.email,
|
|
1156
|
+
is_organizer: s.is_organizer
|
|
1037
1157
|
}));
|
|
1038
1158
|
break;
|
|
1039
1159
|
}
|
|
@@ -1041,8 +1161,8 @@ const qe = class {
|
|
|
1041
1161
|
this.formState.eventTimeslot = JSON.parse(e.toString());
|
|
1042
1162
|
break;
|
|
1043
1163
|
case "disable-emails": {
|
|
1044
|
-
const { disableEmails: a, organizerLocale:
|
|
1045
|
-
this.formState.disableEmails = a, this.formState.organizerLocale =
|
|
1164
|
+
const { disableEmails: a, organizerLocale: s } = JSON.parse(e.toString());
|
|
1165
|
+
this.formState.disableEmails = a, this.formState.organizerLocale = s;
|
|
1046
1166
|
break;
|
|
1047
1167
|
}
|
|
1048
1168
|
}
|
|
@@ -1067,22 +1187,22 @@ const qe = class {
|
|
|
1067
1187
|
e.preventDefault(), this.showFeedbackModal = !0;
|
|
1068
1188
|
}
|
|
1069
1189
|
render() {
|
|
1070
|
-
var e, t;
|
|
1071
|
-
return b("[nylas-editor-tabs-group]", "render", this.formState), n(
|
|
1072
|
-
this.setActiveTab(
|
|
1073
|
-
} }, n("chevron-icon", { width: "16", height: "16" }), n("span", null,
|
|
1190
|
+
var e, t, a, s, l, r;
|
|
1191
|
+
return b("[nylas-editor-tabs-group]", "render", this.formState), n(ce, { key: "f1f9489924f24e9e70b03f29ca492f952447857e" }, n("nylas-notification", { key: "55313223571d2279f7371dee53422b682484a8f0" }), n("form", { key: "127ab3460883730d9519df3995e12a29375cf3c5", 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) => {
|
|
1192
|
+
this.setActiveTab(o, g.CalendarView);
|
|
1193
|
+
} }, n("chevron-icon", { width: "16", height: "16" }), n("span", null, i.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" }), i.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" }), i.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" }), i.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" }), i.t("pageStylesTab"))), n("div", { class: "tab-content", part: "editor__tab-content net__tab-content" }, n(yt, { formState: this.formState, activeTab: this.activeTab, currentUser: this.currentUser, calendars: this.calendars, id: ((e = this.selectedConfiguration) == null ? void 0 : e.id) ?? "new", i18next: i }))) : n("div", { class: "composable", key: (t = this.selectedConfiguration) == null ? void 0 : t.id }, n("slot", null)), n("div", { key: "58a9ed32c7fde8663e25a05461e7dbbe8bc3d879", class: "footer", part: "editor__footer net__footer" }, n("div", { key: "dddf1ddc9b444fc7f8f8f965d1a84a87678a9fa8", 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) }, i.t("pageSettingsButton"))), n("div", { key: "be3ea7e9a341b7495d32c076505462b5845b1c66", class: "buttons", part: "editor__footer-buttons net__footer-buttons" }, n("p", { key: "42bf3aaae3eb30d443d4b45b1be81100eb95ac23", class: {
|
|
1074
1194
|
"unsaved-changes": this.hasUnsavedChanges && !this.changesSaved,
|
|
1075
1195
|
"saved-changes": this.changesSaved,
|
|
1076
|
-
error: this.error !== "",
|
|
1077
|
-
"error-full-width": this.error !== "" && this.action === "create"
|
|
1078
|
-
} }, this.error
|
|
1079
|
-
|
|
1080
|
-
}, variant: "basic" }, n("eye-icon", null)), n("button-component", { key: "
|
|
1081
|
-
|
|
1082
|
-
}, variant: "basic", part: "editor__footer-cancel net__footer-cancel" },
|
|
1196
|
+
error: ((a = this.error) == null ? void 0 : a.message) !== "",
|
|
1197
|
+
"error-full-width": ((s = this.error) == null ? void 0 : s.message) !== "" && this.action === "create"
|
|
1198
|
+
} }, ((l = this.error) == null ? void 0 : l.message) == "" && this.hasUnsavedChanges && !this.changesSaved && this.activeTab !== g.CalendarView ? i.t("unsavedChangesLabel") : ((r = this.error) == null ? void 0 : r.message) == "" && this.changesSaved ? `${i.t("changesSavedLabel")}!` : ""), n("div", { key: "6380b051bd4bc445092fd71be43e949c12629cd7", class: "footer-buttons__row" }, this.schedulerPreviewLink !== "" && this.action === "edit" && n("button-component", { title: "Preview", type: "button", disabled: this.isLoading, clickHandler: (o) => {
|
|
1199
|
+
o.preventDefault(), this.previewButtonClicked.emit(this.host).defaultPrevented || window.open(le(this.schedulerPreviewLink, this.selectedConfiguration), "_blank");
|
|
1200
|
+
}, variant: "basic" }, n("eye-icon", null)), n("button-component", { key: "b78b23bc721251da33f803a46e23b66cea112095", type: "button", disabled: this.isLoading, clickHandler: (o) => {
|
|
1201
|
+
o.preventDefault(), this.cancelButtonClick.emit(), this.host.resetError();
|
|
1202
|
+
}, variant: "basic", part: "editor__footer-cancel net__footer-cancel" }, i.t("backButton")), n("button-component", { key: "aaefcecf3c7247c085813831066bf79298b17263", 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, i.t("savingButtonText"), n("loading-icon", null), " ") : this.action === "create" ? `${i.t("createButtonText")}` : `${i.t("saveChangesButtonText")}` : n("span", null, n("loading-icon", null), " ")))))), this.showFeedbackModal && n("nylas-feedback-form", null));
|
|
1083
1203
|
}
|
|
1084
1204
|
get host() {
|
|
1085
|
-
return
|
|
1205
|
+
return pe(this);
|
|
1086
1206
|
}
|
|
1087
1207
|
static get watchers() {
|
|
1088
1208
|
return {
|
|
@@ -1093,8 +1213,8 @@ const qe = class {
|
|
|
1093
1213
|
};
|
|
1094
1214
|
}
|
|
1095
1215
|
};
|
|
1096
|
-
|
|
1097
|
-
|
|
1216
|
+
mt([
|
|
1217
|
+
be({
|
|
1098
1218
|
name: "nylas-editor-tabs-group",
|
|
1099
1219
|
stateToProps: /* @__PURE__ */ new Map([
|
|
1100
1220
|
["schedulerConfig.calendars", "calendars"],
|
|
@@ -1107,20 +1227,25 @@ ft([
|
|
|
1107
1227
|
]),
|
|
1108
1228
|
eventToProps: {
|
|
1109
1229
|
schedulerConfigChanged: async (e, t) => {
|
|
1110
|
-
const { resetLoadingState: a, host:
|
|
1111
|
-
const [
|
|
1112
|
-
!
|
|
1230
|
+
const { resetLoadingState: a, host: s, action: l, config: r, groupEvent: o } = e.detail, d = (c, p) => {
|
|
1231
|
+
const [h, m] = c;
|
|
1232
|
+
!h && m ? s.setError({
|
|
1233
|
+
message: m.message || i.t("genericErrorTitle"),
|
|
1234
|
+
type: v.Error,
|
|
1235
|
+
category: w.Component,
|
|
1236
|
+
title: p
|
|
1237
|
+
}) : h && !m && l === "create" && s.schedulerConfigCreatedEventHandler({ config: h, action: l, host: s });
|
|
1113
1238
|
};
|
|
1114
|
-
if (
|
|
1115
|
-
const c = await t.schedulerConfig.updateConfiguration(
|
|
1116
|
-
i(
|
|
1239
|
+
if (l === "edit") {
|
|
1240
|
+
const c = await t.schedulerConfig.updateConfiguration(r);
|
|
1241
|
+
d(c, i.t("nylasEditorTabs.updateConfigurationError")), a && a(e);
|
|
1117
1242
|
} else {
|
|
1118
|
-
const c = await t.schedulerConfig.createConfiguration(
|
|
1119
|
-
i(
|
|
1120
|
-
const [p,
|
|
1121
|
-
if (m &&
|
|
1122
|
-
const
|
|
1123
|
-
i(
|
|
1243
|
+
const c = await t.schedulerConfig.createConfiguration(r);
|
|
1244
|
+
d(c, i.t("nylasEditorTabs.createConfigurationError"));
|
|
1245
|
+
const [p, h] = c, m = p == null ? void 0 : p.id;
|
|
1246
|
+
if (m && o) {
|
|
1247
|
+
const k = await t.schedulerConfig.createGroupEvent(o, m);
|
|
1248
|
+
d(k, i.t("nylasEditorTabsGroup.createGroupEventError"));
|
|
1124
1249
|
}
|
|
1125
1250
|
a && a(e);
|
|
1126
1251
|
}
|
|
@@ -1141,30 +1266,55 @@ ft([
|
|
|
1141
1266
|
b("[nylas-editor-tabs-group]", "schedulerConfigCreated", e);
|
|
1142
1267
|
},
|
|
1143
1268
|
groupEventUpdateTriggered: async (e, t) => {
|
|
1144
|
-
const { groupEvent: a, host:
|
|
1145
|
-
!
|
|
1269
|
+
const { groupEvent: a, host: s, chosenOption: l, configId: r } = e.detail, o = await t.schedulerConfig.updateGroupEvent(a, l, r), [d, c] = o;
|
|
1270
|
+
!d && c && s.setError({
|
|
1271
|
+
message: c.message || i.t("genericErrorTitle"),
|
|
1272
|
+
type: v.Error,
|
|
1273
|
+
category: w.Component,
|
|
1274
|
+
title: i.t("nylasEditorTabsGroup.updateGroupEventError")
|
|
1275
|
+
});
|
|
1146
1276
|
},
|
|
1147
1277
|
groupEventDeleteTriggered: async (e, t) => {
|
|
1148
|
-
const { groupEvent: a, chosenOption:
|
|
1149
|
-
!
|
|
1278
|
+
const { groupEvent: a, chosenOption: s, configId: l, host: r } = e.detail, o = await t.schedulerConfig.deleteGroupEvent(a, s, l), [d, c] = o;
|
|
1279
|
+
!d && c && r.setError({
|
|
1280
|
+
message: c.message || i.t("genericErrorTitle"),
|
|
1281
|
+
type: v.Error,
|
|
1282
|
+
category: w.Component,
|
|
1283
|
+
title: i.t("nylasEditorTabsGroup.deleteGroupEventError")
|
|
1284
|
+
});
|
|
1150
1285
|
},
|
|
1151
1286
|
groupEventCreateTriggered: async (e, t) => {
|
|
1152
|
-
const { groupEvent: a, configId:
|
|
1153
|
-
!
|
|
1287
|
+
const { groupEvent: a, configId: s, host: l } = e.detail, r = await t.schedulerConfig.createGroupEvent(a, s), [o, d] = r;
|
|
1288
|
+
!o && d && l.setError({
|
|
1289
|
+
message: d.message || i.t("genericErrorTitle"),
|
|
1290
|
+
type: v.Error,
|
|
1291
|
+
category: w.Component,
|
|
1292
|
+
title: i.t("nylasEditorTabsGroup.createGroupEventError")
|
|
1293
|
+
});
|
|
1154
1294
|
},
|
|
1155
1295
|
groupEventImportTriggered: async (e, t) => {
|
|
1156
|
-
const { groupEvent: a, configId:
|
|
1157
|
-
if (!
|
|
1158
|
-
|
|
1296
|
+
const { groupEvent: a, configId: s, host: l } = e.detail, r = await t.schedulerConfig.importGroupEvent([a], s), [o, d] = r;
|
|
1297
|
+
if (!o && d && l.setError({
|
|
1298
|
+
message: d.message || i.t("genericErrorTitle"),
|
|
1299
|
+
type: v.Error,
|
|
1300
|
+
category: w.Component,
|
|
1301
|
+
title: i.t("nylasEditorTabsGroup.importGroupEventError")
|
|
1302
|
+
}), o && o.import_failed && o.import_failed.length > 0) {
|
|
1303
|
+
const c = o.import_failed.map((p) => p.reason).join(`
|
|
1159
1304
|
`);
|
|
1160
|
-
|
|
1161
|
-
|
|
1305
|
+
l.setError({
|
|
1306
|
+
message: c,
|
|
1307
|
+
type: v.Error,
|
|
1308
|
+
category: w.Component,
|
|
1309
|
+
title: i.t("nylasEditorTabsGroup.importGroupEventError")
|
|
1310
|
+
}), setTimeout(() => {
|
|
1311
|
+
l.resetError();
|
|
1162
1312
|
}, 5e3);
|
|
1163
1313
|
}
|
|
1164
1314
|
},
|
|
1165
1315
|
saveGroupEventChangesError: async (e, t) => {
|
|
1166
|
-
const { error: a, host:
|
|
1167
|
-
b("[nylas-editor-tabs-group]", "saveGroupEventChangesError", a,
|
|
1316
|
+
const { error: a, host: s } = e.detail;
|
|
1317
|
+
b("[nylas-editor-tabs-group]", "saveGroupEventChangesError", a, s);
|
|
1168
1318
|
}
|
|
1169
1319
|
},
|
|
1170
1320
|
localPropsToProp: /* @__PURE__ */ new Map([
|
|
@@ -1174,27 +1324,32 @@ ft([
|
|
|
1174
1324
|
]),
|
|
1175
1325
|
fireRegisterEvent: !0
|
|
1176
1326
|
}),
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
],
|
|
1181
|
-
|
|
1182
|
-
const
|
|
1183
|
-
var
|
|
1184
|
-
var
|
|
1327
|
+
ge("design:type", Function),
|
|
1328
|
+
ge("design:paramtypes", []),
|
|
1329
|
+
ge("design:returntype", void 0)
|
|
1330
|
+
], Ye.prototype, "render", null);
|
|
1331
|
+
Ye.style = ft;
|
|
1332
|
+
const _t = ':host{display:grid;grid-auto-flow:row;width:100%;font-family:inherit;font-optical-sizing:auto;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff}.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:white;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}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)}', vt = _t;
|
|
1333
|
+
var wt = function(e, t, a, s) {
|
|
1334
|
+
var l = arguments.length, r = l < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, a) : s, o;
|
|
1185
1335
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
1186
|
-
|
|
1336
|
+
r = Reflect.decorate(e, t, a, s);
|
|
1187
1337
|
else
|
|
1188
|
-
for (var
|
|
1189
|
-
(
|
|
1190
|
-
return
|
|
1191
|
-
},
|
|
1338
|
+
for (var d = e.length - 1; d >= 0; d--)
|
|
1339
|
+
(o = e[d]) && (r = (l < 3 ? o(r) : l > 3 ? o(t, a, r) : o(t, a)) || r);
|
|
1340
|
+
return l > 3 && r && Object.defineProperty(t, a, r), r;
|
|
1341
|
+
}, fe = function(e, t) {
|
|
1192
1342
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
1193
1343
|
return Reflect.metadata(e, t);
|
|
1194
1344
|
};
|
|
1195
|
-
const
|
|
1345
|
+
const Qe = class {
|
|
1196
1346
|
constructor(e) {
|
|
1197
|
-
|
|
1347
|
+
te(this, e), this.initListConfigurations = _(this, "initListConfigurations", 7), this.createButtonClick = _(this, "createButtonClick", 7), this.editButtonClick = _(this, "editButtonClick", 7), this.deleteButtonClick = _(this, "deleteButtonClick", 7), this.nylasSchedulerError = _(this, "nylasSchedulerError", 6), this.dismissNotification = _(this, "dismissNotification", 6), this.configurations = [], this.selectedLanguage = void 0, this.schedulerPreviewLink = "", this.listConfigurationsNextCursor = void 0, this.state = "loading", this.error = {
|
|
1348
|
+
message: "",
|
|
1349
|
+
type: v.Error,
|
|
1350
|
+
category: w.Component,
|
|
1351
|
+
title: ""
|
|
1352
|
+
}, this.currentCursor = null, this.previousCursors = [], this.disableNextPageButton = !1, this.deleteConfigurationId = "", this.showDeleteButtonLoading = !1, this.editButtonLoadingId = "";
|
|
1198
1353
|
}
|
|
1199
1354
|
listConfigurationsNextCursorChangedHandler(e, t) {
|
|
1200
1355
|
if (!e || e === t) {
|
|
@@ -1204,7 +1359,7 @@ const Ke = class {
|
|
|
1204
1359
|
this.disableNextPageButton = !1, this.currentCursor = e;
|
|
1205
1360
|
}
|
|
1206
1361
|
selectedLanguageChangedHandler(e, t) {
|
|
1207
|
-
e !== t &&
|
|
1362
|
+
e !== t && i.changeLanguage(e);
|
|
1208
1363
|
}
|
|
1209
1364
|
connectedCallback() {
|
|
1210
1365
|
b("[nylas-list-configurations]", "connectedCallback");
|
|
@@ -1221,18 +1376,18 @@ const Ke = class {
|
|
|
1221
1376
|
b("[nylas-list-configurations]", "disconnectedCallback");
|
|
1222
1377
|
}
|
|
1223
1378
|
async handleNylasFormDropdownChanged(e) {
|
|
1224
|
-
var
|
|
1379
|
+
var l;
|
|
1225
1380
|
b("[nylas-list-configurations]", "handleNylasFormDropdownChanged", e.detail);
|
|
1226
|
-
const { value: t } = e.detail, [a,
|
|
1381
|
+
const { value: t } = e.detail, [a, s] = t.split("-");
|
|
1227
1382
|
switch (e.preventDefault(), a) {
|
|
1228
1383
|
case "delete":
|
|
1229
|
-
this.deleteConfigurationId = (
|
|
1384
|
+
this.deleteConfigurationId = (l = this.configurations[s]) == null ? void 0 : l.id;
|
|
1230
1385
|
break;
|
|
1231
1386
|
case "preview":
|
|
1232
|
-
window.open(
|
|
1387
|
+
window.open(le(this.schedulerPreviewLink, this.configurations[s]), "_blank");
|
|
1233
1388
|
break;
|
|
1234
1389
|
case "copy":
|
|
1235
|
-
await navigator.clipboard.writeText(
|
|
1390
|
+
await navigator.clipboard.writeText(le(this.schedulerPreviewLink, this.configurations[s]));
|
|
1236
1391
|
break;
|
|
1237
1392
|
}
|
|
1238
1393
|
}
|
|
@@ -1248,11 +1403,33 @@ const Ke = class {
|
|
|
1248
1403
|
this.state = e;
|
|
1249
1404
|
}
|
|
1250
1405
|
async setError(e) {
|
|
1251
|
-
|
|
1406
|
+
var t;
|
|
1407
|
+
this.error = {
|
|
1408
|
+
message: e.message,
|
|
1409
|
+
type: e.type,
|
|
1410
|
+
category: e.category,
|
|
1411
|
+
title: e.title || i.t("genericErrorTitle")
|
|
1412
|
+
}, (t = this.error) != null && t.message && this.showErrorNotification(this.error);
|
|
1252
1413
|
}
|
|
1253
1414
|
async hideDeleteConfirmation() {
|
|
1254
1415
|
this.deleteConfigurationId = "", this.showDeleteButtonLoading = !1;
|
|
1255
1416
|
}
|
|
1417
|
+
async hideEditButtonLoading() {
|
|
1418
|
+
this.editButtonLoadingId = "";
|
|
1419
|
+
}
|
|
1420
|
+
showErrorNotification(e) {
|
|
1421
|
+
this.nylasSchedulerError.emit({
|
|
1422
|
+
notification: {
|
|
1423
|
+
id: e.message.split(" ").join("-"),
|
|
1424
|
+
type: e.type || v.Error,
|
|
1425
|
+
title: e.title,
|
|
1426
|
+
category: e.category || w.Component,
|
|
1427
|
+
description: e.message,
|
|
1428
|
+
ttl: "none"
|
|
1429
|
+
},
|
|
1430
|
+
host: this.host
|
|
1431
|
+
});
|
|
1432
|
+
}
|
|
1256
1433
|
closeModal(e) {
|
|
1257
1434
|
e.preventDefault(), this.deleteConfigurationId = "";
|
|
1258
1435
|
}
|
|
@@ -1277,11 +1454,11 @@ const Ke = class {
|
|
|
1277
1454
|
};
|
|
1278
1455
|
switch (e) {
|
|
1279
1456
|
case "preview":
|
|
1280
|
-
return n("span", { style: t }, n("eye-icon", { width: "16", height: "16" }),
|
|
1457
|
+
return n("span", { style: t }, n("eye-icon", { width: "16", height: "16" }), i.t("nylasListConfigurations.previewButtonText"));
|
|
1281
1458
|
case "copy":
|
|
1282
|
-
return n("span", { style: t }, n("copy-icon", { width: "16", height: "16" }),
|
|
1459
|
+
return n("span", { style: t }, n("copy-icon", { width: "16", height: "16" }), i.t("nylasListConfigurations.copyLinkButtonText"));
|
|
1283
1460
|
case "delete":
|
|
1284
|
-
return n("span", { style: { ...t, ...a } }, n("delete-icon", { width: "15", height: "17" }),
|
|
1461
|
+
return n("span", { style: { ...t, ...a } }, n("delete-icon", { width: "15", height: "17" }), i.t("nylasListConfigurations.deleteButtonText"));
|
|
1285
1462
|
default:
|
|
1286
1463
|
return "";
|
|
1287
1464
|
}
|
|
@@ -1304,32 +1481,32 @@ const Ke = class {
|
|
|
1304
1481
|
}
|
|
1305
1482
|
render() {
|
|
1306
1483
|
var e;
|
|
1307
|
-
return n(
|
|
1484
|
+
return n(ce, null, n("nylas-notification", null), n("div", { class: "header" }, n("div", { class: "description" }, n("h2", null, i.t("allSchedulingPages")), n("p", null, i.t("createAndManageSchedulingPages"))), this.configurations && this.configurations.length > 0 && n("div", { class: "actions" }, n("button-component", { part: "nlc__create-new-cta", clickHandler: () => {
|
|
1308
1485
|
this.createButtonClick.emit(this.host);
|
|
1309
|
-
} },
|
|
1486
|
+
} }, i.t("createNewSchedulingPageButtonText")))), n("div", { class: "configurations" }, n("div", { class: "table-container" }, n("table", { class: {
|
|
1310
1487
|
"no-configurations": this.state !== "loading" && (!this.configurations || this.configurations.length === 0)
|
|
1311
1488
|
} }, n("tr", { class: {
|
|
1312
1489
|
hide: this.state === "loading" || this.configurations && this.configurations.length === 0
|
|
1313
|
-
} }, n("th", null,
|
|
1490
|
+
} }, n("th", null, i.t("pageTitle")), n("th", null, i.t("durationTitle")), n("th", null)), this.state === "loading" && n("tr", { class: "no-configurations" }, n("td", { colSpan: 3 }, n("div", null, n("h3", null, i.t("loading"), "..."), n("p", null, i.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, i.t("noSchedulingPages")), n("p", null, i.t("createFirstSchedulingPage")), n("button-component", { part: "nlc__create-new-cta", clickHandler: () => {
|
|
1314
1491
|
this.createButtonClick.emit(this.host);
|
|
1315
|
-
} },
|
|
1316
|
-
var
|
|
1317
|
-
const
|
|
1318
|
-
return n("tr", { key: t == null ? void 0 : t.id }, n("td", null, n("div", { class: "title" }, n("div", { class: "config-event-title", title: (
|
|
1319
|
-
|
|
1320
|
-
} }, n("edit-icon", { width: "16", height: "16" }),
|
|
1321
|
-
last:
|
|
1492
|
+
} }, i.t("createNewSchedulingPageButtonText"))))), this.state !== "loading" && ((e = this.configurations) == null ? void 0 : e.map((t, a) => {
|
|
1493
|
+
var o, d, c, p;
|
|
1494
|
+
const s = (a === this.configurations.length - 1 || a === this.configurations.length - 2) && this.configurations.length > 3, l = t, r = t;
|
|
1495
|
+
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 = r == null ? void 0 : r.event_booking) == null ? void 0 : o.title }, ((d = r == null ? void 0 : r.event_booking) == null ? void 0 : d.title) || (l == null ? void 0 : l.name)), n("div", { class: "config-event-description" }, (c = r == null ? void 0 : r.event_booking) == null ? void 0 : c.description))), n("td", null, n("div", { class: "duration" }, this.getDurationString((p = r == null ? void 0 : r.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) => {
|
|
1496
|
+
h.preventDefault(), this.editButtonLoadingId = `edit-${a}`, this.editButtonClick.emit({ host: this.host, configuration: t });
|
|
1497
|
+
} }, this.editButtonLoadingId === `edit-${a}` ? null : n("edit-icon", { width: "16", height: "16" }), i.t("editSchedulingPageButtonText")), n("select-dropdown", { class: {
|
|
1498
|
+
last: s
|
|
1322
1499
|
}, name: "actions", options: [
|
|
1323
1500
|
{ value: `preview-${a}`, label: "Preview", labelHTML: this.getActionLabelHTML("preview") },
|
|
1324
1501
|
{ value: `copy-${a}`, label: "Copy link", labelHTML: this.getActionLabelHTML("copy") },
|
|
1325
1502
|
{ value: `delete-${a}`, label: "Delete", labelHTML: this.getActionLabelHTML("delete") }
|
|
1326
1503
|
], defaultSelectedOption: { value: "", label: "" }, dropdownButtonText: "...", withSearch: !1, withChevron: !1, exportparts: "sd_dropdown: actions__dropdown, sd_dropdown-button: actions__dropdown-button, sd_dropdown-content: actions__dropdown-content, actions-Copy, actions-Preview, actions-Delete" }))));
|
|
1327
|
-
})))), 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)))),
|
|
1504
|
+
})))), 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" }, i.t("deleteSchedulingPageTitle"))), n("div", { class: "description title-desc" }, n("p", null, i.t("deleteSchedulingPageDescription"))), n("div", { class: {
|
|
1328
1505
|
footer: !0
|
|
1329
|
-
} }, n("button-component", { variant: "basic", onClick: (t) => this.closeModal(t), part: "nfbf__button-outline nfbf__cancel-cta" }, `${
|
|
1506
|
+
} }, n("button-component", { variant: "basic", onClick: (t) => this.closeModal(t), part: "nfbf__button-outline nfbf__cancel-cta" }, `${i.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" }, `${i.t("deleteSchedulingPageConfirmButton")}`)))));
|
|
1330
1507
|
}
|
|
1331
1508
|
get host() {
|
|
1332
|
-
return
|
|
1509
|
+
return pe(this);
|
|
1333
1510
|
}
|
|
1334
1511
|
static get watchers() {
|
|
1335
1512
|
return {
|
|
@@ -1338,8 +1515,8 @@ const Ke = class {
|
|
|
1338
1515
|
};
|
|
1339
1516
|
}
|
|
1340
1517
|
};
|
|
1341
|
-
|
|
1342
|
-
|
|
1518
|
+
wt([
|
|
1519
|
+
be({
|
|
1343
1520
|
name: "nylas-list-configurations",
|
|
1344
1521
|
stateToProps: /* @__PURE__ */ new Map([
|
|
1345
1522
|
["schedulerConfig.configurations", "configurations"],
|
|
@@ -1349,62 +1526,79 @@ _t([
|
|
|
1349
1526
|
localPropsToProp: /* @__PURE__ */ new Map([["schedulerPreviewLink", "schedulerPreviewLink"]]),
|
|
1350
1527
|
eventToProps: {
|
|
1351
1528
|
initListConfigurations: async (e, t) => {
|
|
1352
|
-
const { host: a, cursor:
|
|
1529
|
+
const { host: a, cursor: s } = e.detail;
|
|
1353
1530
|
await a.setState("loading");
|
|
1354
|
-
const [
|
|
1355
|
-
if (!
|
|
1356
|
-
await a.setState("error"), await a.setError(
|
|
1531
|
+
const [l, r] = await t.schedulerConfig.getConfigurations(s);
|
|
1532
|
+
if (!l && r && r.message) {
|
|
1533
|
+
await a.setState("error"), await a.setError({
|
|
1534
|
+
message: r.message,
|
|
1535
|
+
type: v.Error,
|
|
1536
|
+
category: w.Component,
|
|
1537
|
+
title: i.t("nylasEditorTabs.getConfigsError")
|
|
1538
|
+
});
|
|
1357
1539
|
return;
|
|
1358
1540
|
}
|
|
1359
1541
|
await a.setState("loaded");
|
|
1360
1542
|
},
|
|
1361
1543
|
createButtonClick: async (e, t) => {
|
|
1362
1544
|
t.schedulerConfigStore.resetSelectedConfiguration();
|
|
1363
|
-
const a = Object.entries(t.schedulerConfigStore.state.enableEventTypes || {}).filter(([
|
|
1364
|
-
a.length === 1 ? (t.schedulerConfigStore.state.action = "create", t.schedulerConfigStore.state.selectedEventType =
|
|
1545
|
+
const a = Object.entries(t.schedulerConfigStore.state.enableEventTypes || {}).filter(([s, l]) => l);
|
|
1546
|
+
a.length === 1 ? (t.schedulerConfigStore.state.action = "create", t.schedulerConfigStore.state.selectedEventType = z[a[0][0]]) : t.schedulerConfigStore.state.action = "create-select";
|
|
1365
1547
|
},
|
|
1366
1548
|
deleteButtonClick: async (e, t) => {
|
|
1367
|
-
const { host: a, configuration:
|
|
1368
|
-
!
|
|
1549
|
+
const { host: a, configuration: s } = e.detail, [l, r] = await t.schedulerConfig.deleteConfiguration(s.id);
|
|
1550
|
+
!l && r && r.message && (await a.setState("error"), await a.setError({
|
|
1551
|
+
message: r.message,
|
|
1552
|
+
type: v.Error,
|
|
1553
|
+
category: w.Component,
|
|
1554
|
+
title: i.t("nylasEditorTabs.deleteConfigError")
|
|
1555
|
+
})), await a.hideDeleteConfirmation();
|
|
1369
1556
|
},
|
|
1370
1557
|
editButtonClick: async (e, t) => {
|
|
1371
|
-
const {
|
|
1372
|
-
if (
|
|
1373
|
-
const { startTime:
|
|
1558
|
+
const { host: a, configuration: s } = e.detail;
|
|
1559
|
+
if (s.type === "group") {
|
|
1560
|
+
const { startTime: l, endTime: r } = nt((/* @__PURE__ */ new Date()).toISOString(), "week");
|
|
1374
1561
|
t.schedulerConfigStore.state.calendarViewDateRange = {
|
|
1375
|
-
start_time:
|
|
1562
|
+
start_time: l.toString(),
|
|
1376
1563
|
end_time: r.toString()
|
|
1377
1564
|
};
|
|
1378
|
-
const [
|
|
1379
|
-
if (!
|
|
1565
|
+
const [o, d] = await t.schedulerConfig.getGroupEvents(s.id, s);
|
|
1566
|
+
if (!o && d && d.message) {
|
|
1567
|
+
await a.setError({
|
|
1568
|
+
message: d.message,
|
|
1569
|
+
type: v.Error,
|
|
1570
|
+
category: w.Component,
|
|
1571
|
+
title: i.t("nylasEditorTabsGroup.getGroupEventsError")
|
|
1572
|
+
}), a.hideEditButtonLoading();
|
|
1380
1573
|
return;
|
|
1574
|
+
}
|
|
1381
1575
|
}
|
|
1382
|
-
t.schedulerConfigStore.state.action = "edit";
|
|
1576
|
+
t.schedulerConfigStore.state.action = "edit", t.schedulerConfigStore.state.selectedConfiguration = s, a.hideEditButtonLoading();
|
|
1383
1577
|
}
|
|
1384
1578
|
},
|
|
1385
1579
|
fireRegisterEvent: !0
|
|
1386
1580
|
}),
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
],
|
|
1391
|
-
|
|
1392
|
-
const
|
|
1393
|
-
var
|
|
1394
|
-
var
|
|
1581
|
+
fe("design:type", Function),
|
|
1582
|
+
fe("design:paramtypes", []),
|
|
1583
|
+
fe("design:returntype", void 0)
|
|
1584
|
+
], Qe.prototype, "render", null);
|
|
1585
|
+
Qe.style = vt;
|
|
1586
|
+
const kt = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff;width:inherit}.nylas-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)}', Ct = kt;
|
|
1587
|
+
var xt = function(e, t, a, s) {
|
|
1588
|
+
var l = arguments.length, r = l < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, a) : s, o;
|
|
1395
1589
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
1396
|
-
|
|
1590
|
+
r = Reflect.decorate(e, t, a, s);
|
|
1397
1591
|
else
|
|
1398
|
-
for (var
|
|
1399
|
-
(
|
|
1400
|
-
return
|
|
1401
|
-
},
|
|
1592
|
+
for (var d = e.length - 1; d >= 0; d--)
|
|
1593
|
+
(o = e[d]) && (r = (l < 3 ? o(r) : l > 3 ? o(t, a, r) : o(t, a)) || r);
|
|
1594
|
+
return l > 3 && r && Object.defineProperty(t, a, r), r;
|
|
1595
|
+
}, me = function(e, t) {
|
|
1402
1596
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
1403
1597
|
return Reflect.metadata(e, t);
|
|
1404
1598
|
};
|
|
1405
|
-
const
|
|
1599
|
+
const Xe = class {
|
|
1406
1600
|
constructor(e) {
|
|
1407
|
-
|
|
1601
|
+
te(this, e), this.returnToAllSchedulingPagesEvent = _(this, "returnToAllSchedulingPagesEvent", 7), this.createEventTypeSelected = _(this, "createEventTypeSelected", 7), this.participantOptions = void 0, this.name = "select-event-type", this.selectedLanguage = void 0, this.enableEventTypes = {
|
|
1408
1602
|
one_on_one: !0,
|
|
1409
1603
|
collective: !0,
|
|
1410
1604
|
max_fairness: !0,
|
|
@@ -1428,10 +1622,10 @@ const Ye = class {
|
|
|
1428
1622
|
b("nylas-select-event-type", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
|
|
1429
1623
|
}
|
|
1430
1624
|
selectedLanguageChangedHandler(e, t) {
|
|
1431
|
-
e !== t &&
|
|
1625
|
+
e !== t && i.changeLanguage(e);
|
|
1432
1626
|
}
|
|
1433
1627
|
render() {
|
|
1434
|
-
var
|
|
1628
|
+
var r;
|
|
1435
1629
|
const e = {
|
|
1436
1630
|
"one-on-one": "one_on_one",
|
|
1437
1631
|
collective: "collective",
|
|
@@ -1440,42 +1634,42 @@ const Ye = class {
|
|
|
1440
1634
|
group: "group"
|
|
1441
1635
|
}, t = [
|
|
1442
1636
|
{
|
|
1443
|
-
label:
|
|
1444
|
-
value:
|
|
1445
|
-
description:
|
|
1637
|
+
label: i.t("nylasSelectEventType.eventTypeOptions.oneOnOne.label"),
|
|
1638
|
+
value: z.one_on_one,
|
|
1639
|
+
description: i.t("nylasSelectEventType.eventTypeOptions.oneOnOne.desc")
|
|
1446
1640
|
},
|
|
1447
1641
|
{
|
|
1448
|
-
label:
|
|
1449
|
-
value:
|
|
1450
|
-
description:
|
|
1642
|
+
label: i.t("nylasSelectEventType.eventTypeOptions.collective.label"),
|
|
1643
|
+
value: z.collective,
|
|
1644
|
+
description: i.t("nylasSelectEventType.eventTypeOptions.collective.desc")
|
|
1451
1645
|
},
|
|
1452
1646
|
{
|
|
1453
|
-
label:
|
|
1454
|
-
value:
|
|
1455
|
-
description:
|
|
1647
|
+
label: i.t("nylasSelectEventType.eventTypeOptions.maxFairness.label"),
|
|
1648
|
+
value: z.max_fairness,
|
|
1649
|
+
description: i.t("nylasSelectEventType.eventTypeOptions.maxFairness.desc")
|
|
1456
1650
|
},
|
|
1457
1651
|
{
|
|
1458
|
-
label:
|
|
1459
|
-
value:
|
|
1460
|
-
description:
|
|
1652
|
+
label: i.t("nylasSelectEventType.eventTypeOptions.maxAvailability.label"),
|
|
1653
|
+
value: z.max_availability,
|
|
1654
|
+
description: i.t("nylasSelectEventType.eventTypeOptions.maxAvailability.desc")
|
|
1461
1655
|
},
|
|
1462
1656
|
{
|
|
1463
|
-
label:
|
|
1464
|
-
value:
|
|
1465
|
-
description:
|
|
1657
|
+
label: i.t("nylasSelectEventType.eventTypeOptions.group.label"),
|
|
1658
|
+
value: z.group,
|
|
1659
|
+
description: i.t("nylasSelectEventType.eventTypeOptions.group.desc")
|
|
1466
1660
|
}
|
|
1467
|
-
], a = [
|
|
1468
|
-
const
|
|
1469
|
-
return console.log("key",
|
|
1661
|
+
], a = [z.collective, z.max_availability, z.max_fairness], s = this.participantOptions && ((r = this.participantOptions) == null ? void 0 : r.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) => {
|
|
1662
|
+
const d = o.value, c = e[d];
|
|
1663
|
+
return console.log("key", d, this.enableEventTypes ? this.enableEventTypes[c] : "no enableEventTypes"), a.includes(d) && !s ? !1 : this.enableEventTypes && this.enableEventTypes[c];
|
|
1470
1664
|
}) : t;
|
|
1471
|
-
return n(
|
|
1665
|
+
return n(ce, null, n("div", { class: "nylas-select-event-type", part: "nset" }, n("div", { class: "header", part: "nset__header" }, n("h2", null, i.t("nylasSelectEventType.createEventHeaderTitle")), n("button-component", { variant: "invisible", part: "nset__header__back-button", onClick: (o) => {
|
|
1472
1666
|
this.returnToAllSchedulingPagesEvent.emit();
|
|
1473
|
-
} }, n("chevron-icon", { width: "16", height: "16" }), n("span", null,
|
|
1474
|
-
this.createEventTypeSelected.emit({ eventType:
|
|
1475
|
-
}, part: `nset__content__event-type-option-${
|
|
1667
|
+
} }, n("chevron-icon", { width: "16", height: "16" }), n("span", null, i.t("nylasSelectEventType.returnToAllSchedulingPages")))), n("div", { class: "content", part: "nset__content" }, n("h3", null, i.t("nylasSelectEventType.eventTypeHeaderTitle")), n("div", { class: "event-type", part: "nset__content__event-type" }, l.length === 0 && n("p", null, i.t("nylasSelectEventType.noEventTypesEnabled")), l.map((o) => n("div", { class: "event-type-option", onClick: (d) => {
|
|
1668
|
+
this.createEventTypeSelected.emit({ eventType: o.value });
|
|
1669
|
+
}, part: `nset__content__event-type-option-${o.value}` }, n("h4", null, o.label), n("p", null, o.description)))))));
|
|
1476
1670
|
}
|
|
1477
1671
|
get host() {
|
|
1478
|
-
return
|
|
1672
|
+
return pe(this);
|
|
1479
1673
|
}
|
|
1480
1674
|
static get watchers() {
|
|
1481
1675
|
return {
|
|
@@ -1484,8 +1678,8 @@ const Ye = class {
|
|
|
1484
1678
|
};
|
|
1485
1679
|
}
|
|
1486
1680
|
};
|
|
1487
|
-
|
|
1488
|
-
|
|
1681
|
+
xt([
|
|
1682
|
+
be({
|
|
1489
1683
|
name: "nylas-select-event-type",
|
|
1490
1684
|
stateToProps: /* @__PURE__ */ new Map([
|
|
1491
1685
|
["schedulerConfig.selectedLanguage", "selectedLanguage"],
|
|
@@ -1503,16 +1697,16 @@ kt([
|
|
|
1503
1697
|
},
|
|
1504
1698
|
fireRegisterEvent: !0
|
|
1505
1699
|
}),
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
],
|
|
1510
|
-
|
|
1700
|
+
me("design:type", Function),
|
|
1701
|
+
me("design:paramtypes", []),
|
|
1702
|
+
me("design:returntype", void 0)
|
|
1703
|
+
], Xe.prototype, "render", null);
|
|
1704
|
+
Xe.style = Ct;
|
|
1511
1705
|
export {
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1706
|
+
it as google_logo_icon,
|
|
1707
|
+
ct as microsoft_logo_icon,
|
|
1708
|
+
Ke as nylas_editor_tabs,
|
|
1709
|
+
Ye as nylas_editor_tabs_group,
|
|
1710
|
+
Qe as nylas_list_configurations,
|
|
1711
|
+
Xe as nylas_select_event_type
|
|
1518
1712
|
};
|