@nylas/web-elements 1.3.2 → 1.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (210) hide show
  1. package/dist/cdn/checkbox-component/checkbox-component.es.js +48 -38
  2. package/dist/cdn/multi-select-dropdown/multi-select-dropdown.es.js +554 -535
  3. package/dist/cdn/nylas-additional-participants/nylas-additional-participants.es.js +2 -2
  4. package/dist/cdn/nylas-booking-form/nylas-booking-form.es.js +25 -9
  5. package/dist/cdn/nylas-booking-form-config/nylas-booking-form-config.es.js +2182 -2171
  6. package/dist/cdn/nylas-buffer-time/nylas-buffer-time.es.js +13 -14
  7. package/dist/cdn/nylas-calendar-picker/nylas-calendar-picker.es.js +571 -552
  8. package/dist/cdn/nylas-connected-calendars/nylas-connected-calendars.es.js +26 -7
  9. package/dist/cdn/nylas-customize-booking-settings/nylas-customize-booking-settings.es.js +12 -2
  10. package/dist/cdn/nylas-date-component/nylas-date-component.es.js +13 -7
  11. package/dist/cdn/nylas-editor-tabs/nylas-editor-tabs.es.js +3550 -3473
  12. package/dist/cdn/nylas-event-location/nylas-event-location.es.js +633 -621
  13. package/dist/cdn/nylas-limit-future-bookings/nylas-limit-future-bookings.es.js +25 -2
  14. package/dist/cdn/nylas-min-booking-notice/nylas-min-booking-notice.es.js +25 -2
  15. package/dist/cdn/nylas-min-cancellation-notice/nylas-min-cancellation-notice.es.js +163 -140
  16. package/dist/cdn/nylas-page-styling/nylas-page-styling.es.js +5 -3
  17. package/dist/cdn/nylas-participants-custom-availability/nylas-participants-custom-availability.es.js +4 -3
  18. package/dist/cdn/nylas-provider/nylas-provider.es.js +1 -1
  19. package/dist/cdn/nylas-scheduler-editor/nylas-scheduler-editor.es.js +173 -96
  20. package/dist/cdn/nylas-scheduling/nylas-scheduling.es.js +28 -12
  21. package/dist/cdn/scheduler-store/scheduler-store.es.js +1 -1
  22. package/dist/cdn/time-period-selector/time-period-selector.es.js +25 -2
  23. package/dist/cjs/calendar-agenda-fill-icon_53.cjs.entry.js +88 -57
  24. package/dist/cjs/calendar-agenda-fill-icon_53.cjs.entry.js.map +1 -1
  25. package/dist/cjs/checkbox-component.cjs.entry.js +9 -1
  26. package/dist/cjs/checkbox-component.cjs.entry.js.map +1 -1
  27. package/dist/cjs/checkbox-component_3.cjs.entry.js +21 -8
  28. package/dist/cjs/checkbox-component_3.cjs.entry.js.map +1 -1
  29. package/dist/cjs/google-logo-icon_4.cjs.entry.js +2 -2
  30. package/dist/cjs/loader.cjs.js +1 -1
  31. package/dist/cjs/multi-select-dropdown.cjs.entry.js +19 -1
  32. package/dist/cjs/multi-select-dropdown.cjs.entry.js.map +1 -1
  33. package/dist/cjs/nylas-additional-participants.cjs.entry.js +1 -1
  34. package/dist/cjs/nylas-additional-participants.cjs.entry.js.map +1 -1
  35. package/dist/cjs/nylas-booking-form-config.cjs.entry.js +34 -27
  36. package/dist/cjs/nylas-booking-form-config.cjs.entry.js.map +1 -1
  37. package/dist/cjs/nylas-buffer-time.cjs.entry.js +13 -12
  38. package/dist/cjs/nylas-buffer-time.cjs.entry.js.map +1 -1
  39. package/dist/cjs/nylas-connected-calendars.cjs.entry.js +2 -2
  40. package/dist/cjs/nylas-connected-calendars.cjs.entry.js.map +1 -1
  41. package/dist/cjs/nylas-date-component.cjs.entry.js +12 -7
  42. package/dist/cjs/nylas-date-component.cjs.entry.js.map +1 -1
  43. package/dist/cjs/nylas-editor-tabs.cjs.entry.js +2 -2
  44. package/dist/cjs/nylas-event-location.cjs.entry.js +32 -11
  45. package/dist/cjs/nylas-event-location.cjs.entry.js.map +1 -1
  46. package/dist/cjs/nylas-page-styling.cjs.entry.js +3 -2
  47. package/dist/cjs/nylas-page-styling.cjs.entry.js.map +1 -1
  48. package/dist/cjs/nylas-participants-custom-availability.cjs.entry.js +3 -2
  49. package/dist/cjs/nylas-participants-custom-availability.cjs.entry.js.map +1 -1
  50. package/dist/cjs/nylas-provider.cjs.entry.js +1 -1
  51. package/dist/cjs/nylas-scheduling.cjs.entry.js +3 -3
  52. package/dist/cjs/nylas-web-elements.cjs.js +1 -1
  53. package/dist/cjs/{scheduler-store-37a0e152.js → scheduler-store-2cd220d1.js} +2 -2
  54. package/dist/cjs/{scheduler-store-37a0e152.js.map → scheduler-store-2cd220d1.js.map} +1 -1
  55. package/dist/cjs/{scheduler-store-373adf03.js → scheduler-store-70af2279.js} +2 -2
  56. package/dist/cjs/{scheduler-store-373adf03.js.map → scheduler-store-70af2279.js.map} +1 -1
  57. package/dist/cjs/time-period-selector.cjs.entry.js +21 -1
  58. package/dist/cjs/time-period-selector.cjs.entry.js.map +1 -1
  59. package/dist/collection/components/design-system/checkbox-component/checkbox-component.js +12 -1
  60. package/dist/collection/components/design-system/checkbox-component/checkbox-component.js.map +1 -1
  61. package/dist/collection/components/design-system/multi-select-dropdown/multi-select-dropdown.js +22 -1
  62. package/dist/collection/components/design-system/multi-select-dropdown/multi-select-dropdown.js.map +1 -1
  63. package/dist/collection/components/design-system/nylas-date-component/nylas-date-component.js +14 -8
  64. package/dist/collection/components/design-system/nylas-date-component/nylas-date-component.js.map +1 -1
  65. package/dist/collection/components/design-system/nylas-date-component/test/nylas-date-component.spec.js +39 -0
  66. package/dist/collection/components/design-system/nylas-date-component/test/nylas-date-component.spec.js.map +1 -0
  67. package/dist/collection/components/design-system/time-period-selector/time-period-selector.js +28 -1
  68. package/dist/collection/components/design-system/time-period-selector/time-period-selector.js.map +1 -1
  69. package/dist/collection/components/scheduler/nylas-date-picker/test/nylas-date-picker.spec.js +3 -1
  70. package/dist/collection/components/scheduler/nylas-date-picker/test/nylas-date-picker.spec.js.map +1 -1
  71. package/dist/collection/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.js +1 -1
  72. package/dist/collection/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.js.map +1 -1
  73. package/dist/collection/components/scheduler-editor/nylas-booking-form-config/nylas-booking-form-config.js +36 -27
  74. package/dist/collection/components/scheduler-editor/nylas-booking-form-config/nylas-booking-form-config.js.map +1 -1
  75. package/dist/collection/components/scheduler-editor/nylas-booking-form-config/test/nylas-booking-form-config.spec.js +23 -0
  76. package/dist/collection/components/scheduler-editor/nylas-booking-form-config/test/nylas-booking-form-config.spec.js.map +1 -1
  77. package/dist/collection/components/scheduler-editor/nylas-buffer-time/nylas-buffer-time.js +13 -12
  78. package/dist/collection/components/scheduler-editor/nylas-buffer-time/nylas-buffer-time.js.map +1 -1
  79. package/dist/collection/components/scheduler-editor/nylas-calendar-picker/test/nylas-calendar-picker.spec.js +13 -0
  80. package/dist/collection/components/scheduler-editor/nylas-calendar-picker/test/nylas-calendar-picker.spec.js.map +1 -1
  81. package/dist/collection/components/scheduler-editor/nylas-connected-calendars/nylas-connected-calendars.js +2 -2
  82. package/dist/collection/components/scheduler-editor/nylas-connected-calendars/nylas-connected-calendars.js.map +1 -1
  83. package/dist/collection/components/scheduler-editor/nylas-event-location/nylas-event-location.js +35 -10
  84. package/dist/collection/components/scheduler-editor/nylas-event-location/nylas-event-location.js.map +1 -1
  85. package/dist/collection/components/scheduler-editor/nylas-page-styling/nylas-page-styling.js +4 -1
  86. package/dist/collection/components/scheduler-editor/nylas-page-styling/nylas-page-styling.js.map +1 -1
  87. package/dist/collection/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.js +3 -2
  88. package/dist/collection/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.js.map +1 -1
  89. package/dist/components/checkbox-component2.js +12 -2
  90. package/dist/components/checkbox-component2.js.map +1 -1
  91. package/dist/components/multi-select-dropdown2.js +22 -2
  92. package/dist/components/multi-select-dropdown2.js.map +1 -1
  93. package/dist/components/nylas-additional-participants2.js +1 -1
  94. package/dist/components/nylas-additional-participants2.js.map +1 -1
  95. package/dist/components/nylas-booking-form-config2.js +35 -27
  96. package/dist/components/nylas-booking-form-config2.js.map +1 -1
  97. package/dist/components/nylas-buffer-time2.js +13 -12
  98. package/dist/components/nylas-buffer-time2.js.map +1 -1
  99. package/dist/components/nylas-connected-calendars2.js +2 -2
  100. package/dist/components/nylas-connected-calendars2.js.map +1 -1
  101. package/dist/components/nylas-date-component2.js +14 -8
  102. package/dist/components/nylas-date-component2.js.map +1 -1
  103. package/dist/components/nylas-editor-tabs2.js +2 -2
  104. package/dist/components/nylas-event-location2.js +35 -12
  105. package/dist/components/nylas-event-location2.js.map +1 -1
  106. package/dist/components/nylas-page-styling2.js +5 -3
  107. package/dist/components/nylas-page-styling2.js.map +1 -1
  108. package/dist/components/nylas-participants-custom-availability2.js +3 -2
  109. package/dist/components/nylas-participants-custom-availability2.js.map +1 -1
  110. package/dist/components/nylas-scheduling.js +2 -2
  111. package/dist/components/scheduler-store.js +1 -1
  112. package/dist/components/time-period-selector2.js +26 -2
  113. package/dist/components/time-period-selector2.js.map +1 -1
  114. package/dist/esm/calendar-agenda-fill-icon_53.entry.js +88 -57
  115. package/dist/esm/calendar-agenda-fill-icon_53.entry.js.map +1 -1
  116. package/dist/esm/checkbox-component.entry.js +9 -1
  117. package/dist/esm/checkbox-component.entry.js.map +1 -1
  118. package/dist/esm/checkbox-component_3.entry.js +21 -8
  119. package/dist/esm/checkbox-component_3.entry.js.map +1 -1
  120. package/dist/esm/google-logo-icon_4.entry.js +2 -2
  121. package/dist/esm/loader.js +1 -1
  122. package/dist/esm/multi-select-dropdown.entry.js +19 -1
  123. package/dist/esm/multi-select-dropdown.entry.js.map +1 -1
  124. package/dist/esm/nylas-additional-participants.entry.js +1 -1
  125. package/dist/esm/nylas-additional-participants.entry.js.map +1 -1
  126. package/dist/esm/nylas-booking-form-config.entry.js +34 -27
  127. package/dist/esm/nylas-booking-form-config.entry.js.map +1 -1
  128. package/dist/esm/nylas-buffer-time.entry.js +13 -12
  129. package/dist/esm/nylas-buffer-time.entry.js.map +1 -1
  130. package/dist/esm/nylas-connected-calendars.entry.js +2 -2
  131. package/dist/esm/nylas-connected-calendars.entry.js.map +1 -1
  132. package/dist/esm/nylas-date-component.entry.js +12 -7
  133. package/dist/esm/nylas-date-component.entry.js.map +1 -1
  134. package/dist/esm/nylas-editor-tabs.entry.js +2 -2
  135. package/dist/esm/nylas-event-location.entry.js +32 -11
  136. package/dist/esm/nylas-event-location.entry.js.map +1 -1
  137. package/dist/esm/nylas-page-styling.entry.js +3 -2
  138. package/dist/esm/nylas-page-styling.entry.js.map +1 -1
  139. package/dist/esm/nylas-participants-custom-availability.entry.js +3 -2
  140. package/dist/esm/nylas-participants-custom-availability.entry.js.map +1 -1
  141. package/dist/esm/nylas-provider.entry.js +1 -1
  142. package/dist/esm/nylas-scheduling.entry.js +3 -3
  143. package/dist/esm/nylas-web-elements.js +1 -1
  144. package/dist/esm/{scheduler-store-20151a77.js → scheduler-store-3acf4d70.js} +2 -2
  145. package/dist/esm/{scheduler-store-20151a77.js.map → scheduler-store-3acf4d70.js.map} +1 -1
  146. package/dist/esm/{scheduler-store-b6d12f40.js → scheduler-store-79dc16cc.js} +2 -2
  147. package/dist/esm/{scheduler-store-b6d12f40.js.map → scheduler-store-79dc16cc.js.map} +1 -1
  148. package/dist/esm/time-period-selector.entry.js +21 -1
  149. package/dist/esm/time-period-selector.entry.js.map +1 -1
  150. package/dist/nylas-web-elements/checkbox-component.entry.js +9 -1
  151. package/dist/nylas-web-elements/checkbox-component.entry.js.map +1 -1
  152. package/dist/nylas-web-elements/multi-select-dropdown.entry.js +19 -1
  153. package/dist/nylas-web-elements/multi-select-dropdown.entry.js.map +1 -1
  154. package/dist/nylas-web-elements/nylas-additional-participants.entry.js +1 -1
  155. package/dist/nylas-web-elements/nylas-additional-participants.entry.js.map +1 -1
  156. package/dist/nylas-web-elements/nylas-booking-form-config.entry.js +34 -27
  157. package/dist/nylas-web-elements/nylas-booking-form-config.entry.js.map +1 -1
  158. package/dist/nylas-web-elements/nylas-buffer-time.entry.js +13 -12
  159. package/dist/nylas-web-elements/nylas-buffer-time.entry.js.map +1 -1
  160. package/dist/nylas-web-elements/nylas-connected-calendars.entry.js +2 -2
  161. package/dist/nylas-web-elements/nylas-connected-calendars.entry.js.map +1 -1
  162. package/dist/nylas-web-elements/nylas-date-component.entry.js +12 -7
  163. package/dist/nylas-web-elements/nylas-date-component.entry.js.map +1 -1
  164. package/dist/nylas-web-elements/nylas-editor-tabs.entry.js +2 -2
  165. package/dist/nylas-web-elements/nylas-event-location.entry.js +32 -11
  166. package/dist/nylas-web-elements/nylas-event-location.entry.js.map +1 -1
  167. package/dist/nylas-web-elements/nylas-page-styling.entry.js +3 -2
  168. package/dist/nylas-web-elements/nylas-page-styling.entry.js.map +1 -1
  169. package/dist/nylas-web-elements/nylas-participants-custom-availability.entry.js +3 -2
  170. package/dist/nylas-web-elements/nylas-participants-custom-availability.entry.js.map +1 -1
  171. package/dist/nylas-web-elements/nylas-provider.entry.js +1 -1
  172. package/dist/nylas-web-elements/nylas-scheduling.entry.js +3 -3
  173. package/dist/nylas-web-elements/nylas-web-elements.esm.js +1 -1
  174. package/dist/nylas-web-elements/p-040b8553.entry.js +2 -0
  175. package/dist/nylas-web-elements/p-040b8553.entry.js.map +1 -0
  176. package/dist/nylas-web-elements/p-13a83f9a.entry.js +8 -0
  177. package/dist/nylas-web-elements/p-13a83f9a.entry.js.map +1 -0
  178. package/dist/nylas-web-elements/p-1a9fc29a.entry.js +2 -0
  179. package/dist/nylas-web-elements/p-1a9fc29a.entry.js.map +1 -0
  180. package/dist/nylas-web-elements/{p-e543a827.entry.js → p-1dedce7c.entry.js} +2 -2
  181. package/dist/nylas-web-elements/{p-284c14bb.js → p-53f7b360.js} +2 -2
  182. package/dist/nylas-web-elements/p-7f100474.entry.js +2 -0
  183. package/dist/nylas-web-elements/p-7f100474.entry.js.map +1 -0
  184. package/dist/nylas-web-elements/{p-70d36207.entry.js → p-84e69241.entry.js} +2 -2
  185. package/dist/nylas-web-elements/{p-36c73819.entry.js → p-ad7f8831.entry.js} +2 -2
  186. package/dist/nylas-web-elements/{scheduler-store-b6d12f40.js → scheduler-store-79dc16cc.js} +2 -2
  187. package/dist/nylas-web-elements/{scheduler-store-b6d12f40.js.map → scheduler-store-79dc16cc.js.map} +1 -1
  188. package/dist/nylas-web-elements/time-period-selector.entry.js +21 -1
  189. package/dist/nylas-web-elements/time-period-selector.entry.js.map +1 -1
  190. package/dist/types/components/design-system/checkbox-component/checkbox-component.d.ts +1 -0
  191. package/dist/types/components/design-system/multi-select-dropdown/multi-select-dropdown.d.ts +2 -0
  192. package/dist/types/components/design-system/nylas-date-component/nylas-date-component.d.ts +1 -0
  193. package/dist/types/components/design-system/time-period-selector/time-period-selector.d.ts +3 -0
  194. package/dist/types/components/scheduler-editor/nylas-booking-form-config/nylas-booking-form-config.d.ts +2 -0
  195. package/dist/types/components/scheduler-editor/nylas-buffer-time/nylas-buffer-time.d.ts +2 -0
  196. package/dist/types/components/scheduler-editor/nylas-event-location/nylas-event-location.d.ts +3 -0
  197. package/dist/types/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.d.ts +2 -2
  198. package/package.json +1 -1
  199. package/dist/nylas-web-elements/p-2fa604d7.entry.js +0 -2
  200. package/dist/nylas-web-elements/p-2fa604d7.entry.js.map +0 -1
  201. package/dist/nylas-web-elements/p-52b9c0cb.entry.js +0 -2
  202. package/dist/nylas-web-elements/p-52b9c0cb.entry.js.map +0 -1
  203. package/dist/nylas-web-elements/p-9db69aed.entry.js +0 -2
  204. package/dist/nylas-web-elements/p-9db69aed.entry.js.map +0 -1
  205. package/dist/nylas-web-elements/p-a1a75dc7.entry.js +0 -8
  206. package/dist/nylas-web-elements/p-a1a75dc7.entry.js.map +0 -1
  207. /package/dist/nylas-web-elements/{p-e543a827.entry.js.map → p-1dedce7c.entry.js.map} +0 -0
  208. /package/dist/nylas-web-elements/{p-284c14bb.js.map → p-53f7b360.js.map} +0 -0
  209. /package/dist/nylas-web-elements/{p-70d36207.entry.js.map → p-84e69241.entry.js.map} +0 -0
  210. /package/dist/nylas-web-elements/{p-36c73819.entry.js.map → p-ad7f8831.entry.js.map} +0 -0
@@ -14803,6 +14803,9 @@ const checkboxComponentCss = '.checkbox-container{--nylas-primary:#2563eb;--nyla
14803
14803
  constructor() {
14804
14804
  super(), this.__registerHost(), this.__attachShadow(), this.nylasFormCheckboxToggled = createEvent(this, "nylasFormCheckboxToggled", 7), this.componentType = "checkbox", this.name = "checkbox", this.checked = void 0, this.label = "", this.required = !1, this.isChecked = void 0, this.error = "";
14805
14805
  }
14806
+ checkedPropChangedHandler(ue) {
14807
+ typeof ue == "boolean" && (this.isChecked = ue);
14808
+ }
14806
14809
  componentWillLoad() {
14807
14810
  this.el.setAttribute("component-type", this.componentType);
14808
14811
  }
@@ -14824,11 +14827,16 @@ const checkboxComponentCss = '.checkbox-container{--nylas-primary:#2563eb;--nyla
14824
14827
  });
14825
14828
  }
14826
14829
  render() {
14827
- return h$2("div", { key: "f4dfab5a5da9f9c79424930bfd5497c24dc1bfe5", class: "checkbox-container" }, h$2("label", { key: "78e192f2eddcfd788ac16e80be3ac0b9c47e6f6a" }, h$2("input", { key: "6e3aa50fb6542cb134dc5454e9fc0052be22e36f", type: "checkbox", name: this.name, checked: this.isChecked, onChange: () => this.toggleCheck() }), h$2("span", { key: "abbd103b06bf934eff294b443b468e446901c371", class: "checkmark" }), h$2("slot", { key: "f11d669ba02b705ba7679985e83b91086a17ccc9", name: "label" }, h$2("span", { key: "1298c44fbbe9ce75638b00ac07e6e83bab1394c2", class: "label" }, this.label))), this.error && h$2("p", { class: "error" }, this.error));
14830
+ return h$2("div", { key: "0be06ba2c6b6ed277b3ba736827f9f60e18c6056", class: "checkbox-container" }, h$2("label", { key: "a0a0cf6b1f546b8d1485dd3aee1b686f0e9c9cba" }, h$2("input", { key: "96bdb407b3ab6f668cf94b83e8091a604743f93f", type: "checkbox", name: this.name, checked: this.isChecked, onChange: () => this.toggleCheck() }), h$2("span", { key: "d345d3b47c14213487a9108d78abbf0db26f25af", class: "checkmark" }), h$2("slot", { key: "aba536e12ed7a97d18790f1a212ead284c1253ec", name: "label" }, h$2("span", { key: "e7767302bc6865b99cf42949e8bd032e237d2ad9", class: "label" }, this.label))), this.error && h$2("p", { class: "error" }, this.error));
14828
14831
  }
14829
14832
  get el() {
14830
14833
  return this;
14831
14834
  }
14835
+ static get watchers() {
14836
+ return {
14837
+ checked: ["checkedPropChangedHandler"]
14838
+ };
14839
+ }
14832
14840
  static get style() {
14833
14841
  return CheckboxComponentStyle0;
14834
14842
  }
@@ -14839,7 +14847,9 @@ const checkboxComponentCss = '.checkbox-container{--nylas-primary:#2563eb;--nyla
14839
14847
  required: [4],
14840
14848
  isChecked: [32],
14841
14849
  error: [32]
14842
- }, [[4, "bookingFormSubmitted", "handleBookingFormSubmitted"]]]);
14850
+ }, [[4, "bookingFormSubmitted", "handleBookingFormSubmitted"]], {
14851
+ checked: ["checkedPropChangedHandler"]
14852
+ }]);
14843
14853
  function defineCustomElement$1e() {
14844
14854
  if (typeof customElements > "u")
14845
14855
  return;
@@ -15847,6 +15857,18 @@ const multiSelectDropdownCss = ':host{display:block;width:inherit;--nylas-primar
15847
15857
  constructor() {
15848
15858
  super(), this.__registerHost(), this.__attachShadow(), this.selectedOptionsChanged = createEvent(this, "selectedOptionsChanged", 7), this.name = void 0, this.label = void 0, this.options = [], this.error = "", this.availableOptions = this.options, this.isOpen = !1, this.ariaActivedescendant = "", this.shouldFocusFirstOption = !1;
15849
15859
  }
15860
+ areOptionsEqual(ue, ge) {
15861
+ if (ue.length !== ge.length)
15862
+ return !1;
15863
+ const Oe = [...ue].sort((vt, ln) => vt.label.localeCompare(ln.label) || vt.value.localeCompare(ln.value)), Ke = [...ge].sort((vt, ln) => vt.label.localeCompare(ln.label) || vt.value.localeCompare(ln.value));
15864
+ return Oe.every((vt, ln) => {
15865
+ const ei = Ke[ln];
15866
+ return vt.label === ei.label && vt.value === ei.value;
15867
+ });
15868
+ }
15869
+ optionsChangedHandler(ue) {
15870
+ this.areOptionsEqual(ue, this.availableOptions) || (this.availableOptions = ue);
15871
+ }
15850
15872
  componentDidLoad() {
15851
15873
  debug("multi-select-dropdown", "componentDidLoad"), this.options && (this.availableOptions = this.options);
15852
15874
  }
@@ -15925,11 +15947,16 @@ const multiSelectDropdownCss = ':host{display:block;width:inherit;--nylas-primar
15925
15947
  }
15926
15948
  render() {
15927
15949
  var ue, ge;
15928
- return h$2(Host, { key: "e1d4d14ecbb535efa9c01bbd472648b0a11f80f0" }, h$2("div", { key: "4fa54bb57eea3f45d49d0864e11ca20bb6b9b16c", class: "dropdown", part: "msd_dropdown" }, h$2("label", { key: "dd418efe1b38427042f1f88b9fd615ee89c9f5d9", class: "dropdown-label" }, this.label, h$2("slot", { key: "a8cd3f9fd40a3b77683c636b3b835e0cbd738981", name: "label-icon", "aria-hidden": "true" })), h$2("button", { key: "d39f657c45ecd246018f4c5db904ad37d475634b", name: this.name, part: `msd_dropdown-button ${this.error ? "msd_dropdown-button--error" : ""}`, class: { dropbtn: !0, open: this.isOpen, error: !!this.error }, onClick: () => this.toggleDropdown(), "aria-haspopup": "listbox", "aria-expanded": this.isOpen ? "true" : "false", "aria-label": this.name, onKeyDown: (Oe) => this.handleSelectButtonKeyDown(Oe) }, h$2("slot", { key: "45f912fd627eb75e06446a782d91b27bf138677c", name: "select-icon", "aria-hidden": "true" }), h$2("span", { key: "8271bafba127888d6646b31749292b049e190589", class: "selected-option", part: "msd_dropdown-button-selected-label" }, this.getSelectedOptions().length > 1 ? "Multiple options selected" : ((ue = this.availableOptions.filter((Oe) => Oe.selected)[0]) == null ? void 0 : ue.label) ?? ((ge = this.availableOptions[0]) == null ? void 0 : ge.label)), h$2("span", { key: "75caecf1bffad204acab61b8d8809b03a9dbeb73", class: this.isOpen ? "open" : "closed", "aria-hidden": "true" }, h$2("chevron-icon", { key: "cc9faf08225b9c73481d27a9b3f6e7a43b379c25", width: "16", height: "16" }))), this.error ? h$2("span", { class: "error" }, this.error) : null, this.isOpen ? null : h$2("div", { class: "selected-options" }, this.getSelectedOptions().map((Oe) => h$2("span", { class: "selected-option" }, Oe.label, h$2("button", { key: Oe.label, onClick: () => this.selectOption(Oe) }, h$2("close-icon", null))))), this.isOpen ? h$2("div", { class: "dropdown-content", part: "msd_dropdown-content" }, h$2("ul", { tabindex: "-1", role: "listbox", "aria-label": this.name, "aria-multiselectable": !0, "aria-activedescendant": this.ariaActivedescendant, onKeyDown: (Oe) => this.handleListboxKeydown(Oe) }, this.availableOptions.map((Oe) => this.renderOption(Oe)))) : null));
15950
+ return h$2(Host, { key: "f8e72e38ce1323acd6ca5ada6c9b8e4a52fd5cd3" }, h$2("div", { key: "acd2eead0fe45b85da48057a52d3f99337870795", class: "dropdown", part: "msd_dropdown" }, h$2("label", { key: "c586999e4b30f366d6033bef3cbf1142040db8a3", class: "dropdown-label" }, this.label, h$2("slot", { key: "2817a8851a72bbabe9309c3da79e8ca25c1c461e", name: "label-icon", "aria-hidden": "true" })), h$2("button", { key: "588fd27317e0c73ad8a83ac18e826b62ab968128", name: this.name, part: `msd_dropdown-button ${this.error ? "msd_dropdown-button--error" : ""}`, class: { dropbtn: !0, open: this.isOpen, error: !!this.error }, onClick: () => this.toggleDropdown(), "aria-haspopup": "listbox", "aria-expanded": this.isOpen ? "true" : "false", "aria-label": this.name, onKeyDown: (Oe) => this.handleSelectButtonKeyDown(Oe) }, h$2("slot", { key: "e6fc309a7ffb30921118e1cd1d1fb4aea321a0fb", name: "select-icon", "aria-hidden": "true" }), h$2("span", { key: "62a4abccd0100022f7e163410ffaf8fca8ebaefb", class: "selected-option", part: "msd_dropdown-button-selected-label" }, this.getSelectedOptions().length > 1 ? "Multiple options selected" : ((ue = this.availableOptions.filter((Oe) => Oe.selected)[0]) == null ? void 0 : ue.label) ?? ((ge = this.availableOptions[0]) == null ? void 0 : ge.label)), h$2("span", { key: "1fff4fa8e566dcec2ac9e28bcededc41c7b42585", class: this.isOpen ? "open" : "closed", "aria-hidden": "true" }, h$2("chevron-icon", { key: "39b47d625b2e3e78f795e3853e8a4811842036de", width: "16", height: "16" }))), this.error ? h$2("span", { class: "error" }, this.error) : null, this.isOpen ? null : h$2("div", { class: "selected-options" }, this.getSelectedOptions().map((Oe) => h$2("span", { class: "selected-option" }, Oe.label, h$2("button", { key: Oe.label, onClick: () => this.selectOption(Oe) }, h$2("close-icon", null))))), this.isOpen ? h$2("div", { class: "dropdown-content", part: "msd_dropdown-content" }, h$2("ul", { tabindex: "-1", role: "listbox", "aria-label": this.name, "aria-multiselectable": !0, "aria-activedescendant": this.ariaActivedescendant, onKeyDown: (Oe) => this.handleListboxKeydown(Oe) }, this.availableOptions.map((Oe) => this.renderOption(Oe)))) : null));
15929
15951
  }
15930
15952
  get el() {
15931
15953
  return this;
15932
15954
  }
15955
+ static get watchers() {
15956
+ return {
15957
+ options: ["optionsChangedHandler"]
15958
+ };
15959
+ }
15933
15960
  static get style() {
15934
15961
  return MultiSelectDropdownStyle0;
15935
15962
  }
@@ -15942,7 +15969,9 @@ const multiSelectDropdownCss = ':host{display:block;width:inherit;--nylas-primar
15942
15969
  isOpen: [32],
15943
15970
  ariaActivedescendant: [32],
15944
15971
  shouldFocusFirstOption: [32]
15945
- }, [[6, "click", "handleOutsideClick"]]]);
15972
+ }, [[6, "click", "handleOutsideClick"]], {
15973
+ options: ["optionsChangedHandler"]
15974
+ }]);
15946
15975
  function defineCustomElement$R() {
15947
15976
  if (typeof customElements > "u")
15948
15977
  return;
@@ -16083,10 +16112,10 @@ const NylasAdditionalParticipants = proxyCustomElement(class extends H$2 {
16083
16112
  debug("nylas-additional-participants", "connectedCallback");
16084
16113
  }
16085
16114
  componentWillLoad() {
16086
- debug("nylas-additional-participants", "componentWillLoad"), this.host.setAttribute("name", this.name), this.updateState(this.selectedConfiguration, this.currentUser);
16115
+ debug("nylas-additional-participants", "componentWillLoad"), this.host.setAttribute("name", this.name);
16087
16116
  }
16088
16117
  componentDidLoad() {
16089
- debug("nylas-additional-participants", "componentDidLoad");
16118
+ debug("nylas-additional-participants", "componentDidLoad"), this.updateState(this.selectedConfiguration, this.currentUser);
16090
16119
  }
16091
16120
  disconnectedCallback() {
16092
16121
  debug("nylas-additional-participants", "disconnectedCallback");
@@ -18242,7 +18271,7 @@ const nylasDateComponentCss = ':host{display:block;height:auto;--nylas-primary:#
18242
18271
  date: "YYYY-MM-DD"
18243
18272
  }, NylasDateComponent = proxyCustomElement(class extends H$2 {
18244
18273
  constructor() {
18245
- super(), this.__registerHost(), this.__attachShadow(), this.nylasFormInputChanged = createEvent(this, "nylasFormInputChanged", 7), this.nylasFormInputFocused = createEvent(this, "nylasFormInputFocused", 7), this.nylasFormInputBlurred = createEvent(this, "nylasFormInputBlurred", 7), this.name = "input", this.defaultValue = void 0, this.label = "", this.placeholder = DefaultPlaceholder.date, this.required = !1, this.readOnly = !1, this.autoFocus = !1, this.pattern = void 0, this.maxLength = 255, this.patternError = "", this.requiredError = "", this.value = void 0, this.error = "";
18274
+ super(), this.__registerHost(), this.__attachShadow(), this.nylasFormInputChanged = createEvent(this, "nylasFormInputChanged", 7), this.nylasFormInputFocused = createEvent(this, "nylasFormInputFocused", 7), this.nylasFormInputBlurred = createEvent(this, "nylasFormInputBlurred", 7), this.name = "input", this.defaultValue = void 0, this.label = "", this.placeholder = DefaultPlaceholder.date, this.required = !1, this.readOnly = !1, this.autoFocus = !1, this.pattern = void 0, this.maxLength = 255, this.patternError = "", this.requiredError = "", this.value = void 0, this.error = "", this.isDateValid = !0;
18246
18275
  }
18247
18276
  handleDefaultValueChange(ue) {
18248
18277
  this.value = sanitize(ue), this.value && this.validatePattern(this.value);
@@ -18254,11 +18283,12 @@ const nylasDateComponentCss = ':host{display:block;height:auto;--nylas-primary:#
18254
18283
  this.validatePattern(this.value), this.error && ue.preventDefault();
18255
18284
  }
18256
18285
  async handleFormSubmitted(ue) {
18257
- var ge;
18258
- (ge = this.el) != null && ge.getAttribute("data-page-styling") && (this.validatePattern(this.value), this.error && ue.preventDefault());
18286
+ this.validatePattern(this.value), this.error && ue.preventDefault();
18259
18287
  }
18260
18288
  handleInput(ue) {
18261
- this.error = "", this.value = sanitize(ue.target.value), this.nylasFormInputChanged.emit({
18289
+ this.error = "";
18290
+ const ge = ue.target;
18291
+ this.value = sanitize(ge.value), this.isDateValid = ge.validity.valid, this.nylasFormInputChanged.emit({
18262
18292
  value: this.value,
18263
18293
  name: this.name,
18264
18294
  label: this.label,
@@ -18279,14 +18309,18 @@ const nylasDateComponentCss = ':host{display:block;height:auto;--nylas-primary:#
18279
18309
  });
18280
18310
  }
18281
18311
  validatePattern(ue) {
18282
- if (this.error = "", this.required && !ue) {
18312
+ if (this.error = "", !this.isDateValid) {
18313
+ this.error = "Please enter a valid date";
18314
+ return;
18315
+ }
18316
+ if (this.required && !ue) {
18283
18317
  this.error = this.requiredError || "This field is required.";
18284
18318
  return;
18285
18319
  }
18286
18320
  !this.pattern || !ue && !this.required || (this.pattern.test(ue) ? this.error = "" : this.error = this.patternError || "Invalid format.");
18287
18321
  }
18288
18322
  render() {
18289
- return h$2("label", { key: "959c6b772ea4f2f4706d72255d1e36ea8d4fcbd3", part: "ic__label", class: { error: !!this.error } }, this.label && h$2("p", null, h$2("span", { class: "label" }, this.label), this.required && h$2("span", { class: "required" }, "*")), h$2("div", { key: "a018a19fe2a77416d7ac4d9c7ea84cb0560a70de", part: "ic__input_wrapper", class: "input_wrapper" }, h$2("input", { key: "7952451a1397dc1a08ac5dc6a251d452a882981b", type: "date", name: this.name, part: "ic__date", readOnly: this.readOnly, autoFocus: this.autoFocus, value: this.value, maxLength: this.maxLength, placeholder: this.placeholder, class: { error: !!this.error }, onInput: (ue) => this.handleInput(ue), onFocus: () => this.handleFocus(), onBlur: () => this.handleBlur() }), h$2("slot", { key: "9730db9ef73e570667c69879ce457c45b5e196a5", name: "additional-input" })), this.error && h$2("span", { class: "error help-text" }, this.error));
18323
+ return h$2("label", { key: "db7e5910f650055747d1f2bca13356d2c3fe3f9e", part: "ic__label", class: { error: !!this.error } }, this.label && h$2("p", null, h$2("span", { class: "label" }, this.label), this.required && h$2("span", { class: "required" }, "*")), h$2("div", { key: "81d0a723cec27805587e2abdac667504d078e211", part: "ic__input_wrapper", class: "input_wrapper" }, h$2("input", { key: "948cf92087a3763d058588c8f6b7764e96234595", type: "date", name: this.name, part: "ic__date", readOnly: this.readOnly, autoFocus: this.autoFocus, value: this.value, maxLength: this.maxLength, placeholder: this.placeholder, class: { error: !!this.error }, onInput: (ue) => this.handleInput(ue), onFocus: () => this.handleFocus(), onBlur: () => this.handleBlur() }), h$2("slot", { key: "6c1d31a29dc01621d9212a95574c329844da0eed", name: "additional-input" })), this.error && h$2("span", { class: "error help-text" }, this.error));
18290
18324
  }
18291
18325
  get el() {
18292
18326
  return this;
@@ -18312,7 +18346,8 @@ const nylasDateComponentCss = ':host{display:block;height:auto;--nylas-primary:#
18312
18346
  patternError: [1, "pattern-error"],
18313
18347
  requiredError: [1, "required-error"],
18314
18348
  value: [32],
18315
- error: [32]
18349
+ error: [32],
18350
+ isDateValid: [32]
18316
18351
  }, [[4, "bookingFormSubmitted", "handleBookingFormSubmitted"], [4, "formSubmitted", "handleFormSubmitted"]], {
18317
18352
  defaultValue: ["handleDefaultValueChange"]
18318
18353
  }]);
@@ -19620,13 +19655,37 @@ var __decorate$s = function(ve, ue, ge, Oe) {
19620
19655
  if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
19621
19656
  return Reflect.metadata(ve, ue);
19622
19657
  };
19623
- const NylasBookingFormConfig = proxyCustomElement(class extends H$2 {
19658
+ const staticFields = [
19659
+ {
19660
+ type: "text",
19661
+ label: "Your name",
19662
+ key: "your_name",
19663
+ typeLabel: "Short text",
19664
+ readonly: !0,
19665
+ required: !0,
19666
+ isOpen: !1,
19667
+ order: 0
19668
+ },
19669
+ {
19670
+ type: "email",
19671
+ label: "Your Email",
19672
+ key: "your_email",
19673
+ typeLabel: "Email",
19674
+ readonly: !0,
19675
+ isOpen: !1,
19676
+ required: !0,
19677
+ order: 1
19678
+ }
19679
+ ], NylasBookingFormConfig = proxyCustomElement(class extends H$2 {
19624
19680
  constructor() {
19625
19681
  super(), this.__registerHost(), this.__attachShadow(), this.valueChanged = createEvent(this, "valueChanged", 7), this.internals = this.attachInternals(), this.selectedConfiguration = void 0, this.name = "booking-form-config", this.additionalFields = void 0, this.formFields = void 0;
19626
19682
  }
19627
19683
  elementNameChangedHandler(ue) {
19628
19684
  debug("nylas-calendar-picker", "elementNameChangedHandler", ue), this.host.setAttribute("name", ue);
19629
19685
  }
19686
+ selectedConfigurationChangedHandler(ue) {
19687
+ this.updateFormFields(ue);
19688
+ }
19630
19689
  connectedCallback() {
19631
19690
  debug("nylas-booking-form-config", "connectedCallback");
19632
19691
  }
@@ -19634,38 +19693,17 @@ const NylasBookingFormConfig = proxyCustomElement(class extends H$2 {
19634
19693
  debug("nylas-booking-form-config", "disconnectedCallback");
19635
19694
  }
19636
19695
  componentWillLoad() {
19637
- debug("nylas-booking-form-config", "componentWillLoad"), this.host.setAttribute("name", this.name);
19638
- const ue = [
19639
- {
19640
- type: "text",
19641
- label: "Your name",
19642
- key: "your_name",
19643
- typeLabel: "Short text",
19644
- readonly: !0,
19645
- required: !0,
19646
- isOpen: !1,
19647
- order: 0
19648
- },
19649
- {
19650
- type: "email",
19651
- label: "Your Email",
19652
- key: "your_email",
19653
- typeLabel: "Email",
19654
- readonly: !0,
19655
- isOpen: !1,
19656
- required: !0,
19657
- order: 1
19658
- }
19659
- ];
19660
- this.formFields = [...ue];
19696
+ debug("nylas-booking-form-config", "componentWillLoad"), this.host.setAttribute("name", this.name), this.formFields = [...staticFields];
19661
19697
  }
19662
19698
  componentDidLoad() {
19663
- var Oe, Ke, vt;
19664
- debug("nylas-booking-form-config", "componentDidLoad");
19665
- const ue = Object.entries(((Ke = (Oe = this.selectedConfiguration) == null ? void 0 : Oe.scheduler) == null ? void 0 : Ke.additional_fields) || {}).map(([ln, ei]) => ({ ...ei, key: ln })) || this.additionalFields || [];
19699
+ debug("nylas-booking-form-config", "componentDidLoad"), this.selectedConfiguration && this.updateFormFields(this.selectedConfiguration);
19700
+ }
19701
+ updateFormFields(ue) {
19702
+ var Ke, vt;
19703
+ const ge = Object.entries(((Ke = ue == null ? void 0 : ue.scheduler) == null ? void 0 : Ke.additional_fields) || {}).map(([ln, ei]) => ({ ...ei, key: ln })) || this.additionalFields || [];
19666
19704
  this.formFields = [
19667
- ...this.formFields,
19668
- ...ue.sort((ln, ei) => ln.order - ei.order).map((ln, ei) => {
19705
+ ...staticFields,
19706
+ ...ge.sort((ln, ei) => ln.order - ei.order).map((ln, ei) => {
19669
19707
  const ti = FIELD_TYPES.find((ri) => ri.type === ln.type);
19670
19708
  if (!ti)
19671
19709
  return { ...ln, isOpen: !1, typeLabel: "Unknown" };
@@ -19673,8 +19711,8 @@ const NylasBookingFormConfig = proxyCustomElement(class extends H$2 {
19673
19711
  return ln.order = ei + 2, { ...ln, isOpen: !1, typeLabel: ni };
19674
19712
  })
19675
19713
  ];
19676
- const ge = (vt = this.host.shadowRoot) == null ? void 0 : vt.getElementById("fields");
19677
- Sortable.create(ge, {
19714
+ const Oe = (vt = this.host.shadowRoot) == null ? void 0 : vt.getElementById("fields");
19715
+ Sortable.create(Oe, {
19678
19716
  animation: 150,
19679
19717
  swap: !0,
19680
19718
  swapClass: "highlight",
@@ -19784,7 +19822,7 @@ const NylasBookingFormConfig = proxyCustomElement(class extends H$2 {
19784
19822
  this.formFields = this.formFields.map((Oe, Ke) => (Ke === ue && (Oe.default = ge.detail.value), Oe));
19785
19823
  }
19786
19824
  render() {
19787
- return h$2(Host, { key: "632d9bd6cc0162efdb7e83b78b23935f04569fcb" }, h$2("div", { key: "dae8d7f52a658b121a992f9cd73cd766e2c16cec", class: "nylas-booking-form-config", part: "nbfc" }, h$2("div", { key: "4f02c7163dfecd29df48da9b163e12e9a6c9c357", class: "header", part: "nbfc__header" }, h$2("div", { key: "169cfa3f8d4dd519dd0621d032d3e7a13384b8c7", class: "header_text" }, h$2("h3", { key: "66e50347bae8fca4c3344030d4d3caf4158244e2" }, "Booking form"), h$2("p", { key: "883886b2c841acdbd44e6cb1c18a860a51c52412" }, "Add custom fields to the booking form.")), h$2("div", { key: "e307526fa6d75c4aaaa71c5658006d9e7417c0f0", class: "header_action" }, h$2("select-dropdown", { key: "4b16dd221f5740b21cde95488e2609730e08ea54", name: "add-field", exportparts: "sd_dropdown: nbfc__add_field, sd_dropdown-button: nbfc__add_field-button, sd_dropdown-content: nbfc__add_field-dropdown-content", options: DEFAULT_FORM_FIELD_TYPES, withSearch: !1, withChevron: !1, dropdownButtonText: "Add new field" }, h$2("span", { key: "5ccd949bb563f32f1682b9432759828f086b46e3", slot: "select-icon" }, h$2("plus-icon", { key: "b77ac5dd297071ec6e16c3728db1a7b096e83e74", width: "15", height: "15" }))))), h$2("div", { key: "a7499ce8959d027f0540b086c3393353c3993452", class: "content" }, h$2("div", { key: "ff24161e13beba123ca46c814515704bf06d4259", id: "fields", class: "additional_fields", part: "nbfc__additional_fields" }, this.formFields.map((ue, ge) => h$2("div", { class: `form-field draggable ${ue.readonly && "fixed"}`, part: "nbfc__form_field", key: ge }, h$2("div", { class: "form-field_header", part: "nbfc__form_field-header" }, h$2("span", { class: "dragable" }, h$2("dragable-icon", { width: "24", height: "25" })), h$2("div", { class: "form-field_header_text" }, h$2("h4", null, ue.label), h$2("p", null, ue.typeLabel)), h$2("div", { class: "form-field_header_actions" }, h$2("span", { class: "is-required" }, ue.required ? "Required" : "Optional"), !ue.readonly && h$2("button", { onClick: () => {
19825
+ return h$2(Host, { key: "bd832f2b9a02ce53187e4f633e4c0388e6e65a03" }, h$2("div", { key: "fcf79fe131d8e0a99312286b15f228b997d8c0be", class: "nylas-booking-form-config", part: "nbfc" }, h$2("div", { key: "07cd086a8af8145f5a8c6676e360fa5f919040f3", class: "header", part: "nbfc__header" }, h$2("div", { key: "f703982061b36b7f4b792f4deff59cc4256b7c25", class: "header_text" }, h$2("h3", { key: "a7cba135c527592a000c296ceaf68bb91c9ddcf4" }, "Booking form"), h$2("p", { key: "62acf8b4a583145e2bc300b1b351799dec1ff438" }, "Add custom fields to the booking form.")), h$2("div", { key: "574ef9a02aa06ad29ac0b08c22aa749a844d32d8", class: "header_action" }, h$2("select-dropdown", { key: "c2a83f721237dc1032af5e55e17438e1060b2e58", name: "add-field", exportparts: "sd_dropdown: nbfc__add_field, sd_dropdown-button: nbfc__add_field-button, sd_dropdown-content: nbfc__add_field-dropdown-content", options: DEFAULT_FORM_FIELD_TYPES, withSearch: !1, withChevron: !1, dropdownButtonText: "Add new field" }, h$2("span", { key: "e0aaa33a3bd04b79499310c3904984269eaecbf3", slot: "select-icon" }, h$2("plus-icon", { key: "06bf29f2b3d0dca74d660db8791a47bc2474652b", width: "15", height: "15" }))))), h$2("div", { key: "b33cfae9a876be328d795366802a1791e22ca164", class: "content" }, h$2("div", { key: "0df453e1fc129a13b90b33c6e267ecd9dd149c56", id: "fields", class: "additional_fields", part: "nbfc__additional_fields" }, this.formFields.map((ue, ge) => h$2("div", { class: `form-field draggable ${ue.readonly && "fixed"}`, part: "nbfc__form_field", key: ge }, h$2("div", { class: "form-field_header", part: "nbfc__form_field-header" }, h$2("span", { class: "dragable" }, h$2("dragable-icon", { width: "24", height: "25" })), h$2("div", { class: "form-field_header_text" }, h$2("h4", null, ue.label), h$2("p", null, ue.typeLabel)), h$2("div", { class: "form-field_header_actions" }, h$2("span", { class: "is-required" }, ue.required ? "Required" : "Optional"), !ue.readonly && h$2("button", { onClick: () => {
19788
19826
  this.fieldRemove(ge);
19789
19827
  } }, h$2("close-icon", null)), h$2("span", { class: `chevron ${ue.isOpen ? "open" : "closed"}`, onClick: () => {
19790
19828
  this.fieldToggle(ge);
@@ -19805,6 +19843,7 @@ const NylasBookingFormConfig = proxyCustomElement(class extends H$2 {
19805
19843
  static get watchers() {
19806
19844
  return {
19807
19845
  name: ["elementNameChangedHandler"],
19846
+ selectedConfiguration: ["selectedConfigurationChangedHandler"],
19808
19847
  formFields: ["watchHandler"]
19809
19848
  };
19810
19849
  }
@@ -19818,6 +19857,7 @@ const NylasBookingFormConfig = proxyCustomElement(class extends H$2 {
19818
19857
  formFields: [32]
19819
19858
  }, [[0, "nylasFormDropdownChanged", "nylasFormDropdownChangedHandler"], [0, "nylasFormInputChanged", "nylasFormInputChangedHandler"]], {
19820
19859
  name: ["elementNameChangedHandler"],
19860
+ selectedConfiguration: ["selectedConfigurationChangedHandler"],
19821
19861
  formFields: ["watchHandler"]
19822
19862
  }]);
19823
19863
  __decorate$s([
@@ -19896,13 +19936,7 @@ const NylasBufferTime = proxyCustomElement(class extends H$2 {
19896
19936
  debug("nylas-buffer-time", "componentWillLoad"), this.host.setAttribute("name", this.name);
19897
19937
  }
19898
19938
  componentDidLoad() {
19899
- if (debug("nylas-buffer-time", "componentDidLoad"), this.selectedConfiguration ? this.selectedConfigurationChangedHandler(this.selectedConfiguration) : (this.selectedBeforeBufferTime = this.buffer.before, this.selectedAfterBufferTime = this.buffer.after), this.componentLoaded = !0, typeof this.internals.setFormValue == "function") {
19900
- const ue = {
19901
- before: this.selectedBeforeBufferTime,
19902
- after: this.selectedAfterBufferTime
19903
- };
19904
- this.internals.setFormValue(JSON.stringify(ue), this.name);
19905
- }
19939
+ debug("nylas-buffer-time", "componentDidLoad"), this.selectedConfiguration ? this.selectedConfigurationChangedHandler(this.selectedConfiguration) : (this.selectedBeforeBufferTime = this.buffer.before, this.selectedAfterBufferTime = this.buffer.after), this.updateFormValue(), this.componentLoaded = !0;
19906
19940
  }
19907
19941
  componentWillUpdate() {
19908
19942
  debug("nylas-buffer-time", "componentWillUpdate");
@@ -19923,21 +19957,26 @@ const NylasBufferTime = proxyCustomElement(class extends H$2 {
19923
19957
  var Oe, Ke;
19924
19958
  debug("nylas-buffer-time", "selectedConfigurationChangedHandler", ue);
19925
19959
  const ge = (Ke = (Oe = ue == null ? void 0 : ue.availability) == null ? void 0 : Oe.availability_rules) == null ? void 0 : Ke.buffer;
19926
- this.selectedAfterBufferTime = ge != null && ge.after ? ge.after : this.buffer.after, this.selectedBeforeBufferTime = ge != null && ge.before ? ge.before : this.buffer.before;
19960
+ this.selectedAfterBufferTime = ge != null && ge.after ? ge.after : this.buffer.after, this.selectedBeforeBufferTime = ge != null && ge.before ? ge.before : this.buffer.before, this.updateFormValue();
19927
19961
  }
19928
19962
  nylasFormDropdownChangedHandler(ue) {
19929
19963
  debug("nylas-buffer-time", "nylasFormDropdownChangedHandler", ue.detail);
19930
19964
  const ge = (Oe) => {
19931
19965
  const { value: Ke, name: vt } = Oe.detail;
19932
- vt === "before-buffer-time" ? this.selectedBeforeBufferTime = parseInt(Ke) : vt === "after-buffer-time" && (this.selectedAfterBufferTime = parseInt(Ke));
19933
- const ln = {
19934
- before: this.selectedBeforeBufferTime,
19935
- after: this.selectedAfterBufferTime
19936
- };
19937
- this.internals.setFormValue(JSON.stringify(ln), "booking-calendar");
19966
+ vt === "before-buffer-time" ? this.selectedBeforeBufferTime = parseInt(Ke) : vt === "after-buffer-time" && (this.selectedAfterBufferTime = parseInt(Ke)), this.updateFormValue();
19938
19967
  };
19939
19968
  this.valueChanged.emit({ ...ue.detail, valueChanged: ge });
19940
19969
  }
19970
+ get isInternalsAvailable() {
19971
+ return this.internals !== void 0 && typeof this.internals.setFormValue == "function";
19972
+ }
19973
+ updateFormValue() {
19974
+ const ue = {
19975
+ before: this.selectedBeforeBufferTime,
19976
+ after: this.selectedAfterBufferTime
19977
+ };
19978
+ this.isInternalsAvailable && this.internals.setFormValue(JSON.stringify(ue), this.name);
19979
+ }
19941
19980
  renderPreview() {
19942
19981
  const Ke = (ei) => {
19943
19982
  const ti = Math.floor(ei / 30), ni = ei % 30 / 30 * 10;
@@ -20649,19 +20688,19 @@ const NylasConnectedCalendars = proxyCustomElement(class extends H$2 {
20649
20688
  setParticipants(ue) {
20650
20689
  const ge = {};
20651
20690
  return ue == null || ue.forEach((Oe) => {
20652
- var Ke, vt, ln;
20691
+ var Ke, vt, ln, ei;
20653
20692
  if ((Ke = Oe == null ? void 0 : Oe.availability) != null && Ke.calendar_ids && ((ln = (vt = Oe == null ? void 0 : Oe.availability) == null ? void 0 : vt.calendar_ids) == null ? void 0 : ln.length) > 0) {
20654
- const ei = !!Oe.is_organizer;
20693
+ const ti = !!Oe.is_organizer;
20655
20694
  ge[Oe.email] = {
20656
- isOpen: ei,
20695
+ isOpen: ti,
20657
20696
  name: Oe.name || Oe.email,
20658
- availability: Oe.availability
20697
+ calendars: (ei = Oe.availability) == null ? void 0 : ei.calendar_ids
20659
20698
  };
20660
20699
  }
20661
20700
  }), ge;
20662
20701
  }
20663
20702
  render() {
20664
- return h$2(Host, { key: "32710fe762bdf90e238c62695957a9fca31db258" }, h$2("div", { key: "a5ebf4adb7eb8e1b8a065bc05733738da06fbac3", class: "nylas-connected-calendars", part: "nccals" }, h$2("div", { key: "f3c820bcde922a7b852630d86145b1e6e1bf0e25", class: "header", part: "nccals__header" }, h$2("h3", { key: "e2b68d05d416c322b22f969d8d8c890a09812154" }, "Connected Calendars"), h$2("p", { key: "4dd41d10a6043fec1c0f4943371c312a29e1d489" }, "Select the calendars to use for checking your availability.", h$2("tooltip-component", { key: "6a8ec009fd879e1ed6b6fb65be75a88255adba17" }, h$2("info-icon", { key: "0d4a99eaee064ecee1c82ee5b13f3ab87a1d5d93", slot: "tooltip-icon" }), h$2("span", { key: "de3779efce64d7a14dbc3f7759c827005f92ed50", slot: "tooltip-content" }, "Check availability across one or more calendars. If you select multiple calendars for a participant, the participant must be available across all of their calendars to be considered available.")))), h$2("div", { key: "720267110636c1dc06ac67b7e715515f56737b73", class: "content", part: "nccals__content" }, h$2("form", { key: "f295ba327aa302ea186dbf2daef3a9c30f96ee5f", ref: (ue) => this.connectedCalendarsFormRef = ue }, Object.keys(this.participantCalendars).map((ue, ge) => {
20703
+ return h$2(Host, { key: "4b8cfcfa751c2790968049f6f10a06193f9adc70" }, h$2("div", { key: "ffbcde80612886bc09b4419bc1cc47d585834fac", class: "nylas-connected-calendars", part: "nccals" }, h$2("div", { key: "d00c14cd0ab8107a2ba609ba58b596a7d3e1e69f", class: "header", part: "nccals__header" }, h$2("h3", { key: "cb0ad20533c33a3778d0b89fe5d51aa4c15864a8" }, "Connected Calendars"), h$2("p", { key: "b3488e835534f477d2585be0a60b5800d42cbaac" }, "Select the calendars to use for checking your availability.", h$2("tooltip-component", { key: "6acbd37df60566fa8a3fb8676fe3b3f4287d5c06" }, h$2("info-icon", { key: "f1eb4a75f869b09bee95c074c8d180449654a49f", slot: "tooltip-icon" }), h$2("span", { key: "e8aca8b29c7a89fe7b6eea0635761bdde19349e2", slot: "tooltip-content" }, "Check availability across one or more calendars. If you select multiple calendars for a participant, the participant must be available across all of their calendars to be considered available.")))), h$2("div", { key: "844803e9ea3270bfcedbc212990c0038a74dd663", class: "content", part: "nccals__content" }, h$2("form", { key: "2970ec7cec45d2582b987cbfab8949c1ece02499", ref: (ue) => this.connectedCalendarsFormRef = ue }, Object.keys(this.participantCalendars).map((ue, ge) => {
20665
20704
  const Oe = this.selectedCalendars[ue], Ke = this.participantCalendars[ue];
20666
20705
  if (!(!Oe || !Oe.name))
20667
20706
  return h$2("div", { class: "participant-container", part: "nccals__container", key: `participant-conatiner-${ge}` }, h$2("div", { class: "participant-title", part: "nccals__title" }, h$2("p", null, Oe.name, "'s connected calendars"), h$2("div", { class: "participant-toggle", part: "nccals__toggle-container" }, h$2("span", { class: `chevron ${Oe.isOpen ? "open" : "closed"}`, onClick: () => {
@@ -21537,6 +21576,12 @@ const labels = {
21537
21576
  const ge = (Ke = ue == null ? void 0 : ue.event_booking) == null ? void 0 : Ke.location, Oe = (vt = ue == null ? void 0 : ue.event_booking) == null ? void 0 : vt.conferencing;
21538
21577
  Oe != null && Oe.provider ? (this.selectedLocationOption = this.setDefaultLocationOption(Oe, ge ?? ""), this.grantId = this.setDefaultGrantID(Oe), this.location = ge || "") : ge ? (this.selectedLocationOption = ge ? "custom" : "none", this.location = ge) : (this.selectedLocationOption = "none", this.location = "");
21539
21578
  }
21579
+ currentUserChangedHandler(ue) {
21580
+ debug("nylas-custom-booking-flow", "currentUserChangedHandler", ue), ue != null && ue.provider && (this.userProviderState = ue == null ? void 0 : ue.provider, this.setLocationOptionsForProvider(this.userProviderState));
21581
+ }
21582
+ conferenceProvidersChanged(ue) {
21583
+ ue != null && ue.zoom && !this.locationOptions.some((ge) => ge.value === "zoom") && this.locationOptions.push({ value: "zoom", label: labels.zoom, labelHTML: this.getLabelHTML("zoom") });
21584
+ }
21540
21585
  connectedCallback() {
21541
21586
  debug("nylas-event-location", "connectedCallback");
21542
21587
  }
@@ -21545,15 +21590,7 @@ const labels = {
21545
21590
  }
21546
21591
  componentDidLoad() {
21547
21592
  var ue, ge;
21548
- switch (debug("nylas-event-location", "componentDidLoad"), this.selectedConfiguration ? this.selectedConfigurationChangedHandler(this.selectedConfiguration) : this.selectedLocationOption = this.setDefaultLocationOption(this.eventConferencing || null, this.eventLocation ?? ""), this.userProviderState = this.userProvider ?? ((ue = this.currentUser) == null ? void 0 : ue.provider) ?? "", this.userProviderState) {
21549
- case "google":
21550
- this.locationOptions.push({ value: "google", label: labels.google, labelHTML: this.getLabelHTML("google") });
21551
- break;
21552
- case "microsoft":
21553
- this.locationOptions.push({ value: "microsoft", label: labels.microsoft, labelHTML: this.getLabelHTML("microsoft") });
21554
- break;
21555
- }
21556
- (ge = this.conferenceProviders) != null && ge.zoom && this.locationOptions.push({ value: "zoom", label: labels.zoom, labelHTML: this.getLabelHTML("zoom") });
21593
+ debug("nylas-event-location", "componentDidLoad"), this.selectedConfiguration ? this.selectedConfigurationChangedHandler(this.selectedConfiguration) : this.selectedLocationOption = this.setDefaultLocationOption(this.eventConferencing || null, this.eventLocation ?? ""), this.userProviderState = this.userProvider ?? ((ue = this.currentUser) == null ? void 0 : ue.provider) ?? "", this.setLocationOptionsForProvider(this.userProviderState), (ge = this.conferenceProviders) != null && ge.zoom && !this.locationOptions.some((Oe) => Oe.value === "zoom") && this.locationOptions.push({ value: "zoom", label: labels.zoom, labelHTML: this.getLabelHTML("zoom") });
21557
21594
  }
21558
21595
  disconnectedCallback() {
21559
21596
  debug("nylas-event-location", "disconnectedCallback");
@@ -21601,6 +21638,16 @@ const labels = {
21601
21638
  break;
21602
21639
  }
21603
21640
  }
21641
+ setLocationOptionsForProvider(ue) {
21642
+ switch (ue) {
21643
+ case "google":
21644
+ this.locationOptions.some((ge) => ge.value === "google") || this.locationOptions.push({ value: "google", label: labels.google, labelHTML: this.getLabelHTML("google") });
21645
+ break;
21646
+ case "microsoft":
21647
+ this.locationOptions.some((ge) => ge.value === "microsoft") || this.locationOptions.push({ value: "microsoft", label: labels.microsoft, labelHTML: this.getLabelHTML("microsoft") });
21648
+ break;
21649
+ }
21650
+ }
21604
21651
  setDefaultLocationOption(ue, ge) {
21605
21652
  return ue != null && (ue == null ? void 0 : ue.provider) != null && (ue == null ? void 0 : ue.autocreate) != null ? CONFERENCE_PROVIDER_MAP[ue == null ? void 0 : ue.provider] : ge ? "custom" : "none";
21606
21653
  }
@@ -21642,7 +21689,7 @@ const labels = {
21642
21689
  }
21643
21690
  render() {
21644
21691
  const ue = typeof this.selectedLocationOption < "u" ? this.locationOptions.find((ge) => ge.value == this.selectedLocationOption) : null;
21645
- return h$2(Host, { key: "6869d3c2f6316dc482becc022bc973783332658f" }, h$2("div", { key: "e17b95b15e181f73efd5c666ff0074bcd5467b65", class: "nylas-event-location", part: "nel" }, h$2("label", { key: "9370ab01f5f730099dd5061ccf39ca3b53132244", htmlFor: "location" }, "Event meeting or location", h$2("span", { key: "acd558f22ad18afc63b93456450a5aa946916fd4", class: "label-icon" }, h$2("tooltip-component", { key: "bd2ea171a9eef9e9a377a0be2dc4a16b91bb1359" }, h$2("info-icon", { key: "745289e658441e9aadb245c94da890cdb3119179", slot: "tooltip-icon" }), h$2("span", { key: "ffa4a9597a7d63e33b639dafd736a654a97589c9", slot: "tooltip-content" }, "Select a conferencing option or add a custom location.")))), h$2("div", { key: "59f930e30b758b740128b42a855608a02ee1a739", class: "location-input" }, ue && (ue == null ? void 0 : ue.label) && h$2("select-dropdown", { withSearch: !1, name: "location", options: this.locationOptions, defaultSelectedOption: ue, exportparts: "sd_dropdown: nel__dropdown, sd_dropdown-button: nel__dropdown-button, sd_dropdown-content: nel__dropdown-content" }, h$2("span", { slot: "select-icon" }, this.getIcon(this.selectedLocationOption))), this.selectedLocationOption === "custom" && h$2("input", { type: "text", part: "nel__location", id: "location", name: "location", maxlength: "1024", value: this.location, onInput: (ge) => this.handleChange(ge) }))));
21692
+ return h$2(Host, { key: "c91ef22df2a83a3c2ac66ca9011ad8633a085b9e" }, h$2("div", { key: "9e6823ce704cf4870f99936a39371b255b165afb", class: "nylas-event-location", part: "nel" }, h$2("label", { key: "2d1a71a258d0576460acd68a93cbace4a5c9254c", htmlFor: "location" }, "Event meeting or location", h$2("span", { key: "9dd7df66eec4e35a8659c88d4f26be99093e815a", class: "label-icon" }, h$2("tooltip-component", { key: "9299313bad5724106fa7108d0874e760945bcb30" }, h$2("info-icon", { key: "2490fbc28caa2547d8a3cecc747dc94254c59df3", slot: "tooltip-icon" }), h$2("span", { key: "d6c73fef100e4f962507d58b4ed24a1bd19599c2", slot: "tooltip-content" }, "Select a conferencing option or add a custom location.")))), h$2("div", { key: "726f78440a3e65e379368b0a849bee94b2839dfd", class: "location-input" }, ue && (ue == null ? void 0 : ue.label) && h$2("select-dropdown", { withSearch: !1, name: "location", options: this.locationOptions, defaultSelectedOption: ue, exportparts: "sd_dropdown: nel__dropdown, sd_dropdown-button: nel__dropdown-button, sd_dropdown-content: nel__dropdown-content" }, h$2("span", { slot: "select-icon" }, this.getIcon(this.selectedLocationOption))), this.selectedLocationOption === "custom" && h$2("input", { type: "text", part: "nel__location", id: "location", name: "location", maxlength: "1024", value: this.location, onInput: (ge) => this.handleChange(ge) }))));
21646
21693
  }
21647
21694
  static get formAssociated() {
21648
21695
  return !0;
@@ -21653,7 +21700,9 @@ const labels = {
21653
21700
  static get watchers() {
21654
21701
  return {
21655
21702
  name: ["elementNameChangedHandler"],
21656
- selectedConfiguration: ["selectedConfigurationChangedHandler"]
21703
+ selectedConfiguration: ["selectedConfigurationChangedHandler"],
21704
+ currentUser: ["currentUserChangedHandler"],
21705
+ conferenceProviders: ["conferenceProvidersChanged"]
21657
21706
  };
21658
21707
  }
21659
21708
  static get style() {
@@ -21674,7 +21723,9 @@ const labels = {
21674
21723
  locationOptions: [32]
21675
21724
  }, [[0, "nylasFormDropdownChanged", "nylasFormDropdownChangedHandler"]], {
21676
21725
  name: ["elementNameChangedHandler"],
21677
- selectedConfiguration: ["selectedConfigurationChangedHandler"]
21726
+ selectedConfiguration: ["selectedConfigurationChangedHandler"],
21727
+ currentUser: ["currentUserChangedHandler"],
21728
+ conferenceProviders: ["conferenceProvidersChanged"]
21678
21729
  }]);
21679
21730
  __decorate$f([
21680
21731
  RegisterComponent({
@@ -22110,6 +22161,18 @@ const timePeriodSelectorCss = ".time-period-selector.sc-time-period-selector{dis
22110
22161
  value: ue
22111
22162
  }));
22112
22163
  }
22164
+ defaultSelectedPeriodChanged(ue) {
22165
+ this.selectedPeriod = ue, this.updateNumberOptionsAndSelectedNumber(ue);
22166
+ }
22167
+ defaultSelectedNumberChanged(ue) {
22168
+ this.selectedNumber = ue;
22169
+ }
22170
+ timePeriodsChanged(ue) {
22171
+ this.timePeriodOptions = ue.map((ge) => ({
22172
+ label: ge,
22173
+ value: ge
22174
+ }));
22175
+ }
22113
22176
  componentDidLoad() {
22114
22177
  this.selectedNumber = this.defaultSelectedNumber, this.selectedPeriod = this.defaultSelectedPeriod;
22115
22178
  const ue = pluralToSingular[this.selectedPeriod] ?? this.selectedPeriod, ge = this.calculateOptions(ue);
@@ -22162,11 +22225,18 @@ const timePeriodSelectorCss = ".time-period-selector.sc-time-period-selector{dis
22162
22225
  })), this.selectedNumber = parseInt(this.numberOptions[0].value);
22163
22226
  }
22164
22227
  render() {
22165
- return h$2("div", { key: "76ed6c36ebbcfbb8b8d54edc6a26a9d2a6d6f7fb", class: "time-period-selector" }, typeof this.selectedNumber == "number" && h$2("input-dropdown", { id: "time-number", name: "time-number", inputValue: this.selectedNumber.toString(), exportparts: "id_dropdown: tps__number-dropdown, id_dropdown-input: tps__number-dropdown-button, id_dropdown-content: tps__number-dropdown-content", options: this.numberOptions, defaultInputOption: this.numberOptions.find((ue) => ue.value == this.selectedNumber.toString()) }), typeof this.selectedPeriod == "string" && h$2("select-dropdown", { id: "time-period", name: "time-period", options: this.timePeriodOptions, exportparts: "sd_dropdown: tps__period-dropdown, sd_dropdown-button: tps__period-dropdown-button, sd_dropdown-content: tps__period-dropdown-content", pluralizedLabel: this.selectedNumber > 1 ? "s" : "", defaultSelectedOption: this.timePeriodOptions.find((ue) => ue.value == this.selectedPeriod), withSearch: !1 }));
22228
+ return h$2("div", { key: "f40a2be9bc76a0a5be0ffa3c87779fab644e52f2", class: "time-period-selector" }, typeof this.selectedNumber == "number" && h$2("input-dropdown", { id: "time-number", name: "time-number", inputValue: this.selectedNumber.toString(), exportparts: "id_dropdown: tps__number-dropdown, id_dropdown-input: tps__number-dropdown-button, id_dropdown-content: tps__number-dropdown-content", options: this.numberOptions, defaultInputOption: this.numberOptions.find((ue) => ue.value == this.selectedNumber.toString()) }), typeof this.selectedPeriod == "string" && h$2("select-dropdown", { id: "time-period", name: "time-period", options: this.timePeriodOptions, exportparts: "sd_dropdown: tps__period-dropdown, sd_dropdown-button: tps__period-dropdown-button, sd_dropdown-content: tps__period-dropdown-content", pluralizedLabel: this.selectedNumber > 1 ? "s" : "", defaultSelectedOption: this.timePeriodOptions.find((ue) => ue.value == this.selectedPeriod), withSearch: !1 }));
22166
22229
  }
22167
22230
  get host() {
22168
22231
  return this;
22169
22232
  }
22233
+ static get watchers() {
22234
+ return {
22235
+ defaultSelectedPeriod: ["defaultSelectedPeriodChanged"],
22236
+ defaultSelectedNumber: ["defaultSelectedNumberChanged"],
22237
+ timePeriods: ["timePeriodsChanged"]
22238
+ };
22239
+ }
22170
22240
  static get style() {
22171
22241
  return TimePeriodSelectorStyle0;
22172
22242
  }
@@ -22178,7 +22248,11 @@ const timePeriodSelectorCss = ".time-period-selector.sc-time-period-selector{dis
22178
22248
  selectedNumber: [32],
22179
22249
  numberOptions: [32],
22180
22250
  timePeriodOptions: [32]
22181
- }, [[0, "inputOptionChanged", "inputOptionChangedHandler"], [0, "nylasFormDropdownChanged", "nylasFormDropdownChangedHandler"]]]);
22251
+ }, [[0, "inputOptionChanged", "inputOptionChangedHandler"], [0, "nylasFormDropdownChanged", "nylasFormDropdownChangedHandler"]], {
22252
+ defaultSelectedPeriod: ["defaultSelectedPeriodChanged"],
22253
+ defaultSelectedNumber: ["defaultSelectedNumberChanged"],
22254
+ timePeriods: ["timePeriodsChanged"]
22255
+ }]);
22182
22256
  function defineCustomElement$k() {
22183
22257
  if (typeof customElements > "u")
22184
22258
  return;
@@ -22840,7 +22914,7 @@ const NylasPageStyling = proxyCustomElement(class extends H$2 {
22840
22914
  this.isOpen = !this.isOpen;
22841
22915
  }
22842
22916
  render() {
22843
- return h$2(Host, { key: "1601b88e8e7e2c500cb105f237949faa4e9d8dbd" }, h$2("div", { key: "2a3072bc409f07961da51439a0f45f930d0725de", part: "nps", class: { "nylas-page-styling": !0, "no-border": !this.customInputsSlot } }, this.customInputsSlot ? h$2("div", { class: "header", part: "nps__header" }, h$2("div", null, h$2("h3", null, "Page styling and customization")), h$2("div", { class: "drawer-toggle", part: "nps__drawer-toggle--container" }, h$2("span", { class: `chevron ${this.isOpen ? "open" : "closed"} `, onClick: () => this.toggleConfirmationEmail() }, h$2("chevron-icon", { width: "24", height: "24" })))) : null, h$2("div", { key: "404727336fdf8d0de2d8e769df1dcc21ae69f34b", id: "nylas-page-styling__body", class: "nylas-page-styling__body", part: "nps__body" }, h$2("div", { key: "2e7da0539b197347719a1202e04c1f7b238cdc9d", class: { "nylas-page-styling__section": !0, "no-padding": !this.customInputsSlot } }, h$2("div", { key: "55ba3e932216f073238b8385071defa9139ca0f9", class: "nylas-page-styling__row" }, h$2("div", { key: "333576450039ea7f76bfb548c5947609bc813837", class: { subsection: !0, hide: !this.isOpen } }))))));
22917
+ return h$2(Host, { key: "c2ffa8ae940e9594f254903d45abc3f7c01d7d41" }, h$2("div", { key: "1813654e2aaa9c66d5a535186f227968b434654c", part: "nps", class: { "nylas-page-styling": !0, "no-border": !this.customInputsSlot } }, this.customInputsSlot ? h$2("div", { class: "header", part: "nps__header" }, h$2("div", null, h$2("h3", null, "Page styling and customization")), h$2("div", { class: "drawer-toggle", part: "nps__drawer-toggle--container" }, h$2("span", { class: `chevron ${this.isOpen ? "open" : "closed"} `, onClick: () => this.toggleConfirmationEmail() }, h$2("chevron-icon", { width: "24", height: "24" })))) : null, h$2("div", { key: "cff4891eeb1a958feb2a6b20623b97f908721c60", id: "nylas-page-styling__body", class: "nylas-page-styling__body", part: "nps__body" }, h$2("div", { key: "16b2398f10b6d7703d02bbbf5c43e3e229499b2d", class: { "nylas-page-styling__section": !0, "no-padding": !this.customInputsSlot } }, h$2("div", { key: "fd09434076ea4626ee9d7b2710ec8418325aa117", class: "nylas-page-styling__row" }, h$2("div", { key: "16a29cabadc4f1a4ba9f389fe232ea22125cfe36", class: { subsection: !0, hide: !this.isOpen } }))))));
22844
22918
  }
22845
22919
  static get formAssociated() {
22846
22920
  return !0;
@@ -22850,7 +22924,8 @@ const NylasPageStyling = proxyCustomElement(class extends H$2 {
22850
22924
  }
22851
22925
  static get watchers() {
22852
22926
  return {
22853
- name: ["elementNameChangedHandler"]
22927
+ name: ["elementNameChangedHandler"],
22928
+ selectedConfiguration: ["selectedConfigurationChangedHandler"]
22854
22929
  };
22855
22930
  }
22856
22931
  static get style() {
@@ -22864,7 +22939,8 @@ const NylasPageStyling = proxyCustomElement(class extends H$2 {
22864
22939
  currentAppearance: [32],
22865
22940
  customInputsSlot: [32]
22866
22941
  }, [[4, "nylasFormInputChanged", "nylasFormInputChangeHandler"], [4, "nylasFormDropdownChanged", "nylasFormDropdownChangedHandler"], [4, "valueChanged", "valueChangedHandler"], [4, "nylasFormCheckboxToggled", "checkboxToggledHandler"], [4, "nylasFormRadioChanged", "radioChangedHandler"]], {
22867
- name: ["elementNameChangedHandler"]
22942
+ name: ["elementNameChangedHandler"],
22943
+ selectedConfiguration: ["selectedConfigurationChangedHandler"]
22868
22944
  }]);
22869
22945
  __decorate$8([
22870
22946
  RegisterComponent({
@@ -23172,12 +23248,13 @@ const NylasParticipantsCustomAvailability = proxyCustomElement(class extends H$2
23172
23248
  return this.internals !== void 0 && typeof this.internals.setFormValue == "function" && typeof this.internals.setValidity == "function";
23173
23249
  }
23174
23250
  render() {
23175
- return h$2(Host, { key: "5034211537411e732ffee5f7420884e5908cc4e5" }, h$2("div", { key: "6d016a9b8a3dd204521d9f63de90cd848e9c49e7", class: "nylas-participants-custom-availability", part: "npca" }, h$2("div", { key: "fff77ce67f19e5b0bdc7a8b491ff38b1b7d9af55", class: "header", part: "npca__header" }, h$2("h3", { key: "656016ac8ee26636fad2e725237b1bb538563864" }, "Participant open hours"), h$2("p", { key: "87ab243b9f3402150c6dae36fc702d7f675350c3" }, "If not set, the default open hours will be used to calculate availability for this participant.")), h$2("div", { key: "ba6c30fbb85fc26d6471494716b18f7f815900ec", class: "content", part: "npca__content" }, h$2("form", { key: "7cc553b6730ead929fc45efa67b29b56e41f022e", ref: (ue) => this.participantFormRef = ue }, Object.keys(this.selectedParticipants).map((ue, ge) => {
23176
- const Oe = this.selectedParticipants[ue];
23251
+ return h$2(Host, { key: "64198b8231e1739484f81d02167d7b5f456eda69" }, h$2("div", { key: "68eb8279c510ef937e19dec06960867c98a5b02a", class: "nylas-participants-custom-availability", part: "npca" }, h$2("div", { key: "9622d8a7fbc124723cb7135a3a3846fad0e4e458", class: "header", part: "npca__header" }, h$2("h3", { key: "6424eeeb937ce2225a63d76482ec633efacd9e7a" }, "Participant open hours"), h$2("p", { key: "ac021fef4d4b0de03d5e2ca335563ec4f328156c" }, "If not set, the default open hours will be used to calculate availability for this participant.")), h$2("div", { key: "e9412e214011b575954196e39ea265dcf86801ec", class: "content", part: "npca__content" }, h$2("form", { key: "ab5b4239f2d2b31fcd69d0f2e2d61a8a13003739", ref: (ue) => this.participantFormRef = ue }, Object.keys(this.selectedParticipants).map((ue, ge) => {
23252
+ var vt;
23253
+ const Oe = this.selectedParticipants[ue], Ke = ((vt = Oe.availability) == null ? void 0 : vt.open_hours) || [];
23177
23254
  if (!(!Oe || !Oe.name || !Oe.availability))
23178
23255
  return h$2("div", { class: "participant-container", part: "npca__participant-container", key: `participant-conatiner-${ge}` }, h$2("div", { class: "participant-title", part: "npca__participant-title" }, h$2("p", null, Oe.name, "'s open hours"), h$2("div", { class: "participant-toggle", part: "npca__participant-toggle--container" }, h$2("toggle-switch", { exportparts: "ts_label: npca__toggle-label, ts_input: npca_toggle-input, ts_slider: npca_toggle-slider", name: ue, checked: !!(Oe != null && Oe.openHours) && (Oe == null ? void 0 : Oe.openHours.length) > 0 }), h$2("span", { class: `chevron ${Oe.isOpen ? "open" : "closed"} ${Oe.setCustom ? "" : "disabled"}`, onClick: () => {
23179
23256
  Oe.setCustom && (this.selectedParticipants[ue].isOpen = !Oe.isOpen, this.selectedParticipants = { ...this.selectedParticipants });
23180
- } }, h$2("chevron-icon", { width: "24", height: "24" })))), Oe.isOpen && h$2("nylas-availability-picker", { key: ge, name: `participant-${ge}-${ue}`, openHours: Oe.openHours, defaultTimezone: Oe.timezone, hideHeader: !0 }));
23257
+ } }, h$2("chevron-icon", { width: "24", height: "24" })))), Oe.isOpen && h$2("nylas-availability-picker", { key: ge, name: `participant-${ge}-${ue}`, openHours: Ke, defaultTimezone: Oe.timezone, hideHeader: !0 }));
23181
23258
  })))));
23182
23259
  }
23183
23260
  static get formAssociated() {
@@ -28444,8 +28521,8 @@ const buildFeedbackIntegration = ({
28444
28521
  const Hi = getClient(), zi = Hi && Hi.getIntegrationByName(Bi);
28445
28522
  if (zi)
28446
28523
  return zi;
28447
- const Vi = (Li && Li() || await ve(Wi, li))();
28448
- return Hi && Hi.addIntegration(Vi), Vi;
28524
+ const Ki = (Li && Li() || await ve(Wi, li))();
28525
+ return Hi && Hi.addIntegration(Ki), Ki;
28449
28526
  }, Ni = async (Bi) => {
28450
28527
  const Li = Bi.enableScreenshot && isScreenshotSupported(), [Wi, Hi] = await Promise.all([
28451
28528
  Fi("FeedbackModal", ue, "feedbackModalIntegration"),
@@ -28480,7 +28557,7 @@ const buildFeedbackIntegration = ({
28480
28557
  if (!Hi)
28481
28558
  throw DEBUG_BUILD && logger.error("[Feedback] Unable to attach to target element"), new Error("Unable to attach to target element");
28482
28559
  let zi = null;
28483
- const Ki = async () => {
28560
+ const Vi = async () => {
28484
28561
  zi || (zi = await Ni({
28485
28562
  ...Wi,
28486
28563
  onFormSubmitted: () => {
@@ -28488,11 +28565,11 @@ const buildFeedbackIntegration = ({
28488
28565
  }
28489
28566
  })), zi.appendToDom(), zi.open();
28490
28567
  };
28491
- Hi.addEventListener("click", Ki);
28492
- const Vi = () => {
28493
- Ui = Ui.filter((Ji) => Ji !== Vi), zi && zi.removeFromDom(), zi = null, Hi.removeEventListener("click", Ki);
28568
+ Hi.addEventListener("click", Vi);
28569
+ const Ki = () => {
28570
+ Ui = Ui.filter((Ji) => Ji !== Ki), zi && zi.removeFromDom(), zi = null, Hi.removeEventListener("click", Vi);
28494
28571
  };
28495
- return Ui.push(Vi), Vi;
28572
+ return Ui.push(Ki), Ki;
28496
28573
  }, Gi = (Bi = {}) => {
28497
28574
  const Li = mergeOptions(Ri, Bi), Wi = ji(Li), Hi = Actor({
28498
28575
  triggerLabel: Li.triggerLabel,
@@ -30151,7 +30228,7 @@ const NylasEditorTabs = proxyCustomElement(class extends H$2 {
30151
30228
  super(), this.__registerHost(), this.schedulerConfigChanged = createEvent(this, "schedulerConfigChanged", 7), this.cancelButtonClick = createEvent(this, "cancelButtonClick", 7), this.formSubmitted = createEvent(this, "formSubmitted", 7), this.previewButtonClicked = createEvent(this, "previewButtonClicked", 7), this.schedulerEditorFormUpdated = createEvent(this, "schedulerEditorFormUpdated", 7), this.setError = (ue) => {
30152
30229
  this.error = ue.message;
30153
30230
  }, this.formSubmissionHandler = async (ue) => {
30154
- var qi, Gi, Bi, Li, Wi, Hi, zi, Ki, Vi, Ji, tr, nr, Gr, Yr, Zr, Jr, Qr;
30231
+ var qi, Gi, Bi, Li, Wi, Hi, zi, Vi, Ki, Ji, tr, nr, Gr, Yr, Zr, Jr, Qr;
30155
30232
  ue.preventDefault();
30156
30233
  const ge = await this.formSubmitted.emit();
30157
30234
  if (debug("[nylas-editor-tabs]", "formSubmissionHandler", ge), !this.formRef.checkValidity() || ge.defaultPrevented) {
@@ -30185,7 +30262,7 @@ const NylasEditorTabs = proxyCustomElement(class extends H$2 {
30185
30262
  interval_minutes: (ui == null ? void 0 : ui.interval) ?? Ii,
30186
30263
  round_to: ui == null ? void 0 : ui.roundTo,
30187
30264
  availability_rules: {
30188
- availability_method: vi || (((Ji = (Vi = (Ki = this.selectedConfiguration) == null ? void 0 : Ki.availability) == null ? void 0 : Vi.availability_rules) == null ? void 0 : Ji.availability_method) ?? "collective"),
30265
+ availability_method: vi || (((Ji = (Ki = (Vi = this.selectedConfiguration) == null ? void 0 : Vi.availability) == null ? void 0 : Ki.availability_rules) == null ? void 0 : Ji.availability_method) ?? "collective"),
30189
30266
  buffer: ai || { before: 0, after: 0 },
30190
30267
  default_open_hours: (ti == null ? void 0 : ti.openHours) ?? ((Gr = (nr = (tr = this.selectedConfiguration) == null ? void 0 : tr.availability) == null ? void 0 : nr.availability_rules) == null ? void 0 : Gr.default_open_hours) ?? DEFAULT_OPEN_HOURS,
30191
30268
  round_robin_group_id: ((Jr = (Zr = (Yr = this.selectedConfiguration) == null ? void 0 : Yr.availability) == null ? void 0 : Zr.availability_rules) == null ? void 0 : Jr.round_robin_group_id) ?? ""
@@ -30304,7 +30381,7 @@ const NylasEditorTabs = proxyCustomElement(class extends H$2 {
30304
30381
  var ge, Oe;
30305
30382
  debug("[nylas-editor-tabs]", "componentDidLoad"), this.enableUserFeedback && !isInitialized() && init({
30306
30383
  dsn: "https://9d5731f1c77ca84c9ed3fb9b3ccf7ee1@o74852.ingest.us.sentry.io/4507889638178816",
30307
- release: "1.3.2",
30384
+ release: "1.3.3",
30308
30385
  integrations: (Ke) => [
30309
30386
  ...Ke.filter((vt) => !1),
30310
30387
  feedbackSyncIntegration({
@@ -30343,7 +30420,7 @@ const NylasEditorTabs = proxyCustomElement(class extends H$2 {
30343
30420
  captureContext: {
30344
30421
  tags: {
30345
30422
  "nylas-web-element": "nylas-scheduler-editor",
30346
- "nylas-web-element-version": "1.3.2"
30423
+ "nylas-web-element-version": "1.3.3"
30347
30424
  },
30348
30425
  extra: {
30349
30426
  configId: (Ke = this.selectedConfiguration) == null ? void 0 : Ke.id,