@nylas/react 0.0.0-canary-20240925163706

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 (135) hide show
  1. package/LICENSE.md +22 -0
  2. package/README.md +111 -0
  3. package/dist/add-circle-icon_2.entry-19a0fe6b.js +25 -0
  4. package/dist/add-circle-icon_2.entry-6f0ef50b.cjs +1 -0
  5. package/dist/archive-icon.entry-7caa062b.js +15 -0
  6. package/dist/archive-icon.entry-d9a39415.cjs +1 -0
  7. package/dist/arrow-icon.entry-29ce2105.cjs +1 -0
  8. package/dist/arrow-icon.entry-ab601786.js +15 -0
  9. package/dist/bold-icon.entry-6ff126e7.cjs +1 -0
  10. package/dist/bold-icon.entry-e389dd6a.js +15 -0
  11. package/dist/button-component_2.entry-06af034d.js +26 -0
  12. package/dist/button-component_2.entry-837792bd.cjs +1 -0
  13. package/dist/calendar-agenda-fill-icon_51.entry-6c5c6fd4.js +5336 -0
  14. package/dist/calendar-agenda-fill-icon_51.entry-aaa927bb.cjs +7 -0
  15. package/dist/calendar-cancel-icon.entry-bf97fa74.js +15 -0
  16. package/dist/calendar-cancel-icon.entry-da33711a.cjs +1 -0
  17. package/dist/calendar-check-icon_2.entry-0fcc2bd1.cjs +1 -0
  18. package/dist/calendar-check-icon_2.entry-e9709591.js +25 -0
  19. package/dist/calendar-icon.entry-056c8caf.cjs +1 -0
  20. package/dist/calendar-icon.entry-70cca97a.js +15 -0
  21. package/dist/checkbox-component_2.entry-88af9f01.js +79 -0
  22. package/dist/checkbox-component_2.entry-cf19cd62.cjs +1 -0
  23. package/dist/chevron-icon_3.entry-1c22f6d3.js +143 -0
  24. package/dist/chevron-icon_3.entry-85d098ed.cjs +1 -0
  25. package/dist/clock-icon_4.entry-5edf8fcd.js +45 -0
  26. package/dist/clock-icon_4.entry-7b892d79.cjs +1 -0
  27. package/dist/constants-c31dccfe-54f255f4.cjs +15 -0
  28. package/dist/constants-c31dccfe-93b0694c.js +3883 -0
  29. package/dist/copy-icon.entry-b3b8e543.js +15 -0
  30. package/dist/copy-icon.entry-fcd2c006.cjs +1 -0
  31. package/dist/core-js-38e53e34.cjs +4 -0
  32. package/dist/core-js-a9d3b6e1.js +3297 -0
  33. package/dist/delete-icon.entry-9745ae8b.cjs +1 -0
  34. package/dist/delete-icon.entry-f982c1a7.js +15 -0
  35. package/dist/document-refresh-icon.entry-5a30a275.cjs +1 -0
  36. package/dist/document-refresh-icon.entry-defaaba2.js +15 -0
  37. package/dist/dom-68f08be9.cjs +15 -0
  38. package/dist/dom-86e17616.js +664 -0
  39. package/dist/elements/index.d.ts +128 -0
  40. package/dist/elements/react-component-lib/createComponent.d.ts +10 -0
  41. package/dist/elements/react-component-lib/createOverlayComponent.d.ts +21 -0
  42. package/dist/elements/react-component-lib/index.d.ts +2 -0
  43. package/dist/elements/react-component-lib/interfaces.d.ts +29 -0
  44. package/dist/elements/react-component-lib/utils/attachProps.d.ts +9 -0
  45. package/dist/elements/react-component-lib/utils/case.d.ts +2 -0
  46. package/dist/elements/react-component-lib/utils/dev.d.ts +2 -0
  47. package/dist/elements/react-component-lib/utils/index.d.ts +10 -0
  48. package/dist/feedbackSync-ab657d65-b98458dc.cjs +448 -0
  49. package/dist/feedbackSync-ab657d65-d6521095.js +6035 -0
  50. package/dist/folder-icon.entry-08cf370b.js +15 -0
  51. package/dist/folder-icon.entry-425f61ef.cjs +1 -0
  52. package/dist/forward-icon.entry-4acbada4.js +15 -0
  53. package/dist/forward-icon.entry-7062edbf.cjs +1 -0
  54. package/dist/globe-icon.entry-51e847a3.js +15 -0
  55. package/dist/globe-icon.entry-b779a059.cjs +1 -0
  56. package/dist/google-logo-icon_4.entry-96a8caee.cjs +1 -0
  57. package/dist/google-logo-icon_4.entry-c44f16cc.js +715 -0
  58. package/dist/inbox-icon.entry-04d81697.cjs +1 -0
  59. package/dist/inbox-icon.entry-6e3a9428.js +15 -0
  60. package/dist/index-87381561.cjs +81 -0
  61. package/dist/index-995dd3b3.js +12865 -0
  62. package/dist/index.d.ts +6 -0
  63. package/dist/index.es-b475d61f-f250d992.cjs +7 -0
  64. package/dist/index.es-b475d61f-f52875ad.js +3129 -0
  65. package/dist/info-icon_2.entry-c3f4b245.js +34 -0
  66. package/dist/info-icon_2.entry-d733f421.cjs +1 -0
  67. package/dist/input-color-picker.entry-02e48131.js +48 -0
  68. package/dist/input-color-picker.entry-516445b9.cjs +1 -0
  69. package/dist/input-component.entry-5bb8197a.cjs +1 -0
  70. package/dist/input-component.entry-dbff4e12.js +70 -0
  71. package/dist/input-dropdown.entry-7b40f8a7.cjs +1 -0
  72. package/dist/input-dropdown.entry-cc4182c4.js +134 -0
  73. package/dist/italic-icon.entry-494a04f1.js +15 -0
  74. package/dist/italic-icon.entry-bd268b46.cjs +1 -0
  75. package/dist/multi-select-dropdown.entry-55f7dd99.cjs +1 -0
  76. package/dist/multi-select-dropdown.entry-b9ac9a80.js +95 -0
  77. package/dist/nylas-booked-event-card_12.entry-a1048d4e.cjs +1 -0
  78. package/dist/nylas-booked-event-card_12.entry-ac8f1a11.js +1139 -0
  79. package/dist/nylas-form-card.entry-9957f25c.cjs +1 -0
  80. package/dist/nylas-form-card.entry-9ec44108.js +57 -0
  81. package/dist/nylas-if-state.entry-934980c1.js +94 -0
  82. package/dist/nylas-if-state.entry-f7087bb0.cjs +1 -0
  83. package/dist/nylas-login.entry-074778e6.cjs +1 -0
  84. package/dist/nylas-login.entry-17a6788a.js +73 -0
  85. package/dist/nylas-provider.entry-0edfffb0.cjs +1 -0
  86. package/dist/nylas-provider.entry-58e44ef6.js +264 -0
  87. package/dist/nylas-reminder-emails.entry-0129ea1f.cjs +4 -0
  88. package/dist/nylas-reminder-emails.entry-dec904fb.js +168 -0
  89. package/dist/nylas-reminder-time_2.entry-48b85638.js +108 -0
  90. package/dist/nylas-reminder-time_2.entry-6d8982d9.cjs +1 -0
  91. package/dist/nylas-scheduler-editor.entry-a913f2b3.js +1447 -0
  92. package/dist/nylas-scheduler-editor.entry-b293366d.cjs +2 -0
  93. package/dist/nylas-scheduling.entry-29b473ef.js +400 -0
  94. package/dist/nylas-scheduling.entry-5d751778.cjs +1 -0
  95. package/dist/nylas-time-window-picker.entry-aa613b4d.cjs +1 -0
  96. package/dist/nylas-time-window-picker.entry-d2e2210e.js +316 -0
  97. package/dist/person-icon.entry-11852b43.cjs +1 -0
  98. package/dist/person-icon.entry-767695db.js +15 -0
  99. package/dist/play-icon.entry-125d062f.cjs +1 -0
  100. package/dist/play-icon.entry-9e385af9.js +15 -0
  101. package/dist/react.cjs +1 -0
  102. package/dist/react.js +136 -0
  103. package/dist/refresh-icon.entry-13e06ddd.cjs +1 -0
  104. package/dist/refresh-icon.entry-339c1223.js +15 -0
  105. package/dist/register-component-679c1308-0b6682e1.cjs +1 -0
  106. package/dist/register-component-679c1308-3b561946.js +109 -0
  107. package/dist/reply-all-icon.entry-e56e8608.cjs +1 -0
  108. package/dist/reply-all-icon.entry-f82e7b24.js +15 -0
  109. package/dist/reply-icon.entry-319e75df.js +15 -0
  110. package/dist/reply-icon.entry-ebb08667.cjs +1 -0
  111. package/dist/scheduler-config-store-2a3b403d-aed2458a.cjs +1 -0
  112. package/dist/scheduler-config-store-2a3b403d-f5b7b06f.js +27 -0
  113. package/dist/scheduler-store-908886c8-75b1f2d8.js +474 -0
  114. package/dist/scheduler-store-908886c8-9c388312.cjs +1 -0
  115. package/dist/sent-icon.entry-2f7a8e18.js +15 -0
  116. package/dist/sent-icon.entry-393a90a3.cjs +1 -0
  117. package/dist/spam-icon.entry-d7853085.cjs +1 -0
  118. package/dist/spam-icon.entry-de7c7233.js +15 -0
  119. package/dist/star-icon.entry-c8fa29e1.cjs +1 -0
  120. package/dist/star-icon.entry-cfb5c8e5.js +15 -0
  121. package/dist/stop-icon.entry-c6e9fd7f.js +15 -0
  122. package/dist/stop-icon.entry-e5415d24.cjs +1 -0
  123. package/dist/textarea-component.entry-6f80f914.js +37 -0
  124. package/dist/textarea-component.entry-d46ad4ac.cjs +1 -0
  125. package/dist/time-period-selector.entry-2eaf3ddb.cjs +1 -0
  126. package/dist/time-period-selector.entry-f8be5854.js +80 -0
  127. package/dist/translate-icon.entry-dc151da3.cjs +1 -0
  128. package/dist/translate-icon.entry-ffb6d5bf.js +15 -0
  129. package/dist/trash-fill-icon.entry-063b2e26.cjs +1 -0
  130. package/dist/trash-fill-icon.entry-a9966957.js +15 -0
  131. package/dist/underline-icon.entry-b992a0fc.js +15 -0
  132. package/dist/underline-icon.entry-c77e97df.cjs +1 -0
  133. package/dist/warning-icon.entry-0cae2440.cjs +1 -0
  134. package/dist/warning-icon.entry-28c1b03b.js +15 -0
  135. package/package.json +50 -0
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-87381561.cjs"),E=require("./index.es-b475d61f-f250d992.cjs"),D=require("./scheduler-store-908886c8-9c388312.cjs"),A=require("./constants-c31dccfe-54f255f4.cjs"),x=require("./feedbackSync-ab657d65-b98458dc.cjs");require("react");require("react-dom");class q{constructor({schedulerAPIURL:t,nylasSchedulerStore:i,sessionId:a,configId:s,slug:d,clientId:r}){if(!t)throw new Error("schedulerAPIURL is required");if(!i)throw new Error("nylasSchedulerStore is required");if(!a&&!s&&!(d||r))throw new Error("sessionId is required for private configs. If using public config either pass a configurationId or a combination of slug and clientId.");t==="/"&&(t=new URL(window.location.href).origin),this.configId=s,this.sessionId=a,this.schedulerAPIURL=t,this.nylasSchedulerStore=i,this.slug=d,this.clientId=r}init(){e.debug("NylasConnector init")}get schedulerStore(){return this.nylasSchedulerStore}get scheduler(){return this._schedulerAPIConnector?this._schedulerAPIConnector:(this._schedulerAPIConnector=new D.NylaSchedulerAPIConnector({schedulerAPIURL:this.schedulerAPIURL,schedulerStore:this.schedulerStore,sessionId:this.sessionId,configId:this.configId,slug:this.slug,clientId:this.clientId}),this._schedulerAPIConnector)}resetStores(){this.nylasSchedulerStore.reset()}}const w=(n,t)=>{const i=n.isLoading,a=n.showNotification,s=n.nylasBranding;return e.h(e.Fragment,null,a&&e.h("nylas-notification",null),i&&e.h("div",{class:"loading"},e.h("div",{class:"left"},e.h("div",{class:"skeleton"})),e.h("div",{class:"right"},e.h("div",{class:"skeleton"}),e.h("div",{class:"skeleton"}),e.h("div",{class:"skeleton"}),e.h("div",{class:"skeleton"}),e.h("div",{class:"skeleton"}))),!i&&t,e.h("div",{class:"footer"},s&&e.h(e.Fragment,null,"Powered by ",e.h("nylas-logo",null))))},N=(n,t)=>e.h("div",{class:"message-banner"},t),W=':host{display:flex;flex-direction:column;overflow:visible;border-radius:var(--nylas-border-radius-2x);width:fit-content;background:var(--nylas-base-0);position:relative;box-shadow:0px 4px 8px 2px rgba(0, 0, 0, 0.05), 0px 8px 16px -2px rgba(0, 0, 0, 0.1);--nylas-primary:#2563eb;--nylas-error:#cc4841;--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-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;font-family:var(--nylas-font-family);font-optical-sizing:auto;font-style:normal;font-variation-settings:"slnt" 0}@media screen and (max-width: 768px){:host{width:auto;min-width:325px}}:root{font-family:inherit}.error{padding:8rem 12rem;color:var(--nylas-base-0);background-color:var(--nylas-error);margin:1.5rem;border-radius:var(--nylas-border-radius-2x)}.message-banner{text-align:right;color:var(--nylas-base-800);padding:1rem;border-bottom:1px solid var(--nylas-color-primary-200);margin:0}.loading{margin:1.5rem;display:flex;gap:1rem}.loading .skeleton{border-radius:var(--nylas-border-radius-2x);animation:pulsate 1.5s infinite}.loading .skeleton:nth-child(2){animation-delay:-100ms}.loading .skeleton:nth-child(3){animation-delay:-200ms}.loading .skeleton:nth-child(4){animation-delay:-300ms}.loading .skeleton:nth-child(5){animation-delay:-400ms}.loading .left .skeleton{height:100%;width:400px}.loading .right .skeleton{height:5rem;width:300px;margin-bottom:1rem}.loading .right .skeleton:last-child{margin-bottom:0}@keyframes pulsate{0%{background-color:var(--nylas-base-50)}50%{background-color:var(--nylas-base-100)}100%{background-color:var(--nylas-base-50)}}.select-date-page,.additional-data-page,.booked-event-page,.manual-confirmation-page,.cancelled-event-page,.cancel-flow-page{border-top-left-radius:var(--nylas-border-radius-2x);border-top-right-radius:var(--nylas-border-radius-2x)}.select-date-page,.additional-data-page{display:flex}@media screen and (max-width: 768px){.select-date-page,.additional-data-page{flex-direction:column}}.booked-event-page,.manual-confirmation-page{background-color:var(--nylas-base-50)}.cancelled-event-page,.manual-confirmation-page,.cancel-flow-page{padding:1rem;height:496px;display:flex;justify-content:center;align-items:center}.booked-event-page,.manual-confirmation-page,.cancelled-event-page,.cancel-flow-page{min-width:784px;background:var(--nylas-base-50)}@media screen and (max-width: 768px){.booked-event-page,.manual-confirmation-page,.cancelled-event-page,.cancel-flow-page{min-width:90%}}.left-panel{display:flex;flex-direction:column;min-width:424px;border-top-left-radius:inherit;background:var(--nylas-base-0);position:relative;padding:1rem 0 0 0;height:624px}@media screen and (max-width: 768px){.left-panel{border-top-right-radius:inherit;min-width:unset;height:auto}}@media screen and (max-width: 768px){.select-date-page .left-panel{padding:0.5rem 4px 0;height:624px}}.border{margin-left:-20px;margin-right:-20px;border-top-width:1px;height:0.5px;background-color:var(--nylas-base-200)}@media screen and (max-width: 768px){.border{display:none}}.right-panel{min-width:360px;width:360px;background-color:var(--nylas-base-50);height:624px;padding-top:16px;border-left:1px solid var(--nylas-base-200);border-top-right-radius:inherit}.right-panel.reschedule{border-top-right-radius:0px}@media screen and (max-width: 768px){.right-panel{border-top-right-radius:0px;width:inherit;min-width:unset;height:auto}}.right-panel h2{display:flex;margin:0;height:48px;gap:0.5rem;justify-content:center;align-items:center;width:auto;font-size:1.125rem;line-height:1.5rem;font-weight:500;text-align:center;color:var(--nylas-base-800)}.additional-data-page .left-panel{background-color:var(--nylas-base-50)}.additional-data-page .right-panel{background-color:var(--nylas-base-0)}nylas-selected-event-card{height:604px;padding:0 1rem}@media screen and (max-width: 768px){nylas-selected-event-card{height:250px}}.footer{display:flex;justify-content:flex-end;align-items:center;padding:16px;font-size:14px;font-weight:300;color:var(--nylas-base-500);border-top:1px solid var(--nylas-base-200);min-height:24px}.footer svg{fill:var(--nylas-base-500)}.footer svg{margin-top:1px}nylas-selected-event-card::part(nsec__timezone){position:absolute;bottom:0}nylas-notification{margin:1.5rem;width:-webkit-fill-available;width:-moz-available;position:absolute}nylas-locale-switch{position:absolute;padding:18px 20px;bottom:0;width:-webkit-fill-available;width:-moz-available;border-top:1px solid var(--nylas-base-200)}@media screen and (max-width: 768px){nylas-locale-switch{height:auto}}nylas-date-picker{padding:0 20px}button-component#report-issue{width:auto;position:absolute;bottom:4px;left:16px}nylas-feedback-form{position:absolute;top:0;height:100%;width:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;background:rgba(0, 0, 0, 0.6);z-index:2;border-radius:inherit}',$=W,M={title:e.instance.t("genericErrorTitle"),type:E.nr.Error,category:D.ErrorCategory.Component},j=class{constructor(n){e.registerInstance(this,n),this.init=e.createEvent(this,"init",7),this.schedulerWillLoad=e.createEvent(this,"schedulerWillLoad",7),this.schedulerDidLoad=e.createEvent(this,"schedulerDidLoad",7),this.nylasSchedulerError=e.createEvent(this,"nylasSchedulerError",7),this.configSettingsLoaded=e.createEvent(this,"configSettingsLoaded",7),this.bookingRefExtracted=e.createEvent(this,"bookingRefExtracted",7),this.bookedEventInfo=e.createEvent(this,"bookedEventInfo",7),this.mode="app",this.defaultSchedulerState=void 0,this.sessionId=void 0,this.schedulerApiUrl="https://api.us.nylas.com",this.bookingInfo=void 0,this.rescheduleBookingRef=void 0,this.cancelBookingRef=void 0,this.organizerConfirmationBookingRef=void 0,this.configurationId=void 0,this.slug=void 0,this.clientId=void 0,this.nylasBranding=!0,this.eventOverrides={},this.isLoading=void 0,this.themeConfig=void 0,this.localization=void 0,this.showNotification=!0,this.enableUserFeedback=!0,this.automaticComponentRegistration=!0,this.selectedDateLabel=new Date().toLocaleDateString(void 0,{dateStyle:"full"})||`${e.instance.t("noDateSelected")}`,this.refConfigId=void 0,this.language=navigator.language,this.showFeedbackModal=!1}connectedCallback(){e.debug("[nylas-scheduler] connectedCallback")}async componentWillLoad(){var s,d;e.debug("[nylas-scheduler] Component will load"),this.enableUserFeedback&&!x.isInitialized()&&x.init({dsn:"https://9d5731f1c77ca84c9ed3fb9b3ccf7ee1@o74852.ingest.us.sentry.io/4507889638178816",release:"1.1.3",integrations:r=>[...r.filter(o=>!1),x.feedbackSyncIntegration({colorScheme:"system",autoInject:!1})],autoSessionTracking:!1,beforeSend:()=>null});const n=this.schedulerWillLoad.emit(this.host);if("schedulerWillLoad"in this.eventOverrides&&(await this.eventOverrides.schedulerWillLoad(n,this.nylasSchedulerConnector),n.defaultPrevented))return;this.stores={scheduler:D.CreateNylasSchedulerStore({bookingInfo:this.bookingInfo,nylasBranding:this.nylasBranding,...this.defaultSchedulerState})},this.baseProvider=new E.NylasBaseProvider(this.host,this.stores,this.automaticComponentRegistration,this.eventOverrides),this.refConfigId=this.configurationId;let t;if(this.rescheduleBookingRef){const[r,o,c]=e.compactStringToUUIDs(this.rescheduleBookingRef);this.refConfigId=r,this.stores.scheduler.set("rescheduleBookingId",o),t=this.bookingRefExtracted.emit({configurationId:r,bookingId:o})}else if(this.cancelBookingRef){const[r,o,c]=e.compactStringToUUIDs(this.cancelBookingRef);this.refConfigId=r,this.stores.scheduler.set("cancelBookingId",o),t=this.bookingRefExtracted.emit({configurationId:r,bookingId:o})}else if(this.organizerConfirmationBookingRef){const[r,o,c]=e.compactStringToUUIDs(this.organizerConfirmationBookingRef);this.refConfigId=r,this.stores.scheduler.set("organizerConfirmationBookingId",o),this.stores.scheduler.set("organizerConfirmationSalt",c),t=this.bookingRefExtracted.emit({configurationId:r,bookingId:o,salt:c})}if("bookingRefExtracted"in this.eventOverrides&&(await this.eventOverrides.bookingRefExtracted(t,this.nylasSchedulerConnector),t.defaultPrevented)||!this.checkIfSessionIdOrConfigIdExists())return;const i=(s=this.baseProvider)==null?void 0:s.getStore("scheduler");this.nylasSchedulerConnector=new q({schedulerAPIURL:this.schedulerApiUrl,sessionId:this.sessionId,configId:this.refConfigId,slug:this.slug,clientId:this.clientId,nylasSchedulerStore:i});const a=this.init.emit(this.host);"init"in this.eventOverrides&&(await this.eventOverrides.init(a,this.nylasSchedulerConnector),a.defaultPrevented)||((d=this.baseProvider)==null||d.componentWillLoad(this.nylasSchedulerConnector),this.applyThemeConfig(this.themeConfig))}async componentDidLoad(){var c,k,b,g,m,f,u,_;(c=this.baseProvider)==null||c.componentDidLoad();const n=this.schedulerDidLoad.emit(this.host);if("schedulerDidLoad"in this.eventOverrides&&(await this.eventOverrides.schedulerDidLoad(n,this.nylasSchedulerConnector),n.defaultPrevented)||!this.checkIfSessionIdOrConfigIdExists())return;this.localizationChanged(this.localization);const t=await((k=this.nylasSchedulerConnector)==null?void 0:k.scheduler.getUISettings());if(!t||"error"in t){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(t==null?void 0:t.error)},host:this.host});return}else{"data"in t&&((b=t.data)!=null&&b.appearance)&&console.info("Appearance settings have been returned from the configuration used byt his scheduling page; please remember to grab them from the configSettingsLoaded event and apply them as desired.");const h=this.configSettingsLoaded.emit({settings:t});if("configSettingsLoaded"in this.eventOverrides&&(await this.eventOverrides.configSettingsLoaded(h,this.nylasSchedulerConnector),h.defaultPrevented))return}const i=(g=this.baseProvider)==null?void 0:g.getStore("scheduler"),a=(f=(m=i==null?void 0:i.get("configSettings"))==null?void 0:m.scheduler)==null?void 0:f.available_days_in_future,s=i==null?void 0:i.get("selectedTimeslot");if(s&&(s!=null&&s.start_time)){if(!this.isTimeslotValid(s))return;if(i!=null&&i.get("showBookingForm")){i==null||i.set("selectedDate",s.start_time);return}}const d=i==null?void 0:i.get("selectedDate"),r=i==null?void 0:i.get("availability");let o;if(!(r&&r.length>0)){if(d){const{startTime:h,endTime:l,endTimeForAvailableDaysInFuture:v}=this.validateAvailableDaysInFuture(d,a||30);d.getTime()<v*1e3&&(o=await((_=this.nylasSchedulerConnector)==null?void 0:_.scheduler.getAvailability(h,l)))}else{const h=new Date,{startTime:l,endTime:v,endTimeForAvailableDaysInFuture:C}=this.validateAvailableDaysInFuture(h,a||30);h.getTime()<C*1e3&&(o=await((u=this.nylasSchedulerConnector)==null?void 0:u.scheduler.getAvailability(l,v)))}if((!o||"error"in o)&&this.nylasSchedulerError.emit({notification:{...this.getErrorObject(o==null?void 0:o.error)},host:this.host}),!d){let h=new Date;const l=i==null?void 0:i.get("availability").find(v=>new Date(v.start_time)>new Date);l&&(h=l.start_time),i==null||i.set("selectedDate",h)}}}componentDisconnected(){var n;(n=this.baseProvider)==null||n.componentDisconnected()}bookingInfoChanged(n){var t;(t=this.stores)==null||t.scheduler.set("bookingInfo",n)}rescheduleBookingRefChanged(n){var t,i;if(n){const[a,s]=e.compactStringToUUIDs(n);(t=this.stores)==null||t.scheduler.set("rescheduleBookingId",s),this.refConfigId=a,(i=this.nylasSchedulerConnector)==null||i.scheduler.setConfigId(a)}}cancelBookingRefChanged(n){var t,i;if(n){const[a,s]=e.compactStringToUUIDs(n);(t=this.stores)==null||t.scheduler.set("cancelBookingId",s),this.refConfigId=a,(i=this.nylasSchedulerConnector)==null||i.scheduler.setConfigId(a)}}organizerConfirmationBookingRefChanged(n){var t,i;if(n){const[a,s]=e.compactStringToUUIDs(n);(t=this.stores)==null||t.scheduler.set("organizerConfirmationBookingId",s),this.refConfigId=a,(i=this.nylasSchedulerConnector)==null||i.scheduler.setConfigId(a)}}localizationChanged(n){n&&Object.keys(n).forEach(t=>{t in A.LANGUAGE_CODE&&(e.instance.addResourceBundle(t,"translation",n[t],!1,!0),this.language=this.language)})}themeConfigChanged(n){this.applyThemeConfig(n)}languageChanged(n){const t=n.detail;this.language=t,e.instance.changeLanguage(t)}async registerComponentHandler(n){var t;(t=this.baseProvider)==null||t.registerComponent(n.detail)}async unregisterComponentHandler(n){var t;(t=this.baseProvider)==null||t.unregisterComponent(n.detail)}async monthChangedHandler(n){var r,o,c,k,b,g,m;const t=n.detail,i=(k=(c=(o=(r=this.nylasSchedulerConnector)==null?void 0:r.schedulerStore)==null?void 0:o.get("configSettings"))==null?void 0:c.scheduler)==null?void 0:k.available_days_in_future,{startTime:a,endTime:s,endTimeForAvailableDaysInFuture:d}=this.validateAvailableDaysInFuture(t,i||30);if(a<d&&t.getTime()<d*1e3){const f=await((b=this.nylasSchedulerConnector)==null?void 0:b.scheduler.getAvailability(a,s));(!f||"error"in f)&&this.nylasSchedulerError.emit({notification:{...this.getErrorObject(f==null?void 0:f.error)},host:this.host});const u=(g=this.stores)==null?void 0:g.scheduler.get("selectableDates");u&&u.length>0&&((m=this.stores)==null||m.scheduler.set("selectedDate",u[0]))}}mapToBookingData(n){var r,o,c;const t=(r=this.stores)==null?void 0:r.scheduler.get("selectedTimeslot"),i=(o=this.stores)==null?void 0:o.scheduler.get("selectedLanguage"),a=(c=this.stores)==null?void 0:c.scheduler.get("selectedTimezone"),s=t!=null&&t.start_time?new Date(t==null?void 0:t.start_time).getTime()/1e3:"",d=t!=null&&t.end_time?new Date(t==null?void 0:t.end_time).getTime()/1e3:"";return{additional_guests:n.guests,guest:n.primaryParticipant,additional_fields:n.additionalFields,start_time:s,end_time:d,email_language:i,timezone:a}}async bookButtonClickedHandler(n){var b,g,m,f,u,_,h;const t=n.detail,i=this.mapToBookingData(t),s={...(g=(b=this.nylasSchedulerConnector)==null?void 0:b.schedulerStore)==null?void 0:g.get("bookingInfo"),...t};(m=this.stores)==null||m.scheduler.set("bookingInfo",s);const r=(u=(f=this.nylasSchedulerConnector)==null?void 0:f.schedulerStore)==null?void 0:u.get("rescheduleBookingId");if(r){const l=await((_=this.nylasSchedulerConnector)==null?void 0:_.scheduler.rescheduleBooking(r,t));(!l||"error"in l)&&this.nylasSchedulerError.emit({notification:{...this.getErrorObject(l==null?void 0:l.error)},host:this.host});const v=l==null?void 0:l.data,C=this.bookedEventInfo.emit({...l,data:{...v,...i}});"bookedEventInfo"in this.eventOverrides&&await this.eventOverrides.bookedEventInfo(C,this.nylasSchedulerConnector);return}const o=await((h=this.nylasSchedulerConnector)==null?void 0:h.scheduler.bookTimeslot(t));(!o||"error"in o)&&this.nylasSchedulerError.emit({notification:{...this.getErrorObject(o==null?void 0:o.error)},host:this.host});const c=o==null?void 0:o.data,k=this.bookedEventInfo.emit({...o,data:{...c,...i}});"bookedEventInfo"in this.eventOverrides&&await this.eventOverrides.bookedEventInfo(k,this.nylasSchedulerConnector)}dateSelectedHandler(n){const t=n.detail;this.selectedDateLabel=t?t.toLocaleDateString(void 0,{dateStyle:"full"}):`${e.instance.t("noDateSelected")}`}cancelBookedEventErrorHandler(n){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(n.detail.error)},host:this.host})}cancelBookedEventValidationErrorHandler(n){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(n.detail.error)},host:this.host})}rescheduleBookedEventErrorHandler(n){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(n.detail.error)},host:this.host})}confirmBookingErrorHandler(n){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(n.detail.error)},host:this.host})}feedbackModalClosedHandler(){this.showFeedbackModal=!1}feedbackSubmittedHandler(n){const i={eventId:x.captureMessage("Scheduling Page User Feedback"),message:n.detail.feedback};x.captureFeedback(i,{includeReplay:!0,captureContext:{tags:{"nylas-web-element":"nylas-schduling","nylas-web-element-version":"1.1.3"},extra:{configId:this.configurationId,slug:this.slug}}}),this.showFeedbackModal=!1}async getNylasSchedulerStore(){var n;return(n=this.baseProvider)==null?void 0:n.getStore("scheduler")}async getNylasSchedulerConnector(){return this.nylasSchedulerConnector}async getRef(){return this.host}getErrorObject(n){return{title:(n==null?void 0:n.title)||M.title,category:(n==null?void 0:n.category)||M.category,type:E.nr.Error,description:(n==null?void 0:n.message)||"",id:new Date().getTime().toString(),ttl:"none"}}checkIfSessionIdOrConfigIdExists(){if(!this.sessionId&&!this.refConfigId&&!(this.slug&&this.clientId)){let n="";return this.sessionId||(n+=e.instance.t("sessionIdRequiredErrorMessage")),!this.sessionId&&!this.refConfigId&&!(this.slug&&this.clientId)&&(n=e.instance.t("sessionIdRequiredErrorMessage")+" "+e.instance.t("publicConfigErrorMessage")),this.nylasSchedulerError.emit({notification:{title:e.instance.t("schedulingComponentErrorTitle"),category:D.ErrorCategory.Component,type:E.nr.Error,description:n,id:new Date().getTime().toString(),ttl:"none"},host:this.host}),!1}return!0}isTimeslotValid(n){return new Date(n.start_time)<new Date?(this.nylasSchedulerError.emit({notification:{title:e.instance.t("invalidTimeslotErrorTitle"),category:D.ErrorCategory.Component,type:E.nr.Error,description:e.instance.t("invalidTimeslotErrorMessage"),id:new Date().getTime().toString(),ttl:"none"},host:this.host}),!1):!0}validateAvailableDaysInFuture(n,t){const i=new Date,a=new Date(n.getFullYear(),n.getMonth(),1).getTime()/1e3,s=new Date(n.getFullYear(),n.getMonth()+1,1).getTime()/1e3,d=Math.floor(e.addDaysToCurrentDate(i,t).getTime()/1e3),r=Math.min(d,s);return{startTime:a<i.getTime()/1e3?Math.floor(i.getTime()/1e3):a,endTime:r,endTimeForAvailableDaysInFuture:d}}applyThemeConfig(n){if(n)for(const[t,i]of Object.entries(n))this.host.style.setProperty(`${t}`,i)}onFeedbackClick(){this.showFeedbackModal=!0}render(){var u,_,h,l,v,C,T,L,F,S,z;const n=this.mode==="app",t=(u=this.baseProvider)==null?void 0:u.getStore("scheduler"),i=t==null?void 0:t.get("eventInfo"),a=t==null?void 0:t.get("showBookingForm"),s=t==null?void 0:t.get("cancelledEventInfo"),d=t==null?void 0:t.get("cancelBookingId"),r=t==null?void 0:t.get("selectedTimeslot"),o=t==null?void 0:t.get("rescheduleBookingId"),c=t==null?void 0:t.get("organizerConfirmationBookingId"),k=t==null?void 0:t.get("rejectBookingId"),b=t==null?void 0:t.get("confirmedEventInfo"),g=(t==null?void 0:t.get("nylasBranding"))||this.nylasBranding,m=t==null?void 0:t.get("selectedDate"),f=(h=(_=t==null?void 0:t.get("configSettings"))==null?void 0:_.scheduler)==null?void 0:h.confirmation_redirect_url;if(this.selectedDateLabel=m&&this.language?e.capitalizeFirstLetter(m.toLocaleDateString(A.LANGUAGE_CODE_MAP[this.language],{dateStyle:"full"})):`${e.instance.t("noDateSelected")}`,n&&(d||k)&&!s)return e.h(e.Host,null,e.h(w,{nylasBranding:g,isLoading:this.isLoading,showNotification:this.showNotification},e.h("div",{class:"cancel-flow-page",part:"cancel-flow-page"},e.h("nylas-cancel-booking-form",{selectedTimeslot:r,cancelBookingId:d,rejectBookingId:k,exportparts:"ncbf, ncbf__icon, ncbf__title, ncbf__description, ncbf__reason-textarea, ncbf__button-cta, ncbf__button-outline, ncbf__card"}))),this.enableUserFeedback&&e.h("button-component",{id:"report-issue",variant:"basic",onClick:()=>this.onFeedbackClick()},e.h("feedback-icon",null)),this.showFeedbackModal&&e.h("nylas-feedback-form",null));if(n&&c)return e.h(e.Host,null,e.h(w,null,e.h("div",{class:"manual-confirmation-page",part:"manual-confirmation-page"},e.h("nylas-organizer-confirmation-card",{organizerConfirmationBookingId:c,exportparts:"nmcc, nmcc__title, nmcc__description, nmcc__button-cta, nmcc__button-outline"}))),this.enableUserFeedback&&e.h("button-component",{id:"report-issue",variant:"basic",onClick:()=>this.onFeedbackClick()},e.h("feedback-icon",null)),this.showFeedbackModal&&e.h("nylas-feedback-form",null));if(n&&s)return e.h(e.Host,null,e.h(w,{nylasBranding:g,isLoading:this.isLoading,showNotification:this.showNotification},e.h("div",{class:"cancelled-event-page",part:"cancelled-event-page"},e.h("nylas-cancelled-event-card",{cancelledEventInfo:s,exportparts:"ncec, ncec__icon, ncec__title, ncec__description, ncec__button-outline, ncec__card"}))),this.enableUserFeedback&&e.h("button-component",{id:"report-issue",variant:"basic",onClick:()=>this.onFeedbackClick()},e.h("feedback-icon",null)),this.showFeedbackModal&&e.h("nylas-feedback-form",null));if(n&&b)return e.h(e.Host,null,e.h(w,{nylasBranding:g,isLoading:this.isLoading,showNotification:this.showNotification},e.h("div",{class:"cancelled-event-page",part:"confirmed-event-page"},e.h("nylas-confirmed-event-card",{confirmedEventInfo:b,exportparts:"ncec, ncec__icon, ncec__title, ncec__description, ncec__button-outline, ncec__card"}))),this.enableUserFeedback&&e.h("button-component",{id:"report-issue",variant:"basic",onClick:()=>this.onFeedbackClick()},e.h("feedback-icon",null)),this.showFeedbackModal&&e.h("nylas-feedback-form",null));if(n&&i&&f){const y=(v=(l=this.stores)==null?void 0:l.scheduler.get("bookingInfo"))==null?void 0:v.primaryParticipant,R=(T=(C=this.stores)==null?void 0:C.scheduler.get("bookingInfo"))==null?void 0:T.additionalFields,I=(L=this.stores)==null?void 0:L.scheduler.get("selectedTimeslot"),O=(F=this.stores)==null?void 0:F.scheduler.get("selectedTimezone"),P=(S=this.stores)==null?void 0:S.scheduler.get("selectedLanguage"),B=(z=this.stores)==null?void 0:z.scheduler.get("configSettings"),U=this.configurationId?this.configurationId:B==null?void 0:B.configuration_id,H=window.location.search,p=new URLSearchParams(H);p.set("booking_id",i.booking_id),y!=null&&y.name&&p.set("name",y.name),y!=null&&y.email&&p.set("email",y.email),I!=null&&I.start_time&&p.set("start_time",(new Date(I.start_time).getTime()/1e3).toString()),I!=null&&I.end_time&&p.set("end_time",(new Date(I.end_time).getTime()/1e3).toString()),O&&p.set("tz",O),P&&p.set("language",P),R&&p.set("additional_values",JSON.stringify(R)),this.slug&&p.set("page_slug",this.slug),U&&p.set("config_id",U),window.location.assign(`${f}?${p.toString()}`);return}if(n&&i)return e.h(e.Host,null,e.h(w,{nylasBranding:g,isLoading:this.isLoading,showNotification:this.showNotification},e.h("div",{class:"booked-event-page",part:"booked-event-page"},e.h("nylas-booked-event-card",{selectedTimeslot:r,eventInfo:i,exportparts:"nbec, nbec__title, nbec__card, nbec__description, nbec__button-outline, nbec__cancel-cta, nbec__reschedule-cta"}))),this.enableUserFeedback&&e.h("button-component",{id:"report-issue",variant:"basic",onClick:()=>this.onFeedbackClick()},e.h("feedback-icon",null)),this.showFeedbackModal&&e.h("nylas-feedback-form",null));if(n&&(!i||o)&&!a){const y=this.host.querySelector('[slot="timeslot-picker-cta-label"]');return e.h(e.Host,null,e.h(w,{nylasBranding:g,isLoading:this.isLoading,showNotification:this.showNotification},o&&e.h(N,null,`${e.instance.t("rescheduleTitle")}`),e.h("div",{class:"select-date-page",part:"select-date-page"},e.h("div",{class:"left-panel"},e.h("nylas-date-picker",{exportparts:"ndp, ndp__title, ndp__month-header, ndp__month-button, ndp__day, ndp__date, ndp__date--disabled, ndp__date--selected, ndp__date--current-day, ndp__date--current-month"}),e.h("nylas-locale-switch",{exportparts:"nls, nls__timezone, nls__timezone-dropdown, nls__timezone-drop-button, nls__timezone-drop-button-selected-label, nls__timezone-drop-content, nls__timezone-drop-label, nls__language, nls__language-dropdown, nls__language-drop-button, nls__language-drop-content, nls__language-drop-label"})),e.h("div",{class:`right-panel ${o?"reschedule":""}`},e.h("h2",null,e.h("calendar-icon",null),e.h("span",{id:"selectedDate"},this.selectedDateLabel)),e.h("nylas-timeslot-picker",{exportparts:"ntp, ntp__timeslot, ntp__timeslot--selected, ntp__button-primary"},y&&e.h("span",{slot:"timeslot-picker-cta-label"},e.h("slot",{name:"timeslot-picker-cta-label"})))))),this.enableUserFeedback&&e.h("button-component",{id:"report-issue",variant:"basic",onClick:()=>this.onFeedbackClick()},e.h("feedback-icon",null)),this.showFeedbackModal&&e.h("nylas-feedback-form",null))}return n&&!i&&a?e.h(e.Host,null,e.h(w,{nylasBranding:g,isLoading:this.isLoading,showNotification:this.showNotification},o&&e.h(N,null,`${e.instance.t("rescheduleTitle")}`),e.h("div",{class:"additional-data-page",part:"additional-data-page"},e.h("div",{class:"left-panel"},e.h("div",{class:"wrapper"},e.h("nylas-selected-event-card",{exportparts:"nsec, nsec__card, nsec__icon, nsec__date, nsec__time, nsec__timezone"}))),e.h("div",{class:`right-panel ${o?"reschedule":""}`},e.h("nylas-booking-form",{exportparts:"nbf, nbf__input-textfield, nbf__button-ghost, nbf__button-outline, nbf__button-primary, nbf__input-wrapper, nbf__checkbox-component, nbf__radio-button-group, nbf__textarea-component, nbf__dropdown, nbf__dropdown-button, nbf__dropdown-content"})))),this.enableUserFeedback&&e.h("button-component",{id:"report-issue",variant:"basic",onClick:()=>this.onFeedbackClick()},e.h("feedback-icon",null)),this.showFeedbackModal&&e.h("nylas-feedback-form",null)):e.h(e.Host,null,e.h("slot",null))}get host(){return e.getElement(this)}static get watchers(){return{bookingInfo:["bookingInfoChanged"],rescheduleBookingRef:["rescheduleBookingRefChanged"],cancelBookingRef:["cancelBookingRefChanged"],organizerConfirmationBookingRef:["organizerConfirmationBookingRefChanged"],localization:["localizationChanged"],themeConfig:["themeConfigChanged"]}}};j.style=$;exports.nylas_scheduling=j;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-87381561.cjs");require("react");require("react-dom");var _={exports:{}};(function(e,t){(function(n,i){e.exports=i()})(r.commonjsGlobal,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},i=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,a=/\d\d/,h=/\d\d?/,x=/\d*[^-_:/,()\s\d]+/,b={},Z=function(s){return(s=+s)+(s>68?1900:2e3)},d=function(s){return function(o){this[s]=+o}},B=[/[+-]\d\d:?(\d\d)?|Z/,function(s){(this.zone||(this.zone={})).offset=function(o){if(!o||o==="Z")return 0;var m=o.match(/([+-]|\d\d)/g),l=60*m[1]+(+m[2]||0);return l===0?0:m[0]==="+"?-l:l}(s)}],F=function(s){var o=b[s];return o&&(o.indexOf?o:o.s.concat(o.f))},V=function(s,o){var m,l=b.meridiem;if(l){for(var p=1;p<=24;p+=1)if(s.indexOf(l(p,0,o))>-1){m=p>12;break}}else m=s===(o?"pm":"PM");return m},q={A:[x,function(s){this.afternoon=V(s,!1)}],a:[x,function(s){this.afternoon=V(s,!0)}],S:[/\d/,function(s){this.milliseconds=100*+s}],SS:[a,function(s){this.milliseconds=10*+s}],SSS:[/\d{3}/,function(s){this.milliseconds=+s}],s:[h,d("seconds")],ss:[h,d("seconds")],m:[h,d("minutes")],mm:[h,d("minutes")],H:[h,d("hours")],h:[h,d("hours")],HH:[h,d("hours")],hh:[h,d("hours")],D:[h,d("day")],DD:[a,d("day")],Do:[x,function(s){var o=b.ordinal,m=s.match(/\d+/);if(this.day=m[0],o)for(var l=1;l<=31;l+=1)o(l).replace(/\[|\]/g,"")===s&&(this.day=l)}],M:[h,d("month")],MM:[a,d("month")],MMM:[x,function(s){var o=F("months"),m=(F("monthsShort")||o.map(function(l){return l.slice(0,3)})).indexOf(s)+1;if(m<1)throw new Error;this.month=m%12||m}],MMMM:[x,function(s){var o=F("months").indexOf(s)+1;if(o<1)throw new Error;this.month=o%12||o}],Y:[/[+-]?\d+/,d("year")],YY:[a,function(s){this.year=Z(s)}],YYYY:[/\d{4}/,d("year")],Z:B,ZZ:B};function N(s){var o,m;o=s,m=b&&b.formats;for(var l=(s=o.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(S,T,f){var c=f&&f.toUpperCase();return T||m[f]||n[f]||m[c].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(w,k,M){return k||M.slice(1)})})).match(i),p=l.length,y=0;y<p;y+=1){var C=l[y],I=q[C],v=I&&I[0],g=I&&I[1];l[y]=g?{regex:v,parser:g}:C.replace(/^\[|\]$/g,"")}return function(S){for(var T={},f=0,c=0;f<p;f+=1){var w=l[f];if(typeof w=="string")c+=w.length;else{var k=w.regex,M=w.parser,L=S.slice(c),A=k.exec(L)[0];M.call(T,A),S=S.replace(A,"")}}return function(D){var u=D.afternoon;if(u!==void 0){var Y=D.hours;u?Y<12&&(D.hours+=12):Y===12&&(D.hours=0),delete D.afternoon}}(T),T}}return function(s,o,m){m.p.customParseFormat=!0,s&&s.parseTwoDigitYear&&(Z=s.parseTwoDigitYear);var l=o.prototype,p=l.parse;l.parse=function(y){var C=y.date,I=y.utc,v=y.args;this.$u=I;var g=v[1];if(typeof g=="string"){var S=v[2]===!0,T=v[3]===!0,f=S||T,c=v[2];T&&(c=v[2]),b=this.$locale(),!S&&c&&(b=m.Ls[c]),this.$d=function(L,A,D){try{if(["x","X"].indexOf(A)>-1)return new Date((A==="X"?1e3:1)*L);var u=N(A)(L),Y=u.year,E=u.month,X=u.day,G=u.hours,J=u.minutes,Q=u.seconds,ee=u.milliseconds,W=u.zone,$=new Date,P=X||(Y||E?1:$.getDate()),z=Y||$.getFullYear(),O=0;Y&&!E||(O=E>0?E-1:$.getMonth());var j=G||0,H=J||0,K=Q||0,R=ee||0;return W?new Date(Date.UTC(z,O,P,j,H,K,R+60*W.offset*1e3)):D?new Date(Date.UTC(z,O,P,j,H,K,R)):new Date(z,O,P,j,H,K,R)}catch{return new Date("")}}(C,g,I),this.init(),c&&c!==!0&&(this.$L=this.locale(c).$L),f&&C!=this.format(g)&&(this.$d=new Date("")),b={}}else if(g instanceof Array)for(var w=g.length,k=1;k<=w;k+=1){v[1]=g[k-1];var M=m.apply(this,v);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}k===w&&(this.$d=new Date(""))}else p.call(this,y)}}})})(_);const te=_.exports,ie=':host{display:block;position:relative;--nylas-primary:#2563eb;--nylas-error:#cc4841;--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-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.time-picker{display:inline-block;width:150px;font-family:var(--nylas-font-family);position:relative}@media screen and (max-width: 768px){.time-picker{width:auto}}.time-picker input{width:150px;height:48px;text-align:center;font-size:16px;font-family:inherit;cursor:pointer;background:transparent;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}@media screen and (max-width: 768px){.time-picker input{width:88px}}@media screen and (max-width: 504px){.time-picker input{width:68px;font-size:15px}}.time-picker input.focus{background:transparent}.time-picker input:hover,.time-picker input:active{border:1px solid var(--nylas-primary)}.time-picker input:active{outline:2px solid var(--nylas-primary)}.time-picker input span.open{transform:rotate(90deg)}.time-picker input span.closed{transform:rotate(270deg)}.time-picker input.error{border:1px solid var(--nylas-error)}.time-picker p.error{color:var(--nylas-error);font-size:0.875rem;margin:0}.times{display:block;margin-top:0.5rem;background-color:var(--nylas-base-0);width:100%;max-height:336px;overflow:auto;border:1px solid #ddd;z-index:1;border-radius:4px;position:absolute;box-shadow:0px 4px 6px -2px rgba(0, 0, 0, 0.0509803922);box-shadow:0px 10px 15px -3px rgba(0, 0, 0, 0.1019607843)}.times ul{padding:0;list-style-type:none;color:var(--nylas-base-900);max-height:336px}.times ul li{padding:16px, 12px, 16px, 12px;color:black;padding:12px 16px;text-decoration:none;display:block;font-family:inherit;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0px;text-align:center;cursor:pointer}.times ul li.focused{background-color:var(--nylas-base-100)}.times ul li:hover,.times ul li:focus{background-color:var(--nylas-base-100)}.times ul li label{display:flex;align-items:center;gap:0.5rem}.times ul li label input{margin:0}',se=ie;r.dayjs.extend(te);const U=class{constructor(e){r.registerInstance(this,e),this.timeChange=r.createEvent(this,"timeChange",7),this.formError=r.createEvent(this,"formError",7),this.time=void 0,this.minimumStartTime=null,this.placeholder="hh:mmam/pm",this.name=void 0,this.hasError=!1,this.err="",this.showTimes=!1,this.ariaActivedescendant="",this.times=this.generateTimes(),this.shouldAutoScroll=!1}handleOutsideClick(e){!e.composedPath().includes(this.el)&&this.showTimes&&(this.showTimes=!1)}minimumStartTimeChangedHandler(){if(this.minimumStartTime){let e=r.dayjs().hour(parseInt(this.minimumStartTime)).minute(parseInt(this.minimumStartTime.slice(-4,-2)));this.minimumStartTime.slice(-2).toLowerCase()==="pm"&&parseInt(this.minimumStartTime)!==12?e=e.add(12,"hour"):this.minimumStartTime.slice(-2).toLowerCase()==="am"&&parseInt(this.minimumStartTime)===12&&(e=e.subtract(12,"hour")),this.times=this.generateTimes();const t=r.dayjs(this.times[0].value,"hh:mma");r.dayjs(this.time,"hh:mma").isBefore(t)&&(this.err="Invalid",this.formError.emit({key:this.el.id,message:"Invalid"}))}}componentDidRender(){if(this.showTimes&&this.shouldAutoScroll){const e=r.autocompleteTimeFormat(this.time),t=this.times.findIndex(n=>n.value===e);t>-1&&(this.shouldAutoScroll=!1,this.scrollToViewWithinParent(t));return}}handleTimeChange(e,t){const n=t.split(":");n[0]==="00"&&n[1].slice(-2)=="pm"&&(this.err="Invalid",this.formError.emit({key:this.el.id,message:"Invalid"})),r.validateTimeFormatInput(t)?(this.err="",this.formError.emit({key:this.el.id,message:""})):(this.err="Invalid",this.formError.emit({key:this.el.id,message:"Invalid"})),this.timeChange.emit({key:this.el.id,value:t})}handleTimeAutocomplete(e){var n;const t=(n=e.target)==null?void 0:n.value;if(!r.validateTimeFormatInput(t)){this.err="Invalid",this.formError.emit({key:this.el.id,message:"Invalid"});return}if(t===""){const i=r.roundToNearest15Minutes().format("hh:mma");this.timeChange.emit({key:this.el.id,value:i});return}if(!r.validateExactTimeFormat(t)){const i=r.autocompleteTimeFormat(t);this.timeChange.emit({key:this.el.id,value:i});return}this.timeChange.emit({key:this.el.id,value:t})}handleOnInput(e){var n;const t=(n=e.target)==null?void 0:n.value;if(r.validateTimeFormatInput(t)){if(t===""){const i=r.roundToNearest15Minutes().format("hh:mma"),a=this.times.findIndex(h=>h.value===i);a>-1&&this.scrollToViewWithinParent(a);return}if(!r.validateExactTimeFormat(t)){const i=r.autocompleteTimeFormat(t),a=this.times.findIndex(h=>h.value===i);a>-1&&this.scrollToViewWithinParent(a);return}}}generateTimes(){const e=[];let t=r.dayjs().set("hour",0).set("minute",0).set("second",0);this.minimumStartTime&&(t=r.dayjs(this.minimumStartTime,"hh:mma"));const n=t.endOf("day").diff(t,"minutes"),i=Math.round(n/15);for(let a=0;a<i+1;a++){const h=t.add(a*15,"minute");if(a==i&&h.format("hh:mma").includes("am"))break;e.push({id:a,value:h.format("hh:mma")})}return e}handleComboboxKeyDown(e){if(e.key==="ArrowDown"){if(e.preventDefault(),!this.showTimes){this.showTimes=!0,this.shouldAutoScroll=!0;return}if(this.ariaActivedescendant==="")this.ariaActivedescendant=this.times[0].id.toString(),this.focusOption(0);else{const t=this.times.findIndex(i=>i.id.toString()===this.ariaActivedescendant),n=t+1<this.times.length?t+1:0;this.ariaActivedescendant=this.times[n].id.toString(),this.focusOption(n)}}else if(e.key==="ArrowUp")if(e.preventDefault(),this.ariaActivedescendant==="")this.ariaActivedescendant=this.times[this.times.length-1].id.toString(),this.focusOption(this.times.length-1);else{const t=this.times.findIndex(i=>i.id.toString()===this.ariaActivedescendant),n=t-1>=0?t-1:this.times.length-1;this.ariaActivedescendant=this.times[n].id.toString(),this.focusOption(n)}else e.key==="Escape"&&(this.showTimes=!1,this.timeInput.focus())}handleListboxKeydown(e){const t=this.times,n=t.findIndex(i=>i.id.toString()===this.ariaActivedescendant);if(e.key==="ArrowDown"||e.key==="Tab"&&!e.shiftKey){e.preventDefault();const i=n+1<t.length?n+1:0;this.ariaActivedescendant=t[i].id.toString(),this.focusOption(i)}else if(e.key==="ArrowUp"||e.key==="Tab"&&e.shiftKey){e.preventDefault();const i=n-1>=0?n-1:t.length-1;this.ariaActivedescendant=t[i].id.toString(),this.focusOption(i)}else if(e.key==="Enter"){if(e.preventDefault(),this.ariaActivedescendant){const i=t[n];this.handleTimeChange(e,i.value),this.showTimes=!1,this.ariaActivedescendant="",this.timeInput.focus()}}else e.key==="Escape"&&(this.showTimes=!1,this.timeInput.focus())}scrollToViewWithinParent(e){var x;const t=this.times[e],n=(x=this.el.shadowRoot)==null?void 0:x.getElementById(t.id.toString()),i=this.timeMenu;this.ariaActivedescendant=t.id.toString();const a=n.getBoundingClientRect(),h=i.getBoundingClientRect();a.top<h.top?i.scrollTop-=h.top-a.top:a.bottom>h.bottom&&(i.scrollTop+=a.bottom-h.bottom),a.left<h.left?i.scrollLeft-=h.left-a.left:a.right>h.right&&(i.scrollLeft+=a.right-h.right)}focusOption(e){var a;const t=this.times[e];if(!t)return;const n=t.id.toString(),i=(a=this.el.shadowRoot)==null?void 0:a.getElementById(n);i&&(i.focus(),i.scrollIntoView({behavior:"smooth",block:"nearest"}))}render(){return r.h(r.Host,{key:"da122e12f7a101e73a49fc19189722f8aa2a5802"},r.h("div",{key:"f922740d77d8bda81491d28215dc0a9f2fa0fc18",class:"time-picker",part:"time-picker"},r.h("input",{key:"eaae1354a88421a510036693c72b9dffbc68cd06",type:"text",name:this.name,id:this.name,part:"time-input",class:{"time-input":!0,error:!!this.err||this.hasError},ref:e=>this.timeInput=e,value:this.time,onClick:()=>{this.showTimes=!this.showTimes,this.shouldAutoScroll=!0},"aria-haspopup":"listbox","aria-label":this.name,"aria-expanded":this.showTimes?"true":"false",placeholder:this.placeholder,onKeyDown:e=>this.handleComboboxKeyDown(e),onInput:e=>this.handleOnInput(e),onBlur:e=>this.handleTimeAutocomplete(e)}),this.err&&r.h("div",{class:"invalid-time-icon"}),this.showTimes&&r.h("div",{class:"times",part:"times",ref:e=>this.timeMenu=e},r.h("ul",{tabindex:"-1",role:"listbox","aria-label":this.name,"aria-activedescendant":this.ariaActivedescendant,onKeyDown:e=>this.handleListboxKeydown(e)},this.times.map(e=>r.h("li",{tabindex:"0",key:e.id,id:e.id.toString(),class:{focused:this.ariaActivedescendant===e.id.toString()},onClick:t=>{this.handleTimeChange(t,e.value),this.showTimes=!1,this.timeInput.focus()},role:"option"},`${e.value}`)))),!this.showTimes&&this.err&&r.h("p",{class:"error",id:"email-error"},this.err)))}get el(){return r.getElement(this)}static get watchers(){return{minimumStartTime:["minimumStartTimeChangedHandler"]}}};U.style=se;exports.nylas_time_window_picker=U;
@@ -0,0 +1,316 @@
1
+ import { b as ae, P as C, r as oe, c as X, Q as V, R as W, S as G, T as Q, h as k, H as he, g as me } from "./index-995dd3b3.js";
2
+ import "react";
3
+ import "react-dom";
4
+ var q = { exports: {} };
5
+ (function(e, t) {
6
+ (function(n, i) {
7
+ e.exports = i();
8
+ })(ae, function() {
9
+ var n = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, i = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, r = /\d\d/, o = /\d\d?/, v = /\d*[^-_:/,()\s\d]+/, x = {}, _ = function(s) {
10
+ return (s = +s) + (s > 68 ? 1900 : 2e3);
11
+ }, l = function(s) {
12
+ return function(a) {
13
+ this[s] = +a;
14
+ };
15
+ }, U = [/[+-]\d\d:?(\d\d)?|Z/, function(s) {
16
+ (this.zone || (this.zone = {})).offset = function(a) {
17
+ if (!a || a === "Z")
18
+ return 0;
19
+ var h = a.match(/([+-]|\d\d)/g), m = 60 * h[1] + (+h[2] || 0);
20
+ return m === 0 ? 0 : h[0] === "+" ? -m : m;
21
+ }(s);
22
+ }], P = function(s) {
23
+ var a = x[s];
24
+ return a && (a.indexOf ? a : a.s.concat(a.f));
25
+ }, j = function(s, a) {
26
+ var h, m = x.meridiem;
27
+ if (m) {
28
+ for (var f = 1; f <= 24; f += 1)
29
+ if (s.indexOf(m(f, 0, a)) > -1) {
30
+ h = f > 12;
31
+ break;
32
+ }
33
+ } else
34
+ h = s === (a ? "pm" : "PM");
35
+ return h;
36
+ }, J = { A: [v, function(s) {
37
+ this.afternoon = j(s, !1);
38
+ }], a: [v, function(s) {
39
+ this.afternoon = j(s, !0);
40
+ }], S: [/\d/, function(s) {
41
+ this.milliseconds = 100 * +s;
42
+ }], SS: [r, function(s) {
43
+ this.milliseconds = 10 * +s;
44
+ }], SSS: [/\d{3}/, function(s) {
45
+ this.milliseconds = +s;
46
+ }], s: [o, l("seconds")], ss: [o, l("seconds")], m: [o, l("minutes")], mm: [o, l("minutes")], H: [o, l("hours")], h: [o, l("hours")], HH: [o, l("hours")], hh: [o, l("hours")], D: [o, l("day")], DD: [r, l("day")], Do: [v, function(s) {
47
+ var a = x.ordinal, h = s.match(/\d+/);
48
+ if (this.day = h[0], a)
49
+ for (var m = 1; m <= 31; m += 1)
50
+ a(m).replace(/\[|\]/g, "") === s && (this.day = m);
51
+ }], M: [o, l("month")], MM: [r, l("month")], MMM: [v, function(s) {
52
+ var a = P("months"), h = (P("monthsShort") || a.map(function(m) {
53
+ return m.slice(0, 3);
54
+ })).indexOf(s) + 1;
55
+ if (h < 1)
56
+ throw new Error();
57
+ this.month = h % 12 || h;
58
+ }], MMMM: [v, function(s) {
59
+ var a = P("months").indexOf(s) + 1;
60
+ if (a < 1)
61
+ throw new Error();
62
+ this.month = a % 12 || a;
63
+ }], Y: [/[+-]?\d+/, l("year")], YY: [r, function(s) {
64
+ this.year = _(s);
65
+ }], YYYY: [/\d{4}/, l("year")], Z: U, ZZ: U };
66
+ function ee(s) {
67
+ var a, h;
68
+ a = s, h = x && x.formats;
69
+ for (var m = (s = a.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(S, b, u) {
70
+ var d = u && u.toUpperCase();
71
+ return b || h[u] || n[u] || h[d].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(w, T, D) {
72
+ return T || D.slice(1);
73
+ });
74
+ })).match(i), f = m.length, p = 0; p < f; p += 1) {
75
+ var L = m[p], I = J[L], y = I && I[0], g = I && I[1];
76
+ m[p] = g ? { regex: y, parser: g } : L.replace(/^\[|\]$/g, "");
77
+ }
78
+ return function(S) {
79
+ for (var b = {}, u = 0, d = 0; u < f; u += 1) {
80
+ var w = m[u];
81
+ if (typeof w == "string")
82
+ d += w.length;
83
+ else {
84
+ var T = w.regex, D = w.parser, E = S.slice(d), A = T.exec(E)[0];
85
+ D.call(b, A), S = S.replace(A, "");
86
+ }
87
+ }
88
+ return function(M) {
89
+ var c = M.afternoon;
90
+ if (c !== void 0) {
91
+ var Y = M.hours;
92
+ c ? Y < 12 && (M.hours += 12) : Y === 12 && (M.hours = 0), delete M.afternoon;
93
+ }
94
+ }(b), b;
95
+ };
96
+ }
97
+ return function(s, a, h) {
98
+ h.p.customParseFormat = !0, s && s.parseTwoDigitYear && (_ = s.parseTwoDigitYear);
99
+ var m = a.prototype, f = m.parse;
100
+ m.parse = function(p) {
101
+ var L = p.date, I = p.utc, y = p.args;
102
+ this.$u = I;
103
+ var g = y[1];
104
+ if (typeof g == "string") {
105
+ var S = y[2] === !0, b = y[3] === !0, u = S || b, d = y[2];
106
+ b && (d = y[2]), x = this.$locale(), !S && d && (x = h.Ls[d]), this.$d = function(E, A, M) {
107
+ try {
108
+ if (["x", "X"].indexOf(A) > -1)
109
+ return new Date((A === "X" ? 1e3 : 1) * E);
110
+ var c = ee(A)(E), Y = c.year, O = c.month, te = c.day, ie = c.hours, se = c.minutes, ne = c.seconds, re = c.milliseconds, N = c.zone, z = /* @__PURE__ */ new Date(), F = te || (Y || O ? 1 : z.getDate()), H = Y || z.getFullYear(), $ = 0;
111
+ Y && !O || ($ = O > 0 ? O - 1 : z.getMonth());
112
+ var K = ie || 0, R = se || 0, Z = ne || 0, B = re || 0;
113
+ return N ? new Date(Date.UTC(H, $, F, K, R, Z, B + 60 * N.offset * 1e3)) : M ? new Date(Date.UTC(H, $, F, K, R, Z, B)) : new Date(H, $, F, K, R, Z, B);
114
+ } catch {
115
+ return /* @__PURE__ */ new Date("");
116
+ }
117
+ }(L, g, I), this.init(), d && d !== !0 && (this.$L = this.locale(d).$L), u && L != this.format(g) && (this.$d = /* @__PURE__ */ new Date("")), x = {};
118
+ } else if (g instanceof Array)
119
+ for (var w = g.length, T = 1; T <= w; T += 1) {
120
+ y[1] = g[T - 1];
121
+ var D = h.apply(this, y);
122
+ if (D.isValid()) {
123
+ this.$d = D.$d, this.$L = D.$L, this.init();
124
+ break;
125
+ }
126
+ T === w && (this.$d = /* @__PURE__ */ new Date(""));
127
+ }
128
+ else
129
+ f.call(this, p);
130
+ };
131
+ };
132
+ });
133
+ })(q);
134
+ const le = q.exports, de = ':host{display:block;position:relative;--nylas-primary:#2563eb;--nylas-error:#cc4841;--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-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.time-picker{display:inline-block;width:150px;font-family:var(--nylas-font-family);position:relative}@media screen and (max-width: 768px){.time-picker{width:auto}}.time-picker input{width:150px;height:48px;text-align:center;font-size:16px;font-family:inherit;cursor:pointer;background:transparent;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}@media screen and (max-width: 768px){.time-picker input{width:88px}}@media screen and (max-width: 504px){.time-picker input{width:68px;font-size:15px}}.time-picker input.focus{background:transparent}.time-picker input:hover,.time-picker input:active{border:1px solid var(--nylas-primary)}.time-picker input:active{outline:2px solid var(--nylas-primary)}.time-picker input span.open{transform:rotate(90deg)}.time-picker input span.closed{transform:rotate(270deg)}.time-picker input.error{border:1px solid var(--nylas-error)}.time-picker p.error{color:var(--nylas-error);font-size:0.875rem;margin:0}.times{display:block;margin-top:0.5rem;background-color:var(--nylas-base-0);width:100%;max-height:336px;overflow:auto;border:1px solid #ddd;z-index:1;border-radius:4px;position:absolute;box-shadow:0px 4px 6px -2px rgba(0, 0, 0, 0.0509803922);box-shadow:0px 10px 15px -3px rgba(0, 0, 0, 0.1019607843)}.times ul{padding:0;list-style-type:none;color:var(--nylas-base-900);max-height:336px}.times ul li{padding:16px, 12px, 16px, 12px;color:black;padding:12px 16px;text-decoration:none;display:block;font-family:inherit;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0px;text-align:center;cursor:pointer}.times ul li.focused{background-color:var(--nylas-base-100)}.times ul li:hover,.times ul li:focus{background-color:var(--nylas-base-100)}.times ul li label{display:flex;align-items:center;gap:0.5rem}.times ul li label input{margin:0}', ce = de;
135
+ C.extend(le);
136
+ const ue = class {
137
+ constructor(e) {
138
+ oe(this, e), this.timeChange = X(this, "timeChange", 7), this.formError = X(this, "formError", 7), this.time = void 0, this.minimumStartTime = null, this.placeholder = "hh:mmam/pm", this.name = void 0, this.hasError = !1, this.err = "", this.showTimes = !1, this.ariaActivedescendant = "", this.times = this.generateTimes(), this.shouldAutoScroll = !1;
139
+ }
140
+ handleOutsideClick(e) {
141
+ !e.composedPath().includes(this.el) && this.showTimes && (this.showTimes = !1);
142
+ }
143
+ minimumStartTimeChangedHandler() {
144
+ if (this.minimumStartTime) {
145
+ let e = C().hour(parseInt(this.minimumStartTime)).minute(parseInt(this.minimumStartTime.slice(-4, -2)));
146
+ this.minimumStartTime.slice(-2).toLowerCase() === "pm" && parseInt(this.minimumStartTime) !== 12 ? e = e.add(12, "hour") : this.minimumStartTime.slice(-2).toLowerCase() === "am" && parseInt(this.minimumStartTime) === 12 && (e = e.subtract(12, "hour")), this.times = this.generateTimes();
147
+ const t = C(this.times[0].value, "hh:mma");
148
+ C(this.time, "hh:mma").isBefore(t) && (this.err = "Invalid", this.formError.emit({
149
+ key: this.el.id,
150
+ message: "Invalid"
151
+ }));
152
+ }
153
+ }
154
+ componentDidRender() {
155
+ if (this.showTimes && this.shouldAutoScroll) {
156
+ const e = V(this.time), t = this.times.findIndex((n) => n.value === e);
157
+ t > -1 && (this.shouldAutoScroll = !1, this.scrollToViewWithinParent(t));
158
+ return;
159
+ }
160
+ }
161
+ handleTimeChange(e, t) {
162
+ const n = t.split(":");
163
+ n[0] === "00" && n[1].slice(-2) == "pm" && (this.err = "Invalid", this.formError.emit({
164
+ key: this.el.id,
165
+ message: "Invalid"
166
+ })), W(t) ? (this.err = "", this.formError.emit({
167
+ key: this.el.id,
168
+ message: ""
169
+ })) : (this.err = "Invalid", this.formError.emit({
170
+ key: this.el.id,
171
+ message: "Invalid"
172
+ })), this.timeChange.emit({
173
+ key: this.el.id,
174
+ value: t
175
+ });
176
+ }
177
+ handleTimeAutocomplete(e) {
178
+ var n;
179
+ const t = (n = e.target) == null ? void 0 : n.value;
180
+ if (!W(t)) {
181
+ this.err = "Invalid", this.formError.emit({
182
+ key: this.el.id,
183
+ message: "Invalid"
184
+ });
185
+ return;
186
+ }
187
+ if (t === "") {
188
+ const i = G().format("hh:mma");
189
+ this.timeChange.emit({
190
+ key: this.el.id,
191
+ value: i
192
+ });
193
+ return;
194
+ }
195
+ if (!Q(t)) {
196
+ const i = V(t);
197
+ this.timeChange.emit({
198
+ key: this.el.id,
199
+ value: i
200
+ });
201
+ return;
202
+ }
203
+ this.timeChange.emit({
204
+ key: this.el.id,
205
+ value: t
206
+ });
207
+ }
208
+ handleOnInput(e) {
209
+ var n;
210
+ const t = (n = e.target) == null ? void 0 : n.value;
211
+ if (W(t)) {
212
+ if (t === "") {
213
+ const i = G().format("hh:mma"), r = this.times.findIndex((o) => o.value === i);
214
+ r > -1 && this.scrollToViewWithinParent(r);
215
+ return;
216
+ }
217
+ if (!Q(t)) {
218
+ const i = V(t), r = this.times.findIndex((o) => o.value === i);
219
+ r > -1 && this.scrollToViewWithinParent(r);
220
+ return;
221
+ }
222
+ }
223
+ }
224
+ generateTimes() {
225
+ const e = [];
226
+ let t = C().set("hour", 0).set("minute", 0).set("second", 0);
227
+ this.minimumStartTime && (t = C(this.minimumStartTime, "hh:mma"));
228
+ const n = t.endOf("day").diff(t, "minutes"), i = Math.round(n / 15);
229
+ for (let r = 0; r < i + 1; r++) {
230
+ const o = t.add(r * 15, "minute");
231
+ if (r == i && o.format("hh:mma").includes("am"))
232
+ break;
233
+ e.push({ id: r, value: o.format("hh:mma") });
234
+ }
235
+ return e;
236
+ }
237
+ handleComboboxKeyDown(e) {
238
+ if (e.key === "ArrowDown") {
239
+ if (e.preventDefault(), !this.showTimes) {
240
+ this.showTimes = !0, this.shouldAutoScroll = !0;
241
+ return;
242
+ }
243
+ if (this.ariaActivedescendant === "")
244
+ this.ariaActivedescendant = this.times[0].id.toString(), this.focusOption(0);
245
+ else {
246
+ const t = this.times.findIndex((i) => i.id.toString() === this.ariaActivedescendant), n = t + 1 < this.times.length ? t + 1 : 0;
247
+ this.ariaActivedescendant = this.times[n].id.toString(), this.focusOption(n);
248
+ }
249
+ } else if (e.key === "ArrowUp")
250
+ if (e.preventDefault(), this.ariaActivedescendant === "")
251
+ this.ariaActivedescendant = this.times[this.times.length - 1].id.toString(), this.focusOption(this.times.length - 1);
252
+ else {
253
+ const t = this.times.findIndex((i) => i.id.toString() === this.ariaActivedescendant), n = t - 1 >= 0 ? t - 1 : this.times.length - 1;
254
+ this.ariaActivedescendant = this.times[n].id.toString(), this.focusOption(n);
255
+ }
256
+ else
257
+ e.key === "Escape" && (this.showTimes = !1, this.timeInput.focus());
258
+ }
259
+ handleListboxKeydown(e) {
260
+ const t = this.times, n = t.findIndex((i) => i.id.toString() === this.ariaActivedescendant);
261
+ if (e.key === "ArrowDown" || e.key === "Tab" && !e.shiftKey) {
262
+ e.preventDefault();
263
+ const i = n + 1 < t.length ? n + 1 : 0;
264
+ this.ariaActivedescendant = t[i].id.toString(), this.focusOption(i);
265
+ } else if (e.key === "ArrowUp" || e.key === "Tab" && e.shiftKey) {
266
+ e.preventDefault();
267
+ const i = n - 1 >= 0 ? n - 1 : t.length - 1;
268
+ this.ariaActivedescendant = t[i].id.toString(), this.focusOption(i);
269
+ } else if (e.key === "Enter") {
270
+ if (e.preventDefault(), this.ariaActivedescendant) {
271
+ const i = t[n];
272
+ this.handleTimeChange(e, i.value), this.showTimes = !1, this.ariaActivedescendant = "", this.timeInput.focus();
273
+ }
274
+ } else
275
+ e.key === "Escape" && (this.showTimes = !1, this.timeInput.focus());
276
+ }
277
+ scrollToViewWithinParent(e) {
278
+ var v;
279
+ const t = this.times[e], n = (v = this.el.shadowRoot) == null ? void 0 : v.getElementById(t.id.toString()), i = this.timeMenu;
280
+ this.ariaActivedescendant = t.id.toString();
281
+ const r = n.getBoundingClientRect(), o = i.getBoundingClientRect();
282
+ r.top < o.top ? i.scrollTop -= o.top - r.top : r.bottom > o.bottom && (i.scrollTop += r.bottom - o.bottom), r.left < o.left ? i.scrollLeft -= o.left - r.left : r.right > o.right && (i.scrollLeft += r.right - o.right);
283
+ }
284
+ focusOption(e) {
285
+ var r;
286
+ const t = this.times[e];
287
+ if (!t)
288
+ return;
289
+ const n = t.id.toString(), i = (r = this.el.shadowRoot) == null ? void 0 : r.getElementById(n);
290
+ i && (i.focus(), i.scrollIntoView({ behavior: "smooth", block: "nearest" }));
291
+ }
292
+ render() {
293
+ return k(he, { key: "da122e12f7a101e73a49fc19189722f8aa2a5802" }, k("div", { key: "f922740d77d8bda81491d28215dc0a9f2fa0fc18", class: "time-picker", part: "time-picker" }, k("input", { key: "eaae1354a88421a510036693c72b9dffbc68cd06", type: "text", name: this.name, id: this.name, part: "time-input", class: {
294
+ "time-input": !0,
295
+ error: !!this.err || this.hasError
296
+ }, ref: (e) => this.timeInput = e, value: this.time, onClick: () => {
297
+ this.showTimes = !this.showTimes, this.shouldAutoScroll = !0;
298
+ }, "aria-haspopup": "listbox", "aria-label": this.name, "aria-expanded": this.showTimes ? "true" : "false", placeholder: this.placeholder, onKeyDown: (e) => this.handleComboboxKeyDown(e), onInput: (e) => this.handleOnInput(e), onBlur: (e) => this.handleTimeAutocomplete(e) }), this.err && k("div", { class: "invalid-time-icon" }), this.showTimes && k("div", { class: "times", part: "times", ref: (e) => this.timeMenu = e }, k("ul", { tabindex: "-1", role: "listbox", "aria-label": this.name, "aria-activedescendant": this.ariaActivedescendant, onKeyDown: (e) => this.handleListboxKeydown(e) }, this.times.map((e) => k("li", { tabindex: "0", key: e.id, id: e.id.toString(), class: {
299
+ focused: this.ariaActivedescendant === e.id.toString()
300
+ }, onClick: (t) => {
301
+ this.handleTimeChange(t, e.value), this.showTimes = !1, this.timeInput.focus();
302
+ }, role: "option" }, `${e.value}`)))), !this.showTimes && this.err && k("p", { class: "error", id: "email-error" }, this.err)));
303
+ }
304
+ get el() {
305
+ return me(this);
306
+ }
307
+ static get watchers() {
308
+ return {
309
+ minimumStartTime: ["minimumStartTimeChangedHandler"]
310
+ };
311
+ }
312
+ };
313
+ ue.style = ce;
314
+ export {
315
+ ue as nylas_time_window_picker
316
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-87381561.cjs");require("react");require("react-dom");const r=".sc-person-icon-h{display:flex}",i=r,t=class{constructor(s){e.registerInstance(this,s),this.width="14",this.height="16"}render(){return e.h("svg",{key:"ce837bb2bd6980c62d563f8bc4d5b1618cc717b5",width:this.width,height:this.height,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"fa24a15fa2e88fb2ca17700b998f71a10a9017de",d:"M7 0C4.79086 0 3 1.79086 3 4C3 6.20914 4.79086 8 7 8C9.20914 8 11 6.20914 11 4C11 1.79086 9.20914 0 7 0ZM4 4C4 2.34315 5.34315 1 7 1C8.65685 1 10 2.34315 10 4C10 5.65685 8.65685 7 7 7C5.34315 7 4 5.65685 4 4ZM2.00873 9C0.903151 9 0 9.88687 0 11C0 12.6912 0.83281 13.9663 2.13499 14.7966C3.41697 15.614 5.14526 16 7 16C8.85474 16 10.583 15.614 11.865 14.7966C13.1672 13.9663 14 12.6912 14 11C14 9.89557 13.1045 9.00001 12 9.00001L2.00873 9ZM1 11C1 10.4467 1.44786 10 2.00873 10L12 10C12.5522 10 13 10.4478 13 11C13 12.3088 12.3777 13.2837 11.3274 13.9534C10.2568 14.636 8.73511 15 7 15C5.26489 15 3.74318 14.636 2.67262 13.9534C1.62226 13.2837 1 12.3088 1 11Z",fill:"currentColor"}))}};t.style=i;exports.person_icon=t;
@@ -0,0 +1,15 @@
1
+ import { r as e, h as t } from "./index-995dd3b3.js";
2
+ import "react";
3
+ import "react-dom";
4
+ const o = ".sc-person-icon-h{display:flex}", r = o, C = class {
5
+ constructor(s) {
6
+ e(this, s), this.width = "14", this.height = "16";
7
+ }
8
+ render() {
9
+ return t("svg", { key: "ce837bb2bd6980c62d563f8bc4d5b1618cc717b5", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "fa24a15fa2e88fb2ca17700b998f71a10a9017de", d: "M7 0C4.79086 0 3 1.79086 3 4C3 6.20914 4.79086 8 7 8C9.20914 8 11 6.20914 11 4C11 1.79086 9.20914 0 7 0ZM4 4C4 2.34315 5.34315 1 7 1C8.65685 1 10 2.34315 10 4C10 5.65685 8.65685 7 7 7C5.34315 7 4 5.65685 4 4ZM2.00873 9C0.903151 9 0 9.88687 0 11C0 12.6912 0.83281 13.9663 2.13499 14.7966C3.41697 15.614 5.14526 16 7 16C8.85474 16 10.583 15.614 11.865 14.7966C13.1672 13.9663 14 12.6912 14 11C14 9.89557 13.1045 9.00001 12 9.00001L2.00873 9ZM1 11C1 10.4467 1.44786 10 2.00873 10L12 10C12.5522 10 13 10.4478 13 11C13 12.3088 12.3777 13.2837 11.3274 13.9534C10.2568 14.636 8.73511 15 7 15C5.26489 15 3.74318 14.636 2.67262 13.9534C1.62226 13.2837 1 12.3088 1 11Z", fill: "currentColor" }));
10
+ }
11
+ };
12
+ C.style = r;
13
+ export {
14
+ C as person_icon
15
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-87381561.cjs");require("react");require("react-dom");const s=".sc-play-icon-h{display:flex}",o=s,t=class{constructor(i){e.registerInstance(this,i),this.width="15",this.height="15"}render(){return e.h("svg",{key:"1ddd0443515a158f09d0c4e8fd7c79d0645f8540",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"11bd5ae0c5df52b1d51a80f7ec5723b949089fdb",d:"M21 12L3 21V3L21 12Z",stroke:"auto","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))}};t.style=o;exports.play_icon=t;
@@ -0,0 +1,15 @@
1
+ import { r as o, h as t } from "./index-995dd3b3.js";
2
+ import "react";
3
+ import "react-dom";
4
+ const e = ".sc-play-icon-h{display:flex}", i = e, r = class {
5
+ constructor(s) {
6
+ o(this, s), this.width = "15", this.height = "15";
7
+ }
8
+ render() {
9
+ return t("svg", { key: "1ddd0443515a158f09d0c4e8fd7c79d0645f8540", width: this.width, height: this.height, viewBox: "0 0 24 24", fill: "auto", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "11bd5ae0c5df52b1d51a80f7ec5723b949089fdb", d: "M21 12L3 21V3L21 12Z", stroke: "auto", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }));
10
+ }
11
+ };
12
+ r.style = i;
13
+ export {
14
+ r as play_icon
15
+ };
package/dist/react.cjs ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-87381561.cjs");require("react");require("react-dom");exports.AddCircleIcon=o.AddCircleIcon;exports.ArchiveIcon=o.ArchiveIcon;exports.ArrowIcon=o.ArrowIcon;exports.BoldIcon=o.BoldIcon;exports.ButtonComponent=o.ButtonComponent;exports.CalendarAgendaFillIcon=o.CalendarAgendaFillIcon;exports.CalendarAgendaIcon=o.CalendarAgendaIcon;exports.CalendarCancelIcon=o.CalendarCancelIcon;exports.CalendarCheckIcon=o.CalendarCheckIcon;exports.CalendarIcon=o.CalendarIcon;exports.CalendarInfoIcon=o.CalendarInfoIcon;exports.CalendarPatternsIcon=o.CalendarPatternsIcon;exports.CheckboxComponent=o.CheckboxComponent;exports.CheckmarkCircleIcon=o.CheckmarkCircleIcon;exports.CheckmarkIcon=o.CheckmarkIcon;exports.ChevronIcon=o.ChevronIcon;exports.ClockIcon=o.ClockIcon;exports.CloseIcon=o.CloseIcon;exports.CopyIcon=o.CopyIcon;exports.DeleteIcon=o.DeleteIcon;exports.DocumentRefreshIcon=o.DocumentRefreshIcon;exports.DragableIcon=o.DragableIcon;exports.EditIcon=o.EditIcon;exports.EnvelopeFillIcon=o.EnvelopeFillIcon;exports.EnvelopeIcon=o.EnvelopeIcon;exports.EyeIcon=o.EyeIcon;exports.FeedbackIcon=o.FeedbackIcon;exports.FlowIcon=o.FlowIcon;exports.FolderIcon=o.FolderIcon;exports.ForwardIcon=o.ForwardIcon;exports.GlobeIcon=o.GlobeIcon;exports.GoogleLogoIcon=o.GoogleLogoIcon;exports.GoogleMeetIcon=o.GoogleMeetIcon;exports.InboxIcon=o.InboxIcon;exports.InfoIcon=o.InfoIcon;exports.InputColorPicker=o.InputColorPicker;exports.InputComponent=o.InputComponent;exports.InputDropdown=o.InputDropdown;exports.InputImageUrl=o.InputImageUrl;exports.ItalicIcon=o.ItalicIcon;exports.LoadingIcon=o.LoadingIcon;exports.LocationIcon=o.LocationIcon;exports.LocationOffIcon=o.LocationOffIcon;exports.MicrosoftLogoIcon=o.MicrosoftLogoIcon;exports.MicrosoftTeamsIcon=o.MicrosoftTeamsIcon;exports.MultiSelectDropdown=o.MultiSelectDropdown;exports.NylasAdditionalParticipants=o.NylasAdditionalParticipants;exports.NylasAvailabilityPicker=o.NylasAvailabilityPicker;exports.NylasBookedEventCard=o.NylasBookedEventCard;exports.NylasBookingCalendarPicker=o.NylasBookingCalendarPicker;exports.NylasBookingConfirmationRedirect=o.NylasBookingConfirmationRedirect;exports.NylasBookingConfirmationType=o.NylasBookingConfirmationType;exports.NylasBookingForm=o.NylasBookingForm;exports.NylasBookingFormConfig=o.NylasBookingFormConfig;exports.NylasBufferTime=o.NylasBufferTime;exports.NylasCalendarPicker=o.NylasCalendarPicker;exports.NylasCancelBookingForm=o.NylasCancelBookingForm;exports.NylasCancellationPolicy=o.NylasCancellationPolicy;exports.NylasCancelledEventCard=o.NylasCancelledEventCard;exports.NylasConfirmationEmail=o.NylasConfirmationEmail;exports.NylasConfirmedEventCard=o.NylasConfirmedEventCard;exports.NylasConnectedCalendars=o.NylasConnectedCalendars;exports.NylasCustomBookingFlow=o.NylasCustomBookingFlow;exports.NylasCustomEventSlug=o.NylasCustomEventSlug;exports.NylasCustomizeBookingSettings=o.NylasCustomizeBookingSettings;exports.NylasDatePicker=o.NylasDatePicker;exports.NylasEditorTabs=o.NylasEditorTabs;exports.NylasEventDescription=o.NylasEventDescription;exports.NylasEventDuration=o.NylasEventDuration;exports.NylasEventInfo=o.NylasEventInfo;exports.NylasEventLimits=o.NylasEventLimits;exports.NylasEventLocation=o.NylasEventLocation;exports.NylasEventTitle=o.NylasEventTitle;exports.NylasFeedbackForm=o.NylasFeedbackForm;exports.NylasFormCard=o.NylasFormCard;exports.NylasIdentityRequestWrapper=o.NylasIdentityRequestWrapper;exports.NylasIfState=o.NylasIfState;exports.NylasLimitFutureBookings=o.NylasLimitFutureBookings;exports.NylasListConfigurations=o.NylasListConfigurations;exports.NylasLocaleSwitch=o.NylasLocaleSwitch;exports.NylasLogin=o.NylasLogin;exports.NylasLogo=o.NylasLogo;exports.NylasMinBookingNotice=o.NylasMinBookingNotice;exports.NylasMinCancellationNotice=o.NylasMinCancellationNotice;exports.NylasNotification=o.NylasNotification;exports.NylasOrganizerConfirmationCard=o.NylasOrganizerConfirmationCard;exports.NylasPageName=o.NylasPageName;exports.NylasPageStyling=o.NylasPageStyling;exports.NylasParticipantBookingCalendars=o.NylasParticipantBookingCalendars;exports.NylasParticipantsCustomAvailability=o.NylasParticipantsCustomAvailability;exports.NylasProvider=o.NylasProvider;exports.NylasReminderEmails=o.NylasReminderEmails;exports.NylasReminderTime=o.NylasReminderTime;exports.NylasSchedulerEditor=o.NylasSchedulerEditor;exports.NylasScheduling=o.NylasScheduling;exports.NylasSchedulingMethod=o.NylasSchedulingMethod;exports.NylasSelectedEventCard=o.NylasSelectedEventCard;exports.NylasTimeWindowPicker=o.NylasTimeWindowPicker;exports.NylasTimeslotInterval=o.NylasTimeslotInterval;exports.NylasTimeslotPicker=o.NylasTimeslotPicker;exports.PaintbrushFillIcon=o.PaintbrushFillIcon;exports.PaintbrushIcon=o.PaintbrushIcon;exports.PeopleIcon=o.PeopleIcon;exports.PersonClipboardIcon=o.PersonClipboardIcon;exports.PersonIcon=o.PersonIcon;exports.PlayIcon=o.PlayIcon;exports.PlusIcon=o.PlusIcon;exports.RadioButtonGroup=o.RadioButtonGroup;exports.RefreshIcon=o.RefreshIcon;exports.ReplyAllIcon=o.ReplyAllIcon;exports.ReplyIcon=o.ReplyIcon;exports.SearchIcon=o.SearchIcon;exports.SelectDropdown=o.SelectDropdown;exports.SentIcon=o.SentIcon;exports.SpamIcon=o.SpamIcon;exports.StarIcon=o.StarIcon;exports.StopIcon=o.StopIcon;exports.TextareaComponent=o.TextareaComponent;exports.TimePeriodSelector=o.TimePeriodSelector;exports.ToggleSwitch=o.ToggleSwitch;exports.TooltipComponent=o.TooltipComponent;exports.TranslateIcon=o.TranslateIcon;exports.TrashFillIcon=o.TrashFillIcon;exports.TrashIcon=o.TrashIcon;exports.UnderlineIcon=o.UnderlineIcon;exports.WarningIcon=o.WarningIcon;exports.ZoomIcon=o.ZoomIcon;exports.applyPolyfills=o.applyPolyfills;exports.defineCustomElements=o.defineCustomElements;exports.setNonce=o.setNonce;exports.useNylasMailboxElement=o.useNylasMailboxElement;
package/dist/react.js ADDED
@@ -0,0 +1,136 @@
1
+ import { Y as e, Z as l, _ as i, $ as c, a0 as t, a1 as r, a2 as I, a3 as b, a4 as y, a5 as N, a6 as d, a7 as C, a8 as m, a9 as g, aa as p, ab as k, ac as u, ad as P, ae as f, af as E, ag as h, ah as v, ai as S, aj as B, ak as F, al as T, am as L, an as w, ao as A, ap as D, aq as R, ar as M, as as x, at as G, au as U, av as W, aw as z, ax as O, ay as q, az as V, aA as Z, aB as j, aC as H, aD as J, aE as K, aF as Q, aG as X, aH as Y, aI as _, aJ as $, aK as aa, aL as sa, aM as oa, aN as na, aO as ea, aP as la, aQ as ia, aR as ca, aS as ta, aT as ra, aU as Ia, aV as ba, aW as ya, aX as Na, aY as da, aZ as Ca, a_ as ma, a$ as ga, b0 as pa, b1 as ka, b2 as ua, b3 as Pa, b4 as fa, b5 as Ea, b6 as ha, N as va, b7 as Sa, b8 as Ba, b9 as Fa, ba as Ta, bb as La, bc as wa, bd as Aa, be as Da, bf as Ra, bg as Ma, bh as xa, bi as Ga, bj as Ua, bk as Wa, bl as za, bm as Oa, bn as qa, bo as Va, bp as Za, bq as ja, br as Ha, bs as Ja, bt as Ka, bu as Qa, bv as Xa, bw as Ya, bx as _a, by as $a, bz as as, bA as ss, bB as os, bC as ns, bD as es, bE as ls, bF as is, bG as cs, bH as ts, bI as rs, bJ as Is, bK as bs, bL as ys, bM as Ns, bN as ds, bO as Cs, bP as ms, bQ as gs, bR as ps, bS as ks, bT as us, bU as Ps, bV as fs, V as Es, W as hs, X as vs, U as Ss } from "./index-995dd3b3.js";
2
+ import "react";
3
+ import "react-dom";
4
+ export {
5
+ e as AddCircleIcon,
6
+ l as ArchiveIcon,
7
+ i as ArrowIcon,
8
+ c as BoldIcon,
9
+ t as ButtonComponent,
10
+ r as CalendarAgendaFillIcon,
11
+ I as CalendarAgendaIcon,
12
+ b as CalendarCancelIcon,
13
+ y as CalendarCheckIcon,
14
+ N as CalendarIcon,
15
+ d as CalendarInfoIcon,
16
+ C as CalendarPatternsIcon,
17
+ m as CheckboxComponent,
18
+ g as CheckmarkCircleIcon,
19
+ p as CheckmarkIcon,
20
+ k as ChevronIcon,
21
+ u as ClockIcon,
22
+ P as CloseIcon,
23
+ f as CopyIcon,
24
+ E as DeleteIcon,
25
+ h as DocumentRefreshIcon,
26
+ v as DragableIcon,
27
+ S as EditIcon,
28
+ B as EnvelopeFillIcon,
29
+ F as EnvelopeIcon,
30
+ T as EyeIcon,
31
+ L as FeedbackIcon,
32
+ w as FlowIcon,
33
+ A as FolderIcon,
34
+ D as ForwardIcon,
35
+ R as GlobeIcon,
36
+ M as GoogleLogoIcon,
37
+ x as GoogleMeetIcon,
38
+ G as InboxIcon,
39
+ U as InfoIcon,
40
+ W as InputColorPicker,
41
+ z as InputComponent,
42
+ O as InputDropdown,
43
+ q as InputImageUrl,
44
+ V as ItalicIcon,
45
+ Z as LoadingIcon,
46
+ j as LocationIcon,
47
+ H as LocationOffIcon,
48
+ J as MicrosoftLogoIcon,
49
+ K as MicrosoftTeamsIcon,
50
+ Q as MultiSelectDropdown,
51
+ X as NylasAdditionalParticipants,
52
+ Y as NylasAvailabilityPicker,
53
+ _ as NylasBookedEventCard,
54
+ $ as NylasBookingCalendarPicker,
55
+ aa as NylasBookingConfirmationRedirect,
56
+ sa as NylasBookingConfirmationType,
57
+ oa as NylasBookingForm,
58
+ na as NylasBookingFormConfig,
59
+ ea as NylasBufferTime,
60
+ la as NylasCalendarPicker,
61
+ ia as NylasCancelBookingForm,
62
+ ca as NylasCancellationPolicy,
63
+ ta as NylasCancelledEventCard,
64
+ ra as NylasConfirmationEmail,
65
+ Ia as NylasConfirmedEventCard,
66
+ ba as NylasConnectedCalendars,
67
+ ya as NylasCustomBookingFlow,
68
+ Na as NylasCustomEventSlug,
69
+ da as NylasCustomizeBookingSettings,
70
+ Ca as NylasDatePicker,
71
+ ma as NylasEditorTabs,
72
+ ga as NylasEventDescription,
73
+ pa as NylasEventDuration,
74
+ ka as NylasEventInfo,
75
+ ua as NylasEventLimits,
76
+ Pa as NylasEventLocation,
77
+ fa as NylasEventTitle,
78
+ Ea as NylasFeedbackForm,
79
+ ha as NylasFormCard,
80
+ va as NylasIdentityRequestWrapper,
81
+ Sa as NylasIfState,
82
+ Ba as NylasLimitFutureBookings,
83
+ Fa as NylasListConfigurations,
84
+ Ta as NylasLocaleSwitch,
85
+ La as NylasLogin,
86
+ wa as NylasLogo,
87
+ Aa as NylasMinBookingNotice,
88
+ Da as NylasMinCancellationNotice,
89
+ Ra as NylasNotification,
90
+ Ma as NylasOrganizerConfirmationCard,
91
+ xa as NylasPageName,
92
+ Ga as NylasPageStyling,
93
+ Ua as NylasParticipantBookingCalendars,
94
+ Wa as NylasParticipantsCustomAvailability,
95
+ za as NylasProvider,
96
+ Oa as NylasReminderEmails,
97
+ qa as NylasReminderTime,
98
+ Va as NylasSchedulerEditor,
99
+ Za as NylasScheduling,
100
+ ja as NylasSchedulingMethod,
101
+ Ha as NylasSelectedEventCard,
102
+ Ja as NylasTimeWindowPicker,
103
+ Ka as NylasTimeslotInterval,
104
+ Qa as NylasTimeslotPicker,
105
+ Xa as PaintbrushFillIcon,
106
+ Ya as PaintbrushIcon,
107
+ _a as PeopleIcon,
108
+ $a as PersonClipboardIcon,
109
+ as as PersonIcon,
110
+ ss as PlayIcon,
111
+ os as PlusIcon,
112
+ ns as RadioButtonGroup,
113
+ es as RefreshIcon,
114
+ ls as ReplyAllIcon,
115
+ is as ReplyIcon,
116
+ cs as SearchIcon,
117
+ ts as SelectDropdown,
118
+ rs as SentIcon,
119
+ Is as SpamIcon,
120
+ bs as StarIcon,
121
+ ys as StopIcon,
122
+ Ns as TextareaComponent,
123
+ ds as TimePeriodSelector,
124
+ Cs as ToggleSwitch,
125
+ ms as TooltipComponent,
126
+ gs as TranslateIcon,
127
+ ps as TrashFillIcon,
128
+ ks as TrashIcon,
129
+ us as UnderlineIcon,
130
+ Ps as WarningIcon,
131
+ fs as ZoomIcon,
132
+ Es as applyPolyfills,
133
+ hs as defineCustomElements,
134
+ vs as setNonce,
135
+ Ss as useNylasMailboxElement
136
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-87381561.cjs");require("react");require("react-dom");const t=".sc-refresh-icon-h{display:flex}",i=t,c=class{constructor(s){e.registerInstance(this,s),this.width="15",this.height="15"}render(){return e.h("svg",{key:"fb5eb381a876c9e533df1c22aee66519f25f3af5",fill:"auto",width:this.width,height:this.height,viewBox:"0 0 32 32",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"f4a74f247ded2b9623ebf922a52baff4e375bdd1",d:"M15.544 28.080c-0.002-0.006-0.008-0.010-0.012-0.015l-2.873-4.489c-0.204-0.335-0.646-0.454-0.992-0.266l-0.256 0.157c-0.344 0.188-0.337 0.673-0.133 1.008l1.841 2.857c-0.157-0.035-0.316-0.063-0.471-0.103-3.224-0.843-5.953-3.026-7.485-5.988-1.448-2.797-1.72-5.99-0.766-8.992s3.118-5.452 5.915-6.899c0.476-0.247 0.662-0.832 0.416-1.308-0.246-0.477-0.832-0.663-1.308-0.416-3.258 1.686-5.763 4.54-6.874 8.036s-0.794 7.215 0.892 10.473c1.786 3.448 4.963 5.989 8.72 6.973 0.043 0.011 0.087 0.017 0.13 0.028l-2.541 1.288c-0.344 0.189-0.458 0.613-0.254 0.948l0.098 0.256c0.205 0.335 0.557 0.454 0.9 0.266l4.651-2.381c0.006-0.004 0.012-0.003 0.018-0.007l0.312-0.171c0.172-0.095 0.287-0.249 0.332-0.422 0.047-0.172 0.025-0.364-0.076-0.531zM28.559 10.025c-1.783-3.447-4.862-5.988-8.618-6.972-0.267-0.070-0.541-0.124-0.814-0.179l2.494-1.265c0.344-0.189 0.549-0.614 0.345-0.949l-0.099-0.255c-0.205-0.336-0.648-0.454-0.991-0.267l-4.651 2.381c-0.006 0.003-0.012 0.002-0.018 0.006l-0.312 0.171c-0.173 0.095-0.287 0.249-0.332 0.422-0.047 0.172-0.025 0.364 0.077 0.53l0.185 0.304c0.003 0.006 0.008 0.010 0.012 0.016l2.873 4.489c0.203 0.335 0.646 0.454 0.991 0.266l0.226-0.157c0.344-0.188 0.366-0.673 0.163-1.008l-1.85-2.87c0.407 0.063 0.811 0.138 1.207 0.242 3.226 0.845 5.856 3.027 7.387 5.986 1.448 2.797 1.72 5.99 0.765 8.991s-3.020 5.451-5.818 6.901c-0.476 0.247-0.662 0.831-0.415 1.308 0.172 0.332 0.511 0.524 0.863 0.524 0.15 0 0.302-0.035 0.446-0.109 3.259-1.686 5.664-4.54 6.776-8.035 1.111-3.497 0.794-7.217-0.893-10.473z"}))}};c.style=i;exports.refresh_icon=c;
@@ -0,0 +1,15 @@
1
+ import { r as s, h as c } from "./index-995dd3b3.js";
2
+ import "react";
3
+ import "react-dom";
4
+ const t = ".sc-refresh-icon-h{display:flex}", l = t, h = class {
5
+ constructor(e) {
6
+ s(this, e), this.width = "15", this.height = "15";
7
+ }
8
+ render() {
9
+ return c("svg", { key: "fb5eb381a876c9e533df1c22aee66519f25f3af5", fill: "auto", width: this.width, height: this.height, viewBox: "0 0 32 32", version: "1.1", xmlns: "http://www.w3.org/2000/svg" }, c("path", { key: "f4a74f247ded2b9623ebf922a52baff4e375bdd1", d: "M15.544 28.080c-0.002-0.006-0.008-0.010-0.012-0.015l-2.873-4.489c-0.204-0.335-0.646-0.454-0.992-0.266l-0.256 0.157c-0.344 0.188-0.337 0.673-0.133 1.008l1.841 2.857c-0.157-0.035-0.316-0.063-0.471-0.103-3.224-0.843-5.953-3.026-7.485-5.988-1.448-2.797-1.72-5.99-0.766-8.992s3.118-5.452 5.915-6.899c0.476-0.247 0.662-0.832 0.416-1.308-0.246-0.477-0.832-0.663-1.308-0.416-3.258 1.686-5.763 4.54-6.874 8.036s-0.794 7.215 0.892 10.473c1.786 3.448 4.963 5.989 8.72 6.973 0.043 0.011 0.087 0.017 0.13 0.028l-2.541 1.288c-0.344 0.189-0.458 0.613-0.254 0.948l0.098 0.256c0.205 0.335 0.557 0.454 0.9 0.266l4.651-2.381c0.006-0.004 0.012-0.003 0.018-0.007l0.312-0.171c0.172-0.095 0.287-0.249 0.332-0.422 0.047-0.172 0.025-0.364-0.076-0.531zM28.559 10.025c-1.783-3.447-4.862-5.988-8.618-6.972-0.267-0.070-0.541-0.124-0.814-0.179l2.494-1.265c0.344-0.189 0.549-0.614 0.345-0.949l-0.099-0.255c-0.205-0.336-0.648-0.454-0.991-0.267l-4.651 2.381c-0.006 0.003-0.012 0.002-0.018 0.006l-0.312 0.171c-0.173 0.095-0.287 0.249-0.332 0.422-0.047 0.172-0.025 0.364 0.077 0.53l0.185 0.304c0.003 0.006 0.008 0.010 0.012 0.016l2.873 4.489c0.203 0.335 0.646 0.454 0.991 0.266l0.226-0.157c0.344-0.188 0.366-0.673 0.163-1.008l-1.85-2.87c0.407 0.063 0.811 0.138 1.207 0.242 3.226 0.845 5.856 3.027 7.387 5.986 1.448 2.797 1.72 5.99 0.765 8.991s-3.020 5.451-5.818 6.901c-0.476 0.247-0.662 0.831-0.415 1.308 0.172 0.332 0.511 0.524 0.863 0.524 0.15 0 0.302-0.035 0.446-0.109 3.259-1.686 5.664-4.54 6.776-8.035 1.111-3.497 0.794-7.217-0.893-10.473z" }));
10
+ }
11
+ };
12
+ h.style = l;
13
+ export {
14
+ h as refresh_icon
15
+ };