@nylas/react 1.0.2-prealpha1 → 1.1.0-canary.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_22.entry-8d0ac489.cjs +1 -0
- package/dist/add-circle-icon_22.entry-da31fa71.js +1733 -0
- package/dist/{archive-icon_7.entry-84d70dbf.cjs → archive-icon_7.entry-7aad8104.cjs} +1 -1
- package/dist/{archive-icon_7.entry-91aaa1aa.js → archive-icon_7.entry-bc2418f7.js} +20 -20
- package/dist/{arrow-icon.entry-400a08fa.cjs → arrow-icon.entry-6eba68a9.cjs} +1 -1
- package/dist/arrow-icon.entry-9a932082.js +15 -0
- package/dist/{bold-icon_3.entry-4b2798a8.js → bold-icon_3.entry-5f7e3755.js} +4 -4
- package/dist/{bold-icon_3.entry-9ad35153.cjs → bold-icon_3.entry-db17d481.cjs} +1 -1
- package/dist/{calendar-cancel-icon.entry-83ba884a.js → calendar-cancel-icon.entry-1ff7845a.js} +4 -4
- package/dist/{calendar-cancel-icon.entry-fcb66929.cjs → calendar-cancel-icon.entry-a5141f82.cjs} +1 -1
- package/dist/calendar-check-icon_2.entry-c3add652.cjs +1 -0
- package/dist/calendar-check-icon_2.entry-d7421059.js +25 -0
- package/dist/{calendar-icon.entry-8f38af4a.js → calendar-icon.entry-4458997f.js} +2 -2
- package/dist/{calendar-icon.entry-7bae38d7.cjs → calendar-icon.entry-445d624a.cjs} +1 -1
- package/dist/chevron-icon_3.entry-8961e6bb.cjs +1 -0
- package/dist/chevron-icon_3.entry-f7f3d487.js +117 -0
- package/dist/close-icon.entry-6dd5ff0a.js +15 -0
- package/dist/close-icon.entry-ebc527c5.cjs +1 -0
- package/dist/{nylas-booked-event-card_10.entry-7e66a648.js → constants-6ee60d6d-4cd16450.js} +1656 -2374
- package/dist/{nylas-booked-event-card_10.entry-ed515326.cjs → constants-6ee60d6d-6c0540db.cjs} +6 -6
- package/dist/document-refresh-icon.entry-298b2133.cjs +1 -0
- package/dist/document-refresh-icon.entry-bdc323b5.js +15 -0
- package/dist/elements/index.d.ts +31 -2
- package/dist/{forward-icon_6.entry-3345af84.cjs → forward-icon_6.entry-15208ea9.cjs} +3 -3
- package/dist/{forward-icon_6.entry-b60fcb35.js → forward-icon_6.entry-62759373.js} +127 -127
- package/dist/{globe-icon.entry-e3fd373f.js → globe-icon.entry-9e082178.js} +4 -4
- package/dist/{globe-icon.entry-8325e73e.cjs → globe-icon.entry-c8302bf5.cjs} +1 -1
- package/dist/google-logo-icon_3.entry-0c095209.js +258 -0
- package/dist/google-logo-icon_3.entry-f8433ff9.cjs +1 -0
- package/dist/index-0f3bd8df.js +1824 -0
- package/dist/index-7a55dc33.cjs +30 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.es-2578c6a5-098d48d0.cjs +7 -0
- package/dist/{index-b30d446a-a90f84b2.js → index.es-2578c6a5-71441142.js} +833 -933
- package/dist/info-icon_2.entry-73106882.js +34 -0
- package/dist/info-icon_2.entry-ca224a3b.cjs +1 -0
- package/dist/{loading-icon.entry-27410cf8.js → loading-icon.entry-012644b7.js} +4 -4
- package/dist/{loading-icon.entry-b2096d2b.cjs → loading-icon.entry-f9f5e66f.cjs} +1 -1
- package/dist/mailbox-store-bb21512c-045c3ea0.cjs +1 -0
- package/dist/{mailbox-store-19f0c6c9-e3e8b4e5.js → mailbox-store-bb21512c-615660ef.js} +17 -16
- package/dist/nylas-additional-participants.entry-a50ef8e2.cjs +1 -0
- package/dist/nylas-additional-participants.entry-db85836a.js +83 -0
- package/dist/nylas-booked-event-card_10.entry-b49b2369.js +784 -0
- package/dist/nylas-booked-event-card_10.entry-fccb783c.cjs +1 -0
- package/dist/nylas-form-card.entry-090a4d3b.js +56 -0
- package/dist/nylas-form-card.entry-f5230005.cjs +1 -0
- package/dist/nylas-if-state.entry-7924dde0.js +96 -0
- package/dist/nylas-if-state.entry-ff9c9a85.cjs +1 -0
- package/dist/{nylas-list-folders.entry-a5437201.js → nylas-list-folders.entry-9dd96530.js} +9 -8
- package/dist/nylas-list-folders.entry-dbfc2cf8.cjs +1 -0
- package/dist/nylas-list-threads.entry-6bcc0328.cjs +1 -0
- package/dist/{nylas-list-threads.entry-fd6cda61.js → nylas-list-threads.entry-b435eaae.js} +5 -4
- package/dist/nylas-login.entry-1623d309.cjs +1 -0
- package/dist/nylas-login.entry-97350c76.js +75 -0
- package/dist/nylas-mailbox-pagination.entry-1776eb16.cjs +1 -0
- package/dist/{nylas-mailbox-pagination.entry-988214bc.js → nylas-mailbox-pagination.entry-ceef8be2.js} +4 -3
- package/dist/nylas-mailbox-toolbar-button.entry-7d3f79b9.cjs +1 -0
- package/dist/{nylas-mailbox-toolbar-button.entry-c720e22a.js → nylas-mailbox-toolbar-button.entry-e6b3d3a4.js} +11 -10
- package/dist/nylas-mailbox.entry-06d8014a.js +136 -0
- package/dist/nylas-mailbox.entry-ae8da6ff.cjs +1 -0
- package/dist/{nylas-provider.entry-70721009.js → nylas-provider.entry-8b9c2b69.js} +46 -33
- package/dist/nylas-provider.entry-97c9e272.cjs +1 -0
- package/dist/nylas-scheduler-editor.entry-c3791787.js +2181 -0
- package/dist/nylas-scheduler-editor.entry-f6cf1cd9.cjs +7 -0
- package/dist/nylas-scheduling.entry-08ae840a.cjs +1 -0
- package/dist/nylas-scheduling.entry-6380509a.js +237 -0
- package/dist/nylas-threads-refresh.entry-246e6d77.cjs +1 -0
- package/dist/{nylas-threads-refresh.entry-b7f9e93f.js → nylas-threads-refresh.entry-eaee86fb.js} +6 -5
- package/dist/nylas-threads-search.entry-42a2acb1.cjs +1 -0
- package/dist/{nylas-threads-search.entry-95afea9c.js → nylas-threads-search.entry-7e12758e.js} +15 -14
- package/dist/nylas-view-thread.entry-78e6927a.cjs +1 -0
- package/dist/{nylas-view-thread.entry-165173b1.js → nylas-view-thread.entry-b936e76a.js} +5 -4
- package/dist/people-icon.entry-5c8ee696.js +15 -0
- package/dist/people-icon.entry-bcf848c0.cjs +1 -0
- package/dist/play-icon_2.entry-356e63cc.js +25 -0
- package/dist/play-icon_2.entry-92e78f1b.cjs +1 -0
- package/dist/react.cjs +1 -1
- package/dist/react.js +92 -61
- package/dist/{refresh-icon.entry-e48a338f.js → refresh-icon.entry-77f0c377.js} +2 -2
- package/dist/{refresh-icon.entry-601cac89.cjs → refresh-icon.entry-bec053b6.cjs} +1 -1
- package/dist/{register-component-152c6ad2-a06f58c2.js → register-component-dc659dc3-0fdb18dc.js} +2 -2
- package/dist/{register-component-152c6ad2-0df7215b.cjs → register-component-dc659dc3-f58bf25b.cjs} +1 -1
- package/dist/scheduler-config-store-51ee4f42-ce3a9b0e.cjs +1 -0
- package/dist/scheduler-config-store-51ee4f42-e02895da.js +14 -0
- package/dist/{scheduler-store-7d48e682-0c0c3991.js → scheduler-store-72116723-3ba2480c.js} +100 -95
- package/dist/scheduler-store-72116723-db9d91f6.cjs +1 -0
- package/dist/time-period-selector.entry-decd251b.js +78 -0
- package/dist/time-period-selector.entry-f25fad77.cjs +1 -0
- package/dist/translate-icon.entry-cac02c46.js +15 -0
- package/dist/translate-icon.entry-dd5b707c.cjs +1 -0
- package/dist/utils-c00bdc3c-89ab163d.js +2111 -0
- package/dist/utils-c00bdc3c-94b9c3b6.cjs +8 -0
- package/dist/warning-icon.entry-370b9cf0.js +15 -0
- package/dist/warning-icon.entry-8af8a742.cjs +1 -0
- package/package.json +7 -4
- package/dist/add-circle-icon.entry-2ccb238b.cjs +0 -1
- package/dist/add-circle-icon.entry-35d6aa07.js +0 -15
- package/dist/arrow-icon.entry-8b2e96a6.js +0 -15
- package/dist/calendar-check-icon_3.entry-903e2d82.js +0 -35
- package/dist/calendar-check-icon_3.entry-a16ce05e.cjs +0 -1
- package/dist/chevron-icon.entry-58366662.cjs +0 -1
- package/dist/chevron-icon.entry-5e11cef5.js +0 -15
- package/dist/close-icon_2.entry-011d9cf4.js +0 -25
- package/dist/close-icon_2.entry-83088b9a.cjs +0 -1
- package/dist/document-refresh-icon.entry-071ffd66.cjs +0 -1
- package/dist/document-refresh-icon.entry-9083a2e9.js +0 -15
- package/dist/duration-bddc4a13-05d3e3e2.cjs +0 -1
- package/dist/duration-bddc4a13-179ce826.js +0 -41
- package/dist/index-3b6f5cd5.cjs +0 -30
- package/dist/index-630f4e87.js +0 -1498
- package/dist/index-b30d446a-cbbef925.cjs +0 -7
- package/dist/mailbox-store-19f0c6c9-a0cbfa97.cjs +0 -1
- package/dist/nylas-if-state_3.entry-504be976.cjs +0 -1
- package/dist/nylas-if-state_3.entry-e96d01f1.js +0 -291
- package/dist/nylas-list-folders.entry-866361cc.cjs +0 -1
- package/dist/nylas-list-threads.entry-04989295.cjs +0 -1
- package/dist/nylas-mailbox-pagination.entry-e0bd4aef.cjs +0 -1
- package/dist/nylas-mailbox-toolbar-button.entry-3d772b26.cjs +0 -1
- package/dist/nylas-open-hours-picker.entry-6bdc7c73.js +0 -186
- package/dist/nylas-open-hours-picker.entry-881b6db7.cjs +0 -1
- package/dist/nylas-provider.entry-8d9a844b.cjs +0 -1
- package/dist/nylas-scheduler.entry-7321e18f.js +0 -230
- package/dist/nylas-scheduler.entry-e82977fb.cjs +0 -1
- package/dist/nylas-threads-refresh.entry-477e68e4.cjs +0 -1
- package/dist/nylas-threads-search.entry-c5854641.cjs +0 -1
- package/dist/nylas-view-thread.entry-8b72cbdb.cjs +0 -1
- package/dist/play-icon_2.entry-ed5877e3.js +0 -25
- package/dist/play-icon_2.entry-f23ed6c1.cjs +0 -1
- package/dist/scheduler-store-7d48e682-674705ef.cjs +0 -1
- package/dist/search-icon_3.entry-292138c3.js +0 -101
- package/dist/search-icon_3.entry-8e555357.cjs +0 -1
- package/dist/utils-5074a070-ce33ee6b.js +0 -119
- package/dist/utils-5074a070-d5ba6add.cjs +0 -2
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { r as
|
|
1
|
+
import { r as e, h as C } from "./index-0f3bd8df.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import "react-dom";
|
|
4
4
|
const o = ".sc-globe-icon-h{display:flex}", s = o, i = class {
|
|
5
|
-
constructor(
|
|
6
|
-
|
|
5
|
+
constructor(t) {
|
|
6
|
+
e(this, t), this.width = "16", this.height = "16";
|
|
7
7
|
}
|
|
8
8
|
render() {
|
|
9
|
-
return C("svg", { key: "
|
|
9
|
+
return C("svg", { key: "cda54141a59e6ec136d44bbd369596ef24779ce1", xmlns: "http://www.w3.org/2000/svg", width: this.width, height: this.height, viewBox: "0 0 16 16", fill: "none" }, C("path", { key: "b70c95480990f3728bf67830554b3abfabffdc8a", d: "M8 14C11.3137 14 14 11.3137 14 8C14 4.68629 11.3137 2 8 2C4.68629 2 2 4.68629 2 8C2 11.3137 4.68629 14 8 14ZM8 3C8.37372 3 8.87543 3.35608 9.31258 4.31781C9.4073 4.52619 9.49448 4.75446 9.57265 5H6.42735C6.50552 4.75446 6.5927 4.52619 6.68742 4.31781C7.12457 3.35608 7.62628 3 8 3ZM5.77705 3.90401C5.62614 4.23601 5.49428 4.6038 5.38411 5H3.99963C4.52341 4.30269 5.22525 3.74677 6.03766 3.39978C5.94287 3.56117 5.85596 3.7304 5.77705 3.90401ZM5.16299 6C5.05694 6.6275 5 7.30146 5 8C5 8.69854 5.05694 9.3725 5.16299 10H3.41604C3.14845 9.38754 3 8.7111 3 8C3 7.2889 3.14845 6.61246 3.41604 6H5.16299ZM5.38411 11C5.49428 11.3962 5.62614 11.764 5.77705 12.096C5.85596 12.2696 5.94287 12.4388 6.03766 12.6002C5.22525 12.2532 4.52341 11.6973 3.99963 11H5.38411ZM6.42735 11H9.57265C9.49448 11.2455 9.4073 11.4738 9.31258 11.6822C8.87543 12.6439 8.37372 13 8 13C7.62628 13 7.12457 12.6439 6.68742 11.6822C6.5927 11.4738 6.50552 11.2455 6.42735 11ZM9.82134 10H6.17866C6.06438 9.3892 6 8.71396 6 8C6 7.28604 6.06438 6.6108 6.17866 6H9.82134C9.93562 6.6108 10 7.28604 10 8C10 8.71396 9.93562 9.3892 9.82134 10ZM10.6159 11H12.0004C11.4766 11.6973 10.7747 12.2532 9.96234 12.6002C10.0571 12.4388 10.144 12.2696 10.2229 12.096C10.3739 11.764 10.5057 11.3962 10.6159 11ZM12.584 10H10.837C10.9431 9.3725 11 8.69854 11 8C11 7.30146 10.9431 6.6275 10.837 6H12.584C12.8516 6.61246 13 7.2889 13 8C13 8.7111 12.8516 9.38754 12.584 10ZM9.96234 3.39978C10.7747 3.74677 11.4766 4.30269 12.0004 5H10.6159C10.5057 4.6038 10.3739 4.23601 10.2229 3.90401C10.144 3.7304 10.0571 3.56117 9.96234 3.39978Z", fill: "currentColor" }));
|
|
10
10
|
}
|
|
11
11
|
};
|
|
12
12
|
i.style = s;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-7a55dc33.cjs");require("react");require("react-dom");const i=".sc-globe-icon-h{display:flex}",o=i,C=class{constructor(t){e.registerInstance(this,t),this.width="16",this.height="16"}render(){return e.h("svg",{key:"cda54141a59e6ec136d44bbd369596ef24779ce1",xmlns:"http://www.w3.org/2000/svg",width:this.width,height:this.height,viewBox:"0 0 16 16",fill:"none"},e.h("path",{key:"b70c95480990f3728bf67830554b3abfabffdc8a",d:"M8 14C11.3137 14 14 11.3137 14 8C14 4.68629 11.3137 2 8 2C4.68629 2 2 4.68629 2 8C2 11.3137 4.68629 14 8 14ZM8 3C8.37372 3 8.87543 3.35608 9.31258 4.31781C9.4073 4.52619 9.49448 4.75446 9.57265 5H6.42735C6.50552 4.75446 6.5927 4.52619 6.68742 4.31781C7.12457 3.35608 7.62628 3 8 3ZM5.77705 3.90401C5.62614 4.23601 5.49428 4.6038 5.38411 5H3.99963C4.52341 4.30269 5.22525 3.74677 6.03766 3.39978C5.94287 3.56117 5.85596 3.7304 5.77705 3.90401ZM5.16299 6C5.05694 6.6275 5 7.30146 5 8C5 8.69854 5.05694 9.3725 5.16299 10H3.41604C3.14845 9.38754 3 8.7111 3 8C3 7.2889 3.14845 6.61246 3.41604 6H5.16299ZM5.38411 11C5.49428 11.3962 5.62614 11.764 5.77705 12.096C5.85596 12.2696 5.94287 12.4388 6.03766 12.6002C5.22525 12.2532 4.52341 11.6973 3.99963 11H5.38411ZM6.42735 11H9.57265C9.49448 11.2455 9.4073 11.4738 9.31258 11.6822C8.87543 12.6439 8.37372 13 8 13C7.62628 13 7.12457 12.6439 6.68742 11.6822C6.5927 11.4738 6.50552 11.2455 6.42735 11ZM9.82134 10H6.17866C6.06438 9.3892 6 8.71396 6 8C6 7.28604 6.06438 6.6108 6.17866 6H9.82134C9.93562 6.6108 10 7.28604 10 8C10 8.71396 9.93562 9.3892 9.82134 10ZM10.6159 11H12.0004C11.4766 11.6973 10.7747 12.2532 9.96234 12.6002C10.0571 12.4388 10.144 12.2696 10.2229 12.096C10.3739 11.764 10.5057 11.3962 10.6159 11ZM12.584 10H10.837C10.9431 9.3725 11 8.69854 11 8C11 7.30146 10.9431 6.6275 10.837 6H12.584C12.8516 6.61246 13 7.2889 13 8C13 8.7111 12.8516 9.38754 12.584 10ZM9.96234 3.39978C10.7747 3.74677 11.4766 4.30269 12.0004 5H10.6159C10.5057 4.6038 10.3739 4.23601 10.2229 3.90401C10.144 3.7304 10.0571 3.56117 9.96234 3.39978Z",fill:"currentColor"}))}};C.style=o;exports.globe_icon=C;
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
import { r as S, h as t, c as N, H as A } from "./index-0f3bd8df.js";
|
|
2
|
+
import { R as Z } from "./register-component-dc659dc3-0fdb18dc.js";
|
|
3
|
+
import { d as y } from "./utils-c00bdc3c-89ab163d.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import "react-dom";
|
|
6
|
+
import "./_commonjsHelpers-57e89916-af061c86.js";
|
|
7
|
+
const B = ".sc-google-logo-icon-h{display:flex}", j = B, J = class {
|
|
8
|
+
constructor(a) {
|
|
9
|
+
S(this, a), this.width = "24", this.height = "24";
|
|
10
|
+
}
|
|
11
|
+
render() {
|
|
12
|
+
return t("svg", { key: "054a6d1317c29eb0eed05c1f7d69611837b294f5", width: this.width, height: this.height, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, t("g", { key: "7a46687e247930c1200d1cdd0ef6c1463cec96ee", "clip-path": "url(#clip0_959_12452)" }, t("path", { key: "d64a97cc07c2e8094e71a79f03b96a2c495c9a28", 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: "00f94b17c43c5199a00537873106f5f4eeaaa9a7", 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: "9391a8453b0adb7908ab1d06888a0cfcf0a32999", 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: "57cc6b8f6edb5b0361468c8bb49d450d1f92727f", 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: "ddb9c74f9a608e22e21f39feca20be85612e3e0d" }, t("clipPath", { key: "4828256582d76ee2c0732552630581e5d756c7e5", id: "clip0_959_12452" }, t("rect", { key: "5331dc073a4dbe01fabb56ee0fae553a0100edd9", width: 24, height: 24, fill: "white" }))));
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
J.style = j;
|
|
16
|
+
const G = ".sc-microsoft-logo-icon-h{display:flex}", W = G, z = class {
|
|
17
|
+
constructor(a) {
|
|
18
|
+
S(this, a), this.width = "22", this.height = "22";
|
|
19
|
+
}
|
|
20
|
+
render() {
|
|
21
|
+
return t("svg", { key: "9c6a5f616c9e25067b87916d304b0cd32b00f083", width: this.width, height: this.height, viewBox: "0 0 22 22", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "bbe87ce62235b96d327cc0dd4dabc78f5273c034", d: "M0.043457 0.043457H10.4782V10.4782H0.043457V0.043457Z", fill: "#F35325" }), t("path", { key: "de6dd97b42e8103d81cad275c722b36e5b5233b5", d: "M11.5217 0.043457H21.9565V10.4782H11.5217V0.043457Z", fill: "#81BC06" }), t("path", { key: "b13b204df603dd53a9f4aba4af8a502a224ff580", d: "M0.043457 11.5217H10.4782V21.9565H0.043457V11.5217Z", fill: "#05A6F0" }), t("path", { key: "372e3c35aae7f712309a0d97c54f5e92741f6eb7", d: "M11.5217 11.5217H21.9565V21.9565H11.5217V11.5217Z", fill: "#FFBA08" }));
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
z.style = W;
|
|
25
|
+
function $({ id: a, formState: e, activeTab: n, calendars: i }) {
|
|
26
|
+
var s, o;
|
|
27
|
+
switch (n) {
|
|
28
|
+
case "eventInfo":
|
|
29
|
+
const d = e.title, c = e.description, b = parseInt(e.duration), f = e.location;
|
|
30
|
+
return t(
|
|
31
|
+
"div",
|
|
32
|
+
{ key: a },
|
|
33
|
+
t(
|
|
34
|
+
"nylas-event-info",
|
|
35
|
+
null,
|
|
36
|
+
t(
|
|
37
|
+
"div",
|
|
38
|
+
{ slot: "inputs" },
|
|
39
|
+
t("nylas-event-title", { name: "title", eventTitle: d, exportparts: "net, net__title, net__dropdown-content" }),
|
|
40
|
+
t("nylas-event-duration", { name: "duration", eventDurationMinutes: b, exportparts: "ned, ned__input, ned__dropdown, ned__dropdown-button, ned__dropdown-content" }),
|
|
41
|
+
t("nylas-location-component", { name: "location", eventLocation: f, exportparts: "nel, nel__location, nel__dropdown, nel__dropdown-button, nel__dropdown-content" }),
|
|
42
|
+
t("nylas-event-description", { name: "description", eventDescription: c, exportparts: "nedesc, nedesc__textarea" })
|
|
43
|
+
)
|
|
44
|
+
)
|
|
45
|
+
);
|
|
46
|
+
case "availability":
|
|
47
|
+
const l = e.availability, u = ((s = l == null ? void 0 : l[0]) == null ? void 0 : s.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone, p = (o = e.participants) == null ? void 0 : o.find((h) => h.is_organizer), r = (p == null ? void 0 : p.email) ?? "primary", m = e.calendarIds.length > 0 ? e.calendarIds : [r], _ = e.bookingCalendar == "primary" ? r : e.bookingCalendar;
|
|
48
|
+
return t(
|
|
49
|
+
"div",
|
|
50
|
+
{ key: a },
|
|
51
|
+
t("nylas-booking-calendar-picker", { name: "booking-calendar", calendars: i ?? [], defaultBookingCalendar: _, exportparts: "nbcp, nbcp__header, nbcp__input-label, nbcp__dropdown, nbcp__dropdown-button, nbcp__dropdown-content" }),
|
|
52
|
+
t("nylas-calendar-picker", { name: "calendars", calendars: i ?? [], defaultSelectedCalendars: m, organizerEmail: r, exportparts: "ncp ncp__header, ncp__dropdown, ncp__dropdown-button, ncp__dropdown-content" }),
|
|
53
|
+
t("nylas-availability-picker", { name: "availability", openHours: l, defaultTimezone: u, 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
|
+
case "bookingOptions":
|
|
56
|
+
return t(
|
|
57
|
+
"div",
|
|
58
|
+
{ key: a },
|
|
59
|
+
a == "new" && t("p", null, "Config"),
|
|
60
|
+
t("nylas-buffer-time", { name: "buffer-time", buffer: e.buffer, 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" }),
|
|
61
|
+
t("nylas-custom-booking-flow", { name: "booking-type", bookingType: e.bookingType, exportparts: "ncbf, ncbf__header, ncbf__dropdown, ncbf__dropdown-button, ncbf__dropdown-content" }),
|
|
62
|
+
t(
|
|
63
|
+
"nylas-event-limits",
|
|
64
|
+
null,
|
|
65
|
+
t(
|
|
66
|
+
"div",
|
|
67
|
+
{ slot: "inputs" },
|
|
68
|
+
t("nylas-limit-future-bookings", { name: "limit-future-bookings", availableDaysInFuture: e.availableDaysInFuture, exportparts: "nlfb, nlfb__number-dropdown, nlfb__number-dropdown-button, nlfb__number-dropdown-content, nlfb__period-dropdown, nlfb__period-dropdown-button, nlfb__period-dropdown-content" }),
|
|
69
|
+
t("nylas-min-cancellation-notice", { name: "min-cancellation-notice", minCancellationNotice: e.minCancellationNotice, exportparts: "nmcn, nmcn__number-dropdown, nmcn__number-dropdown-button, nmcn__number-dropdown-content, nmcn__period-dropdown, nmcn__period-dropdown-button, nmcn__period-dropdown-content" })
|
|
70
|
+
)
|
|
71
|
+
)
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
const q = '.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}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs{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}}.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)}.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.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 .tab-content.sc-nylas-editor-tabs{max-width:692px}.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}.footer.sc-nylas-editor-tabs{display:flex;justify-content:flex-end;align-items:center;gap:1rem;height:80px;padding:0 1rem;border-top:1px solid var(--nylas-base-200)}.footer.sc-nylas-editor-tabs .unsaved-changes.sc-nylas-editor-tabs{color:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs .saved-changes.sc-nylas-editor-tabs{color:var(--nylas-success)}.footer.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 button.sc-nylas-editor-tabs:hover{background:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:active{background:var(--nylas-base-800)}.footer.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:disabled{background:var(--nylas-base-300);cursor:not-allowed}.footer.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}', K = q;
|
|
76
|
+
var Q = function(a, e, n, i) {
|
|
77
|
+
var s = arguments.length, o = s < 3 ? e : i === null ? i = Object.getOwnPropertyDescriptor(e, n) : i, d;
|
|
78
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
79
|
+
o = Reflect.decorate(a, e, n, i);
|
|
80
|
+
else
|
|
81
|
+
for (var c = a.length - 1; c >= 0; c--)
|
|
82
|
+
(d = a[c]) && (o = (s < 3 ? d(o) : s > 3 ? d(e, n, o) : d(e, n)) || o);
|
|
83
|
+
return s > 3 && o && Object.defineProperty(e, n, o), o;
|
|
84
|
+
}, x = function(a, e) {
|
|
85
|
+
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
86
|
+
return Reflect.metadata(a, e);
|
|
87
|
+
};
|
|
88
|
+
const E = class {
|
|
89
|
+
constructor(a) {
|
|
90
|
+
S(this, a), this.schedulerConfigChanged = N(this, "schedulerConfigChanged", 7), this.formSubmissionHandler = async (e) => {
|
|
91
|
+
var h, g, v, k, w, C, T, I, F, H, L, D, V, M, O, U;
|
|
92
|
+
e.preventDefault(), this.isLoading = !0, this.hasUnsavedChanges = !1, this.updateFormState();
|
|
93
|
+
const { title: n, description: i, duration: s, availability: o, calendarIds: d, bookingCalendar: c, location: b, bookingType: f, buffer: l, availableDaysInFuture: u, minCancellationNotice: p } = this.formState, r = (g = (h = this.config) == null ? void 0 : h.participants) == null ? void 0 : g.find((R) => R.is_organizer), m = {
|
|
94
|
+
...((v = this.config) == null ? void 0 : v.id) && { id: this.config.id },
|
|
95
|
+
version: ((k = this.config) == null ? void 0 : k.version) ?? "1.0.0",
|
|
96
|
+
availability: {
|
|
97
|
+
duration_minutes: s ? parseInt(s) : 0,
|
|
98
|
+
availability_rules: {
|
|
99
|
+
availability_method: ((T = (C = (w = this.config) == null ? void 0 : w.availability) == null ? void 0 : C.availability_rules) == null ? void 0 : T.availability_method) ?? "collective",
|
|
100
|
+
buffer: l || { before: 0, after: 0 },
|
|
101
|
+
default_open_hours: ((H = (F = (I = this.config) == null ? void 0 : I.availability) == null ? void 0 : F.availability_rules) == null ? void 0 : H.default_open_hours) ?? [],
|
|
102
|
+
round_robin_group_id: ((V = (D = (L = this.config) == null ? void 0 : L.availability) == null ? void 0 : D.availability_rules) == null ? void 0 : V.round_robin_group_id) ?? ""
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
participants: [
|
|
106
|
+
{
|
|
107
|
+
name: (r == null ? void 0 : r.name) ?? (r == null ? void 0 : r.email) ?? ((M = this.currentUser) == null ? void 0 : M.name) ?? ((O = this.currentUser) == null ? void 0 : O.email) ?? "",
|
|
108
|
+
email: (r == null ? void 0 : r.email) ?? ((U = this.currentUser) == null ? void 0 : U.email) ?? "",
|
|
109
|
+
is_organizer: !0,
|
|
110
|
+
availability: {
|
|
111
|
+
calendar_ids: d != null && d.length ? d : ["primary"],
|
|
112
|
+
open_hours: o ?? []
|
|
113
|
+
},
|
|
114
|
+
booking: {
|
|
115
|
+
calendar_id: c ?? "primary"
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
],
|
|
119
|
+
event_booking: {
|
|
120
|
+
title: (n == null ? void 0 : n.toString()) ?? "",
|
|
121
|
+
description: (i == null ? void 0 : i.toString()) ?? "",
|
|
122
|
+
location: (b == null ? void 0 : b.toString()) ?? "",
|
|
123
|
+
booking_type: (f == null ? void 0 : f.toString()) ?? "booking"
|
|
124
|
+
},
|
|
125
|
+
scheduler: {
|
|
126
|
+
available_days_in_future: u ?? 30,
|
|
127
|
+
min_cancellation_notice: p ?? 0
|
|
128
|
+
}
|
|
129
|
+
}, _ = (R) => {
|
|
130
|
+
this.isLoading = !1, this.changesSaved = !0, setTimeout(() => {
|
|
131
|
+
this.changesSaved = !1;
|
|
132
|
+
}, 5e3);
|
|
133
|
+
};
|
|
134
|
+
this.schedulerConfigChanged.emit({ config: m, resetLoadingState: _, action: this.action });
|
|
135
|
+
}, this.calendars = void 0, this.config = void 0, this.currentUser = void 0, this.action = "create", this.activeTab = "eventInfo", this.isLoading = !1, this.hasUnsavedChanges = !1, this.changesSaved = !1, this.formState = {};
|
|
136
|
+
}
|
|
137
|
+
configChangedHandler(a) {
|
|
138
|
+
y("[nylas-editor-tabs]", "configChangedHandler", a, this.config), this.formState = {
|
|
139
|
+
...this.getFormStateFromConfig(a)
|
|
140
|
+
}, a.id ? this.action = "update" : this.action = "create";
|
|
141
|
+
}
|
|
142
|
+
connectedCallback() {
|
|
143
|
+
y("[nylas-editor-tabs]", "connectedCallback");
|
|
144
|
+
}
|
|
145
|
+
componentWillLoad() {
|
|
146
|
+
y("[nylas-editor-tabs]", "componentWillLoad"), this.formState = this.getFormStateFromConfig(this.config);
|
|
147
|
+
}
|
|
148
|
+
componentDidLoad() {
|
|
149
|
+
y("[nylas-editor-tabs]", "componentDidLoad");
|
|
150
|
+
}
|
|
151
|
+
disconnectedCallback() {
|
|
152
|
+
y("[nylas-editor-tabs]", "disconnectedCallback");
|
|
153
|
+
}
|
|
154
|
+
handleValueChanged(a) {
|
|
155
|
+
y("[nylas-editor-tabs]", "handleValueChanged", a), this.formState = { ...this.formState, [a.detail.name]: a.detail.value }, this.hasUnsavedChanges = !0;
|
|
156
|
+
}
|
|
157
|
+
getFormStateFromConfig(a) {
|
|
158
|
+
var n, i, s, o, d, c, b, f, l, u, p, r, m, _, h, g, v, k, w;
|
|
159
|
+
const e = (n = a == null ? void 0 : a.participants) == null ? void 0 : n.find((C) => C.is_organizer);
|
|
160
|
+
return {
|
|
161
|
+
title: ((i = a == null ? void 0 : a.event_booking) == null ? void 0 : i.title) ?? "",
|
|
162
|
+
description: ((s = a == null ? void 0 : a.event_booking) == null ? void 0 : s.description) ?? "",
|
|
163
|
+
duration: ((d = (o = a == null ? void 0 : a.availability) == null ? void 0 : o.duration_minutes) == null ? void 0 : d.toString()) ?? "10",
|
|
164
|
+
availability: ((c = e == null ? void 0 : e.availability) == null ? void 0 : c.open_hours) ?? void 0,
|
|
165
|
+
calendarIds: ((b = e == null ? void 0 : e.availability) == null ? void 0 : b.calendar_ids) ?? [],
|
|
166
|
+
participants: (a == null ? void 0 : a.participants) ?? [],
|
|
167
|
+
bookingCalendar: ((f = e == null ? void 0 : e.booking) == null ? void 0 : f.calendar_id) ?? (e == null ? void 0 : e.email) ?? "",
|
|
168
|
+
location: ((u = (l = this.config) == null ? void 0 : l.event_booking) == null ? void 0 : u.location) ?? "",
|
|
169
|
+
bookingType: ((r = (p = this.config) == null ? void 0 : p.event_booking) == null ? void 0 : r.booking_type) ?? "booking",
|
|
170
|
+
buffer: ((h = (_ = (m = this.config) == null ? void 0 : m.availability) == null ? void 0 : _.availability_rules) == null ? void 0 : h.buffer) ?? { before: 0, after: 0 },
|
|
171
|
+
availableDaysInFuture: ((v = (g = this.config) == null ? void 0 : g.scheduler) == null ? void 0 : v.available_days_in_future) ?? 30,
|
|
172
|
+
minCancellationNotice: ((w = (k = this.config) == null ? void 0 : k.scheduler) == null ? void 0 : w.min_cancellation_notice) ?? 0
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
updateFormState() {
|
|
176
|
+
new FormData(this.formRef).forEach((e, n) => {
|
|
177
|
+
switch (n) {
|
|
178
|
+
case "title":
|
|
179
|
+
this.formState.title = e.toString();
|
|
180
|
+
break;
|
|
181
|
+
case "description":
|
|
182
|
+
this.formState.description = e.toString();
|
|
183
|
+
break;
|
|
184
|
+
case "duration":
|
|
185
|
+
this.formState.duration = e.toString();
|
|
186
|
+
break;
|
|
187
|
+
case "availability":
|
|
188
|
+
this.formState.availability = JSON.parse(e.toString());
|
|
189
|
+
break;
|
|
190
|
+
case "participants":
|
|
191
|
+
this.formState.participants = JSON.parse(e.toString());
|
|
192
|
+
break;
|
|
193
|
+
case "calendars":
|
|
194
|
+
this.formState.calendarIds = e.toString().split(",");
|
|
195
|
+
break;
|
|
196
|
+
case "booking-calendar":
|
|
197
|
+
this.formState.bookingCalendar = e.toString();
|
|
198
|
+
break;
|
|
199
|
+
case "location":
|
|
200
|
+
this.formState.location = e.toString();
|
|
201
|
+
break;
|
|
202
|
+
case "booking-type":
|
|
203
|
+
this.formState.bookingType = e.toString();
|
|
204
|
+
break;
|
|
205
|
+
case "buffer-time":
|
|
206
|
+
this.formState.buffer = JSON.parse(e.toString());
|
|
207
|
+
break;
|
|
208
|
+
case "limit-future-bookings":
|
|
209
|
+
this.formState.availableDaysInFuture = parseInt(e.toString());
|
|
210
|
+
break;
|
|
211
|
+
case "min-cancellation-notice":
|
|
212
|
+
this.formState.minCancellationNotice = parseInt(e.toString());
|
|
213
|
+
break;
|
|
214
|
+
}
|
|
215
|
+
}), this.formState = { ...this.formState };
|
|
216
|
+
}
|
|
217
|
+
setActiveTab(a, e) {
|
|
218
|
+
a.preventDefault(), this.updateFormState(), this.activeTab = e;
|
|
219
|
+
}
|
|
220
|
+
render() {
|
|
221
|
+
var a;
|
|
222
|
+
return y("[nylas-editor-tabs]", "render", this.formState), t(A, { key: "e26c05a424e53163d97bd14723151c73a870b8be" }, t("form", { key: "e5c3af66eebb0d133e8a6931d84aa12b5e07d329", onSubmit: this.formSubmissionHandler, class: "scheduler-editor", ref: (e) => this.formRef = e }, t("div", { key: "d24109dc87e9b18fb62bf684c25c08dfa58334ed", class: "form-contents" }, t("div", { key: "b74f053cbd15654c1d3d43af8a765607fdcd28d3", class: "tabs" }, t("button", { key: "ccf9034c5bf0194ad5db7ad29ddd46eb6846cfbb", class: { tab: !0, active: this.activeTab == "eventInfo" }, onClick: (e) => this.setActiveTab(e, "eventInfo") }, t("calendar-info-icon", { key: "6527d78a3d54f54baa6f7c4552937dbfe992ec96", width: "16", height: "16" }), "Event Info"), t("button", { key: "e561f4f7ab01629860f13812a14d0bdf92ad7d6b", class: { tab: !0, active: this.activeTab == "availability" }, onClick: (e) => this.setActiveTab(e, "availability") }, t("calendar-patterns-icon", { key: "dde4d0f70cdf0aad66e25e7b683372a0c9035398", width: "16", height: "16" }), "Availability"), t("button", { key: "8a8131ed4f2f07b6f9d228d9bc86667718f5766f", class: { tab: !0, active: this.activeTab == "bookingOptions" }, onClick: (e) => this.setActiveTab(e, "bookingOptions") }, t("flow-icon", { key: "1cc07a769eca6090749bc0c04ca3aa283864d925", width: "16", height: "16" }), "Booking Options")), t("div", { key: "2802d58acf7965856f6802b17794dc34cec424e7", class: "tab-content" }, t($, { key: "c965af9cecdd91977c8b036f504e33620443b7af", formState: this.formState, activeTab: this.activeTab, calendars: this.calendars, id: ((a = this.config) == null ? void 0 : a.id) ?? "new" }))), t("div", { key: "2faed468348afb67f0fc867de91c901c5c1546f5", class: "footer" }, t("p", { key: "d79a6e1562cd3ced4b84a01f8939d8d5c047979c", class: {
|
|
223
|
+
"unsaved-changes": this.hasUnsavedChanges && !this.changesSaved,
|
|
224
|
+
"saved-changes": this.changesSaved
|
|
225
|
+
} }, this.hasUnsavedChanges && !this.changesSaved ? "Unsaved changes" : this.changesSaved ? "Changes saved!" : ""), t("button-component", { key: "1e77a73ef49c9a17a3cdd7d9adcf49515765de7c", type: "submit", disabled: this.isLoading }, this.isLoading ? t("span", null, "Saving", t("loading-icon", null), " ") : this.action == "create" ? "Create" : "Save changes"))));
|
|
226
|
+
}
|
|
227
|
+
static get watchers() {
|
|
228
|
+
return {
|
|
229
|
+
config: ["configChangedHandler"]
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
};
|
|
233
|
+
Q([
|
|
234
|
+
Z({
|
|
235
|
+
name: "nylas-editor-tabs",
|
|
236
|
+
stateToProps: /* @__PURE__ */ new Map([
|
|
237
|
+
["schedulerConfig.calendars", "calendars"],
|
|
238
|
+
["schedulerConfig.config", "config"],
|
|
239
|
+
["schedulerConfig.currentUser", "currentUser"]
|
|
240
|
+
]),
|
|
241
|
+
eventToProps: {
|
|
242
|
+
schedulerConfigChanged: async (a, e) => {
|
|
243
|
+
const { resetLoadingState: n, action: i, config: s } = a.detail;
|
|
244
|
+
n && n(a), i === "update" ? await e.schedulerConfig.updateConfiguration(s) : await e.schedulerConfig.createConfiguration(s);
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
fireRegisterEvent: !0
|
|
248
|
+
}),
|
|
249
|
+
x("design:type", Function),
|
|
250
|
+
x("design:paramtypes", []),
|
|
251
|
+
x("design:returntype", void 0)
|
|
252
|
+
], E.prototype, "render", null);
|
|
253
|
+
E.style = K;
|
|
254
|
+
export {
|
|
255
|
+
J as google_logo_icon,
|
|
256
|
+
z as microsoft_logo_icon,
|
|
257
|
+
E as nylas_editor_tabs
|
|
258
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-7a55dc33.cjs"),A=require("./register-component-dc659dc3-f58bf25b.cjs"),y=require("./utils-c00bdc3c-94b9c3b6.cjs");require("react");require("react-dom");require("./_commonjsHelpers-57e89916-4a3ae7d8.cjs");const Z=".sc-google-logo-icon-h{display:flex}",j=Z,N=class{constructor(a){t.registerInstance(this,a),this.width="24",this.height="24"}render(){return t.h("svg",{key:"054a6d1317c29eb0eed05c1f7d69611837b294f5",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.h("g",{key:"7a46687e247930c1200d1cdd0ef6c1463cec96ee","clip-path":"url(#clip0_959_12452)"},t.h("path",{key:"d64a97cc07c2e8094e71a79f03b96a2c495c9a28",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.h("path",{key:"00f94b17c43c5199a00537873106f5f4eeaaa9a7",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.h("path",{key:"9391a8453b0adb7908ab1d06888a0cfcf0a32999",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.h("path",{key:"57cc6b8f6edb5b0361468c8bb49d450d1f92727f",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.h("defs",{key:"ddb9c74f9a608e22e21f39feca20be85612e3e0d"},t.h("clipPath",{key:"4828256582d76ee2c0732552630581e5d756c7e5",id:"clip0_959_12452"},t.h("rect",{key:"5331dc073a4dbe01fabb56ee0fae553a0100edd9",width:24,height:24,fill:"white"}))))}};N.style=j;const B=".sc-microsoft-logo-icon-h{display:flex}",q=B,R=class{constructor(a){t.registerInstance(this,a),this.width="22",this.height="22"}render(){return t.h("svg",{key:"9c6a5f616c9e25067b87916d304b0cd32b00f083",width:this.width,height:this.height,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.h("path",{key:"bbe87ce62235b96d327cc0dd4dabc78f5273c034",d:"M0.043457 0.043457H10.4782V10.4782H0.043457V0.043457Z",fill:"#F35325"}),t.h("path",{key:"de6dd97b42e8103d81cad275c722b36e5b5233b5",d:"M11.5217 0.043457H21.9565V10.4782H11.5217V0.043457Z",fill:"#81BC06"}),t.h("path",{key:"b13b204df603dd53a9f4aba4af8a502a224ff580",d:"M0.043457 11.5217H10.4782V21.9565H0.043457V11.5217Z",fill:"#05A6F0"}),t.h("path",{key:"372e3c35aae7f712309a0d97c54f5e92741f6eb7",d:"M11.5217 11.5217H21.9565V21.9565H11.5217V11.5217Z",fill:"#FFBA08"}))}};R.style=q;function J({id:a,formState:e,activeTab:n,calendars:i}){var s,o;switch(n){case"eventInfo":const d=e.title,c=e.description,b=parseInt(e.duration),h=e.location;return t.h("div",{key:a},t.h("nylas-event-info",null,t.h("div",{slot:"inputs"},t.h("nylas-event-title",{name:"title",eventTitle:d,exportparts:"net, net__title, net__dropdown-content"}),t.h("nylas-event-duration",{name:"duration",eventDurationMinutes:b,exportparts:"ned, ned__input, ned__dropdown, ned__dropdown-button, ned__dropdown-content"}),t.h("nylas-location-component",{name:"location",eventLocation:h,exportparts:"nel, nel__location, nel__dropdown, nel__dropdown-button, nel__dropdown-content"}),t.h("nylas-event-description",{name:"description",eventDescription:c,exportparts:"nedesc, nedesc__textarea"}))));case"availability":const l=e.availability,u=((s=l==null?void 0:l[0])==null?void 0:s.timezone)??Intl.DateTimeFormat().resolvedOptions().timeZone,f=(o=e.participants)==null?void 0:o.find(p=>p.is_organizer),r=(f==null?void 0:f.email)??"primary",g=e.calendarIds.length>0?e.calendarIds:[r],m=e.bookingCalendar=="primary"?r:e.bookingCalendar;return t.h("div",{key:a},t.h("nylas-booking-calendar-picker",{name:"booking-calendar",calendars:i??[],defaultBookingCalendar:m,exportparts:"nbcp, nbcp__header, nbcp__input-label, nbcp__dropdown, nbcp__dropdown-button, nbcp__dropdown-content"}),t.h("nylas-calendar-picker",{name:"calendars",calendars:i??[],defaultSelectedCalendars:g,organizerEmail:r,exportparts:"ncp ncp__header, ncp__dropdown, ncp__dropdown-button, ncp__dropdown-content"}),t.h("nylas-availability-picker",{name:"availability",openHours:l,defaultTimezone:u,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"}));case"bookingOptions":return t.h("div",{key:a},a=="new"&&t.h("p",null,"Config"),t.h("nylas-buffer-time",{name:"buffer-time",buffer:e.buffer,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"}),t.h("nylas-custom-booking-flow",{name:"booking-type",bookingType:e.bookingType,exportparts:"ncbf, ncbf__header, ncbf__dropdown, ncbf__dropdown-button, ncbf__dropdown-content"}),t.h("nylas-event-limits",null,t.h("div",{slot:"inputs"},t.h("nylas-limit-future-bookings",{name:"limit-future-bookings",availableDaysInFuture:e.availableDaysInFuture,exportparts:"nlfb, nlfb__number-dropdown, nlfb__number-dropdown-button, nlfb__number-dropdown-content, nlfb__period-dropdown, nlfb__period-dropdown-button, nlfb__period-dropdown-content"}),t.h("nylas-min-cancellation-notice",{name:"min-cancellation-notice",minCancellationNotice:e.minCancellationNotice,exportparts:"nmcn, nmcn__number-dropdown, nmcn__number-dropdown-button, nmcn__number-dropdown-content, nmcn__period-dropdown, nmcn__period-dropdown-button, nmcn__period-dropdown-content"}))))}}const G='.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}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs{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}}.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)}.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.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 .tab-content.sc-nylas-editor-tabs{max-width:692px}.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}.footer.sc-nylas-editor-tabs{display:flex;justify-content:flex-end;align-items:center;gap:1rem;height:80px;padding:0 1rem;border-top:1px solid var(--nylas-base-200)}.footer.sc-nylas-editor-tabs .unsaved-changes.sc-nylas-editor-tabs{color:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs .saved-changes.sc-nylas-editor-tabs{color:var(--nylas-success)}.footer.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 button.sc-nylas-editor-tabs:hover{background:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:active{background:var(--nylas-base-800)}.footer.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:disabled{background:var(--nylas-base-300);cursor:not-allowed}.footer.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}',W=G;var z=function(a,e,n,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(a,e,n,i);else for(var c=a.length-1;c>=0;c--)(d=a[c])&&(o=(s<3?d(o):s>3?d(e,n,o):d(e,n))||o);return s>3&&o&&Object.defineProperty(e,n,o),o},x=function(a,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(a,e)};const S=class{constructor(a){t.registerInstance(this,a),this.schedulerConfigChanged=t.createEvent(this,"schedulerConfigChanged",7),this.formSubmissionHandler=async e=>{var p,_,v,k,w,C,I,T,F,L,D,H,V,M,O,U;e.preventDefault(),this.isLoading=!0,this.hasUnsavedChanges=!1,this.updateFormState();const{title:n,description:i,duration:s,availability:o,calendarIds:d,bookingCalendar:c,location:b,bookingType:h,buffer:l,availableDaysInFuture:u,minCancellationNotice:f}=this.formState,r=(_=(p=this.config)==null?void 0:p.participants)==null?void 0:_.find(E=>E.is_organizer),g={...((v=this.config)==null?void 0:v.id)&&{id:this.config.id},version:((k=this.config)==null?void 0:k.version)??"1.0.0",availability:{duration_minutes:s?parseInt(s):0,availability_rules:{availability_method:((I=(C=(w=this.config)==null?void 0:w.availability)==null?void 0:C.availability_rules)==null?void 0:I.availability_method)??"collective",buffer:l||{before:0,after:0},default_open_hours:((L=(F=(T=this.config)==null?void 0:T.availability)==null?void 0:F.availability_rules)==null?void 0:L.default_open_hours)??[],round_robin_group_id:((V=(H=(D=this.config)==null?void 0:D.availability)==null?void 0:H.availability_rules)==null?void 0:V.round_robin_group_id)??""}},participants:[{name:(r==null?void 0:r.name)??(r==null?void 0:r.email)??((M=this.currentUser)==null?void 0:M.name)??((O=this.currentUser)==null?void 0:O.email)??"",email:(r==null?void 0:r.email)??((U=this.currentUser)==null?void 0:U.email)??"",is_organizer:!0,availability:{calendar_ids:d!=null&&d.length?d:["primary"],open_hours:o??[]},booking:{calendar_id:c??"primary"}}],event_booking:{title:(n==null?void 0:n.toString())??"",description:(i==null?void 0:i.toString())??"",location:(b==null?void 0:b.toString())??"",booking_type:(h==null?void 0:h.toString())??"booking"},scheduler:{available_days_in_future:u??30,min_cancellation_notice:f??0}},m=E=>{this.isLoading=!1,this.changesSaved=!0,setTimeout(()=>{this.changesSaved=!1},5e3)};this.schedulerConfigChanged.emit({config:g,resetLoadingState:m,action:this.action})},this.calendars=void 0,this.config=void 0,this.currentUser=void 0,this.action="create",this.activeTab="eventInfo",this.isLoading=!1,this.hasUnsavedChanges=!1,this.changesSaved=!1,this.formState={}}configChangedHandler(a){y.debug("[nylas-editor-tabs]","configChangedHandler",a,this.config),this.formState={...this.getFormStateFromConfig(a)},a.id?this.action="update":this.action="create"}connectedCallback(){y.debug("[nylas-editor-tabs]","connectedCallback")}componentWillLoad(){y.debug("[nylas-editor-tabs]","componentWillLoad"),this.formState=this.getFormStateFromConfig(this.config)}componentDidLoad(){y.debug("[nylas-editor-tabs]","componentDidLoad")}disconnectedCallback(){y.debug("[nylas-editor-tabs]","disconnectedCallback")}handleValueChanged(a){y.debug("[nylas-editor-tabs]","handleValueChanged",a),this.formState={...this.formState,[a.detail.name]:a.detail.value},this.hasUnsavedChanges=!0}getFormStateFromConfig(a){var n,i,s,o,d,c,b,h,l,u,f,r,g,m,p,_,v,k,w;const e=(n=a==null?void 0:a.participants)==null?void 0:n.find(C=>C.is_organizer);return{title:((i=a==null?void 0:a.event_booking)==null?void 0:i.title)??"",description:((s=a==null?void 0:a.event_booking)==null?void 0:s.description)??"",duration:((d=(o=a==null?void 0:a.availability)==null?void 0:o.duration_minutes)==null?void 0:d.toString())??"10",availability:((c=e==null?void 0:e.availability)==null?void 0:c.open_hours)??void 0,calendarIds:((b=e==null?void 0:e.availability)==null?void 0:b.calendar_ids)??[],participants:(a==null?void 0:a.participants)??[],bookingCalendar:((h=e==null?void 0:e.booking)==null?void 0:h.calendar_id)??(e==null?void 0:e.email)??"",location:((u=(l=this.config)==null?void 0:l.event_booking)==null?void 0:u.location)??"",bookingType:((r=(f=this.config)==null?void 0:f.event_booking)==null?void 0:r.booking_type)??"booking",buffer:((p=(m=(g=this.config)==null?void 0:g.availability)==null?void 0:m.availability_rules)==null?void 0:p.buffer)??{before:0,after:0},availableDaysInFuture:((v=(_=this.config)==null?void 0:_.scheduler)==null?void 0:v.available_days_in_future)??30,minCancellationNotice:((w=(k=this.config)==null?void 0:k.scheduler)==null?void 0:w.min_cancellation_notice)??0}}updateFormState(){new FormData(this.formRef).forEach((e,n)=>{switch(n){case"title":this.formState.title=e.toString();break;case"description":this.formState.description=e.toString();break;case"duration":this.formState.duration=e.toString();break;case"availability":this.formState.availability=JSON.parse(e.toString());break;case"participants":this.formState.participants=JSON.parse(e.toString());break;case"calendars":this.formState.calendarIds=e.toString().split(",");break;case"booking-calendar":this.formState.bookingCalendar=e.toString();break;case"location":this.formState.location=e.toString();break;case"booking-type":this.formState.bookingType=e.toString();break;case"buffer-time":this.formState.buffer=JSON.parse(e.toString());break;case"limit-future-bookings":this.formState.availableDaysInFuture=parseInt(e.toString());break;case"min-cancellation-notice":this.formState.minCancellationNotice=parseInt(e.toString());break}}),this.formState={...this.formState}}setActiveTab(a,e){a.preventDefault(),this.updateFormState(),this.activeTab=e}render(){var a;return y.debug("[nylas-editor-tabs]","render",this.formState),t.h(t.Host,{key:"e26c05a424e53163d97bd14723151c73a870b8be"},t.h("form",{key:"e5c3af66eebb0d133e8a6931d84aa12b5e07d329",onSubmit:this.formSubmissionHandler,class:"scheduler-editor",ref:e=>this.formRef=e},t.h("div",{key:"d24109dc87e9b18fb62bf684c25c08dfa58334ed",class:"form-contents"},t.h("div",{key:"b74f053cbd15654c1d3d43af8a765607fdcd28d3",class:"tabs"},t.h("button",{key:"ccf9034c5bf0194ad5db7ad29ddd46eb6846cfbb",class:{tab:!0,active:this.activeTab=="eventInfo"},onClick:e=>this.setActiveTab(e,"eventInfo")},t.h("calendar-info-icon",{key:"6527d78a3d54f54baa6f7c4552937dbfe992ec96",width:"16",height:"16"}),"Event Info"),t.h("button",{key:"e561f4f7ab01629860f13812a14d0bdf92ad7d6b",class:{tab:!0,active:this.activeTab=="availability"},onClick:e=>this.setActiveTab(e,"availability")},t.h("calendar-patterns-icon",{key:"dde4d0f70cdf0aad66e25e7b683372a0c9035398",width:"16",height:"16"}),"Availability"),t.h("button",{key:"8a8131ed4f2f07b6f9d228d9bc86667718f5766f",class:{tab:!0,active:this.activeTab=="bookingOptions"},onClick:e=>this.setActiveTab(e,"bookingOptions")},t.h("flow-icon",{key:"1cc07a769eca6090749bc0c04ca3aa283864d925",width:"16",height:"16"}),"Booking Options")),t.h("div",{key:"2802d58acf7965856f6802b17794dc34cec424e7",class:"tab-content"},t.h(J,{key:"c965af9cecdd91977c8b036f504e33620443b7af",formState:this.formState,activeTab:this.activeTab,calendars:this.calendars,id:((a=this.config)==null?void 0:a.id)??"new"}))),t.h("div",{key:"2faed468348afb67f0fc867de91c901c5c1546f5",class:"footer"},t.h("p",{key:"d79a6e1562cd3ced4b84a01f8939d8d5c047979c",class:{"unsaved-changes":this.hasUnsavedChanges&&!this.changesSaved,"saved-changes":this.changesSaved}},this.hasUnsavedChanges&&!this.changesSaved?"Unsaved changes":this.changesSaved?"Changes saved!":""),t.h("button-component",{key:"1e77a73ef49c9a17a3cdd7d9adcf49515765de7c",type:"submit",disabled:this.isLoading},this.isLoading?t.h("span",null,"Saving",t.h("loading-icon",null)," "):this.action=="create"?"Create":"Save changes"))))}static get watchers(){return{config:["configChangedHandler"]}}};z([A.RegisterComponent({name:"nylas-editor-tabs",stateToProps:new Map([["schedulerConfig.calendars","calendars"],["schedulerConfig.config","config"],["schedulerConfig.currentUser","currentUser"]]),eventToProps:{schedulerConfigChanged:async(a,e)=>{const{resetLoadingState:n,action:i,config:s}=a.detail;n&&n(a),i==="update"?await e.schedulerConfig.updateConfiguration(s):await e.schedulerConfig.createConfiguration(s)}},fireRegisterEvent:!0}),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],S.prototype,"render",null);S.style=W;exports.google_logo_icon=N;exports.microsoft_logo_icon=R;exports.nylas_editor_tabs=S;
|