@nylas/web-elements 2.2.0 → 2.2.2

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 (202) hide show
  1. package/dist/nylas-web-elements/{abstract-provider-D75Ucvku.js → abstract-provider-9AZudYSI.js} +2 -2
  2. package/dist/nylas-web-elements/{abstract-provider-D75Ucvku.js.map → abstract-provider-9AZudYSI.js.map} +1 -1
  3. package/dist/nylas-web-elements/add-circle-icon.entry.js +1 -1
  4. package/dist/nylas-web-elements/archive-icon.entry.js +1 -1
  5. package/dist/nylas-web-elements/arrow-icon.entry.js +1 -1
  6. package/dist/nylas-web-elements/bold-icon.entry.js +1 -1
  7. package/dist/nylas-web-elements/button-component.entry.js +1 -1
  8. package/dist/nylas-web-elements/calendar-agenda-fill-icon.entry.js +1 -1
  9. package/dist/nylas-web-elements/calendar-agenda-icon.entry.js +1 -1
  10. package/dist/nylas-web-elements/calendar-cancel-icon.entry.js +1 -1
  11. package/dist/nylas-web-elements/calendar-check-icon.entry.js +1 -1
  12. package/dist/nylas-web-elements/calendar-icon.entry.js +1 -1
  13. package/dist/nylas-web-elements/calendar-info-icon.entry.js +1 -1
  14. package/dist/nylas-web-elements/calendar-patterns-icon.entry.js +1 -1
  15. package/dist/nylas-web-elements/checkbox-component.entry.esm.js.map +1 -1
  16. package/dist/nylas-web-elements/checkbox-component.entry.js +1 -1
  17. package/dist/nylas-web-elements/checkbox-component.entry.js.map +1 -1
  18. package/dist/nylas-web-elements/checkbox-group.entry.js +1 -1
  19. package/dist/nylas-web-elements/checkmark-circle-icon.entry.js +1 -1
  20. package/dist/nylas-web-elements/checkmark-icon.entry.js +1 -1
  21. package/dist/nylas-web-elements/chevron-icon.entry.js +1 -1
  22. package/dist/nylas-web-elements/clock-icon.entry.js +1 -1
  23. package/dist/nylas-web-elements/close-icon.entry.js +1 -1
  24. package/dist/nylas-web-elements/copy-icon.entry.js +1 -1
  25. package/dist/nylas-web-elements/{customParseFormat-Bk5PI6Cs.js → customParseFormat-BJNMxHY2.js} +2 -2
  26. package/dist/nylas-web-elements/{customParseFormat-Bk5PI6Cs.js.map → customParseFormat-BJNMxHY2.js.map} +1 -1
  27. package/dist/nylas-web-elements/delete-icon.entry.js +1 -1
  28. package/dist/nylas-web-elements/document-refresh-icon.entry.js +1 -1
  29. package/dist/nylas-web-elements/dragable-icon.entry.js +1 -1
  30. package/dist/nylas-web-elements/edit-icon.entry.js +1 -1
  31. package/dist/nylas-web-elements/envelope-fill-icon.entry.js +1 -1
  32. package/dist/nylas-web-elements/envelope-icon.entry.js +1 -1
  33. package/dist/nylas-web-elements/eye-icon.entry.js +1 -1
  34. package/dist/nylas-web-elements/feedback-icon.entry.js +1 -1
  35. package/dist/nylas-web-elements/flow-icon.entry.js +1 -1
  36. package/dist/nylas-web-elements/folder-icon.entry.js +1 -1
  37. package/dist/nylas-web-elements/forward-icon.entry.js +1 -1
  38. package/dist/nylas-web-elements/globe-icon.entry.js +1 -1
  39. package/dist/nylas-web-elements/google-logo-icon.entry.js +1 -1
  40. package/dist/nylas-web-elements/google-meet-icon.entry.js +1 -1
  41. package/dist/nylas-web-elements/inbox-icon.entry.js +1 -1
  42. package/dist/nylas-web-elements/{index-BVtainOy.js → index-BPPwIJj2.js} +2 -2
  43. package/dist/nylas-web-elements/{index-BVtainOy.js.map → index-BPPwIJj2.js.map} +1 -1
  44. package/dist/nylas-web-elements/{index-B-KMpdMZ.js → index-Cbn5rIwb.js} +2 -2
  45. package/dist/nylas-web-elements/index-Cbn5rIwb.js.map +1 -0
  46. package/dist/nylas-web-elements/index.esm.js +1 -1
  47. package/dist/nylas-web-elements/info-icon.entry.js +1 -1
  48. package/dist/nylas-web-elements/input-color-picker.entry.js +1 -1
  49. package/dist/nylas-web-elements/input-component.entry.esm.js.map +1 -1
  50. package/dist/nylas-web-elements/input-component.entry.js +1 -1
  51. package/dist/nylas-web-elements/input-component.entry.js.map +1 -1
  52. package/dist/nylas-web-elements/input-dropdown.entry.esm.js.map +1 -1
  53. package/dist/nylas-web-elements/input-dropdown.entry.js +1 -1
  54. package/dist/nylas-web-elements/input-dropdown.entry.js.map +1 -1
  55. package/dist/nylas-web-elements/input-image-url.entry.js +1 -1
  56. package/dist/nylas-web-elements/italic-icon.entry.js +1 -1
  57. package/dist/nylas-web-elements/loading-icon.entry.js +1 -1
  58. package/dist/nylas-web-elements/location-icon.entry.js +1 -1
  59. package/dist/nylas-web-elements/location-off-icon.entry.js +1 -1
  60. package/dist/nylas-web-elements/microsoft-logo-icon.entry.js +1 -1
  61. package/dist/nylas-web-elements/microsoft-teams-icon.entry.js +1 -1
  62. package/dist/nylas-web-elements/multi-select-dropdown.entry.esm.js.map +1 -1
  63. package/dist/nylas-web-elements/multi-select-dropdown.entry.js +1 -1
  64. package/dist/nylas-web-elements/multi-select-dropdown.entry.js.map +1 -1
  65. package/dist/nylas-web-elements/nylas-additional-participants.entry.js +1 -1
  66. package/dist/nylas-web-elements/{nylas-api-request-B1V2koVc.js → nylas-api-request-rYAjhY1J.js} +2 -2
  67. package/dist/nylas-web-elements/{nylas-api-request-B1V2koVc.js.map → nylas-api-request-rYAjhY1J.js.map} +1 -1
  68. package/dist/nylas-web-elements/nylas-availability-picker.entry.js +1 -1
  69. package/dist/nylas-web-elements/nylas-booked-event-card.entry.js +1 -1
  70. package/dist/nylas-web-elements/nylas-booking-calendar-picker.entry.js +1 -1
  71. package/dist/nylas-web-elements/nylas-booking-confirmation-redirect.entry.js +1 -1
  72. package/dist/nylas-web-elements/nylas-booking-confirmation-type.entry.js +1 -1
  73. package/dist/nylas-web-elements/nylas-booking-form-config.entry.js +2 -2
  74. package/dist/nylas-web-elements/nylas-booking-form.entry.js +1 -1
  75. package/dist/nylas-web-elements/nylas-buffer-time.entry.js +1 -1
  76. package/dist/nylas-web-elements/nylas-calendar-picker.entry.js +1 -1
  77. package/dist/nylas-web-elements/nylas-cancel-booking-form.entry.js +1 -1
  78. package/dist/nylas-web-elements/nylas-cancellation-policy.entry.esm.js.map +1 -1
  79. package/dist/nylas-web-elements/nylas-cancellation-policy.entry.js +1 -1
  80. package/dist/nylas-web-elements/nylas-cancellation-policy.entry.js.map +1 -1
  81. package/dist/nylas-web-elements/nylas-cancelled-event-card.entry.js +1 -1
  82. package/dist/nylas-web-elements/nylas-confirmation-email.entry.js +1 -1
  83. package/dist/nylas-web-elements/nylas-confirmed-event-card.entry.js +1 -1
  84. package/dist/nylas-web-elements/nylas-connected-calendars.entry.js +1 -1
  85. package/dist/nylas-web-elements/nylas-custom-booking-flow.entry.js +1 -1
  86. package/dist/nylas-web-elements/nylas-custom-event-slug.entry.js +1 -1
  87. package/dist/nylas-web-elements/nylas-customize-booking-settings.entry.esm.js.map +1 -1
  88. package/dist/nylas-web-elements/nylas-customize-booking-settings.entry.js +1 -1
  89. package/dist/nylas-web-elements/nylas-customize-booking-settings.entry.js.map +1 -1
  90. package/dist/nylas-web-elements/nylas-date-component.entry.js +1 -1
  91. package/dist/nylas-web-elements/nylas-date-picker.entry.js +1 -1
  92. package/dist/nylas-web-elements/nylas-date-picker.entry.js.map +1 -1
  93. package/dist/nylas-web-elements/nylas-disable-emails.entry.js +1 -1
  94. package/dist/nylas-web-elements/nylas-editor-tabs-group.entry.esm.js.map +1 -1
  95. package/dist/nylas-web-elements/nylas-editor-tabs-group.entry.js +1 -1
  96. package/dist/nylas-web-elements/nylas-editor-tabs-group.entry.js.map +1 -1
  97. package/dist/nylas-web-elements/nylas-editor-tabs.entry.esm.js.map +1 -1
  98. package/dist/nylas-web-elements/nylas-editor-tabs.entry.js +1 -1
  99. package/dist/nylas-web-elements/nylas-editor-tabs.entry.js.map +1 -1
  100. package/dist/nylas-web-elements/nylas-event-calendar.entry.js +1 -1
  101. package/dist/nylas-web-elements/nylas-event-capacity.entry.js +1 -1
  102. package/dist/nylas-web-elements/nylas-event-description.entry.esm.js.map +1 -1
  103. package/dist/nylas-web-elements/nylas-event-description.entry.js +1 -1
  104. package/dist/nylas-web-elements/nylas-event-description.entry.js.map +1 -1
  105. package/dist/nylas-web-elements/nylas-event-duration.entry.esm.js.map +1 -1
  106. package/dist/nylas-web-elements/nylas-event-duration.entry.js +1 -1
  107. package/dist/nylas-web-elements/nylas-event-duration.entry.js.map +1 -1
  108. package/dist/nylas-web-elements/nylas-event-info.entry.js +1 -1
  109. package/dist/nylas-web-elements/nylas-event-limits.entry.esm.js.map +1 -1
  110. package/dist/nylas-web-elements/nylas-event-limits.entry.js +1 -1
  111. package/dist/nylas-web-elements/nylas-event-limits.entry.js.map +1 -1
  112. package/dist/nylas-web-elements/nylas-event-location.entry.esm.js.map +1 -1
  113. package/dist/nylas-web-elements/nylas-event-location.entry.js +1 -1
  114. package/dist/nylas-web-elements/nylas-event-location.entry.js.map +1 -1
  115. package/dist/nylas-web-elements/nylas-event-timeslot.entry.js +1 -1
  116. package/dist/nylas-web-elements/nylas-event-title.entry.esm.js.map +1 -1
  117. package/dist/nylas-web-elements/nylas-event-title.entry.js +1 -1
  118. package/dist/nylas-web-elements/nylas-event-title.entry.js.map +1 -1
  119. package/dist/nylas-web-elements/nylas-feedback-form.entry.js +1 -1
  120. package/dist/nylas-web-elements/nylas-form-card.entry.esm.js.map +1 -1
  121. package/dist/nylas-web-elements/nylas-form-card.entry.js +1 -1
  122. package/dist/nylas-web-elements/nylas-form-card.entry.js.map +1 -1
  123. package/dist/nylas-web-elements/nylas-limit-future-bookings.entry.js +1 -1
  124. package/dist/nylas-web-elements/nylas-list-configurations.entry.js +1 -1
  125. package/dist/nylas-web-elements/nylas-locale-switch.entry.js +1 -1
  126. package/dist/nylas-web-elements/nylas-logo.entry.js +1 -1
  127. package/dist/nylas-web-elements/nylas-min-booking-notice.entry.js +1 -1
  128. package/dist/nylas-web-elements/nylas-min-cancellation-notice.entry.js +1 -1
  129. package/dist/nylas-web-elements/nylas-notification.entry.js +1 -1
  130. package/dist/nylas-web-elements/nylas-notification.entry.js.map +1 -1
  131. package/dist/nylas-web-elements/nylas-organizer-confirmation-card.entry.js +1 -1
  132. package/dist/nylas-web-elements/nylas-page-name.entry.esm.js.map +1 -1
  133. package/dist/nylas-web-elements/nylas-page-name.entry.js +1 -1
  134. package/dist/nylas-web-elements/nylas-page-name.entry.js.map +1 -1
  135. package/dist/nylas-web-elements/nylas-page-styling.entry.js +1 -1
  136. package/dist/nylas-web-elements/nylas-participant-booking-calendars.entry.js +1 -1
  137. package/dist/nylas-web-elements/nylas-participants-custom-availability.entry.js +1 -1
  138. package/dist/nylas-web-elements/nylas-reminder-emails.entry.js +1 -1
  139. package/dist/nylas-web-elements/nylas-reminder-time.entry.js +1 -1
  140. package/dist/nylas-web-elements/nylas-scheduler-editor.entry.esm.js.map +1 -1
  141. package/dist/nylas-web-elements/nylas-scheduler-editor.entry.js +3 -3
  142. package/dist/nylas-web-elements/nylas-scheduler-editor.entry.js.map +1 -1
  143. package/dist/nylas-web-elements/nylas-scheduling-method.entry.js +1 -1
  144. package/dist/nylas-web-elements/nylas-scheduling.entry.js +1 -1
  145. package/dist/nylas-web-elements/nylas-select-event-type.entry.js +1 -1
  146. package/dist/nylas-web-elements/nylas-selected-event-card.entry.js +1 -1
  147. package/dist/nylas-web-elements/nylas-specific-time-availability-picker.entry.js +1 -1
  148. package/dist/nylas-web-elements/nylas-time-window-picker.entry.esm.js.map +1 -1
  149. package/dist/nylas-web-elements/nylas-time-window-picker.entry.js +1 -1
  150. package/dist/nylas-web-elements/nylas-time-window-picker.entry.js.map +1 -1
  151. package/dist/nylas-web-elements/nylas-timeslot-interval.entry.esm.js.map +1 -1
  152. package/dist/nylas-web-elements/nylas-timeslot-interval.entry.js +1 -1
  153. package/dist/nylas-web-elements/nylas-timeslot-interval.entry.js.map +1 -1
  154. package/dist/nylas-web-elements/nylas-timeslot-picker.entry.js +1 -1
  155. package/dist/nylas-web-elements/nylas-web-elements.esm.js +1 -1
  156. package/dist/nylas-web-elements/nylas-web-elements.esm.js.map +1 -1
  157. package/dist/nylas-web-elements/paintbrush-fill-icon.entry.js +1 -1
  158. package/dist/nylas-web-elements/paintbrush-icon.entry.js +1 -1
  159. package/dist/nylas-web-elements/people-icon.entry.js +1 -1
  160. package/dist/nylas-web-elements/person-clipboard-icon.entry.js +1 -1
  161. package/dist/nylas-web-elements/person-icon.entry.js +1 -1
  162. package/dist/nylas-web-elements/play-icon.entry.js +1 -1
  163. package/dist/nylas-web-elements/plus-icon.entry.js +1 -1
  164. package/dist/nylas-web-elements/radio-button-group.entry.esm.js.map +1 -1
  165. package/dist/nylas-web-elements/radio-button-group.entry.js +1 -1
  166. package/dist/nylas-web-elements/radio-button-group.entry.js.map +1 -1
  167. package/dist/nylas-web-elements/refresh-icon.entry.js +1 -1
  168. package/dist/nylas-web-elements/{register-component-BHk70oxk.js → register-component-Blj8K64f.js} +2 -2
  169. package/dist/nylas-web-elements/{register-component-BHk70oxk.js.map → register-component-Blj8K64f.js.map} +1 -1
  170. package/dist/nylas-web-elements/reply-all-icon.entry.js +1 -1
  171. package/dist/nylas-web-elements/reply-icon.entry.js +1 -1
  172. package/dist/nylas-web-elements/search-icon.entry.js +1 -1
  173. package/dist/nylas-web-elements/select-dropdown.entry.esm.js.map +1 -1
  174. package/dist/nylas-web-elements/select-dropdown.entry.js +1 -1
  175. package/dist/nylas-web-elements/select-dropdown.entry.js.map +1 -1
  176. package/dist/nylas-web-elements/sent-icon.entry.js +1 -1
  177. package/dist/nylas-web-elements/spam-icon.entry.js +1 -1
  178. package/dist/nylas-web-elements/star-icon.entry.js +1 -1
  179. package/dist/nylas-web-elements/stop-icon.entry.js +1 -1
  180. package/dist/nylas-web-elements/textarea-component.entry.esm.js.map +1 -1
  181. package/dist/nylas-web-elements/textarea-component.entry.js +1 -1
  182. package/dist/nylas-web-elements/textarea-component.entry.js.map +1 -1
  183. package/dist/nylas-web-elements/time-period-selector.entry.js +1 -1
  184. package/dist/nylas-web-elements/toggle-switch.entry.js +1 -1
  185. package/dist/nylas-web-elements/tooltip-component.entry.js +1 -1
  186. package/dist/nylas-web-elements/translate-icon.entry.js +1 -1
  187. package/dist/nylas-web-elements/trash-fill-icon.entry.js +1 -1
  188. package/dist/nylas-web-elements/trash-icon.entry.js +1 -1
  189. package/dist/nylas-web-elements/underline-icon.entry.js +1 -1
  190. package/dist/nylas-web-elements/{utils-Bj5Y75fX.js → utils-DhmCcrVs.js} +3 -3
  191. package/dist/nylas-web-elements/{utils-Bj5Y75fX.js.map → utils-DhmCcrVs.js.map} +1 -1
  192. package/dist/nylas-web-elements/warning-icon.entry.js +1 -1
  193. package/dist/nylas-web-elements/zoom-icon.entry.js +1 -1
  194. package/dist/types/components/design-system/input-component/input-component.d.ts +1 -0
  195. package/dist/types/components/design-system/multi-select-dropdown/multi-select-dropdown.d.ts +1 -0
  196. package/dist/types/components/design-system/textarea-component/textarea-component.d.ts +1 -0
  197. package/dist/types/components/scheduler-editor/nylas-customize-booking-settings/nylas-customize-booking-settings.d.ts +1 -1
  198. package/dist/types/components/scheduler-editor/nylas-time-window-picker/nylas-time-window-picker.d.ts +1 -0
  199. package/dist/types/components.d.ts +4 -4
  200. package/package.json +3 -3
  201. package/readme.md +1 -1
  202. package/dist/nylas-web-elements/index-B-KMpdMZ.js.map +0 -1
@@ -1,2 +1,2 @@
1
- import{r as e,h as l,d as n,e as a}from"./index-B-KMpdMZ.js";import{R as s}from"./register-component-BHk70oxk.js";import{i as o,b as r,I as t}from"./utils-Bj5Y75fX.js";const c=':host{display:block;margin:1rem;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff}.nylas-event-limits__title{color:var(--nylas-base-900);font-size:16px;font-style:normal;font-weight:600;line-height:20px;margin:0;text-align:left}.nylas-event-limits__subtitle{color:var(--nylas-base-600);font-size:14px;font-style:normal;font-weight:400;line-height:20px;margin:0.25rem 0px 0px;text-align:left}.nylas-event-limits__content{padding:1rem;display:flex;flex-direction:column;gap:1rem;background-color:var(--nylas-base-25)}.nylas-event-limits__block{display:flex;justify-content:space-between;gap:0.5rem}';var f=undefined&&undefined.__decorate||function(e,l,n,a){var s=arguments.length,o=s<3?l:a===null?a=Object.getOwnPropertyDescriptor(l,n):a,r;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,l,n,a);else for(var t=e.length-1;t>=0;t--)if(r=e[t])o=(s<3?r(o):s>3?r(l,n,o):r(l,n))||o;return s>3&&o&&Object.defineProperty(l,n,o),o};var y=undefined&&undefined.__metadata||function(e,l){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(e,l)};const i=class{constructor(l){e(this,l);if(l.$hostElement$["s-ei"]){this.internals=l.$hostElement$["s-ei"]}else{this.internals=l.$hostElement$.attachInternals();l.$hostElement$["s-ei"]=this.internals}}selectedLanguageChangedHandler(e,l){if(e===l)return;o.changeLanguage(e)}themeConfigChangedHandler(e,l){if(e===l)return;this.applyThemeConfig(e)}applyThemeConfig(e){if(e){for(const[l,n]of Object.entries(e)){this.el.style.setProperty(`${l}`,n)}}}connectedCallback(){r("nylas-event-limits","connectedCallback")}componentWillLoad(){r("nylas-event-limits","componentWillLoad")}componentDidLoad(){r("nylas-event-limits","componentDidLoad");t(["inputs"],this.el)}disconnectedCallback(){r("nylas-event-limits","disconnectedCallback")}render(){return l(n,{key:"4da6090b62860e8fa857afe0880e40205ab2874e"},l("nylas-form-card",{key:"3ea8374ebdc8ff0e0a24cce40b2430a001bd2ae3",exportparts:"nfc__header: nel__header",themeConfig:this.themeConfig},l("h1",{key:"f0d9f232692bd82c1d745623378a54e326b38761",slot:"header-title",class:"nylas-event-limits__title"},o.t("nylasEventLimits.headerTitle")),l("div",{key:"239d0f7370ebdf1866989f4e77a07946b87eb262",slot:"content",class:"nylas-event-limits__content"},l("slot",{key:"1fb3cd1a9481d7b61d04eae49e311d213577a407",name:"inputs"}))))}static get formAssociated(){return true}get el(){return a(this)}static get watchers(){return{selectedLanguage:["selectedLanguageChangedHandler"],themeConfig:["themeConfigChangedHandler"]}}};f([s({name:"nylas-event-limits",stateToProps:new Map([["schedulerConfig.selectedLanguage","selectedLanguage"],["schedulerConfig.themeConfig","themeConfig"]]),eventToProps:{},fireRegisterEvent:true}),y("design:type",Function),y("design:paramtypes",[]),y("design:returntype",void 0)],i.prototype,"render",null);i.style=c;export{i as nylas_event_limits};
1
+ import{r as e,h as l,d as n,e as a}from"./index-Cbn5rIwb.js";import{R as s}from"./register-component-Blj8K64f.js";import{i as o,b as r,I as c}from"./utils-DhmCcrVs.js";const t=':host{display:block;margin:1rem;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff}.nylas-event-limits__title{color:var(--nylas-base-900);font-size:16px;font-style:normal;font-weight:600;line-height:20px;margin:0;text-align:left}.nylas-event-limits__subtitle{color:var(--nylas-base-600);font-size:14px;font-style:normal;font-weight:400;line-height:20px;margin:0.25rem 0px 0px;text-align:left}.nylas-event-limits__content{padding:1rem;display:flex;flex-direction:column;gap:1rem;background-color:var(--nylas-base-25)}.nylas-event-limits__block{display:flex;justify-content:space-between;gap:0.5rem}';var f=undefined&&undefined.__decorate||function(e,l,n,a){var s=arguments.length,o=s<3?l:a===null?a=Object.getOwnPropertyDescriptor(l,n):a,r;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,l,n,a);else for(var c=e.length-1;c>=0;c--)if(r=e[c])o=(s<3?r(o):s>3?r(l,n,o):r(l,n))||o;return s>3&&o&&Object.defineProperty(l,n,o),o};var y=undefined&&undefined.__metadata||function(e,l){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(e,l)};const i=class{constructor(l){e(this,l);if(l.$hostElement$["s-ei"]){this.internals=l.$hostElement$["s-ei"]}else{this.internals=l.$hostElement$.attachInternals();l.$hostElement$["s-ei"]=this.internals}}selectedLanguageChangedHandler(e,l){if(e===l)return;o.changeLanguage(e)}themeConfigChangedHandler(e,l){if(e===l)return;this.applyThemeConfig(e)}applyThemeConfig(e){if(e){for(const[l,n]of Object.entries(e)){this.el.style.setProperty(`${l}`,n)}}}connectedCallback(){r("nylas-event-limits","connectedCallback")}componentWillLoad(){r("nylas-event-limits","componentWillLoad");this.applyThemeConfig(this.themeConfig)}componentDidLoad(){r("nylas-event-limits","componentDidLoad");c(["inputs"],this.el)}disconnectedCallback(){r("nylas-event-limits","disconnectedCallback")}render(){return l(n,{key:"4caf57fce2257486b0acc7ab240ad4a60173c934"},l("nylas-form-card",{key:"80c1e291dbad7acda0f49c16a053854f9f92c8b5",exportparts:"nfc__header: nel__header",themeConfig:this.themeConfig},l("h1",{key:"5c533827b74dd97cb9778e39ed596e6206f4d97b",slot:"header-title",class:"nylas-event-limits__title"},o.t("nylasEventLimits.headerTitle")),l("div",{key:"72c2f4ddcf7b1afca47381782c01901107692c8c",slot:"content",class:"nylas-event-limits__content"},l("slot",{key:"eebf67f134f2247c0e2921ab08ccc66c777dd18d",name:"inputs"}))))}static get formAssociated(){return true}get el(){return a(this)}static get watchers(){return{selectedLanguage:["selectedLanguageChangedHandler"],themeConfig:["themeConfigChangedHandler"]}}};f([s({name:"nylas-event-limits",stateToProps:new Map([["schedulerConfig.selectedLanguage","selectedLanguage"],["schedulerConfig.themeConfig","themeConfig"]]),eventToProps:{},fireRegisterEvent:true}),y("design:type",Function),y("design:paramtypes",[]),y("design:returntype",void 0)],i.prototype,"render",null);i.style=t;export{i as nylas_event_limits};
2
2
  //# sourceMappingURL=nylas-event-limits.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["nylasEventLimitsCss","NylasEventLimits","selectedLanguageChangedHandler","newVal","oldVal","i18next","changeLanguage","themeConfigChangedHandler","this","applyThemeConfig","themeConfig","key","value","Object","entries","el","style","setProperty","connectedCallback","debug","componentWillLoad","componentDidLoad","checkForMissingSlots","disconnectedCallback","render","h","Host","exportparts","slot","class","t","name","__decorate","RegisterComponent","stateToProps","Map","eventToProps","fireRegisterEvent","prototype"],"sources":["src/components/scheduler-editor/nylas-event-limits/nylas-event-limits.scss?tag=nylas-event-limits&encapsulation=shadow","src/components/scheduler-editor/nylas-event-limits/nylas-event-limits.tsx"],"sourcesContent":["@use '../../../common/styles/variables' as *;\n\n:host {\n display: block;\n margin: 1rem;\n @include default-css-variables;\n}\n\n.nylas-event-limits__title {\n color: var(--nylas-base-900);\n font-size: 16px;\n font-style: normal;\n font-weight: 600;\n line-height: 20px; /* 125% */\n margin: 0;\n text-align: left;\n}\n.nylas-event-limits__subtitle {\n color: var(--nylas-base-600);\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 20px; /* 142.857% */\n margin: 0.25rem 0px 0px;\n text-align: left;\n}\n.nylas-event-limits__content {\n padding: 1rem;\n display: flex;\n flex-direction: column;\n gap: 1rem;\n background-color: var(--nylas-base-25);\n}\n\n.nylas-event-limits__block {\n display: flex;\n justify-content: space-between;\n gap: 0.5rem;\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { checkForMissingSlots, debug } from '@/utils/utils';\nimport { AttachInternals, Component, Element, Host, Prop, Watch, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE } from '@/common/constants';\nimport { ThemeConfig } from '@nylas/core';\n/**\n * The `nylas-event-limits` component is an input form for event limits, such as the number of available days in the future and\n * the minimum period of notice that a guest must provide to cancel a booking.\n * This component is a container for the `nylas-limit-future-bookings` and `nylas-min-cancellation-notice` components.\n *\n * ```html\n * <nylas-event-limits>\n * <div slot=\"inputs\">\n * <nylas-limit-future-bookings></nylas-limit-future-bookings>\n * <nylas-min-cancellation-notice></nylas-min-cancellation-notice>\n * </div>\n * </nylas-event-limits>\n * ```\n *\n * @slot inputs - The event information inputs. This includes the limit future bookings and minimum cancellation notice components.\n */\n@Component({\n tag: 'nylas-event-limits',\n styleUrl: 'nylas-event-limits.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasEventLimits {\n @Element() el!: HTMLElement;\n\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n\n /**\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: ThemeConfig;\n\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n @Watch('selectedLanguage')\n selectedLanguageChangedHandler(newVal: LANGUAGE_CODE, oldVal: LANGUAGE_CODE) {\n if (newVal === oldVal) return;\n i18next.changeLanguage(newVal);\n }\n\n @Watch('themeConfig')\n themeConfigChangedHandler(newVal: ThemeConfig, oldVal: ThemeConfig) {\n if (newVal === oldVal) return;\n this.applyThemeConfig(newVal);\n }\n\n applyThemeConfig(themeConfig?: ThemeConfig) {\n if (themeConfig) {\n for (const [key, value] of Object.entries(themeConfig)) {\n this.el.style.setProperty(`${key}`, value);\n }\n }\n }\n\n connectedCallback() {\n debug('nylas-event-limits', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-event-limits', 'componentWillLoad');\n }\n\n componentDidLoad() {\n debug('nylas-event-limits', 'componentDidLoad');\n checkForMissingSlots(['inputs'], this.el);\n }\n\n disconnectedCallback() {\n debug('nylas-event-limits', 'disconnectedCallback');\n }\n\n @RegisterComponent<NylasEventLimits, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-event-limits',\n stateToProps: new Map([\n ['schedulerConfig.selectedLanguage', 'selectedLanguage'],\n ['schedulerConfig.themeConfig', 'themeConfig'],\n ]),\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <nylas-form-card exportparts=\"nfc__header: nel__header\" themeConfig={this.themeConfig}>\n <h1 slot=\"header-title\" class=\"nylas-event-limits__title\">\n {i18next.t('nylasEventLimits.headerTitle')}\n </h1>\n <div slot=\"content\" class=\"nylas-event-limits__content\">\n <slot name=\"inputs\"></slot>\n </div>\n </nylas-form-card>\n </Host>\n );\n }\n}\n"],"mappings":"wKAAA,MAAMA,EAAsB,+rF,ugBC8BfC,EAAgB,M,0LAmB3B,8BAAAC,CAA+BC,EAAuBC,GACpD,GAAID,IAAWC,EAAQ,OACvBC,EAAQC,eAAeH,E,CAIzB,yBAAAI,CAA0BJ,EAAqBC,GAC7C,GAAID,IAAWC,EAAQ,OACvBI,KAAKC,iBAAiBN,E,CAGxB,gBAAAM,CAAiBC,GACf,GAAIA,EAAa,CACf,IAAK,MAAOC,EAAKC,KAAUC,OAAOC,QAAQJ,GAAc,CACtDF,KAAKO,GAAGC,MAAMC,YAAY,GAAGN,IAAOC,E,GAK1C,iBAAAM,GACEC,EAAM,qBAAsB,oB,CAG9B,iBAAAC,GACED,EAAM,qBAAsB,oB,CAG9B,gBAAAE,GACEF,EAAM,qBAAsB,oBAC5BG,EAAqB,CAAC,UAAWd,KAAKO,G,CAGxC,oBAAAQ,GACEJ,EAAM,qBAAsB,uB,CAY9B,MAAAK,GACE,OACEC,EAACC,EAAI,CAAAf,IAAA,4CACHc,EAAiB,mBAAAd,IAAA,2CAAAgB,YAAY,2BAA2BjB,YAAaF,KAAKE,aACxEe,EAAA,MAAAd,IAAA,2CAAIiB,KAAK,eAAeC,MAAM,6BAC3BxB,EAAQyB,EAAE,iCAEbL,EAAA,OAAAd,IAAA,2CAAKiB,KAAK,UAAUC,MAAM,+BACxBJ,EAAM,QAAAd,IAAA,2CAAAoB,KAAK,a,+LARrBC,EAAA,CATCC,EAAuH,CACtHF,KAAM,qBACNG,aAAc,IAAIC,IAAI,CACpB,CAAC,mCAAoC,oBACrC,CAAC,8BAA+B,iBAElCC,aAAc,GACdC,kBAAmB,O,mFAepBpC,EAAAqC,UAAA,e","ignoreList":[]}
1
+ {"version":3,"names":["nylasEventLimitsCss","NylasEventLimits","selectedLanguageChangedHandler","newVal","oldVal","i18next","changeLanguage","themeConfigChangedHandler","this","applyThemeConfig","themeConfig","key","value","Object","entries","el","style","setProperty","connectedCallback","debug","componentWillLoad","componentDidLoad","checkForMissingSlots","disconnectedCallback","render","h","Host","exportparts","slot","class","t","name","__decorate","RegisterComponent","stateToProps","Map","eventToProps","fireRegisterEvent","prototype"],"sources":["src/components/scheduler-editor/nylas-event-limits/nylas-event-limits.scss?tag=nylas-event-limits&encapsulation=shadow","src/components/scheduler-editor/nylas-event-limits/nylas-event-limits.tsx"],"sourcesContent":["@use '../../../common/styles/variables' as *;\n\n:host {\n display: block;\n margin: 1rem;\n @include default-css-variables;\n}\n\n.nylas-event-limits__title {\n color: var(--nylas-base-900);\n font-size: 16px;\n font-style: normal;\n font-weight: 600;\n line-height: 20px; /* 125% */\n margin: 0;\n text-align: left;\n}\n.nylas-event-limits__subtitle {\n color: var(--nylas-base-600);\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 20px; /* 142.857% */\n margin: 0.25rem 0px 0px;\n text-align: left;\n}\n.nylas-event-limits__content {\n padding: 1rem;\n display: flex;\n flex-direction: column;\n gap: 1rem;\n background-color: var(--nylas-base-25);\n}\n\n.nylas-event-limits__block {\n display: flex;\n justify-content: space-between;\n gap: 0.5rem;\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { checkForMissingSlots, debug } from '@/utils/utils';\nimport { AttachInternals, Component, Element, Host, Prop, Watch, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE } from '@/common/constants';\nimport { ThemeConfig } from '@nylas/core';\n/**\n * The `nylas-event-limits` component is an input form for event limits, such as the number of available days in the future and\n * the minimum period of notice that a guest must provide to cancel a booking.\n * This component is a container for the `nylas-limit-future-bookings` and `nylas-min-cancellation-notice` components.\n *\n * ```html\n * <nylas-event-limits>\n * <div slot=\"inputs\">\n * <nylas-limit-future-bookings></nylas-limit-future-bookings>\n * <nylas-min-cancellation-notice></nylas-min-cancellation-notice>\n * </div>\n * </nylas-event-limits>\n * ```\n *\n * @slot inputs - The event information inputs. This includes the limit future bookings and minimum cancellation notice components.\n */\n@Component({\n tag: 'nylas-event-limits',\n styleUrl: 'nylas-event-limits.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasEventLimits {\n @Element() el!: HTMLElement;\n\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n\n /**\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: ThemeConfig;\n\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n @Watch('selectedLanguage')\n selectedLanguageChangedHandler(newVal: LANGUAGE_CODE, oldVal: LANGUAGE_CODE) {\n if (newVal === oldVal) return;\n i18next.changeLanguage(newVal);\n }\n\n @Watch('themeConfig')\n themeConfigChangedHandler(newVal: ThemeConfig, oldVal: ThemeConfig) {\n if (newVal === oldVal) return;\n this.applyThemeConfig(newVal);\n }\n\n applyThemeConfig(themeConfig?: ThemeConfig) {\n if (themeConfig) {\n for (const [key, value] of Object.entries(themeConfig)) {\n this.el.style.setProperty(`${key}`, value);\n }\n }\n }\n\n connectedCallback() {\n debug('nylas-event-limits', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-event-limits', 'componentWillLoad');\n this.applyThemeConfig(this.themeConfig);\n }\n\n componentDidLoad() {\n debug('nylas-event-limits', 'componentDidLoad');\n checkForMissingSlots(['inputs'], this.el);\n }\n\n disconnectedCallback() {\n debug('nylas-event-limits', 'disconnectedCallback');\n }\n\n @RegisterComponent<NylasEventLimits, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-event-limits',\n stateToProps: new Map([\n ['schedulerConfig.selectedLanguage', 'selectedLanguage'],\n ['schedulerConfig.themeConfig', 'themeConfig'],\n ]),\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <nylas-form-card exportparts=\"nfc__header: nel__header\" themeConfig={this.themeConfig}>\n <h1 slot=\"header-title\" class=\"nylas-event-limits__title\">\n {i18next.t('nylasEventLimits.headerTitle')}\n </h1>\n <div slot=\"content\" class=\"nylas-event-limits__content\">\n <slot name=\"inputs\"></slot>\n </div>\n </nylas-form-card>\n </Host>\n );\n }\n}\n"],"mappings":"wKAAA,MAAMA,EAAsB,+rF,ugBC8BfC,EAAgB,M,0LAmB3B,8BAAAC,CAA+BC,EAAuBC,GACpD,GAAID,IAAWC,EAAQ,OACvBC,EAAQC,eAAeH,E,CAIzB,yBAAAI,CAA0BJ,EAAqBC,GAC7C,GAAID,IAAWC,EAAQ,OACvBI,KAAKC,iBAAiBN,E,CAGxB,gBAAAM,CAAiBC,GACf,GAAIA,EAAa,CACf,IAAK,MAAOC,EAAKC,KAAUC,OAAOC,QAAQJ,GAAc,CACtDF,KAAKO,GAAGC,MAAMC,YAAY,GAAGN,IAAOC,E,GAK1C,iBAAAM,GACEC,EAAM,qBAAsB,oB,CAG9B,iBAAAC,GACED,EAAM,qBAAsB,qBAC5BX,KAAKC,iBAAiBD,KAAKE,Y,CAG7B,gBAAAW,GACEF,EAAM,qBAAsB,oBAC5BG,EAAqB,CAAC,UAAWd,KAAKO,G,CAGxC,oBAAAQ,GACEJ,EAAM,qBAAsB,uB,CAY9B,MAAAK,GACE,OACEC,EAACC,EAAI,CAAAf,IAAA,4CACHc,EAAiB,mBAAAd,IAAA,2CAAAgB,YAAY,2BAA2BjB,YAAaF,KAAKE,aACxEe,EAAA,MAAAd,IAAA,2CAAIiB,KAAK,eAAeC,MAAM,6BAC3BxB,EAAQyB,EAAE,iCAEbL,EAAA,OAAAd,IAAA,2CAAKiB,KAAK,UAAUC,MAAM,+BACxBJ,EAAM,QAAAd,IAAA,2CAAAoB,KAAK,a,+LARrBC,EAAA,CATCC,EAAuH,CACtHF,KAAM,qBACNG,aAAc,IAAIC,IAAI,CACpB,CAAC,mCAAoC,oBACrC,CAAC,8BAA+B,iBAElCC,aAAc,GACdC,kBAAmB,O,mFAepBpC,EAAAqC,UAAA,e","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"nylas-event-location.entry.esm.js","sources":["src/components/scheduler-editor/nylas-event-location/nylas-event-location.scss?tag=nylas-event-location&encapsulation=shadow","src/components/scheduler-editor/nylas-event-location/nylas-event-location.tsx"],"sourcesContent":["@use '../../../common/styles/variables' as *;\n\n:host {\n @include default-css-variables;\n}\n\n.nylas-event-location {\n display: flex;\n flex-direction: column;\n gap: 4px;\n font-family: var(--nylas-font-family);\n\n label {\n display: flex;\n align-items: center;\n color: var(--nylas-base-800);\n font-size: 16px;\n font-style: normal;\n font-weight: 400;\n line-height: 150%; /* 21px */\n span.label-icon {\n margin-left: 4px;\n tooltip-component {\n display: flex;\n }\n }\n }\n\n span[slot='select-icon'] {\n border-right: 1px solid var(--nylas-base-200);\n padding: 16px 0.75rem 16px 0.5rem;\n border-radius: var(--nylas-border-radius-2x);\n border-bottom-right-radius: 0;\n border-top-right-radius: 0;\n height: 20px;\n }\n div.location-input {\n display: grid;\n grid-template-columns: auto 1fr;\n width: 100%;\n gap: 0.5rem;\n @media #{$mobile} {\n grid-template-columns: 1fr;\n }\n input {\n border: 1px solid var(--nylas-base-200);\n border-radius: var(--nylas-border-radius-2x);\n padding: 12px 16px;\n font-family: var(--nylas-font-family);\n font-size: 16px;\n line-height: 24px;\n background-color: var(--nylas-base-0);\n color: var(--nylas-base-900);\n }\n }\n select-dropdown {\n width: 208px;\n @media #{$mobile} {\n width: 100%;\n }\n }\n select-dropdown::part(sd_dropdown) {\n width: 100%;\n }\n select-dropdown::part(sd_dropdown-content) {\n left: calc(35px + 0.5rem);\n }\n select-dropdown::part(sd_dropdown-button) {\n display: flex;\n justify-content: space-between;\n width: 100%;\n border: 1px solid var(--nylas-base-200);\n padding: 0 0.5rem;\n }\n select-dropdown::part(sd_dropdown-button-selected-label) {\n display: inline-flex;\n align-self: center;\n padding: 14px 0;\n font-family: var(--nylas-font-family);\n font-size: 16px;\n line-height: 24px;\n }\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug, sanitize } from '@/utils/utils';\nimport { AttachInternals, Component, Host, State, h, Element, Prop, Watch, Event, EventEmitter, Listen } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { Conference, Configuration } from '@nylas/core';\nimport { CONFERENCE_PROVIDER_MAP, PROVIDER_CONFERENCE_MAP } from '@/common/constants';\nimport { User } from '@/common/nylas-api-request';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE } from '@/common/constants';\nimport { ThemeConfig } from '@nylas/core';\n/**\n * The `nylas-event-location` component is a form input for the location of an event.\n *\n * @part nel - The event location container\n * @part nel__location - The event location input\n * @part nel__dropdown - The dropdown container\n * @part nel__dropdown-button - The dropdown button\n * @part nel__dropdown-content - The dropdown content\n */\n@Component({\n tag: 'nylas-event-location',\n styleUrl: 'nylas-event-location.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasEventLocation {\n /*\n * The host element <nylas-event-location>\n */\n @Element() host!: HTMLElement;\n /**\n * @standalone\n * The name of the event location input.\n */\n @Prop() name: string = 'location';\n\n /**\n * @standalone\n * The current user\n */\n @Prop() currentUser?: User;\n /**\n * @standalone\n * The users provider\n */\n @Prop() userProvider?: string;\n /**\n * @standalone\n * The event conferencing stored in the configuration\n */\n @Prop() eventConferencing?: Conference;\n /**\n * @standalone\n * The conference providers where the key is the provider name ('zoom') and the value is the grant id.\n * We currently support same provider ('google', 'microsoft') for all participants and 'zoom' for cross-provider conferencing.\n */\n @Prop() conferenceProviders?: Record<string, string>;\n\n /**\n * @standalone\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n\n /**\n * @standalone\n * The event location stored in the configuration\n */\n @Prop() eventLocation?: string;\n\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n\n /**\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: ThemeConfig;\n\n /**\n * The selected event location state. This defaults to the event location from the configuration or an empty string.\n */\n @State() location: string = this.eventLocation ?? '';\n /**\n * The grant id for the conferencing of non-default conferencing options.\n */\n @State() grantId: string = this.eventConferencing ? this.setDefaultGrantID(this.eventConferencing) : '';\n /**\n * The selected location option. This defaults to 'none'.\n */\n @State() selectedLocationOption!: string;\n /**\n * The current user provider state.\n */\n @State() userProviderState: string = this.userProvider ?? this.currentUser?.provider ?? '';\n\n /**\n * The state to store location options.\n */\n @State() locationOptions = [\n { value: 'none', label: i18next.t('nylasEventLocation.conferenceOptions.none'), labelHTML: this.getLabelHTML('none') },\n { value: 'custom', label: i18next.t('nylasEventLocation.conferenceOptions.custom'), labelHTML: this.getLabelHTML('custom') },\n ];\n\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * When a name prop is passed, stencil does not automatically set the name attribute on the host element.\n * Since this component is form-associated, the name attribute is required for form submission.\n * This is a workaround to ensure that the name attribute is set on the host element.\n */\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-event-location', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('selectedConfiguration')\n selectedConfigurationChangedHandler(newValue: Configuration) {\n debug('nylas-custom-booking-flow', 'selectedConfigurationChangedHandler', newValue);\n const configLocation = newValue?.event_booking?.location || this.eventLocation;\n const configConferencing = newValue?.event_booking?.conferencing || this.eventConferencing;\n if (configConferencing?.provider) {\n this.selectedLocationOption = this.setDefaultLocationOption(configConferencing, configLocation ?? '');\n this.grantId = this.setDefaultGrantID(configConferencing);\n this.location = configLocation ? configLocation : '';\n } else if (configLocation) {\n this.selectedLocationOption = configLocation ? 'custom' : 'none';\n this.location = configLocation;\n } else {\n this.selectedLocationOption = 'none';\n this.location = '';\n }\n }\n\n @Watch('currentUser')\n currentUserChangedHandler(newValue: User) {\n debug('nylas-custom-booking-flow', 'currentUserChangedHandler', newValue);\n if (newValue?.provider) {\n this.userProviderState = newValue?.provider;\n this.setLocationOptionsForProvider(this.userProviderState);\n }\n }\n\n @Watch('conferenceProviders')\n conferenceProvidersChanged(newValue: Record<string, string>) {\n if (newValue?.['zoom'] && !this.locationOptions.some(option => option.value === 'zoom')) {\n this.locationOptions.push({ value: 'zoom', label: i18next.t('nylasEventLocation.conferenceOptions.zoom'), labelHTML: this.getLabelHTML('zoom') });\n }\n }\n\n @Watch('selectedLanguage')\n selectedLanguageChangedHandler(newVal: LANGUAGE_CODE, oldVal: LANGUAGE_CODE) {\n if (newVal === oldVal) return;\n i18next.changeLanguage(newVal);\n const locOptionValues = this.locationOptions.map(option => option.value);\n locOptionValues.forEach(option => {\n const index = this.locationOptions.findIndex(i => i.value === option);\n this.locationOptions[index].label = i18next.t(`nylasEventLocation.conferenceOptions.${option}`);\n this.locationOptions[index].labelHTML = this.getLabelHTML(option);\n });\n this.locationOptions = [...this.locationOptions];\n }\n\n @Watch('themeConfig')\n themeConfigChangedHandler(newVal: ThemeConfig, oldVal: ThemeConfig) {\n if (newVal === oldVal) return;\n this.applyThemeConfig(newVal);\n }\n\n applyThemeConfig(themeConfig?: ThemeConfig) {\n if (themeConfig) {\n for (const [key, value] of Object.entries(themeConfig)) {\n this.host.style.setProperty(`${key}`, value);\n }\n }\n }\n\n /**\n * This event is fired when the value of the event location changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n connectedCallback() {\n debug('nylas-event-location', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-event-location', 'componentWillLoad');\n this.host.setAttribute('name', this.name);\n }\n\n componentDidLoad() {\n debug('nylas-event-location', 'componentDidLoad');\n if (this.selectedConfiguration?.event_booking) {\n this.selectedConfigurationChangedHandler(this.selectedConfiguration);\n } else {\n this.selectedLocationOption = this.setDefaultLocationOption(this.eventConferencing || null, this.eventLocation ?? '');\n this.location = this.eventLocation ?? '';\n }\n\n this.userProviderState = this.userProvider ?? this.currentUser?.provider ?? '';\n this.setLocationOptionsForProvider(this.userProviderState);\n const formElement = this.internals?.form;\n // Set the initial form value\n if (formElement) {\n const formData = new FormData(formElement);\n formData.set('conference', this.getConferencePayload());\n formData.set(this.name, this.location);\n }\n\n if (this.conferenceProviders?.['zoom'] && !this.locationOptions.some(option => option.value === 'zoom')) {\n this.locationOptions.push({ value: 'zoom', label: i18next.t('nylasEventLocation.conferenceOptions.zoom'), labelHTML: this.getLabelHTML('zoom') });\n }\n }\n\n disconnectedCallback() {\n debug('nylas-event-location', 'disconnectedCallback');\n }\n\n getConferencePayload() {\n if (this.selectedLocationOption === 'custom' || this.selectedLocationOption === 'none') {\n return JSON.stringify(null);\n }\n const grantId = this.conferenceProviders?.[this.selectedLocationOption];\n const payload = {\n provider: PROVIDER_CONFERENCE_MAP[this.selectedLocationOption],\n autocreate: grantId\n ? {\n conf_grant_id: grantId,\n }\n : {},\n };\n return JSON.stringify(payload);\n }\n\n @Listen('nylasFormDropdownChanged')\n nylasFormDropdownChangedHandler(event: CustomEvent<{ value: string }>) {\n this.selectedLocationOption = event.detail.value;\n let payload;\n switch (this.selectedLocationOption) {\n case 'none': {\n this.location = '';\n this.setFormValue('', this.name);\n this.valueChanged.emit({ value: '', name: this.name });\n this.valueChanged.emit({ value: JSON.stringify(null), name: 'conference' });\n break;\n }\n case 'custom': {\n this.valueChanged.emit({ value: JSON.stringify(null), name: 'conference' });\n break;\n }\n case 'google': {\n this.location = '';\n this.setFormValue('', this.name);\n const googleConfGrantId = this.conferenceProviders?.['google'];\n payload = {\n provider: PROVIDER_CONFERENCE_MAP.google,\n autocreate: googleConfGrantId\n ? {\n conf_grant_id: googleConfGrantId,\n }\n : {},\n };\n this.valueChanged.emit({ value: JSON.stringify(payload), name: 'conference' });\n this.valueChanged.emit({ value: '', name: this.name });\n break;\n }\n case 'microsoft': {\n this.location = '';\n this.setFormValue('', this.name);\n const microsoftConfGrantId = this.conferenceProviders?.['microsoft'];\n payload = {\n provider: PROVIDER_CONFERENCE_MAP.microsoft,\n autocreate: microsoftConfGrantId\n ? {\n conf_grant_id: microsoftConfGrantId,\n }\n : {},\n };\n this.valueChanged.emit({ value: JSON.stringify(payload), name: 'conference' });\n this.valueChanged.emit({ value: '', name: this.name });\n break;\n }\n case 'zoom': {\n this.location = '';\n this.setFormValue('', this.name);\n const zoomConfGrantId = this.conferenceProviders?.['zoom'];\n payload = {\n provider: PROVIDER_CONFERENCE_MAP.zoom,\n autocreate: zoomConfGrantId\n ? {\n conf_grant_id: zoomConfGrantId,\n }\n : {},\n };\n this.valueChanged.emit({ value: JSON.stringify(payload), name: 'conference' });\n this.valueChanged.emit({ value: '', name: this.name });\n break;\n }\n }\n }\n\n setLocationOptionsForProvider(provider: string) {\n switch (provider) {\n case 'google':\n if (!this.locationOptions.some(option => option.value === 'google')) {\n this.locationOptions.push({ value: 'google', label: i18next.t('nylasEventLocation.conferenceOptions.google'), labelHTML: this.getLabelHTML('google') });\n }\n break;\n case 'microsoft':\n if (!this.locationOptions.some(option => option.value === 'microsoft')) {\n this.locationOptions.push({ value: 'microsoft', label: i18next.t('nylasEventLocation.conferenceOptions.google'), labelHTML: this.getLabelHTML('microsoft') });\n }\n break;\n }\n }\n\n setDefaultLocationOption(eventConferencing: Conference | null, eventLocation: string) {\n if (eventConferencing != null && eventConferencing?.provider != null) {\n return CONFERENCE_PROVIDER_MAP[eventConferencing?.provider];\n }\n return eventLocation ? 'custom' : 'none';\n }\n setDefaultGrantID(eventConferencing: Conference) {\n if (eventConferencing != null && eventConferencing?.autocreate != null) {\n return eventConferencing?.autocreate?.conf_grant_id;\n }\n return '';\n }\n\n setFormValue(value: string, name: string) {\n if (typeof this.internals.setFormValue === 'function') {\n this.internals.setFormValue(value, name);\n }\n }\n\n handleChange(event) {\n const value = sanitize(event.target.value);\n this.location = value;\n this.setFormValue(value, this.name);\n this.valueChanged.emit({ value: value, name: this.name });\n }\n\n getIcon(location: string) {\n switch (location) {\n case 'none':\n return <location-off-icon />;\n case 'custom':\n return <location-icon />;\n case 'google':\n return <google-meet-icon />;\n case 'microsoft':\n return <microsoft-teams-icon />;\n case 'zoom':\n return <zoom-icon />;\n }\n }\n\n getLabelHTML(location: string) {\n return (\n <span\n class=\"location-label\"\n style={{\n display: 'flex',\n alignItems: 'center',\n gap: '16px',\n width: '-webkit-fill-available',\n }}\n >\n {this.getIcon(location)}\n <span\n class=\"location-text\"\n style={{\n fontSize: '14px',\n fontWeight: '400',\n }}\n >\n {i18next.t(`nylasEventLocation.conferenceOptions.${location}`)}\n </span>\n </span>\n );\n }\n\n @RegisterComponent<NylasEventLocation, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-event-location',\n stateToProps: new Map([\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ['schedulerConfig.conferenceProviders', 'conferenceProviders'],\n ['schedulerConfig.currentUser', 'currentUser'],\n ['schedulerConfig.selectedLanguage', 'selectedLanguage'],\n ['schedulerConfig.themeConfig', 'themeConfig'],\n ]),\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n const defaultOption = typeof this.selectedLocationOption !== 'undefined' ? this.locationOptions.find(i => i.value == this.selectedLocationOption) : null;\n return (\n <Host>\n <div class=\"nylas-event-location\" part=\"nel\">\n <label htmlFor=\"location\">\n {i18next.t('nylasEventLocation.headerTitle')}\n <span class=\"label-icon\">\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">{i18next.t('nylasEventLocation.tooltip.desc')}</span>\n </tooltip-component>\n </span>\n </label>\n <div class=\"location-input\">\n {/* {defaultOption && defaultOption?.label && ( */}\n <select-dropdown\n withSearch={false}\n name=\"location\"\n options={this.locationOptions}\n defaultSelectedOption={defaultOption}\n themeConfig={this.themeConfig}\n exportparts=\"sd_dropdown: nel__dropdown, sd_dropdown-button: nel__dropdown-button, sd_dropdown-content: nel__dropdown-content\"\n >\n <span slot=\"select-icon\">{this.getIcon(this.selectedLocationOption)}</span>\n </select-dropdown>\n {/* )} */}\n {this.selectedLocationOption === 'custom' && (\n <input type=\"text\" part=\"nel__location\" id=\"location\" name=\"location\" maxlength=\"1024\" value={this.location} onInput={e => this.handleChange(e)} />\n )}\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"names":["i18next"],"mappings":";;;;;AAAA,MAAM,qBAAqB,GAAG,k6HAAk6H;;;;;;;;;;;;;;;;MC0Bn7H,kBAAkB,GAAA,MAAA;AAN/B,IAAA,WAAA,CAAA,OAAA,EAAA;;;;;;;;;;AAeU,QAAA,IAAI,CAAA,IAAA,GAAW,UAAU;QAiDxB,IAAA,CAAA,QAAQ,GAAW,IAAI,CAAC,aAAa,IAAI,EAAE;QAI3C,IAAA,CAAA,OAAO,GAAW,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,iBAAiB,CAAC,GAAG,EAAE;AAQ9F,QAAA,IAAA,CAAA,iBAAiB,GAAW,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,WAAW,EAAE,QAAQ,IAAI,EAAE;QAKjF,IAAA,CAAA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Aa,CAAC;YAC9C,CAAC,kCAAkC,EAAE,kBAAkB,CAAC;YACxD,CAAC,6BAA6B,EAAE,aAAa,CAAC;SAC/C,CAAC;AACF,QAAA,YAAY,EAAE,EAAE;AAChB,QAAA,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;CAmCD,EAAA,kBAAA,CAAA,SAAA,EAAA,QAAA,EAAA,IAAA,CAAA;;;;;"}
1
+ {"version":3,"file":"nylas-event-location.entry.esm.js","sources":["src/components/scheduler-editor/nylas-event-location/nylas-event-location.scss?tag=nylas-event-location&encapsulation=shadow","src/components/scheduler-editor/nylas-event-location/nylas-event-location.tsx"],"sourcesContent":["@use '../../../common/styles/variables' as *;\n\n:host {\n @include default-css-variables;\n}\n\n.nylas-event-location {\n display: flex;\n flex-direction: column;\n gap: 4px;\n font-family: var(--nylas-font-family);\n\n label {\n display: flex;\n align-items: center;\n color: var(--nylas-base-800);\n font-size: 16px;\n font-style: normal;\n font-weight: 400;\n line-height: 150%; /* 21px */\n span.label-icon {\n margin-left: 4px;\n tooltip-component {\n display: flex;\n }\n }\n }\n\n span[slot='select-icon'] {\n border-right: 1px solid var(--nylas-base-200);\n padding: 16px 0.75rem 16px 0.5rem;\n border-radius: var(--nylas-border-radius-2x);\n border-bottom-right-radius: 0;\n border-top-right-radius: 0;\n height: 20px;\n }\n div.location-input {\n display: grid;\n grid-template-columns: auto 1fr;\n width: 100%;\n gap: 0.5rem;\n @media #{$mobile} {\n grid-template-columns: 1fr;\n }\n input {\n border: 1px solid var(--nylas-base-200);\n border-radius: var(--nylas-border-radius-2x);\n padding: 12px 16px;\n font-family: var(--nylas-font-family);\n font-size: 16px;\n line-height: 24px;\n background-color: var(--nylas-base-0);\n color: var(--nylas-base-900);\n }\n }\n select-dropdown {\n width: 208px;\n @media #{$mobile} {\n width: 100%;\n }\n }\n select-dropdown::part(sd_dropdown) {\n width: 100%;\n }\n select-dropdown::part(sd_dropdown-content) {\n left: calc(35px + 0.5rem);\n }\n select-dropdown::part(sd_dropdown-button) {\n display: flex;\n justify-content: space-between;\n width: 100%;\n border: 1px solid var(--nylas-base-200);\n padding: 0 0.5rem;\n }\n select-dropdown::part(sd_dropdown-button-selected-label) {\n display: inline-flex;\n align-self: center;\n padding: 14px 0;\n font-family: var(--nylas-font-family);\n font-size: 16px;\n line-height: 24px;\n }\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug, sanitize } from '@/utils/utils';\nimport { AttachInternals, Component, Host, State, h, Element, Prop, Watch, Event, EventEmitter, Listen } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { Conference, Configuration } from '@nylas/core';\nimport { CONFERENCE_PROVIDER_MAP, PROVIDER_CONFERENCE_MAP } from '@/common/constants';\nimport { User } from '@/common/nylas-api-request';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE } from '@/common/constants';\nimport { ThemeConfig } from '@nylas/core';\n/**\n * The `nylas-event-location` component is a form input for the location of an event.\n *\n * @part nel - The event location container\n * @part nel__location - The event location input\n * @part nel__dropdown - The dropdown container\n * @part nel__dropdown-button - The dropdown button\n * @part nel__dropdown-content - The dropdown content\n */\n@Component({\n tag: 'nylas-event-location',\n styleUrl: 'nylas-event-location.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasEventLocation {\n /*\n * The host element <nylas-event-location>\n */\n @Element() host!: HTMLElement;\n /**\n * @standalone\n * The name of the event location input.\n */\n @Prop() name: string = 'location';\n\n /**\n * @standalone\n * The current user\n */\n @Prop() currentUser?: User;\n /**\n * @standalone\n * The users provider\n */\n @Prop() userProvider?: string;\n /**\n * @standalone\n * The event conferencing stored in the configuration\n */\n @Prop() eventConferencing?: Conference;\n /**\n * @standalone\n * The conference providers where the key is the provider name ('zoom') and the value is the grant id.\n * We currently support same provider ('google', 'microsoft') for all participants and 'zoom' for cross-provider conferencing.\n */\n @Prop() conferenceProviders?: Record<string, string>;\n\n /**\n * @standalone\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n\n /**\n * @standalone\n * The event location stored in the configuration\n */\n @Prop() eventLocation?: string;\n\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n\n /**\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: ThemeConfig;\n\n /**\n * The selected event location state. This defaults to the event location from the configuration or an empty string.\n */\n @State() location: string = this.eventLocation ?? '';\n /**\n * The grant id for the conferencing of non-default conferencing options.\n */\n @State() grantId: string = this.eventConferencing ? this.setDefaultGrantID(this.eventConferencing) : '';\n /**\n * The selected location option. This defaults to 'none'.\n */\n @State() selectedLocationOption!: string;\n /**\n * The current user provider state.\n */\n @State() userProviderState: string = this.userProvider ?? this.currentUser?.provider ?? '';\n\n /**\n * The state to store location options.\n */\n @State() locationOptions = [\n { value: 'none', label: i18next.t('nylasEventLocation.conferenceOptions.none'), labelHTML: this.getLabelHTML('none') },\n { value: 'custom', label: i18next.t('nylasEventLocation.conferenceOptions.custom'), labelHTML: this.getLabelHTML('custom') },\n ];\n\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * When a name prop is passed, stencil does not automatically set the name attribute on the host element.\n * Since this component is form-associated, the name attribute is required for form submission.\n * This is a workaround to ensure that the name attribute is set on the host element.\n */\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-event-location', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('selectedConfiguration')\n selectedConfigurationChangedHandler(newValue: Configuration) {\n debug('nylas-custom-booking-flow', 'selectedConfigurationChangedHandler', newValue);\n const configLocation = newValue?.event_booking?.location || this.eventLocation;\n const configConferencing = newValue?.event_booking?.conferencing || this.eventConferencing;\n if (configConferencing?.provider) {\n this.selectedLocationOption = this.setDefaultLocationOption(configConferencing, configLocation ?? '');\n this.grantId = this.setDefaultGrantID(configConferencing);\n this.location = configLocation ? configLocation : '';\n } else if (configLocation) {\n this.selectedLocationOption = configLocation ? 'custom' : 'none';\n this.location = configLocation;\n } else {\n this.selectedLocationOption = 'none';\n this.location = '';\n }\n }\n\n @Watch('currentUser')\n currentUserChangedHandler(newValue: User) {\n debug('nylas-custom-booking-flow', 'currentUserChangedHandler', newValue);\n if (newValue?.provider) {\n this.userProviderState = newValue?.provider;\n this.setLocationOptionsForProvider(this.userProviderState);\n }\n }\n\n @Watch('conferenceProviders')\n conferenceProvidersChanged(newValue: Record<string, string>) {\n if (newValue?.['zoom'] && !this.locationOptions.some(option => option.value === 'zoom')) {\n this.locationOptions.push({ value: 'zoom', label: i18next.t('nylasEventLocation.conferenceOptions.zoom'), labelHTML: this.getLabelHTML('zoom') });\n }\n }\n\n @Watch('selectedLanguage')\n selectedLanguageChangedHandler(newVal: LANGUAGE_CODE, oldVal: LANGUAGE_CODE) {\n if (newVal === oldVal) return;\n i18next.changeLanguage(newVal);\n const locOptionValues = this.locationOptions.map(option => option.value);\n locOptionValues.forEach(option => {\n const index = this.locationOptions.findIndex(i => i.value === option);\n this.locationOptions[index].label = i18next.t(`nylasEventLocation.conferenceOptions.${option}`);\n this.locationOptions[index].labelHTML = this.getLabelHTML(option);\n });\n this.locationOptions = [...this.locationOptions];\n }\n\n @Watch('themeConfig')\n themeConfigChangedHandler(newVal: ThemeConfig, oldVal: ThemeConfig) {\n if (newVal === oldVal) return;\n this.applyThemeConfig(newVal);\n }\n\n applyThemeConfig(themeConfig?: ThemeConfig) {\n if (themeConfig) {\n for (const [key, value] of Object.entries(themeConfig)) {\n this.host.style.setProperty(`${key}`, value);\n }\n }\n }\n\n /**\n * This event is fired when the value of the event location changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n connectedCallback() {\n debug('nylas-event-location', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-event-location', 'componentWillLoad');\n this.host.setAttribute('name', this.name);\n this.applyThemeConfig(this.themeConfig);\n }\n\n componentDidLoad() {\n debug('nylas-event-location', 'componentDidLoad');\n if (this.selectedConfiguration?.event_booking) {\n this.selectedConfigurationChangedHandler(this.selectedConfiguration);\n } else {\n this.selectedLocationOption = this.setDefaultLocationOption(this.eventConferencing || null, this.eventLocation ?? '');\n this.location = this.eventLocation ?? '';\n }\n\n this.userProviderState = this.userProvider ?? this.currentUser?.provider ?? '';\n this.setLocationOptionsForProvider(this.userProviderState);\n const formElement = this.internals?.form;\n // Set the initial form value\n if (formElement) {\n const formData = new FormData(formElement);\n formData.set('conference', this.getConferencePayload());\n formData.set(this.name, this.location);\n }\n\n if (this.conferenceProviders?.['zoom'] && !this.locationOptions.some(option => option.value === 'zoom')) {\n this.locationOptions.push({ value: 'zoom', label: i18next.t('nylasEventLocation.conferenceOptions.zoom'), labelHTML: this.getLabelHTML('zoom') });\n }\n }\n\n disconnectedCallback() {\n debug('nylas-event-location', 'disconnectedCallback');\n }\n\n getConferencePayload() {\n if (this.selectedLocationOption === 'custom' || this.selectedLocationOption === 'none') {\n return JSON.stringify(null);\n }\n const grantId = this.conferenceProviders?.[this.selectedLocationOption];\n const payload = {\n provider: PROVIDER_CONFERENCE_MAP[this.selectedLocationOption],\n autocreate: grantId\n ? {\n conf_grant_id: grantId,\n }\n : {},\n };\n return JSON.stringify(payload);\n }\n\n @Listen('nylasFormDropdownChanged')\n nylasFormDropdownChangedHandler(event: CustomEvent<{ value: string }>) {\n this.selectedLocationOption = event.detail.value;\n let payload;\n switch (this.selectedLocationOption) {\n case 'none': {\n this.location = '';\n this.setFormValue('', this.name);\n this.valueChanged.emit({ value: '', name: this.name });\n this.valueChanged.emit({ value: JSON.stringify(null), name: 'conference' });\n break;\n }\n case 'custom': {\n this.valueChanged.emit({ value: JSON.stringify(null), name: 'conference' });\n break;\n }\n case 'google': {\n this.location = '';\n this.setFormValue('', this.name);\n const googleConfGrantId = this.conferenceProviders?.['google'];\n payload = {\n provider: PROVIDER_CONFERENCE_MAP.google,\n autocreate: googleConfGrantId\n ? {\n conf_grant_id: googleConfGrantId,\n }\n : {},\n };\n this.valueChanged.emit({ value: JSON.stringify(payload), name: 'conference' });\n this.valueChanged.emit({ value: '', name: this.name });\n break;\n }\n case 'microsoft': {\n this.location = '';\n this.setFormValue('', this.name);\n const microsoftConfGrantId = this.conferenceProviders?.['microsoft'];\n payload = {\n provider: PROVIDER_CONFERENCE_MAP.microsoft,\n autocreate: microsoftConfGrantId\n ? {\n conf_grant_id: microsoftConfGrantId,\n }\n : {},\n };\n this.valueChanged.emit({ value: JSON.stringify(payload), name: 'conference' });\n this.valueChanged.emit({ value: '', name: this.name });\n break;\n }\n case 'zoom': {\n this.location = '';\n this.setFormValue('', this.name);\n const zoomConfGrantId = this.conferenceProviders?.['zoom'];\n payload = {\n provider: PROVIDER_CONFERENCE_MAP.zoom,\n autocreate: zoomConfGrantId\n ? {\n conf_grant_id: zoomConfGrantId,\n }\n : {},\n };\n this.valueChanged.emit({ value: JSON.stringify(payload), name: 'conference' });\n this.valueChanged.emit({ value: '', name: this.name });\n break;\n }\n }\n }\n\n setLocationOptionsForProvider(provider: string) {\n switch (provider) {\n case 'google':\n if (!this.locationOptions.some(option => option.value === 'google')) {\n this.locationOptions.push({ value: 'google', label: i18next.t('nylasEventLocation.conferenceOptions.google'), labelHTML: this.getLabelHTML('google') });\n }\n break;\n case 'microsoft':\n if (!this.locationOptions.some(option => option.value === 'microsoft')) {\n this.locationOptions.push({ value: 'microsoft', label: i18next.t('nylasEventLocation.conferenceOptions.google'), labelHTML: this.getLabelHTML('microsoft') });\n }\n break;\n }\n }\n\n setDefaultLocationOption(eventConferencing: Conference | null, eventLocation: string) {\n if (eventConferencing != null && eventConferencing?.provider != null) {\n return CONFERENCE_PROVIDER_MAP[eventConferencing?.provider];\n }\n return eventLocation ? 'custom' : 'none';\n }\n setDefaultGrantID(eventConferencing: Conference) {\n if (eventConferencing != null && eventConferencing?.autocreate != null) {\n return eventConferencing?.autocreate?.conf_grant_id;\n }\n return '';\n }\n\n setFormValue(value: string, name: string) {\n if (typeof this.internals.setFormValue === 'function') {\n this.internals.setFormValue(value, name);\n }\n }\n\n handleChange(event) {\n const value = sanitize(event.target.value);\n this.location = value;\n this.setFormValue(value, this.name);\n this.valueChanged.emit({ value: value, name: this.name });\n }\n\n getIcon(location: string) {\n switch (location) {\n case 'none':\n return <location-off-icon />;\n case 'custom':\n return <location-icon />;\n case 'google':\n return <google-meet-icon />;\n case 'microsoft':\n return <microsoft-teams-icon />;\n case 'zoom':\n return <zoom-icon />;\n }\n }\n\n getLabelHTML(location: string) {\n return (\n <span\n class=\"location-label\"\n style={{\n display: 'flex',\n alignItems: 'center',\n gap: '16px',\n width: '-webkit-fill-available',\n }}\n >\n {this.getIcon(location)}\n <span\n class=\"location-text\"\n style={{\n fontSize: '14px',\n fontWeight: '400',\n }}\n >\n {i18next.t(`nylasEventLocation.conferenceOptions.${location}`)}\n </span>\n </span>\n );\n }\n\n @RegisterComponent<NylasEventLocation, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-event-location',\n stateToProps: new Map([\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ['schedulerConfig.conferenceProviders', 'conferenceProviders'],\n ['schedulerConfig.currentUser', 'currentUser'],\n ['schedulerConfig.selectedLanguage', 'selectedLanguage'],\n ['schedulerConfig.themeConfig', 'themeConfig'],\n ]),\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n const defaultOption = typeof this.selectedLocationOption !== 'undefined' ? this.locationOptions.find(i => i.value == this.selectedLocationOption) : null;\n return (\n <Host>\n <div class=\"nylas-event-location\" part=\"nel\">\n <label htmlFor=\"location\">\n {i18next.t('nylasEventLocation.headerTitle')}\n <span class=\"label-icon\">\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">{i18next.t('nylasEventLocation.tooltip.desc')}</span>\n </tooltip-component>\n </span>\n </label>\n <div class=\"location-input\">\n {/* {defaultOption && defaultOption?.label && ( */}\n <select-dropdown\n withSearch={false}\n name=\"location\"\n options={this.locationOptions}\n defaultSelectedOption={defaultOption}\n themeConfig={this.themeConfig}\n exportparts=\"sd_dropdown: nel__dropdown, sd_dropdown-button: nel__dropdown-button, sd_dropdown-content: nel__dropdown-content\"\n >\n <span slot=\"select-icon\">{this.getIcon(this.selectedLocationOption)}</span>\n </select-dropdown>\n {/* )} */}\n {this.selectedLocationOption === 'custom' && (\n <input type=\"text\" part=\"nel__location\" id=\"location\" name=\"location\" maxlength=\"1024\" value={this.location} onInput={e => this.handleChange(e)} />\n )}\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"names":["i18next"],"mappings":";;;;;AAAA,MAAM,qBAAqB,GAAG,k6HAAk6H;;;;;;;;;;;;;;;;MC0Bn7H,kBAAkB,GAAA,MAAA;AAN/B,IAAA,WAAA,CAAA,OAAA,EAAA;;;;;;;;;;AAeU,QAAA,IAAI,CAAA,IAAA,GAAW,UAAU;QAiDxB,IAAA,CAAA,QAAQ,GAAW,IAAI,CAAC,aAAa,IAAI,EAAE;QAI3C,IAAA,CAAA,OAAO,GAAW,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,iBAAiB,CAAC,GAAG,EAAE;AAQ9F,QAAA,IAAA,CAAA,iBAAiB,GAAW,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,WAAW,EAAE,QAAQ,IAAI,EAAE;QAKjF,IAAA,CAAA,eAAe,GAAG;YACzB,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAEA,QAAO,CAAC,CAAC,CAAC,2CAA2C,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE;YACtH,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAEA,QAAO,CAAC,CAAC,CAAC,6CAA6C,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,EAAE;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}
@@ -1,2 +1,2 @@
1
- import{r as e,a as n,h as o,d as t,e as a}from"./index-B-KMpdMZ.js";import{R as s}from"./register-component-BHk70oxk.js";import{i as l,b as i,n as r}from"./utils-Bj5Y75fX.js";import{P as c,f as d}from"./constants-DhnshuDN.js";const f=':host{--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff}.nylas-event-location{display:flex;flex-direction:column;gap:4px;font-family:var(--nylas-font-family)}.nylas-event-location label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:16px;font-style:normal;font-weight:400;line-height:150%;}.nylas-event-location label span.label-icon{margin-left:4px}.nylas-event-location label span.label-icon tooltip-component{display:flex}.nylas-event-location span[slot=select-icon]{border-right:1px solid var(--nylas-base-200);padding:16px 0.75rem 16px 0.5rem;border-radius:var(--nylas-border-radius-2x);border-bottom-right-radius:0;border-top-right-radius:0;height:20px}.nylas-event-location div.location-input{display:grid;grid-template-columns:auto 1fr;width:100%;gap:0.5rem}@media screen and (max-width: 768px){.nylas-event-location div.location-input{grid-template-columns:1fr}}.nylas-event-location div.location-input input{border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);padding:12px 16px;font-family:var(--nylas-font-family);font-size:16px;line-height:24px;background-color:var(--nylas-base-0);color:var(--nylas-base-900)}.nylas-event-location select-dropdown{width:208px}@media screen and (max-width: 768px){.nylas-event-location select-dropdown{width:100%}}.nylas-event-location select-dropdown::part(sd_dropdown){width:100%}.nylas-event-location select-dropdown::part(sd_dropdown-content){left:calc(35px + 0.5rem)}.nylas-event-location select-dropdown::part(sd_dropdown-button){display:flex;justify-content:space-between;width:100%;border:1px solid var(--nylas-base-200);padding:0 0.5rem}.nylas-event-location select-dropdown::part(sd_dropdown-button-selected-label){display:inline-flex;align-self:center;padding:14px 0;font-family:var(--nylas-font-family);font-size:16px;line-height:24px}';var h=undefined&&undefined.__decorate||function(e,n,o,t){var a=arguments.length,s=a<3?n:t===null?t=Object.getOwnPropertyDescriptor(n,o):t,l;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,n,o,t);else for(var i=e.length-1;i>=0;i--)if(l=e[i])s=(a<3?l(s):a>3?l(n,o,s):l(n,o))||s;return a>3&&s&&Object.defineProperty(n,o,s),s};var y=undefined&&undefined.__metadata||function(e,n){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(e,n)};const u=class{constructor(o){e(this,o);this.valueChanged=n(this,"valueChanged",7);if(o.$hostElement$["s-ei"]){this.internals=o.$hostElement$["s-ei"]}else{this.internals=o.$hostElement$.attachInternals();o.$hostElement$["s-ei"]=this.internals}this.name="location";this.location=this.eventLocation??"";this.grantId=this.eventConferencing?this.setDefaultGrantID(this.eventConferencing):"";this.userProviderState=this.userProvider??this.currentUser?.provider??"";this.locationOptions=[{value:"none",label:l.t("nylasEventLocation.conferenceOptions.none"),labelHTML:this.getLabelHTML("none")},{value:"custom",label:l.t("nylasEventLocation.conferenceOptions.custom"),labelHTML:this.getLabelHTML("custom")}]}elementNameChangedHandler(e){i("nylas-event-location","elementNameChangedHandler",e);this.host.setAttribute("name",e)}selectedConfigurationChangedHandler(e){i("nylas-custom-booking-flow","selectedConfigurationChangedHandler",e);const n=e?.event_booking?.location||this.eventLocation;const o=e?.event_booking?.conferencing||this.eventConferencing;if(o?.provider){this.selectedLocationOption=this.setDefaultLocationOption(o,n??"");this.grantId=this.setDefaultGrantID(o);this.location=n?n:""}else if(n){this.selectedLocationOption=n?"custom":"none";this.location=n}else{this.selectedLocationOption="none";this.location=""}}currentUserChangedHandler(e){i("nylas-custom-booking-flow","currentUserChangedHandler",e);if(e?.provider){this.userProviderState=e?.provider;this.setLocationOptionsForProvider(this.userProviderState)}}conferenceProvidersChanged(e){if(e?.["zoom"]&&!this.locationOptions.some((e=>e.value==="zoom"))){this.locationOptions.push({value:"zoom",label:l.t("nylasEventLocation.conferenceOptions.zoom"),labelHTML:this.getLabelHTML("zoom")})}}selectedLanguageChangedHandler(e,n){if(e===n)return;l.changeLanguage(e);const o=this.locationOptions.map((e=>e.value));o.forEach((e=>{const n=this.locationOptions.findIndex((n=>n.value===e));this.locationOptions[n].label=l.t(`nylasEventLocation.conferenceOptions.${e}`);this.locationOptions[n].labelHTML=this.getLabelHTML(e)}));this.locationOptions=[...this.locationOptions]}themeConfigChangedHandler(e,n){if(e===n)return;this.applyThemeConfig(e)}applyThemeConfig(e){if(e){for(const[n,o]of Object.entries(e)){this.host.style.setProperty(`${n}`,o)}}}connectedCallback(){i("nylas-event-location","connectedCallback")}componentWillLoad(){i("nylas-event-location","componentWillLoad");this.host.setAttribute("name",this.name)}componentDidLoad(){i("nylas-event-location","componentDidLoad");if(this.selectedConfiguration?.event_booking){this.selectedConfigurationChangedHandler(this.selectedConfiguration)}else{this.selectedLocationOption=this.setDefaultLocationOption(this.eventConferencing||null,this.eventLocation??"");this.location=this.eventLocation??""}this.userProviderState=this.userProvider??this.currentUser?.provider??"";this.setLocationOptionsForProvider(this.userProviderState);const e=this.internals?.form;if(e){const n=new FormData(e);n.set("conference",this.getConferencePayload());n.set(this.name,this.location)}if(this.conferenceProviders?.["zoom"]&&!this.locationOptions.some((e=>e.value==="zoom"))){this.locationOptions.push({value:"zoom",label:l.t("nylasEventLocation.conferenceOptions.zoom"),labelHTML:this.getLabelHTML("zoom")})}}disconnectedCallback(){i("nylas-event-location","disconnectedCallback")}getConferencePayload(){if(this.selectedLocationOption==="custom"||this.selectedLocationOption==="none"){return JSON.stringify(null)}const e=this.conferenceProviders?.[this.selectedLocationOption];const n={provider:c[this.selectedLocationOption],autocreate:e?{conf_grant_id:e}:{}};return JSON.stringify(n)}nylasFormDropdownChangedHandler(e){this.selectedLocationOption=e.detail.value;let n;switch(this.selectedLocationOption){case"none":{this.location="";this.setFormValue("",this.name);this.valueChanged.emit({value:"",name:this.name});this.valueChanged.emit({value:JSON.stringify(null),name:"conference"});break}case"custom":{this.valueChanged.emit({value:JSON.stringify(null),name:"conference"});break}case"google":{this.location="";this.setFormValue("",this.name);const e=this.conferenceProviders?.["google"];n={provider:c.google,autocreate:e?{conf_grant_id:e}:{}};this.valueChanged.emit({value:JSON.stringify(n),name:"conference"});this.valueChanged.emit({value:"",name:this.name});break}case"microsoft":{this.location="";this.setFormValue("",this.name);const e=this.conferenceProviders?.["microsoft"];n={provider:c.microsoft,autocreate:e?{conf_grant_id:e}:{}};this.valueChanged.emit({value:JSON.stringify(n),name:"conference"});this.valueChanged.emit({value:"",name:this.name});break}case"zoom":{this.location="";this.setFormValue("",this.name);const e=this.conferenceProviders?.["zoom"];n={provider:c.zoom,autocreate:e?{conf_grant_id:e}:{}};this.valueChanged.emit({value:JSON.stringify(n),name:"conference"});this.valueChanged.emit({value:"",name:this.name});break}}}setLocationOptionsForProvider(e){switch(e){case"google":if(!this.locationOptions.some((e=>e.value==="google"))){this.locationOptions.push({value:"google",label:l.t("nylasEventLocation.conferenceOptions.google"),labelHTML:this.getLabelHTML("google")})}break;case"microsoft":if(!this.locationOptions.some((e=>e.value==="microsoft"))){this.locationOptions.push({value:"microsoft",label:l.t("nylasEventLocation.conferenceOptions.google"),labelHTML:this.getLabelHTML("microsoft")})}break}}setDefaultLocationOption(e,n){if(e!=null&&e?.provider!=null){return d[e?.provider]}return n?"custom":"none"}setDefaultGrantID(e){if(e!=null&&e?.autocreate!=null){return e?.autocreate?.conf_grant_id}return""}setFormValue(e,n){if(typeof this.internals.setFormValue==="function"){this.internals.setFormValue(e,n)}}handleChange(e){const n=r(e.target.value);this.location=n;this.setFormValue(n,this.name);this.valueChanged.emit({value:n,name:this.name})}getIcon(e){switch(e){case"none":return o("location-off-icon",null);case"custom":return o("location-icon",null);case"google":return o("google-meet-icon",null);case"microsoft":return o("microsoft-teams-icon",null);case"zoom":return o("zoom-icon",null)}}getLabelHTML(e){return o("span",{class:"location-label",style:{display:"flex",alignItems:"center",gap:"16px",width:"-webkit-fill-available"}},this.getIcon(e),o("span",{class:"location-text",style:{fontSize:"14px",fontWeight:"400"}},l.t(`nylasEventLocation.conferenceOptions.${e}`)))}render(){const e=typeof this.selectedLocationOption!=="undefined"?this.locationOptions.find((e=>e.value==this.selectedLocationOption)):null;return o(t,{key:"8062a3286d87fd95a86fca00d40fd3068048026f"},o("div",{key:"288f22bb7b3053e40542d09461efd6f376e05d74",class:"nylas-event-location",part:"nel"},o("label",{key:"46c325e9c49e9436330a7d460dc367d24cac4a09",htmlFor:"location"},l.t("nylasEventLocation.headerTitle"),o("span",{key:"f4f0181c1a0a7fa9c223c4998202ebe3022b9564",class:"label-icon"},o("tooltip-component",{key:"8ed0955c2ad3fb214c95272cf27d9c3e66fb39b4"},o("info-icon",{key:"753f4c1e1cc192f20b4bbb1ab6770e486bb216af",slot:"tooltip-icon"}),o("span",{key:"2b239a4912584df79d3456a0115b6b44f01a4270",slot:"tooltip-content"},l.t("nylasEventLocation.tooltip.desc"))))),o("div",{key:"a12e635c6cc8679d89977835351c25258ecc0004",class:"location-input"},o("select-dropdown",{key:"2693bef7c9648a028f7c88ed2e97f1c18dce0c00",withSearch:false,name:"location",options:this.locationOptions,defaultSelectedOption:e,themeConfig:this.themeConfig,exportparts:"sd_dropdown: nel__dropdown, sd_dropdown-button: nel__dropdown-button, sd_dropdown-content: nel__dropdown-content"},o("span",{key:"ba398893a26893c36f66b3977e51a4c889242d13",slot:"select-icon"},this.getIcon(this.selectedLocationOption))),this.selectedLocationOption==="custom"&&o("input",{key:"f25396e10d057f04fd09bf6dd324590b8691f89a",type:"text",part:"nel__location",id:"location",name:"location",maxlength:"1024",value:this.location,onInput:e=>this.handleChange(e)}))))}static get formAssociated(){return true}get host(){return a(this)}static get watchers(){return{name:["elementNameChangedHandler"],selectedConfiguration:["selectedConfigurationChangedHandler"],currentUser:["currentUserChangedHandler"],conferenceProviders:["conferenceProvidersChanged"],selectedLanguage:["selectedLanguageChangedHandler"],themeConfig:["themeConfigChangedHandler"]}}};h([s({name:"nylas-event-location",stateToProps:new Map([["schedulerConfig.selectedConfiguration","selectedConfiguration"],["schedulerConfig.conferenceProviders","conferenceProviders"],["schedulerConfig.currentUser","currentUser"],["schedulerConfig.selectedLanguage","selectedLanguage"],["schedulerConfig.themeConfig","themeConfig"]]),eventToProps:{},fireRegisterEvent:true}),y("design:type",Function),y("design:paramtypes",[]),y("design:returntype",void 0)],u.prototype,"render",null);u.style=f;export{u as nylas_event_location};
1
+ import{r as e,a as n,h as o,d as t,e as a}from"./index-Cbn5rIwb.js";import{R as s}from"./register-component-Blj8K64f.js";import{i as l,b as i,n as r}from"./utils-DhmCcrVs.js";import{P as c,f as d}from"./constants-DhnshuDN.js";const f=':host{--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff}.nylas-event-location{display:flex;flex-direction:column;gap:4px;font-family:var(--nylas-font-family)}.nylas-event-location label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:16px;font-style:normal;font-weight:400;line-height:150%;}.nylas-event-location label span.label-icon{margin-left:4px}.nylas-event-location label span.label-icon tooltip-component{display:flex}.nylas-event-location span[slot=select-icon]{border-right:1px solid var(--nylas-base-200);padding:16px 0.75rem 16px 0.5rem;border-radius:var(--nylas-border-radius-2x);border-bottom-right-radius:0;border-top-right-radius:0;height:20px}.nylas-event-location div.location-input{display:grid;grid-template-columns:auto 1fr;width:100%;gap:0.5rem}@media screen and (max-width: 768px){.nylas-event-location div.location-input{grid-template-columns:1fr}}.nylas-event-location div.location-input input{border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);padding:12px 16px;font-family:var(--nylas-font-family);font-size:16px;line-height:24px;background-color:var(--nylas-base-0);color:var(--nylas-base-900)}.nylas-event-location select-dropdown{width:208px}@media screen and (max-width: 768px){.nylas-event-location select-dropdown{width:100%}}.nylas-event-location select-dropdown::part(sd_dropdown){width:100%}.nylas-event-location select-dropdown::part(sd_dropdown-content){left:calc(35px + 0.5rem)}.nylas-event-location select-dropdown::part(sd_dropdown-button){display:flex;justify-content:space-between;width:100%;border:1px solid var(--nylas-base-200);padding:0 0.5rem}.nylas-event-location select-dropdown::part(sd_dropdown-button-selected-label){display:inline-flex;align-self:center;padding:14px 0;font-family:var(--nylas-font-family);font-size:16px;line-height:24px}';var h=undefined&&undefined.__decorate||function(e,n,o,t){var a=arguments.length,s=a<3?n:t===null?t=Object.getOwnPropertyDescriptor(n,o):t,l;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,n,o,t);else for(var i=e.length-1;i>=0;i--)if(l=e[i])s=(a<3?l(s):a>3?l(n,o,s):l(n,o))||s;return a>3&&s&&Object.defineProperty(n,o,s),s};var y=undefined&&undefined.__metadata||function(e,n){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(e,n)};const u=class{constructor(o){e(this,o);this.valueChanged=n(this,"valueChanged",7);if(o.$hostElement$["s-ei"]){this.internals=o.$hostElement$["s-ei"]}else{this.internals=o.$hostElement$.attachInternals();o.$hostElement$["s-ei"]=this.internals}this.name="location";this.location=this.eventLocation??"";this.grantId=this.eventConferencing?this.setDefaultGrantID(this.eventConferencing):"";this.userProviderState=this.userProvider??this.currentUser?.provider??"";this.locationOptions=[{value:"none",label:l.t("nylasEventLocation.conferenceOptions.none"),labelHTML:this.getLabelHTML("none")},{value:"custom",label:l.t("nylasEventLocation.conferenceOptions.custom"),labelHTML:this.getLabelHTML("custom")}]}elementNameChangedHandler(e){i("nylas-event-location","elementNameChangedHandler",e);this.host.setAttribute("name",e)}selectedConfigurationChangedHandler(e){i("nylas-custom-booking-flow","selectedConfigurationChangedHandler",e);const n=e?.event_booking?.location||this.eventLocation;const o=e?.event_booking?.conferencing||this.eventConferencing;if(o?.provider){this.selectedLocationOption=this.setDefaultLocationOption(o,n??"");this.grantId=this.setDefaultGrantID(o);this.location=n?n:""}else if(n){this.selectedLocationOption=n?"custom":"none";this.location=n}else{this.selectedLocationOption="none";this.location=""}}currentUserChangedHandler(e){i("nylas-custom-booking-flow","currentUserChangedHandler",e);if(e?.provider){this.userProviderState=e?.provider;this.setLocationOptionsForProvider(this.userProviderState)}}conferenceProvidersChanged(e){if(e?.["zoom"]&&!this.locationOptions.some((e=>e.value==="zoom"))){this.locationOptions.push({value:"zoom",label:l.t("nylasEventLocation.conferenceOptions.zoom"),labelHTML:this.getLabelHTML("zoom")})}}selectedLanguageChangedHandler(e,n){if(e===n)return;l.changeLanguage(e);const o=this.locationOptions.map((e=>e.value));o.forEach((e=>{const n=this.locationOptions.findIndex((n=>n.value===e));this.locationOptions[n].label=l.t(`nylasEventLocation.conferenceOptions.${e}`);this.locationOptions[n].labelHTML=this.getLabelHTML(e)}));this.locationOptions=[...this.locationOptions]}themeConfigChangedHandler(e,n){if(e===n)return;this.applyThemeConfig(e)}applyThemeConfig(e){if(e){for(const[n,o]of Object.entries(e)){this.host.style.setProperty(`${n}`,o)}}}connectedCallback(){i("nylas-event-location","connectedCallback")}componentWillLoad(){i("nylas-event-location","componentWillLoad");this.host.setAttribute("name",this.name);this.applyThemeConfig(this.themeConfig)}componentDidLoad(){i("nylas-event-location","componentDidLoad");if(this.selectedConfiguration?.event_booking){this.selectedConfigurationChangedHandler(this.selectedConfiguration)}else{this.selectedLocationOption=this.setDefaultLocationOption(this.eventConferencing||null,this.eventLocation??"");this.location=this.eventLocation??""}this.userProviderState=this.userProvider??this.currentUser?.provider??"";this.setLocationOptionsForProvider(this.userProviderState);const e=this.internals?.form;if(e){const n=new FormData(e);n.set("conference",this.getConferencePayload());n.set(this.name,this.location)}if(this.conferenceProviders?.["zoom"]&&!this.locationOptions.some((e=>e.value==="zoom"))){this.locationOptions.push({value:"zoom",label:l.t("nylasEventLocation.conferenceOptions.zoom"),labelHTML:this.getLabelHTML("zoom")})}}disconnectedCallback(){i("nylas-event-location","disconnectedCallback")}getConferencePayload(){if(this.selectedLocationOption==="custom"||this.selectedLocationOption==="none"){return JSON.stringify(null)}const e=this.conferenceProviders?.[this.selectedLocationOption];const n={provider:c[this.selectedLocationOption],autocreate:e?{conf_grant_id:e}:{}};return JSON.stringify(n)}nylasFormDropdownChangedHandler(e){this.selectedLocationOption=e.detail.value;let n;switch(this.selectedLocationOption){case"none":{this.location="";this.setFormValue("",this.name);this.valueChanged.emit({value:"",name:this.name});this.valueChanged.emit({value:JSON.stringify(null),name:"conference"});break}case"custom":{this.valueChanged.emit({value:JSON.stringify(null),name:"conference"});break}case"google":{this.location="";this.setFormValue("",this.name);const e=this.conferenceProviders?.["google"];n={provider:c.google,autocreate:e?{conf_grant_id:e}:{}};this.valueChanged.emit({value:JSON.stringify(n),name:"conference"});this.valueChanged.emit({value:"",name:this.name});break}case"microsoft":{this.location="";this.setFormValue("",this.name);const e=this.conferenceProviders?.["microsoft"];n={provider:c.microsoft,autocreate:e?{conf_grant_id:e}:{}};this.valueChanged.emit({value:JSON.stringify(n),name:"conference"});this.valueChanged.emit({value:"",name:this.name});break}case"zoom":{this.location="";this.setFormValue("",this.name);const e=this.conferenceProviders?.["zoom"];n={provider:c.zoom,autocreate:e?{conf_grant_id:e}:{}};this.valueChanged.emit({value:JSON.stringify(n),name:"conference"});this.valueChanged.emit({value:"",name:this.name});break}}}setLocationOptionsForProvider(e){switch(e){case"google":if(!this.locationOptions.some((e=>e.value==="google"))){this.locationOptions.push({value:"google",label:l.t("nylasEventLocation.conferenceOptions.google"),labelHTML:this.getLabelHTML("google")})}break;case"microsoft":if(!this.locationOptions.some((e=>e.value==="microsoft"))){this.locationOptions.push({value:"microsoft",label:l.t("nylasEventLocation.conferenceOptions.google"),labelHTML:this.getLabelHTML("microsoft")})}break}}setDefaultLocationOption(e,n){if(e!=null&&e?.provider!=null){return d[e?.provider]}return n?"custom":"none"}setDefaultGrantID(e){if(e!=null&&e?.autocreate!=null){return e?.autocreate?.conf_grant_id}return""}setFormValue(e,n){if(typeof this.internals.setFormValue==="function"){this.internals.setFormValue(e,n)}}handleChange(e){const n=r(e.target.value);this.location=n;this.setFormValue(n,this.name);this.valueChanged.emit({value:n,name:this.name})}getIcon(e){switch(e){case"none":return o("location-off-icon",null);case"custom":return o("location-icon",null);case"google":return o("google-meet-icon",null);case"microsoft":return o("microsoft-teams-icon",null);case"zoom":return o("zoom-icon",null)}}getLabelHTML(e){return o("span",{class:"location-label",style:{display:"flex",alignItems:"center",gap:"16px",width:"-webkit-fill-available"}},this.getIcon(e),o("span",{class:"location-text",style:{fontSize:"14px",fontWeight:"400"}},l.t(`nylasEventLocation.conferenceOptions.${e}`)))}render(){const e=typeof this.selectedLocationOption!=="undefined"?this.locationOptions.find((e=>e.value==this.selectedLocationOption)):null;return o(t,{key:"b4c290f8969ceec4ed4d9c19f0f2d2011873271b"},o("div",{key:"404f4faa49d7eba053b2ed88e78d4c254fe4be0f",class:"nylas-event-location",part:"nel"},o("label",{key:"66bdc7d674377314eb1f12571c04592eebeb84ec",htmlFor:"location"},l.t("nylasEventLocation.headerTitle"),o("span",{key:"0b12c8a227efb893e47a49cda1a8676a8153dcca",class:"label-icon"},o("tooltip-component",{key:"d83fb36a83dc48da34254328a893e710e3db4b59"},o("info-icon",{key:"4f1f4520979b607af9135554bb3497b734144549",slot:"tooltip-icon"}),o("span",{key:"4d3b917655d6e16f1d412cec18a82d429b429c63",slot:"tooltip-content"},l.t("nylasEventLocation.tooltip.desc"))))),o("div",{key:"15c6f02fbcf847f657ef5c0c6dc5199369585d2c",class:"location-input"},o("select-dropdown",{key:"2fc4d13092e6d46672f78ef203bfce682667f4d0",withSearch:false,name:"location",options:this.locationOptions,defaultSelectedOption:e,themeConfig:this.themeConfig,exportparts:"sd_dropdown: nel__dropdown, sd_dropdown-button: nel__dropdown-button, sd_dropdown-content: nel__dropdown-content"},o("span",{key:"63396189111f9e97b80e19202cd0b1dd6624400c",slot:"select-icon"},this.getIcon(this.selectedLocationOption))),this.selectedLocationOption==="custom"&&o("input",{key:"c5940292e4a70ccbec3d8a19a3324d86b8a5eb83",type:"text",part:"nel__location",id:"location",name:"location",maxlength:"1024",value:this.location,onInput:e=>this.handleChange(e)}))))}static get formAssociated(){return true}get host(){return a(this)}static get watchers(){return{name:["elementNameChangedHandler"],selectedConfiguration:["selectedConfigurationChangedHandler"],currentUser:["currentUserChangedHandler"],conferenceProviders:["conferenceProvidersChanged"],selectedLanguage:["selectedLanguageChangedHandler"],themeConfig:["themeConfigChangedHandler"]}}};h([s({name:"nylas-event-location",stateToProps:new Map([["schedulerConfig.selectedConfiguration","selectedConfiguration"],["schedulerConfig.conferenceProviders","conferenceProviders"],["schedulerConfig.currentUser","currentUser"],["schedulerConfig.selectedLanguage","selectedLanguage"],["schedulerConfig.themeConfig","themeConfig"]]),eventToProps:{},fireRegisterEvent:true}),y("design:type",Function),y("design:paramtypes",[]),y("design:returntype",void 0)],u.prototype,"render",null);u.style=f;export{u as nylas_event_location};
2
2
  //# sourceMappingURL=nylas-event-location.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["nylasEventLocationCss","NylasEventLocation","constructor","hostRef","this","name","location","eventLocation","grantId","eventConferencing","setDefaultGrantID","userProviderState","userProvider","currentUser","provider","locationOptions","value","label","i18next","t","labelHTML","getLabelHTML","elementNameChangedHandler","newValue","debug","host","setAttribute","selectedConfigurationChangedHandler","configLocation","event_booking","configConferencing","conferencing","selectedLocationOption","setDefaultLocationOption","currentUserChangedHandler","setLocationOptionsForProvider","conferenceProvidersChanged","some","option","push","selectedLanguageChangedHandler","newVal","oldVal","changeLanguage","locOptionValues","map","forEach","index","findIndex","i","themeConfigChangedHandler","applyThemeConfig","themeConfig","key","Object","entries","style","setProperty","connectedCallback","componentWillLoad","componentDidLoad","selectedConfiguration","formElement","internals","form","formData","FormData","set","getConferencePayload","conferenceProviders","disconnectedCallback","JSON","stringify","payload","PROVIDER_CONFERENCE_MAP","autocreate","conf_grant_id","nylasFormDropdownChangedHandler","event","detail","setFormValue","valueChanged","emit","googleConfGrantId","google","microsoftConfGrantId","microsoft","zoomConfGrantId","zoom","CONFERENCE_PROVIDER_MAP","handleChange","sanitize","target","getIcon","h","class","display","alignItems","gap","width","fontSize","fontWeight","render","defaultOption","find","Host","part","htmlFor","slot","withSearch","options","defaultSelectedOption","exportparts","type","id","maxlength","onInput","e","__decorate","RegisterComponent","stateToProps","Map","eventToProps","fireRegisterEvent","prototype"],"sources":["src/components/scheduler-editor/nylas-event-location/nylas-event-location.scss?tag=nylas-event-location&encapsulation=shadow","src/components/scheduler-editor/nylas-event-location/nylas-event-location.tsx"],"sourcesContent":["@use '../../../common/styles/variables' as *;\n\n:host {\n @include default-css-variables;\n}\n\n.nylas-event-location {\n display: flex;\n flex-direction: column;\n gap: 4px;\n font-family: var(--nylas-font-family);\n\n label {\n display: flex;\n align-items: center;\n color: var(--nylas-base-800);\n font-size: 16px;\n font-style: normal;\n font-weight: 400;\n line-height: 150%; /* 21px */\n span.label-icon {\n margin-left: 4px;\n tooltip-component {\n display: flex;\n }\n }\n }\n\n span[slot='select-icon'] {\n border-right: 1px solid var(--nylas-base-200);\n padding: 16px 0.75rem 16px 0.5rem;\n border-radius: var(--nylas-border-radius-2x);\n border-bottom-right-radius: 0;\n border-top-right-radius: 0;\n height: 20px;\n }\n div.location-input {\n display: grid;\n grid-template-columns: auto 1fr;\n width: 100%;\n gap: 0.5rem;\n @media #{$mobile} {\n grid-template-columns: 1fr;\n }\n input {\n border: 1px solid var(--nylas-base-200);\n border-radius: var(--nylas-border-radius-2x);\n padding: 12px 16px;\n font-family: var(--nylas-font-family);\n font-size: 16px;\n line-height: 24px;\n background-color: var(--nylas-base-0);\n color: var(--nylas-base-900);\n }\n }\n select-dropdown {\n width: 208px;\n @media #{$mobile} {\n width: 100%;\n }\n }\n select-dropdown::part(sd_dropdown) {\n width: 100%;\n }\n select-dropdown::part(sd_dropdown-content) {\n left: calc(35px + 0.5rem);\n }\n select-dropdown::part(sd_dropdown-button) {\n display: flex;\n justify-content: space-between;\n width: 100%;\n border: 1px solid var(--nylas-base-200);\n padding: 0 0.5rem;\n }\n select-dropdown::part(sd_dropdown-button-selected-label) {\n display: inline-flex;\n align-self: center;\n padding: 14px 0;\n font-family: var(--nylas-font-family);\n font-size: 16px;\n line-height: 24px;\n }\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug, sanitize } from '@/utils/utils';\nimport { AttachInternals, Component, Host, State, h, Element, Prop, Watch, Event, EventEmitter, Listen } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { Conference, Configuration } from '@nylas/core';\nimport { CONFERENCE_PROVIDER_MAP, PROVIDER_CONFERENCE_MAP } from '@/common/constants';\nimport { User } from '@/common/nylas-api-request';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE } from '@/common/constants';\nimport { ThemeConfig } from '@nylas/core';\n/**\n * The `nylas-event-location` component is a form input for the location of an event.\n *\n * @part nel - The event location container\n * @part nel__location - The event location input\n * @part nel__dropdown - The dropdown container\n * @part nel__dropdown-button - The dropdown button\n * @part nel__dropdown-content - The dropdown content\n */\n@Component({\n tag: 'nylas-event-location',\n styleUrl: 'nylas-event-location.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasEventLocation {\n /*\n * The host element <nylas-event-location>\n */\n @Element() host!: HTMLElement;\n /**\n * @standalone\n * The name of the event location input.\n */\n @Prop() name: string = 'location';\n\n /**\n * @standalone\n * The current user\n */\n @Prop() currentUser?: User;\n /**\n * @standalone\n * The users provider\n */\n @Prop() userProvider?: string;\n /**\n * @standalone\n * The event conferencing stored in the configuration\n */\n @Prop() eventConferencing?: Conference;\n /**\n * @standalone\n * The conference providers where the key is the provider name ('zoom') and the value is the grant id.\n * We currently support same provider ('google', 'microsoft') for all participants and 'zoom' for cross-provider conferencing.\n */\n @Prop() conferenceProviders?: Record<string, string>;\n\n /**\n * @standalone\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n\n /**\n * @standalone\n * The event location stored in the configuration\n */\n @Prop() eventLocation?: string;\n\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n\n /**\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: ThemeConfig;\n\n /**\n * The selected event location state. This defaults to the event location from the configuration or an empty string.\n */\n @State() location: string = this.eventLocation ?? '';\n /**\n * The grant id for the conferencing of non-default conferencing options.\n */\n @State() grantId: string = this.eventConferencing ? this.setDefaultGrantID(this.eventConferencing) : '';\n /**\n * The selected location option. This defaults to 'none'.\n */\n @State() selectedLocationOption!: string;\n /**\n * The current user provider state.\n */\n @State() userProviderState: string = this.userProvider ?? this.currentUser?.provider ?? '';\n\n /**\n * The state to store location options.\n */\n @State() locationOptions = [\n { value: 'none', label: i18next.t('nylasEventLocation.conferenceOptions.none'), labelHTML: this.getLabelHTML('none') },\n { value: 'custom', label: i18next.t('nylasEventLocation.conferenceOptions.custom'), labelHTML: this.getLabelHTML('custom') },\n ];\n\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * When a name prop is passed, stencil does not automatically set the name attribute on the host element.\n * Since this component is form-associated, the name attribute is required for form submission.\n * This is a workaround to ensure that the name attribute is set on the host element.\n */\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-event-location', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('selectedConfiguration')\n selectedConfigurationChangedHandler(newValue: Configuration) {\n debug('nylas-custom-booking-flow', 'selectedConfigurationChangedHandler', newValue);\n const configLocation = newValue?.event_booking?.location || this.eventLocation;\n const configConferencing = newValue?.event_booking?.conferencing || this.eventConferencing;\n if (configConferencing?.provider) {\n this.selectedLocationOption = this.setDefaultLocationOption(configConferencing, configLocation ?? '');\n this.grantId = this.setDefaultGrantID(configConferencing);\n this.location = configLocation ? configLocation : '';\n } else if (configLocation) {\n this.selectedLocationOption = configLocation ? 'custom' : 'none';\n this.location = configLocation;\n } else {\n this.selectedLocationOption = 'none';\n this.location = '';\n }\n }\n\n @Watch('currentUser')\n currentUserChangedHandler(newValue: User) {\n debug('nylas-custom-booking-flow', 'currentUserChangedHandler', newValue);\n if (newValue?.provider) {\n this.userProviderState = newValue?.provider;\n this.setLocationOptionsForProvider(this.userProviderState);\n }\n }\n\n @Watch('conferenceProviders')\n conferenceProvidersChanged(newValue: Record<string, string>) {\n if (newValue?.['zoom'] && !this.locationOptions.some(option => option.value === 'zoom')) {\n this.locationOptions.push({ value: 'zoom', label: i18next.t('nylasEventLocation.conferenceOptions.zoom'), labelHTML: this.getLabelHTML('zoom') });\n }\n }\n\n @Watch('selectedLanguage')\n selectedLanguageChangedHandler(newVal: LANGUAGE_CODE, oldVal: LANGUAGE_CODE) {\n if (newVal === oldVal) return;\n i18next.changeLanguage(newVal);\n const locOptionValues = this.locationOptions.map(option => option.value);\n locOptionValues.forEach(option => {\n const index = this.locationOptions.findIndex(i => i.value === option);\n this.locationOptions[index].label = i18next.t(`nylasEventLocation.conferenceOptions.${option}`);\n this.locationOptions[index].labelHTML = this.getLabelHTML(option);\n });\n this.locationOptions = [...this.locationOptions];\n }\n\n @Watch('themeConfig')\n themeConfigChangedHandler(newVal: ThemeConfig, oldVal: ThemeConfig) {\n if (newVal === oldVal) return;\n this.applyThemeConfig(newVal);\n }\n\n applyThemeConfig(themeConfig?: ThemeConfig) {\n if (themeConfig) {\n for (const [key, value] of Object.entries(themeConfig)) {\n this.host.style.setProperty(`${key}`, value);\n }\n }\n }\n\n /**\n * This event is fired when the value of the event location changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n connectedCallback() {\n debug('nylas-event-location', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-event-location', 'componentWillLoad');\n this.host.setAttribute('name', this.name);\n }\n\n componentDidLoad() {\n debug('nylas-event-location', 'componentDidLoad');\n if (this.selectedConfiguration?.event_booking) {\n this.selectedConfigurationChangedHandler(this.selectedConfiguration);\n } else {\n this.selectedLocationOption = this.setDefaultLocationOption(this.eventConferencing || null, this.eventLocation ?? '');\n this.location = this.eventLocation ?? '';\n }\n\n this.userProviderState = this.userProvider ?? this.currentUser?.provider ?? '';\n this.setLocationOptionsForProvider(this.userProviderState);\n const formElement = this.internals?.form;\n // Set the initial form value\n if (formElement) {\n const formData = new FormData(formElement);\n formData.set('conference', this.getConferencePayload());\n formData.set(this.name, this.location);\n }\n\n if (this.conferenceProviders?.['zoom'] && !this.locationOptions.some(option => option.value === 'zoom')) {\n this.locationOptions.push({ value: 'zoom', label: i18next.t('nylasEventLocation.conferenceOptions.zoom'), labelHTML: this.getLabelHTML('zoom') });\n }\n }\n\n disconnectedCallback() {\n debug('nylas-event-location', 'disconnectedCallback');\n }\n\n getConferencePayload() {\n if (this.selectedLocationOption === 'custom' || this.selectedLocationOption === 'none') {\n return JSON.stringify(null);\n }\n const grantId = this.conferenceProviders?.[this.selectedLocationOption];\n const payload = {\n provider: PROVIDER_CONFERENCE_MAP[this.selectedLocationOption],\n autocreate: grantId\n ? {\n conf_grant_id: grantId,\n }\n : {},\n };\n return JSON.stringify(payload);\n }\n\n @Listen('nylasFormDropdownChanged')\n nylasFormDropdownChangedHandler(event: CustomEvent<{ value: string }>) {\n this.selectedLocationOption = event.detail.value;\n let payload;\n switch (this.selectedLocationOption) {\n case 'none': {\n this.location = '';\n this.setFormValue('', this.name);\n this.valueChanged.emit({ value: '', name: this.name });\n this.valueChanged.emit({ value: JSON.stringify(null), name: 'conference' });\n break;\n }\n case 'custom': {\n this.valueChanged.emit({ value: JSON.stringify(null), name: 'conference' });\n break;\n }\n case 'google': {\n this.location = '';\n this.setFormValue('', this.name);\n const googleConfGrantId = this.conferenceProviders?.['google'];\n payload = {\n provider: PROVIDER_CONFERENCE_MAP.google,\n autocreate: googleConfGrantId\n ? {\n conf_grant_id: googleConfGrantId,\n }\n : {},\n };\n this.valueChanged.emit({ value: JSON.stringify(payload), name: 'conference' });\n this.valueChanged.emit({ value: '', name: this.name });\n break;\n }\n case 'microsoft': {\n this.location = '';\n this.setFormValue('', this.name);\n const microsoftConfGrantId = this.conferenceProviders?.['microsoft'];\n payload = {\n provider: PROVIDER_CONFERENCE_MAP.microsoft,\n autocreate: microsoftConfGrantId\n ? {\n conf_grant_id: microsoftConfGrantId,\n }\n : {},\n };\n this.valueChanged.emit({ value: JSON.stringify(payload), name: 'conference' });\n this.valueChanged.emit({ value: '', name: this.name });\n break;\n }\n case 'zoom': {\n this.location = '';\n this.setFormValue('', this.name);\n const zoomConfGrantId = this.conferenceProviders?.['zoom'];\n payload = {\n provider: PROVIDER_CONFERENCE_MAP.zoom,\n autocreate: zoomConfGrantId\n ? {\n conf_grant_id: zoomConfGrantId,\n }\n : {},\n };\n this.valueChanged.emit({ value: JSON.stringify(payload), name: 'conference' });\n this.valueChanged.emit({ value: '', name: this.name });\n break;\n }\n }\n }\n\n setLocationOptionsForProvider(provider: string) {\n switch (provider) {\n case 'google':\n if (!this.locationOptions.some(option => option.value === 'google')) {\n this.locationOptions.push({ value: 'google', label: i18next.t('nylasEventLocation.conferenceOptions.google'), labelHTML: this.getLabelHTML('google') });\n }\n break;\n case 'microsoft':\n if (!this.locationOptions.some(option => option.value === 'microsoft')) {\n this.locationOptions.push({ value: 'microsoft', label: i18next.t('nylasEventLocation.conferenceOptions.google'), labelHTML: this.getLabelHTML('microsoft') });\n }\n break;\n }\n }\n\n setDefaultLocationOption(eventConferencing: Conference | null, eventLocation: string) {\n if (eventConferencing != null && eventConferencing?.provider != null) {\n return CONFERENCE_PROVIDER_MAP[eventConferencing?.provider];\n }\n return eventLocation ? 'custom' : 'none';\n }\n setDefaultGrantID(eventConferencing: Conference) {\n if (eventConferencing != null && eventConferencing?.autocreate != null) {\n return eventConferencing?.autocreate?.conf_grant_id;\n }\n return '';\n }\n\n setFormValue(value: string, name: string) {\n if (typeof this.internals.setFormValue === 'function') {\n this.internals.setFormValue(value, name);\n }\n }\n\n handleChange(event) {\n const value = sanitize(event.target.value);\n this.location = value;\n this.setFormValue(value, this.name);\n this.valueChanged.emit({ value: value, name: this.name });\n }\n\n getIcon(location: string) {\n switch (location) {\n case 'none':\n return <location-off-icon />;\n case 'custom':\n return <location-icon />;\n case 'google':\n return <google-meet-icon />;\n case 'microsoft':\n return <microsoft-teams-icon />;\n case 'zoom':\n return <zoom-icon />;\n }\n }\n\n getLabelHTML(location: string) {\n return (\n <span\n class=\"location-label\"\n style={{\n display: 'flex',\n alignItems: 'center',\n gap: '16px',\n width: '-webkit-fill-available',\n }}\n >\n {this.getIcon(location)}\n <span\n class=\"location-text\"\n style={{\n fontSize: '14px',\n fontWeight: '400',\n }}\n >\n {i18next.t(`nylasEventLocation.conferenceOptions.${location}`)}\n </span>\n </span>\n );\n }\n\n @RegisterComponent<NylasEventLocation, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-event-location',\n stateToProps: new Map([\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ['schedulerConfig.conferenceProviders', 'conferenceProviders'],\n ['schedulerConfig.currentUser', 'currentUser'],\n ['schedulerConfig.selectedLanguage', 'selectedLanguage'],\n ['schedulerConfig.themeConfig', 'themeConfig'],\n ]),\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n const defaultOption = typeof this.selectedLocationOption !== 'undefined' ? this.locationOptions.find(i => i.value == this.selectedLocationOption) : null;\n return (\n <Host>\n <div class=\"nylas-event-location\" part=\"nel\">\n <label htmlFor=\"location\">\n {i18next.t('nylasEventLocation.headerTitle')}\n <span class=\"label-icon\">\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">{i18next.t('nylasEventLocation.tooltip.desc')}</span>\n </tooltip-component>\n </span>\n </label>\n <div class=\"location-input\">\n {/* {defaultOption && defaultOption?.label && ( */}\n <select-dropdown\n withSearch={false}\n name=\"location\"\n options={this.locationOptions}\n defaultSelectedOption={defaultOption}\n themeConfig={this.themeConfig}\n exportparts=\"sd_dropdown: nel__dropdown, sd_dropdown-button: nel__dropdown-button, sd_dropdown-content: nel__dropdown-content\"\n >\n <span slot=\"select-icon\">{this.getIcon(this.selectedLocationOption)}</span>\n </select-dropdown>\n {/* )} */}\n {this.selectedLocationOption === 'custom' && (\n <input type=\"text\" part=\"nel__location\" id=\"location\" name=\"location\" maxlength=\"1024\" value={this.location} onInput={e => this.handleChange(e)} />\n )}\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"kOAAA,MAAMA,EAAwB,i6H,ugBC0BjBC,EAAkB,MAN/B,WAAAC,CAAAC,G,qNAeUC,KAAIC,KAAW,WAiDdD,KAAAE,SAAmBF,KAAKG,eAAiB,GAIzCH,KAAAI,QAAkBJ,KAAKK,kBAAoBL,KAAKM,kBAAkBN,KAAKK,mBAAqB,GAQ5FL,KAAAO,kBAA4BP,KAAKQ,cAAgBR,KAAKS,aAAaC,UAAY,GAK/EV,KAAAW,gBAAkB,CACzB,CAAEC,MAAO,OAAQC,MAAOC,EAAQC,EAAE,6CAA8CC,UAAWhB,KAAKiB,aAAa,SAC7G,CAAEL,MAAO,SAAUC,MAAOC,EAAQC,EAAE,+CAAgDC,UAAWhB,KA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A,2CAAMuD,KAAK,mBAAmB1F,EAAQC,EAAE,uCAI9C2E,EAAK,OAAAzC,IAAA,2CAAA0C,MAAM,kBAETD,EACE,mBAAAzC,IAAA,2CAAAwD,WAAY,MACZxG,KAAK,WACLyG,QAAS1G,KAAKW,gBACdgG,sBAAuBR,EACvBnD,YAAahD,KAAKgD,YAClB4D,YAAY,oHAEZlB,EAAA,QAAAzC,IAAA,2CAAMuD,KAAK,eAAexG,KAAKyF,QAAQzF,KAAK4B,0BAG7C5B,KAAK4B,yBAA2B,UAC/B8D,EAAA,SAAAzC,IAAA,2CAAO4D,KAAK,OAAOP,KAAK,gBAAgBQ,GAAG,WAAW7G,KAAK,WAAW8G,UAAU,OAAOnG,MAAOZ,KAAKE,SAAU8G,QAASC,GAAKjH,KAAKsF,aAAa2B,O,+XA5BzJC,EAAA,CAZCC,EAAyH,CACxHlH,KAAM,uBACNmH,aAAc,IAAIC,IAAI,CACpB,CAAC,wCAAyC,yBAC1C,CAAC,sCAAuC,uBACxC,CAAC,8BAA+B,eAChC,CAAC,mCAAoC,oBACrC,CAAC,8BAA+B,iBAElCC,aAAc,GACdC,kBAAmB,O,mFAoCpB1H,EAAA2H,UAAA,e","ignoreList":[]}
1
+ {"version":3,"names":["nylasEventLocationCss","NylasEventLocation","constructor","hostRef","this","name","location","eventLocation","grantId","eventConferencing","setDefaultGrantID","userProviderState","userProvider","currentUser","provider","locationOptions","value","label","i18next","t","labelHTML","getLabelHTML","elementNameChangedHandler","newValue","debug","host","setAttribute","selectedConfigurationChangedHandler","configLocation","event_booking","configConferencing","conferencing","selectedLocationOption","setDefaultLocationOption","currentUserChangedHandler","setLocationOptionsForProvider","conferenceProvidersChanged","some","option","push","selectedLanguageChangedHandler","newVal","oldVal","changeLanguage","locOptionValues","map","forEach","index","findIndex","i","themeConfigChangedHandler","applyThemeConfig","themeConfig","key","Object","entries","style","setProperty","connectedCallback","componentWillLoad","componentDidLoad","selectedConfiguration","formElement","internals","form","formData","FormData","set","getConferencePayload","conferenceProviders","disconnectedCallback","JSON","stringify","payload","PROVIDER_CONFERENCE_MAP","autocreate","conf_grant_id","nylasFormDropdownChangedHandler","event","detail","setFormValue","valueChanged","emit","googleConfGrantId","google","microsoftConfGrantId","microsoft","zoomConfGrantId","zoom","CONFERENCE_PROVIDER_MAP","handleChange","sanitize","target","getIcon","h","class","display","alignItems","gap","width","fontSize","fontWeight","render","defaultOption","find","Host","part","htmlFor","slot","withSearch","options","defaultSelectedOption","exportparts","type","id","maxlength","onInput","e","__decorate","RegisterComponent","stateToProps","Map","eventToProps","fireRegisterEvent","prototype"],"sources":["src/components/scheduler-editor/nylas-event-location/nylas-event-location.scss?tag=nylas-event-location&encapsulation=shadow","src/components/scheduler-editor/nylas-event-location/nylas-event-location.tsx"],"sourcesContent":["@use '../../../common/styles/variables' as *;\n\n:host {\n @include default-css-variables;\n}\n\n.nylas-event-location {\n display: flex;\n flex-direction: column;\n gap: 4px;\n font-family: var(--nylas-font-family);\n\n label {\n display: flex;\n align-items: center;\n color: var(--nylas-base-800);\n font-size: 16px;\n font-style: normal;\n font-weight: 400;\n line-height: 150%; /* 21px */\n span.label-icon {\n margin-left: 4px;\n tooltip-component {\n display: flex;\n }\n }\n }\n\n span[slot='select-icon'] {\n border-right: 1px solid var(--nylas-base-200);\n padding: 16px 0.75rem 16px 0.5rem;\n border-radius: var(--nylas-border-radius-2x);\n border-bottom-right-radius: 0;\n border-top-right-radius: 0;\n height: 20px;\n }\n div.location-input {\n display: grid;\n grid-template-columns: auto 1fr;\n width: 100%;\n gap: 0.5rem;\n @media #{$mobile} {\n grid-template-columns: 1fr;\n }\n input {\n border: 1px solid var(--nylas-base-200);\n border-radius: var(--nylas-border-radius-2x);\n padding: 12px 16px;\n font-family: var(--nylas-font-family);\n font-size: 16px;\n line-height: 24px;\n background-color: var(--nylas-base-0);\n color: var(--nylas-base-900);\n }\n }\n select-dropdown {\n width: 208px;\n @media #{$mobile} {\n width: 100%;\n }\n }\n select-dropdown::part(sd_dropdown) {\n width: 100%;\n }\n select-dropdown::part(sd_dropdown-content) {\n left: calc(35px + 0.5rem);\n }\n select-dropdown::part(sd_dropdown-button) {\n display: flex;\n justify-content: space-between;\n width: 100%;\n border: 1px solid var(--nylas-base-200);\n padding: 0 0.5rem;\n }\n select-dropdown::part(sd_dropdown-button-selected-label) {\n display: inline-flex;\n align-self: center;\n padding: 14px 0;\n font-family: var(--nylas-font-family);\n font-size: 16px;\n line-height: 24px;\n }\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug, sanitize } from '@/utils/utils';\nimport { AttachInternals, Component, Host, State, h, Element, Prop, Watch, Event, EventEmitter, Listen } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { Conference, Configuration } from '@nylas/core';\nimport { CONFERENCE_PROVIDER_MAP, PROVIDER_CONFERENCE_MAP } from '@/common/constants';\nimport { User } from '@/common/nylas-api-request';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE } from '@/common/constants';\nimport { ThemeConfig } from '@nylas/core';\n/**\n * The `nylas-event-location` component is a form input for the location of an event.\n *\n * @part nel - The event location container\n * @part nel__location - The event location input\n * @part nel__dropdown - The dropdown container\n * @part nel__dropdown-button - The dropdown button\n * @part nel__dropdown-content - The dropdown content\n */\n@Component({\n tag: 'nylas-event-location',\n styleUrl: 'nylas-event-location.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasEventLocation {\n /*\n * The host element <nylas-event-location>\n */\n @Element() host!: HTMLElement;\n /**\n * @standalone\n * The name of the event location input.\n */\n @Prop() name: string = 'location';\n\n /**\n * @standalone\n * The current user\n */\n @Prop() currentUser?: User;\n /**\n * @standalone\n * The users provider\n */\n @Prop() userProvider?: string;\n /**\n * @standalone\n * The event conferencing stored in the configuration\n */\n @Prop() eventConferencing?: Conference;\n /**\n * @standalone\n * The conference providers where the key is the provider name ('zoom') and the value is the grant id.\n * We currently support same provider ('google', 'microsoft') for all participants and 'zoom' for cross-provider conferencing.\n */\n @Prop() conferenceProviders?: Record<string, string>;\n\n /**\n * @standalone\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n\n /**\n * @standalone\n * The event location stored in the configuration\n */\n @Prop() eventLocation?: string;\n\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n\n /**\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: ThemeConfig;\n\n /**\n * The selected event location state. This defaults to the event location from the configuration or an empty string.\n */\n @State() location: string = this.eventLocation ?? '';\n /**\n * The grant id for the conferencing of non-default conferencing options.\n */\n @State() grantId: string = this.eventConferencing ? this.setDefaultGrantID(this.eventConferencing) : '';\n /**\n * The selected location option. This defaults to 'none'.\n */\n @State() selectedLocationOption!: string;\n /**\n * The current user provider state.\n */\n @State() userProviderState: string = this.userProvider ?? this.currentUser?.provider ?? '';\n\n /**\n * The state to store location options.\n */\n @State() locationOptions = [\n { value: 'none', label: i18next.t('nylasEventLocation.conferenceOptions.none'), labelHTML: this.getLabelHTML('none') },\n { value: 'custom', label: i18next.t('nylasEventLocation.conferenceOptions.custom'), labelHTML: this.getLabelHTML('custom') },\n ];\n\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * When a name prop is passed, stencil does not automatically set the name attribute on the host element.\n * Since this component is form-associated, the name attribute is required for form submission.\n * This is a workaround to ensure that the name attribute is set on the host element.\n */\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-event-location', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('selectedConfiguration')\n selectedConfigurationChangedHandler(newValue: Configuration) {\n debug('nylas-custom-booking-flow', 'selectedConfigurationChangedHandler', newValue);\n const configLocation = newValue?.event_booking?.location || this.eventLocation;\n const configConferencing = newValue?.event_booking?.conferencing || this.eventConferencing;\n if (configConferencing?.provider) {\n this.selectedLocationOption = this.setDefaultLocationOption(configConferencing, configLocation ?? '');\n this.grantId = this.setDefaultGrantID(configConferencing);\n this.location = configLocation ? configLocation : '';\n } else if (configLocation) {\n this.selectedLocationOption = configLocation ? 'custom' : 'none';\n this.location = configLocation;\n } else {\n this.selectedLocationOption = 'none';\n this.location = '';\n }\n }\n\n @Watch('currentUser')\n currentUserChangedHandler(newValue: User) {\n debug('nylas-custom-booking-flow', 'currentUserChangedHandler', newValue);\n if (newValue?.provider) {\n this.userProviderState = newValue?.provider;\n this.setLocationOptionsForProvider(this.userProviderState);\n }\n }\n\n @Watch('conferenceProviders')\n conferenceProvidersChanged(newValue: Record<string, string>) {\n if (newValue?.['zoom'] && !this.locationOptions.some(option => option.value === 'zoom')) {\n this.locationOptions.push({ value: 'zoom', label: i18next.t('nylasEventLocation.conferenceOptions.zoom'), labelHTML: this.getLabelHTML('zoom') });\n }\n }\n\n @Watch('selectedLanguage')\n selectedLanguageChangedHandler(newVal: LANGUAGE_CODE, oldVal: LANGUAGE_CODE) {\n if (newVal === oldVal) return;\n i18next.changeLanguage(newVal);\n const locOptionValues = this.locationOptions.map(option => option.value);\n locOptionValues.forEach(option => {\n const index = this.locationOptions.findIndex(i => i.value === option);\n this.locationOptions[index].label = i18next.t(`nylasEventLocation.conferenceOptions.${option}`);\n this.locationOptions[index].labelHTML = this.getLabelHTML(option);\n });\n this.locationOptions = [...this.locationOptions];\n }\n\n @Watch('themeConfig')\n themeConfigChangedHandler(newVal: ThemeConfig, oldVal: ThemeConfig) {\n if (newVal === oldVal) return;\n this.applyThemeConfig(newVal);\n }\n\n applyThemeConfig(themeConfig?: ThemeConfig) {\n if (themeConfig) {\n for (const [key, value] of Object.entries(themeConfig)) {\n this.host.style.setProperty(`${key}`, value);\n }\n }\n }\n\n /**\n * This event is fired when the value of the event location changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n connectedCallback() {\n debug('nylas-event-location', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-event-location', 'componentWillLoad');\n this.host.setAttribute('name', this.name);\n this.applyThemeConfig(this.themeConfig);\n }\n\n componentDidLoad() {\n debug('nylas-event-location', 'componentDidLoad');\n if (this.selectedConfiguration?.event_booking) {\n this.selectedConfigurationChangedHandler(this.selectedConfiguration);\n } else {\n this.selectedLocationOption = this.setDefaultLocationOption(this.eventConferencing || null, this.eventLocation ?? '');\n this.location = this.eventLocation ?? '';\n }\n\n this.userProviderState = this.userProvider ?? this.currentUser?.provider ?? '';\n this.setLocationOptionsForProvider(this.userProviderState);\n const formElement = this.internals?.form;\n // Set the initial form value\n if (formElement) {\n const formData = new FormData(formElement);\n formData.set('conference', this.getConferencePayload());\n formData.set(this.name, this.location);\n }\n\n if (this.conferenceProviders?.['zoom'] && !this.locationOptions.some(option => option.value === 'zoom')) {\n this.locationOptions.push({ value: 'zoom', label: i18next.t('nylasEventLocation.conferenceOptions.zoom'), labelHTML: this.getLabelHTML('zoom') });\n }\n }\n\n disconnectedCallback() {\n debug('nylas-event-location', 'disconnectedCallback');\n }\n\n getConferencePayload() {\n if (this.selectedLocationOption === 'custom' || this.selectedLocationOption === 'none') {\n return JSON.stringify(null);\n }\n const grantId = this.conferenceProviders?.[this.selectedLocationOption];\n const payload = {\n provider: PROVIDER_CONFERENCE_MAP[this.selectedLocationOption],\n autocreate: grantId\n ? {\n conf_grant_id: grantId,\n }\n : {},\n };\n return JSON.stringify(payload);\n }\n\n @Listen('nylasFormDropdownChanged')\n nylasFormDropdownChangedHandler(event: CustomEvent<{ value: string }>) {\n this.selectedLocationOption = event.detail.value;\n let payload;\n switch (this.selectedLocationOption) {\n case 'none': {\n this.location = '';\n this.setFormValue('', this.name);\n this.valueChanged.emit({ value: '', name: this.name });\n this.valueChanged.emit({ value: JSON.stringify(null), name: 'conference' });\n break;\n }\n case 'custom': {\n this.valueChanged.emit({ value: JSON.stringify(null), name: 'conference' });\n break;\n }\n case 'google': {\n this.location = '';\n this.setFormValue('', this.name);\n const googleConfGrantId = this.conferenceProviders?.['google'];\n payload = {\n provider: PROVIDER_CONFERENCE_MAP.google,\n autocreate: googleConfGrantId\n ? {\n conf_grant_id: googleConfGrantId,\n }\n : {},\n };\n this.valueChanged.emit({ value: JSON.stringify(payload), name: 'conference' });\n this.valueChanged.emit({ value: '', name: this.name });\n break;\n }\n case 'microsoft': {\n this.location = '';\n this.setFormValue('', this.name);\n const microsoftConfGrantId = this.conferenceProviders?.['microsoft'];\n payload = {\n provider: PROVIDER_CONFERENCE_MAP.microsoft,\n autocreate: microsoftConfGrantId\n ? {\n conf_grant_id: microsoftConfGrantId,\n }\n : {},\n };\n this.valueChanged.emit({ value: JSON.stringify(payload), name: 'conference' });\n this.valueChanged.emit({ value: '', name: this.name });\n break;\n }\n case 'zoom': {\n this.location = '';\n this.setFormValue('', this.name);\n const zoomConfGrantId = this.conferenceProviders?.['zoom'];\n payload = {\n provider: PROVIDER_CONFERENCE_MAP.zoom,\n autocreate: zoomConfGrantId\n ? {\n conf_grant_id: zoomConfGrantId,\n }\n : {},\n };\n this.valueChanged.emit({ value: JSON.stringify(payload), name: 'conference' });\n this.valueChanged.emit({ value: '', name: this.name });\n break;\n }\n }\n }\n\n setLocationOptionsForProvider(provider: string) {\n switch (provider) {\n case 'google':\n if (!this.locationOptions.some(option => option.value === 'google')) {\n this.locationOptions.push({ value: 'google', label: i18next.t('nylasEventLocation.conferenceOptions.google'), labelHTML: this.getLabelHTML('google') });\n }\n break;\n case 'microsoft':\n if (!this.locationOptions.some(option => option.value === 'microsoft')) {\n this.locationOptions.push({ value: 'microsoft', label: i18next.t('nylasEventLocation.conferenceOptions.google'), labelHTML: this.getLabelHTML('microsoft') });\n }\n break;\n }\n }\n\n setDefaultLocationOption(eventConferencing: Conference | null, eventLocation: string) {\n if (eventConferencing != null && eventConferencing?.provider != null) {\n return CONFERENCE_PROVIDER_MAP[eventConferencing?.provider];\n }\n return eventLocation ? 'custom' : 'none';\n }\n setDefaultGrantID(eventConferencing: Conference) {\n if (eventConferencing != null && eventConferencing?.autocreate != null) {\n return eventConferencing?.autocreate?.conf_grant_id;\n }\n return '';\n }\n\n setFormValue(value: string, name: string) {\n if (typeof this.internals.setFormValue === 'function') {\n this.internals.setFormValue(value, name);\n }\n }\n\n handleChange(event) {\n const value = sanitize(event.target.value);\n this.location = value;\n this.setFormValue(value, this.name);\n this.valueChanged.emit({ value: value, name: this.name });\n }\n\n getIcon(location: string) {\n switch (location) {\n case 'none':\n return <location-off-icon />;\n case 'custom':\n return <location-icon />;\n case 'google':\n return <google-meet-icon />;\n case 'microsoft':\n return <microsoft-teams-icon />;\n case 'zoom':\n return <zoom-icon />;\n }\n }\n\n getLabelHTML(location: string) {\n return (\n <span\n class=\"location-label\"\n style={{\n display: 'flex',\n alignItems: 'center',\n gap: '16px',\n width: '-webkit-fill-available',\n }}\n >\n {this.getIcon(location)}\n <span\n class=\"location-text\"\n style={{\n fontSize: '14px',\n fontWeight: '400',\n }}\n >\n {i18next.t(`nylasEventLocation.conferenceOptions.${location}`)}\n </span>\n </span>\n );\n }\n\n @RegisterComponent<NylasEventLocation, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-event-location',\n stateToProps: new Map([\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ['schedulerConfig.conferenceProviders', 'conferenceProviders'],\n ['schedulerConfig.currentUser', 'currentUser'],\n ['schedulerConfig.selectedLanguage', 'selectedLanguage'],\n ['schedulerConfig.themeConfig', 'themeConfig'],\n ]),\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n const defaultOption = typeof this.selectedLocationOption !== 'undefined' ? this.locationOptions.find(i => i.value == this.selectedLocationOption) : null;\n return (\n <Host>\n <div class=\"nylas-event-location\" part=\"nel\">\n <label htmlFor=\"location\">\n {i18next.t('nylasEventLocation.headerTitle')}\n <span class=\"label-icon\">\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">{i18next.t('nylasEventLocation.tooltip.desc')}</span>\n </tooltip-component>\n </span>\n </label>\n <div class=\"location-input\">\n {/* {defaultOption && defaultOption?.label && ( */}\n <select-dropdown\n withSearch={false}\n name=\"location\"\n options={this.locationOptions}\n defaultSelectedOption={defaultOption}\n themeConfig={this.themeConfig}\n exportparts=\"sd_dropdown: nel__dropdown, sd_dropdown-button: nel__dropdown-button, sd_dropdown-content: nel__dropdown-content\"\n >\n <span slot=\"select-icon\">{this.getIcon(this.selectedLocationOption)}</span>\n </select-dropdown>\n {/* )} */}\n {this.selectedLocationOption === 'custom' && (\n <input type=\"text\" part=\"nel__location\" id=\"location\" name=\"location\" maxlength=\"1024\" value={this.location} onInput={e => this.handleChange(e)} />\n )}\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"kOAAA,MAAMA,EAAwB,i6H,ugBC0BjBC,EAAkB,MAN/B,WAAAC,CAAAC,G,qNAeUC,KAAIC,KAAW,WAiDdD,KAAAE,SAAmBF,KAAKG,eAAiB,GAIzCH,KAAAI,QAAkBJ,KAAKK,kBAAoBL,KAAKM,kBAAkBN,KAAKK,mBAAqB,GAQ5FL,KAAAO,kBAA4BP,KAAKQ,cAAgBR,KAAKS,aAAaC,UAAY,GAK/EV,KAAAW,gBAAkB,CACzB,CAAEC,MAAO,OAAQC,MAAOC,EAAQC,EAAE,6CAA8CC,UAAWhB,KAAKiB,aAAa,SAC7G,CAAEL,MAAO,SAAUC,MAAOC,EAAQC,EAAE,+CAAgDC,UAAWhB,KAAKiB,aAAa,WAiVpH,CAnUC,yBAAAC,CAA0BC,GACxBC,EAAM,uBAAwB,4BAA6BD,GAC3DnB,KAAKqB,KAAKC,aAAa,OAAQH,E,CAIjC,mCAAAI,CAAoCJ,GAClCC,EAAM,4BAA6B,sCAAuCD,GAC1E,MAAMK,EAAiBL,GAAUM,eAAevB,UAAYF,KAAKG,cACjE,MAAMuB,EAAqBP,GAAUM,eAAeE,cAAgB3B,KAAKK,kBACzE,GAAIq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