@nylas/web-elements 1.1.0-canary.10 → 1.1.0-canary.11
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/cjs/add-circle-icon_21.cjs.entry.js +73 -40
- package/dist/cjs/add-circle-icon_21.cjs.entry.js.map +1 -1
- package/dist/cjs/google-logo-icon_4.cjs.entry.js +5 -4
- package/dist/cjs/google-logo-icon_4.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/nylas-api-request-05f1e068.js.map +1 -1
- package/dist/cjs/nylas-api-request-de316f1a.js.map +1 -1
- package/dist/cjs/nylas-availability-picker.cjs.entry.js +14 -7
- package/dist/cjs/nylas-availability-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-booked-event-card.cjs.entry.js +1 -1
- package/dist/cjs/nylas-booked-event-card_10.cjs.entry.js +9 -9
- package/dist/cjs/nylas-booking-calendar-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-booking-form.cjs.entry.js +3 -3
- package/dist/cjs/nylas-buffer-time.cjs.entry.js +7 -6
- package/dist/cjs/nylas-buffer-time.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-calendar-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/nylas-editor-tabs.cjs.entry.js +5 -4
- package/dist/cjs/nylas-editor-tabs.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-event-description.cjs.entry.js +2 -2
- package/dist/cjs/nylas-event-description.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-event-duration.cjs.entry.js +1 -1
- package/dist/cjs/nylas-event-duration.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-event-info.cjs.entry.js +1 -1
- package/dist/cjs/nylas-event-info.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-event-limits.cjs.entry.js +1 -1
- package/dist/cjs/nylas-event-limits.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-event-title.cjs.entry.js +2 -2
- package/dist/cjs/nylas-if-state.cjs.entry.js +1 -1
- package/dist/cjs/nylas-limit-future-bookings.cjs.entry.js +1 -1
- package/dist/cjs/nylas-limit-future-bookings.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-locale-switch.cjs.entry.js +3 -3
- package/dist/cjs/nylas-location-component.cjs.entry.js +4 -4
- package/dist/cjs/nylas-location-component.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-min-cancellation-notice.cjs.entry.js +1 -1
- package/dist/cjs/nylas-min-cancellation-notice.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-scheduler-editor.cjs.entry.js +1 -1
- package/dist/cjs/nylas-scheduler-editor.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-selected-event-card.cjs.entry.js +1 -1
- package/dist/cjs/nylas-time-window-picker.cjs.entry.js +39 -14
- package/dist/cjs/nylas-time-window-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-web-elements.cjs.js +1 -1
- package/dist/cjs/scheduler-config-store-918c20d5.js.map +1 -1
- package/dist/cjs/scheduler-config-store-a5b7c08b.js.map +1 -1
- package/dist/collection/collection-manifest.json +3 -3
- package/dist/collection/common/nylas-api-request.js.map +1 -1
- package/dist/collection/components/nylas-if-state/nylas-if-state.js +1 -1
- package/dist/collection/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.js +1 -1
- package/dist/collection/components/scheduler/nylas-booking-form/nylas-booking-form.js +3 -3
- package/dist/collection/components/scheduler/nylas-date-picker/nylas-date-picker.js +1 -1
- package/dist/collection/components/scheduler/nylas-locale-switch/nylas-locale-switch.js +3 -3
- package/dist/collection/components/scheduler/nylas-selected-event-card/nylas-selected-event-card.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.js +35 -14
- package/dist/collection/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-booking-calendar-picker/nylas-booking-calendar-picker.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-booking-calendar-picker/nylas-booking-calendar-picker.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-buffer-time/nylas-buffer-time.css +1 -1
- package/dist/collection/components/scheduler-editor/nylas-buffer-time/nylas-buffer-time.js +6 -5
- package/dist/collection/components/scheduler-editor/nylas-buffer-time/nylas-buffer-time.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-buffer-time/test/nylas-buffer-time.spec.js +2 -2
- package/dist/collection/components/scheduler-editor/nylas-buffer-time/test/nylas-buffer-time.spec.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-calendar-picker/nylas-calendar-picker.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-calendar-picker/nylas-calendar-picker.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.js +6 -5
- package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-description/nylas-event-description.js +5 -5
- package/dist/collection/components/scheduler-editor/nylas-event-description/nylas-event-description.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-duration/nylas-event-duration.js +4 -4
- package/dist/collection/components/scheduler-editor/nylas-event-duration/nylas-event-duration.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-info/nylas-event-info.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-info/nylas-event-info.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-limits/nylas-event-limits.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-limits/nylas-event-limits.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-title/nylas-event-title.js +2 -2
- package/dist/collection/components/scheduler-editor/nylas-limit-future-bookings/nylas-limit-future-bookings.js +4 -4
- package/dist/collection/components/scheduler-editor/nylas-limit-future-bookings/nylas-limit-future-bookings.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-location-component/nylas-location-component.js +23 -23
- package/dist/collection/components/scheduler-editor/nylas-location-component/nylas-location-component.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-min-cancellation-notice/nylas-min-cancellation-notice.js +3 -3
- package/dist/collection/components/scheduler-editor/nylas-min-cancellation-notice/nylas-min-cancellation-notice.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.js +9 -9
- package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-time-window-picker/nylas-time-window-picker.js +56 -57
- package/dist/collection/components/scheduler-editor/nylas-time-window-picker/nylas-time-window-picker.js.map +1 -1
- package/dist/collection/stores/scheduler-config-store.js.map +1 -1
- package/dist/collection/types/index.js +6 -0
- package/dist/collection/types/index.js.map +1 -0
- package/dist/components/nylas-api-request.js.map +1 -1
- package/dist/components/nylas-availability-picker2.js +15 -8
- package/dist/components/nylas-availability-picker2.js.map +1 -1
- package/dist/components/nylas-booked-event-card2.js +1 -1
- package/dist/components/nylas-booking-calendar-picker2.js.map +1 -1
- package/dist/components/nylas-booking-form2.js +3 -3
- package/dist/components/nylas-buffer-time2.js +7 -6
- package/dist/components/nylas-buffer-time2.js.map +1 -1
- package/dist/components/nylas-calendar-picker2.js.map +1 -1
- package/dist/components/nylas-date-picker2.js +1 -1
- package/dist/components/nylas-editor-tabs2.js +5 -4
- package/dist/components/nylas-editor-tabs2.js.map +1 -1
- package/dist/components/nylas-event-description2.js +2 -2
- package/dist/components/nylas-event-description2.js.map +1 -1
- package/dist/components/nylas-event-duration2.js +1 -1
- package/dist/components/nylas-event-duration2.js.map +1 -1
- package/dist/components/nylas-event-info2.js +1 -1
- package/dist/components/nylas-event-info2.js.map +1 -1
- package/dist/components/nylas-event-limits2.js +1 -1
- package/dist/components/nylas-event-limits2.js.map +1 -1
- package/dist/components/nylas-event-title2.js +2 -2
- package/dist/components/nylas-if-state.js +1 -1
- package/dist/components/nylas-limit-future-bookings2.js +1 -1
- package/dist/components/nylas-limit-future-bookings2.js.map +1 -1
- package/dist/components/nylas-locale-switch2.js +3 -3
- package/dist/components/nylas-location-component2.js +5 -5
- package/dist/components/nylas-location-component2.js.map +1 -1
- package/dist/components/nylas-min-cancellation-notice2.js +1 -1
- package/dist/components/nylas-min-cancellation-notice2.js.map +1 -1
- package/dist/components/nylas-scheduler-editor.js +1 -1
- package/dist/components/nylas-scheduler-editor.js.map +1 -1
- package/dist/components/nylas-selected-event-card2.js +1 -1
- package/dist/components/nylas-time-window-picker2.js +39 -16
- package/dist/components/nylas-time-window-picker2.js.map +1 -1
- package/dist/components/scheduler-config-store.js.map +1 -1
- package/dist/esm/add-circle-icon_21.entry.js +73 -40
- package/dist/esm/add-circle-icon_21.entry.js.map +1 -1
- package/dist/esm/google-logo-icon_4.entry.js +5 -4
- package/dist/esm/google-logo-icon_4.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/nylas-api-request-59738f8c.js.map +1 -1
- package/dist/esm/nylas-api-request-ff2869d7.js.map +1 -1
- package/dist/esm/nylas-availability-picker.entry.js +14 -7
- package/dist/esm/nylas-availability-picker.entry.js.map +1 -1
- package/dist/esm/nylas-booked-event-card.entry.js +1 -1
- package/dist/esm/nylas-booked-event-card_10.entry.js +9 -9
- package/dist/esm/nylas-booking-calendar-picker.entry.js.map +1 -1
- package/dist/esm/nylas-booking-form.entry.js +3 -3
- package/dist/esm/nylas-buffer-time.entry.js +7 -6
- package/dist/esm/nylas-buffer-time.entry.js.map +1 -1
- package/dist/esm/nylas-calendar-picker.entry.js.map +1 -1
- package/dist/esm/nylas-date-picker.entry.js +1 -1
- package/dist/esm/nylas-editor-tabs.entry.js +5 -4
- package/dist/esm/nylas-editor-tabs.entry.js.map +1 -1
- package/dist/esm/nylas-event-description.entry.js +2 -2
- package/dist/esm/nylas-event-description.entry.js.map +1 -1
- package/dist/esm/nylas-event-duration.entry.js +1 -1
- package/dist/esm/nylas-event-duration.entry.js.map +1 -1
- package/dist/esm/nylas-event-info.entry.js +1 -1
- package/dist/esm/nylas-event-info.entry.js.map +1 -1
- package/dist/esm/nylas-event-limits.entry.js +1 -1
- package/dist/esm/nylas-event-limits.entry.js.map +1 -1
- package/dist/esm/nylas-event-title.entry.js +2 -2
- package/dist/esm/nylas-if-state.entry.js +1 -1
- package/dist/esm/nylas-limit-future-bookings.entry.js +1 -1
- package/dist/esm/nylas-limit-future-bookings.entry.js.map +1 -1
- package/dist/esm/nylas-locale-switch.entry.js +3 -3
- package/dist/esm/nylas-location-component.entry.js +4 -4
- package/dist/esm/nylas-location-component.entry.js.map +1 -1
- package/dist/esm/nylas-min-cancellation-notice.entry.js +1 -1
- package/dist/esm/nylas-min-cancellation-notice.entry.js.map +1 -1
- package/dist/esm/nylas-scheduler-editor.entry.js +1 -1
- package/dist/esm/nylas-scheduler-editor.entry.js.map +1 -1
- package/dist/esm/nylas-selected-event-card.entry.js +1 -1
- package/dist/esm/nylas-time-window-picker.entry.js +39 -14
- package/dist/esm/nylas-time-window-picker.entry.js.map +1 -1
- package/dist/esm/nylas-web-elements.js +1 -1
- package/dist/esm/scheduler-config-store-8ccc8dc7.js.map +1 -1
- package/dist/esm/scheduler-config-store-ec3b6190.js.map +1 -1
- package/dist/nylas-web-elements/nylas-api-request-ff2869d7.js.map +1 -1
- package/dist/nylas-web-elements/nylas-availability-picker.entry.js +14 -7
- package/dist/nylas-web-elements/nylas-availability-picker.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-booked-event-card.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-booking-calendar-picker.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-booking-form.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-buffer-time.entry.js +7 -6
- package/dist/nylas-web-elements/nylas-buffer-time.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-calendar-picker.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-date-picker.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-editor-tabs.entry.js +5 -4
- package/dist/nylas-web-elements/nylas-editor-tabs.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-event-description.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-event-description.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-event-duration.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-event-duration.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-event-info.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-event-info.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-event-limits.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-event-limits.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-event-title.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-if-state.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-limit-future-bookings.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-limit-future-bookings.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-locale-switch.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-location-component.entry.js +4 -4
- package/dist/nylas-web-elements/nylas-location-component.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-min-cancellation-notice.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-min-cancellation-notice.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-scheduler-editor.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-scheduler-editor.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-selected-event-card.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-time-window-picker.entry.js +39 -14
- package/dist/nylas-web-elements/nylas-time-window-picker.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-web-elements.esm.js +1 -1
- package/dist/nylas-web-elements/p-0dabcb4d.js.map +1 -1
- package/dist/nylas-web-elements/{p-933c6d32.entry.js → p-181654f5.entry.js} +3 -3
- package/dist/nylas-web-elements/{p-933c6d32.entry.js.map → p-181654f5.entry.js.map} +1 -1
- package/dist/nylas-web-elements/{p-b1b3eb52.entry.js → p-1871c702.entry.js} +2 -2
- package/dist/nylas-web-elements/p-4f4e83d0.entry.js +2 -0
- package/dist/nylas-web-elements/p-4f4e83d0.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-a219b2c7.entry.js +2 -0
- package/dist/nylas-web-elements/p-a219b2c7.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-a002b4cf.entry.js → p-e92690a2.entry.js} +2 -2
- package/dist/nylas-web-elements/p-ee91a2a0.js.map +1 -1
- package/dist/nylas-web-elements/scheduler-config-store-8ccc8dc7.js.map +1 -1
- package/dist/types/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.d.ts +10 -5
- package/dist/types/components/scheduler-editor/nylas-event-description/nylas-event-description.d.ts +2 -2
- package/dist/types/components/scheduler-editor/nylas-location-component/nylas-location-component.d.ts +2 -2
- package/dist/types/components/scheduler-editor/nylas-time-window-picker/nylas-time-window-picker.d.ts +8 -3
- package/dist/types/components.d.ts +125 -32
- package/dist/types/stores/scheduler-config-store.d.ts +5 -1
- package/dist/types/types/index.d.ts +73 -0
- package/package.json +4 -2
- package/dist/nylas-web-elements/p-74492776.entry.js +0 -2
- package/dist/nylas-web-elements/p-74492776.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-76461af6.entry.js +0 -2
- package/dist/nylas-web-elements/p-76461af6.entry.js.map +0 -1
- /package/dist/nylas-web-elements/{p-b1b3eb52.entry.js.map → p-1871c702.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-a002b4cf.entry.js.map → p-e92690a2.entry.js.map} +0 -0
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
|
|
8
8
|
import { AuthConfig, Calendar, Configuration, Folder, Message, Notification, NylasAuthType, NylasSchedulerBookingData as NylasSchedulerBookingData1, NylasSchedulerErrorResponse, ThemeConfig, Thread, Timeslot } from "@nylas/core";
|
|
9
|
+
import { OpenHours } from "./components/scheduler-editor/nylas-availability-picker/nylas-availability-picker";
|
|
9
10
|
import { DataState, InternalAttachment, NylasEvent } from "./common/types";
|
|
10
11
|
import { ConfigSettings, NylasEvent as NylasEvent1, NylasSchedulerBookingData, NylasSchedulerErrorResponse as NylasSchedulerErrorResponse1 } from ".";
|
|
11
12
|
import { AuthArgs, NylasApiRequest, User } from "./common/nylas-api-request";
|
|
@@ -27,6 +28,7 @@ import { NylasSchedulerConnector } from "./connector/nylas-scheduler-connector/i
|
|
|
27
28
|
import { SummarizeEvent } from "./components/mailbox/nylas-summarize-message-button/nylas-summarize-message-button";
|
|
28
29
|
import { RefreshEvent } from "./components/mailbox/nylas-threads-refresh/nylas-threads-refresh";
|
|
29
30
|
export { AuthConfig, Calendar, Configuration, Folder, Message, Notification, NylasAuthType, NylasSchedulerBookingData as NylasSchedulerBookingData1, NylasSchedulerErrorResponse, ThemeConfig, Thread, Timeslot } from "@nylas/core";
|
|
31
|
+
export { OpenHours } from "./components/scheduler-editor/nylas-availability-picker/nylas-availability-picker";
|
|
30
32
|
export { DataState, InternalAttachment, NylasEvent } from "./common/types";
|
|
31
33
|
export { ConfigSettings, NylasEvent as NylasEvent1, NylasSchedulerBookingData, NylasSchedulerErrorResponse as NylasSchedulerErrorResponse1 } from ".";
|
|
32
34
|
export { AuthArgs, NylasApiRequest, User } from "./common/nylas-api-request";
|
|
@@ -184,8 +186,17 @@ export namespace Components {
|
|
|
184
186
|
*/
|
|
185
187
|
interface NylasAvailabilityPicker {
|
|
186
188
|
"defaultTimezone": string;
|
|
189
|
+
/**
|
|
190
|
+
* The name of the availability picker.
|
|
191
|
+
*/
|
|
187
192
|
"name": string;
|
|
193
|
+
/**
|
|
194
|
+
* The open hours to display.
|
|
195
|
+
*/
|
|
188
196
|
"openHours"?: OpenHours[];
|
|
197
|
+
/**
|
|
198
|
+
* The selected configuration.
|
|
199
|
+
*/
|
|
189
200
|
"selectedConfiguration"?: Configuration;
|
|
190
201
|
}
|
|
191
202
|
/**
|
|
@@ -230,7 +241,7 @@ export namespace Components {
|
|
|
230
241
|
*/
|
|
231
242
|
"currentUser"?: User;
|
|
232
243
|
/**
|
|
233
|
-
* The default selected
|
|
244
|
+
* The default selected calendar.
|
|
234
245
|
*/
|
|
235
246
|
"defaultBookingCalendar": string;
|
|
236
247
|
/**
|
|
@@ -278,7 +289,7 @@ export namespace Components {
|
|
|
278
289
|
*/
|
|
279
290
|
"calendars"?: Calendar[];
|
|
280
291
|
/**
|
|
281
|
-
* The
|
|
292
|
+
* The logged in user.
|
|
282
293
|
*/
|
|
283
294
|
"currentUser"?: User;
|
|
284
295
|
/**
|
|
@@ -369,7 +380,7 @@ export namespace Components {
|
|
|
369
380
|
*/
|
|
370
381
|
"calendars"?: Calendar[];
|
|
371
382
|
/**
|
|
372
|
-
* The current
|
|
383
|
+
* The current logged in user.
|
|
373
384
|
*/
|
|
374
385
|
"currentUser"?: User;
|
|
375
386
|
/**
|
|
@@ -393,7 +404,13 @@ export namespace Components {
|
|
|
393
404
|
* The `nylas-event-description` component is a form input for the description of an event.
|
|
394
405
|
*/
|
|
395
406
|
interface NylasEventDescription {
|
|
407
|
+
/**
|
|
408
|
+
* The event description stored in the configuration
|
|
409
|
+
*/
|
|
396
410
|
"eventDescription"?: string;
|
|
411
|
+
/**
|
|
412
|
+
* The name of the event description input.
|
|
413
|
+
*/
|
|
397
414
|
"name": string;
|
|
398
415
|
/**
|
|
399
416
|
* The selected config
|
|
@@ -404,7 +421,13 @@ export namespace Components {
|
|
|
404
421
|
* The `nylas-event-duration` component is a form input for the duration of an event.
|
|
405
422
|
*/
|
|
406
423
|
interface NylasEventDuration {
|
|
424
|
+
/**
|
|
425
|
+
* The event duration in minutes as set in the configuration.
|
|
426
|
+
*/
|
|
407
427
|
"eventDurationMinutes"?: number;
|
|
428
|
+
/**
|
|
429
|
+
* The name of the event duration. Default is 'duration'.
|
|
430
|
+
*/
|
|
408
431
|
"name": string;
|
|
409
432
|
/**
|
|
410
433
|
* The selected config
|
|
@@ -463,7 +486,13 @@ export namespace Components {
|
|
|
463
486
|
* The `nylas-limit-future-bookings` component is a form input for the description of an event.
|
|
464
487
|
*/
|
|
465
488
|
interface NylasLimitFutureBookings {
|
|
489
|
+
/**
|
|
490
|
+
* The number of days into the future that invitees will see availability, as set in the configuration.
|
|
491
|
+
*/
|
|
466
492
|
"availableDaysInFuture"?: number;
|
|
493
|
+
/**
|
|
494
|
+
* The name of the limit future bookings input.
|
|
495
|
+
*/
|
|
467
496
|
"name": string;
|
|
468
497
|
/**
|
|
469
498
|
* The selected config
|
|
@@ -514,7 +543,13 @@ export namespace Components {
|
|
|
514
543
|
* The `nylas-location-component` component is a form input for the description of an event.
|
|
515
544
|
*/
|
|
516
545
|
interface NylasLocationComponent {
|
|
546
|
+
/**
|
|
547
|
+
* The event location stored in the configuration
|
|
548
|
+
*/
|
|
517
549
|
"eventLocation"?: string;
|
|
550
|
+
/**
|
|
551
|
+
* The name of the event location input.
|
|
552
|
+
*/
|
|
518
553
|
"name": string;
|
|
519
554
|
/**
|
|
520
555
|
* The selected config
|
|
@@ -651,7 +686,13 @@ export namespace Components {
|
|
|
651
686
|
* The `nylas-min-cancellation-notice` component is a form input for the description of an event.
|
|
652
687
|
*/
|
|
653
688
|
interface NylasMinCancellationNotice {
|
|
689
|
+
/**
|
|
690
|
+
* The minimum cancellation notice stored in the configuration
|
|
691
|
+
*/
|
|
654
692
|
"minCancellationNotice"?: number;
|
|
693
|
+
/**
|
|
694
|
+
* The name of the min cancellation notice input.
|
|
695
|
+
*/
|
|
655
696
|
"name": string;
|
|
656
697
|
/**
|
|
657
698
|
* The selected config
|
|
@@ -732,11 +773,11 @@ export namespace Components {
|
|
|
732
773
|
*/
|
|
733
774
|
"defaultAuthArgs"?: AuthArgs;
|
|
734
775
|
/**
|
|
735
|
-
* The default
|
|
776
|
+
* The default requires_session_auth flag to use to set the default value for the requireSessionAuth property when creating a configuration. If set to true, a session token must be provided to the <nylas-scheduling/> component. If set to false, then a session token is not required, and the configuration id can be passed to the <nylas-scheduling/> component instead.
|
|
736
777
|
*/
|
|
737
778
|
"defaultRequiresSessionAuth": boolean;
|
|
738
779
|
/**
|
|
739
|
-
* The default scheduler config store state. Used to set the initial state of the scheduler config store.
|
|
780
|
+
* The default scheduler config store state. Used to set the initial state of the scheduler config store. This state can be used to pass defaults to newly created configurations.
|
|
740
781
|
*/
|
|
741
782
|
"defaultSchedulerConfigState"?: Partial<NylasSchedulerConfigStoreState>;
|
|
742
783
|
/**
|
|
@@ -744,7 +785,7 @@ export namespace Components {
|
|
|
744
785
|
*/
|
|
745
786
|
"eventOverrides": SchedulerEditorEventOverride;
|
|
746
787
|
/**
|
|
747
|
-
*
|
|
788
|
+
* This is used to set the mode for the scheduler config. The mode can be 'app' or 'composable'. The default mode is 'app'.
|
|
748
789
|
*/
|
|
749
790
|
"mode": 'app' | 'composable';
|
|
750
791
|
/**
|
|
@@ -761,7 +802,7 @@ export namespace Components {
|
|
|
761
802
|
*/
|
|
762
803
|
"schedulerConnector": () => Promise<NylasSchedulerConfigConnector | undefined>;
|
|
763
804
|
/**
|
|
764
|
-
* The scheduler preview link to use when the user clicks on the preview button. You can use
|
|
805
|
+
* The scheduler preview link to use when the user clicks on the preview button. You can use the placeholder `{config.id}` to replace the configuration id anywhere in the link.
|
|
765
806
|
*/
|
|
766
807
|
"schedulerPreviewLink": string;
|
|
767
808
|
/**
|
|
@@ -899,14 +940,6 @@ export namespace Components {
|
|
|
899
940
|
* The placeholder text for the input.
|
|
900
941
|
*/
|
|
901
942
|
"placeholder": string;
|
|
902
|
-
/**
|
|
903
|
-
* The function to set the form error in the parent component. This is useful if the parent component wants to display an error message or set form validity.
|
|
904
|
-
*/
|
|
905
|
-
"setFormError": Function;
|
|
906
|
-
/**
|
|
907
|
-
* The function to set the time in the parent component.
|
|
908
|
-
*/
|
|
909
|
-
"setTime": Function;
|
|
910
943
|
/**
|
|
911
944
|
* The time to display in the input. This is passed by the parent component and can be updated using the setTime prop function provided by the parent component.
|
|
912
945
|
*/
|
|
@@ -2157,7 +2190,14 @@ declare global {
|
|
|
2157
2190
|
new (): HTMLNylasThreadsSearchElement;
|
|
2158
2191
|
};
|
|
2159
2192
|
interface HTMLNylasTimeWindowPickerElementEventMap {
|
|
2160
|
-
"timeChange":
|
|
2193
|
+
"timeChange": {
|
|
2194
|
+
key: string;
|
|
2195
|
+
value: string;
|
|
2196
|
+
};
|
|
2197
|
+
"formError": {
|
|
2198
|
+
key: string;
|
|
2199
|
+
message: string;
|
|
2200
|
+
};
|
|
2161
2201
|
}
|
|
2162
2202
|
/**
|
|
2163
2203
|
* The `nylas-time-window-picker` component is a time picker that can be used to select a time.
|
|
@@ -2587,6 +2627,9 @@ declare namespace LocalJSX {
|
|
|
2587
2627
|
*/
|
|
2588
2628
|
interface NylasAvailabilityPicker {
|
|
2589
2629
|
"defaultTimezone"?: string;
|
|
2630
|
+
/**
|
|
2631
|
+
* The name of the availability picker.
|
|
2632
|
+
*/
|
|
2590
2633
|
"name"?: string;
|
|
2591
2634
|
/**
|
|
2592
2635
|
* This event is fired when the selected availability / open hours change.
|
|
@@ -2598,7 +2641,13 @@ declare namespace LocalJSX {
|
|
|
2598
2641
|
};
|
|
2599
2642
|
name: string;
|
|
2600
2643
|
}>) => void;
|
|
2644
|
+
/**
|
|
2645
|
+
* The open hours to display.
|
|
2646
|
+
*/
|
|
2601
2647
|
"openHours"?: OpenHours[];
|
|
2648
|
+
/**
|
|
2649
|
+
* The selected configuration.
|
|
2650
|
+
*/
|
|
2602
2651
|
"selectedConfiguration"?: Configuration;
|
|
2603
2652
|
}
|
|
2604
2653
|
/**
|
|
@@ -2664,7 +2713,7 @@ declare namespace LocalJSX {
|
|
|
2664
2713
|
*/
|
|
2665
2714
|
"currentUser"?: User;
|
|
2666
2715
|
/**
|
|
2667
|
-
* The default selected
|
|
2716
|
+
* The default selected calendar.
|
|
2668
2717
|
*/
|
|
2669
2718
|
"defaultBookingCalendar"?: string;
|
|
2670
2719
|
/**
|
|
@@ -2748,7 +2797,7 @@ declare namespace LocalJSX {
|
|
|
2748
2797
|
*/
|
|
2749
2798
|
"calendars"?: Calendar[];
|
|
2750
2799
|
/**
|
|
2751
|
-
* The
|
|
2800
|
+
* The logged in user.
|
|
2752
2801
|
*/
|
|
2753
2802
|
"currentUser"?: User;
|
|
2754
2803
|
/**
|
|
@@ -2898,7 +2947,7 @@ declare namespace LocalJSX {
|
|
|
2898
2947
|
*/
|
|
2899
2948
|
"calendars"?: Calendar[];
|
|
2900
2949
|
/**
|
|
2901
|
-
* The current
|
|
2950
|
+
* The current logged in user.
|
|
2902
2951
|
*/
|
|
2903
2952
|
"currentUser"?: User;
|
|
2904
2953
|
/**
|
|
@@ -2938,8 +2987,17 @@ declare namespace LocalJSX {
|
|
|
2938
2987
|
* The `nylas-event-description` component is a form input for the description of an event.
|
|
2939
2988
|
*/
|
|
2940
2989
|
interface NylasEventDescription {
|
|
2990
|
+
/**
|
|
2991
|
+
* The event description stored in the configuration
|
|
2992
|
+
*/
|
|
2941
2993
|
"eventDescription"?: string;
|
|
2994
|
+
/**
|
|
2995
|
+
* The name of the event description input.
|
|
2996
|
+
*/
|
|
2942
2997
|
"name"?: string;
|
|
2998
|
+
/**
|
|
2999
|
+
* Event emitted when the event description changes.
|
|
3000
|
+
*/
|
|
2943
3001
|
"onValueChanged"?: (event: NylasEventDescriptionCustomEvent<{
|
|
2944
3002
|
value: string;
|
|
2945
3003
|
name: string;
|
|
@@ -2953,8 +3011,17 @@ declare namespace LocalJSX {
|
|
|
2953
3011
|
* The `nylas-event-duration` component is a form input for the duration of an event.
|
|
2954
3012
|
*/
|
|
2955
3013
|
interface NylasEventDuration {
|
|
3014
|
+
/**
|
|
3015
|
+
* The event duration in minutes as set in the configuration.
|
|
3016
|
+
*/
|
|
2956
3017
|
"eventDurationMinutes"?: number;
|
|
3018
|
+
/**
|
|
3019
|
+
* The name of the event duration. Default is 'duration'.
|
|
3020
|
+
*/
|
|
2957
3021
|
"name"?: string;
|
|
3022
|
+
/**
|
|
3023
|
+
* Event emitted when the event duration changes.
|
|
3024
|
+
*/
|
|
2958
3025
|
"onValueChanged"?: (event: NylasEventDurationCustomEvent<{
|
|
2959
3026
|
value: string;
|
|
2960
3027
|
name: string;
|
|
@@ -3023,8 +3090,17 @@ declare namespace LocalJSX {
|
|
|
3023
3090
|
* The `nylas-limit-future-bookings` component is a form input for the description of an event.
|
|
3024
3091
|
*/
|
|
3025
3092
|
interface NylasLimitFutureBookings {
|
|
3093
|
+
/**
|
|
3094
|
+
* The number of days into the future that invitees will see availability, as set in the configuration.
|
|
3095
|
+
*/
|
|
3026
3096
|
"availableDaysInFuture"?: number;
|
|
3097
|
+
/**
|
|
3098
|
+
* The name of the limit future bookings input.
|
|
3099
|
+
*/
|
|
3027
3100
|
"name"?: string;
|
|
3101
|
+
/**
|
|
3102
|
+
* Event emitted when the future booking limit changes.
|
|
3103
|
+
*/
|
|
3028
3104
|
"onValueChanged"?: (event: NylasLimitFutureBookingsCustomEvent<{
|
|
3029
3105
|
value: string;
|
|
3030
3106
|
name: string;
|
|
@@ -3107,7 +3183,13 @@ declare namespace LocalJSX {
|
|
|
3107
3183
|
* The `nylas-location-component` component is a form input for the description of an event.
|
|
3108
3184
|
*/
|
|
3109
3185
|
interface NylasLocationComponent {
|
|
3186
|
+
/**
|
|
3187
|
+
* The event location stored in the configuration
|
|
3188
|
+
*/
|
|
3110
3189
|
"eventLocation"?: string;
|
|
3190
|
+
/**
|
|
3191
|
+
* The name of the event location input.
|
|
3192
|
+
*/
|
|
3111
3193
|
"name"?: string;
|
|
3112
3194
|
"onValueChanged"?: (event: NylasLocationComponentCustomEvent<{
|
|
3113
3195
|
value: string;
|
|
@@ -3241,7 +3323,13 @@ declare namespace LocalJSX {
|
|
|
3241
3323
|
* The `nylas-min-cancellation-notice` component is a form input for the description of an event.
|
|
3242
3324
|
*/
|
|
3243
3325
|
interface NylasMinCancellationNotice {
|
|
3326
|
+
/**
|
|
3327
|
+
* The minimum cancellation notice stored in the configuration
|
|
3328
|
+
*/
|
|
3244
3329
|
"minCancellationNotice"?: number;
|
|
3330
|
+
/**
|
|
3331
|
+
* The name of the min cancellation notice input.
|
|
3332
|
+
*/
|
|
3245
3333
|
"name"?: string;
|
|
3246
3334
|
"onValueChanged"?: (event: NylasMinCancellationNoticeCustomEvent<{
|
|
3247
3335
|
value: string;
|
|
@@ -3308,11 +3396,11 @@ declare namespace LocalJSX {
|
|
|
3308
3396
|
*/
|
|
3309
3397
|
"defaultAuthArgs"?: AuthArgs;
|
|
3310
3398
|
/**
|
|
3311
|
-
* The default
|
|
3399
|
+
* The default requires_session_auth flag to use to set the default value for the requireSessionAuth property when creating a configuration. If set to true, a session token must be provided to the <nylas-scheduling/> component. If set to false, then a session token is not required, and the configuration id can be passed to the <nylas-scheduling/> component instead.
|
|
3312
3400
|
*/
|
|
3313
3401
|
"defaultRequiresSessionAuth"?: boolean;
|
|
3314
3402
|
/**
|
|
3315
|
-
* The default scheduler config store state. Used to set the initial state of the scheduler config store.
|
|
3403
|
+
* The default scheduler config store state. Used to set the initial state of the scheduler config store. This state can be used to pass defaults to newly created configurations.
|
|
3316
3404
|
*/
|
|
3317
3405
|
"defaultSchedulerConfigState"?: Partial<NylasSchedulerConfigStoreState>;
|
|
3318
3406
|
/**
|
|
@@ -3320,7 +3408,7 @@ declare namespace LocalJSX {
|
|
|
3320
3408
|
*/
|
|
3321
3409
|
"eventOverrides"?: SchedulerEditorEventOverride;
|
|
3322
3410
|
/**
|
|
3323
|
-
*
|
|
3411
|
+
* This is used to set the mode for the scheduler config. The mode can be 'app' or 'composable'. The default mode is 'app'.
|
|
3324
3412
|
*/
|
|
3325
3413
|
"mode"?: 'app' | 'composable';
|
|
3326
3414
|
/**
|
|
@@ -3336,11 +3424,11 @@ declare namespace LocalJSX {
|
|
|
3336
3424
|
*/
|
|
3337
3425
|
"onInit"?: (event: NylasSchedulerEditorCustomEvent<HTMLNylasSchedulerEditorElement>) => void;
|
|
3338
3426
|
/**
|
|
3339
|
-
* This event is fired when the the
|
|
3427
|
+
* This event is fired when the the NylasAuth isAuthenticated state changes to true.
|
|
3340
3428
|
*/
|
|
3341
3429
|
"onLoggedIn"?: (event: NylasSchedulerEditorCustomEvent<HTMLNylasSchedulerEditorElement>) => void;
|
|
3342
3430
|
/**
|
|
3343
|
-
* This event is fired when the the
|
|
3431
|
+
* This event is fired when the the NylasAuth isAuthenticated state changes to true.
|
|
3344
3432
|
*/
|
|
3345
3433
|
"onLoggedOut"?: (event: NylasSchedulerEditorCustomEvent<HTMLNylasSchedulerEditorElement>) => void;
|
|
3346
3434
|
/**
|
|
@@ -3348,7 +3436,7 @@ declare namespace LocalJSX {
|
|
|
3348
3436
|
*/
|
|
3349
3437
|
"onSchedulerConfigCloseClicked"?: (event: NylasSchedulerEditorCustomEvent<HTMLNylasSchedulerEditorElement>) => void;
|
|
3350
3438
|
/**
|
|
3351
|
-
* The scheduler preview link to use when the user clicks on the preview button. You can use
|
|
3439
|
+
* The scheduler preview link to use when the user clicks on the preview button. You can use the placeholder `{config.id}` to replace the configuration id anywhere in the link.
|
|
3352
3440
|
*/
|
|
3353
3441
|
"schedulerPreviewLink"?: string;
|
|
3354
3442
|
}
|
|
@@ -3475,19 +3563,24 @@ declare namespace LocalJSX {
|
|
|
3475
3563
|
* The name of the input.
|
|
3476
3564
|
*/
|
|
3477
3565
|
"name": string;
|
|
3478
|
-
"onTimeChange"?: (event: NylasTimeWindowPickerCustomEvent<string>) => void;
|
|
3479
3566
|
/**
|
|
3480
|
-
* The
|
|
3567
|
+
* This event is fired when the form has an error. The parent component can listen for this event and display an error message or set form validity.
|
|
3481
3568
|
*/
|
|
3482
|
-
"
|
|
3569
|
+
"onFormError"?: (event: NylasTimeWindowPickerCustomEvent<{
|
|
3570
|
+
key: string;
|
|
3571
|
+
message: string;
|
|
3572
|
+
}>) => void;
|
|
3483
3573
|
/**
|
|
3484
|
-
*
|
|
3574
|
+
* This event is fired when the time is changed.
|
|
3485
3575
|
*/
|
|
3486
|
-
"
|
|
3576
|
+
"onTimeChange"?: (event: NylasTimeWindowPickerCustomEvent<{
|
|
3577
|
+
key: string;
|
|
3578
|
+
value: string;
|
|
3579
|
+
}>) => void;
|
|
3487
3580
|
/**
|
|
3488
|
-
* The
|
|
3581
|
+
* The placeholder text for the input.
|
|
3489
3582
|
*/
|
|
3490
|
-
"
|
|
3583
|
+
"placeholder"?: string;
|
|
3491
3584
|
/**
|
|
3492
3585
|
* The time to display in the input. This is passed by the parent component and can be updated using the setTime prop function provided by the parent component.
|
|
3493
3586
|
*/
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { Calendar, Configuration } from '@nylas/core';
|
|
2
2
|
import { ObservableMap } from '@stencil/store';
|
|
3
3
|
import { User } from "../common/nylas-api-request";
|
|
4
|
+
type RecursivePartial<T> = {
|
|
5
|
+
[P in keyof T]?: T[P] extends (infer U)[] ? RecursivePartial<U>[] : T[P] extends object | undefined ? RecursivePartial<T[P]> : T[P];
|
|
6
|
+
};
|
|
4
7
|
export interface NylasSchedulerConfigStoreState {
|
|
5
|
-
selectedConfiguration:
|
|
8
|
+
selectedConfiguration: RecursivePartial<Configuration>;
|
|
6
9
|
configurations: Configuration[];
|
|
7
10
|
calendars: Calendar[];
|
|
8
11
|
currentUser: User | null;
|
|
@@ -13,3 +16,4 @@ export type CreateNylasSchedulerConfigStoreReturnType = ObservableMap<NylasSched
|
|
|
13
16
|
resetSelectedConfiguration: () => void;
|
|
14
17
|
};
|
|
15
18
|
export declare function CreateNylasSchedulerConfigStore(defaultState?: Partial<NylasSchedulerConfigStoreState>): CreateNylasSchedulerConfigStoreReturnType;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
export interface NylasResponse<Data = any> {
|
|
2
|
+
request_id: string;
|
|
3
|
+
data?: Data;
|
|
4
|
+
error?: {
|
|
5
|
+
message: string;
|
|
6
|
+
type: string;
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
export interface OpenHours {
|
|
10
|
+
days: number[];
|
|
11
|
+
exDates: string[];
|
|
12
|
+
timezone: string;
|
|
13
|
+
start: string;
|
|
14
|
+
end: string;
|
|
15
|
+
}
|
|
16
|
+
export interface MeetingBuffer {
|
|
17
|
+
before: number;
|
|
18
|
+
after: number;
|
|
19
|
+
}
|
|
20
|
+
export interface Rules {
|
|
21
|
+
availability_method: 'max-fairness' | 'max-availability' | 'collective';
|
|
22
|
+
buffer: MeetingBuffer;
|
|
23
|
+
default_open_hours?: OpenHours[];
|
|
24
|
+
round_robin_group_id: string;
|
|
25
|
+
}
|
|
26
|
+
export interface Configuration {
|
|
27
|
+
id: string;
|
|
28
|
+
version: string;
|
|
29
|
+
participants: Participant[];
|
|
30
|
+
availability: Availability;
|
|
31
|
+
event_booking: EventBooking;
|
|
32
|
+
scheduler: Scheduler;
|
|
33
|
+
}
|
|
34
|
+
export interface UpdateConfiguration extends Omit<Configuration, 'id'> {
|
|
35
|
+
}
|
|
36
|
+
export interface Participant {
|
|
37
|
+
name: string;
|
|
38
|
+
email: string;
|
|
39
|
+
is_organizer?: boolean;
|
|
40
|
+
availability?: ParticipantAvailability;
|
|
41
|
+
booking?: ParticipantBooking;
|
|
42
|
+
}
|
|
43
|
+
export interface ParticipantAvailability {
|
|
44
|
+
calendar_ids: string[];
|
|
45
|
+
open_hours?: OpenHours[];
|
|
46
|
+
}
|
|
47
|
+
export interface ParticipantBooking {
|
|
48
|
+
calendar_id: string;
|
|
49
|
+
}
|
|
50
|
+
export interface Availability {
|
|
51
|
+
duration_minutes: number;
|
|
52
|
+
interval_minutes?: number;
|
|
53
|
+
round_to?: number;
|
|
54
|
+
availability_rules?: Rules;
|
|
55
|
+
}
|
|
56
|
+
export interface EventBooking {
|
|
57
|
+
title: string;
|
|
58
|
+
description?: string;
|
|
59
|
+
location?: string;
|
|
60
|
+
booking_type: BookingType;
|
|
61
|
+
additional_fields?: {
|
|
62
|
+
[key: string]: any;
|
|
63
|
+
};
|
|
64
|
+
hide_participants: boolean;
|
|
65
|
+
}
|
|
66
|
+
export interface Scheduler {
|
|
67
|
+
available_days_in_future: number;
|
|
68
|
+
min_cancellation_notice: number;
|
|
69
|
+
}
|
|
70
|
+
export declare enum BookingType {
|
|
71
|
+
InstantBooking = "booking",
|
|
72
|
+
PreBooking = "pre-booking"
|
|
73
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nylas/web-elements",
|
|
3
|
-
"version": "1.1.0-canary.
|
|
3
|
+
"version": "1.1.0-canary.11",
|
|
4
4
|
"description": "Nylas Web Elements",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -61,7 +61,9 @@
|
|
|
61
61
|
"msw": "^2.0.10",
|
|
62
62
|
"node-fetch": "^3.3.2",
|
|
63
63
|
"puppeteer": "21.1.1",
|
|
64
|
-
"rollup-plugin-node-polyfills": "^0.2.1"
|
|
64
|
+
"rollup-plugin-node-polyfills": "^0.2.1",
|
|
65
|
+
"typedoc": "^0.25.13",
|
|
66
|
+
"typescript": "^5.4.5"
|
|
65
67
|
},
|
|
66
68
|
"license": "MIT",
|
|
67
69
|
"scripts": {
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as t,h as e,c as n,H as a,a as s}from"./p-68c2fadf.js";import{R as i}from"./p-8b53becf.js";import{n as o,a as r,o as l}from"./p-01e86103.js";import{D as c}from"./p-49f716ed.js";import"./p-cb65c223.js";const d=".sc-google-logo-icon-h{display:flex}";const b=d;const f=class{constructor(e){t(this,e);this.width="24";this.height="24"}render(){return e("svg",{key:"2445589627197f9af06e10891e1772c17b140c0a",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e("g",{key:"b84ea9a0cc741b646d9a63113404d34c5e155fc8","clip-path":"url(#clip0_959_12452)"},e("path",{key:"9c774266fb43cf807ea64846b71eb27c6272b17d",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("path",{key:"ff0fe8133c31fc75ecf3e9fedecbbaef2e35dd54",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("path",{key:"5851b3de9ee71263668f65e2e86f0dfab3039c83",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("path",{key:"2a79a335e1b8d03747b5f879a75deb5544e5cf63",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("defs",{key:"f3b4d8d363cc9ac066b92de2354b9210d7190b46"},e("clipPath",{key:"270b05e06d87d998c7525254f4f2ae3d5a0ab835",id:"clip0_959_12452"},e("rect",{key:"de0df984a8f12ccdd0c655968c4f8b2049996968",width:24,height:24,fill:"white"}))))}};f.style=b;const h=".sc-microsoft-logo-icon-h{display:flex}";const u=h;const p=class{constructor(e){t(this,e);this.width="22";this.height="22"}render(){return e("svg",{key:"de39bfb3167fbd60d21025e74c1bc19cdd7d4dc9",width:this.width,height:this.height,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e("path",{key:"0f80864e892ff36e6e76ef03f5f36d62007d99ee",d:"M0.043457 0.043457H10.4782V10.4782H0.043457V0.043457Z",fill:"#F35325"}),e("path",{key:"ab0e85f803a3cf2e32055ebeff1b0705edebe048",d:"M11.5217 0.043457H21.9565V10.4782H11.5217V0.043457Z",fill:"#81BC06"}),e("path",{key:"b6359dcb76ade260f2a9e9bdf1be21ba84b77b79",d:"M0.043457 11.5217H10.4782V21.9565H0.043457V11.5217Z",fill:"#05A6F0"}),e("path",{key:"cf38a555c09aaef94a15fd26b0951e2642eaad6d",d:"M11.5217 11.5217H21.9565V21.9565H11.5217V11.5217Z",fill:"#FFBA08"}))}};p.style=u;function y({id:t,formState:n,activeTab:a,calendars:s}){switch(a){case"eventInfo":const a=n.title;const i=n.description;const o=parseInt(n.duration);const r=n.location;return e("div",{key:t},e("nylas-event-info",null,e("div",{slot:"inputs"},e("nylas-event-title",{name:"title",eventTitle:a,exportparts:"net, net__title, net__dropdown-content"}),e("nylas-event-duration",{name:"duration",eventDurationMinutes:o,exportparts:"ned, ned__input, ned__dropdown, ned__dropdown-button, ned__dropdown-content"}),e("nylas-location-component",{name:"location",eventLocation:r,exportparts:"nel, nel__location, nel__dropdown, nel__dropdown-button, nel__dropdown-content"}),e("nylas-event-description",{name:"description",eventDescription:i,exportparts:"nedesc, nedesc__textarea"}))));case"availability":const l=n.availability.openHours;const c=n.availability.timezone?n.availability.timezone:Intl.DateTimeFormat().resolvedOptions().timeZone;const d=n.participants?.find((t=>t.is_organizer));const b=d?.email??"primary";const f=n.calendarIds.length>0?n.calendarIds:[b];const h=n.bookingCalendar=="primary"?b:n.bookingCalendar;return e("div",{key:t},e("nylas-booking-calendar-picker",{name:"booking-calendar",calendars:s??[],defaultBookingCalendar:h,exportparts:"nbcp, nbcp__header, nbcp__input-label, nbcp__dropdown, nbcp__dropdown-button, nbcp__dropdown-content"}),e("nylas-calendar-picker",{name:"calendars",calendars:s??[],defaultSelectedCalendars:f,exportparts:"ncp ncp__header, ncp__dropdown, ncp__dropdown-button, ncp__dropdown-content"}),e("nylas-availability-picker",{name:"availability",openHours:l,defaultTimezone:c,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("div",{key:t},e("nylas-buffer-time",{name:"buffer-time",buffer:n.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("nylas-event-limits",null,e("div",{slot:"inputs"},e("nylas-limit-future-bookings",{name:"limit-future-bookings",availableDaysInFuture:n.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("nylas-min-cancellation-notice",{name:"min-cancellation-notice",minCancellationNotice:n.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{height:554px;display:grid;grid-template-columns:minmax(224px, 25%) 1fr}@media screen and (max-width: 768px){.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs{display:table-column-group;height:auto}}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs{display:flex;flex-direction:column;border-right:1px solid var(--nylas-base-200);background-color:var(--nylas-base-25)}.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;overflow-y:auto}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-info.sc-nylas-editor-tabs,.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-limits.sc-nylas-editor-tabs{width:inherit}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-info.sc-nylas-editor-tabs div[slot=inputs].sc-nylas-editor-tabs,.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-limits.sc-nylas-editor-tabs div[slot=inputs].sc-nylas-editor-tabs{display:flex;flex-direction:column;gap:1rem}.footer.sc-nylas-editor-tabs{display:flex;justify-content:space-between;align-items:center;gap:1rem;min-height:80px;padding:0 1rem;border-top:1px solid var(--nylas-base-200)}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs{flex-direction:column;height:auto}}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs .preview.sc-nylas-editor-tabs{margin-top:1rem;width:100%}}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs{display:flex;justify-content:flex-end;align-items:center;justify-self:flex-end;gap:1rem}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs{flex-direction:column-reverse;width:100%}}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.sc-nylas-editor-tabs{max-width:524px}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.unsaved-changes.sc-nylas-editor-tabs{color:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.saved-changes.sc-nylas-editor-tabs{color:var(--nylas-success)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.error.sc-nylas-editor-tabs{color:var(--nylas-error)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.error-full-width.sc-nylas-editor-tabs{max-width:660px}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button-component.sc-nylas-editor-tabs{width:100%}}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs{background:var(--nylas-primary);color:var(--nylas-base-0);height:48px;border:none;border-radius:var(--nylas-border-radius-2x);font-size:1rem;line-height:24px;padding:0 1rem;cursor:pointer;width:148px}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:hover{background:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:active{background:var(--nylas-base-800)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:disabled{background:var(--nylas-base-300);cursor:not-allowed}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs span.sc-nylas-editor-tabs{display:flex;align-items:center;justify-content:center;gap:0.5rem}';const m=g;var v=undefined&&undefined.__decorate||function(t,e,n,a){var s=arguments.length,i=s<3?e:a===null?a=Object.getOwnPropertyDescriptor(e,n):a,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")i=Reflect.decorate(t,e,n,a);else for(var r=t.length-1;r>=0;r--)if(o=t[r])i=(s<3?o(i):s>3?o(e,n,i):o(e,n))||i;return s>3&&i&&Object.defineProperty(e,n,i),i};var _=undefined&&undefined.__metadata||function(t,e){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(t,e)};const w=class{constructor(e){t(this,e);this.schedulerConfigChanged=n(this,"schedulerConfigChanged",7);this.cancelButtonClick=n(this,"cancelButtonClick",7);this.formSubmitted=n(this,"formSubmitted",7);this.previewButtonClicked=n(this,"previewButtonClicked",7);this.setError=t=>{this.error=t.message};this.formSubmissionHandler=async t=>{t.preventDefault();this.formSubmitted.emit();const e=this.formRef.checkValidity();if(!e){return}this.isLoading=true;this.hasUnsavedChanges=false;const n=this.updateFormState();const{title:a,description:s,duration:i,availability:r,calendarIds:l,bookingCalendar:d,location:b,bookingType:f,buffer:h,availableDaysInFuture:u,minCancellationNotice:p}=n;const y=this.selectedConfiguration?.participants?.find((t=>t.is_organizer));const g={...this.selectedConfiguration?.id&&{id:this.selectedConfiguration.id},version:this.selectedConfiguration?.version??"1.0.0",availability:{duration_minutes:i?parseInt(i):0,availability_rules:{availability_method:this.selectedConfiguration?.availability?.availability_rules?.availability_method??"collective",buffer:h||{before:0,after:0},default_open_hours:this.selectedConfiguration?.availability?.availability_rules?.default_open_hours??c,round_robin_group_id:this.selectedConfiguration?.availability?.availability_rules?.round_robin_group_id??""}},participants:[{name:y?.name??y?.email??this.currentUser?.name??this.currentUser?.email??"",email:y?.email??this.currentUser?.email??"",is_organizer:true,availability:{calendar_ids:l?.length?l:["primary"],open_hours:r?.openHours??[]},booking:{calendar_id:d&&d!==""?d:"primary"}}],event_booking:{title:a?.toString()??"",description:s?.toString()??"",location:b?.toString()??"",booking_type:f?.toString()??"booking",timezone:r?.timezone??Intl.DateTimeFormat().resolvedOptions().timeZone},scheduler:{available_days_in_future:u??30,min_cancellation_notice:p??0}};const m=o(g,this.selectedConfiguration);m.requires_session_auth=this.defaultRequiresSessionAuth;const v=this.action==="create"?m:g;const _=t=>{this.isLoading=false;this.changesSaved=true;setTimeout((()=>{this.changesSaved=false}),5e3)};this.schedulerConfigChanged.emit({config:v,resetLoadingState:_,setError:this.setError,action:this.action})};this.calendars=undefined;this.selectedConfiguration=undefined;this.defaultRequiresSessionAuth=true;this.currentUser=undefined;this.schedulerPreviewLink="";this.mode="app";this.action="create";this.activeTab="eventInfo";this.isLoading=false;this.hasUnsavedChanges=false;this.changesSaved=false;this.formState={};this.error=""}configChangedHandler(t){r("[nylas-editor-tabs]","configChangedHandler",t,this.selectedConfiguration);this.formState={...this.getFormStateFromConfig(t)};if(t.id){this.action="edit"}else{this.action="create"}}connectedCallback(){r("[nylas-editor-tabs]","connectedCallback")}componentWillLoad(){r("[nylas-editor-tabs]","componentWillLoad");this.formState=this.getFormStateFromConfig(this.selectedConfiguration)}componentDidLoad(){r("[nylas-editor-tabs]","componentDidLoad")}disconnectedCallback(){r("[nylas-editor-tabs]","disconnectedCallback")}handleValueChanged(t){r("[nylas-editor-tabs]","handleValueChanged",t);const{name:e,value:n}=t.detail;this.formState={...this.formState,[e]:n};this.hasUnsavedChanges=true;this.error=""}getFormStateFromConfig(t){const e=t?.participants?.find((t=>t.is_organizer));return{title:t?.event_booking?.title??"",description:t?.event_booking?.description??"",duration:t?.availability?.duration_minutes?.toString()??"10",availability:{timezone:t?.event_booking?.timezone??Intl.DateTimeFormat().resolvedOptions().timeZone,open_hours:e?.availability?.open_hours??undefined},calendarIds:e?.availability?.calendar_ids??[],participants:t?.participants??[],bookingCalendar:e?.booking?.calendar_id??e?.email??"",location:this.selectedConfiguration?.event_booking?.location??"",bookingType:this.selectedConfiguration?.event_booking?.booking_type??"booking",buffer:this.selectedConfiguration?.availability?.availability_rules?.buffer??{before:0,after:0},availableDaysInFuture:this.selectedConfiguration?.scheduler?.available_days_in_future??30,minCancellationNotice:this.selectedConfiguration?.scheduler?.min_cancellation_notice??0}}updateFormState(){const t=new FormData(this.formRef);t.forEach(((t,e)=>{switch(e){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};return this.formState}setActiveTab(t,e){t.preventDefault();this.updateFormState();this.activeTab=e}render(){r("[nylas-editor-tabs]","render",this.formState);return e(a,{key:"1b22e2152ebb021ef1b5a8bc7b84d34742d8b141"},e("form",{key:"0e3a7c3b9a058ff4abc759b6891b7f4d1e8075ef",onSubmit:this.formSubmissionHandler,class:"scheduler-editor",ref:t=>this.formRef=t,noValidate:true},this.mode==="app"?e("div",{class:"form-contents"},e("div",{class:"tabs"},e("button",{class:{tab:true,active:this.activeTab=="eventInfo"},onClick:t=>this.setActiveTab(t,"eventInfo")},e("calendar-info-icon",{width:"16",height:"16"}),"Event Info"),e("button",{class:{tab:true,active:this.activeTab=="availability"},onClick:t=>this.setActiveTab(t,"availability")},e("calendar-patterns-icon",{width:"16",height:"16"}),"Availability"),e("button",{class:{tab:true,active:this.activeTab=="bookingOptions"},onClick:t=>this.setActiveTab(t,"bookingOptions")},e("flow-icon",{width:"16",height:"16"}),"Booking Options")),e("div",{class:"tab-content"},e(y,{formState:this.formState,activeTab:this.activeTab,calendars:this.calendars,id:this.selectedConfiguration?.id??"new"}))):e("slot",null),e("div",{key:"33093cefafa2ff596a2b6e00e5ed994319065f53",class:"footer"},e("div",{key:"ffbea04fe503c6f6482c3eaae7f87bac173ad9b9",class:"preview"},this.schedulerPreviewLink!==""&&this.action==="edit"&&e("button-component",{type:"button",disabled:this.isLoading,clickHandler:t=>{t.preventDefault();const e=this.previewButtonClicked.emit(this.host);if(!e.defaultPrevented){window.open(l(this.schedulerPreviewLink,this.selectedConfiguration),"_blank")}},variant:"basic"},"Preview")),e("div",{key:"88a229d932ab65f90da5fc64f5c09ab8ae4bcae8",class:"buttons"},e("p",{key:"8e2c76b956e7291775dc3515b4fffa7b77e1fe6c",class:{"unsaved-changes":this.hasUnsavedChanges&&!this.changesSaved,"saved-changes":this.changesSaved,error:this.error!=="","error-full-width":this.error!==""&&this.action==="create"}},this.error!==""?this.error:"",this.error==""&&this.hasUnsavedChanges&&!this.changesSaved?"Unsaved changes":this.error==""&&this.changesSaved?"Changes saved!":""),e("button-component",{key:"e90b955a86235e50227d5655225860e427e1e6c8",type:"button",disabled:this.isLoading,clickHandler:t=>{t.preventDefault();this.cancelButtonClick.emit();this.error=""},variant:"basic"},"Cancel"),e("button-component",{key:"da69635d229d324cb7ae5019037a9cf431f71125",type:"submit",disabled:this.isLoading},this.isLoading?e("span",null,"Saving",e("loading-icon",null)," "):this.action=="create"?"Create":"Save changes")))))}get host(){return s(this)}static get watchers(){return{selectedConfiguration:["configChangedHandler"]}}};v([i({name:"nylas-editor-tabs",stateToProps:new Map([["schedulerConfig.calendars","calendars"],["schedulerConfig.selectedConfiguration","selectedConfiguration"],["schedulerConfig.currentUser","currentUser"]]),eventToProps:{schedulerConfigChanged:async(t,e)=>{const{resetLoadingState:n,setError:a,action:s,config:i}=t.detail;const o=e=>{const[s,i]=e;if(!s&&i&&a){a(i)}if(n){n(t)}};if(s==="edit"){const t=await e.schedulerConfig.updateConfiguration(i);o(t)}else{const t=await e.schedulerConfig.createConfiguration(i);o(t)}},cancelButtonClick:async(t,e)=>{e.schedulerConfigStore.state.action=null}},localPropsToProp:new Map([["schedulerPreviewLink","schedulerPreviewLink"],["defaultRequiresSessionAuth","defaultRequiresSessionAuth"]]),fireRegisterEvent:true}),_("design:type",Function),_("design:paramtypes",[]),_("design:returntype",void 0)],w.prototype,"render",null);w.style=m;const k=':host{display:grid;grid-auto-flow:row;width:100%;font-family:inherit;font-optical-sizing:auto;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.header{display:flex;align-items:center;justify-content:space-between;margin-bottom:1rem;gap:1rem}@media screen and (max-width: 768px){.header{flex-direction:column;gap:0.5rem;align-items:unset}}.header h2{margin:0;font-size:1.25rem;color:var(--nylas-base-900);font-weight:600}.header p{margin:0;font-size:1rem;color:var(--nylas-base-700)}.header .actions{justify-self:end}@media screen and (max-width: 768px){.header .actions{width:100%}}.configurations{border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);background:var(--nylas-base-0);height:100%;display:flex;overflow-y:auto}.configurations table{width:100%;border-spacing:0;border-collapse:collapse;font-family:inherit;height:max-content}.configurations table.no-configurations{height:100%}.configurations table tr{color:var(--nylas-base-800);border-bottom:1px solid var(--nylas-base-200);font-family:inherit}.configurations table tr:last-of-type{border-bottom:0}.configurations table tr.hide{display:none}.configurations table th{font-weight:600;text-transform:uppercase}.configurations table th.actions-header{text-align:right}.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;font-family:inherit}.configurations table .actions{text-align:right}.configurations table .actions{display:flex;justify-content:flex-end;gap:1rem}@media screen and (max-width: 768px){.configurations table .actions{flex-direction:column;gap:0.5rem}}.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}.error-container{margin-top:1.5rem}.error-container .error{color:var(--nylas-error);padding:0.5rem 0;margin:1rem 0 0}';const x=k;var C=undefined&&undefined.__decorate||function(t,e,n,a){var s=arguments.length,i=s<3?e:a===null?a=Object.getOwnPropertyDescriptor(e,n):a,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")i=Reflect.decorate(t,e,n,a);else for(var r=t.length-1;r>=0;r--)if(o=t[r])i=(s<3?o(i):s>3?o(e,n,i):o(e,n))||i;return s>3&&i&&Object.defineProperty(e,n,i),i};var H=undefined&&undefined.__metadata||function(t,e){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(t,e)};const L=class{constructor(e){t(this,e);this.initListConfigurations=n(this,"initListConfigurations",7);this.createButtonClick=n(this,"createButtonClick",7);this.editButtonClick=n(this,"editButtonClick",7);this.deleteButtonClick=n(this,"deleteButtonClick",7);this.configurations=[];this.schedulerPreviewLink="";this.state="loading";this.error=""}connectedCallback(){r("[nylas-list-configurations]","connectedCallback")}componentWillLoad(){r("[nylas-list-configurations]","componentWillLoad");if(this.configurations&&this.configurations.length>0){this.state="loaded"}}componentDidLoad(){r("[nylas-list-configurations]","componentDidLoad");this.initListConfigurations.emit(this.host)}disconnectedCallback(){r("[nylas-list-configurations]","disconnectedCallback")}async getState(){return this.state}async setState(t){this.state=t}async setError(t){this.error=t}render(){return e(a,null,e("div",{class:"header"},e("div",{class:"description"},e("h2",null,"All scheduling pages"),e("p",null,"Create, edit and manage all your scheduling pages.")),this.configurations&&this.configurations.length>0&&e("div",{class:"actions"},e("button-component",{clickHandler:()=>{this.createButtonClick.emit(this.host)}},"Create new"))),e("div",{class:"configurations"},e("table",{class:{"no-configurations":this.state!=="loading"&&(!this.configurations||this.configurations.length===0)}},e("tr",{class:{hide:this.state==="loading"||this.configurations&&this.configurations.length===0}},e("th",null,"Scheduling page event title"),e("th",null,"Duration"),e("th",{class:"actions-header"},"Actions")),this.state==="loading"&&e("tr",{class:"no-configurations"},e("td",{colSpan:3},e("div",null,e("h3",null,"Loading..."),e("p",null,"Please wait while we fetch the scheduling pages")))),this.state!=="loading"&&(!this.configurations||this.configurations.length===0)&&e("tr",{class:"no-configurations"},e("td",{colSpan:3},e("div",null,e("calendar-icon",{width:"48",height:"48"}),e("h3",null,"No scheduling pages found"),e("p",null,"Get started with creating your first scheduling page"),e("button-component",{clickHandler:()=>{this.createButtonClick.emit(this.host)}},"Create new")))),this.state!=="loading"&&this.configurations.map((t=>e("tr",{key:t.id},e("td",null,e("div",{class:"title"},e("span",{class:"config-event-title"},t.event_booking.title),e("span",{class:"config-event-description"},t.event_booking.description))),e("td",null,e("div",null,t.availability.duration_minutes," mins")),e("td",null,e("div",{class:"actions"},e("button-component",{variant:"basic",clickHandler:e=>{e.preventDefault();window.open(l(this.schedulerPreviewLink,t),"_blank")}},"Preview"),e("button-component",{variant:"basic",clickHandler:e=>{e.preventDefault();this.editButtonClick.emit({host:this.host,configuration:t})}},"Edit"),e("button-component",{variant:"basic",clickHandler:e=>{e.preventDefault();this.deleteButtonClick.emit({host:this.host,configuration:t})}},"Delete")))))))),this.state==="error"&&e("div",{class:"error-container"},e("p",{class:"error"},this.error)))}get host(){return s(this)}};C([i({name:"nylas-list-configurations",stateToProps:new Map([["schedulerConfig.configurations","configurations"]]),localPropsToProp:new Map([["schedulerPreviewLink","schedulerPreviewLink"]]),eventToProps:{initListConfigurations:async(t,e)=>{const n=t.detail;await n.setState("loading");const[a,s]=await e.schedulerConfig.getConfigurations();if(!a&&s&&s.message){await n.setState("error");await n.setError(s.message);return}await n.setState("loaded")},createButtonClick:async(t,e)=>{e.schedulerConfigStore.resetSelectedConfiguration();e.schedulerConfigStore.state.action="create"},deleteButtonClick:async(t,e)=>{const{host:n,configuration:a}=t.detail;const[s,i]=await e.schedulerConfig.deleteConfiguration(a.id);if(!s&&i&&i.message){await n.setState("error");await n.setError(i.message)}},editButtonClick:async(t,e)=>{const{configuration:n}=t.detail;e.schedulerConfigStore.state.selectedConfiguration=n;e.schedulerConfigStore.state.action="edit"}},fireRegisterEvent:true}),H("design:type",Function),H("design:paramtypes",[]),H("design:returntype",void 0)],L.prototype,"render",null);L.style=x;export{f as google_logo_icon,p as microsoft_logo_icon,w as nylas_editor_tabs,L as nylas_list_configurations};
|
|
2
|
-
//# sourceMappingURL=p-74492776.entry.js.map
|