@nylas/react 1.1.0-canary.11 → 1.1.0-canary.12

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 (110) hide show
  1. package/dist/add-circle-icon_21.entry-172d31c3.js +6726 -0
  2. package/dist/add-circle-icon_21.entry-71af48f1.cjs +41 -0
  3. package/dist/{archive-icon_7.entry-24f31e46.cjs → archive-icon_7.entry-59d9e24f.cjs} +1 -1
  4. package/dist/{archive-icon_7.entry-3c5e3ccf.js → archive-icon_7.entry-e892a458.js} +1 -1
  5. package/dist/{arrow-icon.entry-813bffe9.js → arrow-icon.entry-060b9b4f.js} +1 -1
  6. package/dist/{arrow-icon.entry-562eb541.cjs → arrow-icon.entry-834b8066.cjs} +1 -1
  7. package/dist/{bold-icon_3.entry-c0e7d524.js → bold-icon_3.entry-0f038db3.js} +1 -1
  8. package/dist/{bold-icon_3.entry-e8b034fe.cjs → bold-icon_3.entry-eb0fcdaa.cjs} +1 -1
  9. package/dist/{calendar-cancel-icon.entry-7d4fdb1b.cjs → calendar-cancel-icon.entry-27a6f628.cjs} +1 -1
  10. package/dist/{calendar-cancel-icon.entry-0b0219cb.js → calendar-cancel-icon.entry-96156441.js} +1 -1
  11. package/dist/{calendar-check-icon_2.entry-88025f63.cjs → calendar-check-icon_2.entry-b6d6d220.cjs} +1 -1
  12. package/dist/{calendar-check-icon_2.entry-6ecd2faa.js → calendar-check-icon_2.entry-c7c13e3e.js} +1 -1
  13. package/dist/{calendar-icon.entry-b753520f.cjs → calendar-icon.entry-e7f6a9a8.cjs} +1 -1
  14. package/dist/{calendar-icon.entry-34d8ef69.js → calendar-icon.entry-f088fb14.js} +1 -1
  15. package/dist/{chevron-icon_3.entry-0aeb4cfa.cjs → chevron-icon_3.entry-8c6e6f74.cjs} +1 -1
  16. package/dist/{chevron-icon_3.entry-ae55fd65.js → chevron-icon_3.entry-90a3e89c.js} +1 -1
  17. package/dist/{close-icon.entry-c80da833.cjs → close-icon.entry-175b9674.cjs} +1 -1
  18. package/dist/{close-icon.entry-ae66c827.js → close-icon.entry-e694948f.js} +1 -1
  19. package/dist/{constants-f34b9c6e-b9f975af.cjs → constants-f34b9c6e-593e21cc.cjs} +1 -1
  20. package/dist/{constants-f34b9c6e-d0f5cd19.js → constants-f34b9c6e-91f6ad05.js} +1 -1
  21. package/dist/{document-refresh-icon.entry-36405467.cjs → document-refresh-icon.entry-a54c74b9.cjs} +1 -1
  22. package/dist/{document-refresh-icon.entry-7d370f85.js → document-refresh-icon.entry-ca98d879.js} +1 -1
  23. package/dist/{elements-dc5b338e-0dbb4f67.cjs → elements-dc5b338e-60f95088.cjs} +1 -1
  24. package/dist/{elements-dc5b338e-524cb111.js → elements-dc5b338e-68eab1e5.js} +1 -1
  25. package/dist/{focus-visible-e8093c16-7e94a4f3.cjs → focus-visible-e8093c16-a0869441.cjs} +1 -1
  26. package/dist/{focus-visible-e8093c16-17ab1557.js → focus-visible-e8093c16-b5d785fc.js} +1 -1
  27. package/dist/{forward-icon_6.entry-a479b39e.cjs → forward-icon_6.entry-4b321b9a.cjs} +1 -1
  28. package/dist/{forward-icon_6.entry-384cc3c5.js → forward-icon_6.entry-84ac76ac.js} +2 -2
  29. package/dist/global-37eeb0cd-6c5934cf.cjs +1 -0
  30. package/dist/global-37eeb0cd-b42e0abc.js +4 -0
  31. package/dist/{globe-icon.entry-58b9f3fc.js → globe-icon.entry-14a60f32.js} +1 -1
  32. package/dist/{globe-icon.entry-0c848856.cjs → globe-icon.entry-ef04c8bf.cjs} +1 -1
  33. package/dist/{google-logo-icon_4.entry-3dce1b83.js → google-logo-icon_4.entry-4fa3cb8e.js} +47 -52
  34. package/dist/google-logo-icon_4.entry-ffeec491.cjs +1 -0
  35. package/dist/{index-33f74306.cjs → index-3a004ec1.cjs} +10 -10
  36. package/dist/{index-20ea5b0c.js → index-4c7e8f2f.js} +161 -158
  37. package/dist/index-92989ac4-69175657.js +902 -0
  38. package/dist/index-92989ac4-6f32ff2a.cjs +6 -0
  39. package/dist/{index.es-be19d2df-f732308a.cjs → index.es-9190f785-60475c4c.cjs} +6 -6
  40. package/dist/{index.es-be19d2df-c2fdca63.js → index.es-9190f785-69269065.js} +12 -13
  41. package/dist/{info-icon_2.entry-98965833.js → info-icon_2.entry-45f6f01f.js} +1 -1
  42. package/dist/{info-icon_2.entry-dd0a0633.cjs → info-icon_2.entry-fb099090.cjs} +1 -1
  43. package/dist/{loading-icon.entry-abd81cea.js → loading-icon.entry-67c8b1fa.js} +1 -1
  44. package/dist/{loading-icon.entry-46821f18.cjs → loading-icon.entry-eaabff41.cjs} +1 -1
  45. package/dist/{mailbox-store-76540d24-7bf14e45.cjs → mailbox-store-29139d89-dd9d3d1b.cjs} +1 -1
  46. package/dist/{mailbox-store-76540d24-dfb53045.js → mailbox-store-29139d89-e3513416.js} +2 -2
  47. package/dist/{nylas-additional-participants.entry-d35d7af5.cjs → nylas-additional-participants.entry-6413fc87.cjs} +1 -1
  48. package/dist/{nylas-additional-participants.entry-f6ed34d6.js → nylas-additional-participants.entry-a1fb4ef4.js} +2 -2
  49. package/dist/{nylas-booked-event-card_10.entry-534e587c.cjs → nylas-booked-event-card_10.entry-ce660783.cjs} +1 -1
  50. package/dist/{nylas-booked-event-card_10.entry-8efe8335.js → nylas-booked-event-card_10.entry-e435ff63.js} +3 -3
  51. package/dist/{nylas-custom-booking-flow.entry-12d09496.cjs → nylas-custom-booking-flow.entry-3e690bb7.cjs} +1 -1
  52. package/dist/{nylas-custom-booking-flow.entry-0e7b605d.js → nylas-custom-booking-flow.entry-56075ecd.js} +2 -2
  53. package/dist/{nylas-form-card.entry-7dd86dde.js → nylas-form-card.entry-33ff95e1.js} +2 -2
  54. package/dist/{nylas-form-card.entry-94579d1d.cjs → nylas-form-card.entry-64d7be4d.cjs} +1 -1
  55. package/dist/{nylas-if-state.entry-32ea90ea.cjs → nylas-if-state.entry-1e4b0a58.cjs} +1 -1
  56. package/dist/{nylas-if-state.entry-92cbc0b9.js → nylas-if-state.entry-3d22bca7.js} +2 -2
  57. package/dist/{nylas-list-folders.entry-8595a9b7.cjs → nylas-list-folders.entry-3da37b1c.cjs} +1 -1
  58. package/dist/{nylas-list-folders.entry-cab222c9.js → nylas-list-folders.entry-e634780d.js} +2 -2
  59. package/dist/{nylas-list-threads.entry-8e9294a3.js → nylas-list-threads.entry-26dbb8ff.js} +2 -2
  60. package/dist/{nylas-list-threads.entry-3fef6316.cjs → nylas-list-threads.entry-ef4743af.cjs} +1 -1
  61. package/dist/{nylas-login.entry-bc885e04.cjs → nylas-login.entry-a76e4aae.cjs} +1 -1
  62. package/dist/{nylas-login.entry-bd1d5b6f.js → nylas-login.entry-ff7d9db5.js} +2 -2
  63. package/dist/{nylas-mailbox-pagination.entry-74d3b376.cjs → nylas-mailbox-pagination.entry-565ee29b.cjs} +1 -1
  64. package/dist/{nylas-mailbox-pagination.entry-58657a09.js → nylas-mailbox-pagination.entry-fcb3cc47.js} +2 -2
  65. package/dist/{nylas-mailbox-toolbar-button.entry-8b73b9f4.cjs → nylas-mailbox-toolbar-button.entry-3a94b1e9.cjs} +1 -1
  66. package/dist/{nylas-mailbox-toolbar-button.entry-d7817b46.js → nylas-mailbox-toolbar-button.entry-ae13c538.js} +2 -2
  67. package/dist/{nylas-mailbox.entry-0bddc2fd.js → nylas-mailbox.entry-6d86abe9.js} +7 -6
  68. package/dist/nylas-mailbox.entry-8f41c35a.cjs +1 -0
  69. package/dist/{nylas-provider.entry-2e24192d.js → nylas-provider.entry-01e0944e.js} +6 -5
  70. package/dist/nylas-provider.entry-65f0f8da.cjs +1 -0
  71. package/dist/nylas-scheduler-editor.entry-7dc20e4d.cjs +2 -0
  72. package/dist/nylas-scheduler-editor.entry-8f62880a.js +1391 -0
  73. package/dist/nylas-scheduling.entry-1b6628a3.cjs +1 -0
  74. package/dist/{nylas-scheduling.entry-3f170361.js → nylas-scheduling.entry-f15b3106.js} +40 -38
  75. package/dist/{nylas-threads-refresh.entry-3b9f57c3.cjs → nylas-threads-refresh.entry-d62d0574.cjs} +1 -1
  76. package/dist/{nylas-threads-refresh.entry-f2967405.js → nylas-threads-refresh.entry-d7727ccb.js} +2 -2
  77. package/dist/{nylas-threads-search.entry-e70bbf70.js → nylas-threads-search.entry-4803d20b.js} +2 -2
  78. package/dist/{nylas-threads-search.entry-3e0b4fdc.cjs → nylas-threads-search.entry-eec50b1b.cjs} +1 -1
  79. package/dist/{nylas-view-thread.entry-4f39f045.js → nylas-view-thread.entry-2b85f8e2.js} +2 -2
  80. package/dist/{nylas-view-thread.entry-b23080b7.cjs → nylas-view-thread.entry-5da789da.cjs} +1 -1
  81. package/dist/{people-icon.entry-7f3b95e9.js → people-icon.entry-63f63064.js} +1 -1
  82. package/dist/{people-icon.entry-15cd7d77.cjs → people-icon.entry-b6426fe6.cjs} +1 -1
  83. package/dist/{play-icon_2.entry-2172886a.cjs → play-icon_2.entry-2b8094d7.cjs} +1 -1
  84. package/dist/{play-icon_2.entry-13065065.js → play-icon_2.entry-a3262db3.js} +1 -1
  85. package/dist/react.cjs +1 -1
  86. package/dist/react.js +1 -1
  87. package/dist/{refresh-icon.entry-61067a7f.cjs → refresh-icon.entry-542f680c.cjs} +1 -1
  88. package/dist/{refresh-icon.entry-fbfa185e.js → refresh-icon.entry-64679ef7.js} +1 -1
  89. package/dist/{register-component-83e24412-b666e56b.js → register-component-83e24412-51af5293.js} +1 -1
  90. package/dist/{register-component-83e24412-445c6ad9.cjs → register-component-83e24412-d76a2962.cjs} +1 -1
  91. package/dist/{scheduler-config-store-ec3b6190-8bde49c6.cjs → scheduler-config-store-ec3b6190-2710b76a.cjs} +1 -1
  92. package/dist/{scheduler-config-store-ec3b6190-fa81c492.js → scheduler-config-store-ec3b6190-df09ddc0.js} +1 -1
  93. package/dist/scheduler-store-dabdbc4f-404dc261.cjs +1 -0
  94. package/dist/{scheduler-store-8ca9003d-8da2c12d.js → scheduler-store-dabdbc4f-6f6096d6.js} +41 -28
  95. package/dist/{time-period-selector.entry-5e083fd3.js → time-period-selector.entry-8e6954f5.js} +1 -1
  96. package/dist/{time-period-selector.entry-febf55eb.cjs → time-period-selector.entry-c5faae46.cjs} +1 -1
  97. package/dist/{translate-icon.entry-8ce0a713.cjs → translate-icon.entry-49a653f0.cjs} +1 -1
  98. package/dist/{translate-icon.entry-10db7d36.js → translate-icon.entry-57dedacf.js} +1 -1
  99. package/dist/{warning-icon.entry-470e449d.js → warning-icon.entry-a7977526.js} +1 -1
  100. package/dist/{warning-icon.entry-b8217553.cjs → warning-icon.entry-bce861bd.cjs} +1 -1
  101. package/package.json +2 -2
  102. package/dist/add-circle-icon_21.entry-71e60262.js +0 -1755
  103. package/dist/add-circle-icon_21.entry-95dda099.cjs +0 -1
  104. package/dist/google-logo-icon_4.entry-e1e63fd0.cjs +0 -1
  105. package/dist/nylas-mailbox.entry-762f5062.cjs +0 -1
  106. package/dist/nylas-provider.entry-f8ba7a6e.cjs +0 -1
  107. package/dist/nylas-scheduler-editor.entry-8189b099.js +0 -2269
  108. package/dist/nylas-scheduler-editor.entry-a642f833.cjs +0 -7
  109. package/dist/nylas-scheduling.entry-13087b5f.cjs +0 -1
  110. package/dist/scheduler-store-8ca9003d-57b3f7a7.cjs +0 -1
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-3a004ec1.cjs"),m=require("./index.es-9190f785-60475c4c.cjs"),y=require("./scheduler-store-dabdbc4f-404dc261.cjs");require("react");require("react-dom");require("./global-37eeb0cd-6c5934cf.cjs");class C{constructor({schedulerAPIURL:e,nylasSchedulerStore:a,sessionId:i,configId:s}){if(!e)throw new Error("schedulerAPIURL is required");if(!a)throw new Error("nylasSchedulerStore is required");if(!i&&!s)throw new Error("sessionId is required for private configs, if not config id is required for public configs");e==="/"&&(e=new URL(window.location.href).origin),this.configId=s,this.sessionId=i,this.schedulerAPIURL=e,this.nylasSchedulerStore=a}init(){t.debug("NylasConnector init")}get schedulerStore(){return this.nylasSchedulerStore}get scheduler(){return this._schedulerAPIConnector?this._schedulerAPIConnector:(this._schedulerAPIConnector=new y.NylaSchedulerAPIConnector({schedulerAPIURL:this.schedulerAPIURL,schedulerStore:this.schedulerStore,sessionId:this.sessionId,configId:this.configId}),this._schedulerAPIConnector)}resetStores(){this.nylasSchedulerStore.reset()}}const b=(n,e)=>{const a=n.isLoading,i=n.showNotification,s=n.nylasBranding;return t.h(t.Fragment,null,i&&t.h("nylas-notification",null),a&&t.h("div",{class:"loading"},t.h("div",{class:"left"},t.h("div",{class:"skeleton"})),t.h("div",{class:"right"},t.h("div",{class:"skeleton"}),t.h("div",{class:"skeleton"}),t.h("div",{class:"skeleton"}),t.h("div",{class:"skeleton"}),t.h("div",{class:"skeleton"}))),!a&&e,t.h("div",{class:"footer"},s&&t.h(t.Fragment,null,"Powered by ",t.h("nylas-logo",null))))},_=(n,e)=>t.h("div",{class:"message-banner"},e),E=':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 6px -2px rgba(0, 0, 0, 0.05), 0px 10px 15px -3px 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-top:1rem}.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,.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{background-color:var(--nylas-base-50)}.cancelled-event-page,.cancel-flow-page{padding:1rem;height:496px;display:flex;justify-content:center;align-items:center}.booked-event-page,.cancelled-event-page,.cancel-flow-page{min-width:784px;background:var(--nylas-base-50)}@media screen and (max-width: 768px){.booked-event-page,.cancelled-event-page,.cancel-flow-page{min-width:90%}}.left-panel{padding:1rem 20px 0;gap:1rem;height:512px;min-width:384px;border-top-left-radius:inherit;background:var(--nylas-base-0)}@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}}.border{margin-left:-20px;margin-right:-20px;border-top-width:1px;height:1px;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:512px;padding-top:16px;border-left:1px solid var(--nylas-base-200);border-top-right-radius:inherit}@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:496px}@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}',D=E,x={title:"Something went wrong...",type:m.nr.Error,category:y.ErrorCategory.Component},k=class{constructor(n){t.registerInstance(this,n),this.init=t.createEvent(this,"init",7),this.schedulerWillLoad=t.createEvent(this,"schedulerWillLoad",7),this.schedulerDidLoad=t.createEvent(this,"schedulerDidLoad",7),this.nylasSchedulerError=t.createEvent(this,"nylasSchedulerError",7),this.mode="app",this.defaultSchedulerState=void 0,this.sessionId=void 0,this.schedulerApiUrl="https://api.us.nylas.com",this.bookingInfo=void 0,this.rescheduleBookingId=void 0,this.cancelBookingId=void 0,this.configurationId=void 0,this.nylasBranding=!0,this.eventOverrides={},this.isLoading=void 0,this.themeConfig=void 0,this.showNotification=!0,this.automaticComponentRegistration=!0,this.selectedDateLabel=new Date().toLocaleDateString(void 0,{dateStyle:"full"})||"No date selected"}connectedCallback(){t.debug("[nylas-scheduler] connectedCallback")}async componentWillLoad(){var a,i;if(t.debug("[nylas-scheduler] Component will load"),this.schedulerWillLoad.emit(this.host).defaultPrevented||!this.checkIfSessionIdOrConfigIdExists())return;this.stores={scheduler:y.CreateNylasSchedulerStore({bookingInfo:this.bookingInfo,nylasBranding:this.nylasBranding,...this.defaultSchedulerState})},this.baseProvider=new m.NylasBaseProvider(this.host,this.stores,this.automaticComponentRegistration,this.eventOverrides);const e=(a=this.baseProvider)==null?void 0:a.getStore("scheduler");if(this.nylasSchedulerConnector=new C({schedulerAPIURL:this.schedulerApiUrl,sessionId:this.sessionId,configId:this.configurationId,nylasSchedulerStore:e}),this.init.emit(this.host),(i=this.baseProvider)==null||i.componentWillLoad(this.nylasSchedulerConnector),this.themeConfig)for(const[s,o]of Object.entries(this.themeConfig))this.host.style.setProperty(`${s}`,o)}async componentDidLoad(){var d,l,h,c,g,v,w;if((d=this.baseProvider)==null||d.componentDidLoad(),!this.checkIfSessionIdOrConfigIdExists())return;const n=await((l=this.nylasSchedulerConnector)==null?void 0:l.scheduler.getUISettings());(!n||"error"in n)&&this.nylasSchedulerError.emit({...this.getErrorObject(n==null?void 0:n.error)});const e=(h=this.baseProvider)==null?void 0:h.getStore("scheduler"),a=(g=(c=e==null?void 0:e.get("configSettings"))==null?void 0:c.scheduler)==null?void 0:g.available_days_in_future,i=e==null?void 0:e.get("selectedTimeslot");if(i&&(i!=null&&i.start_time)){if(!this.isTimeslotValid(i))return;if(e!=null&&e.get("showBookingForm")){e==null||e.set("selectedDate",i.start_time);return}}const s=e==null?void 0:e.get("selectedDate"),o=e==null?void 0:e.get("availability");let r;if(!(o&&o.length>0)){if(s){const{startTime:u,endTime:p,endTimeForAvailableDaysInFuture:f}=this.validateAvailableDaysInFuture(s,a||30);s.getTime()<f*1e3&&(r=await((w=this.nylasSchedulerConnector)==null?void 0:w.scheduler.getAvailability(u,p)))}else{const u=new Date,{startTime:p,endTime:f,endTimeForAvailableDaysInFuture:I}=this.validateAvailableDaysInFuture(u,a||30);u.getTime()<I*1e3&&(r=await((v=this.nylasSchedulerConnector)==null?void 0:v.scheduler.getAvailability(p,f)))}if((!r||"error"in r)&&this.nylasSchedulerError.emit({...this.getErrorObject(r==null?void 0:r.error)}),!s){let u=new Date;const p=e==null?void 0:e.get("availability").find(f=>new Date(f.start_time)>new Date);p&&(u=p.start_time),e==null||e.set("selectedDate",u)}}}componentDisconnected(){var n;(n=this.baseProvider)==null||n.componentDisconnected()}bookingInfoChanged(n){var e;(e=this.stores)==null||e.scheduler.set("bookingInfo",n)}async registerComponentHandler(n){var e;(e=this.baseProvider)==null||e.registerComponent(n.detail)}async unregisterComponentHandler(n){var e;(e=this.baseProvider)==null||e.unregisterComponent(n.detail)}async monthChangedHandler(n){var r,d,l,h,c;const e=n.detail,a=(h=(l=(d=(r=this.nylasSchedulerConnector)==null?void 0:r.schedulerStore)==null?void 0:d.get("configSettings"))==null?void 0:l.scheduler)==null?void 0:h.available_days_in_future,{startTime:i,endTime:s,endTimeForAvailableDaysInFuture:o}=this.validateAvailableDaysInFuture(e,a||30);if(i<o&&e.getTime()<o*1e3){const g=await((c=this.nylasSchedulerConnector)==null?void 0:c.scheduler.getAvailability(i,s));(!g||"error"in g)&&this.nylasSchedulerError.emit({...this.getErrorObject(g==null?void 0:g.error)})}}async bookButtonClickedHandler(n){var s,o,r,d;const e=(o=(s=this.nylasSchedulerConnector)==null?void 0:s.schedulerStore)==null?void 0:o.get("rescheduleBookingId"),a=this.rescheduleBookingId||e;if(a){const l=await((r=this.nylasSchedulerConnector)==null?void 0:r.scheduler.rescheduleBooking(a,n.detail));(!l||"error"in l)&&this.nylasSchedulerError.emit({...this.getErrorObject(l==null?void 0:l.error)});return}const i=await((d=this.nylasSchedulerConnector)==null?void 0:d.scheduler.bookTimeslot(n.detail));(!i||"error"in i)&&this.nylasSchedulerError.emit({...this.getErrorObject(i==null?void 0:i.error)})}dateSelectedHandler(n){const e=n.detail;this.selectedDateLabel=e?e.toLocaleDateString(void 0,{dateStyle:"full"}):"No date selected"}cancelBookedEventErrorHandler(n){this.nylasSchedulerError.emit({...this.getErrorObject(n.detail.error)})}cancelBookedEventValidationErrorHandler(n){this.nylasSchedulerError.emit({...this.getErrorObject(n.detail.error)})}rescheduleBookedEventErrorHandler(n){this.nylasSchedulerError.emit({...this.getErrorObject(n.detail.error)})}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)||x.title,category:(n==null?void 0:n.category)||x.category,type:m.nr.Error,description:(n==null?void 0:n.message)||"",id:new Date().getTime().toString(),ttl:"none"}}checkIfSessionIdOrConfigIdExists(){return!this.sessionId&&!this.configurationId?(this.nylasSchedulerError.emit({title:"No sessionId!",category:y.ErrorCategory.Component,type:m.nr.Error,description:"Session ID is required",id:new Date().getTime().toString(),ttl:"none"}),!1):!0}isTimeslotValid(n){return new Date(n.start_time)<new Date?(this.nylasSchedulerError.emit({title:"Invalid tiemslot!",category:y.ErrorCategory.Component,type:m.nr.Error,description:"The selected timeslot is invalid.",id:new Date().getTime().toString(),ttl:"none"}),!1):!0}validateAvailableDaysInFuture(n,e){const a=new Date,i=new Date(n.getFullYear(),n.getMonth(),1).getTime()/1e3,s=new Date(n.getFullYear(),n.getMonth()+1,1).getTime()/1e3,o=Math.floor(t.addDaysToCurrentDate(a,e).getTime()/1e3),r=Math.min(o,s);return{startTime:i,endTime:r,endTimeForAvailableDaysInFuture:o}}render(){var h;const n=this.mode==="app",e=(h=this.baseProvider)==null?void 0:h.getStore("scheduler"),a=e==null?void 0:e.get("eventInfo"),i=e==null?void 0:e.get("showBookingForm"),s=e==null?void 0:e.get("cancelledEventInfo"),o=(e==null?void 0:e.get("cancelBookingId"))||this.cancelBookingId,r=e==null?void 0:e.get("selectedTimeslot"),d=(e==null?void 0:e.get("rescheduleBookingId"))||this.rescheduleBookingId,l=(e==null?void 0:e.get("nylasBranding"))||this.nylasBranding;if(n&&o&&!s)return t.h(t.Host,null,t.h(b,{nylasBranding:l,isLoading:this.isLoading,showNotification:this.showNotification},t.h("div",{class:"cancel-flow-page",part:"cancel-flow-page"},t.h("nylas-cancel-booking-form",{cancelBookingId:o,exportparts:"ncbf, ncbf__input-textfield, ncbf__button-cta, ncbf__button-outline, ncbf__input-label"}))));if(n&&s)return t.h(t.Host,null,t.h(b,{nylasBranding:l,isLoading:this.isLoading,showNotification:this.showNotification},t.h("div",{class:"cancelled-event-page",part:"cancelled-event-page"},t.h("nylas-cancelled-event-card",{cancelledEventInfo:s,exportparts:"ncec, ncec__icon, ncec__title, ncec__description, ncec__button-outline, ncec__card"}))));if(n&&a)return t.h(t.Host,null,t.h(b,{nylasBranding:l,isLoading:this.isLoading,showNotification:this.showNotification},t.h("div",{class:"booked-event-page",part:"booked-event-page"},t.h("nylas-booked-event-card",{selectedTimeslot:r,eventInfo:a,exportparts:"nbec, nbec__title, nbec__card, nbec__description, nbec__button-outline, nbec__cancel-cta, nbec__reschedule-cta"}))));if(n&&(!a||d)&&!i){const c=this.host.querySelector('[slot="timeslot-picker-cta-label"]');return t.h(t.Host,null,t.h(b,{nylasBranding:l,isLoading:this.isLoading,showNotification:this.showNotification},d&&t.h(_,null,"Choose another time slot to reschedule your meeting"),t.h("div",{class:"select-date-page",part:"select-date-page"},t.h("div",{class:"left-panel"},t.h("nylas-date-picker",{exportparts:"ndp, ndp__month-header, ndp__month-button, ndp__day, ndp__date, ndp__date--selected, ndp__date--current-day, ndp__date--current-month"}),t.h("div",{class:"border"}),t.h("nylas-locale-switch",null)),t.h("div",{class:"right-panel"},t.h("h2",null,t.h("calendar-icon",null),t.h("span",{id:"selectedDate"},this.selectedDateLabel)),t.h("nylas-timeslot-picker",{exportparts:"ntp, ntp__timeslot, ntp__timeslot--selected, ntp__button-primary"},c&&t.h("span",{slot:"timeslot-picker-cta-label"},t.h("slot",{name:"timeslot-picker-cta-label"})))))))}if(n&&!a&&i){const c=this.host.querySelector('[slot="custom-booking-form"]');return t.h(t.Host,null,t.h(b,{nylasBranding:l,isLoading:this.isLoading,showNotification:this.showNotification},d&&t.h(_,null,"Choose another time slot to reschedule your meeting"),t.h("div",{class:"additional-data-page",part:"additional-data-page"},t.h("div",{class:"left-panel"},t.h("div",{class:"wrapper"},t.h("nylas-selected-event-card",{exportparts:"nsec, nsec__card, nsec__icon, nsec__date, nsec__time"}))),t.h("div",{class:"right-panel"},t.h("nylas-booking-form",{exportparts:"nbf, nbf__input-label, nbf__input-textfield, nbf__button-ghost, nbf__button-primary, nbf__button-outline"},c&&t.h("div",{slot:"custom-booking-form"},t.h("slot",{name:"custom-booking-form"})))))))}return t.h(t.Host,null,t.h("slot",null))}get host(){return t.getElement(this)}static get watchers(){return{bookingInfo:["bookingInfoChanged"]}}};k.style=D;exports.nylas_scheduling=k;
@@ -1,17 +1,18 @@
1
- import { r as B, c as y, d as w, k as L, h as n, H as f, g as T, F as I } from "./index-20ea5b0c.js";
2
- import { n as v, N } from "./index.es-be19d2df-c2fdca63.js";
3
- import { E as _, C as A, N as F } from "./scheduler-store-8ca9003d-8da2c12d.js";
1
+ import { r as B, c as y, d as w, k as L, h as n, H as f, g as T, F as I } from "./index-4c7e8f2f.js";
2
+ import { n as v, N } from "./index.es-9190f785-69269065.js";
3
+ import { E as _, C as A, N as F } from "./scheduler-store-dabdbc4f-6f6096d6.js";
4
4
  import "react";
5
5
  import "react-dom";
6
+ import "./global-37eeb0cd-b42e0abc.js";
6
7
  class P {
7
- constructor({ schedulerAPIURL: e, nylasSchedulerStore: s, sessionId: i, configId: a }) {
8
+ constructor({ schedulerAPIURL: e, nylasSchedulerStore: a, sessionId: i, configId: s }) {
8
9
  if (!e)
9
10
  throw new Error("schedulerAPIURL is required");
10
- if (!s)
11
+ if (!a)
11
12
  throw new Error("nylasSchedulerStore is required");
12
- if (!i && !a)
13
+ if (!i && !s)
13
14
  throw new Error("sessionId is required for private configs, if not config id is required for public configs");
14
- e === "/" && (e = new URL(window.location.href).origin), this.configId = a, this.sessionId = i, this.schedulerAPIURL = e, this.nylasSchedulerStore = s;
15
+ e === "/" && (e = new URL(window.location.href).origin), this.configId = s, this.sessionId = i, this.schedulerAPIURL = e, this.nylasSchedulerStore = a;
15
16
  }
16
17
  init() {
17
18
  w("NylasConnector init");
@@ -32,12 +33,12 @@ class P {
32
33
  }
33
34
  }
34
35
  const b = (t, e) => {
35
- const s = t.isLoading, i = t.showNotification, a = t.nylasBranding;
36
+ const a = t.isLoading, i = t.showNotification, s = t.nylasBranding;
36
37
  return n(
37
38
  I,
38
39
  null,
39
40
  i && n("nylas-notification", null),
40
- s && n(
41
+ a && n(
41
42
  "div",
42
43
  { class: "loading" },
43
44
  n(
@@ -55,8 +56,8 @@ const b = (t, e) => {
55
56
  n("div", { class: "skeleton" })
56
57
  )
57
58
  ),
58
- !s && e,
59
- n("div", { class: "footer" }, a && n(
59
+ !a && e,
60
+ n("div", { class: "footer" }, s && n(
60
61
  I,
61
62
  null,
62
63
  "Powered by ",
@@ -71,7 +72,7 @@ const b = (t, e) => {
71
72
  w("[nylas-scheduler] connectedCallback");
72
73
  }
73
74
  async componentWillLoad() {
74
- var s, i;
75
+ var a, i;
75
76
  if (w("[nylas-scheduler] Component will load"), this.schedulerWillLoad.emit(this.host).defaultPrevented || !this.checkIfSessionIdOrConfigIdExists())
76
77
  return;
77
78
  this.stores = {
@@ -81,15 +82,15 @@ const b = (t, e) => {
81
82
  ...this.defaultSchedulerState
82
83
  })
83
84
  }, this.baseProvider = new N(this.host, this.stores, this.automaticComponentRegistration, this.eventOverrides);
84
- const e = (s = this.baseProvider) == null ? void 0 : s.getStore("scheduler");
85
+ const e = (a = this.baseProvider) == null ? void 0 : a.getStore("scheduler");
85
86
  if (this.nylasSchedulerConnector = new P({
86
87
  schedulerAPIURL: this.schedulerApiUrl,
87
88
  sessionId: this.sessionId,
88
89
  configId: this.configurationId,
89
90
  nylasSchedulerStore: e
90
91
  }), this.init.emit(this.host), (i = this.baseProvider) == null || i.componentWillLoad(this.nylasSchedulerConnector), this.themeConfig)
91
- for (const [a, o] of Object.entries(this.themeConfig))
92
- this.host.style.setProperty(`${a}`, o);
92
+ for (const [s, o] of Object.entries(this.themeConfig))
93
+ this.host.style.setProperty(`${s}`, o);
93
94
  }
94
95
  async componentDidLoad() {
95
96
  var d, l, h, c, g, x, k;
@@ -97,7 +98,7 @@ const b = (t, e) => {
97
98
  return;
98
99
  const t = await ((l = this.nylasSchedulerConnector) == null ? void 0 : l.scheduler.getUISettings());
99
100
  (!t || "error" in t) && this.nylasSchedulerError.emit({ ...this.getErrorObject(t == null ? void 0 : t.error) });
100
- const e = (h = this.baseProvider) == null ? void 0 : h.getStore("scheduler"), s = (g = (c = e == null ? void 0 : e.get("configSettings")) == null ? void 0 : c.scheduler) == null ? void 0 : g.available_days_in_future, i = e == null ? void 0 : e.get("selectedTimeslot");
101
+ const e = (h = this.baseProvider) == null ? void 0 : h.getStore("scheduler"), a = (g = (c = e == null ? void 0 : e.get("configSettings")) == null ? void 0 : c.scheduler) == null ? void 0 : g.available_days_in_future, i = e == null ? void 0 : e.get("selectedTimeslot");
101
102
  if (i && (i != null && i.start_time)) {
102
103
  if (!this.isTimeslotValid(i))
103
104
  return;
@@ -106,17 +107,17 @@ const b = (t, e) => {
106
107
  return;
107
108
  }
108
109
  }
109
- const a = e == null ? void 0 : e.get("selectedDate"), o = e == null ? void 0 : e.get("availability");
110
+ const s = e == null ? void 0 : e.get("selectedDate"), o = e == null ? void 0 : e.get("availability");
110
111
  let r;
111
112
  if (!(o && o.length > 0)) {
112
- if (a) {
113
- const { startTime: u, endTime: p, endTimeForAvailableDaysInFuture: m } = this.validateAvailableDaysInFuture(a, s || 30);
114
- a.getTime() < m * 1e3 && (r = await ((k = this.nylasSchedulerConnector) == null ? void 0 : k.scheduler.getAvailability(u, p)));
113
+ if (s) {
114
+ const { startTime: u, endTime: p, endTimeForAvailableDaysInFuture: m } = this.validateAvailableDaysInFuture(s, a || 30);
115
+ s.getTime() < m * 1e3 && (r = await ((k = this.nylasSchedulerConnector) == null ? void 0 : k.scheduler.getAvailability(u, p)));
115
116
  } else {
116
- const u = /* @__PURE__ */ new Date(), { startTime: p, endTime: m, endTimeForAvailableDaysInFuture: D } = this.validateAvailableDaysInFuture(u, s || 30);
117
+ const u = /* @__PURE__ */ new Date(), { startTime: p, endTime: m, endTimeForAvailableDaysInFuture: D } = this.validateAvailableDaysInFuture(u, a || 30);
117
118
  u.getTime() < D * 1e3 && (r = await ((x = this.nylasSchedulerConnector) == null ? void 0 : x.scheduler.getAvailability(p, m)));
118
119
  }
119
- if ((!r || "error" in r) && this.nylasSchedulerError.emit({ ...this.getErrorObject(r == null ? void 0 : r.error) }), !a) {
120
+ if ((!r || "error" in r) && this.nylasSchedulerError.emit({ ...this.getErrorObject(r == null ? void 0 : r.error) }), !s) {
120
121
  let u = /* @__PURE__ */ new Date();
121
122
  const p = e == null ? void 0 : e.get("availability").find((m) => new Date(m.start_time) > /* @__PURE__ */ new Date());
122
123
  p && (u = p.start_time), e == null || e.set("selectedDate", u);
@@ -141,21 +142,22 @@ const b = (t, e) => {
141
142
  }
142
143
  async monthChangedHandler(t) {
143
144
  var r, d, l, h, c;
144
- const e = t.detail, s = (h = (l = (d = (r = this.nylasSchedulerConnector) == null ? void 0 : r.schedulerStore) == null ? void 0 : d.get("configSettings")) == null ? void 0 : l.scheduler) == null ? void 0 : h.available_days_in_future, { startTime: i, endTime: a, endTimeForAvailableDaysInFuture: o } = this.validateAvailableDaysInFuture(e, s || 30);
145
+ const e = t.detail, a = (h = (l = (d = (r = this.nylasSchedulerConnector) == null ? void 0 : r.schedulerStore) == null ? void 0 : d.get("configSettings")) == null ? void 0 : l.scheduler) == null ? void 0 : h.available_days_in_future, { startTime: i, endTime: s, endTimeForAvailableDaysInFuture: o } = this.validateAvailableDaysInFuture(e, a || 30);
145
146
  if (i < o && e.getTime() < o * 1e3) {
146
- const g = await ((c = this.nylasSchedulerConnector) == null ? void 0 : c.scheduler.getAvailability(i, a));
147
+ const g = await ((c = this.nylasSchedulerConnector) == null ? void 0 : c.scheduler.getAvailability(i, s));
147
148
  (!g || "error" in g) && this.nylasSchedulerError.emit({ ...this.getErrorObject(g == null ? void 0 : g.error) });
148
149
  }
149
150
  }
150
151
  async bookButtonClickedHandler(t) {
151
- var s, i;
152
- if (this.rescheduleBookingId) {
153
- const a = await ((s = this.nylasSchedulerConnector) == null ? void 0 : s.scheduler.rescheduleBooking(this.rescheduleBookingId, t.detail));
154
- (!a || "error" in a) && this.nylasSchedulerError.emit({ ...this.getErrorObject(a == null ? void 0 : a.error) });
152
+ var s, o, r, d;
153
+ const e = (o = (s = this.nylasSchedulerConnector) == null ? void 0 : s.schedulerStore) == null ? void 0 : o.get("rescheduleBookingId"), a = this.rescheduleBookingId || e;
154
+ if (a) {
155
+ const l = await ((r = this.nylasSchedulerConnector) == null ? void 0 : r.scheduler.rescheduleBooking(a, t.detail));
156
+ (!l || "error" in l) && this.nylasSchedulerError.emit({ ...this.getErrorObject(l == null ? void 0 : l.error) });
155
157
  return;
156
158
  }
157
- const e = await ((i = this.nylasSchedulerConnector) == null ? void 0 : i.scheduler.bookTimeslot(t.detail));
158
- (!e || "error" in e) && this.nylasSchedulerError.emit({ ...this.getErrorObject(e == null ? void 0 : e.error) });
159
+ const i = await ((d = this.nylasSchedulerConnector) == null ? void 0 : d.scheduler.bookTimeslot(t.detail));
160
+ (!i || "error" in i) && this.nylasSchedulerError.emit({ ...this.getErrorObject(i == null ? void 0 : i.error) });
159
161
  }
160
162
  dateSelectedHandler(t) {
161
163
  const e = t.detail;
@@ -211,23 +213,23 @@ const b = (t, e) => {
211
213
  }), !1) : !0;
212
214
  }
213
215
  validateAvailableDaysInFuture(t, e) {
214
- const s = /* @__PURE__ */ new Date(), i = new Date(t.getFullYear(), t.getMonth(), 1).getTime() / 1e3, a = new Date(t.getFullYear(), t.getMonth() + 1, 1).getTime() / 1e3, o = Math.floor(L(s, e).getTime() / 1e3), r = Math.min(o, a);
216
+ const a = /* @__PURE__ */ new Date(), i = new Date(t.getFullYear(), t.getMonth(), 1).getTime() / 1e3, s = new Date(t.getFullYear(), t.getMonth() + 1, 1).getTime() / 1e3, o = Math.floor(L(a, e).getTime() / 1e3), r = Math.min(o, s);
215
217
  return { startTime: i, endTime: r, endTimeForAvailableDaysInFuture: o };
216
218
  }
217
219
  render() {
218
220
  var h;
219
- const t = this.mode === "app", e = (h = this.baseProvider) == null ? void 0 : h.getStore("scheduler"), s = e == null ? void 0 : e.get("eventInfo"), i = e == null ? void 0 : e.get("showBookingForm"), a = e == null ? void 0 : e.get("cancelledEventInfo"), o = (e == null ? void 0 : e.get("cancelBookingId")) || this.cancelBookingId, r = e == null ? void 0 : e.get("selectedTimeslot"), d = (e == null ? void 0 : e.get("rescheduleBookingId")) || this.rescheduleBookingId, l = (e == null ? void 0 : e.get("nylasBranding")) || this.nylasBranding;
220
- if (t && o && !a)
221
+ const t = this.mode === "app", e = (h = this.baseProvider) == null ? void 0 : h.getStore("scheduler"), a = e == null ? void 0 : e.get("eventInfo"), i = e == null ? void 0 : e.get("showBookingForm"), s = e == null ? void 0 : e.get("cancelledEventInfo"), o = (e == null ? void 0 : e.get("cancelBookingId")) || this.cancelBookingId, r = e == null ? void 0 : e.get("selectedTimeslot"), d = (e == null ? void 0 : e.get("rescheduleBookingId")) || this.rescheduleBookingId, l = (e == null ? void 0 : e.get("nylasBranding")) || this.nylasBranding;
222
+ if (t && o && !s)
221
223
  return n(f, null, n(b, { nylasBranding: l, isLoading: this.isLoading, showNotification: this.showNotification }, n("div", { class: "cancel-flow-page", part: "cancel-flow-page" }, n("nylas-cancel-booking-form", { cancelBookingId: o, exportparts: "ncbf, ncbf__input-textfield, ncbf__button-cta, ncbf__button-outline, ncbf__input-label" }))));
222
- if (t && a)
223
- return n(f, null, n(b, { nylasBranding: l, isLoading: this.isLoading, showNotification: this.showNotification }, n("div", { class: "cancelled-event-page", part: "cancelled-event-page" }, n("nylas-cancelled-event-card", { cancelledEventInfo: a, exportparts: "ncec, ncec__icon, ncec__title, ncec__description, ncec__button-outline, ncec__card" }))));
224
224
  if (t && s)
225
- return n(f, null, n(b, { nylasBranding: l, isLoading: this.isLoading, showNotification: this.showNotification }, n("div", { class: "booked-event-page", part: "booked-event-page" }, n("nylas-booked-event-card", { selectedTimeslot: r, eventInfo: s, exportparts: "nbec, nbec__title, nbec__card, nbec__description, nbec__button-outline, nbec__cancel-cta, nbec__reschedule-cta" }))));
226
- if (t && (!s || d) && !i) {
225
+ return n(f, null, n(b, { nylasBranding: l, isLoading: this.isLoading, showNotification: this.showNotification }, n("div", { class: "cancelled-event-page", part: "cancelled-event-page" }, n("nylas-cancelled-event-card", { cancelledEventInfo: s, exportparts: "ncec, ncec__icon, ncec__title, ncec__description, ncec__button-outline, ncec__card" }))));
226
+ if (t && a)
227
+ return n(f, null, n(b, { nylasBranding: l, isLoading: this.isLoading, showNotification: this.showNotification }, n("div", { class: "booked-event-page", part: "booked-event-page" }, n("nylas-booked-event-card", { selectedTimeslot: r, eventInfo: a, exportparts: "nbec, nbec__title, nbec__card, nbec__description, nbec__button-outline, nbec__cancel-cta, nbec__reschedule-cta" }))));
228
+ if (t && (!a || d) && !i) {
227
229
  const c = this.host.querySelector('[slot="timeslot-picker-cta-label"]');
228
230
  return n(f, null, n(b, { nylasBranding: l, isLoading: this.isLoading, showNotification: this.showNotification }, d && n(C, null, "Choose another time slot to reschedule your meeting"), n("div", { class: "select-date-page", part: "select-date-page" }, n("div", { class: "left-panel" }, n("nylas-date-picker", { exportparts: "ndp, ndp__month-header, ndp__month-button, ndp__day, ndp__date, ndp__date--selected, ndp__date--current-day, ndp__date--current-month" }), n("div", { class: "border" }), n("nylas-locale-switch", null)), n("div", { class: "right-panel" }, n("h2", null, n("calendar-icon", null), n("span", { id: "selectedDate" }, this.selectedDateLabel)), n("nylas-timeslot-picker", { exportparts: "ntp, ntp__timeslot, ntp__timeslot--selected, ntp__button-primary" }, c && n("span", { slot: "timeslot-picker-cta-label" }, n("slot", { name: "timeslot-picker-cta-label" })))))));
229
231
  }
230
- if (t && !s && i) {
232
+ if (t && !a && i) {
231
233
  const c = this.host.querySelector('[slot="custom-booking-form"]');
232
234
  return n(f, null, n(b, { nylasBranding: l, isLoading: this.isLoading, showNotification: this.showNotification }, d && n(C, null, "Choose another time slot to reschedule your meeting"), n("div", { class: "additional-data-page", part: "additional-data-page" }, n("div", { class: "left-panel" }, n("div", { class: "wrapper" }, n("nylas-selected-event-card", { exportparts: "nsec, nsec__card, nsec__icon, nsec__date, nsec__time" }))), n("div", { class: "right-panel" }, n("nylas-booking-form", { exportparts: "nbf, nbf__input-label, nbf__input-textfield, nbf__button-ghost, nbf__button-primary, nbf__button-outline" }, c && n("div", { slot: "custom-booking-form" }, n("slot", { name: "custom-booking-form" })))))));
233
235
  }
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-33f74306.cjs"),d=require("./register-component-83e24412-445c6ad9.cjs");require("react");require("react-dom");const f=":host{display:contents}.container{width:100%;overflow:auto;-webkit-overflow-scrolling:touch}.pull-to-refresh{display:none;border:0;background-color:transparent;text-align:center;width:100%;justify-content:center}.pulling{position:relative;display:flex;margin:0 auto;padding:1rem}.pulling svg{width:24px;height:24px;color:var(--nylas-color-primary-500);transform:rotate(90deg)}.refreshing{position:relative;display:flex;margin:0 auto;padding:1rem}.refreshing svg{width:24px;height:24px;fill:var(--nylas-color-primary-500);animation:rotate 1s linear infinite}@keyframes rotate{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}",u=f;var p=function(t,e,n,a){var i=arguments.length,r=i<3?e:a===null?a=Object.getOwnPropertyDescriptor(e,n):a,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,n,a);else for(var h=t.length-1;h>=0;h--)(o=t[h])&&(r=(i<3?o(r):i>3?o(e,n,r):o(e,n))||r);return i>3&&r&&Object.defineProperty(e,n,r),r},l=function(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)};const c=class{constructor(t){s.registerInstance(this,t),this.refresh=s.createEvent(this,"refresh",7),this.threshold=100,this.onTouchStart=e=>{var n,a,i,r;s.debug("[nylas-threads-refresh] Touch start",e.touches[0].pageY,(n=this.containerElement)==null?void 0:n.scrollTop,(a=this.containerElement)==null?void 0:a.offsetHeight,(i=this.contentElement)==null?void 0:i.scrollTop),((r=this.containerElement)==null?void 0:r.scrollTop)===0?this.start=e.touches[0].pageY:this.start=0},this.onTouchMove=e=>{this.start&&(e.touches[0].pageY-this.start>this.threshold?this.pulling=!0:this.pulling=!1)},this.onTouchEnd=e=>{this.start&&(e.changedTouches[0].pageY-this.start>this.threshold&&(this.pulling=!1,this.refresh.emit({updateState:this.updateState})),this.start=0)},this.start=0,this.state="ready",this.pulling=!1,s.debug("[nylas-threads-refresh] Constructor"),this.updateState=this.updateState.bind(this)}connectedCallback(){}async componentWillLoad(){s.debug("[nylas-threads-refresh] Component will load")}componentDidLoad(){var t,e,n;s.debug("[nylas-threads-refresh] Component did load"),(t=this.containerElement)==null||t.addEventListener("touchstart",this.onTouchStart),(e=this.containerElement)==null||e.addEventListener("touchmove",this.onTouchMove),(n=this.containerElement)==null||n.addEventListener("touchend",this.onTouchEnd)}disconnectedCallback(){var t,e,n;s.debug("[nylas-threads-refresh] Component disconnected"),(t=this.containerElement)==null||t.removeEventListener("touchstart",this.onTouchStart),(e=this.containerElement)==null||e.removeEventListener("touchmove",this.onTouchMove),(n=this.containerElement)==null||n.removeEventListener("touchend",this.onTouchEnd)}async updateState(t){this.state=t}render(){return s.h(s.Host,{key:"9027360ae546f7cb1cf5c1e8f977d2e8f85eb3fd"},s.h("div",{key:"7bf8bf464971f8669d6cb1fc31c478ed29fbda63",class:"container",ref:t=>this.containerElement=t},s.h("button",{key:"af4dc6f3ec1e45554f13f0dbee2945a7b60acc6c",class:{"pull-to-refresh":!0,pulling:this.pulling,refreshing:this.state==="loading"},"aria-label":"Refreshing..."},this.state==="loading"&&s.h("refresh-icon",{slot:"icon"}),this.state!=="loading"&&s.h("arrow-icon",{slot:"icon"})),s.h("div",{key:"d2bceb3b11369e03a9eefa80f983f341bae71239",class:"content",ref:t=>this.contentElement=t},s.h("slot",{key:"c88b393187aa10285fd940d11bf7b792ac4dbf14"}))))}};p([d.RegisterComponent({name:"nylas-threads-refresh",eventToProps:{refresh:async(t,e)=>{s.debug("[nylas-threads-refresh] Refreshing threads");const{updateState:n}=t.detail;await n("loading"),await e.threads.getThreads(void 0,"overwrite",!1),await n("ready")}},fireRegisterEvent:!0}),l("design:type",Function),l("design:paramtypes",[]),l("design:returntype",void 0)],c.prototype,"render",null);c.style=u;exports.nylas_threads_refresh=c;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-3a004ec1.cjs"),d=require("./register-component-83e24412-d76a2962.cjs");require("react");require("react-dom");const f=":host{display:contents}.container{width:100%;overflow:auto;-webkit-overflow-scrolling:touch}.pull-to-refresh{display:none;border:0;background-color:transparent;text-align:center;width:100%;justify-content:center}.pulling{position:relative;display:flex;margin:0 auto;padding:1rem}.pulling svg{width:24px;height:24px;color:var(--nylas-color-primary-500);transform:rotate(90deg)}.refreshing{position:relative;display:flex;margin:0 auto;padding:1rem}.refreshing svg{width:24px;height:24px;fill:var(--nylas-color-primary-500);animation:rotate 1s linear infinite}@keyframes rotate{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}",u=f;var p=function(t,e,n,a){var i=arguments.length,r=i<3?e:a===null?a=Object.getOwnPropertyDescriptor(e,n):a,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,n,a);else for(var h=t.length-1;h>=0;h--)(o=t[h])&&(r=(i<3?o(r):i>3?o(e,n,r):o(e,n))||r);return i>3&&r&&Object.defineProperty(e,n,r),r},l=function(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)};const c=class{constructor(t){s.registerInstance(this,t),this.refresh=s.createEvent(this,"refresh",7),this.threshold=100,this.onTouchStart=e=>{var n,a,i,r;s.debug("[nylas-threads-refresh] Touch start",e.touches[0].pageY,(n=this.containerElement)==null?void 0:n.scrollTop,(a=this.containerElement)==null?void 0:a.offsetHeight,(i=this.contentElement)==null?void 0:i.scrollTop),((r=this.containerElement)==null?void 0:r.scrollTop)===0?this.start=e.touches[0].pageY:this.start=0},this.onTouchMove=e=>{this.start&&(e.touches[0].pageY-this.start>this.threshold?this.pulling=!0:this.pulling=!1)},this.onTouchEnd=e=>{this.start&&(e.changedTouches[0].pageY-this.start>this.threshold&&(this.pulling=!1,this.refresh.emit({updateState:this.updateState})),this.start=0)},this.start=0,this.state="ready",this.pulling=!1,s.debug("[nylas-threads-refresh] Constructor"),this.updateState=this.updateState.bind(this)}connectedCallback(){}async componentWillLoad(){s.debug("[nylas-threads-refresh] Component will load")}componentDidLoad(){var t,e,n;s.debug("[nylas-threads-refresh] Component did load"),(t=this.containerElement)==null||t.addEventListener("touchstart",this.onTouchStart),(e=this.containerElement)==null||e.addEventListener("touchmove",this.onTouchMove),(n=this.containerElement)==null||n.addEventListener("touchend",this.onTouchEnd)}disconnectedCallback(){var t,e,n;s.debug("[nylas-threads-refresh] Component disconnected"),(t=this.containerElement)==null||t.removeEventListener("touchstart",this.onTouchStart),(e=this.containerElement)==null||e.removeEventListener("touchmove",this.onTouchMove),(n=this.containerElement)==null||n.removeEventListener("touchend",this.onTouchEnd)}async updateState(t){this.state=t}render(){return s.h(s.Host,{key:"9027360ae546f7cb1cf5c1e8f977d2e8f85eb3fd"},s.h("div",{key:"7bf8bf464971f8669d6cb1fc31c478ed29fbda63",class:"container",ref:t=>this.containerElement=t},s.h("button",{key:"af4dc6f3ec1e45554f13f0dbee2945a7b60acc6c",class:{"pull-to-refresh":!0,pulling:this.pulling,refreshing:this.state==="loading"},"aria-label":"Refreshing..."},this.state==="loading"&&s.h("refresh-icon",{slot:"icon"}),this.state!=="loading"&&s.h("arrow-icon",{slot:"icon"})),s.h("div",{key:"d2bceb3b11369e03a9eefa80f983f341bae71239",class:"content",ref:t=>this.contentElement=t},s.h("slot",{key:"c88b393187aa10285fd940d11bf7b792ac4dbf14"}))))}};p([d.RegisterComponent({name:"nylas-threads-refresh",eventToProps:{refresh:async(t,e)=>{s.debug("[nylas-threads-refresh] Refreshing threads");const{updateState:n}=t.detail;await n("loading"),await e.threads.getThreads(void 0,"overwrite",!1),await n("ready")}},fireRegisterEvent:!0}),l("design:type",Function),l("design:paramtypes",[]),l("design:returntype",void 0)],c.prototype,"render",null);c.style=u;exports.nylas_threads_refresh=c;
@@ -1,5 +1,5 @@
1
- import { r as f, c as p, d as i, h as o, H as u } from "./index-20ea5b0c.js";
2
- import { R as m } from "./register-component-83e24412-b666e56b.js";
1
+ import { r as f, c as p, d as i, h as o, H as u } from "./index-4c7e8f2f.js";
2
+ import { R as m } from "./register-component-83e24412-51af5293.js";
3
3
  import "react";
4
4
  import "react-dom";
5
5
  const g = ":host{display:contents}.container{width:100%;overflow:auto;-webkit-overflow-scrolling:touch}.pull-to-refresh{display:none;border:0;background-color:transparent;text-align:center;width:100%;justify-content:center}.pulling{position:relative;display:flex;margin:0 auto;padding:1rem}.pulling svg{width:24px;height:24px;color:var(--nylas-color-primary-500);transform:rotate(90deg)}.refreshing{position:relative;display:flex;margin:0 auto;padding:1rem}.refreshing svg{width:24px;height:24px;fill:var(--nylas-color-primary-500);animation:rotate 1s linear infinite}@keyframes rotate{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}", y = g;
@@ -1,5 +1,5 @@
1
- import { r as u, c as y, d, h as i, H as f } from "./index-20ea5b0c.js";
2
- import { R as p } from "./register-component-83e24412-b666e56b.js";
1
+ import { r as u, c as y, d, h as i, H as f } from "./index-4c7e8f2f.js";
2
+ import { R as p } from "./register-component-83e24412-51af5293.js";
3
3
  import "react";
4
4
  import "react-dom";
5
5
  const m = ":host{display:block}sp-search{width:100%;border:0}", b = m;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index-33f74306.cjs"),h=require("./register-component-83e24412-445c6ad9.cjs");require("react");require("react-dom");const u=":host{display:block}sp-search{width:100%;border:0}",y=u;var f=function(t,e,s,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,s):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,s,n);else for(var i=t.length-1;i>=0;i--)(c=t[i])&&(r=(o<3?c(r):o>3?c(e,s,r):c(e,s))||r);return o>3&&r&&Object.defineProperty(e,s,r),r},l=function(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)};const d=class{constructor(t){a.registerInstance(this,t),this.search=a.createEvent(this,"search",7),this.onSearch=async e=>{e.preventDefault(),e.stopPropagation();const n=e.target.value;n!==this.internalQuery&&(this.internalQuery=n,this.search.emit(this.internalQuery))},this.query="",this.internalQuery=""}connectedCallback(){}disconnectedCallback(){}async componentWillLoad(){a.debug("[nylas-threads-search] Component will load")}async componentDidLoad(){a.debug("[nylas-threads-search] Component did load")}onQueryChange(){this.internalQuery=this.query}render(){return a.h(a.Host,{key:"9e91a330bea4dc84fa96070591e95926f52ee0bb"},a.h("sp-theme",{key:"6d1df81ced09a5b721d8f161e40450633ae2cd98",scale:"medium",color:"dark"},a.h("sp-search",{key:"cb81bba4b4f1d279f1fd48bda9a2fb003cb65fcd",quiet:!0,onSubmit:this.onSearch,onBlur:this.onSearch,value:this.internalQuery})))}static get watchers(){return{query:["onQueryChange"]}}};f([h.RegisterComponent({name:"nylas-pagination",stateToProps:new Map([["mailbox.searchQuery","query"]]),eventToProps:{search:async(t,e)=>{await e.threads.getThreads({search_query_native:t.detail||void 0,page_token:void 0})}},fireRegisterEvent:!0}),l("design:type",Function),l("design:paramtypes",[]),l("design:returntype",void 0)],d.prototype,"render",null);d.style=y;exports.nylas_threads_search=d;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index-3a004ec1.cjs"),h=require("./register-component-83e24412-d76a2962.cjs");require("react");require("react-dom");const u=":host{display:block}sp-search{width:100%;border:0}",y=u;var f=function(t,e,s,n){var o=arguments.length,r=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,s):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,s,n);else for(var i=t.length-1;i>=0;i--)(c=t[i])&&(r=(o<3?c(r):o>3?c(e,s,r):c(e,s))||r);return o>3&&r&&Object.defineProperty(e,s,r),r},l=function(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)};const d=class{constructor(t){a.registerInstance(this,t),this.search=a.createEvent(this,"search",7),this.onSearch=async e=>{e.preventDefault(),e.stopPropagation();const n=e.target.value;n!==this.internalQuery&&(this.internalQuery=n,this.search.emit(this.internalQuery))},this.query="",this.internalQuery=""}connectedCallback(){}disconnectedCallback(){}async componentWillLoad(){a.debug("[nylas-threads-search] Component will load")}async componentDidLoad(){a.debug("[nylas-threads-search] Component did load")}onQueryChange(){this.internalQuery=this.query}render(){return a.h(a.Host,{key:"9e91a330bea4dc84fa96070591e95926f52ee0bb"},a.h("sp-theme",{key:"6d1df81ced09a5b721d8f161e40450633ae2cd98",scale:"medium",color:"dark"},a.h("sp-search",{key:"cb81bba4b4f1d279f1fd48bda9a2fb003cb65fcd",quiet:!0,onSubmit:this.onSearch,onBlur:this.onSearch,value:this.internalQuery})))}static get watchers(){return{query:["onQueryChange"]}}};f([h.RegisterComponent({name:"nylas-pagination",stateToProps:new Map([["mailbox.searchQuery","query"]]),eventToProps:{search:async(t,e)=>{await e.threads.getThreads({search_query_native:t.detail||void 0,page_token:void 0})}},fireRegisterEvent:!0}),l("design:type",Function),l("design:paramtypes",[]),l("design:returntype",void 0)],d.prototype,"render",null);d.style=y;exports.nylas_threads_search=d;
@@ -1,5 +1,5 @@
1
- import { r as k, c as p, d, h as a, t as M, F as m, H as x, g as E, m as D, a as S, n as g } from "./index-20ea5b0c.js";
2
- import { R as T } from "./register-component-83e24412-b666e56b.js";
1
+ import { r as k, c as p, d, h as a, t as M, F as m, H as x, g as E, m as D, a as S, n as g } from "./index-4c7e8f2f.js";
2
+ import { R as T } from "./register-component-83e24412-51af5293.js";
3
3
  import "react";
4
4
  import "react-dom";
5
5
  function R(t, e, s, o, r) {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-33f74306.cjs"),f=require("./register-component-83e24412-445c6ad9.cjs");require("react");require("react-dom");function w(t,a,s,o,r){if(!o||!s||s.children.length>0)return;e.debug("[nylas-view-thread] Rendering email",{message:t,attachments:a,viewEmailElement:o});const n=o.cloneNode(!0);n.message=t.data,n.parent=r,s.appendChild(n)}const c=({viewEmailElement:t,message:a,attachments:s,onMessageClick:o,onShowContactDataClick:r,parent:n})=>{var l,i,d,g,u,v,y;return e.h(e.Fragment,null,e.h("div",{key:a.id,class:"message"},e.h("div",{class:"sub-header","data-id":a.data.id,onClick:o},e.h("div",{class:"avatar"},a.data.from&&((l=a.data.from[0])==null?void 0:l.name)&&((d=(i=a.data.from[0])==null?void 0:i.name[0])==null?void 0:d.toUpperCase())),e.h("div",{class:"from"},e.h("span",{class:"name"},a.data.from&&((g=a.data.from[0])==null?void 0:g.name))," ",e.h("span",{class:"email"},a.data.from&&((u=a.data.from[0])==null?void 0:u.email))),e.h("div",{class:"date"},new Date(a.data.date*1e3).toLocaleTimeString(void 0,{timeStyle:"short"})," ","(",e.formatTimeAgo(new Date(a.data.date*1e3)),")"),e.h("sp-button-group",{class:"buttons"},e.h("nylas-summarize-message-button",{message:a.data})),a.collapse&&e.h("div",{class:"snippet"},a.data.snippet),!a.collapse&&a.data.to&&e.h("div",{class:"to"},e.h("span",null,"to")," ",e.formatParticipants(a.data.to)," ",e.h("button",{type:"button",value:a.data.id,onClick:r,class:{expand:!0,"expand--showContactData":a.showContactData}},e.h("chevron-icon",null)))),a.showContactData&&e.h("div",{class:"address-info"},e.h("div",{class:"label"},"From"),e.h("div",{class:"value"},e.formatRecipient((v=a.data)!=null&&v.from?(y=a==null?void 0:a.data)==null?void 0:y.from[0]:{name:"",email:""})),a.data.to&&e.h(e.Fragment,null,e.h("div",{class:"label"},"To"),e.h("div",{class:"value"},a.data.to.map(h=>e.h("div",null,e.formatRecipient(h))))),typeof a.data.cc<"u"&&a.data.cc.length>0&&e.h(e.Fragment,null,e.h("div",{class:"label"},"CC"),e.h("div",{class:"value"},a.data.cc.map(h=>e.h("div",null,e.formatRecipient(h)))))),!a.collapse&&t&&e.h("div",{key:a.id,ref:h=>w(a,s,h,t,n)}),!a.collapse&&!t&&e.h("nylas-view-email",{key:a.id,message:a.data,parent:n})),e.h("hr",null))},b=':host{display:block;font-size:inherit}.avatar{z-index:1;border-radius:100%;background-color:var(--nylas-color-primary-200);height:40px;width:40px;align-items:center;display:flex;justify-content:center;border:1px solid var(--nylas-color-primary-200)}.view-thread{display:grid;grid-auto-flow:row;width:100%}.view-thread .header{display:grid;grid-gap:1rem;align-items:center;margin-bottom:1rem}.view-thread .header .subject{font-size:1.25rem;font-weight:600;line-height:1.5rem}.view-thread .header .folders{display:grid;grid-auto-flow:column;grid-auto-columns:min-content;overflow-x:auto;gap:1rem}.view-thread .header .folders .folder{padding:0 0.5rem;font-size:0.9rem;color:var(--nylas-color-primary-900);background-color:var(--nylas-color-primary-300)}.view-thread .messages{display:grid;gap:1rem}.view-thread .messages hr{margin:0;width:100%;border:1px solid var(--nylas-color-primary-200)}.view-thread .messages hr:last-of-type{display:none}.view-thread .messages .message{display:grid;grid-auto-flow:row;gap:1rem}.view-thread .messages .message:last-of-type .sub-header{cursor:default}.view-thread .messages .message .sub-header{display:grid;grid-template:"avatar from date buttons" "avatar to to buttons";grid-column-gap:1rem;grid-template-columns:auto 1fr auto auto;cursor:pointer}.view-thread .messages .message .sub-header>*{pointer-events:none}.view-thread .messages .message .sub-header .avatar{grid-area:avatar}.view-thread .messages .message .sub-header .from{grid-area:from}.view-thread .messages .message .sub-header .from span.email{display:none;color:var(--nylas-color-primary-400);font-weight:600}.view-thread .messages .message .sub-header .buttons{grid-area:buttons;align-self:center}.view-thread .messages .message .sub-header .buttons *{pointer-events:all}.view-thread .messages .message .sub-header .date{grid-area:date;align-self:center;color:var(--nylas-color-primary-400)}.view-thread .messages .message .sub-header .snippet{width:90%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--nylas-color-primary-600)}.view-thread .messages .message .sub-header .to{grid-area:to;color:var(--nylas-color-primary-400)}.view-thread .messages .message .sub-header .to>span{color:var(--nylas-color-primary-400)}.view-thread .messages .message .sub-header .to button{border:0;background-color:transparent;cursor:pointer;pointer-events:all;padding:0;margin:0}.view-thread .messages .message .sub-header .to button>*{pointer-events:none}.view-thread .messages .message .sub-header .to button chevron-icon{display:inline-table;fill:var(--nylas-color-primary-400);width:15px;height:15px;vertical-align:middle}.view-thread .messages .message .sub-header .to button chevron-icon svg{width:15px;height:15px;transform:rotate(90deg)}.view-thread .messages .message .sub-header .to button.expand--showContactData chevron-icon svg{transform:rotate(270deg)}.view-thread .messages .message .address-info{display:grid;column-gap:1rem;row-gap:0.5rem;grid-template-columns:auto 1fr;grid-template-rows:1fr;padding:1rem 2rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-color-primary-200);align-items:flex-start;color:var(--nylas-color-primary-600)}.view-thread .messages .message .address-info .label{color:var(--nylas-color-primary-400);font-weight:600}.show-more{position:relative;display:flex;width:100%}.show-more .sr-only{display:none}.show-more button{position:relative;display:inline-flex;width:100%;padding:0;border:0;background-color:transparent;cursor:pointer;text-align:left;overflow:hidden}.show-more button span{border:1px solid var(--nylas-color-primary-400)}.show-more button:hover span{background-color:var(--nylas-color-primary-700)}.show-more button::after{border-top:1px solid rgba(100, 121, 143, 0.122);border-bottom:1px solid rgba(100, 121, 143, 0.122);content:"";height:4px;width:100%;position:absolute;top:50%}.loading{position:absolute;width:100%;height:100%;background-color:var(--loading__background-color);top:0;bottom:0;left:0;z-index:1;display:grid;justify-content:center;align-items:center;font-weight:600;overflow:hidden}.reply-buttons{display:grid;grid-auto-flow:column;grid-auto-columns:min-content;gap:1rem;margin-top:1rem}.reply-buttons sp-button{border-radius:var(--nylas-border-radius);background-color:var(--nylas-color-primary-400);color:var(--nylas-color-primary-900);fill:var(--nylas-color-primary-900)}.reply-buttons sp-button:hover{background-color:var(--nylas-color-primary-500)}.reply-buttons sp-button:disabled{background-color:var(--nylas-color-primary-200);color:var(--nylas-color-primary-600);cursor:not-allowed}.reply-buttons sp-button chevron-icon{display:inline-block}@media only screen and (min-width: 768px){.view-thread .messages .message .sub-header .from span.email{display:inline}}',C=b;var k=function(t,a,s,o){var r=arguments.length,n=r<3?a:o===null?o=Object.getOwnPropertyDescriptor(a,s):o,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(t,a,s,o);else for(var i=t.length-1;i>=0;i--)(l=t[i])&&(n=(r<3?l(n):r>3?l(a,s,n):l(a,s))||n);return r>3&&n&&Object.defineProperty(a,s,n),n},m=function(t,a){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,a)};const p=class{constructor(t){e.registerInstance(this,t),this.threadSelected=e.createEvent(this,"threadSelected",7),this.showContactDataClicked=e.createEvent(this,"showContactDataClicked",7),this.messageClicked=e.createEvent(this,"messageClicked",7),this.nylasViewEmailElement=null,this.nylasComposerElement=null,this.onShowContactDataClick=a=>{a.stopPropagation();const o=a.target.value,r=this.internalMessages.find(l=>l.data.id===o);if(!r){e.debug(`[nylas-view-thread] Could not find message ${o}`);return}this.showContactDataClicked.emit(r.data).defaultPrevented||(r.showContactData=!r.showContactData,this.internalMessages=[...this.internalMessages]),e.debug(`[nylas-view-thread] show contact data clicked ${o} ${r.showContactData?"collapsed":"expanded"}`)},this.onMessageClick=a=>{var l;const o=a.target.dataset.id,r=this.internalMessages.find(i=>i.data.id===o);if(!r){e.debug(`[nylas-view-thread] Could not find message ${o}`);return}this.messageClicked.emit(r.data).defaultPrevented||(r.id!==((l=this.internalMessages[this.internalMessages.length-1])==null?void 0:l.id)&&(r.collapse=!r.collapse,r.collapse&&(r.showContactData=!1)),this.internalMessages=[...this.internalMessages]),e.debug(`[nylas-view-thread] message clicked ${o} ${r.collapse?"collapsed":"expanded"}`)},this.onShowAllEmailsClick=()=>{this.showAllEmails=!this.showAllEmails},this.showComposerClick=()=>{this.showComposer=!this.showComposer},this.draft=void 0,this.thread=void 0,this.messages=[],this.attachments=[],this.state="loading",this.internalMessages=[],this.showAllEmails=!1,this.showComposer=!1}connectedCallback(){}disconnectedCallback(){}async componentWillLoad(){e.debug("[nylas-view-thread] Component will load"),this.updateInternalMessages(this.messages);const t=this.host.querySelector("template.nylas-view-email");if(!t){e.debug("[nylas-view-thread] Could not find template");return}const a=document.importNode(t.content,!0);this.nylasViewEmailElement=a.querySelector("nylas-view-email");const s=this.host.querySelector("template.nylas-composer");if(!s){e.debug("[nylas-view-thread] Could not find composer template");return}const o=document.importNode(s.content,!0);this.nylasComposerElement=o.querySelector("nylas-composer")}async componentDidLoad(){e.debug("[nylas-view-thread] Component did load")}async threadChanged(t){e.debug("[nylas-view-thread] Thread changed",{thread:t}),this.internalMessages=[],this.threadSelected.emit(t).defaultPrevented||e.debug("[nylas-view-thread] Default event not prevented, initializing")}updateInternalMessages(t){e.debug("[nylas-view-thread] Updating internal messages",{messages:t});const a=t.sort((s,o)=>s.date>o.date?1:-1).map((s,o)=>({id:s.id,data:s,collapse:o!==t.length-1,showContactData:!1}));this.internalMessages=a}render(){var r,n,l;const t=this.internalMessages.length>2?this.internalMessages[0]:null,a=this.internalMessages.slice(this.internalMessages.length-2,this.internalMessages.length),s=this.internalMessages.slice(1,this.internalMessages.length-2),o=this.internalMessages[this.internalMessages.length-1];return e.h(e.Host,{key:"08d6981bb00f24f18212060a784da5ec7129197e"},e.h("sp-theme",{key:"0f7f54486f61beb490fc96a0f84753868ef384aa",scale:"medium",color:"dark"},e.h("div",{key:"9aad086eae2344a6d0d28b1fb4fb39921dcf53f0",class:"view-thread"},e.h("div",{key:"fcef6cd0bfed78b7d6f9df5a2a8719a32b1e294f",class:"header"},e.h("div",{key:"0673aebc8626e082deb3f0a9b9eb9c18a1841349",class:"subject"},(r=this.thread)==null?void 0:r.subject),e.h("div",{key:"10ee64da01595dcb658f99b9a8d90c1fe9237816",class:"folders"},(l=(n=this.thread)==null?void 0:n.folders)==null?void 0:l.map(i=>e.h("sp-tag",{size:"s"},e.toTitleCase(i.replace("CATEGORY_","").replace("_"," ")))))),e.h("div",{key:"469007a98202e151206e4ac329956882f069b618",class:"messages"},t&&e.h(c,{message:t,attachments:this.attachments.filter(i=>i.messageId===t.id),onMessageClick:this.onMessageClick,onShowContactDataClick:this.onShowContactDataClick,parent:this.host,viewEmailElement:this.nylasViewEmailElement,composerElement:this.nylasComposerElement}),s.length>0&&this.messages.length>1&&!this.showAllEmails&&a.length>0&&e.h(e.Fragment,null,e.h("div",{class:"show-more"},e.h("button",{type:"button",onClick:this.onShowAllEmailsClick},e.h("span",{class:"avatar"},s.length)," ",e.h("span",{class:"sr-only"},"Show ",s.length," more emails"))),e.h("hr",null)),s.length>0&&this.showAllEmails&&this.messages.length>2&&s.map(i=>e.h(c,{message:i,attachments:this.attachments.filter(d=>d.messageId===(t==null?void 0:t.id)),onMessageClick:this.onMessageClick,onShowContactDataClick:this.onShowContactDataClick,parent:this.host,viewEmailElement:this.nylasViewEmailElement,composerElement:this.nylasComposerElement})),a.length>0&&a.map(i=>e.h(c,{message:i,attachments:this.attachments.filter(d=>d.messageId===(t==null?void 0:t.id)),onMessageClick:this.onMessageClick,onShowContactDataClick:this.onShowContactDataClick,parent:this.host,viewEmailElement:this.nylasViewEmailElement,composerElement:this.nylasComposerElement}))),!(this.showComposer&&o)&&e.h("div",{class:"reply-buttons"},e.h("sp-button",{variant:"cta",type:"button",onClick:this.showComposerClick},e.h("span",{slot:"icon"},e.h("reply-icon",null)),e.h("span",null,"Reply")),e.h("sp-button",{variant:"cta",type:"button"},e.h("span",{slot:"icon"},e.h("reply-all-icon",null)),e.h("span",null,"Reply All")),e.h("sp-button",{variant:"cta",type:"button"},e.h("span",{slot:"icon"},e.h("forward-icon",null)),e.h("span",null,"Forward"))),this.showComposer&&o&&e.h("div",{class:"composer"},e.h("nylas-composer",{message:o.data,onClose:this.showComposerClick,onSend:i=>{e.debug("[nylas-view-thread] Send event",{message:i.detail.message,replyBody:i.detail.replyBody})}})))))}get host(){return e.getElement(this)}static get watchers(){return{thread:["threadChanged"],messages:["updateInternalMessages"]}}};k([f.RegisterComponent({name:"nylas-view-thread",stateToProps:new Map([["mailbox.selectedThread","thread"],["mailbox.messages","messages"],["mailbox.state","state"]]),eventToProps:{threadSelected:async(t,a)=>{e.debug("[nylas-view-thread] Nylas init event. Fetching thread messages.",{event:t});const s=t.detail;s&&s.id&&await a.messages.getThreadMessages(s.id)}},fireRegisterEvent:!0}),m("design:type",Function),m("design:paramtypes",[]),m("design:returntype",void 0)],p.prototype,"render",null);p.style=C;exports.nylas_view_thread=p;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-3a004ec1.cjs"),f=require("./register-component-83e24412-d76a2962.cjs");require("react");require("react-dom");function w(t,a,s,o,r){if(!o||!s||s.children.length>0)return;e.debug("[nylas-view-thread] Rendering email",{message:t,attachments:a,viewEmailElement:o});const n=o.cloneNode(!0);n.message=t.data,n.parent=r,s.appendChild(n)}const c=({viewEmailElement:t,message:a,attachments:s,onMessageClick:o,onShowContactDataClick:r,parent:n})=>{var l,i,d,g,u,v,y;return e.h(e.Fragment,null,e.h("div",{key:a.id,class:"message"},e.h("div",{class:"sub-header","data-id":a.data.id,onClick:o},e.h("div",{class:"avatar"},a.data.from&&((l=a.data.from[0])==null?void 0:l.name)&&((d=(i=a.data.from[0])==null?void 0:i.name[0])==null?void 0:d.toUpperCase())),e.h("div",{class:"from"},e.h("span",{class:"name"},a.data.from&&((g=a.data.from[0])==null?void 0:g.name))," ",e.h("span",{class:"email"},a.data.from&&((u=a.data.from[0])==null?void 0:u.email))),e.h("div",{class:"date"},new Date(a.data.date*1e3).toLocaleTimeString(void 0,{timeStyle:"short"})," ","(",e.formatTimeAgo(new Date(a.data.date*1e3)),")"),e.h("sp-button-group",{class:"buttons"},e.h("nylas-summarize-message-button",{message:a.data})),a.collapse&&e.h("div",{class:"snippet"},a.data.snippet),!a.collapse&&a.data.to&&e.h("div",{class:"to"},e.h("span",null,"to")," ",e.formatParticipants(a.data.to)," ",e.h("button",{type:"button",value:a.data.id,onClick:r,class:{expand:!0,"expand--showContactData":a.showContactData}},e.h("chevron-icon",null)))),a.showContactData&&e.h("div",{class:"address-info"},e.h("div",{class:"label"},"From"),e.h("div",{class:"value"},e.formatRecipient((v=a.data)!=null&&v.from?(y=a==null?void 0:a.data)==null?void 0:y.from[0]:{name:"",email:""})),a.data.to&&e.h(e.Fragment,null,e.h("div",{class:"label"},"To"),e.h("div",{class:"value"},a.data.to.map(h=>e.h("div",null,e.formatRecipient(h))))),typeof a.data.cc<"u"&&a.data.cc.length>0&&e.h(e.Fragment,null,e.h("div",{class:"label"},"CC"),e.h("div",{class:"value"},a.data.cc.map(h=>e.h("div",null,e.formatRecipient(h)))))),!a.collapse&&t&&e.h("div",{key:a.id,ref:h=>w(a,s,h,t,n)}),!a.collapse&&!t&&e.h("nylas-view-email",{key:a.id,message:a.data,parent:n})),e.h("hr",null))},b=':host{display:block;font-size:inherit}.avatar{z-index:1;border-radius:100%;background-color:var(--nylas-color-primary-200);height:40px;width:40px;align-items:center;display:flex;justify-content:center;border:1px solid var(--nylas-color-primary-200)}.view-thread{display:grid;grid-auto-flow:row;width:100%}.view-thread .header{display:grid;grid-gap:1rem;align-items:center;margin-bottom:1rem}.view-thread .header .subject{font-size:1.25rem;font-weight:600;line-height:1.5rem}.view-thread .header .folders{display:grid;grid-auto-flow:column;grid-auto-columns:min-content;overflow-x:auto;gap:1rem}.view-thread .header .folders .folder{padding:0 0.5rem;font-size:0.9rem;color:var(--nylas-color-primary-900);background-color:var(--nylas-color-primary-300)}.view-thread .messages{display:grid;gap:1rem}.view-thread .messages hr{margin:0;width:100%;border:1px solid var(--nylas-color-primary-200)}.view-thread .messages hr:last-of-type{display:none}.view-thread .messages .message{display:grid;grid-auto-flow:row;gap:1rem}.view-thread .messages .message:last-of-type .sub-header{cursor:default}.view-thread .messages .message .sub-header{display:grid;grid-template:"avatar from date buttons" "avatar to to buttons";grid-column-gap:1rem;grid-template-columns:auto 1fr auto auto;cursor:pointer}.view-thread .messages .message .sub-header>*{pointer-events:none}.view-thread .messages .message .sub-header .avatar{grid-area:avatar}.view-thread .messages .message .sub-header .from{grid-area:from}.view-thread .messages .message .sub-header .from span.email{display:none;color:var(--nylas-color-primary-400);font-weight:600}.view-thread .messages .message .sub-header .buttons{grid-area:buttons;align-self:center}.view-thread .messages .message .sub-header .buttons *{pointer-events:all}.view-thread .messages .message .sub-header .date{grid-area:date;align-self:center;color:var(--nylas-color-primary-400)}.view-thread .messages .message .sub-header .snippet{width:90%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--nylas-color-primary-600)}.view-thread .messages .message .sub-header .to{grid-area:to;color:var(--nylas-color-primary-400)}.view-thread .messages .message .sub-header .to>span{color:var(--nylas-color-primary-400)}.view-thread .messages .message .sub-header .to button{border:0;background-color:transparent;cursor:pointer;pointer-events:all;padding:0;margin:0}.view-thread .messages .message .sub-header .to button>*{pointer-events:none}.view-thread .messages .message .sub-header .to button chevron-icon{display:inline-table;fill:var(--nylas-color-primary-400);width:15px;height:15px;vertical-align:middle}.view-thread .messages .message .sub-header .to button chevron-icon svg{width:15px;height:15px;transform:rotate(90deg)}.view-thread .messages .message .sub-header .to button.expand--showContactData chevron-icon svg{transform:rotate(270deg)}.view-thread .messages .message .address-info{display:grid;column-gap:1rem;row-gap:0.5rem;grid-template-columns:auto 1fr;grid-template-rows:1fr;padding:1rem 2rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-color-primary-200);align-items:flex-start;color:var(--nylas-color-primary-600)}.view-thread .messages .message .address-info .label{color:var(--nylas-color-primary-400);font-weight:600}.show-more{position:relative;display:flex;width:100%}.show-more .sr-only{display:none}.show-more button{position:relative;display:inline-flex;width:100%;padding:0;border:0;background-color:transparent;cursor:pointer;text-align:left;overflow:hidden}.show-more button span{border:1px solid var(--nylas-color-primary-400)}.show-more button:hover span{background-color:var(--nylas-color-primary-700)}.show-more button::after{border-top:1px solid rgba(100, 121, 143, 0.122);border-bottom:1px solid rgba(100, 121, 143, 0.122);content:"";height:4px;width:100%;position:absolute;top:50%}.loading{position:absolute;width:100%;height:100%;background-color:var(--loading__background-color);top:0;bottom:0;left:0;z-index:1;display:grid;justify-content:center;align-items:center;font-weight:600;overflow:hidden}.reply-buttons{display:grid;grid-auto-flow:column;grid-auto-columns:min-content;gap:1rem;margin-top:1rem}.reply-buttons sp-button{border-radius:var(--nylas-border-radius);background-color:var(--nylas-color-primary-400);color:var(--nylas-color-primary-900);fill:var(--nylas-color-primary-900)}.reply-buttons sp-button:hover{background-color:var(--nylas-color-primary-500)}.reply-buttons sp-button:disabled{background-color:var(--nylas-color-primary-200);color:var(--nylas-color-primary-600);cursor:not-allowed}.reply-buttons sp-button chevron-icon{display:inline-block}@media only screen and (min-width: 768px){.view-thread .messages .message .sub-header .from span.email{display:inline}}',C=b;var k=function(t,a,s,o){var r=arguments.length,n=r<3?a:o===null?o=Object.getOwnPropertyDescriptor(a,s):o,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(t,a,s,o);else for(var i=t.length-1;i>=0;i--)(l=t[i])&&(n=(r<3?l(n):r>3?l(a,s,n):l(a,s))||n);return r>3&&n&&Object.defineProperty(a,s,n),n},m=function(t,a){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,a)};const p=class{constructor(t){e.registerInstance(this,t),this.threadSelected=e.createEvent(this,"threadSelected",7),this.showContactDataClicked=e.createEvent(this,"showContactDataClicked",7),this.messageClicked=e.createEvent(this,"messageClicked",7),this.nylasViewEmailElement=null,this.nylasComposerElement=null,this.onShowContactDataClick=a=>{a.stopPropagation();const o=a.target.value,r=this.internalMessages.find(l=>l.data.id===o);if(!r){e.debug(`[nylas-view-thread] Could not find message ${o}`);return}this.showContactDataClicked.emit(r.data).defaultPrevented||(r.showContactData=!r.showContactData,this.internalMessages=[...this.internalMessages]),e.debug(`[nylas-view-thread] show contact data clicked ${o} ${r.showContactData?"collapsed":"expanded"}`)},this.onMessageClick=a=>{var l;const o=a.target.dataset.id,r=this.internalMessages.find(i=>i.data.id===o);if(!r){e.debug(`[nylas-view-thread] Could not find message ${o}`);return}this.messageClicked.emit(r.data).defaultPrevented||(r.id!==((l=this.internalMessages[this.internalMessages.length-1])==null?void 0:l.id)&&(r.collapse=!r.collapse,r.collapse&&(r.showContactData=!1)),this.internalMessages=[...this.internalMessages]),e.debug(`[nylas-view-thread] message clicked ${o} ${r.collapse?"collapsed":"expanded"}`)},this.onShowAllEmailsClick=()=>{this.showAllEmails=!this.showAllEmails},this.showComposerClick=()=>{this.showComposer=!this.showComposer},this.draft=void 0,this.thread=void 0,this.messages=[],this.attachments=[],this.state="loading",this.internalMessages=[],this.showAllEmails=!1,this.showComposer=!1}connectedCallback(){}disconnectedCallback(){}async componentWillLoad(){e.debug("[nylas-view-thread] Component will load"),this.updateInternalMessages(this.messages);const t=this.host.querySelector("template.nylas-view-email");if(!t){e.debug("[nylas-view-thread] Could not find template");return}const a=document.importNode(t.content,!0);this.nylasViewEmailElement=a.querySelector("nylas-view-email");const s=this.host.querySelector("template.nylas-composer");if(!s){e.debug("[nylas-view-thread] Could not find composer template");return}const o=document.importNode(s.content,!0);this.nylasComposerElement=o.querySelector("nylas-composer")}async componentDidLoad(){e.debug("[nylas-view-thread] Component did load")}async threadChanged(t){e.debug("[nylas-view-thread] Thread changed",{thread:t}),this.internalMessages=[],this.threadSelected.emit(t).defaultPrevented||e.debug("[nylas-view-thread] Default event not prevented, initializing")}updateInternalMessages(t){e.debug("[nylas-view-thread] Updating internal messages",{messages:t});const a=t.sort((s,o)=>s.date>o.date?1:-1).map((s,o)=>({id:s.id,data:s,collapse:o!==t.length-1,showContactData:!1}));this.internalMessages=a}render(){var r,n,l;const t=this.internalMessages.length>2?this.internalMessages[0]:null,a=this.internalMessages.slice(this.internalMessages.length-2,this.internalMessages.length),s=this.internalMessages.slice(1,this.internalMessages.length-2),o=this.internalMessages[this.internalMessages.length-1];return e.h(e.Host,{key:"08d6981bb00f24f18212060a784da5ec7129197e"},e.h("sp-theme",{key:"0f7f54486f61beb490fc96a0f84753868ef384aa",scale:"medium",color:"dark"},e.h("div",{key:"9aad086eae2344a6d0d28b1fb4fb39921dcf53f0",class:"view-thread"},e.h("div",{key:"fcef6cd0bfed78b7d6f9df5a2a8719a32b1e294f",class:"header"},e.h("div",{key:"0673aebc8626e082deb3f0a9b9eb9c18a1841349",class:"subject"},(r=this.thread)==null?void 0:r.subject),e.h("div",{key:"10ee64da01595dcb658f99b9a8d90c1fe9237816",class:"folders"},(l=(n=this.thread)==null?void 0:n.folders)==null?void 0:l.map(i=>e.h("sp-tag",{size:"s"},e.toTitleCase(i.replace("CATEGORY_","").replace("_"," ")))))),e.h("div",{key:"469007a98202e151206e4ac329956882f069b618",class:"messages"},t&&e.h(c,{message:t,attachments:this.attachments.filter(i=>i.messageId===t.id),onMessageClick:this.onMessageClick,onShowContactDataClick:this.onShowContactDataClick,parent:this.host,viewEmailElement:this.nylasViewEmailElement,composerElement:this.nylasComposerElement}),s.length>0&&this.messages.length>1&&!this.showAllEmails&&a.length>0&&e.h(e.Fragment,null,e.h("div",{class:"show-more"},e.h("button",{type:"button",onClick:this.onShowAllEmailsClick},e.h("span",{class:"avatar"},s.length)," ",e.h("span",{class:"sr-only"},"Show ",s.length," more emails"))),e.h("hr",null)),s.length>0&&this.showAllEmails&&this.messages.length>2&&s.map(i=>e.h(c,{message:i,attachments:this.attachments.filter(d=>d.messageId===(t==null?void 0:t.id)),onMessageClick:this.onMessageClick,onShowContactDataClick:this.onShowContactDataClick,parent:this.host,viewEmailElement:this.nylasViewEmailElement,composerElement:this.nylasComposerElement})),a.length>0&&a.map(i=>e.h(c,{message:i,attachments:this.attachments.filter(d=>d.messageId===(t==null?void 0:t.id)),onMessageClick:this.onMessageClick,onShowContactDataClick:this.onShowContactDataClick,parent:this.host,viewEmailElement:this.nylasViewEmailElement,composerElement:this.nylasComposerElement}))),!(this.showComposer&&o)&&e.h("div",{class:"reply-buttons"},e.h("sp-button",{variant:"cta",type:"button",onClick:this.showComposerClick},e.h("span",{slot:"icon"},e.h("reply-icon",null)),e.h("span",null,"Reply")),e.h("sp-button",{variant:"cta",type:"button"},e.h("span",{slot:"icon"},e.h("reply-all-icon",null)),e.h("span",null,"Reply All")),e.h("sp-button",{variant:"cta",type:"button"},e.h("span",{slot:"icon"},e.h("forward-icon",null)),e.h("span",null,"Forward"))),this.showComposer&&o&&e.h("div",{class:"composer"},e.h("nylas-composer",{message:o.data,onClose:this.showComposerClick,onSend:i=>{e.debug("[nylas-view-thread] Send event",{message:i.detail.message,replyBody:i.detail.replyBody})}})))))}get host(){return e.getElement(this)}static get watchers(){return{thread:["threadChanged"],messages:["updateInternalMessages"]}}};k([f.RegisterComponent({name:"nylas-view-thread",stateToProps:new Map([["mailbox.selectedThread","thread"],["mailbox.messages","messages"],["mailbox.state","state"]]),eventToProps:{threadSelected:async(t,a)=>{e.debug("[nylas-view-thread] Nylas init event. Fetching thread messages.",{event:t});const s=t.detail;s&&s.id&&await a.messages.getThreadMessages(s.id)}},fireRegisterEvent:!0}),m("design:type",Function),m("design:paramtypes",[]),m("design:returntype",void 0)],p.prototype,"render",null);p.style=C;exports.nylas_view_thread=p;
@@ -1,4 +1,4 @@
1
- import { r as a, h as e } from "./index-20ea5b0c.js";
1
+ import { r as a, h as e } from "./index-4c7e8f2f.js";
2
2
  import "react";
3
3
  import "react-dom";
4
4
  const o = ".sc-people-icon-h{display:flex}", s = o, c = class {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-33f74306.cjs");require("react");require("react-dom");const c=".sc-people-icon-h{display:flex}",a=c,t=class{constructor(i){e.registerInstance(this,i),this.width="20",this.height="20"}render(){return e.h("svg",{key:"8f73408ea9a46988a9f1a9f804fab7ddc87c64d1",xmlns:"http://www.w3.org/2000/svg",width:this.width,height:this.height,fill:"none",viewBox:"0 0 20 20"},e.h("path",{key:"d0a57fb5c109d50e01a113dd137edf66efccbb02",fill:"currentColor",d:"M11 10a2 2 0 0 1 2 2v1.5c0 2.054-2.088 3.5-5.5 3.5S2 15.554 2 13.5V12a2 2 0 0 1 2-2h7Zm0 1H4a1 1 0 0 0-1 1v1.5C3 14.907 4.579 16 7.5 16c2.921 0 4.5-1.093 4.5-2.5V12a1 1 0 0 0-1-1Zm5-1a2 2 0 0 1 2 2v.5c0 2.089-1.568 3.5-4.5 3.5-.141 0-.28-.003-.414-.01.208-.242.382-.502.522-.781l.097-.213h.039C15.976 14.931 17 13.96 17 12.5V12a1 1 0 0 0-1-1h-2.171a3 3 0 0 0-.594-1H16ZM7.5 2a3.5 3.5 0 1 1 0 7 3.5 3.5 0 0 1 0-7Zm7 2a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5Zm-7-1a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5Zm7 2a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Z"}))}};t.style=a;exports.people_icon=t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-3a004ec1.cjs");require("react");require("react-dom");const c=".sc-people-icon-h{display:flex}",a=c,t=class{constructor(i){e.registerInstance(this,i),this.width="20",this.height="20"}render(){return e.h("svg",{key:"8f73408ea9a46988a9f1a9f804fab7ddc87c64d1",xmlns:"http://www.w3.org/2000/svg",width:this.width,height:this.height,fill:"none",viewBox:"0 0 20 20"},e.h("path",{key:"d0a57fb5c109d50e01a113dd137edf66efccbb02",fill:"currentColor",d:"M11 10a2 2 0 0 1 2 2v1.5c0 2.054-2.088 3.5-5.5 3.5S2 15.554 2 13.5V12a2 2 0 0 1 2-2h7Zm0 1H4a1 1 0 0 0-1 1v1.5C3 14.907 4.579 16 7.5 16c2.921 0 4.5-1.093 4.5-2.5V12a1 1 0 0 0-1-1Zm5-1a2 2 0 0 1 2 2v.5c0 2.089-1.568 3.5-4.5 3.5-.141 0-.28-.003-.414-.01.208-.242.382-.502.522-.781l.097-.213h.039C15.976 14.931 17 13.96 17 12.5V12a1 1 0 0 0-1-1h-2.171a3 3 0 0 0-.594-1H16ZM7.5 2a3.5 3.5 0 1 1 0 7 3.5 3.5 0 0 1 0-7Zm7 2a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5Zm-7-1a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5Zm7 2a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Z"}))}};t.style=a;exports.people_icon=t;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-33f74306.cjs");require("react");require("react-dom");const o=".sc-play-icon-h{display:flex}",c=o,s=class{constructor(e){t.registerInstance(this,e),this.width="15",this.height="15"}render(){return t.h("svg",{key:"01461bf1925b9c4a5b755ee500c5c9d9ea9a4c9c",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},t.h("path",{key:"c60c140ea197f53c9f5df04e3a2ef0e8736787c2",d:"M21 12L3 21V3L21 12Z",stroke:"auto","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))}};s.style=c;const n=".sc-stop-icon-h{display:flex}",h=n,i=class{constructor(e){t.registerInstance(this,e),this.width="15",this.height="15"}render(){return t.h("svg",{key:"f6149723fe23e788bd2a2b7fb075fb929222cb31",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},t.h("path",{key:"4f6c453999391dae9f8271f341c9ffac4458fd79",d:"M4 4H20V20H4V4Z",stroke:"auto","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))}};i.style=h;exports.play_icon=s;exports.stop_icon=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-3a004ec1.cjs");require("react");require("react-dom");const o=".sc-play-icon-h{display:flex}",c=o,s=class{constructor(e){t.registerInstance(this,e),this.width="15",this.height="15"}render(){return t.h("svg",{key:"01461bf1925b9c4a5b755ee500c5c9d9ea9a4c9c",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},t.h("path",{key:"c60c140ea197f53c9f5df04e3a2ef0e8736787c2",d:"M21 12L3 21V3L21 12Z",stroke:"auto","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))}};s.style=c;const n=".sc-stop-icon-h{display:flex}",h=n,i=class{constructor(e){t.registerInstance(this,e),this.width="15",this.height="15"}render(){return t.h("svg",{key:"f6149723fe23e788bd2a2b7fb075fb929222cb31",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},t.h("path",{key:"4f6c453999391dae9f8271f341c9ffac4458fd79",d:"M4 4H20V20H4V4Z",stroke:"auto","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))}};i.style=h;exports.play_icon=s;exports.stop_icon=i;
@@ -1,4 +1,4 @@
1
- import { r as o, h as t } from "./index-20ea5b0c.js";
1
+ import { r as o, h as t } from "./index-4c7e8f2f.js";
2
2
  import "react";
3
3
  import "react-dom";
4
4
  const e = ".sc-play-icon-h{display:flex}", i = e, c = class {
package/dist/react.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-33f74306.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.CalendarCancelIcon=o.CalendarCancelIcon;exports.CalendarCheckIcon=o.CalendarCheckIcon;exports.CalendarIcon=o.CalendarIcon;exports.CalendarInfoIcon=o.CalendarInfoIcon;exports.CalendarPatternsIcon=o.CalendarPatternsIcon;exports.CheckmarkCircleIcon=o.CheckmarkCircleIcon;exports.ChevronIcon=o.ChevronIcon;exports.CloseIcon=o.CloseIcon;exports.DocumentRefreshIcon=o.DocumentRefreshIcon;exports.FlowIcon=o.FlowIcon;exports.FolderIcon=o.FolderIcon;exports.ForwardIcon=o.ForwardIcon;exports.GlobeIcon=o.GlobeIcon;exports.GoogleLogoIcon=o.GoogleLogoIcon;exports.InboxIcon=o.InboxIcon;exports.InfoIcon=o.InfoIcon;exports.ItalicIcon=o.ItalicIcon;exports.LoadingIcon=o.LoadingIcon;exports.LocationIcon=o.LocationIcon;exports.LocationOffIcon=o.LocationOffIcon;exports.MicrosoftLogoIcon=o.MicrosoftLogoIcon;exports.MultiSelectDropdown=o.MultiSelectDropdown;exports.NylasAdditionalParticipants=o.NylasAdditionalParticipants;exports.NylasAvailabilityPicker=o.NylasAvailabilityPicker;exports.NylasBookedEventCard=o.NylasBookedEventCard;exports.NylasBookingCalendarPicker=o.NylasBookingCalendarPicker;exports.NylasBookingForm=o.NylasBookingForm;exports.NylasBufferTime=o.NylasBufferTime;exports.NylasCalendarPicker=o.NylasCalendarPicker;exports.NylasCancelBookingForm=o.NylasCancelBookingForm;exports.NylasCancelledEventCard=o.NylasCancelledEventCard;exports.NylasComposer=o.NylasComposer;exports.NylasCustomBookingFlow=o.NylasCustomBookingFlow;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.NylasEventTitle=o.NylasEventTitle;exports.NylasFormCard=o.NylasFormCard;exports.NylasIdentityRequestWrapper=o.NylasIdentityRequestWrapper;exports.NylasIfState=o.NylasIfState;exports.NylasLimitFutureBookings=o.NylasLimitFutureBookings;exports.NylasListConfigurations=o.NylasListConfigurations;exports.NylasListFolders=o.NylasListFolders;exports.NylasListThreads=o.NylasListThreads;exports.NylasLocaleSwitch=o.NylasLocaleSwitch;exports.NylasLocationComponent=o.NylasLocationComponent;exports.NylasLogin=o.NylasLogin;exports.NylasLogo=o.NylasLogo;exports.NylasMailbox=o.NylasMailbox;exports.NylasMailboxPagination=o.NylasMailboxPagination;exports.NylasMailboxToolbarButton=o.NylasMailboxToolbarButton;exports.NylasMinCancellationNotice=o.NylasMinCancellationNotice;exports.NylasNotification=o.NylasNotification;exports.NylasProvider=o.NylasProvider;exports.NylasSchedulerEditor=o.NylasSchedulerEditor;exports.NylasScheduling=o.NylasScheduling;exports.NylasSelectedEventCard=o.NylasSelectedEventCard;exports.NylasSummarizeMessageButton=o.NylasSummarizeMessageButton;exports.NylasThreadsRefresh=o.NylasThreadsRefresh;exports.NylasThreadsSearch=o.NylasThreadsSearch;exports.NylasTimeWindowPicker=o.NylasTimeWindowPicker;exports.NylasTimeslotPicker=o.NylasTimeslotPicker;exports.NylasViewEmail=o.NylasViewEmail;exports.NylasViewThread=o.NylasViewThread;exports.PeopleIcon=o.PeopleIcon;exports.PlayIcon=o.PlayIcon;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.TimePeriodSelector=o.TimePeriodSelector;exports.TooltipComponent=o.TooltipComponent;exports.TranslateIcon=o.TranslateIcon;exports.TrashIcon=o.TrashIcon;exports.UnderlineIcon=o.UnderlineIcon;exports.WarningIcon=o.WarningIcon;exports.applyPolyfills=o.applyPolyfills;exports.defineCustomElements=o.defineCustomElements;exports.setNonce=o.setNonce;exports.useNylasMailboxElement=o.useNylasMailboxElement;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-3a004ec1.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.CalendarCancelIcon=o.CalendarCancelIcon;exports.CalendarCheckIcon=o.CalendarCheckIcon;exports.CalendarIcon=o.CalendarIcon;exports.CalendarInfoIcon=o.CalendarInfoIcon;exports.CalendarPatternsIcon=o.CalendarPatternsIcon;exports.CheckmarkCircleIcon=o.CheckmarkCircleIcon;exports.ChevronIcon=o.ChevronIcon;exports.CloseIcon=o.CloseIcon;exports.DocumentRefreshIcon=o.DocumentRefreshIcon;exports.FlowIcon=o.FlowIcon;exports.FolderIcon=o.FolderIcon;exports.ForwardIcon=o.ForwardIcon;exports.GlobeIcon=o.GlobeIcon;exports.GoogleLogoIcon=o.GoogleLogoIcon;exports.InboxIcon=o.InboxIcon;exports.InfoIcon=o.InfoIcon;exports.ItalicIcon=o.ItalicIcon;exports.LoadingIcon=o.LoadingIcon;exports.LocationIcon=o.LocationIcon;exports.LocationOffIcon=o.LocationOffIcon;exports.MicrosoftLogoIcon=o.MicrosoftLogoIcon;exports.MultiSelectDropdown=o.MultiSelectDropdown;exports.NylasAdditionalParticipants=o.NylasAdditionalParticipants;exports.NylasAvailabilityPicker=o.NylasAvailabilityPicker;exports.NylasBookedEventCard=o.NylasBookedEventCard;exports.NylasBookingCalendarPicker=o.NylasBookingCalendarPicker;exports.NylasBookingForm=o.NylasBookingForm;exports.NylasBufferTime=o.NylasBufferTime;exports.NylasCalendarPicker=o.NylasCalendarPicker;exports.NylasCancelBookingForm=o.NylasCancelBookingForm;exports.NylasCancelledEventCard=o.NylasCancelledEventCard;exports.NylasComposer=o.NylasComposer;exports.NylasCustomBookingFlow=o.NylasCustomBookingFlow;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.NylasEventTitle=o.NylasEventTitle;exports.NylasFormCard=o.NylasFormCard;exports.NylasIdentityRequestWrapper=o.NylasIdentityRequestWrapper;exports.NylasIfState=o.NylasIfState;exports.NylasLimitFutureBookings=o.NylasLimitFutureBookings;exports.NylasListConfigurations=o.NylasListConfigurations;exports.NylasListFolders=o.NylasListFolders;exports.NylasListThreads=o.NylasListThreads;exports.NylasLocaleSwitch=o.NylasLocaleSwitch;exports.NylasLocationComponent=o.NylasLocationComponent;exports.NylasLogin=o.NylasLogin;exports.NylasLogo=o.NylasLogo;exports.NylasMailbox=o.NylasMailbox;exports.NylasMailboxPagination=o.NylasMailboxPagination;exports.NylasMailboxToolbarButton=o.NylasMailboxToolbarButton;exports.NylasMinCancellationNotice=o.NylasMinCancellationNotice;exports.NylasNotification=o.NylasNotification;exports.NylasProvider=o.NylasProvider;exports.NylasSchedulerEditor=o.NylasSchedulerEditor;exports.NylasScheduling=o.NylasScheduling;exports.NylasSelectedEventCard=o.NylasSelectedEventCard;exports.NylasSummarizeMessageButton=o.NylasSummarizeMessageButton;exports.NylasThreadsRefresh=o.NylasThreadsRefresh;exports.NylasThreadsSearch=o.NylasThreadsSearch;exports.NylasTimeWindowPicker=o.NylasTimeWindowPicker;exports.NylasTimeslotPicker=o.NylasTimeslotPicker;exports.NylasViewEmail=o.NylasViewEmail;exports.NylasViewThread=o.NylasViewThread;exports.PeopleIcon=o.PeopleIcon;exports.PlayIcon=o.PlayIcon;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.TimePeriodSelector=o.TimePeriodSelector;exports.TooltipComponent=o.TooltipComponent;exports.TranslateIcon=o.TranslateIcon;exports.TrashIcon=o.TrashIcon;exports.UnderlineIcon=o.UnderlineIcon;exports.WarningIcon=o.WarningIcon;exports.applyPolyfills=o.applyPolyfills;exports.defineCustomElements=o.defineCustomElements;exports.setNonce=o.setNonce;exports.useNylasMailboxElement=o.useNylasMailboxElement;
package/dist/react.js CHANGED
@@ -1,4 +1,4 @@
1
- import { W as n, X as l, Y as i, Z as c, _ as t, $ as r, a0 as y, a1 as N, a2 as I, a3 as d, a4 as b, a5 as C, a6 as m, a7 as p, a8 as f, a9 as h, aa as g, ab as u, ac as S, ad as k, ae as T, af as L, ag as P, ah as E, ai as v, aj as B, ak as w, al as F, am as M, an as x, ao as A, ap as D, aq as R, ar as W, as as V, at as G, au as U, av as q, aw as z, ax as O, ay as X, az as Y, aA as Z, aB as _, aC as $, aD as j, N as H, aE as J, aF as K, aG as Q, aH as aa, aI as sa, aJ as oa, aK as ea, aL as na, aM as la, aN as ia, aO as ca, aP as ta, aQ as ra, aR as ya, aS as Na, aT as Ia, aU as da, aV as ba, aW as Ca, aX as ma, aY as pa, aZ as fa, a_ as ha, a$ as ga, b0 as ua, b1 as Sa, b2 as ka, b3 as Ta, b4 as La, b5 as Pa, b6 as Ea, b7 as va, b8 as Ba, b9 as wa, ba as Fa, bb as Ma, bc as xa, bd as Aa, be as Da, bf as Ra, bg as Wa, bh as Va, T as Ga, U as Ua, V as qa, S as za } from "./index-20ea5b0c.js";
1
+ import { W as n, X as l, Y as i, Z as c, _ as t, $ as r, a0 as y, a1 as N, a2 as I, a3 as d, a4 as b, a5 as C, a6 as m, a7 as p, a8 as f, a9 as h, aa as g, ab as u, ac as S, ad as k, ae as T, af as L, ag as P, ah as E, ai as v, aj as B, ak as w, al as F, am as M, an as x, ao as A, ap as D, aq as R, ar as W, as as V, at as G, au as U, av as q, aw as z, ax as O, ay as X, az as Y, aA as Z, aB as _, aC as $, aD as j, N as H, aE as J, aF as K, aG as Q, aH as aa, aI as sa, aJ as oa, aK as ea, aL as na, aM as la, aN as ia, aO as ca, aP as ta, aQ as ra, aR as ya, aS as Na, aT as Ia, aU as da, aV as ba, aW as Ca, aX as ma, aY as pa, aZ as fa, a_ as ha, a$ as ga, b0 as ua, b1 as Sa, b2 as ka, b3 as Ta, b4 as La, b5 as Pa, b6 as Ea, b7 as va, b8 as Ba, b9 as wa, ba as Fa, bb as Ma, bc as xa, bd as Aa, be as Da, bf as Ra, bg as Wa, bh as Va, T as Ga, U as Ua, V as qa, S as za } from "./index-4c7e8f2f.js";
2
2
  import "react";
3
3
  import "react-dom";
4
4
  export {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-33f74306.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:"aee09fcff1a6eff44a8ab2dd03b53d016bd807f7",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:"ead150b54eb753b97fd36ef63a3d96545a92245a",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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-3a004ec1.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:"aee09fcff1a6eff44a8ab2dd03b53d016bd807f7",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:"ead150b54eb753b97fd36ef63a3d96545a92245a",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;
@@ -1,4 +1,4 @@
1
- import { r as s, h as c } from "./index-20ea5b0c.js";
1
+ import { r as s, h as c } from "./index-4c7e8f2f.js";
2
2
  import "react";
3
3
  import "react-dom";
4
4
  const t = ".sc-refresh-icon-h{display:flex}", l = t, h = class {
@@ -1,4 +1,4 @@
1
- import { d, R as m, g as P } from "./index-20ea5b0c.js";
1
+ import { d, R as m, g as P } from "./index-4c7e8f2f.js";
2
2
  function b(e, o, i = "registerComponent") {
3
3
  return new CustomEvent(i, {
4
4
  bubbles: !0,
@@ -1 +1 @@
1
- "use strict";const s=require("./index-33f74306.cjs");function m(e,o,u="registerComponent"){return new CustomEvent(u,{bubbles:!0,composed:!0,detail:o})}function P(e,o,u="unregisterComponent"){return new CustomEvent(u,{bubbles:!0,composed:!0,detail:o})}function b(e){return(o,u)=>{const r=e.name;s.debug(`[${r}] Registering component ${r} being called on ${u}`);const l=o.componentWillLoad;if(!l){s.error(`[${r}] componentWillLoad lifecycle method in ${r} missing. Required for RegisterComponent decorator.`);return}const p=o.connectedCallback;if(!p){s.error(`[${r}] connectedCallback lifecycle method in ${r} missing. Required for RegisterComponent decorator.`);return}const a=o.disconnectedCallback;if(!a){s.error(`[${r}] disconnectedCallback lifecycle method in ${r} missing. Required for RegisterComponent decorator.`);return}if(e.storeToProps&&e.stateToProps){const n=Array.from(e.storeToProps.values()),t=Array.from(e.stateToProps.values()),i=n.filter(c=>t.includes(c));if(i.length>0){s.error(`[${r}] Overlapping prop keys detected in ${r} for storeToProps and stateToProps. Make sure to only define them once. Overlapping keys: ${i.join(", ")}`);return}}const d=new Map;e.eventToProps&&Object.keys(e.eventToProps).forEach(n=>{var t;d.set(n,(t=e.eventToProps)==null?void 0:t[n])}),o.connectedCallback=function(){s.debug(`[~${r}] connectedCallback called`);const n=p==null?void 0:p.call(this),t=s.getElement(this);return t.dataset.nylasId||(Object.defineProperty(t,"registerNylasComponent",{get(){return!0},enumerable:!0}),Object.defineProperty(t,"stateToProps",{get(){return e.stateToProps},enumerable:!0}),Object.defineProperty(t,"getStoresToProp",{get(){return e.getStoresToProp},enumerable:!0}),Object.defineProperty(t,"storeToProps",{get(){return e.storeToProps},enumerable:!0}),Object.defineProperty(t,"eventToProps",{get(){return d},enumerable:!0}),Object.defineProperty(t,"authToProp",{get(){return e.authToProp},enumerable:!0}),Object.defineProperty(t,"connectorToProp",{get(){return e.connectorToProp},enumerable:!0}),Object.defineProperty(t,"localPropsToProp",{get(){return e.localPropsToProp},enumerable:!0})),n},e.fireRegisterEvent&&(o.componentWillLoad=function(){const n=l==null?void 0:l.call(this),t=s.getElement(this),i={element:t,...e,eventToProps:d},c=m(o,i,e.registrationEventName);return t.dispatchEvent(c)&&s.debug(`[${r}] Component ${r} successfully fired registration event`),n},o.disconnectedCallback=function(){const n=a==null?void 0:a.call(this),t=s.getElement(this),i={element:t,...e,eventToProps:d},c=P(o,i,e.unregistrationEventName);return t.dispatchEvent(c)&&s.debug(`[${r}] Component ${r} successfully fired unregistration event`),n})}}exports.RegisterComponent=b;
1
+ "use strict";const s=require("./index-3a004ec1.cjs");function m(e,o,u="registerComponent"){return new CustomEvent(u,{bubbles:!0,composed:!0,detail:o})}function P(e,o,u="unregisterComponent"){return new CustomEvent(u,{bubbles:!0,composed:!0,detail:o})}function b(e){return(o,u)=>{const r=e.name;s.debug(`[${r}] Registering component ${r} being called on ${u}`);const l=o.componentWillLoad;if(!l){s.error(`[${r}] componentWillLoad lifecycle method in ${r} missing. Required for RegisterComponent decorator.`);return}const p=o.connectedCallback;if(!p){s.error(`[${r}] connectedCallback lifecycle method in ${r} missing. Required for RegisterComponent decorator.`);return}const a=o.disconnectedCallback;if(!a){s.error(`[${r}] disconnectedCallback lifecycle method in ${r} missing. Required for RegisterComponent decorator.`);return}if(e.storeToProps&&e.stateToProps){const n=Array.from(e.storeToProps.values()),t=Array.from(e.stateToProps.values()),i=n.filter(c=>t.includes(c));if(i.length>0){s.error(`[${r}] Overlapping prop keys detected in ${r} for storeToProps and stateToProps. Make sure to only define them once. Overlapping keys: ${i.join(", ")}`);return}}const d=new Map;e.eventToProps&&Object.keys(e.eventToProps).forEach(n=>{var t;d.set(n,(t=e.eventToProps)==null?void 0:t[n])}),o.connectedCallback=function(){s.debug(`[~${r}] connectedCallback called`);const n=p==null?void 0:p.call(this),t=s.getElement(this);return t.dataset.nylasId||(Object.defineProperty(t,"registerNylasComponent",{get(){return!0},enumerable:!0}),Object.defineProperty(t,"stateToProps",{get(){return e.stateToProps},enumerable:!0}),Object.defineProperty(t,"getStoresToProp",{get(){return e.getStoresToProp},enumerable:!0}),Object.defineProperty(t,"storeToProps",{get(){return e.storeToProps},enumerable:!0}),Object.defineProperty(t,"eventToProps",{get(){return d},enumerable:!0}),Object.defineProperty(t,"authToProp",{get(){return e.authToProp},enumerable:!0}),Object.defineProperty(t,"connectorToProp",{get(){return e.connectorToProp},enumerable:!0}),Object.defineProperty(t,"localPropsToProp",{get(){return e.localPropsToProp},enumerable:!0})),n},e.fireRegisterEvent&&(o.componentWillLoad=function(){const n=l==null?void 0:l.call(this),t=s.getElement(this),i={element:t,...e,eventToProps:d},c=m(o,i,e.registrationEventName);return t.dispatchEvent(c)&&s.debug(`[${r}] Component ${r} successfully fired registration event`),n},o.disconnectedCallback=function(){const n=a==null?void 0:a.call(this),t=s.getElement(this),i={element:t,...e,eventToProps:d},c=P(o,i,e.unregistrationEventName);return t.dispatchEvent(c)&&s.debug(`[${r}] Component ${r} successfully fired unregistration event`),n})}}exports.RegisterComponent=b;
@@ -1 +1 @@
1
- "use strict";const i=require("./index-33f74306.cjs");function c(n={}){const o={selectedConfiguration:{},configurations:[],calendars:[],currentUser:null,action:null,...n},e=i.createStore(o);function t(){e.set("selectedConfiguration",{...n.selectedConfiguration})}return e.onChange("action",async r=>{r||t()}),{...e,resetSelectedConfiguration:t}}exports.CreateNylasSchedulerConfigStore=c;
1
+ "use strict";const i=require("./index-3a004ec1.cjs");function c(n={}){const o={selectedConfiguration:{},configurations:[],calendars:[],currentUser:null,action:null,...n},e=i.createStore(o);function t(){e.set("selectedConfiguration",{...n.selectedConfiguration})}return e.onChange("action",async r=>{r||t()}),{...e,resetSelectedConfiguration:t}}exports.CreateNylasSchedulerConfigStore=c;
@@ -1,4 +1,4 @@
1
- import { e as i } from "./index-20ea5b0c.js";
1
+ import { e as i } from "./index-4c7e8f2f.js";
2
2
  function a(n = {}) {
3
3
  const o = {
4
4
  selectedConfiguration: {},
@@ -0,0 +1 @@
1
+ "use strict";const y=require("./index-3a004ec1.cjs");exports.ErrorCategory=void 0;(function(o){o.Component="component",o.Api="api",o.Auth="auth"})(exports.ErrorCategory||(exports.ErrorCategory={}));var b;(function(o){o.endtime_not_in_future="endtime_not_in_future",o.no_booking_info="no_booking_info",o.no_timeslot_selected="no_timeslot_selected",o.no_timezone_selected="no_timezone_selected",o.no_booking_id="no_booking_id",o.invalid_start_time="invalid_start_time",o.invalid_end_time="invalid_end_time",o.invalid_timezone="invalid_timezone"})(b||(b={}));var P;(function(o){o.invalid_session="invalid_session",o.general_error="general_error",o.internal_error="internal_error",o.invalid_request_error="invalid_request_error",o.timeslot_not_available="timeslot_not_available"})(P||(P={}));class z{constructor(){this.component=e=>{const i=exports.ErrorCategory.Component,s=`${e} error`;return{endtime_not_in_future:(t='"endtime" can not be in the future')=>({title:s,message:t,category:i}),no_booking_info:(t="No booking info provided")=>({title:s,message:t,category:i}),no_timeslot_selected:(t="No timeslot selected")=>({title:s,message:t,category:i}),no_timezone_selected:(t="No timezone selected")=>({title:s,message:t,category:i}),no_booking_id:(t="No booking id provided")=>({title:s,message:t,category:i}),invalid_start_time:(t="Invalid start time")=>({title:s,message:t,category:i}),invalid_end_time:(t="Invalid end time")=>({title:s,message:t,category:i}),invalid_timezone:(t="Invalid timezone")=>({title:s,message:t,category:i})}},this.api=e=>{const i=exports.ErrorCategory.Api,s=`${e} error`;return{invalid_session:t=>({title:s,message:t,category:i}),general_error:t=>({title:s,message:t,category:i}),internal_error:t=>({title:s,message:t,category:i}),invalid_request_error:t=>({title:s,message:t,category:i}),timeslot_not_available:t=>({title:s,message:t,category:i})}}}}class L{constructor({schedulerAPIURL:e,schedulerStore:i,sessionId:s,configId:t}){this.errors=new z,this.schedulerStore=i,this.schedulerAPIURL=e,this.sessionId=s,this.configId=t}getHeaders(){return this.configId?{}:{Authorization:`Bearer ${this.sessionId}`}}async makeAPIRequest(e,i,s,t={}){try{const n=new URL(this.schedulerAPIURL);return n.pathname=e,await(await fetch(decodeURIComponent(n.toString()),{method:i,headers:{"Content-Type":"application/json",Origin:window.location.origin,...t},body:s})).json()}catch(n){return{error:{message:n.message,title:"API request failed",type:"api"}}}}selectDate(e){this.schedulerStore.set("selectedDate",e),this.schedulerStore.set("selectedTimeslot",null)}selectTime(e){this.schedulerStore.set("selectedTimeslot",e)}selectTimezone(e){this.schedulerStore.set("selectedTimezone",e)}toggleAdditionalData(e){this.schedulerStore.set("showBookingForm",e)}setParticipantName(e){const{bookingInfo:i}=this.schedulerStore.state;this.schedulerStore.set("bookingInfo",{...i,primaryParticipant:{...i==null?void 0:i.primaryParticipant,name:e}})}setParticipantEmail(e){const{bookingInfo:i}=this.schedulerStore.state;this.schedulerStore.set("bookingInfo",{...i,primaryParticipant:{...i==null?void 0:i.primaryParticipant,email:e}})}async resetStoreStateAndFetchAvailability(){const e=new Date,i=new Date(e.getFullYear(),e.getMonth(),1).getTime()/1e3,s=new Date(e.getFullYear(),e.getMonth()+1,1).getTime()/1e3,t=await this.getAvailability(i,s),n=this.schedulerStore.get("availability").find(a=>new Date(a.start_time)>new Date);let r=e;return n&&(r=n.start_time),this.schedulerStore.set("selectedDate",r),this.schedulerStore.set("eventInfo",null),this.schedulerStore.set("showBookingForm",!1),this.schedulerStore.set("selectedTimeslot",null),t}async setReschedule(e){const i=this.schedulerStore.state.eventInfo;i&&this.schedulerStore.set("reschedulingEventInfo",i);const s=await this.resetStoreStateAndFetchAvailability();return this.schedulerStore.set("rescheduleBookingId",e),s}async setCancel(e){this.schedulerStore.set("cancelBookingId",e)}async resetCancel(){const e=await this.resetStoreStateAndFetchAvailability();return this.schedulerStore.set("cancelBookingId",""),this.schedulerStore.set("cancelledEventInfo",null),e}async bookTimeslot(e){var d;this.schedulerStore.set("isLoading",!0);const{selectedTimeslot:i,selectedTimezone:s,bookingInfo:t}=this.schedulerStore.state;if(!e&&!t)return{error:this.errors.component("Booking").no_booking_info()};const n=(e==null?void 0:e.timeslot)||i;if(!n)return{error:this.errors.component("Create Booking").no_timeslot_selected()};const r=e&&(e!=null&&e.timezone)?e==null?void 0:e.timezone:s;if(!r)return{error:this.errors.component("Create Booking").no_timezone_selected()};const a=e?e==null?void 0:e.primaryParticipant:t==null?void 0:t.primaryParticipant,c=e?(e==null?void 0:e.guests)||[]:(t==null?void 0:t.guests)||[],u=e?{...e==null?void 0:e.additionalFields,guests:c}:{...t==null?void 0:t.additionalFields,guests:c},S=this.getHeaders(),_=`/v3/scheduling/bookings${this.configId?`?configuration_id=${this.configId}`:""}`,l=await this.makeAPIRequest(decodeURIComponent(_),"POST",JSON.stringify({additional_fields:u,guest:{...a},start_time:n.start_time.getTime()/1e3,end_time:n.end_time.getTime()/1e3,timezone:r}),S);if("error"in l){this.schedulerStore.set("isLoading",!1);const h=(d=l.error)==null?void 0:d.type;let g=l.error;return h&&h in this.errors.api("Create Booking")&&(g=this.errors.api("Create Booking")[h]((g==null?void 0:g.message)||(g==null?void 0:g.title)||"Something went wrong")),{error:g}}return"data"in l&&this.schedulerStore.set("eventInfo",l==null?void 0:l.data),this.schedulerStore.set("isLoading",!1),l}async getUISettings(){var n;this.schedulerStore.set("isLoading",!0);const e=this.getHeaders(),s=`/v3/scheduling/ui-settings${this.configId?`?configuration_id=${this.configId}`:""}`,t=await this.makeAPIRequest(s,"GET",void 0,e);if("error"in t){this.schedulerStore.set("isLoading",!1);const r=(n=t.error)==null?void 0:n.type;let a=t.error;return r&&r in this.errors.api("Get UI Settings")&&(a=this.errors.api("Get UI Settings")[r]((a==null?void 0:a.message)||(a==null?void 0:a.title)||"Something went wrong")),{error:a}}return"data"in t&&this.schedulerStore.set("configSettings",t.data),this.schedulerStore.set("isLoading",!1),t}async getAvailability(e=0,i=0){var S,p,_;this.schedulerStore.set("isLoading",!0);const s=new URLSearchParams,t=new Date,n=t.getTime();if(i&&i<n/1e3)return this.schedulerStore.set("isLoading",!1),{error:this.errors.component("Get Availability").endtime_not_in_future()};if(!e){const l=new Date(t.getFullYear(),t.getMonth(),1);e=Math.floor(l.getTime()/1e3)}if(!i){const l=new Date(t.getFullYear(),t.getMonth()+1,0);i=Math.floor(l.getTime()/1e3)}s.append("start_time",encodeURIComponent(e.toString())),s.append("end_time",encodeURIComponent(i.toString())),this.configId&&s.append("configuration_id",encodeURIComponent(this.configId));const r=s.toString(),a=`/v3/scheduling/availability${r?`?${r}`:""}`,c=this.getHeaders(),u=await this.makeAPIRequest(decodeURIComponent(a),"GET",void 0,c);if("error"in u){this.schedulerStore.set("availability",[]),this.schedulerStore.set("isLoading",!1);const l=(S=u.error)==null?void 0:S.type;let d=u.error;return l&&l in this.errors.api("Get Availability")&&(d=this.errors.api("Get Availability")[l]((d==null?void 0:d.message)||(d==null?void 0:d.title)||"Something went wrong")),{error:d}}if("data"in u){const d=(((_=(p=u.data)==null?void 0:p.time_slots)==null?void 0:_.map(h=>({...h,start_time:new Date(h.start_time*1e3),end_time:new Date(h.end_time*1e3)})))||[]).filter(h=>h.start_time.getTime()>n);this.schedulerStore.set("availability",d)}return this.schedulerStore.set("isLoading",!1),u}async cancelBooking(e){var r;if(this.schedulerStore.set("isLoading",!0),!e)return{error:this.errors.component("Cancel Booking").no_booking_id()};const i=this.configId?`?configuration_id=${this.configId}`:"",s=`/v3/scheduling/bookings/${e}${i}`,t=this.getHeaders(),n=await this.makeAPIRequest(decodeURIComponent(s),"DELETE",JSON.stringify({action:"cancel"}),t);if("error"in n){this.schedulerStore.set("isLoading",!1);const a=(r=n.error)==null?void 0:r.type;let c=n.error;return a&&a in this.errors.api("Cancel Booking")&&(c=this.errors.api("Cancel Booking")[a]((c==null?void 0:c.message)||(c==null?void 0:c.title)||"Something went wrong")),{error:c}}return this.schedulerStore.set("cancelledEventInfo",{booking_id:e}),this.schedulerStore.set("isLoading",!1),n}async rescheduleBooking(e,i){var w;if(this.schedulerStore.set("isLoading",!0),!e)return{error:this.errors.component("Reschedule Booking").no_booking_id()};const s=this.errors.api("Reschedule Booking"),t=this.errors.component("Reschedule Booking"),{bookingInfo:n,selectedTimeslot:r,selectedTimezone:a}=this.schedulerStore.state,{startTime:c,endTime:u,timezone:S}=i,p=c||(r==null?void 0:r.start_time);if(!p)return{error:t.invalid_start_time('Please pass "startTime" in data or set "selectedTimeslot" in the defaultSchedulerState.')};const _=u||(r==null?void 0:r.end_time);if(!_)return{error:t.invalid_end_time('Please pass "endTime" in data or set "selectedTimeslot" in the defaultSchedulerState.')};const l=S||a;if(!l)return{error:t.invalid_timezone('Please pass "timezone" in data or set "selectedTimezone" in the defaultSchedulerState.')};const d=i?i==null?void 0:i.primaryParticipant:n==null?void 0:n.primaryParticipant,h=i?(i==null?void 0:i.guests)||[]:(n==null?void 0:n.guests)||[],g=i?{...i==null?void 0:i.additionalFields,guests:h}:{...n==null?void 0:n.additionalFields,guests:h},k=this.configId?`?configuration_id=${this.configId}`:"",T=`/v3/scheduling/bookings/${e}${k}`,A=this.getHeaders(),m=await this.makeAPIRequest(decodeURIComponent(T),"PATCH",JSON.stringify({start_time:p.getTime()/1e3,end_time:_.getTime()/1e3,time_zone:l,additional_fields:g,guest:{...d}}),A);if("error"in m){this.schedulerStore.set("isLoading",!1);const v=(w=m.error)==null?void 0:w.type;let f=m.error;v&&v in s&&(f=s[v]((f==null?void 0:f.message)||(f==null?void 0:f.title)||"Something went wrong"))}const I=this.schedulerStore.get("reschedulingEventInfo");if("data"in m)this.schedulerStore.set("eventInfo",m==null?void 0:m.data);else if(I)this.schedulerStore.set("eventInfo",I);else{const v={booking_id:e};this.schedulerStore.set("eventInfo",v)}return this.schedulerStore.set("isLoading",!1),m}}function C(o={}){const e={selectedDate:null,selectedLanguage:navigator.language,selectedTimezone:Intl.DateTimeFormat().resolvedOptions().timeZone,selectedTimeslot:null,showBookingForm:!1,selectableDates:null,availability:[],state:"ready",eventInfo:null,cancelledEventInfo:null,isLoading:!1,nylasBranding:!0,...o};y.debug("[defaultNylasStoreState]: ",e);const i=y.createStore(e);return i.onChange("availability",s=>{y.debug("[availability]: ",s);const t=s.map(n=>n.start_time);y.debug("[selectableDates]: ",t),i.set("selectableDates",t)}),i.reset=()=>{for(const s in e){const t=e[s];i.set(s,t)}},i}exports.CreateNylasSchedulerStore=C;exports.NylaSchedulerAPIConnector=L;