@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{b as t,j as e,k as n,l as o}from"./utils-Bj5Y75fX.js";class s{constructor(e,n,o=true,s){this.automaticComponentRegistration=true;this.registeredComponents={};this.propStateRegistrations=new Map;this.eventListenerRegistrations=new Map;this.host=e;this.stores=n;this.automaticComponentRegistration=o;this.eventOverrides=s;t(`[${this.hostTagName}] Initializing (abstract) provider.`,{eventOverrides:s});this.registerComponent=this.registerComponent.bind(this);this.getStore=this.getStore.bind(this);Object.keys(this.stores).forEach((t=>{this.propStateRegistrations.set(t,new Map)}))}async componentWillLoad(e){t(`[${this.hostTagName}] Will load`);this.setupStoreListeners();this.nylasConnector=e;const n=Array.from(this.host.querySelectorAll("*")).filter((t=>t.tagName.toLowerCase().startsWith("nylas-")));t(`[${this.hostTagName}] Found ${n.length} child component(s).`,{childComponents:n});const o=n.map((async e=>{const n=e;if(!n){t(`[~${this.hostTagName}] (componentWillLoad) Component ${n.tagName} does not have a name. Skipping.`);return}if(!n.registerNylasComponent){t(`[~${this.hostTagName}] (componentWillLoad) Component ${n.tagName} is not a component that can be registered. Skipping.`,{component:n});return}const o={element:n,name:n.tagName.toLowerCase(),getStoresToProp:n.getStoresToProp,storeToProps:n.storeToProps,stateToProps:n.stateToProps,authToProp:n.authToProp,eventToProps:n.eventToProps,connectorToProp:n.connectorToProp,localPropsToProp:n.localPropsToProp};await this.registerComponent(o)}));await Promise.all(o)}async componentDidLoad(){t(`[~${this.hostTagName}] (componentDidLoad) Did load`)}async componentDisconnected(){Object.values(this.stores).forEach((t=>{t.dispose()}))}async registerComponentHandler(e){e.stopPropagation();if(!this.automaticComponentRegistration){t(`~[${this.hostTagName}] (registerComponentHandler) Automatic component registration disabled. Skipping registration of ${e.detail.name}.`);return}await this.registerComponent(e.detail)}async unregisterComponentHandler(e){e.stopPropagation();if(!this.automaticComponentRegistration){t(`~[${this.hostTagName}] (unregisterComponentHandler) Automatic component registration disabled. Skipping unregistration of ${e.detail.name}.`);return}this.unregisterComponent(e.detail)}async registerComponent(s){t(`~[${this.hostTagName}] (registerComponent) Registering component ${s.name}.`);const i=s.element.dataset.nylasId;const r=i&&this.registeredComponents[i];if(r){t(`[${this.hostTagName}] (registerComponent) Component ${s.name} already registered. Updating registration.`);this.cleanupComponentRegistration(i,false)}else{const t=e()?this.computeDeterministicId(s.element):undefined;s.element.dataset.nylasId=i||t||n()}const p=s.element.dataset.nylasId;if(p){this.registeredComponents[p]=s}t(`[${this.hostTagName}] (registerComponent) Waiting for "${s.element.localName}" component to be defined`,{component:s});try{await customElements.whenDefined(s.element.tagName.toLowerCase());t(`[${this.hostTagName}] (registerComponent) Component "${s.element.localName}" is now defined`)}catch(e){t(`[${this.hostTagName}] (registerComponent) Error waiting for component "${s.element.localName}" to be defined:`,e)}const a=this.eventOverrides;const{stateToProps:c,getStoresToProp:h,eventToProps:$,storeToProps:g,connectorToProp:m,localPropsToProp:l,element:d}=s;$?.forEach(((e,n)=>{const i=this.nylasConnector;const r=async o=>{t(`[${this.hostTagName}] (registerComponent) Handling "${s.name}" prop "${String(n)}" event.`,{event:o});if(n in a){t(`[${this.hostTagName}] (registerComponent) Found event override for "${String(n)}" event. Calling override.`);await a[n](o,i)}if(!o.defaultPrevented){await e(o,i)}return};const p=s.element.dataset.nylasId;if(p&&!this.eventListenerRegistrations.has(p)){this.eventListenerRegistrations.set(p,[])}if(p){this.eventListenerRegistrations.get(p)?.push([d,n,r])}t(`[${this.hostTagName}] (registerComponent) Setting "${s.name}" event "${String(n)}" to automcially call NylasConnector method.`);const c=o(n.toString());t(`[${this.hostTagName}] (registerComponent) Adding event listener for "${c}" on "${d.tagName}"`);d.addEventListener(c,r)}));c?.forEach(((e,n)=>{const[o,i]=n.split(".");const r=this.getStore(o);const p=r.state[i];if(!d.dataset.nylasId){t(`[${this.hostTagName}] (registerComponent) Component "${s.name}" not registered. Skipping.`,{component:s});return}if(!this.propStateRegistrations.has(o)){this.propStateRegistrations.set(o,new Map)}if(!this.propStateRegistrations.get(o)?.has(i)){this.propStateRegistrations.get(o)?.set(i,[{elementId:d.dataset.nylasId,propKey:e}])}else{this.propStateRegistrations.get(o)?.get(i)?.push({elementId:d.dataset.nylasId,propKey:e})}d[e.toString()]=p;t(`[${this.hostTagName}] Setting "${s.name}" prop "${e.toString()}" to "${n}" value.`,{stateValue:p})}));l?.forEach(((e,n)=>{const o=this.host[n];d[e.toString()]=o;t(`[${this.hostTagName}] Setting "${s.name}" prop "${e.toString()}" to the value of "${n}" value.`,{value:n,mappedPropValue:o})}));if(h){d[h?.toString()]=this.getStore;t(`[${this.hostTagName}] Setting "${s.name}" prop "${h.toString()}" to "getStore" method.`)}g?.forEach(((e,n)=>{const o=this.getStore(n);d[e.toString()]=o;t(`[${this.hostTagName}] Setting "${s.name}" prop "${e.toString()}" to "${n}" store.`,{store:o})}));if(m){d[m?.toString()]=this.nylasConnector;t(`[${this.hostTagName}] Setting "${s.name}" prop "${m.toString()}" to "nylasConnector" value.`,{connectorToProp:m})}if(typeof d.registerCallback==="function"){t(`[${this.hostTagName}] (registerComponent) Calling registerCallback method for "${s.name}".`);await d.registerCallback()}t(`[${this.hostTagName}] (registerComponent) Component ${s.name} registered.`)}computeDeterministicId(t){const e=t.getAttribute("id");if(e&&e.trim().length>0)return e.trim();const n=t.getAttribute("name");if(n&&n.trim().length>0)return n.trim();const o=t.tagName.toLowerCase();try{const e=Array.from(this.host?.querySelectorAll(o)||[]);const n=e.indexOf(t);const s=n>=0?n+1:e.length+1;return`${o}-${s}`}catch(t){return`${o}-1`}}cleanupComponentRegistration(e,n=true){const s=this.eventListenerRegistrations.get(e);if(s){s.forEach((([e,n,s])=>{const i=o(n.toString());t(`[${this.hostTagName}] (cleanupComponentRegistration) Removing event listener for "${i}" on "${e.tagName}"`);e.removeEventListener(i,s)}));this.eventListenerRegistrations.delete(e)}this.propStateRegistrations.forEach(((t,n)=>{t.forEach(((t,o)=>{const s=t.filter((t=>t.elementId!==e));if(s.length!==t.length){this.propStateRegistrations.get(n)?.set(o,s)}}))}));if(n){delete this.registeredComponents[e]}}unregisterComponent(e){t(`[${this.hostTagName}] Unregistering component ${e.name}.`);const n=e.element.dataset.nylasId;if(!n){t(`[${this.hostTagName}] (unregisterComponent) Unregistering component ${e.name}.`);return}if(this.registeredComponents[n]){t(`[${this.hostTagName}] (unregisterComponent) Component ${e.name} not registered. Skipping.`);return}this.propStateRegistrations.forEach(((t,e)=>{t.forEach(((t,o)=>{const s=this.propStateRegistrations.get(e)?.get(o);const i=s?.filter((t=>t.elementId!==n));if(i){this.propStateRegistrations.get(e)?.set(o,i)}}))}));const s=this.eventListenerRegistrations.get(n);s?.forEach((([e,n,s])=>{const i=o(n.toString());t(`[${this.hostTagName}] (unregisterComponent) Removing event listener for "${i}" on "${e.tagName}"`);e.removeEventListener(i,s)}));delete this.registeredComponents[n]}getStore(t){const e=this.stores[t];if(!e){throw new Error(`[${this.hostTagName}] Store "${t.toString()}" not found.`)}return e}async setupStoreListeners(){const e=this;Object.entries(this.stores).forEach((([n,o])=>{t(`[${e.hostTagName}] (setupStoreListeners) Listening for changes in "${n}" store.`);o.use({set(o,s,i){t(`[${e.hostTagName}] (setupStoreListeners) Store "${n}" state "${o.toString()}" changed`,{newValue:s,oldValue:i});if(s===i){t(`[${e.hostTagName}] (setupStoreListeners) Store "${n}" state "${o.toString()}" unchanged. Skipping.`);return}const r=e.registeredComponents;if(!r){t(`[${e.hostTagName}] (setupStoreListeners) No registered components found. Skipping.`);return}const p=e.propStateRegistrations.get(n)?.get(o.toString())||[];t(`[${e.hostTagName}] (setupStoreListeners) Found ${p.length} prop(s) registered for "${o.toString()}" store.`,{props:p,propStateRegistrations:e.propStateRegistrations});p.forEach((({elementId:s,propKey:i})=>{const p=r[s];if(!p){t(`[${e.hostTagName}] (setupStoreListeners) Component "${s}" not found. Skipping.`,{component:p});return}const a=e.getStore(n);const c=a.state[o];p.element[i.toString()]=c;t(`[${e.hostTagName}] (setupStoreListeners) Setting "${p.name}" prop "${i.toString()}" to "${o.toString()}" value.`,{stateValue:c})}))}})}))}get hostTagName(){return this.host?.tagName?.toLowerCase()??"nylas-provider"}}class i extends s{}export{i as N};
2
- //# sourceMappingURL=abstract-provider-D75Ucvku.js.map
1
+ import{b as t,j as e,k as n,l as o}from"./utils-DhmCcrVs.js";class s{constructor(e,n,o=true,s){this.automaticComponentRegistration=true;this.registeredComponents={};this.propStateRegistrations=new Map;this.eventListenerRegistrations=new Map;this.host=e;this.stores=n;this.automaticComponentRegistration=o;this.eventOverrides=s;t(`[${this.hostTagName}] Initializing (abstract) provider.`,{eventOverrides:s});this.registerComponent=this.registerComponent.bind(this);this.getStore=this.getStore.bind(this);Object.keys(this.stores).forEach((t=>{this.propStateRegistrations.set(t,new Map)}))}async componentWillLoad(e){t(`[${this.hostTagName}] Will load`);this.setupStoreListeners();this.nylasConnector=e;const n=Array.from(this.host.querySelectorAll("*")).filter((t=>t.tagName.toLowerCase().startsWith("nylas-")));t(`[${this.hostTagName}] Found ${n.length} child component(s).`,{childComponents:n});const o=n.map((async e=>{const n=e;if(!n){t(`[~${this.hostTagName}] (componentWillLoad) Component ${n.tagName} does not have a name. Skipping.`);return}if(!n.registerNylasComponent){t(`[~${this.hostTagName}] (componentWillLoad) Component ${n.tagName} is not a component that can be registered. Skipping.`,{component:n});return}const o={element:n,name:n.tagName.toLowerCase(),getStoresToProp:n.getStoresToProp,storeToProps:n.storeToProps,stateToProps:n.stateToProps,authToProp:n.authToProp,eventToProps:n.eventToProps,connectorToProp:n.connectorToProp,localPropsToProp:n.localPropsToProp};await this.registerComponent(o)}));await Promise.all(o)}async componentDidLoad(){t(`[~${this.hostTagName}] (componentDidLoad) Did load`)}async componentDisconnected(){Object.values(this.stores).forEach((t=>{t.dispose()}))}async registerComponentHandler(e){e.stopPropagation();if(!this.automaticComponentRegistration){t(`~[${this.hostTagName}] (registerComponentHandler) Automatic component registration disabled. Skipping registration of ${e.detail.name}.`);return}await this.registerComponent(e.detail)}async unregisterComponentHandler(e){e.stopPropagation();if(!this.automaticComponentRegistration){t(`~[${this.hostTagName}] (unregisterComponentHandler) Automatic component registration disabled. Skipping unregistration of ${e.detail.name}.`);return}this.unregisterComponent(e.detail)}async registerComponent(s){t(`~[${this.hostTagName}] (registerComponent) Registering component ${s.name}.`);const i=s.element.dataset.nylasId;const r=i&&this.registeredComponents[i];if(r){t(`[${this.hostTagName}] (registerComponent) Component ${s.name} already registered. Updating registration.`);this.cleanupComponentRegistration(i,false)}else{const t=e()?this.computeDeterministicId(s.element):undefined;s.element.dataset.nylasId=i||t||n()}const p=s.element.dataset.nylasId;if(p){this.registeredComponents[p]=s}t(`[${this.hostTagName}] (registerComponent) Waiting for "${s.element.localName}" component to be defined`,{component:s});try{await customElements.whenDefined(s.element.tagName.toLowerCase());t(`[${this.hostTagName}] (registerComponent) Component "${s.element.localName}" is now defined`)}catch(e){t(`[${this.hostTagName}] (registerComponent) Error waiting for component "${s.element.localName}" to be defined:`,e)}const a=this.eventOverrides;const{stateToProps:c,getStoresToProp:h,eventToProps:$,storeToProps:g,connectorToProp:m,localPropsToProp:l,element:d}=s;$?.forEach(((e,n)=>{const i=this.nylasConnector;const r=async o=>{t(`[${this.hostTagName}] (registerComponent) Handling "${s.name}" prop "${String(n)}" event.`,{event:o});if(n in a){t(`[${this.hostTagName}] (registerComponent) Found event override for "${String(n)}" event. Calling override.`);await a[n](o,i)}if(!o.defaultPrevented){await e(o,i)}return};const p=s.element.dataset.nylasId;if(p&&!this.eventListenerRegistrations.has(p)){this.eventListenerRegistrations.set(p,[])}if(p){this.eventListenerRegistrations.get(p)?.push([d,n,r])}t(`[${this.hostTagName}] (registerComponent) Setting "${s.name}" event "${String(n)}" to automcially call NylasConnector method.`);const c=o(n.toString());t(`[${this.hostTagName}] (registerComponent) Adding event listener for "${c}" on "${d.tagName}"`);d.addEventListener(c,r)}));c?.forEach(((e,n)=>{const[o,i]=n.split(".");const r=this.getStore(o);const p=r.state[i];if(!d.dataset.nylasId){t(`[${this.hostTagName}] (registerComponent) Component "${s.name}" not registered. Skipping.`,{component:s});return}if(!this.propStateRegistrations.has(o)){this.propStateRegistrations.set(o,new Map)}if(!this.propStateRegistrations.get(o)?.has(i)){this.propStateRegistrations.get(o)?.set(i,[{elementId:d.dataset.nylasId,propKey:e}])}else{this.propStateRegistrations.get(o)?.get(i)?.push({elementId:d.dataset.nylasId,propKey:e})}d[e.toString()]=p;t(`[${this.hostTagName}] Setting "${s.name}" prop "${e.toString()}" to "${n}" value.`,{stateValue:p})}));l?.forEach(((e,n)=>{const o=this.host[n];d[e.toString()]=o;t(`[${this.hostTagName}] Setting "${s.name}" prop "${e.toString()}" to the value of "${n}" value.`,{value:n,mappedPropValue:o})}));if(h){d[h?.toString()]=this.getStore;t(`[${this.hostTagName}] Setting "${s.name}" prop "${h.toString()}" to "getStore" method.`)}g?.forEach(((e,n)=>{const o=this.getStore(n);d[e.toString()]=o;t(`[${this.hostTagName}] Setting "${s.name}" prop "${e.toString()}" to "${n}" store.`,{store:o})}));if(m){d[m?.toString()]=this.nylasConnector;t(`[${this.hostTagName}] Setting "${s.name}" prop "${m.toString()}" to "nylasConnector" value.`,{connectorToProp:m})}if(typeof d.registerCallback==="function"){t(`[${this.hostTagName}] (registerComponent) Calling registerCallback method for "${s.name}".`);await d.registerCallback()}t(`[${this.hostTagName}] (registerComponent) Component ${s.name} registered.`)}computeDeterministicId(t){const e=t.getAttribute("id");if(e&&e.trim().length>0)return e.trim();const n=t.getAttribute("name");if(n&&n.trim().length>0)return n.trim();const o=t.tagName.toLowerCase();try{const e=Array.from(this.host?.querySelectorAll(o)||[]);const n=e.indexOf(t);const s=n>=0?n+1:e.length+1;return`${o}-${s}`}catch(t){return`${o}-1`}}cleanupComponentRegistration(e,n=true){const s=this.eventListenerRegistrations.get(e);if(s){s.forEach((([e,n,s])=>{const i=o(n.toString());t(`[${this.hostTagName}] (cleanupComponentRegistration) Removing event listener for "${i}" on "${e.tagName}"`);e.removeEventListener(i,s)}));this.eventListenerRegistrations.delete(e)}this.propStateRegistrations.forEach(((t,n)=>{t.forEach(((t,o)=>{const s=t.filter((t=>t.elementId!==e));if(s.length!==t.length){this.propStateRegistrations.get(n)?.set(o,s)}}))}));if(n){delete this.registeredComponents[e]}}unregisterComponent(e){t(`[${this.hostTagName}] Unregistering component ${e.name}.`);const n=e.element.dataset.nylasId;if(!n){t(`[${this.hostTagName}] (unregisterComponent) Unregistering component ${e.name}.`);return}if(this.registeredComponents[n]){t(`[${this.hostTagName}] (unregisterComponent) Component ${e.name} not registered. Skipping.`);return}this.propStateRegistrations.forEach(((t,e)=>{t.forEach(((t,o)=>{const s=this.propStateRegistrations.get(e)?.get(o);const i=s?.filter((t=>t.elementId!==n));if(i){this.propStateRegistrations.get(e)?.set(o,i)}}))}));const s=this.eventListenerRegistrations.get(n);s?.forEach((([e,n,s])=>{const i=o(n.toString());t(`[${this.hostTagName}] (unregisterComponent) Removing event listener for "${i}" on "${e.tagName}"`);e.removeEventListener(i,s)}));delete this.registeredComponents[n]}getStore(t){const e=this.stores[t];if(!e){throw new Error(`[${this.hostTagName}] Store "${t.toString()}" not found.`)}return e}async setupStoreListeners(){const e=this;Object.entries(this.stores).forEach((([n,o])=>{t(`[${e.hostTagName}] (setupStoreListeners) Listening for changes in "${n}" store.`);o.use({set(o,s,i){t(`[${e.hostTagName}] (setupStoreListeners) Store "${n}" state "${o.toString()}" changed`,{newValue:s,oldValue:i});if(s===i){t(`[${e.hostTagName}] (setupStoreListeners) Store "${n}" state "${o.toString()}" unchanged. Skipping.`);return}const r=e.registeredComponents;if(!r){t(`[${e.hostTagName}] (setupStoreListeners) No registered components found. Skipping.`);return}const p=e.propStateRegistrations.get(n)?.get(o.toString())||[];t(`[${e.hostTagName}] (setupStoreListeners) Found ${p.length} prop(s) registered for "${o.toString()}" store.`,{props:p,propStateRegistrations:e.propStateRegistrations});p.forEach((({elementId:s,propKey:i})=>{const p=r[s];if(!p){t(`[${e.hostTagName}] (setupStoreListeners) Component "${s}" not found. Skipping.`,{component:p});return}const a=e.getStore(n);const c=a.state[o];p.element[i.toString()]=c;t(`[${e.hostTagName}] (setupStoreListeners) Setting "${p.name}" prop "${i.toString()}" to "${o.toString()}" value.`,{stateValue:c})}))}})}))}get hostTagName(){return this.host?.tagName?.toLowerCase()??"nylas-provider"}}class i extends s{}export{i as N};
2
+ //# sourceMappingURL=abstract-provider-9AZudYSI.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"abstract-provider-D75Ucvku.js","sources":["src/common/abstract-provider.ts"],"sourcesContent":["import { RegisteredComponent } from '@/common/register-component';\nimport { BaseNylasConnectorInterface } from '@/connector/connector-interface';\nimport { debug, formatEventName, uniqueID, isTestEnvironment } from '@/utils/utils';\nimport { ObservableMap } from '@stencil/store';\nimport { EventOverride } from './component-types';\nimport { HTMLStencilElement } from '@stencil/core/internal';\n\nexport type PropKey = string | number | symbol;\nexport type StoreKey = string;\nexport type StoreName<T> = keyof T;\nexport type StateKey = string;\nexport type ElementID = string;\nexport type PropStateRegistration = { elementId: ElementID; propKey: PropKey };\nexport type EventListenerRegistration = [HTMLElement, PropKey, (event: CustomEvent<any>) => Promise<void>];\n\nexport interface NylasProviderInterface<Stores extends Record<string, ObservableMap<any>>> {\n nylasConnector?: BaseNylasConnectorInterface;\n stores: Stores;\n host?: HTMLElement;\n automaticComponentRegistration: boolean;\n registeredComponents: Record<ElementID, RegisteredComponent<any, any>>;\n propStateRegistrations: Map<StoreName<this['stores']>, Map<StateKey, PropStateRegistration[]>>;\n eventListenerRegistrations: Map<ElementID, EventListenerRegistration[]>;\n componentWillLoad(nylasConnector: BaseNylasConnectorInterface): Promise<void>;\n componentDidLoad(): Promise<void>;\n componentDisconnected(): Promise<void>;\n getStore<K extends keyof ThisType<this['stores']>>(name: K): ThisType<this['stores']>[K];\n registerComponent(component: RegisteredComponent<any, any>): void;\n unregisterComponent(component: RegisteredComponent<any, any>): void;\n}\n\nexport abstract class NylasAbstractProvider<Stores extends Record<string, ObservableMap<any>>> implements NylasProviderInterface<Stores> {\n /**\n * The NylasConnector instance.\n * This is used to provide access to the NylasConnector instance to all components.\n */\n public nylasConnector?: BaseNylasConnectorInterface;\n\n /**\n * A list of stores that are used by the provider.\n * This is used to provide access to the stores to all components.\n */\n public stores: Stores;\n\n /**\n * The host element.\n * Used to manage the host element of the provider.\n */\n public host!: HTMLElement;\n\n /**\n * Automatically register components that have the `@RegisterComponent` decorator.\n * If this is set to false, you will need to manually register components using the\n * `registerComponent` method.\n * @default true\n */\n public automaticComponentRegistration: boolean = true;\n\n /**\n * A list of registered components that are listening for store changes.\n * Each component is registered with a unique id so that we can easily track the component\n * for various other operations (see `propStateRegistrations` and `eventListenerRegistrations`).\n */\n public registeredComponents: Record<ElementID, RegisteredComponent<any, any>> = {};\n\n /**\n * A list of registered components that are listening for store changes.\n * To make lookups more efficient, we use a Map of our prop registrations that we need to map to differnet\n * state keys. When a component is unregistered, we can use this map to remove the prop registration.\n */\n public propStateRegistrations: Map<StoreName<this['stores']>, Map<StateKey, PropStateRegistration[]>> = new Map();\n\n /**\n * A list of registered event listeners.\n * To make lookups more efficient, we use a Map of our event listeners that we need to map to differnet\n * nylas connector methods. When a component is unregistered, we can use this map to remove the event listener.\n */\n public eventListenerRegistrations: Map<ElementID, EventListenerRegistration[]> = new Map();\n\n /**\n * A list of event overrides that are used by the provider.\n * This is used to provide an easy way to override the default function of the event emitter.\n * An example of this is the `timeslotConfirmed` event. By default, this event will set the scheduler store state for `showBookingForm` to `true` which will\n * show the booking form. However, if you want to override this behavior, you can pass in the prop `eventOverride` like:\n * ```html\n * <nylas-scheduler eventOverride={{\"timeslotConfirmed\": (event, nylasConnector) => { console.log(\"Timeslot confirmed event fired!\"); } }} />\n * ```\n */\n public eventOverrides: EventOverride<Exclude<BaseNylasConnectorInterface, undefined>>;\n\n /**\n * The constructor for the AbstractNylasProvider.\n * @param host The host element (usually the HTMLElement of the provider)\n * @param stores A list of stores that are used by the provider\n * @param automaticComponentRegistration A boolean that determines if components should be automatically registered\n * @param eventOverrides A list of event overrides that are used by the provider\n */\n constructor(host: HTMLElement, stores: Stores, automaticComponentRegistration: boolean = true, eventOverrides: EventOverride<any>) {\n this.host = host;\n this.stores = stores;\n this.automaticComponentRegistration = automaticComponentRegistration;\n this.eventOverrides = eventOverrides;\n\n debug(`[${this.hostTagName}] Initializing (abstract) provider.`, { eventOverrides });\n\n this.registerComponent = this.registerComponent.bind(this);\n this.getStore = this.getStore.bind(this);\n\n // Init propStateRegistrations with store names\n Object.keys(this.stores).forEach(storeName => {\n this.propStateRegistrations.set(storeName, new Map());\n });\n }\n\n /**\n * This method is called before the component is loaded.\n * We're passing the NylasConnector instance to the provider so that we can\n * provide access to the NylasConnector instance to all components.\n *\n * However, because the NylasConnector is often constructed after the component's\n * constructor is called, set the NylasConnector instance here.\n * @param nylasConnector The NylasConnector instance\n */\n async componentWillLoad(nylasConnector: BaseNylasConnectorInterface) {\n debug(`[${this.hostTagName}] Will load`);\n\n // For each of our stores, configure the listeners for changes in the\n // store state.\n this.setupStoreListeners();\n\n // Set the NylasConnector instance\n this.nylasConnector = nylasConnector;\n\n /**\n * This is a very static way of registering components, but it happens fairly\n * early in the component lifecycle, so it can be beneficial to do it here.\n *\n * The big downside to this is that it will not pick up any components that\n * are dynamically added to the DOM after this method is called.\n *\n * So we should evaluate if this is the best way to register components.\n */\n const childComponents = Array.from(this.host.querySelectorAll('*')).filter(child => child.tagName.toLowerCase().startsWith('nylas-'));\n debug(`[${this.hostTagName}] Found ${childComponents.length} child component(s).`, { childComponents });\n\n const registrations = childComponents.map(async child => {\n const component = child as any; // It unfortunately makes life a whole lot easier to just cast this to any\n if (!component) {\n debug(`[~${this.hostTagName}] (componentWillLoad) Component ${component.tagName} does not have a name. Skipping.`);\n return;\n }\n\n // Skip components that don't have the `registerNylasComponent` prop\n if (!component.registerNylasComponent) {\n debug(`[~${this.hostTagName}] (componentWillLoad) Component ${component.tagName} is not a component that can be registered. Skipping.`, { component });\n return;\n }\n\n const registeredComponent: RegisteredComponent<any, any> = {\n element: component as HTMLStencilElement,\n name: component.tagName.toLowerCase(),\n getStoresToProp: component.getStoresToProp,\n storeToProps: component.storeToProps,\n stateToProps: component.stateToProps,\n authToProp: component.authToProp,\n eventToProps: component.eventToProps,\n connectorToProp: component.connectorToProp,\n localPropsToProp: component.localPropsToProp,\n };\n\n await this.registerComponent(registeredComponent);\n });\n\n await Promise.all(registrations);\n }\n\n /**\n * This method is called after the component is loaded.\n * We're using this method to add event listeners to the host element.\n */\n async componentDidLoad() {\n debug(`[~${this.hostTagName}] (componentDidLoad) Did load`);\n }\n\n /**\n * This method is called when the component is disconnected from the DOM.\n * We're using this method to dispose of the stores.\n */\n async componentDisconnected() {\n // Loop through each store and and dispose\n Object.values(this.stores).forEach(store => {\n store.dispose();\n });\n }\n\n /**\n * This is a custom event handler that is used to register a component with the provider.\n * It is used by components that have the `@RegisterComponent` decorator.\n * @param event A custom event that contains the component to register\n * @returns Promise<void>\n */\n async registerComponentHandler(event: CustomEvent<RegisteredComponent<any, any>>): Promise<void> {\n event.stopPropagation();\n\n if (!this.automaticComponentRegistration) {\n debug(`~[${this.hostTagName}] (registerComponentHandler) Automatic component registration disabled. Skipping registration of ${event.detail.name}.`);\n return;\n }\n\n await this.registerComponent(event.detail);\n }\n\n /**\n * This is a custom event handler that is used to unregister a component with the provider.\n * It is used by components that have the `@RegisterComponent` decorator.\n * @param event A custom event that contains the component to unregister\n * @returns Promise<void>\n */\n async unregisterComponentHandler(event: CustomEvent<RegisteredComponent<any, any>>): Promise<void> {\n event.stopPropagation();\n\n if (!this.automaticComponentRegistration) {\n debug(`~[${this.hostTagName}] (unregisterComponentHandler) Automatic component registration disabled. Skipping unregistration of ${event.detail.name}.`);\n return;\n }\n\n this.unregisterComponent(event.detail);\n }\n\n /**\n * This method is used to register a component with the provider\n * @param component component to register\n * @returns void\n */\n public async registerComponent(component: RegisteredComponent<any, any>): Promise<void> {\n debug(`~[${this.hostTagName}] (registerComponent) Registering component ${component.name}.`);\n\n // Get component element id\n const elementId = component.element.dataset.nylasId;\n const isReregistration = elementId && this.registeredComponents[elementId];\n\n // If this is a re-registration, clean up previous registrations first\n if (isReregistration) {\n debug(`[${this.hostTagName}] (registerComponent) Component ${component.name} already registered. Updating registration.`);\n // Clean up event listeners but keep the component ID\n this.cleanupComponentRegistration(elementId, false);\n } else {\n // Set a deterministic data id in tests, otherwise a random id\n const deterministicId = isTestEnvironment() ? this.computeDeterministicId(component.element as HTMLElement) : undefined;\n component.element.dataset.nylasId = elementId || deterministicId || uniqueID();\n }\n\n // Register/update the component to ensure the component is tracked even while waiting for definition\n const nylasId = component.element.dataset.nylasId;\n if (nylasId) {\n this.registeredComponents[nylasId] = component;\n }\n\n // Wait for the component to be defined in the custom elements registry before we attempt to\n // complete the component registration. While this means that the component will not be loaded with\n // props immediately, it does ensure that when we do set the props, the component is ready to receive them.\n debug(`[${this.hostTagName}] (registerComponent) Waiting for \"${component.element.localName}\" component to be defined`, { component });\n try {\n await customElements.whenDefined(component.element.tagName.toLowerCase());\n debug(`[${this.hostTagName}] (registerComponent) Component \"${component.element.localName}\" is now defined`);\n } catch (error) {\n debug(`[${this.hostTagName}] (registerComponent) Error waiting for component \"${component.element.localName}\" to be defined:`, error);\n // Continue with registration anyway, as the component might be defined later\n }\n\n const eventOverrides = this.eventOverrides;\n const { stateToProps, getStoresToProp, eventToProps, storeToProps, connectorToProp, localPropsToProp, element } = component;\n\n /**\n * We allow components to map an event to a prop. These events can automatically\n * call a method on the nylasConnector instance.\n */\n eventToProps?.forEach((customEventHandler, propKey) => {\n const nylasConnector = this.nylasConnector;\n const handler = async (event: CustomEvent<any>) => {\n debug(`[${this.hostTagName}] (registerComponent) Handling \"${component.name}\" prop \"${String(propKey)}\" event.`, { event });\n if (propKey in eventOverrides) {\n debug(`[${this.hostTagName}] (registerComponent) Found event override for \"${String(propKey)}\" event. Calling override.`);\n await eventOverrides[propKey](event, nylasConnector);\n }\n\n if (!event.defaultPrevented) {\n await customEventHandler(event, nylasConnector);\n }\n\n return;\n };\n\n const elementId = component.element.dataset.nylasId;\n\n if (elementId && !this.eventListenerRegistrations.has(elementId)) {\n this.eventListenerRegistrations.set(elementId, []);\n }\n\n if (elementId) {\n this.eventListenerRegistrations.get(elementId)?.push([element, propKey, handler]);\n }\n\n debug(`[${this.hostTagName}] (registerComponent) Setting \"${component.name}\" event \"${String(propKey)}\" to automcially call NylasConnector method.`);\n\n // We should immediately call the event handler to make sure the prop is set\n const eventName = formatEventName(propKey.toString());\n debug(`[${this.hostTagName}] (registerComponent) Adding event listener for \"${eventName}\" on \"${element.tagName}\"`);\n element.addEventListener(eventName, handler as unknown as EventListener);\n });\n\n /**\n * This is a rather simple way for us to set the initial props for a component.\n * For each prop, we check if the prop is mapped to a store. If it is, we set\n * the prop to the store value.\n */\n stateToProps?.forEach((propKey, stateKey) => {\n const [storeName, stateName] = stateKey.split('.');\n const store = this.getStore(storeName as keyof typeof this.stores);\n const stateValue = store.state[stateName as keyof typeof store.state];\n\n // Make sure this component was registered and has a nylasId\n if (!element.dataset.nylasId) {\n debug(`[${this.hostTagName}] (registerComponent) Component \"${component.name}\" not registered. Skipping.`, { component });\n return;\n }\n\n // We need to keep track of the store and prop key so that we can update the\n // prop when the store changes\n if (!this.propStateRegistrations.has(storeName as keyof typeof this.stores)) {\n this.propStateRegistrations.set(storeName as keyof typeof this.stores, new Map());\n }\n\n if (!this.propStateRegistrations.get(storeName as keyof typeof this.stores)?.has(stateName)) {\n this.propStateRegistrations.get(storeName as keyof typeof this.stores)?.set(stateName, [\n {\n elementId: element.dataset.nylasId,\n propKey,\n },\n ]);\n } else {\n this.propStateRegistrations\n .get(storeName as keyof typeof this.stores)\n ?.get(stateName)\n ?.push({\n elementId: element.dataset.nylasId,\n propKey,\n });\n }\n\n // Set the prop value on the component\n (element as { [key: string]: any })[propKey.toString()] = stateValue;\n debug(`[${this.hostTagName}] Setting \"${component.name}\" prop \"${propKey.toString()}\" to \"${stateKey}\" value.`, { stateValue });\n });\n\n /**\n * We allow components to also map props from the provider to the component.\n */\n localPropsToProp?.forEach((propKey, value) => {\n const mappedPropValue = this.host[value]; // TODO: Is this safe? We should find a way to only limit it to public properties and no methods.\n (element as { [key: string]: any })[propKey.toString()] = mappedPropValue;\n debug(`[${this.hostTagName}] Setting \"${component.name}\" prop \"${propKey.toString()}\" to the value of \"${value}\" value.`, { value, mappedPropValue });\n });\n\n /**\n * We allow components to access the getStore method directly.\n */\n if (getStoresToProp) {\n (element as { [key: string]: any })[getStoresToProp?.toString()] = this.getStore;\n debug(`[${this.hostTagName}] Setting \"${component.name}\" prop \"${getStoresToProp.toString()}\" to \"getStore\" method.`);\n }\n\n /**\n * We allow components to map a store to a prop for direct access.\n */\n storeToProps?.forEach((propKey, storeKey) => {\n const store = this.getStore(storeKey);\n (element as { [key: string]: any })[propKey.toString()] = store;\n debug(`[${this.hostTagName}] Setting \"${component.name}\" prop \"${propKey.toString()}\" to \"${storeKey}\" store.`, { store });\n });\n\n /**\n * We allow components to map the NylasConnector instance to a prop for direct access.\n */\n if (connectorToProp) {\n (element as { [key: string]: any })[connectorToProp?.toString()] = this.nylasConnector;\n debug(`[${this.hostTagName}] Setting \"${component.name}\" prop \"${connectorToProp.toString()}\" to \"nylasConnector\" value.`, { connectorToProp });\n }\n\n /**\n * We allow components to fire an event when they are registered.\n */\n if (typeof element.registerCallback === 'function') {\n debug(`[${this.hostTagName}] (registerComponent) Calling registerCallback method for \"${component.name}\".`);\n await element.registerCallback();\n }\n\n debug(`[${this.hostTagName}] (registerComponent) Component ${component.name} registered.`);\n }\n\n /**\n * Compute a deterministic nylas id for an element during tests.\n * Preference order:\n * - existing element id attribute\n * - existing element name attribute\n * - <tag>-<indexWithinHostOfSameTag>\n */\n private computeDeterministicId(element: HTMLElement): string {\n const idAttr = element.getAttribute('id');\n if (idAttr && idAttr.trim().length > 0) return idAttr.trim();\n\n const nameAttr = element.getAttribute('name');\n if (nameAttr && nameAttr.trim().length > 0) return nameAttr.trim();\n\n const tag = element.tagName.toLowerCase();\n try {\n const siblingsSameTag = Array.from(this.host?.querySelectorAll(tag) || []) as HTMLElement[];\n const idx = siblingsSameTag.indexOf(element);\n const indexOneBased = idx >= 0 ? idx + 1 : siblingsSameTag.length + 1;\n return `${tag}-${indexOneBased}`;\n } catch (_e) {\n return `${tag}-1`;\n }\n }\n\n /**\n * Cleans up registrations for a component without fully unregistering it\n * @param elementId The ID of the element to clean up\n * @param removeFromRegistry Whether to remove the component from the registry\n */\n private cleanupComponentRegistration(elementId: string, removeFromRegistry: boolean = true): void {\n // Remove event listeners\n const eventListenerRegistrations = this.eventListenerRegistrations.get(elementId);\n if (eventListenerRegistrations) {\n eventListenerRegistrations.forEach(([element, propKey, handler]) => {\n const eventName = formatEventName(propKey.toString());\n debug(`[${this.hostTagName}] (cleanupComponentRegistration) Removing event listener for \"${eventName}\" on \"${element.tagName}\"`);\n element.removeEventListener(eventName, handler as unknown as EventListener);\n });\n this.eventListenerRegistrations.delete(elementId);\n }\n\n // Clean up prop state registrations\n this.propStateRegistrations.forEach((stateToProps, storeName) => {\n stateToProps.forEach((props, stateKey) => {\n const filteredProps = props.filter(prop => prop.elementId !== elementId);\n if (filteredProps.length !== props.length) {\n this.propStateRegistrations.get(storeName)?.set(stateKey, filteredProps);\n }\n });\n });\n\n // Remove from registry if requested\n if (removeFromRegistry) {\n delete this.registeredComponents[elementId];\n }\n }\n\n /**\n * This is a method that is used to unregister a component with the provider.\n * @param component HTMLElement to unregister\n * @returns void\n */\n public unregisterComponent(component: RegisteredComponent<any, any>): void {\n debug(`[${this.hostTagName}] Unregistering component ${component.name}.`);\n\n // Get component element id\n const elementId = component.element.dataset.nylasId;\n if (!elementId) {\n debug(`[${this.hostTagName}] (unregisterComponent) Unregistering component ${component.name}.`);\n return;\n }\n\n // Make sure the component is not already registered\n if (this.registeredComponents[elementId]) {\n debug(`[${this.hostTagName}] (unregisterComponent) Component ${component.name} not registered. Skipping.`);\n return;\n }\n\n // Remove the component prop registration from propStateRegistrations\n this.propStateRegistrations.forEach((stateToProps, storeName) => {\n stateToProps.forEach((_, stateKey) => {\n const props = this.propStateRegistrations.get(storeName)?.get(stateKey);\n const filteredProps = props?.filter(prop => prop.elementId !== elementId);\n if (filteredProps) {\n this.propStateRegistrations.get(storeName)?.set(stateKey, filteredProps);\n }\n });\n });\n\n // Before we unregister the component, we need to remove any event listeners\n const eventListenerRegistrations = this.eventListenerRegistrations.get(elementId);\n eventListenerRegistrations?.forEach(([element, propKey, handler]) => {\n const eventName = formatEventName(propKey.toString());\n debug(`[${this.hostTagName}] (unregisterComponent) Removing event listener for \"${eventName}\" on \"${element.tagName}\"`);\n element.removeEventListener(eventName, handler as unknown as EventListener);\n });\n\n // Unregister the component\n delete this.registeredComponents[elementId];\n }\n\n /**\n * This method is used to dynamically retrieve the appropriate store\n * @param name store name\n */\n public getStore<K extends keyof Stores>(name: K): Stores[K] {\n const store = this.stores[name];\n if (!store) {\n throw new Error(`[${this.hostTagName}] Store \"${name.toString()}\" not found.`);\n }\n return store;\n }\n\n /**\n * This method is called when the component is connected to the DOM.\n * We're using this method to listen for changes in the store and update\n * the registered components with the new values.\n */\n private async setupStoreListeners() {\n const self = this;\n\n /**\n * This is a rather simple way for us to listen for changes in the store\n * and make sure our registered components are updated with the new values.\n *\n * For each store change, we loop through each registered component and\n * check if the store change is mapped to a prop on the component. If it is,\n * we set the prop to the new value.\n *\n * We call this super early in the provider lifecycle so that we can make sure\n * that all components have the correct props before they are rendered.\n */\n Object.entries(this.stores).forEach(([storeName, store]) => {\n debug(`[${self.hostTagName}] (setupStoreListeners) Listening for changes in \"${storeName}\" store.`);\n store.use({\n set(stateKey, newValue, oldValue) {\n debug(`[${self.hostTagName}] (setupStoreListeners) Store \"${storeName}\" state \"${stateKey.toString()}\" changed`, { newValue, oldValue });\n if (newValue === oldValue) {\n debug(`[${self.hostTagName}] (setupStoreListeners) Store \"${storeName}\" state \"${stateKey.toString()}\" unchanged. Skipping.`);\n return;\n }\n\n const registeredComponents = self.registeredComponents;\n if (!registeredComponents) {\n debug(`[${self.hostTagName}] (setupStoreListeners) No registered components found. Skipping.`);\n return;\n }\n\n // Get our prop registrations for this store\n const props = self.propStateRegistrations.get(storeName as keyof typeof self.stores as string)?.get(stateKey.toString()) || [];\n debug(`[${self.hostTagName}] (setupStoreListeners) Found ${props.length} prop(s) registered for \"${stateKey.toString()}\" store.`, {\n props,\n propStateRegistrations: self.propStateRegistrations,\n });\n\n // Loop through each registered component and update the prop\n props.forEach(({ elementId, propKey }) => {\n const component = registeredComponents[elementId];\n if (!component) {\n debug(`[${self.hostTagName}] (setupStoreListeners) Component \"${elementId}\" not found. Skipping.`, { component });\n return;\n }\n\n // Get the appropriate store\n const loadedStore = self.getStore(storeName as keyof typeof self.stores as string);\n const stateValue = loadedStore.state[stateKey as unknown as keyof typeof loadedStore.state];\n (component.element as { [key: string]: any })[propKey.toString()] = stateValue;\n debug(`[${self.hostTagName}] (setupStoreListeners) Setting \"${component.name}\" prop \"${propKey.toString()}\" to \"${stateKey.toString()}\" value.`, { stateValue });\n });\n },\n });\n });\n }\n\n /**\n * Simple getter for the host element tag name.\n */\n private get hostTagName(): string {\n return this.host?.tagName?.toLowerCase() ?? 'nylas-provider';\n }\n}\n\nexport class NylasBaseProvider<T extends Record<string, ObservableMap<any>>> extends NylasAbstractProvider<T> {}\n"],"names":[],"mappings":";;MA+BsB,qBAAqB,CAAA;AAkEzC,IAAA,WAAA,CAAY,IAAiB,EAAE,MAAc,EAAE,8BAA0C,GAAA,IAAI,EAAE,cAAkC,EAAA;QAzC1H,IAA8B,CAAA,8BAAA,GAAY,IAAI;QAO9C,IAAoB,CAAA,oBAAA,GAAqD,EAAE;AAO3E,QAAA,IAAA,CAAA,sBAAsB,GAA2E,IAAI,GAAG,EAAE;AAO1G,QAAA,IAAA,CAAA,0BAA0B,GAAgD,IAAI,GAAG,EAAE;AAqBxF,QAAA,IAAI,CAAC,IAAI,GAAG,IAAI;AAChB,QAAA,IAAI,CAAC,MAAM,GAAG,MAAM;AACpB,QAAA,IAAI,CAAC,8BAA8B,GAAG,8BAA8B;AACpE,QAAA,IAAI,CAAC,cAAc,GAAG,cAAc;QAEpC,KAAK,CAAC,CAAI,CAAA,EAAA,IAAI,CAAC,WAAW,CAAqC,mCAAA,CAAA,EAAE,EAAE,cAAc,EAAE,CAAC;QAEpF,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC;QAC1D,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;AAGxC,QAAA,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,SAAS,IAAG;YAC3C,IAAI,CAAC,sBAAsB,CAAC,GAAG,CAAC,SAAS,EAAE,IAAI,GAAG,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AU,QAAA,CAAA,EAAE,EAAE,UAAU,EAAE,CAAC;AAClK,qBAAC,CAAC;iBACH;AACF,aAAA,CAAC;AACJ,SAAC,CAAC;;AAMJ,IAAA,IAAY,WAAW,GAAA;QACrB,OAAO,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,gBAAgB;;AAE/D;AAEK,MAAO,iBAAgE,SAAQ,qBAAwB,CAAA;AAAG;;;;"}
1
+ {"version":3,"file":"abstract-provider-9AZudYSI.js","sources":["src/common/abstract-provider.ts"],"sourcesContent":["import { RegisteredComponent } from '@/common/register-component';\nimport { BaseNylasConnectorInterface } from '@/connector/connector-interface';\nimport { debug, formatEventName, uniqueID, isTestEnvironment } from '@/utils/utils';\nimport { ObservableMap } from '@stencil/store';\nimport { EventOverride } from './component-types';\nimport { HTMLStencilElement } from '@stencil/core/internal';\n\nexport type PropKey = string | number | symbol;\nexport type StoreKey = string;\nexport type StoreName<T> = keyof T;\nexport type StateKey = string;\nexport type ElementID = string;\nexport type PropStateRegistration = { elementId: ElementID; propKey: PropKey };\nexport type EventListenerRegistration = [HTMLElement, PropKey, (event: CustomEvent<any>) => Promise<void>];\n\nexport interface NylasProviderInterface<Stores extends Record<string, ObservableMap<any>>> {\n nylasConnector?: BaseNylasConnectorInterface;\n stores: Stores;\n host?: HTMLElement;\n automaticComponentRegistration: boolean;\n registeredComponents: Record<ElementID, RegisteredComponent<any, any>>;\n propStateRegistrations: Map<StoreName<this['stores']>, Map<StateKey, PropStateRegistration[]>>;\n eventListenerRegistrations: Map<ElementID, EventListenerRegistration[]>;\n componentWillLoad(nylasConnector: BaseNylasConnectorInterface): Promise<void>;\n componentDidLoad(): Promise<void>;\n componentDisconnected(): Promise<void>;\n getStore<K extends keyof ThisType<this['stores']>>(name: K): ThisType<this['stores']>[K];\n registerComponent(component: RegisteredComponent<any, any>): void;\n unregisterComponent(component: RegisteredComponent<any, any>): void;\n}\n\nexport abstract class NylasAbstractProvider<Stores extends Record<string, ObservableMap<any>>> implements NylasProviderInterface<Stores> {\n /**\n * The NylasConnector instance.\n * This is used to provide access to the NylasConnector instance to all components.\n */\n public nylasConnector?: BaseNylasConnectorInterface;\n\n /**\n * A list of stores that are used by the provider.\n * This is used to provide access to the stores to all components.\n */\n public stores: Stores;\n\n /**\n * The host element.\n * Used to manage the host element of the provider.\n */\n public host!: HTMLElement;\n\n /**\n * Automatically register components that have the `@RegisterComponent` decorator.\n * If this is set to false, you will need to manually register components using the\n * `registerComponent` method.\n * @default true\n */\n public automaticComponentRegistration: boolean = true;\n\n /**\n * A list of registered components that are listening for store changes.\n * Each component is registered with a unique id so that we can easily track the component\n * for various other operations (see `propStateRegistrations` and `eventListenerRegistrations`).\n */\n public registeredComponents: Record<ElementID, RegisteredComponent<any, any>> = {};\n\n /**\n * A list of registered components that are listening for store changes.\n * To make lookups more efficient, we use a Map of our prop registrations that we need to map to differnet\n * state keys. When a component is unregistered, we can use this map to remove the prop registration.\n */\n public propStateRegistrations: Map<StoreName<this['stores']>, Map<StateKey, PropStateRegistration[]>> = new Map();\n\n /**\n * A list of registered event listeners.\n * To make lookups more efficient, we use a Map of our event listeners that we need to map to differnet\n * nylas connector methods. When a component is unregistered, we can use this map to remove the event listener.\n */\n public eventListenerRegistrations: Map<ElementID, EventListenerRegistration[]> = new Map();\n\n /**\n * A list of event overrides that are used by the provider.\n * This is used to provide an easy way to override the default function of the event emitter.\n * An example of this is the `timeslotConfirmed` event. By default, this event will set the scheduler store state for `showBookingForm` to `true` which will\n * show the booking form. However, if you want to override this behavior, you can pass in the prop `eventOverride` like:\n * ```html\n * <nylas-scheduler eventOverride={{\"timeslotConfirmed\": (event, nylasConnector) => { console.log(\"Timeslot confirmed event fired!\"); } }} />\n * ```\n */\n public eventOverrides: EventOverride<Exclude<BaseNylasConnectorInterface, undefined>>;\n\n /**\n * The constructor for the AbstractNylasProvider.\n * @param host The host element (usually the HTMLElement of the provider)\n * @param stores A list of stores that are used by the provider\n * @param automaticComponentRegistration A boolean that determines if components should be automatically registered\n * @param eventOverrides A list of event overrides that are used by the provider\n */\n constructor(host: HTMLElement, stores: Stores, automaticComponentRegistration: boolean = true, eventOverrides: EventOverride<any>) {\n this.host = host;\n this.stores = stores;\n this.automaticComponentRegistration = automaticComponentRegistration;\n this.eventOverrides = eventOverrides;\n\n debug(`[${this.hostTagName}] Initializing (abstract) provider.`, { eventOverrides });\n\n this.registerComponent = this.registerComponent.bind(this);\n this.getStore = this.getStore.bind(this);\n\n // Init propStateRegistrations with store names\n Object.keys(this.stores).forEach(storeName => {\n this.propStateRegistrations.set(storeName, new Map());\n });\n }\n\n /**\n * This method is called before the component is loaded.\n * We're passing the NylasConnector instance to the provider so that we can\n * provide access to the NylasConnector instance to all components.\n *\n * However, because the NylasConnector is often constructed after the component's\n * constructor is called, set the NylasConnector instance here.\n * @param nylasConnector The NylasConnector instance\n */\n async componentWillLoad(nylasConnector: BaseNylasConnectorInterface) {\n debug(`[${this.hostTagName}] Will load`);\n\n // For each of our stores, configure the listeners for changes in the\n // store state.\n this.setupStoreListeners();\n\n // Set the NylasConnector instance\n this.nylasConnector = nylasConnector;\n\n /**\n * This is a very static way of registering components, but it happens fairly\n * early in the component lifecycle, so it can be beneficial to do it here.\n *\n * The big downside to this is that it will not pick up any components that\n * are dynamically added to the DOM after this method is called.\n *\n * So we should evaluate if this is the best way to register components.\n */\n const childComponents = Array.from(this.host.querySelectorAll('*')).filter(child => child.tagName.toLowerCase().startsWith('nylas-'));\n debug(`[${this.hostTagName}] Found ${childComponents.length} child component(s).`, { childComponents });\n\n const registrations = childComponents.map(async child => {\n const component = child as any; // It unfortunately makes life a whole lot easier to just cast this to any\n if (!component) {\n debug(`[~${this.hostTagName}] (componentWillLoad) Component ${component.tagName} does not have a name. Skipping.`);\n return;\n }\n\n // Skip components that don't have the `registerNylasComponent` prop\n if (!component.registerNylasComponent) {\n debug(`[~${this.hostTagName}] (componentWillLoad) Component ${component.tagName} is not a component that can be registered. Skipping.`, { component });\n return;\n }\n\n const registeredComponent: RegisteredComponent<any, any> = {\n element: component as HTMLStencilElement,\n name: component.tagName.toLowerCase(),\n getStoresToProp: component.getStoresToProp,\n storeToProps: component.storeToProps,\n stateToProps: component.stateToProps,\n authToProp: component.authToProp,\n eventToProps: component.eventToProps,\n connectorToProp: component.connectorToProp,\n localPropsToProp: component.localPropsToProp,\n };\n\n await this.registerComponent(registeredComponent);\n });\n\n await Promise.all(registrations);\n }\n\n /**\n * This method is called after the component is loaded.\n * We're using this method to add event listeners to the host element.\n */\n async componentDidLoad() {\n debug(`[~${this.hostTagName}] (componentDidLoad) Did load`);\n }\n\n /**\n * This method is called when the component is disconnected from the DOM.\n * We're using this method to dispose of the stores.\n */\n async componentDisconnected() {\n // Loop through each store and and dispose\n Object.values(this.stores).forEach(store => {\n store.dispose();\n });\n }\n\n /**\n * This is a custom event handler that is used to register a component with the provider.\n * It is used by components that have the `@RegisterComponent` decorator.\n * @param event A custom event that contains the component to register\n * @returns Promise<void>\n */\n async registerComponentHandler(event: CustomEvent<RegisteredComponent<any, any>>): Promise<void> {\n event.stopPropagation();\n\n if (!this.automaticComponentRegistration) {\n debug(`~[${this.hostTagName}] (registerComponentHandler) Automatic component registration disabled. Skipping registration of ${event.detail.name}.`);\n return;\n }\n\n await this.registerComponent(event.detail);\n }\n\n /**\n * This is a custom event handler that is used to unregister a component with the provider.\n * It is used by components that have the `@RegisterComponent` decorator.\n * @param event A custom event that contains the component to unregister\n * @returns Promise<void>\n */\n async unregisterComponentHandler(event: CustomEvent<RegisteredComponent<any, any>>): Promise<void> {\n event.stopPropagation();\n\n if (!this.automaticComponentRegistration) {\n debug(`~[${this.hostTagName}] (unregisterComponentHandler) Automatic component registration disabled. Skipping unregistration of ${event.detail.name}.`);\n return;\n }\n\n this.unregisterComponent(event.detail);\n }\n\n /**\n * This method is used to register a component with the provider\n * @param component component to register\n * @returns void\n */\n public async registerComponent(component: RegisteredComponent<any, any>): Promise<void> {\n debug(`~[${this.hostTagName}] (registerComponent) Registering component ${component.name}.`);\n\n // Get component element id\n const elementId = component.element.dataset.nylasId;\n const isReregistration = elementId && this.registeredComponents[elementId];\n\n // If this is a re-registration, clean up previous registrations first\n if (isReregistration) {\n debug(`[${this.hostTagName}] (registerComponent) Component ${component.name} already registered. Updating registration.`);\n // Clean up event listeners but keep the component ID\n this.cleanupComponentRegistration(elementId, false);\n } else {\n // Set a deterministic data id in tests, otherwise a random id\n const deterministicId = isTestEnvironment() ? this.computeDeterministicId(component.element as HTMLElement) : undefined;\n component.element.dataset.nylasId = elementId || deterministicId || uniqueID();\n }\n\n // Register/update the component to ensure the component is tracked even while waiting for definition\n const nylasId = component.element.dataset.nylasId;\n if (nylasId) {\n this.registeredComponents[nylasId] = component;\n }\n\n // Wait for the component to be defined in the custom elements registry before we attempt to\n // complete the component registration. While this means that the component will not be loaded with\n // props immediately, it does ensure that when we do set the props, the component is ready to receive them.\n debug(`[${this.hostTagName}] (registerComponent) Waiting for \"${component.element.localName}\" component to be defined`, { component });\n try {\n await customElements.whenDefined(component.element.tagName.toLowerCase());\n debug(`[${this.hostTagName}] (registerComponent) Component \"${component.element.localName}\" is now defined`);\n } catch (error) {\n debug(`[${this.hostTagName}] (registerComponent) Error waiting for component \"${component.element.localName}\" to be defined:`, error);\n // Continue with registration anyway, as the component might be defined later\n }\n\n const eventOverrides = this.eventOverrides;\n const { stateToProps, getStoresToProp, eventToProps, storeToProps, connectorToProp, localPropsToProp, element } = component;\n\n /**\n * We allow components to map an event to a prop. These events can automatically\n * call a method on the nylasConnector instance.\n */\n eventToProps?.forEach((customEventHandler, propKey) => {\n const nylasConnector = this.nylasConnector;\n const handler = async (event: CustomEvent<any>) => {\n debug(`[${this.hostTagName}] (registerComponent) Handling \"${component.name}\" prop \"${String(propKey)}\" event.`, { event });\n if (propKey in eventOverrides) {\n debug(`[${this.hostTagName}] (registerComponent) Found event override for \"${String(propKey)}\" event. Calling override.`);\n await eventOverrides[propKey](event, nylasConnector);\n }\n\n if (!event.defaultPrevented) {\n await customEventHandler(event, nylasConnector);\n }\n\n return;\n };\n\n const elementId = component.element.dataset.nylasId;\n\n if (elementId && !this.eventListenerRegistrations.has(elementId)) {\n this.eventListenerRegistrations.set(elementId, []);\n }\n\n if (elementId) {\n this.eventListenerRegistrations.get(elementId)?.push([element, propKey, handler]);\n }\n\n debug(`[${this.hostTagName}] (registerComponent) Setting \"${component.name}\" event \"${String(propKey)}\" to automcially call NylasConnector method.`);\n\n // We should immediately call the event handler to make sure the prop is set\n const eventName = formatEventName(propKey.toString());\n debug(`[${this.hostTagName}] (registerComponent) Adding event listener for \"${eventName}\" on \"${element.tagName}\"`);\n element.addEventListener(eventName, handler as unknown as EventListener);\n });\n\n /**\n * This is a rather simple way for us to set the initial props for a component.\n * For each prop, we check if the prop is mapped to a store. If it is, we set\n * the prop to the store value.\n */\n stateToProps?.forEach((propKey, stateKey) => {\n const [storeName, stateName] = stateKey.split('.');\n const store = this.getStore(storeName as keyof typeof this.stores);\n const stateValue = store.state[stateName as keyof typeof store.state];\n\n // Make sure this component was registered and has a nylasId\n if (!element.dataset.nylasId) {\n debug(`[${this.hostTagName}] (registerComponent) Component \"${component.name}\" not registered. Skipping.`, { component });\n return;\n }\n\n // We need to keep track of the store and prop key so that we can update the\n // prop when the store changes\n if (!this.propStateRegistrations.has(storeName as keyof typeof this.stores)) {\n this.propStateRegistrations.set(storeName as keyof typeof this.stores, new Map());\n }\n\n if (!this.propStateRegistrations.get(storeName as keyof typeof this.stores)?.has(stateName)) {\n this.propStateRegistrations.get(storeName as keyof typeof this.stores)?.set(stateName, [\n {\n elementId: element.dataset.nylasId,\n propKey,\n },\n ]);\n } else {\n this.propStateRegistrations\n .get(storeName as keyof typeof this.stores)\n ?.get(stateName)\n ?.push({\n elementId: element.dataset.nylasId,\n propKey,\n });\n }\n\n // Set the prop value on the component\n (element as { [key: string]: any })[propKey.toString()] = stateValue;\n debug(`[${this.hostTagName}] Setting \"${component.name}\" prop \"${propKey.toString()}\" to \"${stateKey}\" value.`, { stateValue });\n });\n\n /**\n * We allow components to also map props from the provider to the component.\n */\n localPropsToProp?.forEach((propKey, value) => {\n const mappedPropValue = this.host[value]; // TODO: Is this safe? We should find a way to only limit it to public properties and no methods.\n (element as { [key: string]: any })[propKey.toString()] = mappedPropValue;\n debug(`[${this.hostTagName}] Setting \"${component.name}\" prop \"${propKey.toString()}\" to the value of \"${value}\" value.`, { value, mappedPropValue });\n });\n\n /**\n * We allow components to access the getStore method directly.\n */\n if (getStoresToProp) {\n (element as { [key: string]: any })[getStoresToProp?.toString()] = this.getStore;\n debug(`[${this.hostTagName}] Setting \"${component.name}\" prop \"${getStoresToProp.toString()}\" to \"getStore\" method.`);\n }\n\n /**\n * We allow components to map a store to a prop for direct access.\n */\n storeToProps?.forEach((propKey, storeKey) => {\n const store = this.getStore(storeKey);\n (element as { [key: string]: any })[propKey.toString()] = store;\n debug(`[${this.hostTagName}] Setting \"${component.name}\" prop \"${propKey.toString()}\" to \"${storeKey}\" store.`, { store });\n });\n\n /**\n * We allow components to map the NylasConnector instance to a prop for direct access.\n */\n if (connectorToProp) {\n (element as { [key: string]: any })[connectorToProp?.toString()] = this.nylasConnector;\n debug(`[${this.hostTagName}] Setting \"${component.name}\" prop \"${connectorToProp.toString()}\" to \"nylasConnector\" value.`, { connectorToProp });\n }\n\n /**\n * We allow components to fire an event when they are registered.\n */\n if (typeof element.registerCallback === 'function') {\n debug(`[${this.hostTagName}] (registerComponent) Calling registerCallback method for \"${component.name}\".`);\n await element.registerCallback();\n }\n\n debug(`[${this.hostTagName}] (registerComponent) Component ${component.name} registered.`);\n }\n\n /**\n * Compute a deterministic nylas id for an element during tests.\n * Preference order:\n * - existing element id attribute\n * - existing element name attribute\n * - <tag>-<indexWithinHostOfSameTag>\n */\n private computeDeterministicId(element: HTMLElement): string {\n const idAttr = element.getAttribute('id');\n if (idAttr && idAttr.trim().length > 0) return idAttr.trim();\n\n const nameAttr = element.getAttribute('name');\n if (nameAttr && nameAttr.trim().length > 0) return nameAttr.trim();\n\n const tag = element.tagName.toLowerCase();\n try {\n const siblingsSameTag = Array.from(this.host?.querySelectorAll(tag) || []) as HTMLElement[];\n const idx = siblingsSameTag.indexOf(element);\n const indexOneBased = idx >= 0 ? idx + 1 : siblingsSameTag.length + 1;\n return `${tag}-${indexOneBased}`;\n } catch (_e) {\n return `${tag}-1`;\n }\n }\n\n /**\n * Cleans up registrations for a component without fully unregistering it\n * @param elementId The ID of the element to clean up\n * @param removeFromRegistry Whether to remove the component from the registry\n */\n private cleanupComponentRegistration(elementId: string, removeFromRegistry: boolean = true): void {\n // Remove event listeners\n const eventListenerRegistrations = this.eventListenerRegistrations.get(elementId);\n if (eventListenerRegistrations) {\n eventListenerRegistrations.forEach(([element, propKey, handler]) => {\n const eventName = formatEventName(propKey.toString());\n debug(`[${this.hostTagName}] (cleanupComponentRegistration) Removing event listener for \"${eventName}\" on \"${element.tagName}\"`);\n element.removeEventListener(eventName, handler as unknown as EventListener);\n });\n this.eventListenerRegistrations.delete(elementId);\n }\n\n // Clean up prop state registrations\n this.propStateRegistrations.forEach((stateToProps, storeName) => {\n stateToProps.forEach((props, stateKey) => {\n const filteredProps = props.filter(prop => prop.elementId !== elementId);\n if (filteredProps.length !== props.length) {\n this.propStateRegistrations.get(storeName)?.set(stateKey, filteredProps);\n }\n });\n });\n\n // Remove from registry if requested\n if (removeFromRegistry) {\n delete this.registeredComponents[elementId];\n }\n }\n\n /**\n * This is a method that is used to unregister a component with the provider.\n * @param component HTMLElement to unregister\n * @returns void\n */\n public unregisterComponent(component: RegisteredComponent<any, any>): void {\n debug(`[${this.hostTagName}] Unregistering component ${component.name}.`);\n\n // Get component element id\n const elementId = component.element.dataset.nylasId;\n if (!elementId) {\n debug(`[${this.hostTagName}] (unregisterComponent) Unregistering component ${component.name}.`);\n return;\n }\n\n // Make sure the component is not already registered\n if (this.registeredComponents[elementId]) {\n debug(`[${this.hostTagName}] (unregisterComponent) Component ${component.name} not registered. Skipping.`);\n return;\n }\n\n // Remove the component prop registration from propStateRegistrations\n this.propStateRegistrations.forEach((stateToProps, storeName) => {\n stateToProps.forEach((_, stateKey) => {\n const props = this.propStateRegistrations.get(storeName)?.get(stateKey);\n const filteredProps = props?.filter(prop => prop.elementId !== elementId);\n if (filteredProps) {\n this.propStateRegistrations.get(storeName)?.set(stateKey, filteredProps);\n }\n });\n });\n\n // Before we unregister the component, we need to remove any event listeners\n const eventListenerRegistrations = this.eventListenerRegistrations.get(elementId);\n eventListenerRegistrations?.forEach(([element, propKey, handler]) => {\n const eventName = formatEventName(propKey.toString());\n debug(`[${this.hostTagName}] (unregisterComponent) Removing event listener for \"${eventName}\" on \"${element.tagName}\"`);\n element.removeEventListener(eventName, handler as unknown as EventListener);\n });\n\n // Unregister the component\n delete this.registeredComponents[elementId];\n }\n\n /**\n * This method is used to dynamically retrieve the appropriate store\n * @param name store name\n */\n public getStore<K extends keyof Stores>(name: K): Stores[K] {\n const store = this.stores[name];\n if (!store) {\n throw new Error(`[${this.hostTagName}] Store \"${name.toString()}\" not found.`);\n }\n return store;\n }\n\n /**\n * This method is called when the component is connected to the DOM.\n * We're using this method to listen for changes in the store and update\n * the registered components with the new values.\n */\n private async setupStoreListeners() {\n const self = this;\n\n /**\n * This is a rather simple way for us to listen for changes in the store\n * and make sure our registered components are updated with the new values.\n *\n * For each store change, we loop through each registered component and\n * check if the store change is mapped to a prop on the component. If it is,\n * we set the prop to the new value.\n *\n * We call this super early in the provider lifecycle so that we can make sure\n * that all components have the correct props before they are rendered.\n */\n Object.entries(this.stores).forEach(([storeName, store]) => {\n debug(`[${self.hostTagName}] (setupStoreListeners) Listening for changes in \"${storeName}\" store.`);\n store.use({\n set(stateKey, newValue, oldValue) {\n debug(`[${self.hostTagName}] (setupStoreListeners) Store \"${storeName}\" state \"${stateKey.toString()}\" changed`, { newValue, oldValue });\n if (newValue === oldValue) {\n debug(`[${self.hostTagName}] (setupStoreListeners) Store \"${storeName}\" state \"${stateKey.toString()}\" unchanged. Skipping.`);\n return;\n }\n\n const registeredComponents = self.registeredComponents;\n if (!registeredComponents) {\n debug(`[${self.hostTagName}] (setupStoreListeners) No registered components found. Skipping.`);\n return;\n }\n\n // Get our prop registrations for this store\n const props = self.propStateRegistrations.get(storeName as keyof typeof self.stores as string)?.get(stateKey.toString()) || [];\n debug(`[${self.hostTagName}] (setupStoreListeners) Found ${props.length} prop(s) registered for \"${stateKey.toString()}\" store.`, {\n props,\n propStateRegistrations: self.propStateRegistrations,\n });\n\n // Loop through each registered component and update the prop\n props.forEach(({ elementId, propKey }) => {\n const component = registeredComponents[elementId];\n if (!component) {\n debug(`[${self.hostTagName}] (setupStoreListeners) Component \"${elementId}\" not found. Skipping.`, { component });\n return;\n }\n\n // Get the appropriate store\n const loadedStore = self.getStore(storeName as keyof typeof self.stores as string);\n const stateValue = loadedStore.state[stateKey as unknown as keyof typeof loadedStore.state];\n (component.element as { [key: string]: any })[propKey.toString()] = stateValue;\n debug(`[${self.hostTagName}] (setupStoreListeners) Setting \"${component.name}\" prop \"${propKey.toString()}\" to \"${stateKey.toString()}\" value.`, { stateValue });\n });\n },\n });\n });\n }\n\n /**\n * Simple getter for the host element tag name.\n */\n private get hostTagName(): string {\n return this.host?.tagName?.toLowerCase() ?? 'nylas-provider';\n }\n}\n\nexport class NylasBaseProvider<T extends Record<string, ObservableMap<any>>> extends NylasAbstractProvider<T> {}\n"],"names":[],"mappings":";;MA+BsB,qBAAqB,CAAA;AAkEzC,IAAA,WAAA,CAAY,IAAiB,EAAE,MAAc,EAAE,8BAA0C,GAAA,IAAI,EAAE,cAAkC,EAAA;QAzC1H,IAA8B,CAAA,8BAAA,GAAY,IAAI;QAO9C,IAAoB,CAAA,oBAAA,GAAqD,EAAE;AAO3E,QAAA,IAAA,CAAA,sBAAsB,GAA2E,IAAI,GAAG,EAAE;AAO1G,QAAA,IAAA,CAAA,0BAA0B,GAAgD,IAAI,GAAG,EAAE;AAqBxF,QAAA,IAAI,CAAC,IAAI,GAAG,IAAI;AAChB,QA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C;wBACjD,IAAI,CAAC,SAAS,EAAE;AACd,4BAAA,KAAK,CAAC,CAAA,CAAA,EAAI,IAAI,CAAC,WAAW,CAAA,mCAAA,EAAsC,SAAS,CAAA,sBAAA,CAAwB,EAAE,EAAE,SAAS,EAAE,CAAC;4BACjH;;wBAIF,MAAM,WAAW,GAAG,IAAI,CAAC,QAAQ,CAAC,SAA+C,CAAC;wBAClF,MAAM,UAAU,GAAG,WAAW,CAAC,KAAK,CAAC,QAAqD,CAAC;wBAC1F,SAAS,CAAC,OAAkC,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,GAAG,UAAU;wBAC9E,KAAK,CAAC,CAAI,CAAA,EAAA,IAAI,CAAC,WAAW,oCAAoC,SAAS,CAAC,IAAI,CAAA,QAAA,EAAW,OAAO,CAAC,QAAQ,EAAE,CAAA,MAAA,EAAS,QAAQ,CAAC,QAAQ,EAAE,CAAU,QAAA,CAAA,EAAE,EAAE,UAAU,EAAE,CAAC;AAClK,qBAAC,CAAC;iBACH;AACF,aAAA,CAAC;AACJ,SAAC,CAAC;;AAMJ,IAAA,IAAY,WAAW,GAAA;QACrB,OAAO,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,gBAAgB;;AAE/D;AAEK,MAAO,iBAAgE,SAAQ,qBAAwB,CAAA;AAAG;;;;"}
@@ -1,2 +1,2 @@
1
- import{r as e,h as s}from"./index-B-KMpdMZ.js";const c=".sc-add-circle-icon-h{display:flex}";const t=class{constructor(s){e(this,s);this.width="24";this.height="25"}render(){return s("svg",{key:"f2b1b56191422e3680fe93ecf3316de773d8eb93",width:this.width,height:this.height,fill:"none",xmlns:"http://www.w3.org/2000/svg"},s("path",{key:"9390b3cffd9e6ce0711b4be06f9036282bc4e932",d:"M12 2.5c5.523 0 10 4.477 10 10s-4.477 10-10 10-10-4.477-10-10 4.477-10 10-10ZM12 4a8.5 8.5 0 1 0 0 17 8.5 8.5 0 0 0 0-17Zm0 3.5a.75.75 0 0 1 .75.75v3.5h3.5a.75.75 0 0 1 0 1.5h-3.5v3.5a.75.75 0 0 1-1.5 0v-3.5h-3.5a.75.75 0 0 1 0-1.5h3.5v-3.5A.75.75 0 0 1 12 7.5Z",fill:"currentColor"}))}};t.style=c;export{t as add_circle_icon};
1
+ import{r as e,h as s}from"./index-Cbn5rIwb.js";const c=".sc-add-circle-icon-h{display:flex}";const t=class{constructor(s){e(this,s);this.width="24";this.height="25"}render(){return s("svg",{key:"f2b1b56191422e3680fe93ecf3316de773d8eb93",width:this.width,height:this.height,fill:"none",xmlns:"http://www.w3.org/2000/svg"},s("path",{key:"9390b3cffd9e6ce0711b4be06f9036282bc4e932",d:"M12 2.5c5.523 0 10 4.477 10 10s-4.477 10-10 10-10-4.477-10-10 4.477-10 10-10ZM12 4a8.5 8.5 0 1 0 0 17 8.5 8.5 0 0 0 0-17Zm0 3.5a.75.75 0 0 1 .75.75v3.5h3.5a.75.75 0 0 1 0 1.5h-3.5v3.5a.75.75 0 0 1-1.5 0v-3.5h-3.5a.75.75 0 0 1 0-1.5h3.5v-3.5A.75.75 0 0 1 12 7.5Z",fill:"currentColor"}))}};t.style=c;export{t as add_circle_icon};
2
2
  //# sourceMappingURL=add-circle-icon.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as t,h as e}from"./index-B-KMpdMZ.js";const a=".sc-archive-icon-h{display:flex}";const s=class{constructor(e){t(this,e);this.width="15";this.height="15"}render(){return e("svg",{key:"222c3e322fb86b832902f7e37e70c7dfa98917fe",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},e("path",{key:"5827caf5331d820aba2d479e8cd756d7c3f2a571",d:"M3 6H5H21",stroke:"auto","stroke-width":"1.5"}),e("path",{key:"f408c82adb6ccc0ea810ab351ef893d607bce460",d:"M8 6V4C8 3.46957 8.21071 2.96086 8.58579 2.58579C8.96086 2.21071 9.46957 2 10 2H14C14.5304 2 15.0391 2.21071 15.4142 2.58579C15.7893 2.96086 16 3.46957 16 4V6M19 6V20C19 20.5304 18.7893 21.0391 18.4142 21.4142C18.0391 21.7893 17.5304 22 17 22H7C6.46957 22 5.96086 21.7893 5.58579 21.4142C5.21071 21.0391 5 20.5304 5 20V6H19Z",stroke:"auto","stroke-width":"1.5"}),e("path",{key:"4f443768966abccd03a4ef153bf1302ce7134304",d:"M10 11V17",stroke:"auto","stroke-width":"1.5"}),e("path",{key:"d0f21a007943feb9a9526f8737344981df534b77",d:"M14 11V17",stroke:"auto","stroke-width":"1.5"}))}};s.style=a;export{s as archive_icon};
1
+ import{r as t,h as e}from"./index-Cbn5rIwb.js";const a=".sc-archive-icon-h{display:flex}";const s=class{constructor(e){t(this,e);this.width="15";this.height="15"}render(){return e("svg",{key:"222c3e322fb86b832902f7e37e70c7dfa98917fe",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},e("path",{key:"5827caf5331d820aba2d479e8cd756d7c3f2a571",d:"M3 6H5H21",stroke:"auto","stroke-width":"1.5"}),e("path",{key:"f408c82adb6ccc0ea810ab351ef893d607bce460",d:"M8 6V4C8 3.46957 8.21071 2.96086 8.58579 2.58579C8.96086 2.21071 9.46957 2 10 2H14C14.5304 2 15.0391 2.21071 15.4142 2.58579C15.7893 2.96086 16 3.46957 16 4V6M19 6V20C19 20.5304 18.7893 21.0391 18.4142 21.4142C18.0391 21.7893 17.5304 22 17 22H7C6.46957 22 5.96086 21.7893 5.58579 21.4142C5.21071 21.0391 5 20.5304 5 20V6H19Z",stroke:"auto","stroke-width":"1.5"}),e("path",{key:"4f443768966abccd03a4ef153bf1302ce7134304",d:"M10 11V17",stroke:"auto","stroke-width":"1.5"}),e("path",{key:"d0f21a007943feb9a9526f8737344981df534b77",d:"M14 11V17",stroke:"auto","stroke-width":"1.5"}))}};s.style=a;export{s as archive_icon};
2
2
  //# sourceMappingURL=archive-icon.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r,h as e}from"./index-B-KMpdMZ.js";const o=".sc-arrow-icon-h{display:flex}";const t=class{constructor(e){r(this,e);this.width="15";this.height="15"}render(){return e("svg",{key:"cf7a585e9ce59406a805120253934d22cca10bf4",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e("path",{key:"f623d958702ad8ffe3f9d0e047afcea7635fbd89",d:"M5 12H19M12 5L19 12L12 19",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))}};t.style=o;export{t as arrow_icon};
1
+ import{r,h as e}from"./index-Cbn5rIwb.js";const o=".sc-arrow-icon-h{display:flex}";const t=class{constructor(e){r(this,e);this.width="15";this.height="15"}render(){return e("svg",{key:"cf7a585e9ce59406a805120253934d22cca10bf4",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e("path",{key:"f623d958702ad8ffe3f9d0e047afcea7635fbd89",d:"M5 12H19M12 5L19 12L12 19",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))}};t.style=o;export{t as arrow_icon};
2
2
  //# sourceMappingURL=arrow-icon.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as o,h as t}from"./index-B-KMpdMZ.js";const s=".sc-bold-icon-h{display:flex}";const e=class{constructor(t){o(this,t);this.width="15";this.height="15"}render(){return t("svg",{key:"0c56804c143cfd02f45fa5f3cd81133fa88a6ad3",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{key:"08391df84a040397e8ef6b6ba2510199bd23d7c7",d:"M6 4V20M9.5 4H15.5C17.7091 4 19.5 5.79086 19.5 8C19.5 10.2091 17.7091 12 15.5 12H9.5H16.5C18.7091 12 20.5 13.7909 20.5 16C20.5 18.2091 18.7091 20 16.5 20H9.5M9.5 4V20M9.5 4H4M9.5 20H4",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))}};e.style=s;export{e as bold_icon};
1
+ import{r as o,h as t}from"./index-Cbn5rIwb.js";const s=".sc-bold-icon-h{display:flex}";const r=class{constructor(t){o(this,t);this.width="15";this.height="15"}render(){return t("svg",{key:"0c56804c143cfd02f45fa5f3cd81133fa88a6ad3",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{key:"08391df84a040397e8ef6b6ba2510199bd23d7c7",d:"M6 4V20M9.5 4H15.5C17.7091 4 19.5 5.79086 19.5 8C19.5 10.2091 17.7091 12 15.5 12H9.5H16.5C18.7091 12 20.5 13.7909 20.5 16C20.5 18.2091 18.7091 20 16.5 20H9.5M9.5 4V20M9.5 4H4M9.5 20H4",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))}};r.style=s;export{r as bold_icon};
2
2
  //# sourceMappingURL=bold-icon.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as t,h as o}from"./index-B-KMpdMZ.js";const n="button.sc-button-component{display:flex;align-items:center;justify-content:center;gap:0.75rem;height:48px;border:none;border-radius:var(--nylas-border-radius-2x);font-size:16px;line-height:24px;padding:0 1rem;cursor:pointer;font-family:var(--nylas-font-family);font-weight:600;width:100%}@media screen and (max-width: 768px){button.sc-button-component{width:100%}}button.button-primary.sc-button-component{background:var(--nylas-primary);color:var(--nylas-base-0);height:48px;border:none;border-radius:var(--nylas-border-radius-2x);font-size:16px;line-height:24px;padding:0 1rem;cursor:pointer}button.button-primary.sc-button-component:hover{background:var(--nylas-base-600)}button.button-primary.sc-button-component:active{background:var(--nylas-base-800)}button.button-primary.sc-button-component:disabled{background:var(--nylas-base-300);cursor:not-allowed}button.button-basic.sc-button-component{border:1px solid var(--nylas-base-300);color:var(--nylas-base-700);background:transparent}button.button-basic.sc-button-component:hover{background:transparent;border-color:var(--nylas-primary)}button.button-basic.sc-button-component:active{background:transparent;border-color:var(--nylas-base-600);border-width:2px}button.button-basic.sc-button-component:disabled{background:transparent;border-color:var(--nylas-base-300);color:var(--nylas-base-300);cursor:not-allowed}button.button-destructive.sc-button-component{border:1px solid var(--nylas-base-300);color:var(--nylas-error);background:transparent}button.button-destructive.sc-button-component:hover{background:transparent;border-color:var(--nylas-error)}button.button-destructive.sc-button-component:active{background:transparent;border-color:var(--nylas-error-pressed);border-width:2px;color:var(--nylas-error-pressed)}button.button-destructive.sc-button-component:disabled{background:transparent;border-color:var(--nylas-base-300);color:var(--nylas-base-300);cursor:not-allowed}button.button-invisible.sc-button-component{background:transparent;color:var(--nylas-base-800);border:none}button.button-invisible.sc-button-component:hover{background:var(--nylas-base-50);color:var(--nylas-primary)}button.button-invisible.sc-button-component:active{background:var(--nylas-base-50);color:var(--nylas-base-850)}button.button-invisible.sc-button-component:disabled{background:transparent;color:var(--nylas-base-300);cursor:not-allowed}";const r=class{constructor(o){t(this,o);this.variant="primary";this.disabled=false;this.type="button";this.tooltip="";this.isLoading=false}render(){const t=`button-${this.variant}`+(this.disabled?" disabled":"");return o("button",{key:"730c431ee1cd1af6322b7bd2a5951a064184a30b",class:t,disabled:this.disabled,type:"type",title:this.tooltip,onClick:this.clickHandler,onMouseOver:this.mouseOverHandler,onMouseOut:this.mouseOutHandler,onFocus:this.focusHandler,onBlur:this.blurHandler},!!this.isLoading&&o("loading-icon",{key:"382263a3b9fa60446bb3cd2b41b02eb03d58890a",slot:"icon"}),o("slot",{key:"44aa6431d2d8d5cc2157da85ea81505bbf75d0e1"}))}};r.style=n;export{r as button_component};
1
+ import{r as t,h as o}from"./index-Cbn5rIwb.js";const n="button.sc-button-component{display:flex;align-items:center;justify-content:center;gap:0.75rem;height:48px;border:none;border-radius:var(--nylas-border-radius-2x);font-size:16px;line-height:24px;padding:0 1rem;cursor:pointer;font-family:var(--nylas-font-family);font-weight:600;width:100%}@media screen and (max-width: 768px){button.sc-button-component{width:100%}}button.button-primary.sc-button-component{background:var(--nylas-primary);color:var(--nylas-base-0);height:48px;border:none;border-radius:var(--nylas-border-radius-2x);font-size:16px;line-height:24px;padding:0 1rem;cursor:pointer}button.button-primary.sc-button-component:hover{background:var(--nylas-base-600)}button.button-primary.sc-button-component:active{background:var(--nylas-base-800)}button.button-primary.sc-button-component:disabled{background:var(--nylas-base-300);cursor:not-allowed}button.button-basic.sc-button-component{border:1px solid var(--nylas-base-300);color:var(--nylas-base-700);background:transparent}button.button-basic.sc-button-component:hover{background:transparent;border-color:var(--nylas-primary)}button.button-basic.sc-button-component:active{background:transparent;border-color:var(--nylas-base-600);border-width:2px}button.button-basic.sc-button-component:disabled{background:transparent;border-color:var(--nylas-base-300);color:var(--nylas-base-300);cursor:not-allowed}button.button-destructive.sc-button-component{border:1px solid var(--nylas-base-300);color:var(--nylas-error);background:transparent}button.button-destructive.sc-button-component:hover{background:transparent;border-color:var(--nylas-error)}button.button-destructive.sc-button-component:active{background:transparent;border-color:var(--nylas-error-pressed);border-width:2px;color:var(--nylas-error-pressed)}button.button-destructive.sc-button-component:disabled{background:transparent;border-color:var(--nylas-base-300);color:var(--nylas-base-300);cursor:not-allowed}button.button-invisible.sc-button-component{background:transparent;color:var(--nylas-base-800);border:none}button.button-invisible.sc-button-component:hover{background:var(--nylas-base-50);color:var(--nylas-primary)}button.button-invisible.sc-button-component:active{background:var(--nylas-base-50);color:var(--nylas-base-850)}button.button-invisible.sc-button-component:disabled{background:transparent;color:var(--nylas-base-300);cursor:not-allowed}";const r=class{constructor(o){t(this,o);this.variant="primary";this.disabled=false;this.type="button";this.tooltip="";this.isLoading=false}render(){const t=`button-${this.variant}`+(this.disabled?" disabled":"");return o("button",{key:"730c431ee1cd1af6322b7bd2a5951a064184a30b",class:t,disabled:this.disabled,type:"type",title:this.tooltip,onClick:this.clickHandler,onMouseOver:this.mouseOverHandler,onMouseOut:this.mouseOutHandler,onFocus:this.focusHandler,onBlur:this.blurHandler},!!this.isLoading&&o("loading-icon",{key:"382263a3b9fa60446bb3cd2b41b02eb03d58890a",slot:"icon"}),o("slot",{key:"44aa6431d2d8d5cc2157da85ea81505bbf75d0e1"}))}};r.style=n;export{r as button_component};
2
2
  //# sourceMappingURL=button-component.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as e,h as a}from"./index-B-KMpdMZ.js";const s=".sc-calendar-agenda-fill-icon-h{display:flex}";const t=class{constructor(a){e(this,a);this.width="20";this.height="20"}render(){return a("svg",{key:"6a1edcaaecf5e1771a1d0b0dc6004a82e68fe33e",width:this.width,height:this.height,fill:"none",xmlns:"http://www.w3.org/2000/svg"},a("path",{key:"1ae7bee3492aeb51dc17033df576af597f5dc58d",d:"M14 11.5C14 12.8807 12.8807 14 11.5 14H2.5C1.11929 14 0 12.8807 0 11.5V2.5C0 1.11929 1.11929 0 2.5 0H11.5C12.8807 0 14 1.11929 14 2.5V11.5ZM11 3.5C11 3.25454 10.8231 3.05039 10.5899 3.00806L10.5 3H3.5L3.41012 3.00806C3.17688 3.05039 3 3.25454 3 3.5C3 3.74546 3.17688 3.94961 3.41012 3.99194L3.5 4H10.5L10.5899 3.99194C10.8231 3.94961 11 3.74546 11 3.5ZM11 7C11 6.75454 10.8231 6.55039 10.5899 6.50806L10.5 6.5H3.5L3.41012 6.50806C3.17688 6.55039 3 6.75454 3 7C3 7.24546 3.17688 7.44961 3.41012 7.49194L3.5 7.5H10.5L10.5899 7.49194C10.8231 7.44961 11 7.24546 11 7ZM11 10.5C11 10.2545 10.8231 10.0504 10.5899 10.0081L10.5 10H3.5L3.41012 10.0081C3.17688 10.0504 3 10.2545 3 10.5C3 10.7455 3.17688 10.9496 3.41012 10.9919L3.5 11H10.5L10.5899 10.9919C10.8231 10.9496 11 10.7455 11 10.5Z",fill:"currentColor"}))}};t.style=s;export{t as calendar_agenda_fill_icon};
1
+ import{r as e,h as a}from"./index-Cbn5rIwb.js";const s=".sc-calendar-agenda-fill-icon-h{display:flex}";const t=class{constructor(a){e(this,a);this.width="20";this.height="20"}render(){return a("svg",{key:"6a1edcaaecf5e1771a1d0b0dc6004a82e68fe33e",width:this.width,height:this.height,fill:"none",xmlns:"http://www.w3.org/2000/svg"},a("path",{key:"1ae7bee3492aeb51dc17033df576af597f5dc58d",d:"M14 11.5C14 12.8807 12.8807 14 11.5 14H2.5C1.11929 14 0 12.8807 0 11.5V2.5C0 1.11929 1.11929 0 2.5 0H11.5C12.8807 0 14 1.11929 14 2.5V11.5ZM11 3.5C11 3.25454 10.8231 3.05039 10.5899 3.00806L10.5 3H3.5L3.41012 3.00806C3.17688 3.05039 3 3.25454 3 3.5C3 3.74546 3.17688 3.94961 3.41012 3.99194L3.5 4H10.5L10.5899 3.99194C10.8231 3.94961 11 3.74546 11 3.5ZM11 7C11 6.75454 10.8231 6.55039 10.5899 6.50806L10.5 6.5H3.5L3.41012 6.50806C3.17688 6.55039 3 6.75454 3 7C3 7.24546 3.17688 7.44961 3.41012 7.49194L3.5 7.5H10.5L10.5899 7.49194C10.8231 7.44961 11 7.24546 11 7ZM11 10.5C11 10.2545 10.8231 10.0504 10.5899 10.0081L10.5 10H3.5L3.41012 10.0081C3.17688 10.0504 3 10.2545 3 10.5C3 10.7455 3.17688 10.9496 3.41012 10.9919L3.5 11H10.5L10.5899 10.9919C10.8231 10.9496 11 10.7455 11 10.5Z",fill:"currentColor"}))}};t.style=s;export{t as calendar_agenda_fill_icon};
2
2
  //# sourceMappingURL=calendar-agenda-fill-icon.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as C,h as a}from"./index-B-KMpdMZ.js";const e=".sc-calendar-agenda-icon-h{display:flex}";const s=class{constructor(a){C(this,a);this.width="20";this.height="20"}render(){return a("svg",{key:"5f92a884b7143837c443caf5b0c8cff48195621b",width:this.width,height:this.height,fill:"none",xmlns:"http://www.w3.org/2000/svg"},a("path",{key:"73013b04e77abf79508a2dfbe4e5f5a68b29c47d",d:"M14 11.5C14 12.8807 12.8807 14 11.5 14H2.5C1.11929 14 0 12.8807 0 11.5V2.5C0 1.11929 1.11929 0 2.5 0H11.5C12.8807 0 14 1.11929 14 2.5V11.5ZM13 11.5V2.5C13 1.67157 12.3284 1 11.5 1H2.5C1.67157 1 1 1.67157 1 2.5V11.5C1 12.3284 1.67157 13 2.5 13H11.5C12.3284 13 13 12.3284 13 11.5ZM11 3.5C11 3.74546 10.8231 3.94961 10.5899 3.99194L10.5 4H3.5C3.22386 4 3 3.77614 3 3.5C3 3.25454 3.17688 3.05039 3.41012 3.00806L3.5 3H10.5C10.7761 3 11 3.22386 11 3.5ZM11 7C11 7.24546 10.8231 7.44961 10.5899 7.49194L10.5 7.5H3.5C3.22386 7.5 3 7.27614 3 7C3 6.75454 3.17688 6.55039 3.41012 6.50806L3.5 6.5H10.5C10.7761 6.5 11 6.72386 11 7ZM11 10.5C11 10.7455 10.8231 10.9496 10.5899 10.9919L10.5 11H3.5C3.22386 11 3 10.7761 3 10.5C3 10.2545 3.17688 10.0504 3.41012 10.0081L3.5 10H10.5C10.7761 10 11 10.2239 11 10.5Z",fill:"currentColor"}))}};s.style=e;export{s as calendar_agenda_icon};
1
+ import{r as C,h as a}from"./index-Cbn5rIwb.js";const e=".sc-calendar-agenda-icon-h{display:flex}";const s=class{constructor(a){C(this,a);this.width="20";this.height="20"}render(){return a("svg",{key:"5f92a884b7143837c443caf5b0c8cff48195621b",width:this.width,height:this.height,fill:"none",xmlns:"http://www.w3.org/2000/svg"},a("path",{key:"73013b04e77abf79508a2dfbe4e5f5a68b29c47d",d:"M14 11.5C14 12.8807 12.8807 14 11.5 14H2.5C1.11929 14 0 12.8807 0 11.5V2.5C0 1.11929 1.11929 0 2.5 0H11.5C12.8807 0 14 1.11929 14 2.5V11.5ZM13 11.5V2.5C13 1.67157 12.3284 1 11.5 1H2.5C1.67157 1 1 1.67157 1 2.5V11.5C1 12.3284 1.67157 13 2.5 13H11.5C12.3284 13 13 12.3284 13 11.5ZM11 3.5C11 3.74546 10.8231 3.94961 10.5899 3.99194L10.5 4H3.5C3.22386 4 3 3.77614 3 3.5C3 3.25454 3.17688 3.05039 3.41012 3.00806L3.5 3H10.5C10.7761 3 11 3.22386 11 3.5ZM11 7C11 7.24546 10.8231 7.44961 10.5899 7.49194L10.5 7.5H3.5C3.22386 7.5 3 7.27614 3 7C3 6.75454 3.17688 6.55039 3.41012 6.50806L3.5 6.5H10.5C10.7761 6.5 11 6.72386 11 7ZM11 10.5C11 10.7455 10.8231 10.9496 10.5899 10.9919L10.5 11H3.5C3.22386 11 3 10.7761 3 10.5C3 10.2545 3.17688 10.0504 3.41012 10.0081L3.5 10H10.5C10.7761 10 11 10.2239 11 10.5Z",fill:"currentColor"}))}};s.style=e;export{s as calendar_agenda_icon};
2
2
  //# sourceMappingURL=calendar-agenda-icon.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as a,h as e}from"./index-B-KMpdMZ.js";const c=".sc-calendar-cancel-icon-h{display:flex}";const l=class{constructor(e){a(this,e);this.width="20";this.height="20"}render(){return e("svg",{key:"491e7fdef77a7e35a2a88cfcd4f3345b8d1959eb",width:this.width,height:this.height,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e("path",{key:"727fecd2bdbd113b5fbca00306694b1fa17e8344",d:"M14.5 9a5.5 5.5 0 1 1 0 11 5.5 5.5 0 0 1 0-11Zm-2.476 3.024a.5.5 0 0 0 0 .707l1.769 1.77-1.767 1.766a.5.5 0 1 0 .707.708l1.767-1.767 1.77 1.769a.5.5 0 1 0 .707-.707L15.208 14.5l1.771-1.77a.5.5 0 0 0-.707-.707l-1.771 1.77-1.77-1.77a.5.5 0 0 0-.707 0ZM14.75 0A3.25 3.25 0 0 1 18 3.25l.001 5.773a6.47 6.47 0 0 0-1.5-.71L16.5 5.5h-15v9.25c0 .966.784 1.75 1.75 1.75h5.064a6.47 6.47 0 0 0 .709 1.501L3.25 18A3.25 3.25 0 0 1 0 14.75V3.25A3.25 3.25 0 0 1 3.25 0h11.5Zm0 1.5H3.25A1.75 1.75 0 0 0 1.5 3.25V4h15v-.75a1.75 1.75 0 0 0-1.75-1.75Z",fill:"currentColor"}))}};l.style=c;export{l as calendar_cancel_icon};
1
+ import{r as a,h as e}from"./index-Cbn5rIwb.js";const c=".sc-calendar-cancel-icon-h{display:flex}";const l=class{constructor(e){a(this,e);this.width="20";this.height="20"}render(){return e("svg",{key:"491e7fdef77a7e35a2a88cfcd4f3345b8d1959eb",width:this.width,height:this.height,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e("path",{key:"727fecd2bdbd113b5fbca00306694b1fa17e8344",d:"M14.5 9a5.5 5.5 0 1 1 0 11 5.5 5.5 0 0 1 0-11Zm-2.476 3.024a.5.5 0 0 0 0 .707l1.769 1.77-1.767 1.766a.5.5 0 1 0 .707.708l1.767-1.767 1.77 1.769a.5.5 0 1 0 .707-.707L15.208 14.5l1.771-1.77a.5.5 0 0 0-.707-.707l-1.771 1.77-1.77-1.77a.5.5 0 0 0-.707 0ZM14.75 0A3.25 3.25 0 0 1 18 3.25l.001 5.773a6.47 6.47 0 0 0-1.5-.71L16.5 5.5h-15v9.25c0 .966.784 1.75 1.75 1.75h5.064a6.47 6.47 0 0 0 .709 1.501L3.25 18A3.25 3.25 0 0 1 0 14.75V3.25A3.25 3.25 0 0 1 3.25 0h11.5Zm0 1.5H3.25A1.75 1.75 0 0 0 1.5 3.25V4h15v-.75a1.75 1.75 0 0 0-1.75-1.75Z",fill:"currentColor"}))}};l.style=c;export{l as calendar_cancel_icon};
2
2
  //# sourceMappingURL=calendar-cancel-icon.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as c,h as s}from"./index-B-KMpdMZ.js";const t=".sc-calendar-check-icon-h{display:flex}";const C=class{constructor(s){c(this,s);this.width="20";this.height="20"}render(){return s("svg",{key:"bcf5b06f13309c6729ef76d837be195f3896443c",width:this.width,height:this.height,fill:"none",xmlns:"http://www.w3.org/2000/svg"},s("path",{key:"0c99246769083c6f0d5bdf8a2640588500ff4180",fill:"currentColor",d:"M14.75 0C16.5449 0 18 1.45507 18 3.25V9.02182C17.5368 8.72526 17.0335 8.48584 16.5 8.3135V5.5H1.5V14.75C1.5 15.7165 2.2835 16.5 3.25 16.5H8.3135C8.48584 17.0335 8.72526 17.5368 9.02182 18H3.25C1.45507 18 0 16.5449 0 14.75V3.25C0 1.45507 1.45507 0 3.25 0H14.75ZM14.75 1.5H3.25C2.2835 1.5 1.5 2.2835 1.5 3.25V4H16.5V3.25C16.5 2.2835 15.7165 1.5 14.75 1.5ZM20 14.5C20 17.5376 17.5376 20 14.5 20C11.4624 20 9 17.5376 9 14.5C9 11.4624 11.4624 9 14.5 9C17.5376 9 20 11.4624 20 14.5ZM17.8536 12.1464C17.6583 11.9512 17.3417 11.9512 17.1464 12.1464L13.5 15.7929L11.8536 14.1464C11.6583 13.9512 11.3417 13.9512 11.1464 14.1464C10.9512 14.3417 10.9512 14.6583 11.1464 14.8536L13.1464 16.8536C13.3417 17.0488 13.6583 17.0488 13.8536 16.8536L17.8536 12.8536C18.0488 12.6583 18.0488 12.3417 17.8536 12.1464Z"}))}};C.style=t;export{C as calendar_check_icon};
1
+ import{r as c,h as C}from"./index-Cbn5rIwb.js";const s=".sc-calendar-check-icon-h{display:flex}";const t=class{constructor(C){c(this,C);this.width="20";this.height="20"}render(){return C("svg",{key:"bcf5b06f13309c6729ef76d837be195f3896443c",width:this.width,height:this.height,fill:"none",xmlns:"http://www.w3.org/2000/svg"},C("path",{key:"0c99246769083c6f0d5bdf8a2640588500ff4180",fill:"currentColor",d:"M14.75 0C16.5449 0 18 1.45507 18 3.25V9.02182C17.5368 8.72526 17.0335 8.48584 16.5 8.3135V5.5H1.5V14.75C1.5 15.7165 2.2835 16.5 3.25 16.5H8.3135C8.48584 17.0335 8.72526 17.5368 9.02182 18H3.25C1.45507 18 0 16.5449 0 14.75V3.25C0 1.45507 1.45507 0 3.25 0H14.75ZM14.75 1.5H3.25C2.2835 1.5 1.5 2.2835 1.5 3.25V4H16.5V3.25C16.5 2.2835 15.7165 1.5 14.75 1.5ZM20 14.5C20 17.5376 17.5376 20 14.5 20C11.4624 20 9 17.5376 9 14.5C9 11.4624 11.4624 9 14.5 9C17.5376 9 20 11.4624 20 14.5ZM17.8536 12.1464C17.6583 11.9512 17.3417 11.9512 17.1464 12.1464L13.5 15.7929L11.8536 14.1464C11.6583 13.9512 11.3417 13.9512 11.1464 14.1464C10.9512 14.3417 10.9512 14.6583 11.1464 14.8536L13.1464 16.8536C13.3417 17.0488 13.6583 17.0488 13.8536 16.8536L17.8536 12.8536C18.0488 12.6583 18.0488 12.3417 17.8536 12.1464Z"}))}};t.style=s;export{t as calendar_check_icon};
2
2
  //# sourceMappingURL=calendar-check-icon.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as C,h as e}from"./index-B-KMpdMZ.js";const s=".sc-calendar-icon-h{display:flex}";const t=class{constructor(e){C(this,e);this.width="15";this.height="15"}render(){return e("svg",{key:"6824674f7c303359097daa2768e05b90047eca96",width:this.width,height:this.height,fill:"none",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg"},e("path",{key:"1e13652245479f446d92c62e84f33f78c0405584",fill:"currentColor",d:"M14.3073 0.692383C15.9641 0.692383 17.3073 2.03553 17.3073 3.69238V14.3078C17.3073 15.9646 15.9641 17.3078 14.3073 17.3078H3.6919C2.03504 17.3078 0.691895 15.9646 0.691895 14.3078V3.69238C0.691895 2.03553 2.03504 0.692383 3.6919 0.692383H14.3073ZM15.9227 5.76931H2.07651V14.3078C2.07651 15.1999 2.79974 15.9232 3.6919 15.9232H14.3073C15.1994 15.9232 15.9227 15.1999 15.9227 14.3078V5.76931ZM5.07651 11.3078C5.71376 11.3078 6.23036 11.8244 6.23036 12.4616C6.23036 13.0989 5.71376 13.6155 5.07651 13.6155C4.43926 13.6155 3.92266 13.0989 3.92266 12.4616C3.92266 11.8244 4.43926 11.3078 5.07651 11.3078ZM8.99959 11.3078C9.63684 11.3078 10.1534 11.8244 10.1534 12.4616C10.1534 13.0989 9.63684 13.6155 8.99959 13.6155C8.36234 13.6155 7.84574 13.0989 7.84574 12.4616C7.84574 11.8244 8.36234 11.3078 8.99959 11.3078ZM5.07651 7.61546C5.71376 7.61546 6.23036 8.13206 6.23036 8.76931C6.23036 9.40656 5.71376 9.92315 5.07651 9.92315C4.43926 9.92315 3.92266 9.40656 3.92266 8.76931C3.92266 8.13206 4.43926 7.61546 5.07651 7.61546ZM8.99959 7.61546C9.63684 7.61546 10.1534 8.13206 10.1534 8.76931C10.1534 9.40656 9.63684 9.92315 8.99959 9.92315C8.36234 9.92315 7.84574 9.40656 7.84574 8.76931C7.84574 8.13206 8.36234 7.61546 8.99959 7.61546ZM12.9227 7.61546C13.5599 7.61546 14.0765 8.13206 14.0765 8.76931C14.0765 9.40656 13.5599 9.92315 12.9227 9.92315C12.2854 9.92315 11.7688 9.40656 11.7688 8.76931C11.7688 8.13206 12.2854 7.61546 12.9227 7.61546ZM14.3073 2.077H3.6919C2.79974 2.077 2.07651 2.80023 2.07651 3.69238V4.38469H15.9227V3.69238C15.9227 2.80023 15.1994 2.077 14.3073 2.077Z"}))}};t.style=s;export{t as calendar_icon};
1
+ import{r as C,h as e}from"./index-Cbn5rIwb.js";const s=".sc-calendar-icon-h{display:flex}";const t=class{constructor(e){C(this,e);this.width="15";this.height="15"}render(){return e("svg",{key:"6824674f7c303359097daa2768e05b90047eca96",width:this.width,height:this.height,fill:"none",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg"},e("path",{key:"1e13652245479f446d92c62e84f33f78c0405584",fill:"currentColor",d:"M14.3073 0.692383C15.9641 0.692383 17.3073 2.03553 17.3073 3.69238V14.3078C17.3073 15.9646 15.9641 17.3078 14.3073 17.3078H3.6919C2.03504 17.3078 0.691895 15.9646 0.691895 14.3078V3.69238C0.691895 2.03553 2.03504 0.692383 3.6919 0.692383H14.3073ZM15.9227 5.76931H2.07651V14.3078C2.07651 15.1999 2.79974 15.9232 3.6919 15.9232H14.3073C15.1994 15.9232 15.9227 15.1999 15.9227 14.3078V5.76931ZM5.07651 11.3078C5.71376 11.3078 6.23036 11.8244 6.23036 12.4616C6.23036 13.0989 5.71376 13.6155 5.07651 13.6155C4.43926 13.6155 3.92266 13.0989 3.92266 12.4616C3.92266 11.8244 4.43926 11.3078 5.07651 11.3078ZM8.99959 11.3078C9.63684 11.3078 10.1534 11.8244 10.1534 12.4616C10.1534 13.0989 9.63684 13.6155 8.99959 13.6155C8.36234 13.6155 7.84574 13.0989 7.84574 12.4616C7.84574 11.8244 8.36234 11.3078 8.99959 11.3078ZM5.07651 7.61546C5.71376 7.61546 6.23036 8.13206 6.23036 8.76931C6.23036 9.40656 5.71376 9.92315 5.07651 9.92315C4.43926 9.92315 3.92266 9.40656 3.92266 8.76931C3.92266 8.13206 4.43926 7.61546 5.07651 7.61546ZM8.99959 7.61546C9.63684 7.61546 10.1534 8.13206 10.1534 8.76931C10.1534 9.40656 9.63684 9.92315 8.99959 9.92315C8.36234 9.92315 7.84574 9.40656 7.84574 8.76931C7.84574 8.13206 8.36234 7.61546 8.99959 7.61546ZM12.9227 7.61546C13.5599 7.61546 14.0765 8.13206 14.0765 8.76931C14.0765 9.40656 13.5599 9.92315 12.9227 9.92315C12.2854 9.92315 11.7688 9.40656 11.7688 8.76931C11.7688 8.13206 12.2854 7.61546 12.9227 7.61546ZM14.3073 2.077H3.6919C2.79974 2.077 2.07651 2.80023 2.07651 3.69238V4.38469H15.9227V3.69238C15.9227 2.80023 15.1994 2.077 14.3073 2.077Z"}))}};t.style=s;export{t as calendar_icon};
2
2
  //# sourceMappingURL=calendar-icon.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as C,h as e}from"./index-B-KMpdMZ.js";const s=".sc-calendar-info-icon-h{display:flex}";const t=class{constructor(e){C(this,e);this.width="20";this.height="20"}render(){return e("svg",{key:"9536747b69bcb1a1ff572172fa935e618d2d56e7",width:this.width,height:this.height,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e("path",{key:"ceaf3c3163187b43e5182d6e2e964eff1fb2da43",d:"M12 0C13.3807 0 14.5 1.11929 14.5 2.5V6.59971C14.1832 6.43777 13.8486 6.30564 13.5 6.20703V4H1.5V11.5C1.5 12.3284 2.17157 13 3 13H6.70703C6.80564 13.3486 6.93777 13.6832 7.09971 14H3C1.61929 14 0.5 12.8807 0.5 11.5V2.5C0.5 1.11929 1.61929 0 3 0H12ZM12 1H3C2.17157 1 1.5 1.67157 1.5 2.5V3H13.5V2.5C13.5 1.67157 12.8284 1 12 1ZM11.375 9.5C11.375 9.15482 11.6548 8.875 12 8.875C12.3452 8.875 12.625 9.15482 12.625 9.5C12.625 9.84518 12.3452 10.125 12 10.125C11.6548 10.125 11.375 9.84518 11.375 9.5ZM12.5 13.5C12.5 13.7761 12.2761 14 12 14C11.7239 14 11.5 13.7761 11.5 13.5V11.5C11.5 11.2239 11.7239 11 12 11C12.2761 11 12.5 11.2239 12.5 11.5V13.5ZM7.5 11.5C7.5 9.01472 9.51472 7 12 7C14.4853 7 16.5 9.01472 16.5 11.5C16.5 13.9853 14.4853 16 12 16C9.51472 16 7.5 13.9853 7.5 11.5ZM8.5 11.5C8.5 13.433 10.067 15 12 15C13.933 15 15.5 13.433 15.5 11.5C15.5 9.567 13.933 8 12 8C10.067 8 8.5 9.567 8.5 11.5Z",fill:"currentColor"}))}};t.style=s;export{t as calendar_info_icon};
1
+ import{r as C,h as e}from"./index-Cbn5rIwb.js";const s=".sc-calendar-info-icon-h{display:flex}";const t=class{constructor(e){C(this,e);this.width="20";this.height="20"}render(){return e("svg",{key:"9536747b69bcb1a1ff572172fa935e618d2d56e7",width:this.width,height:this.height,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e("path",{key:"ceaf3c3163187b43e5182d6e2e964eff1fb2da43",d:"M12 0C13.3807 0 14.5 1.11929 14.5 2.5V6.59971C14.1832 6.43777 13.8486 6.30564 13.5 6.20703V4H1.5V11.5C1.5 12.3284 2.17157 13 3 13H6.70703C6.80564 13.3486 6.93777 13.6832 7.09971 14H3C1.61929 14 0.5 12.8807 0.5 11.5V2.5C0.5 1.11929 1.61929 0 3 0H12ZM12 1H3C2.17157 1 1.5 1.67157 1.5 2.5V3H13.5V2.5C13.5 1.67157 12.8284 1 12 1ZM11.375 9.5C11.375 9.15482 11.6548 8.875 12 8.875C12.3452 8.875 12.625 9.15482 12.625 9.5C12.625 9.84518 12.3452 10.125 12 10.125C11.6548 10.125 11.375 9.84518 11.375 9.5ZM12.5 13.5C12.5 13.7761 12.2761 14 12 14C11.7239 14 11.5 13.7761 11.5 13.5V11.5C11.5 11.2239 11.7239 11 12 11C12.2761 11 12.5 11.2239 12.5 11.5V13.5ZM7.5 11.5C7.5 9.01472 9.51472 7 12 7C14.4853 7 16.5 9.01472 16.5 11.5C16.5 13.9853 14.4853 16 12 16C9.51472 16 7.5 13.9853 7.5 11.5ZM8.5 11.5C8.5 13.433 10.067 15 12 15C13.933 15 15.5 13.433 15.5 11.5C15.5 9.567 13.933 8 12 8C10.067 8 8.5 9.567 8.5 11.5Z",fill:"currentColor"}))}};t.style=s;export{t as calendar_info_icon};
2
2
  //# sourceMappingURL=calendar-info-icon.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as t,h as s}from"./index-B-KMpdMZ.js";const a=".sc-calendar-patterns-icon-h{display:flex}";const e=class{constructor(s){t(this,s);this.width="20";this.height="20"}render(){return s("svg",{key:"9347719a4cd7c25144aaba70be90464452b9027b",width:this.width,height:this.height,fill:"none",xmlns:"http://www.w3.org/2000/svg"},s("path",{key:"9ce1877c2e65bab2cb8bacf93840fa47a9e4b132",d:"M3.25 0H11.75C13.2688 0 14.5 1.23122 14.5 2.75V11.25C14.5 12.7688 13.2688 14 11.75 14H3.25C1.73122 14 0.5 12.7688 0.5 11.25V2.75C0.5 1.23122 1.73122 0 3.25 0ZM2 2.75V4H13V2.75C13 2.05964 12.4404 1.5 11.75 1.5H3.25C2.55964 1.5 2 2.05964 2 2.75ZM12.2071 5L8.20711 9H10.7929L13 6.79289V5H12.2071ZM10.7929 5H8.20711L4.20711 9H6.79289L10.7929 5ZM2.79289 9L6.79289 5H4.20711L2 7.20711V9H2.79289ZM2 5.79289L2.79289 5H2V5.79289ZM12.2071 9H13V8.20711L12.2071 9Z",fill:"currentColor"}))}};e.style=a;export{e as calendar_patterns_icon};
1
+ import{r as t,h as s}from"./index-Cbn5rIwb.js";const a=".sc-calendar-patterns-icon-h{display:flex}";const e=class{constructor(s){t(this,s);this.width="20";this.height="20"}render(){return s("svg",{key:"9347719a4cd7c25144aaba70be90464452b9027b",width:this.width,height:this.height,fill:"none",xmlns:"http://www.w3.org/2000/svg"},s("path",{key:"9ce1877c2e65bab2cb8bacf93840fa47a9e4b132",d:"M3.25 0H11.75C13.2688 0 14.5 1.23122 14.5 2.75V11.25C14.5 12.7688 13.2688 14 11.75 14H3.25C1.73122 14 0.5 12.7688 0.5 11.25V2.75C0.5 1.23122 1.73122 0 3.25 0ZM2 2.75V4H13V2.75C13 2.05964 12.4404 1.5 11.75 1.5H3.25C2.55964 1.5 2 2.05964 2 2.75ZM12.2071 5L8.20711 9H10.7929L13 6.79289V5H12.2071ZM10.7929 5H8.20711L4.20711 9H6.79289L10.7929 5ZM2.79289 9L6.79289 5H4.20711L2 7.20711V9H2.79289ZM2 5.79289L2.79289 5H2V5.79289ZM12.2071 9H13V8.20711L12.2071 9Z",fill:"currentColor"}))}};e.style=a;export{e as calendar_patterns_icon};
2
2
  //# sourceMappingURL=calendar-patterns-icon.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox-component.entry.esm.js","sources":["src/components/design-system/checkbox-component/checkbox-component.scss?tag=checkbox-component&encapsulation=shadow","src/components/design-system/checkbox-component/checkbox-component.tsx"],"sourcesContent":["@use '../../../common/styles/variables' as *;\n\n:host {\n display: block;\n @include default-css-variables;\n width: 100%;\n}\n\n.checkbox-container {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n\n p.error {\n color: var(--nylas-error);\n font-size: 16px;\n font-weight: 400;\n line-height: 20px;\n font-family: var(--nylas-font-family);\n margin: 0;\n }\n}\n\nlabel {\n display: flex;\n align-items: center;\n font-family: var(--nylas-font-family);\n cursor: pointer;\n position: relative;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n color: var(--nylas-base-800);\n\n &.readonly {\n cursor: not-allowed;\n }\n\n span.required {\n color: var(--nylas-error);\n padding: 0 0.25rem;\n }\n\n input[type='checkbox'] {\n position: absolute;\n opacity: 0;\n cursor: pointer;\n border: 1px solid var(--nylas-base-300);\n\n &:focus ~ .checkmark,\n &:hover ~ .checkmark {\n border-color: var(--nylas-primary);\n }\n\n &:checked ~ .checkmark {\n color: var(--nylas-base-0);\n background: var(--nylas-primary)\n url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8c3ZnIHdpZHRoPSIxMiIgaGVpZ2h0PSI5IiB2aWV3Qm94PSIwIDAgMTIgOSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCiAgPHBhdGggZD0iTTQuNTc1IDguOTc3cy0uNDA0LS4wMDctLjUzNi0uMTY1TC4wNTcgNS42NGwuODI5LTEuMjI3TDQuNDcgNy4yNjggMTAuOTIxLjA4NmwuOTIzIDEuMTAzLTYuODYzIDcuNjRjLS4xMzQtLjAwMy0uNDA2LjE0OC0uNDA2LjE0OHoiIGZpbGw9IiNGRkYiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPg0KPC9zdmc+)\n 50% 40% no-repeat;\n border: 1px solid var(--nylas-primary);\n }\n\n &:disabled {\n cursor: not-allowed;\n background: var(--nylas-base-100);\n border: 1px solid var(--nylas-base-300);\n }\n }\n\n .checkmark {\n border-radius: var(--nylas-border-radius);\n border: 1px solid var(--nylas-base-300);\n position: absolute;\n left: 0;\n top: 2px;\n width: 18px;\n height: 18px;\n cursor: pointer;\n pointer-events: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n }\n\n .label {\n margin-left: 32px;\n font-size: 16px;\n font-weight: 400;\n color: var(--nylas-base-800);\n line-height: 24px;\n }\n}\n","import { ThemeConfig } from '@nylas/core';\nimport { Component, h, Prop, State, Event, EventEmitter, Listen, Element, Watch } from '@stencil/core';\n\n/**\n * The `checkbox-component` component is a UI component that allows users to select a checkbox.\n * This component is used in the scheduling form to input checkbox type inputs.\n */\n@Component({\n tag: 'checkbox-component',\n styleUrl: 'checkbox-component.scss',\n shadow: true,\n})\nexport class CheckboxComponent {\n @Element() el!: HTMLElement;\n private readonly componentType: string = 'checkbox';\n\n /**\n * The name of the checkbox. This is used to identify the checkbox when submitting a form.\n */\n @Prop() name: string = 'checkbox';\n /**\n * The default value of the checkbox. This is the value that is displayed when the checkbox is rendered.\n */\n @Prop() checked?: boolean;\n /**\n * The label of the checkbox. This is displayed next to the checkbox.\n */\n @Prop() label: string = '';\n /**\n * The property to make the checkbox read-only. If true, the checkbox cannot be edited.\n */\n @Prop() readOnly: boolean = false;\n /**\n * Whether the checkbox is required. If true, the checkbox must be checked when submitting a form.\n * Default is false. If the checkbox is required and not checked, an error message is displayed.\n */\n @Prop() required: boolean = false;\n /**\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: ThemeConfig;\n /**\n * Error message to display when the checkbox is required and not checked.\n */\n @Prop() errorMessage: string = '';\n /**\n * The checked state of the checkbox.\n */\n @State() isChecked!: boolean;\n /**\n * The error message state.\n */\n @State() error: string = '';\n\n /**\n * This event is fired when the checkbox is toggled.\n */\n @Event() nylasFormCheckboxToggled!: EventEmitter<{\n checked: boolean;\n name: string;\n label: string;\n }>;\n\n @Watch('checked')\n checkedPropChangedHandler(newValue: boolean) {\n if (typeof newValue === 'boolean') {\n this.isChecked = newValue;\n }\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 // Lifecycle events\n componentWillLoad() {\n this.el.setAttribute('component-type', this.componentType);\n }\n\n componentDidLoad() {\n this.isChecked = this.checked || false;\n this.applyThemeConfig(this.themeConfig);\n }\n\n // Event listeners\n /**\n * Listen for the bookingFormSubmitted event to validate the input value when the form is submitted.\n */\n @Listen('bookingFormSubmitted', { target: 'document' })\n handleBookingFormSubmitted(event: CustomEvent) {\n if (this.required && !this.isChecked) {\n this.error = this.errorMessage || `${this.label} is required.`;\n }\n if (this.error) {\n event.preventDefault();\n }\n }\n\n // Methods\n toggleCheck() {\n this.error = '';\n this.isChecked = !this.isChecked;\n this.nylasFormCheckboxToggled.emit({\n checked: this.isChecked,\n name: this.name,\n label: this.label,\n });\n }\n\n render() {\n return (\n <div class=\"checkbox-container\">\n <label title={this.readOnly ? 'read-only field' : undefined} class={{ readonly: this.readOnly }}>\n <input\n type=\"checkbox\"\n disabled={this.readOnly}\n readOnly={this.readOnly}\n name={this.name}\n title={this.readOnly ? 'read-only field' : undefined}\n checked={this.isChecked}\n onChange={() => this.toggleCheck()}\n />\n <span class=\"checkmark\"></span>\n <slot name=\"label\">\n <span class=\"label\" part=\"checkbox-label-span\">\n {this.label}\n {this.required && <span class=\"required\">*</span>}\n </span>\n </slot>\n </label>\n {this.error && <p class=\"error\">{this.error}</p>}\n </div>\n );\n }\n}\n"],"names":[],"mappings":";;AAAA,MAAM,oBAAoB,GAAG,6hIAA6hI;;MCY7iI,iBAAiB,GAAA,MAAA;AAL9B,IAAA,WAAA,CAAA,OAAA,EAAA;;;AAOmB,QAAA,IAAa,CAAA,aAAA,GAAW,UAAU;AAK3C,QAAA,IAAI,CAAA,IAAA,GAAW,UAAU;AAQzB,QAAA,IAAK,CAAA,KAAA,GAAW,EAAE;AAIlB,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAKzB,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAQzB,QAAA,IAAY,CAAA,YAAA,GAAW,EAAE;AAQxB,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,EAAA,0CAAA,EAAA,KAAK,EAAC,UAAU,EAAA,EAAA,GAAA,CAAS,CAC5C,CACF,CACD,EACP,IAAI,CAAC,KAAK,IAAI,CAAA,CAAA,GAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAG,KAAK,EAAC,OAAO,EAAE,EAAA,IAAI,CAAC,KAAK,CAAK,CAC5C;;;;;;;;;;;;"}
1
+ {"version":3,"file":"checkbox-component.entry.esm.js","sources":["src/components/design-system/checkbox-component/checkbox-component.scss?tag=checkbox-component&encapsulation=shadow","src/components/design-system/checkbox-component/checkbox-component.tsx"],"sourcesContent":["@use '../../../common/styles/variables' as *;\n\n:host {\n display: block;\n @include default-css-variables;\n width: 100%;\n}\n\n.checkbox-container {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n\n p.error {\n color: var(--nylas-error);\n font-size: 16px;\n font-weight: 400;\n line-height: 20px;\n font-family: var(--nylas-font-family);\n margin: 0;\n }\n}\n\nlabel {\n display: flex;\n align-items: center;\n font-family: var(--nylas-font-family);\n cursor: pointer;\n position: relative;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n color: var(--nylas-base-800);\n\n &.readonly {\n cursor: not-allowed;\n }\n\n span.required {\n color: var(--nylas-error);\n padding: 0 0.25rem;\n }\n\n input[type='checkbox'] {\n position: absolute;\n opacity: 0;\n cursor: pointer;\n border: 1px solid var(--nylas-base-300);\n\n &:focus ~ .checkmark,\n &:hover ~ .checkmark {\n border-color: var(--nylas-primary);\n }\n\n &:checked ~ .checkmark {\n color: var(--nylas-base-0);\n background: var(--nylas-primary)\n url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8c3ZnIHdpZHRoPSIxMiIgaGVpZ2h0PSI5IiB2aWV3Qm94PSIwIDAgMTIgOSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCiAgPHBhdGggZD0iTTQuNTc1IDguOTc3cy0uNDA0LS4wMDctLjUzNi0uMTY1TC4wNTcgNS42NGwuODI5LTEuMjI3TDQuNDcgNy4yNjggMTAuOTIxLjA4NmwuOTIzIDEuMTAzLTYuODYzIDcuNjRjLS4xMzQtLjAwMy0uNDA2LjE0OC0uNDA2LjE0OHoiIGZpbGw9IiNGRkYiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPg0KPC9zdmc+)\n 50% 40% no-repeat;\n border: 1px solid var(--nylas-primary);\n }\n\n &:disabled {\n cursor: not-allowed;\n background: var(--nylas-base-100);\n border: 1px solid var(--nylas-base-300);\n }\n }\n\n .checkmark {\n border-radius: var(--nylas-border-radius);\n border: 1px solid var(--nylas-base-300);\n position: absolute;\n left: 0;\n top: 2px;\n width: 18px;\n height: 18px;\n cursor: pointer;\n pointer-events: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n }\n\n .label {\n margin-left: 32px;\n font-size: 16px;\n font-weight: 400;\n color: var(--nylas-base-800);\n line-height: 24px;\n }\n}\n","import { ThemeConfig } from '@nylas/core';\nimport { Component, h, Prop, State, Event, EventEmitter, Listen, Element, Watch } from '@stencil/core';\n\n/**\n * The `checkbox-component` component is a UI component that allows users to select a checkbox.\n * This component is used in the scheduling form to input checkbox type inputs.\n */\n@Component({\n tag: 'checkbox-component',\n styleUrl: 'checkbox-component.scss',\n shadow: true,\n})\nexport class CheckboxComponent {\n @Element() el!: HTMLElement;\n private readonly componentType: string = 'checkbox';\n\n /**\n * The name of the checkbox. This is used to identify the checkbox when submitting a form.\n */\n @Prop() name: string = 'checkbox';\n /**\n * The default value of the checkbox. This is the value that is displayed when the checkbox is rendered.\n */\n @Prop() checked?: boolean;\n /**\n * The label of the checkbox. This is displayed next to the checkbox.\n */\n @Prop() label: string = '';\n /**\n * The property to make the checkbox read-only. If true, the checkbox cannot be edited.\n */\n @Prop() readOnly: boolean = false;\n /**\n * Whether the checkbox is required. If true, the checkbox must be checked when submitting a form.\n * Default is false. If the checkbox is required and not checked, an error message is displayed.\n */\n @Prop() required: boolean = false;\n /**\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: ThemeConfig;\n /**\n * Error message to display when the checkbox is required and not checked.\n */\n @Prop() errorMessage: string = '';\n /**\n * The checked state of the checkbox.\n */\n @State() isChecked!: boolean;\n /**\n * The error message state.\n */\n @State() error: string = '';\n\n /**\n * This event is fired when the checkbox is toggled.\n */\n @Event() nylasFormCheckboxToggled!: EventEmitter<{\n checked: boolean;\n name: string;\n label: string;\n }>;\n\n @Watch('checked')\n checkedPropChangedHandler(newValue: boolean) {\n if (typeof newValue === 'boolean') {\n this.isChecked = newValue;\n }\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 // Lifecycle events\n componentWillLoad() {\n this.el.setAttribute('component-type', this.componentType);\n this.applyThemeConfig(this.themeConfig);\n }\n\n componentDidLoad() {\n this.isChecked = this.checked || false;\n this.applyThemeConfig(this.themeConfig);\n }\n\n // Event listeners\n /**\n * Listen for the bookingFormSubmitted event to validate the input value when the form is submitted.\n */\n @Listen('bookingFormSubmitted', { target: 'document' })\n handleBookingFormSubmitted(event: CustomEvent) {\n if (this.required && !this.isChecked) {\n this.error = this.errorMessage || `${this.label} is required.`;\n }\n if (this.error) {\n event.preventDefault();\n }\n }\n\n // Methods\n toggleCheck() {\n this.error = '';\n this.isChecked = !this.isChecked;\n this.nylasFormCheckboxToggled.emit({\n checked: this.isChecked,\n name: this.name,\n label: this.label,\n });\n }\n\n render() {\n return (\n <div class=\"checkbox-container\">\n <label title={this.readOnly ? 'read-only field' : undefined} class={{ readonly: this.readOnly }}>\n <input\n type=\"checkbox\"\n disabled={this.readOnly}\n readOnly={this.readOnly}\n name={this.name}\n title={this.readOnly ? 'read-only field' : undefined}\n checked={this.isChecked}\n onChange={() => this.toggleCheck()}\n />\n <span class=\"checkmark\"></span>\n <slot name=\"label\">\n <span class=\"label\" part=\"checkbox-label-span\">\n {this.label}\n {this.required && <span class=\"required\">*</span>}\n </span>\n </slot>\n </label>\n {this.error && <p class=\"error\">{this.error}</p>}\n </div>\n );\n }\n}\n"],"names":[],"mappings":";;AAAA,MAAM,oBAAoB,GAAG,6hIAA6hI;;MCY7iI,iBAAiB,GAAA,MAAA;AAL9B,IAAA,WAAA,CAAA,OAAA,EAAA;;;AAOmB,QAAA,IAAa,CAAA,aAAA,GAAW,UAAU;AAK3C,QAAA,IAAI,CAAA,IAAA,GAAW,UAAU;AAQzB,QAAA,IAAK,CAAA,KAAA,GAAW,EAAE;AAIlB,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAKzB,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAQzB,QAAA,IAAY,CAAA,YAAA,GAAW,EAAE;AAQxB,QAAA,IAAK,CAAA,KAAA,GAAW,EAAE;AA6F5B;AAjFC,IAAA,yBAAyB,CAAC,QAAiB,EAAA;AACzC,QAAA,IAAI,OAAO,QAAQ,KAAK,SAAS,EAAE;AACjC,YAAA,IAAI,CAAC,SAAS,GAAG,QAAQ;;;IAK7B,yBAAyB,CAAC,MAAmB,EAAE,MAAmB,EAAA;QAChE,IAAI,MAAM,KAAK,MAAM;YAAE;AACvB,QAAA,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC;;AAG/B,IAAA,gBAAgB,CAAC,WAAyB,EAAA;QACxC,IAAI,WAAW,EAAE;AACf,YAAA,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE;AACtD,gBAAA,IAAI,CAAC,EAAE,CAAC,KAAK,C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EAAE,IAAI,CAAC,QAAQ,EAAE,EAAA,EAC7F,CACE,CAAA,OAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,UAAU,EACf,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,KAAK,EAAE,IAAI,CAAC,QAAQ,GAAG,iBAAiB,GAAG,SAAS,EACpD,OAAO,EAAE,IAAI,CAAC,SAAS,EACvB,QAAQ,EAAE,MAAM,IAAI,CAAC,WAAW,EAAE,EAClC,CAAA,EACF,CAAM,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,WAAW,EAAQ,CAAA,EAC/B,CAAM,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,OAAO,EAAA,EAChB,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,KAAK,EAAC,OAAO,EAAC,IAAI,EAAC,qBAAqB,EAAA,EAC3C,IAAI,CAAC,KAAK,EACV,IAAI,CAAC,QAAQ,IAAI,CAAM,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,UAAU,EAAA,EAAA,GAAA,CAAS,CAC5C,CACF,CACD,EACP,IAAI,CAAC,KAAK,IAAI,CAAA,CAAA,GAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAG,KAAK,EAAC,OAAO,EAAE,EAAA,IAAI,CAAC,KAAK,CAAK,CAC5C;;;;;;;;;;;;"}
@@ -1,2 +1,2 @@
1
- import{r as e,a,h as l,e as s}from"./index-B-KMpdMZ.js";const o=':host{display:block;--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;width:100%}.checkbox-container{display:flex;flex-direction:column;gap:0.5rem}.checkbox-container p.error{color:var(--nylas-error);font-size:16px;font-weight:400;line-height:20px;font-family:var(--nylas-font-family);margin:0}label{display:flex;align-items:center;font-family:var(--nylas-font-family);cursor:pointer;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:var(--nylas-base-800)}label.readonly{cursor:not-allowed}label span.required{color:var(--nylas-error);padding:0 0.25rem}label input[type=checkbox]{position:absolute;opacity:0;cursor:pointer;border:1px solid var(--nylas-base-300)}label input[type=checkbox]:focus~.checkmark,label input[type=checkbox]:hover~.checkmark{border-color:var(--nylas-primary)}label input[type=checkbox]:checked~.checkmark{color:var(--nylas-base-0);background:var(--nylas-primary) url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8c3ZnIHdpZHRoPSIxMiIgaGVpZ2h0PSI5IiB2aWV3Qm94PSIwIDAgMTIgOSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCiAgPHBhdGggZD0iTTQuNTc1IDguOTc3cy0uNDA0LS4wMDctLjUzNi0uMTY1TC4wNTcgNS42NGwuODI5LTEuMjI3TDQuNDcgNy4yNjggMTAuOTIxLjA4NmwuOTIzIDEuMTAzLTYuODYzIDcuNjRjLS4xMzQtLjAwMy0uNDA2LjE0OC0uNDA2LjE0OHoiIGZpbGw9IiNGRkYiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPg0KPC9zdmc+) 50% 40% no-repeat;border:1px solid var(--nylas-primary)}label input[type=checkbox]:disabled{cursor:not-allowed;background:var(--nylas-base-100);border:1px solid var(--nylas-base-300)}label .checkmark{border-radius:var(--nylas-border-radius);border:1px solid var(--nylas-base-300);position:absolute;left:0;top:2px;width:18px;height:18px;cursor:pointer;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}label .label{margin-left:32px;font-size:16px;font-weight:400;color:var(--nylas-base-800);line-height:24px}';const r=class{constructor(l){e(this,l);this.nylasFormCheckboxToggled=a(this,"nylasFormCheckboxToggled",7);this.componentType="checkbox";this.name="checkbox";this.label="";this.readOnly=false;this.required=false;this.errorMessage="";this.error=""}checkedPropChangedHandler(e){if(typeof e==="boolean"){this.isChecked=e}}themeConfigChangedHandler(e,a){if(e===a)return;this.applyThemeConfig(e)}applyThemeConfig(e){if(e){for(const[a,l]of Object.entries(e)){this.el.style.setProperty(`${a}`,l)}}}componentWillLoad(){this.el.setAttribute("component-type",this.componentType)}componentDidLoad(){this.isChecked=this.checked||false;this.applyThemeConfig(this.themeConfig)}handleBookingFormSubmitted(e){if(this.required&&!this.isChecked){this.error=this.errorMessage||`${this.label} is required.`}if(this.error){e.preventDefault()}}toggleCheck(){this.error="";this.isChecked=!this.isChecked;this.nylasFormCheckboxToggled.emit({checked:this.isChecked,name:this.name,label:this.label})}render(){return l("div",{key:"b3c8a07f7e900ae0f9f9a4e91ac8dbd29a43f1d2",class:"checkbox-container"},l("label",{key:"8d01acbddf9c9224e9913d3670b0af9550be03bb",title:this.readOnly?"read-only field":undefined,class:{readonly:this.readOnly}},l("input",{key:"2ea9a21f087c16903488e1aea8772bd8ff569aca",type:"checkbox",disabled:this.readOnly,readOnly:this.readOnly,name:this.name,title:this.readOnly?"read-only field":undefined,checked:this.isChecked,onChange:()=>this.toggleCheck()}),l("span",{key:"c6ddc29c587e37896583a8891c32b12b19b1f2e4",class:"checkmark"}),l("slot",{key:"351a7fdda21ce179b94b35fcea9b668422a56ed3",name:"label"},l("span",{key:"514eb27c4aa951c00589927cbf22c62849cc64e3",class:"label",part:"checkbox-label-span"},this.label,this.required&&l("span",{key:"67986e6f58eb21923ba445698e19379d971e3b2c",class:"required"},"*")))),this.error&&l("p",{key:"04c4758befc24fb64b45026d31bbe676f8942285",class:"error"},this.error))}get el(){return s(this)}static get watchers(){return{checked:["checkedPropChangedHandler"],themeConfig:["themeConfigChangedHandler"]}}};r.style=o;export{r as checkbox_component};
1
+ import{r as e,a as l,h as a,e as s}from"./index-Cbn5rIwb.js";const o=':host{display:block;--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;width:100%}.checkbox-container{display:flex;flex-direction:column;gap:0.5rem}.checkbox-container p.error{color:var(--nylas-error);font-size:16px;font-weight:400;line-height:20px;font-family:var(--nylas-font-family);margin:0}label{display:flex;align-items:center;font-family:var(--nylas-font-family);cursor:pointer;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:var(--nylas-base-800)}label.readonly{cursor:not-allowed}label span.required{color:var(--nylas-error);padding:0 0.25rem}label input[type=checkbox]{position:absolute;opacity:0;cursor:pointer;border:1px solid var(--nylas-base-300)}label input[type=checkbox]:focus~.checkmark,label input[type=checkbox]:hover~.checkmark{border-color:var(--nylas-primary)}label input[type=checkbox]:checked~.checkmark{color:var(--nylas-base-0);background:var(--nylas-primary) url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8c3ZnIHdpZHRoPSIxMiIgaGVpZ2h0PSI5IiB2aWV3Qm94PSIwIDAgMTIgOSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCiAgPHBhdGggZD0iTTQuNTc1IDguOTc3cy0uNDA0LS4wMDctLjUzNi0uMTY1TC4wNTcgNS42NGwuODI5LTEuMjI3TDQuNDcgNy4yNjggMTAuOTIxLjA4NmwuOTIzIDEuMTAzLTYuODYzIDcuNjRjLS4xMzQtLjAwMy0uNDA2LjE0OC0uNDA2LjE0OHoiIGZpbGw9IiNGRkYiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPg0KPC9zdmc+) 50% 40% no-repeat;border:1px solid var(--nylas-primary)}label input[type=checkbox]:disabled{cursor:not-allowed;background:var(--nylas-base-100);border:1px solid var(--nylas-base-300)}label .checkmark{border-radius:var(--nylas-border-radius);border:1px solid var(--nylas-base-300);position:absolute;left:0;top:2px;width:18px;height:18px;cursor:pointer;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}label .label{margin-left:32px;font-size:16px;font-weight:400;color:var(--nylas-base-800);line-height:24px}';const r=class{constructor(a){e(this,a);this.nylasFormCheckboxToggled=l(this,"nylasFormCheckboxToggled",7);this.componentType="checkbox";this.name="checkbox";this.label="";this.readOnly=false;this.required=false;this.errorMessage="";this.error=""}checkedPropChangedHandler(e){if(typeof e==="boolean"){this.isChecked=e}}themeConfigChangedHandler(e,l){if(e===l)return;this.applyThemeConfig(e)}applyThemeConfig(e){if(e){for(const[l,a]of Object.entries(e)){this.el.style.setProperty(`${l}`,a)}}}componentWillLoad(){this.el.setAttribute("component-type",this.componentType);this.applyThemeConfig(this.themeConfig)}componentDidLoad(){this.isChecked=this.checked||false;this.applyThemeConfig(this.themeConfig)}handleBookingFormSubmitted(e){if(this.required&&!this.isChecked){this.error=this.errorMessage||`${this.label} is required.`}if(this.error){e.preventDefault()}}toggleCheck(){this.error="";this.isChecked=!this.isChecked;this.nylasFormCheckboxToggled.emit({checked:this.isChecked,name:this.name,label:this.label})}render(){return a("div",{key:"b95d2646880cee51b6931d34ea2b678dcd8bdb73",class:"checkbox-container"},a("label",{key:"4841376b58c13db988d7d4144456ba4a63efb839",title:this.readOnly?"read-only field":undefined,class:{readonly:this.readOnly}},a("input",{key:"ac6f9fd7e32d911aeb30881fe6137fb4bd4517c2",type:"checkbox",disabled:this.readOnly,readOnly:this.readOnly,name:this.name,title:this.readOnly?"read-only field":undefined,checked:this.isChecked,onChange:()=>this.toggleCheck()}),a("span",{key:"7a6551f35486456bb578888d55fffe0fc035d3c4",class:"checkmark"}),a("slot",{key:"d540e7b490537ac1f9db4375a852473e6557bd0c",name:"label"},a("span",{key:"2c968745147cbe0f87af24b965bba4be1cd45bf7",class:"label",part:"checkbox-label-span"},this.label,this.required&&a("span",{key:"a784cb08b127cbf83071bf1f35bea0b3b676fd8c",class:"required"},"*")))),this.error&&a("p",{key:"a471b470a7cf3f140bab6ae29548de6a0a009247",class:"error"},this.error))}get el(){return s(this)}static get watchers(){return{checked:["checkedPropChangedHandler"],themeConfig:["themeConfigChangedHandler"]}}};r.style=o;export{r as checkbox_component};
2
2
  //# sourceMappingURL=checkbox-component.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["checkboxComponentCss","CheckboxComponent","constructor","hostRef","this","componentType","name","label","readOnly","required","errorMessage","error","checkedPropChangedHandler","newValue","isChecked","themeConfigChangedHandler","newVal","oldVal","applyThemeConfig","themeConfig","key","value","Object","entries","el","style","setProperty","componentWillLoad","setAttribute","componentDidLoad","checked","handleBookingFormSubmitted","event","preventDefault","toggleCheck","nylasFormCheckboxToggled","emit","render","h","class","title","undefined","readonly","type","disabled","onChange","part"],"sources":["src/components/design-system/checkbox-component/checkbox-component.scss?tag=checkbox-component&encapsulation=shadow","src/components/design-system/checkbox-component/checkbox-component.tsx"],"sourcesContent":["@use '../../../common/styles/variables' as *;\n\n:host {\n display: block;\n @include default-css-variables;\n width: 100%;\n}\n\n.checkbox-container {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n\n p.error {\n color: var(--nylas-error);\n font-size: 16px;\n font-weight: 400;\n line-height: 20px;\n font-family: var(--nylas-font-family);\n margin: 0;\n }\n}\n\nlabel {\n display: flex;\n align-items: center;\n font-family: var(--nylas-font-family);\n cursor: pointer;\n position: relative;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n color: var(--nylas-base-800);\n\n &.readonly {\n cursor: not-allowed;\n }\n\n span.required {\n color: var(--nylas-error);\n padding: 0 0.25rem;\n }\n\n input[type='checkbox'] {\n position: absolute;\n opacity: 0;\n cursor: pointer;\n border: 1px solid var(--nylas-base-300);\n\n &:focus ~ .checkmark,\n &:hover ~ .checkmark {\n border-color: var(--nylas-primary);\n }\n\n &:checked ~ .checkmark {\n color: var(--nylas-base-0);\n background: var(--nylas-primary)\n url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8c3ZnIHdpZHRoPSIxMiIgaGVpZ2h0PSI5IiB2aWV3Qm94PSIwIDAgMTIgOSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCiAgPHBhdGggZD0iTTQuNTc1IDguOTc3cy0uNDA0LS4wMDctLjUzNi0uMTY1TC4wNTcgNS42NGwuODI5LTEuMjI3TDQuNDcgNy4yNjggMTAuOTIxLjA4NmwuOTIzIDEuMTAzLTYuODYzIDcuNjRjLS4xMzQtLjAwMy0uNDA2LjE0OC0uNDA2LjE0OHoiIGZpbGw9IiNGRkYiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPg0KPC9zdmc+)\n 50% 40% no-repeat;\n border: 1px solid var(--nylas-primary);\n }\n\n &:disabled {\n cursor: not-allowed;\n background: var(--nylas-base-100);\n border: 1px solid var(--nylas-base-300);\n }\n }\n\n .checkmark {\n border-radius: var(--nylas-border-radius);\n border: 1px solid var(--nylas-base-300);\n position: absolute;\n left: 0;\n top: 2px;\n width: 18px;\n height: 18px;\n cursor: pointer;\n pointer-events: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n }\n\n .label {\n margin-left: 32px;\n font-size: 16px;\n font-weight: 400;\n color: var(--nylas-base-800);\n line-height: 24px;\n }\n}\n","import { ThemeConfig } from '@nylas/core';\nimport { Component, h, Prop, State, Event, EventEmitter, Listen, Element, Watch } from '@stencil/core';\n\n/**\n * The `checkbox-component` component is a UI component that allows users to select a checkbox.\n * This component is used in the scheduling form to input checkbox type inputs.\n */\n@Component({\n tag: 'checkbox-component',\n styleUrl: 'checkbox-component.scss',\n shadow: true,\n})\nexport class CheckboxComponent {\n @Element() el!: HTMLElement;\n private readonly componentType: string = 'checkbox';\n\n /**\n * The name of the checkbox. This is used to identify the checkbox when submitting a form.\n */\n @Prop() name: string = 'checkbox';\n /**\n * The default value of the checkbox. This is the value that is displayed when the checkbox is rendered.\n */\n @Prop() checked?: boolean;\n /**\n * The label of the checkbox. This is displayed next to the checkbox.\n */\n @Prop() label: string = '';\n /**\n * The property to make the checkbox read-only. If true, the checkbox cannot be edited.\n */\n @Prop() readOnly: boolean = false;\n /**\n * Whether the checkbox is required. If true, the checkbox must be checked when submitting a form.\n * Default is false. If the checkbox is required and not checked, an error message is displayed.\n */\n @Prop() required: boolean = false;\n /**\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: ThemeConfig;\n /**\n * Error message to display when the checkbox is required and not checked.\n */\n @Prop() errorMessage: string = '';\n /**\n * The checked state of the checkbox.\n */\n @State() isChecked!: boolean;\n /**\n * The error message state.\n */\n @State() error: string = '';\n\n /**\n * This event is fired when the checkbox is toggled.\n */\n @Event() nylasFormCheckboxToggled!: EventEmitter<{\n checked: boolean;\n name: string;\n label: string;\n }>;\n\n @Watch('checked')\n checkedPropChangedHandler(newValue: boolean) {\n if (typeof newValue === 'boolean') {\n this.isChecked = newValue;\n }\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 // Lifecycle events\n componentWillLoad() {\n this.el.setAttribute('component-type', this.componentType);\n }\n\n componentDidLoad() {\n this.isChecked = this.checked || false;\n this.applyThemeConfig(this.themeConfig);\n }\n\n // Event listeners\n /**\n * Listen for the bookingFormSubmitted event to validate the input value when the form is submitted.\n */\n @Listen('bookingFormSubmitted', { target: 'document' })\n handleBookingFormSubmitted(event: CustomEvent) {\n if (this.required && !this.isChecked) {\n this.error = this.errorMessage || `${this.label} is required.`;\n }\n if (this.error) {\n event.preventDefault();\n }\n }\n\n // Methods\n toggleCheck() {\n this.error = '';\n this.isChecked = !this.isChecked;\n this.nylasFormCheckboxToggled.emit({\n checked: this.isChecked,\n name: this.name,\n label: this.label,\n });\n }\n\n render() {\n return (\n <div class=\"checkbox-container\">\n <label title={this.readOnly ? 'read-only field' : undefined} class={{ readonly: this.readOnly }}>\n <input\n type=\"checkbox\"\n disabled={this.readOnly}\n readOnly={this.readOnly}\n name={this.name}\n title={this.readOnly ? 'read-only field' : undefined}\n checked={this.isChecked}\n onChange={() => this.toggleCheck()}\n />\n <span class=\"checkmark\"></span>\n <slot name=\"label\">\n <span class=\"label\" part=\"checkbox-label-span\">\n {this.label}\n {this.required && <span class=\"required\">*</span>}\n </span>\n </slot>\n </label>\n {this.error && <p class=\"error\">{this.error}</p>}\n </div>\n );\n }\n}\n"],"mappings":"wDAAA,MAAMA,EAAuB,4hI,MCYhBC,EAAiB,MAL9B,WAAAC,CAAAC,G,6EAOmBC,KAAaC,cAAW,WAKjCD,KAAIE,KAAW,WAQfF,KAAKG,MAAW,GAIhBH,KAAQI,SA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AK8B,gBAEvBI,EAAM,QAAAlB,IAAA,2CAAAmB,MAAM,cACZD,EAAM,QAAAlB,IAAA,2CAAAd,KAAK,SACTgC,EAAA,QAAAlB,IAAA,2CAAMmB,MAAM,QAAQO,KAAK,uBACtB1C,KAAKG,MACLH,KAAKK,UAAY6B,EAAM,QAAAlB,IAAA,2CAAAmB,MAAM,YAAU,QAI7CnC,KAAKO,OAAS2B,EAAA,KAAAlB,IAAA,2CAAGmB,MAAM,SAASnC,KAAKO,O","ignoreList":[]}
1
+ {"version":3,"names":["checkboxComponentCss","CheckboxComponent","constructor","hostRef","this","componentType","name","label","readOnly","required","errorMessage","error","checkedPropChangedHandler","newValue","isChecked","themeConfigChangedHandler","newVal","oldVal","applyThemeConfig","themeConfig","key","value","Object","entries","el","style","setProperty","componentWillLoad","setAttribute","componentDidLoad","checked","handleBookingFormSubmitted","event","preventDefault","toggleCheck","nylasFormCheckboxToggled","emit","render","h","class","title","undefined","readonly","type","disabled","onChange","part"],"sources":["src/components/design-system/checkbox-component/checkbox-component.scss?tag=checkbox-component&encapsulation=shadow","src/components/design-system/checkbox-component/checkbox-component.tsx"],"sourcesContent":["@use '../../../common/styles/variables' as *;\n\n:host {\n display: block;\n @include default-css-variables;\n width: 100%;\n}\n\n.checkbox-container {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n\n p.error {\n color: var(--nylas-error);\n font-size: 16px;\n font-weight: 400;\n line-height: 20px;\n font-family: var(--nylas-font-family);\n margin: 0;\n }\n}\n\nlabel {\n display: flex;\n align-items: center;\n font-family: var(--nylas-font-family);\n cursor: pointer;\n position: relative;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n color: var(--nylas-base-800);\n\n &.readonly {\n cursor: not-allowed;\n }\n\n span.required {\n color: var(--nylas-error);\n padding: 0 0.25rem;\n }\n\n input[type='checkbox'] {\n position: absolute;\n opacity: 0;\n cursor: pointer;\n border: 1px solid var(--nylas-base-300);\n\n &:focus ~ .checkmark,\n &:hover ~ .checkmark {\n border-color: var(--nylas-primary);\n }\n\n &:checked ~ .checkmark {\n color: var(--nylas-base-0);\n background: var(--nylas-primary)\n url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8c3ZnIHdpZHRoPSIxMiIgaGVpZ2h0PSI5IiB2aWV3Qm94PSIwIDAgMTIgOSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCiAgPHBhdGggZD0iTTQuNTc1IDguOTc3cy0uNDA0LS4wMDctLjUzNi0uMTY1TC4wNTcgNS42NGwuODI5LTEuMjI3TDQuNDcgNy4yNjggMTAuOTIxLjA4NmwuOTIzIDEuMTAzLTYuODYzIDcuNjRjLS4xMzQtLjAwMy0uNDA2LjE0OC0uNDA2LjE0OHoiIGZpbGw9IiNGRkYiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPg0KPC9zdmc+)\n 50% 40% no-repeat;\n border: 1px solid var(--nylas-primary);\n }\n\n &:disabled {\n cursor: not-allowed;\n background: var(--nylas-base-100);\n border: 1px solid var(--nylas-base-300);\n }\n }\n\n .checkmark {\n border-radius: var(--nylas-border-radius);\n border: 1px solid var(--nylas-base-300);\n position: absolute;\n left: 0;\n top: 2px;\n width: 18px;\n height: 18px;\n cursor: pointer;\n pointer-events: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n }\n\n .label {\n margin-left: 32px;\n font-size: 16px;\n font-weight: 400;\n color: var(--nylas-base-800);\n line-height: 24px;\n }\n}\n","import { ThemeConfig } from '@nylas/core';\nimport { Component, h, Prop, State, Event, EventEmitter, Listen, Element, Watch } from '@stencil/core';\n\n/**\n * The `checkbox-component` component is a UI component that allows users to select a checkbox.\n * This component is used in the scheduling form to input checkbox type inputs.\n */\n@Component({\n tag: 'checkbox-component',\n styleUrl: 'checkbox-component.scss',\n shadow: true,\n})\nexport class CheckboxComponent {\n @Element() el!: HTMLElement;\n private readonly componentType: string = 'checkbox';\n\n /**\n * The name of the checkbox. This is used to identify the checkbox when submitting a form.\n */\n @Prop() name: string = 'checkbox';\n /**\n * The default value of the checkbox. This is the value that is displayed when the checkbox is rendered.\n */\n @Prop() checked?: boolean;\n /**\n * The label of the checkbox. This is displayed next to the checkbox.\n */\n @Prop() label: string = '';\n /**\n * The property to make the checkbox read-only. If true, the checkbox cannot be edited.\n */\n @Prop() readOnly: boolean = false;\n /**\n * Whether the checkbox is required. If true, the checkbox must be checked when submitting a form.\n * Default is false. If the checkbox is required and not checked, an error message is displayed.\n */\n @Prop() required: boolean = false;\n /**\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: ThemeConfig;\n /**\n * Error message to display when the checkbox is required and not checked.\n */\n @Prop() errorMessage: string = '';\n /**\n * The checked state of the checkbox.\n */\n @State() isChecked!: boolean;\n /**\n * The error message state.\n */\n @State() error: string = '';\n\n /**\n * This event is fired when the checkbox is toggled.\n */\n @Event() nylasFormCheckboxToggled!: EventEmitter<{\n checked: boolean;\n name: string;\n label: string;\n }>;\n\n @Watch('checked')\n checkedPropChangedHandler(newValue: boolean) {\n if (typeof newValue === 'boolean') {\n this.isChecked = newValue;\n }\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 // Lifecycle events\n componentWillLoad() {\n this.el.setAttribute('component-type', this.componentType);\n this.applyThemeConfig(this.themeConfig);\n }\n\n componentDidLoad() {\n this.isChecked = this.checked || false;\n this.applyThemeConfig(this.themeConfig);\n }\n\n // Event listeners\n /**\n * Listen for the bookingFormSubmitted event to validate the input value when the form is submitted.\n */\n @Listen('bookingFormSubmitted', { target: 'document' })\n handleBookingFormSubmitted(event: CustomEvent) {\n if (this.required && !this.isChecked) {\n this.error = this.errorMessage || `${this.label} is required.`;\n }\n if (this.error) {\n event.preventDefault();\n }\n }\n\n // Methods\n toggleCheck() {\n this.error = '';\n this.isChecked = !this.isChecked;\n this.nylasFormCheckboxToggled.emit({\n checked: this.isChecked,\n name: this.name,\n label: this.label,\n });\n }\n\n render() {\n return (\n <div class=\"checkbox-container\">\n <label title={this.readOnly ? 'read-only field' : undefined} class={{ readonly: this.readOnly }}>\n <input\n type=\"checkbox\"\n disabled={this.readOnly}\n readOnly={this.readOnly}\n name={this.name}\n title={this.readOnly ? 'read-only field' : undefined}\n checked={this.isChecked}\n onChange={() => this.toggleCheck()}\n />\n <span class=\"checkmark\"></span>\n <slot name=\"label\">\n <span class=\"label\" part=\"checkbox-label-span\">\n {this.label}\n {this.required && <span class=\"required\">*</span>}\n </span>\n </slot>\n </label>\n {this.error && <p class=\"error\">{this.error}</p>}\n </div>\n );\n }\n}\n"],"mappings":"6DAAA,MAAMA,EAAuB,4hI,MCYhBC,EAAiB,MAL9B,WAAAC,CAAAC,G,6EAOmBC,KAAaC,cAAW,WAKjCD,KAAIE,KAAW,WAQfF,KAAKG,MAAW,GAIhBH,KAAQI,SAAY,MAKpBJ,KAAQK,SAAY,MAQpBL,KAAYM,aAAW,GAQtBN,KAAKO,MAAW,EA6F1B,CAjFC,yBAAAC,CAA0BC,GACxB,UAAWA,IAAa,UAAW,CACjCT,KAAKU,UAAYD,C,EAKrB,yBAAAE,CAA0BC,EAAqBC,GAC7C,GAAID,IAAWC,EAAQ,OACvBb,KAAKc,iBAAiBF,E,CAGxB,gBAAAE,CAAiBC,GACf,GAAIA,EAAa,CACf,IAAK,MAAOC,EAAKC,KAAUC,OAAOC,QAAQJ,GAAc,CACtDf,KAAKoB,GAAGC,MAAMC,YAAY,GAAGN,IAAOC,E,GAM1C,iBAAAM,GACEvB,KAAKoB,GAAGI,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:block}.checkbox-group-container{display:flex;flex-direction:column;gap:0.5rem}.group-label{font-weight:500;margin-bottom:0.25rem}.group-label .required{color:var(--nylas-error);margin-left:0.25rem}.checkbox-list{display:flex;gap:16px}.checkbox-list.vertical{flex-direction:column}.checkbox-list.horizontal{flex-direction:row;align-items:center}.checkbox-list checkbox-component{width:max-content}.checkbox-list checkbox-component::part(checkbox-label-span){width:inherit;margin-left:24px}.error{color:var(--nylas-error);font-size:0.875rem;margin-top:0.25rem}";const c=class{constructor(i){e(this,i);this.nylasCheckboxGroupChanged=t(this,"nylasCheckboxGroupChanged",7);this.componentType="checkbox-group";this.name="checkbox-group";this.label="";this.options=[];this.required=false;this.direction="vertical";this.error="";this.selectedValues=[]}componentWillLoad(){this.el.setAttribute("component-type",this.componentType)}componentDidLoad(){this.selectedValues=this.options.filter((e=>e.checked)).map((e=>e.value));this.applyThemeConfig(this.themeConfig)}optionsChangedHandler(e,t){if(JSON.stringify(e)===JSON.stringify(t))return;this.selectedValues=e.filter((e=>e.checked)).map((e=>e.value))}themeConfigChangedHandler(e,t){if(e===t)return;this.applyThemeConfig(e)}applyThemeConfig(e){if(e){for(const[t,i]of Object.entries(e)){this.el.style.setProperty(`${t}`,i)}}}handleBookingFormSubmitted(e){if(this.required&&!this.hasCheckedOptions()){this.error="Please select at least one option."}if(this.error){e.preventDefault()}}hasCheckedOptions(){return this.options.some((e=>e.checked))}handleCheckboxToggle(e){const{checked:t,name:i,label:s}=e.detail;const o=this.options.find((e=>e.label===s));if(!o)return;let c=[];if(t){if(o.selectAll){c=this.options.map((e=>e.value))}else{c=[...this.selectedValues,o.value]}}else{c=this.selectedValues.filter((e=>e!==o.value))}this.selectedValues=[...c];this.nylasCheckboxGroupChanged.emit({selectedValues:this.selectedValues,name:this.name})}handleCheckboxToggled(e){this.handleCheckboxToggle(e)}render(){return i("div",{key:"8103afb31085d14216c52fdf888d3a891620bbf6",class:"checkbox-group-container"},this.label&&i("div",{key:"2a7831889c3d4cfa22682e7cdd615cc06046b4a1",class:"group-label"},this.label,this.required&&i("span",{key:"bc5a7370f1294fc9b4b39ad7ca0974e994fca2b6",class:"required"},"*")),i("div",{key:"3bc2b5627470fcbad928cb0ce46beffe532418fc",class:`checkbox-list ${this.direction}`},this.options.map((e=>i("checkbox-component",{name:`${this.name}-${e.value}`,label:e.label,checked:this.selectedValues.includes(e.value),readOnly:e.disabled,required:this.required,themeConfig:this.themeConfig})))),this.error&&i("p",{key:"701e7adcd6263c245635c4b742688d8a94efa8c4",class:"error"},this.error))}get el(){return s(this)}static get watchers(){return{options:["optionsChangedHandler"],themeConfig:["themeConfigChangedHandler"]}}};c.style=o;export{c as checkbox_group};
1
+ import{r as e,a as t,h as i,e as s}from"./index-Cbn5rIwb.js";const o=":host{display:block}.checkbox-group-container{display:flex;flex-direction:column;gap:0.5rem}.group-label{font-weight:500;margin-bottom:0.25rem}.group-label .required{color:var(--nylas-error);margin-left:0.25rem}.checkbox-list{display:flex;gap:16px}.checkbox-list.vertical{flex-direction:column}.checkbox-list.horizontal{flex-direction:row;align-items:center}.checkbox-list checkbox-component{width:max-content}.checkbox-list checkbox-component::part(checkbox-label-span){width:inherit;margin-left:24px}.error{color:var(--nylas-error);font-size:0.875rem;margin-top:0.25rem}";const c=class{constructor(i){e(this,i);this.nylasCheckboxGroupChanged=t(this,"nylasCheckboxGroupChanged",7);this.componentType="checkbox-group";this.name="checkbox-group";this.label="";this.options=[];this.required=false;this.direction="vertical";this.error="";this.selectedValues=[]}componentWillLoad(){this.el.setAttribute("component-type",this.componentType)}componentDidLoad(){this.selectedValues=this.options.filter((e=>e.checked)).map((e=>e.value));this.applyThemeConfig(this.themeConfig)}optionsChangedHandler(e,t){if(JSON.stringify(e)===JSON.stringify(t))return;this.selectedValues=e.filter((e=>e.checked)).map((e=>e.value))}themeConfigChangedHandler(e,t){if(e===t)return;this.applyThemeConfig(e)}applyThemeConfig(e){if(e){for(const[t,i]of Object.entries(e)){this.el.style.setProperty(`${t}`,i)}}}handleBookingFormSubmitted(e){if(this.required&&!this.hasCheckedOptions()){this.error="Please select at least one option."}if(this.error){e.preventDefault()}}hasCheckedOptions(){return this.options.some((e=>e.checked))}handleCheckboxToggle(e){const{checked:t,name:i,label:s}=e.detail;const o=this.options.find((e=>e.label===s));if(!o)return;let c=[];if(t){if(o.selectAll){c=this.options.map((e=>e.value))}else{c=[...this.selectedValues,o.value]}}else{c=this.selectedValues.filter((e=>e!==o.value))}this.selectedValues=[...c];this.nylasCheckboxGroupChanged.emit({selectedValues:this.selectedValues,name:this.name})}handleCheckboxToggled(e){this.handleCheckboxToggle(e)}render(){return i("div",{key:"8103afb31085d14216c52fdf888d3a891620bbf6",class:"checkbox-group-container"},this.label&&i("div",{key:"2a7831889c3d4cfa22682e7cdd615cc06046b4a1",class:"group-label"},this.label,this.required&&i("span",{key:"bc5a7370f1294fc9b4b39ad7ca0974e994fca2b6",class:"required"},"*")),i("div",{key:"3bc2b5627470fcbad928cb0ce46beffe532418fc",class:`checkbox-list ${this.direction}`},this.options.map((e=>i("checkbox-component",{name:`${this.name}-${e.value}`,label:e.label,checked:this.selectedValues.includes(e.value),readOnly:e.disabled,required:this.required,themeConfig:this.themeConfig})))),this.error&&i("p",{key:"701e7adcd6263c245635c4b742688d8a94efa8c4",class:"error"},this.error))}get el(){return s(this)}static get watchers(){return{options:["optionsChangedHandler"],themeConfig:["themeConfigChangedHandler"]}}};c.style=o;export{c as checkbox_group};
2
2
  //# sourceMappingURL=checkbox-group.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as c,h as e}from"./index-B-KMpdMZ.js";const a=".sc-checkmark-circle-icon-h{display:flex}";const r=class{constructor(e){c(this,e);this.width="20";this.height="20"}render(){return e("svg",{key:"7faa080c89efb5f8ec8185672fb62dc2e344e50d",xmlns:"http://www.w3.org/2000/svg",width:this.width,height:this.height,fill:"none",viewBox:"0 0 20 20"},e("path",{key:"dbd73c46bf2a1f02b3a39c726af835eb814ca70a",fill:"currentColor",d:"M10 2a8 8 0 1 1 0 16 8 8 0 0 1 0-16Zm0 1a7 7 0 1 0 0 14 7 7 0 0 0 0-14Zm3.358 4.646a.5.5 0 0 1 .058.638l-.058.07-4.004 4.004a.5.5 0 0 1-.638.058l-.07-.058-2-2a.5.5 0 0 1 .638-.765l.07.058L9 11.298l3.651-3.652a.5.5 0 0 1 .707 0Z"}))}};r.style=a;export{r as checkmark_circle_icon};
1
+ import{r as c,h as e}from"./index-Cbn5rIwb.js";const a=".sc-checkmark-circle-icon-h{display:flex}";const r=class{constructor(e){c(this,e);this.width="20";this.height="20"}render(){return e("svg",{key:"7faa080c89efb5f8ec8185672fb62dc2e344e50d",xmlns:"http://www.w3.org/2000/svg",width:this.width,height:this.height,fill:"none",viewBox:"0 0 20 20"},e("path",{key:"dbd73c46bf2a1f02b3a39c726af835eb814ca70a",fill:"currentColor",d:"M10 2a8 8 0 1 1 0 16 8 8 0 0 1 0-16Zm0 1a7 7 0 1 0 0 14 7 7 0 0 0 0-14Zm3.358 4.646a.5.5 0 0 1 .058.638l-.058.07-4.004 4.004a.5.5 0 0 1-.638.058l-.07-.058-2-2a.5.5 0 0 1 .638-.765l.07.058L9 11.298l3.651-3.652a.5.5 0 0 1 .707 0Z"}))}};r.style=a;export{r as checkmark_circle_icon};
2
2
  //# sourceMappingURL=checkmark-circle-icon.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as c,h as e}from"./index-B-KMpdMZ.js";const s=".sc-checkmark-icon-h{display:flex}";const t=class{constructor(e){c(this,e);this.width="18";this.height="14"}render(){return e("svg",{key:"c776eb9d7364ded492c9f96cfcc89e09aacdee1a",width:this.width,height:this.height,viewBox:"0 0 18 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e("path",{key:"4dc9061b1cfe9daea833762bf47c0c482281ec8f",d:"M1.53033 7.46967C1.23744 7.17678 0.762563 7.17678 0.46967 7.46967C0.176777 7.76256 0.176777 8.23744 0.46967 8.53033L4.96967 13.0303C5.26256 13.3232 5.73744 13.3232 6.03033 13.0303L17.0303 2.03033C17.3232 1.73744 17.3232 1.26256 17.0303 0.96967C16.7374 0.676777 16.2626 0.676777 15.9697 0.96967L5.5 11.4393L1.53033 7.46967Z",fill:"#293056"}))}};t.style=s;export{t as checkmark_icon};
1
+ import{r as c,h as e}from"./index-Cbn5rIwb.js";const s=".sc-checkmark-icon-h{display:flex}";const t=class{constructor(e){c(this,e);this.width="18";this.height="14"}render(){return e("svg",{key:"c776eb9d7364ded492c9f96cfcc89e09aacdee1a",width:this.width,height:this.height,viewBox:"0 0 18 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e("path",{key:"4dc9061b1cfe9daea833762bf47c0c482281ec8f",d:"M1.53033 7.46967C1.23744 7.17678 0.762563 7.17678 0.46967 7.46967C0.176777 7.76256 0.176777 8.23744 0.46967 8.53033L4.96967 13.0303C5.26256 13.3232 5.73744 13.3232 6.03033 13.0303L17.0303 2.03033C17.3232 1.73744 17.3232 1.26256 17.0303 0.96967C16.7374 0.676777 16.2626 0.676777 15.9697 0.96967L5.5 11.4393L1.53033 7.46967Z",fill:"#293056"}))}};t.style=s;export{t as checkmark_icon};
2
2
  //# sourceMappingURL=checkmark-icon.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as e,h as s}from"./index-B-KMpdMZ.js";const t=".sc-chevron-icon-h{display:flex}";const o=class{constructor(s){e(this,s);this.width="24";this.height="24"}render(){return s("svg",{key:"d5157915e7bdd298386e1a39a5ff368bcd5bed23",xmlns:"http://www.w3.org/2000/svg",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"none"},s("path",{key:"73dc361da279d9f01ef63a54f41e031e501d3888",fill:"currentColor",d:"M15.53 4.22a.75.75 0 0 1 0 1.06L8.81 12l6.72 6.72a.75.75 0 1 1-1.06 1.06l-7.25-7.25a.75.75 0 0 1 0-1.06l7.25-7.25a.75.75 0 0 1 1.06 0Z"}))}};o.style=t;export{o as chevron_icon};
1
+ import{r as e,h as s}from"./index-Cbn5rIwb.js";const t=".sc-chevron-icon-h{display:flex}";const r=class{constructor(s){e(this,s);this.width="24";this.height="24"}render(){return s("svg",{key:"d5157915e7bdd298386e1a39a5ff368bcd5bed23",xmlns:"http://www.w3.org/2000/svg",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"none"},s("path",{key:"73dc361da279d9f01ef63a54f41e031e501d3888",fill:"currentColor",d:"M15.53 4.22a.75.75 0 0 1 0 1.06L8.81 12l6.72 6.72a.75.75 0 1 1-1.06 1.06l-7.25-7.25a.75.75 0 0 1 0-1.06l7.25-7.25a.75.75 0 0 1 1.06 0Z"}))}};r.style=t;export{r as chevron_icon};
2
2
  //# sourceMappingURL=chevron-icon.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as c,h as e}from"./index-B-KMpdMZ.js";const s=".sc-clock-icon-h{display:flex}";const t=class{constructor(e){c(this,e);this.width="16";this.height="16"}render(){return e("svg",{key:"bf1c88c81ca1438ce4639d12e4ace969b94e0230",width:this.width,height:this.height,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e("path",{key:"0ed68b74d2f894e6697dff600a8c40d17e3eb9c5",d:"M8 0.5C12.1421 0.5 15.5 3.85786 15.5 8C15.5 12.1421 12.1421 15.5 8 15.5C3.85786 15.5 0.5 12.1421 0.5 8C0.5 3.85786 3.85786 0.5 8 0.5ZM8 1.4375C4.37563 1.4375 1.4375 4.37563 1.4375 8C1.4375 11.6244 4.37563 14.5625 8 14.5625C11.6244 14.5625 14.5625 11.6244 14.5625 8C14.5625 4.37563 11.6244 1.4375 8 1.4375ZM7.53125 3.3125C7.76137 3.3125 7.95276 3.47832 7.99245 3.69699L8 3.78125V8H10.3438C10.6026 8 10.8125 8.20987 10.8125 8.46875C10.8125 8.69887 10.6467 8.89026 10.428 8.92995L10.3438 8.9375H7.53125C7.30113 8.9375 7.10974 8.77168 7.07005 8.55301L7.0625 8.46875V3.78125C7.0625 3.52237 7.27237 3.3125 7.53125 3.3125Z",fill:"currentColor"}))}};t.style=s;export{t as clock_icon};
1
+ import{r as c,h as e}from"./index-Cbn5rIwb.js";const s=".sc-clock-icon-h{display:flex}";const t=class{constructor(e){c(this,e);this.width="16";this.height="16"}render(){return e("svg",{key:"bf1c88c81ca1438ce4639d12e4ace969b94e0230",width:this.width,height:this.height,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e("path",{key:"0ed68b74d2f894e6697dff600a8c40d17e3eb9c5",d:"M8 0.5C12.1421 0.5 15.5 3.85786 15.5 8C15.5 12.1421 12.1421 15.5 8 15.5C3.85786 15.5 0.5 12.1421 0.5 8C0.5 3.85786 3.85786 0.5 8 0.5ZM8 1.4375C4.37563 1.4375 1.4375 4.37563 1.4375 8C1.4375 11.6244 4.37563 14.5625 8 14.5625C11.6244 14.5625 14.5625 11.6244 14.5625 8C14.5625 4.37563 11.6244 1.4375 8 1.4375ZM7.53125 3.3125C7.76137 3.3125 7.95276 3.47832 7.99245 3.69699L8 3.78125V8H10.3438C10.6026 8 10.8125 8.20987 10.8125 8.46875C10.8125 8.69887 10.6467 8.89026 10.428 8.92995L10.3438 8.9375H7.53125C7.30113 8.9375 7.10974 8.77168 7.07005 8.55301L7.0625 8.46875V3.78125C7.0625 3.52237 7.27237 3.3125 7.53125 3.3125Z",fill:"currentColor"}))}};t.style=s;export{t as clock_icon};
2
2
  //# sourceMappingURL=clock-icon.entry.js.map