@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
@@ -14545,7 +14545,7 @@ class L9 {
14545
14545
  }
14546
14546
  async makeAPIRequest(e, n, r, i = {}) {
14547
14547
  try {
14548
- const o = new URL(this.schedulerAPIURL), s = "1.3.2";
14548
+ const o = new URL(this.schedulerAPIURL), s = "1.3.3";
14549
14549
  return o.pathname = e, await (await fetch(decodeURIComponent(o.toString()), {
14550
14550
  method: n,
14551
14551
  headers: {
@@ -15712,6 +15712,9 @@ const iC = '.checkbox-container{--nylas-primary:#2563eb;--nylas-error:#cc4841;--
15712
15712
  constructor() {
15713
15713
  super(), this.__registerHost(), this.__attachShadow(), this.nylasFormCheckboxToggled = W(this, "nylasFormCheckboxToggled", 7), this.componentType = "checkbox", this.name = "checkbox", this.checked = void 0, this.label = "", this.required = !1, this.isChecked = void 0, this.error = "";
15714
15714
  }
15715
+ checkedPropChangedHandler(e) {
15716
+ typeof e == "boolean" && (this.isChecked = e);
15717
+ }
15715
15718
  componentWillLoad() {
15716
15719
  this.el.setAttribute("component-type", this.componentType);
15717
15720
  }
@@ -15733,11 +15736,16 @@ const iC = '.checkbox-container{--nylas-primary:#2563eb;--nylas-error:#cc4841;--
15733
15736
  });
15734
15737
  }
15735
15738
  render() {
15736
- return m("div", { key: "f4dfab5a5da9f9c79424930bfd5497c24dc1bfe5", class: "checkbox-container" }, m("label", { key: "78e192f2eddcfd788ac16e80be3ac0b9c47e6f6a" }, m("input", { key: "6e3aa50fb6542cb134dc5454e9fc0052be22e36f", type: "checkbox", name: this.name, checked: this.isChecked, onChange: () => this.toggleCheck() }), m("span", { key: "abbd103b06bf934eff294b443b468e446901c371", class: "checkmark" }), m("slot", { key: "f11d669ba02b705ba7679985e83b91086a17ccc9", name: "label" }, m("span", { key: "1298c44fbbe9ce75638b00ac07e6e83bab1394c2", class: "label" }, this.label))), this.error && m("p", { class: "error" }, this.error));
15739
+ return m("div", { key: "0be06ba2c6b6ed277b3ba736827f9f60e18c6056", class: "checkbox-container" }, m("label", { key: "a0a0cf6b1f546b8d1485dd3aee1b686f0e9c9cba" }, m("input", { key: "96bdb407b3ab6f668cf94b83e8091a604743f93f", type: "checkbox", name: this.name, checked: this.isChecked, onChange: () => this.toggleCheck() }), m("span", { key: "d345d3b47c14213487a9108d78abbf0db26f25af", class: "checkmark" }), m("slot", { key: "aba536e12ed7a97d18790f1a212ead284c1253ec", name: "label" }, m("span", { key: "e7767302bc6865b99cf42949e8bd032e237d2ad9", class: "label" }, this.label))), this.error && m("p", { class: "error" }, this.error));
15737
15740
  }
15738
15741
  get el() {
15739
15742
  return this;
15740
15743
  }
15744
+ static get watchers() {
15745
+ return {
15746
+ checked: ["checkedPropChangedHandler"]
15747
+ };
15748
+ }
15741
15749
  static get style() {
15742
15750
  return oC;
15743
15751
  }
@@ -15748,7 +15756,9 @@ const iC = '.checkbox-container{--nylas-primary:#2563eb;--nylas-error:#cc4841;--
15748
15756
  required: [4],
15749
15757
  isChecked: [32],
15750
15758
  error: [32]
15751
- }, [[4, "bookingFormSubmitted", "handleBookingFormSubmitted"]]]);
15759
+ }, [[4, "bookingFormSubmitted", "handleBookingFormSubmitted"]], {
15760
+ checked: ["checkedPropChangedHandler"]
15761
+ }]);
15752
15762
  function K5() {
15753
15763
  if (typeof customElements > "u")
15754
15764
  return;
@@ -16292,7 +16302,7 @@ const jC = ':host{display:block;height:auto;--nylas-primary:#2563eb;--nylas-erro
16292
16302
  date: "YYYY-MM-DD"
16293
16303
  }, HC = te(class extends ne {
16294
16304
  constructor() {
16295
- super(), this.__registerHost(), this.__attachShadow(), this.nylasFormInputChanged = W(this, "nylasFormInputChanged", 7), this.nylasFormInputFocused = W(this, "nylasFormInputFocused", 7), this.nylasFormInputBlurred = W(this, "nylasFormInputBlurred", 7), this.name = "input", this.defaultValue = void 0, this.label = "", this.placeholder = zC.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 = "";
16305
+ super(), this.__registerHost(), this.__attachShadow(), this.nylasFormInputChanged = W(this, "nylasFormInputChanged", 7), this.nylasFormInputFocused = W(this, "nylasFormInputFocused", 7), this.nylasFormInputBlurred = W(this, "nylasFormInputBlurred", 7), this.name = "input", this.defaultValue = void 0, this.label = "", this.placeholder = zC.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;
16296
16306
  }
16297
16307
  handleDefaultValueChange(e) {
16298
16308
  this.value = Wt(e), this.value && this.validatePattern(this.value);
@@ -16304,11 +16314,12 @@ const jC = ':host{display:block;height:auto;--nylas-primary:#2563eb;--nylas-erro
16304
16314
  this.validatePattern(this.value), this.error && e.preventDefault();
16305
16315
  }
16306
16316
  async handleFormSubmitted(e) {
16307
- var n;
16308
- (n = this.el) != null && n.getAttribute("data-page-styling") && (this.validatePattern(this.value), this.error && e.preventDefault());
16317
+ this.validatePattern(this.value), this.error && e.preventDefault();
16309
16318
  }
16310
16319
  handleInput(e) {
16311
- this.error = "", this.value = Wt(e.target.value), this.nylasFormInputChanged.emit({
16320
+ this.error = "";
16321
+ const n = e.target;
16322
+ this.value = Wt(n.value), this.isDateValid = n.validity.valid, this.nylasFormInputChanged.emit({
16312
16323
  value: this.value,
16313
16324
  name: this.name,
16314
16325
  label: this.label,
@@ -16329,14 +16340,18 @@ const jC = ':host{display:block;height:auto;--nylas-primary:#2563eb;--nylas-erro
16329
16340
  });
16330
16341
  }
16331
16342
  validatePattern(e) {
16332
- if (this.error = "", this.required && !e) {
16343
+ if (this.error = "", !this.isDateValid) {
16344
+ this.error = "Please enter a valid date";
16345
+ return;
16346
+ }
16347
+ if (this.required && !e) {
16333
16348
  this.error = this.requiredError || "This field is required.";
16334
16349
  return;
16335
16350
  }
16336
16351
  !this.pattern || !e && !this.required || (this.pattern.test(e) ? this.error = "" : this.error = this.patternError || "Invalid format.");
16337
16352
  }
16338
16353
  render() {
16339
- return m("label", { key: "959c6b772ea4f2f4706d72255d1e36ea8d4fcbd3", part: "ic__label", class: { error: !!this.error } }, this.label && m("p", null, m("span", { class: "label" }, this.label), this.required && m("span", { class: "required" }, "*")), m("div", { key: "a018a19fe2a77416d7ac4d9c7ea84cb0560a70de", part: "ic__input_wrapper", class: "input_wrapper" }, m("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: (e) => this.handleInput(e), onFocus: () => this.handleFocus(), onBlur: () => this.handleBlur() }), m("slot", { key: "9730db9ef73e570667c69879ce457c45b5e196a5", name: "additional-input" })), this.error && m("span", { class: "error help-text" }, this.error));
16354
+ return m("label", { key: "db7e5910f650055747d1f2bca13356d2c3fe3f9e", part: "ic__label", class: { error: !!this.error } }, this.label && m("p", null, m("span", { class: "label" }, this.label), this.required && m("span", { class: "required" }, "*")), m("div", { key: "81d0a723cec27805587e2abdac667504d078e211", part: "ic__input_wrapper", class: "input_wrapper" }, m("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: (e) => this.handleInput(e), onFocus: () => this.handleFocus(), onBlur: () => this.handleBlur() }), m("slot", { key: "6c1d31a29dc01621d9212a95574c329844da0eed", name: "additional-input" })), this.error && m("span", { class: "error help-text" }, this.error));
16340
16355
  }
16341
16356
  get el() {
16342
16357
  return this;
@@ -16362,7 +16377,8 @@ const jC = ':host{display:block;height:auto;--nylas-primary:#2563eb;--nylas-erro
16362
16377
  patternError: [1, "pattern-error"],
16363
16378
  requiredError: [1, "required-error"],
16364
16379
  value: [32],
16365
- error: [32]
16380
+ error: [32],
16381
+ isDateValid: [32]
16366
16382
  }, [[4, "bookingFormSubmitted", "handleBookingFormSubmitted"], [4, "formSubmitted", "handleFormSubmitted"]], {
16367
16383
  defaultValue: ["handleDefaultValueChange"]
16368
16384
  }]);
@@ -24462,7 +24478,7 @@ const Cn = (t, e) => {
24462
24478
  var o, s;
24463
24479
  N("[nylas-scheduler] Component will load"), this.enableUserFeedback && !f$() && vB({
24464
24480
  dsn: "https://9d5731f1c77ca84c9ed3fb9b3ccf7ee1@o74852.ingest.us.sentry.io/4507889638178816",
24465
- release: "1.3.2",
24481
+ release: "1.3.3",
24466
24482
  integrations: (a) => [
24467
24483
  ...a.filter((u) => !1),
24468
24484
  RD({
@@ -24673,7 +24689,7 @@ const Cn = (t, e) => {
24673
24689
  captureContext: {
24674
24690
  tags: {
24675
24691
  "nylas-web-element": "nylas-schduling",
24676
- "nylas-web-element-version": "1.3.2"
24692
+ "nylas-web-element-version": "1.3.3"
24677
24693
  },
24678
24694
  extra: {
24679
24695
  configId: this.configurationId,
@@ -9049,7 +9049,7 @@ class F2 {
9049
9049
  }
9050
9050
  async makeAPIRequest(e, t, r, i = {}) {
9051
9051
  try {
9052
- const u = new URL(this.schedulerAPIURL), o = "1.3.2";
9052
+ const u = new URL(this.schedulerAPIURL), o = "1.3.3";
9053
9053
  return u.pathname = e, await (await fetch(decodeURIComponent(u.toString()), {
9054
9054
  method: t,
9055
9055
  headers: {
@@ -9448,6 +9448,18 @@ const k3 = ".time-period-selector.sc-time-period-selector{display:grid;gap:0.5re
9448
9448
  value: e
9449
9449
  }));
9450
9450
  }
9451
+ defaultSelectedPeriodChanged(e) {
9452
+ this.selectedPeriod = e, this.updateNumberOptionsAndSelectedNumber(e);
9453
+ }
9454
+ defaultSelectedNumberChanged(e) {
9455
+ this.selectedNumber = e;
9456
+ }
9457
+ timePeriodsChanged(e) {
9458
+ this.timePeriodOptions = e.map((t) => ({
9459
+ label: t,
9460
+ value: t
9461
+ }));
9462
+ }
9451
9463
  componentDidLoad() {
9452
9464
  this.selectedNumber = this.defaultSelectedNumber, this.selectedPeriod = this.defaultSelectedPeriod;
9453
9465
  const e = E3[this.selectedPeriod] ?? this.selectedPeriod, t = this.calculateOptions(e);
@@ -9500,11 +9512,18 @@ const k3 = ".time-period-selector.sc-time-period-selector{display:grid;gap:0.5re
9500
9512
  })), this.selectedNumber = parseInt(this.numberOptions[0].value);
9501
9513
  }
9502
9514
  render() {
9503
- return U("div", { key: "76ed6c36ebbcfbb8b8d54edc6a26a9d2a6d6f7fb", class: "time-period-selector" }, typeof this.selectedNumber == "number" && U("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((e) => e.value == this.selectedNumber.toString()) }), typeof this.selectedPeriod == "string" && U("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((e) => e.value == this.selectedPeriod), withSearch: !1 }));
9515
+ return U("div", { key: "f40a2be9bc76a0a5be0ffa3c87779fab644e52f2", class: "time-period-selector" }, typeof this.selectedNumber == "number" && U("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((e) => e.value == this.selectedNumber.toString()) }), typeof this.selectedPeriod == "string" && U("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((e) => e.value == this.selectedPeriod), withSearch: !1 }));
9504
9516
  }
9505
9517
  get host() {
9506
9518
  return this;
9507
9519
  }
9520
+ static get watchers() {
9521
+ return {
9522
+ defaultSelectedPeriod: ["defaultSelectedPeriodChanged"],
9523
+ defaultSelectedNumber: ["defaultSelectedNumberChanged"],
9524
+ timePeriods: ["timePeriodsChanged"]
9525
+ };
9526
+ }
9508
9527
  static get style() {
9509
9528
  return w3;
9510
9529
  }
@@ -9516,7 +9535,11 @@ const k3 = ".time-period-selector.sc-time-period-selector{display:grid;gap:0.5re
9516
9535
  selectedNumber: [32],
9517
9536
  numberOptions: [32],
9518
9537
  timePeriodOptions: [32]
9519
- }, [[0, "inputOptionChanged", "inputOptionChangedHandler"], [0, "nylasFormDropdownChanged", "nylasFormDropdownChangedHandler"]]]);
9538
+ }, [[0, "inputOptionChanged", "inputOptionChangedHandler"], [0, "nylasFormDropdownChanged", "nylasFormDropdownChangedHandler"]], {
9539
+ defaultSelectedPeriod: ["defaultSelectedPeriodChanged"],
9540
+ defaultSelectedNumber: ["defaultSelectedNumberChanged"],
9541
+ timePeriods: ["timePeriodsChanged"]
9542
+ }]);
9520
9543
  function $3() {
9521
9544
  if (typeof customElements > "u")
9522
9545
  return;
@@ -414,10 +414,10 @@ const NylasAdditionalParticipants = class {
414
414
  componentWillLoad() {
415
415
  utils.debug('nylas-additional-participants', 'componentWillLoad');
416
416
  this.host.setAttribute('name', this.name);
417
- this.updateState(this.selectedConfiguration, this.currentUser);
418
417
  }
419
418
  componentDidLoad() {
420
419
  utils.debug('nylas-additional-participants', 'componentDidLoad');
420
+ this.updateState(this.selectedConfiguration, this.currentUser);
421
421
  }
422
422
  disconnectedCallback() {
423
423
  utils.debug('nylas-additional-participants', 'disconnectedCallback');
@@ -4002,6 +4002,28 @@ var __metadata$q = (undefined && undefined.__metadata) || function (k, v) {
4002
4002
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
4003
4003
  return Reflect.metadata(k, v);
4004
4004
  };
4005
+ const staticFields = [
4006
+ {
4007
+ type: 'text',
4008
+ label: 'Your name',
4009
+ key: 'your_name',
4010
+ typeLabel: 'Short text',
4011
+ readonly: true,
4012
+ required: true,
4013
+ isOpen: false,
4014
+ order: 0,
4015
+ },
4016
+ {
4017
+ type: 'email',
4018
+ label: 'Your Email',
4019
+ key: 'your_email',
4020
+ typeLabel: 'Email',
4021
+ readonly: true,
4022
+ isOpen: false,
4023
+ required: true,
4024
+ order: 1,
4025
+ },
4026
+ ];
4005
4027
  const NylasBookingFormConfig = class {
4006
4028
  constructor(hostRef) {
4007
4029
  index$1.registerInstance(this, hostRef);
@@ -4022,6 +4044,9 @@ const NylasBookingFormConfig = class {
4022
4044
  utils.debug('nylas-calendar-picker', 'elementNameChangedHandler', newValue);
4023
4045
  this.host.setAttribute('name', newValue);
4024
4046
  }
4047
+ selectedConfigurationChangedHandler(newValue) {
4048
+ this.updateFormFields(newValue);
4049
+ }
4025
4050
  connectedCallback() {
4026
4051
  utils.debug('nylas-booking-form-config', 'connectedCallback');
4027
4052
  }
@@ -4031,37 +4056,18 @@ const NylasBookingFormConfig = class {
4031
4056
  componentWillLoad() {
4032
4057
  utils.debug('nylas-booking-form-config', 'componentWillLoad');
4033
4058
  this.host.setAttribute('name', this.name);
4034
- const staticFields = [
4035
- {
4036
- type: 'text',
4037
- label: 'Your name',
4038
- key: 'your_name',
4039
- typeLabel: 'Short text',
4040
- readonly: true,
4041
- required: true,
4042
- isOpen: false,
4043
- order: 0,
4044
- },
4045
- {
4046
- type: 'email',
4047
- label: 'Your Email',
4048
- key: 'your_email',
4049
- typeLabel: 'Email',
4050
- readonly: true,
4051
- isOpen: false,
4052
- required: true,
4053
- order: 1,
4054
- },
4055
- ];
4056
4059
  this.formFields = [...staticFields];
4057
4060
  }
4058
4061
  componentDidLoad() {
4059
4062
  utils.debug('nylas-booking-form-config', 'componentDidLoad');
4060
- const additionalFields = Object.entries(this.selectedConfiguration?.scheduler?.additional_fields || {}).map(([id, field]) => ({ ...field, key: id })) ||
4061
- this.additionalFields ||
4062
- [];
4063
+ if (this.selectedConfiguration) {
4064
+ this.updateFormFields(this.selectedConfiguration);
4065
+ }
4066
+ }
4067
+ updateFormFields(config) {
4068
+ const additionalFields = Object.entries(config?.scheduler?.additional_fields || {}).map(([id, field]) => ({ ...field, key: id })) || this.additionalFields || [];
4063
4069
  this.formFields = [
4064
- ...this.formFields,
4070
+ ...staticFields,
4065
4071
  ...additionalFields
4066
4072
  .sort((a, b) => a.order - b.order)
4067
4073
  .map((f, i) => {
@@ -4269,7 +4275,7 @@ const NylasBookingFormConfig = class {
4269
4275
  });
4270
4276
  }
4271
4277
  render() {
4272
- return (index$1.h(index$1.Host, { key: '632d9bd6cc0162efdb7e83b78b23935f04569fcb' }, index$1.h("div", { key: 'dae8d7f52a658b121a992f9cd73cd766e2c16cec', class: "nylas-booking-form-config", part: "nbfc" }, index$1.h("div", { key: '4f02c7163dfecd29df48da9b163e12e9a6c9c357', class: "header", part: "nbfc__header" }, index$1.h("div", { key: '169cfa3f8d4dd519dd0621d032d3e7a13384b8c7', class: "header_text" }, index$1.h("h3", { key: '66e50347bae8fca4c3344030d4d3caf4158244e2' }, "Booking form"), index$1.h("p", { key: '883886b2c841acdbd44e6cb1c18a860a51c52412' }, "Add custom fields to the booking form.")), index$1.h("div", { key: 'e307526fa6d75c4aaaa71c5658006d9e7417c0f0', class: "header_action" }, index$1.h("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: constants.DEFAULT_FORM_FIELD_TYPES, withSearch: false, withChevron: false, dropdownButtonText: "Add new field" }, index$1.h("span", { key: '5ccd949bb563f32f1682b9432759828f086b46e3', slot: "select-icon" }, index$1.h("plus-icon", { key: 'b77ac5dd297071ec6e16c3728db1a7b096e83e74', width: "15", height: "15" }))))), index$1.h("div", { key: 'a7499ce8959d027f0540b086c3393353c3993452', class: "content" }, index$1.h("div", { key: 'ff24161e13beba123ca46c814515704bf06d4259', id: "fields", class: "additional_fields", part: "nbfc__additional_fields" }, this.formFields.map((field, i) => {
4278
+ return (index$1.h(index$1.Host, { key: 'bd832f2b9a02ce53187e4f633e4c0388e6e65a03' }, index$1.h("div", { key: 'fcf79fe131d8e0a99312286b15f228b997d8c0be', class: "nylas-booking-form-config", part: "nbfc" }, index$1.h("div", { key: '07cd086a8af8145f5a8c6676e360fa5f919040f3', class: "header", part: "nbfc__header" }, index$1.h("div", { key: 'f703982061b36b7f4b792f4deff59cc4256b7c25', class: "header_text" }, index$1.h("h3", { key: 'a7cba135c527592a000c296ceaf68bb91c9ddcf4' }, "Booking form"), index$1.h("p", { key: '62acf8b4a583145e2bc300b1b351799dec1ff438' }, "Add custom fields to the booking form.")), index$1.h("div", { key: '574ef9a02aa06ad29ac0b08c22aa749a844d32d8', class: "header_action" }, index$1.h("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: constants.DEFAULT_FORM_FIELD_TYPES, withSearch: false, withChevron: false, dropdownButtonText: "Add new field" }, index$1.h("span", { key: 'e0aaa33a3bd04b79499310c3904984269eaecbf3', slot: "select-icon" }, index$1.h("plus-icon", { key: '06bf29f2b3d0dca74d660db8791a47bc2474652b', width: "15", height: "15" }))))), index$1.h("div", { key: 'b33cfae9a876be328d795366802a1791e22ca164', class: "content" }, index$1.h("div", { key: '0df453e1fc129a13b90b33c6e267ecd9dd149c56', id: "fields", class: "additional_fields", part: "nbfc__additional_fields" }, this.formFields.map((field, i) => {
4273
4279
  return (index$1.h("div", { class: `form-field draggable ${field.readonly && 'fixed'}`, part: "nbfc__form_field", key: i }, index$1.h("div", { class: "form-field_header", part: "nbfc__form_field-header" }, index$1.h("span", { class: "dragable" }, index$1.h("dragable-icon", { width: "24", height: "25" })), index$1.h("div", { class: "form-field_header_text" }, index$1.h("h4", null, field.label), index$1.h("p", null, field.typeLabel)), index$1.h("div", { class: "form-field_header_actions" }, index$1.h("span", { class: `is-required` }, field.required ? 'Required' : 'Optional'), !field.readonly && (index$1.h("button", { onClick: () => {
4274
4280
  this.fieldRemove(i);
4275
4281
  } }, index$1.h("close-icon", null))), index$1.h("span", { class: `chevron ${field.isOpen ? 'open' : 'closed'}`, onClick: () => {
@@ -4289,6 +4295,7 @@ const NylasBookingFormConfig = class {
4289
4295
  get host() { return index$1.getElement(this); }
4290
4296
  static get watchers() { return {
4291
4297
  "name": ["elementNameChangedHandler"],
4298
+ "selectedConfiguration": ["selectedConfigurationChangedHandler"],
4292
4299
  "formFields": ["watchHandler"]
4293
4300
  }; }
4294
4301
  };
@@ -4358,14 +4365,8 @@ const NylasBufferTime = class {
4358
4365
  this.selectedBeforeBufferTime = this.buffer.before;
4359
4366
  this.selectedAfterBufferTime = this.buffer.after;
4360
4367
  }
4368
+ this.updateFormValue();
4361
4369
  this.componentLoaded = true;
4362
- if (typeof this.internals.setFormValue === 'function') {
4363
- const bufferTime = {
4364
- before: this.selectedBeforeBufferTime,
4365
- after: this.selectedAfterBufferTime,
4366
- };
4367
- this.internals.setFormValue(JSON.stringify(bufferTime), this.name);
4368
- }
4369
4370
  }
4370
4371
  componentWillUpdate() {
4371
4372
  utils.debug('nylas-buffer-time', 'componentWillUpdate');
@@ -4388,6 +4389,7 @@ const NylasBufferTime = class {
4388
4389
  const buffer = newValue?.availability?.availability_rules?.buffer;
4389
4390
  this.selectedAfterBufferTime = buffer?.after ? buffer.after : this.buffer.after;
4390
4391
  this.selectedBeforeBufferTime = buffer?.before ? buffer.before : this.buffer.before;
4392
+ this.updateFormValue();
4391
4393
  }
4392
4394
  nylasFormDropdownChangedHandler(event) {
4393
4395
  utils.debug('nylas-buffer-time', 'nylasFormDropdownChangedHandler', event.detail);
@@ -4399,14 +4401,20 @@ const NylasBufferTime = class {
4399
4401
  else if (name === 'after-buffer-time') {
4400
4402
  this.selectedAfterBufferTime = parseInt(value);
4401
4403
  }
4402
- const bufferTime = {
4403
- before: this.selectedBeforeBufferTime,
4404
- after: this.selectedAfterBufferTime,
4405
- };
4406
- this.internals.setFormValue(JSON.stringify(bufferTime), 'booking-calendar');
4404
+ this.updateFormValue();
4407
4405
  };
4408
4406
  this.valueChanged.emit({ ...event.detail, valueChanged });
4409
4407
  }
4408
+ get isInternalsAvailable() {
4409
+ return this.internals !== undefined && typeof this.internals.setFormValue === 'function';
4410
+ }
4411
+ updateFormValue() {
4412
+ const bufferTime = {
4413
+ before: this.selectedBeforeBufferTime,
4414
+ after: this.selectedAfterBufferTime,
4415
+ };
4416
+ this.isInternalsAvailable && this.internals.setFormValue(JSON.stringify(bufferTime), this.name);
4417
+ }
4410
4418
  renderPreview() {
4411
4419
  const totalSlots = 4;
4412
4420
  const slotHeight = 10;
@@ -5020,14 +5028,14 @@ const NylasConnectedCalendars = class {
5020
5028
  selectedParticipants[participant.email] = {
5021
5029
  isOpen: isOpen,
5022
5030
  name: participant.name || participant.email,
5023
- availability: participant.availability,
5031
+ calendars: participant.availability?.calendar_ids,
5024
5032
  };
5025
5033
  }
5026
5034
  });
5027
5035
  return selectedParticipants;
5028
5036
  }
5029
5037
  render() {
5030
- return (index$1.h(index$1.Host, { key: '32710fe762bdf90e238c62695957a9fca31db258' }, index$1.h("div", { key: 'a5ebf4adb7eb8e1b8a065bc05733738da06fbac3', class: "nylas-connected-calendars", part: "nccals" }, index$1.h("div", { key: 'f3c820bcde922a7b852630d86145b1e6e1bf0e25', class: "header", part: "nccals__header" }, index$1.h("h3", { key: 'e2b68d05d416c322b22f969d8d8c890a09812154' }, "Connected Calendars"), index$1.h("p", { key: '4dd41d10a6043fec1c0f4943371c312a29e1d489' }, "Select the calendars to use for checking your availability.", index$1.h("tooltip-component", { key: '6a8ec009fd879e1ed6b6fb65be75a88255adba17' }, index$1.h("info-icon", { key: '0d4a99eaee064ecee1c82ee5b13f3ab87a1d5d93', slot: "tooltip-icon" }), index$1.h("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.")))), index$1.h("div", { key: '720267110636c1dc06ac67b7e715515f56737b73', class: "content", part: "nccals__content" }, index$1.h("form", { key: 'f295ba327aa302ea186dbf2daef3a9c30f96ee5f', ref: el => (this.connectedCalendarsFormRef = el) }, Object.keys(this.participantCalendars).map((key, index) => {
5038
+ return (index$1.h(index$1.Host, { key: '4b8cfcfa751c2790968049f6f10a06193f9adc70' }, index$1.h("div", { key: 'ffbcde80612886bc09b4419bc1cc47d585834fac', class: "nylas-connected-calendars", part: "nccals" }, index$1.h("div", { key: 'd00c14cd0ab8107a2ba609ba58b596a7d3e1e69f', class: "header", part: "nccals__header" }, index$1.h("h3", { key: 'cb0ad20533c33a3778d0b89fe5d51aa4c15864a8' }, "Connected Calendars"), index$1.h("p", { key: 'b3488e835534f477d2585be0a60b5800d42cbaac' }, "Select the calendars to use for checking your availability.", index$1.h("tooltip-component", { key: '6acbd37df60566fa8a3fb8676fe3b3f4287d5c06' }, index$1.h("info-icon", { key: 'f1eb4a75f869b09bee95c074c8d180449654a49f', slot: "tooltip-icon" }), index$1.h("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.")))), index$1.h("div", { key: '844803e9ea3270bfcedbc212990c0038a74dd663', class: "content", part: "nccals__content" }, index$1.h("form", { key: '2970ec7cec45d2582b987cbfab8949c1ece02499', ref: el => (this.connectedCalendarsFormRef = el) }, Object.keys(this.participantCalendars).map((key, index) => {
5031
5039
  const participant = this.selectedCalendars[key];
5032
5040
  const participantCalendars = this.participantCalendars[key];
5033
5041
  if (!participant || !participant.name)
@@ -5847,6 +5855,18 @@ const NylasEventLocation = class {
5847
5855
  this.location = '';
5848
5856
  }
5849
5857
  }
5858
+ currentUserChangedHandler(newValue) {
5859
+ utils.debug('nylas-custom-booking-flow', 'currentUserChangedHandler', newValue);
5860
+ if (newValue?.provider) {
5861
+ this.userProviderState = newValue?.provider;
5862
+ this.setLocationOptionsForProvider(this.userProviderState);
5863
+ }
5864
+ }
5865
+ conferenceProvidersChanged(newValue) {
5866
+ if (newValue?.['zoom'] && !this.locationOptions.some(option => option.value === 'zoom')) {
5867
+ this.locationOptions.push({ value: 'zoom', label: labels['zoom'], labelHTML: this.getLabelHTML('zoom') });
5868
+ }
5869
+ }
5850
5870
  connectedCallback() {
5851
5871
  utils.debug('nylas-event-location', 'connectedCallback');
5852
5872
  }
@@ -5863,15 +5883,8 @@ const NylasEventLocation = class {
5863
5883
  this.selectedLocationOption = this.setDefaultLocationOption(this.eventConferencing || null, this.eventLocation ?? '');
5864
5884
  }
5865
5885
  this.userProviderState = this.userProvider ?? this.currentUser?.provider ?? '';
5866
- switch (this.userProviderState) {
5867
- case 'google':
5868
- this.locationOptions.push({ value: 'google', label: labels['google'], labelHTML: this.getLabelHTML('google') });
5869
- break;
5870
- case 'microsoft':
5871
- this.locationOptions.push({ value: 'microsoft', label: labels['microsoft'], labelHTML: this.getLabelHTML('microsoft') });
5872
- break;
5873
- }
5874
- if (this.conferenceProviders?.['zoom']) {
5886
+ this.setLocationOptionsForProvider(this.userProviderState);
5887
+ if (this.conferenceProviders?.['zoom'] && !this.locationOptions.some(option => option.value === 'zoom')) {
5875
5888
  this.locationOptions.push({ value: 'zoom', label: labels['zoom'], labelHTML: this.getLabelHTML('zoom') });
5876
5889
  }
5877
5890
  }
@@ -5938,6 +5951,20 @@ const NylasEventLocation = class {
5938
5951
  break;
5939
5952
  }
5940
5953
  }
5954
+ setLocationOptionsForProvider(provider) {
5955
+ switch (provider) {
5956
+ case 'google':
5957
+ if (!this.locationOptions.some(option => option.value === 'google')) {
5958
+ this.locationOptions.push({ value: 'google', label: labels['google'], labelHTML: this.getLabelHTML('google') });
5959
+ }
5960
+ break;
5961
+ case 'microsoft':
5962
+ if (!this.locationOptions.some(option => option.value === 'microsoft')) {
5963
+ this.locationOptions.push({ value: 'microsoft', label: labels['microsoft'], labelHTML: this.getLabelHTML('microsoft') });
5964
+ }
5965
+ break;
5966
+ }
5967
+ }
5941
5968
  setDefaultLocationOption(eventConferencing, eventLocation) {
5942
5969
  if (eventConferencing != null && eventConferencing?.provider != null && eventConferencing?.autocreate != null) {
5943
5970
  return constants.CONFERENCE_PROVIDER_MAP[eventConferencing?.provider];
@@ -5988,13 +6015,15 @@ const NylasEventLocation = class {
5988
6015
  }
5989
6016
  render() {
5990
6017
  const defaultOption = typeof this.selectedLocationOption !== 'undefined' ? this.locationOptions.find(i => i.value == this.selectedLocationOption) : null;
5991
- return (index$1.h(index$1.Host, { key: '6869d3c2f6316dc482becc022bc973783332658f' }, index$1.h("div", { key: 'e17b95b15e181f73efd5c666ff0074bcd5467b65', class: "nylas-event-location", part: "nel" }, index$1.h("label", { key: '9370ab01f5f730099dd5061ccf39ca3b53132244', htmlFor: "location" }, "Event meeting or location", index$1.h("span", { key: 'acd558f22ad18afc63b93456450a5aa946916fd4', class: "label-icon" }, index$1.h("tooltip-component", { key: 'bd2ea171a9eef9e9a377a0be2dc4a16b91bb1359' }, index$1.h("info-icon", { key: '745289e658441e9aadb245c94da890cdb3119179', slot: "tooltip-icon" }), index$1.h("span", { key: 'ffa4a9597a7d63e33b639dafd736a654a97589c9', slot: "tooltip-content" }, "Select a conferencing option or add a custom location.")))), index$1.h("div", { key: '59f930e30b758b740128b42a855608a02ee1a739', class: "location-input" }, defaultOption && defaultOption?.label && (index$1.h("select-dropdown", { withSearch: false, name: "location", options: this.locationOptions, defaultSelectedOption: defaultOption, exportparts: "sd_dropdown: nel__dropdown, sd_dropdown-button: nel__dropdown-button, sd_dropdown-content: nel__dropdown-content" }, index$1.h("span", { slot: "select-icon" }, this.getIcon(this.selectedLocationOption)))), this.selectedLocationOption === 'custom' && (index$1.h("input", { type: "text", part: "nel__location", id: "location", name: "location", maxlength: "1024", value: this.location, onInput: e => this.handleChange(e) }))))));
6018
+ return (index$1.h(index$1.Host, { key: 'c91ef22df2a83a3c2ac66ca9011ad8633a085b9e' }, index$1.h("div", { key: '9e6823ce704cf4870f99936a39371b255b165afb', class: "nylas-event-location", part: "nel" }, index$1.h("label", { key: '2d1a71a258d0576460acd68a93cbace4a5c9254c', htmlFor: "location" }, "Event meeting or location", index$1.h("span", { key: '9dd7df66eec4e35a8659c88d4f26be99093e815a', class: "label-icon" }, index$1.h("tooltip-component", { key: '9299313bad5724106fa7108d0874e760945bcb30' }, index$1.h("info-icon", { key: '2490fbc28caa2547d8a3cecc747dc94254c59df3', slot: "tooltip-icon" }), index$1.h("span", { key: 'd6c73fef100e4f962507d58b4ed24a1bd19599c2', slot: "tooltip-content" }, "Select a conferencing option or add a custom location.")))), index$1.h("div", { key: '726f78440a3e65e379368b0a849bee94b2839dfd', class: "location-input" }, defaultOption && defaultOption?.label && (index$1.h("select-dropdown", { withSearch: false, name: "location", options: this.locationOptions, defaultSelectedOption: defaultOption, exportparts: "sd_dropdown: nel__dropdown, sd_dropdown-button: nel__dropdown-button, sd_dropdown-content: nel__dropdown-content" }, index$1.h("span", { slot: "select-icon" }, this.getIcon(this.selectedLocationOption)))), this.selectedLocationOption === 'custom' && (index$1.h("input", { type: "text", part: "nel__location", id: "location", name: "location", maxlength: "1024", value: this.location, onInput: e => this.handleChange(e) }))))));
5992
6019
  }
5993
6020
  static get formAssociated() { return true; }
5994
6021
  get host() { return index$1.getElement(this); }
5995
6022
  static get watchers() { return {
5996
6023
  "name": ["elementNameChangedHandler"],
5997
- "selectedConfiguration": ["selectedConfigurationChangedHandler"]
6024
+ "selectedConfiguration": ["selectedConfigurationChangedHandler"],
6025
+ "currentUser": ["currentUserChangedHandler"],
6026
+ "conferenceProviders": ["conferenceProvidersChanged"]
5998
6027
  }; }
5999
6028
  };
6000
6029
  __decorate$d([
@@ -7254,12 +7283,13 @@ const NylasPageStyling = class {
7254
7283
  this.isOpen = !this.isOpen;
7255
7284
  }
7256
7285
  render() {
7257
- return (index$1.h(index$1.Host, { key: '1601b88e8e7e2c500cb105f237949faa4e9d8dbd' }, index$1.h("div", { key: '2a3072bc409f07961da51439a0f45f930d0725de', part: "nps", class: { 'nylas-page-styling': true, 'no-border': !this.customInputsSlot } }, this.customInputsSlot ? (index$1.h("div", { class: "header", part: "nps__header" }, index$1.h("div", null, index$1.h("h3", null, "Page styling and customization")), index$1.h("div", { class: "drawer-toggle", part: "nps__drawer-toggle--container" }, index$1.h("span", { class: `chevron ${this.isOpen ? 'open' : 'closed'} `, onClick: () => this.toggleConfirmationEmail() }, index$1.h("chevron-icon", { width: "24", height: "24" }))))) : null, index$1.h("div", { key: '404727336fdf8d0de2d8e769df1dcc21ae69f34b', id: "nylas-page-styling__body", class: "nylas-page-styling__body", part: "nps__body" }, index$1.h("div", { key: '2e7da0539b197347719a1202e04c1f7b238cdc9d', class: { 'nylas-page-styling__section': true, 'no-padding': !this.customInputsSlot } }, index$1.h("div", { key: '55ba3e932216f073238b8385071defa9139ca0f9', class: "nylas-page-styling__row" }, index$1.h("div", { key: '333576450039ea7f76bfb548c5947609bc813837', class: { subsection: true, hide: !this.isOpen } })))))));
7286
+ return (index$1.h(index$1.Host, { key: 'c2ffa8ae940e9594f254903d45abc3f7c01d7d41' }, index$1.h("div", { key: '1813654e2aaa9c66d5a535186f227968b434654c', part: "nps", class: { 'nylas-page-styling': true, 'no-border': !this.customInputsSlot } }, this.customInputsSlot ? (index$1.h("div", { class: "header", part: "nps__header" }, index$1.h("div", null, index$1.h("h3", null, "Page styling and customization")), index$1.h("div", { class: "drawer-toggle", part: "nps__drawer-toggle--container" }, index$1.h("span", { class: `chevron ${this.isOpen ? 'open' : 'closed'} `, onClick: () => this.toggleConfirmationEmail() }, index$1.h("chevron-icon", { width: "24", height: "24" }))))) : null, index$1.h("div", { key: 'cff4891eeb1a958feb2a6b20623b97f908721c60', id: "nylas-page-styling__body", class: "nylas-page-styling__body", part: "nps__body" }, index$1.h("div", { key: '16b2398f10b6d7703d02bbbf5c43e3e229499b2d', class: { 'nylas-page-styling__section': true, 'no-padding': !this.customInputsSlot } }, index$1.h("div", { key: 'fd09434076ea4626ee9d7b2710ec8418325aa117', class: "nylas-page-styling__row" }, index$1.h("div", { key: '16a29cabadc4f1a4ba9f389fe232ea22125cfe36', class: { subsection: true, hide: !this.isOpen } })))))));
7258
7287
  }
7259
7288
  static get formAssociated() { return true; }
7260
7289
  get host() { return index$1.getElement(this); }
7261
7290
  static get watchers() { return {
7262
- "name": ["elementNameChangedHandler"]
7291
+ "name": ["elementNameChangedHandler"],
7292
+ "selectedConfiguration": ["selectedConfigurationChangedHandler"]
7263
7293
  }; }
7264
7294
  };
7265
7295
  __decorate$6([
@@ -7603,8 +7633,9 @@ const NylasParticipantsCustomAvailability = class {
7603
7633
  return this.internals !== undefined && typeof this.internals.setFormValue === 'function' && typeof this.internals.setValidity === 'function';
7604
7634
  }
7605
7635
  render() {
7606
- return (index$1.h(index$1.Host, { key: '5034211537411e732ffee5f7420884e5908cc4e5' }, index$1.h("div", { key: '6d016a9b8a3dd204521d9f63de90cd848e9c49e7', class: "nylas-participants-custom-availability", part: "npca" }, index$1.h("div", { key: 'fff77ce67f19e5b0bdc7a8b491ff38b1b7d9af55', class: "header", part: "npca__header" }, index$1.h("h3", { key: '656016ac8ee26636fad2e725237b1bb538563864' }, "Participant open hours"), index$1.h("p", { key: '87ab243b9f3402150c6dae36fc702d7f675350c3' }, "If not set, the default open hours will be used to calculate availability for this participant.")), index$1.h("div", { key: 'ba6c30fbb85fc26d6471494716b18f7f815900ec', class: "content", part: "npca__content" }, index$1.h("form", { key: '7cc553b6730ead929fc45efa67b29b56e41f022e', ref: el => (this.participantFormRef = el) }, Object.keys(this.selectedParticipants).map((key, index) => {
7636
+ return (index$1.h(index$1.Host, { key: '64198b8231e1739484f81d02167d7b5f456eda69' }, index$1.h("div", { key: '68eb8279c510ef937e19dec06960867c98a5b02a', class: "nylas-participants-custom-availability", part: "npca" }, index$1.h("div", { key: '9622d8a7fbc124723cb7135a3a3846fad0e4e458', class: "header", part: "npca__header" }, index$1.h("h3", { key: '6424eeeb937ce2225a63d76482ec633efacd9e7a' }, "Participant open hours"), index$1.h("p", { key: 'ac021fef4d4b0de03d5e2ca335563ec4f328156c' }, "If not set, the default open hours will be used to calculate availability for this participant.")), index$1.h("div", { key: 'e9412e214011b575954196e39ea265dcf86801ec', class: "content", part: "npca__content" }, index$1.h("form", { key: 'ab5b4239f2d2b31fcd69d0f2e2d61a8a13003739', ref: el => (this.participantFormRef = el) }, Object.keys(this.selectedParticipants).map((key, index) => {
7607
7637
  const participant = this.selectedParticipants[key];
7638
+ const participantOpenHours = participant.availability?.open_hours || [];
7608
7639
  if (!participant || !participant.name || !participant.availability)
7609
7640
  return;
7610
7641
  return (index$1.h("div", { class: "participant-container", part: "npca__participant-container", key: `participant-conatiner-${index}` }, index$1.h("div", { class: "participant-title", part: "npca__participant-title" }, index$1.h("p", null, participant.name, "'s open hours"), index$1.h("div", { class: "participant-toggle", part: "npca__participant-toggle--container" }, index$1.h("toggle-switch", { exportparts: "ts_label: npca__toggle-label, ts_input: npca_toggle-input, ts_slider: npca_toggle-slider", name: key, checked: !!participant?.openHours && participant?.openHours.length > 0 }), index$1.h("span", { class: `chevron ${participant.isOpen ? 'open' : 'closed'} ${participant.setCustom ? '' : 'disabled'}`, onClick: () => {
@@ -7612,7 +7643,7 @@ const NylasParticipantsCustomAvailability = class {
7612
7643
  return;
7613
7644
  this.selectedParticipants[key].isOpen = !participant.isOpen;
7614
7645
  this.selectedParticipants = { ...this.selectedParticipants };
7615
- } }, index$1.h("chevron-icon", { width: "24", height: "24" })))), participant.isOpen && (index$1.h("nylas-availability-picker", { key: index, name: `participant-${index}-${key}`, openHours: participant.openHours, defaultTimezone: participant.timezone, hideHeader: true }))));
7646
+ } }, index$1.h("chevron-icon", { width: "24", height: "24" })))), participant.isOpen && (index$1.h("nylas-availability-picker", { key: index, name: `participant-${index}-${key}`, openHours: participantOpenHours, defaultTimezone: participant.timezone, hideHeader: true }))));
7616
7647
  }))))));
7617
7648
  }
7618
7649
  static get formAssociated() { return true; }