@nylas/web-elements 1.1.0-canary.10 → 1.1.0-canary.11

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.
Files changed (226) hide show
  1. package/dist/cjs/add-circle-icon_21.cjs.entry.js +73 -40
  2. package/dist/cjs/add-circle-icon_21.cjs.entry.js.map +1 -1
  3. package/dist/cjs/google-logo-icon_4.cjs.entry.js +5 -4
  4. package/dist/cjs/google-logo-icon_4.cjs.entry.js.map +1 -1
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/cjs/nylas-api-request-05f1e068.js.map +1 -1
  7. package/dist/cjs/nylas-api-request-de316f1a.js.map +1 -1
  8. package/dist/cjs/nylas-availability-picker.cjs.entry.js +14 -7
  9. package/dist/cjs/nylas-availability-picker.cjs.entry.js.map +1 -1
  10. package/dist/cjs/nylas-booked-event-card.cjs.entry.js +1 -1
  11. package/dist/cjs/nylas-booked-event-card_10.cjs.entry.js +9 -9
  12. package/dist/cjs/nylas-booking-calendar-picker.cjs.entry.js.map +1 -1
  13. package/dist/cjs/nylas-booking-form.cjs.entry.js +3 -3
  14. package/dist/cjs/nylas-buffer-time.cjs.entry.js +7 -6
  15. package/dist/cjs/nylas-buffer-time.cjs.entry.js.map +1 -1
  16. package/dist/cjs/nylas-calendar-picker.cjs.entry.js.map +1 -1
  17. package/dist/cjs/nylas-date-picker.cjs.entry.js +1 -1
  18. package/dist/cjs/nylas-editor-tabs.cjs.entry.js +5 -4
  19. package/dist/cjs/nylas-editor-tabs.cjs.entry.js.map +1 -1
  20. package/dist/cjs/nylas-event-description.cjs.entry.js +2 -2
  21. package/dist/cjs/nylas-event-description.cjs.entry.js.map +1 -1
  22. package/dist/cjs/nylas-event-duration.cjs.entry.js +1 -1
  23. package/dist/cjs/nylas-event-duration.cjs.entry.js.map +1 -1
  24. package/dist/cjs/nylas-event-info.cjs.entry.js +1 -1
  25. package/dist/cjs/nylas-event-info.cjs.entry.js.map +1 -1
  26. package/dist/cjs/nylas-event-limits.cjs.entry.js +1 -1
  27. package/dist/cjs/nylas-event-limits.cjs.entry.js.map +1 -1
  28. package/dist/cjs/nylas-event-title.cjs.entry.js +2 -2
  29. package/dist/cjs/nylas-if-state.cjs.entry.js +1 -1
  30. package/dist/cjs/nylas-limit-future-bookings.cjs.entry.js +1 -1
  31. package/dist/cjs/nylas-limit-future-bookings.cjs.entry.js.map +1 -1
  32. package/dist/cjs/nylas-locale-switch.cjs.entry.js +3 -3
  33. package/dist/cjs/nylas-location-component.cjs.entry.js +4 -4
  34. package/dist/cjs/nylas-location-component.cjs.entry.js.map +1 -1
  35. package/dist/cjs/nylas-min-cancellation-notice.cjs.entry.js +1 -1
  36. package/dist/cjs/nylas-min-cancellation-notice.cjs.entry.js.map +1 -1
  37. package/dist/cjs/nylas-scheduler-editor.cjs.entry.js +1 -1
  38. package/dist/cjs/nylas-scheduler-editor.cjs.entry.js.map +1 -1
  39. package/dist/cjs/nylas-selected-event-card.cjs.entry.js +1 -1
  40. package/dist/cjs/nylas-time-window-picker.cjs.entry.js +39 -14
  41. package/dist/cjs/nylas-time-window-picker.cjs.entry.js.map +1 -1
  42. package/dist/cjs/nylas-web-elements.cjs.js +1 -1
  43. package/dist/cjs/scheduler-config-store-918c20d5.js.map +1 -1
  44. package/dist/cjs/scheduler-config-store-a5b7c08b.js.map +1 -1
  45. package/dist/collection/collection-manifest.json +3 -3
  46. package/dist/collection/common/nylas-api-request.js.map +1 -1
  47. package/dist/collection/components/nylas-if-state/nylas-if-state.js +1 -1
  48. package/dist/collection/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.js +1 -1
  49. package/dist/collection/components/scheduler/nylas-booking-form/nylas-booking-form.js +3 -3
  50. package/dist/collection/components/scheduler/nylas-date-picker/nylas-date-picker.js +1 -1
  51. package/dist/collection/components/scheduler/nylas-locale-switch/nylas-locale-switch.js +3 -3
  52. package/dist/collection/components/scheduler/nylas-selected-event-card/nylas-selected-event-card.js +1 -1
  53. package/dist/collection/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.js +35 -14
  54. package/dist/collection/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.js.map +1 -1
  55. package/dist/collection/components/scheduler-editor/nylas-booking-calendar-picker/nylas-booking-calendar-picker.js +1 -1
  56. package/dist/collection/components/scheduler-editor/nylas-booking-calendar-picker/nylas-booking-calendar-picker.js.map +1 -1
  57. package/dist/collection/components/scheduler-editor/nylas-buffer-time/nylas-buffer-time.css +1 -1
  58. package/dist/collection/components/scheduler-editor/nylas-buffer-time/nylas-buffer-time.js +6 -5
  59. package/dist/collection/components/scheduler-editor/nylas-buffer-time/nylas-buffer-time.js.map +1 -1
  60. package/dist/collection/components/scheduler-editor/nylas-buffer-time/test/nylas-buffer-time.spec.js +2 -2
  61. package/dist/collection/components/scheduler-editor/nylas-buffer-time/test/nylas-buffer-time.spec.js.map +1 -1
  62. package/dist/collection/components/scheduler-editor/nylas-calendar-picker/nylas-calendar-picker.js +1 -1
  63. package/dist/collection/components/scheduler-editor/nylas-calendar-picker/nylas-calendar-picker.js.map +1 -1
  64. package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.js +6 -5
  65. package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.js.map +1 -1
  66. package/dist/collection/components/scheduler-editor/nylas-event-description/nylas-event-description.js +5 -5
  67. package/dist/collection/components/scheduler-editor/nylas-event-description/nylas-event-description.js.map +1 -1
  68. package/dist/collection/components/scheduler-editor/nylas-event-duration/nylas-event-duration.js +4 -4
  69. package/dist/collection/components/scheduler-editor/nylas-event-duration/nylas-event-duration.js.map +1 -1
  70. package/dist/collection/components/scheduler-editor/nylas-event-info/nylas-event-info.js +1 -1
  71. package/dist/collection/components/scheduler-editor/nylas-event-info/nylas-event-info.js.map +1 -1
  72. package/dist/collection/components/scheduler-editor/nylas-event-limits/nylas-event-limits.js +1 -1
  73. package/dist/collection/components/scheduler-editor/nylas-event-limits/nylas-event-limits.js.map +1 -1
  74. package/dist/collection/components/scheduler-editor/nylas-event-title/nylas-event-title.js +2 -2
  75. package/dist/collection/components/scheduler-editor/nylas-limit-future-bookings/nylas-limit-future-bookings.js +4 -4
  76. package/dist/collection/components/scheduler-editor/nylas-limit-future-bookings/nylas-limit-future-bookings.js.map +1 -1
  77. package/dist/collection/components/scheduler-editor/nylas-location-component/nylas-location-component.js +23 -23
  78. package/dist/collection/components/scheduler-editor/nylas-location-component/nylas-location-component.js.map +1 -1
  79. package/dist/collection/components/scheduler-editor/nylas-min-cancellation-notice/nylas-min-cancellation-notice.js +3 -3
  80. package/dist/collection/components/scheduler-editor/nylas-min-cancellation-notice/nylas-min-cancellation-notice.js.map +1 -1
  81. package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.js +9 -9
  82. package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.js.map +1 -1
  83. package/dist/collection/components/scheduler-editor/nylas-time-window-picker/nylas-time-window-picker.js +56 -57
  84. package/dist/collection/components/scheduler-editor/nylas-time-window-picker/nylas-time-window-picker.js.map +1 -1
  85. package/dist/collection/stores/scheduler-config-store.js.map +1 -1
  86. package/dist/collection/types/index.js +6 -0
  87. package/dist/collection/types/index.js.map +1 -0
  88. package/dist/components/nylas-api-request.js.map +1 -1
  89. package/dist/components/nylas-availability-picker2.js +15 -8
  90. package/dist/components/nylas-availability-picker2.js.map +1 -1
  91. package/dist/components/nylas-booked-event-card2.js +1 -1
  92. package/dist/components/nylas-booking-calendar-picker2.js.map +1 -1
  93. package/dist/components/nylas-booking-form2.js +3 -3
  94. package/dist/components/nylas-buffer-time2.js +7 -6
  95. package/dist/components/nylas-buffer-time2.js.map +1 -1
  96. package/dist/components/nylas-calendar-picker2.js.map +1 -1
  97. package/dist/components/nylas-date-picker2.js +1 -1
  98. package/dist/components/nylas-editor-tabs2.js +5 -4
  99. package/dist/components/nylas-editor-tabs2.js.map +1 -1
  100. package/dist/components/nylas-event-description2.js +2 -2
  101. package/dist/components/nylas-event-description2.js.map +1 -1
  102. package/dist/components/nylas-event-duration2.js +1 -1
  103. package/dist/components/nylas-event-duration2.js.map +1 -1
  104. package/dist/components/nylas-event-info2.js +1 -1
  105. package/dist/components/nylas-event-info2.js.map +1 -1
  106. package/dist/components/nylas-event-limits2.js +1 -1
  107. package/dist/components/nylas-event-limits2.js.map +1 -1
  108. package/dist/components/nylas-event-title2.js +2 -2
  109. package/dist/components/nylas-if-state.js +1 -1
  110. package/dist/components/nylas-limit-future-bookings2.js +1 -1
  111. package/dist/components/nylas-limit-future-bookings2.js.map +1 -1
  112. package/dist/components/nylas-locale-switch2.js +3 -3
  113. package/dist/components/nylas-location-component2.js +5 -5
  114. package/dist/components/nylas-location-component2.js.map +1 -1
  115. package/dist/components/nylas-min-cancellation-notice2.js +1 -1
  116. package/dist/components/nylas-min-cancellation-notice2.js.map +1 -1
  117. package/dist/components/nylas-scheduler-editor.js +1 -1
  118. package/dist/components/nylas-scheduler-editor.js.map +1 -1
  119. package/dist/components/nylas-selected-event-card2.js +1 -1
  120. package/dist/components/nylas-time-window-picker2.js +39 -16
  121. package/dist/components/nylas-time-window-picker2.js.map +1 -1
  122. package/dist/components/scheduler-config-store.js.map +1 -1
  123. package/dist/esm/add-circle-icon_21.entry.js +73 -40
  124. package/dist/esm/add-circle-icon_21.entry.js.map +1 -1
  125. package/dist/esm/google-logo-icon_4.entry.js +5 -4
  126. package/dist/esm/google-logo-icon_4.entry.js.map +1 -1
  127. package/dist/esm/loader.js +1 -1
  128. package/dist/esm/nylas-api-request-59738f8c.js.map +1 -1
  129. package/dist/esm/nylas-api-request-ff2869d7.js.map +1 -1
  130. package/dist/esm/nylas-availability-picker.entry.js +14 -7
  131. package/dist/esm/nylas-availability-picker.entry.js.map +1 -1
  132. package/dist/esm/nylas-booked-event-card.entry.js +1 -1
  133. package/dist/esm/nylas-booked-event-card_10.entry.js +9 -9
  134. package/dist/esm/nylas-booking-calendar-picker.entry.js.map +1 -1
  135. package/dist/esm/nylas-booking-form.entry.js +3 -3
  136. package/dist/esm/nylas-buffer-time.entry.js +7 -6
  137. package/dist/esm/nylas-buffer-time.entry.js.map +1 -1
  138. package/dist/esm/nylas-calendar-picker.entry.js.map +1 -1
  139. package/dist/esm/nylas-date-picker.entry.js +1 -1
  140. package/dist/esm/nylas-editor-tabs.entry.js +5 -4
  141. package/dist/esm/nylas-editor-tabs.entry.js.map +1 -1
  142. package/dist/esm/nylas-event-description.entry.js +2 -2
  143. package/dist/esm/nylas-event-description.entry.js.map +1 -1
  144. package/dist/esm/nylas-event-duration.entry.js +1 -1
  145. package/dist/esm/nylas-event-duration.entry.js.map +1 -1
  146. package/dist/esm/nylas-event-info.entry.js +1 -1
  147. package/dist/esm/nylas-event-info.entry.js.map +1 -1
  148. package/dist/esm/nylas-event-limits.entry.js +1 -1
  149. package/dist/esm/nylas-event-limits.entry.js.map +1 -1
  150. package/dist/esm/nylas-event-title.entry.js +2 -2
  151. package/dist/esm/nylas-if-state.entry.js +1 -1
  152. package/dist/esm/nylas-limit-future-bookings.entry.js +1 -1
  153. package/dist/esm/nylas-limit-future-bookings.entry.js.map +1 -1
  154. package/dist/esm/nylas-locale-switch.entry.js +3 -3
  155. package/dist/esm/nylas-location-component.entry.js +4 -4
  156. package/dist/esm/nylas-location-component.entry.js.map +1 -1
  157. package/dist/esm/nylas-min-cancellation-notice.entry.js +1 -1
  158. package/dist/esm/nylas-min-cancellation-notice.entry.js.map +1 -1
  159. package/dist/esm/nylas-scheduler-editor.entry.js +1 -1
  160. package/dist/esm/nylas-scheduler-editor.entry.js.map +1 -1
  161. package/dist/esm/nylas-selected-event-card.entry.js +1 -1
  162. package/dist/esm/nylas-time-window-picker.entry.js +39 -14
  163. package/dist/esm/nylas-time-window-picker.entry.js.map +1 -1
  164. package/dist/esm/nylas-web-elements.js +1 -1
  165. package/dist/esm/scheduler-config-store-8ccc8dc7.js.map +1 -1
  166. package/dist/esm/scheduler-config-store-ec3b6190.js.map +1 -1
  167. package/dist/nylas-web-elements/nylas-api-request-ff2869d7.js.map +1 -1
  168. package/dist/nylas-web-elements/nylas-availability-picker.entry.js +14 -7
  169. package/dist/nylas-web-elements/nylas-availability-picker.entry.js.map +1 -1
  170. package/dist/nylas-web-elements/nylas-booked-event-card.entry.js +1 -1
  171. package/dist/nylas-web-elements/nylas-booking-calendar-picker.entry.js.map +1 -1
  172. package/dist/nylas-web-elements/nylas-booking-form.entry.js +3 -3
  173. package/dist/nylas-web-elements/nylas-buffer-time.entry.js +7 -6
  174. package/dist/nylas-web-elements/nylas-buffer-time.entry.js.map +1 -1
  175. package/dist/nylas-web-elements/nylas-calendar-picker.entry.js.map +1 -1
  176. package/dist/nylas-web-elements/nylas-date-picker.entry.js +1 -1
  177. package/dist/nylas-web-elements/nylas-editor-tabs.entry.js +5 -4
  178. package/dist/nylas-web-elements/nylas-editor-tabs.entry.js.map +1 -1
  179. package/dist/nylas-web-elements/nylas-event-description.entry.js +2 -2
  180. package/dist/nylas-web-elements/nylas-event-description.entry.js.map +1 -1
  181. package/dist/nylas-web-elements/nylas-event-duration.entry.js +1 -1
  182. package/dist/nylas-web-elements/nylas-event-duration.entry.js.map +1 -1
  183. package/dist/nylas-web-elements/nylas-event-info.entry.js +1 -1
  184. package/dist/nylas-web-elements/nylas-event-info.entry.js.map +1 -1
  185. package/dist/nylas-web-elements/nylas-event-limits.entry.js +1 -1
  186. package/dist/nylas-web-elements/nylas-event-limits.entry.js.map +1 -1
  187. package/dist/nylas-web-elements/nylas-event-title.entry.js +2 -2
  188. package/dist/nylas-web-elements/nylas-if-state.entry.js +1 -1
  189. package/dist/nylas-web-elements/nylas-limit-future-bookings.entry.js +1 -1
  190. package/dist/nylas-web-elements/nylas-limit-future-bookings.entry.js.map +1 -1
  191. package/dist/nylas-web-elements/nylas-locale-switch.entry.js +3 -3
  192. package/dist/nylas-web-elements/nylas-location-component.entry.js +4 -4
  193. package/dist/nylas-web-elements/nylas-location-component.entry.js.map +1 -1
  194. package/dist/nylas-web-elements/nylas-min-cancellation-notice.entry.js +1 -1
  195. package/dist/nylas-web-elements/nylas-min-cancellation-notice.entry.js.map +1 -1
  196. package/dist/nylas-web-elements/nylas-scheduler-editor.entry.js +1 -1
  197. package/dist/nylas-web-elements/nylas-scheduler-editor.entry.js.map +1 -1
  198. package/dist/nylas-web-elements/nylas-selected-event-card.entry.js +1 -1
  199. package/dist/nylas-web-elements/nylas-time-window-picker.entry.js +39 -14
  200. package/dist/nylas-web-elements/nylas-time-window-picker.entry.js.map +1 -1
  201. package/dist/nylas-web-elements/nylas-web-elements.esm.js +1 -1
  202. package/dist/nylas-web-elements/p-0dabcb4d.js.map +1 -1
  203. package/dist/nylas-web-elements/{p-933c6d32.entry.js → p-181654f5.entry.js} +3 -3
  204. package/dist/nylas-web-elements/{p-933c6d32.entry.js.map → p-181654f5.entry.js.map} +1 -1
  205. package/dist/nylas-web-elements/{p-b1b3eb52.entry.js → p-1871c702.entry.js} +2 -2
  206. package/dist/nylas-web-elements/p-4f4e83d0.entry.js +2 -0
  207. package/dist/nylas-web-elements/p-4f4e83d0.entry.js.map +1 -0
  208. package/dist/nylas-web-elements/p-a219b2c7.entry.js +2 -0
  209. package/dist/nylas-web-elements/p-a219b2c7.entry.js.map +1 -0
  210. package/dist/nylas-web-elements/{p-a002b4cf.entry.js → p-e92690a2.entry.js} +2 -2
  211. package/dist/nylas-web-elements/p-ee91a2a0.js.map +1 -1
  212. package/dist/nylas-web-elements/scheduler-config-store-8ccc8dc7.js.map +1 -1
  213. package/dist/types/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.d.ts +10 -5
  214. package/dist/types/components/scheduler-editor/nylas-event-description/nylas-event-description.d.ts +2 -2
  215. package/dist/types/components/scheduler-editor/nylas-location-component/nylas-location-component.d.ts +2 -2
  216. package/dist/types/components/scheduler-editor/nylas-time-window-picker/nylas-time-window-picker.d.ts +8 -3
  217. package/dist/types/components.d.ts +125 -32
  218. package/dist/types/stores/scheduler-config-store.d.ts +5 -1
  219. package/dist/types/types/index.d.ts +73 -0
  220. package/package.json +4 -2
  221. package/dist/nylas-web-elements/p-74492776.entry.js +0 -2
  222. package/dist/nylas-web-elements/p-74492776.entry.js.map +0 -1
  223. package/dist/nylas-web-elements/p-76461af6.entry.js +0 -2
  224. package/dist/nylas-web-elements/p-76461af6.entry.js.map +0 -1
  225. /package/dist/nylas-web-elements/{p-b1b3eb52.entry.js.map → p-1871c702.entry.js.map} +0 -0
  226. /package/dist/nylas-web-elements/{p-a002b4cf.entry.js.map → p-e92690a2.entry.js.map} +0 -0
@@ -117,6 +117,7 @@ const NylasEditorTabs = class {
117
117
  version: this.selectedConfiguration?.version ?? '1.0.0',
118
118
  availability: {
119
119
  duration_minutes: duration ? parseInt(duration) : 0,
120
+ interval_minutes: duration ? parseInt(duration) : 0,
120
121
  availability_rules: {
121
122
  availability_method: this.selectedConfiguration?.availability?.availability_rules?.availability_method ?? 'collective',
122
123
  buffer: buffer || { before: 0, after: 0 },
@@ -280,22 +281,22 @@ const NylasEditorTabs = class {
280
281
  }
281
282
  render() {
282
283
  utils.debug('[nylas-editor-tabs]', 'render', this.formState);
283
- 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 => {
284
+ return (index.h(index.Host, { key: 'd8076c91e22be275e321ab8e38090e5da2512234' }, index.h("form", { key: '8609296809c107d53d49ab570f97608815a3a29c', 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: 'dc4bcd5a80351f3ec5c932759c1e58ee664e7351', class: "footer" }, index.h("div", { key: '50592e0c5e63b0fa70c6d74e843be3cdea38d9af', class: "preview" }, this.schedulerPreviewLink !== '' && this.action === 'edit' && (index.h("button-component", { type: "button", disabled: this.isLoading, clickHandler: event => {
284
285
  event.preventDefault();
285
286
  const previewEvent = this.previewButtonClicked.emit(this.host);
286
287
  if (!previewEvent.defaultPrevented) {
287
288
  window.open(utils.parsePreviewLink(this.schedulerPreviewLink, this.selectedConfiguration), '_blank');
288
289
  }
289
- }, variant: 'basic' }, "Preview"))), index.h("div", { key: '88a229d932ab65f90da5fc64f5c09ab8ae4bcae8', class: "buttons" }, index.h("p", { key: '8e2c76b956e7291775dc3515b4fffa7b77e1fe6c', class: {
290
+ }, variant: 'basic' }, "Preview"))), index.h("div", { key: '0869ee9cddd4a4ec51f1197eea202a38391066e9', class: "buttons" }, index.h("p", { key: '934b5c8cbf221385e6b8bfc1124efd71968f240e', class: {
290
291
  'unsaved-changes': this.hasUnsavedChanges && !this.changesSaved,
291
292
  'saved-changes': this.changesSaved,
292
293
  'error': this.error !== '',
293
294
  'error-full-width': this.error !== '' && this.action === 'create',
294
- } }, 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 => {
295
+ } }, this.error !== '' ? this.error : '', this.error == '' && this.hasUnsavedChanges && !this.changesSaved ? 'Unsaved changes' : this.error == '' && this.changesSaved ? 'Changes saved!' : ''), index.h("button-component", { key: 'ed6a26fd73158a4de86d206440c308d88674416e', type: "button", disabled: this.isLoading, clickHandler: event => {
295
296
  event.preventDefault();
296
297
  this.cancelButtonClick.emit();
297
298
  this.error = '';
298
- }, 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')))))));
299
+ }, variant: 'basic' }, "Cancel"), index.h("button-component", { key: '98e6d0890027a9ba67fd13746beb0615e7511519', type: "submit", disabled: this.isLoading }, this.isLoading ? (index.h("span", null, "Saving", index.h("loading-icon", null), ' ')) : this.action == 'create' ? ('Create') : ('Save changes')))))));
299
300
  }
300
301
  get host() { return index.getElement(this); }
301
302
  static get watchers() { return {
@@ -1 +1 @@
1
- {"file":"google-logo-icon.microsoft-logo-icon.nylas-editor-tabs.nylas-list-configurations.entry.cjs.js","mappings":";;;;;;;;;;AAAA,MAAMA,SAAO,GAAG,sCAAsC,CAAC;AACvD,6BAAeA,SAAO;;MCMT,cAAc;;;qBACD,IAAI;sBACH,IAAI;;IAE7B,MAAM;QAEJ,QACEC,kEAAK,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,4BAA4B,IAC7GA,6EAAa,uBAAuB,IAClCA,mEACE,CAAC,EAAC,gKAAgK,EAClK,IAAI,EAAC,SAAS,GACd,EACFA,mEACE,CAAC,EAAC,+LAA+L,EACjM,IAAI,EAAC,SAAS,GACd,EACFA,mEACE,CAAC,EAAC,8OAA8O,EAChP,IAAI,EAAC,SAAS,GACd,EACFA,mEACE,CAAC,EAAC,mLAAmL,EACrL,IAAI,EAAC,SAAS,GACd,CACA,EACJA,qEACEA,uEAAU,EAAE,EAAC,iBAAiB,IAC5BA,mEAAM,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,IAAI,EAAC,OAAO,GAAG,CACnC,CACN,CACH,EACN;KACH;;;;ACxCH,MAAM,OAAO,GAAG,yCAAyC,CAAC;AAC1D,gCAAe,OAAO;;MCMT,iBAAiB;;;qBACJ,IAAI;sBACH,IAAI;;IAE7B,MAAM;QAEJ,QACEA,kEAAK,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,4BAA4B,IAC7GA,mEAAM,CAAC,EAAC,uDAAuD,EAAC,IAAI,EAAC,S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C,KAAK,CAAC,qBAAqB,GAAG,aAAa,CAAC;gBAC3E,SAAS,CAAC,oBAAoB,CAAC,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;aACtD;SACF;QACD,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;qDAsHD;;;;;;;;","names":["iconCss","h","DEFAULT_OPEN_HOURS","mergeDeep","debug","Host","parsePreviewLink","__decorate","RegisterComponent"],"sources":["src/common/icons/icon.css?tag=google-logo-icon&encapsulation=scoped","src/common/icons/google-logo.tsx","src/common/icons/icon.css?tag=microsoft-logo-icon&encapsulation=scoped","src/common/icons/microsoft-logo.tsx","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","src/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.scss?tag=nylas-list-configurations&encapsulation=shadow","src/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.tsx"],"sourcesContent":[":host {\n display: flex;\n}\n","import { Component, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'google-logo-icon',\n styleUrl: 'icon.css',\n scoped: true,\n})\nexport class GoogleLogoIcon {\n @Prop() width: string = '24';\n @Prop() height: string = '24';\n\n render() {\n // Spam icon svg\n return (\n <svg width={this.width} height={this.height} viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g clip-path=\"url(#clip0_959_12452)\">\n <path\n d=\"M23.745 12.27C23.745 11.48 23.675 10.73 23.555 10H12.255V14.51H18.725C18.435 15.99 17.585 17.24 16.325 18.09V21.09H20.185C22.445 19 23.745 15.92 23.745 12.27Z\"\n fill=\"#4285F4\"\n />\n <path\n d=\"M12.255 24C15.495 24 18.205 22.92 20.185 21.09L16.325 18.09C15.245 18.81 13.875 19.25 12.255 19.25C9.12504 19.25 6.47505 17.14 5.52505 14.29H1.54504V17.38C3.51504 21.3 7.56504 24 12.255 24Z\"\n fill=\"#34A853\"\n />\n <path\n d=\"M5.52501 14.2901C5.27501 13.5701 5.145 12.8001 5.145 12.0001C5.145 11.2001 5.28501 10.4301 5.52501 9.71012V6.62012H1.545C0.725004 8.24012 0.255005 10.0601 0.255005 12.0001C0.255005 13.9401 0.725004 15.7601 1.545 17.3801L5.52501 14.2901Z\"\n fill=\"#FBBC05\"\n />\n <path\n d=\"M12.255 4.75C14.025 4.75 15.605 5.36 16.855 6.55L20.275 3.13C18.205 1.19 15.495 0 12.255 0C7.56504 0 3.51504 2.7 1.54504 6.62L5.52505 9.71C6.47505 6.86 9.12504 4.75 12.255 4.75Z\"\n fill=\"#EA4335\"\n />\n </g>\n <defs>\n <clipPath id=\"clip0_959_12452\">\n <rect width={24} height={24} fill=\"white\" />\n </clipPath>\n </defs>\n </svg>\n );\n }\n}\n",":host {\n display: flex;\n}\n","import { Component, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'microsoft-logo-icon',\n styleUrl: 'icon.css',\n scoped: true,\n})\nexport class MicrosoftLogoIcon {\n @Prop() width: string = '22';\n @Prop() height: string = '22';\n\n render() {\n // Spam icon svg\n return (\n <svg width={this.width} height={this.height} viewBox=\"0 0 22 22\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M0.043457 0.043457H10.4782V10.4782H0.043457V0.043457Z\" fill=\"#F35325\" />\n <path d=\"M11.5217 0.043457H21.9565V10.4782H11.5217V0.043457Z\" fill=\"#81BC06\" />\n <path d=\"M0.043457 11.5217H10.4782V21.9565H0.043457V11.5217Z\" fill=\"#05A6F0\" />\n <path d=\"M11.5217 11.5217H21.9565V21.9565H11.5217V11.5217Z\" fill=\"#FFBA08\" />\n </svg>\n );\n }\n}\n","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","@import '../../../common/styles/variables.scss';\n@import '../../../common/mixins/buttons.scss';\n\n:host {\n display: grid;\n grid-auto-flow: row;\n width: 100%;\n font-family: inherit;\n font-optical-sizing: auto;\n @include default-css-variables;\n}\n\n.header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 1rem;\n gap: 1rem;\n @media #{$mobile} {\n flex-direction: column;\n gap: 0.5rem;\n align-items: unset;\n }\n h2 {\n margin: 0;\n font-size: 1.25rem;\n color: var(--nylas-base-900);\n font-weight: 600;\n }\n\n p {\n margin: 0;\n font-size: 1rem;\n color: var(--nylas-base-700);\n }\n\n .actions {\n justify-self: end;\n\n @media #{$mobile} {\n width: 100%;\n }\n }\n}\n\n.configurations {\n border: 1px solid var(--nylas-base-200);\n border-radius: var(--nylas-border-radius-2x);\n background: var(--nylas-base-0);\n height: 100%;\n display: flex;\n overflow-y: auto;\n table {\n width: 100%;\n border-spacing: 0;\n border-collapse: collapse;\n font-family: inherit;\n height: max-content;\n\n &.no-configurations {\n height: 100%;\n }\n\n tr {\n color: var(--nylas-base-800);\n border-bottom: 1px solid var(--nylas-base-200);\n font-family: inherit;\n &:last-of-type {\n border-bottom: 0;\n }\n\n &.hide {\n display: none;\n }\n }\n\n th {\n font-weight: 600;\n text-transform: uppercase;\n &.actions-header {\n text-align: right;\n }\n }\n\n tr.no-configurations {\n td {\n > div {\n display: flex;\n height: 100%;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n\n padding: var(--nylas-border-radius-3x);\n\n h3 {\n margin: 0 0 1rem 0;\n color: var(--nylas-base-700);\n }\n\n p {\n margin: 0 0 1rem 0;\n color: var(--nylas-base-600);\n }\n\n calendar-icon {\n margin-bottom: 1rem;\n color: var(--nylas-base-200);\n }\n }\n }\n }\n\n th,\n td {\n text-align: left;\n padding: 1rem;\n font-family: inherit;\n }\n\n .actions {\n text-align: right;\n }\n\n .actions {\n display: flex;\n justify-content: flex-end;\n gap: 1rem;\n @media #{$mobile} {\n flex-direction: column;\n gap: 0.5rem;\n }\n }\n\n .title {\n display: flex;\n flex-direction: column;\n\n .config-event-title {\n font-weight: 600;\n }\n\n .config-event-description {\n font-size: 0.75rem;\n }\n }\n }\n}\n\n.error-container {\n margin-top: 1.5rem;\n .error {\n color: var(--nylas-error);\n padding: 0.5rem 0;\n margin: 1rem 0 0;\n }\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug, parsePreviewLink } from '@/utils/utils';\nimport { Component, Element, Event, EventEmitter, Host, Method, Prop, State, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { Configuration } from '@nylas/core';\n\n/**\n * The `nylas-list-configurations` component displays a list of scheduling pages.\n */\n@Component({\n tag: 'nylas-list-configurations',\n styleUrl: 'nylas-list-configurations.scss',\n shadow: true,\n})\nexport class NylasListConfigurations {\n /**\n * The host element.\n */\n @Element() host!: HTMLNylasListConfigurationsElement;\n\n /**\n * The list of configurations to display.\n */\n @Prop() configurations: Configuration[] = [];\n\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 /**\n * Event emitted when the component is initialized.\n */\n @Event() initListConfigurations!: EventEmitter<HTMLNylasListConfigurationsElement>;\n\n /**\n * Event emitted when the user clicks the create event button.\n */\n @Event() createButtonClick!: EventEmitter<HTMLNylasListConfigurationsElement>;\n\n /**\n * Event emitted when the user clicks the edit event button.\n */\n @Event() editButtonClick!: EventEmitter<{\n host: HTMLNylasListConfigurationsElement;\n configuration: Configuration;\n }>;\n\n /**\n * Event emitted when the user clicks the delete event button.\n */\n @Event() deleteButtonClick!: EventEmitter<{\n host: HTMLNylasListConfigurationsElement;\n configuration: Configuration;\n }>;\n\n /**\n * The current state of the component.\n */\n @State() private state: 'loading' | 'loaded' | 'error' = 'loading';\n\n /**\n * The error message to display.\n */\n @State() private error: string = '';\n\n connectedCallback() {\n debug('[nylas-list-configurations]', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('[nylas-list-configurations]', 'componentWillLoad');\n\n // If we have configurations, we will set the state to loaded.\n if (this.configurations && this.configurations.length > 0) {\n this.state = 'loaded';\n }\n }\n\n componentDidLoad() {\n debug('[nylas-list-configurations]', 'componentDidLoad');\n\n // Fire the init event. By default, we will fetch the configurations.\n // This is defined in the eventToProps object in the RegisterComponent decorator.\n this.initListConfigurations.emit(this.host);\n }\n\n disconnectedCallback() {\n debug('[nylas-list-configurations]', 'disconnectedCallback');\n }\n\n @Method()\n async getState() {\n return this.state;\n }\n\n @Method()\n async setState(state: 'loading' | 'loaded' | 'error') {\n this.state = state;\n }\n\n @Method()\n async setError(error: string) {\n this.error = error;\n }\n\n @RegisterComponent<NylasListConfigurations, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-list-configurations',\n stateToProps: new Map([['schedulerConfig.configurations', 'configurations']]),\n localPropsToProp: new Map([['schedulerPreviewLink', 'schedulerPreviewLink']]),\n eventToProps: {\n initListConfigurations: async (event, connector) => {\n const host = event.detail;\n await host.setState('loading');\n const [data, error] = await connector.schedulerConfig.getConfigurations();\n if (!data && error && error.message) {\n await host.setState('error');\n await host.setError(error.message);\n return;\n }\n await host.setState('loaded');\n },\n createButtonClick: async (_, connector) => {\n connector.schedulerConfigStore.resetSelectedConfiguration();\n connector.schedulerConfigStore.state.action = 'create';\n },\n deleteButtonClick: async (event, connector) => {\n const { host, configuration } = event.detail;\n const [data, error] = await connector.schedulerConfig.deleteConfiguration(configuration.id);\n if (!data && error && error.message) {\n await host.setState('error');\n await host.setError(error.message);\n }\n },\n editButtonClick: async (event, connector) => {\n const { configuration } = event.detail;\n connector.schedulerConfigStore.state.selectedConfiguration = configuration;\n connector.schedulerConfigStore.state.action = 'edit';\n },\n },\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <div class=\"header\">\n <div class=\"description\">\n <h2>All scheduling pages</h2>\n <p>Create, edit and manage all your scheduling pages.</p>\n </div>\n {this.configurations && this.configurations.length > 0 && (\n <div class=\"actions\">\n <button-component\n clickHandler={() => {\n this.createButtonClick.emit(this.host);\n }}\n >\n Create new\n </button-component>\n </div>\n )}\n </div>\n <div class=\"configurations\">\n <table\n class={{\n 'no-configurations': this.state !== 'loading' && (!this.configurations || this.configurations.length === 0),\n }}\n >\n <tr\n class={{\n hide: this.state === 'loading' || (this.configurations && this.configurations.length === 0),\n }}\n >\n <th>Scheduling page event title</th>\n <th>Duration</th>\n <th class=\"actions-header\">Actions</th>\n </tr>\n {this.state === 'loading' && (\n <tr class=\"no-configurations\">\n <td colSpan={3}>\n <div>\n <h3>Loading...</h3>\n <p>Please wait while we fetch the scheduling pages</p>\n </div>\n </td>\n </tr>\n )}\n {this.state !== 'loading' && (!this.configurations || this.configurations.length === 0) && (\n <tr class=\"no-configurations\">\n <td colSpan={3}>\n <div>\n <calendar-icon width=\"48\" height=\"48\"></calendar-icon>\n <h3>No scheduling pages found</h3>\n <p>Get started with creating your first scheduling page</p>\n <button-component\n clickHandler={() => {\n this.createButtonClick.emit(this.host);\n }}\n >\n Create new\n </button-component>\n </div>\n </td>\n </tr>\n )}\n {this.state !== 'loading' &&\n this.configurations.map(config => (\n <tr key={config.id}>\n <td>\n <div class=\"title\">\n <span class={'config-event-title'}>{config.event_booking.title}</span>\n <span class={'config-event-description'}>{config.event_booking.description}</span>\n </div>\n </td>\n <td>\n <div>{config.availability.duration_minutes} mins</div>\n </td>\n <td>\n <div class=\"actions\">\n <button-component\n variant={'basic'}\n clickHandler={event => {\n event.preventDefault();\n window.open(parsePreviewLink(this.schedulerPreviewLink, config), '_blank');\n }}\n >\n Preview\n </button-component>\n <button-component\n variant={'basic'}\n clickHandler={event => {\n event.preventDefault();\n this.editButtonClick.emit({ host: this.host, configuration: config });\n }}\n >\n Edit\n </button-component>\n <button-component\n variant={'basic'}\n clickHandler={event => {\n event.preventDefault();\n this.deleteButtonClick.emit({ host: this.host, configuration: config });\n }}\n >\n Delete\n </button-component>\n </div>\n </td>\n </tr>\n ))}\n </table>\n </div>\n {this.state === 'error' && (\n <div class=\"error-container\">\n <p class={'error'}>{this.error}</p>\n </div>\n )}\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"google-logo-icon.microsoft-logo-icon.nylas-editor-tabs.nylas-list-configurations.entry.cjs.js","mappings":";;;;;;;;;;AAAA,MAAMA,SAAO,GAAG,sCAAsC,CAAC;AACvD,6BAAeA,SAAO;;MCMT,cAAc;;;qBACD,IAAI;sBACH,IAAI;;IAE7B,MAAM;QAEJ,QACEC,kEAAK,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,M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AC,CAAC;oBAC7B,MAAM,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;oBACnC,OAAO;iBACR;gBACD,MAAM,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;aAC/B;YACD,iBAAiB,EAAE,OAAO,CAAC,EAAE,SAAS;gBACpC,SAAS,CAAC,oBAAoB,CAAC,0BAA0B,EAAE,CAAC;gBAC5D,SAAS,CAAC,oBAAoB,CAAC,KAAK,CAAC,MAAM,GAAG,QAAQ,CAAC;aACxD;YACD,iBAAiB,EAAE,OAAO,KAAK,EAAE,SAAS;gBACxC,MAAM,EAAE,IAAI,EAAE,aAAa,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC;gBAC7C,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,MAAM,SAAS,CAAC,eAAe,CAAC,mBAAmB,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;gBAC5F,IAAI,CAAC,IAAI,IAAI,KAAK,IAAI,KAAK,CAAC,OAAO,EAAE;oBACnC,MAAM,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;oBAC7B,MAAM,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;iBACpC;aACF;YACD,eAAe,EAAE,OAAO,KAAK,EAAE,SAAS;gBACtC,MAAM,EAAE,aAAa,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC;gBACvC,SAAS,CAAC,oBAAoB,CAAC,KAAK,CAAC,qBAAqB,GAAG,aAAa,CAAC;gBAC3E,SAAS,CAAC,oBAAoB,CAAC,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;aACtD;SACF;QACD,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;qDAsHD;;;;;;;;","names":["iconCss","h","DEFAULT_OPEN_HOURS","mergeDeep","debug","Host","parsePreviewLink","__decorate","RegisterComponent"],"sources":["src/common/icons/icon.css?tag=google-logo-icon&encapsulation=scoped","src/common/icons/google-logo.tsx","src/common/icons/icon.css?tag=microsoft-logo-icon&encapsulation=scoped","src/common/icons/microsoft-logo.tsx","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","src/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.scss?tag=nylas-list-configurations&encapsulation=shadow","src/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.tsx"],"sourcesContent":[":host {\n display: flex;\n}\n","import { Component, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'google-logo-icon',\n styleUrl: 'icon.css',\n scoped: true,\n})\nexport class GoogleLogoIcon {\n @Prop() width: string = '24';\n @Prop() height: string = '24';\n\n render() {\n // Spam icon svg\n return (\n <svg width={this.width} height={this.height} viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g clip-path=\"url(#clip0_959_12452)\">\n <path\n d=\"M23.745 12.27C23.745 11.48 23.675 10.73 23.555 10H12.255V14.51H18.725C18.435 15.99 17.585 17.24 16.325 18.09V21.09H20.185C22.445 19 23.745 15.92 23.745 12.27Z\"\n fill=\"#4285F4\"\n />\n <path\n d=\"M12.255 24C15.495 24 18.205 22.92 20.185 21.09L16.325 18.09C15.245 18.81 13.875 19.25 12.255 19.25C9.12504 19.25 6.47505 17.14 5.52505 14.29H1.54504V17.38C3.51504 21.3 7.56504 24 12.255 24Z\"\n fill=\"#34A853\"\n />\n <path\n d=\"M5.52501 14.2901C5.27501 13.5701 5.145 12.8001 5.145 12.0001C5.145 11.2001 5.28501 10.4301 5.52501 9.71012V6.62012H1.545C0.725004 8.24012 0.255005 10.0601 0.255005 12.0001C0.255005 13.9401 0.725004 15.7601 1.545 17.3801L5.52501 14.2901Z\"\n fill=\"#FBBC05\"\n />\n <path\n d=\"M12.255 4.75C14.025 4.75 15.605 5.36 16.855 6.55L20.275 3.13C18.205 1.19 15.495 0 12.255 0C7.56504 0 3.51504 2.7 1.54504 6.62L5.52505 9.71C6.47505 6.86 9.12504 4.75 12.255 4.75Z\"\n fill=\"#EA4335\"\n />\n </g>\n <defs>\n <clipPath id=\"clip0_959_12452\">\n <rect width={24} height={24} fill=\"white\" />\n </clipPath>\n </defs>\n </svg>\n );\n }\n}\n",":host {\n display: flex;\n}\n","import { Component, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'microsoft-logo-icon',\n styleUrl: 'icon.css',\n scoped: true,\n})\nexport class MicrosoftLogoIcon {\n @Prop() width: string = '22';\n @Prop() height: string = '22';\n\n render() {\n // Spam icon svg\n return (\n <svg width={this.width} height={this.height} viewBox=\"0 0 22 22\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M0.043457 0.043457H10.4782V10.4782H0.043457V0.043457Z\" fill=\"#F35325\" />\n <path d=\"M11.5217 0.043457H21.9565V10.4782H11.5217V0.043457Z\" fill=\"#81BC06\" />\n <path d=\"M0.043457 11.5217H10.4782V21.9565H0.043457V11.5217Z\" fill=\"#05A6F0\" />\n <path d=\"M11.5217 11.5217H21.9565V21.9565H11.5217V11.5217Z\" fill=\"#FFBA08\" />\n </svg>\n );\n }\n}\n","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 logged in user.\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 interval_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","@import '../../../common/styles/variables.scss';\n@import '../../../common/mixins/buttons.scss';\n\n:host {\n display: grid;\n grid-auto-flow: row;\n width: 100%;\n font-family: inherit;\n font-optical-sizing: auto;\n @include default-css-variables;\n}\n\n.header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 1rem;\n gap: 1rem;\n @media #{$mobile} {\n flex-direction: column;\n gap: 0.5rem;\n align-items: unset;\n }\n h2 {\n margin: 0;\n font-size: 1.25rem;\n color: var(--nylas-base-900);\n font-weight: 600;\n }\n\n p {\n margin: 0;\n font-size: 1rem;\n color: var(--nylas-base-700);\n }\n\n .actions {\n justify-self: end;\n\n @media #{$mobile} {\n width: 100%;\n }\n }\n}\n\n.configurations {\n border: 1px solid var(--nylas-base-200);\n border-radius: var(--nylas-border-radius-2x);\n background: var(--nylas-base-0);\n height: 100%;\n display: flex;\n overflow-y: auto;\n table {\n width: 100%;\n border-spacing: 0;\n border-collapse: collapse;\n font-family: inherit;\n height: max-content;\n\n &.no-configurations {\n height: 100%;\n }\n\n tr {\n color: var(--nylas-base-800);\n border-bottom: 1px solid var(--nylas-base-200);\n font-family: inherit;\n &:last-of-type {\n border-bottom: 0;\n }\n\n &.hide {\n display: none;\n }\n }\n\n th {\n font-weight: 600;\n text-transform: uppercase;\n &.actions-header {\n text-align: right;\n }\n }\n\n tr.no-configurations {\n td {\n > div {\n display: flex;\n height: 100%;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n\n padding: var(--nylas-border-radius-3x);\n\n h3 {\n margin: 0 0 1rem 0;\n color: var(--nylas-base-700);\n }\n\n p {\n margin: 0 0 1rem 0;\n color: var(--nylas-base-600);\n }\n\n calendar-icon {\n margin-bottom: 1rem;\n color: var(--nylas-base-200);\n }\n }\n }\n }\n\n th,\n td {\n text-align: left;\n padding: 1rem;\n font-family: inherit;\n }\n\n .actions {\n text-align: right;\n }\n\n .actions {\n display: flex;\n justify-content: flex-end;\n gap: 1rem;\n @media #{$mobile} {\n flex-direction: column;\n gap: 0.5rem;\n }\n }\n\n .title {\n display: flex;\n flex-direction: column;\n\n .config-event-title {\n font-weight: 600;\n }\n\n .config-event-description {\n font-size: 0.75rem;\n }\n }\n }\n}\n\n.error-container {\n margin-top: 1.5rem;\n .error {\n color: var(--nylas-error);\n padding: 0.5rem 0;\n margin: 1rem 0 0;\n }\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug, parsePreviewLink } from '@/utils/utils';\nimport { Component, Element, Event, EventEmitter, Host, Method, Prop, State, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { Configuration } from '@nylas/core';\n\n/**\n * The `nylas-list-configurations` component displays a list of scheduling pages.\n */\n@Component({\n tag: 'nylas-list-configurations',\n styleUrl: 'nylas-list-configurations.scss',\n shadow: true,\n})\nexport class NylasListConfigurations {\n /**\n * The host element.\n */\n @Element() host!: HTMLNylasListConfigurationsElement;\n\n /**\n * The list of configurations to display.\n */\n @Prop() configurations: Configuration[] = [];\n\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 /**\n * Event emitted when the component is initialized.\n */\n @Event() initListConfigurations!: EventEmitter<HTMLNylasListConfigurationsElement>;\n\n /**\n * Event emitted when the user clicks the create event button.\n */\n @Event() createButtonClick!: EventEmitter<HTMLNylasListConfigurationsElement>;\n\n /**\n * Event emitted when the user clicks the edit event button.\n */\n @Event() editButtonClick!: EventEmitter<{\n host: HTMLNylasListConfigurationsElement;\n configuration: Configuration;\n }>;\n\n /**\n * Event emitted when the user clicks the delete event button.\n */\n @Event() deleteButtonClick!: EventEmitter<{\n host: HTMLNylasListConfigurationsElement;\n configuration: Configuration;\n }>;\n\n /**\n * The current state of the component.\n */\n @State() private state: 'loading' | 'loaded' | 'error' = 'loading';\n\n /**\n * The error message to display.\n */\n @State() private error: string = '';\n\n connectedCallback() {\n debug('[nylas-list-configurations]', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('[nylas-list-configurations]', 'componentWillLoad');\n\n // If we have configurations, we will set the state to loaded.\n if (this.configurations && this.configurations.length > 0) {\n this.state = 'loaded';\n }\n }\n\n componentDidLoad() {\n debug('[nylas-list-configurations]', 'componentDidLoad');\n\n // Fire the init event. By default, we will fetch the configurations.\n // This is defined in the eventToProps object in the RegisterComponent decorator.\n this.initListConfigurations.emit(this.host);\n }\n\n disconnectedCallback() {\n debug('[nylas-list-configurations]', 'disconnectedCallback');\n }\n\n @Method()\n async getState() {\n return this.state;\n }\n\n @Method()\n async setState(state: 'loading' | 'loaded' | 'error') {\n this.state = state;\n }\n\n @Method()\n async setError(error: string) {\n this.error = error;\n }\n\n @RegisterComponent<NylasListConfigurations, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-list-configurations',\n stateToProps: new Map([['schedulerConfig.configurations', 'configurations']]),\n localPropsToProp: new Map([['schedulerPreviewLink', 'schedulerPreviewLink']]),\n eventToProps: {\n initListConfigurations: async (event, connector) => {\n const host = event.detail;\n await host.setState('loading');\n const [data, error] = await connector.schedulerConfig.getConfigurations();\n if (!data && error && error.message) {\n await host.setState('error');\n await host.setError(error.message);\n return;\n }\n await host.setState('loaded');\n },\n createButtonClick: async (_, connector) => {\n connector.schedulerConfigStore.resetSelectedConfiguration();\n connector.schedulerConfigStore.state.action = 'create';\n },\n deleteButtonClick: async (event, connector) => {\n const { host, configuration } = event.detail;\n const [data, error] = await connector.schedulerConfig.deleteConfiguration(configuration.id);\n if (!data && error && error.message) {\n await host.setState('error');\n await host.setError(error.message);\n }\n },\n editButtonClick: async (event, connector) => {\n const { configuration } = event.detail;\n connector.schedulerConfigStore.state.selectedConfiguration = configuration;\n connector.schedulerConfigStore.state.action = 'edit';\n },\n },\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <div class=\"header\">\n <div class=\"description\">\n <h2>All scheduling pages</h2>\n <p>Create, edit and manage all your scheduling pages.</p>\n </div>\n {this.configurations && this.configurations.length > 0 && (\n <div class=\"actions\">\n <button-component\n clickHandler={() => {\n this.createButtonClick.emit(this.host);\n }}\n >\n Create new\n </button-component>\n </div>\n )}\n </div>\n <div class=\"configurations\">\n <table\n class={{\n 'no-configurations': this.state !== 'loading' && (!this.configurations || this.configurations.length === 0),\n }}\n >\n <tr\n class={{\n hide: this.state === 'loading' || (this.configurations && this.configurations.length === 0),\n }}\n >\n <th>Scheduling page event title</th>\n <th>Duration</th>\n <th class=\"actions-header\">Actions</th>\n </tr>\n {this.state === 'loading' && (\n <tr class=\"no-configurations\">\n <td colSpan={3}>\n <div>\n <h3>Loading...</h3>\n <p>Please wait while we fetch the scheduling pages</p>\n </div>\n </td>\n </tr>\n )}\n {this.state !== 'loading' && (!this.configurations || this.configurations.length === 0) && (\n <tr class=\"no-configurations\">\n <td colSpan={3}>\n <div>\n <calendar-icon width=\"48\" height=\"48\"></calendar-icon>\n <h3>No scheduling pages found</h3>\n <p>Get started with creating your first scheduling page</p>\n <button-component\n clickHandler={() => {\n this.createButtonClick.emit(this.host);\n }}\n >\n Create new\n </button-component>\n </div>\n </td>\n </tr>\n )}\n {this.state !== 'loading' &&\n this.configurations.map(config => (\n <tr key={config.id}>\n <td>\n <div class=\"title\">\n <span class={'config-event-title'}>{config.event_booking.title}</span>\n <span class={'config-event-description'}>{config.event_booking.description}</span>\n </div>\n </td>\n <td>\n <div>{config.availability.duration_minutes} mins</div>\n </td>\n <td>\n <div class=\"actions\">\n <button-component\n variant={'basic'}\n clickHandler={event => {\n event.preventDefault();\n window.open(parsePreviewLink(this.schedulerPreviewLink, config), '_blank');\n }}\n >\n Preview\n </button-component>\n <button-component\n variant={'basic'}\n clickHandler={event => {\n event.preventDefault();\n this.editButtonClick.emit({ host: this.host, configuration: config });\n }}\n >\n Edit\n </button-component>\n <button-component\n variant={'basic'}\n clickHandler={event => {\n event.preventDefault();\n this.deleteButtonClick.emit({ host: this.host, configuration: config });\n }}\n >\n Delete\n </button-component>\n </div>\n </td>\n </tr>\n ))}\n </table>\n </div>\n {this.state === 'error' && (\n <div class=\"error-container\">\n <p class={'error'}>{this.error}</p>\n </div>\n )}\n </Host>\n );\n }\n}\n"],"version":3}
@@ -8,7 +8,7 @@ const appGlobals = require('./app-globals-d2db9725.js');
8
8
  const defineCustomElements = (win, options) => {
9
9
  if (typeof window === 'undefined') return undefined;
10
10
  appGlobals.globalScripts();
11
- return index.bootstrapLazy(JSON.parse("[[\"nylas-scheduler-editor.cjs\",[[1,\"nylas-scheduler-editor\",{\"defaultRequiresSessionAuth\":[4,\"default-requires-session-auth\"],\"configurationId\":[1025,\"configuration-id\"],\"nylasApiRequest\":[1040],\"nylasSessionsConfig\":[16],\"defaultAuthArgs\":[16],\"eventOverrides\":[16],\"schedulerPreviewLink\":[1,\"scheduler-preview-link\"],\"defaultSchedulerConfigState\":[16],\"mode\":[1],\"automaticComponentRegistration\":[32],\"store\":[64],\"schedulerConnector\":[64]},[[0,\"registerComponent\",\"registerComponentHandler\"],[0,\"unregisterComponent\",\"unregisterComponentHandler\"]],{\"configurationId\":[\"configurationIdChanged\"]}]]],[\"nylas-scheduling.cjs\",[[1,\"nylas-scheduling\",{\"mode\":[1],\"defaultSchedulerState\":[16],\"sessionId\":[1,\"session-id\"],\"schedulerApiUrl\":[1,\"scheduler-api-url\"],\"bookingInfo\":[16],\"rescheduleBookingId\":[1,\"reschedule-booking-id\"],\"cancelBookingId\":[1,\"cancel-booking-id\"],\"configurationId\":[1,\"configuration-id\"],\"nylasBranding\":[4,\"nylas-branding\"],\"eventOverrides\":[16],\"isLoading\":[4,\"is-loading\"],\"themeConfig\":[16],\"showNotification\":[4,\"show-notification\"],\"automaticComponentRegistration\":[32],\"selectedDateLabel\":[32],\"getNylasSchedulerStore\":[64],\"getNylasSchedulerConnector\":[64],\"getRef\":[64]},[[0,\"registerComponent\",\"registerComponentHandler\"],[0,\"unregisterComponent\",\"unregisterComponentHandler\"],[0,\"monthChanged\",\"monthChangedHandler\"],[0,\"detailsConfirmed\",\"bookButtonClickedHandler\"],[0,\"dateSelected\",\"dateSelectedHandler\"],[0,\"cancelBookedEventError\",\"cancelBookedEventErrorHandler\"],[0,\"cancelBookedEventValidationError\",\"cancelBookedEventValidationErrorHandler\"],[0,\"rescheduleBookedEventError\",\"rescheduleBookedEventErrorHandler\"]],{\"bookingInfo\":[\"bookingInfoChanged\"]}]]],[\"nylas-view-thread.cjs\",[[1,\"nylas-view-thread\",{\"draft\":[16],\"thread\":[16],\"messages\":[16],\"attachments\":[16],\"state\":[32],\"internalMessages\":[32],\"showAllEmails\":[32],\"showComposer\":[32]},null,{\"thread\":[\"threadChanged\"],\"messages\":[\"updateInternalMessages\"]}]]],[\"nylas-list-folders.cjs\",[[1,\"nylas-list-folders\",{\"folders\":[16],\"selectedFolder\":[1,\"selected-folder\"],\"defaultFolders\":[32],\"otherFolders\":[32]},null,{\"folders\":[\"watchFolders\"]}]]],[\"nylas-custom-booking-flow.cjs\",[[65,\"nylas-custom-booking-flow\",{\"selectedConfiguration\":[16],\"name\":[1],\"bookingType\":[1,\"booking-type\"],\"selectedBookingType\":[32]},[[0,\"selectedOptionChanged\",\"selectedOptionChangedHandler\"]],{\"name\":[\"elementNameChangedHandler\"],\"selectedConfiguration\":[\"selectedConfigurationChangedHandler\"]}]]],[\"nylas-additional-participants.cjs\",[[65,\"nylas-additional-participants\",{\"name\":[1],\"eventParticipants\":[16],\"participants\":[32],\"participantsValid\":[32]},null,{\"name\":[\"elementNameChangedHandler\"]}]]],[\"nylas-mailbox-pagination.cjs\",[[1,\"nylas-mailbox-pagination\",{\"state\":[1],\"hasNextPage\":[4,\"has-next-page\"],\"hasPreviousPage\":[4,\"has-previous-page\"],\"scrollTarget\":[1,\"scroll-target\"],\"mobileOnlyInfiniteScroll\":[4,\"mobile-only-infinite-scroll\"],\"mobileViewPortWidth\":[2,\"mobile-view-port-width\"],\"nextPage\":[64],\"previousPage\":[64]},[[9,\"scroll\",\"handlePageScroll\"]]]]],[\"nylas-threads-refresh.cjs\",[[1,\"nylas-threads-refresh\",{\"start\":[32],\"state\":[32],\"pulling\":[32],\"updateState\":[64]}]]],[\"document-refresh-icon.cjs\",[[2,\"document-refresh-icon\",{\"width\":[1],\"height\":[1]}]]],[\"nylas-if-state.cjs\",[[1,\"nylas-if-state\",{\"state\":[1],\"isStateSet\":[4,\"is-state-set\"],\"isBoolean\":[4,\"is-boolean\"],\"getStore\":[16],\"transition\":[1],\"show\":[32],\"classes\":[32]},null,{\"getStore\":[\"onGetStoreChange\"]}]]],[\"nylas-list-threads.cjs\",[[1,\"nylas-list-threads\",{\"threads\":[16],\"isAuthenticated\":[4,\"is-authenticated\"],\"tokenInfo\":[16],\"state\":[1],\"showCheckbox\":[4,\"show-checkbox\"]}]]],[\"nylas-login.cjs\",[[1,\"nylas-login\",{\"isAuthenticated\":[4,\"is-authenticated\"],\"nylasConnector\":[16],\"scopes\":[16],\"loginMethod\":[1,\"login-method\"],\"companyName\":[1,\"company-name\"],\"logoUrl\":[1,\"logo-url\"],\"logoWidth\":[1,\"logo-width\"],\"providers\":[1],\"buttonText\":[1,\"button-text\"],\"email\":[32]}]]],[\"nylas-mailbox.cjs\",[[1,\"nylas-mailbox\",{\"automaticComponentRegistration\":[4,\"automatic-component-registration\"],\"eventOverrides\":[16],\"authConfig\":[16],\"defaultAuthStoreState\":[16],\"defaultMailboxStoreState\":[16],\"getMailboxStore\":[64],\"getAuthStore\":[64],\"getNylasAuth\":[64],\"getNylasMailboxConnector\":[64]},[[0,\"registerComponent\",\"registerComponentHandler\"],[0,\"unregisterComponent\",\"unregisterComponentHandler\"]]]]],[\"nylas-mailbox-toolbar-button.cjs\",[[1,\"nylas-mailbox-toolbar-button\",{\"method\":[1],\"dataState\":[1,\"data-state\"],\"iconOnly\":[4,\"icon-only\"],\"mailboxConnector\":[16]}]]],[\"nylas-provider.cjs\",[[1,\"nylas-provider\",{\"authConfig\":[16],\"eventOverrides\":[16],\"automaticComponentRegistration\":[4,\"automatic-component-registration\"],\"getNylasAuth\":[64],\"getNylasConnector\":[64],\"getMailboxStore\":[64],\"getAuthStore\":[64],\"getNylasSchedulerStore\":[64],\"getNylasSchedulerConfigStore\":[64]},[[0,\"registerComponent\",\"registerComponentHandler\"],[0,\"unregisterComponent\",\"unregisterComponentHandler\"]]]]],[\"nylas-threads-search.cjs\",[[1,\"nylas-threads-search\",{\"query\":[1],\"internalQuery\":[32]},null,{\"query\":[\"onQueryChange\"]}]]],[\"people-icon.cjs\",[[2,\"people-icon\",{\"width\":[1],\"height\":[1]}]]],[\"nylas-editor-tabs.cjs\",[[6,\"nylas-editor-tabs\",{\"calendars\":[16],\"selectedConfiguration\":[16],\"defaultRequiresSessionAuth\":[4,\"default-requires-session-auth\"],\"currentUser\":[16],\"schedulerPreviewLink\":[1,\"scheduler-preview-link\"],\"mode\":[1],\"action\":[32],\"activeTab\":[32],\"isLoading\":[32],\"hasUnsavedChanges\":[32],\"changesSaved\":[32],\"formState\":[32],\"error\":[32]},[[0,\"valueChanged\",\"handleValueChanged\"]],{\"selectedConfiguration\":[\"configChangedHandler\"]}]]],[\"nylas-locale-switch.cjs\",[[1,\"nylas-locale-switch\",{\"selectedTimezone\":[1025,\"selected-timezone\"],\"selectedLanguage\":[1025,\"selected-language\"]},[[0,\"selectedOptionChanged\",\"selectedOptionChangedHandler\"]]]]],[\"nylas-booked-event-card.cjs\",[[1,\"nylas-booked-event-card\",{\"eventInfo\":[16],\"rescheduleBookingId\":[1,\"reschedule-booking-id\"],\"bookingInfo\":[8,\"booking-info\"],\"selectedTimezone\":[1,\"selected-timezone\"],\"selectedTimeslot\":[16],\"configSettings\":[8,\"config-settings\"]}]]],[\"nylas-composer.cjs\",[[1,\"nylas-composer\",{\"message\":[16],\"viewEmailElement\":[16]},null,{\"message\":[\"watchBody\"]}]]],[\"nylas-summarize-message-button.cjs\",[[1,\"nylas-summarize-message-button\",{\"message\":[16],\"state\":[32],\"updateState\":[64],\"playAudio\":[64]}]]],[\"nylas-list-configurations.cjs\",[[1,\"nylas-list-configurations\",{\"configurations\":[16],\"schedulerPreviewLink\":[1,\"scheduler-preview-link\"],\"state\":[32],\"error\":[32],\"getState\":[64],\"setState\":[64],\"setError\":[64]}]]],[\"nylas-notification.cjs\",[[1,\"nylas-notification\",{\"ttl\":[8],\"allowedCategories\":[16],\"notifications\":[32]},[[16,\"nylasSchedulerError\",\"onError\"],[16,\"nylasSchedulerWarning\",\"onWarning\"],[16,\"nylasSchedulerInfo\",\"onInfo\"],[16,\"nylasSchedulerSuccess\",\"onSuccess\"]]]]],[\"nylas-selected-event-card.cjs\",[[1,\"nylas-selected-event-card\",{\"selectedDate\":[16],\"selectedTimeslot\":[16],\"selectedTimezone\":[1,\"selected-timezone\"],\"startTime\":[32],\"endTime\":[32]},null,{\"selectedTimeslot\":[\"handleSelectedTimeslotChange\"]}]]],[\"nylas-booking-form.cjs\",[[1,\"nylas-booking-form\",{\"isLoading\":[4,\"is-loading\"],\"bookingInfo\":[8,\"booking-info\"],\"eventInfo\":[16],\"name\":[32],\"email\":[32],\"guestEmails\":[32],\"guestEmailErrors\":[32],\"isNameValid\":[32],\"isEmailValid\":[32],\"validationError\":[32]},null,{\"bookingInfo\":[\"bookingInfoChangedHandler\"]}]]],[\"nylas-cancel-booking-form.cjs\",[[1,\"nylas-cancel-booking-form\",{\"cancelBookingId\":[1,\"cancel-booking-id\"],\"cancellationReason\":[32],\"cancellationError\":[32]}]]],[\"nylas-cancelled-event-card.cjs\",[[1,\"nylas-cancelled-event-card\",{\"cancelledEventInfo\":[16],\"configSettings\":[16],\"isClosing\":[32]}]]],[\"nylas-date-picker.cjs\",[[1,\"nylas-date-picker\",{\"selectableDates\":[16],\"selectedDate\":[16],\"configSettings\":[16],\"isLoading\":[4,\"is-loading\"],\"month\":[32],\"dates\":[32],\"disableNextMonthButton\":[32]}]]],[\"archive-icon.cjs\",[[2,\"archive-icon\",{\"width\":[1],\"height\":[1]}]]],[\"arrow-icon.cjs\",[[2,\"arrow-icon\",{\"width\":[1],\"height\":[1]}]]],[\"folder-icon.cjs\",[[2,\"folder-icon\",{\"width\":[1],\"height\":[1]}]]],[\"forward-icon.cjs\",[[2,\"forward-icon\",{\"width\":[1],\"height\":[1]}]]],[\"google-logo-icon.cjs\",[[2,\"google-logo-icon\",{\"width\":[1],\"height\":[1]}]]],[\"inbox-icon.cjs\",[[2,\"inbox-icon\",{\"width\":[1],\"height\":[1]}]]],[\"microsoft-logo-icon.cjs\",[[2,\"microsoft-logo-icon\",{\"width\":[1],\"height\":[1]}]]],[\"nylas-logo.cjs\",[[2,\"nylas-logo\",{\"width\":[1],\"height\":[1]}]]],[\"nylas-timeslot-picker.cjs\",[[1,\"nylas-timeslot-picker\",{\"selectedDate\":[16],\"availability\":[16],\"selectedTimeslot\":[16],\"isLoading\":[4,\"loading-state\"],\"selectedTimezone\":[1,\"selected-timezone\"],\"times\":[32],\"hoveredTimeslotIndex\":[32],\"selectedTimeslotIndex\":[32]},null,{\"selectedDate\":[\"selectedDateChanged\"],\"availability\":[\"availabilityChanged\"]}]]],[\"nylas-view-email.cjs\",[[1,\"nylas-view-email\",{\"message\":[16],\"parent\":[16],\"attachments\":[16],\"detectDarkMode\":[4,\"detect-dark-mode\"],\"state\":[32],\"sanitizedBody\":[32],\"styles\":[32],\"viewEmailElement\":[32],\"hoistedFontURLs\":[32]},[[9,\"resize\",\"handleScroll\"]],{\"message\":[\"messageChanged\"],\"viewEmailElement\":[\"viewEmailElementChanged\"]}]]],[\"reply-all-icon.cjs\",[[2,\"reply-all-icon\",{\"width\":[1],\"height\":[1]}]]],[\"reply-icon.cjs\",[[2,\"reply-icon\",{\"width\":[1],\"height\":[1]}]]],[\"sent-icon.cjs\",[[2,\"sent-icon\",{\"width\":[1],\"height\":[1]}]]],[\"spam-icon.cjs\",[[2,\"spam-icon\",{\"width\":[1],\"height\":[1]}]]],[\"star-icon.cjs\",[[2,\"star-icon\",{\"width\":[1],\"height\":[1]}]]],[\"trash-icon.cjs\",[[2,\"trash-icon\",{\"width\":[1],\"height\":[1]}]]],[\"nylas-availability-picker.cjs\",[[65,\"nylas-availability-picker\",{\"selectedConfiguration\":[16],\"openHours\":[16],\"name\":[1],\"defaultTimezone\":[1,\"default-timezone\"],\"schedule\":[32],\"timezone\":[32],\"overlapDays\":[32]},[[0,\"selectedOptionChanged\",\"selectedOptionChangedHandler\"]],{\"name\":[\"elementNameChangedHandler\"],\"selectedConfiguration\":[\"configChangedHandler\"],\"schedule\":[\"scheduleChanged\"]}]]],[\"nylas-location-component.cjs\",[[65,\"nylas-location-component\",{\"selectedConfiguration\":[16],\"eventLocation\":[1,\"event-location\"],\"name\":[1],\"location\":[32],\"selectedLocationOption\":[32]},[[0,\"selectedOptionChanged\",\"selectedOptionChangedHandler\"]],{\"name\":[\"elementNameChangedHandler\"],\"selectedConfiguration\":[\"selectedConfigurationChangedHandler\"],\"eventLocation\":[\"eventLocationChangedHandler\"]}]]],[\"nylas-limit-future-bookings.cjs\",[[65,\"nylas-limit-future-bookings\",{\"selectedConfiguration\":[16],\"availableDaysInFuture\":[2,\"available-days-in-future\"],\"name\":[1],\"selectedNumber\":[32],\"selectedPeriod\":[32]},[[0,\"timePeriodChanged\",\"timePeriodChangedHandler\"]],{\"name\":[\"elementNameChangedHandler\"],\"selectedConfiguration\":[\"selectedConfigurationChangedHandler\"],\"availableDaysInFuture\":[\"availableDaysInFutureChanged\"]}]]],[\"nylas-min-cancellation-notice.cjs\",[[65,\"nylas-min-cancellation-notice\",{\"selectedConfiguration\":[16],\"minCancellationNotice\":[2,\"min-cancellation-notice\"],\"name\":[1],\"selectedNumber\":[32],\"selectedPeriod\":[32]},[[0,\"timePeriodChanged\",\"timePeriodChangedHandler\"]],{\"name\":[\"elementNameChangedHandler\"],\"selectedConfiguration\":[\"selectedConfigurationChangedHandler\"],\"availableDaysInFuture\":[\"availableDaysInFutureChanged\"]}]]],[\"nylas-booking-calendar-picker.cjs\",[[65,\"nylas-booking-calendar-picker\",{\"calendars\":[16],\"currentUser\":[16],\"name\":[1],\"defaultBookingCalendar\":[1,\"default-booking-calendar\"],\"selectedCalendar\":[32]},[[0,\"selectedOptionChanged\",\"selectedOptionChangedHandler\"]],{\"name\":[\"elementNameChangedHandler\"]}]]],[\"nylas-calendar-picker.cjs\",[[65,\"nylas-calendar-picker\",{\"calendars\":[16],\"currentUser\":[16],\"name\":[1],\"defaultSelectedCalendars\":[16],\"selectedCalendars\":[32]},[[0,\"selectedOptionsChanged\",\"selectedOptionsChangedHandler\"]],{\"name\":[\"elementNameChangedHandler\"]}]]],[\"nylas-event-duration.cjs\",[[65,\"nylas-event-duration\",{\"selectedConfiguration\":[16],\"name\":[1],\"eventDurationMinutes\":[2,\"event-duration-minutes\"],\"duration\":[32],\"durationMinutes\":[32],\"durationIncrement\":[32]},[[0,\"selectedOptionChanged\",\"selectedOptionChangedHandler\"]],{\"name\":[\"elementNameChangedHandler\"],\"selectedConfiguration\":[\"selectedConfigurationChangedHandler\"],\"durationMinutes\":[\"durationMinutesChangedHandler\"]}]]],[\"nylas-buffer-time.cjs\",[[65,\"nylas-buffer-time\",{\"name\":[1],\"buffer\":[16],\"selectedBeforeBufferTime\":[32],\"selectedAfterBufferTime\":[32]},[[0,\"selectedOptionChanged\",\"selectedOptionChangedHandler\"]],{\"name\":[\"elementNameChangedHandler\"]}]]],[\"nylas-event-description.cjs\",[[65,\"nylas-event-description\",{\"selectedConfiguration\":[16],\"eventDescription\":[1,\"event-description\"],\"name\":[1],\"description\":[32]},null,{\"name\":[\"elementNameChangedHandler\"],\"selectedConfiguration\":[\"selectedConfigurationChangedHandler\"]}]]],[\"nylas-event-title.cjs\",[[65,\"nylas-event-title\",{\"selectedConfiguration\":[16],\"eventTitle\":[1,\"event-title\"],\"name\":[1],\"showTokens\":[32],\"availableTokens\":[32],\"filteredTokens\":[32],\"ariaActivedescendant\":[32],\"currentWord\":[32],\"validationError\":[32]},[[8,\"formSubmitted\",\"formSubmittedHandler\"]],{\"name\":[\"elementNameChangedHandler\"],\"ariaActivedescendant\":[\"ariaActivedescendantChangedHandler\"],\"selectedConfiguration\":[\"configChangedHandler\"]}]]],[\"nylas-event-info.cjs\",[[65,\"nylas-event-info\"]]],[\"nylas-event-limits.cjs\",[[65,\"nylas-event-limits\"]]],[\"bold-icon.cjs\",[[2,\"bold-icon\",{\"width\":[1],\"height\":[1]}]]],[\"calendar-check-icon.cjs\",[[2,\"calendar-check-icon\",{\"width\":[1],\"height\":[1]}]]],[\"calendar-info-icon.cjs\",[[2,\"calendar-info-icon\",{\"width\":[1],\"height\":[1]}]]],[\"calendar-patterns-icon.cjs\",[[2,\"calendar-patterns-icon\",{\"width\":[1],\"height\":[1]}]]],[\"checkmark-circle-icon.cjs\",[[2,\"checkmark-circle-icon\",{\"width\":[1],\"height\":[1]}]]],[\"flow-icon.cjs\",[[2,\"flow-icon\",{\"width\":[1],\"height\":[1]}]]],[\"italic-icon.cjs\",[[2,\"italic-icon\",{\"width\":[1],\"height\":[1]}]]],[\"play-icon.cjs\",[[2,\"play-icon\",{\"width\":[1],\"height\":[1]}]]],[\"refresh-icon.cjs\",[[2,\"refresh-icon\",{\"width\":[1],\"height\":[1]}]]],[\"stop-icon.cjs\",[[2,\"stop-icon\",{\"width\":[1],\"height\":[1]}]]],[\"translate-icon.cjs\",[[2,\"translate-icon\",{\"width\":[1],\"height\":[1]}]]],[\"underline-icon.cjs\",[[2,\"underline-icon\",{\"width\":[1],\"height\":[1]}]]],[\"warning-icon.cjs\",[[2,\"warning-icon\",{\"width\":[1],\"height\":[1]}]]],[\"multi-select-dropdown.cjs\",[[1,\"multi-select-dropdown\",{\"name\":[1],\"label\":[1],\"options\":[16],\"availableOptions\":[32],\"isOpen\":[32],\"ariaActivedescendant\":[32],\"shouldFocusFirstOption\":[32]},[[6,\"click\",\"handleOutsideClick\"]]]]],[\"add-circle-icon.cjs\",[[2,\"add-circle-icon\",{\"width\":[1],\"height\":[1]}]]],[\"button-component.cjs\",[[6,\"button-component\",{\"variant\":[1],\"disabled\":[4],\"type\":[1],\"clickHandler\":[16],\"mouseOverHandler\":[16],\"mouseOutHandler\":[16],\"focusHandler\":[16],\"blurHandler\":[16]}]]],[\"calendar-cancel-icon.cjs\",[[2,\"calendar-cancel-icon\",{\"width\":[1],\"height\":[1]}]]],[\"location-icon.cjs\",[[2,\"location-icon\",{\"width\":[1],\"height\":[1]}]]],[\"location-off-icon.cjs\",[[2,\"location-off-icon\",{\"width\":[1],\"height\":[1]}]]],[\"nylas-time-window-picker.cjs\",[[1,\"nylas-time-window-picker\",{\"time\":[1],\"minimumStartTime\":[1,\"minimum-start-time\"],\"placeholder\":[1],\"setTime\":[16],\"name\":[1],\"hasError\":[4,\"has-error\"],\"setFormError\":[16],\"err\":[32],\"showTimes\":[32],\"ariaActivedescendant\":[32],\"times\":[32],\"shouldAutoScroll\":[32]},[[4,\"click\",\"handleOutsideClick\"]],{\"minimumStartTime\":[\"minimumStartTimeChangedHandler\"]}]]],[\"time-period-selector.cjs\",[[2,\"time-period-selector\",{\"timePeriods\":[16],\"defaultSelectedPeriod\":[1,\"default-selected-period\"],\"defaultSelectedNumber\":[2,\"default-selected-number\"],\"selectedPeriod\":[32],\"selectedNumber\":[32],\"numberOptions\":[32],\"timePeriodOptions\":[32]},[[0,\"selectedOptionChanged\",\"selectedOptionChangedHandler\"]],{\"defaultSelectedPeriod\":[\"defaultSelectedPeriodChangedHandler\"],\"defaultSelectedNumber\":[\"defaultSelectedNumberChangedHandler\"],\"timePeriods\":[\"timePeriodsChangedHandler\"]}]]],[\"calendar-icon.cjs\",[[2,\"calendar-icon\",{\"width\":[1],\"height\":[1]}]]],[\"nylas-form-card.cjs\",[[65,\"nylas-form-card\"]]],[\"loading-icon.cjs\",[[1,\"loading-icon\",{\"width\":[1],\"height\":[1]}]]],[\"globe-icon.cjs\",[[2,\"globe-icon\",{\"width\":[1],\"height\":[1]}]]],[\"close-icon.cjs\",[[2,\"close-icon\",{\"width\":[1],\"height\":[1]}]]],[\"info-icon.cjs\",[[2,\"info-icon\",{\"width\":[1],\"height\":[1]}]]],[\"tooltip-component.cjs\",[[1,\"tooltip-component\",{\"position\":[1]}]]],[\"search-icon.cjs\",[[2,\"search-icon\",{\"width\":[1],\"height\":[1]}]]],[\"chevron-icon.cjs\",[[2,\"chevron-icon\",{\"width\":[1],\"height\":[1]}]]],[\"select-dropdown.cjs\",[[1,\"select-dropdown\",{\"name\":[1],\"options\":[16],\"defaultSelectedOption\":[16],\"withSearch\":[4,\"with-search\"],\"pluralizedLabel\":[1,\"pluralized-label\"],\"selectedOption\":[32],\"isOpen\":[32],\"searchValue\":[32],\"filteredOptions\":[32],\"ariaActivedescendant\":[32]},[[6,\"click\",\"handleOutsideClick\"]],{\"options\":[\"optionsChangedHandler\"],\"defaultSelectedOption\":[\"defaultSelectedOptionChangedHandler\"]}]]]]"), options);
11
+ return index.bootstrapLazy(JSON.parse("[[\"nylas-scheduler-editor.cjs\",[[1,\"nylas-scheduler-editor\",{\"defaultRequiresSessionAuth\":[4,\"default-requires-session-auth\"],\"configurationId\":[1025,\"configuration-id\"],\"nylasApiRequest\":[1040],\"nylasSessionsConfig\":[16],\"defaultAuthArgs\":[16],\"eventOverrides\":[16],\"schedulerPreviewLink\":[1,\"scheduler-preview-link\"],\"defaultSchedulerConfigState\":[16],\"mode\":[1],\"automaticComponentRegistration\":[32],\"store\":[64],\"schedulerConnector\":[64]},[[0,\"registerComponent\",\"registerComponentHandler\"],[0,\"unregisterComponent\",\"unregisterComponentHandler\"]],{\"configurationId\":[\"configurationIdChanged\"]}]]],[\"nylas-scheduling.cjs\",[[1,\"nylas-scheduling\",{\"mode\":[1],\"defaultSchedulerState\":[16],\"sessionId\":[1,\"session-id\"],\"schedulerApiUrl\":[1,\"scheduler-api-url\"],\"bookingInfo\":[16],\"rescheduleBookingId\":[1,\"reschedule-booking-id\"],\"cancelBookingId\":[1,\"cancel-booking-id\"],\"configurationId\":[1,\"configuration-id\"],\"nylasBranding\":[4,\"nylas-branding\"],\"eventOverrides\":[16],\"isLoading\":[4,\"is-loading\"],\"themeConfig\":[16],\"showNotification\":[4,\"show-notification\"],\"automaticComponentRegistration\":[32],\"selectedDateLabel\":[32],\"getNylasSchedulerStore\":[64],\"getNylasSchedulerConnector\":[64],\"getRef\":[64]},[[0,\"registerComponent\",\"registerComponentHandler\"],[0,\"unregisterComponent\",\"unregisterComponentHandler\"],[0,\"monthChanged\",\"monthChangedHandler\"],[0,\"detailsConfirmed\",\"bookButtonClickedHandler\"],[0,\"dateSelected\",\"dateSelectedHandler\"],[0,\"cancelBookedEventError\",\"cancelBookedEventErrorHandler\"],[0,\"cancelBookedEventValidationError\",\"cancelBookedEventValidationErrorHandler\"],[0,\"rescheduleBookedEventError\",\"rescheduleBookedEventErrorHandler\"]],{\"bookingInfo\":[\"bookingInfoChanged\"]}]]],[\"nylas-view-thread.cjs\",[[1,\"nylas-view-thread\",{\"draft\":[16],\"thread\":[16],\"messages\":[16],\"attachments\":[16],\"state\":[32],\"internalMessages\":[32],\"showAllEmails\":[32],\"showComposer\":[32]},null,{\"thread\":[\"threadChanged\"],\"messages\":[\"updateInternalMessages\"]}]]],[\"nylas-list-folders.cjs\",[[1,\"nylas-list-folders\",{\"folders\":[16],\"selectedFolder\":[1,\"selected-folder\"],\"defaultFolders\":[32],\"otherFolders\":[32]},null,{\"folders\":[\"watchFolders\"]}]]],[\"nylas-custom-booking-flow.cjs\",[[65,\"nylas-custom-booking-flow\",{\"selectedConfiguration\":[16],\"name\":[1],\"bookingType\":[1,\"booking-type\"],\"selectedBookingType\":[32]},[[0,\"selectedOptionChanged\",\"selectedOptionChangedHandler\"]],{\"name\":[\"elementNameChangedHandler\"],\"selectedConfiguration\":[\"selectedConfigurationChangedHandler\"]}]]],[\"nylas-additional-participants.cjs\",[[65,\"nylas-additional-participants\",{\"name\":[1],\"eventParticipants\":[16],\"participants\":[32],\"participantsValid\":[32]},null,{\"name\":[\"elementNameChangedHandler\"]}]]],[\"nylas-mailbox-pagination.cjs\",[[1,\"nylas-mailbox-pagination\",{\"state\":[1],\"hasNextPage\":[4,\"has-next-page\"],\"hasPreviousPage\":[4,\"has-previous-page\"],\"scrollTarget\":[1,\"scroll-target\"],\"mobileOnlyInfiniteScroll\":[4,\"mobile-only-infinite-scroll\"],\"mobileViewPortWidth\":[2,\"mobile-view-port-width\"],\"nextPage\":[64],\"previousPage\":[64]},[[9,\"scroll\",\"handlePageScroll\"]]]]],[\"nylas-threads-refresh.cjs\",[[1,\"nylas-threads-refresh\",{\"start\":[32],\"state\":[32],\"pulling\":[32],\"updateState\":[64]}]]],[\"document-refresh-icon.cjs\",[[2,\"document-refresh-icon\",{\"width\":[1],\"height\":[1]}]]],[\"nylas-if-state.cjs\",[[1,\"nylas-if-state\",{\"state\":[1],\"isStateSet\":[4,\"is-state-set\"],\"isBoolean\":[4,\"is-boolean\"],\"getStore\":[16],\"transition\":[1],\"show\":[32],\"classes\":[32]},null,{\"getStore\":[\"onGetStoreChange\"]}]]],[\"nylas-list-threads.cjs\",[[1,\"nylas-list-threads\",{\"threads\":[16],\"isAuthenticated\":[4,\"is-authenticated\"],\"tokenInfo\":[16],\"state\":[1],\"showCheckbox\":[4,\"show-checkbox\"]}]]],[\"nylas-login.cjs\",[[1,\"nylas-login\",{\"isAuthenticated\":[4,\"is-authenticated\"],\"nylasConnector\":[16],\"scopes\":[16],\"loginMethod\":[1,\"login-method\"],\"companyName\":[1,\"company-name\"],\"logoUrl\":[1,\"logo-url\"],\"logoWidth\":[1,\"logo-width\"],\"providers\":[1],\"buttonText\":[1,\"button-text\"],\"email\":[32]}]]],[\"nylas-mailbox.cjs\",[[1,\"nylas-mailbox\",{\"automaticComponentRegistration\":[4,\"automatic-component-registration\"],\"eventOverrides\":[16],\"authConfig\":[16],\"defaultAuthStoreState\":[16],\"defaultMailboxStoreState\":[16],\"getMailboxStore\":[64],\"getAuthStore\":[64],\"getNylasAuth\":[64],\"getNylasMailboxConnector\":[64]},[[0,\"registerComponent\",\"registerComponentHandler\"],[0,\"unregisterComponent\",\"unregisterComponentHandler\"]]]]],[\"nylas-mailbox-toolbar-button.cjs\",[[1,\"nylas-mailbox-toolbar-button\",{\"method\":[1],\"dataState\":[1,\"data-state\"],\"iconOnly\":[4,\"icon-only\"],\"mailboxConnector\":[16]}]]],[\"nylas-provider.cjs\",[[1,\"nylas-provider\",{\"authConfig\":[16],\"eventOverrides\":[16],\"automaticComponentRegistration\":[4,\"automatic-component-registration\"],\"getNylasAuth\":[64],\"getNylasConnector\":[64],\"getMailboxStore\":[64],\"getAuthStore\":[64],\"getNylasSchedulerStore\":[64],\"getNylasSchedulerConfigStore\":[64]},[[0,\"registerComponent\",\"registerComponentHandler\"],[0,\"unregisterComponent\",\"unregisterComponentHandler\"]]]]],[\"nylas-threads-search.cjs\",[[1,\"nylas-threads-search\",{\"query\":[1],\"internalQuery\":[32]},null,{\"query\":[\"onQueryChange\"]}]]],[\"people-icon.cjs\",[[2,\"people-icon\",{\"width\":[1],\"height\":[1]}]]],[\"nylas-editor-tabs.cjs\",[[6,\"nylas-editor-tabs\",{\"calendars\":[16],\"selectedConfiguration\":[16],\"defaultRequiresSessionAuth\":[4,\"default-requires-session-auth\"],\"currentUser\":[16],\"schedulerPreviewLink\":[1,\"scheduler-preview-link\"],\"mode\":[1],\"action\":[32],\"activeTab\":[32],\"isLoading\":[32],\"hasUnsavedChanges\":[32],\"changesSaved\":[32],\"formState\":[32],\"error\":[32]},[[0,\"valueChanged\",\"handleValueChanged\"]],{\"selectedConfiguration\":[\"configChangedHandler\"]}]]],[\"nylas-locale-switch.cjs\",[[1,\"nylas-locale-switch\",{\"selectedTimezone\":[1025,\"selected-timezone\"],\"selectedLanguage\":[1025,\"selected-language\"]},[[0,\"selectedOptionChanged\",\"selectedOptionChangedHandler\"]]]]],[\"nylas-booked-event-card.cjs\",[[1,\"nylas-booked-event-card\",{\"eventInfo\":[16],\"rescheduleBookingId\":[1,\"reschedule-booking-id\"],\"bookingInfo\":[8,\"booking-info\"],\"selectedTimezone\":[1,\"selected-timezone\"],\"selectedTimeslot\":[16],\"configSettings\":[8,\"config-settings\"]}]]],[\"nylas-composer.cjs\",[[1,\"nylas-composer\",{\"message\":[16],\"viewEmailElement\":[16]},null,{\"message\":[\"watchBody\"]}]]],[\"nylas-summarize-message-button.cjs\",[[1,\"nylas-summarize-message-button\",{\"message\":[16],\"state\":[32],\"updateState\":[64],\"playAudio\":[64]}]]],[\"nylas-list-configurations.cjs\",[[1,\"nylas-list-configurations\",{\"configurations\":[16],\"schedulerPreviewLink\":[1,\"scheduler-preview-link\"],\"state\":[32],\"error\":[32],\"getState\":[64],\"setState\":[64],\"setError\":[64]}]]],[\"nylas-notification.cjs\",[[1,\"nylas-notification\",{\"ttl\":[8],\"allowedCategories\":[16],\"notifications\":[32]},[[16,\"nylasSchedulerError\",\"onError\"],[16,\"nylasSchedulerWarning\",\"onWarning\"],[16,\"nylasSchedulerInfo\",\"onInfo\"],[16,\"nylasSchedulerSuccess\",\"onSuccess\"]]]]],[\"nylas-selected-event-card.cjs\",[[1,\"nylas-selected-event-card\",{\"selectedDate\":[16],\"selectedTimeslot\":[16],\"selectedTimezone\":[1,\"selected-timezone\"],\"startTime\":[32],\"endTime\":[32]},null,{\"selectedTimeslot\":[\"handleSelectedTimeslotChange\"]}]]],[\"nylas-booking-form.cjs\",[[1,\"nylas-booking-form\",{\"isLoading\":[4,\"is-loading\"],\"bookingInfo\":[8,\"booking-info\"],\"eventInfo\":[16],\"name\":[32],\"email\":[32],\"guestEmails\":[32],\"guestEmailErrors\":[32],\"isNameValid\":[32],\"isEmailValid\":[32],\"validationError\":[32]},null,{\"bookingInfo\":[\"bookingInfoChangedHandler\"]}]]],[\"nylas-cancel-booking-form.cjs\",[[1,\"nylas-cancel-booking-form\",{\"cancelBookingId\":[1,\"cancel-booking-id\"],\"cancellationReason\":[32],\"cancellationError\":[32]}]]],[\"nylas-cancelled-event-card.cjs\",[[1,\"nylas-cancelled-event-card\",{\"cancelledEventInfo\":[16],\"configSettings\":[16],\"isClosing\":[32]}]]],[\"nylas-date-picker.cjs\",[[1,\"nylas-date-picker\",{\"selectableDates\":[16],\"selectedDate\":[16],\"configSettings\":[16],\"isLoading\":[4,\"is-loading\"],\"month\":[32],\"dates\":[32],\"disableNextMonthButton\":[32]}]]],[\"archive-icon.cjs\",[[2,\"archive-icon\",{\"width\":[1],\"height\":[1]}]]],[\"arrow-icon.cjs\",[[2,\"arrow-icon\",{\"width\":[1],\"height\":[1]}]]],[\"folder-icon.cjs\",[[2,\"folder-icon\",{\"width\":[1],\"height\":[1]}]]],[\"forward-icon.cjs\",[[2,\"forward-icon\",{\"width\":[1],\"height\":[1]}]]],[\"google-logo-icon.cjs\",[[2,\"google-logo-icon\",{\"width\":[1],\"height\":[1]}]]],[\"inbox-icon.cjs\",[[2,\"inbox-icon\",{\"width\":[1],\"height\":[1]}]]],[\"microsoft-logo-icon.cjs\",[[2,\"microsoft-logo-icon\",{\"width\":[1],\"height\":[1]}]]],[\"nylas-logo.cjs\",[[2,\"nylas-logo\",{\"width\":[1],\"height\":[1]}]]],[\"nylas-timeslot-picker.cjs\",[[1,\"nylas-timeslot-picker\",{\"selectedDate\":[16],\"availability\":[16],\"selectedTimeslot\":[16],\"isLoading\":[4,\"loading-state\"],\"selectedTimezone\":[1,\"selected-timezone\"],\"times\":[32],\"hoveredTimeslotIndex\":[32],\"selectedTimeslotIndex\":[32]},null,{\"selectedDate\":[\"selectedDateChanged\"],\"availability\":[\"availabilityChanged\"]}]]],[\"nylas-view-email.cjs\",[[1,\"nylas-view-email\",{\"message\":[16],\"parent\":[16],\"attachments\":[16],\"detectDarkMode\":[4,\"detect-dark-mode\"],\"state\":[32],\"sanitizedBody\":[32],\"styles\":[32],\"viewEmailElement\":[32],\"hoistedFontURLs\":[32]},[[9,\"resize\",\"handleScroll\"]],{\"message\":[\"messageChanged\"],\"viewEmailElement\":[\"viewEmailElementChanged\"]}]]],[\"reply-all-icon.cjs\",[[2,\"reply-all-icon\",{\"width\":[1],\"height\":[1]}]]],[\"reply-icon.cjs\",[[2,\"reply-icon\",{\"width\":[1],\"height\":[1]}]]],[\"sent-icon.cjs\",[[2,\"sent-icon\",{\"width\":[1],\"height\":[1]}]]],[\"spam-icon.cjs\",[[2,\"spam-icon\",{\"width\":[1],\"height\":[1]}]]],[\"star-icon.cjs\",[[2,\"star-icon\",{\"width\":[1],\"height\":[1]}]]],[\"trash-icon.cjs\",[[2,\"trash-icon\",{\"width\":[1],\"height\":[1]}]]],[\"nylas-availability-picker.cjs\",[[65,\"nylas-availability-picker\",{\"selectedConfiguration\":[16],\"openHours\":[16],\"name\":[1],\"defaultTimezone\":[1,\"default-timezone\"],\"schedule\":[32],\"timezone\":[32],\"overlapDays\":[32]},[[0,\"selectedOptionChanged\",\"selectedOptionChangedHandler\"],[0,\"timeChange\",\"setTime\"],[0,\"formError\",\"setFormError\"]],{\"name\":[\"elementNameChangedHandler\"],\"selectedConfiguration\":[\"configChangedHandler\"],\"schedule\":[\"scheduleChanged\"]}]]],[\"nylas-location-component.cjs\",[[65,\"nylas-location-component\",{\"name\":[1],\"selectedConfiguration\":[16],\"eventLocation\":[1,\"event-location\"],\"location\":[32],\"selectedLocationOption\":[32]},[[0,\"selectedOptionChanged\",\"selectedOptionChangedHandler\"]],{\"name\":[\"elementNameChangedHandler\"],\"selectedConfiguration\":[\"selectedConfigurationChangedHandler\"],\"eventLocation\":[\"eventLocationChangedHandler\"]}]]],[\"nylas-limit-future-bookings.cjs\",[[65,\"nylas-limit-future-bookings\",{\"selectedConfiguration\":[16],\"availableDaysInFuture\":[2,\"available-days-in-future\"],\"name\":[1],\"selectedNumber\":[32],\"selectedPeriod\":[32]},[[0,\"timePeriodChanged\",\"timePeriodChangedHandler\"]],{\"name\":[\"elementNameChangedHandler\"],\"selectedConfiguration\":[\"selectedConfigurationChangedHandler\"],\"availableDaysInFuture\":[\"availableDaysInFutureChanged\"]}]]],[\"nylas-min-cancellation-notice.cjs\",[[65,\"nylas-min-cancellation-notice\",{\"selectedConfiguration\":[16],\"minCancellationNotice\":[2,\"min-cancellation-notice\"],\"name\":[1],\"selectedNumber\":[32],\"selectedPeriod\":[32]},[[0,\"timePeriodChanged\",\"timePeriodChangedHandler\"]],{\"name\":[\"elementNameChangedHandler\"],\"selectedConfiguration\":[\"selectedConfigurationChangedHandler\"],\"availableDaysInFuture\":[\"availableDaysInFutureChanged\"]}]]],[\"nylas-booking-calendar-picker.cjs\",[[65,\"nylas-booking-calendar-picker\",{\"calendars\":[16],\"currentUser\":[16],\"name\":[1],\"defaultBookingCalendar\":[1,\"default-booking-calendar\"],\"selectedCalendar\":[32]},[[0,\"selectedOptionChanged\",\"selectedOptionChangedHandler\"]],{\"name\":[\"elementNameChangedHandler\"]}]]],[\"nylas-calendar-picker.cjs\",[[65,\"nylas-calendar-picker\",{\"calendars\":[16],\"currentUser\":[16],\"name\":[1],\"defaultSelectedCalendars\":[16],\"selectedCalendars\":[32]},[[0,\"selectedOptionsChanged\",\"selectedOptionsChangedHandler\"]],{\"name\":[\"elementNameChangedHandler\"]}]]],[\"nylas-event-duration.cjs\",[[65,\"nylas-event-duration\",{\"selectedConfiguration\":[16],\"name\":[1],\"eventDurationMinutes\":[2,\"event-duration-minutes\"],\"duration\":[32],\"durationMinutes\":[32],\"durationIncrement\":[32]},[[0,\"selectedOptionChanged\",\"selectedOptionChangedHandler\"]],{\"name\":[\"elementNameChangedHandler\"],\"selectedConfiguration\":[\"selectedConfigurationChangedHandler\"],\"durationMinutes\":[\"durationMinutesChangedHandler\"]}]]],[\"nylas-buffer-time.cjs\",[[65,\"nylas-buffer-time\",{\"name\":[1],\"buffer\":[16],\"selectedBeforeBufferTime\":[32],\"selectedAfterBufferTime\":[32]},[[0,\"selectedOptionChanged\",\"selectedOptionChangedHandler\"]],{\"name\":[\"elementNameChangedHandler\"]}]]],[\"nylas-event-description.cjs\",[[65,\"nylas-event-description\",{\"selectedConfiguration\":[16],\"eventDescription\":[1,\"event-description\"],\"name\":[1],\"description\":[32]},null,{\"name\":[\"elementNameChangedHandler\"],\"selectedConfiguration\":[\"selectedConfigurationChangedHandler\"]}]]],[\"nylas-event-title.cjs\",[[65,\"nylas-event-title\",{\"selectedConfiguration\":[16],\"eventTitle\":[1,\"event-title\"],\"name\":[1],\"showTokens\":[32],\"availableTokens\":[32],\"filteredTokens\":[32],\"ariaActivedescendant\":[32],\"currentWord\":[32],\"validationError\":[32]},[[8,\"formSubmitted\",\"formSubmittedHandler\"]],{\"name\":[\"elementNameChangedHandler\"],\"ariaActivedescendant\":[\"ariaActivedescendantChangedHandler\"],\"selectedConfiguration\":[\"configChangedHandler\"]}]]],[\"nylas-event-info.cjs\",[[65,\"nylas-event-info\"]]],[\"nylas-event-limits.cjs\",[[65,\"nylas-event-limits\"]]],[\"bold-icon.cjs\",[[2,\"bold-icon\",{\"width\":[1],\"height\":[1]}]]],[\"calendar-check-icon.cjs\",[[2,\"calendar-check-icon\",{\"width\":[1],\"height\":[1]}]]],[\"calendar-info-icon.cjs\",[[2,\"calendar-info-icon\",{\"width\":[1],\"height\":[1]}]]],[\"calendar-patterns-icon.cjs\",[[2,\"calendar-patterns-icon\",{\"width\":[1],\"height\":[1]}]]],[\"checkmark-circle-icon.cjs\",[[2,\"checkmark-circle-icon\",{\"width\":[1],\"height\":[1]}]]],[\"flow-icon.cjs\",[[2,\"flow-icon\",{\"width\":[1],\"height\":[1]}]]],[\"italic-icon.cjs\",[[2,\"italic-icon\",{\"width\":[1],\"height\":[1]}]]],[\"play-icon.cjs\",[[2,\"play-icon\",{\"width\":[1],\"height\":[1]}]]],[\"refresh-icon.cjs\",[[2,\"refresh-icon\",{\"width\":[1],\"height\":[1]}]]],[\"stop-icon.cjs\",[[2,\"stop-icon\",{\"width\":[1],\"height\":[1]}]]],[\"translate-icon.cjs\",[[2,\"translate-icon\",{\"width\":[1],\"height\":[1]}]]],[\"underline-icon.cjs\",[[2,\"underline-icon\",{\"width\":[1],\"height\":[1]}]]],[\"warning-icon.cjs\",[[2,\"warning-icon\",{\"width\":[1],\"height\":[1]}]]],[\"multi-select-dropdown.cjs\",[[1,\"multi-select-dropdown\",{\"name\":[1],\"label\":[1],\"options\":[16],\"availableOptions\":[32],\"isOpen\":[32],\"ariaActivedescendant\":[32],\"shouldFocusFirstOption\":[32]},[[6,\"click\",\"handleOutsideClick\"]]]]],[\"add-circle-icon.cjs\",[[2,\"add-circle-icon\",{\"width\":[1],\"height\":[1]}]]],[\"button-component.cjs\",[[6,\"button-component\",{\"variant\":[1],\"disabled\":[4],\"type\":[1],\"clickHandler\":[16],\"mouseOverHandler\":[16],\"mouseOutHandler\":[16],\"focusHandler\":[16],\"blurHandler\":[16]}]]],[\"calendar-cancel-icon.cjs\",[[2,\"calendar-cancel-icon\",{\"width\":[1],\"height\":[1]}]]],[\"location-icon.cjs\",[[2,\"location-icon\",{\"width\":[1],\"height\":[1]}]]],[\"location-off-icon.cjs\",[[2,\"location-off-icon\",{\"width\":[1],\"height\":[1]}]]],[\"nylas-time-window-picker.cjs\",[[1,\"nylas-time-window-picker\",{\"time\":[1],\"minimumStartTime\":[1,\"minimum-start-time\"],\"placeholder\":[1],\"name\":[1],\"hasError\":[4,\"has-error\"],\"err\":[32],\"showTimes\":[32],\"ariaActivedescendant\":[32],\"times\":[32],\"shouldAutoScroll\":[32]},[[4,\"click\",\"handleOutsideClick\"]],{\"minimumStartTime\":[\"minimumStartTimeChangedHandler\"]}]]],[\"time-period-selector.cjs\",[[2,\"time-period-selector\",{\"timePeriods\":[16],\"defaultSelectedPeriod\":[1,\"default-selected-period\"],\"defaultSelectedNumber\":[2,\"default-selected-number\"],\"selectedPeriod\":[32],\"selectedNumber\":[32],\"numberOptions\":[32],\"timePeriodOptions\":[32]},[[0,\"selectedOptionChanged\",\"selectedOptionChangedHandler\"]],{\"defaultSelectedPeriod\":[\"defaultSelectedPeriodChangedHandler\"],\"defaultSelectedNumber\":[\"defaultSelectedNumberChangedHandler\"],\"timePeriods\":[\"timePeriodsChangedHandler\"]}]]],[\"calendar-icon.cjs\",[[2,\"calendar-icon\",{\"width\":[1],\"height\":[1]}]]],[\"nylas-form-card.cjs\",[[65,\"nylas-form-card\"]]],[\"loading-icon.cjs\",[[1,\"loading-icon\",{\"width\":[1],\"height\":[1]}]]],[\"globe-icon.cjs\",[[2,\"globe-icon\",{\"width\":[1],\"height\":[1]}]]],[\"close-icon.cjs\",[[2,\"close-icon\",{\"width\":[1],\"height\":[1]}]]],[\"info-icon.cjs\",[[2,\"info-icon\",{\"width\":[1],\"height\":[1]}]]],[\"tooltip-component.cjs\",[[1,\"tooltip-component\",{\"position\":[1]}]]],[\"search-icon.cjs\",[[2,\"search-icon\",{\"width\":[1],\"height\":[1]}]]],[\"chevron-icon.cjs\",[[2,\"chevron-icon\",{\"width\":[1],\"height\":[1]}]]],[\"select-dropdown.cjs\",[[1,\"select-dropdown\",{\"name\":[1],\"options\":[16],\"defaultSelectedOption\":[16],\"withSearch\":[4,\"with-search\"],\"pluralizedLabel\":[1,\"pluralized-label\"],\"selectedOption\":[32],\"isOpen\":[32],\"searchValue\":[32],\"filteredOptions\":[32],\"ariaActivedescendant\":[32]},[[6,\"click\",\"handleOutsideClick\"]],{\"options\":[\"optionsChangedHandler\"],\"defaultSelectedOption\":[\"defaultSelectedOptionChangedHandler\"]}]]]]"), options);
12
12
  };
13
13
 
14
14
  exports.setNonce = index.setNonce;
@@ -1 +1 @@
1
- {"file":"nylas-api-request-05f1e068.js","mappings":";;;;MA0Ea,2BAA2B;IAqBtC,YAAY,OAAsB;QAN1B,oBAAe,GAAa,EAAE,CAAC;QAOrC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;KACxB;IAQD,gBAAgB,CAAC,OAAe;QAC9B,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC;KAC9B;IAWD,MAAM,OAAO,CAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAoB;QAChE,IAAI;YACF,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,aAAa,IAAI,EAAE,EAAE;gBAC7D,MAAM;gBACN,OAAO,EAAE,OAAO,GAAG,IAAI,OAAO,CAAC,OAAO,CAAC,GAAG,SAAS;gBACnD,IAAI;gBACJ,IAAI,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,IAAI,IAAI,CAAC,aAAa,GAAG,EAAE,QAAQ,EAAE,IAAI,CAAC,aAAa,EAAE,GAAG,EAAE,CAAC;aACjG,CAAC,CAAC;YAIH,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE;gBACnC,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;aAC1C;YAED,OAAOA,kBAAY,CAAC,QAAa,CAAC,CAAC;SACpC;QAAC,OAAO,KAAK,EAAE;YACd,OAAOA,kBAAY,CAAC,IAAS,EAAE;gBAC7B,OAAO,EAAE,MAAM,CAAC,KAAK,CAAC;aACvB,CAAC,CAAC;SACJ;KACF;IAOD,MAAM,WAAW;QACf,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,GAAG,IAAI,CAAC,aAAa,GAAG,SAAS,CAAC;QAC/E,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QACvD,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO,IAAI,CAAC;SACb;QAED,OAAO;YACL,EAAE,EAAE,OAAO,CAAC,GAAG;YACf,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,IAAI,EAAE,OAAO,CAAC,IAAI;SACnB,CAAC;KACH;IAOD,MAAM,iBAAiB,CAAC,QAAmB;QACzC,IAAI,IAAI,GAAG,IAAI,CAAC,eAAe,IAAI,EAAE,CAAC;QACtC,IAAI,QAAQ,EAAE;YACZ,IAAI,GAAG,EAAE,GAAG,IAAI,EAAE,GAAG,QAAQ,EAAE,CAAC;SACjC;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KAChC;IAMD,kBAAkB,CAAC,QAAkB;QACnC,IAAI,CAAC,eAAe,GAAG,QAAQ,CAAC;KACjC;;;;;","names":["dataResponse"],"sources":["src/common/nylas-api-request.ts"],"sourcesContent":["import { dataResponse } from '@/utils/utils';\nimport type { NylasSessions } from '@nylas/identity';\nimport { DataResponseReturnType } from './types';\n\n/**\n * Arguments for making a request to the Nylas API.\n */\nexport type NylasRequestArgs = {\n method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';\n path: string;\n body?: any;\n headers?: Record<string, string>;\n};\n\n/**\n * A model representing a user in the Nylas Identity system.\n */\nexport type User = {\n id: string;\n email: string;\n name?: string;\n};\n\n/**\n * Arguments for authenticating a user with the Nylas Identity system.\n */\nexport type AuthArgs = {\n provider?: string;\n scope?: Array<string>;\n loginHint?: string;\n includeGrantScopes?: boolean;\n prompt?: string;\n metadata?: string;\n state?: string;\n};\n\n/**\n * Interface for making requests to the Nylas API.\n *\n * This is an abstract class that is meant to be implemented by customers to provide their own\n * implementation of making requests to the Nylas API. This allows customers to use their own\n * authentication mechanism, or to use a different HTTP client library.\n */\nexport abstract class NylasApiRequest {\n /**\n * This method should make an authenticated request to the Nylas API.\n * Note: It should not throw an error if the request fails, but should return an object with the error\n * information as part of the tuple returned.\n * @param args NylasRequestArgs\n */\n abstract request<T = any>(args: NylasRequestArgs): Promise<DataResponseReturnType<T>>;\n\n /**\n * This method should return the current user's information.\n */\n\n abstract currentUser(): Promise<User | null>;\n\n /**\n * This method should set the default authentication arguments to use when authenticating the user.\n */\n abstract setDefaultAuthArgs(authArgs: AuthArgs): void;\n\n /**\n * This method should return the URL to redirect the user to for authentication.\n */\n abstract authenticationUrl(authArgs?: AuthArgs): Promise<string | undefined>;\n}\n\n/**\n * A wrapper around the Nylas Identity session that implements the NylasApiRequest interface.\n * This class is used by the Nylas Web Elements to make requests to the Nylas API if no custom\n * implementation of NylasApiRequest is provided.\n */\nexport class NylasIdentityRequestWrapper implements NylasApiRequest {\n /**\n * The Nylas Identity session instance.\n */\n private session: NylasSessions;\n\n /**\n * The grant_id to use for requests, if there is multi-account support\n * enabled in the Nylas Identity settings.\n */\n private activeGrantId?: string;\n\n /**\n * The default authentication arguments to use when authenticating the user.\n */\n private defaultAuthArgs: AuthArgs = {};\n\n /**\n * Constructor for the NylasIdentityRequestWrapper class.\n * @param session The Nylas Identity session instance.\n */\n constructor(session: NylasSessions) {\n this.session = session;\n }\n\n /**\n * This method sets the grant_id to use for requests.\n * This is used when there is multi-account support enabled in the Nylas Identity settings.\n *\n * @param grantId\n */\n setActiveGrantId(grantId: string) {\n this.activeGrantId = grantId;\n }\n\n /**\n * This method makes a request to the Nylas API, using the Nylas Identity's fetch method.\n *\n * The `grants/me/` prefix is added because all requests made from the browser to the Nylas API\n * must be made on behalf of the currently logged in user with a valid access token.\n *\n * @param NylasRequestArgs\n * @returns Promise<[T | null, NylasErrorResponse['error'] | null]>\n */\n async request<T>({ method, path, body, headers }: NylasRequestArgs): Promise<DataResponseReturnType<T>> {\n try {\n const response = await this.session.fetch(`grants/me/${path}`, {\n method,\n headers: headers ? new Headers(headers) : undefined,\n body,\n ...(this.session.isMultiAccount() && this.activeGrantId ? { grant_id: this.activeGrantId } : {}),\n });\n\n // Sometimes the Nylas identity session fetch method returns undefined.\n // Possibly due to CORS issues. In this case, we throw an error.\n if (typeof response === 'undefined') {\n throw new Error('Response is undefined');\n }\n\n return dataResponse(response as T);\n } catch (error) {\n return dataResponse(null as T, {\n message: String(error),\n });\n }\n }\n\n /**\n * This method returns the current (logged in) user's information.\n * If the user is not logged in, it returns null.\n * @returns Promise<User | null>\n */\n async currentUser(): Promise<User | null> {\n const grantId = this.session.isMultiAccount() ? this.activeGrantId : undefined;\n const idToken = await this.session.getProfile(grantId);\n if (!idToken) {\n return null;\n }\n\n return {\n id: idToken.sub,\n email: idToken.email,\n name: idToken.name,\n };\n }\n\n /**\n * This method returns the URL to redirect the user to for authentication.\n * @param authConfig authArgs\n * @returns Promise<string | undefined>\n */\n async authenticationUrl(authArgs?: AuthArgs): Promise<string | undefined> {\n let args = this.defaultAuthArgs || {};\n if (authArgs) {\n args = { ...args, ...authArgs };\n }\n return this.session.auth(args);\n }\n\n /**\n * This method sets the default authentication arguments to use when authenticating the user.\n * @param authArgs authArgs\n */\n setDefaultAuthArgs(authArgs: AuthArgs) {\n this.defaultAuthArgs = authArgs;\n }\n}\n"],"version":3}
1
+ {"file":"nylas-api-request-05f1e068.js","mappings":";;;;MAsFa,2BAA2B;IAqBtC,YAAY,OAAsB;QAN1B,oBAAe,GAAa,EAAE,CAAC;QAOrC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;KACxB;IAQD,gBAAgB,CAAC,OAAe;QAC9B,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC;KAC9B;IAWD,MAAM,OAAO,CAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAoB;QAChE,IAAI;YACF,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,aAAa,IAAI,EAAE,EAAE;gBAC7D,MAAM;gBACN,OAAO,EAAE,O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AQ,CAAC;KACjC;;;;;","names":["dataResponse"],"sources":["src/common/nylas-api-request.ts"],"sourcesContent":["import { dataResponse } from '@/utils/utils';\nimport type { NylasSessions } from '@nylas/identity';\nimport { DataResponseReturnType } from './types';\n\n/**\n * Arguments for making a request to the Nylas API.\n */\nexport type NylasRequestArgs = {\n method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';\n path: string;\n body?: any;\n headers?: Record<string, string>;\n};\n\n/**\n * A model representing a user in the Nylas Identity system.\n */\nexport type User = {\n id: string;\n email: string;\n name?: string;\n};\n\n/**\n * Arguments for authenticating a user with the Nylas Identity system.\n */\nexport type AuthArgs = {\n /**\n * The provider of the user's email address.\n */\n provider?: string;\n /**\n * A list of permission scopes for the provider.\n */\n scope?: Array<string>;\n /**\n * The login hint associated with the user.\n */\n loginHint?: string;\n /**\n * Whether to include grant scopes in the auth exchange.\n */\n includeGrantScopes?: boolean;\n prompt?: string;\n metadata?: string;\n state?: string;\n};\n\n/**\n * Interface for making requests to the Nylas API.\n *\n * This is an abstract class that is meant to be implemented by customers to provide their own\n * implementation of making requests to the Nylas API. This allows customers to use their own\n * authentication mechanism, or to use a different HTTP client library.\n */\nexport abstract class NylasApiRequest {\n /**\n * This method should make an authenticated request to the Nylas API.\n * Note: It should not throw an error if the request fails, but should return an object with the error\n * information as part of the tuple returned.\n * @param args NylasRequestArgs\n */\n abstract request<T = any>(args: NylasRequestArgs): Promise<DataResponseReturnType<T>>;\n\n /**\n * This method should return the current user's information.\n */\n\n abstract currentUser(): Promise<User | null>;\n\n /**\n * This method should set the default authentication arguments to use when authenticating the user.\n */\n abstract setDefaultAuthArgs(authArgs: AuthArgs): void;\n\n /**\n * This method should return the URL to redirect the user to for authentication.\n */\n abstract authenticationUrl(authArgs?: AuthArgs): Promise<string | undefined>;\n}\n\n/**\n * A wrapper around the Nylas Identity session that implements the NylasApiRequest interface.\n * This class is used by the Nylas Web Elements to make requests to the Nylas API if no custom\n * implementation of NylasApiRequest is provided.\n */\nexport class NylasIdentityRequestWrapper implements NylasApiRequest {\n /**\n * The Nylas Identity session instance.\n */\n private session: NylasSessions;\n\n /**\n * The grant_id to use for requests, if there is multi-account support\n * enabled in the Nylas Identity settings.\n */\n private activeGrantId?: string;\n\n /**\n * The default authentication arguments to use when authenticating the user.\n */\n private defaultAuthArgs: AuthArgs = {};\n\n /**\n * Constructor for the NylasIdentityRequestWrapper class.\n * @param session The Nylas Identity session instance.\n */\n constructor(session: NylasSessions) {\n this.session = session;\n }\n\n /**\n * This method sets the grant_id to use for requests.\n * This is used when there is multi-account support enabled in the Nylas Identity settings.\n *\n * @param grantId\n */\n setActiveGrantId(grantId: string) {\n this.activeGrantId = grantId;\n }\n\n /**\n * This method makes a request to the Nylas API, using the Nylas Identity's fetch method.\n *\n * The `grants/me/` prefix is added because all requests made from the browser to the Nylas API\n * must be made on behalf of the currently logged in user with a valid access token.\n *\n * @param NylasRequestArgs\n * @returns Promise<[T | null, NylasErrorResponse['error'] | null]>\n */\n async request<T>({ method, path, body, headers }: NylasRequestArgs): Promise<DataResponseReturnType<T>> {\n try {\n const response = await this.session.fetch(`grants/me/${path}`, {\n method,\n headers: headers ? new Headers(headers) : undefined,\n body,\n ...(this.session.isMultiAccount() && this.activeGrantId ? { grant_id: this.activeGrantId } : {}),\n });\n\n // Sometimes the Nylas identity session fetch method returns undefined.\n // Possibly due to CORS issues. In this case, we throw an error.\n if (typeof response === 'undefined') {\n throw new Error('Response is undefined');\n }\n\n return dataResponse(response as T);\n } catch (error) {\n return dataResponse(null as T, {\n message: String(error),\n });\n }\n }\n\n /**\n * This method returns the current (logged in) user's information.\n * If the user is not logged in, it returns null.\n * @returns Promise<User | null>\n */\n async currentUser(): Promise<User | null> {\n const grantId = this.session.isMultiAccount() ? this.activeGrantId : undefined;\n const idToken = await this.session.getProfile(grantId);\n if (!idToken) {\n return null;\n }\n\n return {\n id: idToken.sub,\n email: idToken.email,\n name: idToken.name,\n };\n }\n\n /**\n * This method returns the URL to redirect the user to for authentication.\n * @param authConfig authArgs\n * @returns Promise<string | undefined>\n */\n async authenticationUrl(authArgs?: AuthArgs): Promise<string | undefined> {\n let args = this.defaultAuthArgs || {};\n if (authArgs) {\n args = { ...args, ...authArgs };\n }\n return this.session.auth(args);\n }\n\n /**\n * This method sets the default authentication arguments to use when authenticating the user.\n * @param authArgs authArgs\n */\n setDefaultAuthArgs(authArgs: AuthArgs) {\n this.defaultAuthArgs = authArgs;\n }\n}\n"],"version":3}
@@ -1 +1 @@
1
- {"file":"nylas-api-request-de316f1a.js","mappings":";;;;MA2CsB,eAAe;CAwBpC;MAOY,2BAA2B;IAqBtC,YAAY,OAAsB;QAN1B,oBAAe,GAAa,EAAE,CAAC;QAOrC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;KACxB;IAQD,gBAAgB,CAAC,OAAe;QAC9B,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC;KAC9B;IAWD,MAAM,OAAO,CAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAoB;QAChE,IAAI;YACF,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,aAAa,IAAI,EAAE,EAAE;gBAC7D,MAAM;gBACN,OAAO,EAAE,OAAO,GAAG,IAAI,OAAO,CAAC,OAAO,CAAC,GAAG,SAAS;gBACnD,IAAI;gBACJ,IAAI,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,IAAI,IAAI,CAAC,aAAa,GAAG,EAAE,QAAQ,EAAE,IAAI,CAAC,aAAa,EAAE,GAAG,EAAE,CAAC;aACjG,CAAC,CAAC;YAIH,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE;gBACnC,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;aAC1C;YAED,OAAOA,kBAAY,CAAC,QAAa,CAAC,CAAC;SACpC;QAAC,OAAO,KAAK,EAAE;YACd,OAAOA,kBAAY,CAAC,IAAS,EAAE;gBAC7B,OAAO,EAAE,MAAM,CAAC,KAAK,CAAC;aACvB,CAAC,CAAC;SACJ;KACF;IAOD,MAAM,WAAW;QACf,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,GAAG,IAAI,CAAC,aAAa,GAAG,SAAS,CAAC;QAC/E,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QACvD,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO,IAAI,CAAC;SACb;QAED,OAAO;YACL,EAAE,EAAE,OAAO,CAAC,GAAG;YACf,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,IAAI,EAAE,OAAO,CAAC,IAAI;SACnB,CAAC;KACH;IAOD,MAAM,iBAAiB,CAAC,QAAmB;QACzC,IAAI,IAAI,GAAG,IAAI,CAAC,eAAe,IAAI,EAAE,CAAC;QACtC,IAAI,QAAQ,EAAE;YACZ,IAAI,GAAG,EAAE,GAAG,IAAI,EAAE,GAAG,QAAQ,EAAE,CAAC;SACjC;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KAChC;IAMD,kBAAkB,CAAC,QAAkB;QACnC,IAAI,CAAC,eAAe,GAAG,QAAQ,CAAC;KACjC;;;;;","names":["dataResponse"],"sources":["src/common/nylas-api-request.ts"],"sourcesContent":["import { dataResponse } from '@/utils/utils';\nimport type { NylasSessions } from '@nylas/identity';\nimport { DataResponseReturnType } from './types';\n\n/**\n * Arguments for making a request to the Nylas API.\n */\nexport type NylasRequestArgs = {\n method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';\n path: string;\n body?: any;\n headers?: Record<string, string>;\n};\n\n/**\n * A model representing a user in the Nylas Identity system.\n */\nexport type User = {\n id: string;\n email: string;\n name?: string;\n};\n\n/**\n * Arguments for authenticating a user with the Nylas Identity system.\n */\nexport type AuthArgs = {\n provider?: string;\n scope?: Array<string>;\n loginHint?: string;\n includeGrantScopes?: boolean;\n prompt?: string;\n metadata?: string;\n state?: string;\n};\n\n/**\n * Interface for making requests to the Nylas API.\n *\n * This is an abstract class that is meant to be implemented by customers to provide their own\n * implementation of making requests to the Nylas API. This allows customers to use their own\n * authentication mechanism, or to use a different HTTP client library.\n */\nexport abstract class NylasApiRequest {\n /**\n * This method should make an authenticated request to the Nylas API.\n * Note: It should not throw an error if the request fails, but should return an object with the error\n * information as part of the tuple returned.\n * @param args NylasRequestArgs\n */\n abstract request<T = any>(args: NylasRequestArgs): Promise<DataResponseReturnType<T>>;\n\n /**\n * This method should return the current user's information.\n */\n\n abstract currentUser(): Promise<User | null>;\n\n /**\n * This method should set the default authentication arguments to use when authenticating the user.\n */\n abstract setDefaultAuthArgs(authArgs: AuthArgs): void;\n\n /**\n * This method should return the URL to redirect the user to for authentication.\n */\n abstract authenticationUrl(authArgs?: AuthArgs): Promise<string | undefined>;\n}\n\n/**\n * A wrapper around the Nylas Identity session that implements the NylasApiRequest interface.\n * This class is used by the Nylas Web Elements to make requests to the Nylas API if no custom\n * implementation of NylasApiRequest is provided.\n */\nexport class NylasIdentityRequestWrapper implements NylasApiRequest {\n /**\n * The Nylas Identity session instance.\n */\n private session: NylasSessions;\n\n /**\n * The grant_id to use for requests, if there is multi-account support\n * enabled in the Nylas Identity settings.\n */\n private activeGrantId?: string;\n\n /**\n * The default authentication arguments to use when authenticating the user.\n */\n private defaultAuthArgs: AuthArgs = {};\n\n /**\n * Constructor for the NylasIdentityRequestWrapper class.\n * @param session The Nylas Identity session instance.\n */\n constructor(session: NylasSessions) {\n this.session = session;\n }\n\n /**\n * This method sets the grant_id to use for requests.\n * This is used when there is multi-account support enabled in the Nylas Identity settings.\n *\n * @param grantId\n */\n setActiveGrantId(grantId: string) {\n this.activeGrantId = grantId;\n }\n\n /**\n * This method makes a request to the Nylas API, using the Nylas Identity's fetch method.\n *\n * The `grants/me/` prefix is added because all requests made from the browser to the Nylas API\n * must be made on behalf of the currently logged in user with a valid access token.\n *\n * @param NylasRequestArgs\n * @returns Promise<[T | null, NylasErrorResponse['error'] | null]>\n */\n async request<T>({ method, path, body, headers }: NylasRequestArgs): Promise<DataResponseReturnType<T>> {\n try {\n const response = await this.session.fetch(`grants/me/${path}`, {\n method,\n headers: headers ? new Headers(headers) : undefined,\n body,\n ...(this.session.isMultiAccount() && this.activeGrantId ? { grant_id: this.activeGrantId } : {}),\n });\n\n // Sometimes the Nylas identity session fetch method returns undefined.\n // Possibly due to CORS issues. In this case, we throw an error.\n if (typeof response === 'undefined') {\n throw new Error('Response is undefined');\n }\n\n return dataResponse(response as T);\n } catch (error) {\n return dataResponse(null as T, {\n message: String(error),\n });\n }\n }\n\n /**\n * This method returns the current (logged in) user's information.\n * If the user is not logged in, it returns null.\n * @returns Promise<User | null>\n */\n async currentUser(): Promise<User | null> {\n const grantId = this.session.isMultiAccount() ? this.activeGrantId : undefined;\n const idToken = await this.session.getProfile(grantId);\n if (!idToken) {\n return null;\n }\n\n return {\n id: idToken.sub,\n email: idToken.email,\n name: idToken.name,\n };\n }\n\n /**\n * This method returns the URL to redirect the user to for authentication.\n * @param authConfig authArgs\n * @returns Promise<string | undefined>\n */\n async authenticationUrl(authArgs?: AuthArgs): Promise<string | undefined> {\n let args = this.defaultAuthArgs || {};\n if (authArgs) {\n args = { ...args, ...authArgs };\n }\n return this.session.auth(args);\n }\n\n /**\n * This method sets the default authentication arguments to use when authenticating the user.\n * @param authArgs authArgs\n */\n setDefaultAuthArgs(authArgs: AuthArgs) {\n this.defaultAuthArgs = authArgs;\n }\n}\n"],"version":3}
1
+ {"file":"nylas-api-request-de316f1a.js","mappings":";;;;MAuDsB,eAAe;CAwBpC;MAOY,2BAA2B;IAqBtC,YAAY,OAAsB;QAN1B,oBAAe,GAAa,EAAE,CAAC;QAOrC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;KACxB;IAQD,gBAAgB,CAAC,OAAe;QAC9B,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC;KAC9B;IAWD,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AAE;YACZ,IAAI,GAAG,EAAE,GAAG,IAAI,EAAE,GAAG,QAAQ,EAAE,CAAC;SACjC;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KAChC;IAMD,kBAAkB,CAAC,QAAkB;QACnC,IAAI,CAAC,eAAe,GAAG,QAAQ,CAAC;KACjC;;;;;","names":["dataResponse"],"sources":["src/common/nylas-api-request.ts"],"sourcesContent":["import { dataResponse } from '@/utils/utils';\nimport type { NylasSessions } from '@nylas/identity';\nimport { DataResponseReturnType } from './types';\n\n/**\n * Arguments for making a request to the Nylas API.\n */\nexport type NylasRequestArgs = {\n method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';\n path: string;\n body?: any;\n headers?: Record<string, string>;\n};\n\n/**\n * A model representing a user in the Nylas Identity system.\n */\nexport type User = {\n id: string;\n email: string;\n name?: string;\n};\n\n/**\n * Arguments for authenticating a user with the Nylas Identity system.\n */\nexport type AuthArgs = {\n /**\n * The provider of the user's email address.\n */\n provider?: string;\n /**\n * A list of permission scopes for the provider.\n */\n scope?: Array<string>;\n /**\n * The login hint associated with the user.\n */\n loginHint?: string;\n /**\n * Whether to include grant scopes in the auth exchange.\n */\n includeGrantScopes?: boolean;\n prompt?: string;\n metadata?: string;\n state?: string;\n};\n\n/**\n * Interface for making requests to the Nylas API.\n *\n * This is an abstract class that is meant to be implemented by customers to provide their own\n * implementation of making requests to the Nylas API. This allows customers to use their own\n * authentication mechanism, or to use a different HTTP client library.\n */\nexport abstract class NylasApiRequest {\n /**\n * This method should make an authenticated request to the Nylas API.\n * Note: It should not throw an error if the request fails, but should return an object with the error\n * information as part of the tuple returned.\n * @param args NylasRequestArgs\n */\n abstract request<T = any>(args: NylasRequestArgs): Promise<DataResponseReturnType<T>>;\n\n /**\n * This method should return the current user's information.\n */\n\n abstract currentUser(): Promise<User | null>;\n\n /**\n * This method should set the default authentication arguments to use when authenticating the user.\n */\n abstract setDefaultAuthArgs(authArgs: AuthArgs): void;\n\n /**\n * This method should return the URL to redirect the user to for authentication.\n */\n abstract authenticationUrl(authArgs?: AuthArgs): Promise<string | undefined>;\n}\n\n/**\n * A wrapper around the Nylas Identity session that implements the NylasApiRequest interface.\n * This class is used by the Nylas Web Elements to make requests to the Nylas API if no custom\n * implementation of NylasApiRequest is provided.\n */\nexport class NylasIdentityRequestWrapper implements NylasApiRequest {\n /**\n * The Nylas Identity session instance.\n */\n private session: NylasSessions;\n\n /**\n * The grant_id to use for requests, if there is multi-account support\n * enabled in the Nylas Identity settings.\n */\n private activeGrantId?: string;\n\n /**\n * The default authentication arguments to use when authenticating the user.\n */\n private defaultAuthArgs: AuthArgs = {};\n\n /**\n * Constructor for the NylasIdentityRequestWrapper class.\n * @param session The Nylas Identity session instance.\n */\n constructor(session: NylasSessions) {\n this.session = session;\n }\n\n /**\n * This method sets the grant_id to use for requests.\n * This is used when there is multi-account support enabled in the Nylas Identity settings.\n *\n * @param grantId\n */\n setActiveGrantId(grantId: string) {\n this.activeGrantId = grantId;\n }\n\n /**\n * This method makes a request to the Nylas API, using the Nylas Identity's fetch method.\n *\n * The `grants/me/` prefix is added because all requests made from the browser to the Nylas API\n * must be made on behalf of the currently logged in user with a valid access token.\n *\n * @param NylasRequestArgs\n * @returns Promise<[T | null, NylasErrorResponse['error'] | null]>\n */\n async request<T>({ method, path, body, headers }: NylasRequestArgs): Promise<DataResponseReturnType<T>> {\n try {\n const response = await this.session.fetch(`grants/me/${path}`, {\n method,\n headers: headers ? new Headers(headers) : undefined,\n body,\n ...(this.session.isMultiAccount() && this.activeGrantId ? { grant_id: this.activeGrantId } : {}),\n });\n\n // Sometimes the Nylas identity session fetch method returns undefined.\n // Possibly due to CORS issues. In this case, we throw an error.\n if (typeof response === 'undefined') {\n throw new Error('Response is undefined');\n }\n\n return dataResponse(response as T);\n } catch (error) {\n return dataResponse(null as T, {\n message: String(error),\n });\n }\n }\n\n /**\n * This method returns the current (logged in) user's information.\n * If the user is not logged in, it returns null.\n * @returns Promise<User | null>\n */\n async currentUser(): Promise<User | null> {\n const grantId = this.session.isMultiAccount() ? this.activeGrantId : undefined;\n const idToken = await this.session.getProfile(grantId);\n if (!idToken) {\n return null;\n }\n\n return {\n id: idToken.sub,\n email: idToken.email,\n name: idToken.name,\n };\n }\n\n /**\n * This method returns the URL to redirect the user to for authentication.\n * @param authConfig authArgs\n * @returns Promise<string | undefined>\n */\n async authenticationUrl(authArgs?: AuthArgs): Promise<string | undefined> {\n let args = this.defaultAuthArgs || {};\n if (authArgs) {\n args = { ...args, ...authArgs };\n }\n return this.session.auth(args);\n }\n\n /**\n * This method sets the default authentication arguments to use when authenticating the user.\n * @param authArgs authArgs\n */\n setDefaultAuthArgs(authArgs: AuthArgs) {\n this.defaultAuthArgs = authArgs;\n }\n}\n"],"version":3}