@nylas/web-elements 1.1.0-canary.16 → 1.1.0-canary.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/add-circle-icon.cjs.entry.js +1 -1
- package/dist/cjs/add-circle-icon_2.cjs.entry.js +2 -2
- package/dist/cjs/archive-icon.cjs.entry.js +1 -1
- package/dist/cjs/archive-icon_7.cjs.entry.js +7 -7
- package/dist/cjs/arrow-icon.cjs.entry.js +1 -1
- package/dist/cjs/bold-icon.cjs.entry.js +1 -1
- package/dist/cjs/bold-icon_3.cjs.entry.js +3 -3
- package/dist/cjs/button-component.cjs.entry.js +1 -1
- package/dist/cjs/calendar-cancel-icon.cjs.entry.js +1 -1
- package/dist/cjs/calendar-check-icon.cjs.entry.js +1 -1
- package/dist/cjs/calendar-check-icon_2.cjs.entry.js +2 -2
- package/dist/cjs/calendar-icon.cjs.entry.js +1 -1
- package/dist/cjs/calendar-info-icon.cjs.entry.js +1 -1
- package/dist/cjs/{calendar-info-icon_27.cjs.entry.js → calendar-info-icon_28.cjs.entry.js} +304 -416
- package/dist/cjs/calendar-info-icon_28.cjs.entry.js.map +1 -0
- package/dist/cjs/calendar-patterns-icon.cjs.entry.js +1 -1
- package/dist/cjs/checkbox-component.cjs.entry.js +1 -1
- package/dist/cjs/checkbox-component.cjs.entry.js.map +1 -1
- package/dist/cjs/checkmark-circle-icon.cjs.entry.js +1 -1
- package/dist/cjs/chevron-icon.cjs.entry.js +1 -1
- package/dist/cjs/chevron-icon_3.cjs.entry.js +5 -5
- package/dist/cjs/chevron-icon_3.cjs.entry.js.map +1 -1
- package/dist/cjs/clock-icon.cjs.entry.js +1 -1
- package/dist/cjs/clock-icon_2.cjs.entry.js +2 -2
- package/dist/cjs/close-icon.cjs.entry.js +1 -1
- package/dist/cjs/document-refresh-icon.cjs.entry.js +1 -1
- package/dist/cjs/flow-icon.cjs.entry.js +1 -1
- package/dist/cjs/folder-icon.cjs.entry.js +1 -1
- package/dist/cjs/forward-icon.cjs.entry.js +1 -1
- package/dist/cjs/forward-icon_6.cjs.entry.js +7 -7
- package/dist/cjs/globe-icon.cjs.entry.js +1 -1
- package/dist/cjs/google-logo-icon.cjs.entry.js +1 -1
- package/dist/cjs/google-logo-icon_4.cjs.entry.js +112 -77
- package/dist/cjs/google-logo-icon_4.cjs.entry.js.map +1 -1
- package/dist/cjs/inbox-icon.cjs.entry.js +1 -1
- package/dist/cjs/index-7af03e3f.js +10 -10
- package/dist/cjs/index-c14ea8f5.js +18 -14
- package/dist/cjs/info-icon.cjs.entry.js +1 -1
- package/dist/cjs/info-icon_2.cjs.entry.js +2 -2
- package/dist/cjs/input-component.cjs.entry.js +1 -1
- package/dist/cjs/input-dropdown.cjs.entry.js +13 -3
- package/dist/cjs/input-dropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/input-dropdown_2.cjs.entry.js +14 -4
- package/dist/cjs/input-dropdown_2.cjs.entry.js.map +1 -1
- package/dist/cjs/italic-icon.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/loading-icon.cjs.entry.js +1 -1
- package/dist/cjs/location-icon.cjs.entry.js +1 -1
- package/dist/cjs/location-off-icon.cjs.entry.js +1 -1
- package/dist/cjs/microsoft-logo-icon.cjs.entry.js +1 -1
- package/dist/cjs/multi-select-dropdown.cjs.entry.js +2 -2
- package/dist/cjs/nylas-additional-participants.cjs.entry.js +16 -12
- package/dist/cjs/nylas-additional-participants.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-availability-picker.cjs.entry.js +27 -16
- package/dist/cjs/nylas-availability-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-booked-event-card_10.cjs.entry.js +11 -11
- package/dist/cjs/nylas-booked-event-card_10.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-booking-form.cjs.entry.js +2 -2
- package/dist/cjs/nylas-cancel-booking-form.cjs.entry.js +1 -1
- package/dist/cjs/nylas-cancellation-policy.cjs.entry.js +1 -1
- package/dist/cjs/nylas-cancelled-event-card.cjs.entry.js +1 -1
- package/dist/cjs/nylas-composer.cjs.entry.js +1 -1
- package/dist/cjs/nylas-custom-booking-flow.cjs.entry.js +1 -1
- package/dist/cjs/nylas-customize-booking-settings.cjs.entry.js +1 -1
- package/dist/cjs/nylas-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/nylas-date-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-editor-tabs.cjs.entry.js +110 -75
- package/dist/cjs/nylas-editor-tabs.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-event-description.cjs.entry.js +1 -1
- package/dist/cjs/nylas-event-duration.cjs.entry.js +1 -1
- package/dist/cjs/nylas-event-info.cjs.entry.js +1 -1
- package/dist/cjs/nylas-event-limits.cjs.entry.js +1 -1
- package/dist/cjs/nylas-event-location.cjs.entry.js +3 -3
- package/dist/cjs/nylas-event-title.cjs.entry.js +2 -2
- package/dist/cjs/nylas-form-card.cjs.entry.js +1 -1
- package/dist/cjs/nylas-if-state.cjs.entry.js +1 -1
- package/dist/cjs/nylas-limit-future-bookings.cjs.entry.js +1 -1
- package/dist/cjs/nylas-list-folders.cjs.entry.js +1 -1
- package/dist/cjs/nylas-list-threads.cjs.entry.js +1 -1
- package/dist/cjs/nylas-locale-switch.cjs.entry.js +3 -3
- package/dist/cjs/nylas-login.cjs.entry.js +1 -1
- package/dist/cjs/nylas-logo.cjs.entry.js +1 -1
- package/dist/cjs/nylas-mailbox-toolbar-button.cjs.entry.js +1 -1
- package/dist/cjs/nylas-mailbox.cjs.entry.js +1 -1
- package/dist/cjs/nylas-min-booking-notice.cjs.entry.js +1 -1
- package/dist/cjs/nylas-min-cancellation-notice.cjs.entry.js +1 -1
- package/dist/cjs/nylas-notification.cjs.entry.js +1 -1
- package/dist/cjs/nylas-participants-custom-availability.cjs.entry.js +142 -0
- package/dist/cjs/nylas-participants-custom-availability.cjs.entry.js.map +1 -0
- package/dist/cjs/nylas-provider.cjs.entry.js +1 -1
- package/dist/cjs/nylas-scheduler-editor.cjs.entry.js +1 -1
- package/dist/cjs/nylas-selected-event-card.cjs.entry.js +1 -1
- package/dist/cjs/nylas-summarize-message-button.cjs.entry.js +2 -2
- package/dist/cjs/nylas-threads-refresh.cjs.entry.js +2 -2
- package/dist/cjs/nylas-threads-search.cjs.entry.js +1 -1
- package/dist/cjs/nylas-time-window-picker.cjs.entry.js +1 -1
- package/dist/cjs/nylas-timeslot-interval.cjs.entry.js +2 -2
- package/dist/cjs/nylas-view-email.cjs.entry.js +1 -1
- package/dist/cjs/nylas-view-thread.cjs.entry.js +1 -1
- package/dist/cjs/nylas-web-elements.cjs.js +1 -1
- package/dist/cjs/people-icon.cjs.entry.js +1 -1
- package/dist/cjs/person-icon.cjs.entry.js +1 -1
- package/dist/cjs/play-icon.cjs.entry.js +1 -1
- package/dist/cjs/play-icon_2.cjs.entry.js +2 -2
- package/dist/cjs/radio-button-group.cjs.entry.js +1 -1
- package/dist/cjs/refresh-icon.cjs.entry.js +1 -1
- package/dist/cjs/reply-all-icon.cjs.entry.js +1 -1
- package/dist/cjs/reply-icon.cjs.entry.js +1 -1
- package/dist/cjs/search-icon.cjs.entry.js +1 -1
- package/dist/cjs/select-dropdown.cjs.entry.js +3 -3
- package/dist/cjs/select-dropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/sent-icon.cjs.entry.js +1 -1
- package/dist/cjs/spam-icon.cjs.entry.js +1 -1
- package/dist/cjs/star-icon.cjs.entry.js +1 -1
- package/dist/cjs/stop-icon.cjs.entry.js +1 -1
- package/dist/cjs/textarea-component.cjs.entry.js +1 -1
- package/dist/cjs/time-period-selector.cjs.entry.js +1 -1
- package/dist/cjs/toggle-switch.cjs.entry.js +1 -1
- package/dist/cjs/toggle-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/tooltip-component.cjs.entry.js +1 -1
- package/dist/cjs/translate-icon.cjs.entry.js +1 -1
- package/dist/cjs/trash-icon.cjs.entry.js +1 -1
- package/dist/cjs/underline-icon.cjs.entry.js +1 -1
- package/dist/cjs/warning-icon.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- 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/clock.js +1 -1
- package/dist/collection/common/icons/close.js +1 -1
- package/dist/collection/common/icons/document-refresh.js +1 -1
- package/dist/collection/common/icons/flow.js +1 -1
- package/dist/collection/common/icons/folder.js +1 -1
- package/dist/collection/common/icons/forward.js +1 -1
- package/dist/collection/common/icons/globe.js +1 -1
- package/dist/collection/common/icons/google-logo.js +1 -1
- package/dist/collection/common/icons/inbox.js +1 -1
- package/dist/collection/common/icons/info.js +1 -1
- package/dist/collection/common/icons/italic.js +1 -1
- package/dist/collection/common/icons/loading.js +1 -1
- package/dist/collection/common/icons/location-off.js +1 -1
- package/dist/collection/common/icons/location.js +1 -1
- package/dist/collection/common/icons/microsoft-logo.js +1 -1
- package/dist/collection/common/icons/nylas-logo.js +1 -1
- package/dist/collection/common/icons/people.js +1 -1
- package/dist/collection/common/icons/person.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/components/design-system/button-component/button-component.js +1 -1
- package/dist/collection/components/design-system/checkbox-component/checkbox-component.js +1 -1
- package/dist/collection/components/design-system/checkbox-component/checkbox-component.js.map +1 -1
- package/dist/collection/components/design-system/input-component/input-component.js +1 -1
- package/dist/collection/components/design-system/input-dropdown/input-dropdown.js +31 -3
- package/dist/collection/components/design-system/input-dropdown/input-dropdown.js.map +1 -1
- package/dist/collection/components/design-system/multi-select-dropdown/multi-select-dropdown.js +2 -2
- package/dist/collection/components/design-system/radio-button-group/radio-button-group.js +1 -1
- package/dist/collection/components/design-system/select-dropdown/select-dropdown.js +3 -3
- package/dist/collection/components/design-system/select-dropdown/select-dropdown.js.map +1 -1
- package/dist/collection/components/design-system/textarea-component/textarea-component.js +1 -1
- package/dist/collection/components/design-system/time-period-selector/time-period-selector.js +1 -1
- package/dist/collection/components/design-system/toggle-switch/toggle-switch.js +1 -1
- package/dist/collection/components/design-system/toggle-switch/toggle-switch.js.map +1 -1
- package/dist/collection/components/design-system/tooltip-component/toolitp-component.js +1 -1
- package/dist/collection/components/mailbox/nylas-composer/nylas-composer.js +1 -1
- package/dist/collection/components/mailbox/nylas-list-folders/nylas-list-folders.js +1 -1
- package/dist/collection/components/mailbox/nylas-list-threads/nylas-list-threads.js +1 -1
- package/dist/collection/components/mailbox/nylas-mailbox/nylas-mailbox.js +1 -1
- package/dist/collection/components/mailbox/nylas-mailbox-toolbar-button/nylas-mailbox-toolbar-button.js +1 -1
- package/dist/collection/components/mailbox/nylas-summarize-message-button/nylas-summarize-message-button.js +2 -2
- package/dist/collection/components/mailbox/nylas-threads-refresh/nylas-threads-refresh.js +2 -2
- package/dist/collection/components/mailbox/nylas-threads-search/nylas-threads-search.js +1 -1
- package/dist/collection/components/mailbox/nylas-view-email/nylas-view-email.js +1 -1
- package/dist/collection/components/mailbox/nylas-view-thread/nylas-view-thread.js +1 -1
- package/dist/collection/components/nylas-if-state/nylas-if-state.js +1 -1
- package/dist/collection/components/nylas-login/nylas-login.js +1 -1
- package/dist/collection/components/nylas-provider/nylas-provider.js +1 -1
- package/dist/collection/components/scheduler/nylas-booking-form/nylas-booking-form.js +2 -2
- 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.js +1 -1
- package/dist/collection/components/scheduler/nylas-date-picker/nylas-date-picker.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-locale-switch/nylas-locale-switch.js +3 -3
- package/dist/collection/components/scheduler/nylas-notification/nylas-notification.js +1 -1
- package/dist/collection/components/scheduler/nylas-selected-event-card/nylas-selected-event-card.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.js +33 -12
- package/dist/collection/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.css +1 -1
- package/dist/collection/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.js +48 -25
- package/dist/collection/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-cancellation-policy/nylas-cancellation-policy.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-custom-booking-flow/nylas-custom-booking-flow.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-customize-booking-settings/nylas-customize-booking-settings.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.js +108 -74
- 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 +1 -1
- package/dist/collection/components/scheduler-editor/nylas-editor-tabs/tab-contents.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-description/nylas-event-description.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-duration/nylas-event-duration.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-info/nylas-event-info.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-limits/nylas-event-limits.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-location/nylas-event-location.js +3 -3
- package/dist/collection/components/scheduler-editor/nylas-event-title/nylas-event-title.js +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.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-min-booking-notice/nylas-min-booking-notice.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-min-cancellation-notice/nylas-min-cancellation-notice.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.css +98 -0
- package/dist/collection/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.js +219 -0
- package/dist/collection/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.js.map +1 -0
- package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.js +2 -2
- package/dist/collection/components/scheduler-editor/nylas-time-window-picker/nylas-time-window-picker.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-timeslot-interval/nylas-timeslot-interval.js +2 -2
- package/dist/components/add-circle.js +1 -1
- package/dist/components/archive.js +1 -1
- package/dist/components/arrow.js +1 -1
- package/dist/components/bold.js +1 -1
- package/dist/components/button-component2.js +1 -1
- package/dist/components/calendar-cancel.js +1 -1
- package/dist/components/calendar-check.js +1 -1
- package/dist/components/calendar-info.js +1 -1
- package/dist/components/calendar-patterns.js +1 -1
- package/dist/components/calendar.js +1 -1
- package/dist/components/checkbox-component2.js +1 -1
- package/dist/components/checkbox-component2.js.map +1 -1
- package/dist/components/checkmark-circle.js +1 -1
- package/dist/components/chevron.js +1 -1
- package/dist/components/clock.js +1 -1
- package/dist/components/close.js +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.js +1 -1
- package/dist/components/inbox.js +1 -1
- package/dist/components/info.js +1 -1
- package/dist/components/input-component2.js +1 -1
- package/dist/components/input-dropdown2.js +14 -3
- package/dist/components/input-dropdown2.js.map +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/microsoft-logo.js +1 -1
- package/dist/components/multi-select-dropdown2.js +2 -2
- package/dist/components/nylas-additional-participants2.js +17 -13
- package/dist/components/nylas-additional-participants2.js.map +1 -1
- package/dist/components/nylas-availability-picker2.js +28 -16
- package/dist/components/nylas-availability-picker2.js.map +1 -1
- package/dist/components/nylas-booking-form2.js +2 -2
- package/dist/components/nylas-cancel-booking-form2.js +1 -1
- package/dist/components/nylas-cancellation-policy2.js +1 -1
- package/dist/components/nylas-cancelled-event-card2.js +1 -1
- package/dist/components/nylas-composer2.js +1 -1
- package/dist/components/nylas-custom-booking-flow.js +1 -1
- package/dist/components/nylas-customize-booking-settings2.js +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 +200 -153
- package/dist/components/nylas-editor-tabs2.js.map +1 -1
- package/dist/components/nylas-event-description2.js +1 -1
- package/dist/components/nylas-event-duration2.js +1 -1
- package/dist/components/nylas-event-info2.js +1 -1
- package/dist/components/nylas-event-limits2.js +1 -1
- package/dist/components/nylas-event-location2.js +3 -3
- package/dist/components/nylas-event-title2.js +2 -2
- package/dist/components/nylas-form-card2.js +1 -1
- package/dist/components/nylas-if-state.js +1 -1
- package/dist/components/nylas-limit-future-bookings2.js +1 -1
- package/dist/components/nylas-list-folders.js +1 -1
- package/dist/components/nylas-list-threads.js +1 -1
- package/dist/components/nylas-locale-switch2.js +3 -3
- package/dist/components/nylas-login.js +1 -1
- package/dist/components/nylas-logo2.js +1 -1
- package/dist/components/nylas-mailbox-toolbar-button.js +1 -1
- package/dist/components/nylas-mailbox.js +1 -1
- package/dist/components/nylas-min-booking-notice2.js +1 -1
- package/dist/components/nylas-min-cancellation-notice2.js +1 -1
- package/dist/components/nylas-notification2.js +1 -1
- package/dist/components/nylas-participants-custom-availability.d.ts +11 -0
- package/dist/components/nylas-participants-custom-availability.js +8 -0
- package/dist/components/nylas-participants-custom-availability.js.map +1 -0
- package/dist/components/nylas-participants-custom-availability2.js +218 -0
- package/dist/components/nylas-participants-custom-availability2.js.map +1 -0
- package/dist/components/nylas-provider.js +1 -1
- package/dist/components/nylas-scheduler-editor.js +101 -89
- package/dist/components/nylas-scheduler-editor.js.map +1 -1
- package/dist/components/nylas-selected-event-card2.js +1 -1
- package/dist/components/nylas-summarize-message-button2.js +2 -2
- package/dist/components/nylas-threads-refresh.js +2 -2
- package/dist/components/nylas-threads-search.js +1 -1
- package/dist/components/nylas-time-window-picker2.js +1 -1
- package/dist/components/nylas-timeslot-interval2.js +2 -2
- package/dist/components/nylas-view-email2.js +1 -1
- package/dist/components/nylas-view-thread.js +1 -1
- package/dist/components/people.js +1 -1
- package/dist/components/person.js +1 -1
- package/dist/components/play.js +1 -1
- package/dist/components/radio-button-group2.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/search.js +1 -1
- package/dist/components/select-dropdown2.js +3 -3
- package/dist/components/select-dropdown2.js.map +1 -1
- package/dist/components/sent.js +1 -1
- package/dist/components/spam.js +1 -1
- package/dist/components/star.js +1 -1
- package/dist/components/stop.js +1 -1
- package/dist/components/textarea-component.js +1 -1
- package/dist/components/time-period-selector2.js +1 -1
- package/dist/components/toggle-switch.js +1 -49
- package/dist/components/toggle-switch.js.map +1 -1
- package/dist/components/toggle-switch2.js +53 -0
- package/dist/components/toggle-switch2.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 +1 -1
- package/dist/esm/add-circle-icon_2.entry.js +2 -2
- package/dist/esm/archive-icon.entry.js +1 -1
- package/dist/esm/archive-icon_7.entry.js +7 -7
- package/dist/esm/arrow-icon.entry.js +1 -1
- package/dist/esm/bold-icon.entry.js +1 -1
- package/dist/esm/bold-icon_3.entry.js +3 -3
- package/dist/esm/button-component.entry.js +1 -1
- package/dist/esm/calendar-cancel-icon.entry.js +1 -1
- package/dist/esm/calendar-check-icon.entry.js +1 -1
- package/dist/esm/calendar-check-icon_2.entry.js +2 -2
- package/dist/esm/calendar-icon.entry.js +1 -1
- package/dist/esm/calendar-info-icon.entry.js +1 -1
- package/dist/esm/{calendar-info-icon_27.entry.js → calendar-info-icon_28.entry.js} +304 -417
- package/dist/esm/calendar-info-icon_28.entry.js.map +1 -0
- package/dist/esm/calendar-patterns-icon.entry.js +1 -1
- package/dist/esm/checkbox-component.entry.js +1 -1
- package/dist/esm/checkbox-component.entry.js.map +1 -1
- package/dist/esm/checkmark-circle-icon.entry.js +1 -1
- package/dist/esm/chevron-icon.entry.js +1 -1
- package/dist/esm/chevron-icon_3.entry.js +5 -5
- package/dist/esm/chevron-icon_3.entry.js.map +1 -1
- package/dist/esm/clock-icon.entry.js +1 -1
- package/dist/esm/clock-icon_2.entry.js +2 -2
- package/dist/esm/close-icon.entry.js +1 -1
- package/dist/esm/document-refresh-icon.entry.js +1 -1
- package/dist/esm/flow-icon.entry.js +1 -1
- package/dist/esm/folder-icon.entry.js +1 -1
- package/dist/esm/forward-icon.entry.js +1 -1
- package/dist/esm/forward-icon_6.entry.js +7 -7
- package/dist/esm/globe-icon.entry.js +1 -1
- package/dist/esm/google-logo-icon.entry.js +1 -1
- package/dist/esm/google-logo-icon_4.entry.js +112 -77
- package/dist/esm/google-logo-icon_4.entry.js.map +1 -1
- package/dist/esm/inbox-icon.entry.js +1 -1
- package/dist/esm/index-582cfc93.js +18 -14
- package/dist/esm/index-7cb0dd3d.js +10 -10
- package/dist/esm/{index.es-896126fc.js → index.es-c5a8a1ac.js} +2 -2
- package/dist/esm/{index.es-896126fc.js.map → index.es-c5a8a1ac.js.map} +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/info-icon.entry.js +1 -1
- package/dist/esm/info-icon_2.entry.js +2 -2
- package/dist/esm/input-component.entry.js +1 -1
- package/dist/esm/input-dropdown.entry.js +13 -3
- package/dist/esm/input-dropdown.entry.js.map +1 -1
- package/dist/esm/input-dropdown_2.entry.js +14 -4
- package/dist/esm/input-dropdown_2.entry.js.map +1 -1
- package/dist/esm/italic-icon.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/loading-icon.entry.js +1 -1
- package/dist/esm/location-icon.entry.js +1 -1
- package/dist/esm/location-off-icon.entry.js +1 -1
- package/dist/esm/{mailbox-store-c9b2a4fd.js → mailbox-store-94133e15.js} +3 -3
- package/dist/esm/{mailbox-store-c9b2a4fd.js.map → mailbox-store-94133e15.js.map} +1 -1
- package/dist/esm/microsoft-logo-icon.entry.js +1 -1
- package/dist/esm/multi-select-dropdown.entry.js +3 -3
- package/dist/esm/nylas-additional-participants.entry.js +19 -15
- package/dist/esm/nylas-additional-participants.entry.js.map +1 -1
- package/dist/esm/{nylas-api-request-27e81d64.js → nylas-api-request-5ac7887c.js} +2 -2
- package/dist/esm/{nylas-api-request-27e81d64.js.map → nylas-api-request-5ac7887c.js.map} +1 -1
- package/dist/esm/nylas-availability-picker.entry.js +29 -18
- package/dist/esm/nylas-availability-picker.entry.js.map +1 -1
- package/dist/esm/nylas-booked-event-card.entry.js +2 -2
- package/dist/esm/nylas-booked-event-card_10.entry.js +11 -11
- package/dist/esm/nylas-booked-event-card_10.entry.js.map +1 -1
- package/dist/esm/nylas-booking-calendar-picker.entry.js +2 -2
- package/dist/esm/nylas-booking-form.entry.js +4 -4
- package/dist/esm/nylas-buffer-time.entry.js +2 -2
- package/dist/esm/nylas-calendar-picker.entry.js +2 -2
- package/dist/esm/nylas-cancel-booking-form.entry.js +3 -3
- package/dist/esm/nylas-cancellation-policy.entry.js +3 -3
- 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-customize-booking-settings.entry.js +3 -3
- 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 +112 -77
- 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-duration.entry.js +3 -3
- package/dist/esm/nylas-event-info.entry.js +3 -3
- package/dist/esm/nylas-event-limits.entry.js +3 -3
- package/dist/esm/nylas-event-location.entry.js +5 -5
- package/dist/esm/nylas-event-title.entry.js +4 -4
- package/dist/esm/nylas-form-card.entry.js +3 -3
- package/dist/esm/nylas-if-state.entry.js +3 -3
- package/dist/esm/nylas-limit-future-bookings.entry.js +3 -3
- package/dist/esm/nylas-list-configurations.entry.js +2 -2
- 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 +5 -5
- package/dist/esm/nylas-login.entry.js +3 -3
- package/dist/esm/nylas-logo.entry.js +1 -1
- 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 +4 -4
- package/dist/esm/nylas-min-booking-notice.entry.js +3 -3
- package/dist/esm/nylas-min-cancellation-notice.entry.js +3 -3
- package/dist/esm/nylas-notification.entry.js +2 -2
- package/dist/esm/nylas-participants-custom-availability.entry.js +138 -0
- package/dist/esm/nylas-participants-custom-availability.entry.js.map +1 -0
- package/dist/esm/nylas-provider.entry.js +5 -5
- package/dist/esm/nylas-scheduler-editor.entry.js +4 -4
- package/dist/esm/nylas-scheduling.entry.js +3 -3
- package/dist/esm/nylas-selected-event-card.entry.js +3 -3
- 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 +2 -2
- package/dist/esm/nylas-timeslot-interval.entry.js +4 -4
- package/dist/esm/nylas-timeslot-picker.entry.js +2 -2
- 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 +1 -1
- package/dist/esm/people-icon.entry.js +1 -1
- package/dist/esm/person-icon.entry.js +1 -1
- package/dist/esm/play-icon.entry.js +1 -1
- package/dist/esm/play-icon_2.entry.js +2 -2
- package/dist/esm/radio-button-group.entry.js +1 -1
- package/dist/esm/refresh-icon.entry.js +1 -1
- package/dist/esm/{register-component-6ae95538.js → register-component-aef40ec4.js} +2 -2
- package/dist/esm/{register-component-6ae95538.js.map → register-component-aef40ec4.js.map} +1 -1
- package/dist/esm/reply-all-icon.entry.js +1 -1
- package/dist/esm/reply-icon.entry.js +1 -1
- package/dist/esm/{scheduler-store-17f7f1c8.js → scheduler-store-6c4866d6.js} +2 -2
- package/dist/{nylas-web-elements/scheduler-store-17f7f1c8.js.map → esm/scheduler-store-6c4866d6.js.map} +1 -1
- package/dist/esm/search-icon.entry.js +1 -1
- package/dist/esm/select-dropdown.entry.js +3 -3
- package/dist/esm/select-dropdown.entry.js.map +1 -1
- package/dist/esm/sent-icon.entry.js +1 -1
- package/dist/esm/spam-icon.entry.js +1 -1
- package/dist/esm/star-icon.entry.js +1 -1
- package/dist/esm/stop-icon.entry.js +1 -1
- package/dist/esm/textarea-component.entry.js +1 -1
- package/dist/esm/time-period-selector.entry.js +2 -2
- package/dist/esm/toggle-switch.entry.js +1 -1
- package/dist/esm/toggle-switch.entry.js.map +1 -1
- package/dist/esm/tooltip-component.entry.js +1 -1
- package/dist/esm/translate-icon.entry.js +1 -1
- package/dist/esm/trash-icon.entry.js +1 -1
- package/dist/esm/underline-icon.entry.js +1 -1
- package/dist/{nylas-web-elements/utils-49a1d17b.js → esm/utils-04c10cbd.js} +2 -2
- package/dist/esm/{utils-49a1d17b.js.map → utils-04c10cbd.js.map} +1 -1
- package/dist/esm/warning-icon.entry.js +1 -1
- package/dist/nylas-web-elements/add-circle-icon.entry.js +1 -1
- package/dist/nylas-web-elements/archive-icon.entry.js +1 -1
- package/dist/nylas-web-elements/arrow-icon.entry.js +1 -1
- package/dist/nylas-web-elements/bold-icon.entry.js +1 -1
- package/dist/nylas-web-elements/button-component.entry.js +1 -1
- package/dist/nylas-web-elements/calendar-cancel-icon.entry.js +1 -1
- package/dist/nylas-web-elements/calendar-check-icon.entry.js +1 -1
- package/dist/nylas-web-elements/calendar-icon.entry.js +1 -1
- package/dist/nylas-web-elements/calendar-info-icon.entry.js +1 -1
- package/dist/nylas-web-elements/calendar-patterns-icon.entry.js +1 -1
- package/dist/nylas-web-elements/checkbox-component.entry.js +1 -1
- package/dist/nylas-web-elements/checkbox-component.entry.js.map +1 -1
- package/dist/nylas-web-elements/checkmark-circle-icon.entry.js +1 -1
- package/dist/nylas-web-elements/chevron-icon.entry.js +1 -1
- package/dist/nylas-web-elements/clock-icon.entry.js +1 -1
- package/dist/nylas-web-elements/close-icon.entry.js +1 -1
- package/dist/nylas-web-elements/document-refresh-icon.entry.js +1 -1
- package/dist/nylas-web-elements/flow-icon.entry.js +1 -1
- package/dist/nylas-web-elements/folder-icon.entry.js +1 -1
- package/dist/nylas-web-elements/forward-icon.entry.js +1 -1
- package/dist/nylas-web-elements/globe-icon.entry.js +1 -1
- package/dist/nylas-web-elements/google-logo-icon.entry.js +1 -1
- package/dist/nylas-web-elements/inbox-icon.entry.js +1 -1
- package/dist/nylas-web-elements/{index.es-896126fc.js → index.es-c5a8a1ac.js} +2 -2
- package/dist/nylas-web-elements/{index.es-896126fc.js.map → index.es-c5a8a1ac.js.map} +1 -1
- package/dist/nylas-web-elements/index.esm.js +2 -2
- package/dist/nylas-web-elements/info-icon.entry.js +1 -1
- package/dist/nylas-web-elements/input-component.entry.js +1 -1
- package/dist/nylas-web-elements/input-dropdown.entry.js +13 -3
- package/dist/nylas-web-elements/input-dropdown.entry.js.map +1 -1
- package/dist/nylas-web-elements/italic-icon.entry.js +1 -1
- package/dist/nylas-web-elements/loading-icon.entry.js +1 -1
- package/dist/nylas-web-elements/location-icon.entry.js +1 -1
- package/dist/nylas-web-elements/location-off-icon.entry.js +1 -1
- package/dist/nylas-web-elements/{mailbox-store-c9b2a4fd.js → mailbox-store-94133e15.js} +3 -3
- package/dist/nylas-web-elements/{mailbox-store-c9b2a4fd.js.map → mailbox-store-94133e15.js.map} +1 -1
- package/dist/nylas-web-elements/microsoft-logo-icon.entry.js +1 -1
- package/dist/nylas-web-elements/multi-select-dropdown.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-additional-participants.entry.js +19 -15
- package/dist/nylas-web-elements/nylas-additional-participants.entry.js.map +1 -1
- package/dist/nylas-web-elements/{nylas-api-request-27e81d64.js → nylas-api-request-5ac7887c.js} +2 -2
- package/dist/nylas-web-elements/{nylas-api-request-27e81d64.js.map → nylas-api-request-5ac7887c.js.map} +1 -1
- package/dist/nylas-web-elements/nylas-availability-picker.entry.js +29 -18
- package/dist/nylas-web-elements/nylas-availability-picker.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-booked-event-card.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-booking-calendar-picker.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-booking-form.entry.js +4 -4
- package/dist/nylas-web-elements/nylas-buffer-time.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-calendar-picker.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-cancel-booking-form.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-cancellation-policy.entry.js +3 -3
- 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-customize-booking-settings.entry.js +3 -3
- 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 +112 -77
- 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-duration.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-event-info.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-event-limits.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-event-location.entry.js +5 -5
- package/dist/nylas-web-elements/nylas-event-title.entry.js +4 -4
- package/dist/nylas-web-elements/nylas-form-card.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-if-state.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-limit-future-bookings.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-list-configurations.entry.js +2 -2
- 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 +5 -5
- package/dist/nylas-web-elements/nylas-login.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-logo.entry.js +1 -1
- 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 +4 -4
- package/dist/nylas-web-elements/nylas-min-booking-notice.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-min-cancellation-notice.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-notification.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-participants-custom-availability.entry.js +138 -0
- package/dist/nylas-web-elements/nylas-participants-custom-availability.entry.js.map +1 -0
- package/dist/nylas-web-elements/nylas-provider.entry.js +5 -5
- package/dist/nylas-web-elements/nylas-scheduler-editor.entry.js +4 -4
- package/dist/nylas-web-elements/nylas-scheduling.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-selected-event-card.entry.js +3 -3
- 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 +2 -2
- package/dist/nylas-web-elements/nylas-timeslot-interval.entry.js +4 -4
- package/dist/nylas-web-elements/nylas-timeslot-picker.entry.js +2 -2
- 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 +1 -1
- package/dist/nylas-web-elements/{p-4b84ab3f.entry.js → p-061d0ae2.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-de63bc35.entry.js → p-08d75d35.entry.js} +2 -2
- package/dist/nylas-web-elements/p-0d98c728.entry.js +2 -0
- package/dist/nylas-web-elements/p-0d98c728.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-12b83ea9.entry.js +2 -0
- package/dist/nylas-web-elements/{p-0dbc0c01.entry.js.map → p-12b83ea9.entry.js.map} +1 -1
- package/dist/nylas-web-elements/{p-98a2f588.entry.js → p-16a3bfb2.entry.js} +2 -2
- package/dist/nylas-web-elements/p-246983ed.entry.js +2 -0
- package/dist/nylas-web-elements/p-246983ed.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-4b1466b3.entry.js → p-25c97a60.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-395f49eb.entry.js → p-28512ab6.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-b27e34a9.entry.js → p-2f148064.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-120d2c72.entry.js → p-3175cae0.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-4fdc6122.entry.js → p-34f0d1fe.entry.js} +2 -2
- package/dist/nylas-web-elements/p-37f41a90.entry.js +2 -0
- package/dist/nylas-web-elements/{p-2f656fb3.entry.js → p-39160c0d.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-da21471c.entry.js → p-3f435fab.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-27db7b0b.entry.js → p-5231fc13.entry.js} +3 -3
- package/dist/nylas-web-elements/{p-deafc6bc.entry.js → p-5c3c1888.entry.js} +2 -2
- package/dist/nylas-web-elements/p-60b03f86.entry.js +2 -0
- package/dist/nylas-web-elements/{p-09fec39c.entry.js → p-65097f45.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-e4a7746d.entry.js → p-6ce66add.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-ec26560f.entry.js → p-6ef1024f.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-ace74b9d.entry.js → p-7a95bc3f.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-bfd3b5f0.entry.js → p-7ce048c0.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-a7dd4c24.entry.js → p-8e63b66c.entry.js} +2 -2
- package/dist/nylas-web-elements/p-958746a1.entry.js +2 -0
- package/dist/nylas-web-elements/{p-53da3000.entry.js.map → p-958746a1.entry.js.map} +1 -1
- package/dist/nylas-web-elements/{p-11f94952.entry.js → p-a800e7af.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-13b003b5.entry.js → p-a85408e0.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-c8c737ed.entry.js → p-aeb1c91c.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-6e888067.entry.js → p-b0c8021f.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-6891ad5d.entry.js → p-b2aca6c4.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-b9064de4.entry.js → p-b334d63b.entry.js} +2 -2
- package/dist/nylas-web-elements/p-b4d09fcf.entry.js +2 -0
- package/dist/nylas-web-elements/p-b4d09fcf.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-470536e0.entry.js → p-b9559f06.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-470536e0.entry.js.map → p-b9559f06.entry.js.map} +1 -1
- package/dist/nylas-web-elements/{p-4f548e66.entry.js → p-c1ff6499.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-32682655.entry.js → p-cb03e4d4.entry.js} +2 -2
- package/dist/nylas-web-elements/p-de7b0878.entry.js +2 -0
- package/dist/nylas-web-elements/p-e8cde784.entry.js +2 -0
- package/dist/nylas-web-elements/p-e8cde784.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-f2d1b1a6.entry.js +2 -0
- package/dist/nylas-web-elements/{p-24082558.entry.js.map → p-f2d1b1a6.entry.js.map} +1 -1
- package/dist/nylas-web-elements/p-f6fafe86.entry.js +2 -0
- package/dist/nylas-web-elements/p-f6fafe86.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-d5146511.entry.js → p-f8653b9b.entry.js} +2 -2
- package/dist/nylas-web-elements/people-icon.entry.js +1 -1
- package/dist/nylas-web-elements/person-icon.entry.js +1 -1
- package/dist/nylas-web-elements/play-icon.entry.js +1 -1
- package/dist/nylas-web-elements/radio-button-group.entry.js +1 -1
- package/dist/nylas-web-elements/refresh-icon.entry.js +1 -1
- package/dist/nylas-web-elements/{register-component-6ae95538.js → register-component-aef40ec4.js} +2 -2
- package/dist/nylas-web-elements/{register-component-6ae95538.js.map → register-component-aef40ec4.js.map} +1 -1
- package/dist/nylas-web-elements/reply-all-icon.entry.js +1 -1
- package/dist/nylas-web-elements/reply-icon.entry.js +1 -1
- package/dist/nylas-web-elements/{scheduler-store-17f7f1c8.js → scheduler-store-6c4866d6.js} +2 -2
- package/dist/{esm/scheduler-store-17f7f1c8.js.map → nylas-web-elements/scheduler-store-6c4866d6.js.map} +1 -1
- package/dist/nylas-web-elements/search-icon.entry.js +1 -1
- package/dist/nylas-web-elements/select-dropdown.entry.js +3 -3
- package/dist/nylas-web-elements/select-dropdown.entry.js.map +1 -1
- package/dist/nylas-web-elements/sent-icon.entry.js +1 -1
- package/dist/nylas-web-elements/spam-icon.entry.js +1 -1
- package/dist/nylas-web-elements/star-icon.entry.js +1 -1
- package/dist/nylas-web-elements/stop-icon.entry.js +1 -1
- package/dist/nylas-web-elements/textarea-component.entry.js +1 -1
- package/dist/nylas-web-elements/time-period-selector.entry.js +2 -2
- package/dist/nylas-web-elements/toggle-switch.entry.js +1 -1
- package/dist/nylas-web-elements/toggle-switch.entry.js.map +1 -1
- package/dist/nylas-web-elements/tooltip-component.entry.js +1 -1
- package/dist/nylas-web-elements/translate-icon.entry.js +1 -1
- package/dist/nylas-web-elements/trash-icon.entry.js +1 -1
- package/dist/nylas-web-elements/underline-icon.entry.js +1 -1
- package/dist/{esm/utils-49a1d17b.js → nylas-web-elements/utils-04c10cbd.js} +2 -2
- package/dist/nylas-web-elements/{utils-49a1d17b.js.map → utils-04c10cbd.js.map} +1 -1
- package/dist/nylas-web-elements/warning-icon.entry.js +1 -1
- package/dist/types/components/design-system/input-dropdown/input-dropdown.d.ts +2 -0
- package/dist/types/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.d.ts +6 -1
- package/dist/types/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.d.ts +2 -4
- package/dist/types/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.d.ts +12 -5
- package/dist/types/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.d.ts +36 -0
- package/dist/types/components.d.ts +122 -9
- package/package.json +1 -1
- package/dist/cjs/calendar-info-icon_27.cjs.entry.js.map +0 -1
- package/dist/esm/calendar-info-icon_27.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-0dbc0c01.entry.js +0 -2
- package/dist/nylas-web-elements/p-24082558.entry.js +0 -2
- package/dist/nylas-web-elements/p-3fd63454.entry.js +0 -2
- package/dist/nylas-web-elements/p-3fd63454.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-427548f5.entry.js +0 -2
- package/dist/nylas-web-elements/p-427548f5.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-53da3000.entry.js +0 -2
- package/dist/nylas-web-elements/p-7fac2bba.entry.js +0 -2
- package/dist/nylas-web-elements/p-96418bc6.entry.js +0 -2
- package/dist/nylas-web-elements/p-9acfea5f.entry.js +0 -2
- package/dist/nylas-web-elements/p-9acfea5f.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-c170c56d.entry.js +0 -2
- package/dist/nylas-web-elements/p-efd5b80a.entry.js +0 -2
- package/dist/nylas-web-elements/p-efd5b80a.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-fbac3865.entry.js +0 -2
- package/dist/nylas-web-elements/p-fbac3865.entry.js.map +0 -1
- /package/dist/nylas-web-elements/{p-4b84ab3f.entry.js.map → p-061d0ae2.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-de63bc35.entry.js.map → p-08d75d35.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-98a2f588.entry.js.map → p-16a3bfb2.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-4b1466b3.entry.js.map → p-25c97a60.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-395f49eb.entry.js.map → p-28512ab6.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-b27e34a9.entry.js.map → p-2f148064.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-120d2c72.entry.js.map → p-3175cae0.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-4fdc6122.entry.js.map → p-34f0d1fe.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-c170c56d.entry.js.map → p-37f41a90.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-2f656fb3.entry.js.map → p-39160c0d.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-da21471c.entry.js.map → p-3f435fab.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-27db7b0b.entry.js.map → p-5231fc13.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-deafc6bc.entry.js.map → p-5c3c1888.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-7fac2bba.entry.js.map → p-60b03f86.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-09fec39c.entry.js.map → p-65097f45.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-e4a7746d.entry.js.map → p-6ce66add.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-ec26560f.entry.js.map → p-6ef1024f.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-ace74b9d.entry.js.map → p-7a95bc3f.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-bfd3b5f0.entry.js.map → p-7ce048c0.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-a7dd4c24.entry.js.map → p-8e63b66c.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-11f94952.entry.js.map → p-a800e7af.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-13b003b5.entry.js.map → p-a85408e0.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-c8c737ed.entry.js.map → p-aeb1c91c.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-6e888067.entry.js.map → p-b0c8021f.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-6891ad5d.entry.js.map → p-b2aca6c4.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-b9064de4.entry.js.map → p-b334d63b.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-4f548e66.entry.js.map → p-c1ff6499.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-32682655.entry.js.map → p-cb03e4d4.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-96418bc6.entry.js.map → p-de7b0878.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-d5146511.entry.js.map → p-f8653b9b.entry.js.map} +0 -0
|
@@ -127,7 +127,7 @@ export class NylasComposer {
|
|
|
127
127
|
this.editorEl.focus();
|
|
128
128
|
}
|
|
129
129
|
render() {
|
|
130
|
-
return (h(Host, { key: '
|
|
130
|
+
return (h(Host, { key: '7537b7c56a1e609f88189c2c4deed986827eb193' }, h("sp-theme", { key: 'efa28f8ed5585ec21b44ae5ec174aa10a9c92aba', scale: "medium", color: "dark" }, h("div", { key: 'c7932bcedcb2b3cfa4e0900578cf2b749000125d', class: "editor", contentEditable: true, ref: r => (this.editorEl = r) }, h("div", { key: '89c06c0e76d29ea6713dd44b2452e261d0d7d43b', class: "toolbar", ref: r => (this.toolbarEl = r), contentEditable: false }, h("sp-button", { key: 'beeb60448f03c8818925aeb13ab5231aa72f7526', quiet: true, onClick: () => document.execCommand('bold') }, h("div", { key: '4e37be81a28ac4355f9d0d6d6c71b7b78cf41456', slot: "icon" }, h("bold-icon", { key: '56cf047799a6a5713310d5b095ca91e6004d6107' })), h("div", { key: '2fe47f8f364f7fb1016990f2aecec655e2e6eb30', slot: "label" }, "Bold")), h("sp-button", { key: '0416d13b88ccefd5005f4b97f7dded2118d37f43', quiet: true, onClick: () => document.execCommand('underline') }, h("div", { key: '6d20e215eafbb91a17ce452a6b64295ab4ef2bb9', slot: "icon" }, h("underline-icon", { key: 'b8d988fa168047ed213fbcceb53b24bf3f766d7a' })), h("div", { key: 'bd05639007b3ea849501b995137ceda70aed20da', slot: "label" }, "Underline")), h("sp-button", { key: '9775c4787363cd4d21778f4c848c7f5a7564b507', quiet: true, onClick: () => document.execCommand('italic') }, h("div", { key: 'ca9d557028981c0fe209045e5d1748b19bbb5069', slot: "icon" }, h("italic-icon", { key: '1be5debba3572e83ab132a3e44d8fc1e799f6619' })), h("div", { key: 'cccb70309840e20f558158e6ef9edf8fe0e52eed', slot: "label" }, "Italic")))), h("div", { key: '502854e008886de49ec435c1ebd73b48f2cc4c70', class: 'buttons' }, h("sp-button", { key: '9663a709ca8794dc76dec379a39c52a6a754cb6e', onClick: this.sendComposer, class: "send" }, "Send"), h("sp-button", { key: 'b0c7637932f2659c9115e74f1244db04992a69aa', onClick: this.closeComposer, class: "close" }, "Close")))));
|
|
131
131
|
}
|
|
132
132
|
static get is() { return "nylas-composer"; }
|
|
133
133
|
static get encapsulation() { return "shadow"; }
|
|
@@ -69,7 +69,7 @@ export class NylasListFolders {
|
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
render() {
|
|
72
|
-
return (h(Host, { key: '
|
|
72
|
+
return (h(Host, { key: 'f7658523537781559e3fa8dcef8930beb8ae786f' }, h("div", { key: 'e08916ae6b756aded1ab5efa01f3e897ee3d97e3', class: "folders" }, this.defaultFolders?.map(folder => (h("sp-button", { onClick: () => this.folderSelectedHandler(folder), class: {
|
|
73
73
|
folder: true,
|
|
74
74
|
selected: formatFolderName(folder.name ?? 'inbox').toLowerCase() === this.selectedFolder?.toLowerCase(),
|
|
75
75
|
} }, h("div", { slot: "icon", class: "icon" }, this.getFolderIcon(folder)), this.formatFolderName(folder))))), this.otherFolders && (h(Fragment, null, h("hr", null), h("div", { class: "folders" }, this.otherFolders?.map(folder => (h("sp-button", { onClick: () => this.folderSelectedHandler(folder), class: {
|
|
@@ -43,7 +43,7 @@ export class NylasListThreads {
|
|
|
43
43
|
debug(`[nylas-list-threads] Component did load`, { isAuthenticated: this.isAuthenticated });
|
|
44
44
|
}
|
|
45
45
|
render() {
|
|
46
|
-
return (h(Host, { key: '
|
|
46
|
+
return (h(Host, { key: '12a8ceca4ed6b48b6b2a792543e36c682c0ec6ec' }, h("div", { key: '351f7efcff7c52cba0b8074a8c67562cf083baa8', class: 'list-thread', part: "list-thread" }, this.state === 'loading' && new Array(10).fill(0).map((_, i) => h("div", { class: "thread loading", style: { animationDelay: `${i * 20}ms` } })), this.state === 'ready' &&
|
|
47
47
|
this.threads.map(thread => (h("button", { key: thread?.id, class: {
|
|
48
48
|
'thread': true,
|
|
49
49
|
'unread': thread?.unread === true,
|
|
@@ -119,7 +119,7 @@ export class NylasMailbox {
|
|
|
119
119
|
return this.nylasMailboxConnector;
|
|
120
120
|
}
|
|
121
121
|
render() {
|
|
122
|
-
return (h(Host, { key: '
|
|
122
|
+
return (h(Host, { key: '425f7f57f8a5996e86ba7c97187b7e78ceaedba7' }, h("slot", { key: 'bb7ebdf7b8033ccd731cc13782f426cf8ed9cb31' })));
|
|
123
123
|
}
|
|
124
124
|
static get is() { return "nylas-mailbox"; }
|
|
125
125
|
static get encapsulation() { return "shadow"; }
|
|
@@ -70,7 +70,7 @@ export class NylasMailboxToolbarButton {
|
|
|
70
70
|
state = this.dataState ? store.get(storeKey) === 'loading' : false;
|
|
71
71
|
}
|
|
72
72
|
const key = state ? `state-loading` : 'state-ready';
|
|
73
|
-
return (h(Host, { key: '
|
|
73
|
+
return (h(Host, { key: '71a79133adce76f2fa4727c790ad69ad24891eb5' }, h("sp-theme", { key: '7880178def0f50d9622967459ed83e62f06e936d', scale: "medium", color: "dark" }, h("sp-button", { onClick: this.onClick, disabled: state, key: key, "icon-only": this.iconOnly, label: this.renderByState(state) }, this.hasSlot('icon') && (h("div", { slot: "icon", class: 'slot' }, h("slot", { name: "icon" }))), !this.iconOnly && this.renderByState(state)))));
|
|
74
74
|
}
|
|
75
75
|
static get is() { return "nylas-mailbox-toolbar-button"; }
|
|
76
76
|
static get encapsulation() { return "shadow"; }
|
|
@@ -146,12 +146,12 @@ export class NylasSummarizeMessageButton {
|
|
|
146
146
|
});
|
|
147
147
|
}
|
|
148
148
|
render() {
|
|
149
|
-
return (h(Host, { key: '
|
|
149
|
+
return (h(Host, { key: '977e97a8d9e6f0d5c3f56a8cedcdb18c65a18007' }, h("sp-theme", { key: '3e3e9a385317466347c5e4bac4cac584dc603063', scale: "medium", color: "dark" }, h("sp-button", { key: '4e47a9b38e47991c64236d567df1341df0a7a2b3', label: "Summarize email", "icon-only": true, onClickCapture: this.onClick, class: {
|
|
150
150
|
'summarize-button': true,
|
|
151
151
|
'stopped': this.state === 'stopped',
|
|
152
152
|
'loading': this.state === 'loading',
|
|
153
153
|
'playing': this.state === 'playing',
|
|
154
|
-
} }, this.state === 'stopped' && h("play-icon", null), this.state === 'loading' && h("loading-icon", null), this.state === 'playing' && h("stop-icon", null)), h("audio", { key: '
|
|
154
|
+
} }, this.state === 'stopped' && h("play-icon", null), this.state === 'loading' && h("loading-icon", null), this.state === 'playing' && h("stop-icon", null)), h("audio", { key: '0a0a952634d68aeab930d9a0c9feb07a1dea2828', ref: r => (this.audioRef = r), autoPlay: true, onPlaying: () => (this.state = 'playing'), onPause: () => (this.state = 'stopped'), onEnded: () => {
|
|
155
155
|
this.state = 'stopped';
|
|
156
156
|
debug(`[nylas-summarize-message-button] Audio ended`);
|
|
157
157
|
} }))));
|
|
@@ -76,11 +76,11 @@ export class NylasThreadsRefresh {
|
|
|
76
76
|
this.state = state;
|
|
77
77
|
}
|
|
78
78
|
render() {
|
|
79
|
-
return (h(Host, { key: '
|
|
79
|
+
return (h(Host, { key: 'fd0b82f21c069806d697d1997925fd01c2574594' }, h("div", { key: '653737af280d1a4a75433b47edc5455b1eaf61cd', class: "container", ref: r => (this.containerElement = r) }, h("button", { key: '835dbcdf5cfd24069258564b9e23cd3a7c03b8c6', class: {
|
|
80
80
|
'pull-to-refresh': true,
|
|
81
81
|
'pulling': this.pulling,
|
|
82
82
|
'refreshing': this.state === 'loading',
|
|
83
|
-
}, "aria-label": "Refreshing..." }, this.state === 'loading' && h("refresh-icon", { slot: "icon" }), this.state !== 'loading' && h("arrow-icon", { slot: "icon" })), h("div", { key: '
|
|
83
|
+
}, "aria-label": "Refreshing..." }, this.state === 'loading' && h("refresh-icon", { slot: "icon" }), this.state !== 'loading' && h("arrow-icon", { slot: "icon" })), h("div", { key: 'b3e3db22c04e261b39c2ed53dd4bd4d33932ffe7', class: "content", ref: r => (this.contentElement = r) }, h("slot", { key: '01f37b6814fae9494dcd4c76c736034c6cc4f392' })))));
|
|
84
84
|
}
|
|
85
85
|
static get is() { return "nylas-threads-refresh"; }
|
|
86
86
|
static get encapsulation() { return "shadow"; }
|
|
@@ -43,7 +43,7 @@ export class NylasThreadsSearch {
|
|
|
43
43
|
this.internalQuery = this.query;
|
|
44
44
|
}
|
|
45
45
|
render() {
|
|
46
|
-
return (h(Host, { key: '
|
|
46
|
+
return (h(Host, { key: 'b8f5ab7d60d06cb54da56d0362f8590d71646dca' }, h("sp-theme", { key: '3d90db95bcbfee7eed4187caa97c76fb7727f58b', scale: "medium", color: "dark" }, h("sp-search", { key: 'd47bd5ee54845a0889f742b8ab76bb56b74fb147', quiet: true, onSubmit: this.onSearch, onBlur: this.onSearch, value: this.internalQuery }))));
|
|
47
47
|
}
|
|
48
48
|
static get is() { return "nylas-threads-search"; }
|
|
49
49
|
static get encapsulation() { return "shadow"; }
|
|
@@ -151,7 +151,7 @@ export class NylasViewEmail {
|
|
|
151
151
|
}
|
|
152
152
|
render() {
|
|
153
153
|
console.debug(`[nylas-view-email] render`, { hoistedFontURLs: this.hoistedFontURLs });
|
|
154
|
-
return (h(Host, { key: '
|
|
154
|
+
return (h(Host, { key: '4f0a1e688ae465d65943adc7dabac9cad6c62fe8' }, this.state === 'loading' && h("div", null, "Loading..."), this.state === 'ready' && (h(Fragment, null, this.styles.map(style => (h("style", null, DOMPurify.sanitize(style.innerHTML)))), h("div", { class: 'view-email', part: "view-email", innerHTML: this.sanitizedBody, ref: el => (this.viewEmailElement = el) })))));
|
|
155
155
|
}
|
|
156
156
|
static get is() { return "nylas-view-email"; }
|
|
157
157
|
static get encapsulation() { return "shadow"; }
|
|
@@ -121,7 +121,7 @@ export class NylasViewThread {
|
|
|
121
121
|
const lastTwoMessages = this.internalMessages.slice(this.internalMessages.length - 2, this.internalMessages.length);
|
|
122
122
|
const remainingMessages = this.internalMessages.slice(1, this.internalMessages.length - 2);
|
|
123
123
|
const lastMessage = this.internalMessages[this.internalMessages.length - 1];
|
|
124
|
-
return (h(Host, { key: '
|
|
124
|
+
return (h(Host, { key: 'b9bcde80e7ee15061bfc217d99bb9422dfbe1d04' }, h("sp-theme", { key: '965e53796323e3e13983447abb4ac1b3a8651daa', scale: "medium", color: "dark" }, h("div", { key: '9efc644121efd09a2e837c23f9f8da80589f870b', class: "view-thread" }, h("div", { key: 'c1479929b6679a1b47f03dfe6d5cc1128484b703', class: "header" }, h("div", { key: '00c6788a461f9f6ca4532fb2acb2bf08e0f0c118', class: 'subject' }, this.thread?.subject), h("div", { key: '2e114754a9dd830e4a124cd9079ad4cf725908bd', class: 'folders' }, this.thread?.folders?.map(folder => h("sp-tag", { size: "s" }, toTitleCase(folder.replace('CATEGORY_', '').replace('_', ' ')))))), h("div", { key: '136d6a314c647991218dfe4090fa97c8d98b210d', class: "messages" }, fistMessage && (h(ViewThreadMessage, { message: fistMessage, attachments: this.attachments.filter(attachment => attachment.messageId === fistMessage.id), onMessageClick: this.onMessageClick, onShowContactDataClick: this.onShowContactDataClick, parent: this.host, viewEmailElement: this.nylasViewEmailElement, composerElement: this.nylasComposerElement })), remainingMessages.length > 0 && this.messages.length > 1 && !this.showAllEmails && lastTwoMessages.length > 0 && (h(Fragment, null, h("div", { class: 'show-more' }, h("button", { type: "button", onClick: this.onShowAllEmailsClick }, h("span", { class: 'avatar' }, remainingMessages.length), " ", h("span", { class: 'sr-only' }, "Show ", remainingMessages.length, " more emails"))), h("hr", null))), remainingMessages.length > 0 &&
|
|
125
125
|
this.showAllEmails &&
|
|
126
126
|
this.messages.length > 2 &&
|
|
127
127
|
remainingMessages.map(email => (h(ViewThreadMessage, { message: email, attachments: this.attachments.filter(attachment => attachment.messageId === fistMessage?.id), onMessageClick: this.onMessageClick, onShowContactDataClick: this.onShowContactDataClick, parent: this.host, viewEmailElement: this.nylasViewEmailElement, composerElement: this.nylasComposerElement }))), lastTwoMessages.length > 0 &&
|
|
@@ -97,7 +97,7 @@ export class NylasIfState {
|
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
render() {
|
|
100
|
-
return (h(Host, { key: '
|
|
100
|
+
return (h(Host, { key: '14c61cd55ec800a480889a16ea2f913b0e19f27f' }, h("div", { key: '4f97263914ce0afbd5f4f629f7ca8d2df8ad87c4', class: this.classes }, this.show && h("slot", null))));
|
|
101
101
|
}
|
|
102
102
|
static get is() { return "nylas-if-state"; }
|
|
103
103
|
static get encapsulation() { return "shadow"; }
|
|
@@ -69,7 +69,7 @@ export class NylasLogin {
|
|
|
69
69
|
}
|
|
70
70
|
render() {
|
|
71
71
|
const splitProviders = this.providers?.split(',') || [];
|
|
72
|
-
return (h(Host, { key: '
|
|
72
|
+
return (h(Host, { key: '00ff0a2496564f9e340f778b5310ca3d0359e726' }, this.loginMethod === 'redirect' && (h("div", { class: "redirect-container" }, !this.isAuthenticated && (h("sp-button", { part: "button", onClick: this._handleLoginRedirect }, this.buttonText)))), this.loginMethod === 'emebded' && (h("main", { class: "login-container" }, h("section", { class: "login-box" }, h("header", null, h("img", { src: this.logoUrl, alt: `${this.companyName} logo`, width: '100%', style: {
|
|
73
73
|
minWidth: this.logoWidth,
|
|
74
74
|
} }), h("h1", null, "Welcome")), h("p", null, "Log in to your account to continue to ", this.companyName), h("div", { class: "login-methods" }, splitProviders.includes('google') && (h("button", { class: "login-google", onClick: this._onGoogleButtonClick }, h("svg", { xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", role: "img", width: "18", height: "18", preserveAspectRatio: "xMidYMid meet", viewBox: "0 0 256 262" }, h("path", { fill: "#4285F4", d: "M255.6 131.6c0-8.2-.8-16.2-2.2-23.9H130v45.3h70.3c-3 16.1-12.4 29.7-26.3 38.9v32.4h42.6c25-23 39.4-56.7 39.4-97.7z" }), h("path", { fill: "#34A853", d: "M130 262c35.3 0 64.9-11.7 86.5-31.7l-42.6-32.4c-11.7 7.9-26.7 12.6-43.9 12.6-33.7 0-62.3-22.7-72.5-53.4H14.5v33.3A130.3 130.3 0 00130 262z" }), h("path", { fill: "#FBBC05", d: "M57.5 158.1a72.7 72.7 0 010-54.2V70.6H14.5a130.4 130.4 0 000 120.8l43-33.3z" }), h("path", { fill: "#EA4335", d: "M130 51.6c19 0 36 6.5 49.4 19.2l37-36C195 13.1 165.2 0 130 0A130.3 130.3 0 0014.5 70.6l43 33.3c10.2-30.7 38.8-53.3 72.5-53.3z" })), "Continue with Google")), splitProviders.includes('microsoft') && (h("button", { class: "login-microsoft", onClick: this._onMicrosoftButtonClick }, h("svg", { xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", role: "img", width: "18", height: "18", preserveAspectRatio: "xMidYMid meet", viewBox: "0 0 448 512" }, h("path", { fill: "#F3F3F3", d: "M0 32v192h192V32H0zm256 0v192h192V32H256zm192 256v192h-192V288h192zM0 224v192h192V224H0z" })), "Continue with Microsoft"))), h("form", { class: "login-form", method: "POST", onSubmit: this._onFormSubmit }, h("label", { htmlFor: "email" }, "Email"), h("input", { type: "email", id: "email", name: "email", required: true, value: this.email }), h("button", { type: "submit" }, "Next")))))));
|
|
75
75
|
}
|
|
@@ -101,7 +101,7 @@ export class NylasProvider {
|
|
|
101
101
|
return this.baseProvider?.getStore('schedulerConfig');
|
|
102
102
|
}
|
|
103
103
|
render() {
|
|
104
|
-
return (h(Host, { key: '
|
|
104
|
+
return (h(Host, { key: '1eb5d566a5f7c425be7b30939b06a2dfbd34c7cc' }, h("slot", { key: 'f3a6afab3af5893af6602f971dfe67a795f9bd4f' })));
|
|
105
105
|
}
|
|
106
106
|
static get is() { return "nylas-provider"; }
|
|
107
107
|
static get encapsulation() { return "shadow"; }
|
|
@@ -219,7 +219,7 @@ export class NylasBookingForm {
|
|
|
219
219
|
this.updateAdditionalFields(event.detail.label, event.detail.checked ? 'true' : 'false', 'checkbox');
|
|
220
220
|
}
|
|
221
221
|
render() {
|
|
222
|
-
return (h(Host, { key: '
|
|
222
|
+
return (h(Host, { key: '1b81fd4591cd90c85a578a8d957ed561e457cba5' }, h("form", { key: '4a4fef983332d1752ccf44823620ec2b906bf71e', onSubmit: e => this.bookButtonClickedHandler(e), noValidate: true }, h("div", { key: 'e55ebf5bb6fbb5175e6175d06ce0e0a5266962cf', class: "nylas-booking-form" }, h("div", { key: 'd50d5fdbc7b68b3c54098a6dde600ed52c607eed', class: "input-wrapper" }, h("input-component", { key: 'a299cb5d2043e5fedd6f5f66889d7640e74b8b55', label: "Name", name: "name", id: "name", defaultValue: this.bookingInfo?.primaryParticipant?.name || this.name, placeholder: "Enter your name", type: "text", required: true, part: "nbf__input-textfield" })), h("div", { key: '0d095468473009d67120d668f5e961ca4d90c16d', class: "input-wrapper" }, h("input-component", { key: 'e81345e3aca7fa9cd0a90be50f81cfa544a23336', label: "Email", name: "email", id: "email", pattern: emailRegex, defaultValue: this.bookingInfo?.primaryParticipant?.email || this.email, placeholder: "Enter your email", type: "email", required: true, part: "nbf__input-textfield" })), this.configSettings?.scheduler?.hide_additional_guests !== true && (h("div", { class: "input-wrapper" }, this.guestEmails.map((email, index) => (h("div", { class: "input-wrapper button-wrapper" }, h("label", { class: {
|
|
223
223
|
error: !!this.guestEmailErrors[index],
|
|
224
224
|
} }, "Guest email"), h("div", { class: "guest-email-input" }, h("input", { type: "email", id: `guest-email-${index}`, maxLength: 100, class: {
|
|
225
225
|
'guest-email': true,
|
|
@@ -227,7 +227,7 @@ export class NylasBookingForm {
|
|
|
227
227
|
}, placeholder: "Enter guest email", value: email, "data-index": index, part: "nbf__input-textfield", onBlur: (e) => this.handleGuestBlur(index, e.target?.value), onInput: (e) => this.handleGuestChange(index, e.target?.value) }), h("button-component", { variant: "basic", onClick: (e) => this.removeGuestButtonClickHandler(e, index), class: {
|
|
228
228
|
'remove-guest': true,
|
|
229
229
|
'error': !!this.guestEmailErrors[index],
|
|
230
|
-
} }, h("close-icon", null))), h("p", { class: "help-text" }, this.guestEmailErrors[index])))), h("button-component", { class: "add-guest", variant: "invisible", part: "nbf__button-ghost", onClick: e => this.addGuestButtonClickedHandler(e) }, h("div", { class: "button-content" }, h("add-circle-icon", { slot: "icon" }), "Add ", this.guestEmails.length > 0 ? 'another ' : '', "guest")))), h("slot", { key: '
|
|
230
|
+
} }, h("close-icon", null))), h("p", { class: "help-text" }, this.guestEmailErrors[index])))), h("button-component", { class: "add-guest", variant: "invisible", part: "nbf__button-ghost", onClick: e => this.addGuestButtonClickedHandler(e) }, h("div", { class: "button-content" }, h("add-circle-icon", { slot: "icon" }), "Add ", this.guestEmails.length > 0 ? 'another ' : '', "guest")))), h("slot", { key: 'f47bffdf6a15943c78d4bb75051d0f6704afd623', name: "custom-booking-form" })), h("div", { key: '12631d6648d7ebdc9e6714a54690486d53c8c623', class: "cta" }, h("sp-button", { key: 'a72caa2eb6b5d95ee83600aa37e89730bfd68fdb', treatment: "outline", variant: "secondary", class: 'back', part: "nbf__button-outline", onClick: this.handleBackButtonClicked }, h("slot", { key: 'be107ab400cb5802c6153217cde54b75ccede466', name: "booking-form-back-label" }, "Back")), h("sp-button", { key: 'd6f322389050d4cbbb1aada135b27b6bc4d34d6d', variant: "primary", class: 'book', part: "nbf__button-primary", type: "submit" }, this.isLoading && h("loading-icon", { slot: "icon" }), h("slot", { key: '17ee459bee19ba620505e9931ccd4a485f530ecc', name: "booking-form-book-label" }, "Book now"))))));
|
|
231
231
|
}
|
|
232
232
|
static get is() { return "nylas-booking-form"; }
|
|
233
233
|
static get encapsulation() { return "shadow"; }
|
package/dist/collection/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.js
CHANGED
|
@@ -62,7 +62,7 @@ export class NylasCancelBookingForm {
|
|
|
62
62
|
debug(`[nylas-cancel-booking-form] Component disconnected`);
|
|
63
63
|
}
|
|
64
64
|
render() {
|
|
65
|
-
return (h(Host, { key: '
|
|
65
|
+
return (h(Host, { key: '83015809da357a47d70c5bae845c8608924b6a31', part: "ncec" }, h("sp-theme", { key: '11d3b28a88081d5ecccfbb78ee6347a7856899e3', theme: "spectrum", scale: "medium" }, h("div", { key: '5d2750f253c1aff61c1d973529ce2f7fa65c4206', class: "nylas-cancel-booking-form", part: "ncec__card" }, h("div", { key: '36a8dd00a5eda62f2f8f9740bf447f0b50e81b9e', class: "nylas-cancel-booking-form__calendar-icon", part: "ncec__icon" }, h("calendar-cancel-icon", { key: '7bfaf1ffaa9a3bb288bc0e3f11c8c9ed7a4d2c9a' })), h("h3", { key: '74fff12d4aa0311d817348a4694042d2242f30cd', class: "nylas-cancel-booking-form__title", part: "ncec__title" }, "Cancel booking?"), h("div", { key: '647a02657fe9570c87b14ef7de0cc0fc713efb21', class: "nylas-cancel-booking-form__description", part: "ncec__description" }, this.cancellationPolicy), h("form", { key: 'bb680b4a5a7203d44d08529b0d8b3224b51c2986', onSubmit: this.handleSubmitCancelBooking }, h("sp-field-label", { key: '401994e31c7f7bf65b8403a42b14a56e928d92f3', for: "cancel-reason", class: this.cancellationError ? 'error' : '' }, "Reason for cancellation ", h("span", { key: '361907af2362f4fd09af7638c82de7320efe0072', class: "required" }, "*")), h("sp-textfield", { key: 'd7e672672f0a7250104080f69f4e96de9321c537', id: "cancel-reason", class: this.cancellationError ? 'error' : '', part: "ncec__reason-textarea", multiline: true, value: this.cancellationReason, onInput: this.handleOnChangeCancellationReason, onFocus: this.handleOnChangeCancellationReason, invalid: !!this.cancellationError }, h("sp-help-text", { key: 'd3bcfae8ae55ec910005c128f24d74ed34f1bf48', slot: "negative-help-text" }, this.cancellationError)), h("sp-button", { key: '23efceafbfcb073b0808f65ae110f31bcbfb7722', variant: "primary", class: "cancel", type: "submit", part: "ncec__button-cta" }, "Cancel booking"), h("sp-button", { key: '7030276dae50deab5549a64a3def7b4cb783e8d5', variant: "secondary", class: "back", treatment: "outline", part: "ncec__button-outline", onClick: this.handleGoBackClicked }, "Go back"))))));
|
|
66
66
|
}
|
|
67
67
|
static get is() { return "nylas-cancel-booking-form"; }
|
|
68
68
|
static get encapsulation() { return "shadow"; }
|
|
@@ -45,7 +45,7 @@ export class NylasCancelledEventCard {
|
|
|
45
45
|
debug(`[nylas-cancelled-event-card] Component disconnected`);
|
|
46
46
|
}
|
|
47
47
|
render() {
|
|
48
|
-
return (h(Host, { key: '
|
|
48
|
+
return (h(Host, { key: '89bfb6419aea7fffc32726e4db26642ca810b3a4', part: "ncec" }, h("sp-theme", { key: '265e08ab9c6d4c7c7071353a35e2a8e69bd3875e', theme: "spectrum", color: "dark", scale: "medium" }, h("div", { key: 'bd23802e8cd5bf923ed43f223eac30041ead9a2e', class: "nylas-cancelled-event-card", part: "ncec__card" }, h("div", { key: '270d9e2a65ee1a3a7d34aaa99bf1059b891929ae', class: "nylas-cancelled-event-card__calendar-icon", part: "ncec__icon" }, h("calendar-cancel-icon", { key: 'e04e9bf8f7278265160c3a58c0a37c880faed0cc' })), h("h3", { key: '046647bd93284e280d5fb62f9488b6ed5ed9dea2', class: "nylas-cancelled-event-card__title", part: "ncec__title" }, "Your booking has been cancelled successfully!"), h("div", { key: 'f85c31f7718fe5266b2d175afff46c7b63495c11', class: "nylas-cancelled-event-card__description", part: "ncec__description" }, "A cancellation email has been sent to ", this.configSettings?.organizer?.name || 'the participants', "."), h("div", { key: 'aa36cf4bbcb432334903a0b9ba2782ecf6abbe4c', class: "nylas-cancelled-event-card__cta" }, h("sp-button", { key: '65009ac918324e109b0b5a52331bea5a9b8c1a14', variant: "secondary", treatment: "outline", disabled: this.isClosing, part: "ncec__button-outline", onClick: this.handleCloseClicked }, this.isClosing ? 'Closing...' : 'Close'))))));
|
|
49
49
|
}
|
|
50
50
|
static get is() { return "nylas-cancelled-event-card"; }
|
|
51
51
|
static get encapsulation() { return "shadow"; }
|
|
@@ -74,7 +74,7 @@ export class NylasDatePicker {
|
|
|
74
74
|
return date && selectableDates?.find(d => isSameDay(d, date)) === undefined;
|
|
75
75
|
}
|
|
76
76
|
render() {
|
|
77
|
-
return (h(Host, { key: 'bc2d37f59dc4cc59c9659a15ce640d3f3c738239', part: "ndp" }, h("div", { key: '7b39c6ff3b5c820d6ee4cc3419a80f9803011deb', class: "nylas-date-picker" }, h("div", { key: 'e7e08bbe189da82d187241b1025633f9ea690bbe', class: "title", part: "'ndp__title" }, h("h1",
|
|
77
|
+
return (h(Host, { key: 'bc2d37f59dc4cc59c9659a15ce640d3f3c738239', part: "ndp" }, h("div", { key: '7b39c6ff3b5c820d6ee4cc3419a80f9803011deb', class: "nylas-date-picker" }, h("div", { key: 'e7e08bbe189da82d187241b1025633f9ea690bbe', class: "title", part: "'ndp__title" }, this.configSettings?.organizer?.name && (h("h1", null, h("person-icon", null), this.configSettings?.organizer?.name || 'Organizer')), h("p", { key: '7a952faa33c2421f9b6d25a4d56ec7a510d42ab5' }, h("clock-icon", { key: '35561bc9866d9c75e676b3ef589b1506a6d273c6' }), this.eventDuration ? convertMinutesToHoursAndMinutes(this.eventDuration) : `- minutes`)), h("div", { key: 'b3799870aa76c6e54b3ec5a32dda0b684a817e1d', class: 'header flex-row' }, h("h2", { key: 'bb00822464f175aa9b9c5f66f8fa79e95363b33d', part: 'ndp__month-header' }, h("strong", { key: '3cdeb9340334fabb6ee1ef09ffb28a6e75177275' }, this.month.toLocaleDateString(undefined, { month: 'long' })), "\u00A0", this.month.toLocaleDateString(undefined, { year: 'numeric' })), h("div", { key: 'ad6b090bdff3470d1f7381cce6d5734a698c7af9', class: 'pagination' }, h("button", { key: '90621e82962b012b50dedb9ec4c49bc7cdff0936', onClick: () => this.changeMonth(-1), class: { 'chevron-left': true, 'button': true }, disabled: !this.selectableDates?.length || this.month <= new Date(), part: "ndp__month-button" }, h("chevron-icon", { key: '7596ada39a388b9570a3a783ff5cdf7bb3f252c1' })), h("button", { key: 'e7bbf331f680b0c6f2538639235a008e213b52ee', onClick: () => this.changeMonth(1), class: { 'chevron-right': true, 'button': true }, disabled: this.disableNextMonthButton, part: "ndp__month-button" }, h("chevron-icon", { key: '898e3a4609bf204bdf4d375cd53c23d5ac52bc50' })))), h("div", { key: 'e41bd3d09ef9c8bc48dd8aa5db6554af8b31faa8', class: 'dates' }, ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT'].map(day => {
|
|
78
78
|
return (h("div", { class: 'day', part: "ndp__day" }, day));
|
|
79
79
|
}), this.dates.map((date, i) => {
|
|
80
80
|
const isDisabled = this.isDisabled(date, this.selectableDates);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nylas-date-picker.js","sourceRoot":"","sources":["../../../../src/components/scheduler/nylas-date-picker/nylas-date-picker.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,+BAA+B,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACrJ,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAC5F,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAsBlC,MAAM,OAAO,eAAe;;;;;;;qBA6BH,IAAI,CAAC,YAAY,IAAI,IAAI,IAAI,EAAE;qBAK7B,IAAI,CAAC,QAAQ,EAAE;sCAKG,KAAK;;IAahD,qBAAqB,CAAC,iBAAiC;QACrD,MAAM,SAAS,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;QACnF,MAAM,qBAAqB,GAAG,iBAAiB,EAAE,SAAS,EAAE,wBAAwB,CAAC;QACrF,IAAI,qBAAqB,KAAK,SAAS,EAAE,CAAC;YACxC,OAA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C,CAAC,EAAE,IAAI,SAAS,CAAC,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,wBAAwB,CAAC,CAAC,CAAC,EAAE,IAAI,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,0BAA0B,CAAC,CAAC,CAAC,EAAE,EAAE,IAEjP,IAAI,CAAC,OAAO,EAAE,CACR,CACV,CAAC;oBACJ,CAAC,CAAC,CACE,CACF,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF;AAnFC;IAhBC,iBAAiB,CAA0F;QAC1G,IAAI,EAAE,mBAAmB;QACzB,YAAY,EAAE,IAAI,GAAG,CAAC;YACpB,CAAC,2BAA2B,EAAE,iBAAiB,CAAC;YAChD,CAAC,wBAAwB,EAAE,cAAc,CAAC;YAC1C,CAAC,qBAAqB,EAAE,WAAW,CAAC;YACpC,CAAC,0BAA0B,EAAE,gBAAgB,CAAC;YAC9C,CAAC,yBAAyB,EAAE,eAAe,CAAC;SAC7C,CAAC;QACF,YAAY,EAAE;YACZ,YAAY,EAAE,KAAK,EAAE,KAAwB,EAAE,uBAAgD,EAAE,EAAE;gBACjG,uBAAuB,CAAC,SAAS,CAAC,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;YAC7D,CAAC;SACF;QACD,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;6CAmFD","sourcesContent":["import { RegisterComponent } from '@/common/register-component';\nimport { addDaysToCurrentDate, convertMinutesToHoursAndMinutes, getFirstDayOfMonth, getLastDayOfMonth, isSameDay, isSameMonth } from '@/utils/utils';\nimport { Component, Event, EventEmitter, Host, Prop, State, Watch, h } from '@stencil/core';\nimport { timeDay } from 'd3-time';\nimport { NylasSchedulerConnector } from '../../..';\nimport { NylasScheduling } from '../nylas-scheduling/nylas-scheduling';\nimport { ConfigSettings } from '@/stores/scheduler-store';\n\n/**\n * The `nylas-date-picker` component is a UI component that allows users to select a date.\n *\n * @part ndp - The date picker host.\n * @part ndp__month-header - The month header.\n * @part ndp__month-button - The month button.\n * @part ndp__day - The day.\n * @part ndp__date - The date.\n * @part ndp__date--selected - The selected date.\n * @part ndp__date--current-day - The current day.\n * @part ndp__date--current-month - The dates in the current month.\n */\n@Component({\n tag: 'nylas-date-picker',\n styleUrl: 'nylas-date-picker.scss',\n shadow: true,\n})\nexport class NylasDatePicker {\n /**\n * The dates that are selectable.\n */\n @Prop() selectableDates?: Date[];\n\n /**\n * The selected date.\n */\n @Prop() selectedDate?: Date;\n\n /**\n * The config settings.\n */\n @Prop() configSettings?: ConfigSettings;\n\n /**\n * The loading state.\n */\n @Prop() readonly isLoading?: boolean;\n\n /**\n * The event duration.\n */\n @Prop() readonly eventDuration?: number;\n\n /**\n * The month to display.\n */\n @State() month: Date = this.selectedDate || new Date();\n\n /**\n * The dates to render.\n */\n @State() dates: Date[] = this.getDates();\n\n /**\n * The state to disable the next month button.\n */\n @State() disableNextMonthButton: boolean = false;\n\n /**\n * This event is fired when a date is selected.\n */\n @Event() dateSelected!: EventEmitter<Date>;\n\n /**\n * This event is fired when the month is changed.\n */\n @Event() monthChanged!: EventEmitter<Date>;\n\n @Watch('configSettings')\n configSettingsChanged(newConfigSettings: ConfigSettings) {\n const nextMonth = new Date(this.month.getFullYear(), this.month.getMonth() + 1, 1);\n const availableDaysInFuture = newConfigSettings?.scheduler?.available_days_in_future;\n if (availableDaysInFuture === undefined) {\n return;\n }\n const endDate = addDaysToCurrentDate(new Date(), availableDaysInFuture);\n if (endDate.getTime() < nextMonth.getTime()) {\n this.disableNextMonthButton = true;\n } else {\n this.disableNextMonthButton = false;\n }\n }\n\n connectedCallback() {}\n\n disconnectedCallback() {}\n\n componentWillLoad() {}\n\n /**\n * Get the dates to render, including the days from the previous and next months.\n * @returns The dates to render.\n */\n private getDates() {\n const lastDayOfMonth = getLastDayOfMonth(this.month);\n const firstDayOfMonth = getFirstDayOfMonth(this.month);\n\n return timeDay.range(timeDay.offset(firstDayOfMonth, -firstDayOfMonth.getDay()), timeDay.offset(lastDayOfMonth, 7 - lastDayOfMonth.getDay()));\n }\n\n /**\n * Select a date.\n * @param date The date to select.\n */\n private selectDate(date?: Date) {\n this.dateSelected.emit(date);\n }\n\n /**\n * Change the month.\n * @param change The change in months.\n */\n private changeMonth(change: number) {\n this.month = new Date(this.month.getFullYear(), this.month.getMonth() + change, 1);\n const nextMonth = new Date(this.month.getFullYear(), this.month.getMonth() + 1, 1);\n const availableDaysInFuture = this.configSettings?.scheduler?.available_days_in_future;\n const endDate = addDaysToCurrentDate(new Date(), availableDaysInFuture);\n if (endDate.getTime() < nextMonth.getTime()) {\n this.disableNextMonthButton = true;\n } else {\n this.disableNextMonthButton = false;\n }\n this.dates = this.getDates();\n this.monthChanged.emit(this.month);\n // unset selected date when changing month\n this.selectDate();\n }\n\n private isSelected(date: Date | undefined, selectedDate: Date | undefined, selectableDates: Date[] | undefined) {\n return date && selectedDate && isSameDay(date, selectedDate) && selectableDates && selectableDates?.length > 0;\n }\n\n private isDisabled(date: Date | undefined, selectableDates: Date[] | undefined) {\n return date && selectableDates?.find(d => isSameDay(d, date)) === undefined;\n }\n\n @RegisterComponent<NylasDatePicker, NylasSchedulerConnector, Exclude<NylasScheduling['stores'], undefined>>({\n name: 'nylas-date-picker',\n stateToProps: new Map([\n ['scheduler.selectableDates', 'selectableDates'],\n ['scheduler.selectedDate', 'selectedDate'],\n ['scheduler.isLoading', 'isLoading'],\n ['scheduler.configSettings', 'configSettings'],\n ['scheduler.eventDuration', 'eventDuration'],\n ]),\n eventToProps: {\n dateSelected: async (event: CustomEvent<Date>, nylasSchedulerConnector: NylasSchedulerConnector) => {\n nylasSchedulerConnector.scheduler.selectDate(event.detail);\n },\n },\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host part=\"ndp\">\n <div class=\"nylas-date-picker\">\n <div class=\"title\" part=\"'ndp__title\">\n <h1>\n <person-icon />\n {this.configSettings?.organizer?.name || this.configSettings?.organizer.email}\n </h1>\n <p>\n <clock-icon />\n {this.eventDuration ? convertMinutesToHoursAndMinutes(this.eventDuration) : `- minutes`}\n </p>\n </div>\n <div class={'header flex-row'}>\n <h2 part={'ndp__month-header'}>\n <strong>{this.month.toLocaleDateString(undefined, { month: 'long' })}</strong>\n \n {this.month.toLocaleDateString(undefined, { year: 'numeric' })}\n </h2>\n <div class={'pagination'}>\n <button\n onClick={() => this.changeMonth(-1)}\n class={{ 'chevron-left': true, 'button': true }}\n disabled={!this.selectableDates?.length || this.month <= new Date()}\n part=\"ndp__month-button\"\n >\n <chevron-icon />\n </button>\n <button onClick={() => this.changeMonth(1)} class={{ 'chevron-right': true, 'button': true }} disabled={this.disableNextMonthButton} part=\"ndp__month-button\">\n <chevron-icon />\n </button>\n </div>\n </div>\n\n <div class={'dates'}>\n {['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT'].map(day => {\n return (\n <div class={'day'} part=\"ndp__day\">\n {day}\n </div>\n );\n })}\n {this.dates.map((date, i) => {\n const isDisabled = this.isDisabled(date, this.selectableDates);\n\n if (this.isLoading) {\n return (\n <button\n disabled\n class={{\n 'date day-skeleton': true,\n 'current-month': isSameMonth(date, this.month),\n }}\n style={{ animationDelay: `${i * 20}ms` }}\n part={'ndp__date'}\n >\n {date.getDate()}\n </button>\n );\n }\n return (\n <button\n class={{\n 'date': true,\n 'selected': !!(this.selectedDate && isSameDay(date, this.selectedDate) && this.selectableDates && this.selectableDates?.length > 0),\n 'current-day': isSameDay(date, new Date()),\n 'current-month': isSameMonth(date, this.month),\n }}\n aria-lang={date.toLocaleDateString(undefined, { dateStyle: 'full' })}\n disabled={isDisabled}\n onClick={() => this.selectDate(date)}\n part={`ndp__date ${this.isSelected(date, this.selectedDate, this.selectableDates) ? 'ndp__date--selected' : ''} ${isSameDay(date, new Date()) ? 'ndp__date--current-day' : ''} ${isSameMonth(date, this.month) ? 'ndp__date--current-month' : ''}`}\n >\n {date.getDate()}\n </button>\n );\n })}\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"nylas-date-picker.js","sourceRoot":"","sources":["../../../../src/components/scheduler/nylas-date-picker/nylas-date-picker.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,+BAA+B,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACrJ,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAC5F,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAsBlC,MAAM,OAAO,eAAe;;;;;;;qBA6BH,IAAI,CAAC,YAAY,IAAI,IAAI,IAAI,EAAE;qBAK7B,IAAI,CAAC,QAAQ,EAAE;sCAKG,KAAK;;IAahD,qBAAqB,CAAC,iBAAiC;QACrD,MAAM,SAAS,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;QACnF,MAAM,qBAAqB,GAAG,iBAAiB,EAAE,SAAS,EAAE,wBAAwB,CAAC;QACrF,IAAI,qBAAqB,KAAK,SAAS,EAAE,CAAC;YACxC,OAAO;QACT,CAAC;QACD,MAAM,OAAO,GAAG,oBAAoB,CAAC,IAAI,IAAI,EAAE,EAAE,qBAAqB,CAAC,CAAC;QACxE,IAAI,OAAO,CAAC,OAAO,EAAE,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AC,EAAE,IAAI,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,0BAA0B,CAAC,CAAC,CAAC,EAAE,EAAE,IAEjP,IAAI,CAAC,OAAO,EAAE,CACR,CACV,CAAC;oBACJ,CAAC,CAAC,CACE,CACF,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF;AArFC;IAhBC,iBAAiB,CAA0F;QAC1G,IAAI,EAAE,mBAAmB;QACzB,YAAY,EAAE,IAAI,GAAG,CAAC;YACpB,CAAC,2BAA2B,EAAE,iBAAiB,CAAC;YAChD,CAAC,wBAAwB,EAAE,cAAc,CAAC;YAC1C,CAAC,qBAAqB,EAAE,WAAW,CAAC;YACpC,CAAC,0BAA0B,EAAE,gBAAgB,CAAC;YAC9C,CAAC,yBAAyB,EAAE,eAAe,CAAC;SAC7C,CAAC;QACF,YAAY,EAAE;YACZ,YAAY,EAAE,KAAK,EAAE,KAAwB,EAAE,uBAAgD,EAAE,EAAE;gBACjG,uBAAuB,CAAC,SAAS,CAAC,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;YAC7D,CAAC;SACF;QACD,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;6CAqFD","sourcesContent":["import { RegisterComponent } from '@/common/register-component';\nimport { addDaysToCurrentDate, convertMinutesToHoursAndMinutes, getFirstDayOfMonth, getLastDayOfMonth, isSameDay, isSameMonth } from '@/utils/utils';\nimport { Component, Event, EventEmitter, Host, Prop, State, Watch, h } from '@stencil/core';\nimport { timeDay } from 'd3-time';\nimport { NylasSchedulerConnector } from '../../..';\nimport { NylasScheduling } from '../nylas-scheduling/nylas-scheduling';\nimport { ConfigSettings } from '@/stores/scheduler-store';\n\n/**\n * The `nylas-date-picker` component is a UI component that allows users to select a date.\n *\n * @part ndp - The date picker host.\n * @part ndp__month-header - The month header.\n * @part ndp__month-button - The month button.\n * @part ndp__day - The day.\n * @part ndp__date - The date.\n * @part ndp__date--selected - The selected date.\n * @part ndp__date--current-day - The current day.\n * @part ndp__date--current-month - The dates in the current month.\n */\n@Component({\n tag: 'nylas-date-picker',\n styleUrl: 'nylas-date-picker.scss',\n shadow: true,\n})\nexport class NylasDatePicker {\n /**\n * The dates that are selectable.\n */\n @Prop() selectableDates?: Date[];\n\n /**\n * The selected date.\n */\n @Prop() selectedDate?: Date;\n\n /**\n * The config settings.\n */\n @Prop() configSettings?: ConfigSettings;\n\n /**\n * The loading state.\n */\n @Prop() readonly isLoading?: boolean;\n\n /**\n * The event duration.\n */\n @Prop() readonly eventDuration?: number;\n\n /**\n * The month to display.\n */\n @State() month: Date = this.selectedDate || new Date();\n\n /**\n * The dates to render.\n */\n @State() dates: Date[] = this.getDates();\n\n /**\n * The state to disable the next month button.\n */\n @State() disableNextMonthButton: boolean = false;\n\n /**\n * This event is fired when a date is selected.\n */\n @Event() dateSelected!: EventEmitter<Date>;\n\n /**\n * This event is fired when the month is changed.\n */\n @Event() monthChanged!: EventEmitter<Date>;\n\n @Watch('configSettings')\n configSettingsChanged(newConfigSettings: ConfigSettings) {\n const nextMonth = new Date(this.month.getFullYear(), this.month.getMonth() + 1, 1);\n const availableDaysInFuture = newConfigSettings?.scheduler?.available_days_in_future;\n if (availableDaysInFuture === undefined) {\n return;\n }\n const endDate = addDaysToCurrentDate(new Date(), availableDaysInFuture);\n if (endDate.getTime() < nextMonth.getTime()) {\n this.disableNextMonthButton = true;\n } else {\n this.disableNextMonthButton = false;\n }\n }\n\n connectedCallback() {}\n\n disconnectedCallback() {}\n\n componentWillLoad() {}\n\n /**\n * Get the dates to render, including the days from the previous and next months.\n * @returns The dates to render.\n */\n private getDates() {\n const lastDayOfMonth = getLastDayOfMonth(this.month);\n const firstDayOfMonth = getFirstDayOfMonth(this.month);\n\n return timeDay.range(timeDay.offset(firstDayOfMonth, -firstDayOfMonth.getDay()), timeDay.offset(lastDayOfMonth, 7 - lastDayOfMonth.getDay()));\n }\n\n /**\n * Select a date.\n * @param date The date to select.\n */\n private selectDate(date?: Date) {\n this.dateSelected.emit(date);\n }\n\n /**\n * Change the month.\n * @param change The change in months.\n */\n private changeMonth(change: number) {\n this.month = new Date(this.month.getFullYear(), this.month.getMonth() + change, 1);\n const nextMonth = new Date(this.month.getFullYear(), this.month.getMonth() + 1, 1);\n const availableDaysInFuture = this.configSettings?.scheduler?.available_days_in_future;\n const endDate = addDaysToCurrentDate(new Date(), availableDaysInFuture);\n if (endDate.getTime() < nextMonth.getTime()) {\n this.disableNextMonthButton = true;\n } else {\n this.disableNextMonthButton = false;\n }\n this.dates = this.getDates();\n this.monthChanged.emit(this.month);\n // unset selected date when changing month\n this.selectDate();\n }\n\n private isSelected(date: Date | undefined, selectedDate: Date | undefined, selectableDates: Date[] | undefined) {\n return date && selectedDate && isSameDay(date, selectedDate) && selectableDates && selectableDates?.length > 0;\n }\n\n private isDisabled(date: Date | undefined, selectableDates: Date[] | undefined) {\n return date && selectableDates?.find(d => isSameDay(d, date)) === undefined;\n }\n\n @RegisterComponent<NylasDatePicker, NylasSchedulerConnector, Exclude<NylasScheduling['stores'], undefined>>({\n name: 'nylas-date-picker',\n stateToProps: new Map([\n ['scheduler.selectableDates', 'selectableDates'],\n ['scheduler.selectedDate', 'selectedDate'],\n ['scheduler.isLoading', 'isLoading'],\n ['scheduler.configSettings', 'configSettings'],\n ['scheduler.eventDuration', 'eventDuration'],\n ]),\n eventToProps: {\n dateSelected: async (event: CustomEvent<Date>, nylasSchedulerConnector: NylasSchedulerConnector) => {\n nylasSchedulerConnector.scheduler.selectDate(event.detail);\n },\n },\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host part=\"ndp\">\n <div class=\"nylas-date-picker\">\n <div class=\"title\" part=\"'ndp__title\">\n {this.configSettings?.organizer?.name && (\n <h1>\n <person-icon />\n {this.configSettings?.organizer?.name || 'Organizer'}\n </h1>\n )}\n <p>\n <clock-icon />\n {this.eventDuration ? convertMinutesToHoursAndMinutes(this.eventDuration) : `- minutes`}\n </p>\n </div>\n <div class={'header flex-row'}>\n <h2 part={'ndp__month-header'}>\n <strong>{this.month.toLocaleDateString(undefined, { month: 'long' })}</strong>\n \n {this.month.toLocaleDateString(undefined, { year: 'numeric' })}\n </h2>\n <div class={'pagination'}>\n <button\n onClick={() => this.changeMonth(-1)}\n class={{ 'chevron-left': true, 'button': true }}\n disabled={!this.selectableDates?.length || this.month <= new Date()}\n part=\"ndp__month-button\"\n >\n <chevron-icon />\n </button>\n <button onClick={() => this.changeMonth(1)} class={{ 'chevron-right': true, 'button': true }} disabled={this.disableNextMonthButton} part=\"ndp__month-button\">\n <chevron-icon />\n </button>\n </div>\n </div>\n\n <div class={'dates'}>\n {['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT'].map(day => {\n return (\n <div class={'day'} part=\"ndp__day\">\n {day}\n </div>\n );\n })}\n {this.dates.map((date, i) => {\n const isDisabled = this.isDisabled(date, this.selectableDates);\n\n if (this.isLoading) {\n return (\n <button\n disabled\n class={{\n 'date day-skeleton': true,\n 'current-month': isSameMonth(date, this.month),\n }}\n style={{ animationDelay: `${i * 20}ms` }}\n part={'ndp__date'}\n >\n {date.getDate()}\n </button>\n );\n }\n return (\n <button\n class={{\n 'date': true,\n 'selected': !!(this.selectedDate && isSameDay(date, this.selectedDate) && this.selectableDates && this.selectableDates?.length > 0),\n 'current-day': isSameDay(date, new Date()),\n 'current-month': isSameMonth(date, this.month),\n }}\n aria-lang={date.toLocaleDateString(undefined, { dateStyle: 'full' })}\n disabled={isDisabled}\n onClick={() => this.selectDate(date)}\n part={`ndp__date ${this.isSelected(date, this.selectedDate, this.selectableDates) ? 'ndp__date--selected' : ''} ${isSameDay(date, new Date()) ? 'ndp__date--current-day' : ''} ${isSameMonth(date, this.month) ? 'ndp__date--current-month' : ''}`}\n >\n {date.getDate()}\n </button>\n );\n })}\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -63,13 +63,13 @@ export class NylasLocaleSwitch {
|
|
|
63
63
|
label: LANGUAGE_MAP[key],
|
|
64
64
|
value: key,
|
|
65
65
|
}));
|
|
66
|
-
return (h(Host, { key: '
|
|
66
|
+
return (h(Host, { key: '2d50a22ae8502ec3c6062da3cbbeb0bb6f0fcb8b' }, h("div", { key: '8725370edb7b3fb70264586c8d6bf4cc7c8f6220', class: "nylas-locale-switch" }, h("div", { key: 'da5375359f87b3f1fc5c3ec9f094c76886a1a401', class: {
|
|
67
67
|
'select-wrapper': true,
|
|
68
68
|
'timezone': true,
|
|
69
|
-
} }, h("select-dropdown", { key: '
|
|
69
|
+
} }, h("select-dropdown", { key: '3633e969f27a301b59ad64afb9f63a0bf19afcc6', name: "timezone", options: timezoneOptions, defaultSelectedOption: timezoneOptions.find(op => op.value == this.selectedTimezone) }, h("span", { key: '97db913cf64de05eb986fdea378a17948ead2527', slot: "select-icon" }, h("globe-icon", { key: 'ee73e4c113c23614a7084cb1f19e2d6149fd3185', width: "20", height: "20" })))), h("div", { key: '04245f7d6c51994197ff107f064632d5c8050e65', class: {
|
|
70
70
|
'select-wrapper': true,
|
|
71
71
|
'language': true,
|
|
72
|
-
} }, h("select-dropdown", { key: '
|
|
72
|
+
} }, h("select-dropdown", { key: '55ed837e54b69f9db0548c9c4e4c6e5211ef577a', name: "language", options: languageOptions, defaultSelectedOption: languageOptions.find(lang => lang.value == this.selectedLanguage) }, h("span", { key: '43b4d67e865a27842998a796f8d12e0d9b5171eb', slot: "select-icon" }, h("translate-icon", { key: 'c393677712c3528f162bc5700368deb4dd6a197c', width: "20", height: "20" })))))));
|
|
73
73
|
}
|
|
74
74
|
static get is() { return "nylas-locale-switch"; }
|
|
75
75
|
static get encapsulation() { return "shadow"; }
|
|
@@ -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: 'b86593ead0279b9e2213c2554d1153379470880e' }, h(Fragment, { key: '860f23f3c6a0636b408d56806b11129c0a697418' }, 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: '6125314e051684b396d99a3c8bb9ba99392f2729' }))));
|
|
51
51
|
}
|
|
52
52
|
static get is() { return "nylas-notification"; }
|
|
53
53
|
static get encapsulation() { return "shadow"; }
|
package/dist/collection/components/scheduler/nylas-selected-event-card/nylas-selected-event-card.js
CHANGED
|
@@ -43,7 +43,7 @@ export class NylasSelectedEventCard {
|
|
|
43
43
|
this.endTime = new Date(selectedTimeslot?.end_time).toLocaleString(undefined, { timeStyle: 'short' });
|
|
44
44
|
}
|
|
45
45
|
render() {
|
|
46
|
-
return (h(Host, { key: '
|
|
46
|
+
return (h(Host, { key: 'ae635bed01604ece8f012b82c00fa7d4b6bc4c3d', part: "nsec" }, h("sp-theme", { key: 'edcbe79ce2a87e920bd88714b3a5a747d4a80747', theme: "spectrum", color: "dark", scale: "medium" }, h("div", { key: '8c736e8a7ea756b2ef8ba316e0f2c0f38f3821fd', class: "event-card", part: "nsec__card" }, h("div", { key: '06c33c0fc54e893cbeb8c685503f73a74109ab33', class: "calendar-icon", part: "nsec__icon" }, h("calendar-icon", { key: '69617d50f58122aea2dd92e7ea26d5b2a984c2bf' })), h("div", { key: 'e4e53019bba6e23f2c5f0a5b8cde5336973d795d', class: "nylas-selected-event-card__date", part: "nsec__date" }, this.selectedDate?.toLocaleDateString(undefined, { dateStyle: 'full' })), h("div", { key: 'c838e6987d4c932471d27dca86c295f549f06a5d', class: "nylas-selected-event-card__time", part: "nsec__time" }, this.startTime, " - ", this.endTime)), h("div", { key: '3e0f9d170e593f39516d49e31fe0da1db49fe828', class: "event-timezone", part: "nsec__timezone" }, h("globe-icon", { key: '12f52fc23ec7d60d046078aceeb6fffba7283078' }), TIMEZONE_MAP[this.selectedTimezone]))));
|
|
47
47
|
}
|
|
48
48
|
static get is() { return "nylas-selected-event-card"; }
|
|
49
49
|
static get encapsulation() { return "shadow"; }
|
|
@@ -36,7 +36,7 @@ export class NylasAdditionalParticipants {
|
|
|
36
36
|
}
|
|
37
37
|
componentDidLoad() {
|
|
38
38
|
debug('nylas-additional-participants', 'componentDidLoad');
|
|
39
|
-
this.
|
|
39
|
+
this.updateFormValue();
|
|
40
40
|
}
|
|
41
41
|
disconnectedCallback() {
|
|
42
42
|
debug('nylas-additional-participants', 'disconnectedCallback');
|
|
@@ -46,34 +46,37 @@ export class NylasAdditionalParticipants {
|
|
|
46
46
|
const index = event.detail.name;
|
|
47
47
|
this.participants[index].email = event.detail.value;
|
|
48
48
|
const participant = this.participantOptions?.find(participant => participant.email === event.detail.value);
|
|
49
|
+
this.participants[index].availability = participant ? { calendar_ids: ['primary'] } : undefined;
|
|
49
50
|
this.participants[index].name = participant?.name || event.detail.value;
|
|
50
51
|
this.participants = [...this.participants];
|
|
51
|
-
this.
|
|
52
|
+
this.updateFormValue();
|
|
52
53
|
}
|
|
53
54
|
onParticipantChange(event, index) {
|
|
54
55
|
debug('nylas-additional-participants', 'onParticipantChange');
|
|
55
56
|
this.participants[index].email = event.target.value;
|
|
56
|
-
this.
|
|
57
|
+
this.updateFormValue();
|
|
57
58
|
}
|
|
58
59
|
addParticipant() {
|
|
59
60
|
debug('nylas-additional-participants', 'addParticipant');
|
|
60
|
-
this.participants = [...this.participants, { name: '', email: '', is_organizer: false
|
|
61
|
-
this.
|
|
61
|
+
this.participants = [...this.participants, { name: '', email: '', is_organizer: false }];
|
|
62
|
+
this.updateFormValue();
|
|
62
63
|
}
|
|
63
64
|
removeParticipant(index) {
|
|
64
65
|
debug('nylas-additional-participants', 'removeParticipant');
|
|
65
66
|
this.participants = this.participants.filter((_, i) => i !== index);
|
|
66
|
-
this.
|
|
67
|
+
this.updateFormValue();
|
|
67
68
|
}
|
|
68
69
|
validate(email, index) {
|
|
69
70
|
debug('nylas-additional-participants', 'validate');
|
|
70
71
|
const regex = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
|
71
72
|
const valid = regex.test(String(email).toLowerCase());
|
|
72
73
|
this.participants[index].is_valid = valid;
|
|
73
|
-
this.
|
|
74
|
+
this.updateFormValue();
|
|
74
75
|
}
|
|
75
|
-
|
|
76
|
-
|
|
76
|
+
updateFormValue() {
|
|
77
|
+
debug('nylas-additional-participants', 'updateFormValue');
|
|
78
|
+
this.internals.setFormValue(JSON.stringify(this.participants), this.name);
|
|
79
|
+
this.valueChanged.emit({ value: JSON.stringify(this.participants), name: this.name });
|
|
77
80
|
}
|
|
78
81
|
getArrayDifference(array1, array2) {
|
|
79
82
|
const filtered = array1.filter(participant1 => !array2.some(participant2 => participant1.email === participant2.email));
|
|
@@ -82,11 +85,11 @@ export class NylasAdditionalParticipants {
|
|
|
82
85
|
});
|
|
83
86
|
}
|
|
84
87
|
render() {
|
|
85
|
-
return (h(Host, { key: '
|
|
88
|
+
return (h(Host, { key: '30915e4727e68b0652fc265ced20a3fce93f94d7' }, h("nylas-form-card", { key: 'e652c77a0e382aeaab234593ad1cd8fa6cc1b858' }, h("h3", { key: 'ee6d3ac07461ef43976e32069cd978a2dc32ba96', slot: "header-title", class: "nylas-additional-participants__title", part: "nap__title" }, "Additional participants"), h("p", { key: '72d712c00b839ad8220ea23cce11cfc233cf14b5', slot: "header-subtitle", class: "nylas-additional-participants__subtitle", part: "nap__subtitle" }, "Add anyone else who would be joining for this event."), h("div", { key: '87b08e14dc5a16b2381728263e079c46545284f4', slot: "content", class: "nylas-additional-participants__content" }, h("div", { key: 'da67ac11f9c977007ce885531bcdcbf9c59aca0c' }, this.participants.map((participant, index) => {
|
|
86
89
|
return (h("div", { class: 'nylas-additional-participants__input_group', part: "nap__input_group" }, h("label", null, participant.is_organizer ? 'Organizer' : `Participant ${index}`), h("div", { part: "nap__input_wrapper", class: `nylas-additional-participants__input_wrapper ${participant.is_organizer && 'nylas-additional-participants__input_wrapper_organizer'} ${participant.is_valid === false && 'nylas-additional-participants__input_wrapper_invalid'}` }, h("div", { class: { 'nylas-additional-participants__input': true, 'organizer': participant.is_organizer }, part: "nap__input" }, participant.is_organizer ? (h("input", { type: "text", value: participant.email, onInput: e => {
|
|
87
90
|
this.onParticipantChange(e, index);
|
|
88
|
-
}, readOnly: participant.is_organizer, onBlur: () => this.validate(participant.email, index) })) : (h("input-dropdown", { name: `${index}`, inputValue: participant.email, options: this.getArrayDifference(this.participantOptions || [], this.participants) })), !participant.is_organizer && (h("button", { onClick: () => this.removeParticipant(index), part: "nap__remove-participant" }, h("close-icon", null)))))));
|
|
89
|
-
})), h("button", { key: '
|
|
91
|
+
}, readOnly: participant.is_organizer, onBlur: () => this.validate(participant.email, index) })) : (h("input-dropdown", { name: `${index}`, filterable: true, inputValue: participant.email, options: this.getArrayDifference(this.participantOptions || [], this.participants) })), !participant.is_organizer && (h("button", { onClick: () => this.removeParticipant(index), part: "nap__remove-participant" }, h("close-icon", null)))))));
|
|
92
|
+
})), h("button", { key: 'dd0f412f9affa5cf2b3ab5a331365d5b217e1ade', class: "nylas-additional-participants__add", part: "nap__add-participant", onClick: () => this.addParticipant() }, h("add-circle-icon", { key: '089167b221913ef3e0393efa23db2698a93b3e73' }), " ", h("span", { key: '70860b8258a871e714f2f33890d35ec46835f349' }, "Add ", this.participants.length > 1 ? 'another' : 'a', " participant"))))));
|
|
90
93
|
}
|
|
91
94
|
static get is() { return "nylas-additional-participants"; }
|
|
92
95
|
static get encapsulation() { return "shadow"; }
|
|
@@ -169,6 +172,24 @@ export class NylasAdditionalParticipants {
|
|
|
169
172
|
"participantsValid": {}
|
|
170
173
|
};
|
|
171
174
|
}
|
|
175
|
+
static get events() {
|
|
176
|
+
return [{
|
|
177
|
+
"method": "valueChanged",
|
|
178
|
+
"name": "valueChanged",
|
|
179
|
+
"bubbles": true,
|
|
180
|
+
"cancelable": true,
|
|
181
|
+
"composed": true,
|
|
182
|
+
"docs": {
|
|
183
|
+
"tags": [],
|
|
184
|
+
"text": "This event is fired when the selected participants change."
|
|
185
|
+
},
|
|
186
|
+
"complexType": {
|
|
187
|
+
"original": "{\n value: string;\n name: string;\n }",
|
|
188
|
+
"resolved": "{ value: string; name: string; }",
|
|
189
|
+
"references": {}
|
|
190
|
+
}
|
|
191
|
+
}];
|
|
192
|
+
}
|
|
172
193
|
static get elementRef() { return "host"; }
|
|
173
194
|
static get watchers() {
|
|
174
195
|
return [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nylas-additional-participants.js","sourceRoot":"","sources":["../../../../src/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAqCzG,MAAM,OAAO,2BAA2B;;oBAEf,cAAc;;;4BAgBE,IAAI,CAAC,iBAAiB,IAAI,EAAE;iCAC7B,IAAI;;IAN1C,yBAAyB,CAAC,QAAgB;QACxC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AE,GAAG,EAAE,CAAC,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,EAAE,IAAI,EAAC,yBAAyB;wCAClF,qBAAc,CACP,CACV,CACG,CACF,CACF,CACP,CAAC;oBACJ,CAAC,CAAC,CACE;oBACN,+DAAQ,KAAK,EAAC,oCAAoC,EAAC,IAAI,EAAC,sBAAsB,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,cAAc,EAAE;wBACjH,yEAAmB;;wBAAC;;4BAAW,IAAI,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG;2CAAoB,CAC1F,CACL,CACU,CACb,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF;AArDC;IANC,iBAAiB,CAAiH;QACjI,IAAI,EAAE,+BAA+B;QACrC,YAAY,EAAE,IAAI,GAAG,CAAC,CAAC,CAAC,wCAAwC,EAAE,oBAAoB,CAAC,CAAC,CAAC;QACzF,YAAY,EAAE,EAAE;QAChB,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;yDAqDD","sourcesContent":["import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug } from '@/utils/utils';\nimport { AttachInternals, Component, Host, Prop, State, Watch, h, Element, Listen } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\n\ntype Participant = {\n name?: string;\n email: string;\n is_valid?: boolean;\n is_organizer: boolean;\n availability?: Availability;\n booking?: Booking;\n};\ntype Availability = {\n calendar_ids: string[];\n};\ntype Booking = {\n calendar_id: string;\n};\n\n/**\n * The `nylas-additional-participants` component is a form input for adding additional participants to an event.\n *\n * @part nap__title - The title of the component.\n * @part nap__subtitle - The subtitle of the component.\n * @part nap__content - The content of the component.\n * @part nap__input_group - The input group of the component.\n * @part nap__input_wrapper - The input wrapper of the component.\n * @part nap__input - The input of the component.\n * @part nap__remove-participant - The remove participant button of the component.\n * @part nap__add-participant - The add participant button of the component.\n *\n */\n@Component({\n tag: 'nylas-additional-participants',\n styleUrl: 'nylas-additional-participants.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasAdditionalParticipants {\n @Element() host!: HTMLNylasAdditionalParticipantsElement;\n @Prop() name: string = 'participants';\n @Prop() eventParticipants?: Participant[];\n @Prop() participantOptions?: Participant[];\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * When a name prop is passed, stencil does not automatically set the name attribute on the host element.\n * Since this component is form-associated, the name attribute is required for form submission.\n * This is a workaround to ensure that the name attribute is set on the host element.\n */\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-additional-participants', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @State() participants: Participant[] = this.eventParticipants ?? [];\n @State() participantsValid: boolean = true;\n connectedCallback() {\n debug('nylas-additional-participants', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-additional-participants', 'componentWillLoad');\n this.host.setAttribute('name', this.name);\n }\n\n componentDidLoad() {\n debug('nylas-additional-participants', 'componentDidLoad');\n this.internals.setFormValue(JSON.stringify(this.participantsWithouOrganizer()), 'participants');\n }\n\n disconnectedCallback() {\n debug('nylas-additional-participants', 'disconnectedCallback');\n }\n\n @Listen('inputOptionChanged')\n onInputOptionChanged(event: CustomEvent<{ value: string; name: string }>) {\n debug('nylas-additional-participants', 'onInputOptionChanged');\n const index = event.detail.name;\n this.participants[index].email = event.detail.value;\n const participant = this.participantOptions?.find(participant => participant.email === event.detail.value);\n this.participants[index].name = participant?.name || event.detail.value;\n this.participants = [...this.participants];\n this.internals.setFormValue(JSON.stringify(this.participantsWithouOrganizer()), 'participants');\n }\n onParticipantChange(event, index) {\n debug('nylas-additional-participants', 'onParticipantChange');\n this.participants[index].email = event.target.value;\n this.internals.setFormValue(JSON.stringify(this.participantsWithouOrganizer()), 'participants');\n }\n addParticipant() {\n debug('nylas-additional-participants', 'addParticipant');\n this.participants = [...this.participants, { name: '', email: '', is_organizer: false, availability: { calendar_ids: ['primary'] } }];\n this.internals.setFormValue(JSON.stringify(this.participantsWithouOrganizer()), 'participants');\n }\n removeParticipant(index: number) {\n debug('nylas-additional-participants', 'removeParticipant');\n this.participants = this.participants.filter((_, i) => i !== index);\n this.internals.setFormValue(JSON.stringify(this.participantsWithouOrganizer()), 'participants');\n }\n validate(email, index) {\n debug('nylas-additional-participants', 'validate');\n const regex = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n const valid = regex.test(String(email).toLowerCase());\n this.participants[index].is_valid = valid;\n this.internals.setFormValue(JSON.stringify(this.participantsWithouOrganizer()), 'participants');\n }\n\n participantsWithouOrganizer() {\n return this.participants.filter(participant => !participant.is_organizer);\n }\n\n // Filter out the participants that are already added\n getArrayDifference(array1: Participant[], array2: Participant[]) {\n const filtered = array1.filter(participant1 => !array2.some(participant2 => participant1.email === participant2.email));\n return filtered.map(participant => {\n return { value: participant.email, label: participant.email };\n });\n }\n\n @RegisterComponent<NylasAdditionalParticipants, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-additional-participants',\n stateToProps: new Map([['schedulerConfig.additionalParticipants', 'participantOptions']]),\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <nylas-form-card>\n <h3 slot=\"header-title\" class=\"nylas-additional-participants__title\" part=\"nap__title\">\n Additional participants\n </h3>\n <p slot=\"header-subtitle\" class=\"nylas-additional-participants__subtitle\" part=\"nap__subtitle\">\n Add anyone else who would be joining for this event.\n </p>\n <div slot=\"content\" class=\"nylas-additional-participants__content\">\n <div>\n {this.participants.map((participant, index) => {\n return (\n <div class={'nylas-additional-participants__input_group'} part=\"nap__input_group\">\n <label>{participant.is_organizer ? 'Organizer' : `Participant ${index}`}</label>\n <div\n part=\"nap__input_wrapper\"\n class={`nylas-additional-participants__input_wrapper ${participant.is_organizer && 'nylas-additional-participants__input_wrapper_organizer'} ${participant.is_valid === false && 'nylas-additional-participants__input_wrapper_invalid'}`}\n >\n <div class={{ 'nylas-additional-participants__input': true, 'organizer': participant.is_organizer }} part=\"nap__input\">\n {participant.is_organizer ? (\n <input\n type=\"text\"\n value={participant.email}\n onInput={e => {\n this.onParticipantChange(e, index);\n }}\n readOnly={participant.is_organizer}\n onBlur={() => this.validate(participant.email, index)}\n />\n ) : (\n <input-dropdown name={`${index}`} inputValue={participant.email} options={this.getArrayDifference(this.participantOptions || [], this.participants)} />\n )}\n {!participant.is_organizer && (\n <button onClick={() => this.removeParticipant(index)} part=\"nap__remove-participant\">\n <close-icon />\n </button>\n )}\n </div>\n </div>\n </div>\n );\n })}\n </div>\n <button class=\"nylas-additional-participants__add\" part=\"nap__add-participant\" onClick={() => this.addParticipant()}>\n <add-circle-icon /> <span>Add {this.participants.length > 1 ? 'another' : 'a'} participant</span>\n </button>\n </div>\n </nylas-form-card>\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"nylas-additional-participants.js","sourceRoot":"","sources":["../../../../src/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,EAAgB,MAAM,eAAe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C5B,cAAQ,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,EAAE,IAAI,EAAC,yBAAyB;wCAClF,qBAAc,CACP,CACV,CACG,CACF,CACF,CACP,CAAC;oBACJ,CAAC,CAAC,CACE;oBACN,+DAAQ,KAAK,EAAC,oCAAoC,EAAC,IAAI,EAAC,sBAAsB,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,cAAc,EAAE;wBACjH,yEAAmB;;wBAAC;;4BAAW,IAAI,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG;2CAAoB,CAC1F,CACL,CACU,CACb,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF;AA1DC;IANC,iBAAiB,CAAiH;QACjI,IAAI,EAAE,+BAA+B;QACrC,YAAY,EAAE,IAAI,GAAG,CAAC,CAAC,CAAC,wCAAwC,EAAE,oBAAoB,CAAC,CAAC,CAAC;QACzF,YAAY,EAAE,EAAE;QAChB,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;yDA0DD","sourcesContent":["import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug } from '@/utils/utils';\nimport { AttachInternals, Component, Host, Prop, State, Watch, h, Element, Listen, EventEmitter } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { Event } from '@stencil/core';\n\ntype Participant = {\n name?: string;\n email: string;\n is_valid?: boolean;\n is_organizer: boolean;\n availability?: Availability;\n booking?: Booking;\n};\ntype Availability = {\n calendar_ids: string[];\n};\ntype Booking = {\n calendar_id: string;\n};\n\n/**\n * The `nylas-additional-participants` component is a form input for adding additional participants to an event.\n *\n * @part nap__title - The title of the component.\n * @part nap__subtitle - The subtitle of the component.\n * @part nap__content - The content of the component.\n * @part nap__input_group - The input group of the component.\n * @part nap__input_wrapper - The input wrapper of the component.\n * @part nap__input - The input of the component.\n * @part nap__remove-participant - The remove participant button of the component.\n * @part nap__add-participant - The add participant button of the component.\n *\n */\n@Component({\n tag: 'nylas-additional-participants',\n styleUrl: 'nylas-additional-participants.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasAdditionalParticipants {\n @Element() host!: HTMLNylasAdditionalParticipantsElement;\n @Prop() name: string = 'participants';\n @Prop() eventParticipants?: Participant[];\n @Prop() participantOptions?: Participant[];\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * This event is fired when the selected participants change.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n /**\n * When a name prop is passed, stencil does not automatically set the name attribute on the host element.\n * Since this component is form-associated, the name attribute is required for form submission.\n * This is a workaround to ensure that the name attribute is set on the host element.\n */\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-additional-participants', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @State() participants: Participant[] = this.eventParticipants ?? [];\n @State() participantsValid: boolean = true;\n connectedCallback() {\n debug('nylas-additional-participants', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-additional-participants', 'componentWillLoad');\n this.host.setAttribute('name', this.name);\n }\n\n componentDidLoad() {\n debug('nylas-additional-participants', 'componentDidLoad');\n this.updateFormValue();\n }\n\n disconnectedCallback() {\n debug('nylas-additional-participants', 'disconnectedCallback');\n }\n\n @Listen('inputOptionChanged')\n onInputOptionChanged(event: CustomEvent<{ value: string; name: string }>) {\n debug('nylas-additional-participants', 'onInputOptionChanged');\n const index = event.detail.name;\n this.participants[index].email = event.detail.value;\n const participant = this.participantOptions?.find(participant => participant.email === event.detail.value);\n this.participants[index].availability = participant ? { calendar_ids: ['primary'] } : undefined;\n this.participants[index].name = participant?.name || event.detail.value;\n this.participants = [...this.participants];\n this.updateFormValue();\n }\n onParticipantChange(event, index) {\n debug('nylas-additional-participants', 'onParticipantChange');\n this.participants[index].email = event.target.value;\n this.updateFormValue();\n }\n addParticipant() {\n debug('nylas-additional-participants', 'addParticipant');\n this.participants = [...this.participants, { name: '', email: '', is_organizer: false }];\n this.updateFormValue();\n }\n removeParticipant(index: number) {\n debug('nylas-additional-participants', 'removeParticipant');\n this.participants = this.participants.filter((_, i) => i !== index);\n this.updateFormValue();\n }\n validate(email, index) {\n debug('nylas-additional-participants', 'validate');\n const regex = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n const valid = regex.test(String(email).toLowerCase());\n this.participants[index].is_valid = valid;\n this.updateFormValue();\n }\n\n updateFormValue() {\n debug('nylas-additional-participants', 'updateFormValue');\n this.internals.setFormValue(JSON.stringify(this.participants), this.name);\n this.valueChanged.emit({ value: JSON.stringify(this.participants), name: this.name });\n }\n\n // Filter out the participants that are already added\n getArrayDifference(array1: Participant[], array2: Participant[]) {\n const filtered = array1.filter(participant1 => !array2.some(participant2 => participant1.email === participant2.email));\n return filtered.map(participant => {\n return { value: participant.email, label: participant.email };\n });\n }\n\n @RegisterComponent<NylasAdditionalParticipants, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-additional-participants',\n stateToProps: new Map([['schedulerConfig.additionalParticipants', 'participantOptions']]),\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <nylas-form-card>\n <h3 slot=\"header-title\" class=\"nylas-additional-participants__title\" part=\"nap__title\">\n Additional participants\n </h3>\n <p slot=\"header-subtitle\" class=\"nylas-additional-participants__subtitle\" part=\"nap__subtitle\">\n Add anyone else who would be joining for this event.\n </p>\n <div slot=\"content\" class=\"nylas-additional-participants__content\">\n <div>\n {this.participants.map((participant, index) => {\n return (\n <div class={'nylas-additional-participants__input_group'} part=\"nap__input_group\">\n <label>{participant.is_organizer ? 'Organizer' : `Participant ${index}`}</label>\n <div\n part=\"nap__input_wrapper\"\n class={`nylas-additional-participants__input_wrapper ${participant.is_organizer && 'nylas-additional-participants__input_wrapper_organizer'} ${participant.is_valid === false && 'nylas-additional-participants__input_wrapper_invalid'}`}\n >\n <div class={{ 'nylas-additional-participants__input': true, 'organizer': participant.is_organizer }} part=\"nap__input\">\n {participant.is_organizer ? (\n <input\n type=\"text\"\n value={participant.email}\n onInput={e => {\n this.onParticipantChange(e, index);\n }}\n readOnly={participant.is_organizer}\n onBlur={() => this.validate(participant.email, index)}\n />\n ) : (\n <input-dropdown\n name={`${index}`}\n filterable={true}\n inputValue={participant.email}\n options={this.getArrayDifference(this.participantOptions || [], this.participants)}\n />\n )}\n {!participant.is_organizer && (\n <button onClick={() => this.removeParticipant(index)} part=\"nap__remove-participant\">\n <close-icon />\n </button>\n )}\n </div>\n </div>\n </div>\n );\n })}\n </div>\n <button class=\"nylas-additional-participants__add\" part=\"nap__add-participant\" onClick={() => this.addParticipant()}>\n <add-circle-icon /> <span>Add {this.participants.length > 1 ? 'another' : 'a'} participant</span>\n </button>\n </div>\n </nylas-form-card>\n </Host>\n );\n }\n}\n"]}
|