@nylas/web-elements 1.1.0-canary.15 → 1.1.0-canary.17
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 +11 -18
- package/dist/cjs/add-circle-icon_2.cjs.entry.js.map +1 -1
- package/dist/cjs/archive-icon.cjs.entry.js +1 -1
- package/dist/cjs/archive-icon_7.cjs.entry.js +7 -7
- package/dist/cjs/arrow-icon.cjs.entry.js +1 -1
- package/dist/cjs/bold-icon.cjs.entry.js +1 -1
- package/dist/cjs/bold-icon_3.cjs.entry.js +3 -3
- package/dist/cjs/button-component.cjs.entry.js +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_25.cjs.entry.js → calendar-info-icon_28.cjs.entry.js} +419 -397
- 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 +4 -4
- 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 +101 -78
- 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 +12 -20
- package/dist/cjs/index-c14ea8f5.js +22 -18
- 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 +21 -4
- package/dist/cjs/input-dropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/input-dropdown_2.cjs.entry.js +22 -5
- 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 +38 -14
- 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 +6 -6
- 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-booking-form.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-cancel-booking-form.cjs.entry.js +1 -1
- package/dist/cjs/nylas-cancelled-event-card.cjs.entry.js +1 -1
- package/dist/cjs/nylas-composer.cjs.entry.js +1 -1
- package/dist/cjs/nylas-customize-booking-settings.cjs.entry.js +4 -4
- package/dist/cjs/nylas-customize-booking-settings.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-editor-tabs.cjs.entry.js +99 -76
- package/dist/cjs/nylas-editor-tabs.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-if-state.cjs.entry.js +1 -1
- package/dist/cjs/nylas-list-folders.cjs.entry.js +1 -1
- package/dist/cjs/nylas-list-threads.cjs.entry.js +1 -1
- package/dist/cjs/nylas-login.cjs.entry.js +1 -1
- package/dist/cjs/nylas-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-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 +2 -2
- package/dist/cjs/nylas-scheduler-editor.cjs.entry.js +4 -2
- package/dist/cjs/nylas-scheduler-editor.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-scheduling.cjs.entry.js +1 -1
- package/dist/cjs/nylas-scheduling.cjs.entry.js.map +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/{scheduler-config-store-a5b7c08b.js → scheduler-config-store-0266631b.js} +2 -1
- package/dist/cjs/scheduler-config-store-0266631b.js.map +1 -0
- package/dist/cjs/{scheduler-config-store-918c20d5.js → scheduler-config-store-9f19c7a9.js} +2 -1
- package/dist/cjs/scheduler-config-store-9f19c7a9.js.map +1 -0
- package/dist/cjs/scheduler-store-0f7328f1.js.map +1 -1
- package/dist/cjs/scheduler-store-743ed238.js.map +1 -1
- package/dist/cjs/search-icon.cjs.entry.js +1 -1
- package/dist/cjs/select-dropdown.cjs.entry.js +2 -2
- package/dist/cjs/sent-icon.cjs.entry.js +1 -1
- package/dist/cjs/spam-icon.cjs.entry.js +1 -1
- package/dist/cjs/star-icon.cjs.entry.js +1 -1
- package/dist/cjs/stop-icon.cjs.entry.js +1 -1
- package/dist/cjs/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 +40 -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 +2 -2
- 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-booking-form/nylas-booking-form.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.js +2 -2
- package/dist/collection/components/scheduler/nylas-cancelled-event-card/nylas-cancelled-event-card.js +2 -2
- package/dist/collection/components/scheduler/nylas-date-picker/nylas-date-picker.js +1 -1
- package/dist/collection/components/scheduler/nylas-notification/nylas-notification.js +1 -1
- package/dist/collection/components/scheduler/nylas-scheduling/nylas-scheduling.css +1 -0
- package/dist/collection/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.css +20 -1
- package/dist/collection/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.js +83 -13
- 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-customize-booking-settings/nylas-customize-booking-settings.js +5 -5
- package/dist/collection/components/scheduler-editor/nylas-customize-booking-settings/nylas-customize-booking-settings.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.js +95 -76
- 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 +2 -0
- package/dist/collection/components/scheduler-editor/nylas-editor-tabs/tab-contents.js.map +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 +26 -3
- package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-time-window-picker/nylas-time-window-picker.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-timeslot-interval/nylas-timeslot-interval.js +2 -2
- package/dist/collection/stores/scheduler-config-store.js +1 -0
- package/dist/collection/stores/scheduler-config-store.js.map +1 -1
- package/dist/collection/stores/scheduler-store.js.map +1 -1
- package/dist/components/add-circle.js +1 -1
- package/dist/components/archive.js +1 -1
- package/dist/components/arrow.js +1 -1
- package/dist/components/bold.js +1 -1
- package/dist/components/button-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 +24 -5
- 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-participants.js +1 -127
- package/dist/components/nylas-additional-participants.js.map +1 -1
- package/dist/components/nylas-additional-participants2.js +168 -0
- package/dist/components/nylas-additional-participants2.js.map +1 -0
- 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-booking-form2.js.map +1 -1
- package/dist/components/nylas-cancel-booking-form2.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-customize-booking-settings2.js +4 -4
- package/dist/components/nylas-customize-booking-settings2.js.map +1 -1
- package/dist/components/nylas-editor-tabs2.js +197 -150
- package/dist/components/nylas-editor-tabs2.js.map +1 -1
- package/dist/components/nylas-if-state.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-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-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 +112 -85
- package/dist/components/nylas-scheduler-editor.js.map +1 -1
- package/dist/components/nylas-scheduling.js +1 -1
- package/dist/components/nylas-scheduling.js.map +1 -1
- package/dist/components/nylas-summarize-message-button2.js +2 -2
- package/dist/components/nylas-threads-refresh.js +2 -2
- package/dist/components/nylas-threads-search.js +1 -1
- package/dist/components/nylas-time-window-picker2.js +1 -1
- package/dist/components/nylas-timeslot-interval2.js +2 -2
- package/dist/components/nylas-view-email2.js +1 -1
- package/dist/components/nylas-view-thread.js +1 -1
- package/dist/components/people-icon.js +1 -32
- package/dist/components/people-icon.js.map +1 -1
- package/dist/components/people.js +36 -0
- package/dist/components/people.js.map +1 -0
- 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/scheduler-config-store.js +1 -0
- package/dist/components/scheduler-config-store.js.map +1 -1
- package/dist/components/scheduler-store.js.map +1 -1
- package/dist/components/search.js +1 -1
- package/dist/components/select-dropdown2.js +2 -2
- package/dist/components/sent.js +1 -1
- package/dist/components/spam.js +1 -1
- package/dist/components/star.js +1 -1
- package/dist/components/stop.js +1 -1
- package/dist/components/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 +2 -2
- package/dist/esm/add-circle-icon_2.entry.js +11 -18
- package/dist/esm/add-circle-icon_2.entry.js.map +1 -1
- package/dist/esm/archive-icon.entry.js +2 -2
- package/dist/esm/archive-icon_7.entry.js +7 -7
- package/dist/esm/arrow-icon.entry.js +2 -2
- package/dist/esm/bold-icon.entry.js +2 -2
- package/dist/esm/bold-icon_3.entry.js +3 -3
- package/dist/esm/button-component.entry.js +2 -2
- package/dist/esm/calendar-cancel-icon.entry.js +2 -2
- package/dist/esm/calendar-check-icon.entry.js +2 -2
- package/dist/esm/calendar-check-icon_2.entry.js +2 -2
- package/dist/esm/calendar-icon.entry.js +2 -2
- package/dist/esm/calendar-info-icon.entry.js +2 -2
- package/dist/esm/{calendar-info-icon_25.entry.js → calendar-info-icon_28.entry.js} +417 -398
- package/dist/esm/calendar-info-icon_28.entry.js.map +1 -0
- package/dist/esm/calendar-patterns-icon.entry.js +2 -2
- package/dist/esm/checkbox-component.entry.js +2 -2
- package/dist/esm/checkbox-component.entry.js.map +1 -1
- package/dist/esm/checkmark-circle-icon.entry.js +2 -2
- package/dist/esm/chevron-icon.entry.js +2 -2
- package/dist/esm/chevron-icon_3.entry.js +4 -4
- package/dist/esm/clock-icon.entry.js +2 -2
- package/dist/esm/clock-icon_2.entry.js +2 -2
- package/dist/esm/close-icon.entry.js +2 -2
- package/dist/esm/document-refresh-icon.entry.js +2 -2
- package/dist/esm/flow-icon.entry.js +2 -2
- package/dist/esm/folder-icon.entry.js +2 -2
- package/dist/esm/forward-icon.entry.js +2 -2
- package/dist/esm/forward-icon_6.entry.js +7 -7
- package/dist/esm/globe-icon.entry.js +2 -2
- package/dist/esm/google-logo-icon.entry.js +2 -2
- package/dist/esm/google-logo-icon_4.entry.js +101 -78
- package/dist/esm/google-logo-icon_4.entry.js.map +1 -1
- package/dist/esm/inbox-icon.entry.js +2 -2
- package/dist/esm/{index-11d12497.js → index-2c7e4f4b.js} +2 -2
- package/dist/esm/{index-11d12497.js.map → index-2c7e4f4b.js.map} +1 -1
- package/dist/esm/{index-8362ce5c.js → index-582cfc93.js} +24 -20
- package/dist/esm/{index-8362ce5c.js.map → index-582cfc93.js.map} +1 -1
- package/dist/esm/index-7cb0dd3d.js +12 -20
- package/dist/{nylas-web-elements/index.es-896126fc.js → esm/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 +4 -4
- package/dist/esm/info-icon.entry.js +2 -2
- package/dist/esm/info-icon_2.entry.js +2 -2
- package/dist/esm/input-component.entry.js +2 -2
- package/dist/esm/input-dropdown.entry.js +22 -5
- package/dist/esm/input-dropdown.entry.js.map +1 -1
- package/dist/esm/input-dropdown_2.entry.js +22 -5
- package/dist/esm/input-dropdown_2.entry.js.map +1 -1
- package/dist/esm/italic-icon.entry.js +2 -2
- package/dist/esm/loader.js +3 -3
- package/dist/esm/loading-icon.entry.js +2 -2
- package/dist/esm/location-icon.entry.js +2 -2
- package/dist/esm/location-off-icon.entry.js +2 -2
- package/dist/esm/{mailbox-store-11fa8387.js → mailbox-store-94133e15.js} +4 -4
- package/dist/esm/{mailbox-store-11fa8387.js.map → mailbox-store-94133e15.js.map} +1 -1
- package/dist/esm/microsoft-logo-icon.entry.js +2 -2
- package/dist/esm/multi-select-dropdown.entry.js +4 -4
- package/dist/esm/nylas-additional-participants.entry.js +41 -17
- 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 +30 -19
- package/dist/esm/nylas-availability-picker.entry.js.map +1 -1
- package/dist/esm/nylas-booked-event-card.entry.js +3 -3
- package/dist/esm/nylas-booked-event-card_10.entry.js +6 -6
- package/dist/esm/nylas-booked-event-card_10.entry.js.map +1 -1
- package/dist/esm/nylas-booking-calendar-picker.entry.js +3 -3
- package/dist/esm/nylas-booking-form.entry.js +5 -5
- package/dist/esm/nylas-booking-form.entry.js.map +1 -1
- package/dist/esm/nylas-buffer-time.entry.js +3 -3
- package/dist/esm/nylas-calendar-picker.entry.js +3 -3
- package/dist/esm/nylas-cancel-booking-form.entry.js +4 -4
- package/dist/esm/nylas-cancellation-policy.entry.js +3 -3
- package/dist/esm/nylas-cancelled-event-card.entry.js +4 -4
- package/dist/esm/nylas-composer.entry.js +3 -3
- package/dist/esm/nylas-custom-booking-flow.entry.js +3 -3
- package/dist/esm/nylas-customize-booking-settings.entry.js +7 -7
- package/dist/esm/nylas-customize-booking-settings.entry.js.map +1 -1
- package/dist/esm/nylas-date-picker.entry.js +3 -3
- package/dist/esm/nylas-editor-tabs.entry.js +102 -79
- 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 +3 -3
- package/dist/esm/nylas-event-title.entry.js +3 -3
- package/dist/esm/nylas-form-card.entry.js +3 -3
- package/dist/esm/nylas-if-state.entry.js +4 -4
- package/dist/esm/nylas-limit-future-bookings.entry.js +3 -3
- package/dist/esm/nylas-list-configurations.entry.js +3 -3
- package/dist/esm/nylas-list-folders.entry.js +4 -4
- package/dist/esm/nylas-list-threads.entry.js +4 -4
- package/dist/esm/nylas-locale-switch.entry.js +3 -3
- package/dist/esm/nylas-login.entry.js +4 -4
- package/dist/esm/nylas-logo.entry.js +2 -2
- package/dist/esm/nylas-mailbox-pagination.entry.js +3 -3
- package/dist/esm/nylas-mailbox-toolbar-button.entry.js +4 -4
- package/dist/esm/nylas-mailbox.entry.js +6 -6
- 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 +3 -3
- 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 +8 -8
- package/dist/esm/nylas-scheduler-editor.entry.js +9 -7
- package/dist/esm/nylas-scheduler-editor.entry.js.map +1 -1
- package/dist/esm/nylas-scheduling.entry.js +6 -6
- package/dist/esm/nylas-scheduling.entry.js.map +1 -1
- package/dist/esm/nylas-selected-event-card.entry.js +3 -3
- package/dist/esm/nylas-summarize-message-button.entry.js +5 -5
- package/dist/esm/nylas-threads-refresh.entry.js +5 -5
- package/dist/esm/nylas-threads-search.entry.js +4 -4
- package/dist/esm/nylas-time-window-picker.entry.js +3 -3
- package/dist/esm/nylas-timeslot-interval.entry.js +5 -5
- package/dist/esm/nylas-timeslot-picker.entry.js +3 -3
- package/dist/esm/nylas-view-email.entry.js +3 -3
- package/dist/esm/nylas-view-thread.entry.js +4 -4
- package/dist/esm/nylas-web-elements.js +3 -3
- package/dist/esm/people-icon.entry.js +2 -2
- package/dist/esm/person-icon.entry.js +2 -2
- package/dist/esm/play-icon.entry.js +2 -2
- package/dist/esm/play-icon_2.entry.js +2 -2
- package/dist/esm/radio-button-group.entry.js +2 -2
- package/dist/esm/refresh-icon.entry.js +2 -2
- package/dist/esm/{register-component-8e4e394f.js → register-component-aef40ec4.js} +3 -3
- package/dist/esm/{register-component-8e4e394f.js.map → register-component-aef40ec4.js.map} +1 -1
- package/dist/esm/reply-all-icon.entry.js +2 -2
- package/dist/esm/reply-icon.entry.js +2 -2
- package/dist/esm/{scheduler-config-store-ec3b6190.js → scheduler-config-store-4a50a03d.js} +2 -1
- package/dist/esm/scheduler-config-store-4a50a03d.js.map +1 -0
- package/dist/{nylas-web-elements/scheduler-config-store-8ccc8dc7.js → esm/scheduler-config-store-f20845ad.js} +3 -2
- package/dist/esm/scheduler-config-store-f20845ad.js.map +1 -0
- package/dist/{nylas-web-elements/scheduler-store-c3af2560.js → esm/scheduler-store-6c4866d6.js} +3 -3
- package/dist/esm/{scheduler-store-c3af2560.js.map → scheduler-store-6c4866d6.js.map} +1 -1
- package/dist/esm/scheduler-store-f02ce045.js.map +1 -1
- package/dist/esm/search-icon.entry.js +2 -2
- package/dist/esm/select-dropdown.entry.js +3 -3
- package/dist/esm/sent-icon.entry.js +2 -2
- package/dist/esm/spam-icon.entry.js +2 -2
- package/dist/esm/star-icon.entry.js +2 -2
- package/dist/esm/stop-icon.entry.js +2 -2
- package/dist/esm/textarea-component.entry.js +2 -2
- package/dist/esm/time-period-selector.entry.js +3 -3
- package/dist/esm/toggle-switch.entry.js +2 -2
- package/dist/esm/toggle-switch.entry.js.map +1 -1
- package/dist/esm/tooltip-component.entry.js +2 -2
- package/dist/esm/translate-icon.entry.js +2 -2
- package/dist/esm/trash-icon.entry.js +2 -2
- package/dist/esm/underline-icon.entry.js +2 -2
- package/dist/esm/{utils-49a1d17b.js → 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 +2 -2
- package/dist/nylas-web-elements/add-circle-icon.entry.js +2 -2
- package/dist/nylas-web-elements/archive-icon.entry.js +2 -2
- package/dist/nylas-web-elements/arrow-icon.entry.js +2 -2
- package/dist/nylas-web-elements/bold-icon.entry.js +2 -2
- package/dist/nylas-web-elements/button-component.entry.js +2 -2
- package/dist/nylas-web-elements/calendar-cancel-icon.entry.js +2 -2
- package/dist/nylas-web-elements/calendar-check-icon.entry.js +2 -2
- package/dist/nylas-web-elements/calendar-icon.entry.js +2 -2
- package/dist/nylas-web-elements/calendar-info-icon.entry.js +2 -2
- package/dist/nylas-web-elements/calendar-patterns-icon.entry.js +2 -2
- package/dist/nylas-web-elements/checkbox-component.entry.js +2 -2
- package/dist/nylas-web-elements/checkbox-component.entry.js.map +1 -1
- package/dist/nylas-web-elements/checkmark-circle-icon.entry.js +2 -2
- package/dist/nylas-web-elements/chevron-icon.entry.js +2 -2
- package/dist/nylas-web-elements/clock-icon.entry.js +2 -2
- package/dist/nylas-web-elements/close-icon.entry.js +2 -2
- package/dist/nylas-web-elements/document-refresh-icon.entry.js +2 -2
- package/dist/nylas-web-elements/flow-icon.entry.js +2 -2
- package/dist/nylas-web-elements/folder-icon.entry.js +2 -2
- package/dist/nylas-web-elements/forward-icon.entry.js +2 -2
- package/dist/nylas-web-elements/globe-icon.entry.js +2 -2
- package/dist/nylas-web-elements/google-logo-icon.entry.js +2 -2
- package/dist/nylas-web-elements/inbox-icon.entry.js +2 -2
- package/dist/nylas-web-elements/{index-11d12497.js → index-2c7e4f4b.js} +2 -2
- package/dist/nylas-web-elements/{index-11d12497.js.map → index-2c7e4f4b.js.map} +1 -1
- package/dist/nylas-web-elements/{index-8362ce5c.js → index-582cfc93.js} +2 -2
- package/dist/nylas-web-elements/{index-8362ce5c.js.map → index-582cfc93.js.map} +1 -1
- package/dist/{esm/index.es-896126fc.js → nylas-web-elements/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 +4 -4
- package/dist/nylas-web-elements/info-icon.entry.js +2 -2
- package/dist/nylas-web-elements/input-component.entry.js +2 -2
- package/dist/nylas-web-elements/input-dropdown.entry.js +22 -5
- package/dist/nylas-web-elements/input-dropdown.entry.js.map +1 -1
- package/dist/nylas-web-elements/italic-icon.entry.js +2 -2
- package/dist/nylas-web-elements/loading-icon.entry.js +2 -2
- package/dist/nylas-web-elements/location-icon.entry.js +2 -2
- package/dist/nylas-web-elements/location-off-icon.entry.js +2 -2
- package/dist/nylas-web-elements/{mailbox-store-11fa8387.js → mailbox-store-94133e15.js} +4 -4
- package/dist/nylas-web-elements/{mailbox-store-11fa8387.js.map → mailbox-store-94133e15.js.map} +1 -1
- package/dist/nylas-web-elements/microsoft-logo-icon.entry.js +2 -2
- package/dist/nylas-web-elements/multi-select-dropdown.entry.js +4 -4
- package/dist/nylas-web-elements/nylas-additional-participants.entry.js +41 -17
- 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 +30 -19
- package/dist/nylas-web-elements/nylas-availability-picker.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-booked-event-card.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-booking-calendar-picker.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-booking-form.entry.js +5 -5
- package/dist/nylas-web-elements/nylas-booking-form.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-buffer-time.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-calendar-picker.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-cancel-booking-form.entry.js +4 -4
- package/dist/nylas-web-elements/nylas-cancellation-policy.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-cancelled-event-card.entry.js +4 -4
- package/dist/nylas-web-elements/nylas-composer.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-custom-booking-flow.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-customize-booking-settings.entry.js +7 -7
- package/dist/nylas-web-elements/nylas-customize-booking-settings.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-date-picker.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-editor-tabs.entry.js +102 -79
- 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 +3 -3
- package/dist/nylas-web-elements/nylas-event-title.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-form-card.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-if-state.entry.js +4 -4
- package/dist/nylas-web-elements/nylas-limit-future-bookings.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-list-configurations.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-list-folders.entry.js +4 -4
- package/dist/nylas-web-elements/nylas-list-threads.entry.js +4 -4
- package/dist/nylas-web-elements/nylas-locale-switch.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-login.entry.js +4 -4
- package/dist/nylas-web-elements/nylas-logo.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-mailbox-pagination.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-mailbox-toolbar-button.entry.js +4 -4
- package/dist/nylas-web-elements/nylas-mailbox.entry.js +6 -6
- 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 +3 -3
- 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 +8 -8
- package/dist/nylas-web-elements/nylas-scheduler-editor.entry.js +9 -7
- package/dist/nylas-web-elements/nylas-scheduler-editor.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-scheduling.entry.js +6 -6
- package/dist/nylas-web-elements/nylas-scheduling.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-selected-event-card.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-summarize-message-button.entry.js +5 -5
- package/dist/nylas-web-elements/nylas-threads-refresh.entry.js +5 -5
- package/dist/nylas-web-elements/nylas-threads-search.entry.js +4 -4
- package/dist/nylas-web-elements/nylas-time-window-picker.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-timeslot-interval.entry.js +5 -5
- package/dist/nylas-web-elements/nylas-timeslot-picker.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-view-email.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-view-thread.entry.js +4 -4
- package/dist/nylas-web-elements/nylas-web-elements.esm.js +3 -3
- package/dist/nylas-web-elements/{p-e4a7746d.entry.js → p-012cb022.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-b9064de4.entry.js → p-017f2538.entry.js} +2 -2
- package/dist/nylas-web-elements/p-05833164.entry.js +2 -0
- package/dist/nylas-web-elements/p-05833164.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-086746ee.entry.js +2 -0
- package/dist/nylas-web-elements/p-086746ee.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-0919bbbe.entry.js +2 -0
- package/dist/nylas-web-elements/{p-da21471c.entry.js → p-13eb1a05.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-deafc6bc.entry.js → p-1569f74f.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-6e888067.entry.js → p-23c143f6.entry.js} +2 -2
- package/dist/nylas-web-elements/p-2743621d.entry.js +2 -0
- package/dist/nylas-web-elements/p-2743621d.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-29938263.js +2 -0
- package/dist/nylas-web-elements/p-29938263.js.map +1 -0
- package/dist/nylas-web-elements/{p-afd34a25.entry.js → p-2f656fb3.entry.js} +3 -3
- package/dist/nylas-web-elements/p-2f656fb3.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-a7dd4c24.entry.js → p-30144ca0.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-11f94952.entry.js → p-336631dd.entry.js} +2 -2
- package/dist/nylas-web-elements/p-43bfaa93.entry.js +2 -0
- package/dist/nylas-web-elements/{p-120d2c72.entry.js → p-4e48846a.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-4b84ab3f.entry.js → p-5fd52ecd.entry.js} +2 -2
- package/dist/nylas-web-elements/p-62cf46ee.entry.js +2 -0
- package/dist/nylas-web-elements/{p-32682655.entry.js → p-672f1951.entry.js} +2 -2
- package/dist/nylas-web-elements/p-823c8aa2.js.map +1 -1
- package/dist/nylas-web-elements/{p-ace74b9d.entry.js → p-84c53084.entry.js} +2 -2
- package/dist/nylas-web-elements/p-8c1a5e57.entry.js +2 -0
- package/dist/nylas-web-elements/p-8c1a5e57.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-8eddadb3.entry.js +2 -0
- package/dist/nylas-web-elements/{p-0dbc0c01.entry.js.map → p-8eddadb3.entry.js.map} +1 -1
- package/dist/nylas-web-elements/p-938d4ec9.entry.js +2 -0
- package/dist/nylas-web-elements/{p-fbac3865.entry.js.map → p-938d4ec9.entry.js.map} +1 -1
- package/dist/nylas-web-elements/{p-6891ad5d.entry.js → p-a118f20c.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-24082558.entry.js → p-a5dbdc8e.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-4fdc6122.entry.js → p-a7640232.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-27db7b0b.entry.js → p-ad93d3bd.entry.js} +3 -3
- package/dist/nylas-web-elements/{p-bfd3b5f0.entry.js → p-b3d46e08.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-4b1466b3.entry.js → p-b443f769.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-c8c737ed.entry.js → p-c1df61d0.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-395f49eb.entry.js → p-cc67e6a8.entry.js} +2 -2
- package/dist/nylas-web-elements/p-d1d984c5.entry.js +2 -0
- package/dist/nylas-web-elements/p-d1d984c5.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-98a2f588.entry.js → p-d9a145a5.entry.js} +2 -2
- package/dist/nylas-web-elements/p-dcb497d4.entry.js +2 -0
- package/dist/nylas-web-elements/p-dcb497d4.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-ec26560f.entry.js → p-e9c1e983.entry.js} +2 -2
- package/dist/nylas-web-elements/p-e9f7d494.entry.js +2 -0
- package/dist/nylas-web-elements/{p-53da3000.entry.js.map → p-e9f7d494.entry.js.map} +1 -1
- package/dist/nylas-web-elements/p-f1e9ed6b.entry.js +2 -0
- package/dist/nylas-web-elements/p-f1e9ed6b.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-f8e0164c.entry.js +2 -0
- package/dist/nylas-web-elements/p-f8e0164c.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-84529d9b.entry.js → p-fbfa3a7d.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-d5146511.entry.js → p-fd8e29e6.entry.js} +2 -2
- package/dist/nylas-web-elements/people-icon.entry.js +2 -2
- package/dist/nylas-web-elements/person-icon.entry.js +2 -2
- package/dist/nylas-web-elements/play-icon.entry.js +2 -2
- package/dist/nylas-web-elements/radio-button-group.entry.js +2 -2
- package/dist/nylas-web-elements/refresh-icon.entry.js +2 -2
- package/dist/nylas-web-elements/{register-component-8e4e394f.js → register-component-aef40ec4.js} +3 -3
- package/dist/nylas-web-elements/{register-component-8e4e394f.js.map → register-component-aef40ec4.js.map} +1 -1
- package/dist/nylas-web-elements/reply-all-icon.entry.js +2 -2
- package/dist/nylas-web-elements/reply-icon.entry.js +2 -2
- package/dist/{esm/scheduler-config-store-8ccc8dc7.js → nylas-web-elements/scheduler-config-store-f20845ad.js} +3 -2
- package/dist/nylas-web-elements/scheduler-config-store-f20845ad.js.map +1 -0
- package/dist/{esm/scheduler-store-c3af2560.js → nylas-web-elements/scheduler-store-6c4866d6.js} +3 -3
- package/dist/nylas-web-elements/{scheduler-store-c3af2560.js.map → scheduler-store-6c4866d6.js.map} +1 -1
- package/dist/nylas-web-elements/search-icon.entry.js +2 -2
- package/dist/nylas-web-elements/select-dropdown.entry.js +3 -3
- package/dist/nylas-web-elements/sent-icon.entry.js +2 -2
- package/dist/nylas-web-elements/spam-icon.entry.js +2 -2
- package/dist/nylas-web-elements/star-icon.entry.js +2 -2
- package/dist/nylas-web-elements/stop-icon.entry.js +2 -2
- package/dist/nylas-web-elements/textarea-component.entry.js +2 -2
- package/dist/nylas-web-elements/time-period-selector.entry.js +3 -3
- package/dist/nylas-web-elements/toggle-switch.entry.js +2 -2
- package/dist/nylas-web-elements/toggle-switch.entry.js.map +1 -1
- package/dist/nylas-web-elements/tooltip-component.entry.js +2 -2
- package/dist/nylas-web-elements/translate-icon.entry.js +2 -2
- package/dist/nylas-web-elements/trash-icon.entry.js +2 -2
- package/dist/nylas-web-elements/underline-icon.entry.js +2 -2
- package/dist/nylas-web-elements/{utils-49a1d17b.js → 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 +2 -2
- package/dist/types/components/design-system/input-dropdown/input-dropdown.d.ts +3 -0
- package/dist/types/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.d.ts +16 -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/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.d.ts +2 -0
- package/dist/types/components.d.ts +134 -11
- package/dist/types/stores/scheduler-config-store.d.ts +2 -1
- package/dist/types/stores/scheduler-store.d.ts +1 -1
- package/package.json +2 -2
- package/dist/cjs/calendar-info-icon_25.cjs.entry.js.map +0 -1
- package/dist/cjs/scheduler-config-store-918c20d5.js.map +0 -1
- package/dist/cjs/scheduler-config-store-a5b7c08b.js.map +0 -1
- package/dist/esm/calendar-info-icon_25.entry.js.map +0 -1
- package/dist/esm/scheduler-config-store-8ccc8dc7.js.map +0 -1
- package/dist/esm/scheduler-config-store-ec3b6190.js.map +0 -1
- package/dist/nylas-web-elements/p-0dbc0c01.entry.js +0 -2
- package/dist/nylas-web-elements/p-155942d0.entry.js +0 -2
- package/dist/nylas-web-elements/p-155942d0.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-237d2b4e.entry.js +0 -2
- package/dist/nylas-web-elements/p-237d2b4e.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-2e813dd0.entry.js +0 -2
- package/dist/nylas-web-elements/p-2e813dd0.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-35b66ab6.entry.js +0 -2
- package/dist/nylas-web-elements/p-35b66ab6.entry.js.map +0 -1
- 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-53da3000.entry.js +0 -2
- package/dist/nylas-web-elements/p-6239608c.entry.js +0 -2
- package/dist/nylas-web-elements/p-6239608c.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-7fac2bba.entry.js +0 -2
- package/dist/nylas-web-elements/p-86895fc4.entry.js +0 -2
- package/dist/nylas-web-elements/p-86895fc4.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-afd34a25.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-b406bf70.entry.js +0 -2
- package/dist/nylas-web-elements/p-b406bf70.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-c170c56d.entry.js +0 -2
- package/dist/nylas-web-elements/p-de63bc35.entry.js +0 -2
- package/dist/nylas-web-elements/p-ee91a2a0.js +0 -2
- package/dist/nylas-web-elements/p-ee91a2a0.js.map +0 -1
- package/dist/nylas-web-elements/p-f1bd124d.entry.js +0 -2
- package/dist/nylas-web-elements/p-f1bd124d.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-fac4d89e.entry.js +0 -2
- package/dist/nylas-web-elements/p-fac4d89e.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-fbac3865.entry.js +0 -2
- package/dist/nylas-web-elements/scheduler-config-store-8ccc8dc7.js.map +0 -1
- /package/dist/nylas-web-elements/{p-e4a7746d.entry.js.map → p-012cb022.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-b9064de4.entry.js.map → p-017f2538.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-de63bc35.entry.js.map → p-0919bbbe.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-da21471c.entry.js.map → p-13eb1a05.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-deafc6bc.entry.js.map → p-1569f74f.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-6e888067.entry.js.map → p-23c143f6.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-a7dd4c24.entry.js.map → p-30144ca0.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-11f94952.entry.js.map → p-336631dd.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-7fac2bba.entry.js.map → p-43bfaa93.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-120d2c72.entry.js.map → p-4e48846a.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-4b84ab3f.entry.js.map → p-5fd52ecd.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-c170c56d.entry.js.map → p-62cf46ee.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-32682655.entry.js.map → p-672f1951.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-ace74b9d.entry.js.map → p-84c53084.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-6891ad5d.entry.js.map → p-a118f20c.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-24082558.entry.js.map → p-a5dbdc8e.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-4fdc6122.entry.js.map → p-a7640232.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-27db7b0b.entry.js.map → p-ad93d3bd.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-bfd3b5f0.entry.js.map → p-b3d46e08.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-4b1466b3.entry.js.map → p-b443f769.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-c8c737ed.entry.js.map → p-c1df61d0.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-395f49eb.entry.js.map → p-cc67e6a8.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-98a2f588.entry.js.map → p-d9a145a5.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-ec26560f.entry.js.map → p-e9c1e983.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-84529d9b.entry.js.map → p-fbfa3a7d.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-d5146511.entry.js.map → p-fd8e29e6.entry.js.map} +0 -0
|
@@ -17,6 +17,8 @@ export default function TabContents({ id, formState, activeTab, calendars }) {
|
|
|
17
17
|
return (h("div", { key: id }, h("nylas-booking-calendar-picker", { name: "booking-calendar", calendars: calendars ?? [], defaultBookingCalendar: bookingCalendar, exportparts: 'nbcp, nbcp__header, nbcp__input-label, nbcp__dropdown, nbcp__dropdown-button, nbcp__dropdown-content' }), h("nylas-calendar-picker", { name: "calendars", calendars: calendars ?? [], defaultSelectedCalendars: selectedCalendars, exportparts: 'ncp ncp__header, ncp__dropdown, ncp__dropdown-button, ncp__dropdown-content' }), h("nylas-availability-picker", { name: "availability", openHours: openHours, defaultTimezone: timezone, exportparts: 'nap__header, nap__select-timezone, nap__select-timezone-button, nap__select-timezone-dropdown-content, nap__availability, nap__day, nap__time-ranges, nap__time-range, nap__add-time-range, nap__time-picker-container, nap__time-picker-input, nap__time-picker-times' })));
|
|
18
18
|
case 'bookingOptions':
|
|
19
19
|
return (h("div", { key: id }, h("nylas-buffer-time", { name: "buffer-time", buffer: formState.buffer, exportparts: 'nbt, nbt__header, nbt__body, nbt__dropdown-before, nbt__dropdown-button-before, nbt__dropdown-content-before, nbt__dropdown-after, nbt__dropdown-button-after, nbt__dropdown-content-after, nbt__preview' }), h("nylas-event-limits", null, h("div", { slot: "inputs" }, h("nylas-min-booking-notice", { name: "min-booking-notice", minBookingNotice: formState.minBookingNotice, exportparts: "nmbn, nmbn__number-dropdown, nmbn__number-dropdown-button, nmbn__number-dropdown-content, nmbn__period-dropdown, nmbn__period-dropdown-button, nmbn__period-dropdown-content" }), h("nylas-limit-future-bookings", { name: "limit-future-bookings", availableDaysInFuture: formState.availableDaysInFuture, exportparts: "nlfb, nlfb__number-dropdown, nlfb__number-dropdown-button, nlfb__number-dropdown-content, nlfb__period-dropdown, nlfb__period-dropdown-button, nlfb__period-dropdown-content" }), h("nylas-min-cancellation-notice", { name: "min-cancellation-notice", minCancellationNotice: formState.minCancellationNotice, exportparts: "nmcn, nmcn__number-dropdown, nmcn__number-dropdown-button, nmcn__number-dropdown-content, nmcn__period-dropdown, nmcn__period-dropdown-button, nmcn__period-dropdown-content" }), h("nylas-cancellation-policy", { name: "cancellation-policy", cancellationPolicy: formState.cancellationPolicy, exportparts: "ncpolicy, ncpolicy__textarea" }))), h("nylas-timeslot-interval", { name: "timeslot-interval", eventDurationMinutes: parseInt(formState.duration), exportparts: "nti, nti__header, nti__input-label, nti__dropdown, nti__dropdown-button, nti__dropdown-content" }), h("nylas-customize-booking-settings", { name: "customize-booking-settings", exportparts: "ncbs, ncbs__header, ncbs__settings, ncbs__settings-div, ncbs__additional_guests, ncbs__cancellation_options, ncbs__rescheduling_options" })));
|
|
20
|
+
case 'participants':
|
|
21
|
+
return (h("div", { key: id }, h("nylas-additional-participants", { name: "participants", eventParticipants: formState.participants, exportparts: "nap__title, nap__subtitle, nap__content, nap__input_group, nap__input_wrapper, nap__input, nap__remove-participant" }), h("nylas-participants-custom-availability", { name: "participant-custom-availability", participants: formState.participants, exportparts: "npca, npca__header, npca__content, npca__participant-container, npca__participant-title, npca__participant-toggle--container, npca__toggle-label, npca__toggle-input, npca__toggle-slider" })));
|
|
20
22
|
}
|
|
21
23
|
}
|
|
22
24
|
//# sourceMappingURL=tab-contents.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tab-contents.js","sourceRoot":"","sources":["../../../../src/components/scheduler-editor/nylas-editor-tabs/tab-contents.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AASlC,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAAE,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAoB;IAC3F,QAAQ,SAAS,EAAE,CAAC;QAClB,KAAK,WAAW;YACd,MAAM,UAAU,GAAG,SAAS,CAAC,KAAK,CAAC;YACnC,MAAM,gBAAgB,GAAG,SAAS,CAAC,WAAW,CAAC;YAC/C,MAAM,aAAa,GAAG,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;YACnD,MAAM,QAAQ,GAAG,SAAS,CAAC,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"tab-contents.js","sourceRoot":"","sources":["../../../../src/components/scheduler-editor/nylas-editor-tabs/tab-contents.tsx"],"names":[],"mappings":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C,yBAAyB,EAC9B,qBAAqB,EAAE,SAAS,CAAC,qBAAqB,EACtD,WAAW,EAAC,8KAA8K,GAC1L;wBACF,iCAA2B,IAAI,EAAC,qBAAqB,EAAC,kBAAkB,EAAE,SAAS,CAAC,kBAAkB,EAAE,WAAW,EAAC,8BAA8B,GAAG,CACjJ,CACa;gBACrB,+BACE,IAAI,EAAC,mBAAmB,EACxB,oBAAoB,EAAE,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC,EAClD,WAAW,EAAC,gGAAgG,GAC5G;gBACF,wCACE,IAAI,EAAC,4BAA4B,EACjC,WAAW,EAAC,yIAAyI,GACrJ,CACE,CACP,CAAC;QACJ,KAAK,cAAc;YACjB,OAAO,CACL,WAAK,GAAG,EAAE,EAAE;gBACV,qCACE,IAAI,EAAC,cAAc,EACnB,iBAAiB,EAAE,SAAS,CAAC,YAAY,EACzC,WAAW,EAAC,oHAAoH,GAChI;gBACF,8CACE,IAAI,EAAC,iCAAiC,EACtC,YAAY,EAAE,SAAS,CAAC,YAAY,EACpC,WAAW,EAAC,2LAA2L,GACvM,CACE,CACP,CAAC;IACN,CAAC;AACH,CAAC","sourcesContent":["import { h } from '@stencil/core';\n\nexport type TabContentsProps = {\n id: string;\n formState: any;\n activeTab: string;\n calendars?: any[];\n};\n\nexport default function TabContents({ id, formState, activeTab, calendars }: TabContentsProps) {\n switch (activeTab) {\n case 'eventInfo':\n const eventTitle = formState.title;\n const eventDescription = formState.description;\n const eventDuration = parseInt(formState.duration);\n const location = formState.location;\n\n return (\n <div key={id}>\n <nylas-event-info>\n <div slot=\"inputs\">\n <nylas-event-title name=\"title\" eventTitle={eventTitle} exportparts=\"net, net__title, net__dropdown-content\" />\n <nylas-event-duration\n name=\"duration\"\n eventDurationMinutes={eventDuration}\n exportparts=\"ned, ned__dropdown, ned__dropdown-button, ned__dropdown-content, ned__input_dropdown, ned__input_dropdown-input, ned__input_dropdown-content\"\n />\n <nylas-event-location name=\"location\" eventLocation={location} exportparts=\"nel, nel__location, nel__dropdown, nel__dropdown-button, nel__dropdown-content\" />\n <nylas-event-description name=\"description\" eventDescription={eventDescription} exportparts=\"nedesc, nedesc__textarea\" />\n </div>\n </nylas-event-info>\n </div>\n );\n case 'availability':\n const openHours = formState.availability.openHours;\n const timezone = formState.availability.timezone ? formState.availability.timezone : Intl.DateTimeFormat().resolvedOptions().timeZone;\n const organizer = formState.participants?.find(p => p.is_organizer);\n const organizerEmail = organizer?.email ?? 'primary';\n const selectedCalendars = formState.calendarIds.length > 0 ? formState.calendarIds : [organizerEmail];\n const bookingCalendar = formState.bookingCalendar == 'primary' ? organizerEmail : formState.bookingCalendar;\n return (\n <div key={id}>\n <nylas-booking-calendar-picker\n name=\"booking-calendar\"\n calendars={calendars ?? []}\n defaultBookingCalendar={bookingCalendar}\n exportparts={'nbcp, nbcp__header, nbcp__input-label, nbcp__dropdown, nbcp__dropdown-button, nbcp__dropdown-content'}\n />\n <nylas-calendar-picker\n name=\"calendars\"\n calendars={calendars ?? []}\n defaultSelectedCalendars={selectedCalendars}\n exportparts={'ncp ncp__header, ncp__dropdown, ncp__dropdown-button, ncp__dropdown-content'}\n />\n <nylas-availability-picker\n name=\"availability\"\n openHours={openHours}\n defaultTimezone={timezone}\n exportparts={\n 'nap__header, nap__select-timezone, nap__select-timezone-button, nap__select-timezone-dropdown-content, nap__availability, nap__day, nap__time-ranges, nap__time-range, nap__add-time-range, nap__time-picker-container, nap__time-picker-input, nap__time-picker-times'\n }\n />\n </div>\n );\n case 'bookingOptions':\n return (\n <div key={id}>\n <nylas-buffer-time\n name=\"buffer-time\"\n buffer={formState.buffer}\n exportparts={\n 'nbt, nbt__header, nbt__body, nbt__dropdown-before, nbt__dropdown-button-before, nbt__dropdown-content-before, nbt__dropdown-after, nbt__dropdown-button-after, nbt__dropdown-content-after, nbt__preview'\n }\n />\n {/* <nylas-custom-booking-flow\n name=\"booking-type\"\n bookingType={formState.bookingType}\n exportparts={'ncbf, ncbf__header, ncbf__dropdown, ncbf__dropdown-button, ncbf__dropdown-content'}\n /> */}\n <nylas-event-limits>\n <div slot=\"inputs\">\n <nylas-min-booking-notice\n name=\"min-booking-notice\"\n minBookingNotice={formState.minBookingNotice}\n exportparts=\"nmbn, nmbn__number-dropdown, nmbn__number-dropdown-button, nmbn__number-dropdown-content, nmbn__period-dropdown, nmbn__period-dropdown-button, nmbn__period-dropdown-content\"\n />\n <nylas-limit-future-bookings\n name=\"limit-future-bookings\"\n availableDaysInFuture={formState.availableDaysInFuture}\n exportparts=\"nlfb, nlfb__number-dropdown, nlfb__number-dropdown-button, nlfb__number-dropdown-content, nlfb__period-dropdown, nlfb__period-dropdown-button, nlfb__period-dropdown-content\"\n />\n <nylas-min-cancellation-notice\n name=\"min-cancellation-notice\"\n minCancellationNotice={formState.minCancellationNotice}\n exportparts=\"nmcn, nmcn__number-dropdown, nmcn__number-dropdown-button, nmcn__number-dropdown-content, nmcn__period-dropdown, nmcn__period-dropdown-button, nmcn__period-dropdown-content\"\n />\n <nylas-cancellation-policy name=\"cancellation-policy\" cancellationPolicy={formState.cancellationPolicy} exportparts=\"ncpolicy, ncpolicy__textarea\" />\n </div>\n </nylas-event-limits>\n <nylas-timeslot-interval\n name=\"timeslot-interval\"\n eventDurationMinutes={parseInt(formState.duration)}\n exportparts=\"nti, nti__header, nti__input-label, nti__dropdown, nti__dropdown-button, nti__dropdown-content\"\n />\n <nylas-customize-booking-settings\n name=\"customize-booking-settings\"\n exportparts=\"ncbs, ncbs__header, ncbs__settings, ncbs__settings-div, ncbs__additional_guests, ncbs__cancellation_options, ncbs__rescheduling_options\"\n />\n </div>\n );\n case 'participants':\n return (\n <div key={id}>\n <nylas-additional-participants\n name=\"participants\"\n eventParticipants={formState.participants}\n exportparts=\"nap__title, nap__subtitle, nap__content, nap__input_group, nap__input_wrapper, nap__input, nap__remove-participant\"\n />\n <nylas-participants-custom-availability\n name=\"participant-custom-availability\"\n participants={formState.participants}\n exportparts=\"npca, npca__header, npca__content, npca__participant-container, npca__participant-title, npca__participant-toggle--container, npca__toggle-label, npca__toggle-input, npca__toggle-slider\"\n />\n </div>\n );\n }\n}\n"]}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
--nylas-primary: #2563eb;
|
|
4
|
+
--nylas-error: #cc4841;
|
|
5
|
+
--nylas-error-pressed: #992222;
|
|
6
|
+
--nylas-wraning: #f06c00;
|
|
7
|
+
--nylas-success: #16a392;
|
|
8
|
+
--nylas-info: #2b8fc2;
|
|
9
|
+
--nylas-base-0: #ffffff;
|
|
10
|
+
--nylas-base-25: #fcfcfd;
|
|
11
|
+
--nylas-base-50: #f8f9fc;
|
|
12
|
+
--nylas-base-100: #eaecf5;
|
|
13
|
+
--nylas-base-200: #d5d9eb;
|
|
14
|
+
--nylas-base-300: #b3b8d8;
|
|
15
|
+
--nylas-base-400: #717bbc;
|
|
16
|
+
--nylas-base-500: #4e5ba6;
|
|
17
|
+
--nylas-base-600: #3e4784;
|
|
18
|
+
--nylas-base-700: #263f72;
|
|
19
|
+
--nylas-base-800: #293056;
|
|
20
|
+
--nylas-base-900: #101323;
|
|
21
|
+
--nylas-base-950: #0e101b;
|
|
22
|
+
--nylas-border-radius: 0.25rem;
|
|
23
|
+
--nylas-border-radius-2x: 0.5rem;
|
|
24
|
+
--nylas-border-radius-3x: 0.75rem;
|
|
25
|
+
--nylas-font-family: "Inter", sans-serif;
|
|
26
|
+
width: inherit;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.nylas-participants-custom-availability {
|
|
30
|
+
width: inherit;
|
|
31
|
+
display: flex;
|
|
32
|
+
flex-direction: column;
|
|
33
|
+
margin: 1rem;
|
|
34
|
+
border-radius: var(--nylas-border-radius-2x);
|
|
35
|
+
border: 1px solid var(--nylas-base-200);
|
|
36
|
+
}
|
|
37
|
+
.nylas-participants-custom-availability .header {
|
|
38
|
+
padding: 1rem;
|
|
39
|
+
}
|
|
40
|
+
.nylas-participants-custom-availability .header h3 {
|
|
41
|
+
margin: 0;
|
|
42
|
+
font-size: 16px;
|
|
43
|
+
font-weight: 600;
|
|
44
|
+
line-height: 20px;
|
|
45
|
+
color: var(--nylas-base-900);
|
|
46
|
+
text-align: left;
|
|
47
|
+
}
|
|
48
|
+
.nylas-participants-custom-availability .header p {
|
|
49
|
+
margin: 0.25rem 0 0 0;
|
|
50
|
+
font-size: 0.875rem;
|
|
51
|
+
font-weight: 400;
|
|
52
|
+
line-height: 20px;
|
|
53
|
+
color: var(--nylas-base-600);
|
|
54
|
+
text-align: left;
|
|
55
|
+
}
|
|
56
|
+
.nylas-participants-custom-availability .content .participant-container {
|
|
57
|
+
padding-top: 8px;
|
|
58
|
+
border-top: 1px solid var(--nylas-base-200);
|
|
59
|
+
}
|
|
60
|
+
.nylas-participants-custom-availability .content .participant-container .participant-title {
|
|
61
|
+
display: flex;
|
|
62
|
+
justify-content: space-between;
|
|
63
|
+
align-items: center;
|
|
64
|
+
padding: 4px 16px 12px;
|
|
65
|
+
}
|
|
66
|
+
.nylas-participants-custom-availability .content .participant-container .participant-title p {
|
|
67
|
+
margin: 0;
|
|
68
|
+
}
|
|
69
|
+
.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle {
|
|
70
|
+
display: flex;
|
|
71
|
+
gap: 24px;
|
|
72
|
+
align-items: center;
|
|
73
|
+
}
|
|
74
|
+
.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle .chevron {
|
|
75
|
+
display: flex;
|
|
76
|
+
align-self: center;
|
|
77
|
+
cursor: pointer;
|
|
78
|
+
}
|
|
79
|
+
.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle .chevron:hover, .nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle .chevron:active {
|
|
80
|
+
color: var(--nylas-primary);
|
|
81
|
+
}
|
|
82
|
+
.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle .chevron.open {
|
|
83
|
+
transform: rotate(90deg);
|
|
84
|
+
}
|
|
85
|
+
.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle .chevron.closed {
|
|
86
|
+
transform: rotate(270deg);
|
|
87
|
+
}
|
|
88
|
+
.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle .chevron.disabled {
|
|
89
|
+
cursor: not-allowed;
|
|
90
|
+
color: var(--nylas-base-300);
|
|
91
|
+
}
|
|
92
|
+
.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle .chevron.disabled:hover {
|
|
93
|
+
color: var(--nylas-base-300);
|
|
94
|
+
}
|
|
95
|
+
.nylas-participants-custom-availability .content .participant-container nylas-availability-picker::part(nap) {
|
|
96
|
+
margin: 0;
|
|
97
|
+
border: none;
|
|
98
|
+
}
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
4
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else
|
|
6
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
7
|
+
if (d = decorators[i])
|
|
8
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
9
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
10
|
+
};
|
|
11
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
12
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
13
|
+
return Reflect.metadata(k, v);
|
|
14
|
+
};
|
|
15
|
+
import { RegisterComponent } from "../../../common/register-component";
|
|
16
|
+
import { debug } from "../../../utils/utils";
|
|
17
|
+
import { Host, h } from "@stencil/core";
|
|
18
|
+
export class NylasParticipantsCustomAvailability {
|
|
19
|
+
constructor() {
|
|
20
|
+
this.name = 'participant-custom-availability';
|
|
21
|
+
this.participants = undefined;
|
|
22
|
+
this.selectedParticipants = this.setParticipants(this.participants);
|
|
23
|
+
}
|
|
24
|
+
elementNameChangedHandler(newValue) {
|
|
25
|
+
debug('nylas-participants-custom-availability', 'elementNameChangedHandler', newValue);
|
|
26
|
+
this.host.setAttribute('name', newValue);
|
|
27
|
+
}
|
|
28
|
+
participantsChangedHandler(newValue) {
|
|
29
|
+
debug('nylas-participants-custom-availability', 'participantsChangedHandler', newValue);
|
|
30
|
+
this.selectedParticipants = this.setParticipants(newValue);
|
|
31
|
+
}
|
|
32
|
+
connectedCallback() {
|
|
33
|
+
debug('nylas-participants-custom-availability', 'connectedCallback');
|
|
34
|
+
}
|
|
35
|
+
disconnectedCallback() {
|
|
36
|
+
debug('nylas-participants-custom-availability', 'disconnectedCallback');
|
|
37
|
+
}
|
|
38
|
+
componentWillLoad() {
|
|
39
|
+
debug('nylas-participants-custom-availability', 'componentWillLoad');
|
|
40
|
+
}
|
|
41
|
+
componentDidLoad() {
|
|
42
|
+
debug('nylas-participants-custom-availability', 'componentDidLoad');
|
|
43
|
+
}
|
|
44
|
+
nylasFormSwitchToggledHandler(event) {
|
|
45
|
+
debug('nylas-participants-custom-availability', 'nylasFormSwitchToggledHandler', event.detail);
|
|
46
|
+
this.selectedParticipants[event.detail.name]['isOpen'] = event.detail.checked;
|
|
47
|
+
this.selectedParticipants[event.detail.name]['setCustom'] = event.detail.checked;
|
|
48
|
+
this.selectedParticipants = { ...this.selectedParticipants };
|
|
49
|
+
}
|
|
50
|
+
handleValueChanged(event) {
|
|
51
|
+
debug('[nylas-editor-tabs]', 'handleValueChanged', event);
|
|
52
|
+
const { name, value } = event.detail;
|
|
53
|
+
if (!name.startsWith('participant-')) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
if (!this.participantFormRef.checkValidity()) {
|
|
57
|
+
this.internals.setValidity({ customError: true }, 'Please fix the overlapping time ranges.');
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
this.internals.setValidity({});
|
|
62
|
+
}
|
|
63
|
+
const jsonValue = JSON.parse(value);
|
|
64
|
+
const key = name.split('-')[2];
|
|
65
|
+
if (!this.selectedParticipants[key])
|
|
66
|
+
return;
|
|
67
|
+
this.selectedParticipants[key]['openHours'] = jsonValue.openHours;
|
|
68
|
+
this.selectedParticipants = { ...this.selectedParticipants };
|
|
69
|
+
const participantOpenHours = {};
|
|
70
|
+
this.participants.forEach(participant => {
|
|
71
|
+
participantOpenHours[participant.email] = this.selectedParticipants[participant.email].openHours;
|
|
72
|
+
});
|
|
73
|
+
this.internals.setFormValue(JSON.stringify(participantOpenHours), this.name);
|
|
74
|
+
this.valueChanged.emit({ value: JSON.stringify(participantOpenHours), name: this.name });
|
|
75
|
+
}
|
|
76
|
+
setParticipants(participants) {
|
|
77
|
+
const selectedParticipants = {};
|
|
78
|
+
participants.forEach(participant => {
|
|
79
|
+
const isOpen = participant.is_organizer ? true : false;
|
|
80
|
+
selectedParticipants[participant.email] = {
|
|
81
|
+
isOpen: isOpen,
|
|
82
|
+
setCustom: !!participant.availability?.open_hours ? true : false,
|
|
83
|
+
openHours: participant.availability?.open_hours || [],
|
|
84
|
+
name: participant.name || participant.email,
|
|
85
|
+
availability: participant.availability,
|
|
86
|
+
};
|
|
87
|
+
});
|
|
88
|
+
return selectedParticipants;
|
|
89
|
+
}
|
|
90
|
+
render() {
|
|
91
|
+
return (h(Host, { key: '5590f983de527efa3e79d854e9cb2b49e433d64b' }, h("div", { key: '7a016a7a277b077a4edd63d433a185a7d2f7aaab', class: "nylas-participants-custom-availability", part: "npca" }, h("div", { key: '7fb61474d9b80c59844dd2ca67cd00e95ee2a2be', class: "header", part: "npca__header" }, h("h3", { key: 'dc66f0262309a5c08c887bbbf5c408233ebd1c00' }, "Set Custom Availability for Participants"), h("p", { key: '60686b9f1c4aab680caf07de6c22561c5ec1a9e5' }, "Set custom availability for scheduling meetings, or default to general availability.")), h("div", { key: '8782a3b4e48ce7eb74eb6e41e239b16d9840fb80', class: "content", part: "npca__content" }, h("form", { key: 'c2f23d7eebc4a113fbfa2cbcd7623c99b5a87f89', ref: el => (this.participantFormRef = el) }, Object.keys(this.selectedParticipants).map((key, index) => {
|
|
92
|
+
const participant = this.selectedParticipants[key];
|
|
93
|
+
if (!participant || !participant.name || !participant.availability)
|
|
94
|
+
return;
|
|
95
|
+
return (h("div", { class: "participant-container", part: "npca__participant-container", key: `participant-conatiner-${index}` }, h("div", { class: "participant-title", part: "npca__participant-title" }, h("p", null, "Set ", participant.name, "'s custom availability"), h("div", { class: "participant-toggle", part: "npca__participant-toggle--container" }, h("toggle-switch", { exportparts: "ts_label: npca__toggle-label, ts_input: npca_toggle-input, ts_slider: npca_toggle-slider", name: key, checked: !!participant.openHours && participant.openHours.length > 0 }), h("span", { class: `chevron ${participant.isOpen ? 'open' : 'closed'} ${participant.setCustom ? '' : 'disabled'}`, onClick: () => {
|
|
96
|
+
if (!participant.setCustom)
|
|
97
|
+
return;
|
|
98
|
+
this.selectedParticipants[key].isOpen = !participant.isOpen;
|
|
99
|
+
this.selectedParticipants = { ...this.selectedParticipants };
|
|
100
|
+
} }, h("chevron-icon", { width: "24", height: "24" })))), participant.isOpen && (h("nylas-availability-picker", { key: index, name: `participant-${index}-${key}`, openHours: participant.openHours, defaultTimezone: participant.openHours?.[0]?.timezone, hideHeader: true }))));
|
|
101
|
+
}))))));
|
|
102
|
+
}
|
|
103
|
+
static get is() { return "nylas-participants-custom-availability"; }
|
|
104
|
+
static get encapsulation() { return "shadow"; }
|
|
105
|
+
static get formAssociated() { return true; }
|
|
106
|
+
static get originalStyleUrls() {
|
|
107
|
+
return {
|
|
108
|
+
"$": ["nylas-participants-custom-availability.scss"]
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
static get styleUrls() {
|
|
112
|
+
return {
|
|
113
|
+
"$": ["nylas-participants-custom-availability.css"]
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
static get properties() {
|
|
117
|
+
return {
|
|
118
|
+
"name": {
|
|
119
|
+
"type": "string",
|
|
120
|
+
"mutable": false,
|
|
121
|
+
"complexType": {
|
|
122
|
+
"original": "string",
|
|
123
|
+
"resolved": "string",
|
|
124
|
+
"references": {}
|
|
125
|
+
},
|
|
126
|
+
"required": false,
|
|
127
|
+
"optional": false,
|
|
128
|
+
"docs": {
|
|
129
|
+
"tags": [],
|
|
130
|
+
"text": "The name of the participants custom availability."
|
|
131
|
+
},
|
|
132
|
+
"attribute": "name",
|
|
133
|
+
"reflect": false,
|
|
134
|
+
"defaultValue": "'participant-custom-availability'"
|
|
135
|
+
},
|
|
136
|
+
"participants": {
|
|
137
|
+
"type": "unknown",
|
|
138
|
+
"mutable": false,
|
|
139
|
+
"complexType": {
|
|
140
|
+
"original": "Participant[]",
|
|
141
|
+
"resolved": "Participant[]",
|
|
142
|
+
"references": {
|
|
143
|
+
"Participant": {
|
|
144
|
+
"location": "import",
|
|
145
|
+
"path": "@nylas/core",
|
|
146
|
+
"id": "../nylas-js-core/dist/index.d.ts::Participant"
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
"required": true,
|
|
151
|
+
"optional": false,
|
|
152
|
+
"docs": {
|
|
153
|
+
"tags": [],
|
|
154
|
+
"text": "The participants selected in the add participants section."
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
static get states() {
|
|
160
|
+
return {
|
|
161
|
+
"selectedParticipants": {}
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
static get events() {
|
|
165
|
+
return [{
|
|
166
|
+
"method": "valueChanged",
|
|
167
|
+
"name": "valueChanged",
|
|
168
|
+
"bubbles": true,
|
|
169
|
+
"cancelable": true,
|
|
170
|
+
"composed": true,
|
|
171
|
+
"docs": {
|
|
172
|
+
"tags": [],
|
|
173
|
+
"text": "This event is fired when the participants custom availability changes."
|
|
174
|
+
},
|
|
175
|
+
"complexType": {
|
|
176
|
+
"original": "{\n value: string;\n name: string;\n }",
|
|
177
|
+
"resolved": "{ value: string; name: string; }",
|
|
178
|
+
"references": {}
|
|
179
|
+
}
|
|
180
|
+
}];
|
|
181
|
+
}
|
|
182
|
+
static get elementRef() { return "host"; }
|
|
183
|
+
static get watchers() {
|
|
184
|
+
return [{
|
|
185
|
+
"propName": "name",
|
|
186
|
+
"methodName": "elementNameChangedHandler"
|
|
187
|
+
}, {
|
|
188
|
+
"propName": "participants",
|
|
189
|
+
"methodName": "participantsChangedHandler"
|
|
190
|
+
}];
|
|
191
|
+
}
|
|
192
|
+
static get listeners() {
|
|
193
|
+
return [{
|
|
194
|
+
"name": "nylasFormSwitchToggled",
|
|
195
|
+
"method": "nylasFormSwitchToggledHandler",
|
|
196
|
+
"target": undefined,
|
|
197
|
+
"capture": false,
|
|
198
|
+
"passive": false
|
|
199
|
+
}, {
|
|
200
|
+
"name": "valueChanged",
|
|
201
|
+
"method": "handleValueChanged",
|
|
202
|
+
"target": undefined,
|
|
203
|
+
"capture": false,
|
|
204
|
+
"passive": false
|
|
205
|
+
}];
|
|
206
|
+
}
|
|
207
|
+
static get attachInternalsMemberName() { return "internals"; }
|
|
208
|
+
}
|
|
209
|
+
__decorate([
|
|
210
|
+
RegisterComponent({
|
|
211
|
+
name: 'nylas-participants-custom-availability',
|
|
212
|
+
eventToProps: {},
|
|
213
|
+
fireRegisterEvent: true,
|
|
214
|
+
}),
|
|
215
|
+
__metadata("design:type", Function),
|
|
216
|
+
__metadata("design:paramtypes", []),
|
|
217
|
+
__metadata("design:returntype", void 0)
|
|
218
|
+
], NylasParticipantsCustomAvailability.prototype, "render", null);
|
|
219
|
+
//# sourceMappingURL=nylas-participants-custom-availability.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nylas-participants-custom-availability.js","sourceRoot":"","sources":["../../../../src/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,iB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,CAAC,WAAW,CAAC,MAAM,CAAC;4CAC5D,IAAI,CAAC,oBAAoB,GAAG,EAAE,GAAG,IAAI,CAAC,oBAAoB,EAAE,CAAC;wCAC/D,CAAC;wCAED,oBAAc,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,GAAG,CAClC,CACH,CACF;4BACL,WAAW,CAAC,MAAM,IAAI,CACrB,iCACE,GAAG,EAAE,KAAK,EACV,IAAI,EAAE,eAAe,KAAK,IAAI,GAAG,EAAE,EACnC,SAAS,EAAE,WAAW,CAAC,SAAS,EAChC,eAAe,EAAE,WAAW,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,QAAQ,EACrD,UAAU,EAAE,IAAI,GAChB,CACH,CACG,CACP,CAAC;oBACJ,CAAC,CAAC,CACG,CACH,CACF,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF;AArDC;IALC,iBAAiB,CAAyH;QACzI,IAAI,EAAE,wCAAwC;QAC9C,YAAY,EAAE,EAAE;QAChB,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;iEAqDD","sourcesContent":["import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug } from '@/utils/utils';\nimport { AttachInternals, Component, Element, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { Availability, OpenHours, Participant } from '@nylas/core';\n\n/**\n * The `nylas-participants-custom-availability` component is a form input for setting custom availability for participants.\n *\n * @part npca - The participants custom availability container\n * @part npca__header - The header of the participants custom availability\n * @part npca__content - The content of the participants custom availability\n * @part npca__participant-container - The participant container\n * @part npca__participant-title - The title of the participant\n * @part npca__participant-toggle--container - The toggle container for the participant\n * @part npca__toggle-label - The label of the toggle\n * @part npca_toggle-input - The input of the toggle\n * @part npca_toggle-slider - The slider of the toggle\n */\n@Component({\n tag: 'nylas-participants-custom-availability',\n styleUrl: 'nylas-participants-custom-availability.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasParticipantsCustomAvailability {\n @Element() host!: HTMLNylasParticipantsCustomAvailabilityElement;\n private participantFormRef!: HTMLFormElement;\n\n /**\n * The name of the participants custom availability.\n */\n @Prop() name: string = 'participant-custom-availability';\n\n /**\n * The participants selected in the add participants section.\n */\n @Prop() participants!: Participant[];\n\n /**\n * This event is fired when the participants custom availability changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * The state to store the custom availability setting for participants.\n */\n @State() selectedParticipants: {\n [key: string]: {\n setCustom: boolean;\n isOpen: boolean;\n openHours: OpenHours[];\n name: string;\n availability?: Availability;\n };\n } = this.setParticipants(this.participants);\n\n // Watchers\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-participants-custom-availability', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('participants')\n participantsChangedHandler(newValue: Participant[]) {\n debug('nylas-participants-custom-availability', 'participantsChangedHandler', newValue);\n this.selectedParticipants = this.setParticipants(newValue);\n }\n\n // Lifecycle Methods\n connectedCallback() {\n debug('nylas-participants-custom-availability', 'connectedCallback');\n }\n\n disconnectedCallback() {\n debug('nylas-participants-custom-availability', 'disconnectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-participants-custom-availability', 'componentWillLoad');\n }\n\n componentDidLoad() {\n debug('nylas-participants-custom-availability', 'componentDidLoad');\n }\n\n // Event Handlers\n @Listen('nylasFormSwitchToggled')\n nylasFormSwitchToggledHandler(event: CustomEvent<{ checked: boolean; name: string; label: boolean }>) {\n debug('nylas-participants-custom-availability', 'nylasFormSwitchToggledHandler', event.detail);\n this.selectedParticipants[event.detail.name]['isOpen'] = event.detail.checked;\n this.selectedParticipants[event.detail.name]['setCustom'] = event.detail.checked;\n this.selectedParticipants = { ...this.selectedParticipants };\n }\n\n @Listen('valueChanged')\n handleValueChanged(event: CustomEvent) {\n debug('[nylas-editor-tabs]', 'handleValueChanged', event);\n const { name, value } = event.detail;\n if (!name.startsWith('participant-')) {\n return;\n }\n // Validate the form\n if (!this.participantFormRef.checkValidity()) {\n this.internals.setValidity({ customError: true }, 'Please fix the overlapping time ranges.');\n return;\n } else {\n this.internals.setValidity({});\n }\n\n const jsonValue = JSON.parse(value);\n\n const key = name.split('-')[2];\n if (!this.selectedParticipants[key]) return;\n this.selectedParticipants[key]['openHours'] = jsonValue.openHours;\n this.selectedParticipants = { ...this.selectedParticipants };\n\n const participantOpenHours = {};\n this.participants.forEach(participant => {\n participantOpenHours[participant.email] = this.selectedParticipants[participant.email].openHours;\n });\n this.internals.setFormValue(JSON.stringify(participantOpenHours), this.name);\n this.valueChanged.emit({ value: JSON.stringify(participantOpenHours), name: this.name });\n }\n\n setParticipants(participants: Participant[]) {\n const selectedParticipants = {};\n participants.forEach(participant => {\n const isOpen = participant.is_organizer ? true : false;\n selectedParticipants[participant.email] = {\n isOpen: isOpen,\n setCustom: !!participant.availability?.open_hours ? true : false,\n openHours: participant.availability?.open_hours || [],\n name: participant.name || participant.email,\n availability: participant.availability,\n };\n });\n return selectedParticipants;\n }\n @RegisterComponent<NylasParticipantsCustomAvailability, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-participants-custom-availability',\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <div class=\"nylas-participants-custom-availability\" part=\"npca\">\n <div class=\"header\" part=\"npca__header\">\n <h3>Set Custom Availability for Participants</h3>\n <p>Set custom availability for scheduling meetings, or default to general availability.</p>\n </div>\n <div class=\"content\" part=\"npca__content\">\n <form ref={el => (this.participantFormRef = el as HTMLFormElement)}>\n {Object.keys(this.selectedParticipants).map((key, index) => {\n const participant = this.selectedParticipants[key];\n if (!participant || !participant.name || !participant.availability) return;\n return (\n <div class=\"participant-container\" part=\"npca__participant-container\" key={`participant-conatiner-${index}`}>\n <div class=\"participant-title\" part=\"npca__participant-title\">\n <p>Set {participant.name}'s custom availability</p>\n <div class=\"participant-toggle\" part=\"npca__participant-toggle--container\">\n <toggle-switch\n exportparts=\"ts_label: npca__toggle-label, ts_input: npca_toggle-input, ts_slider: npca_toggle-slider\"\n name={key}\n checked={!!participant.openHours && participant.openHours.length > 0}\n />\n <span\n class={`chevron ${participant.isOpen ? 'open' : 'closed'} ${participant.setCustom ? '' : 'disabled'}`}\n onClick={() => {\n if (!participant.setCustom) return;\n this.selectedParticipants[key].isOpen = !participant.isOpen;\n this.selectedParticipants = { ...this.selectedParticipants };\n }}\n >\n <chevron-icon width=\"24\" height=\"24\" />\n </span>\n </div>\n </div>\n {participant.isOpen && (\n <nylas-availability-picker\n key={index}\n name={`participant-${index}-${key}`}\n openHours={participant.openHours}\n defaultTimezone={participant.openHours?.[0]?.timezone}\n hideHeader={true}\n />\n )}\n </div>\n );\n })}\n </form>\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}
|
package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.js
CHANGED
|
@@ -33,6 +33,7 @@ export class NylasSchedulerEditor {
|
|
|
33
33
|
this.schedulerPreviewLink = '';
|
|
34
34
|
this.defaultSchedulerConfigState = undefined;
|
|
35
35
|
this.mode = 'app';
|
|
36
|
+
this.additionalParticipants = undefined;
|
|
36
37
|
this.automaticComponentRegistration = true;
|
|
37
38
|
}
|
|
38
39
|
connectedCallback() {
|
|
@@ -43,6 +44,7 @@ export class NylasSchedulerEditor {
|
|
|
43
44
|
this.stores = {
|
|
44
45
|
schedulerConfig: CreateNylasSchedulerConfigStore({
|
|
45
46
|
...this.defaultSchedulerConfigState,
|
|
47
|
+
additionalParticipants: this.additionalParticipants,
|
|
46
48
|
}),
|
|
47
49
|
};
|
|
48
50
|
if (!this.nylasApiRequest && this.nylasSessionsConfig) {
|
|
@@ -132,7 +134,7 @@ export class NylasSchedulerEditor {
|
|
|
132
134
|
await this.nylasSchedulerConfigConnector.schedulerConfig?.getCalendars();
|
|
133
135
|
}
|
|
134
136
|
render() {
|
|
135
|
-
return (h(Host, { key: '
|
|
137
|
+
return (h(Host, { key: 'd5f019173d3ec4f80d802de6989182b0e8e4c2d0' }, h("div", { key: '7b1d14281fe950b0cd693349bb8cdd2cb428722f', class: "scheduler-editor-header", part: "nse__header" }, h("h1", { key: 'b24cf796d8db6a169757c552b9749568794b87fd', class: "scheduler-editor-title", part: "nse__title" }, h("calendar-icon", { key: 'd6721ba544b1c3c5f6e003034d491355de6b0cc7', width: "18", height: "18" }), "Scheduler editor"), h("button", { key: 'bb9ce5bfa2e6df362b55c7f8cd1a2f1e06056ce7', class: "scheduler-editor-close", title: "logout", onClick: e => this.handleSchedulerConfigCloseClicked(e), part: "nse__close-button" }, h("close-icon", { key: '22dced4538079f05c5d036c9eef4882d79739cf9', width: "18", height: "18" }))), this.stores?.schedulerConfig?.state.currentUser && this.stores.schedulerConfig.state.action === null && (h("div", { class: "list-configurations" }, h("nylas-list-configurations", null))), this.stores?.schedulerConfig?.state.currentUser && this.stores.schedulerConfig.state.action === 'create' && (h("nylas-editor-tabs", { mode: "composable" }, h(ExpressFlow, null))), this.stores?.schedulerConfig?.state.currentUser && this.stores.schedulerConfig.state.action === 'edit' && (h("nylas-editor-tabs", { mode: this.mode }, this.mode === 'composable' && h("slot", null))), !this.stores?.schedulerConfig?.state.currentUser && (h("slot", { name: "login-required" }, h(LoginRequired, { authenticationUrl: this.authenticationUrl })))));
|
|
136
138
|
}
|
|
137
139
|
static get is() { return "nylas-scheduler-editor"; }
|
|
138
140
|
static get encapsulation() { return "shadow"; }
|
|
@@ -233,7 +235,7 @@ export class NylasSchedulerEditor {
|
|
|
233
235
|
"mutable": false,
|
|
234
236
|
"complexType": {
|
|
235
237
|
"original": "SchedulerEditorEventOverride",
|
|
236
|
-
"resolved": "Partial<{ valueChanged: (event: CustomEvent<{ value: string[]; name: string; valueChangedHandler?: ((event: CustomEvent<{ value: string[]; name: string; }>) => void) | undefined; } | { value: string; name: string; valueChanged?: ((event: CustomEvent<{ value: string; name: string; }>) => void) | undefined; } | { value: string; name: string; } | { value: string; name: string; } | { value: string; name: string; } | { value:
|
|
238
|
+
"resolved": "Partial<{ valueChanged: (event: CustomEvent<{ value: string[]; name: string; valueChangedHandler?: ((event: CustomEvent<{ value: string[]; name: string; }>) => void) | undefined; } | { value: string; name: string; valueChanged?: ((event: CustomEvent<{ value: string; name: string; }>) => void) | undefined; } | { value: string; name: string; } | { value: string; name: string; } | { value: string; name: string; } | { value: string; name: string; }>, connector?: NylasSchedulerConnectorInterface | undefined) => Promise<void>; formSubmitted: (event: CustomEvent<void>, connector?: NylasSchedulerConnectorInterface | undefined) => Promise<void>; schedulerConfigChanged: (event: CustomEvent<SchedulerEventDetail>, connector?: NylasSchedulerConnectorInterface | undefined) => Promise<void>; cancelButtonClick: (event: CustomEvent<void>, connector?: NylasSchedulerConnectorInterface | undefined) => Promise<void>; previewButtonClicked: (event: CustomEvent<HTMLNylasEditorTabsElement>, connector?: NylasSchedulerConnectorInterface | undefined) => Promise<void>; initListConfigurations: (event: CustomEvent<HTMLNylasListConfigurationsElement>, connector?: NylasSchedulerConnectorInterface | undefined) => Promise<void>; createButtonClick: (event: CustomEvent<HTMLNylasListConfigurationsElement>, connector?: NylasSchedulerConnectorInterface | undefined) => Promise<void>; editButtonClick: (event: CustomEvent<{ host: HTMLNylasListConfigurationsElement; configuration: Configuration; }>, connector?: NylasSchedulerConnectorInterface | undefined) => Promise<void>; deleteButtonClick: (event: CustomEvent<{ host: HTMLNylasListConfigurationsElement; configuration: Configuration; }>, connector?: NylasSchedulerConnectorInterface | undefined) => Promise<void>; }> & EventOverride<NylasSchedulerConfigConnectorInterface>",
|
|
237
239
|
"references": {
|
|
238
240
|
"SchedulerEditorEventOverride": {
|
|
239
241
|
"location": "import",
|
|
@@ -273,7 +275,7 @@ export class NylasSchedulerEditor {
|
|
|
273
275
|
"mutable": false,
|
|
274
276
|
"complexType": {
|
|
275
277
|
"original": "Partial<NylasSchedulerConfigStoreState>",
|
|
276
|
-
"resolved": "undefined | { selectedConfiguration?: RecursivePartial<Configuration> | undefined; configurations?: Configuration[] | undefined; calendars?: Calendar[] | undefined; currentUser?: User | null | undefined; action?: \"create\" | \"edit\" | null | undefined; }",
|
|
278
|
+
"resolved": "undefined | { selectedConfiguration?: RecursivePartial<Configuration> | undefined; configurations?: Configuration[] | undefined; calendars?: Calendar[] | undefined; currentUser?: User | null | undefined; action?: \"create\" | \"edit\" | null | undefined; additionalParticipants?: Participant[] | undefined; }",
|
|
277
279
|
"references": {
|
|
278
280
|
"Partial": {
|
|
279
281
|
"location": "global",
|
|
@@ -310,6 +312,27 @@ export class NylasSchedulerEditor {
|
|
|
310
312
|
"attribute": "mode",
|
|
311
313
|
"reflect": false,
|
|
312
314
|
"defaultValue": "'app'"
|
|
315
|
+
},
|
|
316
|
+
"additionalParticipants": {
|
|
317
|
+
"type": "unknown",
|
|
318
|
+
"mutable": false,
|
|
319
|
+
"complexType": {
|
|
320
|
+
"original": "Participant[]",
|
|
321
|
+
"resolved": "Participant[] | undefined",
|
|
322
|
+
"references": {
|
|
323
|
+
"Participant": {
|
|
324
|
+
"location": "import",
|
|
325
|
+
"path": "@nylas/core",
|
|
326
|
+
"id": "../nylas-js-core/dist/index.d.ts::Participant"
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
},
|
|
330
|
+
"required": false,
|
|
331
|
+
"optional": true,
|
|
332
|
+
"docs": {
|
|
333
|
+
"tags": [],
|
|
334
|
+
"text": "This prop is used to populate the additional participants and\ntheir availability in the scheduler editor."
|
|
335
|
+
}
|
|
313
336
|
}
|
|
314
337
|
};
|
|
315
338
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nylas-scheduler-editor.js","sourceRoot":"","sources":["../../../../src/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D,OAAO,EAAY,2BAA2B,EAA8B,MAAM,4BAA4B,CAAC;AAE/G,OAAO,EAAE,6BAA6B,EAAE,MAAM,8CAA8C,CAAC;AAC7F,OAAO,EAAE,+BAA+B,EAAiE,MAAM,iCAAiC,CAAC;AACjJ,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAU,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AACrH,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAY5C,MAAM,OAAO,oBAAoB;;QAoRvB,sCAAiC,GAAG,CAAC,MAAa,EAAE,EAAE;YAC5D,MAAM,KAAK,GAAG,IAAI,CAAC,2BAA2B,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC/D,IAAI,CAAC,KAAK,CAAC,gBAAgB,EAAE,CAAC;gBAC5B,YAAY,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;gBACjC,YAAY,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;gBAChC,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;YAC3B,CAAC;QACH,CAAC,CAAC;QAOM,sBAAiB,GAAG,KAAK,EAAE,QAAiB,EAAE,EAAE;YACtD,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC;gBAC1B,OAAO,CAAC,KAAK,CAAC,gEAAgE,CAAC,C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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { NylasBaseProvider } from '@/common/abstract-provider';\nimport type { SchedulerEditorEventOverride } from '@/common/component-types';\nimport { AuthArgs, NylasIdentityRequestWrapper, User, type NylasApiRequest } from '@/common/nylas-api-request';\nimport { RegisteredComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { CreateNylasSchedulerConfigStore, NylasSchedulerConfigStoreState, NylasSchedulerConfigStoreType } from '@/stores/scheduler-config-store';\nimport { debug } from '@/utils/utils';\nimport { Config, NylasSessions } from '@nylas/identity';\nimport { Component, Element, Event, EventEmitter, Host, Listen, Method, Prop, State, Watch, h } from '@stencil/core';\nimport { LoginRequired } from './LoginRequired';\nimport { ExpressFlow } from './ExpressFlow';\n\n/**\n * The `nylas-scheduler-editor` component is a form that allows users to configure the settings for the Nylas Scheduler.\n *\n * @slot login-required - This slot is used to display a message when the user is not logged in.\n */\n@Component({\n tag: 'nylas-scheduler-editor',\n styleUrl: 'nylas-scheduler-editor.scss',\n shadow: true,\n})\nexport class NylasSchedulerEditor {\n /**\n * Stores to be used by the provider.\n */\n private stores?: {\n schedulerConfig: NylasSchedulerConfigStoreType;\n };\n\n /**\n * This is a base provide that defines the common methods and properties\n * that all providers should have.\n *\n * Because stencil does not support abstract classes, we have to use a\n * property to store the base provider instance.\n */\n private baseProvider?: NylasBaseProvider<Exclude<typeof this.stores, undefined>>;\n\n /**\n * The Nylas Scheduler Config Connector instance.\n * The brains of the provider. It manages data fetching and state synchronization.\n */\n private nylasSchedulerConfigConnector?: NylasSchedulerConfigConnector;\n\n /**\n * The host element.\n * Used to manage the host element of the provider.\n */\n @Element() private host!: HTMLNylasSchedulerEditorElement;\n\n /***\n * The configuration id to use for the scheduler editor.\n * If provided, then the scheduler editor will try and fetch the configuration\n * with the provided id. If found, it will automatically load the editor\n * with the configuration settings for editing.\n */\n @Prop({ mutable: true }) configurationId?: string;\n\n /**\n * The Nylas Api Request instance.\n * Used to make requests to the Nylas API.\n */\n @Prop({ mutable: true }) nylasApiRequest?: NylasApiRequest;\n\n /**\n * The Nylas Sessions configuration.\n * Used to configure the Nylas Sessions instance.\n */\n @Prop() nylasSessionsConfig?: Config;\n\n /**\n * The default authentication arguments to use when authenticating a user.\n */\n @Prop() defaultAuthArgs?: AuthArgs[];\n\n /**\n * This provides a way to override the default event handlers.\n */\n @Prop() eventOverrides: SchedulerEditorEventOverride = {};\n\n /**\n * The scheduler preview link to use when the user clicks on the preview button.\n * You can use the placeholder `{config.id}` to replace the configuration id anywhere in the link.\n */\n @Prop({ attribute: 'scheduler-preview-link' }) schedulerPreviewLink: string = '';\n\n /**\n * The default scheduler config store state.\n * Used to set the initial state of the scheduler config store.\n * This state can be used to pass defaults to newly created configurations.\n */\n @Prop({ attribute: 'default-scheduler-config-store-state' }) readonly defaultSchedulerConfigState?: Partial<NylasSchedulerConfigStoreState>;\n\n /**\n * This is used to set the mode for the scheduler config.\n * The mode can be 'app' or 'composable'.\n * The default mode is 'app'.\n */\n @Prop({ attribute: 'mode' }) readonly mode: 'app' | 'composable' = 'app';\n\n /**\n * This event is fired when the provider is initialized.\n * By default, this event handles determining if the user is logged in or not.\n * In addition, it fetches the provided configuration if a valid configuration id is provided.\n */\n @Event({ cancelable: true }) readonly init!: EventEmitter<HTMLNylasSchedulerEditorElement>;\n\n /**\n * This event is fired when the the NylasAuth isAuthenticated state changes\n * to true.\n */\n @Event({ cancelable: true }) readonly loggedIn!: EventEmitter<HTMLNylasSchedulerEditorElement>;\n\n /**\n * This event is fired when the the NylasAuth isAuthenticated state changes\n * to false.\n */\n @Event({ cancelable: true }) readonly loggedOut!: EventEmitter<HTMLNylasSchedulerEditorElement>;\n\n /**\n * This event is fired when the close button on scheduler config is clicked.\n */\n @Event({ cancelable: true }) readonly schedulerConfigCloseClicked!: EventEmitter<HTMLNylasSchedulerEditorElement>;\n\n /**\n * Automatically register components that have the `@RegisterComponent` decorator.\n * If this is set to false, you will need to manually register components using the\n * `registerComponent` method.\n * @default true\n */\n @State() automaticComponentRegistration: boolean = true;\n\n connectedCallback() {\n debug(`[nylas-scheduler-editor] connectedCallback`);\n }\n\n async componentWillLoad() {\n debug(`[nylas-scheduler-editor] componentWillLoad`);\n this.stores = {\n schedulerConfig: CreateNylasSchedulerConfigStore({\n ...this.defaultSchedulerConfigState,\n }),\n };\n\n if (!this.nylasApiRequest && this.nylasSessionsConfig) {\n const nylasSession = new NylasSessions(this.nylasSessionsConfig);\n\n // We must check if the user is logged in before continuing\n // otherwise, a PCKE code will not be generated and the user\n // will not be able to log in.\n await nylasSession.isLoggedIn();\n\n // Watch for login events so that we can automatically update the state\n nylasSession.onLoginSuccess(async () => {\n const currentUser = await this.nylasSchedulerConfigConnector?.schedulerConfig?.currentUser();\n if (currentUser) {\n this.loggedIn.emit(this.host);\n this.loggedInHandler(currentUser);\n }\n });\n\n // Watch for logout events so that we can automatically update the state\n nylasSession.onLoginFail(async () => {\n this.stores?.schedulerConfig?.set('currentUser', null);\n this.loggedOut.emit(this.host);\n });\n\n this.nylasApiRequest = new NylasIdentityRequestWrapper(nylasSession);\n }\n\n if (this.nylasApiRequest && this.defaultAuthArgs) {\n this.nylasApiRequest.setDefaultAuthArgs(this.defaultAuthArgs);\n }\n\n this.baseProvider = new NylasBaseProvider(this.host, this.stores, this.automaticComponentRegistration, this.eventOverrides);\n\n const nylasSchedulerConfigStore = this.baseProvider.getStore('schedulerConfig');\n this.nylasSchedulerConfigConnector = new NylasSchedulerConfigConnector({\n nylasApiRequest: this.nylasApiRequest,\n nylasSchedulerConfigStore: nylasSchedulerConfigStore,\n });\n\n const initEvent = this.init.emit(this.host);\n if (!initEvent.defaultPrevented) {\n const currentUser = await this.nylasSchedulerConfigConnector?.schedulerConfig?.currentUser();\n if (currentUser) {\n this.loggedIn.emit(this.host);\n await this.loggedInHandler(currentUser);\n } else {\n this.stores?.schedulerConfig?.set('currentUser', null);\n this.loggedOut.emit(this.host);\n }\n }\n\n // Watch for store changes\n this.stores?.schedulerConfig?.onChange('selectedConfiguration', async config => {\n if (config && config.id) {\n this.configurationId = config.id;\n }\n });\n\n this.baseProvider?.componentWillLoad(this.nylasSchedulerConfigConnector);\n }\n\n async componentDidLoad() {\n debug(`[nylas-scheduler-editor] componentDidLoad`);\n this.baseProvider?.componentDidLoad();\n }\n\n componentDisconnected() {\n this.baseProvider?.componentDisconnected();\n }\n\n /**\n * Watch for changes to the configuration id and automatically fetch the configuration\n * when the configuration id changes. If the configuration id is cleared, then the\n * configuration is cleared as well.\n * @param newConfigurationId The new configuration id\n */\n @Watch('configurationId')\n async configurationIdChanged(newConfigurationId: string) {\n if (newConfigurationId) {\n await this.nylasSchedulerConfigConnector?.schedulerConfig?.getConfigurationById(newConfigurationId);\n this.stores?.schedulerConfig?.set('action', 'edit');\n } else {\n // Clear the configuration\n this.stores?.schedulerConfig?.set('selectedConfiguration', {});\n this.stores?.schedulerConfig?.set('action', null);\n }\n }\n\n /**\n * This method is used to get the NylasSchedulerConfigStore instance.\n * You can use this instance to update or get the state of the store.\n * @returns Promise<NylasSchedulerConfigStoreType | undefined>\n */\n @Method()\n async store(): Promise<NylasSchedulerConfigStoreType | undefined> {\n return this.stores?.schedulerConfig;\n }\n\n /**\n * This method is used to get the NylasSchedulerConfigConnector instance.\n * You can use this instance to make requests to the Nylas API.\n * @returns Promise<NylasSchedulerConfigConnector | undefined>\n */\n @Method()\n async schedulerConnector(): Promise<NylasSchedulerConfigConnector | undefined> {\n return this.nylasSchedulerConfigConnector;\n }\n\n /**\n * This is a custom event handler that is used to register a component with the provider.\n * It is used by components that have the `@RegisterComponent` decorator.\n * @param event A custom event that contains the component to register\n * @returns Promise<void>\n */\n @Listen('registerComponent')\n async registerComponentHandler(event: CustomEvent<RegisteredComponent<any, any>>): Promise<void> {\n this.baseProvider?.registerComponent(event.detail);\n }\n\n /**\n * This is a custom event handler that is used to unregister a component with the provider.\n * It is used by components that have the `@RegisterComponent` decorator.\n * @param event A custom event that contains the component to unregister\n * @returns Promise<void>\n */\n @Listen('unregisterComponent')\n async unregisterComponentHandler(event: CustomEvent<RegisteredComponent<any, any>>): Promise<void> {\n this.baseProvider?.unregisterComponent(event.detail);\n }\n\n /**\n * Upon login, set the current user and fetch the configuration and calendars.\n * @param currentUser The current user that is logged in\n */\n private async loggedInHandler(currentUser: User) {\n this.stores?.schedulerConfig?.set('currentUser', currentUser);\n\n if (!this.nylasSchedulerConfigConnector) {\n return;\n }\n\n if (this.configurationId) {\n const data = await this.nylasSchedulerConfigConnector.schedulerConfig?.getConfigurationById(this.configurationId);\n if (data && data[0]?.id) {\n this.stores?.schedulerConfig?.set('action', 'edit');\n }\n }\n\n await this.nylasSchedulerConfigConnector.schedulerConfig?.getCalendars();\n }\n\n /**\n * This is a custom event handler that is used to update the state of the provider.\n */\n private handleSchedulerConfigCloseClicked = (_event: Event) => {\n const event = this.schedulerConfigCloseClicked.emit(this.host);\n if (!event.defaultPrevented) {\n localStorage.removeItem('grant');\n localStorage.removeItem('user');\n window.location.reload();\n }\n };\n\n /**\n * This method is used to get the authentication URL for a provider.\n * @param provider The provider to get the authentication URL for (e.g. google, microsoft, etc.)\n * @returns Promise<string> The authentication URL to redirect the user for the provider\n */\n private authenticationUrl = async (provider?: string) => {\n if (!this.nylasApiRequest) {\n console.error(`[nylas-scheduler-editor] Nylas API Request is not initialized.`);\n return '';\n }\n const url = await this.nylasApiRequest.authenticationUrl({ provider });\n\n return url || '';\n };\n\n render() {\n return (\n <Host>\n <div class=\"scheduler-editor-header\" part=\"nse__header\">\n <h1 class=\"scheduler-editor-title\" part=\"nse__title\">\n <calendar-icon width=\"18\" height=\"18\" />\n Scheduler editor\n </h1>\n <button class=\"scheduler-editor-close\" title=\"logout\" onClick={e => this.handleSchedulerConfigCloseClicked(e)} part=\"nse__close-button\">\n <close-icon width=\"18\" height=\"18\" />\n </button>\n </div>\n {this.stores?.schedulerConfig?.state.currentUser && this.stores.schedulerConfig.state.action === null && (\n <div class=\"list-configurations\">\n <nylas-list-configurations></nylas-list-configurations>\n </div>\n )}\n {this.stores?.schedulerConfig?.state.currentUser && this.stores.schedulerConfig.state.action === 'create' && (\n // If the mode is 'app', then render the editor tabs in a composable mode with children for creating a new configuration (Express flow).\n <nylas-editor-tabs mode=\"composable\">\n <ExpressFlow />\n </nylas-editor-tabs>\n )}\n {this.stores?.schedulerConfig?.state.currentUser && this.stores.schedulerConfig.state.action === 'edit' && (\n <nylas-editor-tabs mode={this.mode}>{this.mode === 'composable' && <slot />}</nylas-editor-tabs>\n )}\n {!this.stores?.schedulerConfig?.state.currentUser && (\n <slot name=\"login-required\">\n <LoginRequired authenticationUrl={this.authenticationUrl} />\n </slot>\n )}\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"nylas-scheduler-editor.js","sourceRoot":"","sources":["../../../../src/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D,OAAO,EAAY,2BAA2B,EAA8B,MAAM,4BAA4B,CAAC;AAE/G,OAAO,EAAE,6BAA6B,EAAE,MAAM,8CAA8C,CAAC;AAC7F,OAAO,EAAE,+BAA+B,EAAiE,MAAM,iCAAiC,CAAC;AACjJ,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAU,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AACrH,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAa5C,MAAM,OAAO,oBAAoB;;QA2RvB,sCAA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qB,CACjG;YACA,CAAC,IAAI,CAAC,MAAM,EAAE,eAAe,EAAE,KAAK,CAAC,WAAW,IAAI,CACnD,YAAM,IAAI,EAAC,gBAAgB;gBACzB,EAAC,aAAa,IAAC,iBAAiB,EAAE,IAAI,CAAC,iBAAiB,GAAI,CACvD,CACR,CACI,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { NylasBaseProvider } from '@/common/abstract-provider';\nimport type { SchedulerEditorEventOverride } from '@/common/component-types';\nimport { AuthArgs, NylasIdentityRequestWrapper, User, type NylasApiRequest } from '@/common/nylas-api-request';\nimport { RegisteredComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { CreateNylasSchedulerConfigStore, NylasSchedulerConfigStoreState, NylasSchedulerConfigStoreType } from '@/stores/scheduler-config-store';\nimport { debug } from '@/utils/utils';\nimport { Config, NylasSessions } from '@nylas/identity';\nimport { Component, Element, Event, EventEmitter, Host, Listen, Method, Prop, State, Watch, h } from '@stencil/core';\nimport { LoginRequired } from './LoginRequired';\nimport { ExpressFlow } from './ExpressFlow';\nimport { Participant } from '@nylas/core';\n\n/**\n * The `nylas-scheduler-editor` component is a form that allows users to configure the settings for the Nylas Scheduler.\n *\n * @slot login-required - This slot is used to display a message when the user is not logged in.\n */\n@Component({\n tag: 'nylas-scheduler-editor',\n styleUrl: 'nylas-scheduler-editor.scss',\n shadow: true,\n})\nexport class NylasSchedulerEditor {\n /**\n * Stores to be used by the provider.\n */\n private stores?: {\n schedulerConfig: NylasSchedulerConfigStoreType;\n };\n\n /**\n * This is a base provide that defines the common methods and properties\n * that all providers should have.\n *\n * Because stencil does not support abstract classes, we have to use a\n * property to store the base provider instance.\n */\n private baseProvider?: NylasBaseProvider<Exclude<typeof this.stores, undefined>>;\n\n /**\n * The Nylas Scheduler Config Connector instance.\n * The brains of the provider. It manages data fetching and state synchronization.\n */\n private nylasSchedulerConfigConnector?: NylasSchedulerConfigConnector;\n\n /**\n * The host element.\n * Used to manage the host element of the provider.\n */\n @Element() private host!: HTMLNylasSchedulerEditorElement;\n\n /***\n * The configuration id to use for the scheduler editor.\n * If provided, then the scheduler editor will try and fetch the configuration\n * with the provided id. If found, it will automatically load the editor\n * with the configuration settings for editing.\n */\n @Prop({ mutable: true }) configurationId?: string;\n\n /**\n * The Nylas Api Request instance.\n * Used to make requests to the Nylas API.\n */\n @Prop({ mutable: true }) nylasApiRequest?: NylasApiRequest;\n\n /**\n * The Nylas Sessions configuration.\n * Used to configure the Nylas Sessions instance.\n */\n @Prop() nylasSessionsConfig?: Config;\n\n /**\n * The default authentication arguments to use when authenticating a user.\n */\n @Prop() defaultAuthArgs?: AuthArgs[];\n\n /**\n * This provides a way to override the default event handlers.\n */\n @Prop() eventOverrides: SchedulerEditorEventOverride = {};\n\n /**\n * The scheduler preview link to use when the user clicks on the preview button.\n * You can use the placeholder `{config.id}` to replace the configuration id anywhere in the link.\n */\n @Prop({ attribute: 'scheduler-preview-link' }) schedulerPreviewLink: string = '';\n\n /**\n * The default scheduler config store state.\n * Used to set the initial state of the scheduler config store.\n * This state can be used to pass defaults to newly created configurations.\n */\n @Prop({ attribute: 'default-scheduler-config-store-state' }) readonly defaultSchedulerConfigState?: Partial<NylasSchedulerConfigStoreState>;\n\n /**\n * This is used to set the mode for the scheduler config.\n * The mode can be 'app' or 'composable'.\n * The default mode is 'app'.\n */\n @Prop({ attribute: 'mode' }) readonly mode: 'app' | 'composable' = 'app';\n\n /**\n * This prop is used to populate the additional participants and\n * their availability in the scheduler editor.\n */\n @Prop({ attribute: 'additional-participants' }) additionalParticipants?: Participant[];\n\n /**\n * This event is fired when the provider is initialized.\n * By default, this event handles determining if the user is logged in or not.\n * In addition, it fetches the provided configuration if a valid configuration id is provided.\n */\n @Event({ cancelable: true }) readonly init!: EventEmitter<HTMLNylasSchedulerEditorElement>;\n\n /**\n * This event is fired when the the NylasAuth isAuthenticated state changes\n * to true.\n */\n @Event({ cancelable: true }) readonly loggedIn!: EventEmitter<HTMLNylasSchedulerEditorElement>;\n\n /**\n * This event is fired when the the NylasAuth isAuthenticated state changes\n * to false.\n */\n @Event({ cancelable: true }) readonly loggedOut!: EventEmitter<HTMLNylasSchedulerEditorElement>;\n\n /**\n * This event is fired when the close button on scheduler config is clicked.\n */\n @Event({ cancelable: true }) readonly schedulerConfigCloseClicked!: EventEmitter<HTMLNylasSchedulerEditorElement>;\n\n /**\n * Automatically register components that have the `@RegisterComponent` decorator.\n * If this is set to false, you will need to manually register components using the\n * `registerComponent` method.\n * @default true\n */\n @State() automaticComponentRegistration: boolean = true;\n\n connectedCallback() {\n debug(`[nylas-scheduler-editor] connectedCallback`);\n }\n\n async componentWillLoad() {\n debug(`[nylas-scheduler-editor] componentWillLoad`);\n this.stores = {\n schedulerConfig: CreateNylasSchedulerConfigStore({\n ...this.defaultSchedulerConfigState,\n additionalParticipants: this.additionalParticipants,\n }),\n };\n\n if (!this.nylasApiRequest && this.nylasSessionsConfig) {\n const nylasSession = new NylasSessions(this.nylasSessionsConfig);\n\n // We must check if the user is logged in before continuing\n // otherwise, a PCKE code will not be generated and the user\n // will not be able to log in.\n await nylasSession.isLoggedIn();\n\n // Watch for login events so that we can automatically update the state\n nylasSession.onLoginSuccess(async () => {\n const currentUser = await this.nylasSchedulerConfigConnector?.schedulerConfig?.currentUser();\n if (currentUser) {\n this.loggedIn.emit(this.host);\n this.loggedInHandler(currentUser);\n }\n });\n\n // Watch for logout events so that we can automatically update the state\n nylasSession.onLoginFail(async () => {\n this.stores?.schedulerConfig?.set('currentUser', null);\n this.loggedOut.emit(this.host);\n });\n\n this.nylasApiRequest = new NylasIdentityRequestWrapper(nylasSession);\n }\n\n if (this.nylasApiRequest && this.defaultAuthArgs) {\n this.nylasApiRequest.setDefaultAuthArgs(this.defaultAuthArgs);\n }\n\n this.baseProvider = new NylasBaseProvider(this.host, this.stores, this.automaticComponentRegistration, this.eventOverrides);\n\n const nylasSchedulerConfigStore = this.baseProvider.getStore('schedulerConfig');\n this.nylasSchedulerConfigConnector = new NylasSchedulerConfigConnector({\n nylasApiRequest: this.nylasApiRequest,\n nylasSchedulerConfigStore: nylasSchedulerConfigStore,\n });\n\n const initEvent = this.init.emit(this.host);\n if (!initEvent.defaultPrevented) {\n const currentUser = await this.nylasSchedulerConfigConnector?.schedulerConfig?.currentUser();\n if (currentUser) {\n this.loggedIn.emit(this.host);\n await this.loggedInHandler(currentUser);\n } else {\n this.stores?.schedulerConfig?.set('currentUser', null);\n this.loggedOut.emit(this.host);\n }\n }\n\n // Watch for store changes\n this.stores?.schedulerConfig?.onChange('selectedConfiguration', async config => {\n if (config && config.id) {\n this.configurationId = config.id;\n }\n });\n\n this.baseProvider?.componentWillLoad(this.nylasSchedulerConfigConnector);\n }\n\n async componentDidLoad() {\n debug(`[nylas-scheduler-editor] componentDidLoad`);\n this.baseProvider?.componentDidLoad();\n }\n\n componentDisconnected() {\n this.baseProvider?.componentDisconnected();\n }\n\n /**\n * Watch for changes to the configuration id and automatically fetch the configuration\n * when the configuration id changes. If the configuration id is cleared, then the\n * configuration is cleared as well.\n * @param newConfigurationId The new configuration id\n */\n @Watch('configurationId')\n async configurationIdChanged(newConfigurationId: string) {\n if (newConfigurationId) {\n await this.nylasSchedulerConfigConnector?.schedulerConfig?.getConfigurationById(newConfigurationId);\n this.stores?.schedulerConfig?.set('action', 'edit');\n } else {\n // Clear the configuration\n this.stores?.schedulerConfig?.set('selectedConfiguration', {});\n this.stores?.schedulerConfig?.set('action', null);\n }\n }\n\n /**\n * This method is used to get the NylasSchedulerConfigStore instance.\n * You can use this instance to update or get the state of the store.\n * @returns Promise<NylasSchedulerConfigStoreType | undefined>\n */\n @Method()\n async store(): Promise<NylasSchedulerConfigStoreType | undefined> {\n return this.stores?.schedulerConfig;\n }\n\n /**\n * This method is used to get the NylasSchedulerConfigConnector instance.\n * You can use this instance to make requests to the Nylas API.\n * @returns Promise<NylasSchedulerConfigConnector | undefined>\n */\n @Method()\n async schedulerConnector(): Promise<NylasSchedulerConfigConnector | undefined> {\n return this.nylasSchedulerConfigConnector;\n }\n\n /**\n * This is a custom event handler that is used to register a component with the provider.\n * It is used by components that have the `@RegisterComponent` decorator.\n * @param event A custom event that contains the component to register\n * @returns Promise<void>\n */\n @Listen('registerComponent')\n async registerComponentHandler(event: CustomEvent<RegisteredComponent<any, any>>): Promise<void> {\n this.baseProvider?.registerComponent(event.detail);\n }\n\n /**\n * This is a custom event handler that is used to unregister a component with the provider.\n * It is used by components that have the `@RegisterComponent` decorator.\n * @param event A custom event that contains the component to unregister\n * @returns Promise<void>\n */\n @Listen('unregisterComponent')\n async unregisterComponentHandler(event: CustomEvent<RegisteredComponent<any, any>>): Promise<void> {\n this.baseProvider?.unregisterComponent(event.detail);\n }\n\n /**\n * Upon login, set the current user and fetch the configuration and calendars.\n * @param currentUser The current user that is logged in\n */\n private async loggedInHandler(currentUser: User) {\n this.stores?.schedulerConfig?.set('currentUser', currentUser);\n\n if (!this.nylasSchedulerConfigConnector) {\n return;\n }\n\n if (this.configurationId) {\n const data = await this.nylasSchedulerConfigConnector.schedulerConfig?.getConfigurationById(this.configurationId);\n if (data && data[0]?.id) {\n this.stores?.schedulerConfig?.set('action', 'edit');\n }\n }\n\n await this.nylasSchedulerConfigConnector.schedulerConfig?.getCalendars();\n }\n\n /**\n * This is a custom event handler that is used to update the state of the provider.\n */\n private handleSchedulerConfigCloseClicked = (_event: Event) => {\n const event = this.schedulerConfigCloseClicked.emit(this.host);\n if (!event.defaultPrevented) {\n localStorage.removeItem('grant');\n localStorage.removeItem('user');\n window.location.reload();\n }\n };\n\n /**\n * This method is used to get the authentication URL for a provider.\n * @param provider The provider to get the authentication URL for (e.g. google, microsoft, etc.)\n * @returns Promise<string> The authentication URL to redirect the user for the provider\n */\n private authenticationUrl = async (provider?: string) => {\n if (!this.nylasApiRequest) {\n console.error(`[nylas-scheduler-editor] Nylas API Request is not initialized.`);\n return '';\n }\n const url = await this.nylasApiRequest.authenticationUrl({ provider });\n\n return url || '';\n };\n\n render() {\n return (\n <Host>\n <div class=\"scheduler-editor-header\" part=\"nse__header\">\n <h1 class=\"scheduler-editor-title\" part=\"nse__title\">\n <calendar-icon width=\"18\" height=\"18\" />\n Scheduler editor\n </h1>\n <button class=\"scheduler-editor-close\" title=\"logout\" onClick={e => this.handleSchedulerConfigCloseClicked(e)} part=\"nse__close-button\">\n <close-icon width=\"18\" height=\"18\" />\n </button>\n </div>\n {this.stores?.schedulerConfig?.state.currentUser && this.stores.schedulerConfig.state.action === null && (\n <div class=\"list-configurations\">\n <nylas-list-configurations></nylas-list-configurations>\n </div>\n )}\n {this.stores?.schedulerConfig?.state.currentUser && this.stores.schedulerConfig.state.action === 'create' && (\n // If the mode is 'app', then render the editor tabs in a composable mode with children for creating a new configuration (Express flow).\n <nylas-editor-tabs mode=\"composable\">\n <ExpressFlow />\n </nylas-editor-tabs>\n )}\n {this.stores?.schedulerConfig?.state.currentUser && this.stores.schedulerConfig.state.action === 'edit' && (\n <nylas-editor-tabs mode={this.mode}>{this.mode === 'composable' && <slot />}</nylas-editor-tabs>\n )}\n {!this.stores?.schedulerConfig?.state.currentUser && (\n <slot name=\"login-required\">\n <LoginRequired authenticationUrl={this.authenticationUrl} />\n </slot>\n )}\n </Host>\n );\n }\n}\n"]}
|
|
@@ -254,7 +254,7 @@ export class TimeInput {
|
|
|
254
254
|
}
|
|
255
255
|
}
|
|
256
256
|
render() {
|
|
257
|
-
return (h(Host, { key: '
|
|
257
|
+
return (h(Host, { key: '51ee1081a47b86693eb0fcd034a53333728f0a8a' }, h("div", { key: '29616cbfd3978f2fb38d2583214e2cb67e86ecd2', class: "time-picker", part: "time-picker" }, h("input", { key: '0eedc68542c5dd6c2d051f89b806016e31ae21d4', type: "text", name: this.name, id: this.name, part: "time-input", class: {
|
|
258
258
|
'time-input': true,
|
|
259
259
|
'error': !!this.err || this.hasError,
|
|
260
260
|
}, ref: el => (this.timeInput = el), value: this.time, onClick: () => {
|