@nylas/web-elements 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/nylas-availability-picker/nylas-availability-picker.es.js +202 -191
- package/dist/cdn/nylas-booking-calendar-picker/nylas-booking-calendar-picker.es.js +466 -455
- package/dist/cdn/nylas-booking-confirmation-redirect/nylas-booking-confirmation-redirect.es.js +299 -288
- package/dist/cdn/nylas-booking-confirmation-type/nylas-booking-confirmation-type.es.js +330 -319
- package/dist/cdn/nylas-booking-form/nylas-booking-form.es.js +440 -426
- package/dist/cdn/nylas-booking-form-config/nylas-booking-form-config.es.js +174 -163
- package/dist/cdn/nylas-buffer-time/nylas-buffer-time.es.js +469 -458
- package/dist/cdn/nylas-custom-event-slug/nylas-custom-event-slug.es.js +194 -194
- package/dist/cdn/nylas-editor-tabs/nylas-editor-tabs.es.js +20 -9
- package/dist/cdn/nylas-event-duration/nylas-event-duration.es.js +357 -346
- package/dist/cdn/nylas-event-location/nylas-event-location.es.js +502 -491
- package/dist/cdn/nylas-limit-future-bookings/nylas-limit-future-bookings.es.js +325 -314
- package/dist/cdn/nylas-list-configurations/nylas-list-configurations.es.js +239 -228
- package/dist/cdn/nylas-locale-switch/nylas-locale-switch.es.js +235 -224
- package/dist/cdn/nylas-min-booking-notice/nylas-min-booking-notice.es.js +325 -314
- package/dist/cdn/nylas-min-cancellation-notice/nylas-min-cancellation-notice.es.js +209 -198
- package/dist/cdn/nylas-participant-booking-calendars/nylas-participant-booking-calendars.es.js +249 -238
- package/dist/cdn/nylas-participants-custom-availability/nylas-participants-custom-availability.es.js +801 -790
- package/dist/cdn/nylas-reminder-emails/nylas-reminder-emails.es.js +287 -276
- package/dist/cdn/nylas-reminder-time/nylas-reminder-time.es.js +334 -323
- package/dist/cdn/nylas-scheduler-editor/nylas-scheduler-editor.es.js +23 -12
- package/dist/cdn/nylas-scheduling/nylas-scheduling.es.js +587 -559
- package/dist/cdn/nylas-scheduling-method/nylas-scheduling-method.es.js +275 -264
- package/dist/cdn/nylas-timeslot-interval/nylas-timeslot-interval.es.js +353 -342
- package/dist/cdn/select-dropdown/select-dropdown.es.js +108 -97
- package/dist/cdn/time-period-selector/time-period-selector.es.js +340 -329
- package/dist/cjs/calendar-agenda-fill-icon_48.cjs.entry.js +5 -4
- package/dist/cjs/calendar-agenda-fill-icon_48.cjs.entry.js.map +1 -1
- package/dist/cjs/chevron-icon_3.cjs.entry.js +14 -1
- package/dist/cjs/chevron-icon_3.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/nylas-booked-event-card_12.cjs.entry.js +11 -7
- package/dist/cjs/nylas-booked-event-card_12.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-booking-form.cjs.entry.js +11 -7
- package/dist/cjs/nylas-booking-form.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-custom-event-slug.cjs.entry.js +5 -4
- package/dist/cjs/nylas-custom-event-slug.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-scheduler-editor.cjs.entry.js +2 -1
- package/dist/cjs/nylas-scheduler-editor.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-scheduling.cjs.entry.js +25 -4
- package/dist/cjs/nylas-scheduling.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-web-elements.cjs.js +1 -1
- package/dist/cjs/select-dropdown.cjs.entry.js +14 -1
- package/dist/cjs/select-dropdown.cjs.entry.js.map +1 -1
- package/dist/collection/components/design-system/select-dropdown/select-dropdown.js +33 -1
- package/dist/collection/components/design-system/select-dropdown/select-dropdown.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-booking-form/nylas-booking-form.js +17 -7
- package/dist/collection/components/scheduler/nylas-booking-form/nylas-booking-form.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-scheduling/nylas-scheduling.js +26 -5
- package/dist/collection/components/scheduler/nylas-scheduling/nylas-scheduling.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-custom-event-slug/nylas-custom-event-slug.css +6 -2
- package/dist/collection/components/scheduler-editor/nylas-custom-event-slug/nylas-custom-event-slug.js +4 -3
- package/dist/collection/components/scheduler-editor/nylas-custom-event-slug/nylas-custom-event-slug.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/ExpressFlow.js +2 -1
- package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/ExpressFlow.js.map +1 -1
- package/dist/components/nylas-booking-form2.js +12 -8
- package/dist/components/nylas-booking-form2.js.map +1 -1
- package/dist/components/nylas-custom-event-slug2.js +5 -4
- package/dist/components/nylas-custom-event-slug2.js.map +1 -1
- package/dist/components/nylas-scheduler-editor.js +2 -1
- package/dist/components/nylas-scheduler-editor.js.map +1 -1
- package/dist/components/nylas-scheduling.js +25 -4
- package/dist/components/nylas-scheduling.js.map +1 -1
- package/dist/components/select-dropdown2.js +14 -1
- package/dist/components/select-dropdown2.js.map +1 -1
- package/dist/esm/calendar-agenda-fill-icon_48.entry.js +5 -4
- package/dist/esm/calendar-agenda-fill-icon_48.entry.js.map +1 -1
- package/dist/esm/chevron-icon_3.entry.js +14 -1
- package/dist/esm/chevron-icon_3.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/nylas-booked-event-card_12.entry.js +11 -7
- package/dist/esm/nylas-booked-event-card_12.entry.js.map +1 -1
- package/dist/esm/nylas-booking-form.entry.js +11 -7
- package/dist/esm/nylas-booking-form.entry.js.map +1 -1
- package/dist/esm/nylas-custom-event-slug.entry.js +5 -4
- package/dist/esm/nylas-custom-event-slug.entry.js.map +1 -1
- package/dist/esm/nylas-scheduler-editor.entry.js +2 -1
- package/dist/esm/nylas-scheduler-editor.entry.js.map +1 -1
- package/dist/esm/nylas-scheduling.entry.js +25 -4
- package/dist/esm/nylas-scheduling.entry.js.map +1 -1
- package/dist/esm/nylas-web-elements.js +1 -1
- package/dist/esm/select-dropdown.entry.js +14 -1
- package/dist/esm/select-dropdown.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-booking-form.entry.js +11 -7
- package/dist/nylas-web-elements/nylas-booking-form.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-custom-event-slug.entry.js +5 -4
- package/dist/nylas-web-elements/nylas-custom-event-slug.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-scheduler-editor.entry.js +2 -1
- package/dist/nylas-web-elements/nylas-scheduler-editor.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-scheduling.entry.js +25 -4
- package/dist/nylas-web-elements/nylas-scheduling.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-web-elements.esm.js +1 -1
- package/dist/nylas-web-elements/{p-670e4bd1.entry.js → p-795ebe60.entry.js} +2 -2
- package/dist/nylas-web-elements/p-795ebe60.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-d32d9a1d.entry.js → p-8dee5c91.entry.js} +2 -2
- package/dist/nylas-web-elements/p-8dee5c91.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-8fdc5d3d.entry.js +2 -0
- package/dist/nylas-web-elements/p-8fdc5d3d.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-efa03f8c.entry.js +2 -0
- package/dist/nylas-web-elements/p-efa03f8c.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-fbec0698.entry.js +2 -0
- package/dist/nylas-web-elements/p-fbec0698.entry.js.map +1 -0
- package/dist/nylas-web-elements/select-dropdown.entry.js +14 -1
- package/dist/nylas-web-elements/select-dropdown.entry.js.map +1 -1
- package/dist/types/components/design-system/select-dropdown/select-dropdown.d.ts +6 -0
- package/dist/types/components/scheduler/nylas-booking-form/nylas-booking-form.d.ts +6 -0
- package/dist/types/components/scheduler/nylas-scheduling/nylas-scheduling.d.ts +1 -0
- package/dist/types/components/scheduler-editor/nylas-custom-event-slug/nylas-custom-event-slug.d.ts +0 -1
- package/dist/types/components.d.ts +15 -0
- package/package.json +1 -1
- package/dist/nylas-web-elements/p-14e194b2.entry.js +0 -2
- package/dist/nylas-web-elements/p-14e194b2.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-169a3f6d.entry.js +0 -2
- package/dist/nylas-web-elements/p-169a3f6d.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-670e4bd1.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-8ad09f72.entry.js +0 -2
- package/dist/nylas-web-elements/p-8ad09f72.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-d32d9a1d.entry.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["nylasBookedEventCardCss","NylasBookedEventCardStyle0","NylasBookedEventCard","this","handleCancelBookingButtonClicked","startTime","Date","selectedTimeslot","start_time","minCancellationNotice","configSettings","scheduler","min_cancellation_notice","dateTillCancellation","getTime","cancelBookedEventValidationError","emit","error","title","message","cancelBookingButtonClicked","bookingId","eventInfo","booking_id","handleRescheduleButtonClicked","errorHandler","rescheduleBookedEventError","rescheduleButtonClicked","getPaticipantType","type","Intl","DateTimeFormat","resolvedOptions","timeZone","navigator","language","connectedCallback","disconnectedCallback","componentWillLoad","debug","componentDidLoad","console","warn","bookingInfo","render","bookingType","booking_type","isManualConfirmation","h","Host","key","part","class","TIMEZONE_MAP","selectedTimezone","slot","rescheduleBookingId","isLoading","i18next","t","capitalizeFirstLetter","toLocaleDateString","LANGUAGE_CODE_MAP","selectedLanguage","dateStyle","toLocaleTimeString","undefined","timeStyle","end_time","footer","hide_cancellation_options","hide_rescheduling_options","variant","onClick","__decorate","RegisterComponent","name","stateToProps","Map","eventToProps","async","event","nylasSchedulerConnector","setCancel","detail","result","setReschedule","_nylasSchedulerConnector","fireRegisterEvent","nylasBookingFormCss","NylasBookingFormStyle0","emailRegex","NylasBookingForm","handleGuestChange","guestIndex","email","resetGuestEmailError","guests","guestEmails","sanitizeHtml","handleGuestBlur","guestEmailErrors","field","test","addGuestButtonClickedHandler","e","preventDefault","removeGuestButtonClickHandler","splice","handleBackButtonClicked","backButtonLoading","backButtonClicked","bookButtonClickedHandler","formSubmittedEvent","bookingFormSubmitted","defaultPrevented","primaryParticipant","isNameValid","validationError","bookingFormError","description","isEmailValid","length","hasError","forEach","i","map","trim","bookingInfoAdditionalFields","additionalFields","detailsConfirmed","updateAdditionalFields","value","bookingInfoChangedHandler","newValue","changeName","sanitize","nameChanged","changeEmail","emailChanged","errors","nylasFormInputChangedHandler","selectOptionChangedHandler","switchToggledHandler","checked","checkboxToggledHandler","radioChangedHandler","onSubmit","noValidate","label","id","defaultValue","placeholder","required","requiredError","patternError","pattern","hide_additional_guests","index","maxLength","onBlur","target","onInput","Object","entries","additional_fields","sort","a","b","order","x","withSearch","options","option","exportparts","defaultSelectedValue","disabled","_event","toggleAdditionalData","setParticipantName","setParticipantEmail","nylasCancelBookingFormCss","NylasCancelBookingFormStyle0","NylasCancelBookingForm","handleGoBackClicked","goBackButtonClicked","handleSubmitCancelBooking","triggerValidation","cancellationReason","cancellationError","cancelBookingFormError","cancelBookedEventError","cancelBookingId","cancelBookingFormSubmitted","action","reason","rejectBookingId","cancellation_policy","configSettingsChangedHandler","cancellationPolicy","handleNylasFormInputChanged","cancelBooking","updateBooking","status","goBack","nylasCancelledEventCardCss","NylasCancelledEventCardStyle0","NylasCancelledEventCard","handleCloseClicked","isClosing","cancelledEventCardError","closeCancelEventCardClicked","cancelledEventInfo","organizer","_","nylasschedulerconnector","resetCancel","_nylasschedulerconnector","nylasConfirmedEventCardCss","NylasConfirmedEventCardStyle0","NylasConfirmedEventCard","confirmedEventCardError","closeConfirmEventCardClicked","confirmedEventInfo","resetConfirm","t0","t1","timeInterval","floori","offseti","count","interval","date","arguments","floor","ceil","round","d0","d1","offset","step","Math","range","start","stop","previous","push","filter","setTime","end","every","isFinite","d","durationSecond","durationMinute","durationHour","durationDay","timeDay","setHours","setDate","getDate","getTimezoneOffset","setUTCHours","setUTCDate","getUTCDate","nylasDatePickerCss","NylasDatePickerStyle0","NylasDatePicker","selectedDate","getDates","configSettingsChanged","newConfigSettings","nextMonth","month","getFullYear","getMonth","availableDaysInFuture","available_days_in_future","endDate","addDaysToCurrentDate","disableNextMonthButton","selectedLanguageChanged","newLanguage","changeLanguage","lastDayOfMonth","getLastDayOfMonth","firstDayOfMonth","getFirstDayOfMonth","getDay","selectDate","dateSelected","changeMonth","change","dates","monthChanged","isSelected","selectableDates","isSameDay","isDisabled","find","eventDuration","convertMinutesToHoursAndMinutes","translateMonth","toLocaleLowerCase","year","button","day","isSameMonth","style","animationDelay","selected","nylasLocaleSwitchCss","NylasLocaleSwitchStyle0","NylasLocaleSwitch","changeTimezone","timezone","timezoneChanged","languageChanged","nylasFormDropdownChangedHandler","getTimezoneLabelHTML","display","alignItems","justifyContent","width","fontSize","fontWeight","color","timezoneOptions","keys","labelHTML","languageOptions","LANGUAGE_MAP","defaultSelectedOption","op","height","lang","selectTimezone","selectLanguage","iconCss","NylasLogoStyle0","NylasLogo","viewBox","fill","xmlns","transform","nylasNotificationCss","NylasNotificationStyle0","NylasNotification","onError","notification","handleNotification","onWarning","onInfo","onSuccess","isChildOf","parentHost","parent","host","parentNode","ShadowRoot","ttl","allowedCategories","includes","category","notifications","window","setTimeout","notif","dismissNotification","Fragment","nylasOrganizerConfirmationCardCss","NylasOrganizerConfirmationCardStyle0","NylasOrganizerConfirmationCard","handleConfirmBookingButtonClicked","confirmBookingError","organizerConfirmationBookingId","confirmBookingButtonClicked","handleRejectBookingButtonClicked","rejectBookingButtonClicked","resetAction","setReject","nylasSelectedEventCardCss","NylasSelectedEventCardStyle0","NylasSelectedEventCard","timeFormat","hour","minute","format","endTime","nylasTimeslotPickerCss","NylasTimeslotPickerStyle0","NylasTimeslotPicker","handleConfirmedTimeslot","timeslot","timeslotConfirmed","handleMouseEnter","hoveredTimeslotIndex","handleMouseLeave","selectedDateChanged","newVal","selectedTimeslotIndex","availableTimes","availability","times","availabilityChanged","getTimeslotId","onClickSelectTime","timeslotSelected","emails","getTimeSlotLabel","Array","time","onMouseEnter","onMouseLeave","selectTime"],"sources":["src/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.scss?tag=nylas-booked-event-card&encapsulation=shadow","src/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.tsx","src/components/scheduler/nylas-booking-form/nylas-booking-form.scss?tag=nylas-booking-form&encapsulation=shadow","src/components/scheduler/nylas-booking-form/nylas-booking-form.tsx","src/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.scss?tag=nylas-cancel-booking-form&encapsulation=shadow","src/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.tsx","src/components/scheduler/nylas-cancelled-event-card/nylas-cancelled-event-card.scss?tag=nylas-cancelled-event-card&encapsulation=shadow","src/components/scheduler/nylas-cancelled-event-card/nylas-cancelled-event-card.tsx","src/components/scheduler/nylas-confirmed-event-card/nylas-confirmed-event-card.scss?tag=nylas-confirmed-event-card&encapsulation=shadow","src/components/scheduler/nylas-confirmed-event-card/nylas-confirmed-event-card.tsx","../../node_modules/.pnpm/d3-time@3.1.0/node_modules/d3-time/src/interval.js","../../node_modules/.pnpm/d3-time@3.1.0/node_modules/d3-time/src/duration.js","../../node_modules/.pnpm/d3-time@3.1.0/node_modules/d3-time/src/day.js","src/components/scheduler/nylas-date-picker/nylas-date-picker.scss?tag=nylas-date-picker&encapsulation=shadow","src/components/scheduler/nylas-date-picker/nylas-date-picker.tsx","src/components/scheduler/nylas-locale-switch/nylas-locale-switch.scss?tag=nylas-locale-switch&encapsulation=shadow","src/components/scheduler/nylas-locale-switch/nylas-locale-switch.tsx","src/common/icons/icon.css?tag=nylas-logo&encapsulation=scoped","src/common/icons/nylas-logo.tsx","src/components/scheduler/nylas-notification/nylas-notification.scss?tag=nylas-notification&encapsulation=shadow","src/components/scheduler/nylas-notification/nylas-notification.tsx","src/components/scheduler/nylas-organizer-confirmation-card/nylas-organizer-confirmation-card.scss?tag=nylas-organizer-confirmation-card&encapsulation=shadow","src/components/scheduler/nylas-organizer-confirmation-card/nylas-organizer-confirmation-card.tsx","src/components/scheduler/nylas-selected-event-card/nylas-selected-event-card.scss?tag=nylas-selected-event-card&encapsulation=shadow","src/components/scheduler/nylas-selected-event-card/nylas-selected-event-card.tsx","src/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.scss?tag=nylas-timeslot-picker&encapsulation=shadow","src/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.tsx"],"sourcesContent":["@import '../../../common/styles/variables.scss';\n\n:host {\n display: block;\n}\n\n.nylas-booked-event-card {\n height: inherit;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n align-items: center;\n font-family: var(--nylas-font-family);\n}\n\n.event-card-wrapper {\n display: flex;\n align-items: center;\n flex-direction: column;\n background-color: var(--nylas-base-0);\n color: var(--nylas-base-900);\n border-radius: var(--nylas-border-radius-3x);\n position: relative;\n margin-top: 1rem;\n margin-bottom: 2rem;\n width: 424px;\n\n @media #{$mobile} {\n width: 100%;\n border-radius: 0px;\n }\n\n box-shadow:\n 0px 1px 4px rgba(0, 0, 0, 0.1),\n 0px 3px 6px rgba(0, 0, 0, 0.06);\n}\n\n.calendar-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 3rem;\n height: 3rem;\n border-radius: 50%;\n position: absolute;\n top: -1.25rem;\n left: 50%;\n transform: translateX(-50%);\n background-color: var(--nylas-base-0);\n border: 1px solid var(--nylas-base-200);\n color: var(--nylas-base-700);\n}\n\n.booked-event-header {\n margin: 1.5rem 0;\n overflow-wrap: anywhere;\n display: flex;\n align-items: center;\n flex-direction: column;\n font-size: 1rem;\n font-weight: 400;\n border-bottom: 1px solid var(--nylas-base-200);\n width: inherit;\n padding: 0 0 1.5rem;\n\n h2 {\n color: var(--nylas-base-600);\n margin-top: 1.5rem;\n margin-bottom: 0.25rem;\n font-size: 1.125rem;\n font-weight: 600;\n }\n\n .card-description {\n text-align: center;\n }\n}\n\n.booking-date-time,\n.booking-participants {\n padding: 0 1rem;\n margin-top: 1.5rem;\n margin-left: 3rem;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n align-self: flex-start;\n position: relative;\n\n svg {\n color: var(--nylas-base-700);\n position: absolute;\n left: -10px;\n }\n\n .block {\n display: block;\n }\n\n h3 {\n color: var(--nylas-base-600);\n margin: 0;\n font-size: 16px;\n font-weight: 600;\n line-height: 1.25rem;\n text-align: justify;\n margin-bottom: 4px;\n }\n\n p {\n font-size: 16px;\n margin: 0;\n font-weight: 400;\n text-align: justify;\n color: var(--nylas-base-800);\n }\n}\n\n.booking-participants {\n margin-bottom: 1.5rem;\n}\n\n.booked-event-timezone {\n display: flex;\n color: var(--nylas-base-600);\n margin-bottom: 1.5rem;\n gap: 4px;\n margin: 2rem;\n align-items: center;\n align-self: flex-end;\n}\n\n.button-container {\n width: inherit;\n}\n\n.footer {\n padding: 0.5rem;\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 0.5rem;\n box-sizing: border-box;\n background-color: var(--nylas-base-25);\n border-top: 1px solid var(--nylas-base-200);\n width: 100%;\n border-radius: 0 0 var(--nylas-border-radius-2x) var(--nylas-border-radius-2x);\n\n &.no-template-cols {\n grid-template-columns: 1fr;\n }\n\n &.no-footer {\n display: none;\n }\n}\n\nsp-divider {\n background-color: var(--nylas-base-200);\n height: 1px;\n}\n\ncalendar-check-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { Component, EventEmitter, h, Host, Prop } from '@stencil/core';\nimport { ConfigSettings, NylasSchedulerBookingData, NylasSchedulerConnector } from '../../..';\nimport { NylasScheduling } from '../nylas-scheduling/nylas-scheduling';\nimport { capitalizeFirstLetter, debug } from '@/utils/utils';\nimport { LANGUAGE_CODE_MAP, TIMEZONE_MAP } from '@/common/constants';\nimport { NylasEvent } from '@/common/types';\nimport { Event } from '@stencil/core';\nimport { NylasSchedulerErrorResponse, Timeslot } from '@nylas/core';\nimport i18next from '@/utils/i18n';\n/**\n * The `nylas-booked-event-card` component is a UI component that displays the booked event card.\n *\n * @part nbec - The booked event card host.\n * @part nbec__card - The booked event card.\n * @part nbec__title - The title of the booked event card.\n * @part nbec__description - The description of the booked event card.\n * @part nbec__button-outline - The cancel & reschedule button CTA.\n * @part nbec__cancel-cta - The cancel button CTA.\n * @part nbec__reschedule-cta - The reschedule button CTA.\n */\n@Component({\n tag: 'nylas-booked-event-card',\n styleUrl: 'nylas-booked-event-card.scss',\n shadow: true,\n})\nexport class NylasBookedEventCard {\n /**\n * The booked event.\n */\n @Prop() readonly eventInfo!: NylasEvent;\n\n /**\n * Booking flow type.\n */\n @Prop() readonly rescheduleBookingId?: string;\n\n /**\n * The booking info used to book / reschedule the event.\n */\n @Prop() readonly bookingInfo?: NylasSchedulerBookingData;\n\n /**\n * The selected timezone.\n */\n @Prop() readonly selectedTimezone: string = Intl.DateTimeFormat().resolvedOptions().timeZone;\n\n /**\n * The selected timeslot.\n */\n @Prop() readonly selectedTimeslot!: Timeslot;\n\n /**\n * The config settings for the scheduler.\n */\n @Prop() readonly configSettings?: ConfigSettings;\n\n /**\n * The loading state prop. Used to display loading state when fetching availability.\n */\n @Prop() readonly isLoading?: boolean;\n\n /**\n * The selected language.\n */\n @Prop({ attribute: 'selected-language' }) readonly selectedLanguage: string = navigator.language;\n\n /**\n * Cancel booking button clicked event.\n */\n @Event() readonly cancelBookingButtonClicked!: EventEmitter<{ bookingId: string }>;\n\n /**\n * Reschedule button clicked event.\n * */\n @Event() readonly rescheduleButtonClicked!: EventEmitter<{ bookingId: string; errorHandler?: (error: NylasSchedulerErrorResponse) => void }>;\n\n /**\n * This event is fired when an error occurs while rescheduling the booking.\n */\n @Event() readonly rescheduleBookedEventError!: EventEmitter<NylasSchedulerErrorResponse>;\n\n /**\n * This event is fired when an error occurs while cancelling the booking.\n */\n @Event() readonly cancelBookedEventValidationError!: EventEmitter<{\n error: {\n title: string;\n message: string;\n };\n }>;\n\n connectedCallback() {}\n\n disconnectedCallback() {}\n\n async componentWillLoad() {\n debug(`[nylas-booked-event-card] Component will load`);\n }\n\n async componentDidLoad() {\n debug(`[nylas-booked-event-card] Component did load`);\n if (!this.eventInfo) {\n console.warn('[nylas-booked-event-card] \"eventInfo\" prop missing. Please provide the event info to display the event details in the booked event card component.');\n }\n if (!this.bookingInfo) {\n console.warn('[nylas-booked-event-card] \"bookingInfo\" prop missing. Please provide the booking info to display the guest details in the booked event card component.');\n }\n }\n\n private handleCancelBookingButtonClicked = () => {\n const startTime = new Date(this.selectedTimeslot.start_time);\n const minCancellationNotice = this.configSettings?.scheduler?.min_cancellation_notice;\n const dateTillCancellation = startTime.getTime() - minCancellationNotice * 60 * 1000;\n if (dateTillCancellation < new Date().getTime()) {\n this.cancelBookedEventValidationError.emit({\n error: {\n title: 'Cancellation Error',\n message: `You cannot cancel the booking within ${minCancellationNotice} minutes of the event.`,\n },\n });\n } else {\n this.cancelBookingButtonClicked.emit({ bookingId: this.eventInfo.booking_id });\n }\n };\n\n private handleRescheduleButtonClicked = () => {\n const errorHandler = (error: NylasSchedulerErrorResponse) => {\n this.rescheduleBookedEventError.emit(error);\n };\n this.rescheduleButtonClicked.emit({ bookingId: this.eventInfo.booking_id, errorHandler });\n };\n\n getPaticipantType = (type: string) => {\n switch (type) {\n case 'host':\n return 'Host';\n case 'you':\n return 'You';\n default:\n return '';\n }\n };\n\n @RegisterComponent<NylasBookedEventCard, NylasSchedulerConnector, Exclude<NylasScheduling['stores'], undefined>>({\n name: 'nylas-booked-event-card',\n stateToProps: new Map([\n ['scheduler.bookingInfo', 'bookingInfo'],\n ['scheduler.rescheduleBookingId', 'rescheduleBookingId'],\n ['scheduler.selectedTimezone', 'selectedTimezone'],\n ['scheduler.selectedTimeslot', 'selectedTimeslot'],\n ['scheduler.isLoading', 'isLoading'],\n ['scheduler.selectedLanguage', 'selectedLanguage'],\n ['scheduler.configSettings', 'configSettings'],\n ]),\n eventToProps: {\n cancelBookingButtonClicked: async (event: CustomEvent<{ bookingId: string }>, nylasSchedulerConnector: NylasSchedulerConnector) => {\n nylasSchedulerConnector.scheduler.setCancel(event.detail.bookingId);\n },\n rescheduleButtonClicked: async (\n event: CustomEvent<{ bookingId: string; errorHandler?: (error: NylasSchedulerErrorResponse) => void }>,\n nylasSchedulerConnector: NylasSchedulerConnector,\n ) => {\n const result = await nylasSchedulerConnector.scheduler.setReschedule(event.detail.bookingId);\n const { errorHandler } = event.detail;\n if (errorHandler && (!result || 'error' in result)) {\n errorHandler(result);\n }\n },\n rescheduleBookedEventError: async (event: CustomEvent<NylasSchedulerErrorResponse>, _nylasSchedulerConnector: NylasSchedulerConnector) => {\n debug('nylas-booked-event-card', 'rescheduleBookedEventError', event.detail);\n },\n cancelBookedEventValidationError: async (event: CustomEvent<{ error: { title: string; message: string } }>, _nylasSchedulerConnector: NylasSchedulerConnector) => {\n debug('nylas-booked-event-card', 'cancelBookedEventValidationError', event.detail);\n },\n },\n fireRegisterEvent: true,\n })\n render() {\n const bookingType = this.configSettings?.booking_type;\n const isManualConfirmation = bookingType && bookingType !== 'booking';\n\n return (\n <Host part=\"nbec\">\n <div class=\"nylas-booked-event-card\">\n <div class=\"booked-event-timezone\">\n <globe-icon></globe-icon>\n {TIMEZONE_MAP[this.selectedTimezone]}\n </div>\n <div class=\"event-card-wrapper\" part=\"nbec__card\">\n <div class=\"calendar-icon\">\n <calendar-check-icon />\n </div>\n <div class=\"booked-event-header\">\n <h2 slot=\"card-title\" part=\"nbec__title\">\n {!!this.rescheduleBookingId && !this.isLoading\n ? `${i18next.t('bookingRescheduled')}`\n : isManualConfirmation && !this.isLoading\n ? `${i18next.t('bookingSent')}`\n : `${i18next.t('bookingConfirmed')}`}\n !\n </h2>\n <div class=\"card-description\" part=\"nbec__description\">\n {isManualConfirmation ? i18next.t('bookingSentDescription') : <span>{i18next.t('bookingConfirmedDescription')}</span>}\n </div>\n </div>\n <div class=\"booking-date-time\">\n <checkmark-circle-icon></checkmark-circle-icon>\n <h3>{i18next.t('bookingDateAndTimeHeader')}</h3>\n <p>\n {this.selectedTimeslot?.start_time\n ? capitalizeFirstLetter(new Date(this.selectedTimeslot?.start_time).toLocaleDateString(LANGUAGE_CODE_MAP[this.selectedLanguage], { dateStyle: 'full' }))\n : '-'}{' '}\n <br />\n {new Date(this.selectedTimeslot?.start_time).toLocaleTimeString(undefined, { timeStyle: 'short' })} -{' '}\n {new Date(this.selectedTimeslot?.end_time).toLocaleTimeString(undefined, { timeStyle: 'short' })}\n </p>\n </div>\n <div class=\"booking-participants\">\n {/* <people-icon></people-icon>\n <h3>All participants</h3>\n {this.eventInfo?.participants && (\n <p>\n {this.eventInfo?.participants?.map((participant: NylasEvent['participants'][0]) => {\n return (\n <span class=\"block\">\n {participant.email} {this.getPaticipantType(participant.type) && `(${this.getPaticipantType(participant.type)})`}\n </span>\n );\n })}\n </p>\n )} */}\n </div>\n\n {!isManualConfirmation && (\n <div class=\"button-container\">\n <div\n class={{\n 'footer': true,\n 'no-footer':\n (this.configSettings?.scheduler?.hide_cancellation_options && this.configSettings?.scheduler?.hide_rescheduling_options) ||\n this.configSettings?.booking_type === 'organizer-confirmation',\n 'no-template-cols': this.configSettings?.scheduler?.hide_cancellation_options || this.configSettings?.scheduler?.hide_rescheduling_options,\n }}\n >\n {!this.configSettings?.scheduler?.hide_cancellation_options && (\n <button-component variant={'destructive'} onClick={this.handleCancelBookingButtonClicked} part=\"nbec__button-outline nbec__cancel-cta\">\n {`${i18next.t('cancelBookingButton')}`}\n </button-component>\n )}\n {!this.configSettings?.scheduler?.hide_rescheduling_options && (\n <button-component variant={'basic'} onClick={this.handleRescheduleButtonClicked} part=\"nbec__button-outline nbec__reschedule-cta\">\n {`${i18next.t('rescheduleBookingButton')}`}\n </button-component>\n )}\n </div>\n </div>\n )}\n </div>\n </div>\n </Host>\n );\n }\n}\n","@import '../../../common/mixins/inputs.scss';\n@import '../../../common/styles/variables.scss';\n\n:host {\n display: block;\n height: 100%;\n}\n\n.nylas-booking-form {\n width: 100%;\n padding: 1.5rem;\n box-sizing: border-box;\n height: 450px;\n overflow-y: auto;\n height: 100%;\n}\n\nform {\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n align-items: center;\n}\n\nsp-textfield {\n --spectrum-corner-radius-100: var(--nylas-border-radius-2x); // Set guest input radius\n --spectrum-textfield-border-color: var(--nylas-base-300);\n position: relative;\n width: 100%;\n height: 48px;\n margin-bottom: 16px;\n color: var(--nylas-base-500);\n}\n\n.cta {\n width: 100%;\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 0.5rem;\n\n @media #{$mobile} {\n grid-template-columns: 1fr;\n }\n\n align-items: flex-start;\n justify-content: space-between;\n gap: 0.5rem;\n padding: 14px;\n box-sizing: border-box;\n border-top: 1px solid var(--nylas-base-200);\n}\n\n.input-wrapper {\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 4px;\n margin-bottom: 1rem;\n\n input::placeholder {\n color: var(--nylas-base-300);\n }\n\n label,\n input {\n font-family: var(--nylas-font-family);\n font-size: 16px;\n }\n\n .help-text {\n margin: 0;\n color: var(--nylas-error);\n }\n}\n\n.button-wrapper {\n width: 100%;\n align-items: flex-start;\n height: max-content;\n position: relative;\n}\n\n.button-content {\n display: flex;\n gap: 4px;\n align-items: center;\n}\n\nsp-infield-button {\n --spectrum-infield-button-background-color: transparent;\n --spectrum-infield-button-background-color-hover: transparent;\n --spectrum-infield-button-background-color-active: transparent;\n --spectrum-infield-button-border-color: transparent;\n --spectrum-infield-button-border-width: 1px;\n --spectrum-infield-button-border-radius: 0;\n color: var(--nylas-base-600);\n background: transparent;\n border: none;\n outline: 1px solid var(--nylas-base-300);\n border-radius: 0 var(--nylas-border-radius-2x) var(--nylas-border-radius-2x) 0;\n height: 52px;\n width: 52px;\n display: flex;\n position: absolute;\n right: 0;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n\n sp-icon-cross300 {\n color: var(--nylas-base-600);\n }\n\n &.error {\n border-width: 2px;\n border-color: var(--nylas-error);\n }\n}\n\ninput[type='text'],\ninput[type='email'] {\n @include textfield;\n\n &.guest-email {\n color: var(--nylas-base-900);\n padding-right: 52px; // Infield button width\n }\n}\n\nlabel {\n @include input-label;\n}\n\nbutton-component.remove-guest {\n position: absolute;\n height: 51px;\n right: 0;\n\n &.error {\n button {\n border-color: var(--nylas-error);\n }\n }\n\n button {\n height: inherit;\n border-top-left-radius: initial;\n border-bottom-left-radius: initial;\n border: none !important;\n border-left: 1px solid var(--nylas-base-300) !important;\n\n &:hover,\n &:focus {\n outline: 1px solid var(--nylas-primary) !important;\n color: var(--nylas-primary);\n }\n }\n}\n\nbutton-component.back {\n button {\n --dot-color: var(--nylas-base-800);\n }\n}\n\n.guest-email-input {\n position: relative;\n display: flex;\n width: 100%;\n}\n","import { Component, Element, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { RegisterComponent } from '@/common/register-component';\nimport { ConfigSettings, NylasSchedulerConnector } from '../../..';\nimport type { NylasEvent, NylasSchedulerBookingData } from '../../..';\nimport { NylasScheduling } from '../nylas-scheduling/nylas-scheduling';\nimport { debug, sanitize } from '@/utils/utils';\nimport { Notification, NylasSchedulerBookingParticipant } from '@nylas/core';\nimport sanitizeHtml from 'sanitize-html';\nimport i18next from '@/utils/i18n';\n\nconst emailRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;\n\n/**\n * The `nylas-booking-form` component is a UI component that allows users to book an event.\n *\n * The booking form component.\n * @part nbf - The booking form host.\n * @part nbf__input-textfield - The input textfield.\n * @part nbf__button-ghost - The ghost button.\n * @part nbf__button-outline - The outline button.\n * @part nbf__button-primary - The primary button.\n * @part nbf__input-wrapper - The input wrapper.\n * @part nbf__checkbox-component - The checkbox component.\n * @part nbf__radio-button-group - The radio button group.\n * @part nbf__textarea-component - The textarea component.\n * @part nbf__dropdown - The dropdown component.\n * @part nbf__dropdown-button - The dropdown button.\n * @part nbf__dropdown-content - The dropdown content.\n *\n */\n@Component({\n tag: 'nylas-booking-form',\n styleUrl: 'nylas-booking-form.scss',\n shadow: true,\n})\nexport class NylasBookingForm {\n /**\n * The host element\n */\n @Element() readonly host!: HTMLElement;\n\n /**\n * The loading state.\n */\n @Prop() readonly isLoading?: boolean;\n\n /**\n * The booking info.\n */\n @Prop() readonly bookingInfo?: NylasSchedulerBookingData;\n\n /**\n * The booked event (Used to track if a booking is created in an eventOverride).\n */\n @Prop() readonly eventInfo?: NylasEvent;\n\n /**\n * The config settings for the scheduler.\n */\n @Prop() readonly configSettings?: ConfigSettings;\n\n /**\n * This event is fired when the name is changed.\n */\n @Event() nameChanged!: EventEmitter<string>;\n\n /**\n * This event is fired when the email is changed.\n */\n @Event() emailChanged!: EventEmitter<string>;\n\n /**\n * This event is fired when the cancel button is clicked.\n */\n @Event() backButtonClicked!: EventEmitter<boolean>;\n\n /**\n * This event is fired when the book button is clicked and the form validation is complete and successful.\n * This event is fired before the booking request is sent.\n */\n @Event() detailsConfirmed!: EventEmitter<NylasSchedulerBookingData>;\n\n /**\n * This event is fired when an error occurs in the booking form validation.\n */\n @Event() bookingFormError!: EventEmitter<Partial<Notification>>;\n\n /**\n * This event is fired immediately after the book button is clicked.\n * The booking form validation is not complete at this point.\n */\n @Event() bookingFormSubmitted!: EventEmitter<void>;\n\n /**\n * The name of the user.\n */\n @State() name: string = '';\n\n /**\n * The email address of the user.\n */\n @State() email: string = '';\n\n /**\n * The guests of the user.\n */\n @State() guestEmails: string[] = [];\n\n /**\n * Guest email input errors.\n */\n @State() guestEmailErrors: { [key: number]: string } = {};\n\n /**\n * State to check if name is valid.\n */\n @State() isNameValid: boolean = true;\n\n /**\n * State to check if email is valid.\n */\n @State() isEmailValid: boolean = true;\n\n @State() additionalFields?: Record<string, string> = {};\n\n /**\n * Error message state.\n */\n @State() validationError: { name: string; email: string } = { name: '', email: '' };\n\n @State() backButtonLoading: boolean = false;\n\n connectedCallback() {}\n\n disconnectedCallback() {}\n\n componentWillLoad() {\n debug('nylas-booking-form', 'componentWillLoad', this.bookingInfo);\n if (this.bookingInfo && this.bookingInfo?.primaryParticipant) {\n this.name = this.bookingInfo.primaryParticipant?.name;\n this.email = this.bookingInfo.primaryParticipant?.email;\n }\n }\n\n @Watch('bookingInfo')\n bookingInfoChangedHandler(newValue: NylasSchedulerBookingData | undefined) {\n if (newValue && newValue.primaryParticipant) {\n this.name = newValue.primaryParticipant.name;\n this.email = newValue.primaryParticipant.email;\n }\n }\n\n /**\n * Change the name.\n * @param name The name to select.\n */\n changeName(name: string) {\n // Reset the validation error\n this.isNameValid = true;\n this.validationError.name = '';\n\n this.name = sanitize(name);\n this.nameChanged.emit(name);\n }\n\n /**\n * Change the email.\n * @param email The email to select.\n */\n changeEmail(email: string) {\n // Reset the validation error\n this.isEmailValid = true;\n this.validationError.email = '';\n\n this.email = sanitizeHtml(email);\n this.emailChanged.emit(email);\n }\n\n resetGuestEmailError(guestIndex: number) {\n const errors = { ...this.guestEmailErrors };\n delete errors[guestIndex];\n this.guestEmailErrors = { ...errors };\n }\n\n /**\n * Handle guest emails changed.\n */\n handleGuestChange = (guestIndex: number, email: string) => {\n // Reset the validation error\n this.resetGuestEmailError(guestIndex);\n const guests = [...this.guestEmails];\n guests[guestIndex] = sanitizeHtml(email);\n this.guestEmails = [...guests];\n };\n\n /**\n * Handle guest input blur.\n */\n handleGuestBlur = (guestIndex: number, email: string) => {\n this.resetGuestEmailError(guestIndex);\n\n if (email === '') {\n this.guestEmailErrors[guestIndex] = i18next.t('fieldRequired', { field: i18next.t('email') });\n return;\n }\n if (!emailRegex.test(email)) {\n this.guestEmailErrors[guestIndex] = i18next.t('invalidInputFormat', { field: i18next.t('email') });\n return;\n }\n this.handleGuestChange(guestIndex, email);\n };\n\n /**\n * Handle add guest button clicked.\n */\n addGuestButtonClickedHandler = e => {\n e.preventDefault();\n this.guestEmails = [...this.guestEmails, ''];\n };\n\n /**\n * Handle remove guest button clicked.\n */\n removeGuestButtonClickHandler = (e: Event, guestIndex: number) => {\n e.preventDefault();\n this.resetGuestEmailError(guestIndex);\n\n const guests = [...this.guestEmails];\n guests.splice(guestIndex, 1);\n this.guestEmails = [...guests];\n };\n\n /**\n * Handle back button clicked.\n */\n handleBackButtonClicked = e => {\n e.preventDefault();\n this.backButtonLoading = true;\n this.backButtonClicked.emit();\n };\n\n /**\n * Handle book button clicked.\n */\n bookButtonClickedHandler = async (e: Event) => {\n e.preventDefault();\n const formSubmittedEvent = this.bookingFormSubmitted.emit();\n if (formSubmittedEvent.defaultPrevented) {\n return;\n }\n\n debug('nylas-booking-form', 'bookButtonClickedHandler', this.bookingInfo);\n const name = this.name || this.bookingInfo?.primaryParticipant?.name;\n const email = this.email || this.bookingInfo?.primaryParticipant?.email;\n\n if (!name || name === '') {\n this.isNameValid = false;\n this.validationError.name = i18next.t('fieldRequired', { field: i18next.t('name') }) || 'Name is required';\n this.bookingFormError.emit({\n title: 'Booking form error',\n description: 'Name is required',\n });\n return;\n }\n if (!email || email === '') {\n this.isEmailValid = false;\n this.validationError.email = i18next.t('fieldRequired', { field: i18next.t('email') }) || 'Email is required';\n this.bookingFormError.emit({\n title: 'Booking form error',\n description: 'Email is required',\n });\n return;\n }\n if (!emailRegex.test(email)) {\n this.isEmailValid = false;\n this.validationError.email = i18next.t('invalidInputFormat', { field: i18next.t('email') });\n this.bookingFormError.emit({\n title: 'Booking form error',\n description: i18next.t('invalidInputFormat', { field: i18next.t('email') }) || 'Invalid email',\n });\n return;\n }\n\n let guests: NylasSchedulerBookingParticipant[] = [];\n if (this.guestEmails.length > 0) {\n let hasError = false;\n this.guestEmails.forEach((email: string, i: number) => {\n if (email === '') {\n hasError = true;\n this.guestEmailErrors = { ...this.guestEmailErrors, [i]: i18next.t('fieldRequired', { field: i18next.t('email') }) };\n } else if (!emailRegex.test(email)) {\n hasError = true;\n this.guestEmailErrors = { ...this.guestEmailErrors, [i]: i18next.t('invalidInputFormat', { field: i18next.t('email') }) };\n }\n });\n if (hasError) {\n this.bookingFormError.emit({\n title: 'Booking form error',\n description: i18next.t('invalidInputFormat', { field: i18next.t('guestEmail') }) || 'Invalid guest email',\n });\n return;\n }\n guests = this.guestEmails.map((email: string) => ({ name: email.trim(), email: email.trim() }));\n } else if (this.bookingInfo?.guests) {\n guests = this.bookingInfo?.guests;\n }\n\n const bookingInfoAdditionalFields = this.bookingInfo?.additionalFields || [];\n this.detailsConfirmed.emit({\n primaryParticipant: {\n name: name,\n email: email,\n },\n guests: guests,\n additionalFields: { ...bookingInfoAdditionalFields, ...this.additionalFields },\n });\n };\n\n updateAdditionalFields = (name: string, value: string) => {\n if (this.additionalFields) {\n this.additionalFields[name] = value;\n }\n };\n\n @Listen('nylasFormInputChanged')\n nylasFormInputChangedHandler(event: CustomEvent<{ value: string; name: string; error: string; label: string; type?: string }>) {\n switch (event.detail.name) {\n case 'name':\n this.changeName(event.detail.value);\n break;\n case 'email':\n this.changeEmail(event.detail.value);\n break;\n default:\n if (event.detail.error) {\n this.bookingFormError.emit({\n title: 'Booking form error',\n description: event.detail.error,\n });\n return;\n }\n this.updateAdditionalFields(event.detail.name, event.detail.value);\n break;\n }\n }\n\n @Listen('nylasFormDropdownChanged')\n selectOptionChangedHandler(event: CustomEvent<{ value: string; name: string; label: string; error?: string }>) {\n if (event.detail.error) {\n this.bookingFormError.emit({\n title: 'Booking form error',\n description: event.detail.error,\n });\n return;\n }\n this.updateAdditionalFields(event.detail.name, event.detail.value);\n }\n\n @Listen('nylasFormSwitchToggled')\n switchToggledHandler(event: CustomEvent<{ checked: boolean; name: string; label: string }>) {\n this.updateAdditionalFields(event.detail.name, event.detail.checked ? 'true' : 'false');\n }\n\n @Listen('nylasFormCheckboxToggled')\n checkboxToggledHandler(event: CustomEvent<{ checked: boolean; name: string; label: string }>) {\n this.updateAdditionalFields(event.detail.name, event.detail.checked ? 'true' : 'false');\n }\n\n @Listen('nylasFormRadioChanged')\n radioChangedHandler(event: CustomEvent<{ value: string; name: string; label: string; type: string }>) {\n this.updateAdditionalFields(event.detail.name, event.detail.value);\n }\n\n @RegisterComponent<NylasBookingForm, NylasSchedulerConnector, Exclude<NylasScheduling['stores'], undefined>>({\n name: 'nylas-booking-form',\n stateToProps: new Map([\n ['scheduler.isLoading', 'isLoading'],\n ['scheduler.bookingInfo', 'bookingInfo'],\n ['scheduler.eventInfo', 'eventInfo'],\n ['scheduler.configSettings', 'configSettings'],\n ]),\n eventToProps: {\n backButtonClicked: async (_event: CustomEvent<boolean>, nylasSchedulerConnector: NylasSchedulerConnector) => {\n nylasSchedulerConnector.scheduler.toggleAdditionalData(false);\n },\n nameChanged: async (event: CustomEvent<string>, nylasSchedulerConnector: NylasSchedulerConnector) => {\n nylasSchedulerConnector.scheduler.setParticipantName(event.detail);\n },\n emailChanged: async (event: CustomEvent<string>, nylasSchedulerConnector: NylasSchedulerConnector) => {\n nylasSchedulerConnector.scheduler.setParticipantEmail(event.detail);\n },\n detailsConfirmed: async (event: CustomEvent<NylasSchedulerBookingData>, _nylasSchedulerConnector: NylasSchedulerConnector) => {\n debug('nylas-booking-form', 'detailsConfirmed', event.detail);\n },\n bookingFormSubmitted: async (event: CustomEvent<void>, _nylasSchedulerConnector: NylasSchedulerConnector) => {\n debug('nylas-booking-form', 'bookingFormSubmitted', event.detail);\n },\n bookingFormError: async (event: CustomEvent<Partial<Notification>>, _nylasSchedulerConnector: NylasSchedulerConnector) => {\n debug('nylas-booking-form', 'bookingFormError', event.detail);\n },\n },\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <form onSubmit={e => this.bookButtonClickedHandler(e)} noValidate>\n <div class=\"nylas-booking-form\" part=\"nbf\">\n <div class=\"input-wrapper\" part=\"nbf__input-wrapper\">\n <input-component\n label={i18next.t('name')}\n name=\"name\"\n id=\"name\"\n defaultValue={this.bookingInfo?.primaryParticipant?.name || this.name}\n placeholder={i18next.t('namePlaceholder')}\n type=\"text\"\n required={true}\n requiredError={i18next.t('fieldRequired', { field: i18next.t('name') })}\n patternError={i18next.t('invalidInputFormat', { field: i18next.t('name') })}\n part=\"nbf__input-textfield\"\n />\n </div>\n <div class=\"input-wrapper\" part=\"nbf__input-wrapper\">\n <input-component\n label={i18next.t('email')}\n name=\"email\"\n id=\"email\"\n pattern={emailRegex}\n defaultValue={this.bookingInfo?.primaryParticipant?.email || this.email}\n placeholder={i18next.t('emailPlaceholder')}\n type=\"email\"\n required={true}\n requiredError={i18next.t('fieldRequired', { field: i18next.t('email') })}\n patternError={i18next.t('invalidInputFormat', { field: i18next.t('email') })}\n part=\"nbf__input-textfield\"\n />\n </div>\n {this.configSettings?.scheduler?.hide_additional_guests !== true && (\n <div class=\"input-wrapper\" part=\"nbf__input-wrapper\">\n {this.guestEmails.map((email, index) => (\n <div class=\"input-wrapper button-wrapper\">\n <label\n class={{\n error: !!this.guestEmailErrors[index],\n }}\n >\n {i18next.t('guestEmail')}\n </label>\n <div class=\"guest-email-input\">\n <input\n type=\"email\"\n id={`guest-email-${index}`}\n maxLength={100}\n class={{\n 'guest-email': true,\n 'error': !!this.guestEmailErrors[index],\n }}\n placeholder={i18next.t('guestEmailPlaceholder')}\n value={email}\n data-index={index}\n part=\"nbf__input-textfield\"\n onBlur={(e: Event) => this.handleGuestBlur(index, (e.target as HTMLInputElement)?.value)}\n onInput={(e: Event) => this.handleGuestChange(index, (e.target as HTMLInputElement)?.value)}\n ></input>\n <button-component\n variant=\"basic\"\n onClick={(e: Event) => this.removeGuestButtonClickHandler(e, index)}\n class={{\n 'remove-guest': true,\n 'error': !!this.guestEmailErrors[index],\n }}\n >\n <close-icon />\n </button-component>\n </div>\n <p class=\"help-text\">{this.guestEmailErrors[index]}</p>\n </div>\n ))}\n <button-component class=\"add-guest\" variant=\"invisible\" part=\"nbf__button-ghost\" onClick={e => this.addGuestButtonClickedHandler(e)}>\n <div class=\"button-content\">\n <add-circle-icon slot=\"icon\"></add-circle-icon>\n {this.guestEmails.length > 0 ? `${i18next.t('addAnotherGuest')}` : `${i18next.t('addGuest')}`}\n </div>\n </button-component>\n </div>\n )}\n {Object.entries(\n (this.configSettings?.scheduler?.additional_fields || {}) as Record<\n string,\n {\n required: boolean;\n type: 'email' | 'text' | 'phone_number' | 'dropdown' | 'checkbox' | 'radio_button' | 'multi_line_text';\n order: number;\n options?: string[];\n label: string;\n }\n >,\n )\n ?.sort((a, b) => a[1].order - b[1].order)\n .map(x => {\n const field = x[1];\n const label = field.label;\n const key = x[0];\n switch (field.type) {\n case 'dropdown':\n return (\n <div class=\"input-wrapper\" part=\"nbf__input-wrapper\">\n <select-dropdown\n label={label}\n name={key}\n id={key}\n withSearch={false}\n options={field.options?.map(option => ({ value: option, label: option }))}\n required={field.required}\n exportparts=\"sd_dropdown: nbf__dropdown, sd_dropdown-button: nbf__dropdown-button, sd_dropdown-content: nbf__dropdown-content\"\n />\n </div>\n );\n case 'checkbox':\n return (\n <div class=\"input-wrapper\" part=\"nbf__input-wrapper\">\n <checkbox-component label={label} name={key} id={key} required={field.required} part=\"nbf__checkbox-component\" />\n </div>\n );\n case 'radio_button':\n return (\n <div class=\"input-wrapper\" part=\"nbf__input-wrapper\">\n <radio-button-group\n label={label}\n name={key}\n id={key}\n defaultSelectedValue={field.options?.[0] || ''}\n options={field.options?.map(option => ({ value: option, label: option }))}\n required={field.required}\n part=\"nbf__radio-button-group\"\n />\n </div>\n );\n case 'multi_line_text':\n return (\n <div class=\"input-wrapper\" part=\"nbf__input-wrapper\">\n <textarea-component label={label} name={key} id={key} required={field.required} part=\"nbf__textarea-component\" />\n </div>\n );\n default:\n return (\n <div class=\"input-wrapper\" part=\"nbf__input-wrapper\">\n <input-component\n label={label}\n name={key}\n id={key}\n type={field.type}\n requiredError={i18next.t('fieldRequired', { field: label })}\n required={field.required}\n part=\"nbf__input-textfield\"\n />\n </div>\n );\n }\n })}\n {/* <slot name=\"custom-booking-form\"></slot> */}\n </div>\n <div class=\"cta\">\n <button-component variant={'basic'} class=\"back\" part=\"nbf__button-outline\" isLoading={this.backButtonLoading && this.isLoading} onClick={this.handleBackButtonClicked}>\n <slot name=\"booking-form-back-label\">{`${i18next.t('backButton')}`}</slot>\n </button-component>\n <button-component variant={'primary'} isLoading={!this.backButtonLoading && this.isLoading} disabled={this.isLoading} part=\"nbf__button-primary\" type=\"submit\">\n <slot name=\"booking-form-book-label\">{`${i18next.t('bookNowButton')}`}</slot>\n </button-component>\n </div>\n </form>\n </Host>\n );\n }\n}\n","@import '../../../common/styles/variables.scss';\n\n:host {\n display: block;\n width: 400px;\n font-family: var(--nylas-font-family);\n}\n\n.nylas-cancel-booking-form {\n form {\n width: 100%;\n }\n\n display: flex;\n align-items: center;\n flex-direction: column;\n background-color: var(--nylas-base-0);\n color: var(--nylas-base-800);\n border-radius: var(--nylas-border-radius-2x);\n padding: 1.5rem;\n position: relative;\n box-shadow:\n 0px 1px 4px rgba(0, 0, 0, 0.1),\n 0px 3px 6px rgba(0, 0, 0, 0.06);\n}\n\n.nylas-cancel-booking-form__title {\n font-size: 18px;\n font-weight: 600;\n margin-bottom: 0;\n color: var(--nylas-base-900);\n}\n\n.nylas-cancel-booking-form__description {\n font-size: 1rem;\n font-style: normal;\n font-weight: 400;\n line-height: 140%;\n color: var(--nylas-base-600);\n padding-bottom: 1.25rem;\n}\n\n.nylas-cancel-booking-form__calendar-icon {\n width: 3rem;\n height: 3rem;\n border-radius: 50%;\n position: absolute;\n top: -1.25rem;\n left: 50%;\n transform: translateX(-50%);\n background-color: var(--nylas-base-0);\n border: 1px solid var(--nylas-base-200);\n}\n\ncalendar-cancel-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n}\n\n.footer {\n display: grid;\n grid-template-columns: 1fr 1fr;\n width: 100%;\n padding-top: 1.25rem;\n gap: 1rem;\n border-top: 1px solid var(--nylas-base-200);\n margin-top: 1.25rem;\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { Component, Event, EventEmitter, h, Host, Listen, Prop, State, Watch } from '@stencil/core';\nimport { NylasSchedulerConnector } from '../../..';\nimport { NylasScheduling } from '../nylas-scheduling/nylas-scheduling';\nimport { debug } from '@/utils/utils';\nimport { Notification, NylasSchedulerErrorResponse, Timeslot } from '@nylas/core';\nimport { ConfigSettings } from '@/stores/scheduler-store';\nimport i18next from '@/utils/i18n';\nimport { NylasEvent } from '@/common/types';\n\n/**\n * The `nylas-cancel-booking-form` component is a UI component that allows users to cancel a booking (DELETE request).\n * This component is also used to reject a booking (PUT request) by the organizer, if the prop `rejectBookingId` is provided.\n *\n * @part ncbf - The cancel booking form container.\n * @part ncbf__icon - The calendar icon.\n * @part ncbf__title - The title of the cancel booking form.\n * @part ncbf__description - The description of the cancel booking form.\n * @part ncbf__reason-textarea - The reason textarea.\n * @part ncbf__button-cta - The cancel booking form CTA button.\n * @part ncbf__button-outline - The cancel booking form outline button.\n * @part ncbf__card - The cancel booking form card.\n */\n@Component({\n tag: 'nylas-cancel-booking-form',\n styleUrl: 'nylas-cancel-booking-form.scss',\n shadow: true,\n})\nexport class NylasCancelBookingForm {\n /**\n * The booking ID to cancel.\n */\n @Prop() readonly cancelBookingId?: string;\n\n /**\n * The booking ID to reject.\n */\n @Prop() readonly rejectBookingId?: string;\n\n /**\n * The config settings.\n */\n @Prop() readonly configSettings?: ConfigSettings;\n\n /**\n * The event info.\n */\n @Prop() readonly eventInfo?: NylasEvent;\n\n /**\n * The selected timeslot.\n */\n @Prop() readonly selectedTimeslot!: Timeslot;\n\n /**\n * The loading state.\n */\n @Prop() readonly isLoading?: boolean;\n\n /**\n * This event is fired when the Go back button is clicked on the cancel booking form.\n */\n @Event() readonly goBackButtonClicked!: EventEmitter<void>;\n\n /**\n * This event is fired when the cancel booking form is submitted.\n */\n @Event() readonly cancelBookingFormSubmitted!: EventEmitter<{\n bookingId: string;\n action: 'reject' | 'cancel';\n reason: string;\n errorHandler?: (error: NylasSchedulerErrorResponse) => void;\n }>;\n\n /**\n * This event is only for triggering the validation on the text area for cancellation reason. This is for internal purposes only.\n */\n @Event() readonly triggerValidation!: EventEmitter<{}>;\n /**\n * This event is fired when an error occurs while cancelling the booking.\n */\n @Event() readonly cancelBookedEventError!: EventEmitter<NylasSchedulerErrorResponse>;\n\n /**\n * This event is fired when an error occurs in the booking form.\n */\n @Event() cancelBookingFormError!: EventEmitter<Partial<Notification>>;\n\n /**\n * The reason for cancellation.\n */\n @State() cancellationReason: string = '';\n\n @State() cancellationError: string = '';\n\n @State() cancellationPolicy: string = this.configSettings?.scheduler?.cancellation_policy || 'Your current timeslot will become available to others.';\n\n @Watch('configSettings')\n configSettingsChangedHandler(newValue: ConfigSettings) {\n this.cancellationPolicy = newValue?.scheduler?.cancellation_policy || 'Your current timeslot will become available to others.';\n }\n\n connectedCallback() {\n debug(`[nylas-cancel-booking-form] Component connected`);\n }\n\n async componentWillLoad() {\n debug(`[nylas-cancel-booking-form] Component will load`);\n }\n\n async componentDidLoad() {\n debug(`[nylas-cancel-booking-form] Component did load`);\n if (!this.cancelBookingId) {\n console.warn(`[nylas-cancel-booking-form] No booking ID provided, \"cancelBookingId\" prop is required.`);\n }\n }\n\n disconnectedCallback() {\n debug(`[nylas-cancel-booking-form] Component disconnected`);\n }\n\n private handleGoBackClicked = () => {\n this.goBackButtonClicked.emit();\n };\n\n private handleSubmitCancelBooking = (event: Event) => {\n this.triggerValidation.emit({});\n event.preventDefault();\n if (!this.cancellationReason) {\n this.cancellationError = i18next.t('cancellationErrorMessage');\n this.cancelBookingFormError.emit({ title: i18next.t('cancelBokingFormError'), description: i18next.t('cancellationErrorMessage') });\n return;\n }\n\n const minCancellationNotice = this.configSettings?.scheduler?.min_cancellation_notice;\n if (this.selectedTimeslot && minCancellationNotice) {\n const startTime = new Date(this.selectedTimeslot?.start_time);\n const dateTillCancellation = startTime.getTime() - minCancellationNotice * 60 * 1000;\n\n if (dateTillCancellation < new Date().getTime()) {\n this.cancelBookedEventError.emit({\n error: {\n title: i18next.t('cancellationErrorTitle'),\n message: i18next.t('minimumCancellationNoticeErrorMessage', { minCancellationNotice }),\n },\n });\n return;\n }\n }\n\n debug(`[nylas-cancel-booking-form] Cancel booking form submitted with reason: ${this.cancellationReason}`);\n const errorHandler = (error: NylasSchedulerErrorResponse) => {\n this.cancelBookedEventError.emit(error);\n };\n if (this.cancelBookingId) {\n this.cancelBookingFormSubmitted.emit({ bookingId: this.cancelBookingId, action: 'cancel', reason: this.cancellationReason, errorHandler });\n } else if (this.rejectBookingId) {\n this.cancelBookingFormSubmitted.emit({ bookingId: this.rejectBookingId, action: 'reject', reason: this.cancellationReason, errorHandler });\n }\n };\n\n @Listen('nylasFormInputChanged')\n handleNylasFormInputChanged(event: CustomEvent<{ value: string; name: string; error: string; label: string; type: string }>) {\n this.triggerValidation.emit({});\n if (event.detail.name === 'cancel-reason') {\n this.cancellationReason = event.detail.value;\n this.cancellationError = event.detail.error;\n }\n }\n\n @RegisterComponent<NylasCancelBookingForm, NylasSchedulerConnector, Exclude<NylasScheduling['stores'], undefined>>({\n name: 'nylas-cancel-booking-form',\n stateToProps: new Map([\n ['scheduler.configSettings', 'configSettings'],\n ['scheduler.selectedTimeslot', 'selectedTimeslot'],\n ['scheduler.eventInfo', 'eventInfo'],\n ['scheduler.isLoading', 'isLoading'],\n ['scheduler.cancelBookingId', 'cancelBookingId'],\n ['scheduler.rejectBookingId', 'rejectBookingId'],\n ]),\n eventToProps: {\n cancelBookingFormSubmitted: async (\n event: CustomEvent<{ bookingId: string; action: 'reject' | 'cancel'; reason: string; errorHandler?: (error: NylasSchedulerErrorResponse) => void }>,\n nylasSchedulerConnector: NylasSchedulerConnector,\n ) => {\n const { action, errorHandler } = event.detail;\n if (action === 'cancel') {\n const result = await nylasSchedulerConnector.scheduler.cancelBooking(event.detail.bookingId, event.detail.reason);\n if (errorHandler && (!result || 'error' in result)) {\n errorHandler(result);\n }\n } else if (action === 'reject') {\n const result = await nylasSchedulerConnector.scheduler.updateBooking({\n bookingId: event.detail.bookingId,\n status: 'cancelled',\n reason: event.detail.reason,\n });\n if (errorHandler && (!result || 'error' in result)) {\n errorHandler(result);\n }\n }\n },\n goBackButtonClicked: async (event: CustomEvent<void>, nylasSchedulerConnector: NylasSchedulerConnector) => {\n debug('nylas-cancel-booking-form', 'goBackButtonClicked', event.detail);\n nylasSchedulerConnector.scheduler.goBack();\n },\n cancelBookedEventError: async (event: CustomEvent<NylasSchedulerErrorResponse>, _nylasSchedulerConnector: NylasSchedulerConnector) => {\n debug('nylas-cancel-booking-form', 'cancelBookedEventError', event.detail);\n },\n cancelBookingFormError: async (event: CustomEvent<Partial<Notification>>, _nylasSchedulerConnector: NylasSchedulerConnector) => {\n debug('nylas-cancel-booking-form', 'cancelBookingFormError', event.detail);\n },\n },\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host part=\"ncbf\">\n <div class=\"nylas-cancel-booking-form\" part=\"ncbf__card\">\n <div class=\"nylas-cancel-booking-form__calendar-icon\" part=\"ncbf__icon\">\n <calendar-cancel-icon />\n </div>\n <h3 class=\"nylas-cancel-booking-form__title\" part=\"ncbf__title\">\n {i18next.t('cancelBookingTitle')}\n </h3>\n <div class=\"nylas-cancel-booking-form__description\" part=\"ncbf__description\">\n {!this.configSettings?.scheduler?.cancellation_policy ? `${i18next.t('cancelBookingMessage')}` : this.cancellationPolicy}\n </div>\n <form onSubmit={this.handleSubmitCancelBooking}>\n <textarea-component\n id=\"cancel-reason\"\n name=\"cancel-reason\"\n required={true}\n label={i18next.t('reasonForCancellation')}\n class={this.cancellationError ? 'error' : ''}\n part=\"ncbf__reason-textarea\"\n defaultValue={this.cancellationReason}\n ></textarea-component>\n <div class=\"footer\">\n <button-component variant={'destructive'} class=\"cancel\" type=\"submit\" part=\"ncbf__button-cta\" disabled={this.isLoading}>\n {i18next.t('cancelBookingButton')}\n </button-component>\n {!!this.eventInfo && (\n <button-component variant={'basic'} class=\"back\" part=\"ncbf__button-outline\" onClick={this.handleGoBackClicked}>\n {i18next.t('goBackButton')}\n </button-component>\n )}\n </div>\n </form>\n </div>\n </Host>\n );\n }\n}\n","@import '../../../common/styles/variables.scss';\n\n:host {\n display: block;\n}\n\n.nylas-cancelled-event-card {\n height: inherit;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n align-items: center;\n font-family: var(--nylas-font-family);\n width: 400px;\n\n @media #{$mobile} {\n width: inherit;\n }\n\n background-color: var(--nylas-base-0);\n color: var(--nylas-base-800);\n border-radius: var(--nylas-border-radius-2x);\n padding: 1.5rem;\n position: relative;\n box-shadow:\n 0px 1px 4px rgba(0, 0, 0, 0.1),\n 0px 3px 6px rgba(0, 0, 0, 0.06);\n}\n\n.nylas-cancelled-event-card__title {\n font-size: 18px;\n font-weight: 600;\n line-height: 24px;\n color: var(--nylas-base-900);\n text-align: center;\n}\n\n.nylas-cancelled-event-description {\n font-size: 16px;\n font-weight: 500;\n color: var(--nylas-base-600);\n}\n\n.nylas-cancelled-event-card__calendar-icon {\n width: 3rem;\n height: 3rem;\n border-radius: 50%;\n position: absolute;\n top: -1.25rem;\n left: 50%;\n transform: translateX(-50%);\n background-color: var(--nylas-base-0);\n border: 1px solid var(--nylas-base-200);\n}\n\n.nylas-cancelled-event-card__cta {\n width: 100%;\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n margin-top: 1rem;\n}\n\ncalendar-cancel-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n}\n\nbutton-component {\n width: 100%;\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { Component, Event, EventEmitter, h, Host, Prop, State } from '@stencil/core';\nimport { NylasEvent, NylasSchedulerConnector, NylasSchedulerErrorResponse } from '../../..';\nimport { NylasScheduling } from '../nylas-scheduling/nylas-scheduling';\nimport { debug } from '@/utils/utils';\nimport { ConfigSettings } from '@/stores/scheduler-store';\nimport i18next from '@/utils/i18n';\n\n/**\n * The `nylas-cancelled-event-card` component is a UI component that displays the cancelled event card.\n *\n * @part ncec - The cancelled event card host.\n * @part ncec__icon - The calendar icon.\n * @part ncec__title - The title of the cancelled event card.\n * @part ncec__description - The description of the cancelled event card.\n * @part ncec__button-outline - The close button CTA.\n * @part ncec__card - The cancelled event card.\n */\n@Component({\n tag: 'nylas-cancelled-event-card',\n styleUrl: 'nylas-cancelled-event-card.scss',\n shadow: true,\n})\nexport class NylasCancelledEventCard {\n /**\n * The participant's name who booked the event / is logged in.\n */\n @Prop() readonly cancelledEventInfo!: Partial<NylasEvent>;\n\n /**\n * Closing state of the cancelled event card button.\n */\n @State() isClosing: boolean = false;\n\n /**\n * The config settings for the scheduler.\n */\n @Prop() readonly configSettings?: ConfigSettings;\n\n /**\n * This event is fired when the close button is clicked on the cancelled event card.\n */\n @Event() readonly closeCancelEventCardClicked!: EventEmitter<{ errorHandler?: (error: NylasSchedulerErrorResponse) => void }>;\n\n /**\n * This event is fired when an error occurs.\n */\n @Event() readonly cancelledEventCardError!: EventEmitter<NylasSchedulerErrorResponse>;\n\n connectedCallback() {\n debug(`[nylas-cancelled-event-card] Component connected`);\n }\n\n async componentWillLoad() {\n debug(`[nylas-cancelled-event-card] Component will load`);\n }\n\n async componentDidLoad() {\n debug(`[nylas-cancelled-event-card] Component did load`);\n if (!this.cancelledEventInfo) {\n console.warn(`[nylas-cancelled-event-card] No cancelled event info provided, \"cancelledEventInfo\" prop is required.`);\n }\n }\n\n disconnectedCallback() {\n debug(`[nylas-cancelled-event-card] Component disconnected`);\n }\n\n private handleCloseClicked = () => {\n this.isClosing = true;\n const errorHandler = (error: NylasSchedulerErrorResponse) => {\n this.cancelledEventCardError.emit(error);\n this.isClosing = false;\n };\n this.closeCancelEventCardClicked.emit({ errorHandler });\n };\n\n @RegisterComponent<NylasCancelledEventCard, NylasSchedulerConnector, Exclude<NylasScheduling['stores'], undefined>>({\n name: 'nylas-cancelled-event-card',\n stateToProps: new Map([['scheduler.configSettings', 'configSettings']]),\n eventToProps: {\n closeCancelEventCardClicked: async (_: CustomEvent<{ errorHandler?: (error: NylasSchedulerErrorResponse) => void }>, nylasschedulerconnector: NylasSchedulerConnector) => {\n const result = await nylasschedulerconnector.scheduler.resetCancel();\n\n const { errorHandler } = _.detail;\n if (errorHandler && (!result || 'error' in result)) {\n errorHandler(result);\n }\n },\n cancelledEventCardError: async (event: CustomEvent<NylasSchedulerErrorResponse>, _nylasschedulerconnector: NylasSchedulerConnector) => {\n debug('nylas-cancelled-event-card', 'cancelledEventCardError', event.detail);\n },\n },\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host part=\"ncec\">\n <div class=\"nylas-cancelled-event-card\" part=\"ncec__card\">\n <div class=\"nylas-cancelled-event-card__calendar-icon\" part=\"ncec__icon\">\n <calendar-cancel-icon />\n </div>\n <h3 class=\"nylas-cancelled-event-card__title\" part=\"ncec__title\">\n {i18next.t('bookingCancelledTitle')}!\n </h3>\n <div class=\"nylas-cancelled-event-card__description\" part=\"ncec__description\">\n {i18next.t('bookingCancelledMessage')} {this.configSettings?.organizer?.name || 'the participants'}.\n </div>\n <div class=\"nylas-cancelled-event-card__cta\">\n <button-component variant=\"basic\" disabled={this.isClosing} part=\"ncec__button-outline\" onClick={this.handleCloseClicked}>\n {this.isClosing ? `${i18next.t('closingButton')}...` : `${i18next.t('closeButton')}`}\n </button-component>\n </div>\n </div>\n </Host>\n );\n }\n}\n","@import '../../../common/styles/variables.scss';\n\n:host {\n display: block;\n @include default-css-variables;\n}\n\n.nylas-confirmed-event-card {\n height: inherit;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n align-items: center;\n font-family: var(--nylas-font-family);\n width: 400px;\n\n @media #{$mobile} {\n width: inherit;\n }\n\n background-color: var(--nylas-base-0);\n color: var(--nylas-base-800);\n border-radius: var(--nylas-border-radius-2x);\n padding: 1.5rem;\n position: relative;\n box-shadow:\n 0px 1px 4px rgba(0, 0, 0, 0.1),\n 0px 3px 6px rgba(0, 0, 0, 0.06);\n}\n\n.nylas-confirmed-event-card__title {\n font-size: 18px;\n font-weight: 600;\n line-height: 24px;\n color: var(--nylas-base-900);\n text-align: center;\n}\n\n.nylas-confirmed-event-description {\n font-size: 16px;\n font-weight: 500;\n color: var(--nylas-base-600);\n}\n\n.nylas-confirmed-event-card__calendar-icon {\n width: 3rem;\n height: 3rem;\n border-radius: 50%;\n position: absolute;\n top: -1.25rem;\n left: 50%;\n transform: translateX(-50%);\n background-color: var(--nylas-base-0);\n border: 1px solid var(--nylas-base-200);\n}\n\n.nylas-confirmed-event-card__cta {\n width: 100%;\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n margin-top: 1rem;\n}\n\ncalendar-cancel-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n}\n\nbutton-component {\n width: 100%;\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { Component, Event, EventEmitter, h, Host, Prop, State } from '@stencil/core';\nimport { NylasEvent, NylasSchedulerConnector, NylasSchedulerErrorResponse } from '../../..';\nimport { NylasScheduling } from '../nylas-scheduling/nylas-scheduling';\nimport { debug } from '@/utils/utils';\nimport { ConfigSettings } from '@/stores/scheduler-store';\nimport i18next from '@/utils/i18n';\n\n/**\n * The `nylas-confirmed-event-card` component is a UI component that displays the confirmed event card.\n *\n * @part ncec - The confirmed event card host.\n * @part ncec__icon - The calendar icon.\n * @part ncec__title - The title of the confirmed event card.\n * @part ncec__description - The description of the confirmed event card.\n * @part ncec__button-outline - The close button CTA.\n * @part ncec__card - The confirmed event card.\n */\n@Component({\n tag: 'nylas-confirmed-event-card',\n styleUrl: 'nylas-confirmed-event-card.scss',\n shadow: true,\n})\nexport class NylasConfirmedEventCard {\n /**\n * The participant's name who booked the event / is logged in.\n */\n @Prop() readonly confirmedEventInfo!: Partial<NylasEvent>;\n\n /**\n * Closing state of the confirmed event card button.\n */\n @State() isClosing: boolean = false;\n\n /**\n * The config settings for the scheduler.\n */\n @Prop() readonly configSettings?: ConfigSettings;\n\n /**\n * This event is fired when the close button is clicked on the confirmed event card.\n */\n @Event() readonly closeConfirmEventCardClicked!: EventEmitter<{ errorHandler?: (error: NylasSchedulerErrorResponse) => void }>;\n\n /**\n * This event is fired when an error occurs.\n */\n @Event() readonly confirmedEventCardError!: EventEmitter<NylasSchedulerErrorResponse>;\n\n connectedCallback() {\n debug(`[nylas-confirmed-event-card] Component connected`);\n }\n\n async componentWillLoad() {\n debug(`[nylas-confirmed-event-card] Component will load`);\n }\n\n async componentDidLoad() {\n debug(`[nylas-confirmed-event-card] Component did load`);\n if (!this.confirmedEventInfo) {\n console.warn(`[nylas-confirmed-event-card] No confirmed event info provided, \"confirmedEventInfo\" prop is required.`);\n }\n }\n\n disconnectedCallback() {\n debug(`[nylas-confirmed-event-card] Component disconnected`);\n }\n\n private handleCloseClicked = () => {\n this.isClosing = true;\n const errorHandler = (error: NylasSchedulerErrorResponse) => {\n this.confirmedEventCardError.emit(error);\n this.isClosing = false;\n };\n this.closeConfirmEventCardClicked.emit({ errorHandler });\n };\n\n @RegisterComponent<NylasConfirmedEventCard, NylasSchedulerConnector, Exclude<NylasScheduling['stores'], undefined>>({\n name: 'nylas-confirmed-event-card',\n stateToProps: new Map([['scheduler.configSettings', 'configSettings']]),\n eventToProps: {\n closeConfirmEventCardClicked: async (_: CustomEvent<{ errorHandler?: (error: NylasSchedulerErrorResponse) => void }>, nylasschedulerconnector: NylasSchedulerConnector) => {\n const result = await nylasschedulerconnector.scheduler.resetConfirm();\n\n const { errorHandler } = _.detail;\n if (errorHandler && (!result || 'error' in result)) {\n errorHandler(result);\n }\n },\n },\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host part=\"ncec\">\n <div class=\"nylas-confirmed-event-card\" part=\"ncec__card\">\n <div class=\"nylas-confirmed-event-card__calendar-icon\" part=\"ncec__icon\">\n <calendar-cancel-icon />\n </div>\n <h3 class=\"nylas-confirmed-event-card__title\" part=\"ncec__title\">\n {i18next.t('confirmedEventCardTitle')}!\n </h3>\n <div class=\"nylas-confirmed-event-card__description\" part=\"ncec__description\">\n {i18next.t('confirmedEventCardDescription')} {this.configSettings?.organizer?.name || 'the participants'}.\n </div>\n <div class=\"nylas-confirmed-event-card__cta\">\n <button-component variant=\"basic\" disabled={this.isClosing} part=\"ncec__button-outline\" onClick={this.handleCloseClicked}>\n {this.isClosing ? `${i18next.t('closingButton')}...` : `${i18next.t('closeButton')}`}\n </button-component>\n </div>\n </div>\n </Host>\n );\n }\n}\n","const t0 = new Date, t1 = new Date;\n\nexport function timeInterval(floori, offseti, count, field) {\n\n function interval(date) {\n return floori(date = arguments.length === 0 ? new Date : new Date(+date)), date;\n }\n\n interval.floor = (date) => {\n return floori(date = new Date(+date)), date;\n };\n\n interval.ceil = (date) => {\n return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date;\n };\n\n interval.round = (date) => {\n const d0 = interval(date), d1 = interval.ceil(date);\n return date - d0 < d1 - date ? d0 : d1;\n };\n\n interval.offset = (date, step) => {\n return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date;\n };\n\n interval.range = (start, stop, step) => {\n const range = [];\n start = interval.ceil(start);\n step = step == null ? 1 : Math.floor(step);\n if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date\n let previous;\n do range.push(previous = new Date(+start)), offseti(start, step), floori(start);\n while (previous < start && start < stop);\n return range;\n };\n\n interval.filter = (test) => {\n return timeInterval((date) => {\n if (date >= date) while (floori(date), !test(date)) date.setTime(date - 1);\n }, (date, step) => {\n if (date >= date) {\n if (step < 0) while (++step <= 0) {\n while (offseti(date, -1), !test(date)) {} // eslint-disable-line no-empty\n } else while (--step >= 0) {\n while (offseti(date, +1), !test(date)) {} // eslint-disable-line no-empty\n }\n }\n });\n };\n\n if (count) {\n interval.count = (start, end) => {\n t0.setTime(+start), t1.setTime(+end);\n floori(t0), floori(t1);\n return Math.floor(count(t0, t1));\n };\n\n interval.every = (step) => {\n step = Math.floor(step);\n return !isFinite(step) || !(step > 0) ? null\n : !(step > 1) ? interval\n : interval.filter(field\n ? (d) => field(d) % step === 0\n : (d) => interval.count(0, d) % step === 0);\n };\n }\n\n return interval;\n}\n","export const durationSecond = 1000;\nexport const durationMinute = durationSecond * 60;\nexport const durationHour = durationMinute * 60;\nexport const durationDay = durationHour * 24;\nexport const durationWeek = durationDay * 7;\nexport const durationMonth = durationDay * 30;\nexport const durationYear = durationDay * 365;\n","import {timeInterval} from \"./interval.js\";\nimport {durationDay, durationMinute} from \"./duration.js\";\n\nexport const timeDay = timeInterval(\n date => date.setHours(0, 0, 0, 0),\n (date, step) => date.setDate(date.getDate() + step),\n (start, end) => (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationDay,\n date => date.getDate() - 1\n);\n\nexport const timeDays = timeDay.range;\n\nexport const utcDay = timeInterval((date) => {\n date.setUTCHours(0, 0, 0, 0);\n}, (date, step) => {\n date.setUTCDate(date.getUTCDate() + step);\n}, (start, end) => {\n return (end - start) / durationDay;\n}, (date) => {\n return date.getUTCDate() - 1;\n});\n\nexport const utcDays = utcDay.range;\n\nexport const unixDay = timeInterval((date) => {\n date.setUTCHours(0, 0, 0, 0);\n}, (date, step) => {\n date.setUTCDate(date.getUTCDate() + step);\n}, (start, end) => {\n return (end - start) / durationDay;\n}, (date) => {\n return Math.floor(date / durationDay);\n});\n\nexport const unixDays = unixDay.range;\n","@import '../../../common/styles/variables.scss';\n\n:host {\n display: block;\n min-height: 444px;\n\n @media #{$mobile} {\n min-height: auto;\n }\n}\n\n.nylas-date-picker {\n display: flex;\n gap: 1rem;\n flex-direction: column;\n}\n\n.header {\n margin: 0 0.5rem;\n height: 48px;\n\n h2 {\n font-size: 1.3125rem;\n font-weight: 400;\n line-height: 1rem;\n color: var(--nylas-base-800);\n\n strong {\n font-weight: 600;\n }\n }\n}\n\n.title {\n margin: 0 -1.25rem;\n display: flex;\n flex-direction: column;\n padding: 0 1.5rem;\n gap: 0.5rem;\n border-bottom: 1px solid var(--nylas-base-200);\n font-family: var(--nylas-font-family);\n\n h1 {\n margin-bottom: 0;\n font-size: 18px;\n line-height: 20px;\n font-weight: 600;\n display: flex;\n gap: 0.5rem;\n align-items: center;\n }\n\n p {\n margin-top: 0;\n font-size: 16px;\n display: flex;\n gap: 0.5rem;\n align-items: center;\n }\n}\n\n@keyframes pulsate {\n 0% {\n background-color: var(--nylas-base-50);\n }\n\n 50% {\n background-color: var(--nylas-base-100);\n }\n\n 100% {\n background-color: var(--nylas-base-50);\n }\n}\n\n.dates {\n display: grid;\n justify-items: center;\n grid-template-columns: repeat(7, 1fr);\n gap: 0.5rem;\n margin-bottom: 24px;\n\n .date {\n position: relative;\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n height: 48px;\n width: 48px;\n min-width: 2rem;\n min-height: 2rem;\n cursor: pointer;\n border-radius: var(--nylas-border-radius-2x);\n font-size: 16px;\n font-weight: 600;\n font-family: inherit;\n\n @media #{$x-small-mobile} {\n width: 38px;\n height: 38px;\n min-width: none;\n }\n\n color: var(--nylas-base-text);\n background-color: var(--nylas-base-100);\n cursor: pointer;\n\n &:hover:not(:disabled) {\n box-shadow: 0 0 0 2px var(--nylas-base-500) inset;\n }\n\n border: none;\n\n &.date.current-month {\n color: var(--nylas-base-800);\n }\n\n &.date.selected {\n background-color: var(--nylas-primary);\n color: var(--nylas-base-0);\n font-weight: 700;\n }\n\n &.date.day-skeleton {\n color: var(--nylas-base-300);\n }\n\n &:disabled {\n color: var(--nylas-base-300);\n background-color: transparent;\n font-weight: 400;\n cursor: not-allowed;\n }\n }\n\n .day {\n font-size: 12px;\n color: var(--nylas-base-800);\n font-weight: 600;\n letter-spacing: 0.5px;\n height: 32px;\n display: flex;\n align-items: center;\n\n @media #{$mobile} {\n font-size: 14px;\n }\n }\n\n .date.day-skeleton {\n height: 48px;\n width: 48px;\n\n @media #{$x-small-mobile} {\n width: 38px;\n height: 38px;\n min-width: none;\n }\n\n border-radius: var(--nylas-border-radius-2x);\n animation: pulsate 1.5s infinite ease-in-out;\n background-color: var(--nylas-base-50);\n }\n\n .date.current-day::after {\n content: '';\n position: absolute;\n bottom: 6px;\n left: 50%;\n transform: translateX(-50%);\n width: 6px;\n height: 6px;\n border-radius: 50%;\n background-color: var(--nylas-base-500);\n }\n\n .date.current-day.selected::after {\n background-color: var(--nylas-base-100);\n }\n}\n\n.pagination {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n min-width: 92px;\n\n .chevron-right {\n transform: rotate(180deg);\n }\n\n .button {\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n height: 3vh;\n width: 3vh;\n min-width: 3em;\n min-height: 3em;\n cursor: pointer;\n border-radius: var(--nylas-border-radius-2x);\n\n background-color: transparent;\n color: var(--nylas-base-800);\n cursor: pointer;\n\n &:hover {\n background-color: var(--nylas-base-50);\n }\n\n border: none;\n\n &:active {\n background-color: var(--nylas-base-100);\n }\n\n &:disabled {\n background-color: transparent;\n color: var(--nylas-base-300);\n cursor: not-allowed;\n }\n }\n}\n\n.flex-row {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n color: var(--nylas-base-500);\n}","import { RegisterComponent } from '@/common/register-component';\nimport { addDaysToCurrentDate, convertMinutesToHoursAndMinutes, getFirstDayOfMonth, getLastDayOfMonth, isSameDay, isSameMonth, translateMonth } from '@/utils/utils';\nimport { Component, Event, EventEmitter, Host, Prop, State, Watch, h } from '@stencil/core';\nimport { timeDay } from 'd3-time';\nimport { NylasSchedulerConnector } from '../../..';\nimport { NylasScheduling } from '../nylas-scheduling/nylas-scheduling';\nimport { ConfigSettings } from '@/stores/scheduler-store';\nimport i18next from '@/utils/i18n';\nimport { debug } from '@/utils/utils';\n\n/**\n * The `nylas-date-picker` component is a UI component that allows users to select a date.\n *\n * @part ndp - The date picker host.\n * @part ndp__title - The title.\n * @part ndp__month-header - The month header.\n * @part ndp__month-button - The month button.\n * @part ndp__day - The day.\n * @part ndp__date - The date.\n * @part ndp__date--selected - The selected date.\n * @part ndp__date--current-day - The current day.\n * @part ndp__date--current-month - The dates in the current month.\n * @part ndp__date--disabled - The disabled dates.\n */\n@Component({\n tag: 'nylas-date-picker',\n styleUrl: 'nylas-date-picker.scss',\n shadow: true,\n})\nexport class NylasDatePicker {\n /**\n * The dates that are selectable.\n */\n @Prop() selectableDates?: Date[];\n\n /**\n * The selected date.\n */\n @Prop() selectedDate?: Date;\n\n /**\n * The config settings.\n */\n @Prop() configSettings?: ConfigSettings;\n\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: string;\n\n /**\n * The loading state.\n */\n @Prop() readonly isLoading?: boolean;\n\n /**\n * The event duration.\n */\n @Prop() readonly eventDuration?: number;\n\n /**\n * The month to display.\n */\n @State() month: Date = this.selectedDate || new Date();\n\n /**\n * The dates to render.\n */\n @State() dates: Date[] = this.getDates();\n\n /**\n * The state to disable the next month button.\n */\n @State() disableNextMonthButton: boolean = false;\n\n /**\n * This event is fired when a date is selected.\n */\n @Event() dateSelected!: EventEmitter<Date>;\n\n /**\n * This event is fired when the month is changed.\n */\n @Event() monthChanged!: EventEmitter<Date>;\n\n @Watch('configSettings')\n configSettingsChanged(newConfigSettings: ConfigSettings) {\n const nextMonth = new Date(this.month.getFullYear(), this.month.getMonth() + 1, 1);\n const availableDaysInFuture = newConfigSettings?.scheduler?.available_days_in_future;\n if (availableDaysInFuture === undefined) {\n return;\n }\n const endDate = addDaysToCurrentDate(new Date(), availableDaysInFuture);\n if (endDate.getTime() < nextMonth.getTime()) {\n this.disableNextMonthButton = true;\n } else {\n this.disableNextMonthButton = false;\n }\n }\n\n @Watch('selectedLanguage')\n selectedLanguageChanged(newLanguage: string) {\n i18next.changeLanguage(newLanguage);\n }\n\n connectedCallback() {}\n\n disconnectedCallback() {}\n\n componentWillLoad() {}\n\n /**\n * Get the dates to render, including the days from the previous and next months.\n * @returns The dates to render.\n */\n private getDates() {\n const lastDayOfMonth = getLastDayOfMonth(this.month);\n const firstDayOfMonth = getFirstDayOfMonth(this.month);\n\n return timeDay.range(timeDay.offset(firstDayOfMonth, -firstDayOfMonth.getDay()), timeDay.offset(lastDayOfMonth, 7 - lastDayOfMonth.getDay()));\n }\n\n /**\n * Select a date.\n * @param date The date to select.\n */\n private selectDate(date?: Date) {\n this.dateSelected.emit(date);\n }\n\n /**\n * Change the month.\n * @param change The change in months.\n */\n private changeMonth(change: number) {\n this.month = new Date(this.month.getFullYear(), this.month.getMonth() + change, 1);\n const nextMonth = new Date(this.month.getFullYear(), this.month.getMonth() + 1, 1);\n const availableDaysInFuture = this.configSettings?.scheduler?.available_days_in_future;\n const endDate = addDaysToCurrentDate(new Date(), availableDaysInFuture);\n if (endDate.getTime() < nextMonth.getTime()) {\n this.disableNextMonthButton = true;\n } else {\n this.disableNextMonthButton = false;\n }\n this.dates = this.getDates();\n this.monthChanged.emit(this.month);\n }\n\n private isSelected(date: Date | undefined, selectedDate: Date | undefined, selectableDates: Date[] | undefined) {\n return date && selectedDate && isSameDay(date, selectedDate) && selectableDates && selectableDates?.length > 0;\n }\n\n private isDisabled(date: Date | undefined, selectableDates: Date[] | undefined) {\n return date && selectableDates?.find(d => isSameDay(d, date)) === undefined;\n }\n\n @RegisterComponent<NylasDatePicker, NylasSchedulerConnector, Exclude<NylasScheduling['stores'], undefined>>({\n name: 'nylas-date-picker',\n stateToProps: new Map([\n ['scheduler.selectableDates', 'selectableDates'],\n ['scheduler.selectedDate', 'selectedDate'],\n ['scheduler.isLoading', 'isLoading'],\n ['scheduler.configSettings', 'configSettings'],\n ['scheduler.eventDuration', 'eventDuration'],\n ['scheduler.selectedLanguage', 'selectedLanguage'],\n ]),\n eventToProps: {\n dateSelected: async (event: CustomEvent<Date>, nylasSchedulerConnector: NylasSchedulerConnector) => {\n debug('nylas-date-picker', 'dateSelected', event.detail);\n nylasSchedulerConnector.scheduler.selectDate(event.detail);\n },\n monthChanged: async (event: CustomEvent<Date>, _nylasSchedulerConnector: NylasSchedulerConnector) => {\n debug('nylas-date-picker', 'monthChanged', event.detail);\n },\n },\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host part=\"ndp\">\n <div class=\"nylas-date-picker\">\n <div class=\"title\" part=\"ndp__title\">\n {this.configSettings?.name ? (\n <h1>{this.configSettings?.name}</h1>\n ) : (\n this.configSettings?.organizer?.name && (\n <h1>\n <person-icon />\n {this.configSettings?.organizer?.name || 'Organizer'}\n </h1>\n )\n )}\n <p>\n <clock-icon />\n {this.eventDuration ? convertMinutesToHoursAndMinutes(this.eventDuration) : `- ${i18next.t('time.minutes')}`}\n </p>\n </div>\n <div class={'header flex-row'}>\n <h2 part={'ndp__month-header'}>\n <strong>{translateMonth(this.month.toLocaleDateString(undefined, { month: 'long' }).toLocaleLowerCase())}</strong>\n \n {this.month.toLocaleDateString(undefined, { year: 'numeric' })}\n </h2>\n <div class={'pagination'}>\n <button\n onClick={() => this.changeMonth(-1)}\n class={{ 'chevron-left': true, 'button': true }}\n disabled={!this.selectableDates?.length || this.month <= new Date()}\n part=\"ndp__month-button\"\n >\n <chevron-icon />\n </button>\n <button onClick={() => this.changeMonth(1)} class={{ 'chevron-right': true, 'button': true }} disabled={this.disableNextMonthButton} part=\"ndp__month-button\">\n <chevron-icon />\n </button>\n </div>\n </div>\n\n <div class={'dates'}>\n {[\n i18next.t('days.sunday'),\n i18next.t('days.monday'),\n i18next.t('days.tuesday'),\n i18next.t('days.wednesday'),\n i18next.t('days.thursday'),\n i18next.t('days.friday'),\n i18next.t('days.saturday'),\n ].map(day => {\n return (\n <div class={'day'} part=\"ndp__day\">\n {day}\n </div>\n );\n })}\n {this.dates.map((date, i) => {\n const isDisabled = this.isDisabled(date, this.selectableDates);\n\n if (this.isLoading) {\n return (\n <button\n disabled\n class={{\n 'date day-skeleton': true,\n 'current-month': isSameMonth(date, this.month),\n }}\n style={{ animationDelay: `${i * 20}ms` }}\n part={`ndp__date ndp__date--disabled`}\n >\n {date.getDate()}\n </button>\n );\n }\n return (\n <button\n class={{\n 'date': true,\n 'selected': !!(this.selectedDate && isSameDay(date, this.selectedDate) && this.selectableDates && this.selectableDates?.length > 0),\n 'current-day': isSameDay(date, new Date()),\n 'current-month': isSameMonth(date, this.month),\n }}\n aria-lang={date.toLocaleDateString(undefined, { dateStyle: 'full' })}\n disabled={isDisabled}\n onClick={() => this.selectDate(date)}\n part={`ndp__date ${this.isSelected(date, this.selectedDate, this.selectableDates) ? 'ndp__date--selected' : ''} ${isSameDay(date, new Date()) ? 'ndp__date--current-day' : ''} ${isSameMonth(date, this.month) ? 'ndp__date--current-month' : ''}`}\n >\n {date.getDate()}\n </button>\n );\n })}\n </div>\n </div>\n </Host>\n );\n }\n}\n","@import '../../../common/styles/variables.scss';\n\n:host {\n display: block;\n}\n\n.nylas-locale-switch {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n border-left: none;\n border-right: none;\n color: var(--nylas-base-50);\n font-size: 14px;\n\n @media #{$mobile} {\n font-size: 16px;\n }\n\n font-weight: 600;\n cursor: pointer;\n transition: all 0.2s ease-in-out;\n font-family: inherit;\n}\n\n.select-wrapper {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n}\n\nselect {\n border: none;\n background: transparent;\n cursor: pointer;\n outline: none;\n background-color: transparent;\n margin: 0 0 1px;\n padding: 4px;\n vertical-align: middle;\n\n &#timezone {\n width: 140px;\n }\n\n &#language {\n width: 80px;\n }\n}\n\nspan.timezone-label {\n display: flex;\n width: -webkit-fill-available;\n justify-content: space-between;\n}\n\nselect-dropdown {\n width: auto;\n}\n\nselect-dropdown::part(sd_dropdown-button) {\n border: none;\n padding: 10px;\n}\n\nselect-dropdown::part(sd_dropdown-content) {\n max-width: 306px;\n}","import { LANGUAGE_MAP, TIMEZONE_MAP, getTimezoneOffset } from '@/common/constants';\nimport { RegisterComponent } from '@/common/register-component';\nimport { Component, Event, EventEmitter, Host, Listen, Prop, h } from '@stencil/core';\nimport { NylasSchedulerConnector } from '../../../components';\nimport { NylasScheduling } from '../nylas-scheduling/nylas-scheduling';\nimport { debug } from '@/utils/utils';\n\n/**\n * The `nylas-locale-switch` component is a UI component that allows users to select a timezone and language.\n * @part nls - The locale switch container\n * @part nls__timezone - The timezone select container\n * @part nls__timezone-dropdown - The timezone dropdown\n * @part nls__timezone-drop-button - The timezone dropdown button\n * @part nls__timezone-drop-button-selected-label - The timezone dropdown button selected label\n * @part nls__timezone-drop-content - The timezone dropdown content\n * @part nls__timezone-drop-label - The timezone dropdown label\n * @part nls__language - The language select container\n * @part nls__language-dropdown - The language dropdown\n * @part nls__language-drop-button - The language dropdown button\n * @part nls__language-drop-content - The language dropdown content\n * @part nls__language-drop-label - The language dropdown label\n *\n */\n@Component({\n tag: 'nylas-locale-switch',\n styleUrl: 'nylas-locale-switch.scss',\n shadow: true,\n})\nexport class NylasLocaleSwitch {\n /**\n * The selected timezone.\n */\n @Prop({ mutable: true }) selectedTimezone: string = Intl.DateTimeFormat().resolvedOptions().timeZone;\n\n /**\n * The selected language.\n */\n @Prop({ mutable: true }) selectedLanguage: string = navigator.language;\n\n /**\n * This event is fired when the timezone is changed.\n */\n @Event() timezoneChanged!: EventEmitter<string>;\n\n /**\n * This event is fired when the language is changed.\n */\n @Event() languageChanged!: EventEmitter<string>;\n\n connectedCallback() {}\n\n disconnectedCallback() {}\n\n componentWillLoad() {}\n\n /**\n * Change the timezone.\n * @param timezone The timezone to select.\n */\n private changeTimezone(timezone: string) {\n this.selectedTimezone = timezone;\n this.timezoneChanged.emit(timezone);\n }\n\n /**\n * Change the language.\n * @param language The language to select.\n */\n private changeLanguage(language: string) {\n this.selectedLanguage = language;\n this.languageChanged.emit(language);\n }\n\n @Listen('nylasFormDropdownChanged')\n nylasFormDropdownChangedHandler(\n event: CustomEvent<{\n value: string;\n name: string;\n }>,\n ) {\n const { name, value } = event.detail;\n if (name === 'timezone') {\n this.changeTimezone(value);\n } else if (name === 'language') {\n this.changeLanguage(value);\n }\n }\n\n getTimezoneLabelHTML(timezone: string) {\n const offset = getTimezoneOffset(timezone);\n return (\n <span\n class=\"timezone-label\"\n style={{\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n width: '-webkit-fill-available',\n }}\n >\n {TIMEZONE_MAP[timezone]}{' '}\n <span\n class=\"timezone-offset\"\n style={{\n fontSize: '14px',\n fontWeight: '400',\n color: 'var(--nylas-base-500)',\n }}\n >\n {offset}\n </span>\n </span>\n );\n }\n\n @RegisterComponent<NylasLocaleSwitch, NylasSchedulerConnector, Exclude<NylasScheduling['stores'], undefined>>({\n name: 'nylas-locale-switch',\n stateToProps: new Map([\n ['scheduler.selectedLanguage', 'selectedLanguage'],\n ['scheduler.selectedTimezone', 'selectedTimezone'],\n ]),\n eventToProps: {\n timezoneChanged: async (event: CustomEvent<string>, nylasSchedulerConnector: NylasSchedulerConnector) => {\n debug('nylas-locale-switch', 'timezoneChanged', event.detail);\n nylasSchedulerConnector.scheduler.selectTimezone(event.detail);\n },\n languageChanged: async (event: CustomEvent<string>, nylasSchedulerConnector: NylasSchedulerConnector) => {\n debug('nylas-locale-switch', 'languageChanged', event.detail);\n nylasSchedulerConnector.scheduler.selectLanguage(event.detail);\n },\n },\n fireRegisterEvent: true,\n })\n render() {\n const timezoneOptions = Object.keys(TIMEZONE_MAP).map(key => ({\n labelHTML: this.getTimezoneLabelHTML(key),\n label: TIMEZONE_MAP[key],\n value: key,\n }));\n const languageOptions = Object.keys(LANGUAGE_MAP).map(key => ({\n label: LANGUAGE_MAP[key],\n value: key,\n }));\n\n return (\n <Host>\n <div class=\"nylas-locale-switch\" part=\"nls\">\n <div\n class={{\n 'select-wrapper': true,\n 'timezone': true,\n }}\n part=\"nls__timezone\"\n >\n <select-dropdown\n name=\"timezone\"\n options={timezoneOptions}\n defaultSelectedOption={timezoneOptions.find(op => op.value == this.selectedTimezone)}\n exportparts=\"sd_dropdown: nls__timezone-dropdown, sd_dropdown-button: nls__timezone-drop-button, sd_dropdown-button-selected-label: nls__timezone-drop-button-selected-label, sd_dropdown-content: nls__timezone-drop-content, sd_dropdown_label: nls__timezone-drop-label\"\n >\n <span slot=\"select-icon\">\n <globe-icon width=\"20\" height=\"20\" />\n </span>\n </select-dropdown>\n </div>\n <div\n class={{\n 'select-wrapper': true,\n 'language': true,\n }}\n part=\"nls__language\"\n >\n <select-dropdown\n name=\"language\"\n options={languageOptions}\n defaultSelectedOption={languageOptions.find(lang => lang.value == this.selectedLanguage)}\n exportparts=\"sd_dropdown: nls__language-dropdown, sd_dropdown-button: nls__language-drop-button, sd_dropdown-content: nls__language-drop-content, sd_dropdown_label: nls__language-drop-label\"\n >\n <span slot=\"select-icon\">\n <translate-icon width=\"20\" height=\"20\" />\n </span>\n </select-dropdown>\n </div>\n </div>\n </Host>\n );\n }\n}\n",":host {\n display: flex;\n}\n","import { Component, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'nylas-logo',\n styleUrl: 'icon.css',\n scoped: true,\n})\nexport class NylasLogo {\n @Prop() width: string = '69';\n @Prop() height: string = '24';\n\n render() {\n return (\n <svg width={this.width} height={this.height} viewBox=\"0 0 69 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g clip-path=\"url(#clip0_455_3543)\">\n <path\n d=\"M15.8092 3.03248C14.6497 1.86996 13.1076 1.23047 11.4646 1.23047C9.82156 1.23047 8.27753 1.86996 7.11999 3.03248L0.835347 9.33381C0.686846 9.4827 0.60498 9.68123 0.60498 9.89312C0.60498 10.105 0.686846 10.3035 0.835347 10.4524C0.983848 10.6013 1.18185 10.6834 1.39318 10.6834C1.60451 10.6834 1.80251 10.6013 1.95101 10.4524L8.23374 4.15111C10.0139 2.36627 12.9134 2.36627 14.6935 4.15111C16.4736 5.93785 16.4756 8.84322 14.6935 10.6281L8.4108 16.9275C8.10428 17.2348 8.10428 17.7368 8.4108 18.0461C8.5593 18.195 8.75731 18.2771 8.96863 18.2771C9.17996 18.2771 9.37796 18.195 9.52646 18.0461L15.8092 11.7467C16.9687 10.5841 17.6064 9.03793 17.6064 7.39053C17.6064 5.74314 16.9687 4.19501 15.8092 3.03439V3.03248Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M14.9296 7.39038C14.9296 6.46074 14.5698 5.58837 13.9148 4.93361C12.5631 3.57828 10.3641 3.57828 9.01239 4.93361L0.663961 13.3023C0.51546 13.4512 0.433594 13.6497 0.433594 13.8616C0.433594 14.0735 0.51546 14.272 0.663961 14.4209C0.812462 14.5698 1.01046 14.6519 1.22179 14.6519C1.43312 14.6519 1.63112 14.5698 1.77962 14.4209L10.0367 6.1515L10.05 6.13623C10.0747 6.10759 10.1014 6.07705 10.128 6.05033C10.1585 6.01978 10.1928 5.99115 10.2251 5.96252L10.2442 5.94534C10.9886 5.31349 12.1119 5.3593 12.8011 6.05033C13.4903 6.74135 13.536 7.78171 12.9705 8.53192L12.9648 8.53955C12.9058 8.61591 12.8544 8.67699 12.8011 8.73044C12.7497 8.78198 12.6906 8.83352 12.6069 8.90033L4.45264 17.0991C4.30414 17.248 4.22227 17.4465 4.22227 17.6584C4.22227 17.8703 4.30414 18.0689 4.45264 18.2177C4.60114 18.3666 4.79914 18.4487 5.01047 18.4487C5.2218 18.4487 5.4198 18.3666 5.5683 18.2177L13.9167 9.84716C14.5698 9.1924 14.9315 8.31812 14.9315 7.39038H14.9296Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M10.6821 9.11238C10.4727 9.01694 10.2861 8.88904 10.1281 8.7306C9.97008 8.57216 9.84252 8.38508 9.74733 8.1751L9.69021 8.05103L0.467916 17.2978C0.287049 17.4792 0.174721 17.7082 0.149971 17.9411C0.125221 18.1778 0.19376 18.3897 0.344165 18.5405C0.471724 18.6684 0.65259 18.739 0.850592 18.739C1.11142 18.739 1.37796 18.6207 1.58358 18.4145L10.8059 9.16774L10.6821 9.11047V9.11238Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M68.401 10.6185C68.2126 10.2692 67.9593 9.97334 67.6433 9.73854C67.3235 9.49993 66.956 9.31094 66.5486 9.17541C66.1316 9.03606 65.7033 8.91771 65.2749 8.81844C64.7951 8.70582 64.3039 8.57983 63.8165 8.44811C63.3196 8.31258 62.9065 8.14269 62.5905 7.94225C62.4743 7.88689 62.3391 7.76663 62.3391 7.50129C62.3391 7.39821 62.3639 7.29704 62.4153 7.19587L62.4248 7.18059C62.5352 7.02216 62.7142 6.8828 62.975 6.75109C63.234 6.62128 63.609 6.55829 64.1231 6.55829C64.5286 6.55829 64.877 6.61365 65.1569 6.72436C65.4348 6.83508 65.6652 6.96871 65.8442 7.12524C66.0212 7.27986 66.1659 7.45357 66.2782 7.63873C66.3563 7.76854 66.4267 7.89262 66.4858 8.00525L68.2754 6.84081C68.1669 6.59456 68.0146 6.33495 67.8204 6.0677C67.6033 5.768 67.3254 5.4893 66.9922 5.23732C66.659 4.98534 66.2516 4.77345 65.7813 4.60929C65.3111 4.44512 64.7532 4.36304 64.1231 4.36304C63.3844 4.36304 62.7599 4.46421 62.2706 4.66083C61.7813 4.85935 61.3815 5.09988 61.0845 5.37667C60.7875 5.65346 60.5628 5.95125 60.4143 6.2605C60.2639 6.57547 60.1611 6.85799 60.1078 7.10233C60.0945 7.18059 60.0812 7.27031 60.0678 7.36767C60.0545 7.4593 60.0469 7.5452 60.0469 7.62537C60.0469 8.13314 60.1745 8.56074 60.4239 8.89671C60.679 9.24222 61.0045 9.53429 61.391 9.76336C61.7813 9.99624 62.2116 10.1852 62.6704 10.3227C63.1388 10.462 63.5862 10.5823 64.0012 10.6796C64.4067 10.777 64.7932 10.8782 65.1531 10.9774C65.5224 11.0786 65.8289 11.2122 66.0631 11.3745C66.2801 11.5425 66.3887 11.7448 66.3887 11.9777C66.3887 12.2278 66.2916 12.4263 66.0993 12.5695C65.9279 12.6954 65.7261 12.7985 65.4958 12.8711C65.273 12.9436 65.0407 12.9913 64.8066 13.0142C64.58 13.0352 64.3915 13.0467 64.2468 13.0467C63.8032 13.0467 63.4224 13.0028 63.1197 12.915C62.8151 12.8272 62.5638 12.7241 62.3734 12.6057C62.1811 12.4874 62.0288 12.3614 61.9222 12.2316C61.8213 12.1094 61.747 12.0082 61.7014 11.9319L61.4957 11.6303L59.708 12.7928C59.8508 13.0161 60.0298 13.2643 60.2392 13.5296C60.4772 13.8293 60.7837 14.1138 61.153 14.3734C61.5224 14.633 61.966 14.8525 62.4724 15.0243C62.9788 15.1961 63.5748 15.282 64.2468 15.282C64.797 15.282 65.2901 15.2324 65.7166 15.137C66.1412 15.0396 66.5162 14.9117 66.8285 14.7552C67.1388 14.6005 67.4015 14.4192 67.6109 14.2149C67.8223 14.0107 67.9974 13.8026 68.1326 13.6003C68.4563 13.1135 68.6409 12.5504 68.6828 11.9262C68.6828 11.4069 68.5876 10.9641 68.401 10.6166V10.6185Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M26.3585 4.27905C23.7901 4.27905 21.6997 6.37504 21.6997 8.95017V15.0701H23.9291V8.95017C23.9291 7.6082 25.0181 6.5163 26.3565 6.5163C27.695 6.5163 28.784 7.6082 28.784 8.95017V15.0701H31.0134V8.95017C31.0134 6.37504 28.9229 4.27905 26.3546 4.27905H26.3585Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M53.4522 4.27905C50.4251 4.27905 47.9634 6.74728 47.9634 9.78245C47.9634 12.8176 50.427 15.2859 53.4522 15.2859C54.5545 15.2859 55.6188 14.9594 56.5288 14.3409L56.7116 14.2169V15.0682H58.941V9.78245C58.941 6.74728 56.4793 4.27905 53.4522 4.27905ZM53.4522 13.0505C51.655 13.0505 50.1928 11.5845 50.1928 9.78245C50.1928 7.98044 51.655 6.51439 53.4522 6.51439C55.2494 6.51439 56.7116 7.98044 56.7116 9.78245C56.7116 11.5845 55.2494 13.0505 53.4522 13.0505Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M45.5795 10.6166V0.356201H43.3501V10.6166C43.3501 13.1517 45.3758 15.2228 47.8908 15.2858V13.0486C46.6057 12.9875 45.5795 11.9204 45.5795 10.6166Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M39.5428 4.4967V10.63C39.5428 11.6761 38.8669 12.621 37.9016 12.9284C37.1249 13.1746 36.3157 13.0486 35.6817 12.5829C35.0592 12.1247 34.6879 11.3917 34.6879 10.6186V4.4967H32.4585V10.5995C32.4585 12.7165 33.8388 14.57 35.8131 15.1084C37.0354 15.4424 38.2995 15.2973 39.3695 14.7037L39.5428 14.6063V14.9747C39.5428 16.2766 38.5166 17.3437 37.2315 17.4067V19.6439C39.7465 19.5809 41.7722 17.5117 41.7722 14.9747V4.4967H39.5428Z\"\n fill=\"currentColor\"\n />\n </g>\n <defs>\n <clipPath id=\"clip0_455_3543\">\n <rect width=\"68.7123\" height=\"19.2877\" fill=\"white\" transform=\"translate(0.144043 0.356201)\" />\n </clipPath>\n </defs>\n </svg>\n );\n }\n}\n","@import '../../../common/styles/variables.scss';\n\n:host {\n display: block;\n margin-bottom: -12px; // offset for the rounded border\n width: 100%;\n z-index: 1;\n @include default-css-variables;\n}\n.notif {\n display: flex;\n @media #{$mobile} {\n width: auto;\n }\n padding: 17px;\n align-items: flex-start;\n justify-content: space-between;\n gap: 16px;\n border-radius: var(--nylas-border-radius-2x);\n border: 1.5px solid var(--nylas-error);\n background: var(--nylas-base-0);\n .content {\n display: flex;\n flex-direction: row;\n gap: 8px;\n .message {\n font-size: 14px;\n font-weight: 400;\n color: var(--nylas-base-800);\n .title {\n font-size: 16px;\n font-weight: 600;\n color: var(--nylas-base-950);\n display: block;\n }\n .description {\n font-size: 14px;\n font-weight: 400;\n color: var(--nylas-base-800);\n display: block;\n }\n }\n .icon {\n &.error {\n color: var(--nylas-error);\n }\n }\n }\n\n &.error {\n border-color: var(--nylas-error);\n background: rgba(255, 248, 248, 1);\n }\n &.warning {\n border-color: var(--nylas-warning);\n }\n &.info {\n border-color: var(--nylas-info);\n }\n &.success {\n border-color: var(--nylas-success);\n }\n\n .dismiss-btn {\n background: none;\n border: none;\n color: var(--nylas-base-950);\n cursor: pointer;\n }\n}\n","import { Notification } from '@nylas/core';\nimport { Component, Fragment, Host, Listen, Prop, State, h } from '@stencil/core';\nimport { debug } from '@/utils/utils';\nimport { Element } from '@stencil/core';\n\n/**\n * The `nylas-notification` component is a UI component that displays notifications.\n */\n@Component({\n tag: 'nylas-notification',\n styleUrl: 'nylas-notification.scss',\n shadow: true,\n})\nexport class NylasNotification {\n @Element() host!: HTMLElement;\n\n /**\n * The time-to-live for notifications in milliseconds. Set to 'none' to disable auto-dismissal.\n */\n @Prop() ttl: number | 'none' = 5000;\n @Prop() allowedCategories: string[] = ['component', 'api', 'validation', 'invalid_session'];\n @State() notifications: Notification[] = [];\n\n @Listen('nylasSchedulerError', { target: 'body' })\n onError(event: CustomEvent<{ notification: Notification; host: HTMLElement }>) {\n debug(`[nylas-notification] Error: ${event.detail.notification.title}`);\n this.handleNotification(event);\n }\n\n @Listen('nylasSchedulerWarning', { target: 'body' })\n onWarning(event: CustomEvent<{ notification: Notification; host: HTMLElement }>) {\n debug(`[nylas-notification] Warning: ${event.detail.notification.title}`);\n this.handleNotification(event);\n }\n\n @Listen('nylasSchedulerInfo', { target: 'body' })\n onInfo(event: CustomEvent<{ notification: Notification; host: HTMLElement }>) {\n debug(`[nylas-notification] Info: ${event.detail.notification.title}`);\n this.handleNotification(event);\n }\n\n @Listen('nylasSchedulerSuccess', { target: 'body' })\n onSuccess(event: CustomEvent<{ notification: Notification; host: HTMLElement }>) {\n debug(`[nylas-notification] Success: ${event.detail.notification.title}`);\n this.handleNotification(event);\n }\n\n isChildOf(parentHost: HTMLElement): boolean {\n let parent = this.host.parentNode;\n\n while (parent) {\n if (parent === parentHost) {\n return true;\n }\n if (parent instanceof ShadowRoot) {\n parent = parent.host;\n } else {\n parent = parent.parentNode;\n }\n }\n\n return false;\n }\n\n private handleNotification(event: CustomEvent<{ notification: Notification; host: HTMLElement }>) {\n const parentHost = event.detail.host;\n if (event.defaultPrevented) {\n debug(`[nylas-notification] Event default prevented`);\n return;\n }\n if (parentHost && !this.isChildOf(parentHost)) {\n debug(`[nylas-notification] Host not a parent`);\n return;\n }\n if (this.ttl === 0) {\n debug(`[nylas-notification] TTL is 0`);\n return;\n }\n if (this.allowedCategories.length > 0 && !this.allowedCategories.includes(event.detail.notification.category)) {\n debug(`[nylas-notification] Category not allowed`);\n return;\n }\n\n this.notifications = [...this.notifications, { ...event.detail.notification }];\n if (event.detail.notification.ttl !== 'none') {\n const ttl = event.detail.notification.ttl ? event.detail.notification.ttl : (this.ttl as number);\n window.setTimeout(() => {\n this.notifications = this.notifications.filter(notif => notif.id !== event.detail.notification.id);\n }, ttl);\n }\n }\n\n private dismissNotification(id: string) {\n this.notifications = this.notifications.filter(notif => notif.id !== id);\n }\n\n render() {\n return (\n <Host>\n <Fragment>\n {this.notifications.map(notif => (\n <div class={`notif ${notif.type}`} key={notif.id}>\n <div class=\"content\">\n <span class={`icon ${notif.type}`}>{(notif.type === 'error' || notif.type === 'warning') && <warning-icon />}</span>\n <span class=\"message\">\n <span class=\"title\">{notif.title}</span>\n {notif.description && <span class=\"description\">{notif.description}</span>}\n </span>\n </div>\n <button class=\"dismiss-btn\" onClick={() => this.dismissNotification(notif.id)}>\n <close-icon />\n </button>\n </div>\n ))}\n <slot />\n </Fragment>\n </Host>\n );\n }\n}\n","@import '../../../common/styles/variables.scss';\n\n:host {\n display: block;\n @include default-css-variables;\n}\n\n.event-card-wrapper {\n height: inherit;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n align-items: center;\n font-family: var(--nylas-font-family);\n background-color: var(--nylas-base-0);\n color: var(--nylas-base-900);\n border-radius: var(--nylas-border-radius-3x);\n position: relative;\n margin-top: 1rem;\n width: 424px;\n\n @media #{$mobile} {\n width: 100%;\n border-radius: 0px;\n }\n\n box-shadow:\n 0px 1px 4px rgba(0, 0, 0, 0.1),\n 0px 3px 6px rgba(0, 0, 0, 0.06);\n}\n\n.calendar-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 3rem;\n height: 3rem;\n border-radius: 50%;\n position: absolute;\n top: -1.25rem;\n left: 50%;\n transform: translateX(-50%);\n background-color: var(--nylas-base-0);\n border: 1px solid var(--nylas-base-200);\n color: var(--nylas-base-700);\n}\n\n.booked-event-header {\n margin: 1.5rem 4rem;\n overflow-wrap: anywhere;\n display: flex;\n align-items: center;\n flex-direction: column;\n font-size: 1rem;\n font-weight: 400;\n\n h2 {\n color: var(--nylas-base-600);\n margin-top: 1.5rem;\n margin-bottom: 0.25rem;\n font-size: 1.125rem;\n font-weight: 600;\n }\n}\n\n.manage-booking-description {\n border-top: 1px solid var(--nylas-base-200);\n\n p {\n font-size: 16px;\n margin: 1rem;\n padding: 0.5rem 1rem;\n font-weight: 400;\n color: var(--nylas-base-800);\n }\n}\n\n.footer {\n padding: 0.5rem;\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 0.5rem;\n box-sizing: border-box;\n background-color: var(--nylas-base-25);\n width: 100%;\n border-radius: 0 0 var(--nylas-border-radius-2x) var(--nylas-border-radius-2x);\n\n &.no-template-cols {\n grid-template-columns: 1fr;\n }\n\n &.no-footer {\n display: none;\n }\n}\n\nsp-divider {\n background-color: var(--nylas-base-200);\n height: 1px;\n}\n\ncalendar-check-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n}\n\nbutton-component {\n --dot-color: var(--nylas-base-700);\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { Component, Element, EventEmitter, h, Host, Method, Prop, State } from '@stencil/core';\nimport { ConfigSettings, NylasSchedulerConnector } from '../../..';\nimport { NylasScheduling } from '../nylas-scheduling/nylas-scheduling';\nimport { debug } from '@/utils/utils';\nimport { Event } from '@stencil/core';\nimport { NylasSchedulerErrorResponse } from '@nylas/core';\nimport i18next from '@/utils/i18n';\n\n/**\n * The `nylas-organizer-confirmation-card` component is a UI component that displays the booked event card.\n *\n * @part nmcc - The booked event card host.\n * @part nmcc__card - The booked event card.\n * @part nmcc__title - The title of the booked event card.\n * @part nmcc__description - The description of the booked event card.\n * @part nmcc__button-outline - The cancel & reschedule button CTA.\n * @part nmcc__cancel-cta - The cancel button CTA.\n * @part nmcc__reschedule-cta - The reschedule button CTA.\n */\n@Component({\n tag: 'nylas-organizer-confirmation-card',\n styleUrl: 'nylas-organizer-confirmation-card.scss',\n shadow: true,\n})\nexport class NylasOrganizerConfirmationCard {\n /**\n * The host element.\n */\n @Element() host!: HTMLNylasOrganizerConfirmationCardElement;\n /**\n * Booking flow type.\n */\n @Prop() readonly organizerConfirmationBookingId?: string;\n\n /**\n * The config settings for the scheduler.\n */\n @Prop() readonly configSettings?: ConfigSettings;\n\n /**\n * The loading state prop. Used to display loading state when fetching availability.\n */\n @Prop() readonly isLoading?: boolean;\n\n /**\n * The selected language.\n */\n @Prop({ attribute: 'selected-language' }) readonly selectedLanguage: string = navigator.language;\n\n /**\n * The state to identify which action is being performed.\n */\n @State() action: 'confirm' | 'reject' | null = null;\n\n /**\n * Reject booking button clicked event.\n */\n @Event() readonly rejectBookingButtonClicked!: EventEmitter<{ bookingId: string; host: HTMLNylasOrganizerConfirmationCardElement }>;\n\n /**\n * Reschedule button clicked event.\n * */\n @Event() readonly confirmBookingButtonClicked!: EventEmitter<{\n bookingId: string;\n host: HTMLNylasOrganizerConfirmationCardElement;\n errorHandler?: (error: NylasSchedulerErrorResponse) => void;\n }>;\n\n /**\n * This event is fired when an error occurs while rescheduling the booking.\n */\n @Event() readonly confirmBookingError!: EventEmitter<NylasSchedulerErrorResponse>;\n\n connectedCallback() {}\n\n disconnectedCallback() {}\n\n async componentWillLoad() {\n debug(`[nylas-organizer-confirmation-card] Component will load`);\n }\n\n async componentDidLoad() {\n debug(`[nylas-organizer-confirmation-card] Component did load`);\n }\n\n private handleConfirmBookingButtonClicked = () => {\n this.action = 'confirm';\n const errorHandler = (error: NylasSchedulerErrorResponse) => {\n this.confirmBookingError.emit(error);\n };\n if (this.organizerConfirmationBookingId && !this.isLoading) {\n this.confirmBookingButtonClicked.emit({ bookingId: this.organizerConfirmationBookingId, host: this.host, errorHandler });\n }\n };\n\n private handleRejectBookingButtonClicked = () => {\n this.action = 'reject';\n if (this.organizerConfirmationBookingId && !this.isLoading) {\n this.rejectBookingButtonClicked.emit({ bookingId: this.organizerConfirmationBookingId, host: this.host });\n }\n };\n\n @Method()\n async resetAction() {\n this.action = null;\n }\n\n @RegisterComponent<NylasOrganizerConfirmationCard, NylasSchedulerConnector, Exclude<NylasScheduling['stores'], undefined>>({\n name: 'nylas-organizer-confirmation-card',\n stateToProps: new Map([\n ['scheduler.organizerConfirmationBookingId', 'organizerConfirmationBookingId'],\n ['scheduler.configSettings', 'configSettings'],\n ['scheduler.isLoading', 'isLoading'],\n ['scheduler.selectedLanguage', 'selectedLanguage'],\n ]),\n eventToProps: {\n rejectBookingButtonClicked: async (\n event: CustomEvent<{ bookingId: string; host: HTMLNylasOrganizerConfirmationCardElement }>,\n nylasSchedulerConnector: NylasSchedulerConnector,\n ) => {\n nylasSchedulerConnector.scheduler.setReject(event.detail.bookingId);\n },\n confirmBookingButtonClicked: async (\n event: CustomEvent<{ bookingId: string; host: HTMLNylasOrganizerConfirmationCardElement; errorHandler?: (error: NylasSchedulerErrorResponse) => void }>,\n nylasSchedulerConnector: NylasSchedulerConnector,\n ) => {\n const { host } = event.detail;\n const result = await nylasSchedulerConnector.scheduler.updateBooking({\n bookingId: event.detail.bookingId,\n status: 'confirmed',\n });\n const { errorHandler } = event.detail;\n if (errorHandler && (!result || 'error' in result)) {\n errorHandler(result);\n }\n await host.resetAction();\n },\n },\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host part=\"nmcc\">\n <div class=\"event-card-wrapper\" part=\"nmccc__card\">\n <div class=\"calendar-icon\">\n <calendar-check-icon />\n </div>\n <div class=\"booked-event-header\">\n <h2 slot=\"card-title\" part=\"nmcc__title\">\n {!!this.organizerConfirmationBookingId && `${i18next.t('bookingPendingTitle')}!`}\n </h2>\n </div>\n <div class=\"manage-booking-description\">\n <p>{i18next.t('bookingPendingnDescription')}</p>\n </div>\n <div\n class={{\n 'footer': true,\n 'no-footer': this.configSettings?.scheduler?.hide_cancellation_options && this.configSettings?.scheduler?.hide_rescheduling_options,\n 'no-template-cols': this.configSettings?.scheduler?.hide_cancellation_options || this.configSettings?.scheduler?.hide_rescheduling_options,\n }}\n >\n {!this.configSettings?.scheduler?.hide_cancellation_options && (\n <button-component\n variant={'destructive'}\n onClick={this.handleRejectBookingButtonClicked}\n isLoading={this.isLoading && this.action === 'reject'}\n part=\"nmcc__button-outline nmcc__cancel-cta\"\n >\n {`${i18next.t('rejectBookingButton')}`}\n </button-component>\n )}\n {!this.configSettings?.scheduler?.hide_rescheduling_options && (\n <button-component\n variant={'basic'}\n onClick={this.handleConfirmBookingButtonClicked}\n isLoading={this.isLoading && this.action === 'confirm'}\n part=\"nmcc__button-outline nmcc__reschedule-cta\"\n >\n {`${i18next.t('confirmBookingButton')}`}\n </button-component>\n )}\n </div>\n </div>\n </Host>\n );\n }\n}\n","@import '../../../common/styles/variables.scss';\n\n:host {\n display: block;\n position: relative;\n height: inherit;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n font-family: var(--nylas-font-family);\n}\n\n.event-card {\n display: flex;\n align-items: center;\n flex-direction: column;\n width: calc(100% - 3rem);\n background-color: var(--nylas-base-0);\n color: var(--nylas-base-800);\n border-radius: var(--nylas-border-radius-2x);\n padding: 3rem 1.5rem 1.5rem 1.5rem;\n position: relative;\n box-shadow:\n 0px 1px 3px 0px rgba(0, 0, 0, 0.1),\n 0px 1px 2px 0px rgba(0, 0, 0, 0.06);\n\n @media #{$mobile} {\n margin-bottom: 2rem;\n }\n}\n\n.nylas-selected-event-card__date {\n font-size: min(max(16px, 3vw), 18px);\n font-weight: 600;\n}\n\n.nylas-selected-event-card__time {\n font-size: 16px;\n font-weight: 500;\n}\n\n.calendar-icon {\n width: 3rem;\n height: 3rem;\n border-radius: 50%;\n position: absolute;\n top: -1.25rem;\n left: 50%;\n transform: translateX(-50%);\n background-color: var(--nylas-base-0);\n border: 1px solid var(--nylas-base-200);\n}\n\ncalendar-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n}\n\n.event-timezone {\n display: flex;\n color: var(--nylas-base-600);\n margin-bottom: 8px;\n\n @media #{$mobile} {\n margin-bottom: 16px;\n }\n\n gap: 4px;\n align-items: center;\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { Component, h, Host, Prop, State } from '@stencil/core';\nimport type { NylasSchedulerConnector } from '../../..';\nimport type { Timeslot } from '@nylas/core';\nimport { NylasScheduling } from '../nylas-scheduling/nylas-scheduling';\nimport { capitalizeFirstLetter, debug } from '@/utils/utils';\nimport { LANGUAGE_CODE_MAP, TIMEZONE_MAP } from '@/common/constants';\n\n/**\n * The `nylas-selected-event-card` component is a UI component that displays the selected event card.\n *\n * @part nsec - The selected event card component.\n * @part nsec__card - The card component.\n * @part nsec__icon - The calendar icon.\n * @part nsec__date - The date selected.\n * @part nsec__time - The timeslot selected.\n * @part nsec__timezone - The timezone selected.\n */\n@Component({\n tag: 'nylas-selected-event-card',\n styleUrl: 'nylas-selected-event-card.scss',\n shadow: true,\n})\nexport class NylasSelectedEventCard {\n /**\n * The selected date.\n */\n @Prop({ attribute: 'selected-date' }) readonly selectedDate?: Date;\n\n /**\n * The selected time.\n */\n @Prop({ attribute: 'selected-timeslot' }) readonly selectedTimeslot?: Timeslot;\n\n /***\n * The selected timezone.\n */\n @Prop({ attribute: 'selected-timezone' }) readonly selectedTimezone: string = Intl.DateTimeFormat().resolvedOptions().timeZone;\n\n /**\n * The selected language.\n */\n @Prop({ attribute: 'selected-language' }) readonly selectedLanguage?: string;\n\n @State() startTime: string = '';\n @State() endTime: string = '';\n\n connectedCallback() {}\n\n disconnectedCallback() {}\n\n async componentWillLoad() {\n debug(`[nylas-selected-event-card] Component will load`);\n }\n\n async componentDidLoad() {\n debug(`[nylas-selected-event-card] Component did load`);\n if (!this.selectedDate) {\n console.warn('[nylas-selected-event-card] \"selectedDate\" prop is not provided.');\n }\n if (!this.selectedTimeslot) {\n console.warn('[nylas-selected-event-card] \"selectedTimeslot\" prop is not provided.');\n }\n const timeFormat = new Intl.DateTimeFormat('en-US', {\n hour: '2-digit',\n minute: '2-digit',\n timeZone: this.selectedTimezone,\n });\n\n this.startTime = timeFormat.format(new Date(this.selectedTimeslot?.start_time as Date));\n this.endTime = timeFormat.format(new Date(this.selectedTimeslot?.end_time as Date));\n }\n\n @RegisterComponent<NylasSelectedEventCard, NylasSchedulerConnector, Exclude<NylasScheduling['stores'], undefined>>({\n name: 'nylas-selected-event-card',\n stateToProps: new Map([\n ['scheduler.selectedDate', 'selectedDate'],\n ['scheduler.selectedTimeslot', 'selectedTimeslot'],\n ['scheduler.selectedTimezone', 'selectedTimezone'],\n ['scheduler.selectedLanguage', 'selectedLanguage'],\n ]),\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host part=\"nsec\">\n <div class=\"event-card\" part=\"nsec__card\">\n <div class=\"calendar-icon\" part=\"nsec__icon\">\n <calendar-icon />\n </div>\n <div class=\"nylas-selected-event-card__date\" part=\"nsec__date\">\n {this.selectedDate\n ? capitalizeFirstLetter(\n this.selectedDate?.toLocaleDateString(LANGUAGE_CODE_MAP[this.selectedLanguage || navigator.language], { dateStyle: 'full', timeZone: this.selectedTimezone }),\n )\n : '-'}\n </div>\n <div class=\"nylas-selected-event-card__time\" part=\"nsec__time\">\n {this.startTime} - {this.endTime}\n </div>\n </div>\n <div class=\"event-timezone\" part=\"nsec__timezone\">\n <globe-icon></globe-icon>\n {TIMEZONE_MAP[this.selectedTimezone]}\n </div>\n </Host>\n );\n }\n}\n","@import '../../../common/styles/variables.scss';\n\n:host {\n display: block;\n height: calc(100% - 48px); //48px is the height of the header\n}\n\n.time-picker-wrapper {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n\n.timeslots {\n position: relative;\n display: flex;\n flex-direction: column;\n gap: 0.75rem;\n align-items: center;\n overflow-y: scroll;\n padding: 0.5rem 1.5rem 1.5rem;\n flex: 1;\n}\n\n.time {\n /* Frame 12 */\n box-sizing: border-box;\n\n /* Auto layout */\n\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n padding: 4px 12px;\n gap: 0.5rem;\n font-size: 16px;\n font-weight: 500;\n font-family: inherit;\n\n width: 100%;\n height: 48px;\n\n color: var(--nylas-base-800);\n background: var(--nylas-base-0);\n border: none;\n outline: 1.5px solid var(--nylas-base-200);\n border-radius: var(--nylas-border-radius-2x);\n\n flex: none;\n order: 4;\n align-self: stretch;\n flex-grow: 0;\n\n cursor: pointer;\n\n &:hover,\n &:focus {\n color: var(--nylas-primary);\n outline-color: var(--nylas-primary);\n }\n\n &.selected {\n font-weight: 600;\n color: var(--nylas-primary);\n outline: 2px solid var(--nylas-primary);\n border-color: transparent;\n box-shadow: 0 0 0 2px var(--nylas-primary);\n }\n}\n\n.empty {\n text-align: center;\n padding: 0 1.5rem;\n color: var(--nylas-base-600);\n font-size: min(max(12px, 2vw), 14px);\n height: 450px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n@keyframes pulsate {\n 0% {\n background-color: var(--nylas-base-50);\n }\n\n 50% {\n background-color: var(--nylas-base-100);\n }\n\n 100% {\n background-color: var(--nylas-base-50);\n }\n}\n\n.loading {\n padding: 0 1.5rem;\n\n .timeslot-skeleton {\n width: 100%;\n height: 4rem;\n background-color: var(--nylas-base-50);\n margin-bottom: 0.5rem;\n border-radius: var(--nylas-border-radius-2x);\n animation: pulsate 1.5s infinite ease-in-out;\n }\n}\n\n.footer {\n width: 100%;\n padding: 14px;\n box-sizing: border-box;\n border-top: 1px solid var(--nylas-base-200);\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { debug, isSameDay } from '@/utils/utils';\nimport { Component, Event, EventEmitter, Host, Prop, State, Watch, h } from '@stencil/core';\nimport { NylasSchedulerConnector } from '../../..';\nimport { NylasScheduling } from '../nylas-scheduling/nylas-scheduling';\nimport { AvailabilityTimeslot } from '@/stores/scheduler-store';\nimport type { Timeslot } from '@nylas/core';\nimport i18next from '@/utils/i18n';\n\n/**\n * The `nylas-timeslot-picker` component is a UI component that allows users to select a timeslot from a list of available timeslots.\n *\n * @slot timeslot-picker-cta-label - The label for the timeslot picker CTA. Default is \"Next\".\n * @part ntp - The timeslot picker component.\n * @part ntp__timeslot - The timeslot button.\n * @part ntp__timeslot--selected - The selected timeslot button.\n * @part ntp__button-primary - The timeslot picker CTA.\n */\n@Component({\n tag: 'nylas-timeslot-picker',\n styleUrl: 'nylas-timeslot-picker.scss',\n shadow: true,\n})\nexport class NylasTimeslotPicker {\n /**\n * The selected date.\n */\n @Prop({ attribute: 'selected-date' }) readonly selectedDate?: Date = new Date();\n /**\n * The available timeslots.\n */\n @Prop({ attribute: 'availability' }) readonly availability?: AvailabilityTimeslot[];\n /**\n * The selected timeslot.\n */\n @Prop({ attribute: 'selected-timeslot' }) readonly selectedTimeslot?: Timeslot;\n /**\n * The loading state prop. Used to display loading state when fetching availability.\n */\n @Prop({ attribute: 'loading-state' }) readonly isLoading?: boolean;\n /**\n * The selected timezone.\n */\n @Prop({ attribute: 'selected-timezone' }) readonly selectedTimezone: string = Intl.DateTimeFormat().resolvedOptions().timeZone;\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: string;\n\n /**\n * This event is fired when a timeslot is selected.\n */\n @Event() readonly timeslotSelected!: EventEmitter<Timeslot>;\n /**\n * This event is fired when a timeslot is confirmed. By default, this will proceed to the booking form page.\n */\n @Event() readonly timeslotConfirmed!: EventEmitter<Timeslot>;\n\n @State() times: AvailabilityTimeslot[] = [];\n @State() hoveredTimeslotIndex?: number;\n @State() selectedTimeslotIndex?: string;\n\n @Watch('selectedLanguage')\n selectedLanguageChanged(newLanguage: string) {\n i18next.changeLanguage(newLanguage);\n }\n\n @Watch('selectedDate')\n selectedDateChanged(newVal: Date | null | undefined) {\n debug(`[nylas-timeslot-picker] Selected date changed`, { newVal });\n\n if (newVal) {\n this.selectedTimeslotIndex = '';\n if (typeof newVal !== 'undefined') {\n const availableTimes = this.availability?.filter(timeslot => isSameDay(timeslot.start_time, newVal)).map(timeslot => timeslot);\n this.times = availableTimes || [];\n }\n }\n }\n\n @Watch('availability')\n availabilityChanged(newVal: AvailabilityTimeslot[] | undefined) {\n debug(`[nylas-timeslot-picker] Available times changed`, { newVal, selectedDate: this.selectedDate });\n\n if (typeof newVal !== 'undefined') {\n const availableTimes = newVal?.filter(timeslot => this.selectedDate && isSameDay(timeslot.start_time, this.selectedDate)).map(timeslot => timeslot);\n this.times = availableTimes || [];\n }\n }\n\n connectedCallback() {}\n\n disconnectedCallback() {}\n\n async componentWillLoad() {\n const availableTimes = this.availability?.filter(timeslot => this.selectedDate && isSameDay(timeslot.start_time, this.selectedDate)).map(timeslot => timeslot);\n this.times = availableTimes || [];\n debug(`[nylas-timeslot-picker] Component will load`, { selectedDate: this.selectedDate, availability: this.availability, times: this.times });\n }\n\n async componentDidLoad() {\n debug(`[nylas-timeslot-picker] Component did load`);\n }\n\n private getTimeslotId(date: Date, index: number) {\n return `${date.toLocaleDateString()}-${index}`;\n }\n\n private onClickSelectTime(timeslot: Timeslot, index: number) {\n debug(`[nylas-timeslot-picker] Time selected`, timeslot, index);\n this.selectedTimeslotIndex = this.getTimeslotId(timeslot.start_time, index);\n this.timeslotSelected.emit({\n start_time: timeslot.start_time,\n end_time: timeslot.end_time,\n emails: timeslot.emails,\n });\n }\n\n private handleConfirmedTimeslot = async (event: Event, timeslot: Timeslot | undefined) => {\n event.preventDefault();\n debug(`[nylas-timeslot-picker] Confirm timeslot`, timeslot);\n this.timeslotConfirmed.emit(timeslot);\n };\n\n private handleMouseEnter = (index: number) => {\n this.hoveredTimeslotIndex = index;\n };\n\n private handleMouseLeave = () => {\n this.hoveredTimeslotIndex = -1;\n };\n\n private getTimeSlotLabel(timeslot: Timeslot) {\n const timeFormat = new Intl.DateTimeFormat('en-US', {\n hour: '2-digit',\n minute: '2-digit',\n timeZone: this.selectedTimezone,\n });\n return `${timeFormat.format(timeslot.start_time)} - ${timeFormat.format(timeslot.end_time)}`;\n }\n\n @RegisterComponent<NylasTimeslotPicker, NylasSchedulerConnector, Exclude<NylasScheduling['stores'], undefined>>({\n name: 'nylas-timeslot-picker',\n stateToProps: new Map([\n ['scheduler.selectedDate', 'selectedDate'],\n ['scheduler.availability', 'availability'],\n ['scheduler.selectedTimeslot', 'selectedTimeslot'],\n ['scheduler.selectedTimezone', 'selectedTimezone'],\n ['scheduler.selectedLanguage', 'selectedLanguage'],\n ['scheduler.isLoading', 'isLoading'],\n ]),\n eventToProps: {\n timeslotSelected: async (event: CustomEvent<Timeslot>, nylasSchedulerConnector: NylasSchedulerConnector) => {\n debug('nylas-timeslot-picker', 'timeslotSelected', event.detail);\n nylasSchedulerConnector.scheduler.selectTime(event.detail);\n },\n timeslotConfirmed: async (event: CustomEvent<Timeslot>, nylasSchedulerConnector: NylasSchedulerConnector) => {\n debug('nylas-timeslot-picker', 'timeslotConfirmed', event.detail);\n if (event.detail) {\n nylasSchedulerConnector.scheduler.toggleAdditionalData(true);\n }\n },\n },\n fireRegisterEvent: true,\n })\n render() {\n if (this.isLoading) {\n return (\n <Host>\n <div class={'loading'}>\n {new Array(6).fill(0).map((_, i) => (\n <div class={'timeslot-skeleton'} style={{ animationDelay: `${i * 20}ms` }} />\n ))}\n </div>\n </Host>\n );\n }\n\n if (this.availability && this.availability.length === 0) {\n return (\n <Host>\n <div class={'empty'}>\n <span>No dates available</span>\n </div>\n </Host>\n );\n }\n\n if ((!this.times || this.times.length === 0) && !!this.selectedDate) {\n return (\n <Host>\n <div class={'empty'}>\n <span>No time slots available for selected date</span>\n </div>\n </Host>\n );\n }\n\n if (!this.selectedDate) return <Host></Host>;\n\n return (\n <Host part=\"ntp\">\n <div class={'time-picker-wrapper'}>\n <div class={'timeslots'}>\n {this.times.map((timeslot, index) => (\n <button\n part={`ntp__timeslot ${this.selectedTimeslot?.start_time?.getTime() === timeslot.start_time.getTime() ? 'ntp__timeslot--selected' : ''}`}\n aria-role=\"button\"\n class={{\n time: true,\n selected: typeof this.selectedTimeslot !== 'undefined' && this.selectedTimeslot?.start_time?.getTime() === timeslot.start_time.getTime(),\n }}\n onClick={() => this.onClickSelectTime(timeslot, index)}\n onMouseEnter={() => this.handleMouseEnter(index)}\n onMouseLeave={() => this.handleMouseLeave()}\n >\n {this.hoveredTimeslotIndex == index || this.selectedTimeslotIndex == this.getTimeslotId(timeslot.start_time, index)\n ? this.getTimeSlotLabel(timeslot)\n : timeslot.start_time.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit', timeZone: this.selectedTimezone })}\n </button>\n ))}\n </div>\n {this.selectedTimeslot && (\n <div class={'footer'}>\n <button-component variant={'primary'} onClick={(event: Event) => this.handleConfirmedTimeslot(event, this.selectedTimeslot)} part=\"ntp__button-primary\">\n <slot name=\"timeslot-picker-cta-label\">{i18next.t('nextButton')}</slot>\n </button-component>\n </div>\n )}\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"wSAAA,MAAMA,EAA0B,qnFAChC,MAAAC,EAAeD,E,ugBCyBFE,EAAoB,M,2TAoFvBC,KAAAC,iCAAmC,KACzC,MAAMC,EAAY,IAAIC,KAAKH,KAAKI,iBAAiBC,YACjD,MAAMC,EAAwBN,KAAKO,gBAAgBC,WAAWC,wBAC9D,MAAMC,EAAuBR,EAAUS,UAAYL,EAAwB,GAAK,IAChF,GAAII,GAAuB,IAAIP,MAAOQ,UAAW,CAC/CX,KAAKY,iCAAiCC,KAAK,CACzCC,MAAO,CACLC,MAAO,qBACPC,QAAS,wCAAwCV,4B,KAGhD,CACLN,KAAKiB,2BAA2BJ,KAAK,CAAEK,UAAWlB,KAAKmB,UAAUC,Y,GAI7DpB,KAAAqB,8BAAgC,KACtC,MAAMC,EAAgBR,IACpBd,KAAKuB,2BAA2BV,KAAKC,EAAM,EAE7Cd,KAAKwB,wBAAwBX,KAAK,CAAEK,UAAWlB,KAAKmB,UAAUC,WAAYE,gBAAe,EAG3FtB,KAAAyB,kBAAqBC,IACnB,OAAQA,GACN,IAAK,OACH,MAAO,OACT,IAAK,MACH,MAAO,MACT,QACE,MAAO,G,+GA/F+BC,KAAKC,iBAAiBC,kBAAkBC,S,6GAoBNC,UAAUC,Q,CA2BxF,iBAAAC,GAAiB,CAEjB,oBAAAC,GAAoB,CAEpB,uBAAMC,GACJC,EAAM,gD,CAGR,sBAAMC,GACJD,E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AkBvU,MAAOC,EAA8BC,KACrD3C,EAAM,wBAAyB,mBAAoB0C,EAAMG,QACzDF,EAAwBvE,UAAUmZ,WAAW7U,EAAMG,OAAO,EAE5DsT,kBAAmB1T,MAAOC,EAA8BC,KACtD3C,EAAM,wBAAyB,oBAAqB0C,EAAMG,QAC1D,GAAIH,EAAMG,OAAQ,CAChBF,EAAwBvE,UAAUuK,qBAAqB,K,IAI7D1F,kBAAmB,O"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{h as e,F as t,r as n,c as i,H as s,a}from"./p-68c2fadf.js";import{n as o,N as r}from"./p-7d71679f.js";import{a as l,i as d,k as c,j as h,l as f}from"./p-c6fcb288.js";import{N as g,E as p,C as u}from"./p-3bd81aa6.js";import{L as b,a as m}from"./p-d4353a55.js";import"./p-cb65c223.js";import"./p-cabb2e68.js";class y{constructor({schedulerAPIURL:e,nylasSchedulerStore:t,sessionId:n,configId:i,slug:s,clientId:a}){if(!e){throw new Error("schedulerAPIURL is required")}if(!t){throw new Error("nylasSchedulerStore is required")}if(!n&&!i&&!(s||a)){throw new Error("sessionId is required for private configs. If using public config either pass a configurationId or a combination of slug and clientId.")}if(e==="/"){const t=new URL(window.location.href);e=t.origin}this.configId=i;this.sessionId=n;this.schedulerAPIURL=e;this.nylasSchedulerStore=t;this.slug=s;this.clientId=a}init(){l("NylasConnector init")}get schedulerStore(){return this.nylasSchedulerStore}get scheduler(){if(this._schedulerAPIConnector){return this._schedulerAPIConnector}this._schedulerAPIConnector=new g({schedulerAPIURL:this.schedulerAPIURL,schedulerStore:this.schedulerStore,sessionId:this.sessionId,configId:this.configId,slug:this.slug,clientId:this.clientId});return this._schedulerAPIConnector}resetStores(){this.nylasSchedulerStore.reset()}}const _=(n,i)=>{const s=n.isLoading;const a=n.showNotification;const o=n.nylasBranding;return e(t,null,a&&e("nylas-notification",null),s&&e("div",{class:"loading"},e("div",{class:"left"},e("div",{class:"skeleton"})),e("div",{class:"right"},e("div",{class:"skeleton"}),e("div",{class:"skeleton"}),e("div",{class:"skeleton"}),e("div",{class:"skeleton"}),e("div",{class:"skeleton"}))),!s&&i,e("div",{class:"footer"},o&&e(t,null,"Powered by ",e("nylas-logo",null))))};const v=(t,n)=>e("div",{class:"message-banner"},n);const w=':host{display:flex;flex-direction:column;overflow:visible;border-radius:var(--nylas-border-radius-2x);width:fit-content;background:var(--nylas-base-0);position:relative;box-shadow:0px 4px 8px 2px rgba(0, 0, 0, 0.05), 0px 8px 16px -2px rgba(0, 0, 0, 0.1);--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;font-family:var(--nylas-font-family);font-optical-sizing:auto;font-style:normal;font-variation-settings:"slnt" 0}@media screen and (max-width: 768px){:host{width:auto;min-width:325px}}:root{font-family:inherit}.error{padding:8rem 12rem;color:var(--nylas-base-0);background-color:var(--nylas-error);margin:1.5rem;border-radius:var(--nylas-border-radius-2x)}.message-banner{text-align:right;color:var(--nylas-base-800);padding:1rem;border-bottom:1px solid var(--nylas-color-primary-200);margin:0}.loading{margin:1.5rem;display:flex;gap:1rem}.loading .skeleton{border-radius:var(--nylas-border-radius-2x);animation:pulsate 1.5s infinite}.loading .skeleton:nth-child(2){animation-delay:-100ms}.loading .skeleton:nth-child(3){animation-delay:-200ms}.loading .skeleton:nth-child(4){animation-delay:-300ms}.loading .skeleton:nth-child(5){animation-delay:-400ms}.loading .left .skeleton{height:100%;width:400px}.loading .right .skeleton{height:5rem;width:300px;margin-bottom:1rem}.loading .right .skeleton:last-child{margin-bottom:0}@keyframes pulsate{0%{background-color:var(--nylas-base-50)}50%{background-color:var(--nylas-base-100)}100%{background-color:var(--nylas-base-50)}}.select-date-page,.additional-data-page,.booked-event-page,.manual-confirmation-page,.cancelled-event-page,.cancel-flow-page{border-top-left-radius:var(--nylas-border-radius-2x);border-top-right-radius:var(--nylas-border-radius-2x)}.select-date-page,.additional-data-page{display:flex}@media screen and (max-width: 768px){.select-date-page,.additional-data-page{flex-direction:column}}.booked-event-page,.manual-confirmation-page{background-color:var(--nylas-base-50)}.cancelled-event-page,.manual-confirmation-page,.cancel-flow-page{padding:1rem;height:496px;display:flex;justify-content:center;align-items:center}.booked-event-page,.manual-confirmation-page,.cancelled-event-page,.cancel-flow-page{min-width:784px;background:var(--nylas-base-50)}@media screen and (max-width: 768px){.booked-event-page,.manual-confirmation-page,.cancelled-event-page,.cancel-flow-page{min-width:90%}}.left-panel{display:flex;flex-direction:column;min-width:424px;border-top-left-radius:inherit;background:var(--nylas-base-0);position:relative;padding:1rem 0 0 0;height:624px}@media screen and (max-width: 768px){.left-panel{border-top-right-radius:inherit;min-width:unset;height:auto}}@media screen and (max-width: 768px){.select-date-page .left-panel{padding:0.5rem 4px 0;height:624px}}.border{margin-left:-20px;margin-right:-20px;border-top-width:1px;height:0.5px;background-color:var(--nylas-base-200)}@media screen and (max-width: 768px){.border{display:none}}.right-panel{min-width:360px;width:360px;background-color:var(--nylas-base-50);height:624px;padding-top:16px;border-left:1px solid var(--nylas-base-200);border-top-right-radius:inherit}.right-panel.reschedule{border-top-right-radius:0px}@media screen and (max-width: 768px){.right-panel{border-top-right-radius:0px;width:inherit;min-width:unset;height:auto}}.right-panel h2{display:flex;margin:0;height:48px;gap:0.5rem;justify-content:center;align-items:center;width:auto;font-size:1.125rem;line-height:1.5rem;font-weight:500;text-align:center;color:var(--nylas-base-800)}.additional-data-page .left-panel{background-color:var(--nylas-base-50)}.additional-data-page .right-panel{background-color:var(--nylas-base-0)}nylas-selected-event-card{height:604px;padding:0 1rem}@media screen and (max-width: 768px){nylas-selected-event-card{height:250px}}.footer{display:flex;justify-content:flex-end;align-items:center;padding:16px;font-size:14px;font-weight:300;color:var(--nylas-base-500);border-top:1px solid var(--nylas-base-200);min-height:24px}.footer svg{fill:var(--nylas-base-500)}.footer svg{margin-top:1px}nylas-selected-event-card::part(nsec__timezone){position:absolute;bottom:0}nylas-notification{margin:1.5rem;width:-webkit-fill-available;width:-moz-available;position:absolute}nylas-locale-switch{position:absolute;padding:18px 20px;bottom:0;width:-webkit-fill-available;width:-moz-available;border-top:1px solid var(--nylas-base-200)}@media screen and (max-width: 768px){nylas-locale-switch{height:auto}}nylas-date-picker{padding:0 20px}';const x=w;const k={title:d.t("genericErrorTitle"),type:o.Error,category:p.Component};const I=class{constructor(e){n(this,e);this.init=i(this,"init",7);this.schedulerWillLoad=i(this,"schedulerWillLoad",7);this.schedulerDidLoad=i(this,"schedulerDidLoad",7);this.nylasSchedulerError=i(this,"nylasSchedulerError",7);this.configSettingsLoaded=i(this,"configSettingsLoaded",7);this.bookingRefExtracted=i(this,"bookingRefExtracted",7);this.bookedEventInfo=i(this,"bookedEventInfo",7);this.mode="app";this.defaultSchedulerState=undefined;this.sessionId=undefined;this.schedulerApiUrl="https://api.us.nylas.com";this.bookingInfo=undefined;this.rescheduleBookingRef=undefined;this.cancelBookingRef=undefined;this.organizerConfirmationBookingRef=undefined;this.configurationId=undefined;this.slug=undefined;this.clientId=undefined;this.nylasBranding=true;this.eventOverrides={};this.isLoading=undefined;this.themeConfig=undefined;this.localization=undefined;this.showNotification=true;this.automaticComponentRegistration=true;this.selectedDateLabel=(new Date).toLocaleDateString(undefined,{dateStyle:"full"})||`${d.t("noDateSelected")}`;this.refConfigId=undefined;this.language=navigator.language}connectedCallback(){l(`[nylas-scheduler] connectedCallback`)}async componentWillLoad(){l(`[nylas-scheduler] Component will load`);const e=this.schedulerWillLoad.emit(this.host);if("schedulerWillLoad"in this.eventOverrides){await this.eventOverrides.schedulerWillLoad(e,this.nylasSchedulerConnector);if(e.defaultPrevented){return}}this.stores={scheduler:u({bookingInfo:this.bookingInfo,nylasBranding:this.nylasBranding,...this.defaultSchedulerState})};this.baseProvider=new r(this.host,this.stores,this.automaticComponentRegistration,this.eventOverrides);this.refConfigId=this.configurationId;let t;if(this.rescheduleBookingRef){const[e,n,i]=c(this.rescheduleBookingRef);this.refConfigId=e;this.stores.scheduler.set("rescheduleBookingId",n);t=this.bookingRefExtracted.emit({configurationId:e,bookingId:n})}else if(this.cancelBookingRef){const[e,n,i]=c(this.cancelBookingRef);this.refConfigId=e;this.stores.scheduler.set("cancelBookingId",n);t=this.bookingRefExtracted.emit({configurationId:e,bookingId:n})}else if(this.organizerConfirmationBookingRef){const[e,n,i]=c(this.organizerConfirmationBookingRef);this.refConfigId=e;this.stores.scheduler.set("organizerConfirmationBookingId",n);this.stores.scheduler.set("organizerConfirmationSalt",i);t=this.bookingRefExtracted.emit({configurationId:e,bookingId:n,salt:i})}if("bookingRefExtracted"in this.eventOverrides){await this.eventOverrides.bookingRefExtracted(t,this.nylasSchedulerConnector);if(t.defaultPrevented){return}}if(!this.checkIfSessionIdOrConfigIdExists()){return}const n=this.baseProvider?.getStore("scheduler");this.nylasSchedulerConnector=new y({schedulerAPIURL:this.schedulerApiUrl,sessionId:this.sessionId,configId:this.refConfigId,slug:this.slug,clientId:this.clientId,nylasSchedulerStore:n});const i=this.init.emit(this.host);if("init"in this.eventOverrides){await this.eventOverrides.init(i,this.nylasSchedulerConnector);if(i.defaultPrevented){return}}this.baseProvider?.componentWillLoad(this.nylasSchedulerConnector);this.applyThemeConfig(this.themeConfig)}async componentDidLoad(){this.baseProvider?.componentDidLoad();const e=this.schedulerDidLoad.emit(this.host);if("schedulerDidLoad"in this.eventOverrides){await this.eventOverrides.schedulerDidLoad(e,this.nylasSchedulerConnector);if(e.defaultPrevented){return}}if(!this.checkIfSessionIdOrConfigIdExists()){return}this.localizationChanged(this.localization);const t=await(this.nylasSchedulerConnector?.scheduler.getUISettings());if(!t||"error"in t){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(t?.error)},host:this.host})}else{if("data"in t&&t.data?.appearance){console.info("Appearance settings have been returned from the configuration used byt his scheduling page; please remember to grab them from the configSettingsLoaded event and apply them as desired.")}const e=this.configSettingsLoaded.emit({settings:t});if("configSettingsLoaded"in this.eventOverrides){await this.eventOverrides.configSettingsLoaded(e,this.nylasSchedulerConnector);if(e.defaultPrevented){return}}}const n=this.baseProvider?.getStore("scheduler");const i=n?.get("configSettings")?.scheduler?.available_days_in_future;const s=n?.get("selectedTimeslot");if(s&&s?.start_time){if(!this.isTimeslotValid(s)){return}if(n?.get("showBookingForm")){n?.set("selectedDate",s.start_time);return}}const a=n?.get("selectedDate");const o=n?.get("availability");let r;if(o&&o.length>0){return}if(!a){const e=new Date;const{startTime:t,endTime:n,endTimeForAvailableDaysInFuture:s}=this.validateAvailableDaysInFuture(e,i||30);if(e.getTime()<s*1e3){r=await(this.nylasSchedulerConnector?.scheduler.getAvailability(t,n))}}else{const{startTime:e,endTime:t,endTimeForAvailableDaysInFuture:n}=this.validateAvailableDaysInFuture(a,i||30);if(a.getTime()<n*1e3){r=await(this.nylasSchedulerConnector?.scheduler.getAvailability(e,t))}}if(!r||"error"in r){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(r?.error)},host:this.host})}if(!a){let e=new Date;const t=n?.get("availability").find((e=>new Date(e.start_time)>new Date));if(t){e=t.start_time}n?.set("selectedDate",e)}}componentDisconnected(){this.baseProvider?.componentDisconnected()}bookingInfoChanged(e){this.stores?.scheduler.set("bookingInfo",e)}rescheduleBookingRefChanged(e){if(e){const[t,n]=c(e);this.stores?.scheduler.set("rescheduleBookingId",n);this.refConfigId=t;this.nylasSchedulerConnector?.scheduler.setConfigId(t)}}cancelBookingRefChanged(e){if(e){const[t,n]=c(e);this.stores?.scheduler.set("cancelBookingId",n);this.refConfigId=t;this.nylasSchedulerConnector?.scheduler.setConfigId(t)}}organizerConfirmationBookingRefChanged(e){if(e){const[t,n]=c(e);this.stores?.scheduler.set("organizerConfirmationBookingId",n);this.refConfigId=t;this.nylasSchedulerConnector?.scheduler.setConfigId(t)}}localizationChanged(e){if(!e){return}Object.keys(e).forEach((t=>{if(!(t in b)){return}d.addResourceBundle(t,"translation",e[t],false,true);this.language=this.language}))}themeConfigChanged(e){this.applyThemeConfig(e)}languageChanged(e){const t=e.detail;this.language=t;d.changeLanguage(t)}async registerComponentHandler(e){this.baseProvider?.registerComponent(e.detail)}async unregisterComponentHandler(e){this.baseProvider?.unregisterComponent(e.detail)}async monthChangedHandler(e){const t=e.detail;const n=this.nylasSchedulerConnector?.schedulerStore?.get("configSettings")?.scheduler?.available_days_in_future;const{startTime:i,endTime:s,endTimeForAvailableDaysInFuture:a}=this.validateAvailableDaysInFuture(t,n||30);if(i<a&&t.getTime()<a*1e3){const e=await(this.nylasSchedulerConnector?.scheduler.getAvailability(i,s));if(!e||"error"in e){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(e?.error)},host:this.host})}const t=this.stores?.scheduler.get("selectableDates");if(t&&t.length>0){this.stores?.scheduler.set("selectedDate",t[0])}}}async bookButtonClickedHandler(e){const t=this.nylasSchedulerConnector?.schedulerStore?.get("rescheduleBookingId");const n=t;if(n){const t=await(this.nylasSchedulerConnector?.scheduler.rescheduleBooking(n,e.detail));if(!t||"error"in t){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(t?.error)},host:this.host})}const i=this.bookedEventInfo.emit({...t});if("bookedEventInfo"in this.eventOverrides){await this.eventOverrides.bookedEventInfo(i,this.nylasSchedulerConnector)}return}const i=await(this.nylasSchedulerConnector?.scheduler.bookTimeslot(e.detail));if(!i||"error"in i){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(i?.error)},host:this.host})}const s=this.bookedEventInfo.emit({...i});if("bookedEventInfo"in this.eventOverrides){await this.eventOverrides.bookedEventInfo(s,this.nylasSchedulerConnector)}}dateSelectedHandler(e){const t=e.detail;this.selectedDateLabel=t?t.toLocaleDateString(undefined,{dateStyle:"full"}):`${d.t("noDateSelected")}`}cancelBookedEventErrorHandler(e){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(e.detail.error)},host:this.host})}cancelBookedEventValidationErrorHandler(e){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(e.detail.error)},host:this.host})}rescheduleBookedEventErrorHandler(e){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(e.detail.error)},host:this.host})}confirmBookingErrorHandler(e){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(e.detail.error)},host:this.host})}async getNylasSchedulerStore(){return this.baseProvider?.getStore("scheduler")}async getNylasSchedulerConnector(){return this.nylasSchedulerConnector}async getRef(){return this.host}getErrorObject(e){return{title:e?.title||k.title,category:e?.category||k.category,type:o.Error,description:e?.message||"",id:(new Date).getTime().toString(),ttl:"none"}}checkIfSessionIdOrConfigIdExists(){if(!this.sessionId&&!this.refConfigId&&!(this.slug&&this.clientId)){let e="";if(!this.sessionId){e+=d.t("sessionIdRequiredErrorMessage")}if(!this.sessionId&&!this.refConfigId&&!(this.slug&&this.clientId)){e=d.t("sessionIdRequiredErrorMessage")+" "+d.t("publicConfigErrorMessage")}this.nylasSchedulerError.emit({notification:{title:d.t("schedulingComponentErrorTitle"),category:p.Component,type:o.Error,description:e,id:(new Date).getTime().toString(),ttl:"none"},host:this.host});return false}return true}isTimeslotValid(e){const t=new Date(e.start_time);if(t<new Date){this.nylasSchedulerError.emit({notification:{title:d.t("invalidTimeslotErrorTitle"),category:p.Component,type:o.Error,description:d.t("invalidTimeslotErrorMessage"),id:(new Date).getTime().toString(),ttl:"none"},host:this.host});return false}return true}validateAvailableDaysInFuture(e,t){const n=new Date;const i=new Date(e.getFullYear(),e.getMonth(),1).getTime()/1e3;const s=new Date(e.getFullYear(),e.getMonth()+1,1).getTime()/1e3;const a=Math.floor(h(n,t).getTime()/1e3);const o=Math.min(a,s);const r=i<n.getTime()/1e3?Math.floor(n.getTime()/1e3):i;return{startTime:r,endTime:o,endTimeForAvailableDaysInFuture:a}}applyThemeConfig(e){if(e){for(const[t,n]of Object.entries(e)){this.host.style.setProperty(`${t}`,n)}}}render(){const t=this.mode==="app";const n=this.baseProvider?.getStore("scheduler");const i=n?.get("eventInfo");const a=n?.get("showBookingForm");const o=n?.get("cancelledEventInfo");const r=n?.get("cancelBookingId");const l=n?.get("selectedTimeslot");const c=n?.get("rescheduleBookingId");const h=n?.get("organizerConfirmationBookingId");const g=n?.get("rejectBookingId");const p=n?.get("confirmedEventInfo");const u=n?.get("nylasBranding")||this.nylasBranding;const b=n?.get("selectedDate");const y=n?.get("configSettings")?.scheduler?.confirmation_redirect_url;this.selectedDateLabel=b&&this.language?f(b.toLocaleDateString(m[this.language],{dateStyle:"full"})):`${d.t("noDateSelected")}`;if(t&&(r||g)&&!o){return e(s,null,e(_,{nylasBranding:u,isLoading:this.isLoading,showNotification:this.showNotification},e("div",{class:"cancel-flow-page",part:"cancel-flow-page"},e("nylas-cancel-booking-form",{selectedTimeslot:l,cancelBookingId:r,rejectBookingId:g,exportparts:"ncbf, ncbf__icon, ncbf__title, ncbf__description, ncbf__reason-textarea, ncbf__button-cta, ncbf__button-outline, ncbf__card"}))))}if(t&&h){return e(s,null,e(_,{nylasBranding:u,isLoading:this.isLoading,showNotification:this.showNotification},e("div",{class:"manual-confirmation-page",part:"manual-confirmation-page"},e("nylas-organizer-confirmation-card",{organizerConfirmationBookingId:h,exportparts:"nmcc, nmcc__title, nmcc__description, nmcc__button-cta, nmcc__button-outline"}))))}if(t&&o){return e(s,null,e(_,{nylasBranding:u,isLoading:this.isLoading,showNotification:this.showNotification},e("div",{class:"cancelled-event-page",part:"cancelled-event-page"},e("nylas-cancelled-event-card",{cancelledEventInfo:o,exportparts:"ncec, ncec__icon, ncec__title, ncec__description, ncec__button-outline, ncec__card"}))))}if(t&&p){return e(s,null,e(_,{nylasBranding:u,isLoading:this.isLoading,showNotification:this.showNotification},e("div",{class:"cancelled-event-page",part:"confirmed-event-page"},e("nylas-confirmed-event-card",{confirmedEventInfo:p,exportparts:"ncec, ncec__icon, ncec__title, ncec__description, ncec__button-outline, ncec__card"}))))}if(t&&i&&y){window.location.assign(y);return}if(t&&i){return e(s,null,e(_,{nylasBranding:u,isLoading:this.isLoading,showNotification:this.showNotification},e("div",{class:"booked-event-page",part:"booked-event-page"},e("nylas-booked-event-card",{selectedTimeslot:l,eventInfo:i,exportparts:"nbec, nbec__title, nbec__card, nbec__description, nbec__button-outline, nbec__cancel-cta, nbec__reschedule-cta"}))))}if(t&&(!i||!!c)&&!a){const t=this.host.querySelector('[slot="timeslot-picker-cta-label"]');return e(s,null,e(_,{nylasBranding:u,isLoading:this.isLoading,showNotification:this.showNotification},c&&e(v,null,`${d.t("rescheduleTitle")}`),e("div",{class:"select-date-page",part:"select-date-page"},e("div",{class:"left-panel"},e("nylas-date-picker",{exportparts:"ndp, ndp__title, ndp__month-header, ndp__month-button, ndp__day, ndp__date, ndp__date--disabled, ndp__date--selected, ndp__date--current-day, ndp__date--current-month"}),e("nylas-locale-switch",{exportparts:"nls, nls__timezone, nls__timezone-dropdown, nls__timezone-drop-button, nls__timezone-drop-button-selected-label, nls__timezone-drop-content, nls__timezone-drop-label, nls__language, nls__language-dropdown, nls__language-drop-button, nls__language-drop-content, nls__language-drop-label"})),e("div",{class:`right-panel ${c?"reschedule":""}`},e("h2",null,e("calendar-icon",null),e("span",{id:"selectedDate"},this.selectedDateLabel)),e("nylas-timeslot-picker",{exportparts:"ntp, ntp__timeslot, ntp__timeslot--selected, ntp__button-primary"},t&&e("span",{slot:"timeslot-picker-cta-label"},e("slot",{name:"timeslot-picker-cta-label"})))))))}if(t&&!i&&a){return e(s,null,e(_,{nylasBranding:u,isLoading:this.isLoading,showNotification:this.showNotification},c&&e(v,null,`${d.t("rescheduleTitle")}`),e("div",{class:"additional-data-page",part:"additional-data-page"},e("div",{class:"left-panel"},e("div",{class:"wrapper"},e("nylas-selected-event-card",{exportparts:"nsec, nsec__card, nsec__icon, nsec__date, nsec__time, nsec__timezone"}))),e("div",{class:`right-panel ${c?"reschedule":""}`},e("nylas-booking-form",{exportparts:"nbf, nbf__input-textfield, nbf__button-ghost, nbf__button-outline, nbf__button-primary, nbf__input-wrapper, nbf__checkbox-component, nbf__radio-button-group, nbf__textarea-component, nbf__dropdown, nbf__dropdown-button, nbf__dropdown-content"})))))}return e(s,null,e("slot",null))}get host(){return a(this)}static get watchers(){return{bookingInfo:["bookingInfoChanged"],rescheduleBookingRef:["rescheduleBookingRefChanged"],cancelBookingRef:["cancelBookingRefChanged"],organizerConfirmationBookingRef:["organizerConfirmationBookingRefChanged"],localization:["localizationChanged"],themeConfig:["themeConfigChanged"]}}};I.style=x;export{I as nylas_scheduling};
|
|
2
|
-
//# sourceMappingURL=p-169a3f6d.entry.js.map
|