@nylas/web-elements 1.1.0-canary.3 → 1.1.0-canary.4

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.
Files changed (52) hide show
  1. package/dist/cjs/google-logo-icon_3.cjs.entry.js +3 -3
  2. package/dist/cjs/google-logo-icon_3.cjs.entry.js.map +1 -1
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/nylas-editor-tabs.cjs.entry.js +3 -3
  5. package/dist/cjs/nylas-editor-tabs.cjs.entry.js.map +1 -1
  6. package/dist/cjs/nylas-scheduler-editor.cjs.entry.js +20 -5
  7. package/dist/cjs/nylas-scheduler-editor.cjs.entry.js.map +1 -1
  8. package/dist/cjs/nylas-scheduling.cjs.entry.js +3 -3
  9. package/dist/cjs/nylas-scheduling.cjs.entry.js.map +1 -1
  10. package/dist/cjs/nylas-web-elements.cjs.js +1 -1
  11. package/dist/collection/components/scheduler/nylas-scheduler/nylas-scheduling.js +5 -5
  12. package/dist/collection/components/scheduler/nylas-scheduler/nylas-scheduling.js.map +1 -1
  13. package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.js +3 -3
  14. package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.js.map +1 -1
  15. package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.js +20 -5
  16. package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.js.map +1 -1
  17. package/dist/components/nylas-editor-tabs2.js +3 -3
  18. package/dist/components/nylas-editor-tabs2.js.map +1 -1
  19. package/dist/components/nylas-scheduler-editor.js +20 -5
  20. package/dist/components/nylas-scheduler-editor.js.map +1 -1
  21. package/dist/components/nylas-scheduling.js +4 -4
  22. package/dist/components/nylas-scheduling.js.map +1 -1
  23. package/dist/esm/google-logo-icon_3.entry.js +3 -3
  24. package/dist/esm/google-logo-icon_3.entry.js.map +1 -1
  25. package/dist/esm/loader.js +1 -1
  26. package/dist/esm/nylas-editor-tabs.entry.js +3 -3
  27. package/dist/esm/nylas-editor-tabs.entry.js.map +1 -1
  28. package/dist/esm/nylas-scheduler-editor.entry.js +20 -5
  29. package/dist/esm/nylas-scheduler-editor.entry.js.map +1 -1
  30. package/dist/esm/nylas-scheduling.entry.js +3 -3
  31. package/dist/esm/nylas-scheduling.entry.js.map +1 -1
  32. package/dist/esm/nylas-web-elements.js +1 -1
  33. package/dist/nylas-web-elements/nylas-editor-tabs.entry.js +3 -3
  34. package/dist/nylas-web-elements/nylas-editor-tabs.entry.js.map +1 -1
  35. package/dist/nylas-web-elements/nylas-scheduler-editor.entry.js +20 -5
  36. package/dist/nylas-web-elements/nylas-scheduler-editor.entry.js.map +1 -1
  37. package/dist/nylas-web-elements/nylas-scheduling.entry.js +3 -3
  38. package/dist/nylas-web-elements/nylas-scheduling.entry.js.map +1 -1
  39. package/dist/nylas-web-elements/nylas-web-elements.esm.js +1 -1
  40. package/dist/nylas-web-elements/p-4ee6f11e.entry.js +2 -0
  41. package/dist/nylas-web-elements/p-4ee6f11e.entry.js.map +1 -0
  42. package/dist/nylas-web-elements/{p-af22da60.entry.js → p-65062d50.entry.js} +2 -2
  43. package/dist/nylas-web-elements/p-65062d50.entry.js.map +1 -0
  44. package/dist/nylas-web-elements/{p-dc1cee56.entry.js → p-eb93a363.entry.js} +2 -2
  45. package/dist/nylas-web-elements/{p-dc1cee56.entry.js.map → p-eb93a363.entry.js.map} +1 -1
  46. package/dist/types/components/scheduler/nylas-scheduler/nylas-scheduling.d.ts +1 -1
  47. package/dist/types/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.d.ts +1 -0
  48. package/dist/types/components.d.ts +2 -2
  49. package/package.json +1 -1
  50. package/dist/nylas-web-elements/p-59b6ae90.entry.js +0 -2
  51. package/dist/nylas-web-elements/p-59b6ae90.entry.js.map +0 -1
  52. package/dist/nylas-web-elements/p-af22da60.entry.js.map +0 -1
@@ -88,7 +88,7 @@ const NylasScheduling = class {
88
88
  this.bookingInfo = undefined;
89
89
  this.rescheduleBookingId = undefined;
90
90
  this.cancelBookingId = undefined;
91
- this.configId = undefined;
91
+ this.configurationId = undefined;
92
92
  this.nylasBranding = true;
93
93
  this.eventOverrides = {};
94
94
  this.isLoading = undefined;
@@ -121,7 +121,7 @@ const NylasScheduling = class {
121
121
  this.nylasSchedulerConnector = new NylasSchedulerConnector({
122
122
  schedulerAPIURL: this.schedulerApiUrl,
123
123
  sessionId: this.sessionId,
124
- configId: this.configId,
124
+ configId: this.configurationId,
125
125
  nylasSchedulerStore,
126
126
  });
127
127
  this.init.emit(this.host);
@@ -238,7 +238,7 @@ const NylasScheduling = class {
238
238
  };
239
239
  }
240
240
  checkIfSessionIdOrConfigIdExists() {
241
- if (!this.sessionId && !this.configId) {
241
+ if (!this.sessionId && !this.configurationId) {
242
242
  this.nylasSchedulerError.emit({
243
243
  title: 'No sessionId!',
244
244
  category: ErrorCategory.Component,
@@ -1 +1 @@
1
- {"file":"nylas-scheduling.entry.js","mappings":";;;;;;;MAca,uBAAuB;IAQlC,YAAY,EAAE,eAAe,EAAE,mBAAmB,EAAE,SAAS,EAAE,QAAQ,EAAkC;QACvG,IAAI,CAAC,eAAe,EAAE;YACpB,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;SAChD;QAED,IAAI,CAAC,mBAAmB,EAAE;YACxB,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;SACpD;QAED,IAAI,CAAC,SAAS,IAAI,CAAC,QAAQ,EAAE;YAC3B,MAAM,IAAI,KAAK,CAAC,4FAA4F,CAAC,CAAC;SAC/G;QAID,IAAI,eAAe,KAAK,GAAG,EAAE;YAC3B,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YAC1C,eAAe,GAAG,GAAG,CAAC,MAAM,CAAC;SAC9B;QAED,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;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EAAC,sDAAsD,GAA6B,CACtH,CACF,EACN,WAAK,KAAK,EAAC,aAAa,IACtB,0BAAoB,WAAW,EAAC,0GAA0G,IACvI,kBAAkB,KACjB,WAAK,IAAI,EAAC,qBAAqB,IAC7B,YAAM,IAAI,EAAC,qBAAqB,GAAQ,CACpC,CACP,CACkB,CACjB,CACF,CACQ,CACX,EACP;SACH;QAED,QACE,EAAC,IAAI,QACH,eAAQ,CACH,EACP;KACH;;;;;;;;;;","names":["NotificationType"],"sources":["src/connector/nylas-scheduler-connector/index.ts","src/components/scheduler/nylas-scheduler/scheduler-view.tsx","src/components/scheduler/nylas-scheduler/message-banner.tsx","src/components/scheduler/nylas-scheduler/nylas-scheduling.scss?tag=nylas-scheduling&encapsulation=shadow","src/components/scheduler/nylas-scheduler/nylas-scheduling.tsx"],"sourcesContent":["import { NylasSchedulerStoreType } from '@/stores/scheduler-store';\nimport { debug } from '@/utils/utils';\nimport { NylasSchedulerConnectorInterface } from '../connector-interface';\nimport { NylaSchedulerAPIConnector } from '../shared/api/scheduler';\n\ntype NylasSchedulerConnectorOptions = {\n schedulerAPIURL: string;\n nylasSchedulerStore: NylasSchedulerStoreType;\n sessionId?: string;\n configId?: string;\n};\n/**\n * Base class for the Nylas connector.\n */\nexport class NylasSchedulerConnector implements NylasSchedulerConnectorInterface {\n public schedulerAPIURL: string;\n public nylasSchedulerStore: NylasSchedulerStoreType;\n public sessionId: string | undefined;\n public configId: string | undefined;\n\n private _schedulerAPIConnector: NylaSchedulerAPIConnector | undefined;\n\n constructor({ schedulerAPIURL, nylasSchedulerStore, sessionId, configId }: NylasSchedulerConnectorOptions) {\n if (!schedulerAPIURL) {\n throw new Error('schedulerAPIURL is required');\n }\n\n if (!nylasSchedulerStore) {\n throw new Error('nylasSchedulerStore is required');\n }\n\n if (!sessionId && !configId) {\n throw new Error('sessionId is required for private configs, if not config id is required for public configs');\n }\n\n // If the url is only /, then we need to add the base url.\n // We assume that the base url is the same as the current url.\n if (schedulerAPIURL === '/') {\n const url = new URL(window.location.href);\n schedulerAPIURL = url.origin;\n }\n\n this.configId = configId;\n this.sessionId = sessionId;\n this.schedulerAPIURL = schedulerAPIURL;\n this.nylasSchedulerStore = nylasSchedulerStore;\n }\n\n public init() {\n debug('NylasConnector init');\n }\n\n public get schedulerStore() {\n return this.nylasSchedulerStore;\n }\n\n public get scheduler() {\n if (this._schedulerAPIConnector) {\n return this._schedulerAPIConnector;\n }\n this._schedulerAPIConnector = new NylaSchedulerAPIConnector({\n schedulerAPIURL: this.schedulerAPIURL,\n schedulerStore: this.schedulerStore,\n sessionId: this.sessionId,\n configId: this.configId,\n });\n return this._schedulerAPIConnector;\n }\n\n public resetStores() {\n this.nylasSchedulerStore.reset();\n }\n}\nexport type PublicMethods<T> = {\n [K in keyof T]: T[K] extends Function ? (string extends K ? never : K) : never;\n}[keyof T];\n\nexport type NylasSchedulerConnectorPublicMethods = PublicMethods<NylasSchedulerConnector>;\n","import { Fragment, FunctionalComponent, h } from '@stencil/core';\n\nexport type SchedulerViewProps = {\n isLoading?: boolean;\n showNotification?: boolean;\n nylasBranding?: boolean;\n};\n\n/**\n * The Scheduler view component.\n */\nexport const SchedulerView: FunctionalComponent<SchedulerViewProps> = (props: SchedulerViewProps, children) => {\n const isLoading = props.isLoading;\n const showNotification = props.showNotification;\n const nylasBranding = props.nylasBranding;\n\n return (\n <Fragment>\n {showNotification && <nylas-notification></nylas-notification>}\n\n {isLoading && (\n <div class={'loading'}>\n <div class={'left'}>\n <div class={'skeleton'} />\n </div>\n <div class={'right'}>\n <div class={'skeleton'} />\n <div class={'skeleton'} />\n <div class={'skeleton'} />\n <div class={'skeleton'} />\n <div class={'skeleton'} />\n </div>\n </div>\n )}\n {!isLoading && children}\n <div class={'footer'}>\n {nylasBranding && (\n <Fragment>\n Powered by&nbsp;\n <nylas-logo />\n </Fragment>\n )}\n </div>\n </Fragment>\n );\n};\n","import { FunctionalComponent, h } from '@stencil/core';\n\nexport type HeaderBannerProps = {};\n\nexport const MessageBanner: FunctionalComponent<HeaderBannerProps> = (_props: HeaderBannerProps, children) => <div class=\"message-banner\">{children}</div>;\n","@import '../../../common/styles/variables.scss';\n\n:host {\n display: flex;\n flex-direction: column;\n overflow: visible;\n border-radius: var(--nylas-border-radius-2x);\n width: fit-content;\n @media #{$mobile} {\n width: auto;\n min-width: 325px;\n }\n background: var(--nylas-base-0);\n position: relative;\n box-shadow:\n 0px 4px 6px -2px rgba(0, 0, 0, 0.05),\n 0px 10px 15px -3px rgba(0, 0, 0, 0.1);\n @include default-css-variables;\n font-family: var(--nylas-font-family);\n font-optical-sizing: auto;\n font-style: normal;\n font-variation-settings: 'slnt' 0;\n}\n\n:root {\n font-family: inherit;\n}\n\n.error {\n padding: 8rem 12rem;\n color: var(--nylas-base-0);\n background-color: var(--nylas-error);\n margin: 1.5rem;\n border-radius: var(--nylas-border-radius-2x);\n}\n\n.message-banner {\n text-align: right;\n color: var(--nylas-base-800);\n padding: 1rem;\n border-bottom: 1px solid var(--nylas-color-primary-200);\n margin-top: 1rem;\n}\n\n.loading {\n margin: 1.5rem;\n display: flex;\n gap: 1rem;\n\n .skeleton {\n border-radius: var(--nylas-border-radius-2x);\n animation: pulsate 1.5s infinite;\n &:nth-child(2) {\n animation-delay: -100ms;\n }\n &:nth-child(3) {\n animation-delay: -200ms;\n }\n &:nth-child(4) {\n animation-delay: -300ms;\n }\n &:nth-child(5) {\n animation-delay: -400ms;\n }\n }\n\n .left .skeleton {\n height: 100%;\n width: 400px;\n }\n .right .skeleton {\n height: 5rem;\n width: 300px;\n margin-bottom: 1rem;\n &:last-child {\n margin-bottom: 0;\n }\n }\n}\n\n@keyframes pulsate {\n 0% {\n background-color: var(--nylas-base-50);\n }\n 50% {\n background-color: var(--nylas-base-100);\n }\n 100% {\n background-color: var(--nylas-base-50);\n }\n}\n\n.select-date-page,\n.additional-data-page,\n.booked-event-page,\n.cancelled-event-page,\n.cancel-flow-page {\n border-top-left-radius: var(--nylas-border-radius-2x);\n border-top-right-radius: var(--nylas-border-radius-2x);\n}\n\n.select-date-page,\n.additional-data-page {\n display: flex;\n\n @media #{$mobile} {\n flex-direction: column;\n }\n}\n\n.booked-event-page {\n background-color: var(--nylas-base-50);\n}\n\n.cancelled-event-page,\n.cancel-flow-page {\n padding: 1rem;\n height: 496px;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.booked-event-page,\n.cancelled-event-page,\n.cancel-flow-page {\n min-width: 784px;\n @media #{$mobile} {\n min-width: 90%;\n }\n background: var(--nylas-base-50);\n}\n\n.left-panel {\n padding: 1rem 20px 0;\n gap: 1rem;\n height: 512px;\n min-width: 384px;\n border-top-left-radius: inherit;\n background: var(--nylas-base-0);\n @media #{$mobile} {\n border-top-right-radius: inherit;\n min-width: unset;\n height: auto;\n }\n}\n\n.select-date-page .left-panel {\n @media #{$mobile} {\n padding: 0.5rem 4px 0;\n }\n}\n\n.border {\n margin-left: -20px; // Offset left padding\n margin-right: -20px; // Offset right padding\n border-top-width: 1px;\n height: 1px;\n background-color: var(--nylas-base-200);\n @media #{$mobile} {\n display: none;\n }\n}\n\n.right-panel {\n min-width: 360px;\n width: 360px;\n background-color: var(--nylas-base-50);\n height: 512px;\n padding-top: 16px;\n border-left: 1px solid var(--nylas-base-200);\n border-top-right-radius: inherit;\n @media #{$mobile} {\n border-top-right-radius: 0px;\n width: inherit;\n min-width: unset;\n height: auto;\n }\n h2 {\n display: flex;\n margin: 0;\n height: 48px;\n gap: 0.5rem;\n justify-content: center;\n align-items: center;\n width: auto;\n font-size: 1.125rem;\n line-height: 1.5rem;\n font-weight: 500;\n text-align: center;\n color: var(--nylas-base-800);\n }\n}\n\n.additional-data-page {\n .left-panel {\n background-color: var(--nylas-base-50);\n }\n .right-panel {\n background-color: var(--nylas-base-0);\n }\n}\n\nnylas-selected-event-card {\n height: 496px;\n\n @media #{$mobile} {\n height: 250px;\n }\n}\n\n.footer {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n padding: 16px;\n font-size: 14px;\n font-weight: 300;\n color: var(--nylas-base-500);\n border-top: 1px solid var(--nylas-base-200);\n min-height: 24px;\n svg {\n fill: var(--nylas-base-500);\n }\n}\n\n.footer svg {\n margin-top: 1px;\n}\n\nnylas-selected-event-card::part(nsec__timezone) {\n position: absolute;\n bottom: 0;\n}\n","import { NylasBaseProvider } from '@/common/abstract-provider';\nimport { RegisteredComponent } from '@/common/register-component';\nimport type { SchedulerEventOverride } from '@/common/component-types';\nimport { NylasSchedulerConnector } from '@/connector/nylas-scheduler-connector';\nimport { CreateNylasSchedulerStore, NylasSchedulerStoreState, NylasSchedulerStoreType } from '@/stores/scheduler-store';\nimport { NylasSchedulerBookingData, ThemeConfig, Notification, NotificationType, NylasSchedulerErrorResponse, Timeslot } from '@nylas/core';\nimport { Component, Element, Event, EventEmitter, Host, Listen, Method, Prop, State, Watch, h } from '@stencil/core';\nimport { debug } from '@/utils/utils';\nimport { SchedulerView } from './scheduler-view';\nimport { ErrorCategory } from '@/connector/nylas-scheduler-connector/errors';\nimport { MessageBanner } from './message-banner';\n\nconst genericError = { title: 'Something went wrong...', type: NotificationType.Error, category: ErrorCategory.Component };\n\n/**\n * The `nylas-scheduling` component is used to display the Nylas Scheduling UI.\n *\n * @slot custom-booking-form - This slot is used to pass a custom booking form to the Nylas Scheduling component.\n * @slot timeslot-picker-cta-label - This slot is used to pass a custom label to the timeslot picker CTA. The default label is \"Next\".\n *\n * @part ndp - [nylas-date-picker] The date picker host.\n * @part ndp__month-header - [nylas-date-picker] The month header.\n * @part ndp__month-button - [nylas-date-picker] The month button.\n * @part ndp__day - [nylas-date-picker] The day.\n * @part ndp__date - [nylas-date-picker] The date.\n * @part ndp__date--selected - [nylas-date-picker] The selected date.\n * @part ndp__date--current-day - [nylas-date-picker] The current day.\n * @part ndp__date--current-month - [nylas-date-picker] The dates in the current month.\n * @part ntp - [nylas-timeslot-picker] The timeslot picker component.\n * @part ntp__timeslot - [nylas-timeslot-picker] The timeslot button.\n * @part ntp__timeslot--selected - [nylas-timeslot-picker] The selected timeslot button.\n * @part ntp__button-primary - [nylas-timeslot-picker] The timeslot picker CTA.\n * @part nsec - [nylas-selected-event-card] The selected event card component.\n * @part nsec__card - [nylas-selected-event-card] The card component.\n * @part nsec__icon - [nylas-selected-event-card] The calendar icon.\n * @part nsec__date - [nylas-selected-event-card] The date selected.\n * @part nsec__time - [nylas-selected-event-card] The timeslot selected.\n * @part nbf - [nylas-booking-form] The booking form host.\n * @part nbf__input-label - [nylas-booking-form] The input label.\n * @part nbf__input-textfield - [nylas-booking-form] The input textfield.\n * @part nbf__button-ghost - [nylas-booking-form] The ghost button for adding guests.\n * @part nbf__button-primary - [nylas-booking-form] The primary button for booking.\n * @part nbf__button-outline - [nylas-booking-form] The outline button for canceling.\n * @part ncec - [nylas-cancelled-event-card] The cancelled event card host.\n * @part ncec__icon - [nylas-cancelled-event-card] The calendar icon.\n * @part ncec__title - [nylas-cancelled-event-card] The title of the cancelled event card.\n * @part ncec__description - [nylas-cancelled-event-card] The description of the cancelled event card.\n * @part ncec__button-outline - [nylas-cancelled-event-card] The close button CTA.\n * @part ncec__card - [nylas-cancelled-event-card] The cancelled event card.\n * @part nbec - [nylas-booked-event-card] The booked event card host.\n * @part nbec__card - [nylas-booked-event-card] The booked event card.\n * @part nbec__title - [nylas-booked-event-card] The title of the booked event card.\n * @part nbec__description - [nylas-booked-event-card] The description of the booked event card.\n * @part nbec__button-outline - [nylas-booked-event-card] The cancel & reschedule button CTA.\n * @part nbec__cancel-cta - [nylas-booked-event-card] The cancel button CTA.\n * @part nbec__reschedule-cta - [nylas-booked-event-card] The reschedule button CTA.\n */\n@Component({\n tag: 'nylas-scheduling',\n styleUrl: 'nylas-scheduling.scss',\n shadow: true,\n})\nexport class NylasScheduling {\n /**\n * Stores to be used by the provider.\n */\n private stores?: { scheduler: NylasSchedulerStoreType };\n\n /**\n * This is a base provide that defines the common methods and properties\n * that all providers should have.\n *\n * Because stencil does not support abstract classes, we have to use a\n * property to store the base provider instance.\n */\n private baseProvider?: NylasBaseProvider<Exclude<typeof this.stores, undefined>>;\n\n /**\n * The Nylas Scheduler Connector instance.\n * The branins of the provider. It manages data fetching and state synchronization.\n */\n private nylasSchedulerConnector?: NylasSchedulerConnector;\n\n /**\n * The host element.\n * Used to manage the host element of the provider.\n */\n @Element() private host!: HTMLNylasSchedulingElement;\n\n /**\n * This is used to set the mode for the Nylas Scheduler.\n * The mode can be either `app` or `composable`. The default mode is `app`.\n * - `app`: This mode is used to show the default Nylas Scheduler UI.\n * - `composable`: This mode is used to show the composable Nylas Scheduler UI\n * by passing the individual scheduler components as children.\n */\n @Prop() readonly mode: 'app' | 'composable' = 'app';\n\n /**\n * The default scheduler store state.\n * Used to set the initial state of the scheduler store.\n */\n @Prop({ attribute: 'default-scheduler-store-state' }) readonly defaultSchedulerState?: Partial<NylasSchedulerStoreState>;\n\n /**\n * The session ID for the Nylas Scheduler.\n * This is used to authenticate the user.\n */\n @Prop() readonly sessionId?: string;\n\n /**\n * The URL for the Nylas Scheduler API. (staging or production URL)\n */\n @Prop() readonly schedulerApiUrl: string = 'https://api.us.nylas.com';\n\n /**\n * This enables passing the bookingInfo object to the Scheduler UI for direct booking event creation.\n * When used with timeslotConfirmedHandler, it bypasses the additional data page and immediately\n * invokes the handler after booking.\n */\n @Prop() readonly bookingInfo?: NylasSchedulerBookingData;\n\n /**\n * Booking Id required for rescheduling flow.\n */\n @Prop() readonly rescheduleBookingId?: string;\n\n /**\n * Booking Id required for cancelling flow.\n */\n @Prop() readonly cancelBookingId?: string;\n\n /**\n * The config ID for the Nylas Scheduler. This should be passed in when using a public config,\n * in which case the sessionId is not required.\n */\n @Prop() readonly configId?: string;\n\n /**\n * This prop lets you hide the Nylas branding.\n * Default is true.\n */\n @Prop() readonly nylasBranding?: boolean = true;\n\n /**\n * This provides an easy way to override the default function of the event emitter.\n * An example of this is the `timeslotConfirmed` event. By default, this event will set the scheduler store state for `showBookingForm` to `true` which will\n * show the booking form. However, if you want to override this behavior, you can pass in the prop `eventOverride` like:\n * ```html\n * <nylas-scheduling eventOverride={{\"timeslotConfirmed\": (event, nylasConnector) => { console.log(\"Timeslot confirmed event fired!\"); } }} />\n * ```\n */\n @Prop({ attribute: 'event-overrides' }) readonly eventOverrides: SchedulerEventOverride = {};\n\n /**\n * The loading state. This is used to set the loading state for the Nylas Scheduler when fetching data.\n */\n @Prop() readonly isLoading?: boolean;\n\n /**\n * Theme config, used to automatically generate a theme with color palette and\n * CSS variables to customize the look and feel of the Nylas Scheduler.\n */\n @Prop() readonly themeConfig?: ThemeConfig;\n\n /*\n * Displays notifications for errors by default. When enabled (`true`), errors\n * automatically appear as notifications. Disabling this feature (`false`) allows\n * the parent application to capture and manage errors by listening to the\n * `nylasSchedulerError` event, providing flexibility in error handling.\n */\n @Prop() readonly showNotification?: boolean = true;\n\n /**\n * Automatically register components that have the `@RegisterComponent` decorator.\n * If this is set to false, you will need to manually register components using the\n * `registerComponent` method.\n * @default true\n */\n @State() automaticComponentRegistration: boolean = true;\n\n /**\n * The selected date label for the Nylas Scheduler.\n * This is used to set the initial date label for the Nylas Scheduler.\n */\n @State() selectedDateLabel: string = new Date().toLocaleDateString(undefined, { dateStyle: 'full' }) || 'No date selected';\n\n /**\n * This event is fired when the provider is initialized.\n * It can be used to set the initial state of the provider,\n * or to prevent the provider from firing some default behavior.\n */\n @Event({ cancelable: true }) init!: EventEmitter<HTMLNylasSchedulingElement>;\n\n /**\n * This event is fired when the scheduler component enters componentWillLoad lifecycle.\n */\n @Event() schedulerWillLoad!: EventEmitter<HTMLNylasSchedulingElement>;\n\n /**\n * This event is fired when the scheduler component enters componentDidLoad lifecycle.\n */\n @Event() schedulerDidLoad!: EventEmitter<HTMLNylasSchedulingElement>;\n\n @Event({\n eventName: 'nylasSchedulerError',\n })\n nylasSchedulerError!: EventEmitter<Notification>;\n\n /**\n * This function is called when the component is connected to the DOM.\n * At this point in the component lifecycle, the base provider has not yet\n * been initialized. So avoid using the base provider in this method or stores\n * in this method.\n */\n connectedCallback() {\n debug(`[nylas-scheduler] connectedCallback`);\n }\n\n async componentWillLoad() {\n debug(`[nylas-scheduler] Component will load`);\n\n // Emit the schedulerWillLoad event to allow the parent application to set the initial\n // state of the provider or to prevent the provider from firing some default behavior.\n const schedulerWillLoadEvent = this.schedulerWillLoad.emit(this.host);\n if (schedulerWillLoadEvent.defaultPrevented) {\n return;\n }\n\n if (!this.checkIfSessionIdOrConfigIdExists()) {\n return;\n }\n\n this.stores = {\n scheduler: CreateNylasSchedulerStore({\n bookingInfo: this.bookingInfo,\n nylasBranding: this.nylasBranding,\n ...this.defaultSchedulerState,\n }),\n };\n\n this.baseProvider = new NylasBaseProvider(this.host, this.stores, this.automaticComponentRegistration, this.eventOverrides);\n\n const nylasSchedulerStore = this.baseProvider?.getStore('scheduler');\n this.nylasSchedulerConnector = new NylasSchedulerConnector({\n schedulerAPIURL: this.schedulerApiUrl,\n sessionId: this.sessionId,\n configId: this.configId,\n nylasSchedulerStore,\n });\n this.init.emit(this.host);\n\n this.baseProvider?.componentWillLoad(this.nylasSchedulerConnector);\n // Override theme\n if (this.themeConfig) {\n for (const [key, value] of Object.entries(this.themeConfig)) {\n this.host.style.setProperty(`${key}`, value);\n }\n }\n }\n\n async componentDidLoad() {\n this.baseProvider?.componentDidLoad();\n\n // If sessionId is not provided, do not fetch availability\n if (!this.checkIfSessionIdOrConfigIdExists()) {\n return;\n }\n\n const nylasSchedulerStore = this.baseProvider?.getStore('scheduler');\n\n const selectedTimeslot = nylasSchedulerStore?.get('selectedTimeslot');\n\n if (selectedTimeslot && selectedTimeslot?.start_time) {\n if (!this.isTimeslotValid(selectedTimeslot)) {\n return;\n }\n\n // If the selected timeslot is already set, do not fetch availability\n if (nylasSchedulerStore?.get('showBookingForm')) {\n nylasSchedulerStore?.set('selectedDate', selectedTimeslot.start_time);\n return;\n }\n }\n\n const selectedDate = nylasSchedulerStore?.get('selectedDate');\n const availability = nylasSchedulerStore?.get('availability');\n let result;\n\n if (availability && availability.length > 0) {\n return;\n }\n\n if (!selectedDate) {\n result = await this.nylasSchedulerConnector?.scheduler.getAvailability();\n } else {\n const startTime = new Date(selectedDate.getFullYear(), selectedDate.getMonth(), 1).getTime() / 1000;\n const endTime = new Date(selectedDate.getFullYear(), selectedDate.getMonth() + 1, 1).getTime() / 1000;\n result = await this.nylasSchedulerConnector?.scheduler.getAvailability(startTime, endTime);\n }\n\n if (!result || 'error' in result) {\n this.nylasSchedulerError.emit({ ...this.getErrorObject(result?.error) });\n }\n\n if (!selectedDate) {\n let _selectedDate = new Date();\n const firstAvailableDate = nylasSchedulerStore?.get('availability').find((timeslot: any) => new Date(timeslot.start_time) > new Date());\n if (firstAvailableDate) {\n _selectedDate = firstAvailableDate.start_time;\n }\n nylasSchedulerStore?.set('selectedDate', _selectedDate);\n }\n }\n\n componentDisconnected() {\n this.baseProvider?.componentDisconnected();\n }\n\n @Watch('bookingInfo')\n bookingInfoChanged(newVal?: NylasSchedulerBookingData) {\n this.stores?.scheduler.set('bookingInfo', newVal);\n }\n\n /**\n * This is a custom event handler that is used to register a component with the provider.\n * It is used by components that have the `@RegisterComponent` decorator.\n * @param event A custom event that contains the component to register\n * @returns Promise<void>\n */\n @Listen('registerComponent')\n async registerComponentHandler(event: CustomEvent<RegisteredComponent<any, any>>): Promise<void> {\n this.baseProvider?.registerComponent(event.detail);\n }\n\n /**\n * This is a custom event handler that is used to unregister a component with the provider.\n * It is used by components that have the `@RegisterComponent` decorator.\n * @param event A custom event that contains the component to unregister\n * @returns Promise<void>\n */\n @Listen('unregisterComponent')\n async unregisterComponentHandler(event: CustomEvent<RegisteredComponent<any, any>>): Promise<void> {\n this.baseProvider?.unregisterComponent(event.detail);\n }\n\n /**\n * This is a custom event handler that is used to refetch the availability when the month is changed.\n */\n @Listen('monthChanged')\n async monthChangedHandler(event: CustomEvent<Date>) {\n const date = event.detail;\n const startTime = new Date(date.getFullYear(), date.getMonth(), 1).getTime() / 1000;\n const endTime = new Date(date.getFullYear(), date.getMonth() + 1, 1).getTime() / 1000;\n\n const result = await this.nylasSchedulerConnector?.scheduler.getAvailability(startTime, endTime);\n\n if (!result || 'error' in result) {\n this.nylasSchedulerError.emit({ ...this.getErrorObject(result?.error) });\n }\n }\n\n /**\n * This is a custom event handler to book an event.\n */\n @Listen('detailsConfirmed')\n async bookButtonClickedHandler(event: CustomEvent<NylasSchedulerBookingData>) {\n if (this.rescheduleBookingId) {\n const result = await this.nylasSchedulerConnector?.scheduler.rescheduleBooking(this.rescheduleBookingId, event.detail);\n if (!result || 'error' in result) {\n this.nylasSchedulerError.emit({ ...this.getErrorObject(result?.error) });\n }\n return;\n }\n const result = await this.nylasSchedulerConnector?.scheduler.bookTimeslot(event.detail);\n if (!result || 'error' in result) {\n this.nylasSchedulerError.emit({ ...this.getErrorObject(result?.error) });\n }\n }\n\n /**\n * This is a custom event handler to update the selected date label.\n */\n @Listen('dateSelected')\n dateSelectedHandler(event: CustomEvent<Date>) {\n const date = event.detail;\n this.selectedDateLabel = date ? date.toLocaleDateString(undefined, { dateStyle: 'full' }) : 'No date selected';\n }\n\n /**\n * This is an event handler to handle the error (if any) when the\n * cancel booking button is clicked on the cancel booking form.\n */\n @Listen('cancelBookedEventError')\n cancelBookedEventErrorHandler(event: CustomEvent<NylasSchedulerErrorResponse>) {\n this.nylasSchedulerError.emit({ ...this.getErrorObject(event.detail.error) });\n }\n\n /**\n * This is an event handler to handle the error (if any) when the\n * reschedule button is clicked on the booked event card.\n */\n @Listen('rescheduleBookedEventError')\n rescheduleBookedEventErrorHandler(event: CustomEvent<NylasSchedulerErrorResponse>) {\n this.nylasSchedulerError.emit({ ...this.getErrorObject(event.detail.error) });\n }\n\n /**\n * This method is used to retrieve the NylasScheduler instance\n * @returns The NylasScheduler instance\n */\n @Method()\n async getNylasSchedulerStore(): Promise<NylasSchedulerStoreType | undefined> {\n return this.baseProvider?.getStore('scheduler');\n }\n\n /**\n * This method is used to retrieve the NylasConnector instance\n * @returns The NylasConnector instance\n */\n @Method()\n async getNylasSchedulerConnector() {\n return this.nylasSchedulerConnector;\n }\n\n @Method()\n async getRef() {\n return this.host;\n }\n\n private getErrorObject(error: NylasSchedulerErrorResponse['error']): Notification {\n return {\n title: error?.title || genericError.title,\n category: error?.category || genericError.category,\n type: NotificationType.Error,\n description: error?.message || '',\n id: new Date().getTime().toString(),\n ttl: 'none',\n };\n }\n\n private checkIfSessionIdOrConfigIdExists(): boolean {\n if (!this.sessionId && !this.configId) {\n this.nylasSchedulerError.emit({\n title: 'No sessionId!',\n category: ErrorCategory.Component,\n type: NotificationType.Error,\n description: 'Session ID is required',\n id: new Date().getTime().toString(),\n ttl: 'none',\n });\n return false;\n }\n return true;\n }\n\n private isTimeslotValid(timeslot: Timeslot): boolean {\n const selectedDate = new Date(timeslot.start_time);\n if (selectedDate < new Date()) {\n this.nylasSchedulerError.emit({\n title: 'Invalid tiemslot!',\n category: ErrorCategory.Component,\n type: NotificationType.Error,\n description: 'The selected timeslot is invalid.',\n id: new Date().getTime().toString(),\n ttl: 'none',\n });\n return false;\n }\n return true;\n }\n\n render() {\n const showDefaultScheduler = this.mode === 'app';\n const nylasSchedulerStore = this.baseProvider?.getStore('scheduler');\n const eventInfo = nylasSchedulerStore?.get('eventInfo');\n const showBookingForm = nylasSchedulerStore?.get('showBookingForm');\n const cancelledEventInfo = nylasSchedulerStore?.get('cancelledEventInfo');\n const cancelBookingId = nylasSchedulerStore?.get('cancelBookingId') || this.cancelBookingId;\n const selectedTimeslot = nylasSchedulerStore?.get('selectedTimeslot') as Timeslot;\n const rescheduleBookingId = nylasSchedulerStore?.get('rescheduleBookingId') || this.rescheduleBookingId;\n const nylasBranding = nylasSchedulerStore?.get('nylasBranding') || this.nylasBranding;\n\n if (showDefaultScheduler && cancelBookingId && !cancelledEventInfo) {\n return (\n <Host>\n <SchedulerView nylasBranding={nylasBranding} isLoading={this.isLoading} showNotification={this.showNotification}>\n <div class=\"cancel-flow-page\" part=\"cancel-flow-page\">\n <nylas-cancel-booking-form cancelBookingId={cancelBookingId} exportparts=\"ncbf, ncbf__input-textfield, ncbf__button-cta, ncbf__button-outline, ncbf__input-label\" />\n </div>\n </SchedulerView>\n </Host>\n );\n }\n\n // Cancelled event card is shown when the event is cancelled\n if (showDefaultScheduler && cancelledEventInfo) {\n return (\n <Host>\n <SchedulerView nylasBranding={nylasBranding} isLoading={this.isLoading} showNotification={this.showNotification}>\n <div class=\"cancelled-event-page\" part=\"cancelled-event-page\">\n <nylas-cancelled-event-card\n cancelledEventInfo={cancelledEventInfo}\n exportparts=\"ncec, ncec__icon, ncec__title, ncec__description, ncec__button-outline, ncec__card\"\n />\n </div>\n </SchedulerView>\n </Host>\n );\n }\n // Booked event card is shown when the event is booked\n if (showDefaultScheduler && eventInfo) {\n return (\n <Host>\n <SchedulerView nylasBranding={nylasBranding} isLoading={this.isLoading} showNotification={this.showNotification}>\n <div class=\"booked-event-page\" part=\"booked-event-page\">\n <nylas-booked-event-card\n selectedTimeslot={selectedTimeslot}\n eventInfo={eventInfo}\n exportparts=\"nbec, nbec__title, nbec__card, nbec__description, nbec__button-outline, nbec__cancel-cta, nbec__reschedule-cta\"\n />\n </div>\n </SchedulerView>\n </Host>\n );\n }\n // Date and time picker is shown when the event is not booked and no additional data is shown\n if (showDefaultScheduler && (!eventInfo || !!rescheduleBookingId) && !showBookingForm) {\n const timeslotPickerCTALabel = this.host.querySelector('[slot=\"timeslot-picker-cta-label\"]');\n return (\n <Host>\n <SchedulerView nylasBranding={nylasBranding} isLoading={this.isLoading} showNotification={this.showNotification}>\n {rescheduleBookingId && <MessageBanner>Choose another time slot to reschedule your meeting</MessageBanner>}\n <div class=\"select-date-page\" part=\"select-date-page\">\n <div class=\"left-panel\">\n <nylas-date-picker exportparts=\"ndp, ndp__month-header, ndp__month-button, ndp__day, ndp__date, ndp__date--selected, ndp__date--current-day, ndp__date--current-month\"></nylas-date-picker>\n <div class=\"border\"></div>\n <nylas-locale-switch></nylas-locale-switch>\n </div>\n <div class=\"right-panel\">\n <h2>\n <calendar-icon></calendar-icon>\n <span id=\"selectedDate\">{this.selectedDateLabel}</span>\n </h2>\n <nylas-timeslot-picker exportparts=\"ntp, ntp__timeslot, ntp__timeslot--selected, ntp__button-primary\">\n {timeslotPickerCTALabel && (\n <span slot=\"timeslot-picker-cta-label\">\n <slot name=\"timeslot-picker-cta-label\"></slot>\n </span>\n )}\n </nylas-timeslot-picker>\n </div>\n </div>\n </SchedulerView>\n </Host>\n );\n }\n // Additional data is shown when the time is selected, event is not booked and additional data is shown\n if (showDefaultScheduler && !eventInfo && showBookingForm) {\n // Check if a \"custom-booking-form\" slot is provided\n const customTemplateSlot = this.host.querySelector('[slot=\"custom-booking-form\"]');\n\n return (\n <Host>\n <SchedulerView nylasBranding={nylasBranding} isLoading={this.isLoading} showNotification={this.showNotification}>\n {rescheduleBookingId && <MessageBanner>Choose another time slot to reschedule your meeting</MessageBanner>}\n <div class=\"additional-data-page\" part=\"additional-data-page\">\n <div class=\"left-panel\">\n <div class=\"wrapper\">\n <nylas-selected-event-card exportparts=\"nsec, nsec__card, nsec__icon, nsec__date, nsec__time\"></nylas-selected-event-card>\n </div>\n </div>\n <div class=\"right-panel\">\n <nylas-booking-form exportparts=\"nbf, nbf__input-label, nbf__input-textfield, nbf__button-ghost, nbf__button-primary, nbf__button-outline\">\n {customTemplateSlot && (\n <div slot=\"custom-booking-form\">\n <slot name=\"custom-booking-form\"></slot>\n </div>\n )}\n </nylas-booking-form>\n </div>\n </div>\n </SchedulerView>\n </Host>\n );\n }\n\n return (\n <Host>\n <slot />\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"nylas-scheduling.entry.js","mappings":";;;;;;;MAca,uBAAuB;IAQlC,YAAY,EAAE,eAAe,EAAE,mBAAmB,EAAE,SAAS,EAAE,QAAQ,EAAkC;QACvG,IAAI,CAAC,eAAe,EAAE;YACpB,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;SAChD;QAED,IAAI,CAAC,mBAAmB,EAAE;YACxB,MAAM,I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,CAAC,aAAa,CAAC,8BAA8B,CAAC,CAAC;YAEnF,QACE,EAAC,IAAI,QACH,EAAC,aAAa,IAAC,aAAa,EAAE,aAAa,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,IAC5G,mBAAmB,IAAI,EAAC,aAAa,8DAAoE,EAC1G,WAAK,KAAK,EAAC,sBAAsB,EAAC,IAAI,EAAC,sBAAsB,IAC3D,WAAK,KAAK,EAAC,YAAY,IACrB,WAAK,KAAK,EAAC,SAAS,IAClB,iCAA2B,WAAW,EAAC,sDAAsD,GAA6B,CACtH,CACF,EACN,WAAK,KAAK,EAAC,aAAa,IACtB,0BAAoB,WAAW,EAAC,0GAA0G,IACvI,kBAAkB,KACjB,WAAK,IAAI,EAAC,qBAAqB,IAC7B,YAAM,IAAI,EAAC,qBAAqB,GAAQ,CACpC,CACP,CACkB,CACjB,CACF,CACQ,CACX,EACP;SACH;QAED,QACE,EAAC,IAAI,QACH,eAAQ,CACH,EACP;KACH;;;;;;;;;;","names":["NotificationType"],"sources":["src/connector/nylas-scheduler-connector/index.ts","src/components/scheduler/nylas-scheduler/scheduler-view.tsx","src/components/scheduler/nylas-scheduler/message-banner.tsx","src/components/scheduler/nylas-scheduler/nylas-scheduling.scss?tag=nylas-scheduling&encapsulation=shadow","src/components/scheduler/nylas-scheduler/nylas-scheduling.tsx"],"sourcesContent":["import { NylasSchedulerStoreType } from '@/stores/scheduler-store';\nimport { debug } from '@/utils/utils';\nimport { NylasSchedulerConnectorInterface } from '../connector-interface';\nimport { NylaSchedulerAPIConnector } from '../shared/api/scheduler';\n\ntype NylasSchedulerConnectorOptions = {\n schedulerAPIURL: string;\n nylasSchedulerStore: NylasSchedulerStoreType;\n sessionId?: string;\n configId?: string;\n};\n/**\n * Base class for the Nylas connector.\n */\nexport class NylasSchedulerConnector implements NylasSchedulerConnectorInterface {\n public schedulerAPIURL: string;\n public nylasSchedulerStore: NylasSchedulerStoreType;\n public sessionId: string | undefined;\n public configId: string | undefined;\n\n private _schedulerAPIConnector: NylaSchedulerAPIConnector | undefined;\n\n constructor({ schedulerAPIURL, nylasSchedulerStore, sessionId, configId }: NylasSchedulerConnectorOptions) {\n if (!schedulerAPIURL) {\n throw new Error('schedulerAPIURL is required');\n }\n\n if (!nylasSchedulerStore) {\n throw new Error('nylasSchedulerStore is required');\n }\n\n if (!sessionId && !configId) {\n throw new Error('sessionId is required for private configs, if not config id is required for public configs');\n }\n\n // If the url is only /, then we need to add the base url.\n // We assume that the base url is the same as the current url.\n if (schedulerAPIURL === '/') {\n const url = new URL(window.location.href);\n schedulerAPIURL = url.origin;\n }\n\n this.configId = configId;\n this.sessionId = sessionId;\n this.schedulerAPIURL = schedulerAPIURL;\n this.nylasSchedulerStore = nylasSchedulerStore;\n }\n\n public init() {\n debug('NylasConnector init');\n }\n\n public get schedulerStore() {\n return this.nylasSchedulerStore;\n }\n\n public get scheduler() {\n if (this._schedulerAPIConnector) {\n return this._schedulerAPIConnector;\n }\n this._schedulerAPIConnector = new NylaSchedulerAPIConnector({\n schedulerAPIURL: this.schedulerAPIURL,\n schedulerStore: this.schedulerStore,\n sessionId: this.sessionId,\n configId: this.configId,\n });\n return this._schedulerAPIConnector;\n }\n\n public resetStores() {\n this.nylasSchedulerStore.reset();\n }\n}\nexport type PublicMethods<T> = {\n [K in keyof T]: T[K] extends Function ? (string extends K ? never : K) : never;\n}[keyof T];\n\nexport type NylasSchedulerConnectorPublicMethods = PublicMethods<NylasSchedulerConnector>;\n","import { Fragment, FunctionalComponent, h } from '@stencil/core';\n\nexport type SchedulerViewProps = {\n isLoading?: boolean;\n showNotification?: boolean;\n nylasBranding?: boolean;\n};\n\n/**\n * The Scheduler view component.\n */\nexport const SchedulerView: FunctionalComponent<SchedulerViewProps> = (props: SchedulerViewProps, children) => {\n const isLoading = props.isLoading;\n const showNotification = props.showNotification;\n const nylasBranding = props.nylasBranding;\n\n return (\n <Fragment>\n {showNotification && <nylas-notification></nylas-notification>}\n\n {isLoading && (\n <div class={'loading'}>\n <div class={'left'}>\n <div class={'skeleton'} />\n </div>\n <div class={'right'}>\n <div class={'skeleton'} />\n <div class={'skeleton'} />\n <div class={'skeleton'} />\n <div class={'skeleton'} />\n <div class={'skeleton'} />\n </div>\n </div>\n )}\n {!isLoading && children}\n <div class={'footer'}>\n {nylasBranding && (\n <Fragment>\n Powered by&nbsp;\n <nylas-logo />\n </Fragment>\n )}\n </div>\n </Fragment>\n );\n};\n","import { FunctionalComponent, h } from '@stencil/core';\n\nexport type HeaderBannerProps = {};\n\nexport const MessageBanner: FunctionalComponent<HeaderBannerProps> = (_props: HeaderBannerProps, children) => <div class=\"message-banner\">{children}</div>;\n","@import '../../../common/styles/variables.scss';\n\n:host {\n display: flex;\n flex-direction: column;\n overflow: visible;\n border-radius: var(--nylas-border-radius-2x);\n width: fit-content;\n @media #{$mobile} {\n width: auto;\n min-width: 325px;\n }\n background: var(--nylas-base-0);\n position: relative;\n box-shadow:\n 0px 4px 6px -2px rgba(0, 0, 0, 0.05),\n 0px 10px 15px -3px rgba(0, 0, 0, 0.1);\n @include default-css-variables;\n font-family: var(--nylas-font-family);\n font-optical-sizing: auto;\n font-style: normal;\n font-variation-settings: 'slnt' 0;\n}\n\n:root {\n font-family: inherit;\n}\n\n.error {\n padding: 8rem 12rem;\n color: var(--nylas-base-0);\n background-color: var(--nylas-error);\n margin: 1.5rem;\n border-radius: var(--nylas-border-radius-2x);\n}\n\n.message-banner {\n text-align: right;\n color: var(--nylas-base-800);\n padding: 1rem;\n border-bottom: 1px solid var(--nylas-color-primary-200);\n margin-top: 1rem;\n}\n\n.loading {\n margin: 1.5rem;\n display: flex;\n gap: 1rem;\n\n .skeleton {\n border-radius: var(--nylas-border-radius-2x);\n animation: pulsate 1.5s infinite;\n &:nth-child(2) {\n animation-delay: -100ms;\n }\n &:nth-child(3) {\n animation-delay: -200ms;\n }\n &:nth-child(4) {\n animation-delay: -300ms;\n }\n &:nth-child(5) {\n animation-delay: -400ms;\n }\n }\n\n .left .skeleton {\n height: 100%;\n width: 400px;\n }\n .right .skeleton {\n height: 5rem;\n width: 300px;\n margin-bottom: 1rem;\n &:last-child {\n margin-bottom: 0;\n }\n }\n}\n\n@keyframes pulsate {\n 0% {\n background-color: var(--nylas-base-50);\n }\n 50% {\n background-color: var(--nylas-base-100);\n }\n 100% {\n background-color: var(--nylas-base-50);\n }\n}\n\n.select-date-page,\n.additional-data-page,\n.booked-event-page,\n.cancelled-event-page,\n.cancel-flow-page {\n border-top-left-radius: var(--nylas-border-radius-2x);\n border-top-right-radius: var(--nylas-border-radius-2x);\n}\n\n.select-date-page,\n.additional-data-page {\n display: flex;\n\n @media #{$mobile} {\n flex-direction: column;\n }\n}\n\n.booked-event-page {\n background-color: var(--nylas-base-50);\n}\n\n.cancelled-event-page,\n.cancel-flow-page {\n padding: 1rem;\n height: 496px;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.booked-event-page,\n.cancelled-event-page,\n.cancel-flow-page {\n min-width: 784px;\n @media #{$mobile} {\n min-width: 90%;\n }\n background: var(--nylas-base-50);\n}\n\n.left-panel {\n padding: 1rem 20px 0;\n gap: 1rem;\n height: 512px;\n min-width: 384px;\n border-top-left-radius: inherit;\n background: var(--nylas-base-0);\n @media #{$mobile} {\n border-top-right-radius: inherit;\n min-width: unset;\n height: auto;\n }\n}\n\n.select-date-page .left-panel {\n @media #{$mobile} {\n padding: 0.5rem 4px 0;\n }\n}\n\n.border {\n margin-left: -20px; // Offset left padding\n margin-right: -20px; // Offset right padding\n border-top-width: 1px;\n height: 1px;\n background-color: var(--nylas-base-200);\n @media #{$mobile} {\n display: none;\n }\n}\n\n.right-panel {\n min-width: 360px;\n width: 360px;\n background-color: var(--nylas-base-50);\n height: 512px;\n padding-top: 16px;\n border-left: 1px solid var(--nylas-base-200);\n border-top-right-radius: inherit;\n @media #{$mobile} {\n border-top-right-radius: 0px;\n width: inherit;\n min-width: unset;\n height: auto;\n }\n h2 {\n display: flex;\n margin: 0;\n height: 48px;\n gap: 0.5rem;\n justify-content: center;\n align-items: center;\n width: auto;\n font-size: 1.125rem;\n line-height: 1.5rem;\n font-weight: 500;\n text-align: center;\n color: var(--nylas-base-800);\n }\n}\n\n.additional-data-page {\n .left-panel {\n background-color: var(--nylas-base-50);\n }\n .right-panel {\n background-color: var(--nylas-base-0);\n }\n}\n\nnylas-selected-event-card {\n height: 496px;\n\n @media #{$mobile} {\n height: 250px;\n }\n}\n\n.footer {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n padding: 16px;\n font-size: 14px;\n font-weight: 300;\n color: var(--nylas-base-500);\n border-top: 1px solid var(--nylas-base-200);\n min-height: 24px;\n svg {\n fill: var(--nylas-base-500);\n }\n}\n\n.footer svg {\n margin-top: 1px;\n}\n\nnylas-selected-event-card::part(nsec__timezone) {\n position: absolute;\n bottom: 0;\n}\n","import { NylasBaseProvider } from '@/common/abstract-provider';\nimport { RegisteredComponent } from '@/common/register-component';\nimport type { SchedulerEventOverride } from '@/common/component-types';\nimport { NylasSchedulerConnector } from '@/connector/nylas-scheduler-connector';\nimport { CreateNylasSchedulerStore, NylasSchedulerStoreState, NylasSchedulerStoreType } from '@/stores/scheduler-store';\nimport { NylasSchedulerBookingData, ThemeConfig, Notification, NotificationType, NylasSchedulerErrorResponse, Timeslot } from '@nylas/core';\nimport { Component, Element, Event, EventEmitter, Host, Listen, Method, Prop, State, Watch, h } from '@stencil/core';\nimport { debug } from '@/utils/utils';\nimport { SchedulerView } from './scheduler-view';\nimport { ErrorCategory } from '@/connector/nylas-scheduler-connector/errors';\nimport { MessageBanner } from './message-banner';\n\nconst genericError = { title: 'Something went wrong...', type: NotificationType.Error, category: ErrorCategory.Component };\n\n/**\n * The `nylas-scheduling` component is used to display the Nylas Scheduling UI.\n *\n * @slot custom-booking-form - This slot is used to pass a custom booking form to the Nylas Scheduling component.\n * @slot timeslot-picker-cta-label - This slot is used to pass a custom label to the timeslot picker CTA. The default label is \"Next\".\n *\n * @part ndp - [nylas-date-picker] The date picker host.\n * @part ndp__month-header - [nylas-date-picker] The month header.\n * @part ndp__month-button - [nylas-date-picker] The month button.\n * @part ndp__day - [nylas-date-picker] The day.\n * @part ndp__date - [nylas-date-picker] The date.\n * @part ndp__date--selected - [nylas-date-picker] The selected date.\n * @part ndp__date--current-day - [nylas-date-picker] The current day.\n * @part ndp__date--current-month - [nylas-date-picker] The dates in the current month.\n * @part ntp - [nylas-timeslot-picker] The timeslot picker component.\n * @part ntp__timeslot - [nylas-timeslot-picker] The timeslot button.\n * @part ntp__timeslot--selected - [nylas-timeslot-picker] The selected timeslot button.\n * @part ntp__button-primary - [nylas-timeslot-picker] The timeslot picker CTA.\n * @part nsec - [nylas-selected-event-card] The selected event card component.\n * @part nsec__card - [nylas-selected-event-card] The card component.\n * @part nsec__icon - [nylas-selected-event-card] The calendar icon.\n * @part nsec__date - [nylas-selected-event-card] The date selected.\n * @part nsec__time - [nylas-selected-event-card] The timeslot selected.\n * @part nbf - [nylas-booking-form] The booking form host.\n * @part nbf__input-label - [nylas-booking-form] The input label.\n * @part nbf__input-textfield - [nylas-booking-form] The input textfield.\n * @part nbf__button-ghost - [nylas-booking-form] The ghost button for adding guests.\n * @part nbf__button-primary - [nylas-booking-form] The primary button for booking.\n * @part nbf__button-outline - [nylas-booking-form] The outline button for canceling.\n * @part ncec - [nylas-cancelled-event-card] The cancelled event card host.\n * @part ncec__icon - [nylas-cancelled-event-card] The calendar icon.\n * @part ncec__title - [nylas-cancelled-event-card] The title of the cancelled event card.\n * @part ncec__description - [nylas-cancelled-event-card] The description of the cancelled event card.\n * @part ncec__button-outline - [nylas-cancelled-event-card] The close button CTA.\n * @part ncec__card - [nylas-cancelled-event-card] The cancelled event card.\n * @part nbec - [nylas-booked-event-card] The booked event card host.\n * @part nbec__card - [nylas-booked-event-card] The booked event card.\n * @part nbec__title - [nylas-booked-event-card] The title of the booked event card.\n * @part nbec__description - [nylas-booked-event-card] The description of the booked event card.\n * @part nbec__button-outline - [nylas-booked-event-card] The cancel & reschedule button CTA.\n * @part nbec__cancel-cta - [nylas-booked-event-card] The cancel button CTA.\n * @part nbec__reschedule-cta - [nylas-booked-event-card] The reschedule button CTA.\n */\n@Component({\n tag: 'nylas-scheduling',\n styleUrl: 'nylas-scheduling.scss',\n shadow: true,\n})\nexport class NylasScheduling {\n /**\n * Stores to be used by the provider.\n */\n private stores?: { scheduler: NylasSchedulerStoreType };\n\n /**\n * This is a base provide that defines the common methods and properties\n * that all providers should have.\n *\n * Because stencil does not support abstract classes, we have to use a\n * property to store the base provider instance.\n */\n private baseProvider?: NylasBaseProvider<Exclude<typeof this.stores, undefined>>;\n\n /**\n * The Nylas Scheduler Connector instance.\n * The branins of the provider. It manages data fetching and state synchronization.\n */\n private nylasSchedulerConnector?: NylasSchedulerConnector;\n\n /**\n * The host element.\n * Used to manage the host element of the provider.\n */\n @Element() private host!: HTMLNylasSchedulingElement;\n\n /**\n * This is used to set the mode for the Nylas Scheduler.\n * The mode can be either `app` or `composable`. The default mode is `app`.\n * - `app`: This mode is used to show the default Nylas Scheduler UI.\n * - `composable`: This mode is used to show the composable Nylas Scheduler UI\n * by passing the individual scheduler components as children.\n */\n @Prop() readonly mode: 'app' | 'composable' = 'app';\n\n /**\n * The default scheduler store state.\n * Used to set the initial state of the scheduler store.\n */\n @Prop({ attribute: 'default-scheduler-store-state' }) readonly defaultSchedulerState?: Partial<NylasSchedulerStoreState>;\n\n /**\n * The session ID for the Nylas Scheduler.\n * This is used to authenticate the user.\n */\n @Prop() readonly sessionId?: string;\n\n /**\n * The URL for the Nylas Scheduler API. (staging or production URL)\n */\n @Prop() readonly schedulerApiUrl: string = 'https://api.us.nylas.com';\n\n /**\n * This enables passing the bookingInfo object to the Scheduler UI for direct booking event creation.\n * When used with timeslotConfirmedHandler, it bypasses the additional data page and immediately\n * invokes the handler after booking.\n */\n @Prop() readonly bookingInfo?: NylasSchedulerBookingData;\n\n /**\n * Booking Id required for rescheduling flow.\n */\n @Prop() readonly rescheduleBookingId?: string;\n\n /**\n * Booking Id required for cancelling flow.\n */\n @Prop() readonly cancelBookingId?: string;\n\n /**\n * The config ID for the Nylas Scheduler. This should be passed in when using a public config,\n * in which case the sessionId is not required.\n */\n @Prop() readonly configurationId?: string;\n\n /**\n * This prop lets you hide the Nylas branding.\n * Default is true.\n */\n @Prop() readonly nylasBranding?: boolean = true;\n\n /**\n * This provides an easy way to override the default function of the event emitter.\n * An example of this is the `timeslotConfirmed` event. By default, this event will set the scheduler store state for `showBookingForm` to `true` which will\n * show the booking form. However, if you want to override this behavior, you can pass in the prop `eventOverride` like:\n * ```html\n * <nylas-scheduling eventOverride={{\"timeslotConfirmed\": (event, nylasConnector) => { console.log(\"Timeslot confirmed event fired!\"); } }} />\n * ```\n */\n @Prop({ attribute: 'event-overrides' }) readonly eventOverrides: SchedulerEventOverride = {};\n\n /**\n * The loading state. This is used to set the loading state for the Nylas Scheduler when fetching data.\n */\n @Prop() readonly isLoading?: boolean;\n\n /**\n * Theme config, used to automatically generate a theme with color palette and\n * CSS variables to customize the look and feel of the Nylas Scheduler.\n */\n @Prop() readonly themeConfig?: ThemeConfig;\n\n /*\n * Displays notifications for errors by default. When enabled (`true`), errors\n * automatically appear as notifications. Disabling this feature (`false`) allows\n * the parent application to capture and manage errors by listening to the\n * `nylasSchedulerError` event, providing flexibility in error handling.\n */\n @Prop() readonly showNotification?: boolean = true;\n\n /**\n * Automatically register components that have the `@RegisterComponent` decorator.\n * If this is set to false, you will need to manually register components using the\n * `registerComponent` method.\n * @default true\n */\n @State() automaticComponentRegistration: boolean = true;\n\n /**\n * The selected date label for the Nylas Scheduler.\n * This is used to set the initial date label for the Nylas Scheduler.\n */\n @State() selectedDateLabel: string = new Date().toLocaleDateString(undefined, { dateStyle: 'full' }) || 'No date selected';\n\n /**\n * This event is fired when the provider is initialized.\n * It can be used to set the initial state of the provider,\n * or to prevent the provider from firing some default behavior.\n */\n @Event({ cancelable: true }) init!: EventEmitter<HTMLNylasSchedulingElement>;\n\n /**\n * This event is fired when the scheduler component enters componentWillLoad lifecycle.\n */\n @Event() schedulerWillLoad!: EventEmitter<HTMLNylasSchedulingElement>;\n\n /**\n * This event is fired when the scheduler component enters componentDidLoad lifecycle.\n */\n @Event() schedulerDidLoad!: EventEmitter<HTMLNylasSchedulingElement>;\n\n @Event({\n eventName: 'nylasSchedulerError',\n })\n nylasSchedulerError!: EventEmitter<Notification>;\n\n /**\n * This function is called when the component is connected to the DOM.\n * At this point in the component lifecycle, the base provider has not yet\n * been initialized. So avoid using the base provider in this method or stores\n * in this method.\n */\n connectedCallback() {\n debug(`[nylas-scheduler] connectedCallback`);\n }\n\n async componentWillLoad() {\n debug(`[nylas-scheduler] Component will load`);\n\n // Emit the schedulerWillLoad event to allow the parent application to set the initial\n // state of the provider or to prevent the provider from firing some default behavior.\n const schedulerWillLoadEvent = this.schedulerWillLoad.emit(this.host);\n if (schedulerWillLoadEvent.defaultPrevented) {\n return;\n }\n\n if (!this.checkIfSessionIdOrConfigIdExists()) {\n return;\n }\n\n this.stores = {\n scheduler: CreateNylasSchedulerStore({\n bookingInfo: this.bookingInfo,\n nylasBranding: this.nylasBranding,\n ...this.defaultSchedulerState,\n }),\n };\n\n this.baseProvider = new NylasBaseProvider(this.host, this.stores, this.automaticComponentRegistration, this.eventOverrides);\n\n const nylasSchedulerStore = this.baseProvider?.getStore('scheduler');\n this.nylasSchedulerConnector = new NylasSchedulerConnector({\n schedulerAPIURL: this.schedulerApiUrl,\n sessionId: this.sessionId,\n configId: this.configurationId,\n nylasSchedulerStore,\n });\n this.init.emit(this.host);\n\n this.baseProvider?.componentWillLoad(this.nylasSchedulerConnector);\n // Override theme\n if (this.themeConfig) {\n for (const [key, value] of Object.entries(this.themeConfig)) {\n this.host.style.setProperty(`${key}`, value);\n }\n }\n }\n\n async componentDidLoad() {\n this.baseProvider?.componentDidLoad();\n\n // If sessionId is not provided, do not fetch availability\n if (!this.checkIfSessionIdOrConfigIdExists()) {\n return;\n }\n\n const nylasSchedulerStore = this.baseProvider?.getStore('scheduler');\n\n const selectedTimeslot = nylasSchedulerStore?.get('selectedTimeslot');\n\n if (selectedTimeslot && selectedTimeslot?.start_time) {\n if (!this.isTimeslotValid(selectedTimeslot)) {\n return;\n }\n\n // If the selected timeslot is already set, do not fetch availability\n if (nylasSchedulerStore?.get('showBookingForm')) {\n nylasSchedulerStore?.set('selectedDate', selectedTimeslot.start_time);\n return;\n }\n }\n\n const selectedDate = nylasSchedulerStore?.get('selectedDate');\n const availability = nylasSchedulerStore?.get('availability');\n let result;\n\n if (availability && availability.length > 0) {\n return;\n }\n\n if (!selectedDate) {\n result = await this.nylasSchedulerConnector?.scheduler.getAvailability();\n } else {\n const startTime = new Date(selectedDate.getFullYear(), selectedDate.getMonth(), 1).getTime() / 1000;\n const endTime = new Date(selectedDate.getFullYear(), selectedDate.getMonth() + 1, 1).getTime() / 1000;\n result = await this.nylasSchedulerConnector?.scheduler.getAvailability(startTime, endTime);\n }\n\n if (!result || 'error' in result) {\n this.nylasSchedulerError.emit({ ...this.getErrorObject(result?.error) });\n }\n\n if (!selectedDate) {\n let _selectedDate = new Date();\n const firstAvailableDate = nylasSchedulerStore?.get('availability').find((timeslot: any) => new Date(timeslot.start_time) > new Date());\n if (firstAvailableDate) {\n _selectedDate = firstAvailableDate.start_time;\n }\n nylasSchedulerStore?.set('selectedDate', _selectedDate);\n }\n }\n\n componentDisconnected() {\n this.baseProvider?.componentDisconnected();\n }\n\n @Watch('bookingInfo')\n bookingInfoChanged(newVal?: NylasSchedulerBookingData) {\n this.stores?.scheduler.set('bookingInfo', newVal);\n }\n\n /**\n * This is a custom event handler that is used to register a component with the provider.\n * It is used by components that have the `@RegisterComponent` decorator.\n * @param event A custom event that contains the component to register\n * @returns Promise<void>\n */\n @Listen('registerComponent')\n async registerComponentHandler(event: CustomEvent<RegisteredComponent<any, any>>): Promise<void> {\n this.baseProvider?.registerComponent(event.detail);\n }\n\n /**\n * This is a custom event handler that is used to unregister a component with the provider.\n * It is used by components that have the `@RegisterComponent` decorator.\n * @param event A custom event that contains the component to unregister\n * @returns Promise<void>\n */\n @Listen('unregisterComponent')\n async unregisterComponentHandler(event: CustomEvent<RegisteredComponent<any, any>>): Promise<void> {\n this.baseProvider?.unregisterComponent(event.detail);\n }\n\n /**\n * This is a custom event handler that is used to refetch the availability when the month is changed.\n */\n @Listen('monthChanged')\n async monthChangedHandler(event: CustomEvent<Date>) {\n const date = event.detail;\n const startTime = new Date(date.getFullYear(), date.getMonth(), 1).getTime() / 1000;\n const endTime = new Date(date.getFullYear(), date.getMonth() + 1, 1).getTime() / 1000;\n\n const result = await this.nylasSchedulerConnector?.scheduler.getAvailability(startTime, endTime);\n\n if (!result || 'error' in result) {\n this.nylasSchedulerError.emit({ ...this.getErrorObject(result?.error) });\n }\n }\n\n /**\n * This is a custom event handler to book an event.\n */\n @Listen('detailsConfirmed')\n async bookButtonClickedHandler(event: CustomEvent<NylasSchedulerBookingData>) {\n if (this.rescheduleBookingId) {\n const result = await this.nylasSchedulerConnector?.scheduler.rescheduleBooking(this.rescheduleBookingId, event.detail);\n if (!result || 'error' in result) {\n this.nylasSchedulerError.emit({ ...this.getErrorObject(result?.error) });\n }\n return;\n }\n const result = await this.nylasSchedulerConnector?.scheduler.bookTimeslot(event.detail);\n if (!result || 'error' in result) {\n this.nylasSchedulerError.emit({ ...this.getErrorObject(result?.error) });\n }\n }\n\n /**\n * This is a custom event handler to update the selected date label.\n */\n @Listen('dateSelected')\n dateSelectedHandler(event: CustomEvent<Date>) {\n const date = event.detail;\n this.selectedDateLabel = date ? date.toLocaleDateString(undefined, { dateStyle: 'full' }) : 'No date selected';\n }\n\n /**\n * This is an event handler to handle the error (if any) when the\n * cancel booking button is clicked on the cancel booking form.\n */\n @Listen('cancelBookedEventError')\n cancelBookedEventErrorHandler(event: CustomEvent<NylasSchedulerErrorResponse>) {\n this.nylasSchedulerError.emit({ ...this.getErrorObject(event.detail.error) });\n }\n\n /**\n * This is an event handler to handle the error (if any) when the\n * reschedule button is clicked on the booked event card.\n */\n @Listen('rescheduleBookedEventError')\n rescheduleBookedEventErrorHandler(event: CustomEvent<NylasSchedulerErrorResponse>) {\n this.nylasSchedulerError.emit({ ...this.getErrorObject(event.detail.error) });\n }\n\n /**\n * This method is used to retrieve the NylasScheduler instance\n * @returns The NylasScheduler instance\n */\n @Method()\n async getNylasSchedulerStore(): Promise<NylasSchedulerStoreType | undefined> {\n return this.baseProvider?.getStore('scheduler');\n }\n\n /**\n * This method is used to retrieve the NylasConnector instance\n * @returns The NylasConnector instance\n */\n @Method()\n async getNylasSchedulerConnector() {\n return this.nylasSchedulerConnector;\n }\n\n @Method()\n async getRef() {\n return this.host;\n }\n\n private getErrorObject(error: NylasSchedulerErrorResponse['error']): Notification {\n return {\n title: error?.title || genericError.title,\n category: error?.category || genericError.category,\n type: NotificationType.Error,\n description: error?.message || '',\n id: new Date().getTime().toString(),\n ttl: 'none',\n };\n }\n\n private checkIfSessionIdOrConfigIdExists(): boolean {\n if (!this.sessionId && !this.configurationId) {\n this.nylasSchedulerError.emit({\n title: 'No sessionId!',\n category: ErrorCategory.Component,\n type: NotificationType.Error,\n description: 'Session ID is required',\n id: new Date().getTime().toString(),\n ttl: 'none',\n });\n return false;\n }\n return true;\n }\n\n private isTimeslotValid(timeslot: Timeslot): boolean {\n const selectedDate = new Date(timeslot.start_time);\n if (selectedDate < new Date()) {\n this.nylasSchedulerError.emit({\n title: 'Invalid tiemslot!',\n category: ErrorCategory.Component,\n type: NotificationType.Error,\n description: 'The selected timeslot is invalid.',\n id: new Date().getTime().toString(),\n ttl: 'none',\n });\n return false;\n }\n return true;\n }\n\n render() {\n const showDefaultScheduler = this.mode === 'app';\n const nylasSchedulerStore = this.baseProvider?.getStore('scheduler');\n const eventInfo = nylasSchedulerStore?.get('eventInfo');\n const showBookingForm = nylasSchedulerStore?.get('showBookingForm');\n const cancelledEventInfo = nylasSchedulerStore?.get('cancelledEventInfo');\n const cancelBookingId = nylasSchedulerStore?.get('cancelBookingId') || this.cancelBookingId;\n const selectedTimeslot = nylasSchedulerStore?.get('selectedTimeslot') as Timeslot;\n const rescheduleBookingId = nylasSchedulerStore?.get('rescheduleBookingId') || this.rescheduleBookingId;\n const nylasBranding = nylasSchedulerStore?.get('nylasBranding') || this.nylasBranding;\n\n if (showDefaultScheduler && cancelBookingId && !cancelledEventInfo) {\n return (\n <Host>\n <SchedulerView nylasBranding={nylasBranding} isLoading={this.isLoading} showNotification={this.showNotification}>\n <div class=\"cancel-flow-page\" part=\"cancel-flow-page\">\n <nylas-cancel-booking-form cancelBookingId={cancelBookingId} exportparts=\"ncbf, ncbf__input-textfield, ncbf__button-cta, ncbf__button-outline, ncbf__input-label\" />\n </div>\n </SchedulerView>\n </Host>\n );\n }\n\n // Cancelled event card is shown when the event is cancelled\n if (showDefaultScheduler && cancelledEventInfo) {\n return (\n <Host>\n <SchedulerView nylasBranding={nylasBranding} isLoading={this.isLoading} showNotification={this.showNotification}>\n <div class=\"cancelled-event-page\" part=\"cancelled-event-page\">\n <nylas-cancelled-event-card\n cancelledEventInfo={cancelledEventInfo}\n exportparts=\"ncec, ncec__icon, ncec__title, ncec__description, ncec__button-outline, ncec__card\"\n />\n </div>\n </SchedulerView>\n </Host>\n );\n }\n // Booked event card is shown when the event is booked\n if (showDefaultScheduler && eventInfo) {\n return (\n <Host>\n <SchedulerView nylasBranding={nylasBranding} isLoading={this.isLoading} showNotification={this.showNotification}>\n <div class=\"booked-event-page\" part=\"booked-event-page\">\n <nylas-booked-event-card\n selectedTimeslot={selectedTimeslot}\n eventInfo={eventInfo}\n exportparts=\"nbec, nbec__title, nbec__card, nbec__description, nbec__button-outline, nbec__cancel-cta, nbec__reschedule-cta\"\n />\n </div>\n </SchedulerView>\n </Host>\n );\n }\n // Date and time picker is shown when the event is not booked and no additional data is shown\n if (showDefaultScheduler && (!eventInfo || !!rescheduleBookingId) && !showBookingForm) {\n const timeslotPickerCTALabel = this.host.querySelector('[slot=\"timeslot-picker-cta-label\"]');\n return (\n <Host>\n <SchedulerView nylasBranding={nylasBranding} isLoading={this.isLoading} showNotification={this.showNotification}>\n {rescheduleBookingId && <MessageBanner>Choose another time slot to reschedule your meeting</MessageBanner>}\n <div class=\"select-date-page\" part=\"select-date-page\">\n <div class=\"left-panel\">\n <nylas-date-picker exportparts=\"ndp, ndp__month-header, ndp__month-button, ndp__day, ndp__date, ndp__date--selected, ndp__date--current-day, ndp__date--current-month\"></nylas-date-picker>\n <div class=\"border\"></div>\n <nylas-locale-switch></nylas-locale-switch>\n </div>\n <div class=\"right-panel\">\n <h2>\n <calendar-icon></calendar-icon>\n <span id=\"selectedDate\">{this.selectedDateLabel}</span>\n </h2>\n <nylas-timeslot-picker exportparts=\"ntp, ntp__timeslot, ntp__timeslot--selected, ntp__button-primary\">\n {timeslotPickerCTALabel && (\n <span slot=\"timeslot-picker-cta-label\">\n <slot name=\"timeslot-picker-cta-label\"></slot>\n </span>\n )}\n </nylas-timeslot-picker>\n </div>\n </div>\n </SchedulerView>\n </Host>\n );\n }\n // Additional data is shown when the time is selected, event is not booked and additional data is shown\n if (showDefaultScheduler && !eventInfo && showBookingForm) {\n // Check if a \"custom-booking-form\" slot is provided\n const customTemplateSlot = this.host.querySelector('[slot=\"custom-booking-form\"]');\n\n return (\n <Host>\n <SchedulerView nylasBranding={nylasBranding} isLoading={this.isLoading} showNotification={this.showNotification}>\n {rescheduleBookingId && <MessageBanner>Choose another time slot to reschedule your meeting</MessageBanner>}\n <div class=\"additional-data-page\" part=\"additional-data-page\">\n <div class=\"left-panel\">\n <div class=\"wrapper\">\n <nylas-selected-event-card exportparts=\"nsec, nsec__card, nsec__icon, nsec__date, nsec__time\"></nylas-selected-event-card>\n </div>\n </div>\n <div class=\"right-panel\">\n <nylas-booking-form exportparts=\"nbf, nbf__input-label, nbf__input-textfield, nbf__button-ghost, nbf__button-primary, nbf__button-outline\">\n {customTemplateSlot && (\n <div slot=\"custom-booking-form\">\n <slot name=\"custom-booking-form\"></slot>\n </div>\n )}\n </nylas-booking-form>\n </div>\n </div>\n </SchedulerView>\n </Host>\n );\n }\n\n return (\n <Host>\n <slot />\n </Host>\n );\n }\n}\n"],"version":3}
@@ -47,7 +47,7 @@ const patchCloneNodeFix = (HTMLElementPrototype) => {
47
47
 
48
48
  patchBrowser().then(options => {
49
49
  globalScripts();
50
- return bootstrapLazy(JSON.parse("[[\"nylas-scheduler-editor\",[[1,\"nylas-scheduler-editor\",{\"configurationId\":[1,\"configuration-id\"],\"nylasApiRequest\":[16],\"nylasSessionsConfig\":[16],\"eventOverrides\":[16],\"defaultSchedulerConfigStoreState\":[16],\"mode\":[1],\"automaticComponentRegistration\":[32],\"store\":[64],\"schedulerConnector\":[64]},[[0,\"registerComponent\",\"registerComponentHandler\"],[0,\"unregisterComponent\",\"unregisterComponentHandler\"]],{\"configurationId\":[\"configurationIdChanged\"]}]]],[\"nylas-scheduling\",[[1,\"nylas-scheduling\",{\"mode\":[1],\"defaultSchedulerState\":[16],\"sessionId\":[1,\"session-id\"],\"schedulerApiUrl\":[1,\"scheduler-api-url\"],\"bookingInfo\":[16],\"rescheduleBookingId\":[1,\"reschedule-booking-id\"],\"cancelBookingId\":[1,\"cancel-booking-id\"],\"configId\":[1,\"config-id\"],\"nylasBranding\":[4,\"nylas-branding\"],\"eventOverrides\":[16],\"isLoading\":[4,\"is-loading\"],\"themeConfig\":[16],\"showNotification\":[4,\"show-notification\"],\"automaticComponentRegistration\":[32],\"selectedDateLabel\":[32],\"getNylasSchedulerStore\":[64],\"getNylasSchedulerConnector\":[64],\"getRef\":[64]},[[0,\"registerComponent\",\"registerComponentHandler\"],[0,\"unregisterComponent\",\"unregisterComponentHandler\"],[0,\"monthChanged\",\"monthChangedHandler\"],[0,\"detailsConfirmed\",\"bookButtonClickedHandler\"],[0,\"dateSelected\",\"dateSelectedHandler\"],[0,\"cancelBookedEventError\",\"cancelBookedEventErrorHandler\"],[0,\"rescheduleBookedEventError\",\"rescheduleBookedEventErrorHandler\"]],{\"bookingInfo\":[\"bookingInfoChanged\"]}]]],[\"nylas-view-thread\",[[1,\"nylas-view-thread\",{\"draft\":[16],\"thread\":[16],\"messages\":[16],\"attachments\":[16],\"state\":[32],\"internalMessages\":[32],\"showAllEmails\":[32],\"showComposer\":[32]},null,{\"thread\":[\"threadChanged\"],\"messages\":[\"updateInternalMessages\"]}]]],[\"nylas-list-folders\",[[1,\"nylas-list-folders\",{\"folders\":[16],\"selectedFolder\":[1,\"selected-folder\"],\"defaultFolders\":[32],\"otherFolders\":[32]},null,{\"folders\":[\"watchFolders\"]}]]],[\"nylas-additional-participants\",[[65,\"nylas-additional-participants\",{\"name\":[1],\"eventParticipants\":[16],\"participants\":[32],\"participantsValid\":[32]},null,{\"name\":[\"elementNameChangedHandler\"]}]]],[\"nylas-mailbox-pagination\",[[1,\"nylas-mailbox-pagination\",{\"state\":[1],\"hasNextPage\":[4,\"has-next-page\"],\"hasPreviousPage\":[4,\"has-previous-page\"],\"scrollTarget\":[1,\"scroll-target\"],\"mobileOnlyInfiniteScroll\":[4,\"mobile-only-infinite-scroll\"],\"mobileViewPortWidth\":[2,\"mobile-view-port-width\"],\"nextPage\":[64],\"previousPage\":[64]},[[9,\"scroll\",\"handlePageScroll\"]]]]],[\"nylas-threads-refresh\",[[1,\"nylas-threads-refresh\",{\"start\":[32],\"state\":[32],\"pulling\":[32],\"updateState\":[64]}]]],[\"document-refresh-icon\",[[2,\"document-refresh-icon\",{\"width\":[1],\"height\":[1]}]]],[\"nylas-if-state\",[[1,\"nylas-if-state\",{\"state\":[1],\"isStateSet\":[4,\"is-state-set\"],\"isBoolean\":[4,\"is-boolean\"],\"getStore\":[16],\"transition\":[1],\"show\":[32],\"classes\":[32]},null,{\"getStore\":[\"onGetStoreChange\"]}]]],[\"nylas-list-threads\",[[1,\"nylas-list-threads\",{\"threads\":[16],\"isAuthenticated\":[4,\"is-authenticated\"],\"tokenInfo\":[16],\"state\":[1],\"showCheckbox\":[4,\"show-checkbox\"]}]]],[\"nylas-login\",[[1,\"nylas-login\",{\"isAuthenticated\":[4,\"is-authenticated\"],\"nylasConnector\":[16],\"scopes\":[16],\"loginMethod\":[1,\"login-method\"],\"companyName\":[1,\"company-name\"],\"logoUrl\":[1,\"logo-url\"],\"logoWidth\":[1,\"logo-width\"],\"providers\":[1],\"buttonText\":[1,\"button-text\"],\"email\":[32]}]]],[\"nylas-mailbox\",[[1,\"nylas-mailbox\",{\"automaticComponentRegistration\":[4,\"automatic-component-registration\"],\"eventOverrides\":[16],\"authConfig\":[16],\"defaultAuthStoreState\":[16],\"defaultMailboxStoreState\":[16],\"getMailboxStore\":[64],\"getAuthStore\":[64],\"getNylasAuth\":[64],\"getNylasMailboxConnector\":[64]},[[0,\"registerComponent\",\"registerComponentHandler\"],[0,\"unregisterComponent\",\"unregisterComponentHandler\"]]]]],[\"nylas-mailbox-toolbar-button\",[[1,\"nylas-mailbox-toolbar-button\",{\"method\":[1],\"dataState\":[1,\"data-state\"],\"iconOnly\":[4,\"icon-only\"],\"mailboxConnector\":[16]}]]],[\"nylas-provider\",[[1,\"nylas-provider\",{\"authConfig\":[16],\"eventOverrides\":[16],\"automaticComponentRegistration\":[4,\"automatic-component-registration\"],\"getNylasAuth\":[64],\"getNylasConnector\":[64],\"getMailboxStore\":[64],\"getAuthStore\":[64],\"getNylasSchedulerStore\":[64],\"getNylasSchedulerConfigStore\":[64]},[[0,\"registerComponent\",\"registerComponentHandler\"],[0,\"unregisterComponent\",\"unregisterComponentHandler\"]]]]],[\"nylas-threads-search\",[[1,\"nylas-threads-search\",{\"query\":[1],\"internalQuery\":[32]},null,{\"query\":[\"onQueryChange\"]}]]],[\"people-icon\",[[2,\"people-icon\",{\"width\":[1],\"height\":[1]}]]],[\"nylas-editor-tabs\",[[2,\"nylas-editor-tabs\",{\"calendars\":[16],\"config\":[16],\"currentUser\":[16],\"action\":[32],\"activeTab\":[32],\"isLoading\":[32],\"hasUnsavedChanges\":[32],\"changesSaved\":[32],\"formState\":[32]},[[0,\"valueChanged\",\"handleValueChanged\"]],{\"config\":[\"configChangedHandler\"]}]]],[\"nylas-locale-switch\",[[1,\"nylas-locale-switch\",{\"selectedTimezone\":[1025,\"selected-timezone\"],\"selectedLanguage\":[1025,\"selected-language\"]},[[0,\"selectedOptionChanged\",\"selectedOptionChangedHandler\"]]]]],[\"nylas-booked-event-card\",[[1,\"nylas-booked-event-card\",{\"eventInfo\":[16],\"rescheduleBookingId\":[1,\"reschedule-booking-id\"],\"bookingInfo\":[8,\"booking-info\"],\"selectedTimezone\":[1,\"selected-timezone\"],\"selectedTimeslot\":[16]}]]],[\"nylas-composer\",[[1,\"nylas-composer\",{\"message\":[16],\"viewEmailElement\":[16]},null,{\"message\":[\"watchBody\"]}]]],[\"nylas-summarize-message-button\",[[1,\"nylas-summarize-message-button\",{\"message\":[16],\"state\":[32],\"updateState\":[64],\"playAudio\":[64]}]]],[\"nylas-notification\",[[1,\"nylas-notification\",{\"ttl\":[8],\"allowedCategories\":[16],\"notifications\":[32]},[[16,\"nylasSchedulerError\",\"onError\"],[16,\"nylasSchedulerWarning\",\"onWarning\"],[16,\"nylasSchedulerInfo\",\"onInfo\"],[16,\"nylasSchedulerSuccess\",\"onSuccess\"]]]]],[\"nylas-selected-event-card\",[[1,\"nylas-selected-event-card\",{\"selectedDate\":[16],\"selectedTimeslot\":[16],\"selectedTimezone\":[1,\"selected-timezone\"],\"startTime\":[32],\"endTime\":[32]},null,{\"selectedTimeslot\":[\"handleSelectedTimeslotChange\"]}]]],[\"nylas-booking-form\",[[1,\"nylas-booking-form\",{\"isLoading\":[4,\"is-loading\"],\"bookingInfo\":[8,\"booking-info\"],\"eventInfo\":[16],\"name\":[32],\"email\":[32],\"guestEmails\":[32],\"guestEmailErrors\":[32],\"isNameValid\":[32],\"isEmailValid\":[32],\"validationError\":[32]},null,{\"bookingInfo\":[\"bookingInfoChangedHandler\"]}]]],[\"nylas-cancel-booking-form\",[[1,\"nylas-cancel-booking-form\",{\"cancelBookingId\":[1,\"cancel-booking-id\"],\"cancellationReason\":[32],\"cancellationError\":[32]}]]],[\"nylas-cancelled-event-card\",[[1,\"nylas-cancelled-event-card\",{\"cancelledEventInfo\":[16]}]]],[\"nylas-date-picker\",[[1,\"nylas-date-picker\",{\"selectableDates\":[16],\"selectedDate\":[16],\"isLoading\":[4,\"is-loading\"],\"month\":[32],\"dates\":[32]}]]],[\"archive-icon\",[[2,\"archive-icon\",{\"width\":[1],\"height\":[1]}]]],[\"arrow-icon\",[[2,\"arrow-icon\",{\"width\":[1],\"height\":[1]}]]],[\"folder-icon\",[[2,\"folder-icon\",{\"width\":[1],\"height\":[1]}]]],[\"forward-icon\",[[2,\"forward-icon\",{\"width\":[1],\"height\":[1]}]]],[\"google-logo-icon\",[[2,\"google-logo-icon\",{\"width\":[1],\"height\":[1]}]]],[\"inbox-icon\",[[2,\"inbox-icon\",{\"width\":[1],\"height\":[1]}]]],[\"microsoft-logo-icon\",[[2,\"microsoft-logo-icon\",{\"width\":[1],\"height\":[1]}]]],[\"nylas-logo\",[[2,\"nylas-logo\",{\"width\":[1],\"height\":[1]}]]],[\"nylas-timeslot-picker\",[[1,\"nylas-timeslot-picker\",{\"selectedDate\":[16],\"availability\":[16],\"selectedTimeslot\":[16],\"isLoading\":[4,\"loading-state\"],\"selectedTimezone\":[1,\"selected-timezone\"],\"times\":[32],\"hoveredTimeslotIndex\":[32],\"selectedTimeslotIndex\":[32]},null,{\"selectedDate\":[\"selectedDateChanged\"],\"availability\":[\"availabilityChanged\"]}]]],[\"nylas-view-email\",[[1,\"nylas-view-email\",{\"message\":[16],\"parent\":[16],\"attachments\":[16],\"detectDarkMode\":[4,\"detect-dark-mode\"],\"state\":[32],\"sanitizedBody\":[32],\"styles\":[32],\"viewEmailElement\":[32],\"hoistedFontURLs\":[32]},[[9,\"resize\",\"handleScroll\"]],{\"message\":[\"messageChanged\"],\"viewEmailElement\":[\"viewEmailElementChanged\"]}]]],[\"reply-all-icon\",[[2,\"reply-all-icon\",{\"width\":[1],\"height\":[1]}]]],[\"reply-icon\",[[2,\"reply-icon\",{\"width\":[1],\"height\":[1]}]]],[\"sent-icon\",[[2,\"sent-icon\",{\"width\":[1],\"height\":[1]}]]],[\"spam-icon\",[[2,\"spam-icon\",{\"width\":[1],\"height\":[1]}]]],[\"star-icon\",[[2,\"star-icon\",{\"width\":[1],\"height\":[1]}]]],[\"trash-icon\",[[2,\"trash-icon\",{\"width\":[1],\"height\":[1]}]]],[\"nylas-availability-picker\",[[65,\"nylas-availability-picker\",{\"openHours\":[16],\"name\":[1],\"defaultTimezone\":[1,\"default-timezone\"],\"schedule\":[32],\"timezone\":[32],\"overlapDays\":[32]},[[0,\"selectedOptionChanged\",\"selectedOptionChangedHandler\"]],{\"name\":[\"elementNameChangedHandler\"],\"schedule\":[\"scheduleChanged\"]}]]],[\"nylas-location-component\",[[65,\"nylas-location-component\",{\"eventLocation\":[1,\"event-location\"],\"name\":[1],\"location\":[32],\"selectedLocationOption\":[32]},[[0,\"selectedOptionChanged\",\"selectedOptionChangedHandler\"]],{\"name\":[\"elementNameChangedHandler\"],\"eventLocation\":[\"eventLocationChangedHandler\"]}]]],[\"nylas-limit-future-bookings\",[[65,\"nylas-limit-future-bookings\",{\"availableDaysInFuture\":[2,\"available-days-in-future\"],\"name\":[1],\"selectedNumber\":[32],\"selectedPeriod\":[32]},[[0,\"timePeriodChanged\",\"timePeriodChangedHandler\"]],{\"name\":[\"elementNameChangedHandler\"],\"availableDaysInFuture\":[\"availableDaysInFutureChanged\"]}]]],[\"nylas-min-cancellation-notice\",[[65,\"nylas-min-cancellation-notice\",{\"minCancellationNotice\":[2,\"min-cancellation-notice\"],\"name\":[1],\"selectedNumber\":[32],\"selectedPeriod\":[32]},[[0,\"timePeriodChanged\",\"timePeriodChangedHandler\"]],{\"name\":[\"elementNameChangedHandler\"],\"availableDaysInFuture\":[\"availableDaysInFutureChanged\"]}]]],[\"nylas-booking-calendar-picker\",[[65,\"nylas-booking-calendar-picker\",{\"calendars\":[16],\"name\":[1],\"defaultBookingCalendar\":[1,\"default-booking-calendar\"],\"selectedCalendar\":[32]},[[0,\"selectedOptionChanged\",\"selectedOptionChangedHandler\"]],{\"name\":[\"elementNameChangedHandler\"]}]]],[\"nylas-calendar-picker\",[[65,\"nylas-calendar-picker\",{\"calendars\":[16],\"organizerEmail\":[1,\"organizer-email\"],\"name\":[1],\"defaultSelectedCalendars\":[16],\"selectedCalendars\":[32]},[[0,\"selectedOptionsChanged\",\"selectedOptionsChangedHandler\"]],{\"name\":[\"elementNameChangedHandler\"]}]]],[\"nylas-custom-booking-flow\",[[65,\"nylas-custom-booking-flow\",{\"name\":[1],\"bookingType\":[1,\"booking-type\"],\"selectedBookingType\":[32]},[[0,\"selectedOptionChanged\",\"selectedOptionChangedHandler\"]],{\"name\":[\"elementNameChangedHandler\"]}]]],[\"nylas-event-duration\",[[65,\"nylas-event-duration\",{\"name\":[1],\"eventDurationMinutes\":[2,\"event-duration-minutes\"],\"duration\":[32],\"durationMinutes\":[32],\"durationIncrement\":[32]},[[0,\"selectedOptionChanged\",\"selectedOptionChangedHandler\"]],{\"name\":[\"elementNameChangedHandler\"],\"durationMinutes\":[\"durationMinutesChangedHandler\"]}]]],[\"nylas-buffer-time\",[[65,\"nylas-buffer-time\",{\"name\":[1],\"buffer\":[16],\"selectedBeforeBufferTime\":[32],\"selectedAfterBufferTime\":[32]},[[0,\"selectedOptionChanged\",\"selectedOptionChangedHandler\"]],{\"name\":[\"elementNameChangedHandler\"]}]]],[\"nylas-event-description\",[[65,\"nylas-event-description\",{\"eventDescription\":[1,\"event-description\"],\"name\":[1],\"description\":[32]},null,{\"name\":[\"elementNameChangedHandler\"]}]]],[\"nylas-event-title\",[[65,\"nylas-event-title\",{\"eventTitle\":[1,\"event-title\"],\"name\":[1],\"showTokens\":[32],\"availableTokens\":[32],\"filteredTokens\":[32],\"ariaActivedescendant\":[32],\"currentWord\":[32]},null,{\"name\":[\"elementNameChangedHandler\"],\"ariaActivedescendant\":[\"ariaActivedescendantChangedHandler\"]}]]],[\"nylas-event-info\",[[65,\"nylas-event-info\"]]],[\"nylas-event-limits\",[[65,\"nylas-event-limits\"]]],[\"bold-icon\",[[2,\"bold-icon\",{\"width\":[1],\"height\":[1]}]]],[\"button-component\",[[6,\"button-component\",{\"variant\":[1],\"disabled\":[4],\"type\":[1],\"clickHandler\":[16],\"mouseOverHandler\":[16],\"mouseOutHandler\":[16],\"focusHandler\":[16],\"blurHandler\":[16]}]]],[\"calendar-check-icon\",[[2,\"calendar-check-icon\",{\"width\":[1],\"height\":[1]}]]],[\"calendar-info-icon\",[[2,\"calendar-info-icon\",{\"width\":[1],\"height\":[1]}]]],[\"calendar-patterns-icon\",[[2,\"calendar-patterns-icon\",{\"width\":[1],\"height\":[1]}]]],[\"checkmark-circle-icon\",[[2,\"checkmark-circle-icon\",{\"width\":[1],\"height\":[1]}]]],[\"flow-icon\",[[2,\"flow-icon\",{\"width\":[1],\"height\":[1]}]]],[\"italic-icon\",[[2,\"italic-icon\",{\"width\":[1],\"height\":[1]}]]],[\"play-icon\",[[2,\"play-icon\",{\"width\":[1],\"height\":[1]}]]],[\"refresh-icon\",[[2,\"refresh-icon\",{\"width\":[1],\"height\":[1]}]]],[\"stop-icon\",[[2,\"stop-icon\",{\"width\":[1],\"height\":[1]}]]],[\"translate-icon\",[[2,\"translate-icon\",{\"width\":[1],\"height\":[1]}]]],[\"underline-icon\",[[2,\"underline-icon\",{\"width\":[1],\"height\":[1]}]]],[\"warning-icon\",[[2,\"warning-icon\",{\"width\":[1],\"height\":[1]}]]],[\"multi-select-dropdown\",[[1,\"multi-select-dropdown\",{\"name\":[1],\"label\":[1],\"options\":[16],\"availableOptions\":[32],\"isOpen\":[32],\"ariaActivedescendant\":[32],\"shouldFocusFirstOption\":[32]},[[6,\"click\",\"handleOutsideClick\"]]]]],[\"add-circle-icon\",[[2,\"add-circle-icon\",{\"width\":[1],\"height\":[1]}]]],[\"calendar-cancel-icon\",[[2,\"calendar-cancel-icon\",{\"width\":[1],\"height\":[1]}]]],[\"calendar-icon\",[[2,\"calendar-icon\",{\"width\":[1],\"height\":[1]}]]],[\"location-icon\",[[2,\"location-icon\",{\"width\":[1],\"height\":[1]}]]],[\"location-off-icon\",[[2,\"location-off-icon\",{\"width\":[1],\"height\":[1]}]]],[\"nylas-time-window-picker\",[[1,\"nylas-time-window-picker\",{\"time\":[1],\"minimumStartTime\":[1,\"minimum-start-time\"],\"placeholder\":[1],\"setTime\":[16],\"name\":[1],\"hasError\":[4,\"has-error\"],\"setFormError\":[16],\"err\":[32],\"showTimes\":[32],\"ariaActivedescendant\":[32],\"times\":[32],\"shouldAutoScroll\":[32]},[[4,\"click\",\"handleOutsideClick\"]],{\"minimumStartTime\":[\"minimumStartTimeChangedHandler\"]}]]],[\"time-period-selector\",[[2,\"time-period-selector\",{\"timePeriods\":[16],\"defaultSelectedPeriod\":[1,\"default-selected-period\"],\"defaultSelectedNumber\":[2,\"default-selected-number\"],\"selectedPeriod\":[32],\"selectedNumber\":[32],\"numberOptions\":[32],\"timePeriodOptions\":[32]},[[0,\"selectedOptionChanged\",\"selectedOptionChangedHandler\"]],{\"defaultSelectedPeriod\":[\"defaultSelectedPeriodChangedHandler\"],\"defaultSelectedNumber\":[\"defaultSelectedNumberChangedHandler\"],\"timePeriods\":[\"timePeriodsChangedHandler\"]}]]],[\"nylas-form-card\",[[65,\"nylas-form-card\"]]],[\"loading-icon\",[[1,\"loading-icon\",{\"width\":[1],\"height\":[1]}]]],[\"globe-icon\",[[2,\"globe-icon\",{\"width\":[1],\"height\":[1]}]]],[\"close-icon\",[[2,\"close-icon\",{\"width\":[1],\"height\":[1]}]]],[\"info-icon\",[[2,\"info-icon\",{\"width\":[1],\"height\":[1]}]]],[\"tooltip-component\",[[1,\"tooltip-component\",{\"position\":[1]}]]],[\"search-icon\",[[2,\"search-icon\",{\"width\":[1],\"height\":[1]}]]],[\"chevron-icon\",[[2,\"chevron-icon\",{\"width\":[1],\"height\":[1]}]]],[\"select-dropdown\",[[1,\"select-dropdown\",{\"name\":[1],\"options\":[16],\"defaultSelectedOption\":[16],\"withSearch\":[4,\"with-search\"],\"pluralizedLabel\":[1,\"pluralized-label\"],\"selectedOption\":[32],\"isOpen\":[32],\"searchValue\":[32],\"filteredOptions\":[32],\"ariaActivedescendant\":[32]},[[6,\"click\",\"handleOutsideClick\"]],{\"options\":[\"optionsChangedHandler\"],\"defaultSelectedOption\":[\"defaultSelectedOptionChangedHandler\"]}]]]]"), options);
50
+ return bootstrapLazy(JSON.parse("[[\"nylas-scheduler-editor\",[[1,\"nylas-scheduler-editor\",{\"configurationId\":[1,\"configuration-id\"],\"nylasApiRequest\":[16],\"nylasSessionsConfig\":[16],\"eventOverrides\":[16],\"defaultSchedulerConfigStoreState\":[16],\"mode\":[1],\"automaticComponentRegistration\":[32],\"store\":[64],\"schedulerConnector\":[64]},[[0,\"registerComponent\",\"registerComponentHandler\"],[0,\"unregisterComponent\",\"unregisterComponentHandler\"]],{\"configurationId\":[\"configurationIdChanged\"]}]]],[\"nylas-scheduling\",[[1,\"nylas-scheduling\",{\"mode\":[1],\"defaultSchedulerState\":[16],\"sessionId\":[1,\"session-id\"],\"schedulerApiUrl\":[1,\"scheduler-api-url\"],\"bookingInfo\":[16],\"rescheduleBookingId\":[1,\"reschedule-booking-id\"],\"cancelBookingId\":[1,\"cancel-booking-id\"],\"configurationId\":[1,\"configuration-id\"],\"nylasBranding\":[4,\"nylas-branding\"],\"eventOverrides\":[16],\"isLoading\":[4,\"is-loading\"],\"themeConfig\":[16],\"showNotification\":[4,\"show-notification\"],\"automaticComponentRegistration\":[32],\"selectedDateLabel\":[32],\"getNylasSchedulerStore\":[64],\"getNylasSchedulerConnector\":[64],\"getRef\":[64]},[[0,\"registerComponent\",\"registerComponentHandler\"],[0,\"unregisterComponent\",\"unregisterComponentHandler\"],[0,\"monthChanged\",\"monthChangedHandler\"],[0,\"detailsConfirmed\",\"bookButtonClickedHandler\"],[0,\"dateSelected\",\"dateSelectedHandler\"],[0,\"cancelBookedEventError\",\"cancelBookedEventErrorHandler\"],[0,\"rescheduleBookedEventError\",\"rescheduleBookedEventErrorHandler\"]],{\"bookingInfo\":[\"bookingInfoChanged\"]}]]],[\"nylas-view-thread\",[[1,\"nylas-view-thread\",{\"draft\":[16],\"thread\":[16],\"messages\":[16],\"attachments\":[16],\"state\":[32],\"internalMessages\":[32],\"showAllEmails\":[32],\"showComposer\":[32]},null,{\"thread\":[\"threadChanged\"],\"messages\":[\"updateInternalMessages\"]}]]],[\"nylas-list-folders\",[[1,\"nylas-list-folders\",{\"folders\":[16],\"selectedFolder\":[1,\"selected-folder\"],\"defaultFolders\":[32],\"otherFolders\":[32]},null,{\"folders\":[\"watchFolders\"]}]]],[\"nylas-additional-participants\",[[65,\"nylas-additional-participants\",{\"name\":[1],\"eventParticipants\":[16],\"participants\":[32],\"participantsValid\":[32]},null,{\"name\":[\"elementNameChangedHandler\"]}]]],[\"nylas-mailbox-pagination\",[[1,\"nylas-mailbox-pagination\",{\"state\":[1],\"hasNextPage\":[4,\"has-next-page\"],\"hasPreviousPage\":[4,\"has-previous-page\"],\"scrollTarget\":[1,\"scroll-target\"],\"mobileOnlyInfiniteScroll\":[4,\"mobile-only-infinite-scroll\"],\"mobileViewPortWidth\":[2,\"mobile-view-port-width\"],\"nextPage\":[64],\"previousPage\":[64]},[[9,\"scroll\",\"handlePageScroll\"]]]]],[\"nylas-threads-refresh\",[[1,\"nylas-threads-refresh\",{\"start\":[32],\"state\":[32],\"pulling\":[32],\"updateState\":[64]}]]],[\"document-refresh-icon\",[[2,\"document-refresh-icon\",{\"width\":[1],\"height\":[1]}]]],[\"nylas-if-state\",[[1,\"nylas-if-state\",{\"state\":[1],\"isStateSet\":[4,\"is-state-set\"],\"isBoolean\":[4,\"is-boolean\"],\"getStore\":[16],\"transition\":[1],\"show\":[32],\"classes\":[32]},null,{\"getStore\":[\"onGetStoreChange\"]}]]],[\"nylas-list-threads\",[[1,\"nylas-list-threads\",{\"threads\":[16],\"isAuthenticated\":[4,\"is-authenticated\"],\"tokenInfo\":[16],\"state\":[1],\"showCheckbox\":[4,\"show-checkbox\"]}]]],[\"nylas-login\",[[1,\"nylas-login\",{\"isAuthenticated\":[4,\"is-authenticated\"],\"nylasConnector\":[16],\"scopes\":[16],\"loginMethod\":[1,\"login-method\"],\"companyName\":[1,\"company-name\"],\"logoUrl\":[1,\"logo-url\"],\"logoWidth\":[1,\"logo-width\"],\"providers\":[1],\"buttonText\":[1,\"button-text\"],\"email\":[32]}]]],[\"nylas-mailbox\",[[1,\"nylas-mailbox\",{\"automaticComponentRegistration\":[4,\"automatic-component-registration\"],\"eventOverrides\":[16],\"authConfig\":[16],\"defaultAuthStoreState\":[16],\"defaultMailboxStoreState\":[16],\"getMailboxStore\":[64],\"getAuthStore\":[64],\"getNylasAuth\":[64],\"getNylasMailboxConnector\":[64]},[[0,\"registerComponent\",\"registerComponentHandler\"],[0,\"unregisterComponent\",\"unregisterComponentHandler\"]]]]],[\"nylas-mailbox-toolbar-button\",[[1,\"nylas-mailbox-toolbar-button\",{\"method\":[1],\"dataState\":[1,\"data-state\"],\"iconOnly\":[4,\"icon-only\"],\"mailboxConnector\":[16]}]]],[\"nylas-provider\",[[1,\"nylas-provider\",{\"authConfig\":[16],\"eventOverrides\":[16],\"automaticComponentRegistration\":[4,\"automatic-component-registration\"],\"getNylasAuth\":[64],\"getNylasConnector\":[64],\"getMailboxStore\":[64],\"getAuthStore\":[64],\"getNylasSchedulerStore\":[64],\"getNylasSchedulerConfigStore\":[64]},[[0,\"registerComponent\",\"registerComponentHandler\"],[0,\"unregisterComponent\",\"unregisterComponentHandler\"]]]]],[\"nylas-threads-search\",[[1,\"nylas-threads-search\",{\"query\":[1],\"internalQuery\":[32]},null,{\"query\":[\"onQueryChange\"]}]]],[\"people-icon\",[[2,\"people-icon\",{\"width\":[1],\"height\":[1]}]]],[\"nylas-editor-tabs\",[[2,\"nylas-editor-tabs\",{\"calendars\":[16],\"config\":[16],\"currentUser\":[16],\"action\":[32],\"activeTab\":[32],\"isLoading\":[32],\"hasUnsavedChanges\":[32],\"changesSaved\":[32],\"formState\":[32]},[[0,\"valueChanged\",\"handleValueChanged\"]],{\"config\":[\"configChangedHandler\"]}]]],[\"nylas-locale-switch\",[[1,\"nylas-locale-switch\",{\"selectedTimezone\":[1025,\"selected-timezone\"],\"selectedLanguage\":[1025,\"selected-language\"]},[[0,\"selectedOptionChanged\",\"selectedOptionChangedHandler\"]]]]],[\"nylas-booked-event-card\",[[1,\"nylas-booked-event-card\",{\"eventInfo\":[16],\"rescheduleBookingId\":[1,\"reschedule-booking-id\"],\"bookingInfo\":[8,\"booking-info\"],\"selectedTimezone\":[1,\"selected-timezone\"],\"selectedTimeslot\":[16]}]]],[\"nylas-composer\",[[1,\"nylas-composer\",{\"message\":[16],\"viewEmailElement\":[16]},null,{\"message\":[\"watchBody\"]}]]],[\"nylas-summarize-message-button\",[[1,\"nylas-summarize-message-button\",{\"message\":[16],\"state\":[32],\"updateState\":[64],\"playAudio\":[64]}]]],[\"nylas-notification\",[[1,\"nylas-notification\",{\"ttl\":[8],\"allowedCategories\":[16],\"notifications\":[32]},[[16,\"nylasSchedulerError\",\"onError\"],[16,\"nylasSchedulerWarning\",\"onWarning\"],[16,\"nylasSchedulerInfo\",\"onInfo\"],[16,\"nylasSchedulerSuccess\",\"onSuccess\"]]]]],[\"nylas-selected-event-card\",[[1,\"nylas-selected-event-card\",{\"selectedDate\":[16],\"selectedTimeslot\":[16],\"selectedTimezone\":[1,\"selected-timezone\"],\"startTime\":[32],\"endTime\":[32]},null,{\"selectedTimeslot\":[\"handleSelectedTimeslotChange\"]}]]],[\"nylas-booking-form\",[[1,\"nylas-booking-form\",{\"isLoading\":[4,\"is-loading\"],\"bookingInfo\":[8,\"booking-info\"],\"eventInfo\":[16],\"name\":[32],\"email\":[32],\"guestEmails\":[32],\"guestEmailErrors\":[32],\"isNameValid\":[32],\"isEmailValid\":[32],\"validationError\":[32]},null,{\"bookingInfo\":[\"bookingInfoChangedHandler\"]}]]],[\"nylas-cancel-booking-form\",[[1,\"nylas-cancel-booking-form\",{\"cancelBookingId\":[1,\"cancel-booking-id\"],\"cancellationReason\":[32],\"cancellationError\":[32]}]]],[\"nylas-cancelled-event-card\",[[1,\"nylas-cancelled-event-card\",{\"cancelledEventInfo\":[16]}]]],[\"nylas-date-picker\",[[1,\"nylas-date-picker\",{\"selectableDates\":[16],\"selectedDate\":[16],\"isLoading\":[4,\"is-loading\"],\"month\":[32],\"dates\":[32]}]]],[\"archive-icon\",[[2,\"archive-icon\",{\"width\":[1],\"height\":[1]}]]],[\"arrow-icon\",[[2,\"arrow-icon\",{\"width\":[1],\"height\":[1]}]]],[\"folder-icon\",[[2,\"folder-icon\",{\"width\":[1],\"height\":[1]}]]],[\"forward-icon\",[[2,\"forward-icon\",{\"width\":[1],\"height\":[1]}]]],[\"google-logo-icon\",[[2,\"google-logo-icon\",{\"width\":[1],\"height\":[1]}]]],[\"inbox-icon\",[[2,\"inbox-icon\",{\"width\":[1],\"height\":[1]}]]],[\"microsoft-logo-icon\",[[2,\"microsoft-logo-icon\",{\"width\":[1],\"height\":[1]}]]],[\"nylas-logo\",[[2,\"nylas-logo\",{\"width\":[1],\"height\":[1]}]]],[\"nylas-timeslot-picker\",[[1,\"nylas-timeslot-picker\",{\"selectedDate\":[16],\"availability\":[16],\"selectedTimeslot\":[16],\"isLoading\":[4,\"loading-state\"],\"selectedTimezone\":[1,\"selected-timezone\"],\"times\":[32],\"hoveredTimeslotIndex\":[32],\"selectedTimeslotIndex\":[32]},null,{\"selectedDate\":[\"selectedDateChanged\"],\"availability\":[\"availabilityChanged\"]}]]],[\"nylas-view-email\",[[1,\"nylas-view-email\",{\"message\":[16],\"parent\":[16],\"attachments\":[16],\"detectDarkMode\":[4,\"detect-dark-mode\"],\"state\":[32],\"sanitizedBody\":[32],\"styles\":[32],\"viewEmailElement\":[32],\"hoistedFontURLs\":[32]},[[9,\"resize\",\"handleScroll\"]],{\"message\":[\"messageChanged\"],\"viewEmailElement\":[\"viewEmailElementChanged\"]}]]],[\"reply-all-icon\",[[2,\"reply-all-icon\",{\"width\":[1],\"height\":[1]}]]],[\"reply-icon\",[[2,\"reply-icon\",{\"width\":[1],\"height\":[1]}]]],[\"sent-icon\",[[2,\"sent-icon\",{\"width\":[1],\"height\":[1]}]]],[\"spam-icon\",[[2,\"spam-icon\",{\"width\":[1],\"height\":[1]}]]],[\"star-icon\",[[2,\"star-icon\",{\"width\":[1],\"height\":[1]}]]],[\"trash-icon\",[[2,\"trash-icon\",{\"width\":[1],\"height\":[1]}]]],[\"nylas-availability-picker\",[[65,\"nylas-availability-picker\",{\"openHours\":[16],\"name\":[1],\"defaultTimezone\":[1,\"default-timezone\"],\"schedule\":[32],\"timezone\":[32],\"overlapDays\":[32]},[[0,\"selectedOptionChanged\",\"selectedOptionChangedHandler\"]],{\"name\":[\"elementNameChangedHandler\"],\"schedule\":[\"scheduleChanged\"]}]]],[\"nylas-location-component\",[[65,\"nylas-location-component\",{\"eventLocation\":[1,\"event-location\"],\"name\":[1],\"location\":[32],\"selectedLocationOption\":[32]},[[0,\"selectedOptionChanged\",\"selectedOptionChangedHandler\"]],{\"name\":[\"elementNameChangedHandler\"],\"eventLocation\":[\"eventLocationChangedHandler\"]}]]],[\"nylas-limit-future-bookings\",[[65,\"nylas-limit-future-bookings\",{\"availableDaysInFuture\":[2,\"available-days-in-future\"],\"name\":[1],\"selectedNumber\":[32],\"selectedPeriod\":[32]},[[0,\"timePeriodChanged\",\"timePeriodChangedHandler\"]],{\"name\":[\"elementNameChangedHandler\"],\"availableDaysInFuture\":[\"availableDaysInFutureChanged\"]}]]],[\"nylas-min-cancellation-notice\",[[65,\"nylas-min-cancellation-notice\",{\"minCancellationNotice\":[2,\"min-cancellation-notice\"],\"name\":[1],\"selectedNumber\":[32],\"selectedPeriod\":[32]},[[0,\"timePeriodChanged\",\"timePeriodChangedHandler\"]],{\"name\":[\"elementNameChangedHandler\"],\"availableDaysInFuture\":[\"availableDaysInFutureChanged\"]}]]],[\"nylas-booking-calendar-picker\",[[65,\"nylas-booking-calendar-picker\",{\"calendars\":[16],\"name\":[1],\"defaultBookingCalendar\":[1,\"default-booking-calendar\"],\"selectedCalendar\":[32]},[[0,\"selectedOptionChanged\",\"selectedOptionChangedHandler\"]],{\"name\":[\"elementNameChangedHandler\"]}]]],[\"nylas-calendar-picker\",[[65,\"nylas-calendar-picker\",{\"calendars\":[16],\"organizerEmail\":[1,\"organizer-email\"],\"name\":[1],\"defaultSelectedCalendars\":[16],\"selectedCalendars\":[32]},[[0,\"selectedOptionsChanged\",\"selectedOptionsChangedHandler\"]],{\"name\":[\"elementNameChangedHandler\"]}]]],[\"nylas-custom-booking-flow\",[[65,\"nylas-custom-booking-flow\",{\"name\":[1],\"bookingType\":[1,\"booking-type\"],\"selectedBookingType\":[32]},[[0,\"selectedOptionChanged\",\"selectedOptionChangedHandler\"]],{\"name\":[\"elementNameChangedHandler\"]}]]],[\"nylas-event-duration\",[[65,\"nylas-event-duration\",{\"name\":[1],\"eventDurationMinutes\":[2,\"event-duration-minutes\"],\"duration\":[32],\"durationMinutes\":[32],\"durationIncrement\":[32]},[[0,\"selectedOptionChanged\",\"selectedOptionChangedHandler\"]],{\"name\":[\"elementNameChangedHandler\"],\"durationMinutes\":[\"durationMinutesChangedHandler\"]}]]],[\"nylas-buffer-time\",[[65,\"nylas-buffer-time\",{\"name\":[1],\"buffer\":[16],\"selectedBeforeBufferTime\":[32],\"selectedAfterBufferTime\":[32]},[[0,\"selectedOptionChanged\",\"selectedOptionChangedHandler\"]],{\"name\":[\"elementNameChangedHandler\"]}]]],[\"nylas-event-description\",[[65,\"nylas-event-description\",{\"eventDescription\":[1,\"event-description\"],\"name\":[1],\"description\":[32]},null,{\"name\":[\"elementNameChangedHandler\"]}]]],[\"nylas-event-title\",[[65,\"nylas-event-title\",{\"eventTitle\":[1,\"event-title\"],\"name\":[1],\"showTokens\":[32],\"availableTokens\":[32],\"filteredTokens\":[32],\"ariaActivedescendant\":[32],\"currentWord\":[32]},null,{\"name\":[\"elementNameChangedHandler\"],\"ariaActivedescendant\":[\"ariaActivedescendantChangedHandler\"]}]]],[\"nylas-event-info\",[[65,\"nylas-event-info\"]]],[\"nylas-event-limits\",[[65,\"nylas-event-limits\"]]],[\"bold-icon\",[[2,\"bold-icon\",{\"width\":[1],\"height\":[1]}]]],[\"button-component\",[[6,\"button-component\",{\"variant\":[1],\"disabled\":[4],\"type\":[1],\"clickHandler\":[16],\"mouseOverHandler\":[16],\"mouseOutHandler\":[16],\"focusHandler\":[16],\"blurHandler\":[16]}]]],[\"calendar-check-icon\",[[2,\"calendar-check-icon\",{\"width\":[1],\"height\":[1]}]]],[\"calendar-info-icon\",[[2,\"calendar-info-icon\",{\"width\":[1],\"height\":[1]}]]],[\"calendar-patterns-icon\",[[2,\"calendar-patterns-icon\",{\"width\":[1],\"height\":[1]}]]],[\"checkmark-circle-icon\",[[2,\"checkmark-circle-icon\",{\"width\":[1],\"height\":[1]}]]],[\"flow-icon\",[[2,\"flow-icon\",{\"width\":[1],\"height\":[1]}]]],[\"italic-icon\",[[2,\"italic-icon\",{\"width\":[1],\"height\":[1]}]]],[\"play-icon\",[[2,\"play-icon\",{\"width\":[1],\"height\":[1]}]]],[\"refresh-icon\",[[2,\"refresh-icon\",{\"width\":[1],\"height\":[1]}]]],[\"stop-icon\",[[2,\"stop-icon\",{\"width\":[1],\"height\":[1]}]]],[\"translate-icon\",[[2,\"translate-icon\",{\"width\":[1],\"height\":[1]}]]],[\"underline-icon\",[[2,\"underline-icon\",{\"width\":[1],\"height\":[1]}]]],[\"warning-icon\",[[2,\"warning-icon\",{\"width\":[1],\"height\":[1]}]]],[\"multi-select-dropdown\",[[1,\"multi-select-dropdown\",{\"name\":[1],\"label\":[1],\"options\":[16],\"availableOptions\":[32],\"isOpen\":[32],\"ariaActivedescendant\":[32],\"shouldFocusFirstOption\":[32]},[[6,\"click\",\"handleOutsideClick\"]]]]],[\"add-circle-icon\",[[2,\"add-circle-icon\",{\"width\":[1],\"height\":[1]}]]],[\"calendar-cancel-icon\",[[2,\"calendar-cancel-icon\",{\"width\":[1],\"height\":[1]}]]],[\"calendar-icon\",[[2,\"calendar-icon\",{\"width\":[1],\"height\":[1]}]]],[\"location-icon\",[[2,\"location-icon\",{\"width\":[1],\"height\":[1]}]]],[\"location-off-icon\",[[2,\"location-off-icon\",{\"width\":[1],\"height\":[1]}]]],[\"nylas-time-window-picker\",[[1,\"nylas-time-window-picker\",{\"time\":[1],\"minimumStartTime\":[1,\"minimum-start-time\"],\"placeholder\":[1],\"setTime\":[16],\"name\":[1],\"hasError\":[4,\"has-error\"],\"setFormError\":[16],\"err\":[32],\"showTimes\":[32],\"ariaActivedescendant\":[32],\"times\":[32],\"shouldAutoScroll\":[32]},[[4,\"click\",\"handleOutsideClick\"]],{\"minimumStartTime\":[\"minimumStartTimeChangedHandler\"]}]]],[\"time-period-selector\",[[2,\"time-period-selector\",{\"timePeriods\":[16],\"defaultSelectedPeriod\":[1,\"default-selected-period\"],\"defaultSelectedNumber\":[2,\"default-selected-number\"],\"selectedPeriod\":[32],\"selectedNumber\":[32],\"numberOptions\":[32],\"timePeriodOptions\":[32]},[[0,\"selectedOptionChanged\",\"selectedOptionChangedHandler\"]],{\"defaultSelectedPeriod\":[\"defaultSelectedPeriodChangedHandler\"],\"defaultSelectedNumber\":[\"defaultSelectedNumberChangedHandler\"],\"timePeriods\":[\"timePeriodsChangedHandler\"]}]]],[\"nylas-form-card\",[[65,\"nylas-form-card\"]]],[\"loading-icon\",[[1,\"loading-icon\",{\"width\":[1],\"height\":[1]}]]],[\"globe-icon\",[[2,\"globe-icon\",{\"width\":[1],\"height\":[1]}]]],[\"close-icon\",[[2,\"close-icon\",{\"width\":[1],\"height\":[1]}]]],[\"info-icon\",[[2,\"info-icon\",{\"width\":[1],\"height\":[1]}]]],[\"tooltip-component\",[[1,\"tooltip-component\",{\"position\":[1]}]]],[\"search-icon\",[[2,\"search-icon\",{\"width\":[1],\"height\":[1]}]]],[\"chevron-icon\",[[2,\"chevron-icon\",{\"width\":[1],\"height\":[1]}]]],[\"select-dropdown\",[[1,\"select-dropdown\",{\"name\":[1],\"options\":[16],\"defaultSelectedOption\":[16],\"withSearch\":[4,\"with-search\"],\"pluralizedLabel\":[1,\"pluralized-label\"],\"selectedOption\":[32],\"isOpen\":[32],\"searchValue\":[32],\"filteredOptions\":[32],\"ariaActivedescendant\":[32]},[[6,\"click\",\"handleOutsideClick\"]],{\"options\":[\"optionsChangedHandler\"],\"defaultSelectedOption\":[\"defaultSelectedOptionChangedHandler\"]}]]]]"), options);
51
51
  });
52
52
 
53
53
  //# sourceMappingURL=nylas-web-elements.js.map
@@ -89,7 +89,7 @@ const NylasEditorTabs = class {
89
89
  open_hours: availability ?? [],
90
90
  },
91
91
  booking: {
92
- calendar_id: bookingCalendar ?? 'primary',
92
+ calendar_id: bookingCalendar && bookingCalendar !== '' ? bookingCalendar : 'primary',
93
93
  },
94
94
  },
95
95
  ],
@@ -221,10 +221,10 @@ const NylasEditorTabs = class {
221
221
  }
222
222
  render() {
223
223
  debug('[nylas-editor-tabs]', 'render', this.formState);
224
- return (h(Host, { key: 'e26c05a424e53163d97bd14723151c73a870b8be' }, h("form", { key: 'e5c3af66eebb0d133e8a6931d84aa12b5e07d329', onSubmit: this.formSubmissionHandler, class: "scheduler-editor", ref: el => (this.formRef = el) }, h("div", { key: 'd24109dc87e9b18fb62bf684c25c08dfa58334ed', class: "form-contents" }, h("div", { key: 'b74f053cbd15654c1d3d43af8a765607fdcd28d3', class: "tabs" }, h("button", { key: 'ccf9034c5bf0194ad5db7ad29ddd46eb6846cfbb', class: { tab: true, active: this.activeTab == 'eventInfo' }, onClick: e => this.setActiveTab(e, 'eventInfo') }, h("calendar-info-icon", { key: '6527d78a3d54f54baa6f7c4552937dbfe992ec96', width: "16", height: "16" }), "Event Info"), h("button", { key: 'e561f4f7ab01629860f13812a14d0bdf92ad7d6b', class: { tab: true, active: this.activeTab == 'availability' }, onClick: e => this.setActiveTab(e, 'availability') }, h("calendar-patterns-icon", { key: 'dde4d0f70cdf0aad66e25e7b683372a0c9035398', width: "16", height: "16" }), "Availability"), h("button", { key: '8a8131ed4f2f07b6f9d228d9bc86667718f5766f', class: { tab: true, active: this.activeTab == 'bookingOptions' }, onClick: e => this.setActiveTab(e, 'bookingOptions') }, h("flow-icon", { key: '1cc07a769eca6090749bc0c04ca3aa283864d925', width: "16", height: "16" }), "Booking Options")), h("div", { key: '2802d58acf7965856f6802b17794dc34cec424e7', class: "tab-content" }, h(TabContents, { key: 'c965af9cecdd91977c8b036f504e33620443b7af', formState: this.formState, activeTab: this.activeTab, calendars: this.calendars, id: this.config?.id ?? 'new' }))), h("div", { key: '2faed468348afb67f0fc867de91c901c5c1546f5', class: "footer" }, h("p", { key: 'd79a6e1562cd3ced4b84a01f8939d8d5c047979c', class: {
224
+ return (h(Host, { key: '920332a1206e84229cd4875b598b388d196edc77' }, h("form", { key: 'cc33124020c4ec87dff2eb395d8a4151dd2a63a8', onSubmit: this.formSubmissionHandler, class: "scheduler-editor", ref: el => (this.formRef = el) }, h("div", { key: 'e9a0e2d35d59ab3c95e0b17db057aa97de1c48d3', class: "form-contents" }, h("div", { key: 'c2b30e822e4b5a0d938b9d7fb5849e90503d5fee', class: "tabs" }, h("button", { key: '1958ff2af28cf21a3c8b6a1029dfd0fdfd58bbf7', class: { tab: true, active: this.activeTab == 'eventInfo' }, onClick: e => this.setActiveTab(e, 'eventInfo') }, h("calendar-info-icon", { key: 'c62f9b3cad22d4c67791c78dcac202d47617eda0', width: "16", height: "16" }), "Event Info"), h("button", { key: '7858b3fe59f02eefba9cebc561e5e89b220a6018', class: { tab: true, active: this.activeTab == 'availability' }, onClick: e => this.setActiveTab(e, 'availability') }, h("calendar-patterns-icon", { key: 'b8d6ed526a37bd31ce150c4202e41a9599c553af', width: "16", height: "16" }), "Availability"), h("button", { key: '224c119608059affb6245f72b6337fe66aafe9fb', class: { tab: true, active: this.activeTab == 'bookingOptions' }, onClick: e => this.setActiveTab(e, 'bookingOptions') }, h("flow-icon", { key: '149824372964f592dd1d754a7db6eef9367ffafc', width: "16", height: "16" }), "Booking Options")), h("div", { key: '0feb5d9500b8028542438e9d091b66bc87bc9673', class: "tab-content" }, h(TabContents, { key: '86de2a2ab92dd6c1081c7a4db4f3ceb62ee579fe', formState: this.formState, activeTab: this.activeTab, calendars: this.calendars, id: this.config?.id ?? 'new' }))), h("div", { key: '8a63b2e9761aea3dea1e967784db8e2de5b65eda', class: "footer" }, h("p", { key: 'da0e2f2f19bc7a8b2910706f57ea437b291fc2b1', class: {
225
225
  'unsaved-changes': this.hasUnsavedChanges && !this.changesSaved,
226
226
  'saved-changes': this.changesSaved,
227
- } }, this.hasUnsavedChanges && !this.changesSaved ? 'Unsaved changes' : this.changesSaved ? 'Changes saved!' : ''), h("button-component", { key: '1e77a73ef49c9a17a3cdd7d9adcf49515765de7c', type: "submit", disabled: this.isLoading }, this.isLoading ? (h("span", null, "Saving", h("loading-icon", null), ' ')) : this.action == 'create' ? ('Create') : ('Save changes'))))));
227
+ } }, this.hasUnsavedChanges && !this.changesSaved ? 'Unsaved changes' : this.changesSaved ? 'Changes saved!' : ''), h("button-component", { key: '6d41a5158d8ff68528056fcc65c1b668e3fcd6e6', type: "submit", disabled: this.isLoading }, this.isLoading ? (h("span", null, "Saving", h("loading-icon", null), ' ')) : this.action == 'create' ? ('Create') : ('Save changes'))))));
228
228
  }
229
229
  static get watchers() { return {
230
230
  "config": ["configChangedHandler"]
@@ -1 +1 @@
1
- {"file":"nylas-editor-tabs.entry.esm.js","mappings":";;;;;SASwB,WAAW,CAAC,EAAE,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAoB;IAC3F,QAAQ,SAAS;QACf,KAAK,WAAW;YACd,MAAM,UAAU,GAAG,SAAS,CAAC,KAAK,CAAC;YACnC,MAAM,gBAAgB,GAAG,SAAS,CAAC,WAAW,CAAC;YAC/C,M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A6B,CAAC,eAAe,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;iBACjF;qBAAM;oBACL,MAAM,6BAA6B,CAAC,eAAe,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;iBACjF;aACF;SACF;QACD,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;6CAkDD;;;;;","names":[],"sources":["src/components/scheduler-editor/nylas-editor-tabs/tab-contents.tsx","src/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.scss?tag=nylas-editor-tabs&encapsulation=scoped","src/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.tsx"],"sourcesContent":["import { h } from '@stencil/core';\n\nexport type TabContentsProps = {\n id: string;\n formState: any;\n activeTab: string;\n calendars?: any[];\n};\n\nexport default function TabContents({ id, formState, activeTab, calendars }: TabContentsProps) {\n switch (activeTab) {\n case 'eventInfo':\n const eventTitle = formState.title;\n const eventDescription = formState.description;\n const eventDuration = parseInt(formState.duration);\n const location = formState.location;\n // const eventParticipants = formState.participants;\n\n return (\n <div key={id}>\n <nylas-event-info>\n <div slot=\"inputs\">\n <nylas-event-title name=\"title\" eventTitle={eventTitle} exportparts=\"net, net__title, net__dropdown-content\" />\n <nylas-event-duration\n name=\"duration\"\n eventDurationMinutes={eventDuration}\n exportparts=\"ned, ned__input, ned__dropdown, ned__dropdown-button, ned__dropdown-content\"\n />\n <nylas-location-component name=\"location\" eventLocation={location} exportparts=\"nel, nel__location, nel__dropdown, nel__dropdown-button, nel__dropdown-content\" />\n <nylas-event-description name=\"description\" eventDescription={eventDescription} exportparts=\"nedesc, nedesc__textarea\" />\n </div>\n </nylas-event-info>\n {/* <nylas-additional-participants\n name=\"participants\"\n eventParticipants={eventParticipants}\n exportparts={'nap__title, nap__subtitle, nap__content, nap__input_group, nap__input_wrapper, nap__input, nap__remove-participant, nap__add-participant'}\n /> */}\n </div>\n );\n case 'availability':\n const openHours = formState.availability;\n const timezone = openHours?.[0]?.timezone ?? Intl.DateTimeFormat().resolvedOptions().timeZone;\n const organizer = formState.participants?.find(p => p.is_organizer);\n const organizerEmail = organizer?.email ?? 'primary';\n const selectedCalendars = formState.calendarIds.length > 0 ? formState.calendarIds : [organizerEmail];\n const bookingCalendar = formState.bookingCalendar == 'primary' ? organizerEmail : formState.bookingCalendar;\n return (\n <div key={id}>\n <nylas-booking-calendar-picker\n name=\"booking-calendar\"\n calendars={calendars ?? []}\n defaultBookingCalendar={bookingCalendar}\n exportparts={'nbcp, nbcp__header, nbcp__input-label, nbcp__dropdown, nbcp__dropdown-button, nbcp__dropdown-content'}\n />\n <nylas-calendar-picker\n name=\"calendars\"\n calendars={calendars ?? []}\n defaultSelectedCalendars={selectedCalendars}\n organizerEmail={organizerEmail}\n exportparts={'ncp ncp__header, ncp__dropdown, ncp__dropdown-button, ncp__dropdown-content'}\n />\n <nylas-availability-picker\n name=\"availability\"\n openHours={openHours}\n defaultTimezone={timezone}\n exportparts={\n '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'\n }\n />\n </div>\n );\n case 'bookingOptions':\n return (\n <div key={id}>\n {id == 'new' && <p>Config</p>}\n <nylas-buffer-time\n name=\"buffer-time\"\n buffer={formState.buffer}\n exportparts={\n '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'\n }\n />\n <nylas-custom-booking-flow\n name=\"booking-type\"\n bookingType={formState.bookingType}\n exportparts={'ncbf, ncbf__header, ncbf__dropdown, ncbf__dropdown-button, ncbf__dropdown-content'}\n />\n <nylas-event-limits>\n <div slot=\"inputs\">\n <nylas-limit-future-bookings\n name=\"limit-future-bookings\"\n availableDaysInFuture={formState.availableDaysInFuture}\n exportparts=\"nlfb, nlfb__number-dropdown, nlfb__number-dropdown-button, nlfb__number-dropdown-content, nlfb__period-dropdown, nlfb__period-dropdown-button, nlfb__period-dropdown-content\"\n />\n <nylas-min-cancellation-notice\n name=\"min-cancellation-notice\"\n minCancellationNotice={formState.minCancellationNotice}\n exportparts=\"nmcn, nmcn__number-dropdown, nmcn__number-dropdown-button, nmcn__number-dropdown-content, nmcn__period-dropdown, nmcn__period-dropdown-button, nmcn__period-dropdown-content\"\n />\n </div>\n </nylas-event-limits>\n </div>\n );\n }\n}\n","@import '../../../common/styles/variables.scss';\n@import '../../../common/mixins/buttons.scss';\n\n:host {\n display: block;\n @include default-css-variables;\n}\n\n.scheduler-editor {\n display: flex;\n flex-direction: column;\n .form-contents {\n display: grid;\n grid-template-columns: minmax(224px, 25%) 1fr;\n @media #{$mobile} {\n display: table-column-group;\n }\n .tabs {\n display: flex;\n flex-direction: column;\n border-right: 1px solid var(--nylas-base-200);\n background-color: var(--nylas-base-25);\n .tab {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n padding: 0.5rem 1rem;\n color: var(--nylas-base-900);\n background: var(--nylas-base-0);\n border: none;\n height: 56px;\n font-family: var(--nylas-font-family);\n font-size: 16px;\n font-weight: 500;\n line-height: 24px;\n cursor: pointer;\n &:not(:first-of-type) {\n margin-top: 0.25rem;\n }\n &.active {\n font-weight: 600;\n background: var(--nylas-base-0);\n color: var(--nylas-primary);\n border-left: 4px solid var(--nylas-primary);\n box-shadow: 0px 1px 2px 0px #0000000f;\n box-shadow: 0px 1px 3px 0px #0000001a;\n }\n }\n }\n .tab-content {\n max-width: 692px;\n nylas-event-info,\n nylas-event-limits {\n div[slot='inputs'] {\n display: flex;\n flex-direction: column;\n gap: 1rem;\n }\n }\n }\n }\n}\n\n.footer {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n gap: 1rem;\n height: 80px;\n padding: 0 1rem;\n border-top: 1px solid var(--nylas-base-200);\n .unsaved-changes {\n color: var(--nylas-base-600);\n }\n .saved-changes {\n color: var(--nylas-success);\n }\n button {\n @include primary-button;\n width: 148px;\n span {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n }\n }\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug } from '@/utils/utils';\nimport { BookingType, Calendar, Configuration } from '@nylas/core';\nimport { Component, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport TabContents from './tab-contents';\nimport { User } from '@/common/nylas-api-request';\n\ntype SchedulerEventDetail = {\n config: Partial<Configuration>;\n action: 'create' | 'update';\n resetLoadingState?: (e: CustomEvent) => void;\n};\n\n/**\n * The `nylas-editor-tabs` component is a UI component that displays the editor tabs for the scheduler editor.\n * @part nap__title - [nylas-additional-participants] The title of the component.\n * @part nap__subtitle - [nylas-additional-participants] The subtitle of the component.\n * @part nap__content - [nylas-additional-participants] The content of the component.\n * @part nap__input - [nylas-additional-participants] The input of the component.\n * @part nap__remove-participant - [nylas-additional-participants] The remove participant button of the component.\n * @part nap__add-participant - [nylas-additional-participants] The add participant button of the component.\n * @part nap__header - [nylas-availability-picker] The header of the availability picker\n * @part nap__select-timezone - [nylas-availability-picker] The timezone selection container\n * @part nap__select-timezone-button -[nylas-availability-picker] The timezone selection button\n * @part nap__select-timezone-dropdown-content -[nylas-availability-picker] The timezone selection dropdown content\n * @part nap__availability - [nylas-availability-picker] The availability container\n * @part nap__day - [nylas-availability-picker] The day container\n * @part nap__time-ranges - [nylas-availability-picker] The time ranges container\n * @part nap__time-range - [nylas-availability-picker] The time range container\n * @part nap__add-time-range - [nylas-availability-picker] The add time range button\n * @part nap__time-picker-container -[nylas-availability-picker] The time picker container\n * @part nap__time-picker-input - [nylas-availability-picker] The time picker input\n * @part nap__time-picker-times - [nylas-availability-picker] The time picker times\n * @part nbcp - [nylas-booking-calendar-picker] The booking calendar picker container\n * @part nbcp__header - [nylas-booking-calendar-picker] The header of the booking calendar picker\n * @part nbcp__input-label - [nylas-booking-calendar-picker] The input label of the booking calendar picker\n * @part nbcp__dropdown - [nylas-booking-calendar-picker] The dropdown container\n * @part nbcp__dropdown-button - [nylas-booking-calendar-picker] The dropdown button\n * @part nbcp__dropdown-content - [nylas-booking-calendar-picker] The dropdown content\n * @part nbt - [nylas-buffer-time] The buffer time container\n * @part nbt__header - [nylas-buffer-time] The header of the buffer time\n * @part nbt__body - [nylas-buffer-time] The body of the buffer time\n * @part nbt__dropdown-before - [nylas-buffer-time] The before buffer dropdown container\n * @part nbt__dropdown-button-before - [nylas-buffer-time] The before buffer dropdown button\n * @part nbt__dropdown-content-before - [nylas-buffer-time] The before buffer dropdown content\n * @part nbt__dropdown-after - [nylas-buffer-time] The after buffer dropdown container\n * @part nbt__dropdown-button-after - [nylas-buffer-time] The after buffer dropdown button\n * @part nbt__dropdown-content-after - [nylas-buffer-time] The after buffer dropdown content\n * @part nbt__preview - [nylas-buffer-time] The buffer time preview\n * @part ncp - [nylas-calendar-picker] The calendar picker container\n * @part ncp__header - [nylas-calendar-picker] The header of the calendar picker\n * @part ncp__dropdown - [nylas-calendar-picker] The dropdown container\n * @part ncp__dropdown-button - [nylas-calendar-picker] The dropdown button\n * @part ncp__dropdown-content - [nylas-calendar-picker] The dropdown content\n * @part ncbf - [nylas-custom-booking-flow] The custom booking flow container\n * @part ncbf__header - [nylas-custom-booking-flow] The header of the custom booking flow\n * @part ncbf__dropdown - [nylas-custom-booking-flow] The dropdown container\n * @part ncbf__dropdown-button - [nylas-custom-booking-flow] The dropdown button\n * @part ncbf__dropdown-content - [nylas-custom-booking-flow] The dropdown content\n * @part nedesc - [nylas-event-description] The event description container\n * @part nedesc__textarea - [nylas-event-description] The event description textarea\n * @part ned - [nylas-event-duration] The event duration container\n * @part ned__input - [nylas-event-duration] The event duration input\n * @part ned__dropdown - [nylas-event-duration] The event duration dropdown\n * @part ned__dropdown-button - [nylas-event-duration] The event duration dropdown button\n * @part ned__dropdown-content - [nylas-event-duration] The event duration dropdown content\n * @part net - [nylas-event-title] The event title container\n * @part net__title - [nylas-event-title] The event title input\n * @part net__dropdown-content - [nylas-event-title] The token options container\n * @part nlfb - [nylas-limit-future-bookings] The limit future bookings container\n * @part nlfb__number-dropdown - [nylas-limit-future-bookings] The number dropdown container\n * @part nlfb__number-dropdown-button - [nylas-limit-future-bookings] The number dropdown button\n * @part nlfb__number-dropdown-content - [nylas-limit-future-bookings] The number dropdown content\n * @part nlfb__period-dropdown - [nylas-limit-future-bookings] The period dropdown container\n * @part nlfb__period-dropdown-button - [nylas-limit-future-bookings] The period dropdown button\n * @part nlfb__period-dropdown-content - [nylas-limit-future-bookings] The period dropdown content\n * @part nel - [nylas-location-component] The event location container\n * @part nel__location - [nylas-location-component] The event location input\n * @part nel__dropdown - [nylas-location-component] The dropdown container\n * @part nel__dropdown-button - [nylas-location-component] The dropdown button\n * @part nel__dropdown-content - [nylas-location-component] The dropdown content\n * @part nmcn - [nylas-min-cancellation-notice] The minimum cancellation notice container\n * @part nmcn__number-dropdown - [nylas-min-cancellation-notice] The number dropdown container\n * @part nmcn__number-dropdown-button - [nylas-min-cancellation-notice] The number dropdown button\n * @part nmcn__number-dropdown-content - [nylas-min-cancellation-notice] The number dropdown content\n * @part nmcn__period-dropdown - [nylas-min-cancellation-notice] The period dropdown container\n * @part nmcn__period-dropdown-button - [nylas-min-cancellation-notice] The period dropdown button\n * @part nmcn__period-dropdown-content - [nylas-min-cancellation-notice] The period dropdown content\n */\n@Component({\n tag: 'nylas-editor-tabs',\n styleUrl: 'nylas-editor-tabs.scss',\n scoped: true,\n})\nexport class NylasEditorTabs {\n private formRef!: HTMLFormElement;\n @Prop() calendars?: Calendar[];\n @Prop() config?: Configuration;\n @Prop() currentUser?: User;\n @State() action: 'create' | 'update' = 'create';\n @State() activeTab: string = 'eventInfo';\n @State() isLoading: boolean = false;\n @State() hasUnsavedChanges: boolean = false;\n @State() changesSaved: boolean = false;\n @State() formState: Partial<{\n title: string;\n description: string;\n duration: string;\n availability?: any;\n calendarIds: string[];\n participants?: any[];\n bookingCalendar?: string;\n location?: string;\n bookingType?: string;\n buffer?: { before: number; after: number };\n availableDaysInFuture?: number;\n minCancellationNotice?: number;\n }> = {};\n\n @Event() schedulerConfigChanged!: EventEmitter<SchedulerEventDetail>;\n\n @Watch('config')\n configChangedHandler(newConfig: Configuration) {\n debug('[nylas-editor-tabs]', 'configChangedHandler', newConfig, this.config);\n this.formState = {\n ...this.getFormStateFromConfig(newConfig),\n };\n\n if (newConfig.id) {\n this.action = 'update';\n } else {\n this.action = 'create';\n }\n }\n\n connectedCallback() {\n debug('[nylas-editor-tabs]', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('[nylas-editor-tabs]', 'componentWillLoad');\n this.formState = this.getFormStateFromConfig(this.config);\n }\n\n componentDidLoad() {\n debug('[nylas-editor-tabs]', 'componentDidLoad');\n }\n\n disconnectedCallback() {\n debug('[nylas-editor-tabs]', 'disconnectedCallback');\n }\n\n @Listen('valueChanged')\n handleValueChanged(event: CustomEvent) {\n debug('[nylas-editor-tabs]', 'handleValueChanged', event);\n this.formState = { ...this.formState, [event.detail.name]: event.detail.value };\n this.hasUnsavedChanges = true;\n }\n\n getFormStateFromConfig(config?: Configuration) {\n const organizerParticipant = config?.participants?.find(p => p.is_organizer);\n return {\n title: config?.event_booking?.title ?? '',\n description: config?.event_booking?.description ?? '',\n duration: config?.availability?.duration_minutes?.toString() ?? '10',\n availability: organizerParticipant?.availability?.open_hours ?? undefined,\n calendarIds: organizerParticipant?.availability?.calendar_ids ?? [],\n participants: config?.participants ?? [],\n bookingCalendar: organizerParticipant?.booking?.calendar_id ?? organizerParticipant?.email ?? '',\n location: this.config?.event_booking?.location ?? '',\n bookingType: this.config?.event_booking?.booking_type ?? 'booking',\n buffer: this.config?.availability?.availability_rules?.buffer ?? { before: 0, after: 0 },\n availableDaysInFuture: this.config?.scheduler?.available_days_in_future ?? 30,\n minCancellationNotice: this.config?.scheduler?.min_cancellation_notice ?? 0,\n };\n }\n\n updateFormState() {\n const formData = new FormData(this.formRef);\n formData.forEach((value, key) => {\n switch (key) {\n case 'title':\n this.formState.title = value.toString();\n break;\n case 'description':\n this.formState.description = value.toString();\n break;\n case 'duration':\n this.formState.duration = value.toString();\n break;\n case 'availability':\n this.formState.availability = JSON.parse(value.toString());\n break;\n case 'participants':\n this.formState.participants = JSON.parse(value.toString());\n break;\n case 'calendars':\n this.formState.calendarIds = value.toString().split(',');\n break;\n case 'booking-calendar':\n this.formState.bookingCalendar = value.toString();\n break;\n case 'location':\n this.formState.location = value.toString();\n break;\n case 'booking-type':\n this.formState.bookingType = value.toString();\n break;\n case 'buffer-time':\n this.formState.buffer = JSON.parse(value.toString());\n break;\n case 'limit-future-bookings':\n this.formState.availableDaysInFuture = parseInt(value.toString());\n break;\n case 'min-cancellation-notice':\n this.formState.minCancellationNotice = parseInt(value.toString());\n break;\n }\n });\n this.formState = { ...this.formState };\n }\n\n setActiveTab(e: Event, tabName: string) {\n e.preventDefault();\n this.updateFormState();\n this.activeTab = tabName;\n }\n\n formSubmissionHandler = async (event: Event) => {\n event.preventDefault();\n this.isLoading = true;\n this.hasUnsavedChanges = false;\n this.updateFormState();\n const { title, description, duration, availability, calendarIds, bookingCalendar, location, bookingType, buffer, availableDaysInFuture, minCancellationNotice } =\n this.formState;\n\n const organizer = this.config?.participants?.find(p => p.is_organizer);\n\n const configObject: Partial<Configuration> = {\n ...(this.config?.id && { id: this.config.id }),\n version: this.config?.version ?? '1.0.0',\n availability: {\n duration_minutes: duration ? parseInt(duration) : 0,\n availability_rules: {\n availability_method: this.config?.availability?.availability_rules?.availability_method ?? 'collective',\n buffer: buffer || { before: 0, after: 0 },\n default_open_hours: this.config?.availability?.availability_rules?.default_open_hours ?? [],\n round_robin_group_id: this.config?.availability?.availability_rules?.round_robin_group_id ?? '',\n },\n },\n participants: [\n {\n name: organizer?.name ?? organizer?.email ?? this.currentUser?.name ?? this.currentUser?.email ?? '',\n email: organizer?.email ?? this.currentUser?.email ?? '',\n is_organizer: true,\n availability: {\n calendar_ids: calendarIds?.length ? calendarIds : ['primary'],\n open_hours: availability ?? [],\n },\n booking: {\n calendar_id: bookingCalendar ?? 'primary',\n },\n },\n ],\n event_booking: {\n title: title?.toString() ?? '',\n description: description?.toString() ?? '',\n location: location?.toString() ?? '',\n booking_type: (bookingType?.toString() as BookingType) ?? 'booking',\n },\n scheduler: {\n available_days_in_future: availableDaysInFuture ?? 30,\n min_cancellation_notice: minCancellationNotice ?? 0,\n },\n };\n const resetLoadingState = (_e: CustomEvent) => {\n this.isLoading = false;\n this.changesSaved = true;\n setTimeout(() => {\n this.changesSaved = false;\n }, 5000);\n };\n this.schedulerConfigChanged.emit({ config: configObject, resetLoadingState, action: this.action });\n };\n\n @RegisterComponent<NylasEditorTabs, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-editor-tabs',\n stateToProps: new Map([\n ['schedulerConfig.calendars', 'calendars'],\n ['schedulerConfig.config', 'config'],\n ['schedulerConfig.currentUser', 'currentUser'],\n ]),\n eventToProps: {\n schedulerConfigChanged: async (event: CustomEvent<SchedulerEventDetail>, nylasSchedulerConfigConnector: NylasSchedulerConfigConnector) => {\n const { resetLoadingState, action, config } = event.detail;\n if (resetLoadingState) {\n resetLoadingState(event);\n }\n\n // If we have an ID, we are updating an existing configuration\n if (action === 'update') {\n await nylasSchedulerConfigConnector.schedulerConfig.updateConfiguration(config);\n } else {\n await nylasSchedulerConfigConnector.schedulerConfig.createConfiguration(config);\n }\n },\n },\n fireRegisterEvent: true,\n })\n render() {\n debug('[nylas-editor-tabs]', 'render', this.formState);\n return (\n <Host>\n <form onSubmit={this.formSubmissionHandler} class=\"scheduler-editor\" ref={el => (this.formRef = el as HTMLFormElement)}>\n <div class=\"form-contents\">\n <div class=\"tabs\">\n <button class={{ tab: true, active: this.activeTab == 'eventInfo' }} onClick={e => this.setActiveTab(e, 'eventInfo')}>\n <calendar-info-icon width=\"16\" height=\"16\" />\n Event Info\n </button>\n <button class={{ tab: true, active: this.activeTab == 'availability' }} onClick={e => this.setActiveTab(e, 'availability')}>\n <calendar-patterns-icon width=\"16\" height=\"16\" />\n Availability\n </button>\n <button class={{ tab: true, active: this.activeTab == 'bookingOptions' }} onClick={e => this.setActiveTab(e, 'bookingOptions')}>\n <flow-icon width=\"16\" height=\"16\" />\n Booking Options\n </button>\n </div>\n <div class=\"tab-content\">\n <TabContents formState={this.formState} activeTab={this.activeTab} calendars={this.calendars} id={this.config?.id ?? 'new'} />\n </div>\n </div>\n <div class=\"footer\">\n <p\n class={{\n 'unsaved-changes': this.hasUnsavedChanges && !this.changesSaved,\n 'saved-changes': this.changesSaved,\n }}\n >\n {this.hasUnsavedChanges && !this.changesSaved ? 'Unsaved changes' : this.changesSaved ? 'Changes saved!' : ''}\n </p>\n <button-component type=\"submit\" disabled={this.isLoading}>\n {this.isLoading ? (\n <span>\n Saving\n <loading-icon />{' '}\n </span>\n ) : this.action == 'create' ? (\n 'Create'\n ) : (\n 'Save changes'\n )}\n </button-component>\n </div>\n </form>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"nylas-editor-tabs.entry.esm.js","mappings":";;;;;SASwB,WAAW,CAAC,EAAE,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAoB;IAC3F,QAAQ,SAAS;QACf,KAAK,WAAW;YACd,MAAM,UAAU,GAAG,SAAS,CAAC,KAAK,CAAC;YACnC,MAAM,gBAAgB,GAAG,SAAS,CAAC,WAAW,CAAC;YAC/C,MAAM,aAAa,GAAG,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;YACnD,MAAM,QAAQ,GAAG,SAAS,CAAC,QAAQ,CAAC;YAGpC,QACE,WAAK,GAAG,EAAE,EAAE;gBACV;oBACE,WAAK,IAAI,EAAC,QAAQ;wBAChB,yBAAmB,IAAI,EAAC,OAAO,EAAC,UAAU,EAAE,UAAU,EAAE,WAAW,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ources":["src/components/scheduler-editor/nylas-editor-tabs/tab-contents.tsx","src/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.scss?tag=nylas-editor-tabs&encapsulation=scoped","src/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.tsx"],"sourcesContent":["import { h } from '@stencil/core';\n\nexport type TabContentsProps = {\n id: string;\n formState: any;\n activeTab: string;\n calendars?: any[];\n};\n\nexport default function TabContents({ id, formState, activeTab, calendars }: TabContentsProps) {\n switch (activeTab) {\n case 'eventInfo':\n const eventTitle = formState.title;\n const eventDescription = formState.description;\n const eventDuration = parseInt(formState.duration);\n const location = formState.location;\n // const eventParticipants = formState.participants;\n\n return (\n <div key={id}>\n <nylas-event-info>\n <div slot=\"inputs\">\n <nylas-event-title name=\"title\" eventTitle={eventTitle} exportparts=\"net, net__title, net__dropdown-content\" />\n <nylas-event-duration\n name=\"duration\"\n eventDurationMinutes={eventDuration}\n exportparts=\"ned, ned__input, ned__dropdown, ned__dropdown-button, ned__dropdown-content\"\n />\n <nylas-location-component name=\"location\" eventLocation={location} exportparts=\"nel, nel__location, nel__dropdown, nel__dropdown-button, nel__dropdown-content\" />\n <nylas-event-description name=\"description\" eventDescription={eventDescription} exportparts=\"nedesc, nedesc__textarea\" />\n </div>\n </nylas-event-info>\n {/* <nylas-additional-participants\n name=\"participants\"\n eventParticipants={eventParticipants}\n exportparts={'nap__title, nap__subtitle, nap__content, nap__input_group, nap__input_wrapper, nap__input, nap__remove-participant, nap__add-participant'}\n /> */}\n </div>\n );\n case 'availability':\n const openHours = formState.availability;\n const timezone = openHours?.[0]?.timezone ?? Intl.DateTimeFormat().resolvedOptions().timeZone;\n const organizer = formState.participants?.find(p => p.is_organizer);\n const organizerEmail = organizer?.email ?? 'primary';\n const selectedCalendars = formState.calendarIds.length > 0 ? formState.calendarIds : [organizerEmail];\n const bookingCalendar = formState.bookingCalendar == 'primary' ? organizerEmail : formState.bookingCalendar;\n return (\n <div key={id}>\n <nylas-booking-calendar-picker\n name=\"booking-calendar\"\n calendars={calendars ?? []}\n defaultBookingCalendar={bookingCalendar}\n exportparts={'nbcp, nbcp__header, nbcp__input-label, nbcp__dropdown, nbcp__dropdown-button, nbcp__dropdown-content'}\n />\n <nylas-calendar-picker\n name=\"calendars\"\n calendars={calendars ?? []}\n defaultSelectedCalendars={selectedCalendars}\n organizerEmail={organizerEmail}\n exportparts={'ncp ncp__header, ncp__dropdown, ncp__dropdown-button, ncp__dropdown-content'}\n />\n <nylas-availability-picker\n name=\"availability\"\n openHours={openHours}\n defaultTimezone={timezone}\n exportparts={\n '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'\n }\n />\n </div>\n );\n case 'bookingOptions':\n return (\n <div key={id}>\n {id == 'new' && <p>Config</p>}\n <nylas-buffer-time\n name=\"buffer-time\"\n buffer={formState.buffer}\n exportparts={\n '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'\n }\n />\n <nylas-custom-booking-flow\n name=\"booking-type\"\n bookingType={formState.bookingType}\n exportparts={'ncbf, ncbf__header, ncbf__dropdown, ncbf__dropdown-button, ncbf__dropdown-content'}\n />\n <nylas-event-limits>\n <div slot=\"inputs\">\n <nylas-limit-future-bookings\n name=\"limit-future-bookings\"\n availableDaysInFuture={formState.availableDaysInFuture}\n exportparts=\"nlfb, nlfb__number-dropdown, nlfb__number-dropdown-button, nlfb__number-dropdown-content, nlfb__period-dropdown, nlfb__period-dropdown-button, nlfb__period-dropdown-content\"\n />\n <nylas-min-cancellation-notice\n name=\"min-cancellation-notice\"\n minCancellationNotice={formState.minCancellationNotice}\n exportparts=\"nmcn, nmcn__number-dropdown, nmcn__number-dropdown-button, nmcn__number-dropdown-content, nmcn__period-dropdown, nmcn__period-dropdown-button, nmcn__period-dropdown-content\"\n />\n </div>\n </nylas-event-limits>\n </div>\n );\n }\n}\n","@import '../../../common/styles/variables.scss';\n@import '../../../common/mixins/buttons.scss';\n\n:host {\n display: block;\n @include default-css-variables;\n}\n\n.scheduler-editor {\n display: flex;\n flex-direction: column;\n .form-contents {\n display: grid;\n grid-template-columns: minmax(224px, 25%) 1fr;\n @media #{$mobile} {\n display: table-column-group;\n }\n .tabs {\n display: flex;\n flex-direction: column;\n border-right: 1px solid var(--nylas-base-200);\n background-color: var(--nylas-base-25);\n .tab {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n padding: 0.5rem 1rem;\n color: var(--nylas-base-900);\n background: var(--nylas-base-0);\n border: none;\n height: 56px;\n font-family: var(--nylas-font-family);\n font-size: 16px;\n font-weight: 500;\n line-height: 24px;\n cursor: pointer;\n &:not(:first-of-type) {\n margin-top: 0.25rem;\n }\n &.active {\n font-weight: 600;\n background: var(--nylas-base-0);\n color: var(--nylas-primary);\n border-left: 4px solid var(--nylas-primary);\n box-shadow: 0px 1px 2px 0px #0000000f;\n box-shadow: 0px 1px 3px 0px #0000001a;\n }\n }\n }\n .tab-content {\n max-width: 692px;\n nylas-event-info,\n nylas-event-limits {\n div[slot='inputs'] {\n display: flex;\n flex-direction: column;\n gap: 1rem;\n }\n }\n }\n }\n}\n\n.footer {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n gap: 1rem;\n height: 80px;\n padding: 0 1rem;\n border-top: 1px solid var(--nylas-base-200);\n .unsaved-changes {\n color: var(--nylas-base-600);\n }\n .saved-changes {\n color: var(--nylas-success);\n }\n button {\n @include primary-button;\n width: 148px;\n span {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n }\n }\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug } from '@/utils/utils';\nimport { BookingType, Calendar, Configuration } from '@nylas/core';\nimport { Component, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport TabContents from './tab-contents';\nimport { User } from '@/common/nylas-api-request';\n\ntype SchedulerEventDetail = {\n config: Partial<Configuration>;\n action: 'create' | 'update';\n resetLoadingState?: (e: CustomEvent) => void;\n};\n\n/**\n * The `nylas-editor-tabs` component is a UI component that displays the editor tabs for the scheduler editor.\n * @part nap__title - [nylas-additional-participants] The title of the component.\n * @part nap__subtitle - [nylas-additional-participants] The subtitle of the component.\n * @part nap__content - [nylas-additional-participants] The content of the component.\n * @part nap__input - [nylas-additional-participants] The input of the component.\n * @part nap__remove-participant - [nylas-additional-participants] The remove participant button of the component.\n * @part nap__add-participant - [nylas-additional-participants] The add participant button of the component.\n * @part nap__header - [nylas-availability-picker] The header of the availability picker\n * @part nap__select-timezone - [nylas-availability-picker] The timezone selection container\n * @part nap__select-timezone-button -[nylas-availability-picker] The timezone selection button\n * @part nap__select-timezone-dropdown-content -[nylas-availability-picker] The timezone selection dropdown content\n * @part nap__availability - [nylas-availability-picker] The availability container\n * @part nap__day - [nylas-availability-picker] The day container\n * @part nap__time-ranges - [nylas-availability-picker] The time ranges container\n * @part nap__time-range - [nylas-availability-picker] The time range container\n * @part nap__add-time-range - [nylas-availability-picker] The add time range button\n * @part nap__time-picker-container -[nylas-availability-picker] The time picker container\n * @part nap__time-picker-input - [nylas-availability-picker] The time picker input\n * @part nap__time-picker-times - [nylas-availability-picker] The time picker times\n * @part nbcp - [nylas-booking-calendar-picker] The booking calendar picker container\n * @part nbcp__header - [nylas-booking-calendar-picker] The header of the booking calendar picker\n * @part nbcp__input-label - [nylas-booking-calendar-picker] The input label of the booking calendar picker\n * @part nbcp__dropdown - [nylas-booking-calendar-picker] The dropdown container\n * @part nbcp__dropdown-button - [nylas-booking-calendar-picker] The dropdown button\n * @part nbcp__dropdown-content - [nylas-booking-calendar-picker] The dropdown content\n * @part nbt - [nylas-buffer-time] The buffer time container\n * @part nbt__header - [nylas-buffer-time] The header of the buffer time\n * @part nbt__body - [nylas-buffer-time] The body of the buffer time\n * @part nbt__dropdown-before - [nylas-buffer-time] The before buffer dropdown container\n * @part nbt__dropdown-button-before - [nylas-buffer-time] The before buffer dropdown button\n * @part nbt__dropdown-content-before - [nylas-buffer-time] The before buffer dropdown content\n * @part nbt__dropdown-after - [nylas-buffer-time] The after buffer dropdown container\n * @part nbt__dropdown-button-after - [nylas-buffer-time] The after buffer dropdown button\n * @part nbt__dropdown-content-after - [nylas-buffer-time] The after buffer dropdown content\n * @part nbt__preview - [nylas-buffer-time] The buffer time preview\n * @part ncp - [nylas-calendar-picker] The calendar picker container\n * @part ncp__header - [nylas-calendar-picker] The header of the calendar picker\n * @part ncp__dropdown - [nylas-calendar-picker] The dropdown container\n * @part ncp__dropdown-button - [nylas-calendar-picker] The dropdown button\n * @part ncp__dropdown-content - [nylas-calendar-picker] The dropdown content\n * @part ncbf - [nylas-custom-booking-flow] The custom booking flow container\n * @part ncbf__header - [nylas-custom-booking-flow] The header of the custom booking flow\n * @part ncbf__dropdown - [nylas-custom-booking-flow] The dropdown container\n * @part ncbf__dropdown-button - [nylas-custom-booking-flow] The dropdown button\n * @part ncbf__dropdown-content - [nylas-custom-booking-flow] The dropdown content\n * @part nedesc - [nylas-event-description] The event description container\n * @part nedesc__textarea - [nylas-event-description] The event description textarea\n * @part ned - [nylas-event-duration] The event duration container\n * @part ned__input - [nylas-event-duration] The event duration input\n * @part ned__dropdown - [nylas-event-duration] The event duration dropdown\n * @part ned__dropdown-button - [nylas-event-duration] The event duration dropdown button\n * @part ned__dropdown-content - [nylas-event-duration] The event duration dropdown content\n * @part net - [nylas-event-title] The event title container\n * @part net__title - [nylas-event-title] The event title input\n * @part net__dropdown-content - [nylas-event-title] The token options container\n * @part nlfb - [nylas-limit-future-bookings] The limit future bookings container\n * @part nlfb__number-dropdown - [nylas-limit-future-bookings] The number dropdown container\n * @part nlfb__number-dropdown-button - [nylas-limit-future-bookings] The number dropdown button\n * @part nlfb__number-dropdown-content - [nylas-limit-future-bookings] The number dropdown content\n * @part nlfb__period-dropdown - [nylas-limit-future-bookings] The period dropdown container\n * @part nlfb__period-dropdown-button - [nylas-limit-future-bookings] The period dropdown button\n * @part nlfb__period-dropdown-content - [nylas-limit-future-bookings] The period dropdown content\n * @part nel - [nylas-location-component] The event location container\n * @part nel__location - [nylas-location-component] The event location input\n * @part nel__dropdown - [nylas-location-component] The dropdown container\n * @part nel__dropdown-button - [nylas-location-component] The dropdown button\n * @part nel__dropdown-content - [nylas-location-component] The dropdown content\n * @part nmcn - [nylas-min-cancellation-notice] The minimum cancellation notice container\n * @part nmcn__number-dropdown - [nylas-min-cancellation-notice] The number dropdown container\n * @part nmcn__number-dropdown-button - [nylas-min-cancellation-notice] The number dropdown button\n * @part nmcn__number-dropdown-content - [nylas-min-cancellation-notice] The number dropdown content\n * @part nmcn__period-dropdown - [nylas-min-cancellation-notice] The period dropdown container\n * @part nmcn__period-dropdown-button - [nylas-min-cancellation-notice] The period dropdown button\n * @part nmcn__period-dropdown-content - [nylas-min-cancellation-notice] The period dropdown content\n */\n@Component({\n tag: 'nylas-editor-tabs',\n styleUrl: 'nylas-editor-tabs.scss',\n scoped: true,\n})\nexport class NylasEditorTabs {\n private formRef!: HTMLFormElement;\n @Prop() calendars?: Calendar[];\n @Prop() config?: Configuration;\n @Prop() currentUser?: User;\n @State() action: 'create' | 'update' = 'create';\n @State() activeTab: string = 'eventInfo';\n @State() isLoading: boolean = false;\n @State() hasUnsavedChanges: boolean = false;\n @State() changesSaved: boolean = false;\n @State() formState: Partial<{\n title: string;\n description: string;\n duration: string;\n availability?: any;\n calendarIds: string[];\n participants?: any[];\n bookingCalendar?: string;\n location?: string;\n bookingType?: string;\n buffer?: { before: number; after: number };\n availableDaysInFuture?: number;\n minCancellationNotice?: number;\n }> = {};\n\n @Event() schedulerConfigChanged!: EventEmitter<SchedulerEventDetail>;\n\n @Watch('config')\n configChangedHandler(newConfig: Configuration) {\n debug('[nylas-editor-tabs]', 'configChangedHandler', newConfig, this.config);\n this.formState = {\n ...this.getFormStateFromConfig(newConfig),\n };\n\n if (newConfig.id) {\n this.action = 'update';\n } else {\n this.action = 'create';\n }\n }\n\n connectedCallback() {\n debug('[nylas-editor-tabs]', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('[nylas-editor-tabs]', 'componentWillLoad');\n this.formState = this.getFormStateFromConfig(this.config);\n }\n\n componentDidLoad() {\n debug('[nylas-editor-tabs]', 'componentDidLoad');\n }\n\n disconnectedCallback() {\n debug('[nylas-editor-tabs]', 'disconnectedCallback');\n }\n\n @Listen('valueChanged')\n handleValueChanged(event: CustomEvent) {\n debug('[nylas-editor-tabs]', 'handleValueChanged', event);\n this.formState = { ...this.formState, [event.detail.name]: event.detail.value };\n this.hasUnsavedChanges = true;\n }\n\n getFormStateFromConfig(config?: Configuration) {\n const organizerParticipant = config?.participants?.find(p => p.is_organizer);\n return {\n title: config?.event_booking?.title ?? '',\n description: config?.event_booking?.description ?? '',\n duration: config?.availability?.duration_minutes?.toString() ?? '10',\n availability: organizerParticipant?.availability?.open_hours ?? undefined,\n calendarIds: organizerParticipant?.availability?.calendar_ids ?? [],\n participants: config?.participants ?? [],\n bookingCalendar: organizerParticipant?.booking?.calendar_id ?? organizerParticipant?.email ?? '',\n location: this.config?.event_booking?.location ?? '',\n bookingType: this.config?.event_booking?.booking_type ?? 'booking',\n buffer: this.config?.availability?.availability_rules?.buffer ?? { before: 0, after: 0 },\n availableDaysInFuture: this.config?.scheduler?.available_days_in_future ?? 30,\n minCancellationNotice: this.config?.scheduler?.min_cancellation_notice ?? 0,\n };\n }\n\n updateFormState() {\n const formData = new FormData(this.formRef);\n formData.forEach((value, key) => {\n switch (key) {\n case 'title':\n this.formState.title = value.toString();\n break;\n case 'description':\n this.formState.description = value.toString();\n break;\n case 'duration':\n this.formState.duration = value.toString();\n break;\n case 'availability':\n this.formState.availability = JSON.parse(value.toString());\n break;\n case 'participants':\n this.formState.participants = JSON.parse(value.toString());\n break;\n case 'calendars':\n this.formState.calendarIds = value.toString().split(',');\n break;\n case 'booking-calendar':\n this.formState.bookingCalendar = value.toString();\n break;\n case 'location':\n this.formState.location = value.toString();\n break;\n case 'booking-type':\n this.formState.bookingType = value.toString();\n break;\n case 'buffer-time':\n this.formState.buffer = JSON.parse(value.toString());\n break;\n case 'limit-future-bookings':\n this.formState.availableDaysInFuture = parseInt(value.toString());\n break;\n case 'min-cancellation-notice':\n this.formState.minCancellationNotice = parseInt(value.toString());\n break;\n }\n });\n this.formState = { ...this.formState };\n }\n\n setActiveTab(e: Event, tabName: string) {\n e.preventDefault();\n this.updateFormState();\n this.activeTab = tabName;\n }\n\n formSubmissionHandler = async (event: Event) => {\n event.preventDefault();\n this.isLoading = true;\n this.hasUnsavedChanges = false;\n this.updateFormState();\n const { title, description, duration, availability, calendarIds, bookingCalendar, location, bookingType, buffer, availableDaysInFuture, minCancellationNotice } =\n this.formState;\n\n const organizer = this.config?.participants?.find(p => p.is_organizer);\n\n const configObject: Partial<Configuration> = {\n ...(this.config?.id && { id: this.config.id }),\n version: this.config?.version ?? '1.0.0',\n availability: {\n duration_minutes: duration ? parseInt(duration) : 0,\n availability_rules: {\n availability_method: this.config?.availability?.availability_rules?.availability_method ?? 'collective',\n buffer: buffer || { before: 0, after: 0 },\n default_open_hours: this.config?.availability?.availability_rules?.default_open_hours ?? [],\n round_robin_group_id: this.config?.availability?.availability_rules?.round_robin_group_id ?? '',\n },\n },\n participants: [\n {\n name: organizer?.name ?? organizer?.email ?? this.currentUser?.name ?? this.currentUser?.email ?? '',\n email: organizer?.email ?? this.currentUser?.email ?? '',\n is_organizer: true,\n availability: {\n calendar_ids: calendarIds?.length ? calendarIds : ['primary'],\n open_hours: availability ?? [],\n },\n booking: {\n calendar_id: bookingCalendar && bookingCalendar !== '' ? bookingCalendar : 'primary',\n },\n },\n ],\n event_booking: {\n title: title?.toString() ?? '',\n description: description?.toString() ?? '',\n location: location?.toString() ?? '',\n booking_type: (bookingType?.toString() as BookingType) ?? 'booking',\n },\n scheduler: {\n available_days_in_future: availableDaysInFuture ?? 30,\n min_cancellation_notice: minCancellationNotice ?? 0,\n },\n };\n const resetLoadingState = (_e: CustomEvent) => {\n this.isLoading = false;\n this.changesSaved = true;\n setTimeout(() => {\n this.changesSaved = false;\n }, 5000);\n };\n this.schedulerConfigChanged.emit({ config: configObject, resetLoadingState, action: this.action });\n };\n\n @RegisterComponent<NylasEditorTabs, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-editor-tabs',\n stateToProps: new Map([\n ['schedulerConfig.calendars', 'calendars'],\n ['schedulerConfig.config', 'config'],\n ['schedulerConfig.currentUser', 'currentUser'],\n ]),\n eventToProps: {\n schedulerConfigChanged: async (event: CustomEvent<SchedulerEventDetail>, nylasSchedulerConfigConnector: NylasSchedulerConfigConnector) => {\n const { resetLoadingState, action, config } = event.detail;\n if (resetLoadingState) {\n resetLoadingState(event);\n }\n\n // If we have an ID, we are updating an existing configuration\n if (action === 'update') {\n await nylasSchedulerConfigConnector.schedulerConfig.updateConfiguration(config);\n } else {\n await nylasSchedulerConfigConnector.schedulerConfig.createConfiguration(config);\n }\n },\n },\n fireRegisterEvent: true,\n })\n render() {\n debug('[nylas-editor-tabs]', 'render', this.formState);\n return (\n <Host>\n <form onSubmit={this.formSubmissionHandler} class=\"scheduler-editor\" ref={el => (this.formRef = el as HTMLFormElement)}>\n <div class=\"form-contents\">\n <div class=\"tabs\">\n <button class={{ tab: true, active: this.activeTab == 'eventInfo' }} onClick={e => this.setActiveTab(e, 'eventInfo')}>\n <calendar-info-icon width=\"16\" height=\"16\" />\n Event Info\n </button>\n <button class={{ tab: true, active: this.activeTab == 'availability' }} onClick={e => this.setActiveTab(e, 'availability')}>\n <calendar-patterns-icon width=\"16\" height=\"16\" />\n Availability\n </button>\n <button class={{ tab: true, active: this.activeTab == 'bookingOptions' }} onClick={e => this.setActiveTab(e, 'bookingOptions')}>\n <flow-icon width=\"16\" height=\"16\" />\n Booking Options\n </button>\n </div>\n <div class=\"tab-content\">\n <TabContents formState={this.formState} activeTab={this.activeTab} calendars={this.calendars} id={this.config?.id ?? 'new'} />\n </div>\n </div>\n <div class=\"footer\">\n <p\n class={{\n 'unsaved-changes': this.hasUnsavedChanges && !this.changesSaved,\n 'saved-changes': this.changesSaved,\n }}\n >\n {this.hasUnsavedChanges && !this.changesSaved ? 'Unsaved changes' : this.changesSaved ? 'Changes saved!' : ''}\n </p>\n <button-component type=\"submit\" disabled={this.isLoading}>\n {this.isLoading ? (\n <span>\n Saving\n <loading-icon />{' '}\n </span>\n ) : this.action == 'create' ? (\n 'Create'\n ) : (\n 'Save changes'\n )}\n </button-component>\n </div>\n </form>\n </Host>\n );\n }\n}\n"],"version":3}