@nylas/web-elements 1.0.2-canary.2 → 1.1.0-canary.3
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 +2 -2
- package/dist/cjs/{add-circle-icon_18.cjs.entry.js → add-circle-icon_22.cjs.entry.js} +425 -97
- package/dist/cjs/add-circle-icon_22.cjs.entry.js.map +1 -0
- package/dist/cjs/archive-icon.cjs.entry.js +2 -2
- package/dist/cjs/archive-icon_7.cjs.entry.js +8 -8
- package/dist/cjs/arrow-icon.cjs.entry.js +2 -2
- package/dist/cjs/bold-icon.cjs.entry.js +2 -2
- package/dist/cjs/bold-icon_3.cjs.entry.js +4 -4
- package/dist/cjs/button-component.cjs.entry.js +30 -0
- package/dist/cjs/button-component.cjs.entry.js.map +1 -0
- package/dist/cjs/calendar-cancel-icon.cjs.entry.js +2 -2
- package/dist/cjs/calendar-check-icon.cjs.entry.js +2 -2
- package/dist/cjs/calendar-check-icon_2.cjs.entry.js +3 -3
- package/dist/cjs/calendar-icon.cjs.entry.js +2 -2
- package/dist/cjs/calendar-info-icon.cjs.entry.js +2 -2
- package/dist/cjs/calendar-patterns-icon.cjs.entry.js +2 -2
- package/dist/cjs/checkmark-circle-icon.cjs.entry.js +2 -2
- package/dist/cjs/chevron-icon.cjs.entry.js +2 -2
- package/dist/cjs/chevron-icon_3.cjs.entry.js +23 -6
- package/dist/cjs/chevron-icon_3.cjs.entry.js.map +1 -1
- package/dist/cjs/close-icon.cjs.entry.js +2 -2
- package/dist/cjs/{constants-9e39ba68.js → constants-0fba94a4.js} +2 -1
- package/dist/cjs/{constants-9e39ba68.js.map → constants-0fba94a4.js.map} +1 -1
- package/dist/cjs/{constants-c48567b9.js → constants-6baf1f1d.js} +2 -1
- package/dist/cjs/{constants-c48567b9.js.map → constants-6baf1f1d.js.map} +1 -1
- package/dist/cjs/document-refresh-icon.cjs.entry.js +2 -2
- package/dist/cjs/flow-icon.cjs.entry.js +2 -2
- package/dist/cjs/folder-icon.cjs.entry.js +2 -2
- package/dist/cjs/forward-icon.cjs.entry.js +2 -2
- package/dist/cjs/forward-icon_6.cjs.entry.js +9 -9
- package/dist/cjs/globe-icon.cjs.entry.js +2 -2
- package/dist/cjs/google-logo-icon.cjs.entry.js +23 -0
- package/dist/cjs/google-logo-icon.cjs.entry.js.map +1 -0
- package/dist/cjs/google-logo-icon_3.cjs.entry.js +302 -0
- package/dist/cjs/google-logo-icon_3.cjs.entry.js.map +1 -0
- package/dist/cjs/inbox-icon.cjs.entry.js +2 -2
- package/dist/cjs/{index-ecd19640.js → index-5ba61c57.js} +2 -2
- package/dist/cjs/{index-ecd19640.js.map → index-5ba61c57.js.map} +1 -1
- package/dist/cjs/{index-37045c7b.js → index-7af03e3f.js} +482 -21
- package/dist/cjs/index-7af03e3f.js.map +1 -0
- package/dist/cjs/{index-ec8e2a4d.js → index-c14ea8f5.js} +34 -6
- package/dist/cjs/index-c14ea8f5.js.map +1 -0
- package/dist/cjs/{index-f969795f.js → index-e31dc92c.js} +2 -2
- package/dist/cjs/{index-f969795f.js.map → index-e31dc92c.js.map} +1 -1
- package/dist/cjs/index.cjs.js +4 -2
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/{index.es-9122f5a3.js → index.es-447c5aca.js} +7 -2
- package/dist/cjs/index.es-447c5aca.js.map +1 -0
- package/dist/cjs/{index.es-3c12ec8c.js → index.es-68425511.js} +7 -2
- package/dist/cjs/index.es-68425511.js.map +1 -0
- package/dist/cjs/info-icon.cjs.entry.js +2 -2
- package/dist/cjs/info-icon_2.cjs.entry.js +3 -3
- package/dist/cjs/italic-icon.cjs.entry.js +2 -2
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/loading-icon.cjs.entry.js +2 -2
- package/dist/cjs/location-icon.cjs.entry.js +2 -2
- package/dist/cjs/location-off-icon.cjs.entry.js +2 -2
- package/dist/cjs/{mailbox-store-37622628.js → mailbox-store-556bc7b6.js} +81 -3
- package/dist/cjs/mailbox-store-556bc7b6.js.map +1 -0
- package/dist/cjs/{mailbox-store-5cd5e485.js → mailbox-store-aacd75ff.js} +81 -3
- package/dist/cjs/mailbox-store-aacd75ff.js.map +1 -0
- package/dist/cjs/microsoft-logo-icon.cjs.entry.js +23 -0
- package/dist/cjs/microsoft-logo-icon.cjs.entry.js.map +1 -0
- package/dist/cjs/multi-select-dropdown.cjs.entry.js +3 -3
- package/dist/cjs/nylas-additional-participants.cjs.entry.js +6 -6
- package/dist/cjs/nylas-additional-participants.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-api-request-8ec3a89c.js +39 -0
- package/dist/cjs/nylas-api-request-8ec3a89c.js.map +1 -0
- package/dist/cjs/nylas-api-request-ab24150d.js +37 -0
- package/dist/cjs/nylas-api-request-ab24150d.js.map +1 -0
- package/dist/cjs/nylas-availability-picker.cjs.entry.js +9 -9
- package/dist/cjs/nylas-availability-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-booked-event-card.cjs.entry.js +4 -4
- package/dist/cjs/nylas-booked-event-card.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-booked-event-card_10.cjs.entry.js +14 -14
- package/dist/cjs/nylas-booked-event-card_10.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-booking-calendar-picker.cjs.entry.js +4 -4
- package/dist/cjs/nylas-booking-calendar-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-booking-form.cjs.entry.js +3 -3
- package/dist/cjs/nylas-booking-form.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-buffer-time.cjs.entry.js +5 -5
- package/dist/cjs/nylas-buffer-time.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-calendar-picker.cjs.entry.js +4 -4
- package/dist/cjs/nylas-calendar-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-cancel-booking-form.cjs.entry.js +4 -4
- package/dist/cjs/nylas-cancel-booking-form.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-cancelled-event-card.cjs.entry.js +3 -3
- package/dist/cjs/nylas-composer.cjs.entry.js +2 -2
- package/dist/cjs/nylas-custom-booking-flow.cjs.entry.js +3 -3
- package/dist/cjs/nylas-custom-booking-flow.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-date-picker.cjs.entry.js +3 -3
- package/dist/cjs/nylas-date-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-editor-tabs.cjs.entry.js +100 -48
- package/dist/cjs/nylas-editor-tabs.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-event-description.cjs.entry.js +3 -3
- package/dist/cjs/nylas-event-description.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-event-duration.cjs.entry.js +4 -4
- package/dist/cjs/nylas-event-duration.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-event-info.cjs.entry.js +4 -4
- package/dist/cjs/nylas-event-info.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-event-limits.cjs.entry.js +68 -0
- package/dist/cjs/nylas-event-limits.cjs.entry.js.map +1 -0
- package/dist/cjs/nylas-event-title.cjs.entry.js +4 -4
- package/dist/cjs/nylas-event-title.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-form-card.cjs.entry.js +4 -4
- package/dist/cjs/nylas-form-card.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-if-state.cjs.entry.js +2 -2
- package/dist/cjs/nylas-limit-future-bookings.cjs.entry.js +122 -0
- package/dist/cjs/nylas-limit-future-bookings.cjs.entry.js.map +1 -0
- package/dist/cjs/nylas-list-folders.cjs.entry.js +3 -3
- package/dist/cjs/nylas-list-threads.cjs.entry.js +3 -3
- package/dist/cjs/nylas-locale-switch.cjs.entry.js +4 -4
- package/dist/cjs/nylas-locale-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-location-component.cjs.entry.js +5 -5
- package/dist/cjs/nylas-location-component.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-login.cjs.entry.js +3 -3
- package/dist/cjs/nylas-logo.cjs.entry.js +2 -2
- package/dist/cjs/nylas-mailbox-pagination.cjs.entry.js +2 -2
- package/dist/cjs/nylas-mailbox-toolbar-button.cjs.entry.js +3 -3
- package/dist/cjs/nylas-mailbox.cjs.entry.js +12 -13
- package/dist/cjs/nylas-mailbox.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-min-cancellation-notice.cjs.entry.js +145 -0
- package/dist/cjs/nylas-min-cancellation-notice.cjs.entry.js.map +1 -0
- package/dist/cjs/nylas-notification.cjs.entry.js +2 -2
- package/dist/cjs/nylas-provider.cjs.entry.js +9 -21
- package/dist/cjs/nylas-provider.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-scheduler-editor.cjs.entry.js +7257 -74
- package/dist/cjs/nylas-scheduler-editor.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-scheduling.cjs.entry.js +17 -13
- package/dist/cjs/nylas-scheduling.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-selected-event-card.cjs.entry.js +4 -4
- package/dist/cjs/nylas-selected-event-card.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-summarize-message-button.cjs.entry.js +4 -4
- package/dist/cjs/nylas-threads-refresh.cjs.entry.js +4 -4
- package/dist/cjs/nylas-threads-search.cjs.entry.js +3 -3
- package/dist/cjs/nylas-time-window-picker.cjs.entry.js +4 -4
- package/dist/cjs/nylas-time-window-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-timeslot-picker.cjs.entry.js +3 -3
- package/dist/cjs/nylas-timeslot-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-view-email.cjs.entry.js +2 -2
- package/dist/cjs/nylas-view-thread.cjs.entry.js +3 -3
- package/dist/cjs/nylas-web-elements.cjs.js +2 -2
- package/dist/cjs/people-icon.cjs.entry.js +2 -2
- package/dist/cjs/play-icon.cjs.entry.js +2 -2
- package/dist/cjs/play-icon_2.cjs.entry.js +3 -3
- package/dist/cjs/refresh-icon.cjs.entry.js +2 -2
- package/dist/cjs/{register-component-cc1cf810.js → register-component-d729f3f7.js} +2 -2
- package/dist/cjs/{register-component-cc1cf810.js.map → register-component-d729f3f7.js.map} +1 -1
- package/dist/cjs/{register-component-dfbd5404.js → register-component-f1ebc65d.js} +2 -2
- package/dist/cjs/{register-component-dfbd5404.js.map → register-component-f1ebc65d.js.map} +1 -1
- package/dist/cjs/reply-all-icon.cjs.entry.js +2 -2
- package/dist/cjs/reply-icon.cjs.entry.js +2 -2
- package/dist/cjs/scheduler-config-store-31b83ad3.js +19 -0
- package/dist/cjs/scheduler-config-store-31b83ad3.js.map +1 -0
- package/dist/cjs/scheduler-config-store-9c2cc421.js +19 -0
- package/dist/cjs/scheduler-config-store-9c2cc421.js.map +1 -0
- package/dist/cjs/{scheduler-store-65f0fbe5.js → scheduler-store-4cb46b3c.js} +3 -2
- package/dist/cjs/scheduler-store-4cb46b3c.js.map +1 -0
- package/dist/cjs/{scheduler-store-41b6d179.js → scheduler-store-7320f5d0.js} +3 -2
- package/dist/cjs/scheduler-store-7320f5d0.js.map +1 -0
- package/dist/cjs/search-icon.cjs.entry.js +2 -2
- package/dist/cjs/select-dropdown.cjs.entry.js +21 -4
- package/dist/cjs/select-dropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/sent-icon.cjs.entry.js +2 -2
- package/dist/cjs/spam-icon.cjs.entry.js +2 -2
- package/dist/cjs/star-icon.cjs.entry.js +2 -2
- package/dist/cjs/stop-icon.cjs.entry.js +2 -2
- package/dist/cjs/time-period-selector.cjs.entry.js +104 -0
- package/dist/cjs/time-period-selector.cjs.entry.js.map +1 -0
- package/dist/cjs/tooltip-component.cjs.entry.js +2 -2
- package/dist/cjs/translate-icon.cjs.entry.js +2 -2
- package/dist/cjs/trash-icon.cjs.entry.js +2 -2
- package/dist/cjs/underline-icon.cjs.entry.js +2 -2
- package/dist/cjs/warning-icon.cjs.entry.js +2 -2
- package/dist/collection/collection-manifest.json +7 -0
- package/dist/collection/common/constants.js +1 -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 +63 -0
- package/dist/collection/common/icons/google-logo.js.map +1 -0
- package/dist/collection/common/icons/inbox.js +1 -1
- package/dist/collection/common/icons/info.js +1 -1
- package/dist/collection/common/icons/italic.js +1 -1
- package/dist/collection/common/icons/loading.js +1 -1
- package/dist/collection/common/icons/location-off.js +1 -1
- package/dist/collection/common/icons/location.js +1 -1
- package/dist/collection/common/icons/microsoft-logo.js +63 -0
- package/dist/collection/common/icons/microsoft-logo.js.map +1 -0
- 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 +34 -0
- package/dist/collection/common/nylas-api-request.js.map +1 -0
- package/dist/collection/components/design-system/button-component/button-component.css +73 -0
- package/dist/collection/components/design-system/button-component/button-component.js +193 -0
- package/dist/collection/components/design-system/button-component/button-component.js.map +1 -0
- 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.css +6 -4
- package/dist/collection/components/design-system/select-dropdown/select-dropdown.js +42 -2
- package/dist/collection/components/design-system/select-dropdown/select-dropdown.js.map +1 -1
- package/dist/collection/components/design-system/time-period-selector/time-period-selector.css +22 -0
- package/dist/collection/components/design-system/time-period-selector/time-period-selector.js +200 -0
- package/dist/collection/components/design-system/time-period-selector/time-period-selector.js.map +1 -0
- 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 +2 -2
- 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 +1 -1
- package/dist/collection/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.css +4 -3
- package/dist/collection/components/scheduler/nylas-booking-form/nylas-booking-form.css +4 -0
- package/dist/collection/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.css +1 -0
- 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-date-picker/nylas-date-picker.css +20 -10
- package/dist/collection/components/scheduler/nylas-locale-switch/nylas-locale-switch.css +6 -1
- package/dist/collection/components/scheduler/nylas-locale-switch/test/nylas-locale-switch.spec.js +3 -3
- package/dist/collection/components/scheduler/nylas-locale-switch/test/nylas-locale-switch.spec.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-notification/nylas-notification.js +1 -1
- package/dist/collection/components/scheduler/nylas-scheduler/nylas-scheduling.css +7 -8
- package/dist/collection/components/scheduler/nylas-scheduler/nylas-scheduling.js +27 -6
- package/dist/collection/components/scheduler/nylas-scheduler/nylas-scheduling.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-scheduler/scheduler-view.js +2 -1
- package/dist/collection/components/scheduler/nylas-scheduler/scheduler-view.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-scheduler/test/nylas-scheduling.spec.js +9 -0
- package/dist/collection/components/scheduler/nylas-scheduler/test/nylas-scheduling.spec.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-selected-event-card/nylas-selected-event-card.css +12 -2
- package/dist/collection/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.css +1 -1
- package/dist/collection/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.css +5 -16
- package/dist/collection/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.js +3 -3
- package/dist/collection/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.css +49 -3
- package/dist/collection/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.js +5 -5
- package/dist/collection/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-availability-picker/test/nylas-availability-picker.spec.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-availability-picker/test/nylas-availability-picker.spec.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-booking-calendar-picker/nylas-booking-calendar-picker.css +6 -0
- package/dist/collection/components/scheduler-editor/nylas-booking-calendar-picker/nylas-booking-calendar-picker.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-booking-calendar-picker/nylas-booking-calendar-picker.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-buffer-time/nylas-buffer-time.js +3 -3
- package/dist/collection/components/scheduler-editor/nylas-buffer-time/nylas-buffer-time.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-calendar-picker/nylas-calendar-picker.css +6 -0
- package/dist/collection/components/scheduler-editor/nylas-calendar-picker/nylas-calendar-picker.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-calendar-picker/nylas-calendar-picker.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-custom-booking-flow/nylas-custom-booking-flow.js +1 -1
- 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 +2 -2
- package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.js +90 -52
- 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 +22 -0
- package/dist/collection/components/scheduler-editor/nylas-editor-tabs/tab-contents.js.map +1 -0
- package/dist/collection/components/scheduler-editor/nylas-event-description/nylas-event-description.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-description/nylas-event-description.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-duration/nylas-event-duration.js +2 -2
- 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.css +2 -2
- 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.css +60 -0
- package/dist/collection/components/scheduler-editor/nylas-event-limits/nylas-event-limits.js +59 -0
- package/dist/collection/components/scheduler-editor/nylas-event-limits/nylas-event-limits.js.map +1 -0
- package/dist/collection/components/scheduler-editor/nylas-event-title/nylas-event-title.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-title/nylas-event-title.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-form-card/nylas-form-card.css +2 -2
- 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.css +46 -0
- package/dist/collection/components/scheduler-editor/nylas-limit-future-bookings/nylas-limit-future-bookings.js +191 -0
- package/dist/collection/components/scheduler-editor/nylas-limit-future-bookings/nylas-limit-future-bookings.js.map +1 -0
- package/dist/collection/components/scheduler-editor/nylas-limit-future-bookings/test/nylas-limit-future-bookings.spec.js +41 -0
- package/dist/collection/components/scheduler-editor/nylas-limit-future-bookings/test/nylas-limit-future-bookings.spec.js.map +1 -0
- package/dist/collection/components/scheduler-editor/nylas-location-component/nylas-location-component.js +3 -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.css +46 -0
- package/dist/collection/components/scheduler-editor/nylas-min-cancellation-notice/nylas-min-cancellation-notice.js +214 -0
- package/dist/collection/components/scheduler-editor/nylas-min-cancellation-notice/nylas-min-cancellation-notice.js.map +1 -0
- package/dist/collection/components/scheduler-editor/nylas-min-cancellation-notice/test/nylas-min-cancellation-notice.spec.js +41 -0
- package/dist/collection/components/scheduler-editor/nylas-min-cancellation-notice/test/nylas-min-cancellation-notice.spec.js.map +1 -0
- package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.css +73 -1
- package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.js +177 -66
- 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.css +10 -2
- package/dist/collection/components/scheduler-editor/nylas-time-window-picker/nylas-time-window-picker.js +2 -2
- package/dist/collection/components/scheduler-editor/nylas-time-window-picker/nylas-time-window-picker.js.map +1 -1
- package/dist/collection/connector/connector-interface.js.map +1 -1
- package/dist/collection/connector/nylas-connector/index.js +0 -12
- package/dist/collection/connector/nylas-connector/index.js.map +1 -1
- package/dist/collection/connector/nylas-scheduler-config-connector/index.js +3 -24
- package/dist/collection/connector/nylas-scheduler-config-connector/index.js.map +1 -1
- package/dist/collection/connector/shared/api/scheduler-config.js +79 -10
- package/dist/collection/connector/shared/api/scheduler-config.js.map +1 -1
- package/dist/collection/index.js +1 -0
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/stores/auth-session-store.js +18 -0
- package/dist/collection/stores/auth-session-store.js.map +1 -0
- package/dist/collection/stores/scheduler-config-store.js +2 -0
- package/dist/collection/stores/scheduler-config-store.js.map +1 -1
- package/dist/collection/stores/scheduler-store.js +1 -0
- package/dist/collection/stores/scheduler-store.js.map +1 -1
- package/dist/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-component.d.ts +11 -0
- package/dist/components/button-component.js +8 -0
- package/dist/components/button-component.js.map +1 -0
- package/dist/components/button-component2.js +50 -0
- package/dist/components/button-component2.js.map +1 -0
- 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 +1 -0
- 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/folder.js +1 -1
- package/dist/components/forward.js +1 -1
- package/dist/components/globe.js +1 -1
- package/dist/components/google-logo-icon.d.ts +11 -0
- package/dist/components/google-logo-icon.js +8 -0
- package/dist/components/google-logo-icon.js.map +1 -0
- package/dist/components/google-logo.js +37 -0
- package/dist/components/google-logo.js.map +1 -0
- package/dist/components/inbox.js +1 -1
- package/dist/components/index.es.js +6 -2
- package/dist/components/index.es.js.map +1 -1
- package/dist/components/index.js +1 -0
- package/dist/components/index.js.map +1 -1
- 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 +78 -2
- package/dist/components/mailbox-store.js.map +1 -1
- package/dist/components/microsoft-logo-icon.d.ts +11 -0
- package/dist/components/microsoft-logo-icon.js +8 -0
- package/dist/components/microsoft-logo-icon.js.map +1 -0
- package/dist/components/microsoft-logo.js +37 -0
- package/dist/components/microsoft-logo.js.map +1 -0
- package/dist/components/multi-select-dropdown2.js +2 -2
- package/dist/components/nylas-additional-participants.js +4 -4
- package/dist/components/nylas-additional-participants.js.map +1 -1
- package/dist/components/nylas-api-request.js +37 -0
- package/dist/components/nylas-api-request.js.map +1 -0
- package/dist/components/nylas-availability-picker2.js +6 -6
- package/dist/components/nylas-availability-picker2.js.map +1 -1
- package/dist/components/nylas-booked-event-card2.js +1 -1
- package/dist/components/nylas-booked-event-card2.js.map +1 -1
- package/dist/components/nylas-booking-calendar-picker2.js +2 -2
- package/dist/components/nylas-booking-calendar-picker2.js.map +1 -1
- package/dist/components/nylas-booking-form2.js +1 -1
- package/dist/components/nylas-booking-form2.js.map +1 -1
- package/dist/components/nylas-buffer-time2.js +3 -3
- package/dist/components/nylas-buffer-time2.js.map +1 -1
- package/dist/components/nylas-calendar-picker2.js +2 -2
- package/dist/components/nylas-calendar-picker2.js.map +1 -1
- package/dist/components/nylas-cancel-booking-form2.js +2 -2
- package/dist/components/nylas-cancel-booking-form2.js.map +1 -1
- package/dist/components/nylas-cancelled-event-card2.js +1 -1
- package/dist/components/nylas-composer2.js +1 -1
- package/dist/components/nylas-custom-booking-flow2.js +1 -1
- package/dist/components/nylas-custom-booking-flow2.js.map +1 -1
- package/dist/components/nylas-date-picker2.js +1 -1
- package/dist/components/nylas-date-picker2.js.map +1 -1
- package/dist/components/nylas-editor-tabs2.js +184 -101
- package/dist/components/nylas-editor-tabs2.js.map +1 -1
- package/dist/components/nylas-event-description2.js +1 -1
- package/dist/components/nylas-event-description2.js.map +1 -1
- package/dist/components/nylas-event-duration2.js +2 -2
- package/dist/components/nylas-event-duration2.js.map +1 -1
- package/dist/components/nylas-event-info2.js +2 -2
- package/dist/components/nylas-event-info2.js.map +1 -1
- package/dist/components/nylas-event-limits.d.ts +11 -0
- package/dist/components/nylas-event-limits.js +8 -0
- package/dist/components/nylas-event-limits.js.map +1 -0
- package/dist/components/nylas-event-limits2.js +79 -0
- package/dist/components/nylas-event-limits2.js.map +1 -0
- package/dist/components/nylas-event-title2.js +1 -1
- package/dist/components/nylas-event-title2.js.map +1 -1
- package/dist/components/nylas-form-card2.js +2 -2
- package/dist/components/nylas-form-card2.js.map +1 -1
- package/dist/components/nylas-limit-future-bookings.d.ts +11 -0
- package/dist/components/nylas-limit-future-bookings.js +8 -0
- package/dist/components/nylas-limit-future-bookings.js.map +1 -0
- package/dist/components/nylas-limit-future-bookings2.js +171 -0
- package/dist/components/nylas-limit-future-bookings2.js.map +1 -0
- package/dist/components/nylas-list-folders.js +1 -1
- package/dist/components/nylas-list-threads.js +1 -1
- package/dist/components/nylas-locale-switch2.js +1 -1
- package/dist/components/nylas-locale-switch2.js.map +1 -1
- package/dist/components/nylas-location-component2.js +3 -3
- 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-toolbar-button.js +1 -1
- package/dist/components/nylas-mailbox.js +2 -3
- package/dist/components/nylas-mailbox.js.map +1 -1
- package/dist/components/nylas-min-cancellation-notice.d.ts +11 -0
- package/dist/components/nylas-min-cancellation-notice.js +8 -0
- package/dist/components/nylas-min-cancellation-notice.js.map +1 -0
- package/dist/components/nylas-min-cancellation-notice2.js +194 -0
- package/dist/components/nylas-min-cancellation-notice2.js.map +1 -0
- package/dist/components/nylas-notification2.js +1 -1
- package/dist/components/nylas-provider.js +3 -15
- package/dist/components/nylas-provider.js.map +1 -1
- package/dist/components/nylas-scheduler-editor.js +7362 -132
- package/dist/components/nylas-scheduler-editor.js.map +1 -1
- package/dist/components/nylas-scheduling.js +14 -9
- package/dist/components/nylas-scheduling.js.map +1 -1
- package/dist/components/nylas-selected-event-card2.js +1 -1
- package/dist/components/nylas-selected-event-card2.js.map +1 -1
- package/dist/components/nylas-summarize-message-button2.js +2 -2
- package/dist/components/nylas-threads-refresh.js +2 -2
- package/dist/components/nylas-threads-search.js +1 -1
- package/dist/components/nylas-time-window-picker2.js +3 -3
- package/dist/components/nylas-time-window-picker2.js.map +1 -1
- package/dist/components/nylas-timeslot-picker2.js +1 -1
- package/dist/components/nylas-timeslot-picker2.js.map +1 -1
- package/dist/components/nylas-view-email2.js +1 -1
- package/dist/components/nylas-view-thread.js +1 -1
- package/dist/components/people-icon.js +1 -1
- package/dist/components/play.js +1 -1
- package/dist/components/refresh.js +1 -1
- package/dist/components/reply-all.js +1 -1
- package/dist/components/reply.js +1 -1
- package/dist/components/scheduler-config-store.js +3 -30
- package/dist/components/scheduler-config-store.js.map +1 -1
- package/dist/components/scheduler-store.js +1 -0
- package/dist/components/scheduler-store.js.map +1 -1
- package/dist/components/search.js +1 -1
- package/dist/components/select-dropdown2.js +25 -4
- package/dist/components/select-dropdown2.js.map +1 -1
- package/dist/components/sent.js +1 -1
- package/dist/components/spam.js +1 -1
- package/dist/components/star.js +1 -1
- package/dist/components/stop.js +1 -1
- package/dist/components/time-period-selector.d.ts +11 -0
- package/dist/components/time-period-selector.js +8 -0
- package/dist/components/time-period-selector.js.map +1 -0
- package/dist/components/time-period-selector2.js +144 -0
- package/dist/components/time-period-selector2.js.map +1 -0
- package/dist/components/toolitp-component.js +1 -1
- package/dist/components/translate.js +1 -1
- package/dist/components/trash.js +1 -1
- package/dist/components/underline.js +1 -1
- package/dist/components/warning.js +1 -1
- package/dist/esm/add-circle-icon.entry.js +2 -2
- package/dist/esm/{add-circle-icon_18.entry.js → add-circle-icon_22.entry.js} +423 -99
- package/dist/esm/add-circle-icon_22.entry.js.map +1 -0
- package/dist/esm/archive-icon.entry.js +2 -2
- package/dist/esm/archive-icon_7.entry.js +8 -8
- package/dist/esm/arrow-icon.entry.js +2 -2
- package/dist/esm/bold-icon.entry.js +2 -2
- package/dist/esm/bold-icon_3.entry.js +4 -4
- package/dist/esm/button-component.entry.js +26 -0
- package/dist/esm/button-component.entry.js.map +1 -0
- package/dist/esm/calendar-cancel-icon.entry.js +2 -2
- package/dist/esm/calendar-check-icon.entry.js +2 -2
- package/dist/esm/calendar-check-icon_2.entry.js +3 -3
- package/dist/esm/calendar-icon.entry.js +2 -2
- package/dist/esm/calendar-info-icon.entry.js +2 -2
- package/dist/esm/calendar-patterns-icon.entry.js +2 -2
- package/dist/esm/checkmark-circle-icon.entry.js +2 -2
- package/dist/esm/chevron-icon.entry.js +2 -2
- package/dist/esm/chevron-icon_3.entry.js +23 -6
- package/dist/esm/chevron-icon_3.entry.js.map +1 -1
- package/dist/esm/close-icon.entry.js +2 -2
- package/dist/{nylas-web-elements/constants-56fee505.js → esm/constants-335dffcf.js} +2 -1
- package/dist/{nylas-web-elements/constants-56fee505.js.map → esm/constants-335dffcf.js.map} +1 -1
- package/dist/esm/{constants-b6bf6671.js → constants-6ee60d6d.js} +2 -1
- package/dist/esm/{constants-b6bf6671.js.map → constants-6ee60d6d.js.map} +1 -1
- package/dist/esm/document-refresh-icon.entry.js +2 -2
- package/dist/esm/flow-icon.entry.js +2 -2
- package/dist/esm/folder-icon.entry.js +2 -2
- package/dist/esm/forward-icon.entry.js +2 -2
- package/dist/esm/forward-icon_6.entry.js +10 -10
- package/dist/esm/globe-icon.entry.js +2 -2
- package/dist/esm/google-logo-icon.entry.js +19 -0
- package/dist/esm/google-logo-icon.entry.js.map +1 -0
- package/dist/esm/google-logo-icon_3.entry.js +296 -0
- package/dist/esm/google-logo-icon_3.entry.js.map +1 -0
- package/dist/esm/inbox-icon.entry.js +2 -2
- package/dist/{nylas-web-elements/index-7b27868b.js → esm/index-11d12497.js} +2 -2
- package/dist/esm/{index-7b27868b.js.map → index-11d12497.js.map} +1 -1
- package/dist/esm/{index-10914bc1.js → index-628f294a.js} +2 -2
- package/dist/esm/{index-10914bc1.js.map → index-628f294a.js.map} +1 -1
- package/dist/esm/{index-0583f8a8.js → index-7cb0dd3d.js} +482 -21
- package/dist/esm/index-7cb0dd3d.js.map +1 -0
- package/dist/esm/{index-bda1cba1.js → index-8362ce5c.js} +34 -6
- package/dist/esm/index-8362ce5c.js.map +1 -0
- package/dist/esm/{index.es-0a5de5bf.js → index.es-2578c6a5.js} +8 -4
- package/dist/esm/index.es-2578c6a5.js.map +1 -0
- package/dist/{nylas-web-elements/index.es-a9f78dad.js → esm/index.es-bd511719.js} +7 -3
- package/dist/esm/index.es-bd511719.js.map +1 -0
- package/dist/esm/index.js +3 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/info-icon.entry.js +2 -2
- package/dist/esm/info-icon_2.entry.js +3 -3
- package/dist/esm/italic-icon.entry.js +2 -2
- package/dist/esm/loader.js +3 -3
- package/dist/esm/loading-icon.entry.js +2 -2
- package/dist/esm/location-icon.entry.js +2 -2
- package/dist/esm/location-off-icon.entry.js +2 -2
- package/dist/{nylas-web-elements/mailbox-store-8a1c2d32.js → esm/mailbox-store-150cc456.js} +80 -4
- package/dist/esm/mailbox-store-150cc456.js.map +1 -0
- package/dist/esm/{mailbox-store-e721b17c.js → mailbox-store-bb21512c.js} +81 -5
- package/dist/esm/mailbox-store-bb21512c.js.map +1 -0
- package/dist/esm/microsoft-logo-icon.entry.js +19 -0
- package/dist/esm/microsoft-logo-icon.entry.js.map +1 -0
- package/dist/esm/multi-select-dropdown.entry.js +3 -3
- package/dist/esm/nylas-additional-participants.entry.js +6 -6
- package/dist/esm/nylas-additional-participants.entry.js.map +1 -1
- package/dist/esm/nylas-api-request-55446aba.js +37 -0
- package/dist/esm/nylas-api-request-55446aba.js.map +1 -0
- package/dist/esm/nylas-api-request-c97a0153.js +35 -0
- package/dist/esm/nylas-api-request-c97a0153.js.map +1 -0
- package/dist/esm/nylas-availability-picker.entry.js +9 -9
- package/dist/esm/nylas-availability-picker.entry.js.map +1 -1
- package/dist/esm/nylas-booked-event-card.entry.js +4 -4
- package/dist/esm/nylas-booked-event-card.entry.js.map +1 -1
- package/dist/esm/nylas-booked-event-card_10.entry.js +15 -15
- package/dist/esm/nylas-booked-event-card_10.entry.js.map +1 -1
- package/dist/esm/nylas-booking-calendar-picker.entry.js +4 -4
- package/dist/esm/nylas-booking-calendar-picker.entry.js.map +1 -1
- package/dist/esm/nylas-booking-form.entry.js +3 -3
- package/dist/esm/nylas-booking-form.entry.js.map +1 -1
- package/dist/esm/nylas-buffer-time.entry.js +5 -5
- package/dist/esm/nylas-buffer-time.entry.js.map +1 -1
- package/dist/esm/nylas-calendar-picker.entry.js +4 -4
- package/dist/esm/nylas-calendar-picker.entry.js.map +1 -1
- package/dist/esm/nylas-cancel-booking-form.entry.js +4 -4
- package/dist/esm/nylas-cancel-booking-form.entry.js.map +1 -1
- package/dist/esm/nylas-cancelled-event-card.entry.js +3 -3
- package/dist/esm/nylas-composer.entry.js +2 -2
- package/dist/esm/nylas-custom-booking-flow.entry.js +3 -3
- package/dist/esm/nylas-custom-booking-flow.entry.js.map +1 -1
- package/dist/esm/nylas-date-picker.entry.js +3 -3
- package/dist/esm/nylas-date-picker.entry.js.map +1 -1
- package/dist/esm/nylas-editor-tabs.entry.js +100 -48
- package/dist/esm/nylas-editor-tabs.entry.js.map +1 -1
- package/dist/esm/nylas-event-description.entry.js +3 -3
- package/dist/esm/nylas-event-description.entry.js.map +1 -1
- package/dist/esm/nylas-event-duration.entry.js +4 -4
- package/dist/esm/nylas-event-duration.entry.js.map +1 -1
- package/dist/esm/nylas-event-info.entry.js +4 -4
- package/dist/esm/nylas-event-info.entry.js.map +1 -1
- package/dist/esm/nylas-event-limits.entry.js +64 -0
- package/dist/esm/nylas-event-limits.entry.js.map +1 -0
- package/dist/esm/nylas-event-title.entry.js +4 -4
- package/dist/esm/nylas-event-title.entry.js.map +1 -1
- package/dist/esm/nylas-form-card.entry.js +4 -4
- package/dist/esm/nylas-form-card.entry.js.map +1 -1
- package/dist/esm/nylas-if-state.entry.js +2 -2
- package/dist/esm/nylas-limit-future-bookings.entry.js +118 -0
- package/dist/esm/nylas-limit-future-bookings.entry.js.map +1 -0
- package/dist/esm/nylas-list-folders.entry.js +3 -3
- package/dist/esm/nylas-list-threads.entry.js +3 -3
- package/dist/esm/nylas-locale-switch.entry.js +4 -4
- package/dist/esm/nylas-locale-switch.entry.js.map +1 -1
- package/dist/esm/nylas-location-component.entry.js +5 -5
- package/dist/esm/nylas-location-component.entry.js.map +1 -1
- package/dist/esm/nylas-login.entry.js +3 -3
- package/dist/esm/nylas-logo.entry.js +2 -2
- package/dist/esm/nylas-mailbox-pagination.entry.js +2 -2
- package/dist/esm/nylas-mailbox-toolbar-button.entry.js +3 -3
- package/dist/esm/nylas-mailbox.entry.js +5 -6
- package/dist/esm/nylas-mailbox.entry.js.map +1 -1
- package/dist/esm/nylas-min-cancellation-notice.entry.js +141 -0
- package/dist/esm/nylas-min-cancellation-notice.entry.js.map +1 -0
- package/dist/esm/nylas-notification.entry.js +2 -2
- package/dist/esm/nylas-provider.entry.js +7 -19
- package/dist/esm/nylas-provider.entry.js.map +1 -1
- package/dist/esm/nylas-scheduler-editor.entry.js +7257 -74
- package/dist/esm/nylas-scheduler-editor.entry.js.map +1 -1
- package/dist/esm/nylas-scheduling.entry.js +17 -13
- package/dist/esm/nylas-scheduling.entry.js.map +1 -1
- package/dist/esm/nylas-selected-event-card.entry.js +4 -4
- package/dist/esm/nylas-selected-event-card.entry.js.map +1 -1
- package/dist/esm/nylas-summarize-message-button.entry.js +4 -4
- package/dist/esm/nylas-threads-refresh.entry.js +4 -4
- package/dist/esm/nylas-threads-search.entry.js +3 -3
- package/dist/esm/nylas-time-window-picker.entry.js +4 -4
- package/dist/esm/nylas-time-window-picker.entry.js.map +1 -1
- package/dist/esm/nylas-timeslot-picker.entry.js +3 -3
- package/dist/esm/nylas-timeslot-picker.entry.js.map +1 -1
- package/dist/esm/nylas-view-email.entry.js +2 -2
- package/dist/esm/nylas-view-thread.entry.js +3 -3
- package/dist/esm/nylas-web-elements.js +3 -3
- package/dist/esm/people-icon.entry.js +2 -2
- package/dist/esm/play-icon.entry.js +2 -2
- package/dist/esm/play-icon_2.entry.js +3 -3
- package/dist/esm/refresh-icon.entry.js +2 -2
- package/dist/{nylas-web-elements/register-component-93f9bcf5.js → esm/register-component-0645dce0.js} +2 -2
- package/dist/esm/{register-component-93f9bcf5.js.map → register-component-0645dce0.js.map} +1 -1
- package/dist/esm/{register-component-d056a880.js → register-component-dc659dc3.js} +3 -3
- package/dist/esm/{register-component-d056a880.js.map → register-component-dc659dc3.js.map} +1 -1
- package/dist/esm/reply-all-icon.entry.js +2 -2
- package/dist/esm/reply-icon.entry.js +2 -2
- package/dist/esm/scheduler-config-store-51ee4f42.js +17 -0
- package/dist/esm/scheduler-config-store-51ee4f42.js.map +1 -0
- package/dist/esm/scheduler-config-store-bc59545b.js +17 -0
- package/dist/esm/scheduler-config-store-bc59545b.js.map +1 -0
- package/dist/esm/{scheduler-store-f2e72da4.js → scheduler-store-4d0a4f8a.js} +3 -2
- package/dist/esm/scheduler-store-4d0a4f8a.js.map +1 -0
- package/dist/esm/{scheduler-store-0fbe642c.js → scheduler-store-72116723.js} +4 -3
- package/dist/esm/scheduler-store-72116723.js.map +1 -0
- package/dist/esm/search-icon.entry.js +2 -2
- package/dist/esm/select-dropdown.entry.js +21 -4
- package/dist/esm/select-dropdown.entry.js.map +1 -1
- package/dist/esm/sent-icon.entry.js +2 -2
- package/dist/esm/spam-icon.entry.js +2 -2
- package/dist/esm/star-icon.entry.js +2 -2
- package/dist/esm/stop-icon.entry.js +2 -2
- package/dist/esm/time-period-selector.entry.js +100 -0
- package/dist/esm/time-period-selector.entry.js.map +1 -0
- package/dist/esm/tooltip-component.entry.js +2 -2
- package/dist/esm/translate-icon.entry.js +2 -2
- package/dist/esm/trash-icon.entry.js +2 -2
- package/dist/esm/underline-icon.entry.js +2 -2
- package/dist/esm/{utils-0cd66d04.js → utils-c00bdc3c.js} +2 -2
- package/dist/esm/{utils-0cd66d04.js.map → utils-c00bdc3c.js.map} +1 -1
- package/dist/esm/warning-icon.entry.js +2 -2
- package/dist/nylas-web-elements/add-circle-icon.entry.js +2 -2
- package/dist/nylas-web-elements/archive-icon.entry.js +2 -2
- package/dist/nylas-web-elements/arrow-icon.entry.js +2 -2
- package/dist/nylas-web-elements/bold-icon.entry.js +2 -2
- package/dist/nylas-web-elements/button-component.entry.js +26 -0
- package/dist/nylas-web-elements/button-component.entry.js.map +1 -0
- package/dist/nylas-web-elements/calendar-cancel-icon.entry.js +2 -2
- package/dist/nylas-web-elements/calendar-check-icon.entry.js +2 -2
- package/dist/nylas-web-elements/calendar-icon.entry.js +2 -2
- package/dist/nylas-web-elements/calendar-info-icon.entry.js +2 -2
- package/dist/nylas-web-elements/calendar-patterns-icon.entry.js +2 -2
- package/dist/nylas-web-elements/checkmark-circle-icon.entry.js +2 -2
- package/dist/nylas-web-elements/chevron-icon.entry.js +2 -2
- package/dist/nylas-web-elements/close-icon.entry.js +2 -2
- package/dist/{esm/constants-56fee505.js → nylas-web-elements/constants-335dffcf.js} +2 -1
- package/dist/{esm/constants-56fee505.js.map → nylas-web-elements/constants-335dffcf.js.map} +1 -1
- package/dist/nylas-web-elements/document-refresh-icon.entry.js +2 -2
- package/dist/nylas-web-elements/flow-icon.entry.js +2 -2
- package/dist/nylas-web-elements/folder-icon.entry.js +2 -2
- package/dist/nylas-web-elements/forward-icon.entry.js +2 -2
- package/dist/nylas-web-elements/globe-icon.entry.js +2 -2
- package/dist/nylas-web-elements/google-logo-icon.entry.js +19 -0
- package/dist/nylas-web-elements/google-logo-icon.entry.js.map +1 -0
- package/dist/nylas-web-elements/inbox-icon.entry.js +2 -2
- package/dist/{esm/index-7b27868b.js → nylas-web-elements/index-11d12497.js} +2 -2
- package/dist/nylas-web-elements/{index-7b27868b.js.map → index-11d12497.js.map} +1 -1
- package/dist/nylas-web-elements/{index-bda1cba1.js → index-8362ce5c.js} +2 -2
- package/dist/nylas-web-elements/index-8362ce5c.js.map +1 -0
- package/dist/{esm/index.es-a9f78dad.js → nylas-web-elements/index.es-bd511719.js} +7 -3
- package/dist/nylas-web-elements/index.es-bd511719.js.map +1 -0
- package/dist/nylas-web-elements/index.esm.js +3 -2
- package/dist/nylas-web-elements/index.esm.js.map +1 -1
- package/dist/nylas-web-elements/info-icon.entry.js +2 -2
- package/dist/nylas-web-elements/italic-icon.entry.js +2 -2
- package/dist/nylas-web-elements/loading-icon.entry.js +2 -2
- package/dist/nylas-web-elements/location-icon.entry.js +2 -2
- package/dist/nylas-web-elements/location-off-icon.entry.js +2 -2
- package/dist/{esm/mailbox-store-8a1c2d32.js → nylas-web-elements/mailbox-store-150cc456.js} +80 -4
- package/dist/nylas-web-elements/mailbox-store-150cc456.js.map +1 -0
- package/dist/nylas-web-elements/microsoft-logo-icon.entry.js +19 -0
- package/dist/nylas-web-elements/microsoft-logo-icon.entry.js.map +1 -0
- package/dist/nylas-web-elements/multi-select-dropdown.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-additional-participants.entry.js +6 -6
- package/dist/nylas-web-elements/nylas-additional-participants.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-api-request-55446aba.js +37 -0
- package/dist/nylas-web-elements/nylas-api-request-55446aba.js.map +1 -0
- package/dist/nylas-web-elements/nylas-availability-picker.entry.js +9 -9
- package/dist/nylas-web-elements/nylas-availability-picker.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-booked-event-card.entry.js +4 -4
- package/dist/nylas-web-elements/nylas-booked-event-card.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-booking-calendar-picker.entry.js +4 -4
- package/dist/nylas-web-elements/nylas-booking-calendar-picker.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-booking-form.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-booking-form.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-buffer-time.entry.js +5 -5
- package/dist/nylas-web-elements/nylas-buffer-time.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-calendar-picker.entry.js +4 -4
- package/dist/nylas-web-elements/nylas-calendar-picker.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-cancel-booking-form.entry.js +4 -4
- package/dist/nylas-web-elements/nylas-cancel-booking-form.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-cancelled-event-card.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-composer.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-custom-booking-flow.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-custom-booking-flow.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-date-picker.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-date-picker.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-editor-tabs.entry.js +100 -48
- package/dist/nylas-web-elements/nylas-editor-tabs.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-event-description.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-event-description.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-event-duration.entry.js +4 -4
- package/dist/nylas-web-elements/nylas-event-duration.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-event-info.entry.js +4 -4
- package/dist/nylas-web-elements/nylas-event-info.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-event-limits.entry.js +64 -0
- package/dist/nylas-web-elements/nylas-event-limits.entry.js.map +1 -0
- package/dist/nylas-web-elements/nylas-event-title.entry.js +4 -4
- package/dist/nylas-web-elements/nylas-event-title.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-form-card.entry.js +4 -4
- package/dist/nylas-web-elements/nylas-form-card.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-if-state.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-limit-future-bookings.entry.js +118 -0
- package/dist/nylas-web-elements/nylas-limit-future-bookings.entry.js.map +1 -0
- package/dist/nylas-web-elements/nylas-list-folders.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-list-threads.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-locale-switch.entry.js +4 -4
- package/dist/nylas-web-elements/nylas-locale-switch.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-location-component.entry.js +5 -5
- package/dist/nylas-web-elements/nylas-location-component.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-login.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-logo.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-mailbox-pagination.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-mailbox-toolbar-button.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-mailbox.entry.js +5 -6
- package/dist/nylas-web-elements/nylas-mailbox.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-min-cancellation-notice.entry.js +141 -0
- package/dist/nylas-web-elements/nylas-min-cancellation-notice.entry.js.map +1 -0
- package/dist/nylas-web-elements/nylas-notification.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-provider.entry.js +7 -19
- package/dist/nylas-web-elements/nylas-provider.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-scheduler-editor.entry.js +7257 -74
- package/dist/nylas-web-elements/nylas-scheduler-editor.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-scheduling.entry.js +17 -13
- package/dist/nylas-web-elements/nylas-scheduling.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-selected-event-card.entry.js +4 -4
- package/dist/nylas-web-elements/nylas-selected-event-card.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-summarize-message-button.entry.js +4 -4
- package/dist/nylas-web-elements/nylas-threads-refresh.entry.js +4 -4
- package/dist/nylas-web-elements/nylas-threads-search.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-time-window-picker.entry.js +4 -4
- package/dist/nylas-web-elements/nylas-time-window-picker.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-timeslot-picker.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-timeslot-picker.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-view-email.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-view-thread.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-web-elements.esm.js +3 -3
- package/dist/nylas-web-elements/p-006ab406.entry.js +2 -0
- package/dist/nylas-web-elements/p-006ab406.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-01bf65c2.entry.js +2 -0
- package/dist/nylas-web-elements/{p-bf2887bd.js → p-1819b3d7.js} +2 -2
- package/dist/nylas-web-elements/{p-bf2887bd.js.map → p-1819b3d7.js.map} +1 -1
- package/dist/nylas-web-elements/{p-26b75895.entry.js → p-2523c292.entry.js} +2 -2
- package/dist/nylas-web-elements/p-2c5d5953.entry.js +2 -0
- package/dist/nylas-web-elements/p-2c5d5953.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-3631e6e5.entry.js +2 -0
- package/dist/nylas-web-elements/p-3631e6e5.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-374527e6.entry.js +2 -0
- package/dist/nylas-web-elements/p-374527e6.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-0195d832.entry.js → p-395f49eb.entry.js} +2 -2
- package/dist/nylas-web-elements/p-39b280e2.entry.js +2 -0
- package/dist/nylas-web-elements/p-39b280e2.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-3da66838.entry.js +2 -0
- package/dist/nylas-web-elements/p-3da66838.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-9955e9b6.js → p-408dda49.js} +2 -2
- package/dist/nylas-web-elements/{p-31f12f3f.entry.js → p-409d4410.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-3105fc0a.entry.js → p-40ed7eab.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-412215d1.entry.js → p-41c1654e.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-a959a080.entry.js → p-42a4c2fd.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-68f47a72.entry.js → p-4d9fceeb.entry.js} +2 -2
- package/dist/nylas-web-elements/p-59b6ae90.entry.js +2 -0
- package/dist/nylas-web-elements/p-59b6ae90.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-5a3809a7.entry.js +2 -0
- package/dist/nylas-web-elements/p-5a3809a7.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-c0fac9fc.entry.js → p-64364434.entry.js} +2 -2
- package/dist/nylas-web-elements/p-65fdfb60.js +2 -0
- package/dist/nylas-web-elements/p-65fdfb60.js.map +1 -0
- package/dist/nylas-web-elements/p-68c2fadf.js +3 -0
- package/dist/nylas-web-elements/{p-e4b9d6af.js.map → p-68c2fadf.js.map} +1 -1
- package/dist/nylas-web-elements/{p-67f20520.entry.js → p-7b1bb792.entry.js} +3 -3
- package/dist/nylas-web-elements/{p-facc84f3.js → p-901f9612.js} +2 -2
- package/dist/nylas-web-elements/{p-e324add5.entry.js → p-9dac153b.entry.js} +2 -2
- package/dist/nylas-web-elements/p-9f168ff0.js +2 -0
- package/dist/nylas-web-elements/{p-ce89d941.js.map → p-9f168ff0.js.map} +1 -1
- package/dist/nylas-web-elements/p-a0c2ce03.entry.js +2 -0
- package/dist/nylas-web-elements/{p-f8e59935.entry.js → p-a1e27dc5.entry.js} +2 -2
- package/dist/nylas-web-elements/p-a3d5a1dd.entry.js +2 -0
- package/dist/nylas-web-elements/p-ad9c3cab.entry.js +2 -0
- package/dist/nylas-web-elements/p-ad9c3cab.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-5d875283.entry.js → p-ae01e1cb.entry.js} +2 -2
- package/dist/nylas-web-elements/p-af22da60.entry.js +17 -0
- package/dist/nylas-web-elements/p-af22da60.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-b54b575a.entry.js → p-b2208193.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-02435888.entry.js → p-ba3d383f.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-f826c690.entry.js → p-baa620b4.entry.js} +2 -2
- package/dist/nylas-web-elements/p-bfdc148c.entry.js +2 -0
- package/dist/nylas-web-elements/{p-65b275df.js → p-cabb2e68.js} +2 -2
- package/dist/nylas-web-elements/p-cadc9052.js +2 -0
- package/dist/nylas-web-elements/p-cadc9052.js.map +1 -0
- package/dist/nylas-web-elements/p-d224c7af.entry.js +2 -0
- package/dist/nylas-web-elements/p-d224c7af.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-d67d1c72.js +2 -0
- package/dist/nylas-web-elements/p-d67d1c72.js.map +1 -0
- package/dist/nylas-web-elements/p-d85eecf4.entry.js +2 -0
- package/dist/nylas-web-elements/p-d85eecf4.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-d92a0405.entry.js +2 -0
- package/dist/nylas-web-elements/p-dc1cee56.entry.js +2 -0
- package/dist/nylas-web-elements/p-dc1cee56.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-de63bc35.entry.js +2 -0
- package/dist/nylas-web-elements/{p-22c0a883.entry.js → p-deafc6bc.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-64be0bab.js → p-df5e9aaf.js} +2 -2
- package/dist/nylas-web-elements/p-df5e9aaf.js.map +1 -0
- package/dist/nylas-web-elements/p-f48d0571.entry.js +2 -0
- package/dist/nylas-web-elements/p-fbbca7a6.entry.js +2 -0
- package/dist/nylas-web-elements/people-icon.entry.js +2 -2
- package/dist/nylas-web-elements/play-icon.entry.js +2 -2
- package/dist/nylas-web-elements/refresh-icon.entry.js +2 -2
- package/dist/{esm/register-component-93f9bcf5.js → nylas-web-elements/register-component-0645dce0.js} +2 -2
- package/dist/nylas-web-elements/{register-component-93f9bcf5.js.map → register-component-0645dce0.js.map} +1 -1
- package/dist/nylas-web-elements/reply-all-icon.entry.js +2 -2
- package/dist/nylas-web-elements/reply-icon.entry.js +2 -2
- package/dist/nylas-web-elements/scheduler-config-store-bc59545b.js +17 -0
- package/dist/nylas-web-elements/scheduler-config-store-bc59545b.js.map +1 -0
- package/dist/nylas-web-elements/{scheduler-store-f2e72da4.js → scheduler-store-4d0a4f8a.js} +3 -2
- package/dist/nylas-web-elements/scheduler-store-4d0a4f8a.js.map +1 -0
- package/dist/nylas-web-elements/search-icon.entry.js +2 -2
- package/dist/nylas-web-elements/select-dropdown.entry.js +21 -4
- package/dist/nylas-web-elements/select-dropdown.entry.js.map +1 -1
- package/dist/nylas-web-elements/sent-icon.entry.js +2 -2
- package/dist/nylas-web-elements/spam-icon.entry.js +2 -2
- package/dist/nylas-web-elements/star-icon.entry.js +2 -2
- package/dist/nylas-web-elements/stop-icon.entry.js +2 -2
- package/dist/nylas-web-elements/time-period-selector.entry.js +100 -0
- package/dist/nylas-web-elements/time-period-selector.entry.js.map +1 -0
- package/dist/nylas-web-elements/tooltip-component.entry.js +2 -2
- package/dist/nylas-web-elements/translate-icon.entry.js +2 -2
- package/dist/nylas-web-elements/trash-icon.entry.js +2 -2
- package/dist/nylas-web-elements/underline-icon.entry.js +2 -2
- package/dist/nylas-web-elements/warning-icon.entry.js +2 -2
- package/dist/types/common/icons/google-logo.d.ts +5 -0
- package/dist/types/common/icons/microsoft-logo.d.ts +5 -0
- package/dist/types/common/nylas-api-request.d.ts +35 -0
- package/dist/types/components/design-system/button-component/button-component.d.ts +13 -0
- package/dist/types/components/design-system/select-dropdown/select-dropdown.d.ts +3 -0
- package/dist/types/components/design-system/time-period-selector/time-period-selector.d.ts +31 -0
- package/dist/types/components/scheduler/nylas-scheduler/nylas-scheduling.d.ts +1 -0
- package/dist/types/components/scheduler/nylas-scheduler/scheduler-view.d.ts +1 -0
- package/dist/types/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.d.ts +21 -28
- package/dist/types/components/scheduler-editor/nylas-editor-tabs/tab-contents.d.ts +7 -0
- package/dist/types/components/scheduler-editor/nylas-event-limits/nylas-event-limits.d.ts +8 -0
- package/dist/types/components/scheduler-editor/nylas-limit-future-bookings/nylas-limit-future-bookings.d.ts +28 -0
- package/dist/types/components/scheduler-editor/nylas-min-cancellation-notice/nylas-min-cancellation-notice.d.ts +25 -0
- package/dist/types/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.d.ts +12 -10
- package/dist/types/components.d.ts +314 -19
- package/dist/types/connector/connector-interface.d.ts +1 -1
- package/dist/types/connector/nylas-connector/index.d.ts +1 -4
- package/dist/types/connector/nylas-scheduler-config-connector/index.d.ts +5 -32
- package/dist/types/connector/shared/api/scheduler-config.d.ts +12 -11
- package/dist/types/index.d.ts +2 -0
- package/dist/types/stores/auth-session-store.d.ts +9 -0
- package/dist/types/stores/scheduler-config-store.d.ts +5 -2
- package/dist/types/stores/scheduler-store.d.ts +1 -0
- package/package.json +10 -7
- package/dist/cjs/add-circle-icon_18.cjs.entry.js.map +0 -1
- package/dist/cjs/auth-store-78906da5.js +0 -85
- package/dist/cjs/auth-store-78906da5.js.map +0 -1
- package/dist/cjs/auth-store-be4bbe89.js +0 -85
- package/dist/cjs/auth-store-be4bbe89.js.map +0 -1
- package/dist/cjs/index-37045c7b.js.map +0 -1
- package/dist/cjs/index-ec8e2a4d.js.map +0 -1
- package/dist/cjs/index.es-3c12ec8c.js.map +0 -1
- package/dist/cjs/index.es-9122f5a3.js.map +0 -1
- package/dist/cjs/mailbox-store-37622628.js.map +0 -1
- package/dist/cjs/mailbox-store-5cd5e485.js.map +0 -1
- package/dist/cjs/nylas-if-state_3.cjs.entry.js +0 -411
- package/dist/cjs/nylas-if-state_3.cjs.entry.js.map +0 -1
- package/dist/cjs/scheduler-config-store-03b22a70.js +0 -47
- package/dist/cjs/scheduler-config-store-03b22a70.js.map +0 -1
- package/dist/cjs/scheduler-config-store-9577e499.js +0 -47
- package/dist/cjs/scheduler-config-store-9577e499.js.map +0 -1
- package/dist/cjs/scheduler-store-41b6d179.js.map +0 -1
- package/dist/cjs/scheduler-store-65f0fbe5.js.map +0 -1
- package/dist/components/auth-store.js +0 -82
- package/dist/components/auth-store.js.map +0 -1
- package/dist/esm/add-circle-icon_18.entry.js.map +0 -1
- package/dist/esm/auth-store-69ac49c7.js +0 -82
- package/dist/esm/auth-store-69ac49c7.js.map +0 -1
- package/dist/esm/auth-store-f46d9222.js +0 -82
- package/dist/esm/auth-store-f46d9222.js.map +0 -1
- package/dist/esm/index-0583f8a8.js.map +0 -1
- package/dist/esm/index-bda1cba1.js.map +0 -1
- package/dist/esm/index.es-0a5de5bf.js.map +0 -1
- package/dist/esm/index.es-a9f78dad.js.map +0 -1
- package/dist/esm/mailbox-store-8a1c2d32.js.map +0 -1
- package/dist/esm/mailbox-store-e721b17c.js.map +0 -1
- package/dist/esm/nylas-if-state_3.entry.js +0 -405
- package/dist/esm/nylas-if-state_3.entry.js.map +0 -1
- package/dist/esm/scheduler-config-store-4d035001.js +0 -44
- package/dist/esm/scheduler-config-store-4d035001.js.map +0 -1
- package/dist/esm/scheduler-config-store-8f162729.js +0 -44
- package/dist/esm/scheduler-config-store-8f162729.js.map +0 -1
- package/dist/esm/scheduler-store-0fbe642c.js.map +0 -1
- package/dist/esm/scheduler-store-f2e72da4.js.map +0 -1
- package/dist/nylas-web-elements/auth-store-f46d9222.js +0 -82
- package/dist/nylas-web-elements/auth-store-f46d9222.js.map +0 -1
- package/dist/nylas-web-elements/index-bda1cba1.js.map +0 -1
- package/dist/nylas-web-elements/index.es-a9f78dad.js.map +0 -1
- package/dist/nylas-web-elements/mailbox-store-8a1c2d32.js.map +0 -1
- package/dist/nylas-web-elements/p-18c6ddfa.entry.js +0 -2
- package/dist/nylas-web-elements/p-1af51c6b.js +0 -2
- package/dist/nylas-web-elements/p-1af51c6b.js.map +0 -1
- package/dist/nylas-web-elements/p-1c3b651f.entry.js +0 -2
- package/dist/nylas-web-elements/p-1c3b651f.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-558faafb.entry.js +0 -2
- package/dist/nylas-web-elements/p-558faafb.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-5642190a.entry.js +0 -2
- package/dist/nylas-web-elements/p-5642190a.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-577ecdd4.entry.js +0 -2
- package/dist/nylas-web-elements/p-577ecdd4.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-578f4029.js +0 -2
- package/dist/nylas-web-elements/p-578f4029.js.map +0 -1
- package/dist/nylas-web-elements/p-5c72d9a4.js +0 -2
- package/dist/nylas-web-elements/p-5c72d9a4.js.map +0 -1
- package/dist/nylas-web-elements/p-5fd0eb1d.entry.js +0 -2
- package/dist/nylas-web-elements/p-64be0bab.js.map +0 -1
- package/dist/nylas-web-elements/p-6aa84fd8.entry.js +0 -2
- package/dist/nylas-web-elements/p-6c84f99e.entry.js +0 -2
- package/dist/nylas-web-elements/p-6c84f99e.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-80079122.entry.js +0 -2
- package/dist/nylas-web-elements/p-a30e3755.entry.js +0 -2
- package/dist/nylas-web-elements/p-afdac062.entry.js +0 -2
- package/dist/nylas-web-elements/p-afdac062.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-be3b6e3a.entry.js +0 -2
- package/dist/nylas-web-elements/p-be3b6e3a.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-cc6721a7.entry.js +0 -2
- package/dist/nylas-web-elements/p-ce89d941.js +0 -2
- package/dist/nylas-web-elements/p-e4b9d6af.js +0 -3
- package/dist/nylas-web-elements/p-e4ec4651.entry.js +0 -2
- package/dist/nylas-web-elements/p-e4ec4651.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-f442a2f9.entry.js +0 -2
- package/dist/nylas-web-elements/p-f78abda8.entry.js +0 -2
- package/dist/nylas-web-elements/p-f78abda8.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-f8056365.entry.js +0 -2
- package/dist/nylas-web-elements/p-fbe6262b.entry.js +0 -2
- package/dist/nylas-web-elements/p-fbe6262b.entry.js.map +0 -1
- package/dist/nylas-web-elements/scheduler-config-store-8f162729.js +0 -44
- package/dist/nylas-web-elements/scheduler-config-store-8f162729.js.map +0 -1
- package/dist/nylas-web-elements/scheduler-store-f2e72da4.js.map +0 -1
- /package/dist/nylas-web-elements/{p-5fd0eb1d.entry.js.map → p-01bf65c2.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-26b75895.entry.js.map → p-2523c292.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-0195d832.entry.js.map → p-395f49eb.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-9955e9b6.js.map → p-408dda49.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-31f12f3f.entry.js.map → p-409d4410.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-3105fc0a.entry.js.map → p-40ed7eab.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-412215d1.entry.js.map → p-41c1654e.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-a959a080.entry.js.map → p-42a4c2fd.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-68f47a72.entry.js.map → p-4d9fceeb.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-c0fac9fc.entry.js.map → p-64364434.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-67f20520.entry.js.map → p-7b1bb792.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-facc84f3.js.map → p-901f9612.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-e324add5.entry.js.map → p-9dac153b.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-6aa84fd8.entry.js.map → p-a0c2ce03.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-f8e59935.entry.js.map → p-a1e27dc5.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-18c6ddfa.entry.js.map → p-a3d5a1dd.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-5d875283.entry.js.map → p-ae01e1cb.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-b54b575a.entry.js.map → p-b2208193.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-02435888.entry.js.map → p-ba3d383f.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-f826c690.entry.js.map → p-baa620b4.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-f8056365.entry.js.map → p-bfdc148c.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-65b275df.js.map → p-cabb2e68.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-cc6721a7.entry.js.map → p-d92a0405.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-a30e3755.entry.js.map → p-de63bc35.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-22c0a883.entry.js.map → p-deafc6bc.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-f442a2f9.entry.js.map → p-f48d0571.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-80079122.entry.js.map → p-fbbca7a6.entry.js.map} +0 -0
package/dist/collection/components/scheduler/nylas-locale-switch/test/nylas-locale-switch.spec.js
CHANGED
|
@@ -8,16 +8,16 @@ describe('nylas-locale-switch', () => {
|
|
|
8
8
|
it('renders with default selected language and timezone', async () => {
|
|
9
9
|
const page = await newSpecPage({
|
|
10
10
|
components: [NylasLocaleSwitch, SelectDropdown],
|
|
11
|
-
html: `<nylas-locale-switch selected-language="English" selected-timezone="America /
|
|
11
|
+
html: `<nylas-locale-switch selected-language="English" selected-timezone="America / New York"></nylas-locale-switch>`,
|
|
12
12
|
});
|
|
13
13
|
expect(page.root).toMatchSnapshot();
|
|
14
14
|
expect(page.rootInstance.selectedLanguage).toBe('English');
|
|
15
|
-
expect(page.rootInstance.selectedTimezone).toBe('America /
|
|
15
|
+
expect(page.rootInstance.selectedTimezone).toBe('America / New York');
|
|
16
16
|
});
|
|
17
17
|
it('selects timezone', async () => {
|
|
18
18
|
const page = await newSpecPage({
|
|
19
19
|
components: [NylasLocaleSwitch, SelectDropdown],
|
|
20
|
-
html: `<nylas-locale-switch selected-timezone="America /
|
|
20
|
+
html: `<nylas-locale-switch selected-timezone="America / New York"></nylas-locale-switch>`,
|
|
21
21
|
});
|
|
22
22
|
const spyEvent = jest.fn();
|
|
23
23
|
page.win.addEventListener('timezoneChanged', spyEvent);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nylas-locale-switch.spec.js","sourceRoot":"","sources":["../../../../../src/components/scheduler/nylas-locale-switch/test/nylas-locale-switch.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,wDAAwD,CAAC;AAExF,QAAQ,CAAC,qBAAqB,EAAE,GAAG,EAAE;IACnC,UAAU,CAAC,GAAG,EAAE;QAEd,IAAI,CAAC,aAAa,EAAE,CAAC;IACvB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,qDAAqD,EAAE,KAAK,IAAI,EAAE;QACnE,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7B,UAAU,EAAE,CAAC,iBAAiB,EAAE,c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CAAC,CAAC;IAC1G,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,kBAAkB,EAAE,KAAK,IAAI,EAAE;QAChC,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7B,UAAU,EAAE,CAAC,iBAAiB,EAAE,cAAc,CAAC;YAC/C,IAAI,EAAE,6CAA6C;SACpD,CAAC,CAAC;QAEH,MAAM,QAAQ,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;QAC3B,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,iBAAiB,EAAE,QAAQ,CAAC,CAAC;QAEvD,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;QAE5B,MAAM,kBAAkB,GAAG,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,aAAa,CAAC,2BAA2B,CAA8B,CAAC;QAC3H,MAAM,4BAA4B,GAAG,kBAAkB,CAAC,UAAU,CAAC;QACnE,4BAA4B,EAAE,aAAa,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,CAAC;QAC/D,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;QAE5B,MAAM,MAAM,GAAG,4BAA4B,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC;QAGjE,MAAM,EAAE,KAAK,EAAE,CAAC;QAChB,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;QAE5B,MAAM,CAAC,4BAA4B,EAAE,aAAa,CAAC,QAAQ,CAAC,EAAE,WAAW,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACxG,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newSpecPage } from '@stencil/core/testing';\nimport { NylasLocaleSwitch } from '../nylas-locale-switch';\nimport { SelectDropdown } from '../../../design-system/select-dropdown/select-dropdown';\n\ndescribe('nylas-locale-switch', () => {\n beforeEach(() => {\n // Clear and reset the mock before each test if needed\n jest.clearAllMocks();\n });\n\n it('renders with default selected language and timezone', async () => {\n const page = await newSpecPage({\n components: [NylasLocaleSwitch, SelectDropdown],\n html: `<nylas-locale-switch selected-language=\"English\" selected-timezone=\"America /
|
|
1
|
+
{"version":3,"file":"nylas-locale-switch.spec.js","sourceRoot":"","sources":["../../../../../src/components/scheduler/nylas-locale-switch/test/nylas-locale-switch.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,wDAAwD,CAAC;AAExF,QAAQ,CAAC,qBAAqB,EAAE,GAAG,EAAE;IACnC,UAAU,CAAC,GAAG,EAAE;QAEd,IAAI,CAAC,aAAa,EAAE,CAAC;IACvB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,qDAAqD,EAAE,KAAK,IAAI,EAAE;QACnE,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7B,UAAU,EAAE,CAAC,iBAAiB,EAAE,cAAc,CAAC;YAC/C,IAAI,EAAE,gHAAgH;SACvH,CAAC,CAAC;QAEH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;QACpC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,gBAAgB,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC3D,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,gBAAgB,CAAC,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;IACxE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,kBAAkB,EAAE,KAAK,IAAI,EAAE;QAChC,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7B,UAAU,EAAE,CAAC,iBAAiB,EAAE,cAAc,CAAC;YAC/C,IAAI,EAAE,oFAAoF;SAC3F,CAAC,CAAC;QAEH,MAAM,QAAQ,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;QAC3B,IAAI,CAAC,GAAG,CAAC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K,EAAE,CAAC;QAC/D,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;QAE5B,MAAM,MAAM,GAAG,4BAA4B,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC;QAGjE,MAAM,EAAE,KAAK,EAAE,CAAC;QAChB,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;QAE5B,MAAM,CAAC,4BAA4B,EAAE,aAAa,CAAC,QAAQ,CAAC,EAAE,WAAW,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACxG,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newSpecPage } from '@stencil/core/testing';\nimport { NylasLocaleSwitch } from '../nylas-locale-switch';\nimport { SelectDropdown } from '../../../design-system/select-dropdown/select-dropdown';\n\ndescribe('nylas-locale-switch', () => {\n beforeEach(() => {\n // Clear and reset the mock before each test if needed\n jest.clearAllMocks();\n });\n\n it('renders with default selected language and timezone', async () => {\n const page = await newSpecPage({\n components: [NylasLocaleSwitch, SelectDropdown],\n html: `<nylas-locale-switch selected-language=\"English\" selected-timezone=\"America / New York\"></nylas-locale-switch>`,\n });\n\n expect(page.root).toMatchSnapshot();\n expect(page.rootInstance.selectedLanguage).toBe('English');\n expect(page.rootInstance.selectedTimezone).toBe('America / New York');\n });\n\n it('selects timezone', async () => {\n const page = await newSpecPage({\n components: [NylasLocaleSwitch, SelectDropdown],\n html: `<nylas-locale-switch selected-timezone=\"America / New York\"></nylas-locale-switch>`,\n });\n\n const spyEvent = jest.fn();\n page.win.addEventListener('timezoneChanged', spyEvent);\n\n await page.waitForChanges();\n\n const timezoneSelectDropdown = page?.root?.shadowRoot?.querySelector('.timezone select-dropdown') as HTMLSelectDropdownElement;\n const timezoneDropdownShadowRoot = timezoneSelectDropdown.shadowRoot;\n timezoneDropdownShadowRoot?.querySelector('button')?.click(); // Open the dropdown\n await page.waitForChanges();\n\n const option = timezoneDropdownShadowRoot?.querySelector('li'); // Select the first option\n\n // Simulate a click event on the first option\n option?.click();\n await page.waitForChanges();\n\n expect(option?.textContent).toContain(timezoneDropdownShadowRoot?.querySelector('button')?.textContent);\n });\n\n it('selects language', async () => {\n const page = await newSpecPage({\n components: [NylasLocaleSwitch, SelectDropdown],\n html: `<nylas-locale-switch></nylas-locale-switch>`,\n });\n\n const spyEvent = jest.fn();\n page.win.addEventListener('languageChanged', spyEvent);\n\n await page.waitForChanges();\n\n const langSelectDropdown = page?.root?.shadowRoot?.querySelector('.language select-dropdown') as HTMLSelectDropdownElement;\n const langSelectDropdownShadowRoot = langSelectDropdown.shadowRoot;\n langSelectDropdownShadowRoot?.querySelector('button')?.click(); // Open the dropdown\n await page.waitForChanges();\n\n const option = langSelectDropdownShadowRoot?.querySelector('li'); // Select the first option\n\n // Simulate a click event on the first option\n option?.click();\n await page.waitForChanges();\n\n expect(langSelectDropdownShadowRoot?.querySelector('button')?.textContent).toEqual(option?.innerHTML);\n });\n});\n"]}
|
|
@@ -47,7 +47,7 @@ export class NylasNotification {
|
|
|
47
47
|
this.notifications = this.notifications.filter(notif => notif.id !== id);
|
|
48
48
|
}
|
|
49
49
|
render() {
|
|
50
|
-
return (h(Host, { key: '
|
|
50
|
+
return (h(Host, { key: '947c58f3617a73e55731cc6f6c03c1931008d000' }, h(Fragment, { key: 'd84045b56a35c322a194e4bf4c9d3982a5ce6d32' }, this.notifications.map(notif => (h("div", { class: `notif ${notif.type}`, key: notif.id }, h("div", { class: "content" }, h("span", { class: `icon ${notif.type}` }, (notif.type === 'error' || notif.type === 'warning') && h("warning-icon", null)), h("span", { class: "message" }, h("span", { class: "title" }, notif.title), notif.description && h("span", { class: "description" }, notif.description))), h("button", { class: "dismiss-btn", onClick: () => this.dismissNotification(notif.id) }, h("close-icon", null))))), h("slot", { key: 'e246e847f46fe0d99370eb909cc89a3546186089' }))));
|
|
51
51
|
}
|
|
52
52
|
static get is() { return "nylas-notification"; }
|
|
53
53
|
static get encapsulation() { return "shadow"; }
|
|
@@ -144,6 +144,7 @@
|
|
|
144
144
|
.cancelled-event-page,
|
|
145
145
|
.cancel-flow-page {
|
|
146
146
|
min-width: 784px;
|
|
147
|
+
background: var(--nylas-base-50);
|
|
147
148
|
}
|
|
148
149
|
@media screen and (max-width: 768px) {
|
|
149
150
|
.booked-event-page,
|
|
@@ -159,17 +160,13 @@
|
|
|
159
160
|
height: 512px;
|
|
160
161
|
min-width: 384px;
|
|
161
162
|
border-top-left-radius: inherit;
|
|
163
|
+
background: var(--nylas-base-0);
|
|
162
164
|
}
|
|
163
165
|
@media screen and (max-width: 768px) {
|
|
164
166
|
.left-panel {
|
|
165
167
|
border-top-right-radius: inherit;
|
|
166
168
|
min-width: unset;
|
|
167
|
-
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
@media screen and (max-width: 768px) {
|
|
171
|
-
.additional-data-page .left-panel {
|
|
172
|
-
height: 325px;
|
|
169
|
+
height: auto;
|
|
173
170
|
}
|
|
174
171
|
}
|
|
175
172
|
|
|
@@ -206,13 +203,14 @@
|
|
|
206
203
|
border-top-right-radius: 0px;
|
|
207
204
|
width: inherit;
|
|
208
205
|
min-width: unset;
|
|
206
|
+
height: auto;
|
|
209
207
|
}
|
|
210
208
|
}
|
|
211
209
|
.right-panel h2 {
|
|
212
210
|
display: flex;
|
|
213
211
|
margin: 0;
|
|
214
212
|
height: 48px;
|
|
215
|
-
gap: 0.
|
|
213
|
+
gap: 0.5rem;
|
|
216
214
|
justify-content: center;
|
|
217
215
|
align-items: center;
|
|
218
216
|
width: auto;
|
|
@@ -235,7 +233,7 @@ nylas-selected-event-card {
|
|
|
235
233
|
}
|
|
236
234
|
@media screen and (max-width: 768px) {
|
|
237
235
|
nylas-selected-event-card {
|
|
238
|
-
height:
|
|
236
|
+
height: 250px;
|
|
239
237
|
}
|
|
240
238
|
}
|
|
241
239
|
|
|
@@ -248,6 +246,7 @@ nylas-selected-event-card {
|
|
|
248
246
|
font-weight: 300;
|
|
249
247
|
color: var(--nylas-base-500);
|
|
250
248
|
border-top: 1px solid var(--nylas-base-200);
|
|
249
|
+
min-height: 24px;
|
|
251
250
|
}
|
|
252
251
|
.footer svg {
|
|
253
252
|
fill: var(--nylas-base-500);
|
|
@@ -18,6 +18,7 @@ export class NylasScheduling {
|
|
|
18
18
|
this.rescheduleBookingId = undefined;
|
|
19
19
|
this.cancelBookingId = undefined;
|
|
20
20
|
this.configId = undefined;
|
|
21
|
+
this.nylasBranding = true;
|
|
21
22
|
this.eventOverrides = {};
|
|
22
23
|
this.isLoading = undefined;
|
|
23
24
|
this.themeConfig = undefined;
|
|
@@ -40,6 +41,7 @@ export class NylasScheduling {
|
|
|
40
41
|
this.stores = {
|
|
41
42
|
scheduler: CreateNylasSchedulerStore({
|
|
42
43
|
bookingInfo: this.bookingInfo,
|
|
44
|
+
nylasBranding: this.nylasBranding,
|
|
43
45
|
...this.defaultSchedulerState,
|
|
44
46
|
}),
|
|
45
47
|
};
|
|
@@ -202,22 +204,23 @@ export class NylasScheduling {
|
|
|
202
204
|
const cancelBookingId = nylasSchedulerStore?.get('cancelBookingId') || this.cancelBookingId;
|
|
203
205
|
const selectedTimeslot = nylasSchedulerStore?.get('selectedTimeslot');
|
|
204
206
|
const rescheduleBookingId = nylasSchedulerStore?.get('rescheduleBookingId') || this.rescheduleBookingId;
|
|
207
|
+
const nylasBranding = nylasSchedulerStore?.get('nylasBranding') || this.nylasBranding;
|
|
205
208
|
if (showDefaultScheduler && cancelBookingId && !cancelledEventInfo) {
|
|
206
|
-
return (h(Host, null, h(SchedulerView, { isLoading: this.isLoading, showNotification: this.showNotification }, h("div", { class: "cancel-flow-page", part: "cancel-flow-page" }, h("nylas-cancel-booking-form", { cancelBookingId: cancelBookingId, exportparts: "ncbf, ncbf__input-textfield, ncbf__button-cta, ncbf__button-outline, ncbf__input-label" })))));
|
|
209
|
+
return (h(Host, null, h(SchedulerView, { nylasBranding: nylasBranding, isLoading: this.isLoading, showNotification: this.showNotification }, h("div", { class: "cancel-flow-page", part: "cancel-flow-page" }, h("nylas-cancel-booking-form", { cancelBookingId: cancelBookingId, exportparts: "ncbf, ncbf__input-textfield, ncbf__button-cta, ncbf__button-outline, ncbf__input-label" })))));
|
|
207
210
|
}
|
|
208
211
|
if (showDefaultScheduler && cancelledEventInfo) {
|
|
209
|
-
return (h(Host, null, h(SchedulerView, { isLoading: this.isLoading, showNotification: this.showNotification }, h("div", { class: "cancelled-event-page", part: "cancelled-event-page" }, h("nylas-cancelled-event-card", { cancelledEventInfo: cancelledEventInfo, exportparts: "ncec, ncec__icon, ncec__title, ncec__description, ncec__button-outline, ncec__card" })))));
|
|
212
|
+
return (h(Host, null, h(SchedulerView, { nylasBranding: nylasBranding, isLoading: this.isLoading, showNotification: this.showNotification }, h("div", { class: "cancelled-event-page", part: "cancelled-event-page" }, h("nylas-cancelled-event-card", { cancelledEventInfo: cancelledEventInfo, exportparts: "ncec, ncec__icon, ncec__title, ncec__description, ncec__button-outline, ncec__card" })))));
|
|
210
213
|
}
|
|
211
214
|
if (showDefaultScheduler && eventInfo) {
|
|
212
|
-
return (h(Host, null, h(SchedulerView, { isLoading: this.isLoading, showNotification: this.showNotification }, h("div", { class: "booked-event-page", part: "booked-event-page" }, h("nylas-booked-event-card", { selectedTimeslot: selectedTimeslot, eventInfo: eventInfo, exportparts: "nbec, nbec__title, nbec__card, nbec__description, nbec__button-outline, nbec__cancel-cta, nbec__reschedule-cta" })))));
|
|
215
|
+
return (h(Host, null, h(SchedulerView, { nylasBranding: nylasBranding, isLoading: this.isLoading, showNotification: this.showNotification }, h("div", { class: "booked-event-page", part: "booked-event-page" }, h("nylas-booked-event-card", { selectedTimeslot: selectedTimeslot, eventInfo: eventInfo, exportparts: "nbec, nbec__title, nbec__card, nbec__description, nbec__button-outline, nbec__cancel-cta, nbec__reschedule-cta" })))));
|
|
213
216
|
}
|
|
214
217
|
if (showDefaultScheduler && (!eventInfo || !!rescheduleBookingId) && !showBookingForm) {
|
|
215
218
|
const timeslotPickerCTALabel = this.host.querySelector('[slot="timeslot-picker-cta-label"]');
|
|
216
|
-
return (h(Host, null, h(SchedulerView, { isLoading: this.isLoading, showNotification: this.showNotification }, rescheduleBookingId && h(MessageBanner, null, "Choose another time slot to reschedule your meeting"), h("div", { class: "select-date-page", part: "select-date-page" }, h("div", { class: "left-panel" }, h("nylas-date-picker", { exportparts: "ndp, ndp__month-header, ndp__month-button, ndp__day, ndp__date, ndp__date--selected, ndp__date--current-day, ndp__date--current-month" }), h("div", { class: "border" }), h("nylas-locale-switch", null)), h("div", { class: "right-panel" }, h("h2", null, h("calendar-icon", null), h("span", { id: "selectedDate" }, this.selectedDateLabel)), h("nylas-timeslot-picker", { exportparts: "ntp, ntp__timeslot, ntp__timeslot--selected, ntp__button-primary" }, timeslotPickerCTALabel && (h("span", { slot: "timeslot-picker-cta-label" }, h("slot", { name: "timeslot-picker-cta-label" })))))))));
|
|
219
|
+
return (h(Host, null, h(SchedulerView, { nylasBranding: nylasBranding, isLoading: this.isLoading, showNotification: this.showNotification }, rescheduleBookingId && h(MessageBanner, null, "Choose another time slot to reschedule your meeting"), h("div", { class: "select-date-page", part: "select-date-page" }, h("div", { class: "left-panel" }, h("nylas-date-picker", { exportparts: "ndp, ndp__month-header, ndp__month-button, ndp__day, ndp__date, ndp__date--selected, ndp__date--current-day, ndp__date--current-month" }), h("div", { class: "border" }), h("nylas-locale-switch", null)), h("div", { class: "right-panel" }, h("h2", null, h("calendar-icon", null), h("span", { id: "selectedDate" }, this.selectedDateLabel)), h("nylas-timeslot-picker", { exportparts: "ntp, ntp__timeslot, ntp__timeslot--selected, ntp__button-primary" }, timeslotPickerCTALabel && (h("span", { slot: "timeslot-picker-cta-label" }, h("slot", { name: "timeslot-picker-cta-label" })))))))));
|
|
217
220
|
}
|
|
218
221
|
if (showDefaultScheduler && !eventInfo && showBookingForm) {
|
|
219
222
|
const customTemplateSlot = this.host.querySelector('[slot="custom-booking-form"]');
|
|
220
|
-
return (h(Host, null, h(SchedulerView, { isLoading: this.isLoading, showNotification: this.showNotification }, rescheduleBookingId && h(MessageBanner, null, "Choose another time slot to reschedule your meeting"), h("div", { class: "additional-data-page", part: "additional-data-page" }, h("div", { class: "left-panel" }, h("div", { class: "wrapper" }, h("nylas-selected-event-card", { exportparts: "nsec, nsec__card, nsec__icon, nsec__date, nsec__time" }))), h("div", { class: "right-panel" }, h("nylas-booking-form", { exportparts: "nbf, nbf__input-label, nbf__input-textfield, nbf__button-ghost, nbf__button-primary, nbf__button-outline" }, customTemplateSlot && (h("div", { slot: "custom-booking-form" }, h("slot", { name: "custom-booking-form" })))))))));
|
|
223
|
+
return (h(Host, null, h(SchedulerView, { nylasBranding: nylasBranding, isLoading: this.isLoading, showNotification: this.showNotification }, rescheduleBookingId && h(MessageBanner, null, "Choose another time slot to reschedule your meeting"), h("div", { class: "additional-data-page", part: "additional-data-page" }, h("div", { class: "left-panel" }, h("div", { class: "wrapper" }, h("nylas-selected-event-card", { exportparts: "nsec, nsec__card, nsec__icon, nsec__date, nsec__time" }))), h("div", { class: "right-panel" }, h("nylas-booking-form", { exportparts: "nbf, nbf__input-label, nbf__input-textfield, nbf__button-ghost, nbf__button-primary, nbf__button-outline" }, customTemplateSlot && (h("div", { slot: "custom-booking-form" }, h("slot", { name: "custom-booking-form" })))))))));
|
|
221
224
|
}
|
|
222
225
|
return (h(Host, null, h("slot", null)));
|
|
223
226
|
}
|
|
@@ -258,7 +261,7 @@ export class NylasScheduling {
|
|
|
258
261
|
"mutable": false,
|
|
259
262
|
"complexType": {
|
|
260
263
|
"original": "Partial<NylasSchedulerStoreState>",
|
|
261
|
-
"resolved": "undefined | { selectedDate?: Date | null | undefined; selectedLanguage?: string | undefined; selectedTimezone?: string | undefined; selectedTimeslot?: Timeslot | null | undefined; showBookingForm?: boolean | undefined; selectableDates?: Date[] | null | undefined; availability?: AvailabilityTimeslot[] | undefined; state?: DataState | undefined; eventInfo?: NylasEvent | null | undefined; cancelledEventInfo?: Partial<NylasEvent> | null | undefined; bookingInfo?: NylasSchedulerBookingData | undefined; rescheduleBookingId?: string | undefined; cancelBookingId?: string | undefined; isLoading?: boolean | undefined; }",
|
|
264
|
+
"resolved": "undefined | { selectedDate?: Date | null | undefined; selectedLanguage?: string | undefined; selectedTimezone?: string | undefined; selectedTimeslot?: Timeslot | null | undefined; showBookingForm?: boolean | undefined; selectableDates?: Date[] | null | undefined; availability?: AvailabilityTimeslot[] | undefined; state?: DataState | undefined; eventInfo?: NylasEvent | null | undefined; cancelledEventInfo?: Partial<NylasEvent> | null | undefined; bookingInfo?: NylasSchedulerBookingData | undefined; rescheduleBookingId?: string | undefined; cancelBookingId?: string | undefined; isLoading?: boolean | undefined; nylasBranding?: boolean | undefined; }",
|
|
262
265
|
"references": {
|
|
263
266
|
"Partial": {
|
|
264
267
|
"location": "global",
|
|
@@ -385,6 +388,24 @@ export class NylasScheduling {
|
|
|
385
388
|
"attribute": "config-id",
|
|
386
389
|
"reflect": false
|
|
387
390
|
},
|
|
391
|
+
"nylasBranding": {
|
|
392
|
+
"type": "boolean",
|
|
393
|
+
"mutable": false,
|
|
394
|
+
"complexType": {
|
|
395
|
+
"original": "boolean",
|
|
396
|
+
"resolved": "boolean | undefined",
|
|
397
|
+
"references": {}
|
|
398
|
+
},
|
|
399
|
+
"required": false,
|
|
400
|
+
"optional": true,
|
|
401
|
+
"docs": {
|
|
402
|
+
"tags": [],
|
|
403
|
+
"text": "This prop lets you hide the Nylas branding.\nDefault is true."
|
|
404
|
+
},
|
|
405
|
+
"attribute": "nylas-branding",
|
|
406
|
+
"reflect": false,
|
|
407
|
+
"defaultValue": "true"
|
|
408
|
+
},
|
|
388
409
|
"eventOverrides": {
|
|
389
410
|
"type": "unknown",
|
|
390
411
|
"mutable": false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nylas-scheduling.js","sourceRoot":"","sources":["../../../../src/components/scheduler/nylas-scheduler/nylas-scheduling.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,C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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { NylasBaseProvider } from '@/common/abstract-provider';\nimport { RegisteredComponent } from '@/common/register-component';\nimport type { SchedulerEventOverride } from '@/common/component-types';\nimport { NylasSchedulerConnector } from '@/connector/nylas-scheduler-connector';\nimport { CreateNylasSchedulerStore, NylasSchedulerStoreState, NylasSchedulerStoreType } from '@/stores/scheduler-store';\nimport { NylasSchedulerBookingData, ThemeConfig, Notification, NotificationType, NylasSchedulerErrorResponse, Timeslot } from '@nylas/core';\nimport { Component, Element, Event, EventEmitter, Host, Listen, Method, Prop, State, Watch, h } from '@stencil/core';\nimport { debug } from '@/utils/utils';\nimport { SchedulerView } from './scheduler-view';\nimport { ErrorCategory } from '@/connector/nylas-scheduler-connector/errors';\nimport { MessageBanner } from './message-banner';\n\nconst genericError = { title: 'Something went wrong...', type: NotificationType.Error, category: ErrorCategory.Component };\n\n/**\n * The `nylas-scheduling` component is used to display the Nylas Scheduling UI.\n *\n * @slot custom-booking-form - This slot is used to pass a custom booking form to the Nylas Scheduling component.\n * @slot timeslot-picker-cta-label - This slot is used to pass a custom label to the timeslot picker CTA. The default label is \"Next\".\n *\n * @part ndp - [nylas-date-picker] The date picker host.\n * @part ndp__month-header - [nylas-date-picker] The month header.\n * @part ndp__month-button - [nylas-date-picker] The month button.\n * @part ndp__day - [nylas-date-picker] The day.\n * @part ndp__date - [nylas-date-picker] The date.\n * @part ndp__date--selected - [nylas-date-picker] The selected date.\n * @part ndp__date--current-day - [nylas-date-picker] The current day.\n * @part ndp__date--current-month - [nylas-date-picker] The dates in the current month.\n * @part ntp - [nylas-timeslot-picker] The timeslot picker component.\n * @part ntp__timeslot - [nylas-timeslot-picker] The timeslot button.\n * @part ntp__timeslot--selected - [nylas-timeslot-picker] The selected timeslot button.\n * @part ntp__button-primary - [nylas-timeslot-picker] The timeslot picker CTA.\n * @part nsec - [nylas-selected-event-card] The selected event card component.\n * @part nsec__card - [nylas-selected-event-card] The card component.\n * @part nsec__icon - [nylas-selected-event-card] The calendar icon.\n * @part nsec__date - [nylas-selected-event-card] The date selected.\n * @part nsec__time - [nylas-selected-event-card] The timeslot selected.\n * @part nbf - [nylas-booking-form] The booking form host.\n * @part nbf__input-label - [nylas-booking-form] The input label.\n * @part nbf__input-textfield - [nylas-booking-form] The input textfield.\n * @part nbf__button-ghost - [nylas-booking-form] The ghost button for adding guests.\n * @part nbf__button-primary - [nylas-booking-form] The primary button for booking.\n * @part nbf__button-outline - [nylas-booking-form] The outline button for canceling.\n * @part ncec - [nylas-cancelled-event-card] The cancelled event card host.\n * @part ncec__icon - [nylas-cancelled-event-card] The calendar icon.\n * @part ncec__title - [nylas-cancelled-event-card] The title of the cancelled event card.\n * @part ncec__description - [nylas-cancelled-event-card] The description of the cancelled event card.\n * @part ncec__button-outline - [nylas-cancelled-event-card] The close button CTA.\n * @part ncec__card - [nylas-cancelled-event-card] The cancelled event card.\n * @part nbec - [nylas-booked-event-card] The booked event card host.\n * @part nbec__card - [nylas-booked-event-card] The booked event card.\n * @part nbec__title - [nylas-booked-event-card] The title of the booked event card.\n * @part nbec__description - [nylas-booked-event-card] The description of the booked event card.\n * @part nbec__button-outline - [nylas-booked-event-card] The cancel & reschedule button CTA.\n * @part nbec__cancel-cta - [nylas-booked-event-card] The cancel button CTA.\n * @part nbec__reschedule-cta - [nylas-booked-event-card] The reschedule button CTA.\n */\n@Component({\n tag: 'nylas-scheduling',\n styleUrl: 'nylas-scheduling.scss',\n shadow: true,\n})\nexport class NylasScheduling {\n /**\n * Stores to be used by the provider.\n */\n private stores?: { scheduler: NylasSchedulerStoreType };\n\n /**\n * This is a base provide that defines the common methods and properties\n * that all providers should have.\n *\n * Because stencil does not support abstract classes, we have to use a\n * property to store the base provider instance.\n */\n private baseProvider?: NylasBaseProvider<Exclude<typeof this.stores, undefined>>;\n\n /**\n * The Nylas Scheduler Connector instance.\n * The branins of the provider. It manages data fetching and state synchronization.\n */\n private nylasSchedulerConnector?: NylasSchedulerConnector;\n\n /**\n * The host element.\n * Used to manage the host element of the provider.\n */\n @Element() private host!: HTMLNylasSchedulingElement;\n\n /**\n * This is used to set the mode for the Nylas Scheduler.\n * The mode can be either `app` or `composable`. The default mode is `app`.\n * - `app`: This mode is used to show the default Nylas Scheduler UI.\n * - `composable`: This mode is used to show the composable Nylas Scheduler UI\n * by passing the individual scheduler components as children.\n */\n @Prop() readonly mode: 'app' | 'composable' = 'app';\n\n /**\n * The default scheduler store state.\n * Used to set the initial state of the scheduler store.\n */\n @Prop({ attribute: 'default-scheduler-store-state' }) readonly defaultSchedulerState?: Partial<NylasSchedulerStoreState>;\n\n /**\n * The session ID for the Nylas Scheduler.\n * This is used to authenticate the user.\n */\n @Prop() readonly sessionId?: string;\n\n /**\n * The URL for the Nylas Scheduler API. (staging or production URL)\n */\n @Prop() readonly schedulerApiUrl: string = 'https://api.us.nylas.com';\n\n /**\n * This enables passing the bookingInfo object to the Scheduler UI for direct booking event creation.\n * When used with timeslotConfirmedHandler, it bypasses the additional data page and immediately\n * invokes the handler after booking.\n */\n @Prop() readonly bookingInfo?: NylasSchedulerBookingData;\n\n /**\n * Booking Id required for rescheduling flow.\n */\n @Prop() readonly rescheduleBookingId?: string;\n\n /**\n * Booking Id required for cancelling flow.\n */\n @Prop() readonly cancelBookingId?: string;\n\n /**\n * The config ID for the Nylas Scheduler. This should be passed in when using a public config,\n * in which case the sessionId is not required.\n */\n @Prop() readonly configId?: string;\n\n /**\n * This provides an easy way to override the default function of the event emitter.\n * An example of this is the `timeslotConfirmed` event. By default, this event will set the scheduler store state for `showBookingForm` to `true` which will\n * show the booking form. However, if you want to override this behavior, you can pass in the prop `eventOverride` like:\n * ```html\n * <nylas-scheduling eventOverride={{\"timeslotConfirmed\": (event, nylasConnector) => { console.log(\"Timeslot confirmed event fired!\"); } }} />\n * ```\n */\n @Prop({ attribute: 'event-overrides' }) readonly eventOverrides: SchedulerEventOverride = {};\n\n /**\n * The loading state. This is used to set the loading state for the Nylas Scheduler when fetching data.\n */\n @Prop() readonly isLoading?: boolean;\n\n /**\n * Theme config, used to automatically generate a theme with color palette and\n * CSS variables to customize the look and feel of the Nylas Scheduler.\n */\n @Prop() readonly themeConfig?: ThemeConfig;\n\n /*\n * Displays notifications for errors by default. When enabled (`true`), errors\n * automatically appear as notifications. Disabling this feature (`false`) allows\n * the parent application to capture and manage errors by listening to the\n * `nylasSchedulerError` event, providing flexibility in error handling.\n */\n @Prop() readonly showNotification?: boolean = true;\n\n /**\n * Automatically register components that have the `@RegisterComponent` decorator.\n * If this is set to false, you will need to manually register components using the\n * `registerComponent` method.\n * @default true\n */\n @State() automaticComponentRegistration: boolean = true;\n\n /**\n * The selected date label for the Nylas Scheduler.\n * This is used to set the initial date label for the Nylas Scheduler.\n */\n @State() selectedDateLabel: string = new Date().toLocaleDateString(undefined, { dateStyle: 'full' }) || 'No date selected';\n\n /**\n * This event is fired when the provider is initialized.\n * It can be used to set the initial state of the provider,\n * or to prevent the provider from firing some default behavior.\n */\n @Event({ cancelable: true }) init!: EventEmitter<HTMLNylasSchedulingElement>;\n\n /**\n * This event is fired when the scheduler component enters componentWillLoad lifecycle.\n */\n @Event() schedulerWillLoad!: EventEmitter<HTMLNylasSchedulingElement>;\n\n /**\n * This event is fired when the scheduler component enters componentDidLoad lifecycle.\n */\n @Event() schedulerDidLoad!: EventEmitter<HTMLNylasSchedulingElement>;\n\n @Event({\n eventName: 'nylasSchedulerError',\n })\n nylasSchedulerError!: EventEmitter<Notification>;\n\n /**\n * This function is called when the component is connected to the DOM.\n * At this point in the component lifecycle, the base provider has not yet\n * been initialized. So avoid using the base provider in this method or stores\n * in this method.\n */\n connectedCallback() {\n debug(`[nylas-scheduler] connectedCallback`);\n }\n\n async componentWillLoad() {\n debug(`[nylas-scheduler] Component will load`);\n\n // Emit the schedulerWillLoad event to allow the parent application to set the initial\n // state of the provider or to prevent the provider from firing some default behavior.\n const schedulerWillLoadEvent = this.schedulerWillLoad.emit(this.host);\n if (schedulerWillLoadEvent.defaultPrevented) {\n return;\n }\n\n if (!this.checkIfSessionIdOrConfigIdExists()) {\n return;\n }\n\n this.stores = {\n scheduler: CreateNylasSchedulerStore({\n bookingInfo: this.bookingInfo,\n ...this.defaultSchedulerState,\n }),\n };\n\n this.baseProvider = new NylasBaseProvider(this.host, this.stores, this.automaticComponentRegistration, this.eventOverrides);\n\n const nylasSchedulerStore = this.baseProvider?.getStore('scheduler');\n this.nylasSchedulerConnector = new NylasSchedulerConnector({\n schedulerAPIURL: this.schedulerApiUrl,\n sessionId: this.sessionId,\n configId: this.configId,\n nylasSchedulerStore,\n });\n this.init.emit(this.host);\n\n this.baseProvider?.componentWillLoad(this.nylasSchedulerConnector);\n // Override theme\n if (this.themeConfig) {\n for (const [key, value] of Object.entries(this.themeConfig)) {\n this.host.style.setProperty(`${key}`, value);\n }\n }\n }\n\n async componentDidLoad() {\n this.baseProvider?.componentDidLoad();\n\n // If sessionId is not provided, do not fetch availability\n if (!this.checkIfSessionIdOrConfigIdExists()) {\n return;\n }\n\n const nylasSchedulerStore = this.baseProvider?.getStore('scheduler');\n\n const selectedTimeslot = nylasSchedulerStore?.get('selectedTimeslot');\n\n if (selectedTimeslot && selectedTimeslot?.start_time) {\n if (!this.isTimeslotValid(selectedTimeslot)) {\n return;\n }\n\n // If the selected timeslot is already set, do not fetch availability\n if (nylasSchedulerStore?.get('showBookingForm')) {\n nylasSchedulerStore?.set('selectedDate', selectedTimeslot.start_time);\n return;\n }\n }\n\n const selectedDate = nylasSchedulerStore?.get('selectedDate');\n const availability = nylasSchedulerStore?.get('availability');\n let result;\n\n if (availability && availability.length > 0) {\n return;\n }\n\n if (!selectedDate) {\n result = await this.nylasSchedulerConnector?.scheduler.getAvailability();\n } else {\n const startTime = new Date(selectedDate.getFullYear(), selectedDate.getMonth(), 1).getTime() / 1000;\n const endTime = new Date(selectedDate.getFullYear(), selectedDate.getMonth() + 1, 1).getTime() / 1000;\n result = await this.nylasSchedulerConnector?.scheduler.getAvailability(startTime, endTime);\n }\n\n if (!result || 'error' in result) {\n this.nylasSchedulerError.emit({ ...this.getErrorObject(result?.error) });\n }\n\n if (!selectedDate) {\n let _selectedDate = new Date();\n const firstAvailableDate = nylasSchedulerStore?.get('availability').find((timeslot: any) => new Date(timeslot.start_time) > new Date());\n if (firstAvailableDate) {\n _selectedDate = firstAvailableDate.start_time;\n }\n nylasSchedulerStore?.set('selectedDate', _selectedDate);\n }\n }\n\n componentDisconnected() {\n this.baseProvider?.componentDisconnected();\n }\n\n @Watch('bookingInfo')\n bookingInfoChanged(newVal?: NylasSchedulerBookingData) {\n this.stores?.scheduler.set('bookingInfo', newVal);\n }\n\n /**\n * This is a custom event handler that is used to register a component with the provider.\n * It is used by components that have the `@RegisterComponent` decorator.\n * @param event A custom event that contains the component to register\n * @returns Promise<void>\n */\n @Listen('registerComponent')\n async registerComponentHandler(event: CustomEvent<RegisteredComponent<any, any>>): Promise<void> {\n this.baseProvider?.registerComponent(event.detail);\n }\n\n /**\n * This is a custom event handler that is used to unregister a component with the provider.\n * It is used by components that have the `@RegisterComponent` decorator.\n * @param event A custom event that contains the component to unregister\n * @returns Promise<void>\n */\n @Listen('unregisterComponent')\n async unregisterComponentHandler(event: CustomEvent<RegisteredComponent<any, any>>): Promise<void> {\n this.baseProvider?.unregisterComponent(event.detail);\n }\n\n /**\n * This is a custom event handler that is used to refetch the availability when the month is changed.\n */\n @Listen('monthChanged')\n async monthChangedHandler(event: CustomEvent<Date>) {\n const date = event.detail;\n const startTime = new Date(date.getFullYear(), date.getMonth(), 1).getTime() / 1000;\n const endTime = new Date(date.getFullYear(), date.getMonth() + 1, 1).getTime() / 1000;\n\n const result = await this.nylasSchedulerConnector?.scheduler.getAvailability(startTime, endTime);\n\n if (!result || 'error' in result) {\n this.nylasSchedulerError.emit({ ...this.getErrorObject(result?.error) });\n }\n }\n\n /**\n * This is a custom event handler to book an event.\n */\n @Listen('detailsConfirmed')\n async bookButtonClickedHandler(event: CustomEvent<NylasSchedulerBookingData>) {\n if (this.rescheduleBookingId) {\n const result = await this.nylasSchedulerConnector?.scheduler.rescheduleBooking(this.rescheduleBookingId, event.detail);\n if (!result || 'error' in result) {\n this.nylasSchedulerError.emit({ ...this.getErrorObject(result?.error) });\n }\n return;\n }\n const result = await this.nylasSchedulerConnector?.scheduler.bookTimeslot(event.detail);\n if (!result || 'error' in result) {\n this.nylasSchedulerError.emit({ ...this.getErrorObject(result?.error) });\n }\n }\n\n /**\n * This is a custom event handler to update the selected date label.\n */\n @Listen('dateSelected')\n dateSelectedHandler(event: CustomEvent<Date>) {\n const date = event.detail;\n this.selectedDateLabel = date ? date.toLocaleDateString(undefined, { dateStyle: 'full' }) : 'No date selected';\n }\n\n /**\n * This is an event handler to handle the error (if any) when the\n * cancel booking button is clicked on the cancel booking form.\n */\n @Listen('cancelBookedEventError')\n cancelBookedEventErrorHandler(event: CustomEvent<NylasSchedulerErrorResponse>) {\n this.nylasSchedulerError.emit({ ...this.getErrorObject(event.detail.error) });\n }\n\n /**\n * This is an event handler to handle the error (if any) when the\n * reschedule button is clicked on the booked event card.\n */\n @Listen('rescheduleBookedEventError')\n rescheduleBookedEventErrorHandler(event: CustomEvent<NylasSchedulerErrorResponse>) {\n this.nylasSchedulerError.emit({ ...this.getErrorObject(event.detail.error) });\n }\n\n /**\n * This method is used to retrieve the NylasScheduler instance\n * @returns The NylasScheduler instance\n */\n @Method()\n async getNylasSchedulerStore(): Promise<NylasSchedulerStoreType | undefined> {\n return this.baseProvider?.getStore('scheduler');\n }\n\n /**\n * This method is used to retrieve the NylasConnector instance\n * @returns The NylasConnector instance\n */\n @Method()\n async getNylasSchedulerConnector() {\n return this.nylasSchedulerConnector;\n }\n\n @Method()\n async getRef() {\n return this.host;\n }\n\n private getErrorObject(error: NylasSchedulerErrorResponse['error']): Notification {\n return {\n title: error?.title || genericError.title,\n category: error?.category || genericError.category,\n type: NotificationType.Error,\n description: error?.message || '',\n id: new Date().getTime().toString(),\n ttl: 'none',\n };\n }\n\n private checkIfSessionIdOrConfigIdExists(): boolean {\n if (!this.sessionId && !this.configId) {\n this.nylasSchedulerError.emit({\n title: 'No sessionId!',\n category: ErrorCategory.Component,\n type: NotificationType.Error,\n description: 'Session ID is required',\n id: new Date().getTime().toString(),\n ttl: 'none',\n });\n return false;\n }\n return true;\n }\n\n private isTimeslotValid(timeslot: Timeslot): boolean {\n const selectedDate = new Date(timeslot.start_time);\n if (selectedDate < new Date()) {\n this.nylasSchedulerError.emit({\n title: 'Invalid tiemslot!',\n category: ErrorCategory.Component,\n type: NotificationType.Error,\n description: 'The selected timeslot is invalid.',\n id: new Date().getTime().toString(),\n ttl: 'none',\n });\n return false;\n }\n return true;\n }\n\n render() {\n const showDefaultScheduler = this.mode === 'app';\n const nylasSchedulerStore = this.baseProvider?.getStore('scheduler');\n const eventInfo = nylasSchedulerStore?.get('eventInfo');\n const showBookingForm = nylasSchedulerStore?.get('showBookingForm');\n const cancelledEventInfo = nylasSchedulerStore?.get('cancelledEventInfo');\n const cancelBookingId = nylasSchedulerStore?.get('cancelBookingId') || this.cancelBookingId;\n const selectedTimeslot = nylasSchedulerStore?.get('selectedTimeslot') as Timeslot;\n const rescheduleBookingId = nylasSchedulerStore?.get('rescheduleBookingId') || this.rescheduleBookingId;\n\n if (showDefaultScheduler && cancelBookingId && !cancelledEventInfo) {\n return (\n <Host>\n <SchedulerView isLoading={this.isLoading} showNotification={this.showNotification}>\n <div class=\"cancel-flow-page\" part=\"cancel-flow-page\">\n <nylas-cancel-booking-form cancelBookingId={cancelBookingId} exportparts=\"ncbf, ncbf__input-textfield, ncbf__button-cta, ncbf__button-outline, ncbf__input-label\" />\n </div>\n </SchedulerView>\n </Host>\n );\n }\n\n // Cancelled event card is shown when the event is cancelled\n if (showDefaultScheduler && cancelledEventInfo) {\n return (\n <Host>\n <SchedulerView isLoading={this.isLoading} showNotification={this.showNotification}>\n <div class=\"cancelled-event-page\" part=\"cancelled-event-page\">\n <nylas-cancelled-event-card\n cancelledEventInfo={cancelledEventInfo}\n exportparts=\"ncec, ncec__icon, ncec__title, ncec__description, ncec__button-outline, ncec__card\"\n />\n </div>\n </SchedulerView>\n </Host>\n );\n }\n // Booked event card is shown when the event is booked\n if (showDefaultScheduler && eventInfo) {\n return (\n <Host>\n <SchedulerView isLoading={this.isLoading} showNotification={this.showNotification}>\n <div class=\"booked-event-page\" part=\"booked-event-page\">\n <nylas-booked-event-card\n selectedTimeslot={selectedTimeslot}\n eventInfo={eventInfo}\n exportparts=\"nbec, nbec__title, nbec__card, nbec__description, nbec__button-outline, nbec__cancel-cta, nbec__reschedule-cta\"\n />\n </div>\n </SchedulerView>\n </Host>\n );\n }\n // Date and time picker is shown when the event is not booked and no additional data is shown\n if (showDefaultScheduler && (!eventInfo || !!rescheduleBookingId) && !showBookingForm) {\n const timeslotPickerCTALabel = this.host.querySelector('[slot=\"timeslot-picker-cta-label\"]');\n return (\n <Host>\n <SchedulerView isLoading={this.isLoading} showNotification={this.showNotification}>\n {rescheduleBookingId && <MessageBanner>Choose another time slot to reschedule your meeting</MessageBanner>}\n <div class=\"select-date-page\" part=\"select-date-page\">\n <div class=\"left-panel\">\n <nylas-date-picker exportparts=\"ndp, ndp__month-header, ndp__month-button, ndp__day, ndp__date, ndp__date--selected, ndp__date--current-day, ndp__date--current-month\"></nylas-date-picker>\n <div class=\"border\"></div>\n <nylas-locale-switch></nylas-locale-switch>\n </div>\n <div class=\"right-panel\">\n <h2>\n <calendar-icon></calendar-icon>\n <span id=\"selectedDate\">{this.selectedDateLabel}</span>\n </h2>\n <nylas-timeslot-picker exportparts=\"ntp, ntp__timeslot, ntp__timeslot--selected, ntp__button-primary\">\n {timeslotPickerCTALabel && (\n <span slot=\"timeslot-picker-cta-label\">\n <slot name=\"timeslot-picker-cta-label\"></slot>\n </span>\n )}\n </nylas-timeslot-picker>\n </div>\n </div>\n </SchedulerView>\n </Host>\n );\n }\n // Additional data is shown when the time is selected, event is not booked and additional data is shown\n if (showDefaultScheduler && !eventInfo && showBookingForm) {\n // Check if a \"custom-booking-form\" slot is provided\n const customTemplateSlot = this.host.querySelector('[slot=\"custom-booking-form\"]');\n\n return (\n <Host>\n <SchedulerView isLoading={this.isLoading} showNotification={this.showNotification}>\n {rescheduleBookingId && <MessageBanner>Choose another time slot to reschedule your meeting</MessageBanner>}\n <div class=\"additional-data-page\" part=\"additional-data-page\">\n <div class=\"left-panel\">\n <div class=\"wrapper\">\n <nylas-selected-event-card exportparts=\"nsec, nsec__card, nsec__icon, nsec__date, nsec__time\"></nylas-selected-event-card>\n </div>\n </div>\n <div class=\"right-panel\">\n <nylas-booking-form exportparts=\"nbf, nbf__input-label, nbf__input-textfield, nbf__button-ghost, nbf__button-primary, nbf__button-outline\">\n {customTemplateSlot && (\n <div slot=\"custom-booking-form\">\n <slot name=\"custom-booking-form\"></slot>\n </div>\n )}\n </nylas-booking-form>\n </div>\n </div>\n </SchedulerView>\n </Host>\n );\n }\n\n return (\n <Host>\n <slot />\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"nylas-scheduling.js","sourceRoot":"","sources":["../../../../src/components/scheduler/nylas-scheduler/nylas-scheduling.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAG/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,yBAAyB,EAAqD,MAAM,0BAA0B,CAAC;AACxH,OAAO,EAAwD,gBAAgB,EAAyC,MAAM,aAAa,CAAC;AAC5I,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AACrH,OAAO,EAAE,KAAK,EAAE,MAAM,eAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { NylasBaseProvider } from '@/common/abstract-provider';\nimport { RegisteredComponent } from '@/common/register-component';\nimport type { SchedulerEventOverride } from '@/common/component-types';\nimport { NylasSchedulerConnector } from '@/connector/nylas-scheduler-connector';\nimport { CreateNylasSchedulerStore, NylasSchedulerStoreState, NylasSchedulerStoreType } from '@/stores/scheduler-store';\nimport { NylasSchedulerBookingData, ThemeConfig, Notification, NotificationType, NylasSchedulerErrorResponse, Timeslot } from '@nylas/core';\nimport { Component, Element, Event, EventEmitter, Host, Listen, Method, Prop, State, Watch, h } from '@stencil/core';\nimport { debug } from '@/utils/utils';\nimport { SchedulerView } from './scheduler-view';\nimport { ErrorCategory } from '@/connector/nylas-scheduler-connector/errors';\nimport { MessageBanner } from './message-banner';\n\nconst genericError = { title: 'Something went wrong...', type: NotificationType.Error, category: ErrorCategory.Component };\n\n/**\n * The `nylas-scheduling` component is used to display the Nylas Scheduling UI.\n *\n * @slot custom-booking-form - This slot is used to pass a custom booking form to the Nylas Scheduling component.\n * @slot timeslot-picker-cta-label - This slot is used to pass a custom label to the timeslot picker CTA. The default label is \"Next\".\n *\n * @part ndp - [nylas-date-picker] The date picker host.\n * @part ndp__month-header - [nylas-date-picker] The month header.\n * @part ndp__month-button - [nylas-date-picker] The month button.\n * @part ndp__day - [nylas-date-picker] The day.\n * @part ndp__date - [nylas-date-picker] The date.\n * @part ndp__date--selected - [nylas-date-picker] The selected date.\n * @part ndp__date--current-day - [nylas-date-picker] The current day.\n * @part ndp__date--current-month - [nylas-date-picker] The dates in the current month.\n * @part ntp - [nylas-timeslot-picker] The timeslot picker component.\n * @part ntp__timeslot - [nylas-timeslot-picker] The timeslot button.\n * @part ntp__timeslot--selected - [nylas-timeslot-picker] The selected timeslot button.\n * @part ntp__button-primary - [nylas-timeslot-picker] The timeslot picker CTA.\n * @part nsec - [nylas-selected-event-card] The selected event card component.\n * @part nsec__card - [nylas-selected-event-card] The card component.\n * @part nsec__icon - [nylas-selected-event-card] The calendar icon.\n * @part nsec__date - [nylas-selected-event-card] The date selected.\n * @part nsec__time - [nylas-selected-event-card] The timeslot selected.\n * @part nbf - [nylas-booking-form] The booking form host.\n * @part nbf__input-label - [nylas-booking-form] The input label.\n * @part nbf__input-textfield - [nylas-booking-form] The input textfield.\n * @part nbf__button-ghost - [nylas-booking-form] The ghost button for adding guests.\n * @part nbf__button-primary - [nylas-booking-form] The primary button for booking.\n * @part nbf__button-outline - [nylas-booking-form] The outline button for canceling.\n * @part ncec - [nylas-cancelled-event-card] The cancelled event card host.\n * @part ncec__icon - [nylas-cancelled-event-card] The calendar icon.\n * @part ncec__title - [nylas-cancelled-event-card] The title of the cancelled event card.\n * @part ncec__description - [nylas-cancelled-event-card] The description of the cancelled event card.\n * @part ncec__button-outline - [nylas-cancelled-event-card] The close button CTA.\n * @part ncec__card - [nylas-cancelled-event-card] The cancelled event card.\n * @part nbec - [nylas-booked-event-card] The booked event card host.\n * @part nbec__card - [nylas-booked-event-card] The booked event card.\n * @part nbec__title - [nylas-booked-event-card] The title of the booked event card.\n * @part nbec__description - [nylas-booked-event-card] The description of the booked event card.\n * @part nbec__button-outline - [nylas-booked-event-card] The cancel & reschedule button CTA.\n * @part nbec__cancel-cta - [nylas-booked-event-card] The cancel button CTA.\n * @part nbec__reschedule-cta - [nylas-booked-event-card] The reschedule button CTA.\n */\n@Component({\n tag: 'nylas-scheduling',\n styleUrl: 'nylas-scheduling.scss',\n shadow: true,\n})\nexport class NylasScheduling {\n /**\n * Stores to be used by the provider.\n */\n private stores?: { scheduler: NylasSchedulerStoreType };\n\n /**\n * This is a base provide that defines the common methods and properties\n * that all providers should have.\n *\n * Because stencil does not support abstract classes, we have to use a\n * property to store the base provider instance.\n */\n private baseProvider?: NylasBaseProvider<Exclude<typeof this.stores, undefined>>;\n\n /**\n * The Nylas Scheduler Connector instance.\n * The branins of the provider. It manages data fetching and state synchronization.\n */\n private nylasSchedulerConnector?: NylasSchedulerConnector;\n\n /**\n * The host element.\n * Used to manage the host element of the provider.\n */\n @Element() private host!: HTMLNylasSchedulingElement;\n\n /**\n * This is used to set the mode for the Nylas Scheduler.\n * The mode can be either `app` or `composable`. The default mode is `app`.\n * - `app`: This mode is used to show the default Nylas Scheduler UI.\n * - `composable`: This mode is used to show the composable Nylas Scheduler UI\n * by passing the individual scheduler components as children.\n */\n @Prop() readonly mode: 'app' | 'composable' = 'app';\n\n /**\n * The default scheduler store state.\n * Used to set the initial state of the scheduler store.\n */\n @Prop({ attribute: 'default-scheduler-store-state' }) readonly defaultSchedulerState?: Partial<NylasSchedulerStoreState>;\n\n /**\n * The session ID for the Nylas Scheduler.\n * This is used to authenticate the user.\n */\n @Prop() readonly sessionId?: string;\n\n /**\n * The URL for the Nylas Scheduler API. (staging or production URL)\n */\n @Prop() readonly schedulerApiUrl: string = 'https://api.us.nylas.com';\n\n /**\n * This enables passing the bookingInfo object to the Scheduler UI for direct booking event creation.\n * When used with timeslotConfirmedHandler, it bypasses the additional data page and immediately\n * invokes the handler after booking.\n */\n @Prop() readonly bookingInfo?: NylasSchedulerBookingData;\n\n /**\n * Booking Id required for rescheduling flow.\n */\n @Prop() readonly rescheduleBookingId?: string;\n\n /**\n * Booking Id required for cancelling flow.\n */\n @Prop() readonly cancelBookingId?: string;\n\n /**\n * The config ID for the Nylas Scheduler. This should be passed in when using a public config,\n * in which case the sessionId is not required.\n */\n @Prop() readonly configId?: string;\n\n /**\n * This prop lets you hide the Nylas branding.\n * Default is true.\n */\n @Prop() readonly nylasBranding?: boolean = true;\n\n /**\n * This provides an easy way to override the default function of the event emitter.\n * An example of this is the `timeslotConfirmed` event. By default, this event will set the scheduler store state for `showBookingForm` to `true` which will\n * show the booking form. However, if you want to override this behavior, you can pass in the prop `eventOverride` like:\n * ```html\n * <nylas-scheduling eventOverride={{\"timeslotConfirmed\": (event, nylasConnector) => { console.log(\"Timeslot confirmed event fired!\"); } }} />\n * ```\n */\n @Prop({ attribute: 'event-overrides' }) readonly eventOverrides: SchedulerEventOverride = {};\n\n /**\n * The loading state. This is used to set the loading state for the Nylas Scheduler when fetching data.\n */\n @Prop() readonly isLoading?: boolean;\n\n /**\n * Theme config, used to automatically generate a theme with color palette and\n * CSS variables to customize the look and feel of the Nylas Scheduler.\n */\n @Prop() readonly themeConfig?: ThemeConfig;\n\n /*\n * Displays notifications for errors by default. When enabled (`true`), errors\n * automatically appear as notifications. Disabling this feature (`false`) allows\n * the parent application to capture and manage errors by listening to the\n * `nylasSchedulerError` event, providing flexibility in error handling.\n */\n @Prop() readonly showNotification?: boolean = true;\n\n /**\n * Automatically register components that have the `@RegisterComponent` decorator.\n * If this is set to false, you will need to manually register components using the\n * `registerComponent` method.\n * @default true\n */\n @State() automaticComponentRegistration: boolean = true;\n\n /**\n * The selected date label for the Nylas Scheduler.\n * This is used to set the initial date label for the Nylas Scheduler.\n */\n @State() selectedDateLabel: string = new Date().toLocaleDateString(undefined, { dateStyle: 'full' }) || 'No date selected';\n\n /**\n * This event is fired when the provider is initialized.\n * It can be used to set the initial state of the provider,\n * or to prevent the provider from firing some default behavior.\n */\n @Event({ cancelable: true }) init!: EventEmitter<HTMLNylasSchedulingElement>;\n\n /**\n * This event is fired when the scheduler component enters componentWillLoad lifecycle.\n */\n @Event() schedulerWillLoad!: EventEmitter<HTMLNylasSchedulingElement>;\n\n /**\n * This event is fired when the scheduler component enters componentDidLoad lifecycle.\n */\n @Event() schedulerDidLoad!: EventEmitter<HTMLNylasSchedulingElement>;\n\n @Event({\n eventName: 'nylasSchedulerError',\n })\n nylasSchedulerError!: EventEmitter<Notification>;\n\n /**\n * This function is called when the component is connected to the DOM.\n * At this point in the component lifecycle, the base provider has not yet\n * been initialized. So avoid using the base provider in this method or stores\n * in this method.\n */\n connectedCallback() {\n debug(`[nylas-scheduler] connectedCallback`);\n }\n\n async componentWillLoad() {\n debug(`[nylas-scheduler] Component will load`);\n\n // Emit the schedulerWillLoad event to allow the parent application to set the initial\n // state of the provider or to prevent the provider from firing some default behavior.\n const schedulerWillLoadEvent = this.schedulerWillLoad.emit(this.host);\n if (schedulerWillLoadEvent.defaultPrevented) {\n return;\n }\n\n if (!this.checkIfSessionIdOrConfigIdExists()) {\n return;\n }\n\n this.stores = {\n scheduler: CreateNylasSchedulerStore({\n bookingInfo: this.bookingInfo,\n nylasBranding: this.nylasBranding,\n ...this.defaultSchedulerState,\n }),\n };\n\n this.baseProvider = new NylasBaseProvider(this.host, this.stores, this.automaticComponentRegistration, this.eventOverrides);\n\n const nylasSchedulerStore = this.baseProvider?.getStore('scheduler');\n this.nylasSchedulerConnector = new NylasSchedulerConnector({\n schedulerAPIURL: this.schedulerApiUrl,\n sessionId: this.sessionId,\n configId: this.configId,\n nylasSchedulerStore,\n });\n this.init.emit(this.host);\n\n this.baseProvider?.componentWillLoad(this.nylasSchedulerConnector);\n // Override theme\n if (this.themeConfig) {\n for (const [key, value] of Object.entries(this.themeConfig)) {\n this.host.style.setProperty(`${key}`, value);\n }\n }\n }\n\n async componentDidLoad() {\n this.baseProvider?.componentDidLoad();\n\n // If sessionId is not provided, do not fetch availability\n if (!this.checkIfSessionIdOrConfigIdExists()) {\n return;\n }\n\n const nylasSchedulerStore = this.baseProvider?.getStore('scheduler');\n\n const selectedTimeslot = nylasSchedulerStore?.get('selectedTimeslot');\n\n if (selectedTimeslot && selectedTimeslot?.start_time) {\n if (!this.isTimeslotValid(selectedTimeslot)) {\n return;\n }\n\n // If the selected timeslot is already set, do not fetch availability\n if (nylasSchedulerStore?.get('showBookingForm')) {\n nylasSchedulerStore?.set('selectedDate', selectedTimeslot.start_time);\n return;\n }\n }\n\n const selectedDate = nylasSchedulerStore?.get('selectedDate');\n const availability = nylasSchedulerStore?.get('availability');\n let result;\n\n if (availability && availability.length > 0) {\n return;\n }\n\n if (!selectedDate) {\n result = await this.nylasSchedulerConnector?.scheduler.getAvailability();\n } else {\n const startTime = new Date(selectedDate.getFullYear(), selectedDate.getMonth(), 1).getTime() / 1000;\n const endTime = new Date(selectedDate.getFullYear(), selectedDate.getMonth() + 1, 1).getTime() / 1000;\n result = await this.nylasSchedulerConnector?.scheduler.getAvailability(startTime, endTime);\n }\n\n if (!result || 'error' in result) {\n this.nylasSchedulerError.emit({ ...this.getErrorObject(result?.error) });\n }\n\n if (!selectedDate) {\n let _selectedDate = new Date();\n const firstAvailableDate = nylasSchedulerStore?.get('availability').find((timeslot: any) => new Date(timeslot.start_time) > new Date());\n if (firstAvailableDate) {\n _selectedDate = firstAvailableDate.start_time;\n }\n nylasSchedulerStore?.set('selectedDate', _selectedDate);\n }\n }\n\n componentDisconnected() {\n this.baseProvider?.componentDisconnected();\n }\n\n @Watch('bookingInfo')\n bookingInfoChanged(newVal?: NylasSchedulerBookingData) {\n this.stores?.scheduler.set('bookingInfo', newVal);\n }\n\n /**\n * This is a custom event handler that is used to register a component with the provider.\n * It is used by components that have the `@RegisterComponent` decorator.\n * @param event A custom event that contains the component to register\n * @returns Promise<void>\n */\n @Listen('registerComponent')\n async registerComponentHandler(event: CustomEvent<RegisteredComponent<any, any>>): Promise<void> {\n this.baseProvider?.registerComponent(event.detail);\n }\n\n /**\n * This is a custom event handler that is used to unregister a component with the provider.\n * It is used by components that have the `@RegisterComponent` decorator.\n * @param event A custom event that contains the component to unregister\n * @returns Promise<void>\n */\n @Listen('unregisterComponent')\n async unregisterComponentHandler(event: CustomEvent<RegisteredComponent<any, any>>): Promise<void> {\n this.baseProvider?.unregisterComponent(event.detail);\n }\n\n /**\n * This is a custom event handler that is used to refetch the availability when the month is changed.\n */\n @Listen('monthChanged')\n async monthChangedHandler(event: CustomEvent<Date>) {\n const date = event.detail;\n const startTime = new Date(date.getFullYear(), date.getMonth(), 1).getTime() / 1000;\n const endTime = new Date(date.getFullYear(), date.getMonth() + 1, 1).getTime() / 1000;\n\n const result = await this.nylasSchedulerConnector?.scheduler.getAvailability(startTime, endTime);\n\n if (!result || 'error' in result) {\n this.nylasSchedulerError.emit({ ...this.getErrorObject(result?.error) });\n }\n }\n\n /**\n * This is a custom event handler to book an event.\n */\n @Listen('detailsConfirmed')\n async bookButtonClickedHandler(event: CustomEvent<NylasSchedulerBookingData>) {\n if (this.rescheduleBookingId) {\n const result = await this.nylasSchedulerConnector?.scheduler.rescheduleBooking(this.rescheduleBookingId, event.detail);\n if (!result || 'error' in result) {\n this.nylasSchedulerError.emit({ ...this.getErrorObject(result?.error) });\n }\n return;\n }\n const result = await this.nylasSchedulerConnector?.scheduler.bookTimeslot(event.detail);\n if (!result || 'error' in result) {\n this.nylasSchedulerError.emit({ ...this.getErrorObject(result?.error) });\n }\n }\n\n /**\n * This is a custom event handler to update the selected date label.\n */\n @Listen('dateSelected')\n dateSelectedHandler(event: CustomEvent<Date>) {\n const date = event.detail;\n this.selectedDateLabel = date ? date.toLocaleDateString(undefined, { dateStyle: 'full' }) : 'No date selected';\n }\n\n /**\n * This is an event handler to handle the error (if any) when the\n * cancel booking button is clicked on the cancel booking form.\n */\n @Listen('cancelBookedEventError')\n cancelBookedEventErrorHandler(event: CustomEvent<NylasSchedulerErrorResponse>) {\n this.nylasSchedulerError.emit({ ...this.getErrorObject(event.detail.error) });\n }\n\n /**\n * This is an event handler to handle the error (if any) when the\n * reschedule button is clicked on the booked event card.\n */\n @Listen('rescheduleBookedEventError')\n rescheduleBookedEventErrorHandler(event: CustomEvent<NylasSchedulerErrorResponse>) {\n this.nylasSchedulerError.emit({ ...this.getErrorObject(event.detail.error) });\n }\n\n /**\n * This method is used to retrieve the NylasScheduler instance\n * @returns The NylasScheduler instance\n */\n @Method()\n async getNylasSchedulerStore(): Promise<NylasSchedulerStoreType | undefined> {\n return this.baseProvider?.getStore('scheduler');\n }\n\n /**\n * This method is used to retrieve the NylasConnector instance\n * @returns The NylasConnector instance\n */\n @Method()\n async getNylasSchedulerConnector() {\n return this.nylasSchedulerConnector;\n }\n\n @Method()\n async getRef() {\n return this.host;\n }\n\n private getErrorObject(error: NylasSchedulerErrorResponse['error']): Notification {\n return {\n title: error?.title || genericError.title,\n category: error?.category || genericError.category,\n type: NotificationType.Error,\n description: error?.message || '',\n id: new Date().getTime().toString(),\n ttl: 'none',\n };\n }\n\n private checkIfSessionIdOrConfigIdExists(): boolean {\n if (!this.sessionId && !this.configId) {\n this.nylasSchedulerError.emit({\n title: 'No sessionId!',\n category: ErrorCategory.Component,\n type: NotificationType.Error,\n description: 'Session ID is required',\n id: new Date().getTime().toString(),\n ttl: 'none',\n });\n return false;\n }\n return true;\n }\n\n private isTimeslotValid(timeslot: Timeslot): boolean {\n const selectedDate = new Date(timeslot.start_time);\n if (selectedDate < new Date()) {\n this.nylasSchedulerError.emit({\n title: 'Invalid tiemslot!',\n category: ErrorCategory.Component,\n type: NotificationType.Error,\n description: 'The selected timeslot is invalid.',\n id: new Date().getTime().toString(),\n ttl: 'none',\n });\n return false;\n }\n return true;\n }\n\n render() {\n const showDefaultScheduler = this.mode === 'app';\n const nylasSchedulerStore = this.baseProvider?.getStore('scheduler');\n const eventInfo = nylasSchedulerStore?.get('eventInfo');\n const showBookingForm = nylasSchedulerStore?.get('showBookingForm');\n const cancelledEventInfo = nylasSchedulerStore?.get('cancelledEventInfo');\n const cancelBookingId = nylasSchedulerStore?.get('cancelBookingId') || this.cancelBookingId;\n const selectedTimeslot = nylasSchedulerStore?.get('selectedTimeslot') as Timeslot;\n const rescheduleBookingId = nylasSchedulerStore?.get('rescheduleBookingId') || this.rescheduleBookingId;\n const nylasBranding = nylasSchedulerStore?.get('nylasBranding') || this.nylasBranding;\n\n if (showDefaultScheduler && cancelBookingId && !cancelledEventInfo) {\n return (\n <Host>\n <SchedulerView nylasBranding={nylasBranding} isLoading={this.isLoading} showNotification={this.showNotification}>\n <div class=\"cancel-flow-page\" part=\"cancel-flow-page\">\n <nylas-cancel-booking-form cancelBookingId={cancelBookingId} exportparts=\"ncbf, ncbf__input-textfield, ncbf__button-cta, ncbf__button-outline, ncbf__input-label\" />\n </div>\n </SchedulerView>\n </Host>\n );\n }\n\n // Cancelled event card is shown when the event is cancelled\n if (showDefaultScheduler && cancelledEventInfo) {\n return (\n <Host>\n <SchedulerView nylasBranding={nylasBranding} isLoading={this.isLoading} showNotification={this.showNotification}>\n <div class=\"cancelled-event-page\" part=\"cancelled-event-page\">\n <nylas-cancelled-event-card\n cancelledEventInfo={cancelledEventInfo}\n exportparts=\"ncec, ncec__icon, ncec__title, ncec__description, ncec__button-outline, ncec__card\"\n />\n </div>\n </SchedulerView>\n </Host>\n );\n }\n // Booked event card is shown when the event is booked\n if (showDefaultScheduler && eventInfo) {\n return (\n <Host>\n <SchedulerView nylasBranding={nylasBranding} isLoading={this.isLoading} showNotification={this.showNotification}>\n <div class=\"booked-event-page\" part=\"booked-event-page\">\n <nylas-booked-event-card\n selectedTimeslot={selectedTimeslot}\n eventInfo={eventInfo}\n exportparts=\"nbec, nbec__title, nbec__card, nbec__description, nbec__button-outline, nbec__cancel-cta, nbec__reschedule-cta\"\n />\n </div>\n </SchedulerView>\n </Host>\n );\n }\n // Date and time picker is shown when the event is not booked and no additional data is shown\n if (showDefaultScheduler && (!eventInfo || !!rescheduleBookingId) && !showBookingForm) {\n const timeslotPickerCTALabel = this.host.querySelector('[slot=\"timeslot-picker-cta-label\"]');\n return (\n <Host>\n <SchedulerView nylasBranding={nylasBranding} isLoading={this.isLoading} showNotification={this.showNotification}>\n {rescheduleBookingId && <MessageBanner>Choose another time slot to reschedule your meeting</MessageBanner>}\n <div class=\"select-date-page\" part=\"select-date-page\">\n <div class=\"left-panel\">\n <nylas-date-picker exportparts=\"ndp, ndp__month-header, ndp__month-button, ndp__day, ndp__date, ndp__date--selected, ndp__date--current-day, ndp__date--current-month\"></nylas-date-picker>\n <div class=\"border\"></div>\n <nylas-locale-switch></nylas-locale-switch>\n </div>\n <div class=\"right-panel\">\n <h2>\n <calendar-icon></calendar-icon>\n <span id=\"selectedDate\">{this.selectedDateLabel}</span>\n </h2>\n <nylas-timeslot-picker exportparts=\"ntp, ntp__timeslot, ntp__timeslot--selected, ntp__button-primary\">\n {timeslotPickerCTALabel && (\n <span slot=\"timeslot-picker-cta-label\">\n <slot name=\"timeslot-picker-cta-label\"></slot>\n </span>\n )}\n </nylas-timeslot-picker>\n </div>\n </div>\n </SchedulerView>\n </Host>\n );\n }\n // Additional data is shown when the time is selected, event is not booked and additional data is shown\n if (showDefaultScheduler && !eventInfo && showBookingForm) {\n // Check if a \"custom-booking-form\" slot is provided\n const customTemplateSlot = this.host.querySelector('[slot=\"custom-booking-form\"]');\n\n return (\n <Host>\n <SchedulerView nylasBranding={nylasBranding} isLoading={this.isLoading} showNotification={this.showNotification}>\n {rescheduleBookingId && <MessageBanner>Choose another time slot to reschedule your meeting</MessageBanner>}\n <div class=\"additional-data-page\" part=\"additional-data-page\">\n <div class=\"left-panel\">\n <div class=\"wrapper\">\n <nylas-selected-event-card exportparts=\"nsec, nsec__card, nsec__icon, nsec__date, nsec__time\"></nylas-selected-event-card>\n </div>\n </div>\n <div class=\"right-panel\">\n <nylas-booking-form exportparts=\"nbf, nbf__input-label, nbf__input-textfield, nbf__button-ghost, nbf__button-primary, nbf__button-outline\">\n {customTemplateSlot && (\n <div slot=\"custom-booking-form\">\n <slot name=\"custom-booking-form\"></slot>\n </div>\n )}\n </nylas-booking-form>\n </div>\n </div>\n </SchedulerView>\n </Host>\n );\n }\n\n return (\n <Host>\n <slot />\n </Host>\n );\n }\n}\n"]}
|
|
@@ -2,6 +2,7 @@ import { Fragment, h } from "@stencil/core";
|
|
|
2
2
|
export const SchedulerView = (props, children) => {
|
|
3
3
|
const isLoading = props.isLoading;
|
|
4
4
|
const showNotification = props.showNotification;
|
|
5
|
-
|
|
5
|
+
const nylasBranding = props.nylasBranding;
|
|
6
|
+
return (h(Fragment, null, showNotification && h("nylas-notification", null), isLoading && (h("div", { class: 'loading' }, h("div", { class: 'left' }, h("div", { class: 'skeleton' })), h("div", { class: 'right' }, h("div", { class: 'skeleton' }), h("div", { class: 'skeleton' }), h("div", { class: 'skeleton' }), h("div", { class: 'skeleton' }), h("div", { class: 'skeleton' })))), !isLoading && children, h("div", { class: 'footer' }, nylasBranding && (h(Fragment, null, "Powered by\u00A0", h("nylas-logo", null))))));
|
|
6
7
|
};
|
|
7
8
|
//# sourceMappingURL=scheduler-view.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scheduler-view.js","sourceRoot":"","sources":["../../../../src/components/scheduler/nylas-scheduler/scheduler-view.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAuB,CAAC,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"scheduler-view.js","sourceRoot":"","sources":["../../../../src/components/scheduler/nylas-scheduler/scheduler-view.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAuB,CAAC,EAAE,MAAM,eAAe,CAAC;AAWjE,MAAM,CAAC,MAAM,aAAa,GAA4C,CAAC,KAAyB,EAAE,QAAQ,EAAE,EAAE;IAC5G,MAAM,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC;IAClC,MAAM,gBAAgB,GAAG,KAAK,CAAC,gBAAgB,CAAC;IAChD,MAAM,aAAa,GAAG,KAAK,CAAC,aAAa,CAAC;IAE1C,OAAO,CACL,EAAC,QAAQ;QACN,gBAAgB,IAAI,6BAAyC;QAE7D,SAAS,IAAI,CACZ,WAAK,KAAK,EAAE,SAAS;YACnB,WAAK,KAAK,EAAE,MAAM;gBAChB,WAAK,KAAK,EAAE,UAAU,GAAI,CACtB;YACN,WAAK,KAAK,EAAE,OAAO;gBACjB,WAAK,KAAK,EAAE,UAAU,GAAI;gBAC1B,WAAK,KAAK,EAAE,UAAU,GAAI;gBAC1B,WAAK,KAAK,EAAE,UAAU,GAAI;gBAC1B,WAAK,KAAK,EAAE,UAAU,GAAI;gBAC1B,WAAK,KAAK,EAAE,UAAU,GAAI,CACtB,CACF,CACP;QACA,CAAC,SAAS,IAAI,QAAQ;QACvB,WAAK,KAAK,EAAE,QAAQ,IACjB,aAAa,IAAI,CAChB,EAAC,QAAQ;;YAEP,qBAAc,CACL,CACZ,CACG,CACG,CACZ,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Fragment, FunctionalComponent, h } from '@stencil/core';\n\nexport type SchedulerViewProps = {\n isLoading?: boolean;\n showNotification?: boolean;\n nylasBranding?: boolean;\n};\n\n/**\n * The Scheduler view component.\n */\nexport const SchedulerView: FunctionalComponent<SchedulerViewProps> = (props: SchedulerViewProps, children) => {\n const isLoading = props.isLoading;\n const showNotification = props.showNotification;\n const nylasBranding = props.nylasBranding;\n\n return (\n <Fragment>\n {showNotification && <nylas-notification></nylas-notification>}\n\n {isLoading && (\n <div class={'loading'}>\n <div class={'left'}>\n <div class={'skeleton'} />\n </div>\n <div class={'right'}>\n <div class={'skeleton'} />\n <div class={'skeleton'} />\n <div class={'skeleton'} />\n <div class={'skeleton'} />\n <div class={'skeleton'} />\n </div>\n </div>\n )}\n {!isLoading && children}\n <div class={'footer'}>\n {nylasBranding && (\n <Fragment>\n Powered by \n <nylas-logo />\n </Fragment>\n )}\n </div>\n </Fragment>\n );\n};\n"]}
|
|
@@ -164,5 +164,14 @@ describe('nylas-scheduling', () => {
|
|
|
164
164
|
const messageBanner = page?.root?.shadowRoot?.querySelector('.message-banner');
|
|
165
165
|
expect(messageBanner).not.toBeNull();
|
|
166
166
|
});
|
|
167
|
+
it('hides the nylas logo in the footer if nylasBranding is set', async () => {
|
|
168
|
+
const page = await newSpecPage({
|
|
169
|
+
components: [NylasScheduling],
|
|
170
|
+
template: () => h("nylas-scheduling", { "config-id": "configid", nylasBranding: false }),
|
|
171
|
+
});
|
|
172
|
+
await page.waitForChanges();
|
|
173
|
+
const footer = page?.root?.shadowRoot?.querySelector('.footer');
|
|
174
|
+
expect(footer?.textContent).not.toContain('Powered by Nylas');
|
|
175
|
+
});
|
|
167
176
|
});
|
|
168
177
|
//# sourceMappingURL=nylas-scheduling.spec.js.map
|
package/dist/collection/components/scheduler/nylas-scheduler/test/nylas-scheduling.spec.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nylas-scheduling.spec.js","sourceRoot":"","sources":["../../../../../src/components/scheduler/nylas-scheduler/test/nylas-scheduling.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAElC,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;IAChC,MAAM,SAAS,GAAG,IAAI,CAAC;IACvB,UAAU,CAAC,GAAG,EAAE;QAEd,IAAI,CAAC,aAAa,EAAE,CAAC;IACvB,CAAC,CAAC,CAAC;IAEH,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,YAAY,GAAG,IAAI,CAAC;QAC1B,MAAM,CAAC,IAAI,GAAG,KAAM,SAAQ,YAAY;YACtC,YAAY,IAAsB;gBAChC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,0BAA0B,CAAC,CAAC;YAClD,CAAC;SACiB,CAAC;IACvB,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,GAAG,EAAE;QACZ,MAAM,CAAC,IAAI,GAAG,SAAS,CAAC;IAC1B,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE;QACvB,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7B,UAAU,EAAE,CAAC,eAAe,CAAC;YAC7B,IAAI,EAAE,uCAAuC;SAC9C,CAAC,CAAC;QAEH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;IACtC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,wCAAwC,EAAE,KAAK,IAAI,EAAE;QACtD,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7B,UAAU,EAAE,CAAC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E,EAAE,KAAK,IAAI,EAAE;QAChF,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7B,UAAU,EAAE,CAAC,eAAe,CAAC;YAC7B,IAAI,EAAE,8DAA8D;SACrE,CAAC,CAAC;QACH,MAAM,SAAS,GAAG,IAAI,CAAC,YAA+B,CAAC;QAEvD,MAAM,SAAS,GAAG,MAAM,SAAS,CAAC,0BAA0B,EAAE,CAAC;QAC/D,MAAM,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE,CAAC;IAClC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,mEAAmE,EAAE,KAAK,IAAI,EAAE;QACjF,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7B,UAAU,EAAE,CAAC,eAAe,CAAC;YAC7B,IAAI,EAAE,mEAAmE;SAC1E,CAAC,CAAC;QAEH,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;QAE5B,MAAM,aAAa,GAAG,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;QAC/E,MAAM,CAAC,aAAa,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;IACvC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newSpecPage } from '@stencil/core/testing';\nimport { NylasScheduling } from '../nylas-scheduling';\nimport { h } from '@stencil/core';\n\ndescribe('nylas-scheduling', () => {\n const REAL_DATE = Date;\n beforeEach(() => {\n // Clear and reset the mock before each test if needed\n jest.clearAllMocks();\n });\n\n beforeAll(() => {\n const originalDate = Date;\n global.Date = class extends originalDate {\n constructor(date?: string | number) {\n super(date ? date : '2022-01-01T00:00:00.000Z');\n }\n } as DateConstructor;\n });\n\n afterAll(() => {\n global.Date = REAL_DATE;\n });\n\n it('renders', async () => {\n const page = await newSpecPage({\n components: [NylasScheduling],\n html: `<nylas-scheduling></nylas-scheduling>`,\n });\n\n expect(page.root).toMatchSnapshot();\n });\n\n it('projects custom booking form into slot', async () => {\n const page = await newSpecPage({\n components: [NylasScheduling],\n html: `\n <nylas-scheduling>\n <div slot=\"custom-booking-form\">Custom Booking Form</div>\n </nylas-scheduling>\n `,\n });\n\n const customFormSlot = page?.root?.querySelector('[slot=\"custom-booking-form\"]') as HTMLDivElement;\n expect(customFormSlot.textContent).toBe('Custom Booking Form');\n });\n\n it('listens for NylasSchedulingError event and updates state', async () => {\n const page = await newSpecPage({\n components: [NylasScheduling],\n html: `<nylas-scheduling></nylas-scheduling>`,\n });\n\n const mockError = { title: 'Error', description: 'Test Error', type: 'error', category: 'component', ttl: 'none' };\n const errorEvent = new CustomEvent('NylasSchedulingError', { detail: mockError, bubbles: true });\n page.win.dispatchEvent(errorEvent);\n await page.waitForChanges();\n\n const notification = page?.root?.shadowRoot?.querySelector('nylas-notification');\n expect(notification).not.toBeNull();\n const notifRoot = notification?.shadowRoot?.querySelector('.notif');\n expect(notifRoot).not.toBeNull();\n });\n\n it('shows no error when configID is set, and no sessionID is set', async () => {\n const availability = [\n {\n emails: ['xyz@gmail.com'],\n end_time: new Date(1709303400000),\n start_time: new Date(1709301600000),\n },\n ];\n const page = await newSpecPage({\n components: [NylasScheduling],\n template: () => (\n <nylas-scheduling\n config-id=\"configid\"\n defaultSchedulerState={{\n availability,\n }}\n ></nylas-scheduling>\n ),\n });\n\n await page.waitForChanges();\n\n const notification = page?.root?.shadowRoot?.querySelector('nylas-notification');\n const notifRoot = notification?.shadowRoot?.querySelector('.notif');\n expect(notifRoot).toBeUndefined();\n });\n\n it('listens for dateSelected event and updates date label', async () => {\n const page = await newSpecPage({\n components: [NylasScheduling],\n html: `<nylas-scheduling></nylas-scheduling>`,\n });\n\n const selectedDate = new Date();\n const dateSelectedEvent = new CustomEvent('dateSelected', { detail: selectedDate, bubbles: true });\n page.win.dispatchEvent(dateSelectedEvent);\n await page.waitForChanges();\n\n const selectedDateLabel = page?.root?.shadowRoot?.querySelector('#selectedDate');\n expect(selectedDateLabel?.textContent).toBe(selectedDate.toLocaleDateString(undefined, { dateStyle: 'full' }));\n });\n\n it('conditionally renders cancel flow based on cancelBookingId prop', async () => {\n const page = await newSpecPage({\n components: [NylasScheduling],\n html: `<nylas-scheduling cancel-booking-id=\"123\"></nylas-scheduling>`,\n });\n\n await page.waitForChanges();\n const cancelFlowPage = page?.root?.shadowRoot?.querySelector('.cancel-flow-page');\n expect(cancelFlowPage).not.toBeNull();\n });\n\n it('renders composable UI when mode is set to composable', async () => {\n const page = await newSpecPage({\n components: [NylasScheduling],\n html: `<nylas-scheduling mode=\"composable\">\n <nylas-if-state state=\"scheduler.eventInfo\" is-state-set=\"false\">\n <div class=\"flex\">\n <div class=\"flex flex-col gap-4 px-6 pt-4 h-[514px] w-[433px] border-slate-200 dark:border-slate-700 border-r\">\n <nylas-if-state state=\"scheduler.showBookingForm\" is-boolean=\"false\">\n <nylas-date-picker></nylas-date-picker>\n <div class=\"border-slate-200 dark:border-slate-700 border-t -mx-6 h-px\"></div>\n <nylas-locale-switch></nylas-locale-switch>\n </nylas-if-state>\n <nylas-if-state state=\"scheduler.showBookingForm\" is-boolean=\"true\">\n <div class=\"flex flex-col justify-center h-[496px]\">\n <nylas-selected-event-card></nylas-selected-event-card>\n </div>\n </nylas-if-state>\n </div>\n <div class=\"flex flex-col items-center min-w-[360px] overflow-hidden bg-slate-50 dark:bg-slate-700\">\n <nylas-if-state state=\"scheduler.showBookingForm\" is-boolean=\"false\" class=\"w-full\">\n <div class=\"flex flex-col justify-start w-full\">\n <nylas-if-state state=\"scheduler.selectableDates\" is-state-set=\"true\">\n <h2 class=\"flex items-center justify-center text-lg font-semibold w-full text-center gap-1 mb-4 mt-6 text-slate-700 dark:text-white\">\n <calendar-icon></calendar-icon>\n <nylas-if-state state=\"scheduler.selectedDate\" is-state-set=\"false\">\n <span>No date selected</span>\n </nylas-if-state>\n <nylas-if-state state=\"scheduler.selectedDate\" is-state-set=\"true\">\n <span id=\"selectedDate\"></span>\n </nylas-if-state>\n </h2>\n </nylas-if-state>\n <nylas-timeslot-picker></nylas-timeslot-picker>\n </div>\n </nylas-if-state>\n <nylas-if-state state=\"scheduler.showBookingForm\" is-boolean=\"true\" class=\"w-full\">\n <div class=\"flex flex-col justify-center h-[496px]\">\n <nylas-booking-form></nylas-booking-form>\n </div>\n </nylas-if-state>\n </div>\n </div>\n </nylas-if-state>\n </nylas-scheduling>`,\n });\n\n expect(page.root).toMatchSnapshot();\n });\n\n it('exposes getNylasSchedulingStore method and returns store', async () => {\n const page = await newSpecPage({\n components: [NylasScheduling],\n html: `<nylas-scheduling session-id=\"sessionid\"></nylas-scheduling>`,\n });\n const scheduler = page.rootInstance as NylasScheduling;\n\n const store = await scheduler.getNylasSchedulerStore();\n expect(store).toBeDefined();\n });\n\n it('exposes getNylasSchedulingConnector method and returns connector', async () => {\n const page = await newSpecPage({\n components: [NylasScheduling],\n html: `<nylas-scheduling session-id=\"sessionid\"></nylas-scheduling>`,\n });\n const scheduler = page.rootInstance as NylasScheduling;\n\n const connector = await scheduler.getNylasSchedulerConnector();\n expect(connector).toBeDefined();\n });\n\n it('should render the reschedule flow when rescheduleBookingId is set', async () => {\n const page = await newSpecPage({\n components: [NylasScheduling],\n html: `<nylas-scheduling reschedule-booking-id=\"123\"></nylas-scheduling>`,\n });\n\n await page.waitForChanges();\n\n const messageBanner = page?.root?.shadowRoot?.querySelector('.message-banner');\n expect(messageBanner).not.toBeNull();\n });\n});\n"]}
|
|
1
|
+
{"version":3,"file":"nylas-scheduling.spec.js","sourceRoot":"","sources":["../../../../../src/components/scheduler/nylas-scheduler/test/nylas-scheduling.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAElC,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;IAChC,MAAM,SAAS,GAAG,IAAI,CAAC;IACv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ACjF,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7B,UAAU,EAAE,CAAC,eAAe,CAAC;YAC7B,IAAI,EAAE,mEAAmE;SAC1E,CAAC,CAAC;QAEH,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;QAE5B,MAAM,aAAa,GAAG,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;QAC/E,MAAM,CAAC,aAAa,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;IACvC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,4DAA4D,EAAE,KAAK,IAAI,EAAE;QAC1E,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7B,UAAU,EAAE,CAAC,eAAe,CAAC;YAC7B,QAAQ,EAAE,GAAG,EAAE,CAAC,qCAA4B,UAAU,EAAC,aAAa,EAAE,KAAK,GAAqB;SACjG,CAAC,CAAC;QAEH,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;QAE5B,MAAM,MAAM,GAAG,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;QAChE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC;IAChE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newSpecPage } from '@stencil/core/testing';\nimport { NylasScheduling } from '../nylas-scheduling';\nimport { h } from '@stencil/core';\n\ndescribe('nylas-scheduling', () => {\n const REAL_DATE = Date;\n beforeEach(() => {\n // Clear and reset the mock before each test if needed\n jest.clearAllMocks();\n });\n\n beforeAll(() => {\n const originalDate = Date;\n global.Date = class extends originalDate {\n constructor(date?: string | number) {\n super(date ? date : '2022-01-01T00:00:00.000Z');\n }\n } as DateConstructor;\n });\n\n afterAll(() => {\n global.Date = REAL_DATE;\n });\n\n it('renders', async () => {\n const page = await newSpecPage({\n components: [NylasScheduling],\n html: `<nylas-scheduling></nylas-scheduling>`,\n });\n\n expect(page.root).toMatchSnapshot();\n });\n\n it('projects custom booking form into slot', async () => {\n const page = await newSpecPage({\n components: [NylasScheduling],\n html: `\n <nylas-scheduling>\n <div slot=\"custom-booking-form\">Custom Booking Form</div>\n </nylas-scheduling>\n `,\n });\n\n const customFormSlot = page?.root?.querySelector('[slot=\"custom-booking-form\"]') as HTMLDivElement;\n expect(customFormSlot.textContent).toBe('Custom Booking Form');\n });\n\n it('listens for NylasSchedulingError event and updates state', async () => {\n const page = await newSpecPage({\n components: [NylasScheduling],\n html: `<nylas-scheduling></nylas-scheduling>`,\n });\n\n const mockError = { title: 'Error', description: 'Test Error', type: 'error', category: 'component', ttl: 'none' };\n const errorEvent = new CustomEvent('NylasSchedulingError', { detail: mockError, bubbles: true });\n page.win.dispatchEvent(errorEvent);\n await page.waitForChanges();\n\n const notification = page?.root?.shadowRoot?.querySelector('nylas-notification');\n expect(notification).not.toBeNull();\n const notifRoot = notification?.shadowRoot?.querySelector('.notif');\n expect(notifRoot).not.toBeNull();\n });\n\n it('shows no error when configID is set, and no sessionID is set', async () => {\n const availability = [\n {\n emails: ['xyz@gmail.com'],\n end_time: new Date(1709303400000),\n start_time: new Date(1709301600000),\n },\n ];\n const page = await newSpecPage({\n components: [NylasScheduling],\n template: () => (\n <nylas-scheduling\n config-id=\"configid\"\n defaultSchedulerState={{\n availability,\n }}\n ></nylas-scheduling>\n ),\n });\n\n await page.waitForChanges();\n\n const notification = page?.root?.shadowRoot?.querySelector('nylas-notification');\n const notifRoot = notification?.shadowRoot?.querySelector('.notif');\n expect(notifRoot).toBeUndefined();\n });\n\n it('listens for dateSelected event and updates date label', async () => {\n const page = await newSpecPage({\n components: [NylasScheduling],\n html: `<nylas-scheduling></nylas-scheduling>`,\n });\n\n const selectedDate = new Date();\n const dateSelectedEvent = new CustomEvent('dateSelected', { detail: selectedDate, bubbles: true });\n page.win.dispatchEvent(dateSelectedEvent);\n await page.waitForChanges();\n\n const selectedDateLabel = page?.root?.shadowRoot?.querySelector('#selectedDate');\n expect(selectedDateLabel?.textContent).toBe(selectedDate.toLocaleDateString(undefined, { dateStyle: 'full' }));\n });\n\n it('conditionally renders cancel flow based on cancelBookingId prop', async () => {\n const page = await newSpecPage({\n components: [NylasScheduling],\n html: `<nylas-scheduling cancel-booking-id=\"123\"></nylas-scheduling>`,\n });\n\n await page.waitForChanges();\n const cancelFlowPage = page?.root?.shadowRoot?.querySelector('.cancel-flow-page');\n expect(cancelFlowPage).not.toBeNull();\n });\n\n it('renders composable UI when mode is set to composable', async () => {\n const page = await newSpecPage({\n components: [NylasScheduling],\n html: `<nylas-scheduling mode=\"composable\">\n <nylas-if-state state=\"scheduler.eventInfo\" is-state-set=\"false\">\n <div class=\"flex\">\n <div class=\"flex flex-col gap-4 px-6 pt-4 h-[514px] w-[433px] border-slate-200 dark:border-slate-700 border-r\">\n <nylas-if-state state=\"scheduler.showBookingForm\" is-boolean=\"false\">\n <nylas-date-picker></nylas-date-picker>\n <div class=\"border-slate-200 dark:border-slate-700 border-t -mx-6 h-px\"></div>\n <nylas-locale-switch></nylas-locale-switch>\n </nylas-if-state>\n <nylas-if-state state=\"scheduler.showBookingForm\" is-boolean=\"true\">\n <div class=\"flex flex-col justify-center h-[496px]\">\n <nylas-selected-event-card></nylas-selected-event-card>\n </div>\n </nylas-if-state>\n </div>\n <div class=\"flex flex-col items-center min-w-[360px] overflow-hidden bg-slate-50 dark:bg-slate-700\">\n <nylas-if-state state=\"scheduler.showBookingForm\" is-boolean=\"false\" class=\"w-full\">\n <div class=\"flex flex-col justify-start w-full\">\n <nylas-if-state state=\"scheduler.selectableDates\" is-state-set=\"true\">\n <h2 class=\"flex items-center justify-center text-lg font-semibold w-full text-center gap-1 mb-4 mt-6 text-slate-700 dark:text-white\">\n <calendar-icon></calendar-icon>\n <nylas-if-state state=\"scheduler.selectedDate\" is-state-set=\"false\">\n <span>No date selected</span>\n </nylas-if-state>\n <nylas-if-state state=\"scheduler.selectedDate\" is-state-set=\"true\">\n <span id=\"selectedDate\"></span>\n </nylas-if-state>\n </h2>\n </nylas-if-state>\n <nylas-timeslot-picker></nylas-timeslot-picker>\n </div>\n </nylas-if-state>\n <nylas-if-state state=\"scheduler.showBookingForm\" is-boolean=\"true\" class=\"w-full\">\n <div class=\"flex flex-col justify-center h-[496px]\">\n <nylas-booking-form></nylas-booking-form>\n </div>\n </nylas-if-state>\n </div>\n </div>\n </nylas-if-state>\n </nylas-scheduling>`,\n });\n\n expect(page.root).toMatchSnapshot();\n });\n\n it('exposes getNylasSchedulingStore method and returns store', async () => {\n const page = await newSpecPage({\n components: [NylasScheduling],\n html: `<nylas-scheduling session-id=\"sessionid\"></nylas-scheduling>`,\n });\n const scheduler = page.rootInstance as NylasScheduling;\n\n const store = await scheduler.getNylasSchedulerStore();\n expect(store).toBeDefined();\n });\n\n it('exposes getNylasSchedulingConnector method and returns connector', async () => {\n const page = await newSpecPage({\n components: [NylasScheduling],\n html: `<nylas-scheduling session-id=\"sessionid\"></nylas-scheduling>`,\n });\n const scheduler = page.rootInstance as NylasScheduling;\n\n const connector = await scheduler.getNylasSchedulerConnector();\n expect(connector).toBeDefined();\n });\n\n it('should render the reschedule flow when rescheduleBookingId is set', async () => {\n const page = await newSpecPage({\n components: [NylasScheduling],\n html: `<nylas-scheduling reschedule-booking-id=\"123\"></nylas-scheduling>`,\n });\n\n await page.waitForChanges();\n\n const messageBanner = page?.root?.shadowRoot?.querySelector('.message-banner');\n expect(messageBanner).not.toBeNull();\n });\n\n it('hides the nylas logo in the footer if nylasBranding is set', async () => {\n const page = await newSpecPage({\n components: [NylasScheduling],\n template: () => <nylas-scheduling config-id=\"configid\" nylasBranding={false}></nylas-scheduling>,\n });\n\n await page.waitForChanges();\n\n const footer = page?.root?.shadowRoot?.querySelector('.footer');\n expect(footer?.textContent).not.toContain('Powered by Nylas');\n });\n});\n"]}
|
package/dist/collection/components/scheduler/nylas-selected-event-card/nylas-selected-event-card.css
CHANGED
|
@@ -22,7 +22,12 @@ sp-theme {
|
|
|
22
22
|
border-radius: var(--nylas-border-radius-2x);
|
|
23
23
|
padding: 3rem 1.5rem 1.5rem 1.5rem;
|
|
24
24
|
position: relative;
|
|
25
|
-
box-shadow: 0px 1px
|
|
25
|
+
box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.1), 0px 1px 2px 0px rgba(0, 0, 0, 0.06);
|
|
26
|
+
}
|
|
27
|
+
@media screen and (max-width: 768px) {
|
|
28
|
+
.event-card {
|
|
29
|
+
margin-bottom: 2rem;
|
|
30
|
+
}
|
|
26
31
|
}
|
|
27
32
|
|
|
28
33
|
.nylas-selected-event-card__date {
|
|
@@ -57,7 +62,12 @@ calendar-icon {
|
|
|
57
62
|
.event-timezone {
|
|
58
63
|
display: flex;
|
|
59
64
|
color: var(--nylas-base-600);
|
|
60
|
-
margin-bottom:
|
|
65
|
+
margin-bottom: 8px;
|
|
61
66
|
gap: 4px;
|
|
62
67
|
align-items: center;
|
|
68
|
+
}
|
|
69
|
+
@media screen and (max-width: 768px) {
|
|
70
|
+
.event-timezone {
|
|
71
|
+
margin-bottom: 16px;
|
|
72
|
+
}
|
|
63
73
|
}
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
.nylas-additional-participants__subtitle {
|
|
40
|
-
color: var(--nylas-base-
|
|
40
|
+
color: var(--nylas-base-600);
|
|
41
41
|
font-size: 14px;
|
|
42
42
|
font-style: normal;
|
|
43
43
|
font-weight: 400;
|
|
@@ -53,12 +53,6 @@
|
|
|
53
53
|
gap: 1rem;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
.nylas-additional-participants__block {
|
|
57
|
-
display: flex;
|
|
58
|
-
justify-content: space-between;
|
|
59
|
-
gap: 0.5rem;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
56
|
.nylas-additional-participants__input_group {
|
|
63
57
|
padding-top: 8px;
|
|
64
58
|
display: flex;
|
|
@@ -68,7 +62,7 @@
|
|
|
68
62
|
.nylas-additional-participants__input_group label {
|
|
69
63
|
display: flex;
|
|
70
64
|
align-items: center;
|
|
71
|
-
color: var(--nylas-base-
|
|
65
|
+
color: var(--nylas-base-800);
|
|
72
66
|
font-size: 14px;
|
|
73
67
|
font-style: normal;
|
|
74
68
|
font-weight: 400;
|
|
@@ -79,7 +73,7 @@
|
|
|
79
73
|
display: flex;
|
|
80
74
|
border-width: 1;
|
|
81
75
|
border-radius: 8px;
|
|
82
|
-
border: 1px solid var(--
|
|
76
|
+
border: 1px solid var(--nylas-base-300);
|
|
83
77
|
}
|
|
84
78
|
.nylas-additional-participants__input_wrapper button {
|
|
85
79
|
padding: 12px;
|
|
@@ -92,13 +86,13 @@
|
|
|
92
86
|
}
|
|
93
87
|
|
|
94
88
|
.nylas-additional-participants__input_wrapper_organizer {
|
|
95
|
-
background: var(--
|
|
89
|
+
background: var(--nylas-base-50);
|
|
96
90
|
}
|
|
97
91
|
|
|
98
92
|
.nylas-additional-participants__input {
|
|
99
93
|
flex: 1;
|
|
100
94
|
padding: 12px 16px;
|
|
101
|
-
border-right: 1px solid var(--
|
|
95
|
+
border-right: 1px solid var(--nylas-base-300);
|
|
102
96
|
}
|
|
103
97
|
.nylas-additional-participants__input input {
|
|
104
98
|
border: none;
|
|
@@ -107,11 +101,6 @@
|
|
|
107
101
|
width: 100%;
|
|
108
102
|
}
|
|
109
103
|
|
|
110
|
-
.nylas-additional-participants__input_wrapper_invalid {
|
|
111
|
-
border: 1px solid var(--nylas-error, #cc4841);
|
|
112
|
-
color: var(--Nylas-base-Nylas-base-400, #717bbc);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
104
|
.nylas-additional-participants__add {
|
|
116
105
|
padding: 12px;
|
|
117
106
|
display: flex;
|