@nylas/web-elements 1.1.0-canary.7 → 1.1.0-canary.9
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_22.cjs.entry.js → add-circle-icon_21.cjs.entry.js} +55 -165
- package/dist/cjs/add-circle-icon_21.cjs.entry.js.map +1 -0
- package/dist/cjs/forward-icon_6.cjs.entry.js +2 -2
- package/dist/cjs/google-logo-icon_4.cjs.entry.js +24 -16
- package/dist/cjs/google-logo-icon_4.cjs.entry.js.map +1 -1
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/{index.es-b12b7df1.js → index.es-cc2d145f.js} +3 -3
- package/dist/cjs/index.es-cc2d145f.js.map +1 -0
- package/dist/cjs/{index.es-0a0f2d87.js → index.es-ec84e726.js} +3 -3
- package/dist/cjs/index.es-ec84e726.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{mailbox-store-14531fd4.js → mailbox-store-5ea7604e.js} +3 -3
- package/dist/cjs/{mailbox-store-05fa3bec.js.map → mailbox-store-5ea7604e.js.map} +1 -1
- package/dist/cjs/{mailbox-store-05fa3bec.js → mailbox-store-a02df2a7.js} +3 -3
- package/dist/cjs/{mailbox-store-14531fd4.js.map → mailbox-store-a02df2a7.js.map} +1 -1
- package/dist/cjs/multi-select-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/nylas-additional-participants.cjs.entry.js +2 -2
- package/dist/cjs/{nylas-api-request-abdb8dd8.js → nylas-api-request-05f1e068.js} +2 -2
- package/dist/cjs/{nylas-api-request-abdb8dd8.js.map → nylas-api-request-05f1e068.js.map} +1 -1
- package/dist/cjs/{nylas-api-request-27c25287.js → nylas-api-request-de316f1a.js} +2 -2
- package/dist/cjs/{nylas-api-request-27c25287.js.map → nylas-api-request-de316f1a.js.map} +1 -1
- package/dist/cjs/nylas-availability-picker.cjs.entry.js +4 -3
- package/dist/cjs/nylas-availability-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-booked-event-card.cjs.entry.js +21 -5
- package/dist/cjs/nylas-booked-event-card.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-booked-event-card_10.cjs.entry.js +54 -9
- package/dist/cjs/nylas-booked-event-card_10.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-booking-calendar-picker.cjs.entry.js +2 -2
- package/dist/cjs/nylas-booking-form.cjs.entry.js +2 -2
- package/dist/cjs/nylas-buffer-time.cjs.entry.js +4 -4
- package/dist/cjs/nylas-buffer-time.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-calendar-picker.cjs.entry.js +2 -2
- package/dist/cjs/nylas-cancel-booking-form.cjs.entry.js +2 -2
- package/dist/cjs/nylas-cancelled-event-card.cjs.entry.js +22 -5
- package/dist/cjs/nylas-cancelled-event-card.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-composer.cjs.entry.js +1 -1
- package/dist/cjs/nylas-custom-booking-flow.cjs.entry.js +2 -2
- package/dist/cjs/nylas-date-picker.cjs.entry.js +15 -3
- package/dist/cjs/nylas-date-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-editor-tabs.cjs.entry.js +18 -12
- package/dist/cjs/nylas-editor-tabs.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-event-description.cjs.entry.js +2 -2
- package/dist/cjs/nylas-event-duration.cjs.entry.js +2 -2
- package/dist/cjs/nylas-event-info.cjs.entry.js +3 -3
- package/dist/cjs/nylas-event-info.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-event-limits.cjs.entry.js +3 -3
- package/dist/cjs/nylas-event-limits.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-event-title.cjs.entry.js +22 -11
- package/dist/cjs/nylas-event-title.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-form-card.cjs.entry.js +2 -2
- package/dist/cjs/nylas-if-state.cjs.entry.js +2 -2
- package/dist/cjs/nylas-limit-future-bookings.cjs.entry.js +3 -3
- package/dist/cjs/nylas-limit-future-bookings.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-list-configurations.cjs.entry.js +8 -6
- package/dist/cjs/nylas-list-configurations.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-list-folders.cjs.entry.js +2 -2
- package/dist/cjs/nylas-list-threads.cjs.entry.js +2 -2
- package/dist/cjs/nylas-locale-switch.cjs.entry.js +2 -2
- package/dist/cjs/nylas-location-component.cjs.entry.js +3 -3
- package/dist/cjs/nylas-location-component.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-login.cjs.entry.js +2 -2
- package/dist/cjs/nylas-mailbox-pagination.cjs.entry.js +2 -2
- package/dist/cjs/nylas-mailbox-toolbar-button.cjs.entry.js +2 -2
- package/dist/cjs/nylas-mailbox.cjs.entry.js +3 -3
- package/dist/cjs/nylas-min-cancellation-notice.cjs.entry.js +3 -3
- package/dist/cjs/nylas-min-cancellation-notice.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-notification.cjs.entry.js +1 -1
- package/dist/cjs/nylas-provider.cjs.entry.js +5 -5
- package/dist/cjs/nylas-scheduler-editor.cjs.entry.js +8 -14
- package/dist/cjs/nylas-scheduler-editor.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-scheduling.cjs.entry.js +35 -12
- package/dist/cjs/nylas-scheduling.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-selected-event-card.cjs.entry.js +2 -2
- 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 +2 -2
- package/dist/cjs/nylas-time-window-picker.cjs.entry.js +1 -1
- package/dist/cjs/nylas-timeslot-picker.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 +2 -2
- package/dist/cjs/nylas-web-elements.cjs.js +1 -1
- package/dist/cjs/{register-component-09ebdf31.js → register-component-2c3ad1d1.js} +2 -2
- package/dist/cjs/{register-component-09ebdf31.js.map → register-component-2c3ad1d1.js.map} +1 -1
- package/dist/cjs/{register-component-c8b6e907.js → register-component-4f8ae42c.js} +2 -2
- package/dist/cjs/{register-component-c8b6e907.js.map → register-component-4f8ae42c.js.map} +1 -1
- package/dist/cjs/{scheduler-config-store-37690bf0.js → scheduler-config-store-918c20d5.js} +3 -4
- package/dist/cjs/scheduler-config-store-918c20d5.js.map +1 -0
- package/dist/cjs/{scheduler-config-store-529c8d7e.js → scheduler-config-store-a5b7c08b.js} +3 -4
- package/dist/cjs/scheduler-config-store-a5b7c08b.js.map +1 -0
- package/dist/cjs/{scheduler-store-67dc1986.js → scheduler-store-33e204ef.js} +39 -7
- package/dist/cjs/scheduler-store-33e204ef.js.map +1 -0
- package/dist/cjs/{scheduler-store-0081970d.js → scheduler-store-df23f511.js} +39 -7
- package/dist/cjs/scheduler-store-df23f511.js.map +1 -0
- package/dist/cjs/time-period-selector.cjs.entry.js +1 -1
- package/dist/cjs/{utils-2c7f0895.js → utils-85bd0909.js} +109 -2
- package/dist/cjs/utils-85bd0909.js.map +1 -0
- package/dist/cjs/{utils-20663d54.js → utils-e6d76818.js} +109 -2
- package/dist/cjs/utils-e6d76818.js.map +1 -0
- package/dist/collection/common/types.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.css +2 -1
- package/dist/collection/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.js +56 -3
- package/dist/collection/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-cancelled-event-card/nylas-cancelled-event-card.js +75 -6
- package/dist/collection/components/scheduler/nylas-cancelled-event-card/nylas-cancelled-event-card.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-date-picker/nylas-date-picker.js +37 -3
- package/dist/collection/components/scheduler/nylas-date-picker/nylas-date-picker.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-scheduler/nylas-scheduling.js +41 -12
- package/dist/collection/components/scheduler/nylas-scheduler/nylas-scheduling.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.js +2 -1
- package/dist/collection/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-buffer-time/nylas-buffer-time.css +23 -3
- package/dist/collection/components/scheduler-editor/nylas-buffer-time/nylas-buffer-time.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-buffer-time/nylas-buffer-time.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.css +7 -0
- package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.js +39 -14
- package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-editor-tabs/tab-contents.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-editor-tabs/tab-contents.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-info/nylas-event-info.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-info/nylas-event-info.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-limits/nylas-event-limits.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-limits/nylas-event-limits.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-title/nylas-event-title.js +21 -10
- package/dist/collection/components/scheduler-editor/nylas-event-title/nylas-event-title.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-limit-future-bookings/nylas-limit-future-bookings.css +7 -1
- package/dist/collection/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.css +20 -2
- package/dist/collection/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.js +5 -3
- package/dist/collection/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-location-component/nylas-location-component.css +5 -0
- package/dist/collection/components/scheduler-editor/nylas-min-cancellation-notice/nylas-min-cancellation-notice.css +7 -1
- package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.css +20 -0
- package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.js +6 -13
- package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.js.map +1 -1
- package/dist/collection/connector/shared/api/scheduler-config.js +0 -1
- package/dist/collection/connector/shared/api/scheduler-config.js.map +1 -1
- package/dist/collection/connector/shared/api/scheduler.js +37 -5
- package/dist/collection/connector/shared/api/scheduler.js.map +1 -1
- package/dist/collection/stores/scheduler-config-store.js +2 -3
- package/dist/collection/stores/scheduler-config-store.js.map +1 -1
- package/dist/collection/stores/scheduler-store.js.map +1 -1
- package/dist/collection/utils/utils.js +104 -1
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/components/index.es.js +2 -2
- package/dist/components/index.es.js.map +1 -1
- package/dist/components/nylas-availability-picker2.js +2 -1
- package/dist/components/nylas-availability-picker2.js.map +1 -1
- package/dist/components/nylas-booked-event-card2.js +22 -5
- package/dist/components/nylas-booked-event-card2.js.map +1 -1
- package/dist/components/nylas-buffer-time2.js +2 -2
- package/dist/components/nylas-buffer-time2.js.map +1 -1
- package/dist/components/nylas-cancelled-event-card2.js +23 -4
- package/dist/components/nylas-cancelled-event-card2.js.map +1 -1
- package/dist/components/nylas-custom-booking-flow.js +170 -1
- package/dist/components/nylas-custom-booking-flow.js.map +1 -1
- package/dist/components/nylas-date-picker2.js +17 -3
- package/dist/components/nylas-date-picker2.js.map +1 -1
- package/dist/components/nylas-editor-tabs2.js +52 -51
- package/dist/components/nylas-editor-tabs2.js.map +1 -1
- package/dist/components/nylas-event-info2.js +1 -1
- package/dist/components/nylas-event-info2.js.map +1 -1
- package/dist/components/nylas-event-limits2.js +1 -1
- package/dist/components/nylas-event-limits2.js.map +1 -1
- package/dist/components/nylas-event-title2.js +21 -10
- package/dist/components/nylas-event-title2.js.map +1 -1
- package/dist/components/nylas-limit-future-bookings2.js +1 -1
- package/dist/components/nylas-limit-future-bookings2.js.map +1 -1
- package/dist/components/nylas-list-configurations2.js +7 -5
- package/dist/components/nylas-list-configurations2.js.map +1 -1
- package/dist/components/nylas-list-folders.js +1 -1
- package/dist/components/nylas-list-threads.js +1 -1
- package/dist/components/nylas-location-component2.js +1 -1
- package/dist/components/nylas-location-component2.js.map +1 -1
- package/dist/components/nylas-min-cancellation-notice2.js +1 -1
- package/dist/components/nylas-min-cancellation-notice2.js.map +1 -1
- package/dist/components/nylas-scheduler-editor.js +46 -59
- package/dist/components/nylas-scheduler-editor.js.map +1 -1
- package/dist/components/nylas-scheduling.js +34 -11
- package/dist/components/nylas-scheduling.js.map +1 -1
- package/dist/components/nylas-summarize-message-button2.js +1 -1
- package/dist/components/nylas-timeslot-picker2.js +1 -1
- package/dist/components/nylas-view-email2.js +1 -1
- package/dist/components/nylas-view-thread.js +1 -1
- package/dist/components/scheduler-config-store.js +2 -3
- package/dist/components/scheduler-config-store.js.map +1 -1
- package/dist/components/scheduler-store.js +37 -5
- package/dist/components/scheduler-store.js.map +1 -1
- package/dist/components/utils.js +105 -2
- package/dist/components/utils.js.map +1 -1
- package/dist/esm/{add-circle-icon_22.entry.js → add-circle-icon_21.entry.js} +56 -165
- package/dist/esm/add-circle-icon_21.entry.js.map +1 -0
- package/dist/esm/forward-icon_6.entry.js +2 -2
- package/dist/esm/google-logo-icon_4.entry.js +24 -16
- package/dist/esm/google-logo-icon_4.entry.js.map +1 -1
- package/dist/esm/{index.es-f57e612a.js → index.es-be19d2df.js} +3 -3
- package/dist/esm/index.es-be19d2df.js.map +1 -0
- package/dist/esm/{index.es-2842f8c8.js → index.es-eb477d56.js} +3 -3
- package/dist/esm/index.es-eb477d56.js.map +1 -0
- package/dist/esm/index.js +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{mailbox-store-47fc8a1a.js → mailbox-store-76540d24.js} +3 -3
- package/dist/{nylas-web-elements/mailbox-store-d48269de.js.map → esm/mailbox-store-76540d24.js.map} +1 -1
- package/dist/{nylas-web-elements/mailbox-store-d48269de.js → esm/mailbox-store-9f819402.js} +3 -3
- package/dist/esm/{mailbox-store-47fc8a1a.js.map → mailbox-store-9f819402.js.map} +1 -1
- package/dist/esm/multi-select-dropdown.entry.js +1 -1
- package/dist/esm/nylas-additional-participants.entry.js +2 -2
- package/dist/esm/{nylas-api-request-8932547a.js → nylas-api-request-59738f8c.js} +2 -2
- package/dist/esm/{nylas-api-request-8932547a.js.map → nylas-api-request-59738f8c.js.map} +1 -1
- package/dist/{nylas-web-elements/nylas-api-request-b085294d.js → esm/nylas-api-request-ff2869d7.js} +2 -2
- package/dist/esm/{nylas-api-request-b085294d.js.map → nylas-api-request-ff2869d7.js.map} +1 -1
- package/dist/esm/nylas-availability-picker.entry.js +4 -3
- package/dist/esm/nylas-availability-picker.entry.js.map +1 -1
- package/dist/esm/nylas-booked-event-card.entry.js +21 -5
- package/dist/esm/nylas-booked-event-card.entry.js.map +1 -1
- package/dist/esm/nylas-booked-event-card_10.entry.js +54 -9
- package/dist/esm/nylas-booked-event-card_10.entry.js.map +1 -1
- package/dist/esm/nylas-booking-calendar-picker.entry.js +2 -2
- package/dist/esm/nylas-booking-form.entry.js +2 -2
- package/dist/esm/nylas-buffer-time.entry.js +4 -4
- package/dist/esm/nylas-buffer-time.entry.js.map +1 -1
- package/dist/esm/nylas-calendar-picker.entry.js +2 -2
- package/dist/esm/nylas-cancel-booking-form.entry.js +2 -2
- package/dist/esm/nylas-cancelled-event-card.entry.js +22 -5
- package/dist/esm/nylas-cancelled-event-card.entry.js.map +1 -1
- package/dist/esm/nylas-composer.entry.js +1 -1
- package/dist/esm/nylas-custom-booking-flow.entry.js +2 -2
- package/dist/esm/nylas-date-picker.entry.js +15 -3
- package/dist/esm/nylas-date-picker.entry.js.map +1 -1
- package/dist/esm/nylas-editor-tabs.entry.js +18 -12
- package/dist/esm/nylas-editor-tabs.entry.js.map +1 -1
- package/dist/esm/nylas-event-description.entry.js +2 -2
- package/dist/esm/nylas-event-duration.entry.js +2 -2
- package/dist/esm/nylas-event-info.entry.js +3 -3
- package/dist/esm/nylas-event-info.entry.js.map +1 -1
- package/dist/esm/nylas-event-limits.entry.js +3 -3
- package/dist/esm/nylas-event-limits.entry.js.map +1 -1
- package/dist/esm/nylas-event-title.entry.js +22 -11
- package/dist/esm/nylas-event-title.entry.js.map +1 -1
- package/dist/esm/nylas-form-card.entry.js +2 -2
- package/dist/esm/nylas-if-state.entry.js +2 -2
- package/dist/esm/nylas-limit-future-bookings.entry.js +3 -3
- package/dist/esm/nylas-limit-future-bookings.entry.js.map +1 -1
- package/dist/esm/nylas-list-configurations.entry.js +8 -6
- package/dist/esm/nylas-list-configurations.entry.js.map +1 -1
- package/dist/esm/nylas-list-folders.entry.js +2 -2
- package/dist/esm/nylas-list-threads.entry.js +2 -2
- package/dist/esm/nylas-locale-switch.entry.js +2 -2
- package/dist/esm/nylas-location-component.entry.js +3 -3
- package/dist/esm/nylas-location-component.entry.js.map +1 -1
- package/dist/esm/nylas-login.entry.js +2 -2
- package/dist/esm/nylas-mailbox-pagination.entry.js +2 -2
- package/dist/esm/nylas-mailbox-toolbar-button.entry.js +2 -2
- package/dist/esm/nylas-mailbox.entry.js +3 -3
- package/dist/esm/nylas-min-cancellation-notice.entry.js +3 -3
- package/dist/esm/nylas-min-cancellation-notice.entry.js.map +1 -1
- package/dist/esm/nylas-notification.entry.js +1 -1
- package/dist/esm/nylas-provider.entry.js +5 -5
- package/dist/esm/nylas-scheduler-editor.entry.js +8 -14
- package/dist/esm/nylas-scheduler-editor.entry.js.map +1 -1
- package/dist/esm/nylas-scheduling.entry.js +35 -12
- package/dist/esm/nylas-scheduling.entry.js.map +1 -1
- package/dist/esm/nylas-selected-event-card.entry.js +2 -2
- package/dist/esm/nylas-summarize-message-button.entry.js +2 -2
- package/dist/esm/nylas-threads-refresh.entry.js +2 -2
- package/dist/esm/nylas-threads-search.entry.js +2 -2
- package/dist/esm/nylas-time-window-picker.entry.js +1 -1
- package/dist/esm/nylas-timeslot-picker.entry.js +2 -2
- package/dist/esm/nylas-view-email.entry.js +1 -1
- package/dist/esm/nylas-view-thread.entry.js +2 -2
- package/dist/esm/nylas-web-elements.js +1 -1
- package/dist/{nylas-web-elements/register-component-e5afe237.js → esm/register-component-0462b27d.js} +2 -2
- package/dist/esm/{register-component-cf5c8420.js.map → register-component-0462b27d.js.map} +1 -1
- package/dist/esm/{register-component-cf5c8420.js → register-component-83e24412.js} +2 -2
- package/dist/esm/{register-component-e5afe237.js.map → register-component-83e24412.js.map} +1 -1
- package/dist/{nylas-web-elements/scheduler-config-store-8f2e658e.js → esm/scheduler-config-store-8ccc8dc7.js} +3 -4
- package/dist/esm/scheduler-config-store-8ccc8dc7.js.map +1 -0
- package/dist/esm/{scheduler-config-store-07d98279.js → scheduler-config-store-ec3b6190.js} +3 -4
- package/dist/esm/scheduler-config-store-ec3b6190.js.map +1 -0
- package/dist/esm/{scheduler-store-a175fc3e.js → scheduler-store-8ca9003d.js} +39 -7
- package/dist/esm/scheduler-store-8ca9003d.js.map +1 -0
- package/dist/esm/{scheduler-store-66c2168c.js → scheduler-store-e314bbe6.js} +39 -7
- package/dist/esm/scheduler-store-e314bbe6.js.map +1 -0
- package/dist/esm/time-period-selector.entry.js +1 -1
- package/dist/esm/{utils-73d8a928.js → utils-157014b4.js} +106 -3
- package/dist/esm/utils-157014b4.js.map +1 -0
- package/dist/esm/{utils-d6204242.js → utils-e6b73120.js} +106 -3
- package/dist/esm/utils-e6b73120.js.map +1 -0
- package/dist/nylas-web-elements/{index.es-2842f8c8.js → index.es-eb477d56.js} +3 -3
- package/dist/nylas-web-elements/index.es-eb477d56.js.map +1 -0
- package/dist/nylas-web-elements/index.esm.js +2 -2
- package/dist/{esm/mailbox-store-d48269de.js → nylas-web-elements/mailbox-store-9f819402.js} +3 -3
- package/dist/{esm/mailbox-store-d48269de.js.map → nylas-web-elements/mailbox-store-9f819402.js.map} +1 -1
- package/dist/nylas-web-elements/multi-select-dropdown.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-additional-participants.entry.js +2 -2
- package/dist/{esm/nylas-api-request-b085294d.js → nylas-web-elements/nylas-api-request-ff2869d7.js} +2 -2
- package/dist/nylas-web-elements/{nylas-api-request-b085294d.js.map → nylas-api-request-ff2869d7.js.map} +1 -1
- package/dist/nylas-web-elements/nylas-availability-picker.entry.js +4 -3
- package/dist/nylas-web-elements/nylas-availability-picker.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-booked-event-card.entry.js +21 -5
- package/dist/nylas-web-elements/nylas-booked-event-card.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-booking-calendar-picker.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-booking-form.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-buffer-time.entry.js +4 -4
- package/dist/nylas-web-elements/nylas-buffer-time.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-calendar-picker.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-cancel-booking-form.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-cancelled-event-card.entry.js +22 -5
- package/dist/nylas-web-elements/nylas-cancelled-event-card.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-composer.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-custom-booking-flow.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-date-picker.entry.js +15 -3
- package/dist/nylas-web-elements/nylas-date-picker.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-editor-tabs.entry.js +18 -12
- package/dist/nylas-web-elements/nylas-editor-tabs.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-event-description.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-event-duration.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-event-info.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-event-info.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-event-limits.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-event-limits.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-event-title.entry.js +22 -11
- package/dist/nylas-web-elements/nylas-event-title.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-form-card.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-if-state.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-limit-future-bookings.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-limit-future-bookings.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-list-configurations.entry.js +8 -6
- package/dist/nylas-web-elements/nylas-list-configurations.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-list-folders.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-list-threads.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-locale-switch.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-location-component.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-location-component.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-login.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-mailbox-pagination.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-mailbox-toolbar-button.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-mailbox.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-min-cancellation-notice.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-min-cancellation-notice.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-notification.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-provider.entry.js +5 -5
- package/dist/nylas-web-elements/nylas-scheduler-editor.entry.js +8 -14
- package/dist/nylas-web-elements/nylas-scheduler-editor.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-scheduling.entry.js +35 -12
- package/dist/nylas-web-elements/nylas-scheduling.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-selected-event-card.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-summarize-message-button.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-threads-refresh.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-threads-search.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-time-window-picker.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-timeslot-picker.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-view-email.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-view-thread.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-web-elements.esm.js +1 -1
- package/dist/nylas-web-elements/{p-41dc0d93.js → p-01e86103.js} +2 -2
- package/dist/nylas-web-elements/p-01e86103.js.map +1 -0
- package/dist/nylas-web-elements/{p-ad64c2b8.entry.js → p-0d1caebd.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-a628eaeb.js → p-0dabcb4d.js} +2 -2
- package/dist/nylas-web-elements/{p-42791515.entry.js → p-2b63efd8.entry.js} +2 -2
- package/dist/nylas-web-elements/p-30f17ef2.entry.js +2 -0
- package/dist/nylas-web-elements/p-30f17ef2.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-f154a362.entry.js → p-38675cc5.entry.js} +2 -2
- package/dist/nylas-web-elements/p-39aa2263.js +2 -0
- package/dist/nylas-web-elements/p-39aa2263.js.map +1 -0
- package/dist/nylas-web-elements/{p-cc674b3b.entry.js → p-44a0f658.entry.js} +3 -3
- package/dist/nylas-web-elements/{p-cc674b3b.entry.js.map → p-44a0f658.entry.js.map} +1 -1
- package/dist/nylas-web-elements/{p-75a8d077.entry.js → p-47fa06de.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-df6d54c7.entry.js → p-48b205a2.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-6110351b.entry.js → p-551871cb.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-bbf9aff2.entry.js → p-61b25ea6.entry.js} +2 -2
- package/dist/nylas-web-elements/p-74492776.entry.js +2 -0
- package/dist/nylas-web-elements/p-74492776.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-1d25ca06.entry.js → p-75bc6ef8.entry.js} +2 -2
- package/dist/nylas-web-elements/p-76461af6.entry.js +2 -0
- package/dist/nylas-web-elements/p-76461af6.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-7c55dfa0.entry.js → p-78e7f732.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-eaa9151b.js → p-8b53becf.js} +2 -2
- package/dist/nylas-web-elements/{p-e22aa0b0.js → p-8f88a748.js} +2 -2
- package/dist/nylas-web-elements/p-8ffc644d.entry.js +2 -0
- package/dist/nylas-web-elements/p-8ffc644d.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-665ef10b.entry.js → p-933c6d32.entry.js} +4 -4
- package/dist/nylas-web-elements/p-933c6d32.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-e03b2592.entry.js → p-a002b4cf.entry.js} +2 -2
- package/dist/nylas-web-elements/p-ab09a78d.js +2 -0
- package/dist/nylas-web-elements/p-ab09a78d.js.map +1 -0
- package/dist/nylas-web-elements/p-b1b3eb52.entry.js +2 -0
- package/dist/nylas-web-elements/p-b1b3eb52.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-f1f8f745.entry.js → p-b302fbb1.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-80d6175c.entry.js → p-b77c316c.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-33b940fb.entry.js → p-d3065401.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-343b8684.entry.js → p-da732fb1.entry.js} +2 -2
- package/dist/nylas-web-elements/p-ee91a2a0.js +2 -0
- package/dist/nylas-web-elements/p-ee91a2a0.js.map +1 -0
- package/dist/{esm/register-component-e5afe237.js → nylas-web-elements/register-component-0462b27d.js} +2 -2
- package/dist/nylas-web-elements/{register-component-e5afe237.js.map → register-component-0462b27d.js.map} +1 -1
- package/dist/{esm/scheduler-config-store-8f2e658e.js → nylas-web-elements/scheduler-config-store-8ccc8dc7.js} +3 -4
- package/dist/nylas-web-elements/scheduler-config-store-8ccc8dc7.js.map +1 -0
- package/dist/nylas-web-elements/{scheduler-store-66c2168c.js → scheduler-store-e314bbe6.js} +39 -7
- package/dist/nylas-web-elements/scheduler-store-e314bbe6.js.map +1 -0
- package/dist/nylas-web-elements/time-period-selector.entry.js +1 -1
- package/dist/nylas-web-elements/{utils-73d8a928.js → utils-157014b4.js} +106 -3
- package/dist/nylas-web-elements/utils-157014b4.js.map +1 -0
- package/dist/types/common/types.d.ts +10 -0
- package/dist/types/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.d.ts +8 -1
- package/dist/types/components/scheduler/nylas-cancelled-event-card/nylas-cancelled-event-card.d.ts +8 -2
- package/dist/types/components/scheduler/nylas-date-picker/nylas-date-picker.d.ts +3 -0
- package/dist/types/components/scheduler/nylas-scheduler/nylas-scheduling.d.ts +2 -0
- package/dist/types/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.d.ts +1 -1
- package/dist/types/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.d.ts +2 -1
- package/dist/types/components/scheduler-editor/nylas-event-title/nylas-event-title.d.ts +1 -0
- package/dist/types/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.d.ts +1 -2
- package/dist/types/components.d.ts +87 -16
- package/dist/types/connector/shared/api/scheduler.d.ts +4 -1
- package/dist/types/stores/scheduler-config-store.d.ts +0 -1
- package/dist/types/stores/scheduler-store.d.ts +11 -0
- package/dist/types/utils/utils.d.ts +5 -0
- package/package.json +3 -3
- package/dist/cjs/add-circle-icon_22.cjs.entry.js.map +0 -1
- package/dist/cjs/index.es-0a0f2d87.js.map +0 -1
- package/dist/cjs/index.es-b12b7df1.js.map +0 -1
- package/dist/cjs/scheduler-config-store-37690bf0.js.map +0 -1
- package/dist/cjs/scheduler-config-store-529c8d7e.js.map +0 -1
- package/dist/cjs/scheduler-store-0081970d.js.map +0 -1
- package/dist/cjs/scheduler-store-67dc1986.js.map +0 -1
- package/dist/cjs/utils-20663d54.js.map +0 -1
- package/dist/cjs/utils-2c7f0895.js.map +0 -1
- package/dist/components/nylas-custom-booking-flow2.js +0 -174
- package/dist/components/nylas-custom-booking-flow2.js.map +0 -1
- package/dist/esm/add-circle-icon_22.entry.js.map +0 -1
- package/dist/esm/index.es-2842f8c8.js.map +0 -1
- package/dist/esm/index.es-f57e612a.js.map +0 -1
- package/dist/esm/scheduler-config-store-07d98279.js.map +0 -1
- package/dist/esm/scheduler-config-store-8f2e658e.js.map +0 -1
- package/dist/esm/scheduler-store-66c2168c.js.map +0 -1
- package/dist/esm/scheduler-store-a175fc3e.js.map +0 -1
- package/dist/esm/utils-73d8a928.js.map +0 -1
- package/dist/esm/utils-d6204242.js.map +0 -1
- package/dist/nylas-web-elements/index.es-2842f8c8.js.map +0 -1
- package/dist/nylas-web-elements/p-1a91cce5.entry.js +0 -2
- package/dist/nylas-web-elements/p-1a91cce5.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-22e5436c.js +0 -2
- package/dist/nylas-web-elements/p-22e5436c.js.map +0 -1
- package/dist/nylas-web-elements/p-2b636359.entry.js +0 -2
- package/dist/nylas-web-elements/p-2b636359.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-30784693.entry.js +0 -2
- package/dist/nylas-web-elements/p-30784693.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-3909ec3f.entry.js +0 -2
- package/dist/nylas-web-elements/p-3909ec3f.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-41dc0d93.js.map +0 -1
- package/dist/nylas-web-elements/p-665ef10b.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-9ea458c3.js +0 -2
- package/dist/nylas-web-elements/p-9ea458c3.js.map +0 -1
- package/dist/nylas-web-elements/p-db15d382.js +0 -2
- package/dist/nylas-web-elements/p-db15d382.js.map +0 -1
- package/dist/nylas-web-elements/scheduler-config-store-8f2e658e.js.map +0 -1
- package/dist/nylas-web-elements/scheduler-store-66c2168c.js.map +0 -1
- package/dist/nylas-web-elements/utils-73d8a928.js.map +0 -1
- /package/dist/nylas-web-elements/{p-ad64c2b8.entry.js.map → p-0d1caebd.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-a628eaeb.js.map → p-0dabcb4d.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-42791515.entry.js.map → p-2b63efd8.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-f154a362.entry.js.map → p-38675cc5.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-75a8d077.entry.js.map → p-47fa06de.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-df6d54c7.entry.js.map → p-48b205a2.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-6110351b.entry.js.map → p-551871cb.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-bbf9aff2.entry.js.map → p-61b25ea6.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-1d25ca06.entry.js.map → p-75bc6ef8.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-7c55dfa0.entry.js.map → p-78e7f732.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-eaa9151b.js.map → p-8b53becf.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-e22aa0b0.js.map → p-8f88a748.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-e03b2592.entry.js.map → p-a002b4cf.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-f1f8f745.entry.js.map → p-b302fbb1.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-80d6175c.entry.js.map → p-b77c316c.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-33b940fb.entry.js.map → p-d3065401.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-343b8684.entry.js.map → p-da732fb1.entry.js.map} +0 -0
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-c14ea8f5.js');
|
|
6
|
-
const registerComponent = require('./register-component-
|
|
7
|
-
const utils = require('./utils-
|
|
6
|
+
const registerComponent = require('./register-component-4f8ae42c.js');
|
|
7
|
+
const utils = require('./utils-85bd0909.js');
|
|
8
8
|
const constants = require('./constants-d590922e.js');
|
|
9
9
|
require('./_commonjsHelpers-ef8cd0cd.js');
|
|
10
10
|
|
|
@@ -36,7 +36,6 @@ function TabContents({ id, formState, activeTab, calendars }) {
|
|
|
36
36
|
case 'bookingOptions':
|
|
37
37
|
return (index.h("div", { key: id },
|
|
38
38
|
index.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' }),
|
|
39
|
-
index.h("nylas-custom-booking-flow", { name: "booking-type", bookingType: formState.bookingType, exportparts: 'ncbf, ncbf__header, ncbf__dropdown, ncbf__dropdown-button, ncbf__dropdown-content' }),
|
|
40
39
|
index.h("nylas-event-limits", null,
|
|
41
40
|
index.h("div", { slot: "inputs" },
|
|
42
41
|
index.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" }),
|
|
@@ -44,7 +43,7 @@ function TabContents({ id, formState, activeTab, calendars }) {
|
|
|
44
43
|
}
|
|
45
44
|
}
|
|
46
45
|
|
|
47
|
-
const nylasEditorTabsCss = ".sc-nylas-editor-tabs-h{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:\"Inter\", sans-serif}.scheduler-editor.sc-nylas-editor-tabs{display:flex;flex-direction:column}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs{display:grid;grid-template-columns:minmax(224px, 25%) 1fr}@media screen and (max-width: 768px){.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs{display:table-column-group}}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs{display:flex;flex-direction:column;border-right:1px solid var(--nylas-base-200);background-color:var(--nylas-base-25)}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.sc-nylas-editor-tabs{display:flex;align-items:center;gap:0.5rem;padding:0.5rem 1rem;color:var(--nylas-base-900);background:var(--nylas-base-0);border:none;height:56px;font-family:var(--nylas-font-family);font-size:16px;font-weight:500;line-height:24px;cursor:pointer}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.sc-nylas-editor-tabs:not(:first-of-type){margin-top:0.25rem}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.active.sc-nylas-editor-tabs{font-weight:600;background:var(--nylas-base-0);color:var(--nylas-primary);border-left:4px solid var(--nylas-primary);box-shadow:0px 1px 2px 0px rgba(0, 0, 0, 0.0588235294);box-shadow:0px 1px 3px 0px rgba(0, 0, 0, 0.1019607843)}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs{max-width:692px}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-info.sc-nylas-editor-tabs div[slot=inputs].sc-nylas-editor-tabs,.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-limits.sc-nylas-editor-tabs div[slot=inputs].sc-nylas-editor-tabs{display:flex;flex-direction:column;gap:1rem}.footer.sc-nylas-editor-tabs{display:flex;justify-content:space-between;align-items:center;gap:1rem;min-height:80px;padding:0 1rem;border-top:1px solid var(--nylas-base-200)}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs{flex-direction:column;height:auto}}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs .preview.sc-nylas-editor-tabs{margin-top:1rem;width:100%}}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs{display:flex;justify-content:flex-end;align-items:center;justify-self:flex-end;gap:1rem}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs{flex-direction:column-reverse;width:100%}}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.sc-nylas-editor-tabs{max-width:524px}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.unsaved-changes.sc-nylas-editor-tabs{color:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.saved-changes.sc-nylas-editor-tabs{color:var(--nylas-success)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.error.sc-nylas-editor-tabs{color:var(--nylas-error)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.error-full-width.sc-nylas-editor-tabs{max-width:660px}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button-component.sc-nylas-editor-tabs{width:100%}}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs{background:var(--nylas-primary);color:var(--nylas-base-0);height:48px;border:none;border-radius:var(--nylas-border-radius-2x);font-size:1rem;line-height:24px;padding:0 1rem;cursor:pointer;width:148px}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:hover{background:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:active{background:var(--nylas-base-800)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:disabled{background:var(--nylas-base-300);cursor:not-allowed}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs span.sc-nylas-editor-tabs{display:flex;align-items:center;justify-content:center;gap:0.5rem}";
|
|
46
|
+
const nylasEditorTabsCss = ".sc-nylas-editor-tabs-h{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:\"Inter\", sans-serif}.scheduler-editor.sc-nylas-editor-tabs{display:flex;flex-direction:column}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs{height:554px;display:grid;grid-template-columns:minmax(224px, 25%) 1fr}@media screen and (max-width: 768px){.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs{display:table-column-group;height:auto}}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs{display:flex;flex-direction:column;border-right:1px solid var(--nylas-base-200);background-color:var(--nylas-base-25)}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.sc-nylas-editor-tabs{display:flex;align-items:center;gap:0.5rem;padding:0.5rem 1rem;color:var(--nylas-base-900);background:var(--nylas-base-0);border:none;height:56px;font-family:var(--nylas-font-family);font-size:16px;font-weight:500;line-height:24px;cursor:pointer}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.sc-nylas-editor-tabs:not(:first-of-type){margin-top:0.25rem}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.active.sc-nylas-editor-tabs{font-weight:600;background:var(--nylas-base-0);color:var(--nylas-primary);border-left:4px solid var(--nylas-primary);box-shadow:0px 1px 2px 0px rgba(0, 0, 0, 0.0588235294);box-shadow:0px 1px 3px 0px rgba(0, 0, 0, 0.1019607843)}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs{max-width:692px;overflow-y:auto}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-info.sc-nylas-editor-tabs,.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-limits.sc-nylas-editor-tabs{width:inherit}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-info.sc-nylas-editor-tabs div[slot=inputs].sc-nylas-editor-tabs,.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-limits.sc-nylas-editor-tabs div[slot=inputs].sc-nylas-editor-tabs{display:flex;flex-direction:column;gap:1rem}.footer.sc-nylas-editor-tabs{display:flex;justify-content:space-between;align-items:center;gap:1rem;min-height:80px;padding:0 1rem;border-top:1px solid var(--nylas-base-200)}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs{flex-direction:column;height:auto}}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs .preview.sc-nylas-editor-tabs{margin-top:1rem;width:100%}}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs{display:flex;justify-content:flex-end;align-items:center;justify-self:flex-end;gap:1rem}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs{flex-direction:column-reverse;width:100%}}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.sc-nylas-editor-tabs{max-width:524px}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.unsaved-changes.sc-nylas-editor-tabs{color:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.saved-changes.sc-nylas-editor-tabs{color:var(--nylas-success)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.error.sc-nylas-editor-tabs{color:var(--nylas-error)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.error-full-width.sc-nylas-editor-tabs{max-width:660px}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button-component.sc-nylas-editor-tabs{width:100%}}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs{background:var(--nylas-primary);color:var(--nylas-base-0);height:48px;border:none;border-radius:var(--nylas-border-radius-2x);font-size:1rem;line-height:24px;padding:0 1rem;cursor:pointer;width:148px}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:hover{background:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:active{background:var(--nylas-base-800)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:disabled{background:var(--nylas-base-300);cursor:not-allowed}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs span.sc-nylas-editor-tabs{display:flex;align-items:center;justify-content:center;gap:0.5rem}";
|
|
48
47
|
|
|
49
48
|
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
50
49
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -83,7 +82,7 @@ const NylasEditorTabs = class {
|
|
|
83
82
|
const { title, description, duration, availability, calendarIds, bookingCalendar, location, bookingType, buffer, availableDaysInFuture, minCancellationNotice } = formState;
|
|
84
83
|
const organizer = this.selectedConfiguration?.participants?.find(p => p.is_organizer);
|
|
85
84
|
const configObject = {
|
|
86
|
-
...this.selectedConfiguration,
|
|
85
|
+
...(this.selectedConfiguration?.id && { id: this.selectedConfiguration.id }),
|
|
87
86
|
version: this.selectedConfiguration?.version ?? '1.0.0',
|
|
88
87
|
availability: {
|
|
89
88
|
duration_minutes: duration ? parseInt(duration) : 0,
|
|
@@ -120,6 +119,9 @@ const NylasEditorTabs = class {
|
|
|
120
119
|
min_cancellation_notice: minCancellationNotice ?? 0,
|
|
121
120
|
},
|
|
122
121
|
};
|
|
122
|
+
const configObjectWithDeveloperSettings = utils.mergeDeep(configObject, this.selectedConfiguration);
|
|
123
|
+
configObjectWithDeveloperSettings.requires_session_auth = this.defaultRequiresSessionAuth;
|
|
124
|
+
const finalConfig = this.action === 'create' ? configObjectWithDeveloperSettings : configObject;
|
|
123
125
|
const resetLoadingState = (_e) => {
|
|
124
126
|
this.isLoading = false;
|
|
125
127
|
this.changesSaved = true;
|
|
@@ -127,14 +129,15 @@ const NylasEditorTabs = class {
|
|
|
127
129
|
this.changesSaved = false;
|
|
128
130
|
}, 5000);
|
|
129
131
|
};
|
|
130
|
-
this.schedulerConfigChanged.emit({ config:
|
|
132
|
+
this.schedulerConfigChanged.emit({ config: finalConfig, resetLoadingState, setError: this.setError, action: this.action });
|
|
131
133
|
};
|
|
132
134
|
this.calendars = undefined;
|
|
133
135
|
this.selectedConfiguration = undefined;
|
|
136
|
+
this.defaultRequiresSessionAuth = true;
|
|
134
137
|
this.currentUser = undefined;
|
|
135
138
|
this.schedulerPreviewLink = '';
|
|
136
|
-
this.action = 'create';
|
|
137
139
|
this.mode = 'app';
|
|
140
|
+
this.action = 'create';
|
|
138
141
|
this.activeTab = 'eventInfo';
|
|
139
142
|
this.isLoading = false;
|
|
140
143
|
this.hasUnsavedChanges = false;
|
|
@@ -246,22 +249,22 @@ const NylasEditorTabs = class {
|
|
|
246
249
|
}
|
|
247
250
|
render() {
|
|
248
251
|
utils.debug('[nylas-editor-tabs]', 'render', this.formState);
|
|
249
|
-
return (index.h(index.Host, { key: '
|
|
252
|
+
return (index.h(index.Host, { key: '1b22e2152ebb021ef1b5a8bc7b84d34742d8b141' }, index.h("form", { key: '0e3a7c3b9a058ff4abc759b6891b7f4d1e8075ef', onSubmit: this.formSubmissionHandler, class: "scheduler-editor", ref: el => (this.formRef = el), noValidate: true }, this.mode === 'app' ? (index.h("div", { class: "form-contents" }, index.h("div", { class: "tabs" }, index.h("button", { class: { tab: true, active: this.activeTab == 'eventInfo' }, onClick: e => this.setActiveTab(e, 'eventInfo') }, index.h("calendar-info-icon", { width: "16", height: "16" }), "Event Info"), index.h("button", { class: { tab: true, active: this.activeTab == 'availability' }, onClick: e => this.setActiveTab(e, 'availability') }, index.h("calendar-patterns-icon", { width: "16", height: "16" }), "Availability"), index.h("button", { class: { tab: true, active: this.activeTab == 'bookingOptions' }, onClick: e => this.setActiveTab(e, 'bookingOptions') }, index.h("flow-icon", { width: "16", height: "16" }), "Booking Options")), index.h("div", { class: "tab-content" }, index.h(TabContents, { formState: this.formState, activeTab: this.activeTab, calendars: this.calendars, id: this.selectedConfiguration?.id ?? 'new' })))) : (index.h("slot", null)), index.h("div", { key: '33093cefafa2ff596a2b6e00e5ed994319065f53', class: "footer" }, index.h("div", { key: 'ffbea04fe503c6f6482c3eaae7f87bac173ad9b9', class: "preview" }, this.schedulerPreviewLink !== '' && this.action === 'edit' && (index.h("button-component", { type: "button", disabled: this.isLoading, clickHandler: event => {
|
|
250
253
|
event.preventDefault();
|
|
251
254
|
const previewEvent = this.previewButtonClicked.emit(this.host);
|
|
252
255
|
if (!previewEvent.defaultPrevented) {
|
|
253
256
|
window.open(utils.parsePreviewLink(this.schedulerPreviewLink, this.selectedConfiguration), '_blank');
|
|
254
257
|
}
|
|
255
|
-
}, variant: 'basic' }, "Preview"))), index.h("div", { key: '
|
|
258
|
+
}, variant: 'basic' }, "Preview"))), index.h("div", { key: '88a229d932ab65f90da5fc64f5c09ab8ae4bcae8', class: "buttons" }, index.h("p", { key: '8e2c76b956e7291775dc3515b4fffa7b77e1fe6c', class: {
|
|
256
259
|
'unsaved-changes': this.hasUnsavedChanges && !this.changesSaved,
|
|
257
260
|
'saved-changes': this.changesSaved,
|
|
258
261
|
'error': this.error !== '',
|
|
259
262
|
'error-full-width': this.error !== '' && this.action === 'create',
|
|
260
|
-
} }, this.error !== '' ? this.error : '', this.error == '' && this.hasUnsavedChanges && !this.changesSaved ? 'Unsaved changes' : this.error == '' && this.changesSaved ? 'Changes saved!' : ''), index.h("button-component", { key: '
|
|
263
|
+
} }, this.error !== '' ? this.error : '', this.error == '' && this.hasUnsavedChanges && !this.changesSaved ? 'Unsaved changes' : this.error == '' && this.changesSaved ? 'Changes saved!' : ''), index.h("button-component", { key: 'e90b955a86235e50227d5655225860e427e1e6c8', type: "button", disabled: this.isLoading, clickHandler: event => {
|
|
261
264
|
event.preventDefault();
|
|
262
265
|
this.cancelButtonClick.emit();
|
|
263
266
|
this.error = '';
|
|
264
|
-
}, variant: 'basic' }, "Cancel"), index.h("button-component", { key: '
|
|
267
|
+
}, variant: 'basic' }, "Cancel"), index.h("button-component", { key: 'da69635d229d324cb7ae5019037a9cf431f71125', type: "submit", disabled: this.isLoading }, this.isLoading ? (index.h("span", null, "Saving", index.h("loading-icon", null), ' ')) : this.action == 'create' ? ('Create') : ('Save changes')))))));
|
|
265
268
|
}
|
|
266
269
|
get host() { return index.getElement(this); }
|
|
267
270
|
static get watchers() { return {
|
|
@@ -301,7 +304,10 @@ __decorate([
|
|
|
301
304
|
nylasSchedulerConfigConnector.schedulerConfigStore.state.action = null;
|
|
302
305
|
},
|
|
303
306
|
},
|
|
304
|
-
localPropsToProp: new Map([
|
|
307
|
+
localPropsToProp: new Map([
|
|
308
|
+
['schedulerPreviewLink', 'schedulerPreviewLink'],
|
|
309
|
+
['defaultRequiresSessionAuth', 'defaultRequiresSessionAuth'],
|
|
310
|
+
]),
|
|
305
311
|
fireRegisterEvent: true,
|
|
306
312
|
}),
|
|
307
313
|
__metadata("design:type", Function),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"nylas-editor-tabs.entry.cjs.js","mappings":";;;;;;;;;;SASwB,WAAW,CAAC,EAAE,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAoB;IAC3F,QAAQ,SAAS;QACf,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;YAGpC,QACEA,iBAAK,GAAG,EAAE,EAAE;gBACVA;oBACEA,iBAAK,IAAI,EAAC,QAAQ;wBAChBA,+BAAmB,IAAI,EAAC,OAAO,EAAC,UAAU,EAAE,UAAU,EAAE,WAAW,EAAC,wCAAwC,GAAG;wBAC/GA,kCACE,IAAI,EAAC,UAAU,EACf,oBAAoB,EAAE,aAAa,EACnC,WAAW,EAAC,6EAA6E,GACzF;wBACFA,sCAA0B,IAAI,EAAC,UAAU,EAAC,aAAa,EAAE,QAAQ,EAAE,WAAW,EAAC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AAE,OAAO,KAAwC,EAAE,6BAA4D;gBACnI,MAAM,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC;gBACrE,MAAM,cAAc,GAAG,CAAC,QAAgC;oBACtD,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,QAAQ,CAAC;oBAC/B,IAAI,CAAC,IAAI,IAAI,KAAK,IAAI,QAAQ,EAAE;wBAC9B,QAAQ,CAAC,KAAc,CAAC,CAAC;qBAC1B;oBACD,IAAI,iBAAiB,EAAE;wBACrB,iBAAiB,CAAC,KAAK,CAAC,CAAC;qBAC1B;iBACF,CAAC;gBAGF,IAAI,MAAM,KAAK,MAAM,EAAE;oBACrB,MAAM,QAAQ,GAAG,MAAM,6BAA6B,CAAC,eAAe,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;oBACjG,cAAc,CAAC,QAAQ,CAAC,CAAC;iBAC1B;qBAAM;oBACL,MAAM,QAAQ,GAAG,MAAM,6BAA6B,CAAC,eAAe,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;oBACjG,cAAc,CAAC,QAAQ,CAAC,CAAC;iBAC1B;aACF;YACD,iBAAiB,EAAE,OAAO,CAAC,EAAE,6BAA6B;gBACxD,6BAA6B,CAAC,oBAAoB,CAAC,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC;aACxE;SACF;QACD,gBAAgB,EAAE,IAAI,GAAG,CAAC,CAAC,CAAC,sBAAsB,EAAE,sBAAsB,CAAC,CAAC,CAAC;QAC7E,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;6CA0FD;;;;;","names":["h","DEFAULT_OPEN_HOURS","debug","Host","parsePreviewLink","RegisterComponent"],"sources":["src/components/scheduler-editor/nylas-editor-tabs/tab-contents.tsx","src/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.scss?tag=nylas-editor-tabs&encapsulation=scoped","src/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.tsx"],"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 // const eventParticipants = formState.participants;\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__input, ned__dropdown, ned__dropdown-button, ned__dropdown-content\"\n />\n <nylas-location-component 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 {/* <nylas-additional-participants\n name=\"participants\"\n eventParticipants={eventParticipants}\n exportparts={'nap__title, nap__subtitle, nap__content, nap__input_group, nap__input_wrapper, nap__input, nap__remove-participant, nap__add-participant'}\n /> */}\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-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 </div>\n </nylas-event-limits>\n </div>\n );\n }\n}\n","@import '../../../common/styles/variables.scss';\n@import '../../../common/mixins/buttons.scss';\n\n:host {\n display: block;\n @include default-css-variables;\n}\n\n.scheduler-editor {\n display: flex;\n flex-direction: column;\n .form-contents {\n display: grid;\n grid-template-columns: minmax(224px, 25%) 1fr;\n @media #{$mobile} {\n display: table-column-group;\n }\n .tabs {\n display: flex;\n flex-direction: column;\n border-right: 1px solid var(--nylas-base-200);\n background-color: var(--nylas-base-25);\n .tab {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n padding: 0.5rem 1rem;\n color: var(--nylas-base-900);\n background: var(--nylas-base-0);\n border: none;\n height: 56px;\n font-family: var(--nylas-font-family);\n font-size: 16px;\n font-weight: 500;\n line-height: 24px;\n cursor: pointer;\n &:not(:first-of-type) {\n margin-top: 0.25rem;\n }\n &.active {\n font-weight: 600;\n background: var(--nylas-base-0);\n color: var(--nylas-primary);\n border-left: 4px solid var(--nylas-primary);\n box-shadow: 0px 1px 2px 0px #0000000f;\n box-shadow: 0px 1px 3px 0px #0000001a;\n }\n }\n }\n .tab-content {\n max-width: 692px;\n nylas-event-info,\n nylas-event-limits {\n div[slot='inputs'] {\n display: flex;\n flex-direction: column;\n gap: 1rem;\n }\n }\n }\n }\n}\n\n.footer {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 1rem;\n min-height: 80px;\n padding: 0 1rem;\n border-top: 1px solid var(--nylas-base-200);\n @media #{$mobile} {\n flex-direction: column;\n height: auto;\n }\n .preview {\n @media #{$mobile} {\n margin-top: 1rem;\n width: 100%;\n }\n }\n .buttons {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n justify-self: flex-end;\n gap: 1rem;\n @media #{$mobile} {\n flex-direction: column-reverse;\n width: 100%;\n }\n p {\n max-width: 524px;\n &.unsaved-changes {\n color: var(--nylas-base-600);\n }\n &.saved-changes {\n color: var(--nylas-success);\n }\n &.error {\n color: var(--nylas-error);\n }\n &.error-full-width {\n max-width: 660px;\n }\n }\n\n button-component {\n @media #{$mobile} {\n width: 100%;\n }\n }\n button {\n @include primary-button;\n width: 148px;\n span {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n }\n }\n }\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug, parsePreviewLink } from '@/utils/utils';\nimport { BookingType, Calendar, Configuration, OpenHours } from '@nylas/core';\nimport { Component, Element, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport TabContents from './tab-contents';\nimport { User } from '@/common/nylas-api-request';\nimport { DEFAULT_OPEN_HOURS } from '@/common/constants';\nimport { DataResponseReturnType } from '@/common/types';\n\ntype SchedulerEventDetail = {\n config: Partial<Configuration>;\n action: 'create' | 'edit';\n resetLoadingState?: (e: CustomEvent) => void;\n setError?: (error: Error) => void;\n};\n\n/**\n * The `nylas-editor-tabs` component is a UI component that displays the editor tabs for the scheduler editor.\n * @part nap__title - [nylas-additional-participants] The title of the component.\n * @part nap__subtitle - [nylas-additional-participants] The subtitle of the component.\n * @part nap__content - [nylas-additional-participants] The content of the component.\n * @part nap__input - [nylas-additional-participants] The input of the component.\n * @part nap__remove-participant - [nylas-additional-participants] The remove participant button of the component.\n * @part nap__add-participant - [nylas-additional-participants] The add participant button of the component.\n * @part nap__header - [nylas-availability-picker] The header of the availability picker\n * @part nap__select-timezone - [nylas-availability-picker] The timezone selection container\n * @part nap__select-timezone-button -[nylas-availability-picker] The timezone selection button\n * @part nap__select-timezone-dropdown-content -[nylas-availability-picker] The timezone selection dropdown content\n * @part nap__availability - [nylas-availability-picker] The availability container\n * @part nap__day - [nylas-availability-picker] The day container\n * @part nap__time-ranges - [nylas-availability-picker] The time ranges container\n * @part nap__time-range - [nylas-availability-picker] The time range container\n * @part nap__add-time-range - [nylas-availability-picker] The add time range button\n * @part nap__time-picker-container -[nylas-availability-picker] The time picker container\n * @part nap__time-picker-input - [nylas-availability-picker] The time picker input\n * @part nap__time-picker-times - [nylas-availability-picker] The time picker times\n * @part nbcp - [nylas-booking-calendar-picker] The booking calendar picker container\n * @part nbcp__header - [nylas-booking-calendar-picker] The header of the booking calendar picker\n * @part nbcp__input-label - [nylas-booking-calendar-picker] The input label of the booking calendar picker\n * @part nbcp__dropdown - [nylas-booking-calendar-picker] The dropdown container\n * @part nbcp__dropdown-button - [nylas-booking-calendar-picker] The dropdown button\n * @part nbcp__dropdown-content - [nylas-booking-calendar-picker] The dropdown content\n * @part nbt - [nylas-buffer-time] The buffer time container\n * @part nbt__header - [nylas-buffer-time] The header of the buffer time\n * @part nbt__body - [nylas-buffer-time] The body of the buffer time\n * @part nbt__dropdown-before - [nylas-buffer-time] The before buffer dropdown container\n * @part nbt__dropdown-button-before - [nylas-buffer-time] The before buffer dropdown button\n * @part nbt__dropdown-content-before - [nylas-buffer-time] The before buffer dropdown content\n * @part nbt__dropdown-after - [nylas-buffer-time] The after buffer dropdown container\n * @part nbt__dropdown-button-after - [nylas-buffer-time] The after buffer dropdown button\n * @part nbt__dropdown-content-after - [nylas-buffer-time] The after buffer dropdown content\n * @part nbt__preview - [nylas-buffer-time] The buffer time preview\n * @part ncp - [nylas-calendar-picker] The calendar picker container\n * @part ncp__header - [nylas-calendar-picker] The header of the calendar picker\n * @part ncp__dropdown - [nylas-calendar-picker] The dropdown container\n * @part ncp__dropdown-button - [nylas-calendar-picker] The dropdown button\n * @part ncp__dropdown-content - [nylas-calendar-picker] The dropdown content\n * @part ncbf - [nylas-custom-booking-flow] The custom booking flow container\n * @part ncbf__header - [nylas-custom-booking-flow] The header of the custom booking flow\n * @part ncbf__dropdown - [nylas-custom-booking-flow] The dropdown container\n * @part ncbf__dropdown-button - [nylas-custom-booking-flow] The dropdown button\n * @part ncbf__dropdown-content - [nylas-custom-booking-flow] The dropdown content\n * @part nedesc - [nylas-event-description] The event description container\n * @part nedesc__textarea - [nylas-event-description] The event description textarea\n * @part ned - [nylas-event-duration] The event duration container\n * @part ned__input - [nylas-event-duration] The event duration input\n * @part ned__dropdown - [nylas-event-duration] The event duration dropdown\n * @part ned__dropdown-button - [nylas-event-duration] The event duration dropdown button\n * @part ned__dropdown-content - [nylas-event-duration] The event duration dropdown content\n * @part net - [nylas-event-title] The event title container\n * @part net__title - [nylas-event-title] The event title input\n * @part net__dropdown-content - [nylas-event-title] The token options container\n * @part nlfb - [nylas-limit-future-bookings] The limit future bookings container\n * @part nlfb__number-dropdown - [nylas-limit-future-bookings] The number dropdown container\n * @part nlfb__number-dropdown-button - [nylas-limit-future-bookings] The number dropdown button\n * @part nlfb__number-dropdown-content - [nylas-limit-future-bookings] The number dropdown content\n * @part nlfb__period-dropdown - [nylas-limit-future-bookings] The period dropdown container\n * @part nlfb__period-dropdown-button - [nylas-limit-future-bookings] The period dropdown button\n * @part nlfb__period-dropdown-content - [nylas-limit-future-bookings] The period dropdown content\n * @part nel - [nylas-location-component] The event location container\n * @part nel__location - [nylas-location-component] The event location input\n * @part nel__dropdown - [nylas-location-component] The dropdown container\n * @part nel__dropdown-button - [nylas-location-component] The dropdown button\n * @part nel__dropdown-content - [nylas-location-component] The dropdown content\n * @part nmcn - [nylas-min-cancellation-notice] The minimum cancellation notice container\n * @part nmcn__number-dropdown - [nylas-min-cancellation-notice] The number dropdown container\n * @part nmcn__number-dropdown-button - [nylas-min-cancellation-notice] The number dropdown button\n * @part nmcn__number-dropdown-content - [nylas-min-cancellation-notice] The number dropdown content\n * @part nmcn__period-dropdown - [nylas-min-cancellation-notice] The period dropdown container\n * @part nmcn__period-dropdown-button - [nylas-min-cancellation-notice] The period dropdown button\n * @part nmcn__period-dropdown-content - [nylas-min-cancellation-notice] The period dropdown content\n */\n@Component({\n tag: 'nylas-editor-tabs',\n styleUrl: 'nylas-editor-tabs.scss',\n scoped: true,\n})\nexport class NylasEditorTabs {\n private formRef!: HTMLFormElement;\n @Element() host!: HTMLNylasEditorTabsElement;\n @Prop() calendars?: Calendar[];\n @Prop() selectedConfiguration?: Configuration;\n @Prop() currentUser?: User;\n /**\n * The scheduler preview link to use when the user clicks on the preview button.\n * You can use a placeholder `{config.id}` to replace the configuration id anywhere in the link.\n */\n @Prop({ attribute: 'scheduler-preview-link' }) schedulerPreviewLink: string = '';\n @State() action: 'create' | 'edit' = 'create';\n @Prop() mode?: 'app' | 'composable' = 'app';\n @State() activeTab: string = 'eventInfo';\n @State() isLoading: boolean = false;\n @State() hasUnsavedChanges: boolean = false;\n @State() changesSaved: boolean = false;\n @State() formState: Partial<{\n title: string;\n description: string;\n duration: string;\n availability?: {\n timezone: string;\n openHours?: OpenHours[];\n };\n calendarIds: string[];\n participants?: any[];\n bookingCalendar?: string;\n location?: string;\n bookingType?: string;\n buffer?: { before: number; after: number };\n availableDaysInFuture?: number;\n minCancellationNotice?: number;\n }> = {};\n @State() error?: string = '';\n\n @Event() schedulerConfigChanged!: EventEmitter<SchedulerEventDetail>;\n\n /**\n * Event emitted when the user clicks the cancel button.\n */\n @Event() cancelButtonClick!: EventEmitter<void>;\n\n /**\n * Event emitted on form submission.\n */\n @Event() formSubmitted!: EventEmitter<void>;\n\n /**\n * Event emitted when the user clicks the cancel button.\n */\n @Event() previewButtonClicked!: EventEmitter<HTMLNylasEditorTabsElement>;\n\n @Watch('selectedConfiguration')\n configChangedHandler(newConfig: Configuration) {\n debug('[nylas-editor-tabs]', 'configChangedHandler', newConfig, this.selectedConfiguration);\n this.formState = {\n ...this.getFormStateFromConfig(newConfig),\n };\n\n if (newConfig.id) {\n this.action = 'edit';\n } else {\n this.action = 'create';\n }\n }\n\n connectedCallback() {\n debug('[nylas-editor-tabs]', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('[nylas-editor-tabs]', 'componentWillLoad');\n this.formState = this.getFormStateFromConfig(this.selectedConfiguration);\n }\n\n componentDidLoad() {\n debug('[nylas-editor-tabs]', 'componentDidLoad');\n }\n\n disconnectedCallback() {\n debug('[nylas-editor-tabs]', 'disconnectedCallback');\n }\n\n @Listen('valueChanged')\n handleValueChanged(event: CustomEvent) {\n debug('[nylas-editor-tabs]', 'handleValueChanged', event);\n const { name, value } = event.detail;\n this.formState = { ...this.formState, [name]: value };\n this.hasUnsavedChanges = true;\n this.error = '';\n }\n\n getFormStateFromConfig(config?: Configuration) {\n const organizerParticipant = config?.participants?.find(p => p.is_organizer);\n return {\n title: config?.event_booking?.title ?? '',\n description: config?.event_booking?.description ?? '',\n duration: config?.availability?.duration_minutes?.toString() ?? '10',\n availability: {\n timezone: config?.event_booking?.timezone ?? Intl.DateTimeFormat().resolvedOptions().timeZone,\n open_hours: organizerParticipant?.availability?.open_hours ?? undefined,\n },\n calendarIds: organizerParticipant?.availability?.calendar_ids ?? [],\n participants: config?.participants ?? [],\n bookingCalendar: organizerParticipant?.booking?.calendar_id ?? organizerParticipant?.email ?? '',\n location: this.selectedConfiguration?.event_booking?.location ?? '',\n bookingType: this.selectedConfiguration?.event_booking?.booking_type ?? 'booking',\n buffer: this.selectedConfiguration?.availability?.availability_rules?.buffer ?? { before: 0, after: 0 },\n availableDaysInFuture: this.selectedConfiguration?.scheduler?.available_days_in_future ?? 30,\n minCancellationNotice: this.selectedConfiguration?.scheduler?.min_cancellation_notice ?? 0,\n };\n }\n\n updateFormState() {\n const formData = new FormData(this.formRef);\n formData.forEach((value, key) => {\n switch (key) {\n case 'title':\n this.formState.title = value.toString();\n break;\n case 'description':\n this.formState.description = value.toString();\n break;\n case 'duration':\n this.formState.duration = value.toString();\n break;\n case 'availability':\n this.formState.availability = JSON.parse(value.toString());\n break;\n case 'participants':\n this.formState.participants = JSON.parse(value.toString());\n break;\n case 'calendars':\n this.formState.calendarIds = value.toString().split(',');\n break;\n case 'booking-calendar':\n this.formState.bookingCalendar = value.toString();\n break;\n case 'location':\n this.formState.location = value.toString();\n break;\n case 'booking-type':\n this.formState.bookingType = value.toString();\n break;\n case 'buffer-time':\n this.formState.buffer = JSON.parse(value.toString());\n break;\n case 'limit-future-bookings':\n this.formState.availableDaysInFuture = parseInt(value.toString());\n break;\n case 'min-cancellation-notice':\n this.formState.minCancellationNotice = parseInt(value.toString());\n break;\n }\n });\n\n this.formState = { ...this.formState };\n return this.formState;\n }\n\n setActiveTab(e: Event, tabName: string) {\n e.preventDefault();\n this.updateFormState();\n this.activeTab = tabName;\n }\n\n setError = (error: Error) => {\n this.error = error.message;\n };\n\n formSubmissionHandler = async (event: Event) => {\n event.preventDefault();\n this.formSubmitted.emit();\n const valid = this.formRef.checkValidity();\n if (!valid) {\n return;\n }\n this.isLoading = true;\n this.hasUnsavedChanges = false;\n const formState = this.updateFormState();\n const { title, description, duration, availability, calendarIds, bookingCalendar, location, bookingType, buffer, availableDaysInFuture, minCancellationNotice } = formState;\n const organizer = this.selectedConfiguration?.participants?.find(p => p.is_organizer);\n const configObject: Partial<Configuration> = {\n ...this.selectedConfiguration,\n version: this.selectedConfiguration?.version ?? '1.0.0',\n availability: {\n duration_minutes: duration ? parseInt(duration) : 0,\n availability_rules: {\n availability_method: this.selectedConfiguration?.availability?.availability_rules?.availability_method ?? 'collective',\n buffer: buffer || { before: 0, after: 0 },\n default_open_hours: this.selectedConfiguration?.availability?.availability_rules?.default_open_hours ?? DEFAULT_OPEN_HOURS,\n round_robin_group_id: this.selectedConfiguration?.availability?.availability_rules?.round_robin_group_id ?? '',\n },\n },\n participants: [\n {\n name: organizer?.name ?? organizer?.email ?? this.currentUser?.name ?? this.currentUser?.email ?? '',\n email: organizer?.email ?? this.currentUser?.email ?? '',\n is_organizer: true,\n availability: {\n calendar_ids: calendarIds?.length ? calendarIds : ['primary'],\n open_hours: availability?.openHours ?? [],\n },\n booking: {\n calendar_id: bookingCalendar && bookingCalendar !== '' ? bookingCalendar : 'primary',\n },\n },\n ],\n event_booking: {\n title: title?.toString() ?? '',\n description: description?.toString() ?? '',\n location: location?.toString() ?? '',\n booking_type: (bookingType?.toString() as BookingType) ?? 'booking',\n timezone: availability?.timezone ?? Intl.DateTimeFormat().resolvedOptions().timeZone,\n },\n scheduler: {\n available_days_in_future: availableDaysInFuture ?? 30,\n min_cancellation_notice: minCancellationNotice ?? 0,\n },\n };\n const resetLoadingState = (_e: CustomEvent) => {\n this.isLoading = false;\n this.changesSaved = true;\n setTimeout(() => {\n this.changesSaved = false;\n }, 5000);\n };\n this.schedulerConfigChanged.emit({ config: configObject, resetLoadingState, setError: this.setError, action: this.action });\n };\n\n @RegisterComponent<NylasEditorTabs, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-editor-tabs',\n stateToProps: new Map([\n ['schedulerConfig.calendars', 'calendars'],\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ['schedulerConfig.currentUser', 'currentUser'],\n ]),\n eventToProps: {\n schedulerConfigChanged: async (event: CustomEvent<SchedulerEventDetail>, nylasSchedulerConfigConnector: NylasSchedulerConfigConnector) => {\n const { resetLoadingState, setError, action, config } = event.detail;\n const checkForErrors = (response: DataResponseReturnType) => {\n const [data, error] = response;\n if (!data && error && setError) {\n setError(error as Error);\n }\n if (resetLoadingState) {\n resetLoadingState(event);\n }\n };\n\n // If we have an ID, we are updating an existing configuration\n if (action === 'edit') {\n const response = await nylasSchedulerConfigConnector.schedulerConfig.updateConfiguration(config);\n checkForErrors(response);\n } else {\n const response = await nylasSchedulerConfigConnector.schedulerConfig.createConfiguration(config);\n checkForErrors(response);\n }\n },\n cancelButtonClick: async (_, nylasSchedulerConfigConnector) => {\n nylasSchedulerConfigConnector.schedulerConfigStore.state.action = null;\n },\n },\n localPropsToProp: new Map([['schedulerPreviewLink', 'schedulerPreviewLink']]),\n fireRegisterEvent: true,\n })\n render() {\n debug('[nylas-editor-tabs]', 'render', this.formState);\n return (\n <Host>\n <form onSubmit={this.formSubmissionHandler} class=\"scheduler-editor\" ref={el => (this.formRef = el as HTMLFormElement)} noValidate>\n {this.mode === 'app' ? (\n <div class=\"form-contents\">\n <div class=\"tabs\">\n <button class={{ tab: true, active: this.activeTab == 'eventInfo' }} onClick={e => this.setActiveTab(e, 'eventInfo')}>\n <calendar-info-icon width=\"16\" height=\"16\" />\n Event Info\n </button>\n <button class={{ tab: true, active: this.activeTab == 'availability' }} onClick={e => this.setActiveTab(e, 'availability')}>\n <calendar-patterns-icon width=\"16\" height=\"16\" />\n Availability\n </button>\n <button class={{ tab: true, active: this.activeTab == 'bookingOptions' }} onClick={e => this.setActiveTab(e, 'bookingOptions')}>\n <flow-icon width=\"16\" height=\"16\" />\n Booking Options\n </button>\n </div>\n <div class=\"tab-content\">\n <TabContents formState={this.formState} activeTab={this.activeTab} calendars={this.calendars} id={this.selectedConfiguration?.id ?? 'new'} />\n </div>\n </div>\n ) : (\n <slot></slot>\n )}\n\n <div class=\"footer\">\n <div class=\"preview\">\n {this.schedulerPreviewLink !== '' && this.action === 'edit' && (\n <button-component\n type=\"button\"\n disabled={this.isLoading}\n clickHandler={event => {\n event.preventDefault();\n const previewEvent = this.previewButtonClicked.emit(this.host);\n if (!previewEvent.defaultPrevented) {\n window.open(parsePreviewLink(this.schedulerPreviewLink, this.selectedConfiguration), '_blank');\n }\n }}\n variant={'basic'}\n >\n Preview\n </button-component>\n )}\n </div>\n <div class=\"buttons\">\n <p\n class={{\n 'unsaved-changes': this.hasUnsavedChanges && !this.changesSaved,\n 'saved-changes': this.changesSaved,\n 'error': this.error !== '',\n 'error-full-width': this.error !== '' && this.action === 'create',\n }}\n >\n {this.error !== '' ? this.error : ''}\n {this.error == '' && this.hasUnsavedChanges && !this.changesSaved ? 'Unsaved changes' : this.error == '' && this.changesSaved ? 'Changes saved!' : ''}\n </p>\n <button-component\n type=\"button\"\n disabled={this.isLoading}\n clickHandler={event => {\n event.preventDefault();\n this.cancelButtonClick.emit();\n this.error = '';\n }}\n variant={'basic'}\n >\n Cancel\n </button-component>\n <button-component type=\"submit\" disabled={this.isLoading}>\n {this.isLoading ? (\n <span>\n Saving\n <loading-icon />{' '}\n </span>\n ) : this.action == 'create' ? (\n 'Create'\n ) : (\n 'Save changes'\n )}\n </button-component>\n </div>\n </div>\n </form>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"nylas-editor-tabs.entry.cjs.js","mappings":";;;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,KAAc,CAAC,CAAC;qBAC1B;oBACD,IAAI,iBAAiB,EAAE;wBACrB,iBAAiB,CAAC,KAAK,CAAC,CAAC;qBAC1B;iBACF,CAAC;gBAGF,IAAI,MAAM,KAAK,MAAM,EAAE;oBACrB,MAAM,QAAQ,GAAG,MAAM,6BAA6B,CAAC,eAAe,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;oBACjG,cAAc,CAAC,QAAQ,CAAC,CAAC;iBAC1B;qBAAM;oBACL,MAAM,QAAQ,GAAG,MAAM,6BAA6B,CAAC,eAAe,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;oBACjG,cAAc,CAAC,QAAQ,CAAC,CAAC;iBAC1B;aACF;YACD,iBAAiB,EAAE,OAAO,CAAC,EAAE,6BAA6B;gBACxD,6BAA6B,CAAC,oBAAoB,CAAC,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC;aACxE;SACF;QACD,gBAAgB,EAAE,IAAI,GAAG,CAAC;YACxB,CAAC,sBAAsB,EAAE,sBAAsB,CAAC;YAChD,CAAC,4BAA4B,EAAE,4BAA4B,CAAC;SAC7D,CAAC;QACF,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;6CA0FD;;;;;","names":["h","DEFAULT_OPEN_HOURS","mergeDeep","debug","Host","parsePreviewLink","RegisterComponent"],"sources":["src/components/scheduler-editor/nylas-editor-tabs/tab-contents.tsx","src/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.scss?tag=nylas-editor-tabs&encapsulation=scoped","src/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.tsx"],"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 // const eventParticipants = formState.participants;\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__input, ned__dropdown, ned__dropdown-button, ned__dropdown-content\"\n />\n <nylas-location-component 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 {/* <nylas-additional-participants\n name=\"participants\"\n eventParticipants={eventParticipants}\n exportparts={'nap__title, nap__subtitle, nap__content, nap__input_group, nap__input_wrapper, nap__input, nap__remove-participant, nap__add-participant'}\n /> */}\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-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 </div>\n </nylas-event-limits>\n </div>\n );\n }\n}\n","@import '../../../common/styles/variables.scss';\n@import '../../../common/mixins/buttons.scss';\n\n:host {\n display: block;\n @include default-css-variables;\n}\n\n.scheduler-editor {\n display: flex;\n flex-direction: column;\n .form-contents {\n height: 554px;\n display: grid;\n grid-template-columns: minmax(224px, 25%) 1fr;\n @media #{$mobile} {\n display: table-column-group;\n height: auto;\n }\n .tabs {\n display: flex;\n flex-direction: column;\n border-right: 1px solid var(--nylas-base-200);\n background-color: var(--nylas-base-25);\n .tab {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n padding: 0.5rem 1rem;\n color: var(--nylas-base-900);\n background: var(--nylas-base-0);\n border: none;\n height: 56px;\n font-family: var(--nylas-font-family);\n font-size: 16px;\n font-weight: 500;\n line-height: 24px;\n cursor: pointer;\n &:not(:first-of-type) {\n margin-top: 0.25rem;\n }\n &.active {\n font-weight: 600;\n background: var(--nylas-base-0);\n color: var(--nylas-primary);\n border-left: 4px solid var(--nylas-primary);\n box-shadow: 0px 1px 2px 0px #0000000f;\n box-shadow: 0px 1px 3px 0px #0000001a;\n }\n }\n }\n .tab-content {\n max-width: 692px;\n overflow-y: auto;\n nylas-event-info,\n nylas-event-limits {\n width: inherit;\n div[slot='inputs'] {\n display: flex;\n flex-direction: column;\n gap: 1rem;\n }\n }\n }\n }\n}\n\n.footer {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 1rem;\n min-height: 80px;\n padding: 0 1rem;\n border-top: 1px solid var(--nylas-base-200);\n @media #{$mobile} {\n flex-direction: column;\n height: auto;\n }\n .preview {\n @media #{$mobile} {\n margin-top: 1rem;\n width: 100%;\n }\n }\n .buttons {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n justify-self: flex-end;\n gap: 1rem;\n @media #{$mobile} {\n flex-direction: column-reverse;\n width: 100%;\n }\n p {\n max-width: 524px;\n &.unsaved-changes {\n color: var(--nylas-base-600);\n }\n &.saved-changes {\n color: var(--nylas-success);\n }\n &.error {\n color: var(--nylas-error);\n }\n &.error-full-width {\n max-width: 660px;\n }\n }\n\n button-component {\n @media #{$mobile} {\n width: 100%;\n }\n }\n button {\n @include primary-button;\n width: 148px;\n span {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n }\n }\n }\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug, mergeDeep, parsePreviewLink } from '@/utils/utils';\nimport { BookingType, Calendar, Configuration, OpenHours } from '@nylas/core';\nimport { Component, Element, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport TabContents from './tab-contents';\nimport { User } from '@/common/nylas-api-request';\nimport { DEFAULT_OPEN_HOURS } from '@/common/constants';\nimport { DataResponseReturnType } from '@/common/types';\n\ntype SchedulerEventDetail = {\n config: Partial<Configuration>;\n action: 'create' | 'edit';\n resetLoadingState?: (e: CustomEvent) => void;\n setError?: (error: Error) => void;\n};\n\n/**\n * The `nylas-editor-tabs` component is a UI component that displays the editor tabs for the scheduler editor.\n * @part nap__title - [nylas-additional-participants] The title of the component.\n * @part nap__subtitle - [nylas-additional-participants] The subtitle of the component.\n * @part nap__content - [nylas-additional-participants] The content of the component.\n * @part nap__input - [nylas-additional-participants] The input of the component.\n * @part nap__remove-participant - [nylas-additional-participants] The remove participant button of the component.\n * @part nap__add-participant - [nylas-additional-participants] The add participant button of the component.\n * @part nap__header - [nylas-availability-picker] The header of the availability picker\n * @part nap__select-timezone - [nylas-availability-picker] The timezone selection container\n * @part nap__select-timezone-button -[nylas-availability-picker] The timezone selection button\n * @part nap__select-timezone-dropdown-content -[nylas-availability-picker] The timezone selection dropdown content\n * @part nap__availability - [nylas-availability-picker] The availability container\n * @part nap__day - [nylas-availability-picker] The day container\n * @part nap__time-ranges - [nylas-availability-picker] The time ranges container\n * @part nap__time-range - [nylas-availability-picker] The time range container\n * @part nap__add-time-range - [nylas-availability-picker] The add time range button\n * @part nap__time-picker-container -[nylas-availability-picker] The time picker container\n * @part nap__time-picker-input - [nylas-availability-picker] The time picker input\n * @part nap__time-picker-times - [nylas-availability-picker] The time picker times\n * @part nbcp - [nylas-booking-calendar-picker] The booking calendar picker container\n * @part nbcp__header - [nylas-booking-calendar-picker] The header of the booking calendar picker\n * @part nbcp__input-label - [nylas-booking-calendar-picker] The input label of the booking calendar picker\n * @part nbcp__dropdown - [nylas-booking-calendar-picker] The dropdown container\n * @part nbcp__dropdown-button - [nylas-booking-calendar-picker] The dropdown button\n * @part nbcp__dropdown-content - [nylas-booking-calendar-picker] The dropdown content\n * @part nbt - [nylas-buffer-time] The buffer time container\n * @part nbt__header - [nylas-buffer-time] The header of the buffer time\n * @part nbt__body - [nylas-buffer-time] The body of the buffer time\n * @part nbt__dropdown-before - [nylas-buffer-time] The before buffer dropdown container\n * @part nbt__dropdown-button-before - [nylas-buffer-time] The before buffer dropdown button\n * @part nbt__dropdown-content-before - [nylas-buffer-time] The before buffer dropdown content\n * @part nbt__dropdown-after - [nylas-buffer-time] The after buffer dropdown container\n * @part nbt__dropdown-button-after - [nylas-buffer-time] The after buffer dropdown button\n * @part nbt__dropdown-content-after - [nylas-buffer-time] The after buffer dropdown content\n * @part nbt__preview - [nylas-buffer-time] The buffer time preview\n * @part ncp - [nylas-calendar-picker] The calendar picker container\n * @part ncp__header - [nylas-calendar-picker] The header of the calendar picker\n * @part ncp__dropdown - [nylas-calendar-picker] The dropdown container\n * @part ncp__dropdown-button - [nylas-calendar-picker] The dropdown button\n * @part ncp__dropdown-content - [nylas-calendar-picker] The dropdown content\n * @part ncbf - [nylas-custom-booking-flow] The custom booking flow container\n * @part ncbf__header - [nylas-custom-booking-flow] The header of the custom booking flow\n * @part ncbf__dropdown - [nylas-custom-booking-flow] The dropdown container\n * @part ncbf__dropdown-button - [nylas-custom-booking-flow] The dropdown button\n * @part ncbf__dropdown-content - [nylas-custom-booking-flow] The dropdown content\n * @part nedesc - [nylas-event-description] The event description container\n * @part nedesc__textarea - [nylas-event-description] The event description textarea\n * @part ned - [nylas-event-duration] The event duration container\n * @part ned__input - [nylas-event-duration] The event duration input\n * @part ned__dropdown - [nylas-event-duration] The event duration dropdown\n * @part ned__dropdown-button - [nylas-event-duration] The event duration dropdown button\n * @part ned__dropdown-content - [nylas-event-duration] The event duration dropdown content\n * @part net - [nylas-event-title] The event title container\n * @part net__title - [nylas-event-title] The event title input\n * @part net__dropdown-content - [nylas-event-title] The token options container\n * @part nlfb - [nylas-limit-future-bookings] The limit future bookings container\n * @part nlfb__number-dropdown - [nylas-limit-future-bookings] The number dropdown container\n * @part nlfb__number-dropdown-button - [nylas-limit-future-bookings] The number dropdown button\n * @part nlfb__number-dropdown-content - [nylas-limit-future-bookings] The number dropdown content\n * @part nlfb__period-dropdown - [nylas-limit-future-bookings] The period dropdown container\n * @part nlfb__period-dropdown-button - [nylas-limit-future-bookings] The period dropdown button\n * @part nlfb__period-dropdown-content - [nylas-limit-future-bookings] The period dropdown content\n * @part nel - [nylas-location-component] The event location container\n * @part nel__location - [nylas-location-component] The event location input\n * @part nel__dropdown - [nylas-location-component] The dropdown container\n * @part nel__dropdown-button - [nylas-location-component] The dropdown button\n * @part nel__dropdown-content - [nylas-location-component] The dropdown content\n * @part nmcn - [nylas-min-cancellation-notice] The minimum cancellation notice container\n * @part nmcn__number-dropdown - [nylas-min-cancellation-notice] The number dropdown container\n * @part nmcn__number-dropdown-button - [nylas-min-cancellation-notice] The number dropdown button\n * @part nmcn__number-dropdown-content - [nylas-min-cancellation-notice] The number dropdown content\n * @part nmcn__period-dropdown - [nylas-min-cancellation-notice] The period dropdown container\n * @part nmcn__period-dropdown-button - [nylas-min-cancellation-notice] The period dropdown button\n * @part nmcn__period-dropdown-content - [nylas-min-cancellation-notice] The period dropdown content\n */\n@Component({\n tag: 'nylas-editor-tabs',\n styleUrl: 'nylas-editor-tabs.scss',\n scoped: true,\n})\nexport class NylasEditorTabs {\n /**\n * The form reference to access the form data.\n */\n private formRef!: HTMLFormElement;\n /**\n * The host element.\n */\n @Element() host!: HTMLNylasEditorTabsElement;\n /**\n * The list of calendars to use in the editor when configuring availability.\n */\n @Prop() calendars?: Calendar[];\n /**\n * The selected configuration to use in the editor when editing an existing configuration or creating a new one.\n */\n @Prop() selectedConfiguration?: Configuration;\n /**\n * The default require session auth flag to used to set the default value for the requireSessionAuth\n * property when creating a configuration. If set to true, then a session token must be provided\n * to the <nylas-scheduling/> component. If set to false, then a session token is not required\n * and the configuration id can passed to the <nylas-scheduling/> component instead.\n */\n @Prop() defaultRequiresSessionAuth: boolean = true;\n /**\n * The current user to use in the editor.\n */\n @Prop() currentUser?: User;\n /**\n * The scheduler preview link to use when the user clicks on the preview button.\n * You can use a placeholder `{config.id}` to replace the configuration id anywhere in the link.\n */\n @Prop({ attribute: 'scheduler-preview-link' }) schedulerPreviewLink: string = '';\n /**\n * The mode of the editor.\n * - `app`: The editor is used as a standalone app.\n * - `composable`: The editor is used as a composable component.\n */\n @Prop() mode?: 'app' | 'composable' = 'app';\n /**\n * The action to perform in the editor.\n * - `create`: Create a new configuration.\n * - `edit`: Edit an existing configuration.\n */\n @State() action: 'create' | 'edit' = 'create';\n /**\n * The active tab in the editor.\n */\n @State() activeTab: string = 'eventInfo';\n /**\n * The loading state of the editor.\n */\n @State() isLoading: boolean = false;\n /**\n * The unsaved changes state of the editor.\n */\n @State() hasUnsavedChanges: boolean = false;\n /**\n * The changes saved state of the editor.\n */\n @State() changesSaved: boolean = false;\n /**\n * The form state of the editor.\n */\n @State() formState: Partial<{\n title: string;\n description: string;\n duration: string;\n availability?: {\n timezone: string;\n openHours?: OpenHours[];\n };\n calendarIds: string[];\n participants?: any[];\n bookingCalendar?: string;\n location?: string;\n bookingType?: string;\n buffer?: { before: number; after: number };\n availableDaysInFuture?: number;\n minCancellationNotice?: number;\n }> = {};\n /**\n * The error state of the editor.\n */\n @State() error?: string = '';\n /**\n * Event emitted when the configuration is changed.\n */\n @Event() schedulerConfigChanged!: EventEmitter<SchedulerEventDetail>;\n /**\n * Event emitted when the user clicks the cancel button.\n */\n @Event() cancelButtonClick!: EventEmitter<void>;\n /**\n * Event emitted on form submission.\n */\n @Event() formSubmitted!: EventEmitter<void>;\n /**\n * Event emitted when the user clicks the cancel button.\n */\n @Event() previewButtonClicked!: EventEmitter<HTMLNylasEditorTabsElement>;\n\n @Watch('selectedConfiguration')\n configChangedHandler(newConfig: Configuration) {\n debug('[nylas-editor-tabs]', 'configChangedHandler', newConfig, this.selectedConfiguration);\n this.formState = {\n ...this.getFormStateFromConfig(newConfig),\n };\n\n if (newConfig.id) {\n this.action = 'edit';\n } else {\n this.action = 'create';\n }\n }\n\n connectedCallback() {\n debug('[nylas-editor-tabs]', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('[nylas-editor-tabs]', 'componentWillLoad');\n this.formState = this.getFormStateFromConfig(this.selectedConfiguration);\n }\n\n componentDidLoad() {\n debug('[nylas-editor-tabs]', 'componentDidLoad');\n }\n\n disconnectedCallback() {\n debug('[nylas-editor-tabs]', 'disconnectedCallback');\n }\n\n @Listen('valueChanged')\n handleValueChanged(event: CustomEvent) {\n debug('[nylas-editor-tabs]', 'handleValueChanged', event);\n const { name, value } = event.detail;\n this.formState = { ...this.formState, [name]: value };\n this.hasUnsavedChanges = true;\n this.error = '';\n }\n\n getFormStateFromConfig(config?: Configuration) {\n const organizerParticipant = config?.participants?.find(p => p.is_organizer);\n return {\n title: config?.event_booking?.title ?? '',\n description: config?.event_booking?.description ?? '',\n duration: config?.availability?.duration_minutes?.toString() ?? '10',\n availability: {\n timezone: config?.event_booking?.timezone ?? Intl.DateTimeFormat().resolvedOptions().timeZone,\n open_hours: organizerParticipant?.availability?.open_hours ?? undefined,\n },\n calendarIds: organizerParticipant?.availability?.calendar_ids ?? [],\n participants: config?.participants ?? [],\n bookingCalendar: organizerParticipant?.booking?.calendar_id ?? organizerParticipant?.email ?? '',\n location: this.selectedConfiguration?.event_booking?.location ?? '',\n bookingType: this.selectedConfiguration?.event_booking?.booking_type ?? 'booking',\n buffer: this.selectedConfiguration?.availability?.availability_rules?.buffer ?? { before: 0, after: 0 },\n availableDaysInFuture: this.selectedConfiguration?.scheduler?.available_days_in_future ?? 30,\n minCancellationNotice: this.selectedConfiguration?.scheduler?.min_cancellation_notice ?? 0,\n };\n }\n\n updateFormState() {\n const formData = new FormData(this.formRef);\n formData.forEach((value, key) => {\n switch (key) {\n case 'title':\n this.formState.title = value.toString();\n break;\n case 'description':\n this.formState.description = value.toString();\n break;\n case 'duration':\n this.formState.duration = value.toString();\n break;\n case 'availability':\n this.formState.availability = JSON.parse(value.toString());\n break;\n case 'participants':\n this.formState.participants = JSON.parse(value.toString());\n break;\n case 'calendars':\n this.formState.calendarIds = value.toString().split(',');\n break;\n case 'booking-calendar':\n this.formState.bookingCalendar = value.toString();\n break;\n case 'location':\n this.formState.location = value.toString();\n break;\n case 'booking-type':\n this.formState.bookingType = value.toString();\n break;\n case 'buffer-time':\n this.formState.buffer = JSON.parse(value.toString());\n break;\n case 'limit-future-bookings':\n this.formState.availableDaysInFuture = parseInt(value.toString());\n break;\n case 'min-cancellation-notice':\n this.formState.minCancellationNotice = parseInt(value.toString());\n break;\n }\n });\n\n this.formState = { ...this.formState };\n return this.formState;\n }\n\n setActiveTab(e: Event, tabName: string) {\n e.preventDefault();\n this.updateFormState();\n this.activeTab = tabName;\n }\n\n setError = (error: Error) => {\n this.error = error.message;\n };\n\n formSubmissionHandler = async (event: Event) => {\n event.preventDefault();\n this.formSubmitted.emit();\n const valid = this.formRef.checkValidity();\n if (!valid) {\n return;\n }\n this.isLoading = true;\n this.hasUnsavedChanges = false;\n const formState = this.updateFormState();\n const { title, description, duration, availability, calendarIds, bookingCalendar, location, bookingType, buffer, availableDaysInFuture, minCancellationNotice } = formState;\n const organizer = this.selectedConfiguration?.participants?.find(p => p.is_organizer);\n const configObject: Partial<Configuration> = {\n ...(this.selectedConfiguration?.id && { id: this.selectedConfiguration.id }),\n version: this.selectedConfiguration?.version ?? '1.0.0',\n availability: {\n duration_minutes: duration ? parseInt(duration) : 0,\n availability_rules: {\n availability_method: this.selectedConfiguration?.availability?.availability_rules?.availability_method ?? 'collective',\n buffer: buffer || { before: 0, after: 0 },\n default_open_hours: this.selectedConfiguration?.availability?.availability_rules?.default_open_hours ?? DEFAULT_OPEN_HOURS,\n round_robin_group_id: this.selectedConfiguration?.availability?.availability_rules?.round_robin_group_id ?? '',\n },\n },\n participants: [\n {\n name: organizer?.name ?? organizer?.email ?? this.currentUser?.name ?? this.currentUser?.email ?? '',\n email: organizer?.email ?? this.currentUser?.email ?? '',\n is_organizer: true,\n availability: {\n calendar_ids: calendarIds?.length ? calendarIds : ['primary'],\n open_hours: availability?.openHours ?? [],\n },\n booking: {\n calendar_id: bookingCalendar && bookingCalendar !== '' ? bookingCalendar : 'primary',\n },\n },\n ],\n event_booking: {\n title: title?.toString() ?? '',\n description: description?.toString() ?? '',\n location: location?.toString() ?? '',\n booking_type: (bookingType?.toString() as BookingType) ?? 'booking',\n timezone: availability?.timezone ?? Intl.DateTimeFormat().resolvedOptions().timeZone,\n },\n scheduler: {\n available_days_in_future: availableDaysInFuture ?? 30,\n min_cancellation_notice: minCancellationNotice ?? 0,\n },\n };\n\n const configObjectWithDeveloperSettings = mergeDeep(configObject, this.selectedConfiguration);\n // Set the requires_session_auth flag to the default value for new configurations\n configObjectWithDeveloperSettings.requires_session_auth = this.defaultRequiresSessionAuth;\n\n const finalConfig = this.action === 'create' ? configObjectWithDeveloperSettings : configObject;\n\n const resetLoadingState = (_e: CustomEvent) => {\n this.isLoading = false;\n this.changesSaved = true;\n setTimeout(() => {\n this.changesSaved = false;\n }, 5000);\n };\n this.schedulerConfigChanged.emit({ config: finalConfig, resetLoadingState, setError: this.setError, action: this.action });\n };\n\n @RegisterComponent<NylasEditorTabs, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-editor-tabs',\n stateToProps: new Map([\n ['schedulerConfig.calendars', 'calendars'],\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ['schedulerConfig.currentUser', 'currentUser'],\n ]),\n eventToProps: {\n schedulerConfigChanged: async (event: CustomEvent<SchedulerEventDetail>, nylasSchedulerConfigConnector: NylasSchedulerConfigConnector) => {\n const { resetLoadingState, setError, action, config } = event.detail;\n const checkForErrors = (response: DataResponseReturnType) => {\n const [data, error] = response;\n if (!data && error && setError) {\n setError(error as Error);\n }\n if (resetLoadingState) {\n resetLoadingState(event);\n }\n };\n\n // If we have an ID, we are updating an existing configuration\n if (action === 'edit') {\n const response = await nylasSchedulerConfigConnector.schedulerConfig.updateConfiguration(config);\n checkForErrors(response);\n } else {\n const response = await nylasSchedulerConfigConnector.schedulerConfig.createConfiguration(config);\n checkForErrors(response);\n }\n },\n cancelButtonClick: async (_, nylasSchedulerConfigConnector) => {\n nylasSchedulerConfigConnector.schedulerConfigStore.state.action = null;\n },\n },\n localPropsToProp: new Map([\n ['schedulerPreviewLink', 'schedulerPreviewLink'],\n ['defaultRequiresSessionAuth', 'defaultRequiresSessionAuth'],\n ]),\n fireRegisterEvent: true,\n })\n render() {\n debug('[nylas-editor-tabs]', 'render', this.formState);\n return (\n <Host>\n <form onSubmit={this.formSubmissionHandler} class=\"scheduler-editor\" ref={el => (this.formRef = el as HTMLFormElement)} noValidate>\n {this.mode === 'app' ? (\n <div class=\"form-contents\">\n <div class=\"tabs\">\n <button class={{ tab: true, active: this.activeTab == 'eventInfo' }} onClick={e => this.setActiveTab(e, 'eventInfo')}>\n <calendar-info-icon width=\"16\" height=\"16\" />\n Event Info\n </button>\n <button class={{ tab: true, active: this.activeTab == 'availability' }} onClick={e => this.setActiveTab(e, 'availability')}>\n <calendar-patterns-icon width=\"16\" height=\"16\" />\n Availability\n </button>\n <button class={{ tab: true, active: this.activeTab == 'bookingOptions' }} onClick={e => this.setActiveTab(e, 'bookingOptions')}>\n <flow-icon width=\"16\" height=\"16\" />\n Booking Options\n </button>\n </div>\n <div class=\"tab-content\">\n <TabContents formState={this.formState} activeTab={this.activeTab} calendars={this.calendars} id={this.selectedConfiguration?.id ?? 'new'} />\n </div>\n </div>\n ) : (\n <slot></slot>\n )}\n\n <div class=\"footer\">\n <div class=\"preview\">\n {this.schedulerPreviewLink !== '' && this.action === 'edit' && (\n <button-component\n type=\"button\"\n disabled={this.isLoading}\n clickHandler={event => {\n event.preventDefault();\n const previewEvent = this.previewButtonClicked.emit(this.host);\n if (!previewEvent.defaultPrevented) {\n window.open(parsePreviewLink(this.schedulerPreviewLink, this.selectedConfiguration), '_blank');\n }\n }}\n variant={'basic'}\n >\n Preview\n </button-component>\n )}\n </div>\n <div class=\"buttons\">\n <p\n class={{\n 'unsaved-changes': this.hasUnsavedChanges && !this.changesSaved,\n 'saved-changes': this.changesSaved,\n 'error': this.error !== '',\n 'error-full-width': this.error !== '' && this.action === 'create',\n }}\n >\n {this.error !== '' ? this.error : ''}\n {this.error == '' && this.hasUnsavedChanges && !this.changesSaved ? 'Unsaved changes' : this.error == '' && this.changesSaved ? 'Changes saved!' : ''}\n </p>\n <button-component\n type=\"button\"\n disabled={this.isLoading}\n clickHandler={event => {\n event.preventDefault();\n this.cancelButtonClick.emit();\n this.error = '';\n }}\n variant={'basic'}\n >\n Cancel\n </button-component>\n <button-component type=\"submit\" disabled={this.isLoading}>\n {this.isLoading ? (\n <span>\n Saving\n <loading-icon />{' '}\n </span>\n ) : this.action == 'create' ? (\n 'Create'\n ) : (\n 'Save changes'\n )}\n </button-component>\n </div>\n </div>\n </form>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-c14ea8f5.js');
|
|
6
|
-
const registerComponent = require('./register-component-
|
|
7
|
-
const utils = require('./utils-
|
|
6
|
+
const registerComponent = require('./register-component-4f8ae42c.js');
|
|
7
|
+
const utils = require('./utils-85bd0909.js');
|
|
8
8
|
require('./_commonjsHelpers-ef8cd0cd.js');
|
|
9
9
|
|
|
10
10
|
const nylasEventDescriptionCss = ":host{--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:\"Inter\", sans-serif}.nylas-event-description{display:flex;flex-direction:column;gap:4px}.nylas-event-description label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:16px;font-style:normal;font-weight:400;line-height:150%;}.nylas-event-description label span.label-icon{margin-left:4px}.nylas-event-description label span.label-icon tooltip-component{display:flex}.nylas-event-description textarea{padding:12px 16px;border-width:1;resize:vertical;border-radius:8px;font-family:var(--nylas-font-family);font-size:16px;line-height:24px;border:1px solid var(--nylas-base-200)}.nylas-event-description textarea::-webkit-resizer{display:none}";
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-c14ea8f5.js');
|
|
6
|
-
const registerComponent = require('./register-component-
|
|
7
|
-
const utils = require('./utils-
|
|
6
|
+
const registerComponent = require('./register-component-4f8ae42c.js');
|
|
7
|
+
const utils = require('./utils-85bd0909.js');
|
|
8
8
|
require('./_commonjsHelpers-ef8cd0cd.js');
|
|
9
9
|
|
|
10
10
|
const nylasEventDurationCss = ":host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:\"Inter\", sans-serif}.nylas-event-duration{display:flex;flex-direction:column;gap:4px}.nylas-event-duration label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:16px;font-style:normal;font-weight:400;line-height:150%;}.nylas-event-duration label span.required{color:var(--nylas-error, #cc4841)}.nylas-event-duration label span.label-icon{margin-left:4px}.nylas-event-duration label span.label-icon tooltip-component{display:flex}.nylas-event-duration__wrapper{display:flex;align-items:center;gap:0.5rem}.nylas-event-duration__wrapper input{padding:12px 16px;border-width:1;border-radius:8px;border:1px solid var(--nylas-base-200);font-family:var(--nylas-font-family);font-size:16px;line-height:24px;width:48px}.nylas-event-duration__wrapper select-dropdown::part(sd_dropdown-button){border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);padding:12px 16px}.nylas-event-duration__wrapper select-dropdown::part(sd_dropdown-button-selected-label){font-family:var(--nylas-font-family);font-size:16px;line-height:24px}";
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-c14ea8f5.js');
|
|
6
|
-
const registerComponent = require('./register-component-
|
|
7
|
-
const utils = require('./utils-
|
|
6
|
+
const registerComponent = require('./register-component-4f8ae42c.js');
|
|
7
|
+
const utils = require('./utils-85bd0909.js');
|
|
8
8
|
require('./_commonjsHelpers-ef8cd0cd.js');
|
|
9
9
|
|
|
10
10
|
const nylasEventInfoCss = ":host{display:block;margin:1rem;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:\"Inter\", sans-serif}.nylas-event-info__title{color:var(--nylas-base-900);font-size:16px;font-style:normal;font-weight:600;line-height:20px;margin:0;text-align:left}.nylas-event-info__subtitle{color:var(--nylas-base-600);font-size:14px;font-style:normal;font-weight:400;line-height:20px;margin:0.25rem 0px 0px;text-align:left}.nylas-event-info__content{padding:1rem;display:flex;flex-direction:column;gap:1rem}.nylas-event-info__block{display:flex;justify-content:space-between;gap:0.5rem}";
|
|
@@ -47,7 +47,7 @@ const NylasEventInfo = class {
|
|
|
47
47
|
utils.debug('nylas-event-info', 'disconnectedCallback');
|
|
48
48
|
}
|
|
49
49
|
render() {
|
|
50
|
-
return (index.h(index.Host, { key: '
|
|
50
|
+
return (index.h(index.Host, { key: '457f3d049f6a14d618ef40112be0edee12d65a2d' }, index.h("nylas-form-card", { key: 'b44f094aa09d25ca21a04181d1ae6e66d0a85610' }, index.h("h1", { key: '60ce63fea2cb8871a7680b903af74aca3b6a65ca', slot: "header-title", class: "nylas-event-info__title" }, "Event information"), index.h("h3", { key: '174984461cc3acfe3fca921f8578f9066405f209', slot: "header-subtitle", class: "nylas-event-info__subtitle" }, "Enter all event information."), index.h("div", { key: '7b256c5bf099d277450242fae4b8d7d866249ef8', slot: "content", class: "nylas-event-info__content" }, index.h("slot", { key: '429339b55f9f729202d37e1bf1ffc39f851545ba', name: "inputs" })))));
|
|
51
51
|
}
|
|
52
52
|
static get formAssociated() { return true; }
|
|
53
53
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"nylas-event-info.entry.cjs.js","mappings":";;;;;;;;;AAAA,MAAM,iBAAiB,GAAG,ilCAAilC;;;;;;;;;;;;;;;;
|
|
1
|
+
{"file":"nylas-event-info.entry.cjs.js","mappings":";;;;;;;;;AAAA,MAAM,iBAAiB,GAAG,ilCAAilC;;;;;;;;;;;;;;;;MCe9lC,cAAc;;;;;;;;;;;IAGzB,iBAAiB;QACfA,WAAK,CAAC,kBAAkB,EAAE,mBAAmB,CAAC,CAAC;KAChD;IAED,iBAAiB;QACfA,WAAK,CAAC,kBAAkB,EAAE,mBAAmB,CAAC,CAAC;KAChD;IAED,gBAAgB;QACdA,WAAK,CAAC,kBAAkB,EAAE,kBAAkB,CAAC,CAAC;KAC/C;IAED,oBAAoB;QAClBA,WAAK,CAAC,kBAAkB,EAAE,sBAAsB,CAAC,CAAC;KACnD;IAOD,MAAM;QACJ,QACEC,QAACC,UAAI,uDACHD,gFACEA,iEAAI,IAAI,EAAC,cAAc,EAAC,KAAK,EAAC,yBAAyB,wBAElD,EACLA,iEAAI,IAAI,EAAC,iBAAiB,EAAC,KAAK,EAAC,4BAA4B,mCAExD,EACLA,kEAAK,IAAI,EAAC,SAAS,EAAC,KAAK,EAAC,2BAA2B,IACnDA,mEAAM,IAAI,EAAC,QAAQ,GAAQ,CACvB,CACU,CACb,EACP;KACH;;;AAhBD;IALCE,mCAAiB,CAAoG;QACpH,IAAI,EAAE,kBAAkB;QACxB,YAAY,EAAE,EAAE;QAChB,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;4CAiBD;;;;;","names":["debug","h","Host","RegisterComponent"],"sources":["src/components/scheduler-editor/nylas-event-info/nylas-event-info.scss?tag=nylas-event-info&encapsulation=shadow","src/components/scheduler-editor/nylas-event-info/nylas-event-info.tsx"],"sourcesContent":["@import '../../../common/styles/variables.scss';\n\n:host {\n display: block;\n margin: 1rem;\n @include default-css-variables;\n}\n\n.nylas-event-info__title {\n color: var(--nylas-base-900);\n font-size: 16px;\n font-style: normal;\n font-weight: 600;\n line-height: 20px; /* 125% */\n margin: 0;\n text-align: left;\n}\n.nylas-event-info__subtitle {\n color: var(--nylas-base-600);\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 20px; /* 142.857% */\n margin: 0.25rem 0px 0px;\n text-align: left;\n}\n.nylas-event-info__content {\n padding: 1rem;\n display: flex;\n flex-direction: column;\n gap: 1rem;\n}\n\n.nylas-event-info__block {\n display: flex;\n justify-content: space-between;\n gap: 0.5rem;\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug } from '@/utils/utils';\nimport { AttachInternals, Component, Host, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\n\n/**\n * The `nylas-event-info` component is a input form for the event information.\n */\n@Component({\n tag: 'nylas-event-info',\n styleUrl: 'nylas-event-info.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasEventInfo {\n @AttachInternals() internals!: ElementInternals;\n\n connectedCallback() {\n debug('nylas-event-info', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-event-info', 'componentWillLoad');\n }\n\n componentDidLoad() {\n debug('nylas-event-info', 'componentDidLoad');\n }\n\n disconnectedCallback() {\n debug('nylas-event-info', 'disconnectedCallback');\n }\n\n @RegisterComponent<NylasEventInfo, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-event-info',\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <nylas-form-card>\n <h1 slot=\"header-title\" class=\"nylas-event-info__title\">\n Event information\n </h1>\n <h3 slot=\"header-subtitle\" class=\"nylas-event-info__subtitle\">\n Enter all event information.\n </h3>\n <div slot=\"content\" class=\"nylas-event-info__content\">\n <slot name=\"inputs\"></slot>\n </div>\n </nylas-form-card>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-c14ea8f5.js');
|
|
6
|
-
const registerComponent = require('./register-component-
|
|
7
|
-
const utils = require('./utils-
|
|
6
|
+
const registerComponent = require('./register-component-4f8ae42c.js');
|
|
7
|
+
const utils = require('./utils-85bd0909.js');
|
|
8
8
|
require('./_commonjsHelpers-ef8cd0cd.js');
|
|
9
9
|
|
|
10
10
|
const nylasEventLimitsCss = ":host{display:block;margin:1rem;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:\"Inter\", sans-serif}.nylas-event-limits__title{color:var(--nylas-base-900);font-size:16px;font-style:normal;font-weight:600;line-height:20px;margin:0;text-align:left}.nylas-event-limits__subtitle{color:var(--nylas-base-600);font-size:14px;font-style:normal;font-weight:400;line-height:20px;margin:0.25rem 0px 0px;text-align:left}.nylas-event-limits__content{padding:1rem;display:flex;flex-direction:column;gap:1rem}.nylas-event-limits__block{display:flex;justify-content:space-between;gap:0.5rem}";
|
|
@@ -47,7 +47,7 @@ const NylasEventLimits = class {
|
|
|
47
47
|
utils.debug('nylas-event-limits', 'disconnectedCallback');
|
|
48
48
|
}
|
|
49
49
|
render() {
|
|
50
|
-
return (index.h(index.Host, { key: '
|
|
50
|
+
return (index.h(index.Host, { key: '5842b0e121d5e2939d95ae584eb70ef7cbae6b1f' }, index.h("nylas-form-card", { key: '57141d607074889e5daa1b00ff124cbb4fbfd33d' }, index.h("h1", { key: '4be5625d740dd7f04d50151ff1af48d175262ec9', slot: "header-title", class: "nylas-event-limits__title" }, "Set event limits"), index.h("h3", { key: '6eb7607dcaf1e7bc344a5fd06ff5555543927aa7', slot: "header-subtitle", class: "nylas-event-limits__subtitle" }, "Customize event limits for the event."), index.h("div", { key: 'b3ca5e1a7d63a3d4b79be46536f19a22ec54e95e', slot: "content", class: "nylas-event-limits__content" }, index.h("slot", { key: '452c3dce511c89c4e07fd54bf325264d686c83d6', name: "inputs" })))));
|
|
51
51
|
}
|
|
52
52
|
static get formAssociated() { return true; }
|
|
53
53
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"nylas-event-limits.entry.cjs.js","mappings":";;;;;;;;;AAAA,MAAM,mBAAmB,GAAG,ylCAAylC;;;;;;;;;;;;;;;;
|
|
1
|
+
{"file":"nylas-event-limits.entry.cjs.js","mappings":";;;;;;;;;AAAA,MAAM,mBAAmB,GAAG,ylCAAylC;;;;;;;;;;;;;;;;MCexmC,gBAAgB;;;;;;;;;;;IAG3B,iBAAiB;QACfA,WAAK,CAAC,oBAAoB,EAAE,mBAAmB,CAAC,CAAC;KAClD;IAED,iBAAiB;QACfA,WAAK,CAAC,oBAAoB,EAAE,mBAAmB,CAAC,CAAC;KAClD;IAED,gBAAgB;QACdA,WAAK,CAAC,oBAAoB,EAAE,kBAAkB,CAAC,CAAC;KACjD;IAED,oBAAoB;QAClBA,WAAK,CAAC,oBAAoB,EAAE,sBAAsB,CAAC,CAAC;KACrD;IAOD,MAAM;QACJ,QACEC,QAACC,UAAI,uDACHD,gFACEA,iEAAI,IAAI,EAAC,cAAc,EAAC,KAAK,EAAC,2BAA2B,uBAEpD,EACLA,iEAAI,IAAI,EAAC,iBAAiB,EAAC,KAAK,EAAC,8BAA8B,4CAE1D,EACLA,kEAAK,IAAI,EAAC,SAAS,EAAC,KAAK,EAAC,6BAA6B,IACrDA,mEAAM,IAAI,EAAC,QAAQ,GAAQ,CACvB,CACU,CACb,EACP;KACH;;;AAhBD;IALCE,mCAAiB,CAAsG;QACtH,IAAI,EAAE,oBAAoB;QAC1B,YAAY,EAAE,EAAE;QAChB,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;8CAiBD;;;;;","names":["debug","h","Host","RegisterComponent"],"sources":["src/components/scheduler-editor/nylas-event-limits/nylas-event-limits.scss?tag=nylas-event-limits&encapsulation=shadow","src/components/scheduler-editor/nylas-event-limits/nylas-event-limits.tsx"],"sourcesContent":["@import '../../../common/styles/variables.scss';\n\n:host {\n display: block;\n margin: 1rem;\n @include default-css-variables;\n}\n\n.nylas-event-limits__title {\n color: var(--nylas-base-900);\n font-size: 16px;\n font-style: normal;\n font-weight: 600;\n line-height: 20px; /* 125% */\n margin: 0;\n text-align: left;\n}\n.nylas-event-limits__subtitle {\n color: var(--nylas-base-600);\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 20px; /* 142.857% */\n margin: 0.25rem 0px 0px;\n text-align: left;\n}\n.nylas-event-limits__content {\n padding: 1rem;\n display: flex;\n flex-direction: column;\n gap: 1rem;\n}\n\n.nylas-event-limits__block {\n display: flex;\n justify-content: space-between;\n gap: 0.5rem;\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug } from '@/utils/utils';\nimport { AttachInternals, Component, Host, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\n\n/**\n * The `nylas-event-limits` component is a input form for the event information.\n */\n@Component({\n tag: 'nylas-event-limits',\n styleUrl: 'nylas-event-limits.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasEventLimits {\n @AttachInternals() internals!: ElementInternals;\n\n connectedCallback() {\n debug('nylas-event-limits', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-event-limits', 'componentWillLoad');\n }\n\n componentDidLoad() {\n debug('nylas-event-limits', 'componentDidLoad');\n }\n\n disconnectedCallback() {\n debug('nylas-event-limits', 'disconnectedCallback');\n }\n\n @RegisterComponent<NylasEventLimits, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-event-limits',\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <nylas-form-card>\n <h1 slot=\"header-title\" class=\"nylas-event-limits__title\">\n Set event limits\n </h1>\n <h3 slot=\"header-subtitle\" class=\"nylas-event-limits__subtitle\">\n Customize event limits for the event.\n </h3>\n <div slot=\"content\" class=\"nylas-event-limits__content\">\n <slot name=\"inputs\"></slot>\n </div>\n </nylas-form-card>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-c14ea8f5.js');
|
|
6
|
-
const registerComponent = require('./register-component-
|
|
7
|
-
const utils = require('./utils-
|
|
6
|
+
const registerComponent = require('./register-component-4f8ae42c.js');
|
|
7
|
+
const utils = require('./utils-85bd0909.js');
|
|
8
8
|
const constants = require('./constants-d590922e.js');
|
|
9
9
|
require('./_commonjsHelpers-ef8cd0cd.js');
|
|
10
10
|
|
|
@@ -118,7 +118,7 @@ const NylasEventTitle = class {
|
|
|
118
118
|
return outputHtml;
|
|
119
119
|
}
|
|
120
120
|
getCurrentSelectionForBrowser() {
|
|
121
|
-
const getSelectionTextData = (nodeValue, offset, node) => {
|
|
121
|
+
const getSelectionTextData = (nodeValue, offset, node, allSelected) => {
|
|
122
122
|
const text = nodeValue.replace(/[\u200B-\u200D\uFEFF]/g, '');
|
|
123
123
|
const dollarIndex = text.lastIndexOf('$');
|
|
124
124
|
const lastWord = text.substring(dollarIndex).split(' ')[0];
|
|
@@ -128,24 +128,29 @@ const NylasEventTitle = class {
|
|
|
128
128
|
lastWord,
|
|
129
129
|
currentText: text,
|
|
130
130
|
node,
|
|
131
|
+
allSelected,
|
|
131
132
|
};
|
|
132
133
|
};
|
|
134
|
+
const isAllSelected = (selection) => selection.anchorOffset === 0 && selection.focusOffset === selection.focusNode?.nodeValue?.length;
|
|
133
135
|
const currentBrowser = utils.getBrowser();
|
|
134
136
|
switch (currentBrowser) {
|
|
135
137
|
case 'Chrome':
|
|
136
138
|
const shadowRootSelection = this.host.shadowRoot?.getSelection();
|
|
137
139
|
const focusNode = shadowRootSelection?.focusNode;
|
|
138
140
|
const focusNodeValue = focusNode?.nodeValue || '';
|
|
139
|
-
|
|
141
|
+
const allSelected = shadowRootSelection && isAllSelected(shadowRootSelection);
|
|
142
|
+
return getSelectionTextData(focusNodeValue, shadowRootSelection?.focusOffset || -1, focusNode, allSelected);
|
|
140
143
|
case 'Firefox':
|
|
141
144
|
const selection = document.getSelection();
|
|
142
145
|
const anchorNodeValue = selection?.anchorNode?.nodeValue || '';
|
|
143
|
-
|
|
146
|
+
const allSelectedFirefox = selection && isAllSelected(selection);
|
|
147
|
+
return getSelectionTextData(anchorNodeValue, selection?.focusOffset || -1, selection?.anchorNode, allSelectedFirefox);
|
|
144
148
|
case 'Safari':
|
|
145
149
|
const windowSelection = window.getSelection();
|
|
146
150
|
const anchorNode = windowSelection?.getComposedRanges(this.host.shadowRoot)[0];
|
|
147
151
|
const currentText = anchorNode?.startContainer?.nodeValue || '';
|
|
148
|
-
|
|
152
|
+
const allSelectedSafari = windowSelection && isAllSelected(windowSelection);
|
|
153
|
+
return getSelectionTextData(currentText, anchorNode?.endOffset || -1, anchorNode?.startContainer, allSelectedSafari);
|
|
149
154
|
default:
|
|
150
155
|
console.warn('Browser not supported');
|
|
151
156
|
return null;
|
|
@@ -181,6 +186,10 @@ const NylasEventTitle = class {
|
|
|
181
186
|
this.updateEventTitle(textContent);
|
|
182
187
|
}
|
|
183
188
|
handleInputKeyDown(event) {
|
|
189
|
+
const selection = this.getCurrentSelectionForBrowser();
|
|
190
|
+
if (selection?.allSelected && !utils.isNonPrintableKey(event)) {
|
|
191
|
+
this.titleRef.innerHTML = '';
|
|
192
|
+
}
|
|
184
193
|
if (event.key === 'Enter') {
|
|
185
194
|
event.preventDefault();
|
|
186
195
|
const activeOption = this.host.shadowRoot?.getElementById(this.ariaActivedescendant);
|
|
@@ -226,10 +235,12 @@ const NylasEventTitle = class {
|
|
|
226
235
|
this.resetDropdown();
|
|
227
236
|
}
|
|
228
237
|
else if (event.key === 'Backspace' || event.key === 'Delete') {
|
|
229
|
-
const selection = this.getCurrentSelectionForBrowser();
|
|
230
238
|
if (selection?.currentText.startsWith('${')) {
|
|
231
239
|
selection?.node?.parentNode && selection.node.parentNode.removeChild(selection.node);
|
|
232
240
|
}
|
|
241
|
+
if (this.titleRef.textContent === '' || selection?.currentText === '' || selection?.allSelected) {
|
|
242
|
+
this.titleRef.innerHTML = '';
|
|
243
|
+
}
|
|
233
244
|
}
|
|
234
245
|
}
|
|
235
246
|
selectOption(e, option) {
|
|
@@ -264,12 +275,12 @@ const NylasEventTitle = class {
|
|
|
264
275
|
const newTextNodeAfter = document.createTextNode(textAfter);
|
|
265
276
|
if (textAfter !== '') {
|
|
266
277
|
textNode.replaceWith(newTextNode, tagSpan, newTextNodeAfter);
|
|
267
|
-
newRange.setStart(newTextNodeAfter,
|
|
278
|
+
newRange.setStart(newTextNodeAfter, 1);
|
|
268
279
|
}
|
|
269
280
|
else {
|
|
270
281
|
const afterNode = document.createTextNode('\u200B');
|
|
271
282
|
textNode.replaceWith(newTextNode, tagSpan, afterNode);
|
|
272
|
-
newRange.setStart(afterNode,
|
|
283
|
+
newRange.setStart(afterNode, 1);
|
|
273
284
|
}
|
|
274
285
|
this.resetDropdown();
|
|
275
286
|
this.titleRef.focus();
|
|
@@ -308,10 +319,10 @@ const NylasEventTitle = class {
|
|
|
308
319
|
return (index.h("div", { class: "token-label" }, index.h("span", { class: "token" }, token.token), index.h("span", { class: "description" }, token.description)));
|
|
309
320
|
}
|
|
310
321
|
render() {
|
|
311
|
-
return (index.h(index.Host, { key: '
|
|
322
|
+
return (index.h(index.Host, { key: 'e0ddf6c13a5a0c0d2e0db9188365418fb7484dcf' }, index.h("div", { key: 'a3b8e594c8d9632709e777891f04df0aaaf7c5c3', class: "nylas-event-title", part: "net" }, index.h("label", { key: 'e5794d2cd8be0b1666bfa67c3ea657da5dc8d45d', htmlFor: "title" }, "Event title", index.h("span", { key: '1210caceb7bf824f01559460e1c5e572cb2dad92', class: "required" }, "*"), index.h("span", { key: '4280ec285221e6db76ca08723fe3888a1d2643e3', class: "label-icon" }, index.h("tooltip-component", { key: 'd6c05fb79cf39656af7589a2e9de9ef832d7a2f8' }, index.h("info-icon", { key: 'a4659d97d60d00dfcc2c993e70da5cfd05904f78', slot: "tooltip-icon" }), index.h("span", { key: '738bfa669eec42b417be02fbad0584af34044c83', slot: "tooltip-content" }, "Enter a title for your event.")))), index.h("div", { key: 'df102dc899f8de91154689d9cdaae28465380622', class: {
|
|
312
323
|
title: true,
|
|
313
324
|
error: this.validationError !== '',
|
|
314
|
-
}, part: "net__title", ref: el => (this.titleRef = el), contentEditable: "true", onInput: e => this.handleChange(e), onKeyDown: event => this.handleInputKeyDown(event) }), this.showTokens && this.filteredTokens?.length > 0 && (index.h("div", { class: "token-options", part: "net__dropdown-content" }, index.h("ul", { tabindex: "-1", role: "listbox", "aria-label": this.name, "aria-activedescendant": this.ariaActivedescendant }, this.filteredTokens.map(option => (index.h("li", { tabindex: "0", key: option.label, id: option.label, class: { active: this.ariaActivedescendant === option.label }, onClick: e => this.selectOption(e, option), role: "option" }, this.getLabelHTML(option.labelHTML))))))), index.h("span", { key: '
|
|
325
|
+
}, part: "net__title", ref: el => (this.titleRef = el), contentEditable: "true", onInput: e => this.handleChange(e), onKeyDown: event => this.handleInputKeyDown(event) }), this.showTokens && this.filteredTokens?.length > 0 && (index.h("div", { class: "token-options", part: "net__dropdown-content" }, index.h("ul", { tabindex: "-1", role: "listbox", "aria-label": this.name, "aria-activedescendant": this.ariaActivedescendant }, this.filteredTokens.map(option => (index.h("li", { tabindex: "0", key: option.label, id: option.label, class: { active: this.ariaActivedescendant === option.label }, onClick: e => this.selectOption(e, option), role: "option" }, this.getLabelHTML(option.labelHTML))))))), index.h("span", { key: 'ec769eea7e2e3ff6d64bef0f5099540c93ba80ab', class: "help-text" }, "Create a dynamic templated event title by typing $. Learn more"), this.validationError != '' && index.h("span", { class: "error-message" }, this.validationError))));
|
|
315
326
|
}
|
|
316
327
|
static get formAssociated() { return true; }
|
|
317
328
|
get host() { return index.getElement(this); }
|