@nylas/react 1.1.2 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{add-circle-icon_2.entry-f1383568.cjs → add-circle-icon_2.entry-b77120e5.cjs} +1 -1
- package/dist/{add-circle-icon_2.entry-611be49d.js → add-circle-icon_2.entry-fbc1e82b.js} +1 -1
- package/dist/{archive-icon_7.entry-5e6ba9e7.js → archive-icon_7.entry-30962e70.js} +13 -13
- package/dist/{archive-icon_7.entry-59cc6868.cjs → archive-icon_7.entry-dd8c7642.cjs} +1 -1
- package/dist/{arrow-icon.entry-a924df13.cjs → arrow-icon.entry-2dfd8319.cjs} +1 -1
- package/dist/{arrow-icon.entry-9c19a803.js → arrow-icon.entry-5b436054.js} +1 -1
- package/dist/{bold-icon_3.entry-2935a3df.js → bold-icon_3.entry-5120a9c8.js} +3 -3
- package/dist/{bold-icon_3.entry-ffe02f93.cjs → bold-icon_3.entry-da2d1270.cjs} +1 -1
- package/dist/{button-component_2.entry-b9d3f6a2.cjs → button-component_2.entry-27a504d9.cjs} +1 -1
- package/dist/{button-component_2.entry-93aa59a2.js → button-component_2.entry-697bf5ac.js} +7 -7
- package/dist/{calendar-agenda-fill-icon_48.entry-476bc4ef.js → calendar-agenda-fill-icon_51.entry-52b5bf31.js} +990 -910
- package/dist/calendar-agenda-fill-icon_51.entry-a25262b3.cjs +7 -0
- package/dist/{calendar-cancel-icon.entry-11bb8656.cjs → calendar-cancel-icon.entry-c6e2eed6.cjs} +1 -1
- package/dist/{calendar-cancel-icon.entry-ee0acc54.js → calendar-cancel-icon.entry-e6a433a2.js} +1 -1
- package/dist/{calendar-check-icon_2.entry-14548656.cjs → calendar-check-icon_2.entry-45cad6f1.cjs} +1 -1
- package/dist/{calendar-check-icon_2.entry-54a82e1e.js → calendar-check-icon_2.entry-d88307d6.js} +1 -1
- package/dist/{calendar-icon.entry-29f7003b.js → calendar-icon.entry-2badc962.js} +1 -1
- package/dist/{calendar-icon.entry-1a17f887.cjs → calendar-icon.entry-b2fffd21.cjs} +1 -1
- package/dist/{checkbox-component_2.entry-84a17232.cjs → checkbox-component_2.entry-3926b644.cjs} +1 -1
- package/dist/{checkbox-component_2.entry-dfec10cb.js → checkbox-component_2.entry-5ab55050.js} +3 -3
- package/dist/{chevron-icon_3.entry-5da08d02.cjs → chevron-icon_3.entry-1fe5d097.cjs} +1 -1
- package/dist/{chevron-icon_3.entry-826e81d4.js → chevron-icon_3.entry-664fae5d.js} +5 -5
- package/dist/{clock-icon_4.entry-dafdd895.cjs → clock-icon_4.entry-efec2c08.cjs} +1 -1
- package/dist/{clock-icon_4.entry-36d97f00.js → clock-icon_4.entry-f11f9dad.js} +13 -13
- package/dist/{constants-50c3e067-fed7fb48.js → constants-50c3e067-33cf0ffe.js} +1 -1
- package/dist/{constants-50c3e067-1fe54cf3.cjs → constants-50c3e067-5ec3f879.cjs} +1 -1
- package/dist/{copy-icon.entry-eec265da.cjs → copy-icon.entry-3965f206.cjs} +1 -1
- package/dist/{copy-icon.entry-6d1a649d.js → copy-icon.entry-70131e8e.js} +1 -1
- package/dist/{delete-icon_2.entry-160ba41e.cjs → delete-icon.entry-5d067fef.cjs} +1 -1
- package/dist/{delete-icon_2.entry-528a3879.js → delete-icon.entry-e003695d.js} +4 -14
- package/dist/{document-refresh-icon.entry-276704dc.cjs → document-refresh-icon.entry-30c974df.cjs} +1 -1
- package/dist/{document-refresh-icon.entry-6565f3b5.js → document-refresh-icon.entry-b4e01cd4.js} +1 -1
- package/dist/elements/index.d.ts +2 -0
- package/dist/{elements-dc5b338e-2d3857dc.js → elements-dc5b338e-55823d00.js} +1 -1
- package/dist/{elements-dc5b338e-b06b2857.cjs → elements-dc5b338e-6883a39e.cjs} +1 -1
- package/dist/feedbackSync-81d4c4d8-dd4d2e32.js +11735 -0
- package/dist/feedbackSync-81d4c4d8-f4e78902.cjs +455 -0
- package/dist/{focus-visible-e8093c16-47e61336.cjs → focus-visible-e8093c16-431bbe59.cjs} +1 -1
- package/dist/{focus-visible-e8093c16-6f68eb89.js → focus-visible-e8093c16-f403fee8.js} +1 -1
- package/dist/{forward-icon_6.entry-ed6ab66a.js → forward-icon_6.entry-3bb91d58.js} +7 -7
- package/dist/{forward-icon_6.entry-fed8994d.cjs → forward-icon_6.entry-ceec2371.cjs} +3 -3
- package/dist/{globe-icon.entry-154ccdb5.js → globe-icon.entry-6fc456c7.js} +5 -5
- package/dist/{globe-icon.entry-95fc0408.cjs → globe-icon.entry-8c3c9e48.cjs} +1 -1
- package/dist/google-logo-icon_4.entry-4eb16cd2.cjs +1 -0
- package/dist/{google-logo-icon_4.entry-68cfa3fe.js → google-logo-icon_4.entry-d6e0c4c0.js} +331 -289
- package/dist/index-11f33e47.cjs +82 -0
- package/dist/{index-1322d804.js → index-a282e817.js} +2890 -2792
- package/dist/{index.es-79f5b771-08cc349d.cjs → index.es-ab9affcc-18263b66.cjs} +1 -1
- package/dist/{index.es-79f5b771-04cd3414.js → index.es-ab9affcc-30461b18.js} +1 -1
- package/dist/{info-icon_2.entry-49261a0a.js → info-icon_2.entry-d20b975c.js} +5 -5
- package/dist/{info-icon_2.entry-2af880b8.cjs → info-icon_2.entry-e582ac10.cjs} +1 -1
- package/dist/{input-color-picker.entry-aefe0e26.js → input-color-picker.entry-27f4288f.js} +3 -3
- package/dist/{input-color-picker.entry-57adff77.cjs → input-color-picker.entry-c6a28671.cjs} +1 -1
- package/dist/{input-component.entry-09c3c9b6.cjs → input-component.entry-744fcec1.cjs} +1 -1
- package/dist/{input-component.entry-d7c2724b.js → input-component.entry-b6f1c417.js} +2 -2
- package/dist/{input-dropdown.entry-e573ade0.js → input-dropdown.entry-18744def.js} +2 -2
- package/dist/{input-dropdown.entry-e7d26273.cjs → input-dropdown.entry-f13234d7.cjs} +1 -1
- package/dist/{mailbox-store-9c52a3fa-6b39645f.cjs → mailbox-store-affca6de-9451094e.cjs} +1 -1
- package/dist/{mailbox-store-9c52a3fa-27f8f7e6.js → mailbox-store-affca6de-d601dc6b.js} +2 -2
- package/dist/{multi-select-dropdown.entry-15cacb87.js → multi-select-dropdown.entry-924809e1.js} +5 -5
- package/dist/{multi-select-dropdown.entry-46b2b1c9.cjs → multi-select-dropdown.entry-dde671d7.cjs} +1 -1
- package/dist/{nylas-booked-event-card_12.entry-3921071a.js → nylas-booked-event-card_12.entry-52c3111d.js} +62 -60
- package/dist/nylas-booked-event-card_12.entry-d89c1f9d.cjs +1 -0
- package/dist/{nylas-form-card.entry-db3f0e3b.cjs → nylas-form-card.entry-ab61fdc5.cjs} +1 -1
- package/dist/{nylas-form-card.entry-ca835017.js → nylas-form-card.entry-b0a2403f.js} +8 -8
- package/dist/{nylas-if-state.entry-4159d41d.js → nylas-if-state.entry-523fdc6b.js} +2 -2
- package/dist/{nylas-if-state.entry-5410607c.cjs → nylas-if-state.entry-53883c36.cjs} +1 -1
- package/dist/{nylas-list-folders.entry-0f143930.cjs → nylas-list-folders.entry-4ef6cb3d.cjs} +1 -1
- package/dist/{nylas-list-folders.entry-6b4a3d96.js → nylas-list-folders.entry-e37d069f.js} +8 -8
- package/dist/{nylas-list-threads.entry-68b6f32b.cjs → nylas-list-threads.entry-3be623e9.cjs} +1 -1
- package/dist/{nylas-list-threads.entry-62108562.js → nylas-list-threads.entry-8ba62db8.js} +3 -3
- package/dist/{nylas-login.entry-f1d7bc7d.cjs → nylas-login.entry-05e1df3e.cjs} +1 -1
- package/dist/{nylas-login.entry-590e7fba.js → nylas-login.entry-d9bf3974.js} +5 -5
- package/dist/{nylas-mailbox-pagination.entry-8377fdee.cjs → nylas-mailbox-pagination.entry-3dd05cf4.cjs} +1 -1
- package/dist/{nylas-mailbox-pagination.entry-ba1af8fb.js → nylas-mailbox-pagination.entry-50d9d9e3.js} +2 -2
- package/dist/{nylas-mailbox-toolbar-button.entry-4497acd0.js → nylas-mailbox-toolbar-button.entry-9a77d137.js} +2 -2
- package/dist/{nylas-mailbox-toolbar-button.entry-6a5d8387.cjs → nylas-mailbox-toolbar-button.entry-d87b55de.cjs} +1 -1
- package/dist/{nylas-mailbox.entry-917c22f5.js → nylas-mailbox.entry-cb7d1031.js} +3 -3
- package/dist/{nylas-mailbox.entry-a07652b4.cjs → nylas-mailbox.entry-f7db9aa8.cjs} +1 -1
- package/dist/{nylas-provider.entry-0e520ac3.cjs → nylas-provider.entry-1716bf48.cjs} +1 -1
- package/dist/{nylas-provider.entry-20c47b14.js → nylas-provider.entry-7aa46ea2.js} +37 -37
- package/dist/{nylas-reminder-emails.entry-69626e7f.cjs → nylas-reminder-emails.entry-88a862cd.cjs} +2 -2
- package/dist/{nylas-reminder-emails.entry-088ee120.js → nylas-reminder-emails.entry-a86231b7.js} +5 -5
- package/dist/{nylas-reminder-time_2.entry-0357f280.js → nylas-reminder-time_2.entry-9589d5f2.js} +4 -4
- package/dist/{nylas-reminder-time_2.entry-b5c181db.cjs → nylas-reminder-time_2.entry-bc76d4ab.cjs} +1 -1
- package/dist/{nylas-scheduler-editor.entry-d2c3bddc.cjs → nylas-scheduler-editor.entry-1a2f3ee0.cjs} +2 -2
- package/dist/{nylas-scheduler-editor.entry-6bb290ed.js → nylas-scheduler-editor.entry-b434b526.js} +7 -7
- package/dist/nylas-scheduling.entry-59e5e8c1.cjs +1 -0
- package/dist/nylas-scheduling.entry-b71080c8.js +400 -0
- package/dist/{nylas-threads-refresh.entry-45d7d171.js → nylas-threads-refresh.entry-544ca90a.js} +2 -2
- package/dist/{nylas-threads-refresh.entry-6636e7b1.cjs → nylas-threads-refresh.entry-7ada7b2d.cjs} +1 -1
- package/dist/{nylas-threads-search.entry-4460aa9b.js → nylas-threads-search.entry-181ba46a.js} +17 -17
- package/dist/{nylas-threads-search.entry-ae87695a.cjs → nylas-threads-search.entry-f1cb19e4.cjs} +1 -1
- package/dist/{nylas-time-window-picker.entry-1b449403.cjs → nylas-time-window-picker.entry-a6d1c648.cjs} +1 -1
- package/dist/{nylas-time-window-picker.entry-260f52a6.js → nylas-time-window-picker.entry-c1ee860a.js} +2 -2
- package/dist/{nylas-view-thread.entry-5a9b353a.cjs → nylas-view-thread.entry-6ae8dd64.cjs} +1 -1
- package/dist/{nylas-view-thread.entry-5821630b.js → nylas-view-thread.entry-c066f522.js} +6 -6
- package/dist/{person-icon.entry-b4ce06b7.cjs → person-icon.entry-80c9022e.cjs} +1 -1
- package/dist/{person-icon.entry-ed6786db.js → person-icon.entry-8833e3cc.js} +4 -4
- package/dist/{play-icon_2.entry-87fe39a9.cjs → play-icon_2.entry-801c85bc.cjs} +1 -1
- package/dist/{play-icon_2.entry-261ea828.js → play-icon_2.entry-efca8f00.js} +3 -3
- package/dist/react.cjs +1 -1
- package/dist/react.js +118 -116
- package/dist/{refresh-icon.entry-87af05b0.js → refresh-icon.entry-4d6791bd.js} +4 -4
- package/dist/{refresh-icon.entry-21ac359d.cjs → refresh-icon.entry-d4cc16b7.cjs} +1 -1
- package/dist/{register-component-ea95564d-a64ee107.cjs → register-component-a7ea27ad-2343f3df.cjs} +1 -1
- package/dist/{register-component-ea95564d-843da1da.js → register-component-a7ea27ad-fa2c4b17.js} +1 -1
- package/dist/{scheduler-config-store-2a3b403d-88840eb1.cjs → scheduler-config-store-2a3b403d-2263f999.cjs} +1 -1
- package/dist/{scheduler-config-store-2a3b403d-8553b685.js → scheduler-config-store-2a3b403d-5176cd45.js} +1 -1
- package/dist/{scheduler-store-9ff4914b-d1a624f8.js → scheduler-store-33ab8dea-9801357a.js} +2 -2
- package/dist/scheduler-store-33ab8dea-a0b39d36.cjs +1 -0
- package/dist/{textarea-component.entry-cbffb0b0.cjs → textarea-component.entry-019e75d0.cjs} +1 -1
- package/dist/{textarea-component.entry-dad42f20.js → textarea-component.entry-174089bc.js} +2 -2
- package/dist/{time-period-selector.entry-79c94da3.js → time-period-selector.entry-62c854d1.js} +4 -4
- package/dist/{time-period-selector.entry-e54d0989.cjs → time-period-selector.entry-8466d0f2.cjs} +1 -1
- package/dist/{translate-icon.entry-ef6266c4.js → translate-icon.entry-73f7127b.js} +4 -4
- package/dist/{translate-icon.entry-8e9eeeba.cjs → translate-icon.entry-7d5cf4b8.cjs} +1 -1
- package/dist/{warning-icon.entry-34c85de2.cjs → warning-icon.entry-92638eeb.cjs} +1 -1
- package/dist/{warning-icon.entry-adf18211.js → warning-icon.entry-abf896c3.js} +5 -5
- package/package.json +2 -2
- package/dist/calendar-agenda-fill-icon_48.entry-c4ea84b3.cjs +0 -7
- package/dist/google-logo-icon_4.entry-afffb209.cjs +0 -1
- package/dist/index-c4e817ef.cjs +0 -82
- package/dist/nylas-booked-event-card_12.entry-47c5381d.cjs +0 -1
- package/dist/nylas-scheduling.entry-bc9c25c5.js +0 -359
- package/dist/nylas-scheduling.entry-dc92d5e7.cjs +0 -1
- package/dist/scheduler-store-9ff4914b-63dc472a.cjs +0 -1
|
@@ -1,137 +1,138 @@
|
|
|
1
|
-
import { r as Z, h as
|
|
2
|
-
import { R as
|
|
3
|
-
import { D as
|
|
1
|
+
import { r as Z, h as t, c as S, d as u, A as Oe, C as q, H as Fe, g as Le, F as Ne } from "./index-a282e817.js";
|
|
2
|
+
import { R as Te } from "./register-component-a7ea27ad-fa2c4b17.js";
|
|
3
|
+
import { D as Se } from "./constants-50c3e067-33cf0ffe.js";
|
|
4
|
+
import { i as Ie, a as De, r as Me, f as Re, c as Ue, b as ze } from "./feedbackSync-81d4c4d8-dd4d2e32.js";
|
|
4
5
|
import "react";
|
|
5
6
|
import "react-dom";
|
|
6
|
-
const
|
|
7
|
-
constructor(
|
|
8
|
-
Z(this,
|
|
7
|
+
const Ae = ".sc-google-logo-icon-h{display:flex}", je = Ae, $e = class {
|
|
8
|
+
constructor(e) {
|
|
9
|
+
Z(this, e), this.width = "24", this.height = "24";
|
|
9
10
|
}
|
|
10
11
|
render() {
|
|
11
|
-
return
|
|
12
|
+
return t("svg", { key: "0915e39edfd98973f78780a13fbf8ada8933fc8c", width: this.width, height: this.height, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, t("g", { key: "2731917fd89fd8c9afe6e784cf19d19d4c5b5cb7", "clip-path": "url(#clip0_959_12452)" }, t("path", { key: "632083d3afe66251f3900e40ff355aa0a456545f", 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" }), t("path", { key: "3155466ecaeea6b1d8bfa5dbfc5cae1d81250e3c", 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" }), t("path", { key: "1c637b0858146c95210c583bd29b16a2af75c480", 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" }), t("path", { key: "2f21711d1d9b829806b13fa7f7f530ba650a5b5e", 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" })), t("defs", { key: "8f222babf2247c17f636b0bb4c8d3a66564b6d92" }, t("clipPath", { key: "1764a66753ad9133adabeb3d0e135861df3afb3f", id: "clip0_959_12452" }, t("rect", { key: "03537b6080eb8daa3ea08b2cb4239d571821fdc4", width: 24, height: 24, fill: "white" }))));
|
|
12
13
|
}
|
|
13
14
|
};
|
|
14
|
-
|
|
15
|
-
const
|
|
16
|
-
constructor(
|
|
17
|
-
Z(this,
|
|
15
|
+
$e.style = je;
|
|
16
|
+
const Je = ".sc-microsoft-logo-icon-h{display:flex}", Ve = Je, Ze = class {
|
|
17
|
+
constructor(e) {
|
|
18
|
+
Z(this, e), this.width = "22", this.height = "22";
|
|
18
19
|
}
|
|
19
20
|
render() {
|
|
20
|
-
return
|
|
21
|
+
return t("svg", { key: "0c42f956a05c93b3bcf258dd1ea24893fa7210fc", width: this.width, height: this.height, viewBox: "0 0 22 22", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "3cb573b5562741a398c7346b511cfe549c34634f", d: "M0.043457 0.043457H10.4782V10.4782H0.043457V0.043457Z", fill: "#F35325" }), t("path", { key: "025ab2927b79ae1543cf4a358d8d91fae1afb6d2", d: "M11.5217 0.043457H21.9565V10.4782H11.5217V0.043457Z", fill: "#81BC06" }), t("path", { key: "7f4e0a4901bc60a7ff18d9664ad45eed1c7bb769", d: "M0.043457 11.5217H10.4782V21.9565H0.043457V11.5217Z", fill: "#05A6F0" }), t("path", { key: "d04b1587a43795e23495ae4b172707442ce8fa5c", d: "M11.5217 11.5217H21.9565V21.9565H11.5217V11.5217Z", fill: "#FFBA08" }));
|
|
21
22
|
}
|
|
22
23
|
};
|
|
23
|
-
|
|
24
|
+
Ze.style = Ve;
|
|
24
25
|
var o;
|
|
25
|
-
(function(
|
|
26
|
-
|
|
26
|
+
(function(e) {
|
|
27
|
+
e.EventInfo = "eventInfo", e.Availability = "availability", e.BookingOptions = "bookingOptions", e.Communications = "communications", e.Participants = "participants", e.BookingForm = "bookingForm", e.PageStyles = "pageStyles";
|
|
27
28
|
})(o || (o = {}));
|
|
28
|
-
function
|
|
29
|
-
return
|
|
30
|
-
|
|
29
|
+
function Ge({ id: e, formState: a, activeTab: i }, n) {
|
|
30
|
+
return t(
|
|
31
|
+
Ne,
|
|
31
32
|
null,
|
|
32
|
-
|
|
33
|
+
t(
|
|
33
34
|
"div",
|
|
34
|
-
{ key: `event-info-${
|
|
35
|
-
|
|
35
|
+
{ key: `event-info-${e}`, class: { hide: i !== o.EventInfo } },
|
|
36
|
+
t(
|
|
36
37
|
"nylas-event-info",
|
|
37
38
|
null,
|
|
38
|
-
|
|
39
|
+
t(
|
|
39
40
|
"div",
|
|
40
41
|
{ slot: "inputs" },
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
t("nylas-event-title", { name: "title", exportparts: "net, net__title, net__dropdown-content" }),
|
|
43
|
+
t("nylas-event-duration", { name: "duration", exportparts: "ned, ned__dropdown, ned__dropdown-button, ned__dropdown-content, ned__input_dropdown, ned__input_dropdown-input, ned__input_dropdown-content" }),
|
|
44
|
+
t("nylas-event-location", { name: "location", exportparts: "nel, nel__location, nel__dropdown, nel__dropdown-button, nel__dropdown-content" }),
|
|
45
|
+
t("nylas-event-description", { name: "description", exportparts: "nedesc, nedesc__textarea" })
|
|
45
46
|
)
|
|
46
47
|
)
|
|
47
48
|
),
|
|
48
|
-
|
|
49
|
+
t(
|
|
49
50
|
"div",
|
|
50
|
-
{ key: `availability-${
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
{ key: `availability-${e}`, class: { hide: i !== o.Availability } },
|
|
52
|
+
t("nylas-participant-booking-calendars", { participants: a.participants, name: "participant-booking-calendars" }),
|
|
53
|
+
t("nylas-connected-calendars", { participants: a.participants, name: "connected-calendars" }),
|
|
54
|
+
t("nylas-availability-picker", { name: "availability", exportparts: "nap__header, nap__select-timezone, nap__select-timezone-button, nap__select-timezone-dropdown-content, nap__availability, nap__day, nap__time-ranges, nap__time-range, nap__add-time-range, nap__time-picker-container, nap__time-picker-input, nap__time-picker-times" })
|
|
54
55
|
),
|
|
55
|
-
|
|
56
|
+
t(
|
|
56
57
|
"div",
|
|
57
|
-
{ key: `booking-options-${
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
{ key: `booking-options-${e}`, class: { hide: i !== o.BookingOptions } },
|
|
59
|
+
t("nylas-scheduling-method", { name: "availability-method", readOnly: !0, exportparts: "nsm, nsm__header, nsm__input-label, nsm__dropdown, nsm__dropdown-button, nsm__dropdown-content" }),
|
|
60
|
+
t(
|
|
60
61
|
"nylas-custom-booking-flow",
|
|
61
62
|
null,
|
|
62
|
-
|
|
63
|
+
t(
|
|
63
64
|
"div",
|
|
64
65
|
{ slot: "inputs" },
|
|
65
|
-
|
|
66
|
-
|
|
66
|
+
t("nylas-booking-confirmation-type", { name: "confirmation-type", exportparts: "nbct, nbct__header, nbct__dropdown, nbct__dropdown-button, nbct__dropdown-content" }),
|
|
67
|
+
t("nylas-booking-confirmation-redirect", { name: "confirmation-redirect", exportparts: "nbcr, nbcr__header, nbcr__dropdown, nbcr__dropdown-button, nbcr__dropdown-content, nbcr__input-textfield" })
|
|
67
68
|
)
|
|
68
69
|
),
|
|
69
|
-
|
|
70
|
-
|
|
70
|
+
t("nylas-buffer-time", { name: "buffer-time", exportparts: "nbt, nbt__header, nbt__body, nbt__dropdown-before, nbt__dropdown-button-before, nbt__dropdown-content-before, nbt__dropdown-after, nbt__dropdown-button-after, nbt__dropdown-content-after, nbt__preview" }),
|
|
71
|
+
t(
|
|
71
72
|
"nylas-event-limits",
|
|
72
73
|
null,
|
|
73
|
-
|
|
74
|
+
t(
|
|
74
75
|
"div",
|
|
75
76
|
{ slot: "inputs" },
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
77
|
+
t("nylas-min-booking-notice", { name: "min-booking-notice", exportparts: "nmbn, nmbn__number-dropdown, nmbn__number-dropdown-button, nmbn__number-dropdown-content, nmbn__period-dropdown, nmbn__period-dropdown-button, nmbn__period-dropdown-content" }),
|
|
78
|
+
t("nylas-limit-future-bookings", { name: "limit-future-bookings", exportparts: "nlfb, nlfb__number-dropdown, nlfb__number-dropdown-button, nlfb__number-dropdown-content, nlfb__period-dropdown, nlfb__period-dropdown-button, nlfb__period-dropdown-content" }),
|
|
79
|
+
t("nylas-min-cancellation-notice", { name: "min-cancellation-notice", exportparts: "nmcn, nmcn__number-dropdown, nmcn__number-dropdown-button, nmcn__number-dropdown-content, nmcn__period-dropdown, nmcn__period-dropdown-button, nmcn__period-dropdown-content" }),
|
|
80
|
+
t("nylas-cancellation-policy", { name: "cancellation-policy", exportparts: "ncpolicy, ncpolicy__textarea" })
|
|
80
81
|
)
|
|
81
82
|
),
|
|
82
|
-
|
|
83
|
-
|
|
83
|
+
t("nylas-timeslot-interval", { name: "timeslot-interval", exportparts: "nti, nti__header, nti__input-label, nti__dropdown, nti__dropdown-button, nti__dropdown-content" }),
|
|
84
|
+
t("nylas-customize-booking-settings", { name: "customize-booking-settings", exportparts: "ncbs, ncbs__header, ncbs__settings, ncbs__settings-div, ncbs__additional_guests, ncbs__cancellation_options, ncbs__rescheduling_options" })
|
|
84
85
|
),
|
|
85
|
-
|
|
86
|
+
t(
|
|
86
87
|
"div",
|
|
87
|
-
{ key: `communications-${
|
|
88
|
-
|
|
88
|
+
{ key: `communications-${e}`, class: { hide: i !== o.Communications } },
|
|
89
|
+
t(
|
|
89
90
|
"div",
|
|
90
91
|
{ class: "tab-header" },
|
|
91
|
-
|
|
92
|
-
|
|
92
|
+
t("h3", null, "Event communications"),
|
|
93
|
+
t("p", null, "Set up automatic confirmation emails.")
|
|
93
94
|
),
|
|
94
|
-
|
|
95
|
+
t("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
|
),
|
|
96
|
-
|
|
97
|
+
t(
|
|
97
98
|
"div",
|
|
98
|
-
{ key: `participants-${
|
|
99
|
-
|
|
100
|
-
|
|
99
|
+
{ key: `participants-${e}`, class: { hide: i !== o.Participants } },
|
|
100
|
+
t("nylas-additional-participants", { name: "participants", exportparts: "nap__title, nap__subtitle, nap__content, nap__input_group, nap__input_wrapper, nap__input, nap__remove-participant" }),
|
|
101
|
+
t("nylas-participants-custom-availability", { participants: a.participants, name: "participant-custom-availability", exportparts: "npca, npca__header, npca__content, npca__participant-container, npca__participant-title, npca__participant-toggle--container, npca__toggle-label, npca__toggle-input, npca__toggle-slider" })
|
|
101
102
|
),
|
|
102
|
-
|
|
103
|
+
t(
|
|
103
104
|
"div",
|
|
104
|
-
{ key: `page-styles-${
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
105
|
+
{ key: `page-styles-${e}`, class: { hide: i !== o.PageStyles } },
|
|
106
|
+
t("nylas-custom-event-slug", { name: "custom-event-slug", exportparts: "nces, nces__body, nces__header, nces__drawer-toggle--container, nces__input-textfield" }),
|
|
107
|
+
t("nylas-page-name", { name: "page-name", exportparts: "npn, npn__body, npn__header, npn__drawer-toggle--container, npn__input-textfield" }),
|
|
108
|
+
t("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" }, n)
|
|
108
109
|
),
|
|
109
|
-
|
|
110
|
+
t(
|
|
110
111
|
"div",
|
|
111
|
-
{ key: `booking-form-${
|
|
112
|
-
|
|
112
|
+
{ key: `booking-form-${e}`, class: { hide: i !== o.BookingForm } },
|
|
113
|
+
t("nylas-booking-form-config", { name: "additional-fields" })
|
|
113
114
|
)
|
|
114
115
|
);
|
|
115
116
|
}
|
|
116
|
-
const
|
|
117
|
-
var
|
|
118
|
-
var l = arguments.length,
|
|
117
|
+
const We = '.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-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.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;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:1rem;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:1rem;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}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}', qe = We;
|
|
118
|
+
var Ke = function(e, a, i, n) {
|
|
119
|
+
var l = arguments.length, s = l < 3 ? a : n === null ? n = Object.getOwnPropertyDescriptor(a, i) : n, c;
|
|
119
120
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
120
|
-
|
|
121
|
+
s = Reflect.decorate(e, a, i, n);
|
|
121
122
|
else
|
|
122
|
-
for (var d =
|
|
123
|
-
(c =
|
|
124
|
-
return l > 3 &&
|
|
125
|
-
}, G = function(
|
|
123
|
+
for (var d = e.length - 1; d >= 0; d--)
|
|
124
|
+
(c = e[d]) && (s = (l < 3 ? c(s) : l > 3 ? c(a, i, s) : c(a, i)) || s);
|
|
125
|
+
return l > 3 && s && Object.defineProperty(a, i, s), s;
|
|
126
|
+
}, G = function(e, a) {
|
|
126
127
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
127
|
-
return Reflect.metadata(
|
|
128
|
+
return Reflect.metadata(e, a);
|
|
128
129
|
};
|
|
129
|
-
const
|
|
130
|
-
constructor(
|
|
131
|
-
Z(this,
|
|
130
|
+
const Pe = class {
|
|
131
|
+
constructor(e) {
|
|
132
|
+
Z(this, e), this.schedulerConfigChanged = S(this, "schedulerConfigChanged", 7), this.cancelButtonClick = S(this, "cancelButtonClick", 7), this.formSubmitted = S(this, "formSubmitted", 7), this.previewButtonClicked = S(this, "previewButtonClicked", 7), this.schedulerEditorFormUpdated = S(this, "schedulerEditorFormUpdated", 7), this.setError = (a) => {
|
|
132
133
|
this.error = a.message;
|
|
133
134
|
}, this.formSubmissionHandler = async (a) => {
|
|
134
|
-
var K, Q, X, Y,
|
|
135
|
+
var K, Q, X, Y, ee, te, ae, ie, ne, se, oe, re, le, de, ce, be;
|
|
135
136
|
a.preventDefault();
|
|
136
137
|
const i = await this.formSubmitted.emit();
|
|
137
138
|
if (u("[nylas-editor-tabs]", "formSubmissionHandler", i), !this.formRef.checkValidity() || i.defaultPrevented) {
|
|
@@ -139,10 +140,10 @@ const Pt = class {
|
|
|
139
140
|
return;
|
|
140
141
|
}
|
|
141
142
|
this.isLoading = !0, this.hasUnsavedChanges = !1;
|
|
142
|
-
const l = this.updateFormState(), { title:
|
|
143
|
+
const l = this.updateFormState(), { title: s, description: c, duration: d, availability: h, bookingCalendar: y, location: F, bookingType: g, buffer: L, availableDaysInFuture: B, minCancellationNotice: H, minBookingNotice: O, cancellationPolicy: N, timeslotInterval: k, additionalGuestsHidden: I, hideCancellationOptions: D, hideReschedulingOptions: M, participants: w, participantOpenHours: p, additionalFields: R, participantCalendars: f, conferencing: U, participantBookingCalendars: m, reminders: z, emailTemplate: A, redirectUrl: j, availabilityMethod: T, slug: $, appearance: J, name: V } = l, b = ((Q = (K = this.selectedConfiguration) == null ? void 0 : K.participants) == null ? void 0 : Q.find((r) => r.is_organizer)) || (w == null ? void 0 : w.find((r) => r.is_organizer)), C = f && (b != null && b.email) ? f[b == null ? void 0 : b.email] : [], _ = ((X = b == null ? void 0 : b.booking) == null ? void 0 : X.calendar_id) || y, v = d ? parseInt(d) : 30, x = w && (w == null ? void 0 : w.length) > 0 ? w : [
|
|
143
144
|
{
|
|
144
145
|
name: (b == null ? void 0 : b.name) ?? ((Y = this.currentUser) == null ? void 0 : Y.name) ?? "",
|
|
145
|
-
email: (b == null ? void 0 : b.email) ?? ((
|
|
146
|
+
email: (b == null ? void 0 : b.email) ?? ((ee = this.currentUser) == null ? void 0 : ee.email) ?? "",
|
|
146
147
|
is_organizer: !0,
|
|
147
148
|
timezone: (h == null ? void 0 : h.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
148
149
|
availability: {
|
|
@@ -150,111 +151,111 @@ const Pt = class {
|
|
|
150
151
|
open_hours: []
|
|
151
152
|
},
|
|
152
153
|
booking: {
|
|
153
|
-
calendar_id:
|
|
154
|
+
calendar_id: y && y !== "" ? y : "primary"
|
|
154
155
|
}
|
|
155
156
|
}
|
|
156
157
|
], P = {
|
|
157
|
-
...((
|
|
158
|
-
version: ((
|
|
159
|
-
slug:
|
|
158
|
+
...((te = this.selectedConfiguration) == null ? void 0 : te.id) && { id: this.selectedConfiguration.id },
|
|
159
|
+
version: ((ae = this.selectedConfiguration) == null ? void 0 : ae.version) ?? "1.0.0",
|
|
160
|
+
slug: $,
|
|
160
161
|
name: V,
|
|
161
162
|
availability: {
|
|
162
163
|
duration_minutes: v,
|
|
163
164
|
interval_minutes: (k == null ? void 0 : k.interval) ?? v,
|
|
164
165
|
round_to: k == null ? void 0 : k.roundTo,
|
|
165
166
|
availability_rules: {
|
|
166
|
-
availability_method:
|
|
167
|
-
buffer:
|
|
168
|
-
default_open_hours: (h == null ? void 0 : h.openHours) ?? ((
|
|
169
|
-
round_robin_group_id: ((
|
|
167
|
+
availability_method: T || (((se = (ne = (ie = this.selectedConfiguration) == null ? void 0 : ie.availability) == null ? void 0 : ne.availability_rules) == null ? void 0 : se.availability_method) ?? "collective"),
|
|
168
|
+
buffer: L || { before: 0, after: 0 },
|
|
169
|
+
default_open_hours: (h == null ? void 0 : h.openHours) ?? ((le = (re = (oe = this.selectedConfiguration) == null ? void 0 : oe.availability) == null ? void 0 : re.availability_rules) == null ? void 0 : le.default_open_hours) ?? Se,
|
|
170
|
+
round_robin_group_id: ((be = (ce = (de = this.selectedConfiguration) == null ? void 0 : de.availability) == null ? void 0 : ce.availability_rules) == null ? void 0 : be.round_robin_group_id) ?? ""
|
|
170
171
|
}
|
|
171
172
|
},
|
|
172
173
|
participants: [
|
|
173
174
|
...x == null ? void 0 : x.map((r) => {
|
|
174
|
-
var
|
|
175
|
+
var he, ue, pe, me, fe, ye, ge, _e, ve, we, ke, Ce, xe;
|
|
175
176
|
return r.is_organizer ? {
|
|
176
177
|
name: r.name ?? "",
|
|
177
178
|
email: r.email,
|
|
178
179
|
is_organizer: !0,
|
|
179
|
-
timezone: ((
|
|
180
|
+
timezone: ((ue = (he = p == null ? void 0 : p[r.email]) == null ? void 0 : he[0]) == null ? void 0 : ue.timezone) ?? ((fe = (me = (pe = r.availability) == null ? void 0 : pe.open_hours) == null ? void 0 : me[0]) == null ? void 0 : fe.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
180
181
|
availability: {
|
|
181
|
-
calendar_ids:
|
|
182
|
-
open_hours: (p == null ? void 0 : p[r.email]) ?? ((
|
|
182
|
+
calendar_ids: f != null && f[r.email] ? f == null ? void 0 : f[r.email] : C != null && C.length ? C : ["primary"],
|
|
183
|
+
open_hours: (p == null ? void 0 : p[r.email]) ?? ((ye = r.availability) == null ? void 0 : ye.open_hours) ?? []
|
|
183
184
|
},
|
|
184
185
|
booking: {
|
|
185
186
|
calendar_id: m != null && m[r.email] ? m == null ? void 0 : m[r.email] : _ || "primary"
|
|
186
187
|
}
|
|
187
188
|
} : {
|
|
188
189
|
...r,
|
|
189
|
-
timezone: ((
|
|
190
|
+
timezone: ((_e = (ge = p == null ? void 0 : p[r.email]) == null ? void 0 : ge[0]) == null ? void 0 : _e.timezone) ?? ((ke = (we = (ve = r.availability) == null ? void 0 : ve.open_hours) == null ? void 0 : we[0]) == null ? void 0 : ke.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
190
191
|
availability: r.availability ? {
|
|
191
|
-
calendar_ids: (
|
|
192
|
-
open_hours: (p == null ? void 0 : p[r.email]) ?? ((
|
|
192
|
+
calendar_ids: (f == null ? void 0 : f[r.email]) ?? ((Ce = r.availability) == null ? void 0 : Ce.calendar_ids) ?? ["primary"],
|
|
193
|
+
open_hours: (p == null ? void 0 : p[r.email]) ?? ((xe = r.availability) == null ? void 0 : xe.open_hours) ?? []
|
|
193
194
|
} : void 0,
|
|
194
195
|
booking: m != null && m[r.email] ? { calendar_id: m == null ? void 0 : m[r.email] } : (r == null ? void 0 : r.booking) ?? void 0
|
|
195
196
|
};
|
|
196
197
|
})
|
|
197
198
|
],
|
|
198
199
|
event_booking: {
|
|
199
|
-
title: (
|
|
200
|
+
title: (s == null ? void 0 : s.toString()) ?? "",
|
|
200
201
|
description: (c == null ? void 0 : c.toString()) ?? "",
|
|
201
|
-
location: (
|
|
202
|
+
location: (F == null ? void 0 : F.toString()) ?? "",
|
|
202
203
|
booking_type: (g == null ? void 0 : g.toString()) ?? "booking",
|
|
203
204
|
timezone: (h == null ? void 0 : h.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
204
|
-
conferencing:
|
|
205
|
-
reminders:
|
|
205
|
+
conferencing: U,
|
|
206
|
+
reminders: z
|
|
206
207
|
},
|
|
207
208
|
scheduler: {
|
|
208
209
|
cancellation_policy: N ?? "",
|
|
209
210
|
available_days_in_future: B ?? 30,
|
|
210
211
|
min_cancellation_notice: H ?? 0,
|
|
211
212
|
min_booking_notice: O ?? 60,
|
|
212
|
-
hide_additional_guests:
|
|
213
|
-
hide_cancellation_options:
|
|
214
|
-
hide_rescheduling_options:
|
|
215
|
-
additional_fields:
|
|
216
|
-
email_template:
|
|
217
|
-
confirmation_redirect_url:
|
|
213
|
+
hide_additional_guests: I ?? !1,
|
|
214
|
+
hide_cancellation_options: D ?? !1,
|
|
215
|
+
hide_rescheduling_options: M ?? !1,
|
|
216
|
+
additional_fields: R,
|
|
217
|
+
email_template: A,
|
|
218
|
+
confirmation_redirect_url: j
|
|
218
219
|
},
|
|
219
220
|
appearance: J
|
|
220
|
-
},
|
|
221
|
+
}, Be = Oe(P, this.selectedConfiguration), E = this.action === "create" ? Be : P;
|
|
221
222
|
this.isConfigRoundRobin(E) && (E.participants = E.participants.map((r) => ({ ...r, is_organizer: void 0 })));
|
|
222
|
-
const
|
|
223
|
+
const He = (r) => {
|
|
223
224
|
this.isLoading = !1, this.changesSaved = !0, setTimeout(() => {
|
|
224
225
|
this.changesSaved = !1;
|
|
225
226
|
}, 5e3);
|
|
226
227
|
};
|
|
227
|
-
this.checkForClientSideErrors(E) || this.schedulerConfigChanged.emit({ config: E, resetLoadingState:
|
|
228
|
+
this.checkForClientSideErrors(E) || this.schedulerConfigChanged.emit({ config: E, resetLoadingState: He, setError: this.setError, action: this.action });
|
|
228
229
|
}, this.isConfigRoundRobin = (a) => {
|
|
229
|
-
var i,
|
|
230
|
-
return ((
|
|
230
|
+
var i, n, l, s;
|
|
231
|
+
return ((n = (i = a.availability) == null ? void 0 : i.availability_rules) == null ? void 0 : n.availability_method) === "max-availability" || ((s = (l = a.availability) == null ? void 0 : l.availability_rules) == null ? void 0 : s.availability_method) === "max-fairness";
|
|
231
232
|
}, this.checkForClientSideErrors = (a) => {
|
|
232
|
-
var d, h,
|
|
233
|
-
let i = !1,
|
|
234
|
-
const l = (d = a.scheduler) == null ? void 0 : d.additional_fields,
|
|
235
|
-
return l && (
|
|
236
|
-
const g =
|
|
233
|
+
var d, h, y;
|
|
234
|
+
let i = !1, n = "";
|
|
235
|
+
const l = (d = a.scheduler) == null ? void 0 : d.additional_fields, s = ((h = a.event_booking) == null ? void 0 : h.booking_type) === "organizer-confirmation", c = (y = a.scheduler) == null ? void 0 : y.organizer_confirmation_url;
|
|
236
|
+
return l && (n = "Booking form error: ", Object.entries(l).forEach((F) => {
|
|
237
|
+
const g = F[1];
|
|
237
238
|
if (g.label === "") {
|
|
238
|
-
|
|
239
|
+
n += `Label is required for field of type ${g.type}.`, i = !0;
|
|
239
240
|
return;
|
|
240
241
|
}
|
|
241
242
|
if (g.options) {
|
|
242
|
-
for (const
|
|
243
|
-
if (
|
|
244
|
-
|
|
243
|
+
for (const L of g.options)
|
|
244
|
+
if (L === "") {
|
|
245
|
+
n += `Empty option detected inside ${g.label} of type ${g.type}.`, i = !0;
|
|
245
246
|
break;
|
|
246
247
|
}
|
|
247
248
|
}
|
|
248
|
-
})),
|
|
249
|
-
}, this.calendars = void 0, this.selectedConfiguration = void 0, this.currentUser = void 0, this.schedulerPreviewLink = "", this.mode = "app", this.hideEditorTabs = [], this.action = "create", this.activeTab = o.EventInfo, this.isLoading = !1, this.hasUnsavedChanges = !1, this.changesSaved = !1, this.formState = {}, this.error = "";
|
|
249
|
+
})), s && !c && (n += "Organizer confirmation URL is required when using organizer confirmation booking type.", i = !0), i && (this.isLoading = !1, this.setError(new Error(n))), i;
|
|
250
|
+
}, this.calendars = void 0, this.selectedConfiguration = void 0, this.currentUser = void 0, this.schedulerPreviewLink = "", this.mode = "app", this.hideEditorTabs = [], this.enableUserFeedback = !0, this.action = "create", this.showFeedbackModal = !1, this.activeTab = o.EventInfo, this.isLoading = !1, this.hasUnsavedChanges = !1, this.changesSaved = !1, this.formState = {}, this.error = "";
|
|
250
251
|
}
|
|
251
|
-
configChangedHandler(
|
|
252
|
-
u("[nylas-editor-tabs]", "configChangedHandler",
|
|
253
|
-
...this.getFormStateFromConfig(
|
|
254
|
-
},
|
|
252
|
+
configChangedHandler(e) {
|
|
253
|
+
u("[nylas-editor-tabs]", "configChangedHandler", e, this.selectedConfiguration), this.formState = {
|
|
254
|
+
...this.getFormStateFromConfig(e)
|
|
255
|
+
}, e != null && e.id ? this.action = "edit" : this.action = "create";
|
|
255
256
|
}
|
|
256
|
-
userChangedHandler(
|
|
257
|
-
u("[nylas-editor-tabs]", "userChangedHandler",
|
|
257
|
+
userChangedHandler(e) {
|
|
258
|
+
u("[nylas-editor-tabs]", "userChangedHandler", e), e && (this.formState = {
|
|
258
259
|
...this.getFormStateFromConfig(this.selectedConfiguration)
|
|
259
260
|
});
|
|
260
261
|
}
|
|
@@ -266,158 +267,193 @@ const Pt = class {
|
|
|
266
267
|
}
|
|
267
268
|
componentDidLoad() {
|
|
268
269
|
var a, i;
|
|
269
|
-
u("[nylas-editor-tabs]", "componentDidLoad"),
|
|
270
|
-
|
|
271
|
-
|
|
270
|
+
u("[nylas-editor-tabs]", "componentDidLoad"), this.enableUserFeedback && !Ie() && De({
|
|
271
|
+
dsn: "https://9d5731f1c77ca84c9ed3fb9b3ccf7ee1@o74852.ingest.us.sentry.io/4507889638178816",
|
|
272
|
+
release: "1.1.3",
|
|
273
|
+
integrations: [
|
|
274
|
+
Me(),
|
|
275
|
+
Re({
|
|
276
|
+
colorScheme: "system",
|
|
277
|
+
autoInject: !1
|
|
278
|
+
})
|
|
279
|
+
],
|
|
280
|
+
replaysSessionSampleRate: 0.1,
|
|
281
|
+
replaysOnErrorSampleRate: 0.1
|
|
282
|
+
}), (a = this.selectedConfiguration) != null && a.id && this.configChangedHandler(this.selectedConfiguration);
|
|
283
|
+
const e = (i = this.host.querySelector("button.tab:not(.hide)")) == null ? void 0 : i.name;
|
|
284
|
+
e && (this.activeTab = e);
|
|
272
285
|
}
|
|
273
286
|
disconnectedCallback() {
|
|
274
287
|
u("[nylas-editor-tabs]", "disconnectedCallback");
|
|
275
288
|
}
|
|
276
|
-
handleValueChanged(
|
|
277
|
-
u("[nylas-editor-tabs]", "handleValueChanged",
|
|
278
|
-
const { name: a, value: i } =
|
|
289
|
+
handleValueChanged(e) {
|
|
290
|
+
u("[nylas-editor-tabs]", "handleValueChanged", e);
|
|
291
|
+
const { name: a, value: i } = e.detail;
|
|
279
292
|
this.setFormState(i, a), this.formState = { ...this.formState }, this.hasUnsavedChanges = !0, this.error = "", this.schedulerEditorFormUpdated.emit({
|
|
280
|
-
value:
|
|
281
|
-
name:
|
|
293
|
+
value: e.detail.value,
|
|
294
|
+
name: e.detail.name
|
|
282
295
|
});
|
|
283
296
|
}
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
297
|
+
feedbackModalClosedHandler() {
|
|
298
|
+
this.showFeedbackModal = !1;
|
|
299
|
+
}
|
|
300
|
+
feedbackSubmittedHandler(e) {
|
|
301
|
+
var n, l;
|
|
302
|
+
const i = {
|
|
303
|
+
eventId: Ue("Scheduler Editor User Feedback"),
|
|
304
|
+
message: e.detail.feedback
|
|
305
|
+
};
|
|
306
|
+
ze(i, {
|
|
307
|
+
includeReplay: !0,
|
|
308
|
+
captureContext: {
|
|
309
|
+
tags: {
|
|
310
|
+
"nylas-web-element": "nylas-scheduler-editor",
|
|
311
|
+
"nylas-web-element-version": "1.1.3"
|
|
312
|
+
},
|
|
313
|
+
extra: {
|
|
314
|
+
configId: (n = this.selectedConfiguration) == null ? void 0 : n.id,
|
|
315
|
+
slug: (l = this.selectedConfiguration) == null ? void 0 : l.slug
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
}), this.showFeedbackModal = !1;
|
|
319
|
+
}
|
|
320
|
+
getFormStateFromConfig(e) {
|
|
321
|
+
var i, n, l, s, c, d, h, y, F, g, L, B, H, O, N, k, I, D, M, w, p, R, f, U, m, z, A, j, T, $, J, V, b, C;
|
|
322
|
+
let a = (i = e == null ? void 0 : e.participants) == null ? void 0 : i.find((_) => _.is_organizer);
|
|
323
|
+
return !a && ((l = (n = e == null ? void 0 : e.availability) == null ? void 0 : n.availability_rules) == null ? void 0 : l.availability_method) !== "collective" && (a = (s = e == null ? void 0 : e.participants) == null ? void 0 : s.find((_) => {
|
|
288
324
|
var v;
|
|
289
325
|
return _.email === ((v = this.currentUser) == null ? void 0 : v.email);
|
|
290
|
-
}), a && (a.is_organizer = !0)),
|
|
291
|
-
title: ((c =
|
|
292
|
-
description: ((d =
|
|
293
|
-
duration: ((
|
|
326
|
+
}), a && (a.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."), {
|
|
327
|
+
title: ((c = e == null ? void 0 : e.event_booking) == null ? void 0 : c.title) ?? "",
|
|
328
|
+
description: ((d = e == null ? void 0 : e.event_booking) == null ? void 0 : d.description) ?? "",
|
|
329
|
+
duration: ((y = (h = e == null ? void 0 : e.availability) == null ? void 0 : h.duration_minutes) == null ? void 0 : y.toString()) ?? "30",
|
|
294
330
|
availability: {
|
|
295
|
-
timezone: ((
|
|
296
|
-
openHours: ((
|
|
331
|
+
timezone: ((F = e == null ? void 0 : e.event_booking) == null ? void 0 : F.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
332
|
+
openHours: ((L = (g = e == null ? void 0 : e.availability) == null ? void 0 : g.availability_rules) == null ? void 0 : L.default_open_hours) ?? Se
|
|
297
333
|
},
|
|
298
|
-
additionalFields: ((B =
|
|
299
|
-
conferencing: ((H =
|
|
334
|
+
additionalFields: ((B = e == null ? void 0 : e.scheduler) == null ? void 0 : B.additional_fields) ?? {},
|
|
335
|
+
conferencing: ((H = e == null ? void 0 : e.event_booking) == null ? void 0 : H.conferencing) ?? {},
|
|
300
336
|
calendarIds: ((O = a == null ? void 0 : a.availability) == null ? void 0 : O.calendar_ids) ?? [],
|
|
301
|
-
participants: (
|
|
337
|
+
participants: (e == null ? void 0 : e.participants) ?? [],
|
|
302
338
|
bookingCalendar: ((N = a == null ? void 0 : a.booking) == null ? void 0 : N.calendar_id) ?? (a == null ? void 0 : a.email) ?? "",
|
|
303
|
-
location: ((k =
|
|
304
|
-
bookingType: ((
|
|
305
|
-
buffer: ((
|
|
306
|
-
cancellationPolicy: ((w =
|
|
307
|
-
availableDaysInFuture: ((p =
|
|
308
|
-
minCancellationNotice: ((
|
|
309
|
-
minBookingNotice: ((
|
|
339
|
+
location: ((k = e == null ? void 0 : e.event_booking) == null ? void 0 : k.location) ?? "",
|
|
340
|
+
bookingType: ((I = e == null ? void 0 : e.event_booking) == null ? void 0 : I.booking_type) ?? "booking",
|
|
341
|
+
buffer: ((M = (D = e == null ? void 0 : e.availability) == null ? void 0 : D.availability_rules) == null ? void 0 : M.buffer) ?? { before: 0, after: 0 },
|
|
342
|
+
cancellationPolicy: ((w = e == null ? void 0 : e.scheduler) == null ? void 0 : w.cancellation_policy) ?? "",
|
|
343
|
+
availableDaysInFuture: ((p = e == null ? void 0 : e.scheduler) == null ? void 0 : p.available_days_in_future) ?? 30,
|
|
344
|
+
minCancellationNotice: ((R = e == null ? void 0 : e.scheduler) == null ? void 0 : R.min_cancellation_notice) ?? 0,
|
|
345
|
+
minBookingNotice: ((f = e == null ? void 0 : e.scheduler) == null ? void 0 : f.min_booking_notice) ?? 60,
|
|
310
346
|
timeslotInterval: {
|
|
311
|
-
interval: ((
|
|
312
|
-
roundTo: (
|
|
347
|
+
interval: ((U = e == null ? void 0 : e.availability) == null ? void 0 : U.interval_minutes) ?? ((m = e == null ? void 0 : e.availability) == null ? void 0 : m.duration_minutes),
|
|
348
|
+
roundTo: (z = e == null ? void 0 : e.availability) == null ? void 0 : z.round_to
|
|
313
349
|
},
|
|
314
|
-
additionalGuestsHidden: ((
|
|
315
|
-
hideCancellationOptions: ((
|
|
316
|
-
hideReschedulingOptions: ((
|
|
317
|
-
participantBookingCalendars: ((
|
|
350
|
+
additionalGuestsHidden: ((A = e == null ? void 0 : e.scheduler) == null ? void 0 : A.hide_additional_guests) ?? !1,
|
|
351
|
+
hideCancellationOptions: ((j = e == null ? void 0 : e.scheduler) == null ? void 0 : j.hide_cancellation_options) ?? !1,
|
|
352
|
+
hideReschedulingOptions: ((T = e == null ? void 0 : e.scheduler) == null ? void 0 : T.hide_rescheduling_options) ?? !1,
|
|
353
|
+
participantBookingCalendars: (($ = e == null ? void 0 : e.participants) == null ? void 0 : $.reduce((_, v) => {
|
|
318
354
|
var x, P;
|
|
319
355
|
return (x = v.booking) != null && x.calendar_id && (_[v.email] = (P = v.booking) == null ? void 0 : P.calendar_id), _;
|
|
320
356
|
})) ?? {},
|
|
321
|
-
participantCalendars: ((J =
|
|
357
|
+
participantCalendars: ((J = e == null ? void 0 : e.participants) == null ? void 0 : J.reduce((_, v) => {
|
|
322
358
|
var x;
|
|
323
359
|
return _[v.email] = (x = v.availability) == null ? void 0 : x.calendar_ids, _;
|
|
324
360
|
}, {})) ?? {},
|
|
325
|
-
reminders: (V =
|
|
326
|
-
emailTemplate: (b =
|
|
327
|
-
redirectUrl: (C =
|
|
328
|
-
slug:
|
|
329
|
-
appearance:
|
|
330
|
-
name:
|
|
361
|
+
reminders: (V = e == null ? void 0 : e.event_booking) == null ? void 0 : V.reminders,
|
|
362
|
+
emailTemplate: (b = e == null ? void 0 : e.scheduler) == null ? void 0 : b.email_template,
|
|
363
|
+
redirectUrl: (C = e == null ? void 0 : e.scheduler) == null ? void 0 : C.confirmation_redirect_url,
|
|
364
|
+
slug: e == null ? void 0 : e.slug,
|
|
365
|
+
appearance: e == null ? void 0 : e.appearance,
|
|
366
|
+
name: e == null ? void 0 : e.name
|
|
331
367
|
};
|
|
332
368
|
}
|
|
333
|
-
setFormState(
|
|
369
|
+
setFormState(e, a) {
|
|
334
370
|
switch (a) {
|
|
335
371
|
case "title":
|
|
336
|
-
this.formState.title =
|
|
372
|
+
this.formState.title = e.toString();
|
|
337
373
|
break;
|
|
338
374
|
case "description":
|
|
339
|
-
this.formState.description =
|
|
375
|
+
this.formState.description = e.toString();
|
|
340
376
|
break;
|
|
341
377
|
case "duration":
|
|
342
|
-
this.formState.duration =
|
|
378
|
+
this.formState.duration = e.toString();
|
|
343
379
|
break;
|
|
344
380
|
case "availability":
|
|
345
|
-
this.formState.availability = JSON.parse(
|
|
381
|
+
this.formState.availability = JSON.parse(e.toString());
|
|
346
382
|
break;
|
|
347
383
|
case "participants":
|
|
348
|
-
this.formState.participants = JSON.parse(
|
|
384
|
+
this.formState.participants = JSON.parse(e.toString());
|
|
349
385
|
break;
|
|
350
386
|
case "booking-calendar":
|
|
351
|
-
this.formState.bookingCalendar =
|
|
387
|
+
this.formState.bookingCalendar = e.toString();
|
|
352
388
|
break;
|
|
353
389
|
case "participant-booking-calendars":
|
|
354
|
-
this.formState.participantBookingCalendars = JSON.parse(
|
|
390
|
+
this.formState.participantBookingCalendars = JSON.parse(e.toString());
|
|
355
391
|
break;
|
|
356
392
|
case "location":
|
|
357
|
-
this.formState.location =
|
|
393
|
+
this.formState.location = e.toString();
|
|
358
394
|
break;
|
|
359
395
|
case "conference":
|
|
360
|
-
this.formState.conferencing = JSON.parse(
|
|
396
|
+
this.formState.conferencing = JSON.parse(e.toString());
|
|
361
397
|
break;
|
|
362
398
|
case "confirmation-type":
|
|
363
|
-
this.formState.bookingType =
|
|
399
|
+
this.formState.bookingType = e.toString();
|
|
364
400
|
break;
|
|
365
401
|
case "buffer-time":
|
|
366
|
-
this.formState.buffer = JSON.parse(
|
|
402
|
+
this.formState.buffer = JSON.parse(e.toString());
|
|
367
403
|
break;
|
|
368
404
|
case "limit-future-bookings":
|
|
369
|
-
this.formState.availableDaysInFuture = parseInt(
|
|
405
|
+
this.formState.availableDaysInFuture = parseInt(e.toString());
|
|
370
406
|
break;
|
|
371
407
|
case "min-cancellation-notice":
|
|
372
|
-
this.formState.minCancellationNotice = parseInt(
|
|
408
|
+
this.formState.minCancellationNotice = parseInt(e.toString());
|
|
373
409
|
break;
|
|
374
410
|
case "min-booking-notice":
|
|
375
|
-
this.formState.minBookingNotice = parseInt(
|
|
411
|
+
this.formState.minBookingNotice = parseInt(e.toString());
|
|
376
412
|
break;
|
|
377
413
|
case "cancellation-policy":
|
|
378
|
-
this.formState.cancellationPolicy =
|
|
414
|
+
this.formState.cancellationPolicy = e.toString();
|
|
379
415
|
break;
|
|
380
416
|
case "timeslot-interval":
|
|
381
|
-
this.formState.timeslotInterval = JSON.parse(
|
|
417
|
+
this.formState.timeslotInterval = JSON.parse(e.toString());
|
|
382
418
|
break;
|
|
383
419
|
case "customize-booking-settings":
|
|
384
|
-
const i = JSON.parse(
|
|
420
|
+
const i = JSON.parse(e.toString());
|
|
385
421
|
this.formState.additionalGuestsHidden = i.additionalGuestsHidden, this.formState.hideCancellationOptions = i.hideCancellationOptions, this.formState.hideReschedulingOptions = i.hideReschedulingOptions;
|
|
386
422
|
break;
|
|
387
423
|
case "participant-custom-availability":
|
|
388
|
-
const
|
|
389
|
-
this.formState.participantOpenHours =
|
|
424
|
+
const n = JSON.parse(e.toString());
|
|
425
|
+
this.formState.participantOpenHours = n;
|
|
390
426
|
break;
|
|
391
427
|
case "additional-fields":
|
|
392
|
-
this.formState.additionalFields =
|
|
428
|
+
this.formState.additionalFields = e;
|
|
393
429
|
break;
|
|
394
430
|
case "connected-calendars":
|
|
395
|
-
this.formState.participantCalendars = JSON.parse(
|
|
431
|
+
this.formState.participantCalendars = JSON.parse(e.toString());
|
|
396
432
|
break;
|
|
397
433
|
case "confirmation-email-template":
|
|
398
|
-
this.formState.emailTemplate = JSON.parse(
|
|
434
|
+
this.formState.emailTemplate = JSON.parse(e.toString());
|
|
399
435
|
break;
|
|
400
436
|
case "reminder-overrides":
|
|
401
|
-
this.formState.reminders = { overrides: JSON.parse(
|
|
437
|
+
this.formState.reminders = { overrides: JSON.parse(e.toString()) };
|
|
402
438
|
break;
|
|
403
439
|
case "confirmation-redirect":
|
|
404
|
-
this.formState.redirectUrl =
|
|
440
|
+
this.formState.redirectUrl = e.toString();
|
|
405
441
|
break;
|
|
406
442
|
case "availability-method":
|
|
407
|
-
this.formState.availabilityMethod =
|
|
443
|
+
this.formState.availabilityMethod = e.toString();
|
|
408
444
|
break;
|
|
409
445
|
case "custom-event-slug":
|
|
410
|
-
this.formState.slug = JSON.parse(
|
|
446
|
+
this.formState.slug = JSON.parse(e.toString());
|
|
411
447
|
break;
|
|
412
448
|
case "page-styling":
|
|
413
|
-
this.formState.appearance = JSON.parse(
|
|
449
|
+
this.formState.appearance = JSON.parse(e.toString());
|
|
414
450
|
break;
|
|
415
451
|
case "page-name":
|
|
416
|
-
this.formState.name = JSON.parse(
|
|
452
|
+
this.formState.name = JSON.parse(e.toString());
|
|
417
453
|
break;
|
|
418
454
|
}
|
|
419
455
|
this.schedulerEditorFormUpdated.emit({
|
|
420
|
-
value:
|
|
456
|
+
value: e,
|
|
421
457
|
name: a
|
|
422
458
|
});
|
|
423
459
|
}
|
|
@@ -426,28 +462,31 @@ const Pt = class {
|
|
|
426
462
|
this.setFormState(a, i);
|
|
427
463
|
}), this.formState = { ...this.formState }, this.formState;
|
|
428
464
|
}
|
|
429
|
-
setActiveTab(
|
|
430
|
-
|
|
465
|
+
setActiveTab(e, a) {
|
|
466
|
+
e.preventDefault(), this.updateFormState(), this.activeTab = a;
|
|
431
467
|
}
|
|
432
|
-
hideTab(
|
|
468
|
+
hideTab(e) {
|
|
433
469
|
var a;
|
|
434
|
-
return ((a = this.hideEditorTabs) == null ? void 0 : a.includes(
|
|
470
|
+
return ((a = this.hideEditorTabs) == null ? void 0 : a.includes(e)) || !1;
|
|
471
|
+
}
|
|
472
|
+
onFeedbackClick() {
|
|
473
|
+
this.showFeedbackModal = !0;
|
|
435
474
|
}
|
|
436
475
|
render() {
|
|
437
|
-
var
|
|
438
|
-
return u("[nylas-editor-tabs]", "render", this.formState),
|
|
439
|
-
i.preventDefault(), this.previewButtonClicked.emit(this.host).defaultPrevented || window.open(q(this.schedulerPreviewLink, this.selectedConfiguration), "_blank");
|
|
440
|
-
}, variant: "basic" }, "Preview")), e("div", { key: "6d2945eddb509a13948de8419171da2078df9bd5", class: "buttons", part: "editor__footer-buttons" }, e("p", { key: "3605d668cf634bfdf8ed2a7aa2525c3acd4c0099", class: {
|
|
476
|
+
var e, a;
|
|
477
|
+
return u("[nylas-editor-tabs]", "render", this.formState), t(Fe, { key: "d7a5fde3ab147071d7b148a5368fcb6974d63af7" }, t("form", { key: "71ec72faefeab5aa28deae27d3220fbd7e89260d", onSubmit: this.formSubmissionHandler, class: "scheduler-editor", ref: (i) => this.formRef = i, noValidate: !0 }, this.mode === "app" ? t("div", { class: "form-contents" }, t("div", { class: "tabs" }, t("button", { name: o.EventInfo, class: { tab: !0, active: this.activeTab == o.EventInfo, hide: this.hideTab(o.EventInfo) }, part: "editortab__event-info", onClick: (i) => this.setActiveTab(i, o.EventInfo) }, t("calendar-info-icon", { width: "16", height: "16" }), "Event info"), t("button", { name: o.Availability, class: { tab: !0, active: this.activeTab == o.Availability, hide: this.hideTab(o.Availability) }, part: "editortab__availability", onClick: (i) => this.setActiveTab(i, o.Availability) }, t("calendar-patterns-icon", { width: "16", height: "16" }), "Availability"), t("button", { name: o.Participants, class: { tab: !0, active: this.activeTab == o.Participants, hide: this.hideTab(o.Participants) }, part: "editortab__participants", onClick: (i) => this.setActiveTab(i, o.Participants) }, t("people-icon", { width: "16", height: "16" }), "Participants"), t("button", { name: o.BookingOptions, class: { tab: !0, active: this.activeTab == o.BookingOptions, hide: this.hideTab(o.BookingOptions) }, part: "editortab__booking-options", onClick: (i) => this.setActiveTab(i, o.BookingOptions) }, t("flow-icon", { width: "16", height: "16" }), "Booking options"), t("button", { name: o.BookingForm, class: { tab: !0, active: this.activeTab == "bookingForm", hide: this.hideTab(o.BookingForm) }, part: "editortab__booking-form", onClick: (i) => this.setActiveTab(i, o.BookingForm) }, this.activeTab == o.BookingForm ? t("calendar-agenda-fill-icon", { width: "16", height: "16" }) : t("calendar-agenda-icon", { width: "16", height: "16" }), "Booking form"), t("button", { name: o.Communications, class: { tab: !0, active: this.activeTab == "communications", hide: this.hideTab(o.Communications) }, onClick: (i) => this.setActiveTab(i, o.Communications) }, this.activeTab == o.Communications ? t("envelope-fill-icon", { width: "16", height: "16" }) : t("envelope-icon", { width: "16", height: "16" }), "Communications"), t("button", { name: o.PageStyles, class: { tab: !0, active: this.activeTab == "pageStyles", hide: this.hideTab(o.PageStyles) }, onClick: (i) => this.setActiveTab(i, o.PageStyles) }, this.activeTab == o.PageStyles ? t("paintbrush-fill-icon", { width: "16", height: "16" }) : t("paintbrush-icon", { width: "16", height: "16" }), "Page styles")), t("div", { class: "tab-content" }, t(Ge, { formState: this.formState, activeTab: this.activeTab, currentUser: this.currentUser, calendars: this.calendars, id: ((e = this.selectedConfiguration) == null ? void 0 : e.id) ?? "new" }))) : t("div", { class: "composable", key: (a = this.selectedConfiguration) == null ? void 0 : a.id }, t("slot", null)), t("div", { key: "2b2a589aa3fd566f72af4a733051dc1b53fef9a7", class: "footer", part: "editor__footer" }, t("div", { key: "76b8ecaa5432057a9152ad6b33521a27bebf7fdb", class: "preview", part: "editor__footer-preview" }, this.enableUserFeedback && t("button-component", { title: "Share your feedback", id: "report-issue", variant: "basic", onClick: () => this.onFeedbackClick() }, t("feedback-icon", null))), t("div", { key: "06e5dabcdd6d3f1ecba330777eda97f9e0d968ed", class: "buttons", part: "editor__footer-buttons" }, t("p", { key: "3eee680846e5a80e48acda1078acffe60e0f9a0e", class: {
|
|
441
478
|
"unsaved-changes": this.hasUnsavedChanges && !this.changesSaved,
|
|
442
479
|
"saved-changes": this.changesSaved,
|
|
443
480
|
error: this.error !== "",
|
|
444
481
|
"error-full-width": this.error !== "" && this.action === "create"
|
|
445
|
-
} }, this.error !== "" ? this.error : "", this.error == "" && this.hasUnsavedChanges && !this.changesSaved ? "Unsaved changes" : this.error == "" && this.changesSaved ? "Changes saved!" : ""),
|
|
482
|
+
} }, this.error !== "" ? this.error : "", this.error == "" && this.hasUnsavedChanges && !this.changesSaved ? "Unsaved changes" : this.error == "" && this.changesSaved ? "Changes saved!" : ""), this.schedulerPreviewLink !== "" && this.action === "edit" && t("button-component", { title: "Preview", type: "button", disabled: this.isLoading, clickHandler: (i) => {
|
|
483
|
+
i.preventDefault(), this.previewButtonClicked.emit(this.host).defaultPrevented || window.open(q(this.schedulerPreviewLink, this.selectedConfiguration), "_blank");
|
|
484
|
+
}, variant: "basic" }, t("eye-icon", null)), t("button-component", { key: "5decc98d53884dae97d9bc9a557fb4bf2884191b", type: "button", disabled: this.isLoading, clickHandler: (i) => {
|
|
446
485
|
i.preventDefault(), this.cancelButtonClick.emit(), this.error = "";
|
|
447
|
-
}, variant: "basic", part: "editor__footer-cancel" }, "Back"),
|
|
486
|
+
}, variant: "basic", part: "editor__footer-cancel" }, "Back"), t("button-component", { key: "52c52c11e0fd388afd781934cdec285d5932a6c5", type: "submit", disabled: this.isLoading, part: "editor__footer-cta" }, this.isLoading ? t("span", null, "Saving", t("loading-icon", null), " ") : this.action === "create" ? "Create" : "Save changes")))), this.showFeedbackModal && t("nylas-feedback-form", null));
|
|
448
487
|
}
|
|
449
488
|
get host() {
|
|
450
|
-
return
|
|
489
|
+
return Le(this);
|
|
451
490
|
}
|
|
452
491
|
static get watchers() {
|
|
453
492
|
return {
|
|
@@ -456,8 +495,8 @@ const Pt = class {
|
|
|
456
495
|
};
|
|
457
496
|
}
|
|
458
497
|
};
|
|
459
|
-
|
|
460
|
-
|
|
498
|
+
Ke([
|
|
499
|
+
Te({
|
|
461
500
|
name: "nylas-editor-tabs",
|
|
462
501
|
stateToProps: /* @__PURE__ */ new Map([
|
|
463
502
|
["schedulerConfig.calendars", "calendars"],
|
|
@@ -466,63 +505,66 @@ Jt([
|
|
|
466
505
|
["schedulerConfig.hideEditorTabs", "hideEditorTabs"]
|
|
467
506
|
]),
|
|
468
507
|
eventToProps: {
|
|
469
|
-
schedulerConfigChanged: async (
|
|
470
|
-
const { resetLoadingState: i, setError:
|
|
471
|
-
const [h,
|
|
472
|
-
!h &&
|
|
508
|
+
schedulerConfigChanged: async (e, a) => {
|
|
509
|
+
const { resetLoadingState: i, setError: n, action: l, config: s } = e.detail, c = (d) => {
|
|
510
|
+
const [h, y] = d;
|
|
511
|
+
!h && y && n && n(y), i && i(e);
|
|
473
512
|
};
|
|
474
513
|
if (l === "edit") {
|
|
475
|
-
const d = await a.schedulerConfig.updateConfiguration(
|
|
514
|
+
const d = await a.schedulerConfig.updateConfiguration(s);
|
|
476
515
|
c(d);
|
|
477
516
|
} else {
|
|
478
|
-
const d = await a.schedulerConfig.createConfiguration(
|
|
517
|
+
const d = await a.schedulerConfig.createConfiguration(s);
|
|
479
518
|
c(d);
|
|
480
519
|
}
|
|
481
520
|
},
|
|
482
|
-
cancelButtonClick: async (
|
|
521
|
+
cancelButtonClick: async (e, a) => {
|
|
483
522
|
a.schedulerConfigStore.state.action = null;
|
|
484
523
|
},
|
|
485
|
-
previewButtonClicked: async (
|
|
524
|
+
previewButtonClicked: async (e, a) => {
|
|
486
525
|
u("[nylas-editor-tabs]", "previewButtonClicked", a);
|
|
487
526
|
},
|
|
488
|
-
formSubmitted: async (
|
|
527
|
+
formSubmitted: async (e, a) => {
|
|
489
528
|
u("[nylas-editor-tabs]", "formSubmitted", a);
|
|
490
529
|
},
|
|
491
|
-
schedulerEditorFormUpdated: async (
|
|
492
|
-
u("[nylas-editor-tabs]", "schedulerEditorFormUpdated",
|
|
530
|
+
schedulerEditorFormUpdated: async (e, a) => {
|
|
531
|
+
u("[nylas-editor-tabs]", "schedulerEditorFormUpdated", e);
|
|
493
532
|
}
|
|
494
533
|
},
|
|
495
|
-
localPropsToProp: /* @__PURE__ */ new Map([
|
|
534
|
+
localPropsToProp: /* @__PURE__ */ new Map([
|
|
535
|
+
["schedulerPreviewLink", "schedulerPreviewLink"],
|
|
536
|
+
["enableUserFeedback", "enableUserFeedback"]
|
|
537
|
+
]),
|
|
496
538
|
fireRegisterEvent: !0
|
|
497
539
|
}),
|
|
498
540
|
G("design:type", Function),
|
|
499
541
|
G("design:paramtypes", []),
|
|
500
542
|
G("design:returntype", void 0)
|
|
501
|
-
],
|
|
502
|
-
|
|
503
|
-
const
|
|
504
|
-
var
|
|
505
|
-
var l = arguments.length,
|
|
543
|
+
], Pe.prototype, "render", null);
|
|
544
|
+
Pe.style = qe;
|
|
545
|
+
const Qe = ':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-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.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:1rem;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}.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{text-align:right}.configurations .table-container table .actions{display:flex;justify-content:flex-end;gap:1rem}@media screen and (max-width: 768px){.configurations .table-container table .actions{flex-direction:column;gap:0.5rem}}.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)}', Xe = Qe;
|
|
546
|
+
var Ye = function(e, a, i, n) {
|
|
547
|
+
var l = arguments.length, s = l < 3 ? a : n === null ? n = Object.getOwnPropertyDescriptor(a, i) : n, c;
|
|
506
548
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
507
|
-
|
|
549
|
+
s = Reflect.decorate(e, a, i, n);
|
|
508
550
|
else
|
|
509
|
-
for (var d =
|
|
510
|
-
(c =
|
|
511
|
-
return l > 3 &&
|
|
512
|
-
}, W = function(
|
|
551
|
+
for (var d = e.length - 1; d >= 0; d--)
|
|
552
|
+
(c = e[d]) && (s = (l < 3 ? c(s) : l > 3 ? c(a, i, s) : c(a, i)) || s);
|
|
553
|
+
return l > 3 && s && Object.defineProperty(a, i, s), s;
|
|
554
|
+
}, W = function(e, a) {
|
|
513
555
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
514
|
-
return Reflect.metadata(
|
|
556
|
+
return Reflect.metadata(e, a);
|
|
515
557
|
};
|
|
516
|
-
const
|
|
517
|
-
constructor(
|
|
518
|
-
Z(this,
|
|
558
|
+
const Ee = class {
|
|
559
|
+
constructor(e) {
|
|
560
|
+
Z(this, e), this.initListConfigurations = S(this, "initListConfigurations", 7), this.createButtonClick = S(this, "createButtonClick", 7), this.editButtonClick = S(this, "editButtonClick", 7), this.deleteButtonClick = S(this, "deleteButtonClick", 7), this.configurations = [], this.schedulerPreviewLink = "", this.listConfigurationsNextCursor = void 0, this.state = "loading", this.error = "", this.currentCursor = null, this.previousCursors = [], this.disableNextPageButton = !1;
|
|
519
561
|
}
|
|
520
|
-
listConfigurationsNextCursorChangedHandler(
|
|
521
|
-
if (!
|
|
522
|
-
|
|
562
|
+
listConfigurationsNextCursorChangedHandler(e, a) {
|
|
563
|
+
if (!e || e === a) {
|
|
564
|
+
e === null && (this.disableNextPageButton = !0);
|
|
523
565
|
return;
|
|
524
566
|
}
|
|
525
|
-
this.disableNextPageButton = !1, this.currentCursor =
|
|
567
|
+
this.disableNextPageButton = !1, this.currentCursor = e;
|
|
526
568
|
}
|
|
527
569
|
connectedCallback() {
|
|
528
570
|
u("[nylas-list-configurations]", "connectedCallback");
|
|
@@ -538,35 +580,35 @@ const Et = class {
|
|
|
538
580
|
disconnectedCallback() {
|
|
539
581
|
u("[nylas-list-configurations]", "disconnectedCallback");
|
|
540
582
|
}
|
|
541
|
-
async handleNylasFormDropdownChanged(
|
|
542
|
-
u("[nylas-list-configurations]", "handleNylasFormDropdownChanged",
|
|
543
|
-
const { value: a } =
|
|
544
|
-
switch (
|
|
583
|
+
async handleNylasFormDropdownChanged(e) {
|
|
584
|
+
u("[nylas-list-configurations]", "handleNylasFormDropdownChanged", e.detail);
|
|
585
|
+
const { value: a } = e.detail, [i, n] = a.split("-");
|
|
586
|
+
switch (e.preventDefault(), i) {
|
|
545
587
|
case "delete":
|
|
546
|
-
this.deleteButtonClick.emit({ host: this.host, configuration: this.configurations[
|
|
588
|
+
this.deleteButtonClick.emit({ host: this.host, configuration: this.configurations[n] });
|
|
547
589
|
break;
|
|
548
590
|
case "preview":
|
|
549
|
-
window.open(q(this.schedulerPreviewLink, this.configurations[
|
|
591
|
+
window.open(q(this.schedulerPreviewLink, this.configurations[n]), "_blank");
|
|
550
592
|
break;
|
|
551
593
|
case "copy":
|
|
552
|
-
await navigator.clipboard.writeText(q(this.schedulerPreviewLink, this.configurations[
|
|
594
|
+
await navigator.clipboard.writeText(q(this.schedulerPreviewLink, this.configurations[n]));
|
|
553
595
|
break;
|
|
554
596
|
}
|
|
555
597
|
}
|
|
556
598
|
async getState() {
|
|
557
599
|
return this.state;
|
|
558
600
|
}
|
|
559
|
-
async setState(
|
|
560
|
-
this.state =
|
|
601
|
+
async setState(e) {
|
|
602
|
+
this.state = e;
|
|
561
603
|
}
|
|
562
|
-
async setError(
|
|
563
|
-
this.error =
|
|
604
|
+
async setError(e) {
|
|
605
|
+
this.error = e;
|
|
564
606
|
}
|
|
565
|
-
getDurationString(
|
|
566
|
-
const a = Math.floor(
|
|
607
|
+
getDurationString(e) {
|
|
608
|
+
const a = Math.floor(e / 60), i = e % 60;
|
|
567
609
|
return `${a || ""} ${a ? `${a > 1 ? "hours" : "hour"}` : ""} ${i || ""} ${i ? `${i > 1 ? "mins" : "min"}` : ""}`;
|
|
568
610
|
}
|
|
569
|
-
getActionLabelHTML(
|
|
611
|
+
getActionLabelHTML(e) {
|
|
570
612
|
const a = {
|
|
571
613
|
display: "inline-flex",
|
|
572
614
|
alignItems: "center",
|
|
@@ -574,13 +616,13 @@ const Et = class {
|
|
|
574
616
|
}, i = {
|
|
575
617
|
color: "var(--nylas-error)"
|
|
576
618
|
};
|
|
577
|
-
switch (
|
|
619
|
+
switch (e) {
|
|
578
620
|
case "preview":
|
|
579
|
-
return
|
|
621
|
+
return t("span", { style: a }, t("eye-icon", { width: "16", height: "16" }), "Preview");
|
|
580
622
|
case "copy":
|
|
581
|
-
return
|
|
623
|
+
return t("span", { style: a }, t("copy-icon", { width: "16", height: "16" }), "Copy");
|
|
582
624
|
case "delete":
|
|
583
|
-
return
|
|
625
|
+
return t("span", { style: { ...a, ...i } }, t("delete-icon", { width: "15", height: "17" }), "Delete");
|
|
584
626
|
default:
|
|
585
627
|
return "";
|
|
586
628
|
}
|
|
@@ -589,10 +631,10 @@ const Et = class {
|
|
|
589
631
|
if (this.previousCursors.length === 0)
|
|
590
632
|
return;
|
|
591
633
|
this.currentCursor = this.previousCursors.pop() || null;
|
|
592
|
-
const
|
|
634
|
+
const e = this.previousCursors[this.previousCursors.length - 1] || void 0;
|
|
593
635
|
this.initListConfigurations.emit({
|
|
594
636
|
host: this.host,
|
|
595
|
-
cursor:
|
|
637
|
+
cursor: e
|
|
596
638
|
});
|
|
597
639
|
}
|
|
598
640
|
nextPageClickedHandler() {
|
|
@@ -602,24 +644,24 @@ const Et = class {
|
|
|
602
644
|
}));
|
|
603
645
|
}
|
|
604
646
|
render() {
|
|
605
|
-
return
|
|
647
|
+
return t(Fe, null, t("div", { class: "header" }, t("div", { class: "description" }, t("h2", null, "All Scheduling Pages"), t("p", null, "Create and manage your Scheduling Pages.")), this.configurations && this.configurations.length > 0 && t("div", { class: "actions" }, t("button-component", { part: "nlc__create-new-cta", clickHandler: () => {
|
|
606
648
|
this.createButtonClick.emit(this.host);
|
|
607
|
-
} }, "Create new"))),
|
|
649
|
+
} }, "Create new"))), t("div", { class: "configurations" }, t("div", { class: "table-container" }, t("table", { class: {
|
|
608
650
|
"no-configurations": this.state !== "loading" && (!this.configurations || this.configurations.length === 0)
|
|
609
|
-
} },
|
|
651
|
+
} }, t("tr", { class: {
|
|
610
652
|
hide: this.state === "loading" || this.configurations && this.configurations.length === 0
|
|
611
|
-
} },
|
|
653
|
+
} }, t("th", null, "Page title"), t("th", null, "Duration"), t("th", null)), this.state === "loading" && t("tr", { class: "no-configurations" }, t("td", { colSpan: 3 }, t("div", null, t("h3", null, "Loading..."), t("p", null, "Please wait while we fetch the scheduling pages")))), this.state !== "loading" && (!this.configurations || this.configurations.length === 0) && t("tr", { class: "no-configurations" }, t("td", { colSpan: 3 }, t("div", null, t("calendar-icon", { width: "48", height: "48" }), t("h3", null, "No scheduling pages found"), t("p", null, "Get started with creating your first scheduling page"), t("button-component", { part: "nlc__create-new-cta", clickHandler: () => {
|
|
612
654
|
this.createButtonClick.emit(this.host);
|
|
613
|
-
} }, "Create new")))), this.state !== "loading" && this.configurations.map((
|
|
614
|
-
i.preventDefault(), this.editButtonClick.emit({ host: this.host, configuration:
|
|
615
|
-
} },
|
|
655
|
+
} }, "Create new")))), this.state !== "loading" && this.configurations.map((e, a) => t("tr", { key: e.id }, t("td", null, t("div", { class: "title" }, t("div", { class: "config-event-title", title: e.event_booking.title }, e.event_booking.title), t("div", { class: "config-event-description" }, e.event_booking.description))), t("td", null, t("div", { class: "duration" }, this.getDurationString(e.availability.duration_minutes))), t("td", null, t("div", { class: "actions" }, t("button-component", { variant: "basic", key: `edit-${a}`, clickHandler: (i) => {
|
|
656
|
+
i.preventDefault(), this.editButtonClick.emit({ host: this.host, configuration: e });
|
|
657
|
+
} }, t("edit-icon", { width: "16", height: "16" }), "Edit"), t("select-dropdown", { name: "actions", options: [
|
|
616
658
|
{ value: `preview-${a}`, label: "Preview", labelHTML: this.getActionLabelHTML("preview") },
|
|
617
659
|
{ value: `copy-${a}`, label: "Copy link", labelHTML: this.getActionLabelHTML("copy") },
|
|
618
660
|
{ value: `delete-${a}`, label: "Delete", labelHTML: this.getActionLabelHTML("delete") }
|
|
619
|
-
], 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" }))))))),
|
|
661
|
+
], 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" }))))))), t("div", { class: "pagination" }, t("button", { class: "arrow left", onClick: () => this.previousPageClickedHandler(), disabled: this.previousCursors.length <= 0 }, t("chevron-icon", null)), t("button", { class: "arrow right", onClick: () => this.nextPageClickedHandler(), disabled: this.disableNextPageButton }, t("chevron-icon", null)))), this.state === "error" && t("div", { class: "error-container" }, t("p", { class: "error" }, this.error)));
|
|
620
662
|
}
|
|
621
663
|
get host() {
|
|
622
|
-
return
|
|
664
|
+
return Le(this);
|
|
623
665
|
}
|
|
624
666
|
static get watchers() {
|
|
625
667
|
return {
|
|
@@ -627,8 +669,8 @@ const Et = class {
|
|
|
627
669
|
};
|
|
628
670
|
}
|
|
629
671
|
};
|
|
630
|
-
|
|
631
|
-
|
|
672
|
+
Ye([
|
|
673
|
+
Te({
|
|
632
674
|
name: "nylas-list-configurations",
|
|
633
675
|
stateToProps: /* @__PURE__ */ new Map([
|
|
634
676
|
["schedulerConfig.configurations", "configurations"],
|
|
@@ -636,25 +678,25 @@ Gt([
|
|
|
636
678
|
]),
|
|
637
679
|
localPropsToProp: /* @__PURE__ */ new Map([["schedulerPreviewLink", "schedulerPreviewLink"]]),
|
|
638
680
|
eventToProps: {
|
|
639
|
-
initListConfigurations: async (
|
|
640
|
-
const { host: i, cursor:
|
|
681
|
+
initListConfigurations: async (e, a) => {
|
|
682
|
+
const { host: i, cursor: n } = e.detail;
|
|
641
683
|
await i.setState("loading");
|
|
642
|
-
const [l,
|
|
643
|
-
if (!l &&
|
|
644
|
-
await i.setState("error"), await i.setError(
|
|
684
|
+
const [l, s] = await a.schedulerConfig.getConfigurations(n);
|
|
685
|
+
if (!l && s && s.message) {
|
|
686
|
+
await i.setState("error"), await i.setError(s.message);
|
|
645
687
|
return;
|
|
646
688
|
}
|
|
647
689
|
await i.setState("loaded");
|
|
648
690
|
},
|
|
649
|
-
createButtonClick: async (
|
|
691
|
+
createButtonClick: async (e, a) => {
|
|
650
692
|
a.schedulerConfigStore.resetSelectedConfiguration(), a.schedulerConfigStore.state.action = "create";
|
|
651
693
|
},
|
|
652
|
-
deleteButtonClick: async (
|
|
653
|
-
const { host: i, configuration:
|
|
654
|
-
!l &&
|
|
694
|
+
deleteButtonClick: async (e, a) => {
|
|
695
|
+
const { host: i, configuration: n } = e.detail, [l, s] = await a.schedulerConfig.deleteConfiguration(n.id);
|
|
696
|
+
!l && s && s.message && (await i.setState("error"), await i.setError(s.message));
|
|
655
697
|
},
|
|
656
|
-
editButtonClick: async (
|
|
657
|
-
const { configuration: i } =
|
|
698
|
+
editButtonClick: async (e, a) => {
|
|
699
|
+
const { configuration: i } = e.detail;
|
|
658
700
|
a.schedulerConfigStore.state.selectedConfiguration = i, a.schedulerConfigStore.state.action = "edit";
|
|
659
701
|
}
|
|
660
702
|
},
|
|
@@ -663,11 +705,11 @@ Gt([
|
|
|
663
705
|
W("design:type", Function),
|
|
664
706
|
W("design:paramtypes", []),
|
|
665
707
|
W("design:returntype", void 0)
|
|
666
|
-
],
|
|
667
|
-
|
|
708
|
+
], Ee.prototype, "render", null);
|
|
709
|
+
Ee.style = Xe;
|
|
668
710
|
export {
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
711
|
+
$e as google_logo_icon,
|
|
712
|
+
Ze as microsoft_logo_icon,
|
|
713
|
+
Pe as nylas_editor_tabs,
|
|
714
|
+
Ee as nylas_list_configurations
|
|
673
715
|
};
|