@nylas/react 1.1.0-canary.5 → 1.1.0-canary.7
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/{elements-dc5b338e-e87f79b6.js → elements-dc5b338e-6078b875.js} +1 -1
- package/dist/{elements-dc5b338e-29ef67ec.cjs → elements-dc5b338e-96e197ca.cjs} +1 -1
- package/dist/{focus-visible-e8093c16-61d506d2.cjs → focus-visible-e8093c16-018ffd63.cjs} +1 -1
- package/dist/{focus-visible-e8093c16-e7357f74.js → focus-visible-e8093c16-ab01d60a.js} +1 -1
- package/dist/{index-f9ba9aa8.js → index-1fd24ccf.js} +1039 -1428
- package/dist/index-823fdc6f.cjs +36 -0
- package/dist/react.cjs +1 -1
- package/dist/react.js +52 -52
- package/package.json +3 -3
- package/dist/add-circle-icon_22.entry-9f634efd.js +0 -1731
- package/dist/add-circle-icon_22.entry-e7ec6c34.cjs +0 -1
- package/dist/archive-icon_7.entry-24bac466.js +0 -75
- package/dist/archive-icon_7.entry-6649ed76.cjs +0 -1
- package/dist/arrow-icon.entry-1fffd526.cjs +0 -1
- package/dist/arrow-icon.entry-82e59ce4.js +0 -15
- package/dist/bold-icon_3.entry-5a01fecf.cjs +0 -1
- package/dist/bold-icon_3.entry-72e585da.js +0 -35
- package/dist/calendar-cancel-icon.entry-0b52bdc9.cjs +0 -1
- package/dist/calendar-cancel-icon.entry-247b530c.js +0 -15
- package/dist/calendar-check-icon_2.entry-d7bb76c7.cjs +0 -1
- package/dist/calendar-check-icon_2.entry-dbb2df49.js +0 -25
- package/dist/calendar-icon.entry-911773c4.cjs +0 -1
- package/dist/calendar-icon.entry-d64cb3d3.js +0 -15
- package/dist/chevron-icon_3.entry-b72f4cdb.cjs +0 -1
- package/dist/chevron-icon_3.entry-db9f8217.js +0 -117
- package/dist/close-icon.entry-9d141bb4.js +0 -15
- package/dist/close-icon.entry-da590fa2.cjs +0 -1
- package/dist/constants-6ee60d6d-09ee73d9.cjs +0 -15
- package/dist/constants-6ee60d6d-d5928e79.js +0 -3740
- package/dist/document-refresh-icon.entry-5e8cc2f0.cjs +0 -1
- package/dist/document-refresh-icon.entry-ee9632d7.js +0 -15
- package/dist/forward-icon_6.entry-cac8473a.cjs +0 -3
- package/dist/forward-icon_6.entry-f054ad9d.js +0 -953
- package/dist/globe-icon.entry-2fde6ac4.js +0 -15
- package/dist/globe-icon.entry-bc484551.cjs +0 -1
- package/dist/google-logo-icon_4.entry-a9848399.cjs +0 -1
- package/dist/google-logo-icon_4.entry-dca87e45.js +0 -349
- package/dist/index-22f7e49c.cjs +0 -37
- package/dist/index.es-f57e612a-1d17c676.js +0 -3137
- package/dist/index.es-f57e612a-95ca3e17.cjs +0 -7
- package/dist/info-icon_2.entry-dbf3931a.js +0 -34
- package/dist/info-icon_2.entry-e67844eb.cjs +0 -1
- package/dist/loading-icon.entry-4566cba8.cjs +0 -1
- package/dist/loading-icon.entry-ae4c2d7e.js +0 -15
- package/dist/mailbox-store-47fc8a1a-2365f20f.js +0 -380
- package/dist/mailbox-store-47fc8a1a-cd3516a7.cjs +0 -1
- package/dist/nylas-additional-participants.entry-7c568149.cjs +0 -1
- package/dist/nylas-additional-participants.entry-e8426256.js +0 -81
- package/dist/nylas-booked-event-card_10.entry-6a664889.cjs +0 -1
- package/dist/nylas-booked-event-card_10.entry-ef767733.js +0 -782
- package/dist/nylas-form-card.entry-d8506b1f.js +0 -54
- package/dist/nylas-form-card.entry-e44169b6.cjs +0 -1
- package/dist/nylas-if-state.entry-044c49d2.cjs +0 -1
- package/dist/nylas-if-state.entry-98a336df.js +0 -94
- package/dist/nylas-list-folders.entry-509f9be4.cjs +0 -1
- package/dist/nylas-list-folders.entry-55ce3403.js +0 -120
- package/dist/nylas-list-threads.entry-1f57382a.js +0 -70
- package/dist/nylas-list-threads.entry-c36e2cf3.cjs +0 -1
- package/dist/nylas-login.entry-66f542b8.cjs +0 -1
- package/dist/nylas-login.entry-76358c2f.js +0 -73
- package/dist/nylas-mailbox-pagination.entry-5562257a.js +0 -101
- package/dist/nylas-mailbox-pagination.entry-89b0dd99.cjs +0 -1
- package/dist/nylas-mailbox-toolbar-button.entry-573e0429.cjs +0 -1
- package/dist/nylas-mailbox-toolbar-button.entry-6b1b5b15.js +0 -82
- package/dist/nylas-mailbox.entry-97c503f2.js +0 -134
- package/dist/nylas-mailbox.entry-e21a2f50.cjs +0 -1
- package/dist/nylas-provider.entry-07e1e26a.js +0 -145
- package/dist/nylas-provider.entry-61899957.cjs +0 -1
- package/dist/nylas-scheduler-editor.entry-60fe38ce.cjs +0 -7
- package/dist/nylas-scheduler-editor.entry-e326c9de.js +0 -2275
- package/dist/nylas-scheduling.entry-be0cc090.js +0 -235
- package/dist/nylas-scheduling.entry-d88289db.cjs +0 -1
- package/dist/nylas-threads-refresh.entry-8201f8dd.js +0 -74
- package/dist/nylas-threads-refresh.entry-c71ee775.cjs +0 -1
- package/dist/nylas-threads-search.entry-912a90a4.cjs +0 -1
- package/dist/nylas-threads-search.entry-fc477e01.js +0 -69
- package/dist/nylas-view-thread.entry-af418ddb.cjs +0 -1
- package/dist/nylas-view-thread.entry-d2953ea8.js +0 -203
- package/dist/people-icon.entry-4b598fde.js +0 -15
- package/dist/people-icon.entry-73cfa6f5.cjs +0 -1
- package/dist/play-icon_2.entry-1a487abb.cjs +0 -1
- package/dist/play-icon_2.entry-d1c2f823.js +0 -25
- package/dist/refresh-icon.entry-42d543d0.cjs +0 -1
- package/dist/refresh-icon.entry-6aedfce6.js +0 -15
- package/dist/register-component-cf5c8420-d3fb6bf9.cjs +0 -1
- package/dist/register-component-cf5c8420-dc1bc0a4.js +0 -109
- package/dist/scheduler-config-store-6222c0ed-000f1a4f.js +0 -18
- package/dist/scheduler-config-store-6222c0ed-758621fb.cjs +0 -1
- package/dist/scheduler-store-39d37291-4e8e9ff9.js +0 -293
- package/dist/scheduler-store-39d37291-b66c052c.cjs +0 -1
- package/dist/time-period-selector.entry-f1e27a00.js +0 -76
- package/dist/time-period-selector.entry-fb3d0178.cjs +0 -1
- package/dist/translate-icon.entry-0d44b6cb.cjs +0 -1
- package/dist/translate-icon.entry-3db947f5.js +0 -15
- package/dist/warning-icon.entry-a20657e4.cjs +0 -1
- package/dist/warning-icon.entry-a8ea0fe0.js +0 -15
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { r as t, h as C } from "./index-f9ba9aa8.js";
|
|
2
|
-
import "react";
|
|
3
|
-
import "react-dom";
|
|
4
|
-
const o = ".sc-globe-icon-h{display:flex}", s = o, i = class {
|
|
5
|
-
constructor(e) {
|
|
6
|
-
t(this, e), this.width = "16", this.height = "16";
|
|
7
|
-
}
|
|
8
|
-
render() {
|
|
9
|
-
return C("svg", { key: "f8a5a34bee5e081a6232b4eb17c11d4761881966", xmlns: "http://www.w3.org/2000/svg", width: this.width, height: this.height, viewBox: "0 0 16 16", fill: "none" }, C("path", { key: "eedaeb8db7ba0f784c5c1837fbea8b3b951926f1", 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
|
-
}
|
|
11
|
-
};
|
|
12
|
-
i.style = s;
|
|
13
|
-
export {
|
|
14
|
-
i as globe_icon
|
|
15
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-22f7e49c.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:"f8a5a34bee5e081a6232b4eb17c11d4761881966",xmlns:"http://www.w3.org/2000/svg",width:this.width,height:this.height,viewBox:"0 0 16 16",fill:"none"},e.h("path",{key:"eedaeb8db7ba0f784c5c1837fbea8b3b951926f1",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;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-22f7e49c.cjs"),O=require("./register-component-cf5c8420-d3fb6bf9.cjs");require("react");require("react-dom");const U=".sc-google-logo-icon-h{display:flex}",A=U,V=class{constructor(a){e.registerInstance(this,a),this.width="24",this.height="24"}render(){return e.h("svg",{key:"e71880e55c9352a0e1ee2ad058727601f35e3ce4",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.h("g",{key:"7fec6b17669641c93baae51ca32571112071fef7","clip-path":"url(#clip0_959_12452)"},e.h("path",{key:"dc78e953321de09b2eb1a617d36757840fa3bc77",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"}),e.h("path",{key:"fd3fa31399c0daddb0666b5e5bfa22df37d707ed",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"}),e.h("path",{key:"ba6682324108438a8d09fd8c2f485fd902ac7d1e",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"}),e.h("path",{key:"8f343c03d1881b1db41b2f259c58b0ad37256909",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"})),e.h("defs",{key:"d139b2306583164474093240ab884fddbe240f16"},e.h("clipPath",{key:"d54b7ab509f646be7407b61c0e6b49765f5325d7",id:"clip0_959_12452"},e.h("rect",{key:"ac9a24a627127c049b291447ce1198424416f4ae",width:24,height:24,fill:"white"}))))}};V.style=A;const Z=".sc-microsoft-logo-icon-h{display:flex}",q=Z,N=class{constructor(a){e.registerInstance(this,a),this.width="22",this.height="22"}render(){return e.h("svg",{key:"48516ac28c70d446ba44e3b65252920c4e8d3b06",width:this.width,height:this.height,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"29c0f58e11eb99e946fd2dcb33ef603620305d9d",d:"M0.043457 0.043457H10.4782V10.4782H0.043457V0.043457Z",fill:"#F35325"}),e.h("path",{key:"6b5303ad19e48b6c0ad9842ee748dc7db17e2a68",d:"M11.5217 0.043457H21.9565V10.4782H11.5217V0.043457Z",fill:"#81BC06"}),e.h("path",{key:"278ce5362ac072c57040ad1bf944557f71809b5f",d:"M0.043457 11.5217H10.4782V21.9565H0.043457V11.5217Z",fill:"#05A6F0"}),e.h("path",{key:"9c2b9b9c87a902dd80cae38db0c46c94435903c2",d:"M11.5217 11.5217H21.9565V21.9565H11.5217V11.5217Z",fill:"#FFBA08"}))}};N.style=q;function z({id:a,formState:t,activeTab:n,calendars:s}){var o,i;switch(n){case"eventInfo":const r=t.title,c=t.description,b=parseInt(t.duration),f=t.location;return e.h("div",{key:a},e.h("nylas-event-info",null,e.h("div",{slot:"inputs"},e.h("nylas-event-title",{name:"title",eventTitle:r,exportparts:"net, net__title, net__dropdown-content"}),e.h("nylas-event-duration",{name:"duration",eventDurationMinutes:b,exportparts:"ned, ned__input, ned__dropdown, ned__dropdown-button, ned__dropdown-content"}),e.h("nylas-location-component",{name:"location",eventLocation:f,exportparts:"nel, nel__location, nel__dropdown, nel__dropdown-button, nel__dropdown-content"}),e.h("nylas-event-description",{name:"description",eventDescription:c,exportparts:"nedesc, nedesc__textarea"}))));case"availability":const d=t.availability,p=((o=d==null?void 0:d[0])==null?void 0:o.timezone)??Intl.DateTimeFormat().resolvedOptions().timeZone,h=(i=t.participants)==null?void 0:i.find(u=>u.is_organizer),l=(h==null?void 0:h.email)??"primary",y=t.calendarIds.length>0?t.calendarIds:[l],g=t.bookingCalendar=="primary"?l:t.bookingCalendar;return e.h("div",{key:a},e.h("nylas-booking-calendar-picker",{name:"booking-calendar",calendars:s??[],defaultBookingCalendar:g,exportparts:"nbcp, nbcp__header, nbcp__input-label, nbcp__dropdown, nbcp__dropdown-button, nbcp__dropdown-content"}),e.h("nylas-calendar-picker",{name:"calendars",calendars:s??[],defaultSelectedCalendars:y,organizerEmail:l,exportparts:"ncp ncp__header, ncp__dropdown, ncp__dropdown-button, ncp__dropdown-content"}),e.h("nylas-availability-picker",{name:"availability",openHours:d,defaultTimezone:p,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 e.h("div",{key:a},a=="new"&&e.h("p",null,"Config"),e.h("nylas-buffer-time",{name:"buffer-time",buffer:t.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"}),e.h("nylas-custom-booking-flow",{name:"booking-type",bookingType:t.bookingType,exportparts:"ncbf, ncbf__header, ncbf__dropdown, ncbf__dropdown-button, ncbf__dropdown-content"}),e.h("nylas-event-limits",null,e.h("div",{slot:"inputs"},e.h("nylas-limit-future-bookings",{name:"limit-future-bookings",availableDaysInFuture:t.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"}),e.h("nylas-min-cancellation-notice",{name:"min-cancellation-notice",minCancellationNotice:t.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 W='.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:space-between;align-items:center;gap:1rem;height:80px;padding:0 1rem;border-top:1px solid var(--nylas-base-200)}.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}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs .unsaved-changes.sc-nylas-editor-tabs{color:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs .saved-changes.sc-nylas-editor-tabs{color:var(--nylas-success)}.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}',G=W;var J=function(a,t,n,s){var o=arguments.length,i=o<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(a,t,n,s);else for(var c=a.length-1;c>=0;c--)(r=a[c])&&(i=(o<3?r(i):o>3?r(t,n,i):r(t,n))||i);return o>3&&i&&Object.defineProperty(t,n,i),i},w=function(a,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(a,t)};const S=class{constructor(a){e.registerInstance(this,a),this.schedulerConfigChanged=e.createEvent(this,"schedulerConfigChanged",7),this.cancelButtonClick=e.createEvent(this,"cancelButtonClick",7),this.previewButtonClicked=e.createEvent(this,"previewButtonClicked",7),this.formSubmissionHandler=async t=>{var u,m,v,_,k,C,T,B,D,I,H,F,E,P,j,R;t.preventDefault(),this.isLoading=!0,this.hasUnsavedChanges=!1,this.updateFormState();const{title:n,description:s,duration:o,availability:i,calendarIds:r,bookingCalendar:c,location:b,bookingType:f,buffer:d,availableDaysInFuture:p,minCancellationNotice:h}=this.formState,l=(m=(u=this.config)==null?void 0:u.participants)==null?void 0:m.find(M=>M.is_organizer),y={...((v=this.config)==null?void 0:v.id)&&{id:this.config.id},version:((_=this.config)==null?void 0:_.version)??"1.0.0",availability:{duration_minutes:o?parseInt(o):0,availability_rules:{availability_method:((T=(C=(k=this.config)==null?void 0:k.availability)==null?void 0:C.availability_rules)==null?void 0:T.availability_method)??"collective",buffer:d||{before:0,after:0},default_open_hours:((I=(D=(B=this.config)==null?void 0:B.availability)==null?void 0:D.availability_rules)==null?void 0:I.default_open_hours)??[],round_robin_group_id:((E=(F=(H=this.config)==null?void 0:H.availability)==null?void 0:F.availability_rules)==null?void 0:E.round_robin_group_id)??""}},participants:[{name:(l==null?void 0:l.name)??(l==null?void 0:l.email)??((P=this.currentUser)==null?void 0:P.name)??((j=this.currentUser)==null?void 0:j.email)??"",email:(l==null?void 0:l.email)??((R=this.currentUser)==null?void 0:R.email)??"",is_organizer:!0,availability:{calendar_ids:r!=null&&r.length?r:["primary"],open_hours:i??[]},booking:{calendar_id:c&&c!==""?c:"primary"}}],event_booking:{title:(n==null?void 0:n.toString())??"",description:(s==null?void 0:s.toString())??"",location:(b==null?void 0:b.toString())??"",booking_type:(f==null?void 0:f.toString())??"booking"},scheduler:{available_days_in_future:p??30,min_cancellation_notice:h??0}},g=M=>{this.isLoading=!1,this.changesSaved=!0,setTimeout(()=>{this.changesSaved=!1},5e3)};this.schedulerConfigChanged.emit({config:y,resetLoadingState:g,action:this.action})},this.calendars=void 0,this.config=void 0,this.currentUser=void 0,this.schedulerPreviewLink="",this.action="create",this.activeTab="eventInfo",this.isLoading=!1,this.hasUnsavedChanges=!1,this.changesSaved=!1,this.formState={}}configChangedHandler(a){e.debug("[nylas-editor-tabs]","configChangedHandler",a,this.config),this.formState={...this.getFormStateFromConfig(a)},a.id?this.action="edit":this.action="create"}connectedCallback(){e.debug("[nylas-editor-tabs]","connectedCallback")}componentWillLoad(){e.debug("[nylas-editor-tabs]","componentWillLoad"),this.formState=this.getFormStateFromConfig(this.config)}componentDidLoad(){e.debug("[nylas-editor-tabs]","componentDidLoad")}disconnectedCallback(){e.debug("[nylas-editor-tabs]","disconnectedCallback")}handleValueChanged(a){e.debug("[nylas-editor-tabs]","handleValueChanged",a),this.formState={...this.formState,[a.detail.name]:a.detail.value},this.hasUnsavedChanges=!0}getFormStateFromConfig(a){var n,s,o,i,r,c,b,f,d,p,h,l,y,g,u,m,v,_,k;const t=(n=a==null?void 0:a.participants)==null?void 0:n.find(C=>C.is_organizer);return{title:((s=a==null?void 0:a.event_booking)==null?void 0:s.title)??"",description:((o=a==null?void 0:a.event_booking)==null?void 0:o.description)??"",duration:((r=(i=a==null?void 0:a.availability)==null?void 0:i.duration_minutes)==null?void 0:r.toString())??"10",availability:((c=t==null?void 0:t.availability)==null?void 0:c.open_hours)??void 0,calendarIds:((b=t==null?void 0:t.availability)==null?void 0:b.calendar_ids)??[],participants:(a==null?void 0:a.participants)??[],bookingCalendar:((f=t==null?void 0:t.booking)==null?void 0:f.calendar_id)??(t==null?void 0:t.email)??"",location:((p=(d=this.config)==null?void 0:d.event_booking)==null?void 0:p.location)??"",bookingType:((l=(h=this.config)==null?void 0:h.event_booking)==null?void 0:l.booking_type)??"booking",buffer:((u=(g=(y=this.config)==null?void 0:y.availability)==null?void 0:g.availability_rules)==null?void 0:u.buffer)??{before:0,after:0},availableDaysInFuture:((v=(m=this.config)==null?void 0:m.scheduler)==null?void 0:v.available_days_in_future)??30,minCancellationNotice:((k=(_=this.config)==null?void 0:_.scheduler)==null?void 0:k.min_cancellation_notice)??0}}updateFormState(){new FormData(this.formRef).forEach((t,n)=>{switch(n){case"title":this.formState.title=t.toString();break;case"description":this.formState.description=t.toString();break;case"duration":this.formState.duration=t.toString();break;case"availability":this.formState.availability=JSON.parse(t.toString());break;case"participants":this.formState.participants=JSON.parse(t.toString());break;case"calendars":this.formState.calendarIds=t.toString().split(",");break;case"booking-calendar":this.formState.bookingCalendar=t.toString();break;case"location":this.formState.location=t.toString();break;case"booking-type":this.formState.bookingType=t.toString();break;case"buffer-time":this.formState.buffer=JSON.parse(t.toString());break;case"limit-future-bookings":this.formState.availableDaysInFuture=parseInt(t.toString());break;case"min-cancellation-notice":this.formState.minCancellationNotice=parseInt(t.toString());break}}),this.formState={...this.formState}}setActiveTab(a,t){a.preventDefault(),this.updateFormState(),this.activeTab=t}render(){var a;return e.debug("[nylas-editor-tabs]","render",this.formState),e.h(e.Host,{key:"5a1e8ee246d47626dce5515c3ec4df3e6ae893a4"},e.h("form",{key:"f49d1fa60f2724c5cae8c1328dfee945ae24f1e2",onSubmit:this.formSubmissionHandler,class:"scheduler-editor",ref:t=>this.formRef=t},e.h("div",{key:"f0b678836e12c3878128e4b810e5541f00ddee29",class:"form-contents"},e.h("div",{key:"910dc155a6b7b01e300084fe405da0d0b0801847",class:"tabs"},e.h("button",{key:"80ca54ac98ae0d3b2298ae62253ffcb9d3ae539d",class:{tab:!0,active:this.activeTab=="eventInfo"},onClick:t=>this.setActiveTab(t,"eventInfo")},e.h("calendar-info-icon",{key:"842e45f308921afa7948f8408b84f95d7b802850",width:"16",height:"16"}),"Event Info"),e.h("button",{key:"7b79207240cbae5dcd554d448f68dc544f2e6c80",class:{tab:!0,active:this.activeTab=="availability"},onClick:t=>this.setActiveTab(t,"availability")},e.h("calendar-patterns-icon",{key:"47b3d8cf7ee50eac7d377ab3faf35c27f1215e96",width:"16",height:"16"}),"Availability"),e.h("button",{key:"ffb175caa6ccc4ba377ee4947759d0561ebb089b",class:{tab:!0,active:this.activeTab=="bookingOptions"},onClick:t=>this.setActiveTab(t,"bookingOptions")},e.h("flow-icon",{key:"fc3bec08bd5080e7b2ec7816bb3c021876c20d7c",width:"16",height:"16"}),"Booking Options")),e.h("div",{key:"80802e1388eb767bcea718907e75d5b4a2de3701",class:"tab-content"},e.h(z,{key:"5c5618341227447d2a41061f415e54d83efc354a",formState:this.formState,activeTab:this.activeTab,calendars:this.calendars,id:((a=this.config)==null?void 0:a.id)??"new"}))),e.h("div",{key:"d315bad7ea2efe6699557a5e07b55053926a7517",class:"footer"},e.h("div",{key:"4c92a480ee6d2f04d9fa36f3e870d414835406e1",class:"preview"},this.schedulerPreviewLink!==""&&this.action==="edit"&&e.h("button-component",{type:"button",disabled:this.isLoading,clickHandler:t=>{t.preventDefault(),this.previewButtonClicked.emit(this.host).defaultPrevented||window.open(e.parsePreviewLink(this.schedulerPreviewLink,this.config),"_blank")},variant:"basic"},"Preview")),e.h("div",{key:"22fdd2183dcc2c299d2fdacf0db8922a95a5692e",class:"buttons"},e.h("p",{key:"63ea7b4d8362f409caec467a7bce22142ccc1b20",class:{"unsaved-changes":this.hasUnsavedChanges&&!this.changesSaved,"saved-changes":this.changesSaved}},this.hasUnsavedChanges&&!this.changesSaved?"Unsaved changes":this.changesSaved?"Changes saved!":""),e.h("button-component",{key:"6ceded872ee5510234ff79bff3f0173a72314714",type:"button",disabled:this.isLoading,clickHandler:t=>{t.preventDefault(),this.cancelButtonClick.emit()},variant:"basic"},"Cancel"),e.h("button-component",{key:"4f33ad6071f503837395d900b67fafc8605d8043",type:"submit",disabled:this.isLoading},this.isLoading?e.h("span",null,"Saving",e.h("loading-icon",null)," "):this.action=="create"?"Create":"Save changes")))))}get host(){return e.getElement(this)}static get watchers(){return{config:["configChangedHandler"]}}};J([O.RegisterComponent({name:"nylas-editor-tabs",stateToProps:new Map([["schedulerConfig.calendars","calendars"],["schedulerConfig.config","config"],["schedulerConfig.currentUser","currentUser"]]),eventToProps:{schedulerConfigChanged:async(a,t)=>{const{resetLoadingState:n,action:s,config:o}=a.detail;n&&n(a),s==="edit"?await t.schedulerConfig.updateConfiguration(o):await t.schedulerConfig.createConfiguration(o)},cancelButtonClick:async(a,t)=>{t.schedulerConfigStore.state.action=null}},localPropsToProp:new Map([["schedulerPreviewLink","schedulerPreviewLink"]]),fireRegisterEvent:!0}),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],S.prototype,"render",null);S.style=G;const $=':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-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}.header h2{margin:0;font-size:1.25rem;color:var(--nylas-base-900)}.header p{margin:0;font-size:1rem;color:var(--nylas-base-700)}.header .actions{justify-self:end}.configurations{border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}.configurations table{width:100%;border-spacing:0;border-collapse:collapse}.configurations table tr{border-bottom:1px solid var(--nylas-base-200)}.configurations table tr:last-of-type{border-bottom:0}.configurations 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 tr.no-configurations td>div h3{margin:0 0 1rem 0;color:var(--nylas-base-700)}.configurations table tr.no-configurations td>div p{margin:0 0 1rem 0;color:var(--nylas-base-600)}.configurations table tr.no-configurations td>div calendar-icon{margin-bottom:1rem;color:var(--nylas-base-200)}.configurations table th,.configurations table td{text-align:left;padding:1rem}.configurations table .actions{text-align:right}.configurations table .actions{display:flex;justify-content:flex-end;gap:1rem}.configurations table .title{display:flex;flex-direction:column}.configurations table .title .config-event-title{font-weight:600}.configurations table .title .config-event-description{font-size:0.75rem}',K=$;var Q=function(a,t,n,s){var o=arguments.length,i=o<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(a,t,n,s);else for(var c=a.length-1;c>=0;c--)(r=a[c])&&(i=(o<3?r(i):o>3?r(t,n,i):r(t,n))||i);return o>3&&i&&Object.defineProperty(t,n,i),i},x=function(a,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(a,t)};const L=class{constructor(a){e.registerInstance(this,a),this.initListConfigurations=e.createEvent(this,"initListConfigurations",7),this.createButtonClick=e.createEvent(this,"createButtonClick",7),this.editButtonClick=e.createEvent(this,"editButtonClick",7),this.deleteButtonClick=e.createEvent(this,"deleteButtonClick",7),this.configurations=[],this.schedulerPreviewLink="",this.state="loading"}connectedCallback(){e.debug("[nylas-list-configurations]","connectedCallback")}componentWillLoad(){e.debug("[nylas-list-configurations]","componentWillLoad"),this.configurations&&this.configurations.length>0&&(this.state="loaded")}componentDidLoad(){e.debug("[nylas-list-configurations]","componentDidLoad"),this.initListConfigurations.emit(this.host)}disconnectedCallback(){e.debug("[nylas-list-configurations]","disconnectedCallback")}async getState(){return this.state}async setState(a){this.state=a}render(){return e.h(e.Host,{key:"c6579bd33e43be81caa460d87e99ed53f8123c6a"},e.h("div",{key:"d3ff4fc25e34a2dab3820b774f52a845c37bb282",class:"nylas-list-configurations"},e.h("div",{key:"fc6ff138be7cf63196217b7ef7524ae8f0a82c5c",class:"header"},e.h("div",{key:"a518d44c645bfc5d5e8449119ebc4be7c475a5f3",class:"description"},e.h("h2",{key:"a9d999a93c26ee3d9040dcae09306ecb7da43fb5"},"All scheduling configurations"),e.h("p",{key:"6361799617ce1ccf7469cce6a0064d94d97701b0"},"Create, edit and manage all your scheduling configurations.")),this.configurations&&this.configurations.length>0&&e.h("div",{class:"actions"},e.h("button-component",{clickHandler:()=>{this.createButtonClick.emit(this.host)}},"Create new"))),e.h("div",{key:"3f26491b35427c4364bcc1c5e1cbffdfabd52d37",class:"configurations"},e.h("table",{key:"ca8bf13b620b92cd4892b8dbf218988915ce4fc0"},e.h("tr",{key:"09526ab48bbc988b0595f8060a184c340f1d43cc"},e.h("th",{key:"7367e03d461f854eaf84e166d65471d356f44ee5"},"Configuration event title"),e.h("th",{key:"f983dcae11fdd33e21f0f202eb9b43a7d409b714"},"Duration"),e.h("th",{key:"828c60e134498a1db8bd31ce0311bb8a771cb435",class:"actions"},"Actions")),this.state==="loading"&&e.h("tr",{class:"no-configurations"},e.h("td",{colSpan:3},e.h("div",null,e.h("h3",null,"Loading..."),e.h("p",null,"Please wait while we fetch your configurations")))),this.state!=="loading"&&(!this.configurations||this.configurations.length===0)&&e.h("tr",{class:"no-configurations"},e.h("td",{colSpan:3},e.h("div",null,e.h("calendar-icon",{width:"48",height:"48"}),e.h("h3",null,"No configurations found"),e.h("p",null,"Get started with creating your first scheduling page"),e.h("button-component",{clickHandler:()=>{this.createButtonClick.emit(this.host)}},"Create new")))),this.state!=="loading"&&this.configurations.map(a=>e.h("tr",{key:a.id},e.h("td",null,e.h("div",{class:"title"},e.h("span",{class:"config-event-title"},a.event_booking.title),e.h("span",{class:"config-event-description"},a.event_booking.description))),e.h("td",null,e.h("div",null,a.availability.duration_minutes," mins")),e.h("td",null,e.h("div",{class:"actions"},e.h("button-component",{variant:"basic",clickHandler:t=>{t.preventDefault(),window.open(e.parsePreviewLink(this.schedulerPreviewLink,a),"_blank")}},"Preview"),e.h("button-component",{variant:"basic",clickHandler:t=>{t.preventDefault(),this.editButtonClick.emit({host:this.host,configuration:a})}},"Edit"),e.h("button-component",{variant:"basic",clickHandler:t=>{t.preventDefault(),this.deleteButtonClick.emit({host:this.host,configuration:a})}},"Delete")))))))))}get host(){return e.getElement(this)}};Q([O.RegisterComponent({name:"nylas-list-configurations",stateToProps:new Map([["schedulerConfig.configurations","configurations"]]),localPropsToProp:new Map([["schedulerPreviewLink","schedulerPreviewLink"]]),eventToProps:{initListConfigurations:async(a,t)=>{const n=a.detail;await n.setState("loading"),await t.schedulerConfig.getConfigurations(),await n.setState("loaded")},createButtonClick:async(a,t)=>{t.schedulerConfigStore.state.config={},t.schedulerConfigStore.state.action="create"},deleteButtonClick:async(a,t)=>{const{configuration:n}=a.detail;await t.schedulerConfig.deleteConfiguration(n.id)},editButtonClick:async(a,t)=>{const{configuration:n}=a.detail;t.schedulerConfigStore.state.config=n,t.schedulerConfigStore.state.action="edit"}},fireRegisterEvent:!0}),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],L.prototype,"render",null);L.style=K;exports.google_logo_icon=V;exports.microsoft_logo_icon=N;exports.nylas_editor_tabs=S;exports.nylas_list_configurations=L;
|
|
@@ -1,349 +0,0 @@
|
|
|
1
|
-
import { r as S, h as t, c as y, d, s as V, H as N, g as U } from "./index-f9ba9aa8.js";
|
|
2
|
-
import { R as A } from "./register-component-cf5c8420-dc1bc0a4.js";
|
|
3
|
-
import "react";
|
|
4
|
-
import "react-dom";
|
|
5
|
-
const W = ".sc-google-logo-icon-h{display:flex}", G = W, J = class {
|
|
6
|
-
constructor(a) {
|
|
7
|
-
S(this, a), this.width = "24", this.height = "24";
|
|
8
|
-
}
|
|
9
|
-
render() {
|
|
10
|
-
return t("svg", { key: "e71880e55c9352a0e1ee2ad058727601f35e3ce4", width: this.width, height: this.height, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, t("g", { key: "7fec6b17669641c93baae51ca32571112071fef7", "clip-path": "url(#clip0_959_12452)" }, t("path", { key: "dc78e953321de09b2eb1a617d36757840fa3bc77", 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: "fd3fa31399c0daddb0666b5e5bfa22df37d707ed", 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: "ba6682324108438a8d09fd8c2f485fd902ac7d1e", 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: "8f343c03d1881b1db41b2f259c58b0ad37256909", 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: "d139b2306583164474093240ab884fddbe240f16" }, t("clipPath", { key: "d54b7ab509f646be7407b61c0e6b49765f5325d7", id: "clip0_959_12452" }, t("rect", { key: "ac9a24a627127c049b291447ce1198424416f4ae", width: 24, height: 24, fill: "white" }))));
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
J.style = G;
|
|
14
|
-
const $ = ".sc-microsoft-logo-icon-h{display:flex}", q = $, K = class {
|
|
15
|
-
constructor(a) {
|
|
16
|
-
S(this, a), this.width = "22", this.height = "22";
|
|
17
|
-
}
|
|
18
|
-
render() {
|
|
19
|
-
return t("svg", { key: "48516ac28c70d446ba44e3b65252920c4e8d3b06", width: this.width, height: this.height, viewBox: "0 0 22 22", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "29c0f58e11eb99e946fd2dcb33ef603620305d9d", d: "M0.043457 0.043457H10.4782V10.4782H0.043457V0.043457Z", fill: "#F35325" }), t("path", { key: "6b5303ad19e48b6c0ad9842ee748dc7db17e2a68", d: "M11.5217 0.043457H21.9565V10.4782H11.5217V0.043457Z", fill: "#81BC06" }), t("path", { key: "278ce5362ac072c57040ad1bf944557f71809b5f", d: "M0.043457 11.5217H10.4782V21.9565H0.043457V11.5217Z", fill: "#05A6F0" }), t("path", { key: "9c2b9b9c87a902dd80cae38db0c46c94435903c2", d: "M11.5217 11.5217H21.9565V21.9565H11.5217V11.5217Z", fill: "#FFBA08" }));
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
K.style = q;
|
|
23
|
-
function Q({ id: a, formState: e, activeTab: n, calendars: s }) {
|
|
24
|
-
var o, i;
|
|
25
|
-
switch (n) {
|
|
26
|
-
case "eventInfo":
|
|
27
|
-
const r = e.title, c = e.description, f = parseInt(e.duration), u = e.location;
|
|
28
|
-
return t(
|
|
29
|
-
"div",
|
|
30
|
-
{ key: a },
|
|
31
|
-
t(
|
|
32
|
-
"nylas-event-info",
|
|
33
|
-
null,
|
|
34
|
-
t(
|
|
35
|
-
"div",
|
|
36
|
-
{ slot: "inputs" },
|
|
37
|
-
t("nylas-event-title", { name: "title", eventTitle: r, exportparts: "net, net__title, net__dropdown-content" }),
|
|
38
|
-
t("nylas-event-duration", { name: "duration", eventDurationMinutes: f, exportparts: "ned, ned__input, ned__dropdown, ned__dropdown-button, ned__dropdown-content" }),
|
|
39
|
-
t("nylas-location-component", { name: "location", eventLocation: u, exportparts: "nel, nel__location, nel__dropdown, nel__dropdown-button, nel__dropdown-content" }),
|
|
40
|
-
t("nylas-event-description", { name: "description", eventDescription: c, exportparts: "nedesc, nedesc__textarea" })
|
|
41
|
-
)
|
|
42
|
-
)
|
|
43
|
-
);
|
|
44
|
-
case "availability":
|
|
45
|
-
const b = e.availability, g = ((o = b == null ? void 0 : b[0]) == null ? void 0 : o.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone, h = (i = e.participants) == null ? void 0 : i.find((p) => p.is_organizer), l = (h == null ? void 0 : h.email) ?? "primary", m = e.calendarIds.length > 0 ? e.calendarIds : [l], v = e.bookingCalendar == "primary" ? l : e.bookingCalendar;
|
|
46
|
-
return t(
|
|
47
|
-
"div",
|
|
48
|
-
{ key: a },
|
|
49
|
-
t("nylas-booking-calendar-picker", { name: "booking-calendar", calendars: s ?? [], defaultBookingCalendar: v, exportparts: "nbcp, nbcp__header, nbcp__input-label, nbcp__dropdown, nbcp__dropdown-button, nbcp__dropdown-content" }),
|
|
50
|
-
t("nylas-calendar-picker", { name: "calendars", calendars: s ?? [], defaultSelectedCalendars: m, organizerEmail: l, exportparts: "ncp ncp__header, ncp__dropdown, ncp__dropdown-button, ncp__dropdown-content" }),
|
|
51
|
-
t("nylas-availability-picker", { name: "availability", openHours: b, defaultTimezone: g, 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" })
|
|
52
|
-
);
|
|
53
|
-
case "bookingOptions":
|
|
54
|
-
return t(
|
|
55
|
-
"div",
|
|
56
|
-
{ key: a },
|
|
57
|
-
a == "new" && t("p", null, "Config"),
|
|
58
|
-
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" }),
|
|
59
|
-
t("nylas-custom-booking-flow", { name: "booking-type", bookingType: e.bookingType, exportparts: "ncbf, ncbf__header, ncbf__dropdown, ncbf__dropdown-button, ncbf__dropdown-content" }),
|
|
60
|
-
t(
|
|
61
|
-
"nylas-event-limits",
|
|
62
|
-
null,
|
|
63
|
-
t(
|
|
64
|
-
"div",
|
|
65
|
-
{ slot: "inputs" },
|
|
66
|
-
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" }),
|
|
67
|
-
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" })
|
|
68
|
-
)
|
|
69
|
-
)
|
|
70
|
-
);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
const X = '.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:space-between;align-items:center;gap:1rem;height:80px;padding:0 1rem;border-top:1px solid var(--nylas-base-200)}.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}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs .unsaved-changes.sc-nylas-editor-tabs{color:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs .saved-changes.sc-nylas-editor-tabs{color:var(--nylas-success)}.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}', Y = X;
|
|
74
|
-
var ee = function(a, e, n, s) {
|
|
75
|
-
var o = arguments.length, i = o < 3 ? e : s === null ? s = Object.getOwnPropertyDescriptor(e, n) : s, r;
|
|
76
|
-
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
77
|
-
i = Reflect.decorate(a, e, n, s);
|
|
78
|
-
else
|
|
79
|
-
for (var c = a.length - 1; c >= 0; c--)
|
|
80
|
-
(r = a[c]) && (i = (o < 3 ? r(i) : o > 3 ? r(e, n, i) : r(e, n)) || i);
|
|
81
|
-
return o > 3 && i && Object.defineProperty(e, n, i), i;
|
|
82
|
-
}, L = function(a, e) {
|
|
83
|
-
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
84
|
-
return Reflect.metadata(a, e);
|
|
85
|
-
};
|
|
86
|
-
const Z = class {
|
|
87
|
-
constructor(a) {
|
|
88
|
-
S(this, a), this.schedulerConfigChanged = y(this, "schedulerConfigChanged", 7), this.cancelButtonClick = y(this, "cancelButtonClick", 7), this.previewButtonClicked = y(this, "previewButtonClicked", 7), this.formSubmissionHandler = async (e) => {
|
|
89
|
-
var p, _, k, w, C, x, B, D, H, I, F, P, R, j, E, M;
|
|
90
|
-
e.preventDefault(), this.isLoading = !0, this.hasUnsavedChanges = !1, this.updateFormState();
|
|
91
|
-
const { title: n, description: s, duration: o, availability: i, calendarIds: r, bookingCalendar: c, location: f, bookingType: u, buffer: b, availableDaysInFuture: g, minCancellationNotice: h } = this.formState, l = (_ = (p = this.config) == null ? void 0 : p.participants) == null ? void 0 : _.find((O) => O.is_organizer), m = {
|
|
92
|
-
...((k = this.config) == null ? void 0 : k.id) && { id: this.config.id },
|
|
93
|
-
version: ((w = this.config) == null ? void 0 : w.version) ?? "1.0.0",
|
|
94
|
-
availability: {
|
|
95
|
-
duration_minutes: o ? parseInt(o) : 0,
|
|
96
|
-
availability_rules: {
|
|
97
|
-
availability_method: ((B = (x = (C = this.config) == null ? void 0 : C.availability) == null ? void 0 : x.availability_rules) == null ? void 0 : B.availability_method) ?? "collective",
|
|
98
|
-
buffer: b || { before: 0, after: 0 },
|
|
99
|
-
default_open_hours: ((I = (H = (D = this.config) == null ? void 0 : D.availability) == null ? void 0 : H.availability_rules) == null ? void 0 : I.default_open_hours) ?? [],
|
|
100
|
-
round_robin_group_id: ((R = (P = (F = this.config) == null ? void 0 : F.availability) == null ? void 0 : P.availability_rules) == null ? void 0 : R.round_robin_group_id) ?? ""
|
|
101
|
-
}
|
|
102
|
-
},
|
|
103
|
-
participants: [
|
|
104
|
-
{
|
|
105
|
-
name: (l == null ? void 0 : l.name) ?? (l == null ? void 0 : l.email) ?? ((j = this.currentUser) == null ? void 0 : j.name) ?? ((E = this.currentUser) == null ? void 0 : E.email) ?? "",
|
|
106
|
-
email: (l == null ? void 0 : l.email) ?? ((M = this.currentUser) == null ? void 0 : M.email) ?? "",
|
|
107
|
-
is_organizer: !0,
|
|
108
|
-
availability: {
|
|
109
|
-
calendar_ids: r != null && r.length ? r : ["primary"],
|
|
110
|
-
open_hours: i ?? []
|
|
111
|
-
},
|
|
112
|
-
booking: {
|
|
113
|
-
calendar_id: c && c !== "" ? c : "primary"
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
],
|
|
117
|
-
event_booking: {
|
|
118
|
-
title: (n == null ? void 0 : n.toString()) ?? "",
|
|
119
|
-
description: (s == null ? void 0 : s.toString()) ?? "",
|
|
120
|
-
location: (f == null ? void 0 : f.toString()) ?? "",
|
|
121
|
-
booking_type: (u == null ? void 0 : u.toString()) ?? "booking"
|
|
122
|
-
},
|
|
123
|
-
scheduler: {
|
|
124
|
-
available_days_in_future: g ?? 30,
|
|
125
|
-
min_cancellation_notice: h ?? 0
|
|
126
|
-
}
|
|
127
|
-
}, v = (O) => {
|
|
128
|
-
this.isLoading = !1, this.changesSaved = !0, setTimeout(() => {
|
|
129
|
-
this.changesSaved = !1;
|
|
130
|
-
}, 5e3);
|
|
131
|
-
};
|
|
132
|
-
this.schedulerConfigChanged.emit({ config: m, resetLoadingState: v, action: this.action });
|
|
133
|
-
}, this.calendars = void 0, this.config = void 0, this.currentUser = void 0, this.schedulerPreviewLink = "", this.action = "create", this.activeTab = "eventInfo", this.isLoading = !1, this.hasUnsavedChanges = !1, this.changesSaved = !1, this.formState = {};
|
|
134
|
-
}
|
|
135
|
-
configChangedHandler(a) {
|
|
136
|
-
d("[nylas-editor-tabs]", "configChangedHandler", a, this.config), this.formState = {
|
|
137
|
-
...this.getFormStateFromConfig(a)
|
|
138
|
-
}, a.id ? this.action = "edit" : this.action = "create";
|
|
139
|
-
}
|
|
140
|
-
connectedCallback() {
|
|
141
|
-
d("[nylas-editor-tabs]", "connectedCallback");
|
|
142
|
-
}
|
|
143
|
-
componentWillLoad() {
|
|
144
|
-
d("[nylas-editor-tabs]", "componentWillLoad"), this.formState = this.getFormStateFromConfig(this.config);
|
|
145
|
-
}
|
|
146
|
-
componentDidLoad() {
|
|
147
|
-
d("[nylas-editor-tabs]", "componentDidLoad");
|
|
148
|
-
}
|
|
149
|
-
disconnectedCallback() {
|
|
150
|
-
d("[nylas-editor-tabs]", "disconnectedCallback");
|
|
151
|
-
}
|
|
152
|
-
handleValueChanged(a) {
|
|
153
|
-
d("[nylas-editor-tabs]", "handleValueChanged", a), this.formState = { ...this.formState, [a.detail.name]: a.detail.value }, this.hasUnsavedChanges = !0;
|
|
154
|
-
}
|
|
155
|
-
getFormStateFromConfig(a) {
|
|
156
|
-
var n, s, o, i, r, c, f, u, b, g, h, l, m, v, p, _, k, w, C;
|
|
157
|
-
const e = (n = a == null ? void 0 : a.participants) == null ? void 0 : n.find((x) => x.is_organizer);
|
|
158
|
-
return {
|
|
159
|
-
title: ((s = a == null ? void 0 : a.event_booking) == null ? void 0 : s.title) ?? "",
|
|
160
|
-
description: ((o = a == null ? void 0 : a.event_booking) == null ? void 0 : o.description) ?? "",
|
|
161
|
-
duration: ((r = (i = a == null ? void 0 : a.availability) == null ? void 0 : i.duration_minutes) == null ? void 0 : r.toString()) ?? "10",
|
|
162
|
-
availability: ((c = e == null ? void 0 : e.availability) == null ? void 0 : c.open_hours) ?? void 0,
|
|
163
|
-
calendarIds: ((f = e == null ? void 0 : e.availability) == null ? void 0 : f.calendar_ids) ?? [],
|
|
164
|
-
participants: (a == null ? void 0 : a.participants) ?? [],
|
|
165
|
-
bookingCalendar: ((u = e == null ? void 0 : e.booking) == null ? void 0 : u.calendar_id) ?? (e == null ? void 0 : e.email) ?? "",
|
|
166
|
-
location: ((g = (b = this.config) == null ? void 0 : b.event_booking) == null ? void 0 : g.location) ?? "",
|
|
167
|
-
bookingType: ((l = (h = this.config) == null ? void 0 : h.event_booking) == null ? void 0 : l.booking_type) ?? "booking",
|
|
168
|
-
buffer: ((p = (v = (m = this.config) == null ? void 0 : m.availability) == null ? void 0 : v.availability_rules) == null ? void 0 : p.buffer) ?? { before: 0, after: 0 },
|
|
169
|
-
availableDaysInFuture: ((k = (_ = this.config) == null ? void 0 : _.scheduler) == null ? void 0 : k.available_days_in_future) ?? 30,
|
|
170
|
-
minCancellationNotice: ((C = (w = this.config) == null ? void 0 : w.scheduler) == null ? void 0 : C.min_cancellation_notice) ?? 0
|
|
171
|
-
};
|
|
172
|
-
}
|
|
173
|
-
updateFormState() {
|
|
174
|
-
new FormData(this.formRef).forEach((e, n) => {
|
|
175
|
-
switch (n) {
|
|
176
|
-
case "title":
|
|
177
|
-
this.formState.title = e.toString();
|
|
178
|
-
break;
|
|
179
|
-
case "description":
|
|
180
|
-
this.formState.description = e.toString();
|
|
181
|
-
break;
|
|
182
|
-
case "duration":
|
|
183
|
-
this.formState.duration = e.toString();
|
|
184
|
-
break;
|
|
185
|
-
case "availability":
|
|
186
|
-
this.formState.availability = JSON.parse(e.toString());
|
|
187
|
-
break;
|
|
188
|
-
case "participants":
|
|
189
|
-
this.formState.participants = JSON.parse(e.toString());
|
|
190
|
-
break;
|
|
191
|
-
case "calendars":
|
|
192
|
-
this.formState.calendarIds = e.toString().split(",");
|
|
193
|
-
break;
|
|
194
|
-
case "booking-calendar":
|
|
195
|
-
this.formState.bookingCalendar = e.toString();
|
|
196
|
-
break;
|
|
197
|
-
case "location":
|
|
198
|
-
this.formState.location = e.toString();
|
|
199
|
-
break;
|
|
200
|
-
case "booking-type":
|
|
201
|
-
this.formState.bookingType = e.toString();
|
|
202
|
-
break;
|
|
203
|
-
case "buffer-time":
|
|
204
|
-
this.formState.buffer = JSON.parse(e.toString());
|
|
205
|
-
break;
|
|
206
|
-
case "limit-future-bookings":
|
|
207
|
-
this.formState.availableDaysInFuture = parseInt(e.toString());
|
|
208
|
-
break;
|
|
209
|
-
case "min-cancellation-notice":
|
|
210
|
-
this.formState.minCancellationNotice = parseInt(e.toString());
|
|
211
|
-
break;
|
|
212
|
-
}
|
|
213
|
-
}), this.formState = { ...this.formState };
|
|
214
|
-
}
|
|
215
|
-
setActiveTab(a, e) {
|
|
216
|
-
a.preventDefault(), this.updateFormState(), this.activeTab = e;
|
|
217
|
-
}
|
|
218
|
-
render() {
|
|
219
|
-
var a;
|
|
220
|
-
return d("[nylas-editor-tabs]", "render", this.formState), t(N, { key: "5a1e8ee246d47626dce5515c3ec4df3e6ae893a4" }, t("form", { key: "f49d1fa60f2724c5cae8c1328dfee945ae24f1e2", onSubmit: this.formSubmissionHandler, class: "scheduler-editor", ref: (e) => this.formRef = e }, t("div", { key: "f0b678836e12c3878128e4b810e5541f00ddee29", class: "form-contents" }, t("div", { key: "910dc155a6b7b01e300084fe405da0d0b0801847", class: "tabs" }, t("button", { key: "80ca54ac98ae0d3b2298ae62253ffcb9d3ae539d", class: { tab: !0, active: this.activeTab == "eventInfo" }, onClick: (e) => this.setActiveTab(e, "eventInfo") }, t("calendar-info-icon", { key: "842e45f308921afa7948f8408b84f95d7b802850", width: "16", height: "16" }), "Event Info"), t("button", { key: "7b79207240cbae5dcd554d448f68dc544f2e6c80", class: { tab: !0, active: this.activeTab == "availability" }, onClick: (e) => this.setActiveTab(e, "availability") }, t("calendar-patterns-icon", { key: "47b3d8cf7ee50eac7d377ab3faf35c27f1215e96", width: "16", height: "16" }), "Availability"), t("button", { key: "ffb175caa6ccc4ba377ee4947759d0561ebb089b", class: { tab: !0, active: this.activeTab == "bookingOptions" }, onClick: (e) => this.setActiveTab(e, "bookingOptions") }, t("flow-icon", { key: "fc3bec08bd5080e7b2ec7816bb3c021876c20d7c", width: "16", height: "16" }), "Booking Options")), t("div", { key: "80802e1388eb767bcea718907e75d5b4a2de3701", class: "tab-content" }, t(Q, { key: "5c5618341227447d2a41061f415e54d83efc354a", formState: this.formState, activeTab: this.activeTab, calendars: this.calendars, id: ((a = this.config) == null ? void 0 : a.id) ?? "new" }))), t("div", { key: "d315bad7ea2efe6699557a5e07b55053926a7517", class: "footer" }, t("div", { key: "4c92a480ee6d2f04d9fa36f3e870d414835406e1", class: "preview" }, this.schedulerPreviewLink !== "" && this.action === "edit" && t("button-component", { type: "button", disabled: this.isLoading, clickHandler: (e) => {
|
|
221
|
-
e.preventDefault(), this.previewButtonClicked.emit(this.host).defaultPrevented || window.open(V(this.schedulerPreviewLink, this.config), "_blank");
|
|
222
|
-
}, variant: "basic" }, "Preview")), t("div", { key: "22fdd2183dcc2c299d2fdacf0db8922a95a5692e", class: "buttons" }, t("p", { key: "63ea7b4d8362f409caec467a7bce22142ccc1b20", 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: "6ceded872ee5510234ff79bff3f0173a72314714", type: "button", disabled: this.isLoading, clickHandler: (e) => {
|
|
226
|
-
e.preventDefault(), this.cancelButtonClick.emit();
|
|
227
|
-
}, variant: "basic" }, "Cancel"), t("button-component", { key: "4f33ad6071f503837395d900b67fafc8605d8043", type: "submit", disabled: this.isLoading }, this.isLoading ? t("span", null, "Saving", t("loading-icon", null), " ") : this.action == "create" ? "Create" : "Save changes")))));
|
|
228
|
-
}
|
|
229
|
-
get host() {
|
|
230
|
-
return U(this);
|
|
231
|
-
}
|
|
232
|
-
static get watchers() {
|
|
233
|
-
return {
|
|
234
|
-
config: ["configChangedHandler"]
|
|
235
|
-
};
|
|
236
|
-
}
|
|
237
|
-
};
|
|
238
|
-
ee([
|
|
239
|
-
A({
|
|
240
|
-
name: "nylas-editor-tabs",
|
|
241
|
-
stateToProps: /* @__PURE__ */ new Map([
|
|
242
|
-
["schedulerConfig.calendars", "calendars"],
|
|
243
|
-
["schedulerConfig.config", "config"],
|
|
244
|
-
["schedulerConfig.currentUser", "currentUser"]
|
|
245
|
-
]),
|
|
246
|
-
eventToProps: {
|
|
247
|
-
schedulerConfigChanged: async (a, e) => {
|
|
248
|
-
const { resetLoadingState: n, action: s, config: o } = a.detail;
|
|
249
|
-
n && n(a), s === "edit" ? await e.schedulerConfig.updateConfiguration(o) : await e.schedulerConfig.createConfiguration(o);
|
|
250
|
-
},
|
|
251
|
-
cancelButtonClick: async (a, e) => {
|
|
252
|
-
e.schedulerConfigStore.state.action = null;
|
|
253
|
-
}
|
|
254
|
-
},
|
|
255
|
-
localPropsToProp: /* @__PURE__ */ new Map([["schedulerPreviewLink", "schedulerPreviewLink"]]),
|
|
256
|
-
fireRegisterEvent: !0
|
|
257
|
-
}),
|
|
258
|
-
L("design:type", Function),
|
|
259
|
-
L("design:paramtypes", []),
|
|
260
|
-
L("design:returntype", void 0)
|
|
261
|
-
], Z.prototype, "render", null);
|
|
262
|
-
Z.style = Y;
|
|
263
|
-
const te = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-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}.header h2{margin:0;font-size:1.25rem;color:var(--nylas-base-900)}.header p{margin:0;font-size:1rem;color:var(--nylas-base-700)}.header .actions{justify-self:end}.configurations{border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}.configurations table{width:100%;border-spacing:0;border-collapse:collapse}.configurations table tr{border-bottom:1px solid var(--nylas-base-200)}.configurations table tr:last-of-type{border-bottom:0}.configurations 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 tr.no-configurations td>div h3{margin:0 0 1rem 0;color:var(--nylas-base-700)}.configurations table tr.no-configurations td>div p{margin:0 0 1rem 0;color:var(--nylas-base-600)}.configurations table tr.no-configurations td>div calendar-icon{margin-bottom:1rem;color:var(--nylas-base-200)}.configurations table th,.configurations table td{text-align:left;padding:1rem}.configurations table .actions{text-align:right}.configurations table .actions{display:flex;justify-content:flex-end;gap:1rem}.configurations table .title{display:flex;flex-direction:column}.configurations table .title .config-event-title{font-weight:600}.configurations table .title .config-event-description{font-size:0.75rem}', ae = te;
|
|
264
|
-
var ne = function(a, e, n, s) {
|
|
265
|
-
var o = arguments.length, i = o < 3 ? e : s === null ? s = Object.getOwnPropertyDescriptor(e, n) : s, r;
|
|
266
|
-
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
267
|
-
i = Reflect.decorate(a, e, n, s);
|
|
268
|
-
else
|
|
269
|
-
for (var c = a.length - 1; c >= 0; c--)
|
|
270
|
-
(r = a[c]) && (i = (o < 3 ? r(i) : o > 3 ? r(e, n, i) : r(e, n)) || i);
|
|
271
|
-
return o > 3 && i && Object.defineProperty(e, n, i), i;
|
|
272
|
-
}, T = function(a, e) {
|
|
273
|
-
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
274
|
-
return Reflect.metadata(a, e);
|
|
275
|
-
};
|
|
276
|
-
const z = class {
|
|
277
|
-
constructor(a) {
|
|
278
|
-
S(this, a), this.initListConfigurations = y(this, "initListConfigurations", 7), this.createButtonClick = y(this, "createButtonClick", 7), this.editButtonClick = y(this, "editButtonClick", 7), this.deleteButtonClick = y(this, "deleteButtonClick", 7), this.configurations = [], this.schedulerPreviewLink = "", this.state = "loading";
|
|
279
|
-
}
|
|
280
|
-
connectedCallback() {
|
|
281
|
-
d("[nylas-list-configurations]", "connectedCallback");
|
|
282
|
-
}
|
|
283
|
-
componentWillLoad() {
|
|
284
|
-
d("[nylas-list-configurations]", "componentWillLoad"), this.configurations && this.configurations.length > 0 && (this.state = "loaded");
|
|
285
|
-
}
|
|
286
|
-
componentDidLoad() {
|
|
287
|
-
d("[nylas-list-configurations]", "componentDidLoad"), this.initListConfigurations.emit(this.host);
|
|
288
|
-
}
|
|
289
|
-
disconnectedCallback() {
|
|
290
|
-
d("[nylas-list-configurations]", "disconnectedCallback");
|
|
291
|
-
}
|
|
292
|
-
async getState() {
|
|
293
|
-
return this.state;
|
|
294
|
-
}
|
|
295
|
-
async setState(a) {
|
|
296
|
-
this.state = a;
|
|
297
|
-
}
|
|
298
|
-
render() {
|
|
299
|
-
return t(N, { key: "c6579bd33e43be81caa460d87e99ed53f8123c6a" }, t("div", { key: "d3ff4fc25e34a2dab3820b774f52a845c37bb282", class: "nylas-list-configurations" }, t("div", { key: "fc6ff138be7cf63196217b7ef7524ae8f0a82c5c", class: "header" }, t("div", { key: "a518d44c645bfc5d5e8449119ebc4be7c475a5f3", class: "description" }, t("h2", { key: "a9d999a93c26ee3d9040dcae09306ecb7da43fb5" }, "All scheduling configurations"), t("p", { key: "6361799617ce1ccf7469cce6a0064d94d97701b0" }, "Create, edit and manage all your scheduling configurations.")), this.configurations && this.configurations.length > 0 && t("div", { class: "actions" }, t("button-component", { clickHandler: () => {
|
|
300
|
-
this.createButtonClick.emit(this.host);
|
|
301
|
-
} }, "Create new"))), t("div", { key: "3f26491b35427c4364bcc1c5e1cbffdfabd52d37", class: "configurations" }, t("table", { key: "ca8bf13b620b92cd4892b8dbf218988915ce4fc0" }, t("tr", { key: "09526ab48bbc988b0595f8060a184c340f1d43cc" }, t("th", { key: "7367e03d461f854eaf84e166d65471d356f44ee5" }, "Configuration event title"), t("th", { key: "f983dcae11fdd33e21f0f202eb9b43a7d409b714" }, "Duration"), t("th", { key: "828c60e134498a1db8bd31ce0311bb8a771cb435", class: "actions" }, "Actions")), 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 your configurations")))), 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 configurations found"), t("p", null, "Get started with creating your first scheduling page"), t("button-component", { clickHandler: () => {
|
|
302
|
-
this.createButtonClick.emit(this.host);
|
|
303
|
-
} }, "Create new")))), this.state !== "loading" && this.configurations.map((a) => t("tr", { key: a.id }, t("td", null, t("div", { class: "title" }, t("span", { class: "config-event-title" }, a.event_booking.title), t("span", { class: "config-event-description" }, a.event_booking.description))), t("td", null, t("div", null, a.availability.duration_minutes, " mins")), t("td", null, t("div", { class: "actions" }, t("button-component", { variant: "basic", clickHandler: (e) => {
|
|
304
|
-
e.preventDefault(), window.open(V(this.schedulerPreviewLink, a), "_blank");
|
|
305
|
-
} }, "Preview"), t("button-component", { variant: "basic", clickHandler: (e) => {
|
|
306
|
-
e.preventDefault(), this.editButtonClick.emit({ host: this.host, configuration: a });
|
|
307
|
-
} }, "Edit"), t("button-component", { variant: "basic", clickHandler: (e) => {
|
|
308
|
-
e.preventDefault(), this.deleteButtonClick.emit({ host: this.host, configuration: a });
|
|
309
|
-
} }, "Delete")))))))));
|
|
310
|
-
}
|
|
311
|
-
get host() {
|
|
312
|
-
return U(this);
|
|
313
|
-
}
|
|
314
|
-
};
|
|
315
|
-
ne([
|
|
316
|
-
A({
|
|
317
|
-
name: "nylas-list-configurations",
|
|
318
|
-
stateToProps: /* @__PURE__ */ new Map([["schedulerConfig.configurations", "configurations"]]),
|
|
319
|
-
localPropsToProp: /* @__PURE__ */ new Map([["schedulerPreviewLink", "schedulerPreviewLink"]]),
|
|
320
|
-
eventToProps: {
|
|
321
|
-
initListConfigurations: async (a, e) => {
|
|
322
|
-
const n = a.detail;
|
|
323
|
-
await n.setState("loading"), await e.schedulerConfig.getConfigurations(), await n.setState("loaded");
|
|
324
|
-
},
|
|
325
|
-
createButtonClick: async (a, e) => {
|
|
326
|
-
e.schedulerConfigStore.state.config = {}, e.schedulerConfigStore.state.action = "create";
|
|
327
|
-
},
|
|
328
|
-
deleteButtonClick: async (a, e) => {
|
|
329
|
-
const { configuration: n } = a.detail;
|
|
330
|
-
await e.schedulerConfig.deleteConfiguration(n.id);
|
|
331
|
-
},
|
|
332
|
-
editButtonClick: async (a, e) => {
|
|
333
|
-
const { configuration: n } = a.detail;
|
|
334
|
-
e.schedulerConfigStore.state.config = n, e.schedulerConfigStore.state.action = "edit";
|
|
335
|
-
}
|
|
336
|
-
},
|
|
337
|
-
fireRegisterEvent: !0
|
|
338
|
-
}),
|
|
339
|
-
T("design:type", Function),
|
|
340
|
-
T("design:paramtypes", []),
|
|
341
|
-
T("design:returntype", void 0)
|
|
342
|
-
], z.prototype, "render", null);
|
|
343
|
-
z.style = ae;
|
|
344
|
-
export {
|
|
345
|
-
J as google_logo_icon,
|
|
346
|
-
K as microsoft_logo_icon,
|
|
347
|
-
Z as nylas_editor_tabs,
|
|
348
|
-
z as nylas_list_configurations
|
|
349
|
-
};
|