@nylas/web-elements 1.1.0-canary.5 → 1.1.0-canary.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/add-circle-icon.cjs.entry.js +1 -1
- package/dist/cjs/add-circle-icon_22.cjs.entry.js +222 -92
- package/dist/cjs/add-circle-icon_22.cjs.entry.js.map +1 -1
- package/dist/cjs/archive-icon.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.cjs.entry.js +1 -1
- package/dist/cjs/bold-icon_3.cjs.entry.js +3 -3
- package/dist/cjs/button-component.cjs.entry.js +2 -2
- package/dist/cjs/button-component.cjs.entry.js.map +1 -1
- package/dist/cjs/calendar-cancel-icon.cjs.entry.js +1 -1
- package/dist/cjs/calendar-check-icon.cjs.entry.js +1 -1
- package/dist/cjs/calendar-check-icon_2.cjs.entry.js +2 -2
- package/dist/cjs/calendar-icon.cjs.entry.js +1 -1
- package/dist/cjs/calendar-info-icon.cjs.entry.js +1 -1
- package/dist/cjs/calendar-patterns-icon.cjs.entry.js +1 -1
- package/dist/cjs/checkmark-circle-icon.cjs.entry.js +1 -1
- package/dist/cjs/chevron-icon.cjs.entry.js +1 -1
- package/dist/cjs/chevron-icon_3.cjs.entry.js +4 -4
- package/dist/cjs/close-icon.cjs.entry.js +1 -1
- package/dist/cjs/{constants-6baf1f1d.js → constants-3e962931.js} +11 -1
- package/dist/cjs/{constants-6baf1f1d.js.map → constants-3e962931.js.map} +1 -1
- package/dist/cjs/{constants-0fba94a4.js → constants-d590922e.js} +11 -1
- package/dist/cjs/{constants-0fba94a4.js.map → constants-d590922e.js.map} +1 -1
- package/dist/cjs/document-refresh-icon.cjs.entry.js +1 -1
- package/dist/cjs/flow-icon.cjs.entry.js +1 -1
- package/dist/cjs/folder-icon.cjs.entry.js +1 -1
- package/dist/cjs/forward-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.cjs.entry.js +1 -1
- package/dist/cjs/google-logo-icon_4.cjs.entry.js +93 -49
- package/dist/cjs/google-logo-icon_4.cjs.entry.js.map +1 -1
- package/dist/cjs/inbox-icon.cjs.entry.js +1 -1
- package/dist/cjs/index-7af03e3f.js +1 -158
- package/dist/cjs/index-c14ea8f5.js +1 -362
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/info-icon.cjs.entry.js +1 -1
- package/dist/cjs/info-icon_2.cjs.entry.js +2 -2
- package/dist/cjs/italic-icon.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/loading-icon.cjs.entry.js +1 -1
- package/dist/cjs/location-icon.cjs.entry.js +1 -1
- package/dist/cjs/location-off-icon.cjs.entry.js +1 -1
- package/dist/cjs/microsoft-logo-icon.cjs.entry.js +1 -1
- package/dist/cjs/multi-select-dropdown.cjs.entry.js +2 -2
- package/dist/cjs/nylas-additional-participants.cjs.entry.js +1 -1
- package/dist/cjs/{nylas-api-request-2a0e7022.js → nylas-api-request-27c25287.js} +13 -2
- package/dist/cjs/nylas-api-request-27c25287.js.map +1 -0
- package/dist/cjs/{nylas-api-request-55923233.js → nylas-api-request-abdb8dd8.js} +13 -2
- package/dist/cjs/nylas-api-request-abdb8dd8.js.map +1 -0
- package/dist/cjs/nylas-availability-picker.cjs.entry.js +31 -14
- package/dist/cjs/nylas-availability-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-booked-event-card.cjs.entry.js +1 -1
- package/dist/cjs/nylas-booked-event-card_10.cjs.entry.js +5 -5
- package/dist/cjs/nylas-booking-calendar-picker.cjs.entry.js +10 -4
- package/dist/cjs/nylas-booking-calendar-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-calendar-picker.cjs.entry.js +11 -6
- package/dist/cjs/nylas-calendar-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-cancel-booking-form.cjs.entry.js +1 -1
- package/dist/cjs/nylas-cancelled-event-card.cjs.entry.js +1 -1
- package/dist/cjs/nylas-composer.cjs.entry.js +1 -1
- package/dist/cjs/nylas-custom-booking-flow.cjs.entry.js +19 -10
- package/dist/cjs/nylas-custom-booking-flow.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-editor-tabs.cjs.entry.js +67 -38
- package/dist/cjs/nylas-editor-tabs.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-event-description.cjs.entry.js +13 -4
- package/dist/cjs/nylas-event-description.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-event-duration.cjs.entry.js +13 -8
- package/dist/cjs/nylas-event-duration.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-event-info.cjs.entry.js +1 -1
- package/dist/cjs/nylas-event-limits.cjs.entry.js +1 -1
- package/dist/cjs/nylas-event-title.cjs.entry.js +50 -10
- package/dist/cjs/nylas-event-title.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-form-card.cjs.entry.js +1 -1
- package/dist/cjs/nylas-limit-future-bookings.cjs.entry.js +22 -9
- package/dist/cjs/nylas-limit-future-bookings.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-list-configurations.cjs.entry.js +24 -9
- package/dist/cjs/nylas-list-configurations.cjs.entry.js.map +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-locale-switch.cjs.entry.js +1 -1
- package/dist/cjs/nylas-location-component.cjs.entry.js +15 -4
- package/dist/cjs/nylas-location-component.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-login.cjs.entry.js +1 -1
- package/dist/cjs/nylas-logo.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-min-cancellation-notice.cjs.entry.js +26 -11
- package/dist/cjs/nylas-min-cancellation-notice.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-notification.cjs.entry.js +1 -1
- package/dist/cjs/nylas-provider.cjs.entry.js +3 -3
- package/dist/cjs/nylas-scheduler-editor.cjs.entry.js +16 -16
- package/dist/cjs/nylas-scheduler-editor.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-scheduling.cjs.entry.js +1 -1
- package/dist/cjs/nylas-selected-event-card.cjs.entry.js +1 -1
- package/dist/cjs/nylas-summarize-message-button.cjs.entry.js +2 -2
- 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-email.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/people-icon.cjs.entry.js +1 -1
- package/dist/cjs/play-icon.cjs.entry.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/reply-all-icon.cjs.entry.js +1 -1
- package/dist/cjs/reply-icon.cjs.entry.js +1 -1
- package/dist/cjs/{scheduler-config-store-4d93a9b7.js → scheduler-config-store-37690bf0.js} +10 -4
- package/dist/cjs/scheduler-config-store-37690bf0.js.map +1 -0
- package/dist/cjs/{scheduler-config-store-a0e08cab.js → scheduler-config-store-529c8d7e.js} +10 -4
- package/dist/cjs/scheduler-config-store-529c8d7e.js.map +1 -0
- package/dist/cjs/{scheduler-store-a492526c.js → scheduler-store-0081970d.js} +15 -2
- package/dist/cjs/scheduler-store-0081970d.js.map +1 -0
- package/dist/cjs/{scheduler-store-e148a4cc.js → scheduler-store-67dc1986.js} +15 -2
- package/dist/cjs/scheduler-store-67dc1986.js.map +1 -0
- package/dist/cjs/search-icon.cjs.entry.js +1 -1
- package/dist/cjs/select-dropdown.cjs.entry.js +2 -2
- package/dist/cjs/sent-icon.cjs.entry.js +1 -1
- package/dist/cjs/spam-icon.cjs.entry.js +1 -1
- package/dist/cjs/star-icon.cjs.entry.js +1 -1
- package/dist/cjs/stop-icon.cjs.entry.js +1 -1
- package/dist/cjs/time-period-selector.cjs.entry.js +1 -1
- package/dist/cjs/tooltip-component.cjs.entry.js +1 -1
- package/dist/cjs/translate-icon.cjs.entry.js +1 -1
- package/dist/cjs/trash-icon.cjs.entry.js +1 -1
- package/dist/cjs/underline-icon.cjs.entry.js +1 -1
- package/dist/cjs/warning-icon.cjs.entry.js +1 -1
- package/dist/collection/common/constants.js +9 -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-cancel.js +1 -1
- package/dist/collection/common/icons/calendar-check.js +1 -1
- package/dist/collection/common/icons/calendar-info.js +1 -1
- package/dist/collection/common/icons/calendar-patterns.js +1 -1
- package/dist/collection/common/icons/calendar.js +1 -1
- package/dist/collection/common/icons/checkmark-circle.js +1 -1
- package/dist/collection/common/icons/chevron.js +1 -1
- package/dist/collection/common/icons/close.js +1 -1
- package/dist/collection/common/icons/document-refresh.js +1 -1
- 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/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/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/play.js +1 -1
- 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/nylas-api-request.js +12 -1
- package/dist/collection/common/nylas-api-request.js.map +1 -1
- package/dist/collection/components/design-system/button-component/button-component.css +5 -0
- package/dist/collection/components/design-system/button-component/button-component.js +1 -1
- package/dist/collection/components/design-system/multi-select-dropdown/multi-select-dropdown.js +2 -2
- package/dist/collection/components/design-system/select-dropdown/select-dropdown.js +2 -2
- package/dist/collection/components/design-system/time-period-selector/time-period-selector.js +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-login/nylas-login.js +1 -1
- package/dist/collection/components/nylas-provider/nylas-provider.js +2 -2
- package/dist/collection/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.js +1 -1
- package/dist/collection/components/scheduler/nylas-cancelled-event-card/nylas-cancelled-event-card.js +1 -1
- package/dist/collection/components/scheduler/nylas-notification/nylas-notification.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.js +55 -15
- package/dist/collection/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-booking-calendar-picker/nylas-booking-calendar-picker.js +32 -5
- 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-calendar-picker/nylas-calendar-picker.js +23 -14
- package/dist/collection/components/scheduler-editor/nylas-calendar-picker/nylas-calendar-picker.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-custom-booking-flow/nylas-custom-booking-flow.js +41 -9
- package/dist/collection/components/scheduler-editor/nylas-custom-booking-flow/nylas-custom-booking-flow.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.css +35 -3
- package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.js +99 -36
- 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 +4 -4
- package/dist/collection/components/scheduler-editor/nylas-editor-tabs/tab-contents.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-description/nylas-event-description.css +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-description/nylas-event-description.js +34 -2
- package/dist/collection/components/scheduler-editor/nylas-event-description/nylas-event-description.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-duration/nylas-event-duration.css +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-duration/nylas-event-duration.js +35 -7
- package/dist/collection/components/scheduler-editor/nylas-event-duration/nylas-event-duration.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-info/nylas-event-info.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-limits/nylas-event-limits.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-title/nylas-event-title.css +8 -1
- package/dist/collection/components/scheduler-editor/nylas-event-title/nylas-event-title.js +83 -9
- 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 +45 -9
- 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 +39 -2
- package/dist/collection/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.js +46 -9
- package/dist/collection/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-location-component/nylas-location-component.css +2 -2
- package/dist/collection/components/scheduler-editor/nylas-location-component/nylas-location-component.js +37 -3
- package/dist/collection/components/scheduler-editor/nylas-location-component/nylas-location-component.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-min-cancellation-notice/nylas-min-cancellation-notice.js +49 -11
- package/dist/collection/components/scheduler-editor/nylas-min-cancellation-notice/nylas-min-cancellation-notice.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.css +6 -0
- package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.js +36 -16
- 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/connector/nylas-scheduler-connector/errors/index.js +8 -0
- package/dist/collection/connector/nylas-scheduler-connector/errors/index.js.map +1 -1
- package/dist/collection/connector/shared/api/scheduler-config.js +6 -6
- package/dist/collection/connector/shared/api/scheduler-config.js.map +1 -1
- package/dist/collection/connector/shared/api/scheduler.js +6 -1
- package/dist/collection/connector/shared/api/scheduler.js.map +1 -1
- package/dist/collection/index.js +0 -1
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/stores/scheduler-config-store.js +9 -3
- package/dist/collection/stores/scheduler-config-store.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-cancel.js +1 -1
- package/dist/components/calendar-check.js +1 -1
- package/dist/components/calendar-info.js +1 -1
- package/dist/components/calendar-patterns.js +1 -1
- package/dist/components/calendar.js +1 -1
- package/dist/components/checkmark-circle.js +1 -1
- package/dist/components/chevron.js +1 -1
- package/dist/components/close.js +1 -1
- package/dist/components/constants.js +11 -2
- package/dist/components/constants.js.map +1 -1
- package/dist/components/document-refresh-icon.js +1 -1
- package/dist/components/flow.js +1 -1
- package/dist/components/focus-visible.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/inbox.js +1 -1
- package/dist/components/index.d.ts +0 -179
- package/dist/components/index.es.js +2 -194
- package/dist/components/index.es.js.map +1 -1
- package/dist/components/index.js +2 -89
- package/dist/components/index.js.map +1 -1
- package/dist/components/index2.js +196 -0
- package/dist/components/index2.js.map +1 -0
- package/dist/components/info.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/mailbox-store.js +3 -2
- package/dist/components/mailbox-store.js.map +1 -1
- package/dist/components/microsoft-logo.js +1 -1
- package/dist/components/multi-select-dropdown2.js +3 -3
- package/dist/components/nylas-additional-participants.js +2 -2
- package/dist/components/nylas-api-request.js +58 -0
- package/dist/components/nylas-api-request.js.map +1 -0
- package/dist/components/nylas-availability-picker2.js +33 -14
- package/dist/components/nylas-availability-picker2.js.map +1 -1
- package/dist/components/nylas-booked-event-card2.js +1 -1
- package/dist/components/nylas-booking-calendar-picker2.js +12 -5
- package/dist/components/nylas-booking-calendar-picker2.js.map +1 -1
- package/dist/components/nylas-booking-form2.js +1 -1
- package/dist/components/nylas-buffer-time2.js +1 -1
- package/dist/components/nylas-calendar-picker2.js +13 -8
- package/dist/components/nylas-calendar-picker2.js.map +1 -1
- package/dist/components/nylas-cancel-booking-form2.js +2 -2
- package/dist/components/nylas-cancelled-event-card2.js +2 -2
- package/dist/components/nylas-composer2.js +2 -2
- package/dist/components/nylas-custom-booking-flow2.js +23 -12
- package/dist/components/nylas-custom-booking-flow2.js.map +1 -1
- package/dist/components/nylas-date-picker2.js +1 -1
- package/dist/components/nylas-editor-tabs2.js +74 -43
- package/dist/components/nylas-editor-tabs2.js.map +1 -1
- package/dist/components/nylas-event-description2.js +17 -6
- package/dist/components/nylas-event-description2.js.map +1 -1
- package/dist/components/nylas-event-duration2.js +16 -9
- package/dist/components/nylas-event-duration2.js.map +1 -1
- package/dist/components/nylas-event-info2.js +2 -2
- package/dist/components/nylas-event-limits2.js +2 -2
- package/dist/components/nylas-event-title2.js +56 -13
- package/dist/components/nylas-event-title2.js.map +1 -1
- package/dist/components/nylas-form-card2.js +2 -2
- package/dist/components/nylas-if-state.js +1 -1
- package/dist/components/nylas-limit-future-bookings2.js +25 -10
- package/dist/components/nylas-limit-future-bookings2.js.map +1 -1
- package/dist/components/nylas-list-configurations2.js +28 -11
- package/dist/components/nylas-list-configurations2.js.map +1 -1
- package/dist/components/nylas-list-folders.js +2 -2
- package/dist/components/nylas-list-threads.js +2 -2
- package/dist/components/nylas-location-component2.js +18 -5
- package/dist/components/nylas-location-component2.js.map +1 -1
- package/dist/components/nylas-login.js +1 -1
- package/dist/components/nylas-logo2.js +1 -1
- package/dist/components/nylas-mailbox-pagination.js +1 -1
- package/dist/components/nylas-mailbox-toolbar-button.js +2 -2
- package/dist/components/nylas-mailbox.js +2 -2
- package/dist/components/nylas-min-cancellation-notice2.js +29 -12
- package/dist/components/nylas-min-cancellation-notice2.js.map +1 -1
- package/dist/components/nylas-notification2.js +2 -2
- package/dist/components/nylas-provider.js +2 -2
- package/dist/components/nylas-scheduler-editor.js +18 -58
- package/dist/components/nylas-scheduler-editor.js.map +1 -1
- package/dist/components/nylas-scheduling.js +1 -1
- package/dist/components/nylas-selected-event-card2.js +1 -1
- package/dist/components/nylas-summarize-message-button2.js +3 -3
- package/dist/components/nylas-threads-refresh.js +3 -3
- package/dist/components/nylas-threads-search.js +2 -2
- package/dist/components/nylas-time-window-picker2.js +2 -2
- package/dist/components/nylas-timeslot-picker2.js +1 -1
- package/dist/components/nylas-view-email2.js +2 -2
- package/dist/components/nylas-view-thread.js +2 -2
- package/dist/components/people-icon.js +1 -1
- package/dist/components/play.js +1 -1
- package/dist/components/refresh.js +1 -1
- package/dist/components/register-component.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 +10 -4
- package/dist/components/scheduler-config-store.js.map +1 -1
- package/dist/components/scheduler-store.js +16 -3
- package/dist/components/scheduler-store.js.map +1 -1
- package/dist/components/search.js +1 -1
- package/dist/components/select-dropdown2.js +2 -2
- 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/time-period-selector2.js +2 -2
- 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/utils.js +1 -1
- package/dist/components/warning.js +1 -1
- package/dist/esm/add-circle-icon.entry.js +1 -1
- package/dist/esm/add-circle-icon_22.entry.js +222 -92
- package/dist/esm/add-circle-icon_22.entry.js.map +1 -1
- package/dist/esm/archive-icon.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.entry.js +1 -1
- package/dist/esm/bold-icon_3.entry.js +3 -3
- package/dist/esm/button-component.entry.js +2 -2
- package/dist/esm/button-component.entry.js.map +1 -1
- package/dist/esm/calendar-cancel-icon.entry.js +1 -1
- package/dist/esm/calendar-check-icon.entry.js +1 -1
- package/dist/esm/calendar-check-icon_2.entry.js +2 -2
- package/dist/esm/calendar-icon.entry.js +1 -1
- package/dist/esm/calendar-info-icon.entry.js +1 -1
- package/dist/esm/calendar-patterns-icon.entry.js +1 -1
- package/dist/esm/checkmark-circle-icon.entry.js +1 -1
- package/dist/esm/chevron-icon.entry.js +1 -1
- package/dist/esm/chevron-icon_3.entry.js +4 -4
- package/dist/esm/close-icon.entry.js +1 -1
- package/dist/esm/{constants-335dffcf.js → constants-bf39e913.js} +11 -2
- package/dist/esm/{constants-335dffcf.js.map → constants-bf39e913.js.map} +1 -1
- package/dist/esm/{constants-6ee60d6d.js → constants-f34b9c6e.js} +11 -2
- package/dist/esm/{constants-6ee60d6d.js.map → constants-f34b9c6e.js.map} +1 -1
- package/dist/esm/document-refresh-icon.entry.js +1 -1
- package/dist/esm/flow-icon.entry.js +1 -1
- package/dist/esm/folder-icon.entry.js +1 -1
- package/dist/esm/forward-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.entry.js +1 -1
- package/dist/esm/google-logo-icon_4.entry.js +93 -49
- package/dist/esm/google-logo-icon_4.entry.js.map +1 -1
- package/dist/esm/inbox-icon.entry.js +1 -1
- package/dist/esm/index-7cb0dd3d.js +1 -158
- package/dist/esm/index-8362ce5c.js +1 -362
- package/dist/esm/index.js +1 -1
- package/dist/esm/info-icon.entry.js +1 -1
- package/dist/esm/info-icon_2.entry.js +2 -2
- package/dist/esm/italic-icon.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/loading-icon.entry.js +1 -1
- package/dist/esm/location-icon.entry.js +1 -1
- package/dist/esm/location-off-icon.entry.js +1 -1
- package/dist/esm/microsoft-logo-icon.entry.js +1 -1
- package/dist/esm/multi-select-dropdown.entry.js +2 -2
- package/dist/esm/nylas-additional-participants.entry.js +1 -1
- package/dist/esm/{nylas-api-request-3120d9ac.js → nylas-api-request-8932547a.js} +13 -2
- package/dist/esm/nylas-api-request-8932547a.js.map +1 -0
- package/dist/{nylas-web-elements/nylas-api-request-4f3dbb72.js → esm/nylas-api-request-b085294d.js} +13 -2
- package/dist/esm/nylas-api-request-b085294d.js.map +1 -0
- package/dist/esm/nylas-availability-picker.entry.js +31 -14
- package/dist/esm/nylas-availability-picker.entry.js.map +1 -1
- package/dist/esm/nylas-booked-event-card.entry.js +1 -1
- package/dist/esm/nylas-booked-event-card_10.entry.js +5 -5
- package/dist/esm/nylas-booking-calendar-picker.entry.js +10 -4
- package/dist/esm/nylas-booking-calendar-picker.entry.js.map +1 -1
- package/dist/esm/nylas-calendar-picker.entry.js +11 -6
- package/dist/esm/nylas-calendar-picker.entry.js.map +1 -1
- package/dist/esm/nylas-cancel-booking-form.entry.js +1 -1
- package/dist/esm/nylas-cancelled-event-card.entry.js +1 -1
- package/dist/esm/nylas-composer.entry.js +1 -1
- package/dist/esm/nylas-custom-booking-flow.entry.js +19 -10
- package/dist/esm/nylas-custom-booking-flow.entry.js.map +1 -1
- package/dist/esm/nylas-editor-tabs.entry.js +67 -38
- package/dist/esm/nylas-editor-tabs.entry.js.map +1 -1
- package/dist/esm/nylas-event-description.entry.js +13 -4
- package/dist/esm/nylas-event-description.entry.js.map +1 -1
- package/dist/esm/nylas-event-duration.entry.js +13 -8
- package/dist/esm/nylas-event-duration.entry.js.map +1 -1
- package/dist/esm/nylas-event-info.entry.js +1 -1
- package/dist/esm/nylas-event-limits.entry.js +1 -1
- package/dist/esm/nylas-event-title.entry.js +50 -10
- package/dist/esm/nylas-event-title.entry.js.map +1 -1
- package/dist/esm/nylas-form-card.entry.js +1 -1
- package/dist/esm/nylas-limit-future-bookings.entry.js +22 -9
- package/dist/esm/nylas-limit-future-bookings.entry.js.map +1 -1
- package/dist/esm/nylas-list-configurations.entry.js +24 -9
- package/dist/esm/nylas-list-configurations.entry.js.map +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-locale-switch.entry.js +1 -1
- package/dist/esm/nylas-location-component.entry.js +15 -4
- package/dist/esm/nylas-location-component.entry.js.map +1 -1
- package/dist/esm/nylas-login.entry.js +1 -1
- package/dist/esm/nylas-logo.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-min-cancellation-notice.entry.js +26 -11
- package/dist/esm/nylas-min-cancellation-notice.entry.js.map +1 -1
- package/dist/esm/nylas-notification.entry.js +1 -1
- package/dist/esm/nylas-provider.entry.js +3 -3
- package/dist/esm/nylas-scheduler-editor.entry.js +16 -16
- package/dist/esm/nylas-scheduler-editor.entry.js.map +1 -1
- package/dist/esm/nylas-scheduling.entry.js +1 -1
- package/dist/esm/nylas-selected-event-card.entry.js +1 -1
- package/dist/esm/nylas-summarize-message-button.entry.js +2 -2
- 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-email.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/people-icon.entry.js +1 -1
- package/dist/esm/play-icon.entry.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/reply-all-icon.entry.js +1 -1
- package/dist/esm/reply-icon.entry.js +1 -1
- package/dist/esm/{scheduler-config-store-6222c0ed.js → scheduler-config-store-07d98279.js} +10 -4
- package/dist/esm/scheduler-config-store-07d98279.js.map +1 -0
- package/dist/esm/{scheduler-config-store-0efc3519.js → scheduler-config-store-8f2e658e.js} +10 -4
- package/dist/esm/scheduler-config-store-8f2e658e.js.map +1 -0
- package/dist/{nylas-web-elements/scheduler-store-8ddcc496.js → esm/scheduler-store-66c2168c.js} +15 -2
- package/dist/esm/scheduler-store-66c2168c.js.map +1 -0
- package/dist/esm/{scheduler-store-39d37291.js → scheduler-store-a175fc3e.js} +15 -2
- package/dist/esm/scheduler-store-a175fc3e.js.map +1 -0
- package/dist/esm/search-icon.entry.js +1 -1
- package/dist/esm/select-dropdown.entry.js +2 -2
- package/dist/esm/sent-icon.entry.js +1 -1
- package/dist/esm/spam-icon.entry.js +1 -1
- package/dist/esm/star-icon.entry.js +1 -1
- package/dist/esm/stop-icon.entry.js +1 -1
- package/dist/esm/time-period-selector.entry.js +1 -1
- package/dist/esm/tooltip-component.entry.js +1 -1
- package/dist/esm/translate-icon.entry.js +1 -1
- package/dist/esm/trash-icon.entry.js +1 -1
- package/dist/esm/underline-icon.entry.js +1 -1
- package/dist/esm/warning-icon.entry.js +1 -1
- package/dist/nylas-web-elements/add-circle-icon.entry.js +1 -1
- package/dist/nylas-web-elements/archive-icon.entry.js +1 -1
- package/dist/nylas-web-elements/arrow-icon.entry.js +1 -1
- package/dist/nylas-web-elements/bold-icon.entry.js +1 -1
- package/dist/nylas-web-elements/button-component.entry.js +2 -2
- package/dist/nylas-web-elements/button-component.entry.js.map +1 -1
- package/dist/nylas-web-elements/calendar-cancel-icon.entry.js +1 -1
- package/dist/nylas-web-elements/calendar-check-icon.entry.js +1 -1
- package/dist/nylas-web-elements/calendar-icon.entry.js +1 -1
- package/dist/nylas-web-elements/calendar-info-icon.entry.js +1 -1
- package/dist/nylas-web-elements/calendar-patterns-icon.entry.js +1 -1
- package/dist/nylas-web-elements/checkmark-circle-icon.entry.js +1 -1
- package/dist/nylas-web-elements/chevron-icon.entry.js +1 -1
- package/dist/nylas-web-elements/close-icon.entry.js +1 -1
- package/dist/nylas-web-elements/{constants-335dffcf.js → constants-bf39e913.js} +11 -2
- package/dist/nylas-web-elements/{constants-335dffcf.js.map → constants-bf39e913.js.map} +1 -1
- package/dist/nylas-web-elements/document-refresh-icon.entry.js +1 -1
- package/dist/nylas-web-elements/flow-icon.entry.js +1 -1
- package/dist/nylas-web-elements/folder-icon.entry.js +1 -1
- package/dist/nylas-web-elements/forward-icon.entry.js +1 -1
- package/dist/nylas-web-elements/globe-icon.entry.js +1 -1
- package/dist/nylas-web-elements/google-logo-icon.entry.js +1 -1
- package/dist/nylas-web-elements/inbox-icon.entry.js +1 -1
- package/dist/nylas-web-elements/index.esm.js +1 -1
- package/dist/nylas-web-elements/info-icon.entry.js +1 -1
- package/dist/nylas-web-elements/italic-icon.entry.js +1 -1
- package/dist/nylas-web-elements/loading-icon.entry.js +1 -1
- package/dist/nylas-web-elements/location-icon.entry.js +1 -1
- package/dist/nylas-web-elements/location-off-icon.entry.js +1 -1
- package/dist/nylas-web-elements/microsoft-logo-icon.entry.js +1 -1
- package/dist/nylas-web-elements/multi-select-dropdown.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-additional-participants.entry.js +1 -1
- package/dist/{esm/nylas-api-request-4f3dbb72.js → nylas-web-elements/nylas-api-request-b085294d.js} +13 -2
- package/dist/nylas-web-elements/nylas-api-request-b085294d.js.map +1 -0
- package/dist/nylas-web-elements/nylas-availability-picker.entry.js +31 -14
- package/dist/nylas-web-elements/nylas-availability-picker.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-booked-event-card.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-booking-calendar-picker.entry.js +10 -4
- package/dist/nylas-web-elements/nylas-booking-calendar-picker.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-calendar-picker.entry.js +11 -6
- package/dist/nylas-web-elements/nylas-calendar-picker.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-cancel-booking-form.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-cancelled-event-card.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-composer.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-custom-booking-flow.entry.js +19 -10
- package/dist/nylas-web-elements/nylas-custom-booking-flow.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-editor-tabs.entry.js +67 -38
- package/dist/nylas-web-elements/nylas-editor-tabs.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-event-description.entry.js +13 -4
- package/dist/nylas-web-elements/nylas-event-description.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-event-duration.entry.js +13 -8
- package/dist/nylas-web-elements/nylas-event-duration.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-event-info.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-event-limits.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-event-title.entry.js +50 -10
- package/dist/nylas-web-elements/nylas-event-title.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-form-card.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-limit-future-bookings.entry.js +22 -9
- package/dist/nylas-web-elements/nylas-limit-future-bookings.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-list-configurations.entry.js +24 -9
- package/dist/nylas-web-elements/nylas-list-configurations.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-list-folders.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-list-threads.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-locale-switch.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-location-component.entry.js +15 -4
- package/dist/nylas-web-elements/nylas-location-component.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-login.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-logo.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-mailbox-toolbar-button.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-mailbox.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-min-cancellation-notice.entry.js +26 -11
- package/dist/nylas-web-elements/nylas-min-cancellation-notice.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-notification.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-provider.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-scheduler-editor.entry.js +16 -16
- package/dist/nylas-web-elements/nylas-scheduler-editor.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-scheduling.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-selected-event-card.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-summarize-message-button.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-threads-refresh.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-threads-search.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-time-window-picker.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-view-email.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-view-thread.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-web-elements.esm.js +1 -1
- package/dist/nylas-web-elements/p-00a9efc1.entry.js +2 -0
- package/dist/nylas-web-elements/p-1a91cce5.entry.js +2 -0
- package/dist/nylas-web-elements/p-1a91cce5.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-fe3b8e66.entry.js → p-1d25ca06.entry.js} +2 -2
- package/dist/nylas-web-elements/p-1e445e86.entry.js +2 -0
- package/dist/nylas-web-elements/{p-7692056f.entry.js → p-2081b475.entry.js} +2 -2
- package/dist/nylas-web-elements/p-22e5436c.js +2 -0
- package/dist/nylas-web-elements/p-22e5436c.js.map +1 -0
- package/dist/nylas-web-elements/p-2b636359.entry.js +2 -0
- package/dist/nylas-web-elements/p-2b636359.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-618b94cd.entry.js → p-30784693.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-1260ac06.entry.js → p-33b940fb.entry.js} +2 -2
- package/dist/nylas-web-elements/p-343a02e1.entry.js +2 -0
- package/dist/nylas-web-elements/{p-674b6d5d.entry.js → p-343b8684.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-1c94940d.entry.js → p-3909ec3f.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-9c399019.entry.js → p-3b281401.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-55368bc0.entry.js → p-42791515.entry.js} +2 -2
- package/dist/nylas-web-elements/p-44a9ce77.entry.js +2 -0
- package/dist/nylas-web-elements/{p-1819b3d7.js → p-49f716ed.js} +4 -4
- package/dist/nylas-web-elements/p-49f716ed.js.map +1 -0
- package/dist/nylas-web-elements/{p-1ab25f04.entry.js → p-50b4a80f.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-266f9995.entry.js → p-571472d4.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-57b753c6.entry.js → p-607b547b.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-424f4d9a.entry.js → p-6110351b.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-1655dec3.entry.js → p-665ef10b.entry.js} +4 -4
- package/dist/nylas-web-elements/p-665ef10b.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-945caf14.entry.js → p-694b511a.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-18a936a3.entry.js → p-73c062f8.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-c451c9e1.entry.js → p-75a8d077.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-c199d203.entry.js → p-80d6175c.entry.js} +2 -2
- package/dist/nylas-web-elements/p-939db546.entry.js +2 -0
- package/dist/nylas-web-elements/{p-858f0aad.entry.js → p-95a3094a.entry.js} +2 -2
- package/dist/nylas-web-elements/p-a628eaeb.js +2 -0
- package/dist/nylas-web-elements/p-a628eaeb.js.map +1 -0
- package/dist/nylas-web-elements/{p-04e3a98e.entry.js → p-ad64c2b8.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-8b1a6e27.entry.js → p-b25821e1.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-572bf8c2.entry.js → p-b53062f7.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-3f6155de.entry.js → p-bbf9aff2.entry.js} +2 -2
- package/dist/nylas-web-elements/p-c20ab972.entry.js +2 -0
- package/dist/nylas-web-elements/{p-ae893050.entry.js → p-cc674b3b.entry.js} +3 -3
- package/dist/nylas-web-elements/{p-9d4bffbb.entry.js → p-d8f09631.entry.js} +2 -2
- package/dist/nylas-web-elements/p-db15d382.js +2 -0
- package/dist/nylas-web-elements/p-db15d382.js.map +1 -0
- package/dist/nylas-web-elements/{p-81ea7310.entry.js → p-df6d54c7.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-370cdcca.entry.js → p-f154a362.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-9b195811.entry.js → p-f1f8f745.entry.js} +2 -2
- package/dist/nylas-web-elements/people-icon.entry.js +1 -1
- package/dist/nylas-web-elements/play-icon.entry.js +1 -1
- package/dist/nylas-web-elements/refresh-icon.entry.js +1 -1
- package/dist/nylas-web-elements/reply-all-icon.entry.js +1 -1
- package/dist/nylas-web-elements/reply-icon.entry.js +1 -1
- package/dist/nylas-web-elements/{scheduler-config-store-0efc3519.js → scheduler-config-store-8f2e658e.js} +10 -4
- package/dist/nylas-web-elements/scheduler-config-store-8f2e658e.js.map +1 -0
- package/dist/{esm/scheduler-store-8ddcc496.js → nylas-web-elements/scheduler-store-66c2168c.js} +15 -2
- package/dist/nylas-web-elements/scheduler-store-66c2168c.js.map +1 -0
- package/dist/nylas-web-elements/search-icon.entry.js +1 -1
- package/dist/nylas-web-elements/select-dropdown.entry.js +2 -2
- package/dist/nylas-web-elements/sent-icon.entry.js +1 -1
- package/dist/nylas-web-elements/spam-icon.entry.js +1 -1
- package/dist/nylas-web-elements/star-icon.entry.js +1 -1
- package/dist/nylas-web-elements/stop-icon.entry.js +1 -1
- package/dist/nylas-web-elements/time-period-selector.entry.js +1 -1
- package/dist/nylas-web-elements/tooltip-component.entry.js +1 -1
- package/dist/nylas-web-elements/translate-icon.entry.js +1 -1
- package/dist/nylas-web-elements/trash-icon.entry.js +1 -1
- package/dist/nylas-web-elements/underline-icon.entry.js +1 -1
- package/dist/nylas-web-elements/warning-icon.entry.js +1 -1
- package/dist/types/common/constants.d.ts +2 -0
- package/dist/types/common/nylas-api-request.d.ts +3 -0
- package/dist/types/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.d.ts +10 -4
- package/dist/types/components/scheduler-editor/nylas-booking-calendar-picker/nylas-booking-calendar-picker.d.ts +2 -0
- package/dist/types/components/scheduler-editor/nylas-calendar-picker/nylas-calendar-picker.d.ts +3 -2
- package/dist/types/components/scheduler-editor/nylas-custom-booking-flow/nylas-custom-booking-flow.d.ts +4 -1
- package/dist/types/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.d.ts +35 -5
- package/dist/types/components/scheduler-editor/nylas-event-description/nylas-event-description.d.ts +3 -0
- package/dist/types/components/scheduler-editor/nylas-event-duration/nylas-event-duration.d.ts +3 -0
- package/dist/types/components/scheduler-editor/nylas-event-title/nylas-event-title.d.ts +6 -1
- package/dist/types/components/scheduler-editor/nylas-limit-future-bookings/nylas-limit-future-bookings.d.ts +6 -6
- package/dist/types/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.d.ts +2 -0
- package/dist/types/components/scheduler-editor/nylas-location-component/nylas-location-component.d.ts +3 -0
- package/dist/types/components/scheduler-editor/nylas-min-cancellation-notice/nylas-min-cancellation-notice.d.ts +4 -1
- package/dist/types/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.d.ts +3 -2
- package/dist/types/components.d.ts +110 -22
- package/dist/types/connector/nylas-connector/index.d.ts +1 -1
- package/dist/types/connector/nylas-scheduler-config-connector/index.d.ts +1 -1
- package/dist/types/connector/nylas-scheduler-connector/errors/index.d.ts +1 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/stores/scheduler-config-store.d.ts +6 -2
- package/package.json +4 -2
- package/dist/cjs/nylas-api-request-2a0e7022.js.map +0 -1
- package/dist/cjs/nylas-api-request-55923233.js.map +0 -1
- package/dist/cjs/scheduler-config-store-4d93a9b7.js.map +0 -1
- package/dist/cjs/scheduler-config-store-a0e08cab.js.map +0 -1
- package/dist/cjs/scheduler-store-a492526c.js.map +0 -1
- package/dist/cjs/scheduler-store-e148a4cc.js.map +0 -1
- package/dist/esm/nylas-api-request-3120d9ac.js.map +0 -1
- package/dist/esm/nylas-api-request-4f3dbb72.js.map +0 -1
- package/dist/esm/scheduler-config-store-0efc3519.js.map +0 -1
- package/dist/esm/scheduler-config-store-6222c0ed.js.map +0 -1
- package/dist/esm/scheduler-store-39d37291.js.map +0 -1
- package/dist/esm/scheduler-store-8ddcc496.js.map +0 -1
- package/dist/nylas-web-elements/nylas-api-request-4f3dbb72.js.map +0 -1
- package/dist/nylas-web-elements/p-0edb3b69.entry.js +0 -2
- package/dist/nylas-web-elements/p-1655dec3.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-1819b3d7.js.map +0 -1
- package/dist/nylas-web-elements/p-1aa7b357.js +0 -2
- package/dist/nylas-web-elements/p-1aa7b357.js.map +0 -1
- package/dist/nylas-web-elements/p-1f843391.js +0 -2
- package/dist/nylas-web-elements/p-1f843391.js.map +0 -1
- package/dist/nylas-web-elements/p-3116f5cc.js +0 -2
- package/dist/nylas-web-elements/p-3116f5cc.js.map +0 -1
- package/dist/nylas-web-elements/p-47180df9.entry.js +0 -2
- package/dist/nylas-web-elements/p-605142a9.entry.js +0 -2
- package/dist/nylas-web-elements/p-6dcc9411.entry.js +0 -2
- package/dist/nylas-web-elements/p-6dcc9411.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-9d0c0340.entry.js +0 -2
- package/dist/nylas-web-elements/p-9d75bcb2.entry.js +0 -2
- package/dist/nylas-web-elements/p-9d75bcb2.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-be7124f0.entry.js +0 -2
- package/dist/nylas-web-elements/p-c45ac7c6.entry.js +0 -2
- package/dist/nylas-web-elements/scheduler-config-store-0efc3519.js.map +0 -1
- package/dist/nylas-web-elements/scheduler-store-8ddcc496.js.map +0 -1
- /package/dist/nylas-web-elements/{p-c45ac7c6.entry.js.map → p-00a9efc1.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-fe3b8e66.entry.js.map → p-1d25ca06.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-47180df9.entry.js.map → p-1e445e86.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-7692056f.entry.js.map → p-2081b475.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-618b94cd.entry.js.map → p-30784693.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-1260ac06.entry.js.map → p-33b940fb.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-be7124f0.entry.js.map → p-343a02e1.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-674b6d5d.entry.js.map → p-343b8684.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-1c94940d.entry.js.map → p-3909ec3f.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-9c399019.entry.js.map → p-3b281401.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-55368bc0.entry.js.map → p-42791515.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-605142a9.entry.js.map → p-44a9ce77.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-1ab25f04.entry.js.map → p-50b4a80f.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-266f9995.entry.js.map → p-571472d4.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-57b753c6.entry.js.map → p-607b547b.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-424f4d9a.entry.js.map → p-6110351b.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-945caf14.entry.js.map → p-694b511a.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-18a936a3.entry.js.map → p-73c062f8.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-c451c9e1.entry.js.map → p-75a8d077.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-c199d203.entry.js.map → p-80d6175c.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-9d0c0340.entry.js.map → p-939db546.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-858f0aad.entry.js.map → p-95a3094a.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-04e3a98e.entry.js.map → p-ad64c2b8.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-8b1a6e27.entry.js.map → p-b25821e1.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-572bf8c2.entry.js.map → p-b53062f7.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-3f6155de.entry.js.map → p-bbf9aff2.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-0edb3b69.entry.js.map → p-c20ab972.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-ae893050.entry.js.map → p-cc674b3b.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-9d4bffbb.entry.js.map → p-d8f09631.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-81ea7310.entry.js.map → p-df6d54c7.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-370cdcca.entry.js.map → p-f154a362.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-9b195811.entry.js.map → p-f1f8f745.entry.js.map} +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { R as RegisterComponent } from './register-component.js';
|
|
3
|
-
import {
|
|
3
|
+
import { a as debug, q as getBrowser } from './utils.js';
|
|
4
4
|
import { E as EVENT_TITLE_TOKENS } from './constants.js';
|
|
5
5
|
import { d as defineCustomElement$2 } from './info.js';
|
|
6
6
|
import { d as defineCustomElement$1 } from './toolitp-component.js';
|
|
7
7
|
|
|
8
|
-
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 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 label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:
|
|
8
|
+
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)}";
|
|
9
9
|
|
|
10
10
|
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
11
11
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -28,7 +28,8 @@ const NylasEventTitle = proxyCustomElement(class NylasEventTitle extends HTMLEle
|
|
|
28
28
|
this.__attachShadow();
|
|
29
29
|
this.valueChanged = createEvent(this, "valueChanged", 7);
|
|
30
30
|
this.internals = this.attachInternals();
|
|
31
|
-
this.
|
|
31
|
+
this.selectedConfiguration = undefined;
|
|
32
|
+
this.eventTitle = this.selectedConfiguration?.event_booking?.title;
|
|
32
33
|
this.name = 'title';
|
|
33
34
|
this.showTokens = false;
|
|
34
35
|
this.availableTokens = EVENT_TITLE_TOKENS.map(token => ({
|
|
@@ -39,6 +40,7 @@ const NylasEventTitle = proxyCustomElement(class NylasEventTitle extends HTMLEle
|
|
|
39
40
|
this.filteredTokens = this.availableTokens;
|
|
40
41
|
this.ariaActivedescendant = '';
|
|
41
42
|
this.currentWord = { $value: '', fullText: '', index: -1, focusOffset: -1 };
|
|
43
|
+
this.validationError = '';
|
|
42
44
|
}
|
|
43
45
|
elementNameChangedHandler(newValue) {
|
|
44
46
|
debug('nylas-event-title', 'elementNameChangedHandler', newValue);
|
|
@@ -55,6 +57,12 @@ const NylasEventTitle = proxyCustomElement(class NylasEventTitle extends HTMLEle
|
|
|
55
57
|
options?.forEach(option => option.classList.remove('active'));
|
|
56
58
|
}
|
|
57
59
|
}
|
|
60
|
+
configChangedHandler(newVal) {
|
|
61
|
+
const title = newVal?.event_booking?.title;
|
|
62
|
+
if (title) {
|
|
63
|
+
this.updateEventTitleFromProp(title);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
58
66
|
connectedCallback() {
|
|
59
67
|
debug('nylas-event-title', 'connectedCallback');
|
|
60
68
|
}
|
|
@@ -69,13 +77,32 @@ const NylasEventTitle = proxyCustomElement(class NylasEventTitle extends HTMLEle
|
|
|
69
77
|
disconnectedCallback() {
|
|
70
78
|
debug('nylas-event-title', 'disconnectedCallback');
|
|
71
79
|
}
|
|
80
|
+
formSubmittedHandler(event) {
|
|
81
|
+
debug('nylas-event-title', 'formSubmittedHandler', event);
|
|
82
|
+
if (!this.internals?.validity?.valid) {
|
|
83
|
+
this.validationError = 'Event title is required';
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
this.validationError = '';
|
|
87
|
+
}
|
|
88
|
+
}
|
|
72
89
|
updateEventTitleFromProp(newValue) {
|
|
73
90
|
debug('nylas-event-title', 'eventTitleChangedHandler', newValue);
|
|
74
|
-
this.titleRef
|
|
75
|
-
|
|
91
|
+
if (this.titleRef) {
|
|
92
|
+
this.titleRef.innerHTML = this.highlightTokens(newValue);
|
|
93
|
+
this.titleRef.focus();
|
|
94
|
+
if (typeof this.internals.setValidity === 'function') {
|
|
95
|
+
if (newValue === '') {
|
|
96
|
+
this.internals?.setValidity({ customError: true }, `Event title is required`, this.titleRef);
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
this.internals?.setValidity({ customError: false });
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
76
103
|
}
|
|
77
|
-
highlightTokens() {
|
|
78
|
-
let outputHtml =
|
|
104
|
+
highlightTokens(title) {
|
|
105
|
+
let outputHtml = title;
|
|
79
106
|
EVENT_TITLE_TOKENS.forEach(tokenObj => {
|
|
80
107
|
const token = tokenObj.value;
|
|
81
108
|
const regex = new RegExp(`(\\${token})(?!\\w)`, 'g');
|
|
@@ -97,7 +124,6 @@ const NylasEventTitle = proxyCustomElement(class NylasEventTitle extends HTMLEle
|
|
|
97
124
|
};
|
|
98
125
|
};
|
|
99
126
|
const currentBrowser = getBrowser();
|
|
100
|
-
console.log('currentBrowser', currentBrowser);
|
|
101
127
|
switch (currentBrowser) {
|
|
102
128
|
case 'Chrome':
|
|
103
129
|
const shadowRootSelection = this.host.shadowRoot?.getSelection();
|
|
@@ -256,6 +282,15 @@ const NylasEventTitle = proxyCustomElement(class NylasEventTitle extends HTMLEle
|
|
|
256
282
|
}
|
|
257
283
|
updateEventTitle(text) {
|
|
258
284
|
const value = text.replace(/ +/g, ' ');
|
|
285
|
+
if (value === '') {
|
|
286
|
+
this.internals?.setValidity({ customError: true }, `Event title is required`, this.titleRef);
|
|
287
|
+
this.validationError = 'Event title is required';
|
|
288
|
+
}
|
|
289
|
+
else {
|
|
290
|
+
this.internals?.setValidity({ customError: false });
|
|
291
|
+
this.validationError = '';
|
|
292
|
+
}
|
|
293
|
+
this.internals?.setFormValue(value, this.name);
|
|
259
294
|
this.valueChanged.emit({ value: value, name: this.name });
|
|
260
295
|
}
|
|
261
296
|
resetDropdown() {
|
|
@@ -266,30 +301,38 @@ const NylasEventTitle = proxyCustomElement(class NylasEventTitle extends HTMLEle
|
|
|
266
301
|
return (h("div", { class: "token-label" }, h("span", { class: "token" }, token.token), h("span", { class: "description" }, token.description)));
|
|
267
302
|
}
|
|
268
303
|
render() {
|
|
269
|
-
return (h(Host, { key: '
|
|
304
|
+
return (h(Host, { key: '9287b1b2cb59f9cd83d585807070b8aaa4821a6c' }, h("div", { key: '02ca37b1b68691faf69c6cdd062475f10a87653c', class: "nylas-event-title", part: "net" }, h("label", { key: 'ceeda06d9da67727cdb5fce90b182a28cc3408e1', htmlFor: "title" }, "Event title", h("span", { key: 'd0e6b3387661a7f23a4796611f4854cf64b3bd9f', class: "required" }, "*"), h("span", { key: '84d0dd45f6a21504849aabf195676af2dacc40b2', class: "label-icon" }, h("tooltip-component", { key: 'bc8d5fbbd455a5d983ebb037e3d93e6dc2619cbd' }, h("info-icon", { key: '5c16591baceb37a8739c70b6fa505de08813ff0f', slot: "tooltip-icon" }), h("span", { key: '8214ecaad02beb8da5e0595aa13ff7057a0e60cc', slot: "tooltip-content" }, "Enter a title for your event.")))), h("div", { key: '98e9885cb4acd028908d7fb1b2a028cffd0dc7d4', class: {
|
|
305
|
+
title: true,
|
|
306
|
+
error: this.validationError !== '',
|
|
307
|
+
}, 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 && (h("div", { class: "token-options", part: "net__dropdown-content" }, h("ul", { tabindex: "-1", role: "listbox", "aria-label": this.name, "aria-activedescendant": this.ariaActivedescendant }, this.filteredTokens.map(option => (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))))))), h("span", { key: 'a2a15145119acf95335728589c24138386032188', class: "help-text" }, "Create a dynamic templated event title by typing $. Learn more"), this.validationError != '' && h("span", { class: "error-message" }, this.validationError))));
|
|
270
308
|
}
|
|
271
309
|
static get formAssociated() { return true; }
|
|
272
310
|
get host() { return this; }
|
|
273
311
|
static get watchers() { return {
|
|
274
312
|
"name": ["elementNameChangedHandler"],
|
|
275
|
-
"ariaActivedescendant": ["ariaActivedescendantChangedHandler"]
|
|
313
|
+
"ariaActivedescendant": ["ariaActivedescendantChangedHandler"],
|
|
314
|
+
"selectedConfiguration": ["configChangedHandler"]
|
|
276
315
|
}; }
|
|
277
316
|
static get style() { return nylasEventTitleCss; }
|
|
278
317
|
}, [65, "nylas-event-title", {
|
|
318
|
+
"selectedConfiguration": [16],
|
|
279
319
|
"eventTitle": [1, "event-title"],
|
|
280
320
|
"name": [1],
|
|
281
321
|
"showTokens": [32],
|
|
282
322
|
"availableTokens": [32],
|
|
283
323
|
"filteredTokens": [32],
|
|
284
324
|
"ariaActivedescendant": [32],
|
|
285
|
-
"currentWord": [32]
|
|
286
|
-
|
|
325
|
+
"currentWord": [32],
|
|
326
|
+
"validationError": [32]
|
|
327
|
+
}, [[8, "formSubmitted", "formSubmittedHandler"]], {
|
|
287
328
|
"name": ["elementNameChangedHandler"],
|
|
288
|
-
"ariaActivedescendant": ["ariaActivedescendantChangedHandler"]
|
|
329
|
+
"ariaActivedescendant": ["ariaActivedescendantChangedHandler"],
|
|
330
|
+
"selectedConfiguration": ["configChangedHandler"]
|
|
289
331
|
}]);
|
|
290
332
|
__decorate([
|
|
291
333
|
RegisterComponent({
|
|
292
334
|
name: 'nylas-event-title',
|
|
335
|
+
stateToProps: new Map([['schedulerConfig.selectedConfiguration', 'selectedConfiguration']]),
|
|
293
336
|
eventToProps: {},
|
|
294
337
|
fireRegisterEvent: true,
|
|
295
338
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"nylas-event-title2.js","mappings":";;;;;;;AAAA,MAAM,kBAAkB,GAAG,qjGAAqjG;;;;;;;;;;;;;;;;MC6BnkG,eAAe;;;;;;;;oBAYH,OAAO;0BAMC,KAAK;+BAI6CA,kBAAgB,CAAC,GAAG,CAAC,KAAK,KAAK;YAC9G,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,SAAS,EAAE,KAAK;SACjB,CAAC,CAAC;8BAI6E,IAAI,CAAC,eAAe;oCAK5D,EAAE;2BAWtC,EAAE,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,EAAE,WAAW,EAAE,CAA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.scss?tag=nylas-event-title&encapsulation=shadow","src/components/scheduler-editor/nylas-event-title/nylas-event-title.tsx"],"sourcesContent":["@import '../../../common/styles/variables.scss';\n\n:host {\n display: block;\n @include default-css-variables;\n}\n\n.nylas-event-title {\n display: flex;\n flex-direction: column;\n gap: 4px;\n position: relative;\n text-align: left;\n div.title {\n padding: 12px 16px;\n border: 1px solid var(--nylas-base-200);\n border-radius: var(--nylas-border-radius-2x);\n overflow: scroll;\n white-space: nowrap;\n scrollbar-width: thin;\n &::-webkit-scrollbar {\n width: 6px;\n height: 6px;\n }\n }\n input {\n padding: 12px 16px;\n border-width: 1;\n border-radius: 8px;\n border: 1px solid var(--nylas-base-200);\n }\n span.help-text {\n color: var(--nylas-base-800);\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 21px;\n }\n label {\n display: flex;\n align-items: center;\n color: var(--nylas-base-800);\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 150%; /* 21px */\n span.required {\n color: var(--nylas-error, #cc4841);\n }\n span.label-icon {\n margin-left: 4px;\n tooltip-component {\n display: flex;\n }\n }\n }\n}\n\n.highlighted-tag {\n background-color: var(--nylas-base-200);\n border-radius: var(--nylas-border-radius);\n padding: 5px;\n margin-left: 4px;\n}\n\n.token-options {\n display: block;\n background-color: var(--nylas-base-0);\n width: 100%;\n max-height: 336px;\n overflow: auto;\n z-index: 1;\n border-radius: 4px;\n position: absolute;\n top: calc(48px + 24px + 8px); // 48px is the height of the input, 24px is the height of the label, 8px is the gap between the label and the input\n @media #{$mobile} {\n right: 0;\n width: 325px;\n max-width: unset;\n }\n box-shadow: 0px 4px 6px -2px #0000000d;\n box-shadow: 0px 10px 15px -3px #0000001a;\n ul {\n padding: 0;\n list-style-type: none;\n color: var(--nylas-base-900);\n max-height: 336px;\n margin: 0;\n li {\n padding: 16px, 12px, 16px, 12px;\n color: black;\n padding: 12px 16px;\n text-decoration: none;\n display: block;\n font-family: inherit;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n letter-spacing: 0px;\n text-align: left;\n cursor: pointer;\n .token-label {\n display: flex;\n flex-direction: column;\n font-weight: 400;\n .token {\n color: var(--nylas-abse-900);\n font-size: 16px;\n line-height: 24px;\n }\n .description {\n color: var(--nylas-base-600);\n font-size: 14px;\n line-height: 21px;\n }\n }\n &:hover,\n &:focus,\n &:active,\n &.active {\n background-color: var(--nylas-base-100);\n .token-label {\n .token {\n color: var(--nylas-primary);\n }\n }\n }\n }\n }\n .selected {\n background-color: var(--nylas-base-100);\n }\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug, getBrowser } from '@/utils/utils';\nimport { AttachInternals, Component, Host, State, h, Element, Prop, Watch, Event, EventEmitter } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { EVENT_TITLE_TOKENS as eventTitleTokens } from '@/common/constants';\n\ninterface CustomShadowRoot extends ShadowRoot {\n getSelection: () => Selection | null;\n}\n\ntype Token = {\n token: string;\n value: string;\n description: string;\n};\n\n/**\n * The `nylas-event-title` component is a form input for the title of an event.\n * @part net - The event title container\n * @part net__title - The event title input\n * @part net__dropdown-content - The token options container\n */\n@Component({\n tag: 'nylas-event-title',\n styleUrl: 'nylas-event-title.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasEventTitle {\n @Element() host!: HTMLElement;\n @AttachInternals() internals!: ElementInternals;\n\n // Properties\n /**\n * The title of the event from the cofiguration.\n */\n @Prop() eventTitle?: string;\n /**\n * The name attribute of this component.\n */\n @Prop() name: string = 'title';\n\n // State variables\n /**\n * Whether to show the tokens dropdown.\n */\n @State() showTokens: boolean = false;\n /**\n * The available token options for the dropdown.\n */\n @State() availableTokens: { label: string; value: string; labelHTML: Token }[] = eventTitleTokens.map(token => ({\n label: token.token,\n value: token.value,\n labelHTML: token,\n }));\n /**\n * The filtered token options for the dropdown based on the current query.\n */\n @State() filteredTokens: { label: string; value: string; labelHTML: Token }[] = this.availableTokens;\n /**\n * The aria-activedescendant attribute value. This is used to indicate the\n * currently active descendant in the tokens dropdown.\n */\n @State() ariaActivedescendant: string = '';\n /**\n * Stores the reference to the current word being typed.\n * This is used to update the event title with the selected token tag when\n * an option is selected from the dropdown by clicking on it.\n */\n @State() currentWord: {\n $value: string;\n fullText: string;\n index: number;\n focusOffset: number;\n } = { $value: '', fullText: '', index: -1, focusOffset: -1 };\n\n // Reference to the title div element\n private titleRef!: HTMLDivElement;\n\n /**\n * When a name prop is passed, stencil does not automatically set the name attribute on the host element.\n * Since this component is form-associated, the name attribute is required for form submission.\n * This is a workaround to ensure that the name attribute is set on the host element.\n */\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-event-title', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('ariaActivedescendant')\n ariaActivedescendantChangedHandler(newValue: string) {\n debug('nylas-event-title', 'ariaActivedescendantChangedHandler', newValue);\n if (newValue !== '') {\n const activeOption = this.host.shadowRoot?.getElementById(newValue);\n activeOption?.classList.add('active');\n } else {\n const options = this.host.shadowRoot?.querySelectorAll('.token-options li.active');\n options?.forEach(option => option.classList.remove('active'));\n }\n }\n\n // Events\n /**\n * This event is fired when the value of the event title changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n // Lifecycle methods\n connectedCallback() {\n debug('nylas-event-title', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-event-title', 'componentWillLoad');\n this.host.setAttribute('name', this.name);\n }\n\n componentDidLoad() {\n debug('nylas-event-title', 'componentDidLoad');\n this.updateEventTitleFromProp(this.eventTitle || '');\n }\n\n disconnectedCallback() {\n debug('nylas-event-title', 'disconnectedCallback');\n }\n\n updateEventTitleFromProp(newValue: string) {\n debug('nylas-event-title', 'eventTitleChangedHandler', newValue);\n\n this.titleRef.innerHTML = this.highlightTokens();\n this.titleRef.focus();\n }\n\n highlightTokens() {\n let outputHtml = this.eventTitle || '';\n\n eventTitleTokens.forEach(tokenObj => {\n const token = tokenObj.value;\n // Create a regular expression that matches the token as a whole word\n const regex = new RegExp(`(\\\\${token})(?!\\\\w)`, 'g');\n // Replace the token with a span element\n outputHtml = outputHtml.replace(regex, '<span class=\"highlighted-tag\">$1</span>');\n });\n return outputHtml;\n }\n\n getCurrentSelectionForBrowser() {\n const getSelectionTextData = (nodeValue, offset, node) => {\n // Remove zero-width space characters from the text, because they are not visible and cause issues with the selection\n const text = nodeValue.replace(/[\\u200B-\\u200D\\uFEFF]/g, '');\n const dollarIndex = text.lastIndexOf('$');\n const lastWord = text.substring(dollarIndex).split(' ')[0];\n return {\n focusOffset: offset,\n dollarIndex,\n lastWord,\n currentText: text,\n node,\n };\n };\n\n const currentBrowser = getBrowser();\n console.log('currentBrowser', currentBrowser);\n switch (currentBrowser) {\n case 'Chrome':\n const shadowRootSelection = (this.host.shadowRoot as CustomShadowRoot)?.getSelection();\n const focusNode = shadowRootSelection?.focusNode;\n const focusNodeValue = focusNode?.nodeValue || '';\n return getSelectionTextData(focusNodeValue, shadowRootSelection?.focusOffset || -1, focusNode);\n case 'Firefox':\n const selection = document.getSelection();\n const anchorNodeValue = selection?.anchorNode?.nodeValue || '';\n return getSelectionTextData(anchorNodeValue, selection?.focusOffset || -1, selection?.anchorNode);\n case 'Safari':\n const windowSelection = window.getSelection();\n const anchorNode = (windowSelection as any)?.getComposedRanges(this.host.shadowRoot as CustomShadowRoot)[0];\n const currentText = anchorNode?.startContainer?.nodeValue || '';\n return getSelectionTextData(currentText, anchorNode?.endOffset || -1, anchorNode?.startContainer);\n default:\n console.warn('Browser not supported');\n return null;\n }\n }\n\n handleChange(event: Event) {\n const textContent = (event.target as HTMLDivElement).textContent || '';\n // All browsers handle Selection within Shadow DOM differently, so get the current selection based on the browser\n const currentSelection = this.getCurrentSelectionForBrowser();\n if (!currentSelection) {\n this.updateEventTitle(textContent);\n this.resetDropdown();\n return;\n }\n const { focusOffset, dollarIndex, lastWord, currentText } = currentSelection;\n\n if (dollarIndex === -1 || focusOffset < dollarIndex) {\n this.updateEventTitle(textContent);\n this.resetDropdown();\n return;\n }\n if (lastWord.startsWith('$')) {\n this.showTokens = true;\n // Update the current word being typed, we need this reference to update the event title with the selected token\n // because the user can select an option from the dropdown by clicking on it, which will not trigger the input event.\n this.currentWord = {\n $value: lastWord,\n fullText: currentText,\n index: dollarIndex,\n focusOffset,\n };\n this.populateSuggestionsDropdown(lastWord);\n } else {\n this.resetDropdown();\n }\n this.updateEventTitle(textContent);\n }\n\n handleInputKeyDown(event) {\n if (event.key === 'Enter') {\n event.preventDefault();\n const activeOption = this.host.shadowRoot?.getElementById(this.ariaActivedescendant);\n if (activeOption) {\n activeOption.click();\n this.ariaActivedescendant = '';\n }\n } else if (event.key === 'ArrowDown') {\n event.preventDefault();\n const activeOption = this.host.shadowRoot?.getElementById(this.ariaActivedescendant);\n if (activeOption) {\n const nextOption = activeOption.nextElementSibling;\n if (nextOption) {\n this.ariaActivedescendant = nextOption.id;\n } else {\n this.ariaActivedescendant = this.filteredTokens[0].label;\n }\n } else {\n this.ariaActivedescendant = this.filteredTokens[0].label;\n }\n } else if (event.key === 'ArrowUp') {\n event.preventDefault();\n const activeOption = this.host.shadowRoot?.getElementById(this.ariaActivedescendant);\n if (activeOption) {\n const prevOption = activeOption.previousElementSibling;\n if (prevOption) {\n this.ariaActivedescendant = prevOption.id;\n } else {\n this.ariaActivedescendant = this.filteredTokens[this.filteredTokens.length - 1].label;\n }\n } else {\n this.ariaActivedescendant = this.filteredTokens[this.filteredTokens.length - 1].label;\n }\n } else if (event.key === 'Escape') {\n event.preventDefault();\n this.resetDropdown();\n } else if (event.key === 'Backspace' || event.key === 'Delete') {\n const selection = this.getCurrentSelectionForBrowser();\n if (selection?.currentText.startsWith('${')) {\n selection?.node?.parentNode && selection.node.parentNode.removeChild(selection.node);\n }\n }\n }\n\n selectOption(e: Event, option: { label: string; value: string; labelHTML: Token }) {\n e.preventDefault();\n const word = this.currentWord.fullText;\n const dollarWord = this.currentWord.$value;\n\n // Traverse the DOM to find the text node that contains the current word fullText\n let currentNode = this.titleRef.firstChild;\n let textNode: ChildNode | null = null;\n\n while (currentNode) {\n if (currentNode.nodeType === 3) {\n const currentNodeText = currentNode.textContent?.replace(/[\\u200B-\\u200D\\uFEFF]/g, '') || '';\n const wordText = word.replace(/[\\u200B-\\u200D\\uFEFF]/g, '');\n if (currentNodeText.includes(wordText)) {\n textNode = currentNode;\n break;\n }\n }\n currentNode = currentNode.nextSibling;\n }\n\n if (!textNode) {\n return;\n }\n // Split the text node into three parts: text before the token, the token, and text after the token\n const text = textNode.textContent || '';\n const index = text.indexOf(dollarWord);\n const textBefore = text.substring(0, index);\n const textAfter = text.substring(index + dollarWord.length);\n const newTextNode = document.createTextNode(textBefore);\n const newRange = document.createRange();\n\n // Create a new span element to replace the text node\n const tagSpan = document.createElement('span');\n tagSpan.classList.add('highlighted-tag');\n tagSpan.textContent = `${option.value}`;\n const newTextNodeAfter = document.createTextNode(textAfter);\n\n if (textAfter !== '') {\n // If there is text after the token, add it to the new span element\n textNode.replaceWith(newTextNode, tagSpan, newTextNodeAfter);\n newRange.setStart(newTextNodeAfter, 0);\n } else {\n // If there is no text after the token, add a zero-width space character (Without this, the cursor will not move outside the highlighted span element)\n const afterNode = document.createTextNode('\\u200B');\n textNode.replaceWith(newTextNode, tagSpan, afterNode);\n newRange.setStart(afterNode, 0);\n }\n\n // Hide the dropdown\n this.resetDropdown();\n this.titleRef.focus();\n\n // Set the focus to the new span element\n const sel = window.getSelection();\n newRange.collapse(true);\n sel?.removeAllRanges();\n sel?.addRange(newRange);\n\n // Update the event title with the selected token\n this.updateEventTitle(this.titleRef.textContent || '');\n }\n\n populateSuggestionsDropdown(query: string = '') {\n this.filteredTokens = this.availableTokens.filter(obj => {\n return obj.label.startsWith(query.toString()) || obj.value.startsWith(query.toString());\n });\n\n // Set the first option as the active descendant\n if (this.filteredTokens.length > 0) {\n this.ariaActivedescendant = this.filteredTokens[0].label;\n }\n }\n\n updateEventTitle(text: string) {\n const value = text.replace(/ +/g, ' ');\n this.valueChanged.emit({ value: value, name: this.name });\n }\n\n resetDropdown() {\n this.showTokens = false;\n this.ariaActivedescendant = '';\n }\n\n getLabelHTML(token: { token: string; description: string }) {\n return (\n <div class=\"token-label\">\n <span class=\"token\">{token.token}</span>\n <span class=\"description\">{token.description}</span>\n </div>\n );\n }\n\n @RegisterComponent<NylasEventTitle, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-event-title',\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <div class=\"nylas-event-title\" part=\"net\">\n <label htmlFor=\"title\">\n Event title<span class=\"required\">*</span>\n <span class=\"label-icon\">\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">Enter a title for your event.</span>\n </tooltip-component>\n </span>\n </label>\n <div\n class=\"title\"\n part=\"net__title\"\n ref={el => (this.titleRef = el as HTMLDivElement)}\n contentEditable=\"true\"\n onInput={e => this.handleChange(e)}\n onKeyDown={event => this.handleInputKeyDown(event)}\n ></div>\n {this.showTokens && this.filteredTokens?.length > 0 && (\n <div class=\"token-options\" part=\"net__dropdown-content\">\n <ul tabindex=\"-1\" role=\"listbox\" aria-label={this.name} aria-activedescendant={this.ariaActivedescendant}>\n {this.filteredTokens.map(option => (\n <li\n tabindex=\"0\"\n key={option.label}\n id={option.label}\n class={{ active: this.ariaActivedescendant === option.label }}\n onClick={e => this.selectOption(e, option)}\n role=\"option\"\n >\n {this.getLabelHTML(option.labelHTML)}\n </li>\n ))}\n </ul>\n </div>\n )}\n <span class=\"help-text\">Create a dynamic templated event title by typing $. Learn more</span>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"nylas-event-title2.js","mappings":";;;;;;;AAAA,MAAM,kBAAkB,GAAG,osGAAosG;;;;;;;;;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,EAAE,CAAC,IAAI,IAAI,CAAC,YAAY,CAAC,CAAC,EAAE,MAAM,CAAC,EAC1C,IAAI,EAAC,QAAQ,IAEZ,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,SAAS,CAAC,CACjC,CACN,CAAC,CACC,CACD,CACP,EACD,6DAAM,KAAK,EAAC,WAAW,qEAAsE,EAC5F,IAAI,CAAC,eAAe,IAAI,EAAE,IAAI,YAAM,KAAK,EAAC,eAAe,IAAE,IAAI,CAAC,eAAe,CAAQ,CACpF,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;AA/CD;IANC,iBAAiB,CAAqG;QACrH,IAAI,EAAE,mBAAmB;QACzB,YAAY,EAAE,IAAI,GAAG,CAAC,CAAC,CAAC,uCAAuC,EAAE,uBAAuB,CAAC,CAAC,CAAC;QAC3F,YAAY,EAAE,EAAE;QAChB,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;6CAgDD;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["eventTitleTokens"],"sources":["src/components/scheduler-editor/nylas-event-title/nylas-event-title.scss?tag=nylas-event-title&encapsulation=shadow","src/components/scheduler-editor/nylas-event-title/nylas-event-title.tsx"],"sourcesContent":["@import '../../../common/styles/variables.scss';\n\n:host {\n display: block;\n @include default-css-variables;\n}\n\n.nylas-event-title {\n display: flex;\n flex-direction: column;\n gap: 4px;\n position: relative;\n text-align: left;\n div.title {\n padding: 12px 16px;\n border: 1px solid var(--nylas-base-200);\n border-radius: var(--nylas-border-radius-2x);\n overflow: scroll;\n white-space: nowrap;\n scrollbar-width: thin;\n &::-webkit-scrollbar {\n width: 6px;\n height: 6px;\n }\n &.error {\n border-color: var(--nylas-error);\n outline: none;\n }\n }\n input {\n padding: 12px 16px;\n border-width: 1;\n border-radius: 8px;\n border: 1px solid var(--nylas-base-200);\n }\n span.help-text {\n color: var(--nylas-base-800);\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 21px;\n }\n span.error-message {\n color: var(--nylas-error);\n }\n label {\n display: flex;\n align-items: center;\n color: var(--nylas-base-800);\n font-size: 16px;\n font-style: normal;\n font-weight: 400;\n line-height: 150%; /* 21px */\n span.required {\n color: var(--nylas-error, #cc4841);\n }\n span.label-icon {\n margin-left: 4px;\n tooltip-component {\n display: flex;\n }\n }\n }\n}\n\n.highlighted-tag {\n background-color: var(--nylas-base-200);\n border-radius: var(--nylas-border-radius);\n padding: 5px;\n margin-left: 4px;\n}\n\n.token-options {\n display: block;\n background-color: var(--nylas-base-0);\n width: 100%;\n max-height: 336px;\n overflow: auto;\n z-index: 1;\n border-radius: 4px;\n position: absolute;\n top: calc(48px + 24px + 8px); // 48px is the height of the input, 24px is the height of the label, 8px is the gap between the label and the input\n @media #{$mobile} {\n right: 0;\n width: 325px;\n max-width: unset;\n }\n box-shadow: 0px 4px 6px -2px #0000000d;\n box-shadow: 0px 10px 15px -3px #0000001a;\n ul {\n padding: 0;\n list-style-type: none;\n color: var(--nylas-base-900);\n max-height: 336px;\n margin: 0;\n li {\n padding: 16px, 12px, 16px, 12px;\n color: black;\n padding: 12px 16px;\n text-decoration: none;\n display: block;\n font-family: inherit;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n letter-spacing: 0px;\n text-align: left;\n cursor: pointer;\n .token-label {\n display: flex;\n flex-direction: column;\n font-weight: 400;\n .token {\n color: var(--nylas-abse-900);\n font-size: 16px;\n line-height: 24px;\n }\n .description {\n color: var(--nylas-base-600);\n font-size: 14px;\n line-height: 21px;\n }\n }\n &:hover,\n &:focus,\n &:active,\n &.active {\n background-color: var(--nylas-base-100);\n .token-label {\n .token {\n color: var(--nylas-primary);\n }\n }\n }\n }\n }\n .selected {\n background-color: var(--nylas-base-100);\n }\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug, getBrowser } from '@/utils/utils';\nimport { AttachInternals, Component, Host, State, h, Element, Prop, Watch, Event, EventEmitter, Listen } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { EVENT_TITLE_TOKENS as eventTitleTokens } from '@/common/constants';\nimport { Configuration } from '@nylas/core';\n\ninterface CustomShadowRoot extends ShadowRoot {\n getSelection: () => Selection | null;\n}\n\ntype Token = {\n token: string;\n value: string;\n description: string;\n};\n\n/**\n * The `nylas-event-title` component is a form input for the title of an event.\n * @part net - The event title container\n * @part net__title - The event title input\n * @part net__dropdown-content - The token options container\n */\n@Component({\n tag: 'nylas-event-title',\n styleUrl: 'nylas-event-title.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasEventTitle {\n @Element() host!: HTMLElement;\n @AttachInternals() internals!: ElementInternals;\n\n // Properties\n /**\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n /**\n * The title of the event from the cofiguration.\n */\n @Prop() eventTitle?: string = this.selectedConfiguration?.event_booking?.title;\n /**\n * The name attribute of this component.\n */\n @Prop() name: string = 'title';\n\n // State variables\n /**\n * Whether to show the tokens dropdown.\n */\n @State() showTokens: boolean = false;\n /**\n * The available token options for the dropdown.\n */\n @State() availableTokens: { label: string; value: string; labelHTML: Token }[] = eventTitleTokens.map(token => ({\n label: token.token,\n value: token.value,\n labelHTML: token,\n }));\n /**\n * The filtered token options for the dropdown based on the current query.\n */\n @State() filteredTokens: { label: string; value: string; labelHTML: Token }[] = this.availableTokens;\n /**\n * The aria-activedescendant attribute value. This is used to indicate the\n * currently active descendant in the tokens dropdown.\n */\n @State() ariaActivedescendant: string = '';\n /**\n * Stores the reference to the current word being typed.\n * This is used to update the event title with the selected token tag when\n * an option is selected from the dropdown by clicking on it.\n */\n @State() currentWord: {\n $value: string;\n fullText: string;\n index: number;\n focusOffset: number;\n } = { $value: '', fullText: '', index: -1, focusOffset: -1 };\n\n @State() validationError: string = '';\n\n // Reference to the title div element\n private titleRef!: HTMLDivElement;\n\n /**\n * When a name prop is passed, stencil does not automatically set the name attribute on the host element.\n * Since this component is form-associated, the name attribute is required for form submission.\n * This is a workaround to ensure that the name attribute is set on the host element.\n */\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-event-title', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('ariaActivedescendant')\n ariaActivedescendantChangedHandler(newValue: string) {\n debug('nylas-event-title', 'ariaActivedescendantChangedHandler', newValue);\n if (newValue !== '') {\n const activeOption = this.host.shadowRoot?.getElementById(newValue);\n activeOption?.classList.add('active');\n } else {\n const options = this.host.shadowRoot?.querySelectorAll('.token-options li.active');\n options?.forEach(option => option.classList.remove('active'));\n }\n }\n\n @Watch('selectedConfiguration')\n configChangedHandler(newVal) {\n const title = newVal?.event_booking?.title;\n if (title) {\n this.updateEventTitleFromProp(title);\n }\n }\n\n // Events\n /**\n * This event is fired when the value of the event title changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n // Lifecycle methods\n connectedCallback() {\n debug('nylas-event-title', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-event-title', 'componentWillLoad');\n this.host.setAttribute('name', this.name);\n }\n\n componentDidLoad() {\n debug('nylas-event-title', 'componentDidLoad');\n this.updateEventTitleFromProp(this.eventTitle || '');\n }\n\n disconnectedCallback() {\n debug('nylas-event-title', 'disconnectedCallback');\n }\n\n @Listen('formSubmitted', { target: 'window' })\n formSubmittedHandler(event: CustomEvent) {\n debug('nylas-event-title', 'formSubmittedHandler', event);\n if (!this.internals?.validity?.valid) {\n this.validationError = 'Event title is required';\n } else {\n this.validationError = '';\n }\n }\n\n updateEventTitleFromProp(newValue: string) {\n debug('nylas-event-title', 'eventTitleChangedHandler', newValue);\n if (this.titleRef) {\n this.titleRef.innerHTML = this.highlightTokens(newValue);\n this.titleRef.focus();\n if (typeof this.internals.setValidity === 'function') {\n if (newValue === '') {\n this.internals?.setValidity({ customError: true }, `Event title is required`, this.titleRef);\n } else {\n this.internals?.setValidity({ customError: false });\n }\n }\n }\n }\n\n highlightTokens(title: string) {\n let outputHtml = title;\n\n eventTitleTokens.forEach(tokenObj => {\n const token = tokenObj.value;\n // Create a regular expression that matches the token as a whole word\n const regex = new RegExp(`(\\\\${token})(?!\\\\w)`, 'g');\n // Replace the token with a span element\n outputHtml = outputHtml.replace(regex, '<span class=\"highlighted-tag\">$1</span>');\n });\n return outputHtml;\n }\n\n getCurrentSelectionForBrowser() {\n const getSelectionTextData = (nodeValue, offset, node) => {\n // Remove zero-width space characters from the text, because they are not visible and cause issues with the selection\n const text = nodeValue.replace(/[\\u200B-\\u200D\\uFEFF]/g, '');\n const dollarIndex = text.lastIndexOf('$');\n const lastWord = text.substring(dollarIndex).split(' ')[0];\n return {\n focusOffset: offset,\n dollarIndex,\n lastWord,\n currentText: text,\n node,\n };\n };\n\n const currentBrowser = getBrowser();\n switch (currentBrowser) {\n case 'Chrome':\n const shadowRootSelection = (this.host.shadowRoot as CustomShadowRoot)?.getSelection();\n const focusNode = shadowRootSelection?.focusNode;\n const focusNodeValue = focusNode?.nodeValue || '';\n return getSelectionTextData(focusNodeValue, shadowRootSelection?.focusOffset || -1, focusNode);\n case 'Firefox':\n const selection = document.getSelection();\n const anchorNodeValue = selection?.anchorNode?.nodeValue || '';\n return getSelectionTextData(anchorNodeValue, selection?.focusOffset || -1, selection?.anchorNode);\n case 'Safari':\n const windowSelection = window.getSelection();\n const anchorNode = (windowSelection as any)?.getComposedRanges(this.host.shadowRoot as CustomShadowRoot)[0];\n const currentText = anchorNode?.startContainer?.nodeValue || '';\n return getSelectionTextData(currentText, anchorNode?.endOffset || -1, anchorNode?.startContainer);\n default:\n console.warn('Browser not supported');\n return null;\n }\n }\n\n handleChange(event: Event) {\n const textContent = (event.target as HTMLDivElement).textContent || '';\n // All browsers handle Selection within Shadow DOM differently, so get the current selection based on the browser\n const currentSelection = this.getCurrentSelectionForBrowser();\n if (!currentSelection) {\n this.updateEventTitle(textContent);\n this.resetDropdown();\n return;\n }\n const { focusOffset, dollarIndex, lastWord, currentText } = currentSelection;\n\n if (dollarIndex === -1 || focusOffset < dollarIndex) {\n this.updateEventTitle(textContent);\n this.resetDropdown();\n return;\n }\n if (lastWord.startsWith('$')) {\n this.showTokens = true;\n // Update the current word being typed, we need this reference to update the event title with the selected token\n // because the user can select an option from the dropdown by clicking on it, which will not trigger the input event.\n this.currentWord = {\n $value: lastWord,\n fullText: currentText,\n index: dollarIndex,\n focusOffset,\n };\n this.populateSuggestionsDropdown(lastWord);\n } else {\n this.resetDropdown();\n }\n this.updateEventTitle(textContent);\n }\n\n handleInputKeyDown(event) {\n if (event.key === 'Enter') {\n event.preventDefault();\n const activeOption = this.host.shadowRoot?.getElementById(this.ariaActivedescendant);\n if (activeOption) {\n activeOption.click();\n this.ariaActivedescendant = '';\n }\n } else if (event.key === 'ArrowDown') {\n event.preventDefault();\n const activeOption = this.host.shadowRoot?.getElementById(this.ariaActivedescendant);\n if (activeOption) {\n const nextOption = activeOption.nextElementSibling;\n if (nextOption) {\n this.ariaActivedescendant = nextOption.id;\n } else {\n this.ariaActivedescendant = this.filteredTokens[0].label;\n }\n } else {\n this.ariaActivedescendant = this.filteredTokens[0].label;\n }\n } else if (event.key === 'ArrowUp') {\n event.preventDefault();\n const activeOption = this.host.shadowRoot?.getElementById(this.ariaActivedescendant);\n if (activeOption) {\n const prevOption = activeOption.previousElementSibling;\n if (prevOption) {\n this.ariaActivedescendant = prevOption.id;\n } else {\n this.ariaActivedescendant = this.filteredTokens[this.filteredTokens.length - 1].label;\n }\n } else {\n this.ariaActivedescendant = this.filteredTokens[this.filteredTokens.length - 1].label;\n }\n } else if (event.key === 'Escape') {\n event.preventDefault();\n this.resetDropdown();\n } else if (event.key === 'Backspace' || event.key === 'Delete') {\n const selection = this.getCurrentSelectionForBrowser();\n if (selection?.currentText.startsWith('${')) {\n selection?.node?.parentNode && selection.node.parentNode.removeChild(selection.node);\n }\n }\n }\n\n selectOption(e: Event, option: { label: string; value: string; labelHTML: Token }) {\n e.preventDefault();\n const word = this.currentWord.fullText;\n const dollarWord = this.currentWord.$value;\n\n // Traverse the DOM to find the text node that contains the current word fullText\n let currentNode = this.titleRef.firstChild;\n let textNode: ChildNode | null = null;\n\n while (currentNode) {\n if (currentNode.nodeType === 3) {\n const currentNodeText = currentNode.textContent?.replace(/[\\u200B-\\u200D\\uFEFF]/g, '') || '';\n const wordText = word.replace(/[\\u200B-\\u200D\\uFEFF]/g, '');\n if (currentNodeText.includes(wordText)) {\n textNode = currentNode;\n break;\n }\n }\n currentNode = currentNode.nextSibling;\n }\n\n if (!textNode) {\n return;\n }\n // Split the text node into three parts: text before the token, the token, and text after the token\n const text = textNode.textContent || '';\n const index = text.indexOf(dollarWord);\n const textBefore = text.substring(0, index);\n const textAfter = text.substring(index + dollarWord.length);\n const newTextNode = document.createTextNode(textBefore);\n const newRange = document.createRange();\n\n // Create a new span element to replace the text node\n const tagSpan = document.createElement('span');\n tagSpan.classList.add('highlighted-tag');\n tagSpan.textContent = `${option.value}`;\n const newTextNodeAfter = document.createTextNode(textAfter);\n\n if (textAfter !== '') {\n // If there is text after the token, add it to the new span element\n textNode.replaceWith(newTextNode, tagSpan, newTextNodeAfter);\n newRange.setStart(newTextNodeAfter, 0);\n } else {\n // If there is no text after the token, add a zero-width space character (Without this, the cursor will not move outside the highlighted span element)\n const afterNode = document.createTextNode('\\u200B');\n textNode.replaceWith(newTextNode, tagSpan, afterNode);\n newRange.setStart(afterNode, 0);\n }\n\n // Hide the dropdown\n this.resetDropdown();\n this.titleRef.focus();\n\n // Set the focus to the new span element\n const sel = window.getSelection();\n newRange.collapse(true);\n sel?.removeAllRanges();\n sel?.addRange(newRange);\n\n // Update the event title with the selected token\n this.updateEventTitle(this.titleRef.textContent || '');\n }\n\n populateSuggestionsDropdown(query: string = '') {\n this.filteredTokens = this.availableTokens.filter(obj => {\n return obj.label.startsWith(query.toString()) || obj.value.startsWith(query.toString());\n });\n\n // Set the first option as the active descendant\n if (this.filteredTokens.length > 0) {\n this.ariaActivedescendant = this.filteredTokens[0].label;\n }\n }\n\n updateEventTitle(text: string) {\n const value = text.replace(/ +/g, ' ');\n if (value === '') {\n this.internals?.setValidity({ customError: true }, `Event title is required`, this.titleRef);\n this.validationError = 'Event title is required';\n } else {\n this.internals?.setValidity({ customError: false });\n this.validationError = '';\n }\n this.internals?.setFormValue(value, this.name);\n this.valueChanged.emit({ value: value, name: this.name });\n }\n\n resetDropdown() {\n this.showTokens = false;\n this.ariaActivedescendant = '';\n }\n\n getLabelHTML(token: { token: string; description: string }) {\n return (\n <div class=\"token-label\">\n <span class=\"token\">{token.token}</span>\n <span class=\"description\">{token.description}</span>\n </div>\n );\n }\n\n @RegisterComponent<NylasEventTitle, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-event-title',\n stateToProps: new Map([['schedulerConfig.selectedConfiguration', 'selectedConfiguration']]),\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <div class=\"nylas-event-title\" part=\"net\">\n <label htmlFor=\"title\">\n Event title<span class=\"required\">*</span>\n <span class=\"label-icon\">\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">Enter a title for your event.</span>\n </tooltip-component>\n </span>\n </label>\n <div\n class={{\n title: true,\n error: this.validationError !== '',\n }}\n part=\"net__title\"\n ref={el => (this.titleRef = el as HTMLDivElement)}\n contentEditable=\"true\"\n onInput={e => this.handleChange(e)}\n onKeyDown={event => this.handleInputKeyDown(event)}\n ></div>\n {this.showTokens && this.filteredTokens?.length > 0 && (\n <div class=\"token-options\" part=\"net__dropdown-content\">\n <ul tabindex=\"-1\" role=\"listbox\" aria-label={this.name} aria-activedescendant={this.ariaActivedescendant}>\n {this.filteredTokens.map(option => (\n <li\n tabindex=\"0\"\n key={option.label}\n id={option.label}\n class={{ active: this.ariaActivedescendant === option.label }}\n onClick={e => this.selectOption(e, option)}\n role=\"option\"\n >\n {this.getLabelHTML(option.labelHTML)}\n </li>\n ))}\n </ul>\n </div>\n )}\n <span class=\"help-text\">Create a dynamic templated event title by typing $. Learn more</span>\n {this.validationError != '' && <span class=\"error-message\">{this.validationError}</span>}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { R as RegisterComponent } from './register-component.js';
|
|
3
|
-
import {
|
|
3
|
+
import { a as debug } from './utils.js';
|
|
4
4
|
|
|
5
5
|
const nylasFormCardCss = ":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-form-card{width:100%;border-radius:8px;border:1px solid var(--nylas-base-200)}.nylas-form-card__header{padding:1rem;border-bottom:1px solid var(--nylas-base-200)}";
|
|
6
6
|
|
|
@@ -38,7 +38,7 @@ const NylasFormCard = proxyCustomElement(class NylasFormCard extends HTMLElement
|
|
|
38
38
|
debug('nylas-event-card', 'disconnectedCallback');
|
|
39
39
|
}
|
|
40
40
|
render() {
|
|
41
|
-
return (h(Host, { key: '
|
|
41
|
+
return (h(Host, { key: 'ccce348d0ddf9bec8fddb815cf63cbc9d9df4973' }, h("div", { key: '6c0f3120bc608ac05fb631752834636cdb5a4845', class: "nylas-form-card" }, h("div", { key: '08a045eb3b7190d38373efb80f4f709987956347', class: "nylas-form-card__header" }, h("slot", { key: 'a9a076210a056c984ad40eced110f2d9b737f36d', name: "header-title" }), h("slot", { key: '65cc8f117db216d458338da2b3a0f673864234bc', name: "header-subtitle" })), h("div", { key: '6c308c3377952cd7a1b3ad112de55333ef517a03', class: "nylas-form-card__content" }, h("slot", { key: '5c0e7388949d250f0e3b027df2bfd9a3342d1574', name: "content" })))));
|
|
42
42
|
}
|
|
43
43
|
static get formAssociated() { return true; }
|
|
44
44
|
static get style() { return nylasFormCardCss; }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { R as RegisterComponent } from './register-component.js';
|
|
3
|
-
import {
|
|
3
|
+
import { a as debug } from './utils.js';
|
|
4
4
|
|
|
5
5
|
const nylasIfStateCss = ":host{display:block}div{height:inherit}@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}.fade-in{animation:fadeIn 1.5s}.fade-out{animation:fadeOut 1.5s}@keyframes slideIn{0%{transform:translateY(100%)}100%{transform:translateY(0)}}@keyframes slideOut{0%{transform:translateY(0)}100%{transform:translateY(100%)}}.slide-in{animation:slideIn 1.5s}.slide-out{animation:slideOut 1.5s}@keyframes swipeIn{0%{transform:translateX(100%)}100%{transform:translateX(0)}}@keyframes swipeOut{0%{transform:translateX(0)}100%{transform:translateX(100%)}}.swipe-in{animation:swipeIn 1.5s}.swipe-out{animation:swipeOut 1.5s}";
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { R as RegisterComponent } from './register-component.js';
|
|
3
|
-
import {
|
|
3
|
+
import { a as debug } from './utils.js';
|
|
4
4
|
import { d as defineCustomElement$6 } from './chevron.js';
|
|
5
5
|
import { d as defineCustomElement$5 } from './info.js';
|
|
6
6
|
import { d as defineCustomElement$4 } from './search.js';
|
|
@@ -31,6 +31,7 @@ const NylasLimitFutureBookings = proxyCustomElement(class NylasLimitFutureBookin
|
|
|
31
31
|
this.__attachShadow();
|
|
32
32
|
this.valueChanged = createEvent(this, "valueChanged", 7);
|
|
33
33
|
this.internals = this.attachInternals();
|
|
34
|
+
this.selectedConfiguration = undefined;
|
|
34
35
|
this.availableDaysInFuture = undefined;
|
|
35
36
|
this.name = 'limit-future-bookings';
|
|
36
37
|
this.selectedNumber = 1;
|
|
@@ -40,10 +41,14 @@ const NylasLimitFutureBookings = proxyCustomElement(class NylasLimitFutureBookin
|
|
|
40
41
|
debug('nylas-limit-future-bookings', 'elementNameChangedHandler', newValue);
|
|
41
42
|
this.host.setAttribute('name', newValue);
|
|
42
43
|
}
|
|
44
|
+
selectedConfigurationChangedHandler(newVal) {
|
|
45
|
+
const daysInFuture = newVal?.scheduler?.available_days_in_future;
|
|
46
|
+
if (daysInFuture) {
|
|
47
|
+
this.updateNumberAndPeriodFromDays(daysInFuture);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
43
50
|
availableDaysInFutureChanged(newValue) {
|
|
44
|
-
|
|
45
|
-
this.selectedNumber = number;
|
|
46
|
-
this.selectedPeriod = period;
|
|
51
|
+
this.updateNumberAndPeriodFromDays(newValue);
|
|
47
52
|
}
|
|
48
53
|
connectedCallback() {
|
|
49
54
|
debug('nylas-limit-future-bookings', 'connectedCallback');
|
|
@@ -75,45 +80,55 @@ const NylasLimitFutureBookings = proxyCustomElement(class NylasLimitFutureBookin
|
|
|
75
80
|
else {
|
|
76
81
|
availableDaysInFuture = number * 30;
|
|
77
82
|
}
|
|
78
|
-
this.valueChanged.emit({ value: availableDaysInFuture, name:
|
|
83
|
+
this.valueChanged.emit({ value: availableDaysInFuture, name: 'availableDaysInFuture' });
|
|
79
84
|
if (typeof this.internals.setFormValue !== 'function') {
|
|
80
85
|
return;
|
|
81
86
|
}
|
|
82
87
|
this.internals.setFormValue(availableDaysInFuture.toString(), this.name);
|
|
83
88
|
}
|
|
84
|
-
|
|
89
|
+
updateNumberAndPeriodFromDays(days) {
|
|
90
|
+
let number, period;
|
|
85
91
|
if (days >= 30 && days % 30 === 0) {
|
|
86
|
-
|
|
92
|
+
number = days / 30;
|
|
93
|
+
period = 'month';
|
|
87
94
|
}
|
|
88
95
|
else if (days >= 7 && days % 7 === 0) {
|
|
89
|
-
|
|
96
|
+
number = days / 7;
|
|
97
|
+
period = 'week';
|
|
90
98
|
}
|
|
91
99
|
else {
|
|
92
|
-
|
|
100
|
+
number = days;
|
|
101
|
+
period = 'day';
|
|
93
102
|
}
|
|
103
|
+
this.selectedNumber = number;
|
|
104
|
+
this.selectedPeriod = period;
|
|
94
105
|
}
|
|
95
106
|
render() {
|
|
96
|
-
return (h(Host, { key: '
|
|
107
|
+
return (h(Host, { key: '1bb30d8045366579b327f32f954d64c3360efa11' }, h("div", { key: '2594946bd35a01a0ab64288c54fe886f4577d8b5', class: "nylas-limit-future-bookings", part: "nlfb" }, h("label", { key: 'cf955eb319e09617dd95037d66a387122238d17c' }, "Limit future bookings", h("span", { key: '4f5658353873122f083faec5504856902bdba106', class: "label-icon" }, h("tooltip-component", { key: 'ee20b3543178702592b83e70a5a85988d0c3cd29' }, h("info-icon", { key: 'dfe75e502418b3f00a29d3d0fb76338056089266', slot: "tooltip-icon" }), h("span", { key: 'c7226da2491e6c3beda2f9739afda6220c37c0e1', slot: "tooltip-content" }, "Set a limit on how far in the future bookings can be made.")))), h("time-period-selector", { key: '5ad178b3d7158738a2882cb5a6554727de34a23d', 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 }))));
|
|
97
108
|
}
|
|
98
109
|
static get formAssociated() { return true; }
|
|
99
110
|
get host() { return this; }
|
|
100
111
|
static get watchers() { return {
|
|
101
112
|
"name": ["elementNameChangedHandler"],
|
|
113
|
+
"selectedConfiguration": ["selectedConfigurationChangedHandler"],
|
|
102
114
|
"availableDaysInFuture": ["availableDaysInFutureChanged"]
|
|
103
115
|
}; }
|
|
104
116
|
static get style() { return nylasLimitFutureBookingsCss; }
|
|
105
117
|
}, [65, "nylas-limit-future-bookings", {
|
|
118
|
+
"selectedConfiguration": [16],
|
|
106
119
|
"availableDaysInFuture": [2, "available-days-in-future"],
|
|
107
120
|
"name": [1],
|
|
108
121
|
"selectedNumber": [32],
|
|
109
122
|
"selectedPeriod": [32]
|
|
110
123
|
}, [[0, "timePeriodChanged", "timePeriodChangedHandler"]], {
|
|
111
124
|
"name": ["elementNameChangedHandler"],
|
|
125
|
+
"selectedConfiguration": ["selectedConfigurationChangedHandler"],
|
|
112
126
|
"availableDaysInFuture": ["availableDaysInFutureChanged"]
|
|
113
127
|
}]);
|
|
114
128
|
__decorate([
|
|
115
129
|
RegisterComponent({
|
|
116
130
|
name: 'nylas-limit-future-bookings',
|
|
131
|
+
stateToProps: new Map([['schedulerConfig.selectedConfiguration', 'selectedConfiguration']]),
|
|
117
132
|
eventToProps: {},
|
|
118
133
|
fireRegisterEvent: true,
|
|
119
134
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"nylas-limit-future-bookings2.js","mappings":";;;;;;;;;;AAAA,MAAM,2BAA2B,GAAG,ugCAAugC;;;;;;;;;;;;;;;;
|
|
1
|
+
{"file":"nylas-limit-future-bookings2.js","mappings":";;;;;;;;;;AAAA,MAAM,2BAA2B,GAAG,ugCAAugC;;;;;;;;;;;;;;;;MCuB9hC,wBAAwB;;;;;;;;;oBAOZ,uBAAuB;8BAEZ,CAAC;8BACD,KAAK;;IAUvC,yBAAyB,CAAC,QAAgB;QACxC,KAAK,CAAC,6BAA6B,EAAE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AAE,EAAC,uBAAuB,EAC1B,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EACrC,WAAW,EAAC,0UAA0U,EACtV,qBAAqB,EAAE,IAAI,CAAC,cAAc,EAC1C,qBAAqB,EAAE,IAAI,CAAC,cAAc,GAC1C,CACE,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;AAvBD;IANC,iBAAiB,CAA8G;QAC9H,IAAI,EAAE,6BAA6B;QACnC,YAAY,EAAE,IAAI,GAAG,CAAC,CAAC,CAAC,uCAAuC,EAAE,uBAAuB,CAAC,CAAC,CAAC;QAC3F,YAAY,EAAE,EAAE;QAChB,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;sDAwBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/scheduler-editor/nylas-limit-future-bookings/nylas-limit-future-bookings.scss?tag=nylas-limit-future-bookings&encapsulation=shadow","src/components/scheduler-editor/nylas-limit-future-bookings/nylas-limit-future-bookings.tsx"],"sourcesContent":["@import '../../../common/styles/variables.scss';\n\n:host {\n @include default-css-variables;\n}\n\n.nylas-limit-future-bookings {\n display: flex;\n justify-content: space-between;\n font-family: var(--nylas-font-family);\n label {\n display: flex;\n align-items: center;\n color: var(--nylas-base-800);\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 150%; /* 21px */\n span.label-icon {\n margin-left: 4px;\n tooltip-component {\n display: flex;\n }\n }\n }\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug } from '@/utils/utils';\nimport { AttachInternals, Component, Host, State, h, Element, Prop, Watch, Event, EventEmitter, Listen } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { Configuration } from '@nylas/core';\n\n/**\n * The `nylas-limit-future-bookings` component is a form input for the description of an event.\n * @part nlfb - The limit future bookings container\n * @part nlfb__number-dropdown - The number dropdown container\n * @part nlfb__number-dropdown-button - The number dropdown button\n * @part nlfb__number-dropdown-content - The number dropdown content\n * @part nlfb__period-dropdown - The period dropdown container\n * @part nlfb__period-dropdown-button - The period dropdown button\n * @part nlfb__period-dropdown-content - The period dropdown content\n */\n@Component({\n tag: 'nylas-limit-future-bookings',\n styleUrl: 'nylas-limit-future-bookings.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasLimitFutureBookings {\n @Element() host!: HTMLElement;\n /**\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n @Prop() availableDaysInFuture?: number;\n @Prop() name: string = 'limit-future-bookings';\n\n @State() selectedNumber: number = 1;\n @State() selectedPeriod: string = 'day';\n\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * When a name prop is passed, stencil does not automatically set the name attribute on the host element.\n * Since this component is form-associated, the name attribute is required for form submission.\n * This is a workaround to ensure that the name attribute is set on the host element.\n */\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-limit-future-bookings', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('selectedConfiguration')\n selectedConfigurationChangedHandler(newVal: Configuration) {\n const daysInFuture = newVal?.scheduler?.available_days_in_future;\n if (daysInFuture) {\n this.updateNumberAndPeriodFromDays(daysInFuture);\n }\n }\n\n @Watch('availableDaysInFuture')\n availableDaysInFutureChanged(newValue: number) {\n this.updateNumberAndPeriodFromDays(newValue);\n }\n\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n connectedCallback() {\n debug('nylas-limit-future-bookings', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-limit-future-bookings', 'componentWillLoad');\n this.host.setAttribute('name', this.name);\n }\n\n componentDidLoad() {\n debug('nylas-limit-future-bookings', 'componentDidLoad');\n this.availableDaysInFutureChanged(this.availableDaysInFuture ?? 1);\n if (typeof this.internals.setFormValue !== 'function') {\n return;\n }\n this.internals.setFormValue(this.availableDaysInFuture?.toString() ?? '1', this.name);\n }\n\n disconnectedCallback() {\n debug('nylas-limit-future-bookings', 'disconnectedCallback');\n }\n\n @Listen('timePeriodChanged')\n timePeriodChangedHandler(\n event: CustomEvent<{\n number: number;\n period: string;\n }>,\n ) {\n const { number, period } = event.detail;\n let availableDaysInFuture;\n if (period === 'day') {\n availableDaysInFuture = number;\n } else if (period === 'week') {\n availableDaysInFuture = number * 7;\n } else {\n availableDaysInFuture = number * 30;\n }\n this.valueChanged.emit({ value: availableDaysInFuture, name: 'availableDaysInFuture' });\n if (typeof this.internals.setFormValue !== 'function') {\n return;\n }\n this.internals.setFormValue(availableDaysInFuture.toString(), this.name);\n }\n\n updateNumberAndPeriodFromDays(days: number): void {\n let number, period;\n if (days >= 30 && days % 30 === 0) {\n number = days / 30;\n period = 'month';\n } else if (days >= 7 && days % 7 === 0) {\n number = days / 7;\n period = 'week';\n } else {\n number = days;\n period = 'day';\n }\n this.selectedNumber = number;\n this.selectedPeriod = period;\n }\n\n @RegisterComponent<NylasLimitFutureBookings, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-limit-future-bookings',\n stateToProps: new Map([['schedulerConfig.selectedConfiguration', 'selectedConfiguration']]),\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <div class=\"nylas-limit-future-bookings\" part=\"nlfb\">\n <label>\n Limit future bookings\n <span class=\"label-icon\">\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">Set a limit on how far in the future bookings can be made.</span>\n </tooltip-component>\n </span>\n </label>\n <time-period-selector\n id=\"limit-future-bookings\"\n timePeriods={['day', 'week', 'month']}\n 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\"\n defaultSelectedNumber={this.selectedNumber}\n defaultSelectedPeriod={this.selectedPeriod}\n />\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { R as RegisterComponent } from './register-component.js';
|
|
3
|
-
import {
|
|
3
|
+
import { a as debug, p as parsePreviewLink } from './utils.js';
|
|
4
4
|
import { d as defineCustomElement$2 } from './button-component2.js';
|
|
5
5
|
import { d as defineCustomElement$1 } from './calendar.js';
|
|
6
6
|
|
|
7
|
-
const nylasListConfigurationsCss = ":host{display:
|
|
7
|
+
const nylasListConfigurationsCss = ":host{display:grid;grid-auto-flow:row;width:100%;font-family:inherit;font-optical-sizing:auto;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:\"Inter\", sans-serif}.header{display:flex;align-items:center;justify-content:space-between;margin-bottom:2rem;gap:1rem}@media screen and (max-width: 768px){.header{flex-direction:column}}.header h2{margin:0;font-size:1.25rem;color:var(--nylas-base-900);font-weight:600}.header p{margin:0;font-size:1rem;color:var(--nylas-base-700)}.header .actions{justify-self:end}@media screen and (max-width: 768px){.header .actions{width:100%}}.configurations{border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);overflow-x:auto}.configurations table{width:100%;border-spacing:0;border-collapse:collapse;font-family:inherit}.configurations table tr{color:var(--nylas-base-800);border-bottom:1px solid var(--nylas-base-200);font-family:inherit}.configurations table tr:last-of-type{border-bottom:0}.configurations table tr.hide{display:none}.configurations table th{font-weight:600;text-transform:uppercase}.configurations table tr.no-configurations td>div{display:flex;height:100%;justify-content:center;align-items:center;flex-direction:column;padding:var(--nylas-border-radius-3x)}.configurations table tr.no-configurations td>div h3{margin:0 0 1rem 0;color:var(--nylas-base-700)}.configurations table tr.no-configurations td>div p{margin:0 0 1rem 0;color:var(--nylas-base-600)}.configurations table tr.no-configurations td>div calendar-icon{margin-bottom:1rem;color:var(--nylas-base-200)}.configurations table th,.configurations table td{text-align:left;padding:1rem;font-family:inherit}.configurations table .actions{text-align:right}.configurations table .actions{display:flex;justify-content:flex-end;gap:1rem}.configurations table .title{display:flex;flex-direction:column}.configurations table .title .config-event-title{font-weight:600}.configurations table .title .config-event-description{font-size:0.75rem}.error-container{margin-top:1.5rem}.error-container .error{color:var(--nylas-error);padding:0.5rem 0;margin:1rem 0 0}";
|
|
8
8
|
|
|
9
9
|
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
10
10
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -32,6 +32,7 @@ const NylasListConfigurations = proxyCustomElement(class NylasListConfigurations
|
|
|
32
32
|
this.configurations = [];
|
|
33
33
|
this.schedulerPreviewLink = '';
|
|
34
34
|
this.state = 'loading';
|
|
35
|
+
this.error = '';
|
|
35
36
|
}
|
|
36
37
|
connectedCallback() {
|
|
37
38
|
debug('[nylas-list-configurations]', 'connectedCallback');
|
|
@@ -55,10 +56,15 @@ const NylasListConfigurations = proxyCustomElement(class NylasListConfigurations
|
|
|
55
56
|
async setState(state) {
|
|
56
57
|
this.state = state;
|
|
57
58
|
}
|
|
59
|
+
async setError(error) {
|
|
60
|
+
this.error = error;
|
|
61
|
+
}
|
|
58
62
|
render() {
|
|
59
|
-
return (h(Host,
|
|
63
|
+
return (h(Host, null, h("div", { class: "header" }, h("div", { class: "description" }, h("h2", null, "All scheduling pages"), h("p", null, "Create, edit and manage all your scheduling pages.")), this.configurations && this.configurations.length > 0 && (h("div", { class: "actions" }, h("button-component", { clickHandler: () => {
|
|
60
64
|
this.createButtonClick.emit(this.host);
|
|
61
|
-
} }, "Create new")))), h("div", {
|
|
65
|
+
} }, "Create new")))), h("div", { class: "configurations" }, h("table", null, h("tr", { class: {
|
|
66
|
+
hide: this.state === 'loading' || (this.configurations && this.configurations.length === 0),
|
|
67
|
+
} }, h("th", null, "Scheduling page event title"), h("th", null, "Duration"), h("th", { class: "actions" }, "Actions")), this.state === 'loading' && (h("tr", { class: "no-configurations" }, h("td", { colSpan: 3 }, h("div", null, h("h3", null, "Loading..."), h("p", null, "Please wait while we fetch the scheduling pages"))))), this.state !== 'loading' && (!this.configurations || this.configurations.length === 0) && (h("tr", { class: "no-configurations" }, h("td", { colSpan: 3 }, h("div", null, h("calendar-icon", { width: "48", height: "48" }), h("h3", null, "No scheduling pages found"), h("p", null, "Get started with creating your first scheduling page"), h("button-component", { clickHandler: () => {
|
|
62
68
|
this.createButtonClick.emit(this.host);
|
|
63
69
|
} }, "Create new"))))), this.state !== 'loading' &&
|
|
64
70
|
this.configurations.map(config => (h("tr", { key: config.id }, h("td", null, h("div", { class: "title" }, h("span", { class: 'config-event-title' }, config.event_booking.title), h("span", { class: 'config-event-description' }, config.event_booking.description))), h("td", null, h("div", null, config.availability.duration_minutes, " mins")), h("td", null, h("div", { class: "actions" }, h("button-component", { variant: 'basic', clickHandler: event => {
|
|
@@ -70,7 +76,7 @@ const NylasListConfigurations = proxyCustomElement(class NylasListConfigurations
|
|
|
70
76
|
} }, "Edit"), h("button-component", { variant: 'basic', clickHandler: event => {
|
|
71
77
|
event.preventDefault();
|
|
72
78
|
this.deleteButtonClick.emit({ host: this.host, configuration: config });
|
|
73
|
-
} }, "Delete")))))))))));
|
|
79
|
+
} }, "Delete")))))))), h("div", { class: "error-container" }, h("p", { class: 'error' }, this.state === 'error' && this.error))));
|
|
74
80
|
}
|
|
75
81
|
get host() { return this; }
|
|
76
82
|
static get style() { return nylasListConfigurationsCss; }
|
|
@@ -78,8 +84,10 @@ const NylasListConfigurations = proxyCustomElement(class NylasListConfigurations
|
|
|
78
84
|
"configurations": [16],
|
|
79
85
|
"schedulerPreviewLink": [1, "scheduler-preview-link"],
|
|
80
86
|
"state": [32],
|
|
87
|
+
"error": [32],
|
|
81
88
|
"getState": [64],
|
|
82
|
-
"setState": [64]
|
|
89
|
+
"setState": [64],
|
|
90
|
+
"setError": [64]
|
|
83
91
|
}]);
|
|
84
92
|
__decorate([
|
|
85
93
|
RegisterComponent({
|
|
@@ -90,20 +98,29 @@ __decorate([
|
|
|
90
98
|
initListConfigurations: async (event, connector) => {
|
|
91
99
|
const host = event.detail;
|
|
92
100
|
await host.setState('loading');
|
|
93
|
-
await connector.schedulerConfig.getConfigurations();
|
|
101
|
+
const [data, error] = await connector.schedulerConfig.getConfigurations();
|
|
102
|
+
if (!data && error && error.message) {
|
|
103
|
+
await host.setState('error');
|
|
104
|
+
await host.setError(error.message);
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
94
107
|
await host.setState('loaded');
|
|
95
108
|
},
|
|
96
109
|
createButtonClick: async (_, connector) => {
|
|
97
|
-
connector.schedulerConfigStore.
|
|
110
|
+
connector.schedulerConfigStore.resetSelectedConfiguration();
|
|
98
111
|
connector.schedulerConfigStore.state.action = 'create';
|
|
99
112
|
},
|
|
100
113
|
deleteButtonClick: async (event, connector) => {
|
|
101
|
-
const { configuration } = event.detail;
|
|
102
|
-
await connector.schedulerConfig.deleteConfiguration(configuration.id);
|
|
114
|
+
const { host, configuration } = event.detail;
|
|
115
|
+
const [data, error] = await connector.schedulerConfig.deleteConfiguration(configuration.id);
|
|
116
|
+
if (!data && error && error.message) {
|
|
117
|
+
await host.setState('error');
|
|
118
|
+
await host.setError(error.message);
|
|
119
|
+
}
|
|
103
120
|
},
|
|
104
121
|
editButtonClick: async (event, connector) => {
|
|
105
122
|
const { configuration } = event.detail;
|
|
106
|
-
connector.schedulerConfigStore.state.
|
|
123
|
+
connector.schedulerConfigStore.state.selectedConfiguration = configuration;
|
|
107
124
|
connector.schedulerConfigStore.state.action = 'edit';
|
|
108
125
|
},
|
|
109
126
|
},
|