@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
@@ -9254,6 +9254,18 @@ const T3 = ':host{display:block;width:inherit;--nylas-primary:#2563eb;--nylas-er
9254
9254
  constructor() {
9255
9255
  super(), this.__registerHost(), this.__attachShadow(), this.selectedOptionsChanged = Jn(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;
9256
9256
  }
9257
+ areOptionsEqual(e, t) {
9258
+ if (e.length !== t.length)
9259
+ return !1;
9260
+ const n = [...e].sort((u, o) => u.label.localeCompare(o.label) || u.value.localeCompare(o.value)), i = [...t].sort((u, o) => u.label.localeCompare(o.label) || u.value.localeCompare(o.value));
9261
+ return n.every((u, o) => {
9262
+ const a = i[o];
9263
+ return u.label === a.label && u.value === a.value;
9264
+ });
9265
+ }
9266
+ optionsChangedHandler(e) {
9267
+ this.areOptionsEqual(e, this.availableOptions) || (this.availableOptions = e);
9268
+ }
9257
9269
  componentDidLoad() {
9258
9270
  W("multi-select-dropdown", "componentDidLoad"), this.options && (this.availableOptions = this.options);
9259
9271
  }
@@ -9332,11 +9344,16 @@ const T3 = ':host{display:block;width:inherit;--nylas-primary:#2563eb;--nylas-er
9332
9344
  }
9333
9345
  render() {
9334
9346
  var e, t;
9335
- return D(Qt, { key: "e1d4d14ecbb535efa9c01bbd472648b0a11f80f0" }, D("div", { key: "4fa54bb57eea3f45d49d0864e11ca20bb6b9b16c", class: "dropdown", part: "msd_dropdown" }, D("label", { key: "dd418efe1b38427042f1f88b9fd615ee89c9f5d9", class: "dropdown-label" }, this.label, D("slot", { key: "a8cd3f9fd40a3b77683c636b3b835e0cbd738981", name: "label-icon", "aria-hidden": "true" })), D("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: (n) => this.handleSelectButtonKeyDown(n) }, D("slot", { key: "45f912fd627eb75e06446a782d91b27bf138677c", name: "select-icon", "aria-hidden": "true" }), D("span", { key: "8271bafba127888d6646b31749292b049e190589", class: "selected-option", part: "msd_dropdown-button-selected-label" }, this.getSelectedOptions().length > 1 ? "Multiple options selected" : ((e = this.availableOptions.filter((n) => n.selected)[0]) == null ? void 0 : e.label) ?? ((t = this.availableOptions[0]) == null ? void 0 : t.label)), D("span", { key: "75caecf1bffad204acab61b8d8809b03a9dbeb73", class: this.isOpen ? "open" : "closed", "aria-hidden": "true" }, D("chevron-icon", { key: "cc9faf08225b9c73481d27a9b3f6e7a43b379c25", width: "16", height: "16" }))), this.error ? D("span", { class: "error" }, this.error) : null, this.isOpen ? null : D("div", { class: "selected-options" }, this.getSelectedOptions().map((n) => D("span", { class: "selected-option" }, n.label, D("button", { key: n.label, onClick: () => this.selectOption(n) }, D("close-icon", null))))), this.isOpen ? D("div", { class: "dropdown-content", part: "msd_dropdown-content" }, D("ul", { tabindex: "-1", role: "listbox", "aria-label": this.name, "aria-multiselectable": !0, "aria-activedescendant": this.ariaActivedescendant, onKeyDown: (n) => this.handleListboxKeydown(n) }, this.availableOptions.map((n) => this.renderOption(n)))) : null));
9347
+ return D(Qt, { key: "f8e72e38ce1323acd6ca5ada6c9b8e4a52fd5cd3" }, D("div", { key: "acd2eead0fe45b85da48057a52d3f99337870795", class: "dropdown", part: "msd_dropdown" }, D("label", { key: "c586999e4b30f366d6033bef3cbf1142040db8a3", class: "dropdown-label" }, this.label, D("slot", { key: "2817a8851a72bbabe9309c3da79e8ca25c1c461e", name: "label-icon", "aria-hidden": "true" })), D("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: (n) => this.handleSelectButtonKeyDown(n) }, D("slot", { key: "e6fc309a7ffb30921118e1cd1d1fb4aea321a0fb", name: "select-icon", "aria-hidden": "true" }), D("span", { key: "62a4abccd0100022f7e163410ffaf8fca8ebaefb", class: "selected-option", part: "msd_dropdown-button-selected-label" }, this.getSelectedOptions().length > 1 ? "Multiple options selected" : ((e = this.availableOptions.filter((n) => n.selected)[0]) == null ? void 0 : e.label) ?? ((t = this.availableOptions[0]) == null ? void 0 : t.label)), D("span", { key: "1fff4fa8e566dcec2ac9e28bcededc41c7b42585", class: this.isOpen ? "open" : "closed", "aria-hidden": "true" }, D("chevron-icon", { key: "39b47d625b2e3e78f795e3853e8a4811842036de", width: "16", height: "16" }))), this.error ? D("span", { class: "error" }, this.error) : null, this.isOpen ? null : D("div", { class: "selected-options" }, this.getSelectedOptions().map((n) => D("span", { class: "selected-option" }, n.label, D("button", { key: n.label, onClick: () => this.selectOption(n) }, D("close-icon", null))))), this.isOpen ? D("div", { class: "dropdown-content", part: "msd_dropdown-content" }, D("ul", { tabindex: "-1", role: "listbox", "aria-label": this.name, "aria-multiselectable": !0, "aria-activedescendant": this.ariaActivedescendant, onKeyDown: (n) => this.handleListboxKeydown(n) }, this.availableOptions.map((n) => this.renderOption(n)))) : null));
9336
9348
  }
9337
9349
  get el() {
9338
9350
  return this;
9339
9351
  }
9352
+ static get watchers() {
9353
+ return {
9354
+ options: ["optionsChangedHandler"]
9355
+ };
9356
+ }
9340
9357
  static get style() {
9341
9358
  return S3;
9342
9359
  }
@@ -9349,7 +9366,9 @@ const T3 = ':host{display:block;width:inherit;--nylas-primary:#2563eb;--nylas-er
9349
9366
  isOpen: [32],
9350
9367
  ariaActivedescendant: [32],
9351
9368
  shouldFocusFirstOption: [32]
9352
- }, [[6, "click", "handleOutsideClick"]]]);
9369
+ }, [[6, "click", "handleOutsideClick"]], {
9370
+ options: ["optionsChangedHandler"]
9371
+ }]);
9353
9372
  function vp() {
9354
9373
  if (typeof customElements > "u")
9355
9374
  return;
@@ -9620,19 +9639,19 @@ const kr = Ne(class extends _e {
9620
9639
  setParticipants(e) {
9621
9640
  const t = {};
9622
9641
  return e == null || e.forEach((n) => {
9623
- var i, u, o;
9642
+ var i, u, o, a;
9624
9643
  if ((i = n == null ? void 0 : n.availability) != null && i.calendar_ids && ((o = (u = n == null ? void 0 : n.availability) == null ? void 0 : u.calendar_ids) == null ? void 0 : o.length) > 0) {
9625
- const a = !!n.is_organizer;
9644
+ const s = !!n.is_organizer;
9626
9645
  t[n.email] = {
9627
- isOpen: a,
9646
+ isOpen: s,
9628
9647
  name: n.name || n.email,
9629
- availability: n.availability
9648
+ calendars: (a = n.availability) == null ? void 0 : a.calendar_ids
9630
9649
  };
9631
9650
  }
9632
9651
  }), t;
9633
9652
  }
9634
9653
  render() {
9635
- return D(Qt, { key: "32710fe762bdf90e238c62695957a9fca31db258" }, D("div", { key: "a5ebf4adb7eb8e1b8a065bc05733738da06fbac3", class: "nylas-connected-calendars", part: "nccals" }, D("div", { key: "f3c820bcde922a7b852630d86145b1e6e1bf0e25", class: "header", part: "nccals__header" }, D("h3", { key: "e2b68d05d416c322b22f969d8d8c890a09812154" }, "Connected Calendars"), D("p", { key: "4dd41d10a6043fec1c0f4943371c312a29e1d489" }, "Select the calendars to use for checking your availability.", D("tooltip-component", { key: "6a8ec009fd879e1ed6b6fb65be75a88255adba17" }, D("info-icon", { key: "0d4a99eaee064ecee1c82ee5b13f3ab87a1d5d93", slot: "tooltip-icon" }), D("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.")))), D("div", { key: "720267110636c1dc06ac67b7e715515f56737b73", class: "content", part: "nccals__content" }, D("form", { key: "f295ba327aa302ea186dbf2daef3a9c30f96ee5f", ref: (e) => this.connectedCalendarsFormRef = e }, Object.keys(this.participantCalendars).map((e, t) => {
9654
+ return D(Qt, { key: "4b8cfcfa751c2790968049f6f10a06193f9adc70" }, D("div", { key: "ffbcde80612886bc09b4419bc1cc47d585834fac", class: "nylas-connected-calendars", part: "nccals" }, D("div", { key: "d00c14cd0ab8107a2ba609ba58b596a7d3e1e69f", class: "header", part: "nccals__header" }, D("h3", { key: "cb0ad20533c33a3778d0b89fe5d51aa4c15864a8" }, "Connected Calendars"), D("p", { key: "b3488e835534f477d2585be0a60b5800d42cbaac" }, "Select the calendars to use for checking your availability.", D("tooltip-component", { key: "6acbd37df60566fa8a3fb8676fe3b3f4287d5c06" }, D("info-icon", { key: "f1eb4a75f869b09bee95c074c8d180449654a49f", slot: "tooltip-icon" }), D("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.")))), D("div", { key: "844803e9ea3270bfcedbc212990c0038a74dd663", class: "content", part: "nccals__content" }, D("form", { key: "2970ec7cec45d2582b987cbfab8949c1ece02499", ref: (e) => this.connectedCalendarsFormRef = e }, Object.keys(this.participantCalendars).map((e, t) => {
9636
9655
  const n = this.selectedCalendars[e], i = this.participantCalendars[e];
9637
9656
  if (!(!n || !n.name))
9638
9657
  return D("div", { class: "participant-container", part: "nccals__container", key: `participant-conatiner-${t}` }, D("div", { class: "participant-title", part: "nccals__title" }, D("p", null, n.name, "'s connected calendars"), D("div", { class: "participant-toggle", part: "nccals__toggle-container" }, D("span", { class: `chevron ${n.isOpen ? "open" : "closed"}`, onClick: () => {
@@ -9179,6 +9179,9 @@ const c3 = '.checkbox-container{--nylas-primary:#2563eb;--nylas-error:#cc4841;--
9179
9179
  constructor() {
9180
9180
  super(), this.__registerHost(), this.__attachShadow(), this.nylasFormCheckboxToggled = Di(this, "nylasFormCheckboxToggled", 7), this.componentType = "checkbox", this.name = "checkbox", this.checked = void 0, this.label = "", this.required = !1, this.isChecked = void 0, this.error = "";
9181
9181
  }
9182
+ checkedPropChangedHandler(e) {
9183
+ typeof e == "boolean" && (this.isChecked = e);
9184
+ }
9182
9185
  componentWillLoad() {
9183
9186
  this.el.setAttribute("component-type", this.componentType);
9184
9187
  }
@@ -9200,11 +9203,16 @@ const c3 = '.checkbox-container{--nylas-primary:#2563eb;--nylas-error:#cc4841;--
9200
9203
  });
9201
9204
  }
9202
9205
  render() {
9203
- return N("div", { key: "f4dfab5a5da9f9c79424930bfd5497c24dc1bfe5", class: "checkbox-container" }, N("label", { key: "78e192f2eddcfd788ac16e80be3ac0b9c47e6f6a" }, N("input", { key: "6e3aa50fb6542cb134dc5454e9fc0052be22e36f", type: "checkbox", name: this.name, checked: this.isChecked, onChange: () => this.toggleCheck() }), N("span", { key: "abbd103b06bf934eff294b443b468e446901c371", class: "checkmark" }), N("slot", { key: "f11d669ba02b705ba7679985e83b91086a17ccc9", name: "label" }, N("span", { key: "1298c44fbbe9ce75638b00ac07e6e83bab1394c2", class: "label" }, this.label))), this.error && N("p", { class: "error" }, this.error));
9206
+ return N("div", { key: "0be06ba2c6b6ed277b3ba736827f9f60e18c6056", class: "checkbox-container" }, N("label", { key: "a0a0cf6b1f546b8d1485dd3aee1b686f0e9c9cba" }, N("input", { key: "96bdb407b3ab6f668cf94b83e8091a604743f93f", type: "checkbox", name: this.name, checked: this.isChecked, onChange: () => this.toggleCheck() }), N("span", { key: "d345d3b47c14213487a9108d78abbf0db26f25af", class: "checkmark" }), N("slot", { key: "aba536e12ed7a97d18790f1a212ead284c1253ec", name: "label" }, N("span", { key: "e7767302bc6865b99cf42949e8bd032e237d2ad9", class: "label" }, this.label))), this.error && N("p", { class: "error" }, this.error));
9204
9207
  }
9205
9208
  get el() {
9206
9209
  return this;
9207
9210
  }
9211
+ static get watchers() {
9212
+ return {
9213
+ checked: ["checkedPropChangedHandler"]
9214
+ };
9215
+ }
9208
9216
  static get style() {
9209
9217
  return d3;
9210
9218
  }
@@ -9215,7 +9223,9 @@ const c3 = '.checkbox-container{--nylas-primary:#2563eb;--nylas-error:#cc4841;--
9215
9223
  required: [4],
9216
9224
  isChecked: [32],
9217
9225
  error: [32]
9218
- }, [[4, "bookingFormSubmitted", "handleBookingFormSubmitted"]]]);
9226
+ }, [[4, "bookingFormSubmitted", "handleBookingFormSubmitted"]], {
9227
+ checked: ["checkedPropChangedHandler"]
9228
+ }]);
9219
9229
  function h3() {
9220
9230
  if (typeof customElements > "u")
9221
9231
  return;
@@ -11387,7 +11387,7 @@ const fx = ':host{display:block;height:auto;--nylas-primary:#2563eb;--nylas-erro
11387
11387
  date: "YYYY-MM-DD"
11388
11388
  }, Rp = mm(class extends wm {
11389
11389
  constructor() {
11390
- super(), this.__registerHost(), this.__attachShadow(), this.nylasFormInputChanged = Rn(this, "nylasFormInputChanged", 7), this.nylasFormInputFocused = Rn(this, "nylasFormInputFocused", 7), this.nylasFormInputBlurred = Rn(this, "nylasFormInputBlurred", 7), this.name = "input", this.defaultValue = void 0, this.label = "", this.placeholder = gx.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 = "";
11390
+ super(), this.__registerHost(), this.__attachShadow(), this.nylasFormInputChanged = Rn(this, "nylasFormInputChanged", 7), this.nylasFormInputFocused = Rn(this, "nylasFormInputFocused", 7), this.nylasFormInputBlurred = Rn(this, "nylasFormInputBlurred", 7), this.name = "input", this.defaultValue = void 0, this.label = "", this.placeholder = gx.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;
11391
11391
  }
11392
11392
  handleDefaultValueChange(e) {
11393
11393
  this.value = zn(e), this.value && this.validatePattern(this.value);
@@ -11399,11 +11399,12 @@ const fx = ':host{display:block;height:auto;--nylas-primary:#2563eb;--nylas-erro
11399
11399
  this.validatePattern(this.value), this.error && e.preventDefault();
11400
11400
  }
11401
11401
  async handleFormSubmitted(e) {
11402
- var t;
11403
- (t = this.el) != null && t.getAttribute("data-page-styling") && (this.validatePattern(this.value), this.error && e.preventDefault());
11402
+ this.validatePattern(this.value), this.error && e.preventDefault();
11404
11403
  }
11405
11404
  handleInput(e) {
11406
- this.error = "", this.value = zn(e.target.value), this.nylasFormInputChanged.emit({
11405
+ this.error = "";
11406
+ const t = e.target;
11407
+ this.value = zn(t.value), this.isDateValid = t.validity.valid, this.nylasFormInputChanged.emit({
11407
11408
  value: this.value,
11408
11409
  name: this.name,
11409
11410
  label: this.label,
@@ -11424,14 +11425,18 @@ const fx = ':host{display:block;height:auto;--nylas-primary:#2563eb;--nylas-erro
11424
11425
  });
11425
11426
  }
11426
11427
  validatePattern(e) {
11427
- if (this.error = "", this.required && !e) {
11428
+ if (this.error = "", !this.isDateValid) {
11429
+ this.error = "Please enter a valid date";
11430
+ return;
11431
+ }
11432
+ if (this.required && !e) {
11428
11433
  this.error = this.requiredError || "This field is required.";
11429
11434
  return;
11430
11435
  }
11431
11436
  !this.pattern || !e && !this.required || (this.pattern.test(e) ? this.error = "" : this.error = this.patternError || "Invalid format.");
11432
11437
  }
11433
11438
  render() {
11434
- return Ce("label", { key: "959c6b772ea4f2f4706d72255d1e36ea8d4fcbd3", part: "ic__label", class: { error: !!this.error } }, this.label && Ce("p", null, Ce("span", { class: "label" }, this.label), this.required && Ce("span", { class: "required" }, "*")), Ce("div", { key: "a018a19fe2a77416d7ac4d9c7ea84cb0560a70de", part: "ic__input_wrapper", class: "input_wrapper" }, Ce("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() }), Ce("slot", { key: "9730db9ef73e570667c69879ce457c45b5e196a5", name: "additional-input" })), this.error && Ce("span", { class: "error help-text" }, this.error));
11439
+ return Ce("label", { key: "db7e5910f650055747d1f2bca13356d2c3fe3f9e", part: "ic__label", class: { error: !!this.error } }, this.label && Ce("p", null, Ce("span", { class: "label" }, this.label), this.required && Ce("span", { class: "required" }, "*")), Ce("div", { key: "81d0a723cec27805587e2abdac667504d078e211", part: "ic__input_wrapper", class: "input_wrapper" }, Ce("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() }), Ce("slot", { key: "6c1d31a29dc01621d9212a95574c329844da0eed", name: "additional-input" })), this.error && Ce("span", { class: "error help-text" }, this.error));
11435
11440
  }
11436
11441
  get el() {
11437
11442
  return this;
@@ -11457,7 +11462,8 @@ const fx = ':host{display:block;height:auto;--nylas-primary:#2563eb;--nylas-erro
11457
11462
  patternError: [1, "pattern-error"],
11458
11463
  requiredError: [1, "required-error"],
11459
11464
  value: [32],
11460
- error: [32]
11465
+ error: [32],
11466
+ isDateValid: [32]
11461
11467
  }, [[4, "bookingFormSubmitted", "handleBookingFormSubmitted"], [4, "formSubmitted", "handleFormSubmitted"]], {
11462
11468
  defaultValue: ["handleDefaultValueChange"]
11463
11469
  }]);