@nylas/web-elements 1.1.0-canary.19.c → 1.1.0-canary.19.e
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/add-circle-icon_2.cjs.entry.js +1 -1
- package/dist/cjs/archive-icon_7.cjs.entry.js +7 -7
- package/dist/cjs/arrow-icon.cjs.entry.js +1 -1
- package/dist/cjs/bold-icon_3.cjs.entry.js +3 -3
- package/dist/cjs/button-component_4.cjs.entry.js +203 -0
- package/dist/cjs/button-component_4.cjs.entry.js.map +1 -0
- package/dist/cjs/calendar-agenda-fill-icon_35.cjs.entry.js +6943 -0
- package/dist/cjs/calendar-agenda-fill-icon_35.cjs.entry.js.map +1 -0
- package/dist/cjs/chevron-icon_3.cjs.entry.js +11 -3
- package/dist/cjs/chevron-icon_3.cjs.entry.js.map +1 -1
- package/dist/cjs/clock-icon_2.cjs.entry.js +1 -1
- package/dist/cjs/{constants-3e962931.js → constants-7cc75333.js} +106 -1
- package/dist/cjs/{constants-3e962931.js.map → constants-7cc75333.js.map} +1 -1
- package/dist/cjs/copy-icon_4.cjs.entry.js +72 -0
- package/dist/cjs/copy-icon_4.cjs.entry.js.map +1 -0
- package/dist/cjs/document-refresh-icon.cjs.entry.js +1 -1
- package/dist/cjs/forward-icon_6.cjs.entry.js +7 -7
- package/dist/cjs/globe-icon.cjs.entry.js +1 -1
- package/dist/cjs/google-logo-icon_4.cjs.entry.js +192 -51
- package/dist/cjs/google-logo-icon_4.cjs.entry.js.map +1 -1
- package/dist/cjs/index-7af03e3f.js +20 -16
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/info-icon_2.cjs.entry.js +2 -2
- package/dist/cjs/input-dropdown_2.cjs.entry.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/loading-icon.cjs.entry.js +1 -1
- package/dist/cjs/multi-select-dropdown.cjs.entry.js +144 -0
- package/dist/cjs/multi-select-dropdown.cjs.entry.js.map +1 -0
- package/dist/cjs/{nylas-api-request-a1751a40.js → nylas-api-request-393b08a0.js} +2 -1
- package/dist/cjs/nylas-api-request-393b08a0.js.map +1 -0
- package/dist/cjs/nylas-booked-event-card_10.cjs.entry.js +66 -35
- package/dist/cjs/nylas-booked-event-card_10.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-custom-booking-flow.cjs.entry.js +1 -1
- package/dist/cjs/nylas-form-card.cjs.entry.js +1 -1
- package/dist/cjs/nylas-if-state.cjs.entry.js +1 -1
- package/dist/cjs/nylas-list-folders.cjs.entry.js +1 -1
- package/dist/cjs/nylas-list-threads.cjs.entry.js +1 -1
- package/dist/cjs/nylas-login.cjs.entry.js +1 -1
- package/dist/cjs/nylas-mailbox-toolbar-button.cjs.entry.js +1 -1
- package/dist/cjs/nylas-mailbox.cjs.entry.js +1 -1
- package/dist/cjs/nylas-provider.cjs.entry.js +3 -3
- package/dist/cjs/nylas-scheduler-editor.cjs.entry.js +26 -9
- package/dist/cjs/nylas-scheduler-editor.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-scheduling.cjs.entry.js +3 -3
- package/dist/cjs/nylas-scheduling.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-threads-refresh.cjs.entry.js +2 -2
- package/dist/cjs/nylas-threads-search.cjs.entry.js +1 -1
- package/dist/cjs/nylas-time-window-picker.cjs.entry.js +1 -1
- package/dist/cjs/nylas-view-thread.cjs.entry.js +1 -1
- package/dist/cjs/nylas-web-elements.cjs.js +1 -1
- package/dist/cjs/play-icon_2.cjs.entry.js +2 -2
- package/dist/cjs/refresh-icon.cjs.entry.js +1 -1
- package/dist/cjs/{scheduler-config-store-9f19c7a9.js → scheduler-config-store-5bfc8cb8.js} +3 -1
- package/dist/cjs/scheduler-config-store-5bfc8cb8.js.map +1 -0
- package/dist/cjs/{scheduler-store-0f7328f1.js → scheduler-store-b5cf2e82.js} +43 -7
- package/dist/cjs/scheduler-store-b5cf2e82.js.map +1 -0
- package/dist/cjs/textarea-component.cjs.entry.js +3 -1
- package/dist/cjs/textarea-component.cjs.entry.js.map +1 -1
- package/dist/cjs/translate-icon.cjs.entry.js +1 -1
- package/dist/cjs/warning-icon.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +14 -0
- package/dist/collection/common/constants.js +102 -0
- package/dist/collection/common/constants.js.map +1 -1
- package/dist/collection/common/icons/add-circle.js +1 -1
- package/dist/collection/common/icons/archive.js +1 -1
- package/dist/collection/common/icons/arrow.js +1 -1
- package/dist/collection/common/icons/bold.js +1 -1
- package/dist/collection/common/icons/calendar-agenda-fill.js +63 -0
- package/dist/collection/common/icons/calendar-agenda-fill.js.map +1 -0
- package/dist/collection/common/icons/calendar-agenda.js +63 -0
- package/dist/collection/common/icons/calendar-agenda.js.map +1 -0
- package/dist/collection/common/icons/copy.js +63 -0
- package/dist/collection/common/icons/copy.js.map +1 -0
- package/dist/collection/common/icons/delete.js +63 -0
- package/dist/collection/common/icons/delete.js.map +1 -0
- package/dist/collection/common/icons/document-refresh.js +1 -1
- package/dist/collection/common/icons/dragable.js +63 -0
- package/dist/collection/common/icons/dragable.js.map +1 -0
- package/dist/collection/common/icons/edit.js +63 -0
- package/dist/collection/common/icons/edit.js.map +1 -0
- package/dist/collection/common/icons/eye.js +63 -0
- package/dist/collection/common/icons/eye.js.map +1 -0
- package/dist/collection/common/icons/flow.js +1 -1
- package/dist/collection/common/icons/folder.js +1 -1
- package/dist/collection/common/icons/forward.js +1 -1
- package/dist/collection/common/icons/globe.js +1 -1
- package/dist/collection/common/icons/google-logo.js +1 -1
- package/dist/collection/common/icons/google-meet.js +63 -0
- package/dist/collection/common/icons/google-meet.js.map +1 -0
- package/dist/collection/common/icons/inbox.js +1 -1
- package/dist/collection/common/icons/info.js +1 -1
- package/dist/collection/common/icons/italic.js +1 -1
- package/dist/collection/common/icons/loading.js +1 -1
- package/dist/collection/common/icons/location-off.js +1 -1
- package/dist/collection/common/icons/location.js +1 -1
- package/dist/collection/common/icons/microsof-teams.js +63 -0
- package/dist/collection/common/icons/microsof-teams.js.map +1 -0
- package/dist/collection/common/icons/microsoft-logo.js +1 -1
- package/dist/collection/common/icons/nylas-logo.js +1 -1
- package/dist/collection/common/icons/people.js +1 -1
- package/dist/collection/common/icons/person.js +1 -1
- package/dist/collection/common/icons/play.js +1 -1
- package/dist/collection/common/icons/plus.js +63 -0
- package/dist/collection/common/icons/plus.js.map +1 -0
- package/dist/collection/common/icons/refresh.js +1 -1
- package/dist/collection/common/icons/reply-all.js +1 -1
- package/dist/collection/common/icons/reply.js +1 -1
- package/dist/collection/common/icons/search.js +1 -1
- package/dist/collection/common/icons/sent.js +1 -1
- package/dist/collection/common/icons/spam.js +1 -1
- package/dist/collection/common/icons/star.js +1 -1
- package/dist/collection/common/icons/stop.js +1 -1
- package/dist/collection/common/icons/translate.js +1 -1
- package/dist/collection/common/icons/trash.js +1 -1
- package/dist/collection/common/icons/underline.js +1 -1
- package/dist/collection/common/icons/warning.js +1 -1
- package/dist/collection/common/icons/zoom.js +63 -0
- package/dist/collection/common/icons/zoom.js.map +1 -0
- package/dist/collection/common/nylas-api-request.js +1 -0
- package/dist/collection/common/nylas-api-request.js.map +1 -1
- package/dist/collection/common/types.js.map +1 -1
- package/dist/collection/components/design-system/button-component/button-component.css +4 -0
- package/dist/collection/components/design-system/button-component/button-component.js +1 -1
- package/dist/collection/components/design-system/checkbox-component/checkbox-component.css +15 -1
- package/dist/collection/components/design-system/checkbox-component/checkbox-component.js +46 -6
- package/dist/collection/components/design-system/checkbox-component/checkbox-component.js.map +1 -1
- package/dist/collection/components/design-system/input-component/input-component.css +9 -1
- package/dist/collection/components/design-system/input-component/input-component.js +20 -8
- package/dist/collection/components/design-system/input-component/input-component.js.map +1 -1
- package/dist/collection/components/design-system/input-dropdown/input-dropdown.js +1 -1
- package/dist/collection/components/design-system/multi-select-dropdown/multi-select-dropdown.css +8 -1
- package/dist/collection/components/design-system/multi-select-dropdown/multi-select-dropdown.js +21 -2
- package/dist/collection/components/design-system/multi-select-dropdown/multi-select-dropdown.js.map +1 -1
- package/dist/collection/components/design-system/radio-button-group/radio-button-group.css +57 -1
- package/dist/collection/components/design-system/radio-button-group/radio-button-group.js +69 -10
- package/dist/collection/components/design-system/radio-button-group/radio-button-group.js.map +1 -1
- package/dist/collection/components/design-system/select-dropdown/select-dropdown.js +45 -2
- package/dist/collection/components/design-system/select-dropdown/select-dropdown.js.map +1 -1
- package/dist/collection/components/design-system/textarea-component/textarea-component.js +23 -3
- package/dist/collection/components/design-system/textarea-component/textarea-component.js.map +1 -1
- package/dist/collection/components/design-system/time-period-selector/time-period-selector.js +1 -1
- package/dist/collection/components/design-system/toggle-switch/toggle-switch.css +1 -1
- package/dist/collection/components/design-system/toggle-switch/toggle-switch.js +5 -5
- package/dist/collection/components/design-system/toggle-switch/toggle-switch.js.map +1 -1
- package/dist/collection/components/design-system/tooltip-component/toolitp-component.js +1 -1
- package/dist/collection/components/mailbox/nylas-composer/nylas-composer.js +1 -1
- package/dist/collection/components/mailbox/nylas-list-folders/nylas-list-folders.js +1 -1
- package/dist/collection/components/mailbox/nylas-list-threads/nylas-list-threads.js +1 -1
- package/dist/collection/components/mailbox/nylas-mailbox/nylas-mailbox.js +1 -1
- package/dist/collection/components/mailbox/nylas-mailbox-toolbar-button/nylas-mailbox-toolbar-button.js +1 -1
- package/dist/collection/components/mailbox/nylas-summarize-message-button/nylas-summarize-message-button.js +2 -2
- package/dist/collection/components/mailbox/nylas-threads-refresh/nylas-threads-refresh.js +2 -2
- package/dist/collection/components/mailbox/nylas-threads-search/nylas-threads-search.js +1 -1
- package/dist/collection/components/mailbox/nylas-view-email/nylas-view-email.js +1 -1
- package/dist/collection/components/mailbox/nylas-view-thread/nylas-view-thread.js +1 -1
- package/dist/collection/components/nylas-if-state/nylas-if-state.js +1 -1
- package/dist/collection/components/nylas-login/nylas-login.js +1 -1
- package/dist/collection/components/nylas-provider/nylas-provider.js +1 -1
- package/dist/collection/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.js +23 -4
- package/dist/collection/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-booked-event-card/test/nylas-booked-event-card.spec.js +1 -0
- package/dist/collection/components/scheduler/nylas-booked-event-card/test/nylas-booked-event-card.spec.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-booking-form/nylas-booking-form.js +37 -21
- package/dist/collection/components/scheduler/nylas-booking-form/nylas-booking-form.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.js +42 -3
- package/dist/collection/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-cancel-booking-form/test/nylas-cancel-booking-form.spec.js +11 -0
- package/dist/collection/components/scheduler/nylas-cancel-booking-form/test/nylas-cancel-booking-form.spec.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-cancelled-event-card/nylas-cancelled-event-card.js +2 -2
- package/dist/collection/components/scheduler/nylas-date-picker/nylas-date-picker.js +1 -1
- package/dist/collection/components/scheduler/nylas-notification/nylas-notification.js +1 -1
- package/dist/collection/components/scheduler/nylas-scheduling/nylas-scheduling.css +4 -1
- package/dist/collection/components/scheduler/nylas-scheduling/nylas-scheduling.js +3 -3
- package/dist/collection/components/scheduler/nylas-scheduling/nylas-scheduling.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-selected-event-card/nylas-selected-event-card.js +1 -1
- package/dist/collection/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.css +2 -2
- package/dist/collection/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.js +8 -7
- package/dist/collection/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.css +16 -2
- package/dist/collection/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.js +31 -12
- package/dist/collection/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.css +3 -0
- package/dist/collection/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.js +2 -2
- package/dist/collection/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-booking-calendar-picker/nylas-booking-calendar-picker.css +3 -0
- package/dist/collection/components/scheduler-editor/nylas-booking-calendar-picker/nylas-booking-calendar-picker.js +22 -6
- package/dist/collection/components/scheduler-editor/nylas-booking-calendar-picker/nylas-booking-calendar-picker.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-booking-form-config/nylas-booking-form-config.css +233 -0
- package/dist/collection/components/scheduler-editor/nylas-booking-form-config/nylas-booking-form-config.js +388 -0
- package/dist/collection/components/scheduler-editor/nylas-booking-form-config/nylas-booking-form-config.js.map +1 -0
- package/dist/collection/components/scheduler-editor/nylas-calendar-picker/nylas-calendar-picker.css +3 -20
- package/dist/collection/components/scheduler-editor/nylas-calendar-picker/nylas-calendar-picker.js +19 -9
- package/dist/collection/components/scheduler-editor/nylas-calendar-picker/nylas-calendar-picker.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-cancellation-policy/nylas-cancellation-policy.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-connected-calendars/nylas-connected-calendars.css +105 -0
- package/dist/collection/components/scheduler-editor/nylas-connected-calendars/nylas-connected-calendars.js +298 -0
- package/dist/collection/components/scheduler-editor/nylas-connected-calendars/nylas-connected-calendars.js.map +1 -0
- package/dist/collection/components/scheduler-editor/nylas-custom-booking-flow/nylas-custom-booking-flow.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-customize-booking-settings/nylas-customize-booking-settings.js +5 -5
- package/dist/collection/components/scheduler-editor/nylas-customize-booking-settings/nylas-customize-booking-settings.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.css +3 -0
- package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.js +106 -20
- package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-editor-tabs/tab-contents.js +7 -7
- package/dist/collection/components/scheduler-editor/nylas-editor-tabs/tab-contents.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-info/nylas-event-info.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-limits/nylas-event-limits.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-limits/nylas-event-limits.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-location/nylas-event-location.js +161 -11
- package/dist/collection/components/scheduler-editor/nylas-event-location/nylas-event-location.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-title/nylas-event-title.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-title/nylas-event-title.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-form-card/nylas-form-card.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-limit-future-bookings/nylas-limit-future-bookings.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-limit-future-bookings/nylas-limit-future-bookings.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.css +79 -3
- package/dist/collection/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.js +125 -22
- package/dist/collection/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-min-booking-notice/nylas-min-booking-notice.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-min-booking-notice/nylas-min-booking-notice.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-min-cancellation-notice/nylas-min-cancellation-notice.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-min-cancellation-notice/nylas-min-cancellation-notice.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-participant-booking-calendars/nylas-participant-booking-calendars.css +105 -0
- package/dist/collection/components/scheduler-editor/nylas-participant-booking-calendars/nylas-participant-booking-calendars.js +324 -0
- package/dist/collection/components/scheduler-editor/nylas-participant-booking-calendars/nylas-participant-booking-calendars.js.map +1 -0
- package/dist/collection/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.js +39 -5
- package/dist/collection/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/ExpressFlow.js +4 -3
- package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/ExpressFlow.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.js +59 -9
- package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-time-window-picker/nylas-time-window-picker.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-timeslot-interval/nylas-timeslot-interval.js +16 -16
- package/dist/collection/components/scheduler-editor/nylas-timeslot-interval/nylas-timeslot-interval.js.map +1 -1
- package/dist/collection/connector/shared/api/scheduler-config.js +4 -2
- package/dist/collection/connector/shared/api/scheduler-config.js.map +1 -1
- package/dist/collection/connector/shared/api/scheduler.js +41 -6
- package/dist/collection/connector/shared/api/scheduler.js.map +1 -1
- package/dist/collection/stores/scheduler-config-store.js +2 -0
- package/dist/collection/stores/scheduler-config-store.js.map +1 -1
- package/dist/collection/stores/scheduler-store.js +1 -0
- package/dist/collection/stores/scheduler-store.js.map +1 -1
- package/dist/collection/types/index.js.map +1 -1
- package/dist/components/add-circle.js +1 -1
- package/dist/components/archive.js +1 -1
- package/dist/components/arrow.js +1 -1
- package/dist/components/bold.js +1 -1
- package/dist/components/button-component2.js +2 -2
- package/dist/components/button-component2.js.map +1 -1
- package/dist/components/calendar-agenda-fill-icon.d.ts +11 -0
- package/dist/components/calendar-agenda-fill-icon.js +8 -0
- package/dist/components/calendar-agenda-fill-icon.js.map +1 -0
- package/dist/components/calendar-agenda-fill.js +37 -0
- package/dist/components/calendar-agenda-fill.js.map +1 -0
- package/dist/components/calendar-agenda-icon.d.ts +11 -0
- package/dist/components/calendar-agenda-icon.js +8 -0
- package/dist/components/calendar-agenda-icon.js.map +1 -0
- package/dist/components/calendar-agenda.js +37 -0
- package/dist/components/calendar-agenda.js.map +1 -0
- package/dist/components/checkbox-component2.js +18 -4
- package/dist/components/checkbox-component2.js.map +1 -1
- package/dist/components/constants.js +102 -1
- package/dist/components/constants.js.map +1 -1
- package/dist/components/copy-icon.d.ts +11 -0
- package/dist/components/copy-icon.js +8 -0
- package/dist/components/copy-icon.js.map +1 -0
- package/dist/components/copy.js +37 -0
- package/dist/components/copy.js.map +1 -0
- package/dist/components/delete-icon.d.ts +11 -0
- package/dist/components/delete-icon.js +8 -0
- package/dist/components/delete-icon.js.map +1 -0
- package/dist/components/delete.js +37 -0
- package/dist/components/delete.js.map +1 -0
- package/dist/components/document-refresh-icon.js +1 -1
- package/dist/components/dragable-icon.d.ts +11 -0
- package/dist/components/dragable-icon.js +8 -0
- package/dist/components/dragable-icon.js.map +1 -0
- package/dist/components/dragable.js +37 -0
- package/dist/components/dragable.js.map +1 -0
- package/dist/components/edit-icon.d.ts +11 -0
- package/dist/components/edit-icon.js +8 -0
- package/dist/components/edit-icon.js.map +1 -0
- package/dist/components/edit.js +37 -0
- package/dist/components/edit.js.map +1 -0
- package/dist/components/eye-icon.d.ts +11 -0
- package/dist/components/eye-icon.js +8 -0
- package/dist/components/eye-icon.js.map +1 -0
- package/dist/components/eye.js +37 -0
- package/dist/components/eye.js.map +1 -0
- package/dist/components/flow.js +1 -1
- package/dist/components/folder.js +1 -1
- package/dist/components/forward.js +1 -1
- package/dist/components/globe.js +1 -1
- package/dist/components/google-logo.js +1 -1
- package/dist/components/google-meet-icon.d.ts +11 -0
- package/dist/components/google-meet-icon.js +8 -0
- package/dist/components/google-meet-icon.js.map +1 -0
- package/dist/components/google-meet.js +37 -0
- package/dist/components/google-meet.js.map +1 -0
- package/dist/components/inbox.js +1 -1
- package/dist/components/info.js +1 -1
- package/dist/components/input-component2.js +17 -6
- package/dist/components/input-component2.js.map +1 -1
- package/dist/components/input-dropdown2.js +1 -1
- package/dist/components/italic.js +1 -1
- package/dist/components/loading.js +1 -1
- package/dist/components/location-off.js +1 -1
- package/dist/components/location.js +1 -1
- package/dist/components/microsof-teams.js +37 -0
- package/dist/components/microsof-teams.js.map +1 -0
- package/dist/components/microsoft-logo.js +1 -1
- package/dist/components/microsoft-teams-icon.d.ts +11 -0
- package/dist/components/microsoft-teams-icon.js +8 -0
- package/dist/components/microsoft-teams-icon.js.map +1 -0
- package/dist/components/multi-select-dropdown2.js +5 -3
- package/dist/components/multi-select-dropdown2.js.map +1 -1
- package/dist/components/nylas-additional-participants2.js +26 -8
- package/dist/components/nylas-additional-participants2.js.map +1 -1
- package/dist/components/nylas-api-request.js +1 -0
- package/dist/components/nylas-api-request.js.map +1 -1
- package/dist/components/nylas-availability-picker2.js +2 -2
- package/dist/components/nylas-availability-picker2.js.map +1 -1
- package/dist/components/nylas-booked-event-card2.js +7 -4
- package/dist/components/nylas-booked-event-card2.js.map +1 -1
- package/dist/components/nylas-booking-calendar-picker2.js +5 -6
- package/dist/components/nylas-booking-calendar-picker2.js.map +1 -1
- package/dist/components/nylas-booking-form-config.d.ts +11 -0
- package/dist/components/nylas-booking-form-config.js +8 -0
- package/dist/components/nylas-booking-form-config.js.map +1 -0
- package/dist/components/nylas-booking-form-config2.js +3691 -0
- package/dist/components/nylas-booking-form-config2.js.map +1 -0
- package/dist/components/nylas-booking-form2.js +78 -32
- package/dist/components/nylas-booking-form2.js.map +1 -1
- package/dist/components/nylas-calendar-picker2.js +27 -23
- package/dist/components/nylas-calendar-picker2.js.map +1 -1
- package/dist/components/nylas-cancel-booking-form2.js +21 -2
- package/dist/components/nylas-cancel-booking-form2.js.map +1 -1
- package/dist/components/nylas-cancellation-policy2.js +1 -1
- package/dist/components/nylas-cancelled-event-card2.js +1 -1
- package/dist/components/nylas-composer2.js +1 -1
- package/dist/components/nylas-connected-calendars.d.ts +11 -0
- package/dist/components/nylas-connected-calendars.js +8 -0
- package/dist/components/nylas-connected-calendars.js.map +1 -0
- package/dist/components/nylas-connected-calendars2.js +232 -0
- package/dist/components/nylas-connected-calendars2.js.map +1 -0
- package/dist/components/nylas-custom-booking-flow.js +1 -1
- package/dist/components/nylas-customize-booking-settings2.js +4 -4
- package/dist/components/nylas-customize-booking-settings2.js.map +1 -1
- package/dist/components/nylas-editor-tabs2.js +251 -113
- package/dist/components/nylas-editor-tabs2.js.map +1 -1
- package/dist/components/nylas-event-info2.js +1 -1
- package/dist/components/nylas-event-limits2.js +1 -1
- package/dist/components/nylas-event-limits2.js.map +1 -1
- package/dist/components/nylas-event-location2.js +138 -25
- package/dist/components/nylas-event-location2.js.map +1 -1
- package/dist/components/nylas-event-title2.js +1 -1
- package/dist/components/nylas-event-title2.js.map +1 -1
- package/dist/components/nylas-form-card2.js +1 -1
- package/dist/components/nylas-if-state.js +1 -1
- package/dist/components/nylas-limit-future-bookings2.js +1 -1
- package/dist/components/nylas-limit-future-bookings2.js.map +1 -1
- package/dist/components/nylas-list-configurations2.js +142 -25
- package/dist/components/nylas-list-configurations2.js.map +1 -1
- package/dist/components/nylas-list-folders.js +1 -1
- package/dist/components/nylas-list-threads.js +1 -1
- package/dist/components/nylas-login.js +1 -1
- package/dist/components/nylas-logo2.js +1 -1
- package/dist/components/nylas-mailbox-toolbar-button.js +1 -1
- package/dist/components/nylas-mailbox.js +1 -1
- package/dist/components/nylas-min-booking-notice2.js +1 -1
- package/dist/components/nylas-min-booking-notice2.js.map +1 -1
- package/dist/components/nylas-min-cancellation-notice2.js +1 -1
- package/dist/components/nylas-min-cancellation-notice2.js.map +1 -1
- package/dist/components/nylas-notification2.js +1 -1
- package/dist/components/nylas-participant-booking-calendars.d.ts +11 -0
- package/dist/components/nylas-participant-booking-calendars.js +8 -0
- package/dist/components/nylas-participant-booking-calendars.js.map +1 -0
- package/dist/components/nylas-participant-booking-calendars2.js +237 -0
- package/dist/components/nylas-participant-booking-calendars2.js.map +1 -0
- package/dist/components/nylas-participants-custom-availability2.js +18 -5
- package/dist/components/nylas-participants-custom-availability2.js.map +1 -1
- package/dist/components/nylas-provider.js +1 -1
- package/dist/components/nylas-scheduler-editor.js +210 -101
- package/dist/components/nylas-scheduler-editor.js.map +1 -1
- package/dist/components/nylas-scheduling.js +70 -52
- package/dist/components/nylas-scheduling.js.map +1 -1
- package/dist/components/nylas-summarize-message-button2.js +2 -2
- package/dist/components/nylas-threads-refresh.js +2 -2
- package/dist/components/nylas-threads-search.js +1 -1
- package/dist/components/nylas-time-window-picker2.js +1 -1
- package/dist/components/nylas-timeslot-interval2.js +11 -11
- package/dist/components/nylas-timeslot-interval2.js.map +1 -1
- package/dist/components/nylas-timeslot-picker2.js +6 -5
- package/dist/components/nylas-timeslot-picker2.js.map +1 -1
- package/dist/components/nylas-view-email2.js +1 -1
- package/dist/components/nylas-view-thread.js +1 -1
- package/dist/components/people.js +1 -1
- package/dist/components/person.js +1 -1
- package/dist/components/play.js +1 -1
- package/dist/components/plus-icon.d.ts +11 -0
- package/dist/components/plus-icon.js +8 -0
- package/dist/components/plus-icon.js.map +1 -0
- package/dist/components/plus.js +37 -0
- package/dist/components/plus.js.map +1 -0
- package/dist/components/radio-button-group2.js +23 -6
- package/dist/components/radio-button-group2.js.map +1 -1
- package/dist/components/refresh.js +1 -1
- package/dist/components/reply-all.js +1 -1
- package/dist/components/reply.js +1 -1
- package/dist/components/scheduler-config-store.js +2 -0
- package/dist/components/scheduler-config-store.js.map +1 -1
- package/dist/components/scheduler-store.js +42 -6
- package/dist/components/scheduler-store.js.map +1 -1
- package/dist/components/search.js +1 -1
- package/dist/components/select-dropdown2.js +12 -2
- package/dist/components/select-dropdown2.js.map +1 -1
- package/dist/components/sent.js +1 -1
- package/dist/components/spam.js +1 -1
- package/dist/components/star.js +1 -1
- package/dist/components/stop.js +1 -1
- package/dist/components/textarea-component.js +1 -82
- package/dist/components/textarea-component.js.map +1 -1
- package/dist/components/textarea-component2.js +89 -0
- package/dist/components/textarea-component2.js.map +1 -0
- package/dist/components/time-period-selector2.js +1 -1
- package/dist/components/toggle-switch2.js +2 -2
- package/dist/components/toggle-switch2.js.map +1 -1
- package/dist/components/toolitp-component.js +1 -1
- package/dist/components/translate.js +1 -1
- package/dist/components/trash.js +1 -1
- package/dist/components/underline.js +1 -1
- package/dist/components/warning.js +1 -1
- package/dist/components/zoom-icon.d.ts +11 -0
- package/dist/components/zoom-icon.js +8 -0
- package/dist/components/zoom-icon.js.map +1 -0
- package/dist/components/zoom.js +37 -0
- package/dist/components/zoom.js.map +1 -0
- package/dist/esm/add-circle-icon_2.entry.js +1 -1
- package/dist/esm/archive-icon_7.entry.js +7 -7
- package/dist/esm/arrow-icon.entry.js +1 -1
- package/dist/esm/bold-icon_3.entry.js +3 -3
- package/dist/esm/button-component_4.entry.js +196 -0
- package/dist/esm/button-component_4.entry.js.map +1 -0
- package/dist/esm/calendar-agenda-fill-icon_35.entry.js +6905 -0
- package/dist/esm/calendar-agenda-fill-icon_35.entry.js.map +1 -0
- package/dist/esm/chevron-icon_3.entry.js +11 -3
- package/dist/esm/chevron-icon_3.entry.js.map +1 -1
- package/dist/esm/clock-icon_2.entry.js +1 -1
- package/dist/esm/{constants-f34b9c6e.js → constants-7ce66b44.js} +103 -2
- package/dist/esm/{constants-f34b9c6e.js.map → constants-7ce66b44.js.map} +1 -1
- package/dist/esm/copy-icon_4.entry.js +65 -0
- package/dist/esm/copy-icon_4.entry.js.map +1 -0
- package/dist/esm/document-refresh-icon.entry.js +1 -1
- package/dist/esm/forward-icon_6.entry.js +7 -7
- package/dist/esm/globe-icon.entry.js +1 -1
- package/dist/esm/google-logo-icon_4.entry.js +192 -51
- package/dist/esm/google-logo-icon_4.entry.js.map +1 -1
- package/dist/esm/index-7cb0dd3d.js +20 -16
- package/dist/esm/index.js +1 -1
- package/dist/esm/info-icon_2.entry.js +2 -2
- package/dist/esm/input-dropdown_2.entry.js +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/loading-icon.entry.js +1 -1
- package/dist/esm/multi-select-dropdown.entry.js +140 -0
- package/dist/esm/multi-select-dropdown.entry.js.map +1 -0
- package/dist/esm/{nylas-api-request-a67d2997.js → nylas-api-request-4f8edff2.js} +2 -1
- package/dist/esm/nylas-api-request-4f8edff2.js.map +1 -0
- package/dist/esm/nylas-booked-event-card_10.entry.js +66 -35
- package/dist/esm/nylas-booked-event-card_10.entry.js.map +1 -1
- package/dist/esm/nylas-custom-booking-flow.entry.js +1 -1
- package/dist/esm/nylas-form-card.entry.js +1 -1
- package/dist/esm/nylas-if-state.entry.js +1 -1
- package/dist/esm/nylas-list-folders.entry.js +1 -1
- package/dist/esm/nylas-list-threads.entry.js +1 -1
- package/dist/esm/nylas-login.entry.js +1 -1
- package/dist/esm/nylas-mailbox-toolbar-button.entry.js +1 -1
- package/dist/esm/nylas-mailbox.entry.js +1 -1
- package/dist/esm/nylas-provider.entry.js +3 -3
- package/dist/esm/nylas-scheduler-editor.entry.js +26 -9
- package/dist/esm/nylas-scheduler-editor.entry.js.map +1 -1
- package/dist/esm/nylas-scheduling.entry.js +3 -3
- package/dist/esm/nylas-scheduling.entry.js.map +1 -1
- package/dist/esm/nylas-threads-refresh.entry.js +2 -2
- package/dist/esm/nylas-threads-search.entry.js +1 -1
- package/dist/esm/nylas-time-window-picker.entry.js +1 -1
- package/dist/esm/nylas-view-thread.entry.js +1 -1
- package/dist/esm/nylas-web-elements.js +1 -1
- package/dist/esm/play-icon_2.entry.js +2 -2
- package/dist/esm/refresh-icon.entry.js +1 -1
- package/dist/esm/{scheduler-config-store-4a50a03d.js → scheduler-config-store-9ccfba4d.js} +3 -1
- package/dist/esm/scheduler-config-store-9ccfba4d.js.map +1 -0
- package/dist/esm/{scheduler-store-f02ce045.js → scheduler-store-8a400448.js} +43 -7
- package/dist/esm/scheduler-store-8a400448.js.map +1 -0
- package/dist/esm/textarea-component.entry.js +3 -1
- package/dist/esm/textarea-component.entry.js.map +1 -1
- package/dist/esm/translate-icon.entry.js +1 -1
- package/dist/esm/warning-icon.entry.js +1 -1
- package/dist/nylas-web-elements/index.esm.js +1 -1
- package/dist/nylas-web-elements/nylas-web-elements.esm.js +1 -1
- package/dist/nylas-web-elements/nylas-web-elements.esm.js.map +1 -1
- package/dist/nylas-web-elements/p-0161429f.entry.js +2 -0
- package/dist/nylas-web-elements/{p-33a6a75b.entry.js.map → p-0161429f.entry.js.map} +1 -1
- package/dist/nylas-web-elements/p-064c2ae5.entry.js +2 -0
- package/dist/nylas-web-elements/{p-de7b0878.entry.js → p-0aa1e433.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-3f122804.entry.js → p-0bf6f818.entry.js} +2 -2
- package/dist/nylas-web-elements/p-1102df14.entry.js +2 -0
- package/dist/nylas-web-elements/{p-f1a54acf.entry.js → p-155e5ce8.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-a85408e0.entry.js → p-18d100c8.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-5231fc13.entry.js → p-1a7edf86.entry.js} +3 -3
- package/dist/nylas-web-elements/p-1d8c468f.entry.js +2 -0
- package/dist/nylas-web-elements/p-1d8c468f.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-be38a8eb.entry.js → p-1e1ae8d0.entry.js} +2 -2
- package/dist/nylas-web-elements/p-1f290858.entry.js +2 -0
- package/dist/nylas-web-elements/p-1f290858.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-eb7e8455.entry.js → p-1fbe50b1.entry.js} +2 -2
- package/dist/nylas-web-elements/p-20bbc663.js +2 -0
- package/dist/nylas-web-elements/p-20bbc663.js.map +1 -0
- package/dist/nylas-web-elements/{p-49f716ed.js → p-2270e6cf.js} +4 -4
- package/dist/nylas-web-elements/p-2270e6cf.js.map +1 -0
- package/dist/nylas-web-elements/{p-70e5cfb0.entry.js → p-22e05c7d.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-554891cd.entry.js → p-26302ad0.entry.js} +2 -2
- package/dist/nylas-web-elements/p-27df8f01.entry.js +2 -0
- package/dist/nylas-web-elements/p-27df8f01.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-2b1d53fa.entry.js +8 -0
- package/dist/nylas-web-elements/p-2b1d53fa.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-6ce66add.entry.js → p-2f47205d.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-28512ab6.entry.js → p-3277023d.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-1a27960b.entry.js → p-3423de64.entry.js} +2 -2
- package/dist/nylas-web-elements/p-3423de64.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-b0c8021f.entry.js → p-34c747f9.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-d9a91bc9.entry.js → p-359af1e3.entry.js} +2 -2
- package/dist/nylas-web-elements/p-359af1e3.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-613c070f.js → p-371b20b2.js} +2 -2
- package/dist/nylas-web-elements/p-371b20b2.js.map +1 -0
- package/dist/nylas-web-elements/{p-e9ba368f.entry.js → p-3ae38e51.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-6ef1024f.entry.js → p-3bc1289e.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-7fcecf3f.entry.js → p-3d1e8e4d.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-45c37986.entry.js → p-3dae0c71.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-acadfabf.entry.js → p-3db7ab8d.entry.js} +3 -3
- package/dist/nylas-web-elements/{p-66493463.entry.js → p-3e09b0fb.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-5c3c1888.entry.js → p-3eac9f45.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-dcc27b67.entry.js → p-4000107d.entry.js} +2 -2
- package/dist/nylas-web-elements/p-40cad9a8.entry.js +11 -0
- package/dist/nylas-web-elements/p-40cad9a8.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-445d8bb4.entry.js +11 -0
- package/dist/nylas-web-elements/p-445d8bb4.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-08d75d35.entry.js → p-47392968.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-16a3bfb2.entry.js → p-4a594ebe.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-d633e735.entry.js → p-4b6995fe.entry.js} +2 -2
- package/dist/nylas-web-elements/p-4cdd4107.entry.js +2 -0
- package/dist/nylas-web-elements/{p-39fd9c90.entry.js → p-4e8c8939.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-9b68568e.entry.js → p-4e9ba325.entry.js} +2 -2
- package/dist/nylas-web-elements/p-4f55d0e5.entry.js +2 -0
- package/dist/nylas-web-elements/{p-12b83ea9.entry.js.map → p-4f55d0e5.entry.js.map} +1 -1
- package/dist/nylas-web-elements/{p-9794f735.entry.js → p-524a6acc.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-6bd9c9c3.entry.js → p-533d39ce.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-e928898a.entry.js → p-5a379fb5.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-c90755ba.entry.js → p-5a68368a.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-37f41a90.entry.js → p-5b965d0d.entry.js} +2 -2
- package/dist/nylas-web-elements/p-5e1cd3c1.entry.js +2 -0
- package/dist/nylas-web-elements/p-5e1cd3c1.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-34f0d1fe.entry.js → p-5ff4e63b.entry.js} +2 -2
- package/dist/nylas-web-elements/p-62aeac5f.entry.js +2 -0
- package/dist/nylas-web-elements/p-62aeac5f.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-64d43339.entry.js +2 -0
- package/dist/nylas-web-elements/p-64d43339.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-656cf33f.entry.js +2 -0
- package/dist/nylas-web-elements/{p-cf589eab.entry.js → p-65b7a2a7.entry.js} +2 -2
- package/dist/nylas-web-elements/p-68471dbd.entry.js +8 -0
- package/dist/nylas-web-elements/p-68471dbd.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-692852d2.entry.js +2 -0
- package/dist/nylas-web-elements/p-692852d2.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-60b03f86.entry.js → p-6c8af4fb.entry.js} +2 -2
- package/dist/nylas-web-elements/p-6d410f0a.entry.js +2 -0
- package/dist/nylas-web-elements/{p-daac96cb.entry.js → p-6e50d2fd.entry.js} +3 -3
- package/dist/nylas-web-elements/p-6e8b7ce8.entry.js +2 -0
- package/dist/nylas-web-elements/p-7042eb03.entry.js +2 -0
- package/dist/nylas-web-elements/{p-958746a1.entry.js.map → p-7042eb03.entry.js.map} +1 -1
- package/dist/nylas-web-elements/{p-b9fa6848.entry.js → p-7355937b.entry.js} +2 -2
- package/dist/nylas-web-elements/p-749238c6.entry.js +2 -0
- package/dist/nylas-web-elements/p-749238c6.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-76156a82.entry.js +2 -0
- package/dist/nylas-web-elements/p-79c1475e.entry.js +11 -0
- package/dist/nylas-web-elements/p-79c1475e.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-79c33cf9.entry.js +2 -0
- package/dist/nylas-web-elements/p-79c33cf9.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-052bc3b1.entry.js → p-7e08f131.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-a12f3223.entry.js → p-7e10aa6d.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-a7b19349.entry.js → p-7e53588e.entry.js} +2 -2
- package/dist/nylas-web-elements/p-83de54ae.entry.js +2 -0
- package/dist/nylas-web-elements/{p-b2d95965.entry.js → p-884b66bd.entry.js} +2 -2
- package/dist/nylas-web-elements/p-8aac762b.entry.js +2 -0
- package/dist/nylas-web-elements/p-8aac762b.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-8d74c874.js +2 -0
- package/dist/nylas-web-elements/p-8d74c874.js.map +1 -0
- package/dist/nylas-web-elements/{p-a800e7af.entry.js → p-8ddf6518.entry.js} +2 -2
- package/dist/nylas-web-elements/p-8ddf6518.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-7a95bc3f.entry.js → p-90294a76.entry.js} +2 -2
- package/dist/nylas-web-elements/p-90817d1f.entry.js +2 -0
- package/dist/nylas-web-elements/{p-f1b0120b.entry.js → p-90d32fc3.entry.js} +2 -2
- package/dist/nylas-web-elements/p-94a93ca9.entry.js +2 -0
- package/dist/nylas-web-elements/p-94a93ca9.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-95a9d2f1.entry.js +2 -0
- package/dist/nylas-web-elements/p-96746b87.entry.js +2 -0
- package/dist/nylas-web-elements/p-97026709.entry.js +2 -0
- package/dist/nylas-web-elements/{p-65097f45.entry.js → p-987042a1.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-7ce048c0.entry.js → p-9f903292.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-bd34f97d.entry.js → p-9fdbeba5.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-2a92691a.entry.js → p-a22908ba.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-091a8f00.entry.js → p-a3c76c06.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-520ffe94.entry.js → p-a63d6241.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-cf0d5ab9.entry.js → p-aa4e6e5e.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-ba5a625c.entry.js → p-ab050d5b.entry.js} +2 -2
- package/dist/nylas-web-elements/p-b2b2d351.entry.js +2 -0
- package/dist/nylas-web-elements/p-b2b2d351.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-161c9325.entry.js → p-b348aad4.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-bfe8e06b.entry.js → p-b547209f.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-e8cde784.entry.js → p-b5b051e0.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-aae7febd.entry.js → p-b7a53268.entry.js} +2 -2
- package/dist/nylas-web-elements/p-b8a9e8f4.entry.js +2 -0
- package/dist/nylas-web-elements/p-b8a9e8f4.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-385070ba.entry.js → p-bc6c9256.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-cb03e4d4.entry.js → p-be26ce19.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-8a4ac2a4.entry.js → p-bed6d217.entry.js} +2 -2
- package/dist/nylas-web-elements/p-bf4e0d2a.entry.js +2 -0
- package/dist/nylas-web-elements/p-bf4e0d2a.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-8e63b66c.entry.js → p-cb9fd100.entry.js} +2 -2
- package/dist/nylas-web-elements/p-ce14a1d5.entry.js +2 -0
- package/dist/nylas-web-elements/{p-1fa7b832.entry.js.map → p-ce14a1d5.entry.js.map} +1 -1
- package/dist/nylas-web-elements/{p-44507695.entry.js → p-cee0929a.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-b334d63b.entry.js → p-cffb3636.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-b2aca6c4.entry.js → p-d1ab9d75.entry.js} +2 -2
- package/dist/nylas-web-elements/p-d6a19e25.entry.js +2 -0
- package/dist/nylas-web-elements/p-d6a19e25.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-f96b12de.entry.js → p-d830e428.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-8075a758.entry.js → p-d9b08dd2.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-8f843faf.entry.js → p-db73506b.entry.js} +2 -2
- package/dist/nylas-web-elements/p-dcf99ddf.entry.js +2 -0
- package/dist/nylas-web-elements/p-dcf99ddf.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-d513d2ee.entry.js → p-de2f4643.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-f2d1b1a6.entry.js.map → p-de2f4643.entry.js.map} +1 -1
- package/dist/nylas-web-elements/{p-25c97a60.entry.js → p-de84d999.entry.js} +2 -2
- package/dist/nylas-web-elements/p-debf614f.entry.js +8 -0
- package/dist/nylas-web-elements/p-debf614f.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-158fe1e9.entry.js → p-dfe9b5d0.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-085950eb.entry.js → p-e5452799.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-f8653b9b.entry.js → p-e6e79d76.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-b813eb5d.entry.js → p-e944aa75.entry.js} +2 -2
- package/dist/nylas-web-elements/p-ec844414.entry.js +2 -0
- package/dist/nylas-web-elements/{p-34f0d1fe.entry.js.map → p-ec844414.entry.js.map} +1 -1
- package/dist/nylas-web-elements/p-ed64716c.entry.js +2 -0
- package/dist/nylas-web-elements/p-ed64716c.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-ecaf3ae1.entry.js → p-eff175d3.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-246983ed.entry.js → p-eff774e6.entry.js} +2 -2
- package/dist/nylas-web-elements/p-f03b9d40.entry.js +2 -0
- package/dist/nylas-web-elements/p-f03b9d40.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-2f148064.entry.js → p-f13b8bd3.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-8f3b02cd.entry.js → p-f7465959.entry.js} +2 -2
- package/dist/nylas-web-elements/p-f8e8270d.entry.js +2 -0
- package/dist/nylas-web-elements/p-f8e8270d.entry.js.map +1 -0
- package/dist/types/common/constants.d.ts +17 -0
- package/dist/types/common/icons/calendar-agenda-fill.d.ts +5 -0
- package/dist/types/common/icons/calendar-agenda.d.ts +5 -0
- package/dist/types/common/icons/copy.d.ts +5 -0
- package/dist/types/common/icons/delete.d.ts +5 -0
- package/dist/types/common/icons/dragable.d.ts +5 -0
- package/dist/types/common/icons/edit.d.ts +5 -0
- package/dist/types/common/icons/eye.d.ts +5 -0
- package/dist/types/common/icons/google-meet.d.ts +5 -0
- package/dist/types/common/icons/microsof-teams.d.ts +5 -0
- package/dist/types/common/icons/plus.d.ts +5 -0
- package/dist/types/common/icons/zoom.d.ts +5 -0
- package/dist/types/common/nylas-api-request.d.ts +1 -0
- package/dist/types/common/types.d.ts +1 -0
- package/dist/types/components/design-system/checkbox-component/checkbox-component.d.ts +3 -0
- package/dist/types/components/design-system/input-component/input-component.d.ts +2 -1
- package/dist/types/components/design-system/multi-select-dropdown/multi-select-dropdown.d.ts +1 -0
- package/dist/types/components/design-system/radio-button-group/radio-button-group.d.ts +6 -1
- package/dist/types/components/design-system/select-dropdown/select-dropdown.d.ts +3 -0
- package/dist/types/components/design-system/textarea-component/textarea-component.d.ts +2 -0
- package/dist/types/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.d.ts +1 -0
- package/dist/types/components/scheduler/nylas-booking-form/nylas-booking-form.d.ts +8 -6
- package/dist/types/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.d.ts +3 -2
- package/dist/types/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.d.ts +7 -4
- package/dist/types/components/scheduler-editor/nylas-booking-calendar-picker/nylas-booking-calendar-picker.d.ts +1 -0
- package/dist/types/components/scheduler-editor/nylas-booking-form-config/nylas-booking-form-config.d.ts +51 -0
- package/dist/types/components/scheduler-editor/nylas-calendar-picker/nylas-calendar-picker.d.ts +1 -0
- package/dist/types/components/scheduler-editor/nylas-connected-calendars/nylas-connected-calendars.d.ts +41 -0
- package/dist/types/components/scheduler-editor/nylas-customize-booking-settings/nylas-customize-booking-settings.d.ts +1 -1
- package/dist/types/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.d.ts +27 -4
- package/dist/types/components/scheduler-editor/nylas-editor-tabs/tab-contents.d.ts +2 -1
- package/dist/types/components/scheduler-editor/nylas-event-location/nylas-event-location.d.ts +7 -1
- package/dist/types/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.d.ts +13 -2
- package/dist/types/components/scheduler-editor/nylas-participant-booking-calendars/nylas-participant-booking-calendars.d.ts +43 -0
- package/dist/types/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.d.ts +4 -2
- package/dist/types/components/scheduler-editor/nylas-scheduler-editor/ExpressFlow.d.ts +11 -2
- package/dist/types/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.d.ts +4 -2
- package/dist/types/components/scheduler-editor/nylas-timeslot-interval/nylas-timeslot-interval.d.ts +2 -2
- package/dist/types/components.d.ts +723 -30
- package/dist/types/connector/shared/api/scheduler-config.d.ts +1 -1
- package/dist/types/stores/scheduler-config-store.d.ts +5 -2
- package/dist/types/stores/scheduler-store.d.ts +3 -1
- package/dist/types/types/index.d.ts +8 -0
- package/package.json +4 -3
- package/dist/cjs/button-component.cjs.entry.js +0 -31
- package/dist/cjs/button-component.cjs.entry.js.map +0 -1
- package/dist/cjs/calendar-info-icon_28.cjs.entry.js +0 -2935
- package/dist/cjs/calendar-info-icon_28.cjs.entry.js.map +0 -1
- package/dist/cjs/input-component.cjs.entry.js +0 -89
- package/dist/cjs/input-component.cjs.entry.js.map +0 -1
- package/dist/cjs/nylas-api-request-a1751a40.js.map +0 -1
- package/dist/cjs/scheduler-config-store-9f19c7a9.js.map +0 -1
- package/dist/cjs/scheduler-store-0f7328f1.js.map +0 -1
- package/dist/esm/button-component.entry.js +0 -27
- package/dist/esm/button-component.entry.js.map +0 -1
- package/dist/esm/calendar-info-icon_28.entry.js +0 -2904
- package/dist/esm/calendar-info-icon_28.entry.js.map +0 -1
- package/dist/esm/input-component.entry.js +0 -85
- package/dist/esm/input-component.entry.js.map +0 -1
- package/dist/esm/nylas-api-request-a67d2997.js.map +0 -1
- package/dist/esm/scheduler-config-store-4a50a03d.js.map +0 -1
- package/dist/esm/scheduler-store-f02ce045.js.map +0 -1
- package/dist/nylas-web-elements/p-019be093.entry.js +0 -11
- package/dist/nylas-web-elements/p-019be093.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-05833164.entry.js +0 -2
- package/dist/nylas-web-elements/p-05833164.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-061d0ae2.entry.js +0 -2
- package/dist/nylas-web-elements/p-061d0ae2.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-0c31f7ca.entry.js +0 -2
- package/dist/nylas-web-elements/p-0d98c728.entry.js +0 -2
- package/dist/nylas-web-elements/p-0d98c728.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-12b83ea9.entry.js +0 -2
- package/dist/nylas-web-elements/p-16fb6243.entry.js +0 -2
- package/dist/nylas-web-elements/p-1970b6ee.entry.js +0 -2
- package/dist/nylas-web-elements/p-1a27960b.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-1fa7b832.entry.js +0 -2
- package/dist/nylas-web-elements/p-26976360.entry.js +0 -2
- package/dist/nylas-web-elements/p-26976360.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-29938263.js +0 -2
- package/dist/nylas-web-elements/p-29938263.js.map +0 -1
- package/dist/nylas-web-elements/p-33a6a75b.entry.js +0 -2
- package/dist/nylas-web-elements/p-36f4b804.entry.js +0 -2
- package/dist/nylas-web-elements/p-36f4b804.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-39160c0d.entry.js +0 -11
- package/dist/nylas-web-elements/p-39160c0d.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-3b6bd448.entry.js +0 -2
- package/dist/nylas-web-elements/p-3eeab083.entry.js +0 -2
- package/dist/nylas-web-elements/p-49f716ed.js.map +0 -1
- package/dist/nylas-web-elements/p-53a1bb82.entry.js +0 -2
- package/dist/nylas-web-elements/p-53a1bb82.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-5bed86c2.entry.js +0 -2
- package/dist/nylas-web-elements/p-5ddd0c37.entry.js +0 -2
- package/dist/nylas-web-elements/p-613c070f.js.map +0 -1
- package/dist/nylas-web-elements/p-644ff4ee.entry.js +0 -2
- package/dist/nylas-web-elements/p-644ff4ee.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-64d73008.entry.js +0 -2
- package/dist/nylas-web-elements/p-6ddb4b95.entry.js +0 -2
- package/dist/nylas-web-elements/p-6ddb4b95.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-823c8aa2.js +0 -2
- package/dist/nylas-web-elements/p-823c8aa2.js.map +0 -1
- package/dist/nylas-web-elements/p-83444c0a.entry.js +0 -2
- package/dist/nylas-web-elements/p-83444c0a.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-8506a8d4.entry.js +0 -11
- package/dist/nylas-web-elements/p-8506a8d4.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-926dd201.entry.js +0 -2
- package/dist/nylas-web-elements/p-9283504a.entry.js +0 -2
- package/dist/nylas-web-elements/p-9283504a.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-958746a1.entry.js +0 -2
- package/dist/nylas-web-elements/p-9bb41364.entry.js +0 -2
- package/dist/nylas-web-elements/p-9bb41364.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-a800e7af.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-a8678862.entry.js +0 -2
- package/dist/nylas-web-elements/p-aac962c7.entry.js +0 -2
- package/dist/nylas-web-elements/p-aac962c7.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-b4d09fcf.entry.js +0 -2
- package/dist/nylas-web-elements/p-b4d09fcf.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-b9559f06.entry.js +0 -2
- package/dist/nylas-web-elements/p-b9559f06.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-bab1d562.entry.js +0 -2
- package/dist/nylas-web-elements/p-bab1d562.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-c18c15d0.entry.js +0 -2
- package/dist/nylas-web-elements/p-c1ff6499.entry.js +0 -2
- package/dist/nylas-web-elements/p-c1ff6499.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-d5d67115.entry.js +0 -2
- package/dist/nylas-web-elements/p-d5d67115.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-d9a91bc9.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-ea12997b.entry.js +0 -2
- package/dist/nylas-web-elements/p-f2d1b1a6.entry.js +0 -2
- package/dist/nylas-web-elements/p-f6fafe86.entry.js +0 -2
- package/dist/nylas-web-elements/p-f6fafe86.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-ffce3a49.entry.js +0 -2
- package/dist/nylas-web-elements/p-ffce3a49.entry.js.map +0 -1
- /package/dist/nylas-web-elements/{p-08d75d35.entry.js.map → p-064c2ae5.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-5bed86c2.entry.js.map → p-0aa1e433.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-3f122804.entry.js.map → p-0bf6f818.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-926dd201.entry.js.map → p-1102df14.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-a7b19349.entry.js.map → p-155e5ce8.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-a85408e0.entry.js.map → p-18d100c8.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-5231fc13.entry.js.map → p-1a7edf86.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-554891cd.entry.js.map → p-1e1ae8d0.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-65097f45.entry.js.map → p-1fbe50b1.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-70e5cfb0.entry.js.map → p-22e05c7d.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-be38a8eb.entry.js.map → p-26302ad0.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-2a92691a.entry.js.map → p-2f47205d.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-085950eb.entry.js.map → p-3277023d.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-64d73008.entry.js.map → p-34c747f9.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-45c37986.entry.js.map → p-3ae38e51.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-0c31f7ca.entry.js.map → p-3bc1289e.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-5ddd0c37.entry.js.map → p-3d1e8e4d.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-e9ba368f.entry.js.map → p-3dae0c71.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-acadfabf.entry.js.map → p-3db7ab8d.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-28512ab6.entry.js.map → p-3e09b0fb.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-158fe1e9.entry.js.map → p-3eac9f45.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-d513d2ee.entry.js.map → p-4000107d.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-3b6bd448.entry.js.map → p-47392968.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-16a3bfb2.entry.js.map → p-4a594ebe.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-c90755ba.entry.js.map → p-4b6995fe.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-b2d95965.entry.js.map → p-4cdd4107.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-25c97a60.entry.js.map → p-4e8c8939.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-6bd9c9c3.entry.js.map → p-4e9ba325.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-6ce66add.entry.js.map → p-524a6acc.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-9b68568e.entry.js.map → p-533d39ce.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-7a95bc3f.entry.js.map → p-5a379fb5.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-cb03e4d4.entry.js.map → p-5a68368a.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-1970b6ee.entry.js.map → p-5b965d0d.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-091a8f00.entry.js.map → p-5ff4e63b.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-37f41a90.entry.js.map → p-656cf33f.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-246983ed.entry.js.map → p-65b7a2a7.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-60b03f86.entry.js.map → p-6c8af4fb.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-8e63b66c.entry.js.map → p-6d410f0a.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-daac96cb.entry.js.map → p-6e50d2fd.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-c18c15d0.entry.js.map → p-6e8b7ce8.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-b9fa6848.entry.js.map → p-7355937b.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-a8678862.entry.js.map → p-76156a82.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-052bc3b1.entry.js.map → p-7e08f131.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-2f148064.entry.js.map → p-7e10aa6d.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-b2aca6c4.entry.js.map → p-7e53588e.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-aae7febd.entry.js.map → p-83de54ae.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-de7b0878.entry.js.map → p-884b66bd.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-e928898a.entry.js.map → p-90294a76.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-3eeab083.entry.js.map → p-90817d1f.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-f1b0120b.entry.js.map → p-90d32fc3.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-dcc27b67.entry.js.map → p-95a9d2f1.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-6ef1024f.entry.js.map → p-96746b87.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-7fcecf3f.entry.js.map → p-97026709.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-eb7e8455.entry.js.map → p-987042a1.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-44507695.entry.js.map → p-9f903292.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-7ce048c0.entry.js.map → p-9fdbeba5.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-9794f735.entry.js.map → p-a22908ba.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-16fb6243.entry.js.map → p-a3c76c06.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-520ffe94.entry.js.map → p-a63d6241.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-cf0d5ab9.entry.js.map → p-aa4e6e5e.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-ba5a625c.entry.js.map → p-ab050d5b.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-161c9325.entry.js.map → p-b348aad4.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-5c3c1888.entry.js.map → p-b547209f.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-e8cde784.entry.js.map → p-b5b051e0.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-b0c8021f.entry.js.map → p-b7a53268.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-385070ba.entry.js.map → p-bc6c9256.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-d633e735.entry.js.map → p-be26ce19.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-8a4ac2a4.entry.js.map → p-bed6d217.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-8f3b02cd.entry.js.map → p-cb9fd100.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-bd34f97d.entry.js.map → p-cee0929a.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-b334d63b.entry.js.map → p-cffb3636.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-f1a54acf.entry.js.map → p-d1ab9d75.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-f96b12de.entry.js.map → p-d830e428.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-8075a758.entry.js.map → p-d9b08dd2.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-39fd9c90.entry.js.map → p-db73506b.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-8f843faf.entry.js.map → p-de84d999.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-bfe8e06b.entry.js.map → p-dfe9b5d0.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-66493463.entry.js.map → p-e5452799.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-f8653b9b.entry.js.map → p-e6e79d76.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-b813eb5d.entry.js.map → p-e944aa75.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-a12f3223.entry.js.map → p-eff175d3.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-cf589eab.entry.js.map → p-eff774e6.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-ecaf3ae1.entry.js.map → p-f13b8bd3.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-ea12997b.entry.js.map → p-f7465959.entry.js.map} +0 -0
|
@@ -1,2935 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-7af03e3f.js');
|
|
6
|
-
const utils = require('./utils-fe7102aa.js');
|
|
7
|
-
const registerComponent = require('./register-component-7d193b8d.js');
|
|
8
|
-
const constants = require('./constants-3e962931.js');
|
|
9
|
-
const index$1 = require('./index-4fa1bb56.js');
|
|
10
|
-
require('./buffer-es6-370c0d93.js');
|
|
11
|
-
require('./_commonjsHelpers-0a7b82d9.js');
|
|
12
|
-
require('./index-b41d035f.js');
|
|
13
|
-
|
|
14
|
-
const iconCss$5 = ".sc-calendar-info-icon-h{display:flex}";
|
|
15
|
-
const CalendarInfoIconStyle0 = iconCss$5;
|
|
16
|
-
|
|
17
|
-
const CalendarInfoIcon = class {
|
|
18
|
-
constructor(hostRef) {
|
|
19
|
-
index.registerInstance(this, hostRef);
|
|
20
|
-
this.width = '20';
|
|
21
|
-
this.height = '20';
|
|
22
|
-
}
|
|
23
|
-
render() {
|
|
24
|
-
return (index.h("svg", { key: '9012ae7b873d35927c299ed62d247b77757bb679', width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { key: '0a3a11d84c99d05ad964d3b5606c072dd31872a7', d: "M12 0C13.3807 0 14.5 1.11929 14.5 2.5V6.59971C14.1832 6.43777 13.8486 6.30564 13.5 6.20703V4H1.5V11.5C1.5 12.3284 2.17157 13 3 13H6.70703C6.80564 13.3486 6.93777 13.6832 7.09971 14H3C1.61929 14 0.5 12.8807 0.5 11.5V2.5C0.5 1.11929 1.61929 0 3 0H12ZM12 1H3C2.17157 1 1.5 1.67157 1.5 2.5V3H13.5V2.5C13.5 1.67157 12.8284 1 12 1ZM11.375 9.5C11.375 9.15482 11.6548 8.875 12 8.875C12.3452 8.875 12.625 9.15482 12.625 9.5C12.625 9.84518 12.3452 10.125 12 10.125C11.6548 10.125 11.375 9.84518 11.375 9.5ZM12.5 13.5C12.5 13.7761 12.2761 14 12 14C11.7239 14 11.5 13.7761 11.5 13.5V11.5C11.5 11.2239 11.7239 11 12 11C12.2761 11 12.5 11.2239 12.5 11.5V13.5ZM7.5 11.5C7.5 9.01472 9.51472 7 12 7C14.4853 7 16.5 9.01472 16.5 11.5C16.5 13.9853 14.4853 16 12 16C9.51472 16 7.5 13.9853 7.5 11.5ZM8.5 11.5C8.5 13.433 10.067 15 12 15C13.933 15 15.5 13.433 15.5 11.5C15.5 9.567 13.933 8 12 8C10.067 8 8.5 9.567 8.5 11.5Z", fill: "currentColor" })));
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
CalendarInfoIcon.style = CalendarInfoIconStyle0;
|
|
28
|
-
|
|
29
|
-
const iconCss$4 = ".sc-calendar-patterns-icon-h{display:flex}";
|
|
30
|
-
const CalendarPatternsIconStyle0 = iconCss$4;
|
|
31
|
-
|
|
32
|
-
const CalendarPatternsIcon = class {
|
|
33
|
-
constructor(hostRef) {
|
|
34
|
-
index.registerInstance(this, hostRef);
|
|
35
|
-
this.width = '20';
|
|
36
|
-
this.height = '20';
|
|
37
|
-
}
|
|
38
|
-
render() {
|
|
39
|
-
return (index.h("svg", { key: 'ca6df3db90bbbffc29dfdc6ee5a440266eaa153d', width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { key: 'ab45118ff407127ca1673159e1b78c93c7c97bed', d: "M3.25 0H11.75C13.2688 0 14.5 1.23122 14.5 2.75V11.25C14.5 12.7688 13.2688 14 11.75 14H3.25C1.73122 14 0.5 12.7688 0.5 11.25V2.75C0.5 1.23122 1.73122 0 3.25 0ZM2 2.75V4H13V2.75C13 2.05964 12.4404 1.5 11.75 1.5H3.25C2.55964 1.5 2 2.05964 2 2.75ZM12.2071 5L8.20711 9H10.7929L13 6.79289V5H12.2071ZM10.7929 5H8.20711L4.20711 9H6.79289L10.7929 5ZM2.79289 9L6.79289 5H4.20711L2 7.20711V9H2.79289ZM2 5.79289L2.79289 5H2V5.79289ZM12.2071 9H13V8.20711L12.2071 9Z", fill: "currentColor" })));
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
CalendarPatternsIcon.style = CalendarPatternsIconStyle0;
|
|
43
|
-
|
|
44
|
-
const checkboxComponentCss = "label{--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;display:flex;align-items:center;font-family:var(--nylas-font-family);cursor:pointer;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}label input[type=checkbox]{position:absolute;opacity:0;cursor:pointer}label input[type=checkbox]:focus~.checkmark,label input[type=checkbox]:hover~.checkmark{border-color:var(--nylas-primary)}label input[type=checkbox]:checked~.checkmark{color:var(--nylas-base-0);background:var(--nylas-primary) url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8c3ZnIHdpZHRoPSIxMiIgaGVpZ2h0PSI5IiB2aWV3Qm94PSIwIDAgMTIgOSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCiAgPHBhdGggZD0iTTQuNTc1IDguOTc3cy0uNDA0LS4wMDctLjUzNi0uMTY1TC4wNTcgNS42NGwuODI5LTEuMjI3TDQuNDcgNy4yNjggMTAuOTIxLjA4NmwuOTIzIDEuMTAzLTYuODYzIDcuNjRjLS4xMzQtLjAwMy0uNDA2LjE0OC0uNDA2LjE0OHoiIGZpbGw9IiNGRkYiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPg0KPC9zdmc+) 50% 40% no-repeat;border:2px solid var(--nylas-primary)}label .checkmark{border-radius:var(--nylas-border-radius);border:2px solid var(--nylas-base-800);position:absolute;left:0;top:2px;width:18px;height:18px;cursor:pointer;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}label .label{margin-left:32px;font-size:16px;font-weight:400;color:var(--nylas-base-800);line-height:24px}";
|
|
45
|
-
const CheckboxComponentStyle0 = checkboxComponentCss;
|
|
46
|
-
|
|
47
|
-
const CheckboxComponent = class {
|
|
48
|
-
constructor(hostRef) {
|
|
49
|
-
index.registerInstance(this, hostRef);
|
|
50
|
-
this.nylasFormCheckboxToggled = index.createEvent(this, "nylasFormCheckboxToggled", 7);
|
|
51
|
-
this.name = 'checkbox';
|
|
52
|
-
this.checked = false;
|
|
53
|
-
this.label = '';
|
|
54
|
-
this.isChecked = this.checked;
|
|
55
|
-
}
|
|
56
|
-
componentWillLoad() {
|
|
57
|
-
this.isChecked = this.checked;
|
|
58
|
-
}
|
|
59
|
-
toggleCheck() {
|
|
60
|
-
this.isChecked = !this.isChecked;
|
|
61
|
-
this.nylasFormCheckboxToggled.emit({
|
|
62
|
-
checked: this.isChecked,
|
|
63
|
-
name: this.name,
|
|
64
|
-
label: this.label,
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
render() {
|
|
68
|
-
return (index.h("label", { key: 'ff418217723b6044270dc691f7d0e11aea5fb204' }, index.h("input", { key: 'c45008c89d147534ba6b4a70120b7c5159a25ce6', type: "checkbox", name: this.name, checked: this.isChecked, onChange: () => this.toggleCheck() }), index.h("span", { key: 'a785e711233dab04bb19bcf1f1c6f665d7460015', class: "checkmark" }), index.h("slot", { key: '05e7f91a9e038bf9a467d63c9c004f7b90454b6f', name: "label" }, index.h("span", { key: '35a5c8bef4f998f993fbdcf2b752b83432218422', class: "label" }, this.label))));
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
CheckboxComponent.style = CheckboxComponentStyle0;
|
|
72
|
-
|
|
73
|
-
const iconCss$3 = ".sc-flow-icon-h{display:flex}";
|
|
74
|
-
const FlowIconStyle0 = iconCss$3;
|
|
75
|
-
|
|
76
|
-
const FlowIcon = class {
|
|
77
|
-
constructor(hostRef) {
|
|
78
|
-
index.registerInstance(this, hostRef);
|
|
79
|
-
this.width = '16';
|
|
80
|
-
this.height = '12';
|
|
81
|
-
}
|
|
82
|
-
render() {
|
|
83
|
-
return (index.h("svg", { key: '18bdb1e3a2d6d1f4b9f9e1983c1ad7156e83e489', width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { key: 'a291353c08dfca6bb961e83386a3bfe71a840299', d: "M13 1.66211C11.8954 1.66211 11 2.55754 11 3.66211C11 4.76668 11.8954 5.66211 13 5.66211C14.1046 5.66211 15 4.76668 15 3.66211C15 2.55754 14.1046 1.66211 13 1.66211ZM10.0407 3.16678C10.2768 1.74563 11.5119 0.662109 13 0.662109C14.6569 0.662109 16 2.00526 16 3.66211C16 5.31896 14.6569 6.66211 13 6.66211C11.5162 6.66211 10.2839 5.58482 10.0428 4.16971C9.37629 4.23688 8.82682 4.7426 8.71466 5.41551L8.27173 8.07311C8.07929 9.22776 7.11428 10.087 5.9593 10.1574C5.72319 11.5786 4.48813 12.6621 3 12.6621C1.34315 12.6621 0 11.319 0 9.66211C0 8.00526 1.34315 6.66211 3 6.66211C4.48384 6.66211 5.71607 7.73939 5.95724 9.15451C6.62371 9.08734 7.17318 8.58162 7.28534 7.90871L7.72827 5.25111C7.92071 4.09646 8.88571 3.23718 10.0407 3.16678ZM3 7.66211C1.89543 7.66211 1 8.55754 1 9.66211C1 10.7667 1.89543 11.6621 3 11.6621C4.10457 11.6621 5 10.7667 5 9.66211C5 8.55754 4.10457 7.66211 3 7.66211Z", fill: "currentColor" })));
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
FlowIcon.style = FlowIconStyle0;
|
|
87
|
-
|
|
88
|
-
const iconCss$2 = ".sc-location-icon-h{display:flex}";
|
|
89
|
-
const LocationIconStyle0 = iconCss$2;
|
|
90
|
-
|
|
91
|
-
const LocationIcon = class {
|
|
92
|
-
constructor(hostRef) {
|
|
93
|
-
index.registerInstance(this, hostRef);
|
|
94
|
-
this.width = '16';
|
|
95
|
-
this.height = '18';
|
|
96
|
-
}
|
|
97
|
-
render() {
|
|
98
|
-
return (index.h("svg", { key: 'c4b6ed753f7c3c3e26ae2fe2e92b429abe4eceb4', width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { key: 'cff1afc5e511a814bfc16fc7c8fdaef6356a7952', d: "M10 7.66211C10 9.31896 8.65685 10.6621 7 10.6621C5.34315 10.6621 4 9.31896 4 7.66211C4 6.00526 5.34315 4.66211 7 4.66211C8.65685 4.66211 10 6.00526 10 7.66211ZM9 7.66211C9 6.55754 8.10457 5.66211 7 5.66211C5.89543 5.66211 5 6.55754 5 7.66211C5 8.76668 5.89543 9.66211 7 9.66211C8.10457 9.66211 9 8.76668 9 7.66211ZM11.9497 12.6171C14.6834 9.88221 14.6834 5.44812 11.9497 2.71326C9.21608 -0.0216067 4.78392 -0.0216067 2.05025 2.71326C-0.683418 5.44812 -0.683418 9.88221 2.05025 12.6171L3.57128 14.1159L5.61408 16.101L5.74691 16.2188C6.52168 16.8468 7.65623 16.8076 8.38611 16.1012L10.8223 13.7312L11.9497 12.6171ZM2.75499 3.4183C5.09944 1.07282 8.90055 1.07282 11.245 3.4183C13.5294 5.70364 13.5879 9.3725 11.4207 11.7288L11.245 11.912L9.92371 13.216L7.69315 15.3846L7.60016 15.4642C7.24594 15.732 6.7543 15.732 6.40012 15.4642L6.30713 15.3845L3.3263 12.4791L2.75499 11.912L2.57927 11.7288C0.412077 9.3725 0.47065 5.70364 2.75499 3.4183Z", fill: "currentColor" })));
|
|
99
|
-
}
|
|
100
|
-
};
|
|
101
|
-
LocationIcon.style = LocationIconStyle0;
|
|
102
|
-
|
|
103
|
-
const iconCss$1 = ".sc-location-off-icon-h{display:flex}";
|
|
104
|
-
const LocationOffIconStyle0 = iconCss$1;
|
|
105
|
-
|
|
106
|
-
const LocationOffIcon = class {
|
|
107
|
-
constructor(hostRef) {
|
|
108
|
-
index.registerInstance(this, hostRef);
|
|
109
|
-
this.width = '16';
|
|
110
|
-
this.height = '18';
|
|
111
|
-
}
|
|
112
|
-
render() {
|
|
113
|
-
return (index.h("svg", { key: 'b7eb987c802beac155700ccbd2c51189708f3422', width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { key: '91e1d8458400d7d502def34ce86611fc17110cb4', d: "M0.146447 0.808556C0.341709 0.613294 0.658291 0.613294 0.853553 0.808556L15.8536 15.8086C16.0488 16.0038 16.0488 16.3204 15.8536 16.5157C15.6583 16.7109 15.3417 16.7109 15.1464 16.5157L12.0938 13.463L11.8223 13.7312L9.38611 16.1012C8.65623 16.8076 7.52168 16.8468 6.74691 16.2188L6.61408 16.101L4.57128 14.1159L3.05025 12.6171C0.607421 10.1732 0.347525 6.37239 2.27056 3.63976L0.146447 1.51566C-0.0488155 1.3204 -0.0488155 1.00382 0.146447 0.808556ZM9.07768 10.4469C8.74346 10.576 8.38024 10.6468 8.0005 10.6468C6.34839 10.6468 5.00909 9.30689 5.00909 7.65406C5.00909 7.27461 5.07967 6.91166 5.20843 6.57763L2.98793 4.35713C1.49206 6.62038 1.68917 9.67377 3.57927 11.7288L3.75499 11.912L4.3263 12.4791L7.30713 15.3845L7.40012 15.4642C7.7543 15.732 8.24594 15.732 8.60016 15.4642L8.69315 15.3846L10.9237 13.216L11.3883 12.7575L9.07768 10.4469ZM9.85409 8.39486L10.5983 9.13904C10.8487 8.70143 10.9919 8.19447 10.9919 7.65406C10.9919 6.00122 9.65261 4.66134 8.0005 4.66134C7.45986 4.66134 6.95271 4.80482 6.51504 5.05581L7.25921 5.79998C7.48839 5.70819 7.73855 5.6577 8.0005 5.6577C9.10258 5.6577 9.99599 6.5515 9.99599 7.65406C9.99599 7.91581 9.94564 8.16581 9.85409 8.39486ZM4.35291 2.89368C6.70671 1.08827 10.0908 1.26314 12.245 3.4183C14.3986 5.57283 14.5739 8.95702 12.771 11.3118L13.4812 12.022C15.6702 9.27273 15.493 5.25762 12.9497 2.71326C10.4058 0.168159 6.39081 -0.00843871 3.64269 2.18347L4.35291 2.89368Z", fill: "currentColor" })));
|
|
114
|
-
}
|
|
115
|
-
};
|
|
116
|
-
LocationOffIcon.style = LocationOffIconStyle0;
|
|
117
|
-
|
|
118
|
-
const multiSelectDropdownCss = ":host{display:block;width:inherit;--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}.dropdown{display:inline-block;width:100%;position:relative}.dropdown .dropdown-label{display:flex;align-items:center;gap:0.25rem;color:var(--nylas-base-800)}.dropbtn{width:inherit;height:48px;color:black;padding:0.5rem;font-size:1rem;cursor:pointer;display:flex;gap:0.5rem;justify-content:space-between;align-items:center;background:transparent;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}.dropbtn.focus{background:transparent}.dropbtn:hover,.dropbtn:active{border:1px solid var(--nylas-primary)}.dropbtn:active{outline:2px solid var(--nylas-primary)}.dropbtn span.open{transform:rotate(90deg)}.dropbtn span.closed{transform:rotate(270deg)}.dropdown-content{display:block;margin-top:0.5rem;background-color:var(--nylas-base-0);width:100%;max-height:336px;overflow:auto;border:1px solid #ddd;z-index:1;border-radius:4px;position:absolute;box-shadow:0px 4px 6px -2px rgba(0, 0, 0, 0.0509803922);box-shadow:0px 10px 15px -3px rgba(0, 0, 0, 0.1019607843)}.dropdown-content ul{padding:0;list-style-type:none;color:var(--nylas-base-900);max-height:336px}.dropdown-content ul li{padding:16px, 12px, 16px, 12px;color:black;padding:12px 16px;text-decoration:none;display:block;font-family:inherit;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0px;text-align:left;cursor:pointer}.dropdown-content ul li:hover,.dropdown-content ul li:focus{background-color:var(--nylas-base-100)}.dropdown-content ul li label{display:flex;align-items:center;gap:0.5rem}.dropdown-content ul li label input{margin:0}.selected-options{display:flex;flex-wrap:wrap;gap:0.5rem;padding:0.5rem 0;margin-top:0.25rem;background:var(--nylas-base-0)}.selected-options .selected-option{display:flex;align-items:center;gap:0.5rem;padding:4px 8px;border-radius:var(--nylas-border-radius-2x);background:var(--nylas-base-100);color:var(--nylas-base-800);font-size:16px;font-weight:500;line-height:1.5rem;letter-spacing:0.5px}.selected-options .selected-option button{background:transparent;border:none;cursor:pointer;padding:0}.selected-options .selected-option button:hover{color:var(--nylas-primary)}";
|
|
119
|
-
const MultiSelectDropdownStyle0 = multiSelectDropdownCss;
|
|
120
|
-
|
|
121
|
-
const MultiSelectDropdown = class {
|
|
122
|
-
constructor(hostRef) {
|
|
123
|
-
index.registerInstance(this, hostRef);
|
|
124
|
-
this.selectedOptionsChanged = index.createEvent(this, "selectedOptionsChanged", 7);
|
|
125
|
-
this.name = undefined;
|
|
126
|
-
this.label = undefined;
|
|
127
|
-
this.options = [];
|
|
128
|
-
this.availableOptions = this.options;
|
|
129
|
-
this.isOpen = false;
|
|
130
|
-
this.ariaActivedescendant = '';
|
|
131
|
-
this.shouldFocusFirstOption = false;
|
|
132
|
-
}
|
|
133
|
-
componentDidRender() {
|
|
134
|
-
utils.debug('multi-select-dropdown', 'componentDidRender');
|
|
135
|
-
if (this.isOpen && this.shouldFocusFirstOption) {
|
|
136
|
-
this.ariaActivedescendant = this.availableOptions[0].value;
|
|
137
|
-
this.focusOption(0);
|
|
138
|
-
this.shouldFocusFirstOption = false;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
handleOutsideClick(event) {
|
|
142
|
-
const path = event.composedPath();
|
|
143
|
-
const isClickInside = path.includes(this.el);
|
|
144
|
-
if (!isClickInside && this.isOpen) {
|
|
145
|
-
this.isOpen = false;
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
selectOption(option) {
|
|
149
|
-
this.availableOptions = this.availableOptions.map(o => {
|
|
150
|
-
if (o.value === option.value) {
|
|
151
|
-
o.selected = option.selected ? false : true;
|
|
152
|
-
}
|
|
153
|
-
return o;
|
|
154
|
-
});
|
|
155
|
-
const selectedOptions = this.availableOptions.filter(o => o.selected).map(o => o.value);
|
|
156
|
-
this.selectedOptionsChanged.emit({
|
|
157
|
-
value: selectedOptions,
|
|
158
|
-
name: this.name,
|
|
159
|
-
});
|
|
160
|
-
}
|
|
161
|
-
toggleDropdown() {
|
|
162
|
-
this.isOpen = !this.isOpen;
|
|
163
|
-
if (this.isOpen) {
|
|
164
|
-
this.shouldFocusFirstOption = true;
|
|
165
|
-
}
|
|
166
|
-
else {
|
|
167
|
-
this.ariaActivedescendant = '';
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
handleSelectButtonKeyDown(event) {
|
|
171
|
-
switch (event.key) {
|
|
172
|
-
case 'ArrowDown':
|
|
173
|
-
case 'Enter':
|
|
174
|
-
event.preventDefault();
|
|
175
|
-
if (!this.isOpen) {
|
|
176
|
-
this.toggleDropdown();
|
|
177
|
-
}
|
|
178
|
-
break;
|
|
179
|
-
case 'Escape':
|
|
180
|
-
this.isOpen = false;
|
|
181
|
-
break;
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
handleListboxKeydown(e) {
|
|
185
|
-
const items = this.availableOptions;
|
|
186
|
-
const currentIndex = items.findIndex(item => item.value === this.ariaActivedescendant);
|
|
187
|
-
switch (e.key) {
|
|
188
|
-
case 'ArrowDown':
|
|
189
|
-
case 'Tab':
|
|
190
|
-
if (!e.shiftKey) {
|
|
191
|
-
e.preventDefault();
|
|
192
|
-
const nextIndex = currentIndex + 1 < items.length ? currentIndex + 1 : 0;
|
|
193
|
-
this.ariaActivedescendant = items[nextIndex].value;
|
|
194
|
-
this.focusOption(nextIndex);
|
|
195
|
-
}
|
|
196
|
-
else {
|
|
197
|
-
e.preventDefault();
|
|
198
|
-
const prevIndex = currentIndex - 1 >= 0 ? currentIndex - 1 : items.length - 1;
|
|
199
|
-
this.ariaActivedescendant = items[prevIndex].value;
|
|
200
|
-
this.focusOption(prevIndex);
|
|
201
|
-
}
|
|
202
|
-
break;
|
|
203
|
-
case 'ArrowUp':
|
|
204
|
-
e.preventDefault();
|
|
205
|
-
const prevIndex = currentIndex - 1 >= 0 ? currentIndex - 1 : items.length - 1;
|
|
206
|
-
this.ariaActivedescendant = items[prevIndex].value;
|
|
207
|
-
this.focusOption(prevIndex);
|
|
208
|
-
break;
|
|
209
|
-
case 'Enter':
|
|
210
|
-
e.preventDefault();
|
|
211
|
-
if (this.ariaActivedescendant) {
|
|
212
|
-
this.selectOption(items[currentIndex]);
|
|
213
|
-
}
|
|
214
|
-
break;
|
|
215
|
-
case 'Escape':
|
|
216
|
-
this.isOpen = false;
|
|
217
|
-
break;
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
focusOption(index) {
|
|
221
|
-
const option = this.availableOptions[index];
|
|
222
|
-
if (!option)
|
|
223
|
-
return;
|
|
224
|
-
const elementId = option.value;
|
|
225
|
-
const element = this.el.shadowRoot?.getElementById(elementId);
|
|
226
|
-
if (element) {
|
|
227
|
-
element.focus();
|
|
228
|
-
element.scrollIntoView({ behavior: 'smooth', block: 'nearest' });
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
getSelectedOptions() {
|
|
232
|
-
return this.availableOptions.filter(option => option.selected);
|
|
233
|
-
}
|
|
234
|
-
renderOption(option) {
|
|
235
|
-
return (index.h("li", { key: option.value, id: option.value, role: "option", tabindex: "0", "aria-selected": option.selected ? 'true' : 'false', onClick: e => {
|
|
236
|
-
e.stopImmediatePropagation();
|
|
237
|
-
this.selectOption(option);
|
|
238
|
-
}, class: { selected: !!option.selected } }, index.h("label", { htmlFor: option.value }, index.h("input", { "aria-hidden": "true", id: option.value, type: "checkbox", checked: option.selected }), index.h("span", null, option.label))));
|
|
239
|
-
}
|
|
240
|
-
render() {
|
|
241
|
-
return (index.h(index.Host, { key: 'af0befb6c6c059e41a99ebe56c9632e6445e897b' }, index.h("div", { key: 'e93abae0184670a75caa02b4f687a374fce9a055', class: "dropdown", part: "msd_dropdown" }, index.h("label", { key: 'cb7ab81e0c7e23934dfc814a4c5281470e2ad510', class: "dropdown-label" }, this.label, index.h("slot", { key: '88fdcec62b47bf2b7da977c06b36300722789373', name: "label-icon", "aria-hidden": "true" })), index.h("button", { key: '17e03081353c32b5f571e7655fbe7b0c2ea87a35', part: "msd_dropdown-button", class: { dropbtn: true, open: this.isOpen }, onClick: () => this.toggleDropdown(), "aria-haspopup": "listbox", "aria-expanded": this.isOpen ? 'true' : 'false', "aria-label": this.name, onKeyDown: e => this.handleSelectButtonKeyDown(e) }, index.h("slot", { key: 'f1925d4d315c6be091a07f18261e574792883fd7', name: "select-icon", "aria-hidden": "true" }), index.h("span", { key: '02c03946856eed3b6207ec84abbba0d16554af9f', class: "selected-option", part: "msd_dropdown-button-selected-label" }, this.getSelectedOptions().length > 1
|
|
242
|
-
? `Multiple ${this.name}s selected`
|
|
243
|
-
: this.availableOptions.filter(o => o.selected)[0]?.label ?? this.availableOptions[0]?.label), index.h("span", { key: 'bbd36a37a7ee28e299da6b22612206e4bbbcf8db', class: this.isOpen ? 'open' : 'closed', "aria-hidden": "true" }, index.h("chevron-icon", { key: '4e6f9c3dfd33c8d87b9584648487783e417961c6', width: "16", height: "16" }))), this.isOpen ? null : (index.h("div", { class: 'selected-options' }, this.getSelectedOptions().map(option => (index.h("span", { class: "selected-option" }, option.label, index.h("button", { key: option.label, onClick: () => this.selectOption(option) }, index.h("close-icon", null))))))), this.isOpen ? (index.h("div", { class: "dropdown-content", part: "msd_dropdown-content" }, index.h("ul", { tabindex: "-1", role: "listbox", "aria-label": this.name, "aria-multiselectable": true, "aria-activedescendant": this.ariaActivedescendant, onKeyDown: e => this.handleListboxKeydown(e) }, this.availableOptions.map(option => this.renderOption(option))))) : null)));
|
|
244
|
-
}
|
|
245
|
-
get el() { return index.getElement(this); }
|
|
246
|
-
};
|
|
247
|
-
MultiSelectDropdown.style = MultiSelectDropdownStyle0;
|
|
248
|
-
|
|
249
|
-
const nylasAdditionalParticipantsCss = ":host{display:block;margin:1rem;--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}.nylas-additional-participants__title{color:var(--nylas-base-nylas-base-900-aaa, #101323);font-size:16px;font-style:normal;font-weight:600;line-height:20px;margin:0;text-align:left}.nylas-additional-participants__subtitle{color:var(--nylas-base-600);font-size:14px;font-style:normal;font-weight:400;line-height:20px;margin:0.25rem 0px 0px;text-align:left}.nylas-additional-participants__content{padding:1rem;display:flex;flex-direction:column;gap:1rem}.nylas-additional-participants__input_group{padding-top:8px;display:flex;flex-direction:column;gap:4px}.nylas-additional-participants__input_group label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:14px;font-style:normal;font-weight:400;line-height:150%}.nylas-additional-participants__input_wrapper{display:flex;border-width:1;border-radius:8px;border:1px solid var(--nylas-base-300)}.nylas-additional-participants__input_wrapper button{padding:12px;border:none;border-left:1px solid var(--nylas-base-300);background:none;cursor:pointer}.nylas-additional-participants__input_wrapper button:hover,.nylas-additional-participants__input_wrapper button:active{color:var(--nylas-primary)}.nylas-additional-participants__input_wrapper_organizer{background:var(--nylas-base-50)}.nylas-additional-participants__input{flex:1;display:flex;justify-content:space-between}.nylas-additional-participants__input.organizer{padding:12px 16px}.nylas-additional-participants__input input{border:none;outline:none;background:none;width:100%}.nylas-additional-participants__input input-dropdown{width:100%}.nylas-additional-participants__input input-dropdown::part(id_dropdown){width:100%;height:100%}.nylas-additional-participants__input input-dropdown::part(id_dropdown-input){height:100%;border-radius:var(--nylas-border-radius-2x);border:none;border-top-right-radius:initial;border-bottom-right-radius:initial;padding-left:16px}.nylas-additional-participants__add{padding:12px;display:flex;align-items:center;border:none;background:none;cursor:pointer}.nylas-additional-participants__add span{padding:0 8px;font-size:16px;font-style:normal;font-weight:500}.nylas-additional-participants__add:hover,.nylas-additional-participants__add:active{color:var(--nylas-primary)}";
|
|
250
|
-
const NylasAdditionalParticipantsStyle0 = nylasAdditionalParticipantsCss;
|
|
251
|
-
|
|
252
|
-
var __decorate$h = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
253
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
254
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
255
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
256
|
-
else
|
|
257
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
258
|
-
if (d = decorators[i])
|
|
259
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
260
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
261
|
-
};
|
|
262
|
-
var __metadata$h = (undefined && undefined.__metadata) || function (k, v) {
|
|
263
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
264
|
-
return Reflect.metadata(k, v);
|
|
265
|
-
};
|
|
266
|
-
const NylasAdditionalParticipants = class {
|
|
267
|
-
constructor(hostRef) {
|
|
268
|
-
index.registerInstance(this, hostRef);
|
|
269
|
-
this.valueChanged = index.createEvent(this, "valueChanged", 7);
|
|
270
|
-
if (hostRef.$hostElement$["s-ei"]) {
|
|
271
|
-
this.internals = hostRef.$hostElement$["s-ei"];
|
|
272
|
-
}
|
|
273
|
-
else {
|
|
274
|
-
this.internals = hostRef.$hostElement$.attachInternals();
|
|
275
|
-
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
276
|
-
}
|
|
277
|
-
this.name = 'participants';
|
|
278
|
-
this.eventParticipants = undefined;
|
|
279
|
-
this.participantOptions = undefined;
|
|
280
|
-
this.participants = this.eventParticipants ?? [];
|
|
281
|
-
this.participantsValid = true;
|
|
282
|
-
}
|
|
283
|
-
elementNameChangedHandler(newValue) {
|
|
284
|
-
utils.debug('nylas-additional-participants', 'elementNameChangedHandler', newValue);
|
|
285
|
-
this.host.setAttribute('name', newValue);
|
|
286
|
-
}
|
|
287
|
-
connectedCallback() {
|
|
288
|
-
utils.debug('nylas-additional-participants', 'connectedCallback');
|
|
289
|
-
}
|
|
290
|
-
componentWillLoad() {
|
|
291
|
-
utils.debug('nylas-additional-participants', 'componentWillLoad');
|
|
292
|
-
this.host.setAttribute('name', this.name);
|
|
293
|
-
}
|
|
294
|
-
componentDidLoad() {
|
|
295
|
-
utils.debug('nylas-additional-participants', 'componentDidLoad');
|
|
296
|
-
this.updateFormValue();
|
|
297
|
-
}
|
|
298
|
-
disconnectedCallback() {
|
|
299
|
-
utils.debug('nylas-additional-participants', 'disconnectedCallback');
|
|
300
|
-
}
|
|
301
|
-
onInputOptionChanged(event) {
|
|
302
|
-
utils.debug('nylas-additional-participants', 'onInputOptionChanged');
|
|
303
|
-
const index = event.detail.name;
|
|
304
|
-
this.participants[index].email = event.detail.value;
|
|
305
|
-
const participant = this.participantOptions?.find(participant => participant.email === event.detail.value);
|
|
306
|
-
this.participants[index].availability = participant ? { calendar_ids: ['primary'] } : undefined;
|
|
307
|
-
this.participants[index].name = participant?.name || event.detail.value;
|
|
308
|
-
this.participants = [...this.participants];
|
|
309
|
-
this.updateFormValue();
|
|
310
|
-
}
|
|
311
|
-
onParticipantChange(event, index) {
|
|
312
|
-
utils.debug('nylas-additional-participants', 'onParticipantChange');
|
|
313
|
-
this.participants[index].email = event.target.value;
|
|
314
|
-
this.updateFormValue();
|
|
315
|
-
}
|
|
316
|
-
addParticipant() {
|
|
317
|
-
utils.debug('nylas-additional-participants', 'addParticipant');
|
|
318
|
-
this.participants = [...this.participants, { name: '', email: '', is_organizer: false }];
|
|
319
|
-
this.updateFormValue();
|
|
320
|
-
}
|
|
321
|
-
removeParticipant(index) {
|
|
322
|
-
utils.debug('nylas-additional-participants', 'removeParticipant');
|
|
323
|
-
this.participants = this.participants.filter((_, i) => i !== index);
|
|
324
|
-
this.updateFormValue();
|
|
325
|
-
}
|
|
326
|
-
validate(email, index) {
|
|
327
|
-
utils.debug('nylas-additional-participants', 'validate');
|
|
328
|
-
const regex = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
|
329
|
-
const valid = regex.test(String(email).toLowerCase());
|
|
330
|
-
this.participants[index].is_valid = valid;
|
|
331
|
-
this.updateFormValue();
|
|
332
|
-
}
|
|
333
|
-
updateFormValue() {
|
|
334
|
-
utils.debug('nylas-additional-participants', 'updateFormValue');
|
|
335
|
-
this.internals.setFormValue(JSON.stringify(this.participants), this.name);
|
|
336
|
-
this.valueChanged.emit({ value: JSON.stringify(this.participants), name: this.name });
|
|
337
|
-
}
|
|
338
|
-
getArrayDifference(array1, array2) {
|
|
339
|
-
const filtered = array1.filter(participant1 => !array2.some(participant2 => participant1.email === participant2.email));
|
|
340
|
-
return filtered.map(participant => {
|
|
341
|
-
return { value: participant.email, label: participant.email };
|
|
342
|
-
});
|
|
343
|
-
}
|
|
344
|
-
render() {
|
|
345
|
-
return (index.h(index.Host, { key: '30915e4727e68b0652fc265ced20a3fce93f94d7' }, index.h("nylas-form-card", { key: 'e652c77a0e382aeaab234593ad1cd8fa6cc1b858' }, index.h("h3", { key: 'ee6d3ac07461ef43976e32069cd978a2dc32ba96', slot: "header-title", class: "nylas-additional-participants__title", part: "nap__title" }, "Additional participants"), index.h("p", { key: '72d712c00b839ad8220ea23cce11cfc233cf14b5', slot: "header-subtitle", class: "nylas-additional-participants__subtitle", part: "nap__subtitle" }, "Add anyone else who would be joining for this event."), index.h("div", { key: '87b08e14dc5a16b2381728263e079c46545284f4', slot: "content", class: "nylas-additional-participants__content" }, index.h("div", { key: 'da67ac11f9c977007ce885531bcdcbf9c59aca0c' }, this.participants.map((participant, index$1) => {
|
|
346
|
-
return (index.h("div", { class: 'nylas-additional-participants__input_group', part: "nap__input_group" }, index.h("label", null, participant.is_organizer ? 'Organizer' : `Participant ${index$1}`), index.h("div", { part: "nap__input_wrapper", class: `nylas-additional-participants__input_wrapper ${participant.is_organizer && 'nylas-additional-participants__input_wrapper_organizer'} ${participant.is_valid === false && 'nylas-additional-participants__input_wrapper_invalid'}` }, index.h("div", { class: { 'nylas-additional-participants__input': true, 'organizer': participant.is_organizer }, part: "nap__input" }, participant.is_organizer ? (index.h("input", { type: "text", value: participant.email, onInput: e => {
|
|
347
|
-
this.onParticipantChange(e, index$1);
|
|
348
|
-
}, readOnly: participant.is_organizer, onBlur: () => this.validate(participant.email, index$1) })) : (index.h("input-dropdown", { name: `${index$1}`, filterable: true, inputValue: participant.email, options: this.getArrayDifference(this.participantOptions || [], this.participants) })), !participant.is_organizer && (index.h("button", { onClick: () => this.removeParticipant(index$1), part: "nap__remove-participant" }, index.h("close-icon", null)))))));
|
|
349
|
-
})), index.h("button", { key: 'dd0f412f9affa5cf2b3ab5a331365d5b217e1ade', class: "nylas-additional-participants__add", part: "nap__add-participant", onClick: () => this.addParticipant() }, index.h("add-circle-icon", { key: '089167b221913ef3e0393efa23db2698a93b3e73' }), " ", index.h("span", { key: '70860b8258a871e714f2f33890d35ec46835f349' }, "Add ", this.participants.length > 1 ? 'another' : 'a', " participant"))))));
|
|
350
|
-
}
|
|
351
|
-
static get formAssociated() { return true; }
|
|
352
|
-
get host() { return index.getElement(this); }
|
|
353
|
-
static get watchers() { return {
|
|
354
|
-
"name": ["elementNameChangedHandler"]
|
|
355
|
-
}; }
|
|
356
|
-
};
|
|
357
|
-
__decorate$h([
|
|
358
|
-
registerComponent.RegisterComponent({
|
|
359
|
-
name: 'nylas-additional-participants',
|
|
360
|
-
stateToProps: new Map([['schedulerConfig.additionalParticipants', 'participantOptions']]),
|
|
361
|
-
eventToProps: {},
|
|
362
|
-
fireRegisterEvent: true,
|
|
363
|
-
}),
|
|
364
|
-
__metadata$h("design:type", Function),
|
|
365
|
-
__metadata$h("design:paramtypes", []),
|
|
366
|
-
__metadata$h("design:returntype", void 0)
|
|
367
|
-
], NylasAdditionalParticipants.prototype, "render", null);
|
|
368
|
-
NylasAdditionalParticipants.style = NylasAdditionalParticipantsStyle0;
|
|
369
|
-
|
|
370
|
-
const nylasAvailabilityPickerCss = ":host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:\"Inter\", sans-serif;width:inherit}.nylas-availability-picker{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200)}.nylas-availability-picker .header{padding:1rem}.nylas-availability-picker .header h3{margin:0;font-size:16px;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-availability-picker .header p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.nylas-availability-picker .content{padding:1rem;color:var(--nylas-base-900);font-size:16px;font-family:var(--nylas-font-family);border-top:1px solid var(--nylas-base-200)}@media screen and (max-width: 504px){.nylas-availability-picker .content{font-size:15px}}.nylas-availability-picker .content .select-timezone{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--nylas-base-200);padding-bottom:1rem;gap:1rem}.nylas-availability-picker .content .select-timezone h4{display:flex;gap:0.5rem;align-items:center;margin:0;font-size:16px;font-weight:500;line-height:20px}@media screen and (max-width: 504px){.nylas-availability-picker .content .select-timezone h4{font-size:15px}}.nylas-availability-picker .content .availability{display:flex;flex-direction:column;gap:1rem;padding:0 0.5rem;margin:1rem 0}@media screen and (max-width: 504px){.nylas-availability-picker .content .availability{gap:0.5rem;padding:0}}.nylas-availability-picker .content .availability .availability-day{display:grid;grid-template-columns:minmax(auto, 65px) 1fr minmax(auto, 40px);gap:1rem;align-items:baseline}@media screen and (max-width: 768px){.nylas-availability-picker .content .availability .availability-day{grid-template-columns:78px 1fr auto}}@media screen and (max-width: 504px){.nylas-availability-picker .content .availability .availability-day{display:inline-grid;gap:8px;grid-template-columns:60px 1fr auto}}.nylas-availability-picker .content .availability .availability-day .day{display:flex;gap:0.5rem;align-items:center}@media screen and (max-width: 504px){.nylas-availability-picker .content .availability .availability-day .day{gap:0.25rem}}.nylas-availability-picker .content .availability .availability-day .day input[type=checkbox]{transform:scale(1.3)}.nylas-availability-picker .content .availability .availability-day .time-ranges span.unavailable{height:48px;display:flex;align-items:center;justify-content:center}.nylas-availability-picker .content .availability .availability-day .time-ranges .time-range{display:flex;gap:1.5rem;justify-content:space-between;align-items:baseline}@media screen and (max-width: 504px){.nylas-availability-picker .content .availability .availability-day .time-ranges .time-range{justify-content:unset;gap:0.5rem}}.nylas-availability-picker .content .availability .availability-day .time-ranges .time-range .pickers{display:flex;gap:1rem}@media screen and (max-width: 504px){.nylas-availability-picker .content .availability .availability-day .time-ranges .time-range .pickers{gap:0.5rem}}.nylas-availability-picker .content .availability .availability-day .time-ranges .time-range .pickers span{margin-top:0.75rem}.nylas-availability-picker .content .availability .availability-day .time-ranges .time-range:not(:last-of-type){margin-bottom:1rem}.nylas-availability-picker .content .availability .availability-day .time-ranges p.error{color:var(--nylas-error)}.nylas-availability-picker .content .availability .availability-day button{border:none;background:transparent;height:40px;cursor:pointer;color:var(--nylas-base-800)}.nylas-availability-picker .content .availability .availability-day button:hover,.nylas-availability-picker .content .availability .availability-day button:active{color:var(--nylas-primary)}select-dropdown{width:auto}select-dropdown::part(sd_dropdown-button){justify-content:initial}";
|
|
371
|
-
const NylasAvailabilityPickerStyle0 = nylasAvailabilityPickerCss;
|
|
372
|
-
|
|
373
|
-
var __decorate$g = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
374
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
375
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
376
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
377
|
-
else
|
|
378
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
379
|
-
if (d = decorators[i])
|
|
380
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
381
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
382
|
-
};
|
|
383
|
-
var __metadata$g = (undefined && undefined.__metadata) || function (k, v) {
|
|
384
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
385
|
-
return Reflect.metadata(k, v);
|
|
386
|
-
};
|
|
387
|
-
const NylasAvailabilityPicker = class {
|
|
388
|
-
constructor(hostRef) {
|
|
389
|
-
index.registerInstance(this, hostRef);
|
|
390
|
-
this.valueChanged = index.createEvent(this, "valueChanged", 7);
|
|
391
|
-
if (hostRef.$hostElement$["s-ei"]) {
|
|
392
|
-
this.internals = hostRef.$hostElement$["s-ei"];
|
|
393
|
-
}
|
|
394
|
-
else {
|
|
395
|
-
this.internals = hostRef.$hostElement$.attachInternals();
|
|
396
|
-
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
397
|
-
}
|
|
398
|
-
this.selectedConfiguration = undefined;
|
|
399
|
-
this.openHours = undefined;
|
|
400
|
-
this.name = 'availability';
|
|
401
|
-
this.defaultTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
402
|
-
this.hideHeader = false;
|
|
403
|
-
this.schedule = {
|
|
404
|
-
SUN: [],
|
|
405
|
-
MON: [{ start: '09:00am', end: '05:00pm' }],
|
|
406
|
-
TUE: [{ start: '09:00am', end: '05:00pm' }],
|
|
407
|
-
WED: [{ start: '09:00am', end: '05:00pm' }],
|
|
408
|
-
THU: [{ start: '09:00am', end: '05:00pm' }],
|
|
409
|
-
FRI: [{ start: '09:00am', end: '05:00pm' }],
|
|
410
|
-
SAT: [],
|
|
411
|
-
};
|
|
412
|
-
this.timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
413
|
-
this.overlapDays = {};
|
|
414
|
-
}
|
|
415
|
-
elementNameChangedHandler(newValue) {
|
|
416
|
-
utils.debug('nylas-calendar-picker', 'elementNameChangedHandler', newValue);
|
|
417
|
-
this.host.setAttribute('name', newValue);
|
|
418
|
-
}
|
|
419
|
-
configChangedHandler(newConfig) {
|
|
420
|
-
const defaultOpenHours = newConfig?.availability?.availability_rules?.default_open_hours;
|
|
421
|
-
if (defaultOpenHours) {
|
|
422
|
-
this.openHoursToSchedule(defaultOpenHours);
|
|
423
|
-
}
|
|
424
|
-
}
|
|
425
|
-
scheduleChanged(newValue, oldValue) {
|
|
426
|
-
if (newValue !== oldValue) {
|
|
427
|
-
let overlapDays = {};
|
|
428
|
-
Object.keys(newValue).forEach(key => {
|
|
429
|
-
const dayTimeRanges = newValue[key];
|
|
430
|
-
if (dayTimeRanges.length > 0) {
|
|
431
|
-
const overlaps = this.getOverlaps(dayTimeRanges);
|
|
432
|
-
if (overlaps.length > 0) {
|
|
433
|
-
overlapDays[key] = overlaps;
|
|
434
|
-
}
|
|
435
|
-
}
|
|
436
|
-
});
|
|
437
|
-
this.overlapDays = overlapDays;
|
|
438
|
-
if (typeof this.internals.setFormValue !== 'function') {
|
|
439
|
-
return;
|
|
440
|
-
}
|
|
441
|
-
if (Object.keys(overlapDays).length > 0) {
|
|
442
|
-
const element = this.host.shadowRoot?.getElementById(Object.keys(overlapDays)[0]);
|
|
443
|
-
if (element) {
|
|
444
|
-
utils.debug('nylas-availability-picker', 'The time ranges are overlapping. Overlap: ', overlapDays);
|
|
445
|
-
this.internals.setValidity({ customError: true }, 'Overlapping time ranges found', element);
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
else {
|
|
449
|
-
this.internals.setValidity({ customError: false });
|
|
450
|
-
this.internals.setFormValue(JSON.stringify({
|
|
451
|
-
openHours: this.scheduleToOpenHours(this.schedule),
|
|
452
|
-
timezone: this.timezone,
|
|
453
|
-
}));
|
|
454
|
-
}
|
|
455
|
-
this.valueChanged.emit({
|
|
456
|
-
value: JSON.stringify({
|
|
457
|
-
openHours: this.scheduleToOpenHours(newValue),
|
|
458
|
-
timezone: this.timezone,
|
|
459
|
-
}),
|
|
460
|
-
name: this.name,
|
|
461
|
-
});
|
|
462
|
-
}
|
|
463
|
-
}
|
|
464
|
-
nylasFormDropdownChangedHandler(event) {
|
|
465
|
-
const { name, value } = event.detail;
|
|
466
|
-
if (name === 'timezone') {
|
|
467
|
-
this.timezone = value;
|
|
468
|
-
if (typeof this.internals.setFormValue !== 'function') {
|
|
469
|
-
return;
|
|
470
|
-
}
|
|
471
|
-
const updateValue = {
|
|
472
|
-
openHours: this.scheduleToOpenHours(this.schedule),
|
|
473
|
-
timezone: this.timezone,
|
|
474
|
-
};
|
|
475
|
-
this.internals.setFormValue(JSON.stringify(updateValue));
|
|
476
|
-
this.valueChanged.emit({
|
|
477
|
-
value: JSON.stringify(updateValue),
|
|
478
|
-
name: this.name,
|
|
479
|
-
});
|
|
480
|
-
}
|
|
481
|
-
}
|
|
482
|
-
connectedCallback() {
|
|
483
|
-
utils.debug('nylas-availability-picker', 'connectedCallback');
|
|
484
|
-
}
|
|
485
|
-
disconnectedCallback() {
|
|
486
|
-
utils.debug('nylas-availability-picker', 'disconnectedCallback');
|
|
487
|
-
}
|
|
488
|
-
componentWillLoad() {
|
|
489
|
-
utils.debug('nylas-availability-picker', 'componentWillLoad');
|
|
490
|
-
this.host.setAttribute('name', this.name);
|
|
491
|
-
}
|
|
492
|
-
componentDidLoad() {
|
|
493
|
-
utils.debug('nylas-availability-picker', 'componentDidLoad');
|
|
494
|
-
if (this.openHours && this.openHours.length > 0) {
|
|
495
|
-
this.openHoursToSchedule(this.openHours);
|
|
496
|
-
}
|
|
497
|
-
if (typeof this.internals.setFormValue !== 'function') {
|
|
498
|
-
return;
|
|
499
|
-
}
|
|
500
|
-
const updateValue = {
|
|
501
|
-
openHours: this.scheduleToOpenHours(this.schedule),
|
|
502
|
-
timezone: this.timezone,
|
|
503
|
-
};
|
|
504
|
-
this.internals.setFormValue(JSON.stringify(updateValue));
|
|
505
|
-
this.valueChanged.emit({
|
|
506
|
-
value: JSON.stringify(updateValue),
|
|
507
|
-
name: this.name,
|
|
508
|
-
});
|
|
509
|
-
}
|
|
510
|
-
getOverlaps(timeRanges) {
|
|
511
|
-
let timeRangesInMinutes = timeRanges.map((range, index) => ({
|
|
512
|
-
start: utils.timeToMinutes(range.start),
|
|
513
|
-
end: utils.timeToMinutes(range.end),
|
|
514
|
-
originalIndex: index,
|
|
515
|
-
}));
|
|
516
|
-
timeRangesInMinutes.sort((a, b) => a.start - b.start);
|
|
517
|
-
let overlaps = [];
|
|
518
|
-
for (let i = 1; i < timeRangesInMinutes.length; i++) {
|
|
519
|
-
if (timeRangesInMinutes[i].start < timeRangesInMinutes[i - 1].end) {
|
|
520
|
-
if (!overlaps.includes(timeRangesInMinutes[i].originalIndex)) {
|
|
521
|
-
overlaps.push(timeRangesInMinutes[i].originalIndex);
|
|
522
|
-
}
|
|
523
|
-
if (!overlaps.includes(timeRangesInMinutes[i - 1].originalIndex)) {
|
|
524
|
-
overlaps.push(timeRangesInMinutes[i - 1].originalIndex);
|
|
525
|
-
}
|
|
526
|
-
}
|
|
527
|
-
}
|
|
528
|
-
return overlaps.sort((a, b) => a - b);
|
|
529
|
-
}
|
|
530
|
-
addTimeRange(day) {
|
|
531
|
-
const currentTimeRanges = this.schedule[day];
|
|
532
|
-
const dayStart = 0;
|
|
533
|
-
const dayEnd = 1425;
|
|
534
|
-
if (currentTimeRanges.length === 0) {
|
|
535
|
-
this.schedule[day] = [{ start: '09:00am', end: '05:00pm' }];
|
|
536
|
-
}
|
|
537
|
-
else {
|
|
538
|
-
const timeRangesInMinutes = currentTimeRanges
|
|
539
|
-
.map(range => ({
|
|
540
|
-
start: utils.timeToMinutes(range.start),
|
|
541
|
-
end: utils.timeToMinutes(range.end),
|
|
542
|
-
}))
|
|
543
|
-
.sort((a, b) => a.start - b.start);
|
|
544
|
-
const lastRangeEnd = timeRangesInMinutes[timeRangesInMinutes.length - 1].end;
|
|
545
|
-
if (lastRangeEnd + 60 <= dayEnd) {
|
|
546
|
-
this.schedule[day].push({
|
|
547
|
-
start: utils.convertTo12HourFormat(utils.minutesToTime(lastRangeEnd)),
|
|
548
|
-
end: utils.convertTo12HourFormat(utils.minutesToTime(lastRangeEnd + 60)),
|
|
549
|
-
});
|
|
550
|
-
}
|
|
551
|
-
else {
|
|
552
|
-
let gapFound = false;
|
|
553
|
-
if (timeRangesInMinutes[0].start > dayStart + 60) {
|
|
554
|
-
this.schedule[day].push({
|
|
555
|
-
start: utils.convertTo12HourFormat(utils.minutesToTime(dayStart)),
|
|
556
|
-
end: utils.convertTo12HourFormat(utils.minutesToTime(dayStart + 60)),
|
|
557
|
-
});
|
|
558
|
-
gapFound = true;
|
|
559
|
-
}
|
|
560
|
-
if (!gapFound) {
|
|
561
|
-
for (let i = 0; i < timeRangesInMinutes.length - 1; i++) {
|
|
562
|
-
const currentEnd = timeRangesInMinutes[i].end;
|
|
563
|
-
const nextStart = timeRangesInMinutes[i + 1].start;
|
|
564
|
-
if (nextStart - currentEnd >= 60) {
|
|
565
|
-
this.schedule[day].push({
|
|
566
|
-
start: utils.convertTo12HourFormat(utils.minutesToTime(currentEnd)),
|
|
567
|
-
end: utils.convertTo12HourFormat(utils.minutesToTime(currentEnd + 60)),
|
|
568
|
-
});
|
|
569
|
-
break;
|
|
570
|
-
}
|
|
571
|
-
}
|
|
572
|
-
}
|
|
573
|
-
}
|
|
574
|
-
}
|
|
575
|
-
this.schedule[day].sort((a, b) => utils.timeToMinutes(a.start) - utils.timeToMinutes(b.start));
|
|
576
|
-
this.schedule = { ...this.schedule };
|
|
577
|
-
}
|
|
578
|
-
removeTimeRange(day, index) {
|
|
579
|
-
this.schedule[day].splice(index, 1);
|
|
580
|
-
this.schedule = { ...this.schedule };
|
|
581
|
-
}
|
|
582
|
-
setTime(event) {
|
|
583
|
-
const { key, value } = event.detail;
|
|
584
|
-
const [dayIndex, timeType] = key.split('_');
|
|
585
|
-
const [day, index] = dayIndex.split(':');
|
|
586
|
-
if (timeType === 'start') {
|
|
587
|
-
this.schedule[day][index].start = value;
|
|
588
|
-
}
|
|
589
|
-
else if (timeType === 'end') {
|
|
590
|
-
this.schedule[day][index].end = value;
|
|
591
|
-
}
|
|
592
|
-
this.internals.setValidity({ customError: false });
|
|
593
|
-
this.schedule = { ...this.schedule };
|
|
594
|
-
}
|
|
595
|
-
setFormError(event) {
|
|
596
|
-
const { key } = event.detail;
|
|
597
|
-
const [_, timeType] = key.split('_');
|
|
598
|
-
const element = this.host.shadowRoot?.getElementById(key);
|
|
599
|
-
if (element) {
|
|
600
|
-
this.internals.setValidity({ customError: true }, `Invalid ${timeType} time`, element);
|
|
601
|
-
}
|
|
602
|
-
}
|
|
603
|
-
openHoursToSchedule(openHours) {
|
|
604
|
-
const newSchedule = {
|
|
605
|
-
SUN: [],
|
|
606
|
-
MON: [],
|
|
607
|
-
TUE: [],
|
|
608
|
-
WED: [],
|
|
609
|
-
THU: [],
|
|
610
|
-
FRI: [],
|
|
611
|
-
SAT: [],
|
|
612
|
-
};
|
|
613
|
-
openHours.forEach(openHour => {
|
|
614
|
-
openHour.days.forEach(day => {
|
|
615
|
-
const dayKey = this.getDayKey(day);
|
|
616
|
-
const start12hr = utils.convertTo12HourFormat(openHour.start);
|
|
617
|
-
const end12hr = utils.convertTo12HourFormat(openHour.end);
|
|
618
|
-
const timeRange = { start: start12hr, end: end12hr };
|
|
619
|
-
let timeRangeExists = false;
|
|
620
|
-
if (newSchedule[dayKey]) {
|
|
621
|
-
timeRangeExists = newSchedule[dayKey].some(range => range.start === timeRange.start && range.end === timeRange.end);
|
|
622
|
-
}
|
|
623
|
-
if (!timeRangeExists) {
|
|
624
|
-
if (newSchedule[dayKey]) {
|
|
625
|
-
newSchedule[dayKey].push(timeRange);
|
|
626
|
-
}
|
|
627
|
-
else {
|
|
628
|
-
newSchedule[dayKey] = [timeRange];
|
|
629
|
-
}
|
|
630
|
-
}
|
|
631
|
-
});
|
|
632
|
-
});
|
|
633
|
-
this.timezone = this.defaultTimezone;
|
|
634
|
-
this.schedule = newSchedule;
|
|
635
|
-
}
|
|
636
|
-
getDayKey(dayIndex) {
|
|
637
|
-
const days = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT'];
|
|
638
|
-
return days[dayIndex];
|
|
639
|
-
}
|
|
640
|
-
scheduleToOpenHours(schedule) {
|
|
641
|
-
const dayKeys = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT'];
|
|
642
|
-
let openHoursMap = new Map();
|
|
643
|
-
dayKeys.forEach((dayKey, index) => {
|
|
644
|
-
if (schedule[dayKey]) {
|
|
645
|
-
schedule[dayKey].forEach(timeRange => {
|
|
646
|
-
const start24hr = utils.convertTo24HourFormat(timeRange.start);
|
|
647
|
-
const end24hr = utils.convertTo24HourFormat(timeRange.end);
|
|
648
|
-
const key = `${start24hr}-${end24hr}`;
|
|
649
|
-
if (!openHoursMap.has(key)) {
|
|
650
|
-
openHoursMap.set(key, { days: [index], start: start24hr, end: end24hr });
|
|
651
|
-
}
|
|
652
|
-
else {
|
|
653
|
-
let entry = openHoursMap.get(key);
|
|
654
|
-
if (entry) {
|
|
655
|
-
entry.days.push(index);
|
|
656
|
-
openHoursMap.set(key, entry);
|
|
657
|
-
}
|
|
658
|
-
}
|
|
659
|
-
});
|
|
660
|
-
}
|
|
661
|
-
});
|
|
662
|
-
let selectedOpenHours = [];
|
|
663
|
-
openHoursMap.forEach((value, _key) => {
|
|
664
|
-
selectedOpenHours.push({
|
|
665
|
-
days: value.days,
|
|
666
|
-
start: value.start,
|
|
667
|
-
end: value.end,
|
|
668
|
-
timezone: this.timezone,
|
|
669
|
-
});
|
|
670
|
-
});
|
|
671
|
-
return selectedOpenHours;
|
|
672
|
-
}
|
|
673
|
-
render() {
|
|
674
|
-
const timezoneOptions = Object.keys(constants.TIMEZONE_MAP).map(key => ({
|
|
675
|
-
label: constants.TIMEZONE_MAP[key],
|
|
676
|
-
value: key,
|
|
677
|
-
}));
|
|
678
|
-
return (index.h(index.Host, { key: 'bb0a4148b2d9728d7a2a9fdab8359382dd1ae5d5' }, index.h("div", { key: '27c5e85931d318e6ec66a155faa78e021b570f70', class: "nylas-availability-picker", part: "nap" }, !this.hideHeader && (index.h("div", { class: "header", part: "nap__header" }, index.h("h3", null, "General availability"), index.h("p", null, "Set your availability for scheduling meetings."))), index.h("div", { key: 'f2b3434dc127fc19fe6fe915cdc5f4a9d12ba6e7', class: "content" }, index.h("div", { key: 'bd75cb0749168b32c6366aea6f4df5920d098ec7', class: "select-timezone", part: "nap__select-timezone" }, index.h("h4", { key: '0c74924a291afaa07ff5b06781720a8cbadeea4d', class: "sub-header" }, "Select timezone", index.h("span", { key: '64933b3f6623f2d0b13559406db3d14afa99e0b6', class: "icon" }, index.h("tooltip-component", { key: '09c42633826e0ad358b4877f7d48bb70ce7ca518' }, index.h("info-icon", { key: '9ea9340b193710d759e71081e59ad6ccf762e4a8', slot: "tooltip-icon" }), index.h("span", { key: '83e596171dc8fb74543b21e957855f9cd32423b1', slot: "tooltip-content" }, "Select your timezone for displaying availability.")))), index.h("select-dropdown", { key: 'd65b32234b1669a5e7bef4b88024f50548011b98', name: "timezone", exportparts: "sd_dropdown: nap__timezone-container, sd_dropdown-button: nap__timezone-button, sd_dropdown-content: nap__timezone-dropdown-content", options: timezoneOptions, defaultSelectedOption: timezoneOptions.find(i => i.value === this.defaultTimezone) }, index.h("span", { key: '3387e2d39b7a052557d7668d5a7822fda1440da7', slot: "select-icon" }, index.h("globe-icon", { key: 'e92459b2ce063e199d8685f5a422a88e7a50fbd6', width: "20", height: "20" })))), index.h("div", { key: 'd510d9538189898f52e56388d661158e243fc8dd', class: "availability", part: "nap__availability" }, Object.keys(this.schedule).map(key => {
|
|
679
|
-
const day = key;
|
|
680
|
-
const timeRanges = this.schedule[key];
|
|
681
|
-
return (index.h("div", { class: "availability-day" }, index.h("div", { class: "day", part: "nap__day" }, index.h("input", { type: "checkbox", name: day, id: day, checked: timeRanges.length > 0, onClick: () => {
|
|
682
|
-
if (timeRanges.length > 0) {
|
|
683
|
-
this.schedule[day] = [];
|
|
684
|
-
}
|
|
685
|
-
else {
|
|
686
|
-
this.schedule[day] = [{ start: '09:00am', end: '05:00pm' }];
|
|
687
|
-
}
|
|
688
|
-
this.schedule = { ...this.schedule };
|
|
689
|
-
} }), index.h("label", { htmlFor: day, "aria-label": "Select day" }, day)), index.h("div", { class: "time-ranges", part: "nap__time-ranges" }, timeRanges.length ? null : index.h("span", { class: "unavailable" }, "Unavailable"), timeRanges.length > 0 &&
|
|
690
|
-
timeRanges.map((timeRange, timeRangeIndex) => {
|
|
691
|
-
const startKey = `${key}:${timeRangeIndex}_start`;
|
|
692
|
-
const endKey = `${key}:${timeRangeIndex}_end`;
|
|
693
|
-
return (index.h("div", { class: "time-range", part: "nap__time-range" }, index.h("div", { class: "pickers" }, index.h("nylas-time-window-picker", { id: startKey, hasError: this.overlapDays[day]?.includes(timeRangeIndex), time: timeRange.start, name: startKey, key: startKey, exportparts: "time-picker: nap__time-picker-container, time-input: nap__time-picker-input, times: nap__time-picker-times" }), index.h("span", null, " - "), index.h("nylas-time-window-picker", { id: endKey, hasError: this.overlapDays[day]?.includes(timeRangeIndex), time: timeRange.end, name: endKey, key: endKey, minimumStartTime: timeRange.start, exportparts: "time-picker: nap__time-picker-container, time-input: nap__time-picker-input, times: nap__time-picker-times" })), index.h("button", { onClick: () => this.removeTimeRange(day, timeRangeIndex) }, index.h("close-icon", null))));
|
|
694
|
-
}), index.h("p", { class: "error" }, this.overlapDays[day] ? 'Overlapping time ranges' : '')), index.h("div", null, timeRanges.length > 0 ? (index.h("button", { onClick: () => this.addTimeRange(day), part: "nap__add-time-range" }, index.h("add-circle-icon", null))) : null)));
|
|
695
|
-
}))))));
|
|
696
|
-
}
|
|
697
|
-
static get formAssociated() { return true; }
|
|
698
|
-
get host() { return index.getElement(this); }
|
|
699
|
-
static get watchers() { return {
|
|
700
|
-
"name": ["elementNameChangedHandler"],
|
|
701
|
-
"selectedConfiguration": ["configChangedHandler"],
|
|
702
|
-
"schedule": ["scheduleChanged"]
|
|
703
|
-
}; }
|
|
704
|
-
};
|
|
705
|
-
__decorate$g([
|
|
706
|
-
registerComponent.RegisterComponent({
|
|
707
|
-
name: 'nylas-availability-picker',
|
|
708
|
-
stateToProps: new Map([['schedulerConfig.selectedConfiguration', 'selectedConfiguration']]),
|
|
709
|
-
fireRegisterEvent: true,
|
|
710
|
-
}),
|
|
711
|
-
__metadata$g("design:type", Function),
|
|
712
|
-
__metadata$g("design:paramtypes", []),
|
|
713
|
-
__metadata$g("design:returntype", void 0)
|
|
714
|
-
], NylasAvailabilityPicker.prototype, "render", null);
|
|
715
|
-
NylasAvailabilityPicker.style = NylasAvailabilityPickerStyle0;
|
|
716
|
-
|
|
717
|
-
const nylasBookingCalendarPickerCss = ":host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:\"Inter\", sans-serif;width:inherit}.nylas-booking-calendar-picker{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200)}.nylas-booking-calendar-picker .header{padding:1rem;border-bottom:1px solid var(--nylas-base-200)}.nylas-booking-calendar-picker .header h3{margin:0;font-size:1rem;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-booking-calendar-picker .header p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__loading{padding-bottom:1rem;display:flex;flex-direction:column;gap:4px}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__loading .label{display:flex;align-items:center;gap:0.5rem;margin:1rem 1rem 0;color:var(--nylas-base-800)}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__loading .loading-button{margin:0 1rem;padding:0;width:inherit;height:48px;color:black;font-size:1rem;cursor:not-allowed;display:flex;gap:0.5rem;justify-content:space-between;align-items:center;background:transparent;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__loading .loading-button span{padding:0 1rem}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__dropdown{padding:1rem;display:flex;flex-direction:column;gap:4px}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__dropdown span.label{display:flex;align-items:center;gap:4px;color:var(--nylas-base-800)}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__dropdown span.label tooltip-component{display:flex}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__dropdown select-dropdown::part(sd_dropdown){width:100%}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__dropdown select-dropdown::part(sd_dropdown-content){width:100%;max-width:unset}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__dropdown select-dropdown::part(sd_dropdown-button){width:100%;display:flex;justify-content:space-between;align-items:center;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__dropdown select-dropdown::part(sd_dropdown-button-selected-label){max-width:calc(100% - 2rem);font-family:var(--nylas-font-family);font-size:16px;line-height:24px}";
|
|
718
|
-
const NylasBookingCalendarPickerStyle0 = nylasBookingCalendarPickerCss;
|
|
719
|
-
|
|
720
|
-
var __decorate$f = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
721
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
722
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
723
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
724
|
-
else
|
|
725
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
726
|
-
if (d = decorators[i])
|
|
727
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
728
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
729
|
-
};
|
|
730
|
-
var __metadata$f = (undefined && undefined.__metadata) || function (k, v) {
|
|
731
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
732
|
-
return Reflect.metadata(k, v);
|
|
733
|
-
};
|
|
734
|
-
const NylasBookingCalendarPicker = class {
|
|
735
|
-
constructor(hostRef) {
|
|
736
|
-
index.registerInstance(this, hostRef);
|
|
737
|
-
this.valueChanged = index.createEvent(this, "valueChanged", 7);
|
|
738
|
-
if (hostRef.$hostElement$["s-ei"]) {
|
|
739
|
-
this.internals = hostRef.$hostElement$["s-ei"];
|
|
740
|
-
}
|
|
741
|
-
else {
|
|
742
|
-
this.internals = hostRef.$hostElement$.attachInternals();
|
|
743
|
-
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
744
|
-
}
|
|
745
|
-
this.calendars = undefined;
|
|
746
|
-
this.currentUser = undefined;
|
|
747
|
-
this.name = 'booking-calendar';
|
|
748
|
-
this.defaultBookingCalendar = '';
|
|
749
|
-
this.selectedCalendar = '';
|
|
750
|
-
}
|
|
751
|
-
connectedCallback() {
|
|
752
|
-
utils.debug('nylas-booking-calendar-picker', 'connectedCallback');
|
|
753
|
-
}
|
|
754
|
-
disconnectedCallback() {
|
|
755
|
-
utils.debug('nylas-booking-calendar-picker', 'disconnectedCallback');
|
|
756
|
-
}
|
|
757
|
-
componentWillLoad() {
|
|
758
|
-
utils.debug('nylas-booking-calendar-picker', 'componentWillLoad');
|
|
759
|
-
this.host.setAttribute('name', this.name);
|
|
760
|
-
}
|
|
761
|
-
componentDidLoad() {
|
|
762
|
-
utils.debug('nylas-booking-calendar-picker', 'componentDidLoad');
|
|
763
|
-
this.defaultBookingCalendar = this.defaultBookingCalendar || this.currentUser?.email || '';
|
|
764
|
-
if (typeof this.internals.setFormValue === 'function') {
|
|
765
|
-
this.internals.setFormValue(this.defaultBookingCalendar.toString(), 'booking-calendar');
|
|
766
|
-
}
|
|
767
|
-
this.selectedCalendar = this.defaultBookingCalendar || this.currentUser?.email || '';
|
|
768
|
-
}
|
|
769
|
-
componentWillUpdate() {
|
|
770
|
-
utils.debug('nylas-booking-calendar-picker', 'componentWillUpdate');
|
|
771
|
-
}
|
|
772
|
-
componentDidUpdate() {
|
|
773
|
-
utils.debug('nylas-booking-calendar-picker', 'componentDidUpdate');
|
|
774
|
-
}
|
|
775
|
-
componentWillRender() {
|
|
776
|
-
utils.debug('nylas-booking-calendar-picker', 'componentWillRender');
|
|
777
|
-
}
|
|
778
|
-
componentDidRender() {
|
|
779
|
-
utils.debug('nylas-booking-calendar-picker', 'componentDidRender');
|
|
780
|
-
}
|
|
781
|
-
elementNameChangedHandler(newValue) {
|
|
782
|
-
utils.debug('nylas-booking-calendar-picker', 'elementNameChangedHandler', newValue);
|
|
783
|
-
this.host.setAttribute('name', newValue);
|
|
784
|
-
}
|
|
785
|
-
nylasFormDropdownChangedHandler(event) {
|
|
786
|
-
utils.debug('nylas-booking-calendar-picker', 'nylasFormDropdownChangedHandler', event.detail);
|
|
787
|
-
const valueChanged = (event) => {
|
|
788
|
-
const { value } = event.detail;
|
|
789
|
-
this.selectedCalendar = value;
|
|
790
|
-
this.internals.setFormValue(value.toString(), this.name);
|
|
791
|
-
};
|
|
792
|
-
this.valueChanged.emit({ value: event.detail.value, name: this.name, valueChanged });
|
|
793
|
-
}
|
|
794
|
-
render() {
|
|
795
|
-
const calendarOptions = this.calendars?.map(calendar => {
|
|
796
|
-
return {
|
|
797
|
-
value: calendar.id,
|
|
798
|
-
label: calendar.name,
|
|
799
|
-
};
|
|
800
|
-
}) ?? [];
|
|
801
|
-
return (index.h(index.Host, null, index.h("div", { class: "nylas-booking-calendar-picker", part: "nbcp" }, index.h("div", { class: "header", part: "nbcp__header" }, index.h("h3", null, "Calendar booking"), index.h("p", null, "Choose calendar where you\u2019d like the event bookings to show up.")), calendarOptions.length > 0 ? (index.h("div", { class: "nylas-booking-calendar-picker__dropdown" }, index.h("span", { class: "label", part: "nbcp__input-label" }, "Select a calendar to book meetings on", index.h("tooltip-component", null, index.h("info-icon", { slot: "tooltip-icon" }), index.h("span", { slot: "tooltip-content" }, "Check availability across one or multiple calendars. If multiple calendars are selected, you must be available across all of them to be considered available."))), index.h("select-dropdown", { name: "booking-calendar", options: calendarOptions, withSearch: false, exportparts: "sd_dropdown: nbcp__dropdown, sd_dropdown-button: nbcp__dropdown-button, sd_dropdown-content: nbcp__dropdown-content", defaultSelectedOption: calendarOptions.find(cal => cal.value == this.defaultBookingCalendar) ?? calendarOptions[0] }))) : (index.h("div", { class: "nylas-booking-calendar-picker__loading" }, index.h("span", { class: "label" }, "Select a calendar to book meetings on ", index.h("info-icon", null)), index.h("div", { class: "loading-button" }, index.h("span", null, "Loading...")))))));
|
|
802
|
-
}
|
|
803
|
-
static get formAssociated() { return true; }
|
|
804
|
-
get host() { return index.getElement(this); }
|
|
805
|
-
static get watchers() { return {
|
|
806
|
-
"name": ["elementNameChangedHandler"]
|
|
807
|
-
}; }
|
|
808
|
-
};
|
|
809
|
-
__decorate$f([
|
|
810
|
-
registerComponent.RegisterComponent({
|
|
811
|
-
name: 'nylas-booking-calendar-picker',
|
|
812
|
-
stateToProps: new Map([
|
|
813
|
-
['schedulerConfig.calendars', 'calendars'],
|
|
814
|
-
['schedulerConfig.currentUser', 'currentUser'],
|
|
815
|
-
]),
|
|
816
|
-
eventToProps: {
|
|
817
|
-
valueChanged: async (event, _nylasSchedulerConfigConnector) => {
|
|
818
|
-
const { valueChanged } = event.detail;
|
|
819
|
-
if (valueChanged) {
|
|
820
|
-
valueChanged(event);
|
|
821
|
-
}
|
|
822
|
-
},
|
|
823
|
-
},
|
|
824
|
-
fireRegisterEvent: true,
|
|
825
|
-
}),
|
|
826
|
-
__metadata$f("design:type", Function),
|
|
827
|
-
__metadata$f("design:paramtypes", []),
|
|
828
|
-
__metadata$f("design:returntype", void 0)
|
|
829
|
-
], NylasBookingCalendarPicker.prototype, "render", null);
|
|
830
|
-
NylasBookingCalendarPicker.style = NylasBookingCalendarPickerStyle0;
|
|
831
|
-
|
|
832
|
-
const nylasBufferTimeCss = ":host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:\"Inter\", sans-serif;width:inherit}.nylas-buffer-time{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200);text-align:left}.nylas-buffer-time .header{padding:1rem;border-bottom:1px solid var(--nylas-base-200)}.nylas-buffer-time .header h3{margin:0;font-size:1rem;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-buffer-time .header p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.nylas-buffer-time .nylas-buffer-time__body{display:grid;grid-template-columns:1fr auto}@media screen and (max-width: 768px){.nylas-buffer-time .nylas-buffer-time__body{grid-template-columns:1fr}}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__dropdown{padding:1rem;display:flex;flex-direction:column;gap:1rem;border-right:1px solid var(--nylas-base-200);color:var(--nylas-base-800)}@media screen and (max-width: 768px){.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__dropdown{border:none}}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__dropdown .nylas-buffer-time__row{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:1rem}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__dropdown .nylas-buffer-time__row label{width:200px}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__dropdown .nylas-buffer-time__row .dropdown-container{display:flex;gap:1rem;align-items:center;justify-content:flex-end}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview{width:208px;background:var(--nylas-base-25);border-bottom-right-radius:var(--nylas-border-radius-2x)}@media screen and (max-width: 768px){.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview{width:inherit;border-bottom-left-radius:var(--nylas-border-radius-2x)}}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview h4{font-size:14px;line-height:24px;color:var(--nylas-base-600);font-family:var(--nylas-font-family);font-weight:500;text-align:center;margin:0.75rem 0}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview .preview-container{padding:0 2rem 1rem}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview .preview-container .slot{background-color:transparent;border-top:1px solid var(--nylas-base-300)}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview .preview-container .slot.active{background-color:var(--nylas-base-100)}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview .preview-container .slot:last-of-type{border-bottom:1px solid var(--nylas-base-300)}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview .preview-container .event-slot{background-color:var(--nylas-base-600);border-top:1px solid var(--nylas-base-300)}.nylas-buffer-time .nylas-buffer-time__dropdown select-dropdown::part(sd_dropdown-button){width:104px;display:flex;justify-content:space-between;align-items:center;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);padding:1rem}.nylas-buffer-time .nylas-buffer-time__dropdown select-dropdown::part(sd_dropdown-content){width:100%}.nylas-buffer-time .nylas-buffer-time__dropdown select-dropdown::part(sd_dropdown-button-selected-label){max-width:calc(100% - 2rem);font-family:var(--nylas-font-family);font-size:16px;line-height:24px}";
|
|
833
|
-
const NylasBufferTimeStyle0 = nylasBufferTimeCss;
|
|
834
|
-
|
|
835
|
-
var __decorate$e = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
836
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
837
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
838
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
839
|
-
else
|
|
840
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
841
|
-
if (d = decorators[i])
|
|
842
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
843
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
844
|
-
};
|
|
845
|
-
var __metadata$e = (undefined && undefined.__metadata) || function (k, v) {
|
|
846
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
847
|
-
return Reflect.metadata(k, v);
|
|
848
|
-
};
|
|
849
|
-
const NylasBufferTime = class {
|
|
850
|
-
constructor(hostRef) {
|
|
851
|
-
index.registerInstance(this, hostRef);
|
|
852
|
-
this.valueChanged = index.createEvent(this, "valueChanged", 7);
|
|
853
|
-
if (hostRef.$hostElement$["s-ei"]) {
|
|
854
|
-
this.internals = hostRef.$hostElement$["s-ei"];
|
|
855
|
-
}
|
|
856
|
-
else {
|
|
857
|
-
this.internals = hostRef.$hostElement$.attachInternals();
|
|
858
|
-
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
859
|
-
}
|
|
860
|
-
this.name = 'buffer-time';
|
|
861
|
-
this.buffer = { before: 0, after: 0 };
|
|
862
|
-
this.selectedBeforeBufferTime = this.buffer.before;
|
|
863
|
-
this.selectedAfterBufferTime = this.buffer.after;
|
|
864
|
-
}
|
|
865
|
-
connectedCallback() {
|
|
866
|
-
utils.debug('nylas-buffer-time', 'connectedCallback');
|
|
867
|
-
}
|
|
868
|
-
disconnectedCallback() {
|
|
869
|
-
utils.debug('nylas-buffer-time', 'disconnectedCallback');
|
|
870
|
-
}
|
|
871
|
-
componentWillLoad() {
|
|
872
|
-
utils.debug('nylas-buffer-time', 'componentWillLoad');
|
|
873
|
-
this.host.setAttribute('name', this.name);
|
|
874
|
-
}
|
|
875
|
-
componentDidLoad() {
|
|
876
|
-
utils.debug('nylas-buffer-time', 'componentDidLoad');
|
|
877
|
-
if (typeof this.internals.setFormValue === 'function') {
|
|
878
|
-
const bufferTime = {
|
|
879
|
-
before: this.selectedBeforeBufferTime,
|
|
880
|
-
after: this.selectedAfterBufferTime,
|
|
881
|
-
};
|
|
882
|
-
this.internals.setFormValue(JSON.stringify(bufferTime), this.name);
|
|
883
|
-
}
|
|
884
|
-
this.selectedAfterBufferTime = this.buffer.after;
|
|
885
|
-
this.selectedBeforeBufferTime = this.buffer.before;
|
|
886
|
-
}
|
|
887
|
-
componentWillUpdate() {
|
|
888
|
-
utils.debug('nylas-buffer-time', 'componentWillUpdate');
|
|
889
|
-
}
|
|
890
|
-
componentDidUpdate() {
|
|
891
|
-
utils.debug('nylas-buffer-time', 'componentDidUpdate');
|
|
892
|
-
}
|
|
893
|
-
componentWillRender() {
|
|
894
|
-
utils.debug('nylas-buffer-time', 'componentWillRender');
|
|
895
|
-
}
|
|
896
|
-
componentDidRender() {
|
|
897
|
-
utils.debug('nylas-buffer-time', 'componentDidRender');
|
|
898
|
-
}
|
|
899
|
-
elementNameChangedHandler(newValue) {
|
|
900
|
-
utils.debug('nylas-buffer-time', 'elementNameChangedHandler', newValue);
|
|
901
|
-
this.host.setAttribute('name', newValue);
|
|
902
|
-
}
|
|
903
|
-
nylasFormDropdownChangedHandler(event) {
|
|
904
|
-
utils.debug('nylas-buffer-time', 'nylasFormDropdownChangedHandler', event.detail);
|
|
905
|
-
const valueChanged = (event) => {
|
|
906
|
-
const { value, name } = event.detail;
|
|
907
|
-
if (name === 'before-buffer-time') {
|
|
908
|
-
this.selectedBeforeBufferTime = parseInt(value);
|
|
909
|
-
}
|
|
910
|
-
else if (name === 'after-buffer-time') {
|
|
911
|
-
this.selectedAfterBufferTime = parseInt(value);
|
|
912
|
-
}
|
|
913
|
-
const bufferTime = {
|
|
914
|
-
before: this.selectedBeforeBufferTime,
|
|
915
|
-
after: this.selectedAfterBufferTime,
|
|
916
|
-
};
|
|
917
|
-
this.internals.setFormValue(JSON.stringify(bufferTime), 'booking-calendar');
|
|
918
|
-
};
|
|
919
|
-
this.valueChanged.emit({ ...event.detail, valueChanged });
|
|
920
|
-
}
|
|
921
|
-
renderPreview() {
|
|
922
|
-
const totalSlots = 4;
|
|
923
|
-
const slotHeight = 10;
|
|
924
|
-
const eventSlotHeight = slotHeight * 2;
|
|
925
|
-
const slotFill = minutes => {
|
|
926
|
-
const fullSlots = Math.floor(minutes / 30);
|
|
927
|
-
const partialFillHeight = ((minutes % 30) / 30) * slotHeight;
|
|
928
|
-
return {
|
|
929
|
-
fullSlots,
|
|
930
|
-
partialFillHeight,
|
|
931
|
-
};
|
|
932
|
-
};
|
|
933
|
-
const createBeforeSlots = () => {
|
|
934
|
-
const { fullSlots, partialFillHeight } = slotFill(this.selectedBeforeBufferTime);
|
|
935
|
-
return Array.from({ length: totalSlots }, (_, index$1) => {
|
|
936
|
-
const isActive = this.selectedBeforeBufferTime > 0 && index$1 > totalSlots - fullSlots - 1;
|
|
937
|
-
const isPartial = this.selectedBeforeBufferTime > 0 && index$1 === totalSlots - fullSlots - 1 && partialFillHeight > 0;
|
|
938
|
-
let slotStyle = {};
|
|
939
|
-
if (isActive && !isPartial) {
|
|
940
|
-
slotStyle.backgroundColor = 'var(--nylas-base-100)';
|
|
941
|
-
}
|
|
942
|
-
else if (isPartial) {
|
|
943
|
-
slotStyle.background = `linear-gradient(to top, var(--nylas-base-100) ${partialFillHeight}px, transparent 0)`;
|
|
944
|
-
}
|
|
945
|
-
return (index.h("div", { key: index$1, class: `slot ${isActive ? 'active' : ''}`, style: {
|
|
946
|
-
height: `${slotHeight}px`,
|
|
947
|
-
...slotStyle,
|
|
948
|
-
} }));
|
|
949
|
-
});
|
|
950
|
-
};
|
|
951
|
-
const createAfterSlots = () => {
|
|
952
|
-
const { fullSlots, partialFillHeight } = slotFill(this.selectedAfterBufferTime);
|
|
953
|
-
return Array.from({ length: totalSlots }, (_, index$1) => {
|
|
954
|
-
const isActive = this.selectedAfterBufferTime > 0 && index$1 < fullSlots;
|
|
955
|
-
const isPartial = index$1 === fullSlots && partialFillHeight > 0;
|
|
956
|
-
let slotStyle = {};
|
|
957
|
-
if (isActive && !isPartial) {
|
|
958
|
-
slotStyle.backgroundColor = 'var(--nylas-base-100)';
|
|
959
|
-
}
|
|
960
|
-
else if (isPartial) {
|
|
961
|
-
slotStyle.background = `linear-gradient(to bottom, var(--nylas-base-100) ${partialFillHeight}px, transparent 0)`;
|
|
962
|
-
}
|
|
963
|
-
return (index.h("div", { key: index$1, class: `slot ${isActive ? 'active' : ''}`, style: {
|
|
964
|
-
height: `${slotHeight}px`,
|
|
965
|
-
...slotStyle,
|
|
966
|
-
} }));
|
|
967
|
-
});
|
|
968
|
-
};
|
|
969
|
-
return (index.h("div", { class: "preview-container" }, createBeforeSlots(), index.h("div", { class: "event-slot", style: { height: `${eventSlotHeight}px` } }), createAfterSlots()));
|
|
970
|
-
}
|
|
971
|
-
render() {
|
|
972
|
-
const minuteOptions = Array.from({ length: 25 }, (_, i) => {
|
|
973
|
-
const value = i * 5;
|
|
974
|
-
return {
|
|
975
|
-
label: value.toString(),
|
|
976
|
-
value: value,
|
|
977
|
-
};
|
|
978
|
-
});
|
|
979
|
-
return (index.h(index.Host, null, index.h("div", { class: "nylas-buffer-time", part: "nbt" }, index.h("div", { class: "header", part: "nbt__header" }, index.h("h3", null, "Buffer time"), index.h("p", null, "Add buffer time before and after the event.")), index.h("div", { class: "nylas-buffer-time__body", part: "nbt__body" }, index.h("div", { class: "nylas-buffer-time__dropdown" }, index.h("div", { class: "nylas-buffer-time__row" }, index.h("label", null, "Before the event"), index.h("div", { class: "dropdown-container" }, index.h("select-dropdown", { id: "before-buffer-time", withSearch: false, name: "before-buffer-time", exportparts: "sd_dropdown: nbt__dropdown-before, sd_dropdown-button: nbt__dropdown-button-before, sd_dropdown-content: nbt__dropdown-content-before", options: minuteOptions, defaultSelectedOption: minuteOptions.find(min => min.value == this.selectedBeforeBufferTime) ?? minuteOptions[0] }), index.h("span", null, "mins"))), index.h("div", { class: "nylas-buffer-time__row" }, index.h("label", null, "After the event"), index.h("div", { class: "dropdown-container" }, index.h("select-dropdown", { id: "after-buffer-time", withSearch: false, name: "after-buffer-time", exportparts: "sd_dropdown: nbt__dropdown-after, sd_dropdown-button: nbt__dropdown-button-after, sd_dropdown-content: nbt__dropdown-content-after", options: minuteOptions, defaultSelectedOption: minuteOptions.find(min => min.value == this.selectedAfterBufferTime) ?? minuteOptions[0] }), index.h("span", null, "mins")))), index.h("div", { class: "nylas-buffer-time__preview", part: "nbt__preview" }, index.h("h4", null, "PREVIEW"), this.renderPreview())))));
|
|
980
|
-
}
|
|
981
|
-
static get formAssociated() { return true; }
|
|
982
|
-
get host() { return index.getElement(this); }
|
|
983
|
-
static get watchers() { return {
|
|
984
|
-
"name": ["elementNameChangedHandler"]
|
|
985
|
-
}; }
|
|
986
|
-
};
|
|
987
|
-
__decorate$e([
|
|
988
|
-
registerComponent.RegisterComponent({
|
|
989
|
-
name: 'nylas-buffer-time',
|
|
990
|
-
eventToProps: {
|
|
991
|
-
valueChanged: async (event, _nylasSchedulerConfigConnector) => {
|
|
992
|
-
const { valueChanged } = event.detail;
|
|
993
|
-
if (valueChanged) {
|
|
994
|
-
valueChanged(event);
|
|
995
|
-
}
|
|
996
|
-
},
|
|
997
|
-
},
|
|
998
|
-
fireRegisterEvent: true,
|
|
999
|
-
}),
|
|
1000
|
-
__metadata$e("design:type", Function),
|
|
1001
|
-
__metadata$e("design:paramtypes", []),
|
|
1002
|
-
__metadata$e("design:returntype", void 0)
|
|
1003
|
-
], NylasBufferTime.prototype, "render", null);
|
|
1004
|
-
NylasBufferTime.style = NylasBufferTimeStyle0;
|
|
1005
|
-
|
|
1006
|
-
const nylasCalendarPickerCss = ":host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:\"Inter\", sans-serif;width:inherit}.nylas-calendar-picker{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200)}.nylas-calendar-picker .header{padding:1rem;border-bottom:1px solid var(--nylas-base-200)}.nylas-calendar-picker .header h3{margin:0;font-size:1rem;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-calendar-picker .header p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.nylas-calendar-picker .nylas-calendar-picker__loading{padding-bottom:1rem;display:flex;flex-direction:column;gap:4px}.nylas-calendar-picker .nylas-calendar-picker__loading .label{display:flex;align-items:center;gap:0.5rem;margin:1rem 1rem 0;color:var(--nylas-base-800)}.nylas-calendar-picker .nylas-calendar-picker__loading .label tooltip-component{display:flex}.nylas-calendar-picker .nylas-calendar-picker__loading .loading-button{margin:0 1rem;padding:0;width:inherit;height:48px;color:black;font-size:1rem;cursor:not-allowed;display:flex;gap:0.5rem;justify-content:space-between;align-items:center;background:transparent;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}.nylas-calendar-picker .nylas-calendar-picker__loading .loading-button span{padding:0 1rem}.nylas-calendar-picker .nylas-calendar-picker__dropdown{padding:1rem}.nylas-calendar-picker .nylas-calendar-picker__dropdown multi-select-dropdown::part(msd_dropdown){width:100%;display:flex;flex-direction:column;gap:4px}.nylas-calendar-picker .nylas-calendar-picker__dropdown multi-select-dropdown::part(msd_dropdown-button){width:100%;display:flex;justify-content:space-between;align-items:center;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);padding:1rem}.nylas-calendar-picker .nylas-calendar-picker__dropdown multi-select-dropdown::part(msd_dropdown-content){width:100%;max-width:unset}.nylas-calendar-picker .nylas-calendar-picker__dropdown multi-select-dropdown::part(msd_dropdown-button-selected-label){max-width:calc(100% - 2rem);font-family:var(--nylas-font-family);font-size:16px;line-height:24px}";
|
|
1007
|
-
const NylasCalendarPickerStyle0 = nylasCalendarPickerCss;
|
|
1008
|
-
|
|
1009
|
-
var __decorate$d = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
1010
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1011
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
1012
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
1013
|
-
else
|
|
1014
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
1015
|
-
if (d = decorators[i])
|
|
1016
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
1017
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1018
|
-
};
|
|
1019
|
-
var __metadata$d = (undefined && undefined.__metadata) || function (k, v) {
|
|
1020
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
1021
|
-
return Reflect.metadata(k, v);
|
|
1022
|
-
};
|
|
1023
|
-
const NylasCalendarPicker = class {
|
|
1024
|
-
constructor(hostRef) {
|
|
1025
|
-
index.registerInstance(this, hostRef);
|
|
1026
|
-
this.valueChanged = index.createEvent(this, "valueChanged", 7);
|
|
1027
|
-
if (hostRef.$hostElement$["s-ei"]) {
|
|
1028
|
-
this.internals = hostRef.$hostElement$["s-ei"];
|
|
1029
|
-
}
|
|
1030
|
-
else {
|
|
1031
|
-
this.internals = hostRef.$hostElement$.attachInternals();
|
|
1032
|
-
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
1033
|
-
}
|
|
1034
|
-
this.calendars = undefined;
|
|
1035
|
-
this.currentUser = undefined;
|
|
1036
|
-
this.name = 'calendar';
|
|
1037
|
-
this.defaultSelectedCalendars = [];
|
|
1038
|
-
this.selectedCalendars = [];
|
|
1039
|
-
}
|
|
1040
|
-
elementNameChangedHandler(newValue) {
|
|
1041
|
-
utils.debug('nylas-calendar-picker', 'elementNameChangedHandler', newValue);
|
|
1042
|
-
this.host.setAttribute('name', newValue);
|
|
1043
|
-
}
|
|
1044
|
-
connectedCallback() {
|
|
1045
|
-
utils.debug('nylas-calendar-picker', 'connectedCallback');
|
|
1046
|
-
}
|
|
1047
|
-
disconnectedCallback() {
|
|
1048
|
-
utils.debug('nylas-calendar-picker', 'disconnectedCallback');
|
|
1049
|
-
}
|
|
1050
|
-
componentWillLoad() {
|
|
1051
|
-
utils.debug('nylas-calendar-picker', 'componentWillLoad');
|
|
1052
|
-
this.host.setAttribute('name', this.name);
|
|
1053
|
-
}
|
|
1054
|
-
componentDidLoad() {
|
|
1055
|
-
utils.debug('nylas-calendar-picker', 'componentDidLoad');
|
|
1056
|
-
if (typeof this.internals.setFormValue === 'function') {
|
|
1057
|
-
this.internals.setFormValue(this.defaultSelectedCalendars.toString(), 'calendar');
|
|
1058
|
-
}
|
|
1059
|
-
}
|
|
1060
|
-
componentWillUpdate() {
|
|
1061
|
-
utils.debug('nylas-calendar-picker', 'componentWillUpdate');
|
|
1062
|
-
}
|
|
1063
|
-
componentDidUpdate() {
|
|
1064
|
-
utils.debug('nylas-calendar-picker', 'componentDidUpdate');
|
|
1065
|
-
}
|
|
1066
|
-
componentWillRender() {
|
|
1067
|
-
utils.debug('nylas-calendar-picker', 'componentWillRender');
|
|
1068
|
-
}
|
|
1069
|
-
componentDidRender() {
|
|
1070
|
-
utils.debug('nylas-calendar-picker', 'componentDidRender');
|
|
1071
|
-
}
|
|
1072
|
-
selectedOptionsChangedHandler(event) {
|
|
1073
|
-
utils.debug('nylas-calendar-picker', 'nylasFormDropdownChangedHandler', event.detail);
|
|
1074
|
-
const valueChangedHandler = (event) => {
|
|
1075
|
-
const { value } = event.detail;
|
|
1076
|
-
this.selectedCalendars = [...value];
|
|
1077
|
-
this.internals.setFormValue(value.toString(), 'calendar');
|
|
1078
|
-
};
|
|
1079
|
-
this.valueChanged.emit({ ...event.detail, name: this.name, valueChangedHandler });
|
|
1080
|
-
}
|
|
1081
|
-
render() {
|
|
1082
|
-
const calendarOptions = this.calendars?.map(calendar => {
|
|
1083
|
-
return {
|
|
1084
|
-
value: calendar.id,
|
|
1085
|
-
label: calendar.name,
|
|
1086
|
-
selected: this.defaultSelectedCalendars?.includes(calendar.id) ||
|
|
1087
|
-
(this.defaultSelectedCalendars?.includes('primary') || this.defaultSelectedCalendars?.length === 0 ? calendar.id === this.currentUser?.email : false),
|
|
1088
|
-
};
|
|
1089
|
-
}) ?? [];
|
|
1090
|
-
return (index.h(index.Host, null, index.h("div", { class: "nylas-calendar-picker", part: "ncp" }, index.h("div", { class: "header", part: "ncp__header" }, index.h("h3", null, "Calendar availability"), index.h("p", null, "Select calendars that you\u2019d like to use for checking your availability.")), calendarOptions.length > 0 ? (index.h("div", { class: "nylas-calendar-picker__dropdown" }, index.h("multi-select-dropdown", { name: 'calendar', label: "Select calendars that will be checked for availability", options: calendarOptions, exportparts: "msd_dropdown: ncp__dropdown, msd_dropdown-button: ncp__dropdown-button, msd_dropdown-content: ncp__dropdown-content" }, index.h("span", { slot: "label-icon" }, index.h("tooltip-component", null, index.h("info-icon", { slot: "tooltip-icon" }), index.h("span", { slot: "tooltip-content" }, "Check availability across one or multiple calendars. If multiple calendars are selected, you must be available across all of them to be considered available. The default is your primary calendar if none are selected.")))))) : (index.h("div", { class: "nylas-calendar-picker__loading" }, index.h("span", { class: "label" }, "Select calendars that will be checked for availability ", index.h("info-icon", null)), index.h("div", { class: "loading-button" }, index.h("span", null, "Loading...")))))));
|
|
1091
|
-
}
|
|
1092
|
-
static get formAssociated() { return true; }
|
|
1093
|
-
get host() { return index.getElement(this); }
|
|
1094
|
-
static get watchers() { return {
|
|
1095
|
-
"name": ["elementNameChangedHandler"]
|
|
1096
|
-
}; }
|
|
1097
|
-
};
|
|
1098
|
-
__decorate$d([
|
|
1099
|
-
registerComponent.RegisterComponent({
|
|
1100
|
-
name: 'nylas-calendar-picker',
|
|
1101
|
-
stateToProps: new Map([
|
|
1102
|
-
['schedulerConfig.calendars', 'calendars'],
|
|
1103
|
-
['schedulerConfig.currentUser', 'currentUser'],
|
|
1104
|
-
]),
|
|
1105
|
-
eventToProps: {
|
|
1106
|
-
valueChanged: async (event, _nylasSchedulerConfigConnector) => {
|
|
1107
|
-
const { valueChangedHandler } = event.detail;
|
|
1108
|
-
if (valueChangedHandler) {
|
|
1109
|
-
valueChangedHandler(event);
|
|
1110
|
-
}
|
|
1111
|
-
},
|
|
1112
|
-
},
|
|
1113
|
-
fireRegisterEvent: true,
|
|
1114
|
-
}),
|
|
1115
|
-
__metadata$d("design:type", Function),
|
|
1116
|
-
__metadata$d("design:paramtypes", []),
|
|
1117
|
-
__metadata$d("design:returntype", void 0)
|
|
1118
|
-
], NylasCalendarPicker.prototype, "render", null);
|
|
1119
|
-
NylasCalendarPicker.style = NylasCalendarPickerStyle0;
|
|
1120
|
-
|
|
1121
|
-
const nylasCancellationPolicyCss = ":host{--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}.nylas-cancellation-policy{display:flex;flex-direction:column;gap:4px}.nylas-cancellation-policy label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:16px;font-style:normal;font-weight:400;line-height:150%;}.nylas-cancellation-policy label span.label-icon{margin-left:4px}.nylas-cancellation-policy label span.label-icon tooltip-component{display:flex}.nylas-cancellation-policy textarea{padding:12px 16px;border-width:1;resize:vertical;border-radius:8px;font-family:var(--nylas-font-family);font-size:16px;line-height:24px;border:1px solid var(--nylas-base-200)}.nylas-cancellation-policy textarea::-webkit-resizer{display:none}";
|
|
1122
|
-
const NylasCancellationPolicyStyle0 = nylasCancellationPolicyCss;
|
|
1123
|
-
|
|
1124
|
-
var __decorate$c = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
1125
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1126
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
1127
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
1128
|
-
else
|
|
1129
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
1130
|
-
if (d = decorators[i])
|
|
1131
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
1132
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1133
|
-
};
|
|
1134
|
-
var __metadata$c = (undefined && undefined.__metadata) || function (k, v) {
|
|
1135
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
1136
|
-
return Reflect.metadata(k, v);
|
|
1137
|
-
};
|
|
1138
|
-
const NylasCancellationPolicy = class {
|
|
1139
|
-
constructor(hostRef) {
|
|
1140
|
-
index.registerInstance(this, hostRef);
|
|
1141
|
-
this.valueChanged = index.createEvent(this, "valueChanged", 7);
|
|
1142
|
-
if (hostRef.$hostElement$["s-ei"]) {
|
|
1143
|
-
this.internals = hostRef.$hostElement$["s-ei"];
|
|
1144
|
-
}
|
|
1145
|
-
else {
|
|
1146
|
-
this.internals = hostRef.$hostElement$.attachInternals();
|
|
1147
|
-
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
1148
|
-
}
|
|
1149
|
-
this.selectedConfiguration = undefined;
|
|
1150
|
-
this.cancellationPolicy = undefined;
|
|
1151
|
-
this.name = 'cancelation-policy';
|
|
1152
|
-
this.message = this.cancellationPolicy || this.selectedConfiguration?.scheduler?.cancellation_policy || '';
|
|
1153
|
-
}
|
|
1154
|
-
elementNameChangedHandler(newValue) {
|
|
1155
|
-
utils.debug('nylas-cancellation-policy', 'elementNameChangedHandler', newValue);
|
|
1156
|
-
this.host.setAttribute('name', newValue);
|
|
1157
|
-
}
|
|
1158
|
-
selectedConfigurationChangedHandler(newValue, oldValue) {
|
|
1159
|
-
utils.debug('nylas-custom-booking-flow', 'selectedConfigurationChangedHandler', newValue, oldValue);
|
|
1160
|
-
if (newValue?.scheduler?.cancellation_policy) {
|
|
1161
|
-
this.message = newValue?.scheduler?.cancellation_policy;
|
|
1162
|
-
}
|
|
1163
|
-
}
|
|
1164
|
-
connectedCallback() {
|
|
1165
|
-
utils.debug('nylas-cancellation-policy', 'connectedCallback');
|
|
1166
|
-
}
|
|
1167
|
-
componentWillLoad() {
|
|
1168
|
-
utils.debug('nylas-cancellation-policy', 'componentWillLoad');
|
|
1169
|
-
this.host.setAttribute('name', this.name);
|
|
1170
|
-
}
|
|
1171
|
-
componentDidLoad() {
|
|
1172
|
-
utils.debug('nylas-cancellation-policy', 'componentDidLoad');
|
|
1173
|
-
}
|
|
1174
|
-
disconnectedCallback() {
|
|
1175
|
-
utils.debug('nylas-cancellation-policy', 'disconnectedCallback');
|
|
1176
|
-
}
|
|
1177
|
-
handleChange(event) {
|
|
1178
|
-
const value = index$1.sanitizeHtml(event.target.value);
|
|
1179
|
-
this.message = value;
|
|
1180
|
-
this.internals.setFormValue(value, this.name);
|
|
1181
|
-
this.valueChanged.emit({ value: value, name: this.name });
|
|
1182
|
-
}
|
|
1183
|
-
render() {
|
|
1184
|
-
return (index.h(index.Host, { key: '7a57476ea21860b39103ab43f8b86a5804ddc055' }, index.h("div", { key: '67d7d2c00b2b658778dabe316a4512472bddf435', class: "nylas-cancellation-policy", part: "ncpolicy" }, index.h("label", { key: '2f0abff08c2485c93efaf6202a5c9720107f11d1', htmlFor: this.name }, "Cancellation policy message", index.h("span", { key: '2c16d52ce3b6fea15f23e57d50afe55872f920d6', class: "label-icon" }, index.h("tooltip-component", { key: '8bde2b6a884e8d180ef7296bbf29322df14128ef' }, index.h("info-icon", { key: 'cffadcf00bc6c3b07dffeb633bf87b423d6f4c59', slot: "tooltip-icon" }), index.h("span", { key: '5c37fbce026bb6f5a37f7867236fc27284323c42', slot: "tooltip-content" }, "Attendees receive this message if trying to cancel the event. Attendees are asked to provide a reason for cancellation.")))), index.h("textarea", { key: '0f492885372a90650104bbb4679cde1374296504', id: this.name, part: "ncpolicy__textarea", name: this.name, value: this.message, maxlength: "250", onInput: e => this.handleChange(e) }))));
|
|
1185
|
-
}
|
|
1186
|
-
static get formAssociated() { return true; }
|
|
1187
|
-
get host() { return index.getElement(this); }
|
|
1188
|
-
static get watchers() { return {
|
|
1189
|
-
"name": ["elementNameChangedHandler"],
|
|
1190
|
-
"selectedConfiguration": ["selectedConfigurationChangedHandler"]
|
|
1191
|
-
}; }
|
|
1192
|
-
};
|
|
1193
|
-
__decorate$c([
|
|
1194
|
-
registerComponent.RegisterComponent({
|
|
1195
|
-
name: 'nylas-cancellation-policy',
|
|
1196
|
-
stateToProps: new Map([['schedulerConfig.selectedConfiguration', 'selectedConfiguration']]),
|
|
1197
|
-
eventToProps: {},
|
|
1198
|
-
fireRegisterEvent: true,
|
|
1199
|
-
}),
|
|
1200
|
-
__metadata$c("design:type", Function),
|
|
1201
|
-
__metadata$c("design:paramtypes", []),
|
|
1202
|
-
__metadata$c("design:returntype", void 0)
|
|
1203
|
-
], NylasCancellationPolicy.prototype, "render", null);
|
|
1204
|
-
NylasCancellationPolicy.style = NylasCancellationPolicyStyle0;
|
|
1205
|
-
|
|
1206
|
-
const nylasCustomizeBookingSettingsCss = ":host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:\"Inter\", sans-serif;width:inherit}.nylas-customize-booking-settings{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200)}.nylas-customize-booking-settings .header{padding:1rem;border-bottom:1px solid var(--nylas-base-200)}.nylas-customize-booking-settings .header h3{margin:0;font-size:1rem;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-customize-booking-settings .header p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.nylas-customize-booking-settings .nylas-customize-booking-settings__settings{display:flex;flex-direction:column;gap:1.5rem;padding:1rem;margin:1rem 0}.nylas-customize-booking-settings .nylas-customize-booking-settings__settings .nylas-customize-booking-settings__settings-div{display:flex;align-items:center;gap:4px}.label{margin-left:32px;font-size:16px;font-weight:400;color:var(--nylas-base-800);line-height:24px}.label .label-contents{margin:0;display:inline-block}@media screen and (max-width: 768px){.label .label-contents{display:block}}.label tooltip-component{display:inline-block}@media screen and (max-width: 768px){tooltip-component#guests::part(tc__content){left:58px}}tooltip-component#reschedule::part(tc__content){left:58px}@media screen and (max-width: 768px){tooltip-component#reschedule::part(tc__content){left:58px}}tooltip-component#cancel::part(tc__content){left:-58px}@media screen and (max-width: 768px){tooltip-component#cancel::part(tc__content){left:58px}}";
|
|
1207
|
-
const NylasCustomizeBookingSettingsStyle0 = nylasCustomizeBookingSettingsCss;
|
|
1208
|
-
|
|
1209
|
-
var __decorate$b = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
1210
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1211
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
1212
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
1213
|
-
else
|
|
1214
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
1215
|
-
if (d = decorators[i])
|
|
1216
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
1217
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1218
|
-
};
|
|
1219
|
-
var __metadata$b = (undefined && undefined.__metadata) || function (k, v) {
|
|
1220
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
1221
|
-
return Reflect.metadata(k, v);
|
|
1222
|
-
};
|
|
1223
|
-
const NylasCustomizeBookingSettings = class {
|
|
1224
|
-
constructor(hostRef) {
|
|
1225
|
-
index.registerInstance(this, hostRef);
|
|
1226
|
-
this.valueChanged = index.createEvent(this, "valueChanged", 7);
|
|
1227
|
-
if (hostRef.$hostElement$["s-ei"]) {
|
|
1228
|
-
this.internals = hostRef.$hostElement$["s-ei"];
|
|
1229
|
-
}
|
|
1230
|
-
else {
|
|
1231
|
-
this.internals = hostRef.$hostElement$.attachInternals();
|
|
1232
|
-
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
1233
|
-
}
|
|
1234
|
-
this.selectedConfiguration = undefined;
|
|
1235
|
-
this.defaultAdditionalGuestsHidden = this.selectedConfiguration?.scheduler?.hide_additional_guests ?? false;
|
|
1236
|
-
this.defaultHideCancellationOptions = this.selectedConfiguration?.scheduler?.hide_cancellation_options ?? false;
|
|
1237
|
-
this.defaultHideReschedulingOptions = this.selectedConfiguration?.scheduler?.hide_rescheduling_options ?? false;
|
|
1238
|
-
this.name = 'customize-booking-settings';
|
|
1239
|
-
this.allowGuestsToInvite = this.defaultAdditionalGuestsHidden;
|
|
1240
|
-
this.hideCancellationOptions = this.defaultHideCancellationOptions;
|
|
1241
|
-
this.hideReschedulingOptions = this.defaultHideReschedulingOptions;
|
|
1242
|
-
}
|
|
1243
|
-
elementNameChangedHandler(newValue) {
|
|
1244
|
-
utils.debug('nylas-customize-booking-settings', 'elementNameChangedHandler', newValue);
|
|
1245
|
-
this.host.setAttribute('name', newValue);
|
|
1246
|
-
}
|
|
1247
|
-
selectedConfigurationChangedHandler(newValue) {
|
|
1248
|
-
utils.debug('nylas-customize-booking-settings', 'selectedConfigurationChangedHandler', newValue);
|
|
1249
|
-
this.allowGuestsToInvite = !newValue?.scheduler?.hide_additional_guests;
|
|
1250
|
-
this.hideCancellationOptions = newValue?.scheduler?.hide_cancellation_options ?? false;
|
|
1251
|
-
this.hideReschedulingOptions = newValue?.scheduler?.hide_rescheduling_options ?? false;
|
|
1252
|
-
}
|
|
1253
|
-
connectedCallback() {
|
|
1254
|
-
utils.debug('nylas-customize-booking-settings', 'connectedCallback');
|
|
1255
|
-
}
|
|
1256
|
-
disconnectedCallback() {
|
|
1257
|
-
utils.debug('nylas-customize-booking-settings', 'disconnectedCallback');
|
|
1258
|
-
}
|
|
1259
|
-
componentWillLoad() {
|
|
1260
|
-
utils.debug('nylas-customize-booking-settings', 'componentWillLoad');
|
|
1261
|
-
this.host.setAttribute('name', this.name);
|
|
1262
|
-
}
|
|
1263
|
-
componentDidLoad() {
|
|
1264
|
-
utils.debug('nylas-customize-booking-settings', 'componentDidLoad');
|
|
1265
|
-
}
|
|
1266
|
-
componentWillUpdate() {
|
|
1267
|
-
utils.debug('nylas-customize-booking-settings', 'componentWillUpdate');
|
|
1268
|
-
}
|
|
1269
|
-
componentDidUpdate() {
|
|
1270
|
-
utils.debug('nylas-customize-booking-settings', 'componentDidUpdate');
|
|
1271
|
-
}
|
|
1272
|
-
componentWillRender() {
|
|
1273
|
-
utils.debug('nylas-customize-booking-settings', 'componentWillRender');
|
|
1274
|
-
}
|
|
1275
|
-
componentDidRender() {
|
|
1276
|
-
utils.debug('nylas-customize-booking-settings', 'componentDidRender');
|
|
1277
|
-
}
|
|
1278
|
-
checkboxToggledHandler(event) {
|
|
1279
|
-
const { name, checked } = event.detail;
|
|
1280
|
-
switch (name) {
|
|
1281
|
-
case 'hide_additional_guests':
|
|
1282
|
-
this.allowGuestsToInvite = checked;
|
|
1283
|
-
break;
|
|
1284
|
-
case 'hide_cancellation_options':
|
|
1285
|
-
this.hideCancellationOptions = checked;
|
|
1286
|
-
break;
|
|
1287
|
-
case 'hide_rescheduling_options':
|
|
1288
|
-
this.hideReschedulingOptions = checked;
|
|
1289
|
-
break;
|
|
1290
|
-
}
|
|
1291
|
-
this.valueChanged.emit({
|
|
1292
|
-
value: JSON.stringify({
|
|
1293
|
-
additionalGuestsHidden: !this.allowGuestsToInvite,
|
|
1294
|
-
hideCancellationOptions: this.hideCancellationOptions,
|
|
1295
|
-
hideReschedulingOptions: this.hideReschedulingOptions,
|
|
1296
|
-
}),
|
|
1297
|
-
name: this.name,
|
|
1298
|
-
});
|
|
1299
|
-
this.internals.setFormValue(JSON.stringify({
|
|
1300
|
-
additionalGuestsHidden: !this.allowGuestsToInvite,
|
|
1301
|
-
hideCancellationOptions: this.hideCancellationOptions,
|
|
1302
|
-
hideReschedulingOptions: this.hideReschedulingOptions,
|
|
1303
|
-
}), this.name);
|
|
1304
|
-
}
|
|
1305
|
-
render() {
|
|
1306
|
-
return (index.h(index.Host, { key: '543f4fc64d9dab03c528c5738cd4c1b1bb9cfd2a' }, index.h("div", { key: 'e3f153847ad5256327952d4be0aace03543b1d40', class: "nylas-customize-booking-settings", part: "ncbs" }, index.h("div", { key: '5b35f27785f6f6bc8e8848d94857869b73108df0', class: "header", part: "ncbs__header" }, index.h("h3", { key: 'd50a9614e3b0b5227a196356a43f12aab4acb158' }, "Additional settings"), index.h("p", { key: 'f29bbb165479e276cf87087582e9c60eb21c37d1' }, "Booking settings for the event.")), index.h("div", { key: 'd091485f983d0cc3ff86e7ca89df8d75526d3cef', class: "nylas-customize-booking-settings__settings", part: "ncbs__settings" }, index.h("div", { key: '7f7888a718a70a681795e599075c92cfbc16853a', class: "nylas-customize-booking-settings__settings-div", part: "ncbs__settings-div , ncbs__additional_guests" }, index.h("checkbox-component", { key: 'e37474d77812d96fe264d26c329078502c074dbe', name: "hide_additional_guests", label: "Allow guests to invite additional guests.", checked: this.allowGuestsToInvite }, index.h("span", { key: '00b45833c0223e373edf0b42669e4a154938b1eb', slot: "label", class: "label" }, index.h("p", { key: 'e66de8b9f53230347417a8ec0a7ae7a19af9db31', class: "label-contents" }, "Allow guests to invite additional guests to the booking."), index.h("tooltip-component", { key: '1ba5558e1991235c21f57ca1968220ea7bf43fcb', id: "guests" }, index.h("info-icon", { key: '3e62cc64cc55eb3dd4d0a73cef80a64c8dc9c38f', slot: "tooltip-icon" }), index.h("span", { key: '3853d0d575be29420ea012c90b0a2c07913a86a7', slot: "tooltip-content" }, "Allow guests to invite additional guests to the event. If enabled, the guest will be able to add additional guests' email addresses."))))), index.h("div", { key: '92e209a924673d8b1dee03475ffabfea5d9bf09b', class: "nylas-customize-booking-settings__settings-div", part: "ncbs__settings-div , ncbs__rescheduling_options" }, index.h("checkbox-component", { key: 'f7b522c07700938d25b17e14d236edb2aae12b21', name: "hide_rescheduling_options", label: "Hide 'Reschedule' option on booking page and emails.", checked: this.hideReschedulingOptions }, index.h("span", { key: '590cb5d983ff6eef95ebb370b845e1cc8e3080e4', slot: "label", class: "label" }, index.h("p", { key: '8f2d2742976e21a81268c793ae1c6c9dafdcecc3', class: "label-contents" }, "Hide the\u00A0", index.h("strong", { key: '4b01f75e4067d7c8d26ca785d5c6ad841633130c' }, "Reschedule"), "\u00A0button on the Scheduling Page and in the email notifications."), index.h("tooltip-component", { key: '8a157115569a4413143779c9e09c8389394973f9', id: "reschedule" }, index.h("info-icon", { key: 'b3a2c734d2d7a303d1d4d2622b51113aa7d3dfaf', slot: "tooltip-icon" }), index.h("span", { key: '2d08ceb49e744787da6863d72cf2c6df50f1a7cc', slot: "tooltip-content" }, "Hide the 'Reschedule' button on the Scheduling page and in the email notifications. If enabled, the guest will not be able to reschedule the booking."))))), index.h("div", { key: '6bc7f1a30a750ba85453d852f6f7e05c0513673d', class: "nylas-customize-booking-settings__settings-div", part: "ncbs__settings-div , ncbs__cancellation_options" }, index.h("checkbox-component", { key: '089ca174d8aabb26d87f5bb8cb871b9e82b7c04f', name: "hide_cancellation_options", label: "Hide 'Cancel' option on booking page and emails.", checked: this.hideCancellationOptions }, index.h("span", { key: '9ec50185d728baddbe0805eaeff057686b153bea', slot: "label", class: "label" }, index.h("p", { key: '118c1c3cc06dba90f451711aba0dde3efeeec9f0', class: "label-contents" }, "Hide the\u00A0", index.h("strong", { key: 'c1a26aa5c832fba488d60fc3af5a3c000ada144d' }, "Cancel"), "\u00A0button on the Scheduling Page and in the email notifications."), index.h("tooltip-component", { key: 'b70473d1e93c11d9b05a9dcec67d77795638bbeb', id: "cancel" }, index.h("info-icon", { key: '2f0d812ac9fb7a52260b601c590b7a629036ea7c', slot: "tooltip-icon" }), index.h("span", { key: '4c5b3b51b57761a377ccfa7f66d6d69486d8cb11', slot: "tooltip-content" }, "Hide the 'Cancel' button on the Scheduling page and in the email notifications. If enabled, the guest will not be able to cancel the booking.")))))))));
|
|
1307
|
-
}
|
|
1308
|
-
static get formAssociated() { return true; }
|
|
1309
|
-
get host() { return index.getElement(this); }
|
|
1310
|
-
static get watchers() { return {
|
|
1311
|
-
"name": ["elementNameChangedHandler"],
|
|
1312
|
-
"selectedConfiguration": ["selectedConfigurationChangedHandler"]
|
|
1313
|
-
}; }
|
|
1314
|
-
};
|
|
1315
|
-
__decorate$b([
|
|
1316
|
-
registerComponent.RegisterComponent({
|
|
1317
|
-
name: 'nylas-customize-booking-settings',
|
|
1318
|
-
stateToProps: new Map([['schedulerConfig.selectedConfiguration', 'selectedConfiguration']]),
|
|
1319
|
-
fireRegisterEvent: true,
|
|
1320
|
-
}),
|
|
1321
|
-
__metadata$b("design:type", Function),
|
|
1322
|
-
__metadata$b("design:paramtypes", []),
|
|
1323
|
-
__metadata$b("design:returntype", void 0)
|
|
1324
|
-
], NylasCustomizeBookingSettings.prototype, "render", null);
|
|
1325
|
-
NylasCustomizeBookingSettings.style = NylasCustomizeBookingSettingsStyle0;
|
|
1326
|
-
|
|
1327
|
-
const nylasEventDescriptionCss = ":host{--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}.nylas-event-description{display:flex;flex-direction:column;gap:4px}.nylas-event-description label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:16px;font-style:normal;font-weight:400;line-height:150%;}.nylas-event-description label span.label-icon{margin-left:4px}.nylas-event-description label span.label-icon tooltip-component{display:flex}.nylas-event-description textarea{padding:12px 16px;border-width:1;resize:vertical;border-radius:8px;font-family:var(--nylas-font-family);font-size:16px;line-height:24px;border:1px solid var(--nylas-base-200)}.nylas-event-description textarea::-webkit-resizer{display:none}";
|
|
1328
|
-
const NylasEventDescriptionStyle0 = nylasEventDescriptionCss;
|
|
1329
|
-
|
|
1330
|
-
var __decorate$a = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
1331
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1332
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
1333
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
1334
|
-
else
|
|
1335
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
1336
|
-
if (d = decorators[i])
|
|
1337
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
1338
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1339
|
-
};
|
|
1340
|
-
var __metadata$a = (undefined && undefined.__metadata) || function (k, v) {
|
|
1341
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
1342
|
-
return Reflect.metadata(k, v);
|
|
1343
|
-
};
|
|
1344
|
-
const NylasEventDescription = class {
|
|
1345
|
-
constructor(hostRef) {
|
|
1346
|
-
index.registerInstance(this, hostRef);
|
|
1347
|
-
this.valueChanged = index.createEvent(this, "valueChanged", 7);
|
|
1348
|
-
if (hostRef.$hostElement$["s-ei"]) {
|
|
1349
|
-
this.internals = hostRef.$hostElement$["s-ei"];
|
|
1350
|
-
}
|
|
1351
|
-
else {
|
|
1352
|
-
this.internals = hostRef.$hostElement$.attachInternals();
|
|
1353
|
-
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
1354
|
-
}
|
|
1355
|
-
this.selectedConfiguration = undefined;
|
|
1356
|
-
this.eventDescription = undefined;
|
|
1357
|
-
this.name = 'description';
|
|
1358
|
-
this.description = this.eventDescription || this.selectedConfiguration?.event_booking?.description || '';
|
|
1359
|
-
}
|
|
1360
|
-
elementNameChangedHandler(newValue) {
|
|
1361
|
-
utils.debug('nylas-event-description', 'elementNameChangedHandler', newValue);
|
|
1362
|
-
this.host.setAttribute('name', newValue);
|
|
1363
|
-
}
|
|
1364
|
-
selectedConfigurationChangedHandler(newValue, oldValue) {
|
|
1365
|
-
utils.debug('nylas-custom-booking-flow', 'selectedConfigurationChangedHandler', newValue, oldValue);
|
|
1366
|
-
if (newValue?.event_booking?.description) {
|
|
1367
|
-
this.description = newValue?.event_booking?.description;
|
|
1368
|
-
}
|
|
1369
|
-
}
|
|
1370
|
-
connectedCallback() {
|
|
1371
|
-
utils.debug('nylas-event-description', 'connectedCallback');
|
|
1372
|
-
}
|
|
1373
|
-
componentWillLoad() {
|
|
1374
|
-
utils.debug('nylas-event-description', 'componentWillLoad');
|
|
1375
|
-
this.host.setAttribute('name', this.name);
|
|
1376
|
-
}
|
|
1377
|
-
componentDidLoad() {
|
|
1378
|
-
utils.debug('nylas-event-description', 'componentDidLoad');
|
|
1379
|
-
}
|
|
1380
|
-
disconnectedCallback() {
|
|
1381
|
-
utils.debug('nylas-event-description', 'disconnectedCallback');
|
|
1382
|
-
}
|
|
1383
|
-
handleChange(event) {
|
|
1384
|
-
const value = index$1.sanitizeHtml(event.target.value);
|
|
1385
|
-
this.description = value;
|
|
1386
|
-
this.internals.setFormValue(value, 'description');
|
|
1387
|
-
this.valueChanged.emit({ value: value, name: this.name });
|
|
1388
|
-
}
|
|
1389
|
-
render() {
|
|
1390
|
-
return (index.h(index.Host, { key: 'ac483c56982373fb625c6d1af54eed749ce820e2' }, index.h("div", { key: '3924853ea2c94d72bf2a04a319bee5fc61eb7642', class: "nylas-event-description", part: "nedesc" }, index.h("label", { key: 'e8f9990a4f0766de9691080ef02b823c4cd6beb4', htmlFor: "description" }, "Event description", index.h("span", { key: 'dc7fa731cc60ed6e59032cdb35d0b410de300750', class: "label-icon" }, index.h("tooltip-component", { key: '1c0b1a5a547227bf7d4f499cc7c319349ec26e2d' }, index.h("info-icon", { key: 'e74034f5a5d8ab86c0d497b15c9cb8016d22f38e', slot: "tooltip-icon" }), index.h("span", { key: 'c5efa1fc3adc9290e39d40f1f7998e0c6bdd3bf4', slot: "tooltip-content" }, "Provide any additional details for your event.")))), index.h("textarea", { key: '45d8cc241ab90a24ec437499234b02cc401fa720', id: "description", part: "nedesc__textarea", name: "description", value: this.description, maxlength: "8192", onInput: e => this.handleChange(e) }))));
|
|
1391
|
-
}
|
|
1392
|
-
static get formAssociated() { return true; }
|
|
1393
|
-
get host() { return index.getElement(this); }
|
|
1394
|
-
static get watchers() { return {
|
|
1395
|
-
"name": ["elementNameChangedHandler"],
|
|
1396
|
-
"selectedConfiguration": ["selectedConfigurationChangedHandler"]
|
|
1397
|
-
}; }
|
|
1398
|
-
};
|
|
1399
|
-
__decorate$a([
|
|
1400
|
-
registerComponent.RegisterComponent({
|
|
1401
|
-
name: 'nylas-event-description',
|
|
1402
|
-
stateToProps: new Map([['schedulerConfig.selectedConfiguration', 'selectedConfiguration']]),
|
|
1403
|
-
eventToProps: {},
|
|
1404
|
-
fireRegisterEvent: true,
|
|
1405
|
-
}),
|
|
1406
|
-
__metadata$a("design:type", Function),
|
|
1407
|
-
__metadata$a("design:paramtypes", []),
|
|
1408
|
-
__metadata$a("design:returntype", void 0)
|
|
1409
|
-
], NylasEventDescription.prototype, "render", null);
|
|
1410
|
-
NylasEventDescription.style = NylasEventDescriptionStyle0;
|
|
1411
|
-
|
|
1412
|
-
const nylasEventDurationCss = ":host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:\"Inter\", sans-serif}.nylas-event-duration{display:flex;flex-direction:column;gap:4px}.nylas-event-duration label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:16px;font-style:normal;font-weight:400;line-height:150%;}.nylas-event-duration label span.required{color:var(--nylas-error, #cc4841)}.nylas-event-duration label span.label-icon{margin-left:4px}.nylas-event-duration label span.label-icon tooltip-component{display:flex}.nylas-event-duration__wrapper{display:flex;align-items:center;gap:0.5rem}.nylas-event-duration__wrapper input{padding:12px 16px;border-width:1;border-radius:8px;border:1px solid var(--nylas-base-200);font-family:var(--nylas-font-family);font-size:16px;line-height:24px;width:48px}.nylas-event-duration__wrapper input-dropdown::part(id_dropdown-input){border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);padding:14px 16px;width:50px}.nylas-event-duration__wrapper input-dropdown::part(id_dropdown-content){width:100%;min-width:unset;height:200px}.nylas-event-duration__wrapper select-dropdown{width:120px}@media screen and (max-width: 768px){.nylas-event-duration__wrapper select-dropdown{width:100%}}.nylas-event-duration__wrapper select-dropdown::part(sd_dropdown-button){border:1px solid var(--nylas-base-200)}";
|
|
1413
|
-
const NylasEventDurationStyle0 = nylasEventDurationCss;
|
|
1414
|
-
|
|
1415
|
-
var __decorate$9 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
1416
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1417
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
1418
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
1419
|
-
else
|
|
1420
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
1421
|
-
if (d = decorators[i])
|
|
1422
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
1423
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1424
|
-
};
|
|
1425
|
-
var __metadata$9 = (undefined && undefined.__metadata) || function (k, v) {
|
|
1426
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
1427
|
-
return Reflect.metadata(k, v);
|
|
1428
|
-
};
|
|
1429
|
-
const NylasEventDuration = class {
|
|
1430
|
-
constructor(hostRef) {
|
|
1431
|
-
index.registerInstance(this, hostRef);
|
|
1432
|
-
this.valueChanged = index.createEvent(this, "valueChanged", 7);
|
|
1433
|
-
if (hostRef.$hostElement$["s-ei"]) {
|
|
1434
|
-
this.internals = hostRef.$hostElement$["s-ei"];
|
|
1435
|
-
}
|
|
1436
|
-
else {
|
|
1437
|
-
this.internals = hostRef.$hostElement$.attachInternals();
|
|
1438
|
-
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
1439
|
-
}
|
|
1440
|
-
this.selectedConfiguration = undefined;
|
|
1441
|
-
this.name = 'duration';
|
|
1442
|
-
this.eventDurationMinutes = undefined;
|
|
1443
|
-
this.duration = this.eventDurationMinutes ? (this.eventDurationMinutes >= 60 ? this.eventDurationMinutes / 60 : this.eventDurationMinutes) : 30;
|
|
1444
|
-
this.durationMinutes = this.eventDurationMinutes ?? 30;
|
|
1445
|
-
this.durationIncrement = this.eventDurationMinutes ? (this.eventDurationMinutes >= 60 ? 60 : 1) : 1;
|
|
1446
|
-
this.durationMinutesOptions = [
|
|
1447
|
-
{ value: 15, label: '15' },
|
|
1448
|
-
{ value: 30, label: '30' },
|
|
1449
|
-
{ value: 45, label: '45' },
|
|
1450
|
-
{ value: 60, label: '60' },
|
|
1451
|
-
];
|
|
1452
|
-
}
|
|
1453
|
-
elementNameChangedHandler(newValue) {
|
|
1454
|
-
utils.debug('nylas-event-duration', 'elementNameChangedHandler', newValue);
|
|
1455
|
-
this.host.setAttribute('name', newValue);
|
|
1456
|
-
}
|
|
1457
|
-
selectedConfigurationChangedHandler(newVal) {
|
|
1458
|
-
const configDuration = newVal?.availability?.duration_minutes;
|
|
1459
|
-
if (configDuration) {
|
|
1460
|
-
this.duration = configDuration >= 60 ? configDuration / 60 : configDuration;
|
|
1461
|
-
this.durationMinutes = configDuration ?? 30;
|
|
1462
|
-
this.durationIncrement = configDuration >= 60 ? 60 : 1;
|
|
1463
|
-
}
|
|
1464
|
-
}
|
|
1465
|
-
durationMinutesChangedHandler(newValue, oldValue) {
|
|
1466
|
-
utils.debug('nylas-event-duration', 'durationMinutesChangedHandler', newValue);
|
|
1467
|
-
if (newValue === oldValue) {
|
|
1468
|
-
return;
|
|
1469
|
-
}
|
|
1470
|
-
this.valueChanged.emit({ value: newValue.toString(), name: this.name });
|
|
1471
|
-
}
|
|
1472
|
-
connectedCallback() {
|
|
1473
|
-
utils.debug('nylas-event-duration', 'connectedCallback');
|
|
1474
|
-
}
|
|
1475
|
-
componentWillLoad() {
|
|
1476
|
-
utils.debug('nylas-event-duration', 'componentWillLoad');
|
|
1477
|
-
this.host.setAttribute('name', this.name);
|
|
1478
|
-
this.setDurationMintueOptions();
|
|
1479
|
-
}
|
|
1480
|
-
componentDidLoad() {
|
|
1481
|
-
utils.debug('nylas-event-duration', 'componentDidLoad');
|
|
1482
|
-
this.internals.setFormValue(this.durationMinutes.toString(), 'duration');
|
|
1483
|
-
}
|
|
1484
|
-
disconnectedCallback() {
|
|
1485
|
-
utils.debug('nylas-event-duration', 'disconnectedCallback');
|
|
1486
|
-
}
|
|
1487
|
-
setDurationMintueOptions() {
|
|
1488
|
-
if (this.durationIncrement === 1) {
|
|
1489
|
-
this.durationMinutesOptions = [
|
|
1490
|
-
{ value: 15, label: '15' },
|
|
1491
|
-
{ value: 30, label: '30' },
|
|
1492
|
-
{ value: 45, label: '45' },
|
|
1493
|
-
{ value: 60, label: '60' },
|
|
1494
|
-
];
|
|
1495
|
-
}
|
|
1496
|
-
else {
|
|
1497
|
-
this.durationMinutesOptions = Array.from({ length: 23 }, (_, i) => ({ value: i + 1, label: (i + 1).toString() }));
|
|
1498
|
-
}
|
|
1499
|
-
return this.durationMinutesOptions;
|
|
1500
|
-
}
|
|
1501
|
-
handleChange(event) {
|
|
1502
|
-
this.duration = event.target.value;
|
|
1503
|
-
this.durationMinutes = this.duration * this.durationIncrement;
|
|
1504
|
-
this.internals.setFormValue(this.durationMinutes.toString(), this.name);
|
|
1505
|
-
}
|
|
1506
|
-
nylasFormDropdownChangedHandler(event) {
|
|
1507
|
-
utils.debug('nylas-calendar-picker', 'nylasFormDropdownChangedHandler', event.detail);
|
|
1508
|
-
const { value } = event.detail;
|
|
1509
|
-
this.durationIncrement = parseInt(value);
|
|
1510
|
-
if (this.durationIncrement === 1) {
|
|
1511
|
-
this.duration = 60;
|
|
1512
|
-
}
|
|
1513
|
-
else {
|
|
1514
|
-
this.duration = 1;
|
|
1515
|
-
}
|
|
1516
|
-
this.setDurationMintueOptions();
|
|
1517
|
-
this.durationMinutes = this.duration * this.durationIncrement;
|
|
1518
|
-
this.internals.setFormValue(this.durationMinutes.toString(), 'duration');
|
|
1519
|
-
}
|
|
1520
|
-
inputOptionChangedHandler(event) {
|
|
1521
|
-
utils.debug('nylas-calendar-picker', 'inputOptionChangedHandler', event.detail);
|
|
1522
|
-
const { value } = event.detail;
|
|
1523
|
-
this.duration = value;
|
|
1524
|
-
this.durationMinutes = this.duration * this.durationIncrement;
|
|
1525
|
-
this.internals.setFormValue(this.durationMinutes.toString(), this.name);
|
|
1526
|
-
}
|
|
1527
|
-
render() {
|
|
1528
|
-
const durationOptions = [
|
|
1529
|
-
{ value: 1, label: 'minute' },
|
|
1530
|
-
{ value: 60, label: 'hour' },
|
|
1531
|
-
];
|
|
1532
|
-
return (index.h(index.Host, { key: 'c8ab90c7a45ce6a5379552af0a9059b9d829e82c' }, index.h("div", { key: 'd957e610bd31a55430235b0ca903905c8bf3706b', class: "nylas-event-duration", part: "ned" }, index.h("label", { key: '39324d77ad9da4bc0c1f36d15c28384f423c1976', htmlFor: "duration" }, "Event duration", index.h("span", { key: '8f222a8a5d03899ff06790133434028dd1a62cd4', class: "required" }, "*"), index.h("span", { key: '6b83c675faa33db229ded711eac8c1f565bc9a61', class: "label-icon" }, index.h("tooltip-component", { key: '01b7ba340e2883e5a22d4559f67feda4bc745109' }, index.h("info-icon", { key: 'acbfa3dcbc994dec0e502ea9ded00612bf24b315', slot: "tooltip-icon" }), index.h("span", { key: 'e691c2a8ce4953e448cb6850ab2648645ae688c0', slot: "tooltip-content" }, "Set the duration of your event.")))), index.h("div", { key: '294766a022ba73042705050bc2fbc294cd1433b4', class: "nylas-event-duration__wrapper" }, index.h("input-dropdown", { key: '9a61a9527ae4c9991dc1f1596fbed85a5dd57966', name: 'event-duration', options: this.durationMinutesOptions, inputValue: this.duration.toString(), exportparts: "id_dropdown: ned__input_dropdown, id_dropdown-input: ned__input_dropdown-input, id_dropdown-content: ned__input_dropdown-content", defaultInputOption: this.durationMinutesOptions.find(i => i.value == this.duration) ?? durationOptions[0] }), index.h("select-dropdown", { key: 'edcda0700a80961b9a8b9f325288d70a1aa4e6f0', name: 'event-duration', options: durationOptions, pluralizedLabel: this.duration > 1 ? 's' : '', exportparts: "sd_dropdown: ned__dropdown, sd_dropdown-button: ned__dropdown-button, sd_dropdown-content: ned__dropdown-content", defaultSelectedOption: durationOptions.find(i => i.value == this.durationIncrement) ?? durationOptions[0], withSearch: false })))));
|
|
1533
|
-
}
|
|
1534
|
-
static get formAssociated() { return true; }
|
|
1535
|
-
get host() { return index.getElement(this); }
|
|
1536
|
-
static get watchers() { return {
|
|
1537
|
-
"name": ["elementNameChangedHandler"],
|
|
1538
|
-
"selectedConfiguration": ["selectedConfigurationChangedHandler"],
|
|
1539
|
-
"durationMinutes": ["durationMinutesChangedHandler"]
|
|
1540
|
-
}; }
|
|
1541
|
-
};
|
|
1542
|
-
__decorate$9([
|
|
1543
|
-
registerComponent.RegisterComponent({
|
|
1544
|
-
name: 'nylas-event-duration',
|
|
1545
|
-
stateToProps: new Map([['schedulerConfig.selectedConfiguration', 'selectedConfiguration']]),
|
|
1546
|
-
eventToProps: {},
|
|
1547
|
-
fireRegisterEvent: true,
|
|
1548
|
-
}),
|
|
1549
|
-
__metadata$9("design:type", Function),
|
|
1550
|
-
__metadata$9("design:paramtypes", []),
|
|
1551
|
-
__metadata$9("design:returntype", void 0)
|
|
1552
|
-
], NylasEventDuration.prototype, "render", null);
|
|
1553
|
-
NylasEventDuration.style = NylasEventDurationStyle0;
|
|
1554
|
-
|
|
1555
|
-
const nylasEventInfoCss = ":host{display:block;margin:1rem;--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}.nylas-event-info__title{color:var(--nylas-base-900);font-size:16px;font-style:normal;font-weight:600;line-height:20px;margin:0;text-align:left}.nylas-event-info__subtitle{color:var(--nylas-base-600);font-size:14px;font-style:normal;font-weight:400;line-height:20px;margin:0.25rem 0px 0px;text-align:left}.nylas-event-info__content{padding:1rem;display:flex;flex-direction:column;gap:1rem}.nylas-event-info__block{display:flex;justify-content:space-between;gap:0.5rem}";
|
|
1556
|
-
const NylasEventInfoStyle0 = nylasEventInfoCss;
|
|
1557
|
-
|
|
1558
|
-
var __decorate$8 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
1559
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1560
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
1561
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
1562
|
-
else
|
|
1563
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
1564
|
-
if (d = decorators[i])
|
|
1565
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
1566
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1567
|
-
};
|
|
1568
|
-
var __metadata$8 = (undefined && undefined.__metadata) || function (k, v) {
|
|
1569
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
1570
|
-
return Reflect.metadata(k, v);
|
|
1571
|
-
};
|
|
1572
|
-
const NylasEventInfo = class {
|
|
1573
|
-
constructor(hostRef) {
|
|
1574
|
-
index.registerInstance(this, hostRef);
|
|
1575
|
-
if (hostRef.$hostElement$["s-ei"]) {
|
|
1576
|
-
this.internals = hostRef.$hostElement$["s-ei"];
|
|
1577
|
-
}
|
|
1578
|
-
else {
|
|
1579
|
-
this.internals = hostRef.$hostElement$.attachInternals();
|
|
1580
|
-
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
1581
|
-
}
|
|
1582
|
-
}
|
|
1583
|
-
connectedCallback() {
|
|
1584
|
-
utils.debug('nylas-event-info', 'connectedCallback');
|
|
1585
|
-
}
|
|
1586
|
-
componentWillLoad() {
|
|
1587
|
-
utils.debug('nylas-event-info', 'componentWillLoad');
|
|
1588
|
-
}
|
|
1589
|
-
componentDidLoad() {
|
|
1590
|
-
utils.debug('nylas-event-info', 'componentDidLoad');
|
|
1591
|
-
utils.checkForMissingSlots(['inputs'], this.el);
|
|
1592
|
-
}
|
|
1593
|
-
disconnectedCallback() {
|
|
1594
|
-
utils.debug('nylas-event-info', 'disconnectedCallback');
|
|
1595
|
-
}
|
|
1596
|
-
render() {
|
|
1597
|
-
return (index.h(index.Host, { key: 'adf72357920be8fadb32c683735719e5dbf76883' }, index.h("nylas-form-card", { key: '33823a1bbd57716f9b056f5addba8a5fb316ac93' }, index.h("h1", { key: 'eb14a7f95322992e24dad4e9ff612ffcb7c7634a', slot: "header-title", class: "nylas-event-info__title" }, "Event information"), index.h("h3", { key: '366d9ed654b03ea7bfe9d902240fcd4ad3c2b177', slot: "header-subtitle", class: "nylas-event-info__subtitle" }, "Enter all event information."), index.h("div", { key: 'a6abc2c53dbce1d8d0ad444033d1361171bc5720', slot: "content", class: "nylas-event-info__content" }, index.h("slot", { key: 'c814d4c24582dc76ee96f8e87c9b610a06205273', name: "inputs" })))));
|
|
1598
|
-
}
|
|
1599
|
-
static get formAssociated() { return true; }
|
|
1600
|
-
get el() { return index.getElement(this); }
|
|
1601
|
-
};
|
|
1602
|
-
__decorate$8([
|
|
1603
|
-
registerComponent.RegisterComponent({
|
|
1604
|
-
name: 'nylas-event-info',
|
|
1605
|
-
eventToProps: {},
|
|
1606
|
-
fireRegisterEvent: true,
|
|
1607
|
-
}),
|
|
1608
|
-
__metadata$8("design:type", Function),
|
|
1609
|
-
__metadata$8("design:paramtypes", []),
|
|
1610
|
-
__metadata$8("design:returntype", void 0)
|
|
1611
|
-
], NylasEventInfo.prototype, "render", null);
|
|
1612
|
-
NylasEventInfo.style = NylasEventInfoStyle0;
|
|
1613
|
-
|
|
1614
|
-
const nylasEventLimitsCss = ":host{display:block;margin:1rem;--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}.nylas-event-limits__title{color:var(--nylas-base-900);font-size:16px;font-style:normal;font-weight:600;line-height:20px;margin:0;text-align:left}.nylas-event-limits__subtitle{color:var(--nylas-base-600);font-size:14px;font-style:normal;font-weight:400;line-height:20px;margin:0.25rem 0px 0px;text-align:left}.nylas-event-limits__content{padding:1rem;display:flex;flex-direction:column;gap:1rem}.nylas-event-limits__block{display:flex;justify-content:space-between;gap:0.5rem}";
|
|
1615
|
-
const NylasEventLimitsStyle0 = nylasEventLimitsCss;
|
|
1616
|
-
|
|
1617
|
-
var __decorate$7 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
1618
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1619
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
1620
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
1621
|
-
else
|
|
1622
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
1623
|
-
if (d = decorators[i])
|
|
1624
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
1625
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1626
|
-
};
|
|
1627
|
-
var __metadata$7 = (undefined && undefined.__metadata) || function (k, v) {
|
|
1628
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
1629
|
-
return Reflect.metadata(k, v);
|
|
1630
|
-
};
|
|
1631
|
-
const NylasEventLimits = class {
|
|
1632
|
-
constructor(hostRef) {
|
|
1633
|
-
index.registerInstance(this, hostRef);
|
|
1634
|
-
if (hostRef.$hostElement$["s-ei"]) {
|
|
1635
|
-
this.internals = hostRef.$hostElement$["s-ei"];
|
|
1636
|
-
}
|
|
1637
|
-
else {
|
|
1638
|
-
this.internals = hostRef.$hostElement$.attachInternals();
|
|
1639
|
-
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
1640
|
-
}
|
|
1641
|
-
}
|
|
1642
|
-
connectedCallback() {
|
|
1643
|
-
utils.debug('nylas-event-limits', 'connectedCallback');
|
|
1644
|
-
}
|
|
1645
|
-
componentWillLoad() {
|
|
1646
|
-
utils.debug('nylas-event-limits', 'componentWillLoad');
|
|
1647
|
-
}
|
|
1648
|
-
componentDidLoad() {
|
|
1649
|
-
utils.debug('nylas-event-limits', 'componentDidLoad');
|
|
1650
|
-
utils.checkForMissingSlots(['inputs'], this.el);
|
|
1651
|
-
}
|
|
1652
|
-
disconnectedCallback() {
|
|
1653
|
-
utils.debug('nylas-event-limits', 'disconnectedCallback');
|
|
1654
|
-
}
|
|
1655
|
-
render() {
|
|
1656
|
-
return (index.h(index.Host, { key: '4afbe82f9887a84579e5a16fa628a8785927e19f' }, index.h("nylas-form-card", { key: 'b092de56ed7f3902ed5de970963697e19f47b5ea' }, index.h("h1", { key: 'c1a940f48d1e8daeaa719cfcefc7b5948960ea5c', slot: "header-title", class: "nylas-event-limits__title" }, "Set event limits"), index.h("h3", { key: '68c6426b83df6c15a85f6bae5bc0fd47aa17e8b4', slot: "header-subtitle", class: "nylas-event-limits__subtitle" }, "Customize event limits for the event."), index.h("div", { key: 'e70ed6be6d75a69b9405c38c0ab68accbc799670', slot: "content", class: "nylas-event-limits__content" }, index.h("slot", { key: '7220956029fa2ae7f8ab7f05342ab2ee8d15c15f', name: "inputs" })))));
|
|
1657
|
-
}
|
|
1658
|
-
static get formAssociated() { return true; }
|
|
1659
|
-
get el() { return index.getElement(this); }
|
|
1660
|
-
};
|
|
1661
|
-
__decorate$7([
|
|
1662
|
-
registerComponent.RegisterComponent({
|
|
1663
|
-
name: 'nylas-event-limits',
|
|
1664
|
-
eventToProps: {},
|
|
1665
|
-
fireRegisterEvent: true,
|
|
1666
|
-
}),
|
|
1667
|
-
__metadata$7("design:type", Function),
|
|
1668
|
-
__metadata$7("design:paramtypes", []),
|
|
1669
|
-
__metadata$7("design:returntype", void 0)
|
|
1670
|
-
], NylasEventLimits.prototype, "render", null);
|
|
1671
|
-
NylasEventLimits.style = NylasEventLimitsStyle0;
|
|
1672
|
-
|
|
1673
|
-
const nylasEventLocationCss = ":host{--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}.nylas-event-location{display:flex;flex-direction:column;gap:4px;font-family:var(--nylas-font-family)}.nylas-event-location label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:16px;font-style:normal;font-weight:400;line-height:150%;}.nylas-event-location label span.label-icon{margin-left:4px}.nylas-event-location label span.label-icon tooltip-component{display:flex}.nylas-event-location span[slot=select-icon]{border-right:1px solid var(--nylas-base-200);padding:16px 0.75rem 16px 0.5rem;border-radius:var(--nylas-border-radius-2x);border-bottom-right-radius:0;border-top-right-radius:0;height:20px}.nylas-event-location div.location-input{display:grid;grid-template-columns:auto 1fr;width:100%;gap:0.5rem}@media screen and (max-width: 768px){.nylas-event-location div.location-input{grid-template-columns:1fr}}.nylas-event-location div.location-input input{border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);padding:12px 16px;font-family:var(--nylas-font-family);font-size:16px;line-height:24px}.nylas-event-location select-dropdown{width:208px}@media screen and (max-width: 768px){.nylas-event-location select-dropdown{width:100%}}.nylas-event-location select-dropdown::part(sd_dropdown){width:100%}.nylas-event-location select-dropdown::part(sd_dropdown-content){left:calc(35px + 0.5rem)}.nylas-event-location select-dropdown::part(sd_dropdown-button){display:flex;justify-content:space-between;width:100%;border:1px solid var(--nylas-base-200);padding:0 0.5rem}.nylas-event-location select-dropdown::part(sd_dropdown-button-selected-label){display:inline-flex;align-self:center;padding:14px 0;font-family:var(--nylas-font-family);font-size:16px;line-height:24px}";
|
|
1674
|
-
const NylasEventLocationStyle0 = nylasEventLocationCss;
|
|
1675
|
-
|
|
1676
|
-
var __decorate$6 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
1677
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1678
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
1679
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
1680
|
-
else
|
|
1681
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
1682
|
-
if (d = decorators[i])
|
|
1683
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
1684
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1685
|
-
};
|
|
1686
|
-
var __metadata$6 = (undefined && undefined.__metadata) || function (k, v) {
|
|
1687
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
1688
|
-
return Reflect.metadata(k, v);
|
|
1689
|
-
};
|
|
1690
|
-
const NylasEventLocation = class {
|
|
1691
|
-
constructor(hostRef) {
|
|
1692
|
-
index.registerInstance(this, hostRef);
|
|
1693
|
-
this.valueChanged = index.createEvent(this, "valueChanged", 7);
|
|
1694
|
-
if (hostRef.$hostElement$["s-ei"]) {
|
|
1695
|
-
this.internals = hostRef.$hostElement$["s-ei"];
|
|
1696
|
-
}
|
|
1697
|
-
else {
|
|
1698
|
-
this.internals = hostRef.$hostElement$.attachInternals();
|
|
1699
|
-
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
1700
|
-
}
|
|
1701
|
-
this.name = 'location';
|
|
1702
|
-
this.selectedConfiguration = undefined;
|
|
1703
|
-
this.eventLocation = undefined;
|
|
1704
|
-
this.location = this.eventLocation ?? '';
|
|
1705
|
-
this.selectedLocationOption = this.eventLocation ? 'custom' : 'none';
|
|
1706
|
-
}
|
|
1707
|
-
elementNameChangedHandler(newValue) {
|
|
1708
|
-
utils.debug('nylas-event-location', 'elementNameChangedHandler', newValue);
|
|
1709
|
-
this.host.setAttribute('name', newValue);
|
|
1710
|
-
}
|
|
1711
|
-
selectedConfigurationChangedHandler(newValue, oldValue) {
|
|
1712
|
-
utils.debug('nylas-custom-booking-flow', 'selectedConfigurationChangedHandler', newValue, oldValue);
|
|
1713
|
-
const configLocation = newValue?.event_booking?.location;
|
|
1714
|
-
if (configLocation) {
|
|
1715
|
-
this.selectedLocationOption = configLocation ? 'custom' : 'none';
|
|
1716
|
-
this.location = configLocation;
|
|
1717
|
-
}
|
|
1718
|
-
}
|
|
1719
|
-
eventLocationChangedHandler(newValue, oldValue) {
|
|
1720
|
-
utils.debug('nylas-event-location', 'eventLocationChangedHandler', newValue);
|
|
1721
|
-
if (newValue === oldValue) {
|
|
1722
|
-
return;
|
|
1723
|
-
}
|
|
1724
|
-
this.selectedLocationOption = newValue ? 'custom' : 'none';
|
|
1725
|
-
}
|
|
1726
|
-
connectedCallback() {
|
|
1727
|
-
utils.debug('nylas-event-location', 'connectedCallback');
|
|
1728
|
-
}
|
|
1729
|
-
componentWillLoad() {
|
|
1730
|
-
utils.debug('nylas-event-location', 'componentWillLoad');
|
|
1731
|
-
this.host.setAttribute('name', this.name);
|
|
1732
|
-
}
|
|
1733
|
-
componentDidLoad() {
|
|
1734
|
-
utils.debug('nylas-event-location', 'componentDidLoad');
|
|
1735
|
-
}
|
|
1736
|
-
disconnectedCallback() {
|
|
1737
|
-
utils.debug('nylas-event-location', 'disconnectedCallback');
|
|
1738
|
-
}
|
|
1739
|
-
nylasFormDropdownChangedHandler(event) {
|
|
1740
|
-
this.selectedLocationOption = event.detail.value;
|
|
1741
|
-
if (this.selectedLocationOption === 'none') {
|
|
1742
|
-
this.location = '';
|
|
1743
|
-
this.setFormValue('', 'location');
|
|
1744
|
-
this.valueChanged.emit({ value: '', name: this.name });
|
|
1745
|
-
}
|
|
1746
|
-
}
|
|
1747
|
-
setFormValue(value, name) {
|
|
1748
|
-
if (typeof this.internals.setFormValue === 'function') {
|
|
1749
|
-
this.internals.setFormValue(value, name);
|
|
1750
|
-
}
|
|
1751
|
-
}
|
|
1752
|
-
handleChange(event) {
|
|
1753
|
-
const value = index$1.sanitizeHtml(event.target.value);
|
|
1754
|
-
this.location = value;
|
|
1755
|
-
this.setFormValue(value, 'location');
|
|
1756
|
-
this.valueChanged.emit({ value: value, name: this.name });
|
|
1757
|
-
}
|
|
1758
|
-
render() {
|
|
1759
|
-
const locationOptions = [
|
|
1760
|
-
{ value: 'none', label: 'None' },
|
|
1761
|
-
{ value: 'custom', label: 'Custom location' },
|
|
1762
|
-
];
|
|
1763
|
-
const icons = {
|
|
1764
|
-
none: index.h("location-off-icon", { key: 'b83e4c1ee5292f3261fca8489ec10a6ded3378dc' }),
|
|
1765
|
-
custom: index.h("location-icon", { key: '6ba8c483b7e242b0accf8a55ccb11efc8b4e19a5' }),
|
|
1766
|
-
};
|
|
1767
|
-
return (index.h(index.Host, { key: 'f65e817196207fa0397fb599bc89a8cb72b7e8e1' }, index.h("div", { key: '7410dde44d2b93d0aa655feb0c9dede3b14f3f1e', class: "nylas-event-location", part: "nel" }, index.h("label", { key: '4d158faf262e76e325e1dc35792bc36800a3df6f', htmlFor: "location" }, "Location type", index.h("span", { key: '28b4287f14b80b9a1db726470bf27dd017b3ba37', class: "label-icon" }, index.h("tooltip-component", { key: '65a2db2bdf57377beb1b5b4801a89f5a74320205' }, index.h("info-icon", { key: '350b0f6f2c7f442cc4fb3fdee838c600d271d667', slot: "tooltip-icon" }), index.h("span", { key: '31027673d5cd518b6cbc847c0010f482b0540de6', slot: "tooltip-content" }, "Choose how you\u2019ll meet with the participants at the scheduled time. Pick from available conferencing options or add a custom location.")))), index.h("div", { key: 'a902e62a97f181dcb6b0e0e4daea1ec4c817fe58', class: "location-input" }, index.h("select-dropdown", { key: '5f271d86549b8fa286b630f169e191d4c1d73e3d', withSearch: false, name: "location", options: locationOptions, defaultSelectedOption: locationOptions.find(i => i.value == this.selectedLocationOption), exportparts: "sd_dropdown: nel__dropdown, sd_dropdown-button: nel__dropdown-button, sd_dropdown-content: nel__dropdown-content" }, index.h("span", { key: 'cdc3f3fcdf971ffe3495f085b39cac2a1e77df11', slot: "select-icon" }, icons[this.selectedLocationOption])), this.selectedLocationOption === 'custom' && (index.h("input", { type: "text", part: "nel__location", id: "location", name: "location", maxlength: "1024", value: this.location, onInput: e => this.handleChange(e) }))))));
|
|
1768
|
-
}
|
|
1769
|
-
static get formAssociated() { return true; }
|
|
1770
|
-
get host() { return index.getElement(this); }
|
|
1771
|
-
static get watchers() { return {
|
|
1772
|
-
"name": ["elementNameChangedHandler"],
|
|
1773
|
-
"selectedConfiguration": ["selectedConfigurationChangedHandler"],
|
|
1774
|
-
"eventLocation": ["eventLocationChangedHandler"]
|
|
1775
|
-
}; }
|
|
1776
|
-
};
|
|
1777
|
-
__decorate$6([
|
|
1778
|
-
registerComponent.RegisterComponent({
|
|
1779
|
-
name: 'nylas-event-location',
|
|
1780
|
-
stateToProps: new Map([['schedulerConfig.selectedConfiguration', 'selectedConfiguration']]),
|
|
1781
|
-
eventToProps: {},
|
|
1782
|
-
fireRegisterEvent: true,
|
|
1783
|
-
}),
|
|
1784
|
-
__metadata$6("design:type", Function),
|
|
1785
|
-
__metadata$6("design:paramtypes", []),
|
|
1786
|
-
__metadata$6("design:returntype", void 0)
|
|
1787
|
-
], NylasEventLocation.prototype, "render", null);
|
|
1788
|
-
NylasEventLocation.style = NylasEventLocationStyle0;
|
|
1789
|
-
|
|
1790
|
-
const nylasEventTitleCss = ":host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:\"Inter\", sans-serif}.nylas-event-title{display:flex;flex-direction:column;gap:4px;position:relative;text-align:left}.nylas-event-title div.title{padding:12px 16px;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);overflow:scroll;white-space:nowrap;scrollbar-width:thin}.nylas-event-title div.title::-webkit-scrollbar{width:6px;height:6px}.nylas-event-title div.title.error{border-color:var(--nylas-error);outline:none}.nylas-event-title input{padding:12px 16px;border-width:1;border-radius:8px;border:1px solid var(--nylas-base-200)}.nylas-event-title span.help-text{color:var(--nylas-base-800);font-size:14px;font-style:normal;font-weight:400;line-height:21px}.nylas-event-title span.error-message{color:var(--nylas-error)}.nylas-event-title label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:16px;font-style:normal;font-weight:400;line-height:150%;}.nylas-event-title label span.required{color:var(--nylas-error, #cc4841)}.nylas-event-title label span.label-icon{margin-left:4px}.nylas-event-title label span.label-icon tooltip-component{display:flex}.highlighted-tag{background-color:var(--nylas-base-200);border-radius:var(--nylas-border-radius);padding:5px;margin-left:4px}.token-options{display:block;background-color:var(--nylas-base-0);width:100%;max-height:336px;overflow:auto;z-index:1;border-radius:4px;position:absolute;top:80px;box-shadow:0px 4px 6px -2px rgba(0, 0, 0, 0.0509803922);box-shadow:0px 10px 15px -3px rgba(0, 0, 0, 0.1019607843)}@media screen and (max-width: 768px){.token-options{right:0;width:325px;max-width:unset}}.token-options ul{padding:0;list-style-type:none;color:var(--nylas-base-900);max-height:336px;margin:0}.token-options ul li{padding:16px, 12px, 16px, 12px;color:black;padding:12px 16px;text-decoration:none;display:block;font-family:inherit;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0px;text-align:left;cursor:pointer}.token-options ul li .token-label{display:flex;flex-direction:column;font-weight:400}.token-options ul li .token-label .token{color:var(--nylas-abse-900);font-size:16px;line-height:24px}.token-options ul li .token-label .description{color:var(--nylas-base-600);font-size:14px;line-height:21px}.token-options ul li:hover,.token-options ul li:focus,.token-options ul li:active,.token-options ul li.active{background-color:var(--nylas-base-100)}.token-options ul li:hover .token-label .token,.token-options ul li:focus .token-label .token,.token-options ul li:active .token-label .token,.token-options ul li.active .token-label .token{color:var(--nylas-primary)}.token-options .selected{background-color:var(--nylas-base-100)}";
|
|
1791
|
-
const NylasEventTitleStyle0 = nylasEventTitleCss;
|
|
1792
|
-
|
|
1793
|
-
var __decorate$5 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
1794
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1795
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
1796
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
1797
|
-
else
|
|
1798
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
1799
|
-
if (d = decorators[i])
|
|
1800
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
1801
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1802
|
-
};
|
|
1803
|
-
var __metadata$5 = (undefined && undefined.__metadata) || function (k, v) {
|
|
1804
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
1805
|
-
return Reflect.metadata(k, v);
|
|
1806
|
-
};
|
|
1807
|
-
const NylasEventTitle = class {
|
|
1808
|
-
constructor(hostRef) {
|
|
1809
|
-
index.registerInstance(this, hostRef);
|
|
1810
|
-
this.valueChanged = index.createEvent(this, "valueChanged", 7);
|
|
1811
|
-
if (hostRef.$hostElement$["s-ei"]) {
|
|
1812
|
-
this.internals = hostRef.$hostElement$["s-ei"];
|
|
1813
|
-
}
|
|
1814
|
-
else {
|
|
1815
|
-
this.internals = hostRef.$hostElement$.attachInternals();
|
|
1816
|
-
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
1817
|
-
}
|
|
1818
|
-
this.selectedConfiguration = undefined;
|
|
1819
|
-
this.eventTitle = this.selectedConfiguration?.event_booking?.title;
|
|
1820
|
-
this.name = 'title';
|
|
1821
|
-
this.showTokens = false;
|
|
1822
|
-
this.availableTokens = constants.EVENT_TITLE_TOKENS.map(token => ({
|
|
1823
|
-
label: token.token,
|
|
1824
|
-
value: token.value,
|
|
1825
|
-
labelHTML: token,
|
|
1826
|
-
}));
|
|
1827
|
-
this.filteredTokens = this.availableTokens;
|
|
1828
|
-
this.ariaActivedescendant = '';
|
|
1829
|
-
this.currentWord = { $value: '', fullText: '', index: -1, focusOffset: -1 };
|
|
1830
|
-
this.validationError = '';
|
|
1831
|
-
}
|
|
1832
|
-
elementNameChangedHandler(newValue) {
|
|
1833
|
-
utils.debug('nylas-event-title', 'elementNameChangedHandler', newValue);
|
|
1834
|
-
this.host.setAttribute('name', newValue);
|
|
1835
|
-
}
|
|
1836
|
-
ariaActivedescendantChangedHandler(newValue) {
|
|
1837
|
-
utils.debug('nylas-event-title', 'ariaActivedescendantChangedHandler', newValue);
|
|
1838
|
-
if (newValue !== '') {
|
|
1839
|
-
const activeOption = this.host.shadowRoot?.getElementById(newValue);
|
|
1840
|
-
activeOption?.classList.add('active');
|
|
1841
|
-
}
|
|
1842
|
-
else {
|
|
1843
|
-
const options = this.host.shadowRoot?.querySelectorAll('.token-options li.active');
|
|
1844
|
-
options?.forEach(option => option.classList.remove('active'));
|
|
1845
|
-
}
|
|
1846
|
-
}
|
|
1847
|
-
configChangedHandler(newVal) {
|
|
1848
|
-
const title = newVal?.event_booking?.title;
|
|
1849
|
-
if (title) {
|
|
1850
|
-
this.updateEventTitleFromProp(title);
|
|
1851
|
-
}
|
|
1852
|
-
}
|
|
1853
|
-
connectedCallback() {
|
|
1854
|
-
utils.debug('nylas-event-title', 'connectedCallback');
|
|
1855
|
-
}
|
|
1856
|
-
componentWillLoad() {
|
|
1857
|
-
utils.debug('nylas-event-title', 'componentWillLoad');
|
|
1858
|
-
this.host.setAttribute('name', this.name);
|
|
1859
|
-
}
|
|
1860
|
-
componentDidLoad() {
|
|
1861
|
-
utils.debug('nylas-event-title', 'componentDidLoad');
|
|
1862
|
-
this.updateEventTitleFromProp(this.eventTitle || '');
|
|
1863
|
-
}
|
|
1864
|
-
disconnectedCallback() {
|
|
1865
|
-
utils.debug('nylas-event-title', 'disconnectedCallback');
|
|
1866
|
-
}
|
|
1867
|
-
formSubmittedHandler(event) {
|
|
1868
|
-
utils.debug('nylas-event-title', 'formSubmittedHandler', event);
|
|
1869
|
-
if (!this.internals?.validity?.valid) {
|
|
1870
|
-
this.validationError = 'Event title is required';
|
|
1871
|
-
}
|
|
1872
|
-
else {
|
|
1873
|
-
this.validationError = '';
|
|
1874
|
-
}
|
|
1875
|
-
}
|
|
1876
|
-
updateEventTitleFromProp(newValue) {
|
|
1877
|
-
utils.debug('nylas-event-title', 'eventTitleChangedHandler', newValue);
|
|
1878
|
-
if (this.titleRef) {
|
|
1879
|
-
this.titleRef.innerHTML = this.highlightTokens(newValue);
|
|
1880
|
-
this.titleRef.focus();
|
|
1881
|
-
if (typeof this.internals.setValidity === 'function') {
|
|
1882
|
-
if (newValue === '') {
|
|
1883
|
-
this.internals?.setValidity({ customError: true }, `Event title is required`, this.titleRef);
|
|
1884
|
-
}
|
|
1885
|
-
else {
|
|
1886
|
-
this.internals?.setValidity({ customError: false });
|
|
1887
|
-
}
|
|
1888
|
-
}
|
|
1889
|
-
}
|
|
1890
|
-
}
|
|
1891
|
-
highlightTokens(title) {
|
|
1892
|
-
let outputHtml = title;
|
|
1893
|
-
constants.EVENT_TITLE_TOKENS.forEach(tokenObj => {
|
|
1894
|
-
const token = tokenObj.value;
|
|
1895
|
-
const regex = new RegExp(`(\\${token})(?!\\w)`, 'g');
|
|
1896
|
-
outputHtml = outputHtml.replace(regex, '<span class="highlighted-tag">$1</span>');
|
|
1897
|
-
});
|
|
1898
|
-
return outputHtml;
|
|
1899
|
-
}
|
|
1900
|
-
getCurrentSelectionForBrowser() {
|
|
1901
|
-
const getSelectionTextData = (nodeValue, offset, node, allSelected) => {
|
|
1902
|
-
const text = nodeValue.replace(/[\u200B-\u200D\uFEFF]/g, '');
|
|
1903
|
-
const dollarIndex = text.lastIndexOf('$');
|
|
1904
|
-
const lastWord = text.substring(dollarIndex).split(' ')[0];
|
|
1905
|
-
return {
|
|
1906
|
-
focusOffset: offset,
|
|
1907
|
-
dollarIndex,
|
|
1908
|
-
lastWord,
|
|
1909
|
-
currentText: text,
|
|
1910
|
-
node,
|
|
1911
|
-
allSelected,
|
|
1912
|
-
};
|
|
1913
|
-
};
|
|
1914
|
-
const isAllSelected = (selection) => selection.anchorOffset === 0 && selection.focusOffset === selection.focusNode?.nodeValue?.length;
|
|
1915
|
-
const currentBrowser = utils.getBrowser();
|
|
1916
|
-
switch (currentBrowser) {
|
|
1917
|
-
case 'Chrome':
|
|
1918
|
-
const shadowRootSelection = this.host.shadowRoot?.getSelection();
|
|
1919
|
-
const focusNode = shadowRootSelection?.focusNode;
|
|
1920
|
-
const focusNodeValue = focusNode?.nodeValue || '';
|
|
1921
|
-
const allSelected = shadowRootSelection && isAllSelected(shadowRootSelection);
|
|
1922
|
-
return getSelectionTextData(focusNodeValue, shadowRootSelection?.focusOffset || -1, focusNode, allSelected);
|
|
1923
|
-
case 'Firefox':
|
|
1924
|
-
const selection = document.getSelection();
|
|
1925
|
-
const anchorNodeValue = selection?.anchorNode?.nodeValue || '';
|
|
1926
|
-
const allSelectedFirefox = selection && isAllSelected(selection);
|
|
1927
|
-
return getSelectionTextData(anchorNodeValue, selection?.focusOffset || -1, selection?.anchorNode, allSelectedFirefox);
|
|
1928
|
-
case 'Safari':
|
|
1929
|
-
const windowSelection = window.getSelection();
|
|
1930
|
-
const anchorNode = windowSelection?.getComposedRanges(this.host.shadowRoot)[0];
|
|
1931
|
-
const currentText = anchorNode?.startContainer?.nodeValue || '';
|
|
1932
|
-
const allSelectedSafari = windowSelection && isAllSelected(windowSelection);
|
|
1933
|
-
return getSelectionTextData(currentText, anchorNode?.endOffset || -1, anchorNode?.startContainer, allSelectedSafari);
|
|
1934
|
-
default:
|
|
1935
|
-
console.warn('Browser not supported');
|
|
1936
|
-
return null;
|
|
1937
|
-
}
|
|
1938
|
-
}
|
|
1939
|
-
handleChange(event) {
|
|
1940
|
-
let textContent = event.target.textContent || '';
|
|
1941
|
-
textContent = index$1.sanitizeHtml(textContent);
|
|
1942
|
-
const currentSelection = this.getCurrentSelectionForBrowser();
|
|
1943
|
-
if (!currentSelection) {
|
|
1944
|
-
this.updateEventTitle(textContent);
|
|
1945
|
-
this.resetDropdown();
|
|
1946
|
-
return;
|
|
1947
|
-
}
|
|
1948
|
-
const { focusOffset, dollarIndex, lastWord, currentText } = currentSelection;
|
|
1949
|
-
if (dollarIndex === -1 || focusOffset < dollarIndex) {
|
|
1950
|
-
this.updateEventTitle(textContent);
|
|
1951
|
-
this.resetDropdown();
|
|
1952
|
-
return;
|
|
1953
|
-
}
|
|
1954
|
-
if (lastWord.startsWith('$')) {
|
|
1955
|
-
this.showTokens = true;
|
|
1956
|
-
this.currentWord = {
|
|
1957
|
-
$value: lastWord,
|
|
1958
|
-
fullText: currentText,
|
|
1959
|
-
index: dollarIndex,
|
|
1960
|
-
focusOffset,
|
|
1961
|
-
};
|
|
1962
|
-
this.populateSuggestionsDropdown(lastWord);
|
|
1963
|
-
}
|
|
1964
|
-
else {
|
|
1965
|
-
this.resetDropdown();
|
|
1966
|
-
}
|
|
1967
|
-
this.updateEventTitle(textContent);
|
|
1968
|
-
}
|
|
1969
|
-
handleInputKeyDown(event) {
|
|
1970
|
-
const selection = this.getCurrentSelectionForBrowser();
|
|
1971
|
-
if (selection?.allSelected && !utils.isNonPrintableKey(event)) {
|
|
1972
|
-
this.titleRef.innerHTML = '';
|
|
1973
|
-
}
|
|
1974
|
-
if (event.key === 'Enter') {
|
|
1975
|
-
event.preventDefault();
|
|
1976
|
-
const activeOption = this.host.shadowRoot?.getElementById(this.ariaActivedescendant);
|
|
1977
|
-
if (activeOption) {
|
|
1978
|
-
activeOption.click();
|
|
1979
|
-
this.ariaActivedescendant = '';
|
|
1980
|
-
}
|
|
1981
|
-
}
|
|
1982
|
-
else if (event.key === 'ArrowDown') {
|
|
1983
|
-
event.preventDefault();
|
|
1984
|
-
const activeOption = this.host.shadowRoot?.getElementById(this.ariaActivedescendant);
|
|
1985
|
-
if (activeOption) {
|
|
1986
|
-
const nextOption = activeOption.nextElementSibling;
|
|
1987
|
-
if (nextOption) {
|
|
1988
|
-
this.ariaActivedescendant = nextOption.id;
|
|
1989
|
-
}
|
|
1990
|
-
else {
|
|
1991
|
-
this.ariaActivedescendant = this.filteredTokens[0].label;
|
|
1992
|
-
}
|
|
1993
|
-
}
|
|
1994
|
-
else {
|
|
1995
|
-
this.ariaActivedescendant = this.filteredTokens[0].label;
|
|
1996
|
-
}
|
|
1997
|
-
}
|
|
1998
|
-
else if (event.key === 'ArrowUp') {
|
|
1999
|
-
event.preventDefault();
|
|
2000
|
-
const activeOption = this.host.shadowRoot?.getElementById(this.ariaActivedescendant);
|
|
2001
|
-
if (activeOption) {
|
|
2002
|
-
const prevOption = activeOption.previousElementSibling;
|
|
2003
|
-
if (prevOption) {
|
|
2004
|
-
this.ariaActivedescendant = prevOption.id;
|
|
2005
|
-
}
|
|
2006
|
-
else {
|
|
2007
|
-
this.ariaActivedescendant = this.filteredTokens[this.filteredTokens.length - 1].label;
|
|
2008
|
-
}
|
|
2009
|
-
}
|
|
2010
|
-
else {
|
|
2011
|
-
this.ariaActivedescendant = this.filteredTokens[this.filteredTokens.length - 1].label;
|
|
2012
|
-
}
|
|
2013
|
-
}
|
|
2014
|
-
else if (event.key === 'Escape') {
|
|
2015
|
-
event.preventDefault();
|
|
2016
|
-
this.resetDropdown();
|
|
2017
|
-
}
|
|
2018
|
-
else if (event.key === 'Backspace' || event.key === 'Delete') {
|
|
2019
|
-
if (selection?.currentText.startsWith('${')) {
|
|
2020
|
-
selection?.node?.parentNode && selection.node.parentNode.removeChild(selection.node);
|
|
2021
|
-
}
|
|
2022
|
-
if (this.titleRef.textContent === '' || selection?.currentText === '' || selection?.allSelected) {
|
|
2023
|
-
this.titleRef.innerHTML = '';
|
|
2024
|
-
}
|
|
2025
|
-
}
|
|
2026
|
-
}
|
|
2027
|
-
selectOption(e, option) {
|
|
2028
|
-
e.preventDefault();
|
|
2029
|
-
const word = this.currentWord.fullText;
|
|
2030
|
-
const dollarWord = this.currentWord.$value;
|
|
2031
|
-
let currentNode = this.titleRef.firstChild;
|
|
2032
|
-
let textNode = null;
|
|
2033
|
-
while (currentNode) {
|
|
2034
|
-
if (currentNode.nodeType === 3) {
|
|
2035
|
-
const currentNodeText = currentNode.textContent?.replace(/[\u200B-\u200D\uFEFF]/g, '') || '';
|
|
2036
|
-
const wordText = word.replace(/[\u200B-\u200D\uFEFF]/g, '');
|
|
2037
|
-
if (currentNodeText.includes(wordText)) {
|
|
2038
|
-
textNode = currentNode;
|
|
2039
|
-
break;
|
|
2040
|
-
}
|
|
2041
|
-
}
|
|
2042
|
-
currentNode = currentNode.nextSibling;
|
|
2043
|
-
}
|
|
2044
|
-
if (!textNode) {
|
|
2045
|
-
return;
|
|
2046
|
-
}
|
|
2047
|
-
const text = textNode.textContent || '';
|
|
2048
|
-
const index = text.indexOf(dollarWord);
|
|
2049
|
-
const textBefore = text.substring(0, index);
|
|
2050
|
-
const textAfter = text.substring(index + dollarWord.length);
|
|
2051
|
-
const newTextNode = document.createTextNode(textBefore);
|
|
2052
|
-
const newRange = document.createRange();
|
|
2053
|
-
const tagSpan = document.createElement('span');
|
|
2054
|
-
tagSpan.classList.add('highlighted-tag');
|
|
2055
|
-
tagSpan.textContent = `${option.value}`;
|
|
2056
|
-
const newTextNodeAfter = document.createTextNode(textAfter);
|
|
2057
|
-
if (textAfter !== '') {
|
|
2058
|
-
textNode.replaceWith(newTextNode, tagSpan, newTextNodeAfter);
|
|
2059
|
-
newRange.setStart(newTextNodeAfter, 1);
|
|
2060
|
-
}
|
|
2061
|
-
else {
|
|
2062
|
-
const afterNode = document.createTextNode('\u200B');
|
|
2063
|
-
textNode.replaceWith(newTextNode, tagSpan, afterNode);
|
|
2064
|
-
newRange.setStart(afterNode, 1);
|
|
2065
|
-
}
|
|
2066
|
-
this.resetDropdown();
|
|
2067
|
-
this.titleRef.focus();
|
|
2068
|
-
const sel = window.getSelection();
|
|
2069
|
-
newRange.collapse(true);
|
|
2070
|
-
sel?.removeAllRanges();
|
|
2071
|
-
sel?.addRange(newRange);
|
|
2072
|
-
this.updateEventTitle(this.titleRef.textContent || '');
|
|
2073
|
-
}
|
|
2074
|
-
populateSuggestionsDropdown(query = '') {
|
|
2075
|
-
this.filteredTokens = this.availableTokens.filter(obj => {
|
|
2076
|
-
return obj.label.startsWith(query.toString()) || obj.value.startsWith(query.toString());
|
|
2077
|
-
});
|
|
2078
|
-
if (this.filteredTokens.length > 0) {
|
|
2079
|
-
this.ariaActivedescendant = this.filteredTokens[0].label;
|
|
2080
|
-
}
|
|
2081
|
-
}
|
|
2082
|
-
updateEventTitle(text) {
|
|
2083
|
-
const value = text.replace(/ +/g, ' ');
|
|
2084
|
-
if (value === '') {
|
|
2085
|
-
this.internals?.setValidity({ customError: true }, `Event title is required`, this.titleRef);
|
|
2086
|
-
this.validationError = 'Event title is required';
|
|
2087
|
-
}
|
|
2088
|
-
else {
|
|
2089
|
-
this.internals?.setValidity({ customError: false });
|
|
2090
|
-
this.validationError = '';
|
|
2091
|
-
}
|
|
2092
|
-
this.internals?.setFormValue(value, this.name);
|
|
2093
|
-
this.valueChanged.emit({ value: value, name: this.name });
|
|
2094
|
-
}
|
|
2095
|
-
resetDropdown() {
|
|
2096
|
-
this.showTokens = false;
|
|
2097
|
-
this.ariaActivedescendant = '';
|
|
2098
|
-
}
|
|
2099
|
-
getLabelHTML(token) {
|
|
2100
|
-
return (index.h("div", { class: "token-label" }, index.h("span", { class: "token" }, token.token), index.h("span", { class: "description" }, token.description)));
|
|
2101
|
-
}
|
|
2102
|
-
render() {
|
|
2103
|
-
return (index.h(index.Host, { key: 'ec414f2f4c738230078bed7b7c5477ba5fdbcb70' }, index.h("div", { key: '17f665e5f307c1b6510891e76daa765449958c3e', class: "nylas-event-title", part: "net" }, index.h("label", { key: 'e4beac83e857bab219ec4276238f7953645c4711', htmlFor: "title" }, "Event title", index.h("span", { key: '3033d6ef407f2a3df94dc1f80be2f5e3c378abd0', class: "required" }, "*"), index.h("span", { key: '29dba11e88726329513ef15078eba34f103914de', class: "label-icon" }, index.h("tooltip-component", { key: '29a373fc979f15eb3527b9e5a446bd7518ee4562' }, index.h("info-icon", { key: '12f9a0190185b96a2090cdb0ca7a43f6342cc016', slot: "tooltip-icon" }), index.h("span", { key: 'dd6e505591f9cded5bc70a812e448b44f1faa4e1', slot: "tooltip-content" }, "Enter a title for your event.")))), index.h("div", { key: '87807255004e909850b93d600b636d2d2e1d8ed1', class: {
|
|
2104
|
-
title: true,
|
|
2105
|
-
error: this.validationError !== '',
|
|
2106
|
-
}, part: "net__title", ref: el => (this.titleRef = el), contentEditable: "true", onInput: e => this.handleChange(e), onKeyDown: event => this.handleInputKeyDown(event) }), this.showTokens && this.filteredTokens?.length > 0 && (index.h("div", { class: "token-options", part: "net__dropdown-content" }, index.h("ul", { tabindex: "-1", role: "listbox", "aria-label": this.name, "aria-activedescendant": this.ariaActivedescendant }, this.filteredTokens.map(option => (index.h("li", { tabindex: "0", key: option.label, id: option.label, class: { active: this.ariaActivedescendant === option.label }, onClick: e => this.selectOption(e, option), role: "option" }, this.getLabelHTML(option.labelHTML))))))), index.h("span", { key: '3ba87900ffbc4b69c5f9fac01a8f9f577dd034c5', class: "help-text" }, "Create a dynamic templated event title by typing $. Learn more"), this.validationError != '' && index.h("span", { class: "error-message" }, this.validationError))));
|
|
2107
|
-
}
|
|
2108
|
-
static get formAssociated() { return true; }
|
|
2109
|
-
get host() { return index.getElement(this); }
|
|
2110
|
-
static get watchers() { return {
|
|
2111
|
-
"name": ["elementNameChangedHandler"],
|
|
2112
|
-
"ariaActivedescendant": ["ariaActivedescendantChangedHandler"],
|
|
2113
|
-
"selectedConfiguration": ["configChangedHandler"]
|
|
2114
|
-
}; }
|
|
2115
|
-
};
|
|
2116
|
-
__decorate$5([
|
|
2117
|
-
registerComponent.RegisterComponent({
|
|
2118
|
-
name: 'nylas-event-title',
|
|
2119
|
-
stateToProps: new Map([['schedulerConfig.selectedConfiguration', 'selectedConfiguration']]),
|
|
2120
|
-
eventToProps: {},
|
|
2121
|
-
fireRegisterEvent: true,
|
|
2122
|
-
}),
|
|
2123
|
-
__metadata$5("design:type", Function),
|
|
2124
|
-
__metadata$5("design:paramtypes", []),
|
|
2125
|
-
__metadata$5("design:returntype", void 0)
|
|
2126
|
-
], NylasEventTitle.prototype, "render", null);
|
|
2127
|
-
NylasEventTitle.style = NylasEventTitleStyle0;
|
|
2128
|
-
|
|
2129
|
-
const nylasLimitFutureBookingsCss = ":host{--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}.nylas-limit-future-bookings{display:flex;justify-content:space-between;font-family:var(--nylas-font-family)}@media screen and (max-width: 768px){.nylas-limit-future-bookings{flex-direction:column;gap:0.5rem}}.nylas-limit-future-bookings label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:16px;font-style:normal;font-weight:400;line-height:150%;}.nylas-limit-future-bookings label span.label-icon{margin-left:4px}.nylas-limit-future-bookings label span.label-icon tooltip-component{display:flex}select-dropdown::part(sd_dropdown-button){border:none}";
|
|
2130
|
-
const NylasLimitFutureBookingsStyle0 = nylasLimitFutureBookingsCss;
|
|
2131
|
-
|
|
2132
|
-
var __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
2133
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2134
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
2135
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
2136
|
-
else
|
|
2137
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
2138
|
-
if (d = decorators[i])
|
|
2139
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2140
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2141
|
-
};
|
|
2142
|
-
var __metadata$4 = (undefined && undefined.__metadata) || function (k, v) {
|
|
2143
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
2144
|
-
return Reflect.metadata(k, v);
|
|
2145
|
-
};
|
|
2146
|
-
const NylasLimitFutureBookings = class {
|
|
2147
|
-
constructor(hostRef) {
|
|
2148
|
-
index.registerInstance(this, hostRef);
|
|
2149
|
-
this.valueChanged = index.createEvent(this, "valueChanged", 7);
|
|
2150
|
-
if (hostRef.$hostElement$["s-ei"]) {
|
|
2151
|
-
this.internals = hostRef.$hostElement$["s-ei"];
|
|
2152
|
-
}
|
|
2153
|
-
else {
|
|
2154
|
-
this.internals = hostRef.$hostElement$.attachInternals();
|
|
2155
|
-
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
2156
|
-
}
|
|
2157
|
-
this.selectedConfiguration = undefined;
|
|
2158
|
-
this.availableDaysInFuture = undefined;
|
|
2159
|
-
this.name = 'limit-future-bookings';
|
|
2160
|
-
this.selectedNumber = 1;
|
|
2161
|
-
this.selectedPeriod = 'day';
|
|
2162
|
-
}
|
|
2163
|
-
elementNameChangedHandler(newValue) {
|
|
2164
|
-
utils.debug('nylas-limit-future-bookings', 'elementNameChangedHandler', newValue);
|
|
2165
|
-
this.host.setAttribute('name', newValue);
|
|
2166
|
-
}
|
|
2167
|
-
selectedConfigurationChangedHandler(newVal) {
|
|
2168
|
-
const daysInFuture = newVal?.scheduler?.available_days_in_future;
|
|
2169
|
-
if (daysInFuture) {
|
|
2170
|
-
this.updateNumberAndPeriodFromDays(daysInFuture);
|
|
2171
|
-
}
|
|
2172
|
-
}
|
|
2173
|
-
availableDaysInFutureChanged(newValue) {
|
|
2174
|
-
this.updateNumberAndPeriodFromDays(newValue);
|
|
2175
|
-
}
|
|
2176
|
-
connectedCallback() {
|
|
2177
|
-
utils.debug('nylas-limit-future-bookings', 'connectedCallback');
|
|
2178
|
-
}
|
|
2179
|
-
componentWillLoad() {
|
|
2180
|
-
utils.debug('nylas-limit-future-bookings', 'componentWillLoad');
|
|
2181
|
-
this.host.setAttribute('name', this.name);
|
|
2182
|
-
}
|
|
2183
|
-
componentDidLoad() {
|
|
2184
|
-
utils.debug('nylas-limit-future-bookings', 'componentDidLoad');
|
|
2185
|
-
this.availableDaysInFutureChanged(this.availableDaysInFuture ?? 1);
|
|
2186
|
-
if (typeof this.internals.setFormValue !== 'function') {
|
|
2187
|
-
return;
|
|
2188
|
-
}
|
|
2189
|
-
this.internals.setFormValue(this.availableDaysInFuture?.toString() ?? '1', this.name);
|
|
2190
|
-
}
|
|
2191
|
-
disconnectedCallback() {
|
|
2192
|
-
utils.debug('nylas-limit-future-bookings', 'disconnectedCallback');
|
|
2193
|
-
}
|
|
2194
|
-
timePeriodChangedHandler(event) {
|
|
2195
|
-
const { number, period } = event.detail;
|
|
2196
|
-
let availableDaysInFuture;
|
|
2197
|
-
if (period === 'day') {
|
|
2198
|
-
availableDaysInFuture = number;
|
|
2199
|
-
}
|
|
2200
|
-
else if (period === 'week') {
|
|
2201
|
-
availableDaysInFuture = number * 7;
|
|
2202
|
-
}
|
|
2203
|
-
else {
|
|
2204
|
-
availableDaysInFuture = number * 30;
|
|
2205
|
-
}
|
|
2206
|
-
this.valueChanged.emit({ value: availableDaysInFuture, name: 'availableDaysInFuture' });
|
|
2207
|
-
if (typeof this.internals.setFormValue !== 'function') {
|
|
2208
|
-
return;
|
|
2209
|
-
}
|
|
2210
|
-
this.internals.setFormValue(availableDaysInFuture.toString(), this.name);
|
|
2211
|
-
}
|
|
2212
|
-
updateNumberAndPeriodFromDays(days) {
|
|
2213
|
-
let number, period;
|
|
2214
|
-
if (days >= 30 && days % 30 === 0) {
|
|
2215
|
-
number = days / 30;
|
|
2216
|
-
period = 'month';
|
|
2217
|
-
}
|
|
2218
|
-
else if (days >= 7 && days % 7 === 0) {
|
|
2219
|
-
number = days / 7;
|
|
2220
|
-
period = 'week';
|
|
2221
|
-
}
|
|
2222
|
-
else {
|
|
2223
|
-
number = days;
|
|
2224
|
-
period = 'day';
|
|
2225
|
-
}
|
|
2226
|
-
this.selectedNumber = number;
|
|
2227
|
-
this.selectedPeriod = period;
|
|
2228
|
-
}
|
|
2229
|
-
render() {
|
|
2230
|
-
return (index.h(index.Host, { key: '9efaf822025f476c80f4c5124f226e45ef9047f9' }, index.h("div", { key: 'acb0ed9bb24d9e789c01127b2343194d47c37c5f', class: "nylas-limit-future-bookings", part: "nlfb" }, index.h("label", { key: 'b4bbe14a0870451be5c7754dbbd3adb029b1d24c' }, "Limit future bookings", index.h("span", { key: 'e1e671d334ec20347852549c4b4d63fa626a2186', class: "label-icon" }, index.h("tooltip-component", { key: '378c5a41fe7920cebd1f9de4ea16873e951584cf' }, index.h("info-icon", { key: 'dee6d8d027c746b19b4de42a7e57754a6dcf0a34', slot: "tooltip-icon" }), index.h("span", { key: 'f128781fb212013489d7db03e7b5fb1a02681b5a', slot: "tooltip-content" }, "Set a limit on how far in the future bookings can be made.")))), index.h("time-period-selector", { key: 'fb00fd64c7dec2beb976132a397bb067e72c0cc3', id: "limit-future-bookings", timePeriods: ['day', 'week', 'month'], exportparts: "tps__number-dropdown: nlfb__number-dropdown, tps__number-dropdown-button: nlfb__number-dropdown-button, tps__number-dropdown-content: nlfb__number-dropdown-content, tps__period-dropdown: nlfb__period-dropdown, tps__period-dropdown-button: nlfb__period-dropdown-button, tps__period-dropdown-content: nlfb__period-dropdown-content", defaultSelectedNumber: this.selectedNumber, defaultSelectedPeriod: this.selectedPeriod }))));
|
|
2231
|
-
}
|
|
2232
|
-
static get formAssociated() { return true; }
|
|
2233
|
-
get host() { return index.getElement(this); }
|
|
2234
|
-
static get watchers() { return {
|
|
2235
|
-
"name": ["elementNameChangedHandler"],
|
|
2236
|
-
"selectedConfiguration": ["selectedConfigurationChangedHandler"],
|
|
2237
|
-
"availableDaysInFuture": ["availableDaysInFutureChanged"]
|
|
2238
|
-
}; }
|
|
2239
|
-
};
|
|
2240
|
-
__decorate$4([
|
|
2241
|
-
registerComponent.RegisterComponent({
|
|
2242
|
-
name: 'nylas-limit-future-bookings',
|
|
2243
|
-
stateToProps: new Map([['schedulerConfig.selectedConfiguration', 'selectedConfiguration']]),
|
|
2244
|
-
eventToProps: {},
|
|
2245
|
-
fireRegisterEvent: true,
|
|
2246
|
-
}),
|
|
2247
|
-
__metadata$4("design:type", Function),
|
|
2248
|
-
__metadata$4("design:paramtypes", []),
|
|
2249
|
-
__metadata$4("design:returntype", void 0)
|
|
2250
|
-
], NylasLimitFutureBookings.prototype, "render", null);
|
|
2251
|
-
NylasLimitFutureBookings.style = NylasLimitFutureBookingsStyle0;
|
|
2252
|
-
|
|
2253
|
-
const nylasMinBookingNoticeCss = ":host{--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}.nylas-min-booking-notice{display:flex;justify-content:space-between;font-family:var(--nylas-font-family)}@media screen and (max-width: 768px){.nylas-min-booking-notice{flex-direction:column;gap:0.5rem}}.nylas-min-booking-notice label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:16px;font-style:normal;font-weight:400;line-height:150%;}.nylas-min-booking-notice label span.label-icon{margin-left:4px}.nylas-min-booking-notice label span.label-icon tooltip-component{display:flex}select-dropdown::part(sd_dropdown-button){border:none}";
|
|
2254
|
-
const NylasMinBookingNoticeStyle0 = nylasMinBookingNoticeCss;
|
|
2255
|
-
|
|
2256
|
-
var __decorate$3 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
2257
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2258
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
2259
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
2260
|
-
else
|
|
2261
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
2262
|
-
if (d = decorators[i])
|
|
2263
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2264
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2265
|
-
};
|
|
2266
|
-
var __metadata$3 = (undefined && undefined.__metadata) || function (k, v) {
|
|
2267
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
2268
|
-
return Reflect.metadata(k, v);
|
|
2269
|
-
};
|
|
2270
|
-
const NylasMinBookingNotice = class {
|
|
2271
|
-
constructor(hostRef) {
|
|
2272
|
-
index.registerInstance(this, hostRef);
|
|
2273
|
-
this.valueChanged = index.createEvent(this, "valueChanged", 7);
|
|
2274
|
-
if (hostRef.$hostElement$["s-ei"]) {
|
|
2275
|
-
this.internals = hostRef.$hostElement$["s-ei"];
|
|
2276
|
-
}
|
|
2277
|
-
else {
|
|
2278
|
-
this.internals = hostRef.$hostElement$.attachInternals();
|
|
2279
|
-
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
2280
|
-
}
|
|
2281
|
-
this.selectedConfiguration = undefined;
|
|
2282
|
-
this.minBookingNotice = undefined;
|
|
2283
|
-
this.name = 'min-booking-notice';
|
|
2284
|
-
this.selectedNumber = 1;
|
|
2285
|
-
this.selectedPeriod = 'hour';
|
|
2286
|
-
}
|
|
2287
|
-
elementNameChangedHandler(newValue) {
|
|
2288
|
-
utils.debug('nylas-min-booking-notice', 'elementNameChangedHandler', newValue);
|
|
2289
|
-
this.host.setAttribute('name', newValue);
|
|
2290
|
-
}
|
|
2291
|
-
selectedConfigurationChangedHandler(newVal) {
|
|
2292
|
-
const minBookingNotice = newVal?.scheduler?.min_booking_notice;
|
|
2293
|
-
if (minBookingNotice) {
|
|
2294
|
-
this.updateNumberAndPeriodFromMinutes(minBookingNotice);
|
|
2295
|
-
}
|
|
2296
|
-
}
|
|
2297
|
-
availableDaysInFutureChanged(newValue) {
|
|
2298
|
-
this.updateNumberAndPeriodFromMinutes(newValue);
|
|
2299
|
-
}
|
|
2300
|
-
connectedCallback() {
|
|
2301
|
-
utils.debug('nylas-min-booking-notice', 'connectedCallback');
|
|
2302
|
-
}
|
|
2303
|
-
componentWillLoad() {
|
|
2304
|
-
utils.debug('nylas-min-booking-notice', 'componentWillLoad');
|
|
2305
|
-
this.host.setAttribute('name', this.name);
|
|
2306
|
-
}
|
|
2307
|
-
componentDidLoad() {
|
|
2308
|
-
utils.debug('nylas-min-booking-notice', 'componentDidLoad');
|
|
2309
|
-
this.availableDaysInFutureChanged(this.minBookingNotice ?? 1);
|
|
2310
|
-
if (typeof this.internals.setFormValue !== 'function') {
|
|
2311
|
-
return;
|
|
2312
|
-
}
|
|
2313
|
-
this.internals.setFormValue(this.minBookingNotice?.toString() ?? '1', this.name);
|
|
2314
|
-
}
|
|
2315
|
-
disconnectedCallback() {
|
|
2316
|
-
utils.debug('nylas-min-booking-notice', 'disconnectedCallback');
|
|
2317
|
-
}
|
|
2318
|
-
timePeriodChangedHandler(event) {
|
|
2319
|
-
const { number, period } = event.detail;
|
|
2320
|
-
let totalMinutes;
|
|
2321
|
-
const minutesInHour = 60;
|
|
2322
|
-
const minutesInDay = minutesInHour * 24;
|
|
2323
|
-
const minutesInWeek = minutesInDay * 7;
|
|
2324
|
-
const minutesInMonth = minutesInDay * 30;
|
|
2325
|
-
if (period === 'minute') {
|
|
2326
|
-
totalMinutes = number;
|
|
2327
|
-
}
|
|
2328
|
-
else if (period === 'hour') {
|
|
2329
|
-
totalMinutes = number * minutesInHour;
|
|
2330
|
-
}
|
|
2331
|
-
else if (period === 'day') {
|
|
2332
|
-
totalMinutes = number * minutesInDay;
|
|
2333
|
-
}
|
|
2334
|
-
else if (period === 'week') {
|
|
2335
|
-
totalMinutes = number * minutesInWeek;
|
|
2336
|
-
}
|
|
2337
|
-
else if (period === 'month') {
|
|
2338
|
-
totalMinutes = number * minutesInMonth;
|
|
2339
|
-
}
|
|
2340
|
-
else {
|
|
2341
|
-
totalMinutes = 0;
|
|
2342
|
-
}
|
|
2343
|
-
this.valueChanged.emit({ value: totalMinutes, name: 'minBookingNotice' });
|
|
2344
|
-
if (typeof this.internals.setFormValue !== 'function') {
|
|
2345
|
-
return;
|
|
2346
|
-
}
|
|
2347
|
-
this.internals.setFormValue(totalMinutes.toString(), this.name);
|
|
2348
|
-
}
|
|
2349
|
-
updateNumberAndPeriodFromMinutes(minutes) {
|
|
2350
|
-
const minutesInHour = 60;
|
|
2351
|
-
const minutesInDay = minutesInHour * 24;
|
|
2352
|
-
const minutesInWeek = minutesInDay * 7;
|
|
2353
|
-
const minutesInMonth = minutesInDay * 30;
|
|
2354
|
-
let number, period;
|
|
2355
|
-
if (minutes >= minutesInMonth) {
|
|
2356
|
-
number = Math.floor(minutes / minutesInMonth);
|
|
2357
|
-
period = 'month';
|
|
2358
|
-
}
|
|
2359
|
-
else if (minutes >= minutesInWeek) {
|
|
2360
|
-
number = Math.floor(minutes / minutesInWeek);
|
|
2361
|
-
period = 'week';
|
|
2362
|
-
}
|
|
2363
|
-
else if (minutes >= minutesInDay) {
|
|
2364
|
-
number = Math.floor(minutes / minutesInDay);
|
|
2365
|
-
period = 'day';
|
|
2366
|
-
}
|
|
2367
|
-
else if (minutes >= minutesInHour) {
|
|
2368
|
-
number = Math.floor(minutes / minutesInHour);
|
|
2369
|
-
period = 'hour';
|
|
2370
|
-
}
|
|
2371
|
-
else {
|
|
2372
|
-
number = minutes;
|
|
2373
|
-
period = 'minute';
|
|
2374
|
-
}
|
|
2375
|
-
this.selectedNumber = number;
|
|
2376
|
-
this.selectedPeriod = period;
|
|
2377
|
-
}
|
|
2378
|
-
render() {
|
|
2379
|
-
return (index.h(index.Host, { key: 'b00e1ce3adc1082c819774df6888d86fd93b06b6' }, index.h("div", { key: '0cd17759b7e1d3790904fe868addfa02065a3115', class: "nylas-min-booking-notice", part: "nmbn" }, index.h("label", { key: 'c27bc50a60686fb925904c5f86c9f19a7ab8079c' }, "Minimum booking notice", index.h("span", { key: '67b1a1351adbe6265d549501609af036d993920b', class: "label-icon" }, index.h("tooltip-component", { key: '4e64d044707c9fe94aa84caa242a0e034c0a89f7' }, index.h("info-icon", { key: 'bf64b04e4d308449249dae8a19a6c4043f26c1dd', slot: "tooltip-icon" }), index.h("span", { key: '434e31ddf539c4fcb287b198d780b6593808a607', slot: "tooltip-content" }, "The minimum amount of time in the future for planning the event.")))), index.h("time-period-selector", { key: 'efd40f4731319bd7da2aed6995279c8068e505ac', id: "min-booking-notice", exportparts: "tps__number-dropdown: nmbn__number-dropdown, tps__number-dropdown-button: nmbn__number-dropdown-button, tps__number-dropdown-content: nmbn__number-dropdown-content, tps__period-dropdown: nmbn__period-dropdown, tps__period-dropdown-button: nmbn__period-dropdown-button, tps__period-dropdown-content: nmbn__period-dropdown-content", timePeriods: ['minute', 'hour', 'day', 'week'], defaultSelectedNumber: this.selectedNumber, defaultSelectedPeriod: this.selectedPeriod }))));
|
|
2380
|
-
}
|
|
2381
|
-
static get formAssociated() { return true; }
|
|
2382
|
-
get host() { return index.getElement(this); }
|
|
2383
|
-
static get watchers() { return {
|
|
2384
|
-
"name": ["elementNameChangedHandler"],
|
|
2385
|
-
"selectedConfiguration": ["selectedConfigurationChangedHandler"],
|
|
2386
|
-
"availableDaysInFuture": ["availableDaysInFutureChanged"]
|
|
2387
|
-
}; }
|
|
2388
|
-
};
|
|
2389
|
-
__decorate$3([
|
|
2390
|
-
registerComponent.RegisterComponent({
|
|
2391
|
-
name: 'nylas-min-booking-notice',
|
|
2392
|
-
stateToProps: new Map([['schedulerConfig.selectedConfiguration', 'selectedConfiguration']]),
|
|
2393
|
-
eventToProps: {},
|
|
2394
|
-
fireRegisterEvent: true,
|
|
2395
|
-
}),
|
|
2396
|
-
__metadata$3("design:type", Function),
|
|
2397
|
-
__metadata$3("design:paramtypes", []),
|
|
2398
|
-
__metadata$3("design:returntype", void 0)
|
|
2399
|
-
], NylasMinBookingNotice.prototype, "render", null);
|
|
2400
|
-
NylasMinBookingNotice.style = NylasMinBookingNoticeStyle0;
|
|
2401
|
-
|
|
2402
|
-
const nylasMinCancellationNoticeCss = ":host{--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}.nylas-min-cancellation-notice{display:flex;justify-content:space-between;font-family:var(--nylas-font-family)}@media screen and (max-width: 768px){.nylas-min-cancellation-notice{flex-direction:column;gap:0.5rem}}.nylas-min-cancellation-notice label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:16px;font-style:normal;font-weight:400;line-height:150%;}.nylas-min-cancellation-notice label span.label-icon{margin-left:4px}.nylas-min-cancellation-notice label span.label-icon tooltip-component{display:flex}select-dropdown::part(sd_dropdown-button){border:none}";
|
|
2403
|
-
const NylasMinCancellationNoticeStyle0 = nylasMinCancellationNoticeCss;
|
|
2404
|
-
|
|
2405
|
-
var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
2406
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2407
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
2408
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
2409
|
-
else
|
|
2410
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
2411
|
-
if (d = decorators[i])
|
|
2412
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2413
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2414
|
-
};
|
|
2415
|
-
var __metadata$2 = (undefined && undefined.__metadata) || function (k, v) {
|
|
2416
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
2417
|
-
return Reflect.metadata(k, v);
|
|
2418
|
-
};
|
|
2419
|
-
const NylasMinCancellationNotice = class {
|
|
2420
|
-
constructor(hostRef) {
|
|
2421
|
-
index.registerInstance(this, hostRef);
|
|
2422
|
-
this.valueChanged = index.createEvent(this, "valueChanged", 7);
|
|
2423
|
-
if (hostRef.$hostElement$["s-ei"]) {
|
|
2424
|
-
this.internals = hostRef.$hostElement$["s-ei"];
|
|
2425
|
-
}
|
|
2426
|
-
else {
|
|
2427
|
-
this.internals = hostRef.$hostElement$.attachInternals();
|
|
2428
|
-
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
2429
|
-
}
|
|
2430
|
-
this.selectedConfiguration = undefined;
|
|
2431
|
-
this.minCancellationNotice = undefined;
|
|
2432
|
-
this.name = 'min-cancellation-notice';
|
|
2433
|
-
this.selectedNumber = 1;
|
|
2434
|
-
this.selectedPeriod = 'day';
|
|
2435
|
-
}
|
|
2436
|
-
elementNameChangedHandler(newValue) {
|
|
2437
|
-
utils.debug('nylas-min-cancellation-notice', 'elementNameChangedHandler', newValue);
|
|
2438
|
-
this.host.setAttribute('name', newValue);
|
|
2439
|
-
}
|
|
2440
|
-
selectedConfigurationChangedHandler(newVal) {
|
|
2441
|
-
const minCancellationNotice = newVal?.scheduler?.min_cancellation_notice;
|
|
2442
|
-
if (minCancellationNotice) {
|
|
2443
|
-
this.updateNumberAndPeriodFromMinutes(minCancellationNotice);
|
|
2444
|
-
}
|
|
2445
|
-
}
|
|
2446
|
-
availableDaysInFutureChanged(newValue) {
|
|
2447
|
-
this.updateNumberAndPeriodFromMinutes(newValue);
|
|
2448
|
-
}
|
|
2449
|
-
connectedCallback() {
|
|
2450
|
-
utils.debug('nylas-min-cancellation-notice', 'connectedCallback');
|
|
2451
|
-
}
|
|
2452
|
-
componentWillLoad() {
|
|
2453
|
-
utils.debug('nylas-min-cancellation-notice', 'componentWillLoad');
|
|
2454
|
-
this.host.setAttribute('name', this.name);
|
|
2455
|
-
}
|
|
2456
|
-
componentDidLoad() {
|
|
2457
|
-
utils.debug('nylas-min-cancellation-notice', 'componentDidLoad');
|
|
2458
|
-
this.availableDaysInFutureChanged(this.minCancellationNotice ?? 1);
|
|
2459
|
-
if (typeof this.internals.setFormValue !== 'function') {
|
|
2460
|
-
return;
|
|
2461
|
-
}
|
|
2462
|
-
this.internals.setFormValue(this.minCancellationNotice?.toString() ?? '1', this.name);
|
|
2463
|
-
}
|
|
2464
|
-
disconnectedCallback() {
|
|
2465
|
-
utils.debug('nylas-min-cancellation-notice', 'disconnectedCallback');
|
|
2466
|
-
}
|
|
2467
|
-
timePeriodChangedHandler(event) {
|
|
2468
|
-
const { number, period } = event.detail;
|
|
2469
|
-
let totalMinutes;
|
|
2470
|
-
const minutesInHour = 60;
|
|
2471
|
-
const minutesInDay = minutesInHour * 24;
|
|
2472
|
-
const minutesInWeek = minutesInDay * 7;
|
|
2473
|
-
const minutesInMonth = minutesInDay * 30;
|
|
2474
|
-
if (period === 'minute') {
|
|
2475
|
-
totalMinutes = number;
|
|
2476
|
-
}
|
|
2477
|
-
else if (period === 'hour') {
|
|
2478
|
-
totalMinutes = number * minutesInHour;
|
|
2479
|
-
}
|
|
2480
|
-
else if (period === 'day') {
|
|
2481
|
-
totalMinutes = number * minutesInDay;
|
|
2482
|
-
}
|
|
2483
|
-
else if (period === 'week') {
|
|
2484
|
-
totalMinutes = number * minutesInWeek;
|
|
2485
|
-
}
|
|
2486
|
-
else if (period === 'month') {
|
|
2487
|
-
totalMinutes = number * minutesInMonth;
|
|
2488
|
-
}
|
|
2489
|
-
else {
|
|
2490
|
-
totalMinutes = 0;
|
|
2491
|
-
}
|
|
2492
|
-
this.valueChanged.emit({ value: totalMinutes, name: 'minCancellationNotice' });
|
|
2493
|
-
if (typeof this.internals.setFormValue !== 'function') {
|
|
2494
|
-
return;
|
|
2495
|
-
}
|
|
2496
|
-
this.internals.setFormValue(totalMinutes.toString(), this.name);
|
|
2497
|
-
}
|
|
2498
|
-
updateNumberAndPeriodFromMinutes(minutes) {
|
|
2499
|
-
const minutesInHour = 60;
|
|
2500
|
-
const minutesInDay = minutesInHour * 24;
|
|
2501
|
-
const minutesInWeek = minutesInDay * 7;
|
|
2502
|
-
const minutesInMonth = minutesInDay * 30;
|
|
2503
|
-
let number, period;
|
|
2504
|
-
if (minutes >= minutesInMonth) {
|
|
2505
|
-
number = Math.floor(minutes / minutesInMonth);
|
|
2506
|
-
period = 'month';
|
|
2507
|
-
}
|
|
2508
|
-
else if (minutes >= minutesInWeek) {
|
|
2509
|
-
number = Math.floor(minutes / minutesInWeek);
|
|
2510
|
-
period = 'week';
|
|
2511
|
-
}
|
|
2512
|
-
else if (minutes >= minutesInDay) {
|
|
2513
|
-
number = Math.floor(minutes / minutesInDay);
|
|
2514
|
-
period = 'day';
|
|
2515
|
-
}
|
|
2516
|
-
else if (minutes >= minutesInHour) {
|
|
2517
|
-
number = Math.floor(minutes / minutesInHour);
|
|
2518
|
-
period = 'hour';
|
|
2519
|
-
}
|
|
2520
|
-
else {
|
|
2521
|
-
number = minutes;
|
|
2522
|
-
period = 'minute';
|
|
2523
|
-
}
|
|
2524
|
-
this.selectedNumber = number;
|
|
2525
|
-
this.selectedPeriod = period;
|
|
2526
|
-
}
|
|
2527
|
-
render() {
|
|
2528
|
-
return (index.h(index.Host, { key: '6c14649f767cebe544dd5fc3039e4bace051f759' }, index.h("div", { key: 'e6b0965bb6bc49b6e7ede7a4c2b2c2056a212c96', class: "nylas-min-cancellation-notice", part: "nmcn" }, index.h("label", { key: '1998d897f882c0783e2012ca85b651c43517ba64' }, "Minimum cancellation notice", index.h("span", { key: 'eccae26b18bd269648d1bce2affae5d3e469ea02', class: "label-icon" }, index.h("tooltip-component", { key: '50caa33903115b0da9da25ed3a18cbbf8a4df353' }, index.h("info-icon", { key: '8b466b236668439cbca8e250d60524b69ce4f7f3', slot: "tooltip-icon" }), index.h("span", { key: 'c4c9d73798c85d317aa1f89a2b0f1c66c9ca41d2', slot: "tooltip-content" }, "Set the minimum amount of time required to cancel an event.")))), index.h("time-period-selector", { key: 'bb4c0a9ecfb9bc9ebf88b229c871abd4b8427385', id: "min-cancellation-notice", exportparts: "tps__number-dropdown: nmcn__number-dropdown, tps__number-dropdown-button: nmcn__number-dropdown-button, tps__number-dropdown-content: nmcn__number-dropdown-content, tps__period-dropdown: nmcn__period-dropdown, tps__period-dropdown-button: nmcn__period-dropdown-button, tps__period-dropdown-content: nmcn__period-dropdown-content", timePeriods: ['minute', 'hour', 'day', 'week'], defaultSelectedNumber: this.selectedNumber, defaultSelectedPeriod: this.selectedPeriod }))));
|
|
2529
|
-
}
|
|
2530
|
-
static get formAssociated() { return true; }
|
|
2531
|
-
get host() { return index.getElement(this); }
|
|
2532
|
-
static get watchers() { return {
|
|
2533
|
-
"name": ["elementNameChangedHandler"],
|
|
2534
|
-
"selectedConfiguration": ["selectedConfigurationChangedHandler"],
|
|
2535
|
-
"availableDaysInFuture": ["availableDaysInFutureChanged"]
|
|
2536
|
-
}; }
|
|
2537
|
-
};
|
|
2538
|
-
__decorate$2([
|
|
2539
|
-
registerComponent.RegisterComponent({
|
|
2540
|
-
name: 'nylas-min-cancellation-notice',
|
|
2541
|
-
stateToProps: new Map([['schedulerConfig.selectedConfiguration', 'selectedConfiguration']]),
|
|
2542
|
-
eventToProps: {},
|
|
2543
|
-
fireRegisterEvent: true,
|
|
2544
|
-
}),
|
|
2545
|
-
__metadata$2("design:type", Function),
|
|
2546
|
-
__metadata$2("design:paramtypes", []),
|
|
2547
|
-
__metadata$2("design:returntype", void 0)
|
|
2548
|
-
], NylasMinCancellationNotice.prototype, "render", null);
|
|
2549
|
-
NylasMinCancellationNotice.style = NylasMinCancellationNoticeStyle0;
|
|
2550
|
-
|
|
2551
|
-
const nylasParticipantsCustomAvailabilityCss = ":host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:\"Inter\", sans-serif;width:inherit}.nylas-participants-custom-availability{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200)}.nylas-participants-custom-availability .header{padding:1rem}.nylas-participants-custom-availability .header h3{margin:0;font-size:16px;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-participants-custom-availability .header p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.nylas-participants-custom-availability .content .participant-container{padding-top:8px;border-top:1px solid var(--nylas-base-200)}.nylas-participants-custom-availability .content .participant-container .participant-title{display:flex;justify-content:space-between;align-items:center;padding:4px 16px 12px}.nylas-participants-custom-availability .content .participant-container .participant-title p{margin:0}.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle{display:flex;gap:24px;align-items:center}.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle .chevron{display:flex;align-self:center;cursor:pointer}.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle .chevron:hover,.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle .chevron:active{color:var(--nylas-primary)}.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle .chevron.open{transform:rotate(90deg)}.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle .chevron.closed{transform:rotate(270deg)}.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle .chevron.disabled{cursor:not-allowed;color:var(--nylas-base-300)}.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle .chevron.disabled:hover{color:var(--nylas-base-300)}.nylas-participants-custom-availability .content .participant-container nylas-availability-picker::part(nap){margin:0;border:none}";
|
|
2552
|
-
const NylasParticipantsCustomAvailabilityStyle0 = nylasParticipantsCustomAvailabilityCss;
|
|
2553
|
-
|
|
2554
|
-
var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
2555
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2556
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
2557
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
2558
|
-
else
|
|
2559
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
2560
|
-
if (d = decorators[i])
|
|
2561
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2562
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2563
|
-
};
|
|
2564
|
-
var __metadata$1 = (undefined && undefined.__metadata) || function (k, v) {
|
|
2565
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
2566
|
-
return Reflect.metadata(k, v);
|
|
2567
|
-
};
|
|
2568
|
-
const NylasParticipantsCustomAvailability = class {
|
|
2569
|
-
constructor(hostRef) {
|
|
2570
|
-
index.registerInstance(this, hostRef);
|
|
2571
|
-
this.valueChanged = index.createEvent(this, "valueChanged", 7);
|
|
2572
|
-
if (hostRef.$hostElement$["s-ei"]) {
|
|
2573
|
-
this.internals = hostRef.$hostElement$["s-ei"];
|
|
2574
|
-
}
|
|
2575
|
-
else {
|
|
2576
|
-
this.internals = hostRef.$hostElement$.attachInternals();
|
|
2577
|
-
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
2578
|
-
}
|
|
2579
|
-
this.name = 'participant-custom-availability';
|
|
2580
|
-
this.participants = undefined;
|
|
2581
|
-
this.selectedParticipants = this.setParticipants(this.participants);
|
|
2582
|
-
}
|
|
2583
|
-
elementNameChangedHandler(newValue) {
|
|
2584
|
-
utils.debug('nylas-participants-custom-availability', 'elementNameChangedHandler', newValue);
|
|
2585
|
-
this.host.setAttribute('name', newValue);
|
|
2586
|
-
}
|
|
2587
|
-
participantsChangedHandler(newValue) {
|
|
2588
|
-
utils.debug('nylas-participants-custom-availability', 'participantsChangedHandler', newValue);
|
|
2589
|
-
this.selectedParticipants = this.setParticipants(newValue);
|
|
2590
|
-
}
|
|
2591
|
-
connectedCallback() {
|
|
2592
|
-
utils.debug('nylas-participants-custom-availability', 'connectedCallback');
|
|
2593
|
-
}
|
|
2594
|
-
disconnectedCallback() {
|
|
2595
|
-
utils.debug('nylas-participants-custom-availability', 'disconnectedCallback');
|
|
2596
|
-
}
|
|
2597
|
-
componentWillLoad() {
|
|
2598
|
-
utils.debug('nylas-participants-custom-availability', 'componentWillLoad');
|
|
2599
|
-
}
|
|
2600
|
-
componentDidLoad() {
|
|
2601
|
-
utils.debug('nylas-participants-custom-availability', 'componentDidLoad');
|
|
2602
|
-
}
|
|
2603
|
-
nylasFormSwitchToggledHandler(event) {
|
|
2604
|
-
utils.debug('nylas-participants-custom-availability', 'nylasFormSwitchToggledHandler', event.detail);
|
|
2605
|
-
this.selectedParticipants[event.detail.name]['isOpen'] = event.detail.checked;
|
|
2606
|
-
this.selectedParticipants[event.detail.name]['setCustom'] = event.detail.checked;
|
|
2607
|
-
this.selectedParticipants = { ...this.selectedParticipants };
|
|
2608
|
-
}
|
|
2609
|
-
handleValueChanged(event) {
|
|
2610
|
-
utils.debug('[nylas-editor-tabs]', 'handleValueChanged', event);
|
|
2611
|
-
const { name, value } = event.detail;
|
|
2612
|
-
if (!name.startsWith('participant-')) {
|
|
2613
|
-
return;
|
|
2614
|
-
}
|
|
2615
|
-
if (!this.participantFormRef.checkValidity()) {
|
|
2616
|
-
this.internals.setValidity({ customError: true }, 'Please fix the overlapping time ranges.');
|
|
2617
|
-
return;
|
|
2618
|
-
}
|
|
2619
|
-
else {
|
|
2620
|
-
this.internals.setValidity({});
|
|
2621
|
-
}
|
|
2622
|
-
const jsonValue = JSON.parse(value);
|
|
2623
|
-
const key = name.split('-')[2];
|
|
2624
|
-
if (!this.selectedParticipants[key])
|
|
2625
|
-
return;
|
|
2626
|
-
this.selectedParticipants[key]['openHours'] = jsonValue.openHours;
|
|
2627
|
-
this.selectedParticipants = { ...this.selectedParticipants };
|
|
2628
|
-
const participantOpenHours = {};
|
|
2629
|
-
this.participants.forEach(participant => {
|
|
2630
|
-
participantOpenHours[participant.email] = this.selectedParticipants[participant.email].openHours;
|
|
2631
|
-
});
|
|
2632
|
-
this.internals.setFormValue(JSON.stringify(participantOpenHours), this.name);
|
|
2633
|
-
this.valueChanged.emit({ value: JSON.stringify(participantOpenHours), name: this.name });
|
|
2634
|
-
}
|
|
2635
|
-
setParticipants(participants) {
|
|
2636
|
-
const selectedParticipants = {};
|
|
2637
|
-
participants.forEach(participant => {
|
|
2638
|
-
const isOpen = participant.is_organizer ? true : false;
|
|
2639
|
-
selectedParticipants[participant.email] = {
|
|
2640
|
-
isOpen: isOpen,
|
|
2641
|
-
setCustom: !!participant.availability?.open_hours ? true : false,
|
|
2642
|
-
openHours: participant.availability?.open_hours || [],
|
|
2643
|
-
name: participant.name || participant.email,
|
|
2644
|
-
availability: participant.availability,
|
|
2645
|
-
};
|
|
2646
|
-
});
|
|
2647
|
-
return selectedParticipants;
|
|
2648
|
-
}
|
|
2649
|
-
render() {
|
|
2650
|
-
return (index.h(index.Host, { key: '051df44e8bf6bab14cfbccb0a3c5f920993cbae9' }, index.h("div", { key: '128d044cb2bbee76d695d6f5d4bc38a211d06360', class: "nylas-participants-custom-availability", part: "npca" }, index.h("div", { key: 'ed326c442f9663b0613e5cf62a31aabf5fa1034d', class: "header", part: "npca__header" }, index.h("h3", { key: '10994aace54d17110ab2e70fc82a5c11231b5a23' }, "Set Custom Availability for Participants"), index.h("p", { key: '6df3bc37aec02f5a4468f6c6515c6de2c696e817' }, "Set custom availability for scheduling meetings, or default to general availability.")), index.h("div", { key: 'e1e67385b15430e8a7eb6d8411f9b87742621969', class: "content", part: "npca__content" }, index.h("form", { key: '589df249c050b132dc8da5b3ef7e58fa829ae300', ref: el => (this.participantFormRef = el) }, Object.keys(this.selectedParticipants).map((key, index$1) => {
|
|
2651
|
-
const participant = this.selectedParticipants[key];
|
|
2652
|
-
if (!participant || !participant.name || !participant.availability)
|
|
2653
|
-
return;
|
|
2654
|
-
return (index.h("div", { class: "participant-container", part: "npca__participant-container", key: `participant-conatiner-${index$1}` }, index.h("div", { class: "participant-title", part: "npca__participant-title" }, index.h("p", null, "Set ", participant.name, "'s custom availability"), index.h("div", { class: "participant-toggle", part: "npca__participant-toggle--container" }, index.h("toggle-switch", { exportparts: "ts_label: npca__toggle-label, ts_input: npca_toggle-input, ts_slider: npca_toggle-slider", name: key, checked: !!participant.openHours && participant.openHours.length > 0 }), index.h("span", { class: `chevron ${participant.isOpen ? 'open' : 'closed'} ${participant.setCustom ? '' : 'disabled'}`, onClick: () => {
|
|
2655
|
-
if (!participant.setCustom)
|
|
2656
|
-
return;
|
|
2657
|
-
this.selectedParticipants[key].isOpen = !participant.isOpen;
|
|
2658
|
-
this.selectedParticipants = { ...this.selectedParticipants };
|
|
2659
|
-
} }, index.h("chevron-icon", { width: "24", height: "24" })))), participant.isOpen && (index.h("nylas-availability-picker", { key: index$1, name: `participant-${index$1}-${key}`, openHours: participant.openHours, defaultTimezone: participant.openHours?.[0]?.timezone, hideHeader: true }))));
|
|
2660
|
-
}))))));
|
|
2661
|
-
}
|
|
2662
|
-
static get formAssociated() { return true; }
|
|
2663
|
-
get host() { return index.getElement(this); }
|
|
2664
|
-
static get watchers() { return {
|
|
2665
|
-
"name": ["elementNameChangedHandler"],
|
|
2666
|
-
"participants": ["participantsChangedHandler"]
|
|
2667
|
-
}; }
|
|
2668
|
-
};
|
|
2669
|
-
__decorate$1([
|
|
2670
|
-
registerComponent.RegisterComponent({
|
|
2671
|
-
name: 'nylas-participants-custom-availability',
|
|
2672
|
-
eventToProps: {},
|
|
2673
|
-
fireRegisterEvent: true,
|
|
2674
|
-
}),
|
|
2675
|
-
__metadata$1("design:type", Function),
|
|
2676
|
-
__metadata$1("design:paramtypes", []),
|
|
2677
|
-
__metadata$1("design:returntype", void 0)
|
|
2678
|
-
], NylasParticipantsCustomAvailability.prototype, "render", null);
|
|
2679
|
-
NylasParticipantsCustomAvailability.style = NylasParticipantsCustomAvailabilityStyle0;
|
|
2680
|
-
|
|
2681
|
-
const nylasTimeslotIntervalCss = ":host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:\"Inter\", sans-serif;width:inherit}.nylas-timeslot-interval{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200)}.nylas-timeslot-interval .header{padding:1rem;border-bottom:1px solid var(--nylas-base-200)}.nylas-timeslot-interval .header h3{margin:0;font-size:1rem;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-timeslot-interval .header p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.nylas-timeslot-interval .nylas-timeslot-interval__dropdown{padding:1rem;display:flex;flex-direction:column;gap:4px}.nylas-timeslot-interval .nylas-timeslot-interval__dropdown span.label{display:flex;align-items:center;gap:4px;color:var(--nylas-base-800)}.nylas-timeslot-interval .nylas-timeslot-interval__dropdown span.label tooltip-component{display:flex}.nylas-timeslot-interval .nylas-timeslot-interval__dropdown select-dropdown{margin-bottom:1.5rem}.nylas-timeslot-interval .nylas-timeslot-interval__dropdown select-dropdown::part(sd_dropdown){width:100%}.nylas-timeslot-interval .nylas-timeslot-interval__dropdown select-dropdown::part(sd_dropdown-content){width:100%;max-width:unset}.nylas-timeslot-interval .nylas-timeslot-interval__dropdown select-dropdown::part(sd_dropdown-button){width:100%;display:flex;justify-content:space-between;align-items:center;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);padding:1rem}.nylas-timeslot-interval .nylas-timeslot-interval__dropdown select-dropdown::part(sd_dropdown-button-selected-label){max-width:calc(100% - 2rem);font-family:var(--nylas-font-family);font-size:16px;line-height:24px}";
|
|
2682
|
-
const NylasTimeslotIntervalStyle0 = nylasTimeslotIntervalCss;
|
|
2683
|
-
|
|
2684
|
-
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
2685
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2686
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
2687
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
2688
|
-
else
|
|
2689
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
2690
|
-
if (d = decorators[i])
|
|
2691
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2692
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2693
|
-
};
|
|
2694
|
-
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
|
|
2695
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
2696
|
-
return Reflect.metadata(k, v);
|
|
2697
|
-
};
|
|
2698
|
-
const defaultRoundToMinustes = 15;
|
|
2699
|
-
const NylasTimeslotInterval = class {
|
|
2700
|
-
constructor(hostRef) {
|
|
2701
|
-
index.registerInstance(this, hostRef);
|
|
2702
|
-
this.valueChanged = index.createEvent(this, "valueChanged", 7);
|
|
2703
|
-
if (hostRef.$hostElement$["s-ei"]) {
|
|
2704
|
-
this.internals = hostRef.$hostElement$["s-ei"];
|
|
2705
|
-
}
|
|
2706
|
-
else {
|
|
2707
|
-
this.internals = hostRef.$hostElement$.attachInternals();
|
|
2708
|
-
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
2709
|
-
}
|
|
2710
|
-
this.selectedConfiguration = undefined;
|
|
2711
|
-
this.name = 'timeslot-picker';
|
|
2712
|
-
this.eventDurationMinutes = this.selectedConfiguration?.availability?.duration_minutes ?? 5;
|
|
2713
|
-
this.defaultIntervalMinutes = this.selectedConfiguration?.availability?.interval_minutes ?? this.eventDurationMinutes;
|
|
2714
|
-
this.defaultRoundTo = this.selectedConfiguration?.availability?.round_to ?? undefined;
|
|
2715
|
-
this.selectedInterval = this.defaultIntervalMinutes;
|
|
2716
|
-
this.selectedRoundTo = this.defaultRoundTo && this.defaultRoundTo === this.defaultIntervalMinutes ? true : false;
|
|
2717
|
-
}
|
|
2718
|
-
elementNameChangedHandler(newValue) {
|
|
2719
|
-
utils.debug('nylas-timeslot-interval', 'elementNameChangedHandler', newValue);
|
|
2720
|
-
this.host.setAttribute('name', newValue);
|
|
2721
|
-
}
|
|
2722
|
-
selectedConfigurationChangedHandler(newValue) {
|
|
2723
|
-
utils.debug('nylas-timeslot-interval', 'selectedConfigurationChangedHandler', newValue);
|
|
2724
|
-
this.defaultIntervalMinutes = newValue.availability?.interval_minutes ?? this.eventDurationMinutes;
|
|
2725
|
-
this.defaultRoundTo = newValue.availability?.round_to ?? undefined;
|
|
2726
|
-
this.selectedInterval = this.defaultIntervalMinutes;
|
|
2727
|
-
this.selectedRoundTo = this.defaultRoundTo && this.defaultRoundTo === this.defaultIntervalMinutes ? true : false;
|
|
2728
|
-
}
|
|
2729
|
-
connectedCallback() {
|
|
2730
|
-
utils.debug('nylas-timeslot-interval', 'connectedCallback');
|
|
2731
|
-
}
|
|
2732
|
-
disconnectedCallback() {
|
|
2733
|
-
utils.debug('nylas-timeslot-interval', 'disconnectedCallback');
|
|
2734
|
-
}
|
|
2735
|
-
componentWillLoad() {
|
|
2736
|
-
utils.debug('nylas-timeslot-interval', 'componentWillLoad');
|
|
2737
|
-
this.host.setAttribute('name', this.name);
|
|
2738
|
-
}
|
|
2739
|
-
componentDidLoad() {
|
|
2740
|
-
utils.debug('nylas-timeslot-interval', 'componentDidLoad');
|
|
2741
|
-
}
|
|
2742
|
-
componentWillUpdate() {
|
|
2743
|
-
utils.debug('nylas-timeslot-interval', 'componentWillUpdate');
|
|
2744
|
-
}
|
|
2745
|
-
componentDidUpdate() {
|
|
2746
|
-
utils.debug('nylas-timeslot-interval', 'componentDidUpdate');
|
|
2747
|
-
}
|
|
2748
|
-
componentWillRender() {
|
|
2749
|
-
utils.debug('nylas-timeslot-interval', 'componentWillRender');
|
|
2750
|
-
}
|
|
2751
|
-
componentDidRender() {
|
|
2752
|
-
utils.debug('nylas-timeslot-interval', 'componentDidRender');
|
|
2753
|
-
}
|
|
2754
|
-
nylasFormDropdownChangedHandler(event) {
|
|
2755
|
-
utils.debug('nylas-timeslot-interval', 'nylasFormDropdownChangedHandler', event.detail);
|
|
2756
|
-
const value = event.detail.value;
|
|
2757
|
-
if (value === 'duration') {
|
|
2758
|
-
this.selectedInterval = this.eventDurationMinutes;
|
|
2759
|
-
}
|
|
2760
|
-
else {
|
|
2761
|
-
this.selectedInterval = parseInt(event.detail.value);
|
|
2762
|
-
}
|
|
2763
|
-
console.log('nylasFormDropdownChanged selectedRoundTo', this.selectedRoundTo);
|
|
2764
|
-
this.valueChanged.emit({
|
|
2765
|
-
value: JSON.stringify({
|
|
2766
|
-
interval: this.selectedInterval,
|
|
2767
|
-
roundTo: this.selectedRoundTo ? this.selectedInterval : defaultRoundToMinustes,
|
|
2768
|
-
}),
|
|
2769
|
-
name: this.name,
|
|
2770
|
-
});
|
|
2771
|
-
if (typeof this.internals.setFormValue === 'function') {
|
|
2772
|
-
this.internals.setFormValue(JSON.stringify({ interval: this.selectedInterval, roundTo: this.selectedRoundTo ? this.selectedInterval : defaultRoundToMinustes }), this.name);
|
|
2773
|
-
}
|
|
2774
|
-
}
|
|
2775
|
-
radioSelectionChangedHandler(event) {
|
|
2776
|
-
utils.debug('nylas-timeslot-interval', 'radioSelectionChangedHandler', event.detail);
|
|
2777
|
-
const value = event.detail.value;
|
|
2778
|
-
if (value === 'no-rounding') {
|
|
2779
|
-
this.selectedRoundTo = false;
|
|
2780
|
-
}
|
|
2781
|
-
else {
|
|
2782
|
-
this.selectedRoundTo = true;
|
|
2783
|
-
}
|
|
2784
|
-
console.log('selectedRoundTo', this.selectedRoundTo);
|
|
2785
|
-
this.valueChanged.emit({
|
|
2786
|
-
value: JSON.stringify({
|
|
2787
|
-
interval: this.selectedInterval,
|
|
2788
|
-
roundTo: this.selectedRoundTo ? this.selectedInterval : defaultRoundToMinustes,
|
|
2789
|
-
}),
|
|
2790
|
-
name: this.name,
|
|
2791
|
-
});
|
|
2792
|
-
if (typeof this.internals.setFormValue === 'function') {
|
|
2793
|
-
this.internals.setFormValue(JSON.stringify({ interval: this.selectedInterval, roundTo: this.selectedRoundTo ? this.selectedInterval : defaultRoundToMinustes }), this.name);
|
|
2794
|
-
}
|
|
2795
|
-
}
|
|
2796
|
-
render() {
|
|
2797
|
-
const intervalPreferenceOptions = [
|
|
2798
|
-
{ value: 'duration', label: 'Length of the booking' },
|
|
2799
|
-
{ value: '5', label: '5 mins' },
|
|
2800
|
-
{ value: '10', label: '10 mins' },
|
|
2801
|
-
{ value: '15', label: '15 mins' },
|
|
2802
|
-
{ value: '20', label: '20 mins' },
|
|
2803
|
-
{ value: '30', label: '30 mins' },
|
|
2804
|
-
{ value: '45', label: '45 mins' },
|
|
2805
|
-
{ value: '60', label: '60 mins' },
|
|
2806
|
-
];
|
|
2807
|
-
return (index.h(index.Host, { key: 'ebad4dc8f82dc565f4608c262d54f06495a69144' }, index.h("div", { key: '46641f5cd23afc527d14c57fa62fe2627d1a92f5', class: "nylas-timeslot-interval", part: "nti" }, index.h("div", { key: '729c8356b955ba357bd00f3cdf28c51bb42b741d', class: "header", part: "nti__header" }, index.h("h3", { key: '348543e170e107ea65c74a6154739627e7c4a271' }, "Time-slot interval preferences"), index.h("p", { key: '1cf34b79990edef1950d6c970932e5e0805e6d0a' }, "Choose your interval preference for time-slots.")), index.h("div", { key: '965fe8f8e235f9696bc237bc7774ca6fdea2cd42', class: "nylas-timeslot-interval__dropdown" }, index.h("span", { key: '6346e2f31c9322cc3264885f362ce2b29c4a4c2e', class: "label", part: "nti__input-label" }, "Select interval preference", index.h("tooltip-component", { key: '27901960cae97d4809153aac5d427c8c2ff7bf1e' }, index.h("info-icon", { key: '94c81d2c169da3714d2a1955da0fbe542b688fb6', slot: "tooltip-icon" }), index.h("span", { key: '6e8660e7696c16d81214d97e5e2087579f9fa1bd', slot: "tooltip-content" }, "Set the interval preference for the time-slots."))), index.h("select-dropdown", { key: '49b886894bb4d405ed13578809609511830389f1', name: "booking-calendar", options: intervalPreferenceOptions, withSearch: false, exportparts: "sd_dropdown: nti__dropdown, sd_dropdown-button: nti__dropdown-button, sd_dropdown-content: nti__dropdown-content", defaultSelectedOption: this.defaultIntervalMinutes == this.eventDurationMinutes
|
|
2808
|
-
? intervalPreferenceOptions[0]
|
|
2809
|
-
: intervalPreferenceOptions.find(op => op.value == this.defaultIntervalMinutes.toString()) ?? intervalPreferenceOptions[0] }), index.h("span", { key: '40079758106c1e7075b247f81a3bc30e11eb1138', class: "label", part: "nti__input-label" }, "Select the type of time-slot rounding", index.h("tooltip-component", { key: 'c1a1b86a732439b5474be36a1eb67d0a1fabe52c' }, index.h("info-icon", { key: '9e185781f8def48475c5f65cff916e5be6423b72', slot: "tooltip-icon" }), index.h("span", { key: 'df108083daab268e8980194ebff8485c945aab1c', slot: "tooltip-content" }, "Select if you want to round the time slots to the nearest interval."))), index.h("radio-button-group", { key: 'eb4c58b028ac0e2dd0468c30c1839558ae57178a', name: "interval-preference", defaultSelectedValue: this.defaultRoundTo && this.defaultRoundTo === this.defaultIntervalMinutes ? 'rounding' : 'no-rounding', options: [
|
|
2810
|
-
{ value: 'no-rounding', label: 'Default', description: 'Time-slots will be rounded to the nearest quarter-hour.' },
|
|
2811
|
-
{
|
|
2812
|
-
value: 'rounding',
|
|
2813
|
-
label: 'Interval rounding',
|
|
2814
|
-
description: 'Time-slots will begin at times rounded to the interval value.',
|
|
2815
|
-
},
|
|
2816
|
-
] })))));
|
|
2817
|
-
}
|
|
2818
|
-
static get formAssociated() { return true; }
|
|
2819
|
-
get host() { return index.getElement(this); }
|
|
2820
|
-
static get watchers() { return {
|
|
2821
|
-
"name": ["elementNameChangedHandler"],
|
|
2822
|
-
"selectedConfiguration": ["selectedConfigurationChangedHandler"]
|
|
2823
|
-
}; }
|
|
2824
|
-
};
|
|
2825
|
-
__decorate([
|
|
2826
|
-
registerComponent.RegisterComponent({
|
|
2827
|
-
name: 'nylas-timeslot-interval',
|
|
2828
|
-
stateToProps: new Map([['schedulerConfig.selectedConfiguration', 'selectedConfiguration']]),
|
|
2829
|
-
fireRegisterEvent: true,
|
|
2830
|
-
}),
|
|
2831
|
-
__metadata("design:type", Function),
|
|
2832
|
-
__metadata("design:paramtypes", []),
|
|
2833
|
-
__metadata("design:returntype", void 0)
|
|
2834
|
-
], NylasTimeslotInterval.prototype, "render", null);
|
|
2835
|
-
NylasTimeslotInterval.style = NylasTimeslotIntervalStyle0;
|
|
2836
|
-
|
|
2837
|
-
const iconCss = ".sc-people-icon-h{display:flex}";
|
|
2838
|
-
const PeopleIconStyle0 = iconCss;
|
|
2839
|
-
|
|
2840
|
-
const PeopleIcon = class {
|
|
2841
|
-
constructor(hostRef) {
|
|
2842
|
-
index.registerInstance(this, hostRef);
|
|
2843
|
-
this.width = '20';
|
|
2844
|
-
this.height = '20';
|
|
2845
|
-
}
|
|
2846
|
-
render() {
|
|
2847
|
-
return (index.h("svg", { key: '4a54f616162baf613895348e27cafd2088f5fd16', xmlns: "http://www.w3.org/2000/svg", width: this.width, height: this.height, fill: "none", viewBox: "0 0 20 20" }, index.h("path", { key: '80e1ca7240235b635a08369ba836e727825b7be4', fill: "currentColor", d: "M11 10a2 2 0 0 1 2 2v1.5c0 2.054-2.088 3.5-5.5 3.5S2 15.554 2 13.5V12a2 2 0 0 1 2-2h7Zm0 1H4a1 1 0 0 0-1 1v1.5C3 14.907 4.579 16 7.5 16c2.921 0 4.5-1.093 4.5-2.5V12a1 1 0 0 0-1-1Zm5-1a2 2 0 0 1 2 2v.5c0 2.089-1.568 3.5-4.5 3.5-.141 0-.28-.003-.414-.01.208-.242.382-.502.522-.781l.097-.213h.039C15.976 14.931 17 13.96 17 12.5V12a1 1 0 0 0-1-1h-2.171a3 3 0 0 0-.594-1H16ZM7.5 2a3.5 3.5 0 1 1 0 7 3.5 3.5 0 0 1 0-7Zm7 2a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5Zm-7-1a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5Zm7 2a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Z" })));
|
|
2848
|
-
}
|
|
2849
|
-
};
|
|
2850
|
-
PeopleIcon.style = PeopleIconStyle0;
|
|
2851
|
-
|
|
2852
|
-
const radioButtonGroupCss = ".radio-group{display:flex;flex-direction:column}.radio-group label{display:flex;font-family:var(--nylas-font-family);cursor:pointer}.radio-group label .radio-option{display:flex;align-items:flex-start;gap:0.5rem}.radio-group label .radio-option input[type=radio]{cursor:pointer}.radio-group label .radio-option input[type=radio i]{width:20px;height:20px;color:var(--nylas-primary);margin-top:16px}.radio-group label .radio-option p{display:flex;flex-direction:column;gap:0.5rem}.radio-group label .radio-option p .title{font-size:16px;font-weight:500;line-height:20px;color:var(--nylas-base-800)}.radio-group label .radio-option p .description{font-size:14px;font-weight:400;line-height:20px;color:var(--nylas-base-600)}";
|
|
2853
|
-
const RadioButtonGroupStyle0 = radioButtonGroupCss;
|
|
2854
|
-
|
|
2855
|
-
const RadioButtonGroup = class {
|
|
2856
|
-
constructor(hostRef) {
|
|
2857
|
-
index.registerInstance(this, hostRef);
|
|
2858
|
-
this.radioSelectionChanged = index.createEvent(this, "radioSelectionChanged", 7);
|
|
2859
|
-
this.name = 'radio-group';
|
|
2860
|
-
this.options = [];
|
|
2861
|
-
this.defaultSelectedValue = '';
|
|
2862
|
-
this.selectedValue = this.defaultSelectedValue;
|
|
2863
|
-
}
|
|
2864
|
-
handleChange(value) {
|
|
2865
|
-
this.selectedValue = value;
|
|
2866
|
-
this.radioSelectionChanged.emit({
|
|
2867
|
-
value,
|
|
2868
|
-
name: this.name,
|
|
2869
|
-
});
|
|
2870
|
-
}
|
|
2871
|
-
render() {
|
|
2872
|
-
return (index.h("div", { key: '82c0a38507193f6e941c820c38f9e5c477dc14dc', class: "radio-group" }, this.options.map(option => (index.h("label", null, index.h("div", { class: "radio-option" }, index.h("input", { type: "radio", name: this.name, value: option.value, checked: this.selectedValue === option.value, onChange: () => this.handleChange(option.value) }), index.h("p", null, index.h("span", { class: "title" }, option.label), index.h("span", { class: "description" }, option.description))))))));
|
|
2873
|
-
}
|
|
2874
|
-
};
|
|
2875
|
-
RadioButtonGroup.style = RadioButtonGroupStyle0;
|
|
2876
|
-
|
|
2877
|
-
const toggleSwitchCss = ".switch{--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;display:inline-block;height:34px;position:relative;width:60px}.switch input{display:none}.slider{background-color:var(--nylas-base-400);bottom:0;cursor:pointer;left:0;position:absolute;right:0;top:0;transition:0.4s}.slider:before{background-color:var(--nylas-base-0);bottom:4px;content:\"\";height:32px;left:4px;position:absolute;transition:0.4s;width:32px}input:checked+.slider{background-color:var(--nylas-success)}input:checked+.slider:before{transform:translateX(32px)}.slider.round{border-radius:35px;width:72px;height:40px}.slider.round:before{border-radius:50%}";
|
|
2878
|
-
const ToggleSwitchStyle0 = toggleSwitchCss;
|
|
2879
|
-
|
|
2880
|
-
const ToggleSwitchComponent = class {
|
|
2881
|
-
constructor(hostRef) {
|
|
2882
|
-
index.registerInstance(this, hostRef);
|
|
2883
|
-
this.nylasFormSwitchToggled = index.createEvent(this, "nylasFormSwitchToggled", 7);
|
|
2884
|
-
this.name = 'toggle-switch';
|
|
2885
|
-
this.checked = false;
|
|
2886
|
-
this.label = '';
|
|
2887
|
-
this.isChecked = this.checked;
|
|
2888
|
-
}
|
|
2889
|
-
componentWillLoad() {
|
|
2890
|
-
this.isChecked = this.checked;
|
|
2891
|
-
}
|
|
2892
|
-
toggleCheck() {
|
|
2893
|
-
this.isChecked = !this.isChecked;
|
|
2894
|
-
this.nylasFormSwitchToggled.emit({
|
|
2895
|
-
checked: this.isChecked,
|
|
2896
|
-
name: this.name,
|
|
2897
|
-
label: this.label,
|
|
2898
|
-
});
|
|
2899
|
-
}
|
|
2900
|
-
render() {
|
|
2901
|
-
return (index.h("label", { key: 'a0da5f3c6cac6310e9368ec4a5ed737decd04b5b', class: "switch", part: "ts_label" }, index.h("input", { key: '89e844d8135eadd471b960910794143ab1699afb', type: "checkbox", part: "ts_input", name: this.name, checked: this.isChecked, onChange: () => this.toggleCheck() }), index.h("div", { key: '19e8cea0befc42520c775555c8de96ac83d1612d', class: "slider round", part: "ts_slider" })));
|
|
2902
|
-
}
|
|
2903
|
-
};
|
|
2904
|
-
ToggleSwitchComponent.style = ToggleSwitchStyle0;
|
|
2905
|
-
|
|
2906
|
-
exports.calendar_info_icon = CalendarInfoIcon;
|
|
2907
|
-
exports.calendar_patterns_icon = CalendarPatternsIcon;
|
|
2908
|
-
exports.checkbox_component = CheckboxComponent;
|
|
2909
|
-
exports.flow_icon = FlowIcon;
|
|
2910
|
-
exports.location_icon = LocationIcon;
|
|
2911
|
-
exports.location_off_icon = LocationOffIcon;
|
|
2912
|
-
exports.multi_select_dropdown = MultiSelectDropdown;
|
|
2913
|
-
exports.nylas_additional_participants = NylasAdditionalParticipants;
|
|
2914
|
-
exports.nylas_availability_picker = NylasAvailabilityPicker;
|
|
2915
|
-
exports.nylas_booking_calendar_picker = NylasBookingCalendarPicker;
|
|
2916
|
-
exports.nylas_buffer_time = NylasBufferTime;
|
|
2917
|
-
exports.nylas_calendar_picker = NylasCalendarPicker;
|
|
2918
|
-
exports.nylas_cancellation_policy = NylasCancellationPolicy;
|
|
2919
|
-
exports.nylas_customize_booking_settings = NylasCustomizeBookingSettings;
|
|
2920
|
-
exports.nylas_event_description = NylasEventDescription;
|
|
2921
|
-
exports.nylas_event_duration = NylasEventDuration;
|
|
2922
|
-
exports.nylas_event_info = NylasEventInfo;
|
|
2923
|
-
exports.nylas_event_limits = NylasEventLimits;
|
|
2924
|
-
exports.nylas_event_location = NylasEventLocation;
|
|
2925
|
-
exports.nylas_event_title = NylasEventTitle;
|
|
2926
|
-
exports.nylas_limit_future_bookings = NylasLimitFutureBookings;
|
|
2927
|
-
exports.nylas_min_booking_notice = NylasMinBookingNotice;
|
|
2928
|
-
exports.nylas_min_cancellation_notice = NylasMinCancellationNotice;
|
|
2929
|
-
exports.nylas_participants_custom_availability = NylasParticipantsCustomAvailability;
|
|
2930
|
-
exports.nylas_timeslot_interval = NylasTimeslotInterval;
|
|
2931
|
-
exports.people_icon = PeopleIcon;
|
|
2932
|
-
exports.radio_button_group = RadioButtonGroup;
|
|
2933
|
-
exports.toggle_switch = ToggleSwitchComponent;
|
|
2934
|
-
|
|
2935
|
-
//# sourceMappingURL=calendar-info-icon_28.cjs.entry.js.map
|