@nylas/react 1.2.0 → 1.3.0

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 (118) hide show
  1. package/dist/add-circle-icon.entry-0f0cd6d8.cjs +1 -0
  2. package/dist/add-circle-icon.entry-d2b7178c.js +15 -0
  3. package/dist/{archive-icon.entry-50c4b134.js → archive-icon.entry-602d3c58.js} +1 -1
  4. package/dist/{archive-icon.entry-718a1225.cjs → archive-icon.entry-ec25f93a.cjs} +1 -1
  5. package/dist/{arrow-icon.entry-ca9625d3.cjs → arrow-icon.entry-7bcb6442.cjs} +1 -1
  6. package/dist/{arrow-icon.entry-53337688.js → arrow-icon.entry-d4dd38b3.js} +1 -1
  7. package/dist/{bold-icon.entry-c6109b88.js → bold-icon.entry-5fc41386.js} +1 -1
  8. package/dist/{bold-icon.entry-36e679f1.cjs → bold-icon.entry-fc1d34a6.cjs} +1 -1
  9. package/dist/{button-component_2.entry-a1b8cd03.cjs → button-component_2.entry-d23be43d.cjs} +1 -1
  10. package/dist/{button-component_2.entry-0a06b0c4.js → button-component_2.entry-d62ae520.js} +1 -1
  11. package/dist/{calendar-agenda-fill-icon_54.entry-e4d8ab10.js → calendar-agenda-fill-icon_54.entry-1a42103a.js} +96 -98
  12. package/dist/{calendar-agenda-fill-icon_54.entry-5b185e75.cjs → calendar-agenda-fill-icon_54.entry-95ccb99e.cjs} +3 -3
  13. package/dist/{calendar-cancel-icon.entry-813a8330.js → calendar-cancel-icon.entry-1566c286.js} +1 -1
  14. package/dist/{calendar-cancel-icon.entry-22862d8c.cjs → calendar-cancel-icon.entry-bf9fc719.cjs} +1 -1
  15. package/dist/{calendar-check-icon_2.entry-2ca25094.cjs → calendar-check-icon_2.entry-4c3e78a6.cjs} +1 -1
  16. package/dist/{calendar-check-icon_2.entry-79d381ce.js → calendar-check-icon_2.entry-82407a92.js} +1 -1
  17. package/dist/{calendar-icon.entry-78bb4f9b.cjs → calendar-icon.entry-359c064c.cjs} +1 -1
  18. package/dist/{calendar-icon.entry-d52951b0.js → calendar-icon.entry-c3c23413.js} +1 -1
  19. package/dist/{checkbox-component_2.entry-1219f0cf.js → checkbox-component_2.entry-97e97789.js} +1 -1
  20. package/dist/{checkbox-component_2.entry-a6114846.cjs → checkbox-component_2.entry-f974e789.cjs} +1 -1
  21. package/dist/{chevron-icon_3.entry-d8f195dc.cjs → chevron-icon_3.entry-2453084c.cjs} +1 -1
  22. package/dist/{chevron-icon_3.entry-82878ccf.js → chevron-icon_3.entry-a6189c37.js} +1 -1
  23. package/dist/{clock-icon_4.entry-e081ccca.cjs → clock-icon_4.entry-5162dfec.cjs} +1 -1
  24. package/dist/{clock-icon_4.entry-9ab4bc41.js → clock-icon_4.entry-ad679142.js} +1 -1
  25. package/dist/close-icon.entry-2c6cdf35.js +15 -0
  26. package/dist/close-icon.entry-38dc2638.cjs +1 -0
  27. package/dist/{copy-icon.entry-9d6e0f48.js → copy-icon.entry-6630ce5a.js} +1 -1
  28. package/dist/{copy-icon.entry-9c6f38c2.cjs → copy-icon.entry-79df1d0e.cjs} +1 -1
  29. package/dist/{delete-icon.entry-fd8dc119.js → delete-icon.entry-716f906c.js} +1 -1
  30. package/dist/{delete-icon.entry-6ec9c80d.cjs → delete-icon.entry-f9a265b6.cjs} +1 -1
  31. package/dist/{document-refresh-icon.entry-bea78baf.cjs → document-refresh-icon.entry-bb91822a.cjs} +1 -1
  32. package/dist/{document-refresh-icon.entry-2b531e97.js → document-refresh-icon.entry-fa775295.js} +1 -1
  33. package/dist/{feedbackSync-b56b29ed-a7e9f258.js → feedbackSync-adc893c2-5965d5ba.js} +1 -1
  34. package/dist/{feedbackSync-b56b29ed-cdcec5be.cjs → feedbackSync-adc893c2-70d06afc.cjs} +1 -1
  35. package/dist/{folder-icon.entry-485465be.cjs → folder-icon.entry-82a02de7.cjs} +1 -1
  36. package/dist/{folder-icon.entry-6a43630e.js → folder-icon.entry-9cf7590f.js} +1 -1
  37. package/dist/{forward-icon.entry-a1af9122.cjs → forward-icon.entry-034ec3be.cjs} +1 -1
  38. package/dist/{forward-icon.entry-514ea4a8.js → forward-icon.entry-ebd5e108.js} +1 -1
  39. package/dist/{globe-icon.entry-adcff451.js → globe-icon.entry-48837e22.js} +1 -1
  40. package/dist/{globe-icon.entry-970082a4.cjs → globe-icon.entry-b67c68d5.cjs} +1 -1
  41. package/dist/{google-logo-icon_4.entry-2b68fe81.js → google-logo-icon_4.entry-819d7d0d.js} +142 -128
  42. package/dist/{google-logo-icon_4.entry-21cb4b95.cjs → google-logo-icon_4.entry-b637470a.cjs} +1 -1
  43. package/dist/{inbox-icon.entry-94507d27.cjs → inbox-icon.entry-7f91d971.cjs} +1 -1
  44. package/dist/{inbox-icon.entry-d3e42f82.js → inbox-icon.entry-c611c154.js} +1 -1
  45. package/dist/{index-9dc1bd32.js → index-72501df0.js} +2623 -2554
  46. package/dist/{index-bec58f1d.cjs → index-92ba1b80.cjs} +28 -28
  47. package/dist/{index.es-c7ca1bad-5652d50c.cjs → index.es-28b1b2ec-595c0513.cjs} +1 -1
  48. package/dist/{index.es-c7ca1bad-38475209.js → index.es-28b1b2ec-5a87db22.js} +1 -1
  49. package/dist/{info-icon_2.entry-3b5a2c7f.js → info-icon_2.entry-4ad69286.js} +1 -1
  50. package/dist/{info-icon_2.entry-e23f3ffd.cjs → info-icon_2.entry-4c70ab61.cjs} +1 -1
  51. package/dist/{input-color-picker.entry-b4ea90c5.cjs → input-color-picker.entry-46bf04e1.cjs} +1 -1
  52. package/dist/{input-color-picker.entry-9bc48bd3.js → input-color-picker.entry-4e5760ce.js} +1 -1
  53. package/dist/{input-component.entry-e567ec08.cjs → input-component.entry-1019ce99.cjs} +1 -1
  54. package/dist/{input-component.entry-ebae3a8a.js → input-component.entry-dca1013f.js} +1 -1
  55. package/dist/{input-dropdown.entry-597cd5a8.cjs → input-dropdown.entry-e535fb5e.cjs} +1 -1
  56. package/dist/{input-dropdown.entry-1f704009.js → input-dropdown.entry-f14c59e7.js} +1 -1
  57. package/dist/{italic-icon.entry-08593dd0.js → italic-icon.entry-2ab53839.js} +1 -1
  58. package/dist/{italic-icon.entry-8f614353.cjs → italic-icon.entry-726cc194.cjs} +1 -1
  59. package/dist/{multi-select-dropdown.entry-eb978e22.cjs → multi-select-dropdown.entry-6820d249.cjs} +1 -1
  60. package/dist/{multi-select-dropdown.entry-5f1c73f3.js → multi-select-dropdown.entry-a097d3cb.js} +1 -1
  61. package/dist/{nylas-booked-event-card_12.entry-73785c5c.cjs → nylas-booked-event-card_12.entry-c684905b.cjs} +1 -1
  62. package/dist/{nylas-booked-event-card_12.entry-c4043d8f.js → nylas-booked-event-card_12.entry-ccd85ff4.js} +49 -49
  63. package/dist/{nylas-form-card.entry-1540207c.cjs → nylas-form-card.entry-8eb47f3d.cjs} +1 -1
  64. package/dist/{nylas-form-card.entry-80688e35.js → nylas-form-card.entry-afdfee47.js} +2 -2
  65. package/dist/{nylas-if-state.entry-037d0454.js → nylas-if-state.entry-7caad39f.js} +2 -2
  66. package/dist/{nylas-if-state.entry-e5155b5b.cjs → nylas-if-state.entry-be7978de.cjs} +1 -1
  67. package/dist/{nylas-login.entry-b3d73ab9.cjs → nylas-login.entry-bce4f689.cjs} +1 -1
  68. package/dist/{nylas-login.entry-d157a6ed.js → nylas-login.entry-dcf85f93.js} +2 -2
  69. package/dist/{nylas-provider.entry-cf4b8b57.js → nylas-provider.entry-97882e4b.js} +4 -4
  70. package/dist/{nylas-provider.entry-884ba204.cjs → nylas-provider.entry-f02017da.cjs} +1 -1
  71. package/dist/{nylas-scheduler-editor.entry-6f76d0d5.cjs → nylas-scheduler-editor.entry-cc6f4060.cjs} +2 -2
  72. package/dist/{nylas-scheduler-editor.entry-e731ca4a.js → nylas-scheduler-editor.entry-dcfdd6bf.js} +3 -3
  73. package/dist/{nylas-scheduling.entry-86b18d85.js → nylas-scheduling.entry-2b842e93.js} +41 -40
  74. package/dist/nylas-scheduling.entry-e0e9c8e8.cjs +1 -0
  75. package/dist/{nylas-time-window-picker.entry-393e855b.js → nylas-time-window-picker.entry-96f5fe9a.js} +1 -1
  76. package/dist/{nylas-time-window-picker.entry-f9687046.cjs → nylas-time-window-picker.entry-a8780f2e.cjs} +1 -1
  77. package/dist/{person-icon.entry-1b5dcd2e.cjs → person-icon.entry-2f8e00fd.cjs} +1 -1
  78. package/dist/{person-icon.entry-b5ccb1f4.js → person-icon.entry-3ec67feb.js} +1 -1
  79. package/dist/{play-icon.entry-3f2e7e31.cjs → play-icon.entry-1abf79e9.cjs} +1 -1
  80. package/dist/{play-icon.entry-5e51d961.js → play-icon.entry-a840bdca.js} +1 -1
  81. package/dist/react.cjs +1 -1
  82. package/dist/react.js +1 -1
  83. package/dist/{refresh-icon.entry-9beaa8e1.js → refresh-icon.entry-11fcb673.js} +1 -1
  84. package/dist/{refresh-icon.entry-3d241ffd.cjs → refresh-icon.entry-af7f54b4.cjs} +1 -1
  85. package/dist/{register-component-3444af44-94783766.js → register-component-75f530bc-0e4e3d7a.js} +1 -1
  86. package/dist/{register-component-3444af44-890ac950.cjs → register-component-75f530bc-61b6f2dd.cjs} +1 -1
  87. package/dist/{reply-all-icon.entry-6b55d3b3.js → reply-all-icon.entry-5c8b3356.js} +1 -1
  88. package/dist/{reply-all-icon.entry-a0fcbf30.cjs → reply-all-icon.entry-cc2ad940.cjs} +1 -1
  89. package/dist/{reply-icon.entry-c7d0d967.cjs → reply-icon.entry-840acade.cjs} +1 -1
  90. package/dist/{reply-icon.entry-c709b46f.js → reply-icon.entry-d048736f.js} +1 -1
  91. package/dist/{scheduler-config-store-ed4a8dfd-ba68cc09.cjs → scheduler-config-store-ed4a8dfd-161a3efd.cjs} +1 -1
  92. package/dist/{scheduler-config-store-ed4a8dfd-13c1c187.js → scheduler-config-store-ed4a8dfd-f74e58ae.js} +1 -1
  93. package/dist/{scheduler-store-ecd15be2-d2ef4ac2.js → scheduler-store-d84b82a0-11faba86.js} +2 -2
  94. package/dist/{scheduler-store-ecd15be2-8f7d171f.cjs → scheduler-store-d84b82a0-7a7fe186.cjs} +1 -1
  95. package/dist/{sent-icon.entry-9083bca9.cjs → sent-icon.entry-987760ce.cjs} +1 -1
  96. package/dist/{sent-icon.entry-b65083f4.js → sent-icon.entry-fd3b9ad9.js} +1 -1
  97. package/dist/{spam-icon.entry-e6c1a82a.cjs → spam-icon.entry-3ce4f9fc.cjs} +1 -1
  98. package/dist/{spam-icon.entry-120eca46.js → spam-icon.entry-4665415c.js} +1 -1
  99. package/dist/{star-icon.entry-e3563c0b.js → star-icon.entry-0f446ac7.js} +1 -1
  100. package/dist/{star-icon.entry-efbc2679.cjs → star-icon.entry-a3ba4703.cjs} +1 -1
  101. package/dist/{stop-icon.entry-ab5cf663.js → stop-icon.entry-72c964b2.js} +1 -1
  102. package/dist/{stop-icon.entry-8d07d719.cjs → stop-icon.entry-9c13e00a.cjs} +1 -1
  103. package/dist/{textarea-component.entry-a0ef9f03.js → textarea-component.entry-d414e219.js} +1 -1
  104. package/dist/{textarea-component.entry-93be4a65.cjs → textarea-component.entry-ff04b5fa.cjs} +1 -1
  105. package/dist/{time-period-selector.entry-16f96af9.cjs → time-period-selector.entry-2ce3347a.cjs} +1 -1
  106. package/dist/{time-period-selector.entry-2a86f48f.js → time-period-selector.entry-53edc0ba.js} +1 -1
  107. package/dist/{translate-icon.entry-d632b37b.js → translate-icon.entry-84a78b9a.js} +1 -1
  108. package/dist/{translate-icon.entry-868948d3.cjs → translate-icon.entry-9bab13ad.cjs} +1 -1
  109. package/dist/{trash-fill-icon.entry-eeab235e.js → trash-fill-icon.entry-2881a44c.js} +1 -1
  110. package/dist/{trash-fill-icon.entry-88dfffbc.cjs → trash-fill-icon.entry-84f52290.cjs} +1 -1
  111. package/dist/{underline-icon.entry-65e42dcf.js → underline-icon.entry-23eca319.js} +1 -1
  112. package/dist/{underline-icon.entry-35430c19.cjs → underline-icon.entry-5a8410ef.cjs} +1 -1
  113. package/dist/{warning-icon.entry-e7714a43.cjs → warning-icon.entry-1966042d.cjs} +1 -1
  114. package/dist/{warning-icon.entry-bab6d190.js → warning-icon.entry-abf9e5dc.js} +1 -1
  115. package/package.json +3 -3
  116. package/dist/add-circle-icon_2.entry-52cc3933.cjs +0 -1
  117. package/dist/add-circle-icon_2.entry-5ea903bf.js +0 -25
  118. package/dist/nylas-scheduling.entry-c8ee9a2a.cjs +0 -1
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-92ba1b80.cjs"),D=require("./index.es-28b1b2ec-595c0513.cjs"),B=require("./scheduler-store-d84b82a0-7a7fe186.cjs"),N=require("./constants-35df11e7-d87ad6d9.cjs"),E=require("./feedbackSync-adc893c2-70d06afc.cjs");require("react");require("react-dom");class W{constructor({schedulerAPIURL:t,nylasSchedulerStore:i,sessionId:a,configId:o,slug:r,clientId:d}){if(!t)throw new Error("schedulerAPIURL is required");if(!i)throw new Error("nylasSchedulerStore is required");if(!a&&!o&&!(r||d))throw new Error("sessionId is required for private configs. If using public config either pass a configurationId or a combination of slug and clientId.");t==="/"&&(t=new URL(window.location.href).origin),this.configId=o,this.sessionId=a,this.schedulerAPIURL=t,this.nylasSchedulerStore=i,this.slug=r,this.clientId=d}init(){e.debug("NylasConnector init")}get schedulerStore(){return this.nylasSchedulerStore}get scheduler(){return this._schedulerAPIConnector?this._schedulerAPIConnector:(this._schedulerAPIConnector=new B.NylaSchedulerAPIConnector({schedulerAPIURL:this.schedulerAPIURL,schedulerStore:this.schedulerStore,sessionId:this.sessionId,configId:this.configId,slug:this.slug,clientId:this.clientId}),this._schedulerAPIConnector)}resetStores(){this.nylasSchedulerStore.reset()}}const I=(n,t)=>{const i=n.isLoading,a=n.showNotification,o=n.nylasBranding;return e.h(e.Fragment,null,a&&e.h("nylas-notification",null),i&&e.h("div",{class:"loading"},e.h("div",{class:"left"},e.h("div",{class:"skeleton"})),e.h("div",{class:"right"},e.h("div",{class:"skeleton"}),e.h("div",{class:"skeleton"}),e.h("div",{class:"skeleton"}),e.h("div",{class:"skeleton"}),e.h("div",{class:"skeleton"}))),!i&&t,e.h("div",{class:"footer"},o&&e.h("a",{href:"https://scheduler.nylas.com?utm_source=powered-by-nylas-logoutm_medium=link&utm_campaign=get-scheduler&utm_id=get-scheduler",class:"powered-by-nylas",target:"_blank",rel:"noreferrer noopener"},"Powered by ",e.h("span",{class:"sr-only"},"Nylas"),e.h("nylas-logo",{"aria-hidden":!0}))))},M=(n,t)=>e.h("div",{class:"message-banner"},t),$=':host{display:flex;flex-direction:column;overflow:visible;border-radius:var(--nylas-border-radius-2x);width:fit-content;background:var(--nylas-base-0);position:relative;box-shadow:0px 4px 8px 2px rgba(0, 0, 0, 0.05), 0px 8px 16px -2px rgba(0, 0, 0, 0.1);--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;font-family:var(--nylas-font-family);font-optical-sizing:auto;font-style:normal;font-variation-settings:"slnt" 0}@media screen and (max-width: 768px){:host{width:auto;min-width:325px}}:root{font-family:inherit}.error{padding:8rem 12rem;color:var(--nylas-base-0);background-color:var(--nylas-error);margin:1.5rem;border-radius:var(--nylas-border-radius-2x)}.message-banner{text-align:right;color:var(--nylas-base-800);padding:1rem;border-bottom:1px solid var(--nylas-color-primary-200);margin:0}.loading{margin:1.5rem;display:flex;gap:1rem}.loading .skeleton{border-radius:var(--nylas-border-radius-2x);animation:pulsate 1.5s infinite}.loading .skeleton:nth-child(2){animation-delay:-100ms}.loading .skeleton:nth-child(3){animation-delay:-200ms}.loading .skeleton:nth-child(4){animation-delay:-300ms}.loading .skeleton:nth-child(5){animation-delay:-400ms}.loading .left .skeleton{height:100%;width:400px}.loading .right .skeleton{height:5rem;width:300px;margin-bottom:1rem}.loading .right .skeleton:last-child{margin-bottom:0}@keyframes pulsate{0%{background-color:var(--nylas-base-50)}50%{background-color:var(--nylas-base-100)}100%{background-color:var(--nylas-base-50)}}.select-date-page,.additional-data-page,.booked-event-page,.manual-confirmation-page,.cancelled-event-page,.cancel-flow-page{border-top-left-radius:var(--nylas-border-radius-2x);border-top-right-radius:var(--nylas-border-radius-2x)}.select-date-page,.additional-data-page{display:flex}@media screen and (max-width: 768px){.select-date-page,.additional-data-page{flex-direction:column}}.booked-event-page,.manual-confirmation-page{background-color:var(--nylas-base-50)}.cancelled-event-page,.manual-confirmation-page,.cancel-flow-page{padding:1rem;height:496px;display:flex;justify-content:center;align-items:center}.booked-event-page,.manual-confirmation-page,.cancelled-event-page,.cancel-flow-page{min-width:784px;background:var(--nylas-base-50)}@media screen and (max-width: 768px){.booked-event-page,.manual-confirmation-page,.cancelled-event-page,.cancel-flow-page{min-width:90%}}.left-panel{display:flex;flex-direction:column;min-width:424px;border-top-left-radius:inherit;background:var(--nylas-base-0);position:relative;padding:1rem 0 0 0;height:624px}@media screen and (max-width: 768px){.left-panel{border-top-right-radius:inherit;min-width:unset;height:auto}}@media screen and (max-width: 768px){.select-date-page .left-panel{padding:0.5rem 4px 0;height:624px}}.border{margin-left:-20px;margin-right:-20px;border-top-width:1px;height:0.5px;background-color:var(--nylas-base-200)}@media screen and (max-width: 768px){.border{display:none}}.right-panel{min-width:360px;width:360px;background-color:var(--nylas-base-50);height:624px;padding-top:16px;border-left:1px solid var(--nylas-base-200);border-top-right-radius:inherit}.right-panel.reschedule{border-top-right-radius:0px}@media screen and (max-width: 768px){.right-panel{border-top-right-radius:0px;width:inherit;min-width:unset;height:auto}}.right-panel h2{display:flex;margin:0;height:48px;gap:0.5rem;justify-content:center;align-items:center;width:auto;font-size:1.125rem;line-height:1.5rem;font-weight:500;text-align:center;color:var(--nylas-base-800)}.additional-data-page .left-panel{background-color:var(--nylas-base-50)}.additional-data-page .right-panel{background-color:var(--nylas-base-0)}nylas-selected-event-card{height:604px;padding:0 1rem}@media screen and (max-width: 768px){nylas-selected-event-card{height:250px}}.footer{display:flex;justify-content:flex-end;align-items:center;padding:16px;font-size:14px;font-weight:300;color:var(--nylas-base-500);border-top:1px solid var(--nylas-base-200);min-height:24px}.footer .powered-by-nylas{display:flex;align-items:center;text-decoration:none;color:var(--nylas-base-500)}.footer .powered-by-nylas:hover{color:var(--nylas-base-800)}.footer svg{fill:var(--nylas-base-500)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}.footer svg{margin-top:1px}nylas-selected-event-card::part(nsec__timezone){position:absolute;bottom:0}nylas-notification{margin:1.5rem;width:-webkit-fill-available;width:-moz-available;position:absolute}nylas-locale-switch{position:absolute;padding:18px 20px;bottom:0;width:-webkit-fill-available;width:-moz-available;border-top:1px solid var(--nylas-base-200)}@media screen and (max-width: 768px){nylas-locale-switch{height:auto}}nylas-date-picker{padding:0 20px}button-component#report-issue{width:auto;position:absolute;bottom:4px;left:16px}nylas-feedback-form{position:absolute;top:0;height:100%;width:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;background:rgba(0, 0, 0, 0.6);z-index:2;border-radius:inherit}',G=$,j={title:e.instance.t("genericErrorTitle"),type:D.nr.Error,category:B.ErrorCategory.Component},H=class{constructor(n){e.registerInstance(this,n),this.init=e.createEvent(this,"init",7),this.schedulerWillLoad=e.createEvent(this,"schedulerWillLoad",7),this.schedulerDidLoad=e.createEvent(this,"schedulerDidLoad",7),this.nylasSchedulerError=e.createEvent(this,"nylasSchedulerError",7),this.configSettingsLoaded=e.createEvent(this,"configSettingsLoaded",7),this.bookingRefExtracted=e.createEvent(this,"bookingRefExtracted",7),this.bookedEventInfo=e.createEvent(this,"bookedEventInfo",7),this.mode="app",this.defaultSchedulerState=void 0,this.sessionId=void 0,this.schedulerApiUrl="https://api.us.nylas.com",this.bookingInfo=void 0,this.rescheduleBookingRef=void 0,this.cancelBookingRef=void 0,this.organizerConfirmationBookingRef=void 0,this.configurationId=void 0,this.slug=void 0,this.clientId=void 0,this.nylasBranding=!0,this.eventOverrides={},this.isLoading=void 0,this.themeConfig=void 0,this.localization=void 0,this.showNotification=!0,this.enableUserFeedback=!0,this.automaticComponentRegistration=!0,this.selectedDateLabel=new Date().toLocaleDateString(void 0,{dateStyle:"full"})||`${e.instance.t("noDateSelected")}`,this.refConfigId=void 0,this.language=navigator.language,this.showFeedbackModal=!1,this.bookingInfoConfirmed=null}connectedCallback(){e.debug("[nylas-scheduler] connectedCallback")}async componentWillLoad(){var o,r;e.debug("[nylas-scheduler] Component will load"),this.enableUserFeedback&&!E.isInitialized()&&E.init({dsn:"https://9d5731f1c77ca84c9ed3fb9b3ccf7ee1@o74852.ingest.us.sentry.io/4507889638178816",release:"1.3.0",integrations:d=>[...d.filter(s=>!1),E.feedbackSyncIntegration({colorScheme:"system",autoInject:!1})],autoSessionTracking:!1,beforeSend:()=>null});const n=this.schedulerWillLoad.emit(this.host);if("schedulerWillLoad"in this.eventOverrides&&(await this.eventOverrides.schedulerWillLoad(n,this.nylasSchedulerConnector),n.defaultPrevented))return;this.stores={scheduler:B.CreateNylasSchedulerStore({bookingInfo:this.bookingInfo,nylasBranding:this.nylasBranding,themeConfig:this.themeConfig,...this.defaultSchedulerState})},this.baseProvider=new D.NylasBaseProvider(this.host,this.stores,this.automaticComponentRegistration,this.eventOverrides),this.refConfigId=this.configurationId;let t;if(this.rescheduleBookingRef){const[d,s,c]=e.compactStringToUUIDs(this.rescheduleBookingRef);this.refConfigId=d,this.stores.scheduler.set("rescheduleBookingId",s),t=this.bookingRefExtracted.emit({configurationId:d,bookingId:s})}else if(this.cancelBookingRef){const[d,s,c]=e.compactStringToUUIDs(this.cancelBookingRef);this.refConfigId=d,this.stores.scheduler.set("cancelBookingId",s),t=this.bookingRefExtracted.emit({configurationId:d,bookingId:s})}else if(this.organizerConfirmationBookingRef){const[d,s,c]=e.compactStringToUUIDs(this.organizerConfirmationBookingRef);this.refConfigId=d,this.stores.scheduler.set("organizerConfirmationBookingId",s),this.stores.scheduler.set("organizerConfirmationSalt",c),t=this.bookingRefExtracted.emit({configurationId:d,bookingId:s,salt:c})}if("bookingRefExtracted"in this.eventOverrides&&(await this.eventOverrides.bookingRefExtracted(t,this.nylasSchedulerConnector),t.defaultPrevented)||!this.checkIfSessionIdOrConfigIdExists())return;const i=(o=this.baseProvider)==null?void 0:o.getStore("scheduler");this.nylasSchedulerConnector=new W({schedulerAPIURL:this.schedulerApiUrl,sessionId:this.sessionId,configId:this.refConfigId,slug:this.slug,clientId:this.clientId,nylasSchedulerStore:i});const a=this.init.emit(this.host);"init"in this.eventOverrides&&(await this.eventOverrides.init(a,this.nylasSchedulerConnector),a.defaultPrevented)||((r=this.baseProvider)==null||r.componentWillLoad(this.nylasSchedulerConnector),this.applyThemeConfig(this.themeConfig))}async componentDidLoad(){var c,b,m,g,h,f,p,C;(c=this.baseProvider)==null||c.componentDidLoad();const n=this.schedulerDidLoad.emit(this.host);if("schedulerDidLoad"in this.eventOverrides&&(await this.eventOverrides.schedulerDidLoad(n,this.nylasSchedulerConnector),n.defaultPrevented)||!this.checkIfSessionIdOrConfigIdExists())return;this.localizationChanged(this.localization);const t=await((b=this.nylasSchedulerConnector)==null?void 0:b.scheduler.getUISettings());if(!t||"error"in t){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(t==null?void 0:t.error)},host:this.host});return}else{"data"in t&&((m=t.data)!=null&&m.appearance)&&console.info("Appearance settings have been returned from the configuration used byt his scheduling page; please remember to grab them from the configSettingsLoaded event and apply them as desired.");const u=this.configSettingsLoaded.emit({settings:t});if("configSettingsLoaded"in this.eventOverrides&&(await this.eventOverrides.configSettingsLoaded(u,this.nylasSchedulerConnector),u.defaultPrevented))return}const i=(g=this.baseProvider)==null?void 0:g.getStore("scheduler"),a=(f=(h=i==null?void 0:i.get("configSettings"))==null?void 0:h.scheduler)==null?void 0:f.available_days_in_future,o=i==null?void 0:i.get("selectedTimeslot");if(o&&(o!=null&&o.start_time)){if(!this.isTimeslotValid(o))return;if(i!=null&&i.get("showBookingForm")){i==null||i.set("selectedDate",o.start_time);return}}const r=i==null?void 0:i.get("selectedDate"),d=i==null?void 0:i.get("availability");let s;if(!(d&&d.length>0)){if(r){const{startTime:u,endTime:v,endTimeForAvailableDaysInFuture:k}=this.validateAvailableDaysInFuture(r,a||30);r.getTime()<k*1e3&&(s=await((C=this.nylasSchedulerConnector)==null?void 0:C.scheduler.getAvailability(u,v)))}else{const u=new Date,{startTime:v,endTime:k,endTimeForAvailableDaysInFuture:T}=this.validateAvailableDaysInFuture(u,a||30);u.getTime()<T*1e3&&(s=await((p=this.nylasSchedulerConnector)==null?void 0:p.scheduler.getAvailability(v,k)))}if((!s||"error"in s)&&this.nylasSchedulerError.emit({notification:{...this.getErrorObject(s==null?void 0:s.error)},host:this.host}),!r){let u=new Date;const v=i==null?void 0:i.get("availability").find(k=>new Date(k.start_time)>new Date);v&&(u=v.start_time),i==null||i.set("selectedDate",u)}}}componentDisconnected(){var n;(n=this.baseProvider)==null||n.componentDisconnected()}bookingInfoChanged(n){var t;(t=this.stores)==null||t.scheduler.set("bookingInfo",n)}rescheduleBookingRefChanged(n){var t,i;if(n){const[a,o]=e.compactStringToUUIDs(n);(t=this.stores)==null||t.scheduler.set("rescheduleBookingId",o),this.refConfigId=a,(i=this.nylasSchedulerConnector)==null||i.scheduler.setConfigId(a)}}cancelBookingRefChanged(n){var t,i;if(n){const[a,o]=e.compactStringToUUIDs(n);(t=this.stores)==null||t.scheduler.set("cancelBookingId",o),this.refConfigId=a,(i=this.nylasSchedulerConnector)==null||i.scheduler.setConfigId(a)}}organizerConfirmationBookingRefChanged(n){var t,i;if(n){const[a,o]=e.compactStringToUUIDs(n);(t=this.stores)==null||t.scheduler.set("organizerConfirmationBookingId",o),this.refConfigId=a,(i=this.nylasSchedulerConnector)==null||i.scheduler.setConfigId(a)}}localizationChanged(n){n&&Object.keys(n).forEach(t=>{t in N.LANGUAGE_CODE&&(e.instance.addResourceBundle(t,"translation",n[t],!1,!0),this.language=this.language)})}themeConfigChanged(n){var t,i;(i=(t=this.baseProvider)==null?void 0:t.getStore("scheduler"))==null||i.set("themeConfig",n),this.applyThemeConfig(n)}languageChanged(n){const t=n.detail;this.language=t,e.instance.changeLanguage(t)}async registerComponentHandler(n){var t;(t=this.baseProvider)==null||t.registerComponent(n.detail)}async unregisterComponentHandler(n){var t;(t=this.baseProvider)==null||t.unregisterComponent(n.detail)}async monthChangedHandler(n){var d,s,c,b,m,g,h;const t=n.detail,i=(b=(c=(s=(d=this.nylasSchedulerConnector)==null?void 0:d.schedulerStore)==null?void 0:s.get("configSettings"))==null?void 0:c.scheduler)==null?void 0:b.available_days_in_future,{startTime:a,endTime:o,endTimeForAvailableDaysInFuture:r}=this.validateAvailableDaysInFuture(t,i||30);if(a<r&&t.getTime()<r*1e3){const f=await((m=this.nylasSchedulerConnector)==null?void 0:m.scheduler.getAvailability(a,o));(!f||"error"in f)&&this.nylasSchedulerError.emit({notification:{...this.getErrorObject(f==null?void 0:f.error)},host:this.host});const p=(g=this.stores)==null?void 0:g.scheduler.get("selectableDates");p&&p.length>0&&((h=this.stores)==null||h.scheduler.set("selectedDate",p[0]))}}mapToBookingData(n){var d,s,c;const t=(d=this.stores)==null?void 0:d.scheduler.get("selectedTimeslot"),i=(s=this.stores)==null?void 0:s.scheduler.get("selectedLanguage"),a=(c=this.stores)==null?void 0:c.scheduler.get("selectedTimezone"),o=t!=null&&t.start_time?new Date(t==null?void 0:t.start_time).getTime()/1e3:"",r=t!=null&&t.end_time?new Date(t==null?void 0:t.end_time).getTime()/1e3:"";return{additional_guests:n.guests,guest:{...n.primaryParticipant},additional_fields:{...n.additionalFields},start_time:o,end_time:r,email_language:i,timezone:a}}async bookButtonClickedHandler(n){var c,b,m,g;if(n.defaultPrevented)return;const t=n.detail,i=this.mapToBookingData(t);this.bookingInfoConfirmed=t;const o=(b=(c=this.nylasSchedulerConnector)==null?void 0:c.schedulerStore)==null?void 0:b.get("rescheduleBookingId");if(o){const h=await((m=this.nylasSchedulerConnector)==null?void 0:m.scheduler.rescheduleBooking(o,t));(!h||"error"in h)&&this.nylasSchedulerError.emit({notification:{...this.getErrorObject(h==null?void 0:h.error)},host:this.host});const f=h==null?void 0:h.data,p=this.bookedEventInfo.emit({...h,data:{...f,...i}});"bookedEventInfo"in this.eventOverrides&&await this.eventOverrides.bookedEventInfo(p,this.nylasSchedulerConnector);return}const r=await((g=this.nylasSchedulerConnector)==null?void 0:g.scheduler.bookTimeslot(t));(!r||"error"in r)&&this.nylasSchedulerError.emit({notification:{...this.getErrorObject(r==null?void 0:r.error)},host:this.host});const d=r==null?void 0:r.data,s=this.bookedEventInfo.emit({...r,data:{...d,...i}});"bookedEventInfo"in this.eventOverrides&&await this.eventOverrides.bookedEventInfo(s,this.nylasSchedulerConnector)}dateSelectedHandler(n){const t=n.detail;this.selectedDateLabel=t?t.toLocaleDateString(void 0,{dateStyle:"full"}):`${e.instance.t("noDateSelected")}`}cancelBookedEventErrorHandler(n){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(n.detail.error)},host:this.host})}cancelBookedEventValidationErrorHandler(n){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(n.detail.error)},host:this.host})}rescheduleBookedEventErrorHandler(n){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(n.detail.error)},host:this.host})}confirmBookingErrorHandler(n){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(n.detail.error)},host:this.host})}feedbackModalClosedHandler(){this.showFeedbackModal=!1}feedbackSubmittedHandler(n){const i={eventId:E.captureMessage("Scheduling Page User Feedback"),message:n.detail.feedback};E.captureFeedback(i,{includeReplay:!0,captureContext:{tags:{"nylas-web-element":"nylas-schduling","nylas-web-element-version":"1.3.0"},extra:{configId:this.configurationId,slug:this.slug}}}),this.showFeedbackModal=!1}async getNylasSchedulerStore(){var n;return(n=this.baseProvider)==null?void 0:n.getStore("scheduler")}async getNylasSchedulerConnector(){return this.nylasSchedulerConnector}async getRef(){return this.host}getErrorObject(n){return{title:(n==null?void 0:n.title)||j.title,category:(n==null?void 0:n.category)||j.category,type:D.nr.Error,description:(n==null?void 0:n.message)||"",id:new Date().getTime().toString(),ttl:"none"}}checkIfSessionIdOrConfigIdExists(){if(!this.sessionId&&!this.refConfigId&&!(this.slug&&this.clientId)){let n="";return this.sessionId||(n+=e.instance.t("sessionIdRequiredErrorMessage")),!this.sessionId&&!this.refConfigId&&!(this.slug&&this.clientId)&&(n=e.instance.t("sessionIdRequiredErrorMessage")+" "+e.instance.t("publicConfigErrorMessage")),this.nylasSchedulerError.emit({notification:{title:e.instance.t("schedulingComponentErrorTitle"),category:B.ErrorCategory.Component,type:D.nr.Error,description:n,id:new Date().getTime().toString(),ttl:"none"},host:this.host}),!1}return!0}isTimeslotValid(n){return new Date(n.start_time)<new Date?(this.nylasSchedulerError.emit({notification:{title:e.instance.t("invalidTimeslotErrorTitle"),category:B.ErrorCategory.Component,type:D.nr.Error,description:e.instance.t("invalidTimeslotErrorMessage"),id:new Date().getTime().toString(),ttl:"none"},host:this.host}),!1):!0}validateAvailableDaysInFuture(n,t){const i=new Date,a=new Date(n.getFullYear(),n.getMonth(),1).getTime()/1e3,o=new Date(n.getFullYear(),n.getMonth()+1,1).getTime()/1e3,r=Math.floor(e.addDaysToCurrentDate(i,t).getTime()/1e3),d=Math.min(r,o);return{startTime:a<i.getTime()/1e3?Math.floor(i.getTime()/1e3):a,endTime:d,endTimeForAvailableDaysInFuture:r}}applyThemeConfig(n){if(n)for(const[t,i]of Object.entries(n))this.host.style.setProperty(`${t}`,i)}onFeedbackClick(n){n.preventDefault(),this.showFeedbackModal=!0}redirectToCustomUrl(n){window.location.assign(n)}render(){var p,C,u,v,k,T,S,z,O,R;const n=this.mode==="app",t=(p=this.baseProvider)==null?void 0:p.getStore("scheduler"),i=t==null?void 0:t.get("eventInfo"),a=t==null?void 0:t.get("showBookingForm"),o=t==null?void 0:t.get("cancelledEventInfo"),r=t==null?void 0:t.get("cancelBookingId"),d=t==null?void 0:t.get("selectedTimeslot"),s=t==null?void 0:t.get("rescheduleBookingId"),c=t==null?void 0:t.get("organizerConfirmationBookingId"),b=t==null?void 0:t.get("rejectBookingId"),m=t==null?void 0:t.get("confirmedEventInfo"),g=(t==null?void 0:t.get("nylasBranding"))||this.nylasBranding,h=t==null?void 0:t.get("selectedDate"),f=(u=(C=t==null?void 0:t.get("configSettings"))==null?void 0:C.scheduler)==null?void 0:u.confirmation_redirect_url;if(this.selectedDateLabel=h&&this.language?e.capitalizeFirstLetter(h.toLocaleDateString(N.LANGUAGE_CODE_MAP[this.language],{dateStyle:"full"})):`${e.instance.t("noDateSelected")}`,n&&(r||b)&&!o)return e.h(e.Host,null,e.h(I,{nylasBranding:g,isLoading:this.isLoading,showNotification:this.showNotification},e.h("div",{class:"cancel-flow-page",part:"cancel-flow-page"},e.h("nylas-cancel-booking-form",{selectedTimeslot:d,cancelBookingId:r,rejectBookingId:b,exportparts:"ncbf, ncbf__icon, ncbf__title, ncbf__description, ncbf__reason-textarea, ncbf__button-cta, ncbf__button-outline, ncbf__card"}))),this.enableUserFeedback&&e.h("button-component",{id:"report-issue",variant:"basic",onClick:l=>this.onFeedbackClick(l)},e.h("feedback-icon",null)),this.showFeedbackModal&&e.h("nylas-feedback-form",null));if(n&&c)return e.h(e.Host,null,e.h(I,null,e.h("div",{class:"manual-confirmation-page",part:"manual-confirmation-page"},e.h("nylas-organizer-confirmation-card",{organizerConfirmationBookingId:c,exportparts:"nmcc, nmcc__title, nmcc__description, nmcc__button-cta, nmcc__button-outline"}))),this.enableUserFeedback&&e.h("button-component",{id:"report-issue",variant:"basic",onClick:l=>this.onFeedbackClick(l)},e.h("feedback-icon",null)),this.showFeedbackModal&&e.h("nylas-feedback-form",null));if(n&&o)return e.h(e.Host,null,e.h(I,{nylasBranding:g,isLoading:this.isLoading,showNotification:this.showNotification},e.h("div",{class:"cancelled-event-page",part:"cancelled-event-page"},e.h("nylas-cancelled-event-card",{cancelledEventInfo:o,exportparts:"ncec, ncec__icon, ncec__title, ncec__description, ncec__button-outline, ncec__card"}))),this.enableUserFeedback&&e.h("button-component",{id:"report-issue",variant:"basic",onClick:l=>this.onFeedbackClick(l)},e.h("feedback-icon",null)),this.showFeedbackModal&&e.h("nylas-feedback-form",null));if(n&&m)return e.h(e.Host,null,e.h(I,{nylasBranding:g,isLoading:this.isLoading,showNotification:this.showNotification},e.h("div",{class:"cancelled-event-page",part:"confirmed-event-page"},e.h("nylas-confirmed-event-card",{confirmedEventInfo:m,exportparts:"ncec, ncec__icon, ncec__title, ncec__description, ncec__button-outline, ncec__card"}))),this.enableUserFeedback&&e.h("button-component",{id:"report-issue",variant:"basic",onClick:l=>this.onFeedbackClick(l)},e.h("feedback-icon",null)),this.showFeedbackModal&&e.h("nylas-feedback-form",null));if(n&&i&&f){const l=(v=this.bookingInfoConfirmed)==null?void 0:v.primaryParticipant,w=((k=this.bookingInfoConfirmed)==null?void 0:k.additionalFields)||{};if(this.bookingInfo&&typeof((T=this.bookingInfo)==null?void 0:T.additionalFields)<"u"){const x=this.bookingInfo.additionalFields;Object.keys(x).forEach(L=>{!w[L]&&(x!=null&&x[L])&&(w[L]=x[L].value)})}const _=(S=this.stores)==null?void 0:S.scheduler.get("selectedTimeslot"),P=(z=this.stores)==null?void 0:z.scheduler.get("selectedTimezone"),U=(O=this.stores)==null?void 0:O.scheduler.get("selectedLanguage"),F=(R=this.stores)==null?void 0:R.scheduler.get("configSettings"),A=this.configurationId?this.configurationId:F==null?void 0:F.configuration_id,q=window.location.search,y=new URLSearchParams(q);y.set("booking_id",i.booking_id),l!=null&&l.name&&y.set("name",l.name),l!=null&&l.email&&y.set("email",l.email),_!=null&&_.start_time&&y.set("start_time",(new Date(_.start_time).getTime()/1e3).toString()),_!=null&&_.end_time&&y.set("end_time",(new Date(_.end_time).getTime()/1e3).toString()),P&&y.set("tz",P),U&&y.set("language",U),w&&y.set("additional_values",JSON.stringify(w)),this.slug&&y.set("page_slug",this.slug),A&&y.set("config_id",A),this.redirectToCustomUrl(`${f}?${y.toString()}`);return}if(n&&i)return e.h(e.Host,null,e.h(I,{nylasBranding:g,isLoading:this.isLoading,showNotification:this.showNotification},e.h("div",{class:"booked-event-page",part:"booked-event-page"},e.h("nylas-booked-event-card",{selectedTimeslot:d,eventInfo:i,exportparts:"nbec, nbec__title, nbec__card, nbec__description, nbec__button-outline, nbec__cancel-cta, nbec__reschedule-cta"}))),this.enableUserFeedback&&e.h("button-component",{id:"report-issue",variant:"basic",onClick:l=>this.onFeedbackClick(l)},e.h("feedback-icon",null)),this.showFeedbackModal&&e.h("nylas-feedback-form",null));if(n&&(!i||s)&&!a){const l=this.host.querySelector('[slot="timeslot-picker-cta-label"]');return e.h(e.Host,null,e.h(I,{nylasBranding:g,isLoading:this.isLoading,showNotification:this.showNotification},s&&e.h(M,null,`${e.instance.t("rescheduleTitle")}`),e.h("div",{class:"select-date-page",part:"select-date-page"},e.h("div",{class:"left-panel"},e.h("nylas-date-picker",{exportparts:"ndp, ndp__title, ndp__month-header, ndp__month-button, ndp__day, ndp__date, ndp__date--disabled, ndp__date--selected, ndp__date--current-day, ndp__date--current-month"}),e.h("nylas-locale-switch",{exportparts:"nls, nls__timezone, nls__timezone-dropdown, nls__timezone-drop-button, nls__timezone-drop-button-selected-label, nls__timezone-drop-content, nls__timezone-drop-label, nls__language, nls__language-dropdown, nls__language-drop-button, nls__language-drop-content, nls__language-drop-label"})),e.h("div",{class:`right-panel ${s?"reschedule":""}`},e.h("h2",null,e.h("calendar-icon",null),e.h("span",{id:"selectedDate"},this.selectedDateLabel)),e.h("nylas-timeslot-picker",{exportparts:"ntp, ntp__timeslot, ntp__timeslot--selected, ntp__button-primary"},l&&e.h("span",{slot:"timeslot-picker-cta-label"},e.h("slot",{name:"timeslot-picker-cta-label"})))))),this.enableUserFeedback&&e.h("button-component",{id:"report-issue",variant:"basic",onClick:w=>this.onFeedbackClick(w)},e.h("feedback-icon",null)),this.showFeedbackModal&&e.h("nylas-feedback-form",null))}return n&&!i&&a?e.h(e.Host,null,e.h(I,{nylasBranding:g,isLoading:this.isLoading,showNotification:this.showNotification},s&&e.h(M,null,`${e.instance.t("rescheduleTitle")}`),e.h("div",{class:"additional-data-page",part:"additional-data-page"},e.h("div",{class:"left-panel"},e.h("div",{class:"wrapper"},e.h("nylas-selected-event-card",{exportparts:"nsec, nsec__card, nsec__icon, nsec__date, nsec__time, nsec__timezone"}))),e.h("div",{class:`right-panel ${s?"reschedule":""}`},e.h("nylas-booking-form",{exportparts:"nbf, nbf__input-textfield, nbf__button-ghost, nbf__button-outline, nbf__button-primary, nbf__input-wrapper, nbf__checkbox-component, nbf__radio-button-group, nbf__textarea-component, nbf__dropdown, nbf__dropdown-button, nbf__dropdown-content"})))),this.enableUserFeedback&&e.h("button-component",{id:"report-issue",variant:"basic",onClick:l=>this.onFeedbackClick(l)},e.h("feedback-icon",null)),this.showFeedbackModal&&e.h("nylas-feedback-form",null)):e.h(e.Host,null,e.h("slot",null))}get host(){return e.getElement(this)}static get watchers(){return{bookingInfo:["bookingInfoChanged"],rescheduleBookingRef:["rescheduleBookingRefChanged"],cancelBookingRef:["cancelBookingRefChanged"],organizerConfirmationBookingRef:["organizerConfirmationBookingRefChanged"],localization:["localizationChanged"],themeConfig:["themeConfigChanged"]}}};H.style=G;exports.nylas_scheduling=H;
@@ -1,4 +1,4 @@
1
- import { b as ae, Q as C, r as oe, c as X, R as U, S as V, T as G, U as Q, h as k, H as he, g as me } from "./index-9dc1bd32.js";
1
+ import { b as ae, Q as C, r as oe, c as X, R as U, S as V, T as G, U as Q, h as k, H as he, g as me } from "./index-72501df0.js";
2
2
  import "react";
3
3
  import "react-dom";
4
4
  var q = { exports: {} };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-bec58f1d.cjs");require("react");require("react-dom");var _={exports:{}};(function(e,t){(function(n,i){e.exports=i()})(r.commonjsGlobal,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},i=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,a=/\d\d/,h=/\d\d?/,x=/\d*[^-_:/,()\s\d]+/,b={},Z=function(s){return(s=+s)+(s>68?1900:2e3)},d=function(s){return function(o){this[s]=+o}},B=[/[+-]\d\d:?(\d\d)?|Z/,function(s){(this.zone||(this.zone={})).offset=function(o){if(!o||o==="Z")return 0;var m=o.match(/([+-]|\d\d)/g),l=60*m[1]+(+m[2]||0);return l===0?0:m[0]==="+"?-l:l}(s)}],F=function(s){var o=b[s];return o&&(o.indexOf?o:o.s.concat(o.f))},V=function(s,o){var m,l=b.meridiem;if(l){for(var p=1;p<=24;p+=1)if(s.indexOf(l(p,0,o))>-1){m=p>12;break}}else m=s===(o?"pm":"PM");return m},q={A:[x,function(s){this.afternoon=V(s,!1)}],a:[x,function(s){this.afternoon=V(s,!0)}],S:[/\d/,function(s){this.milliseconds=100*+s}],SS:[a,function(s){this.milliseconds=10*+s}],SSS:[/\d{3}/,function(s){this.milliseconds=+s}],s:[h,d("seconds")],ss:[h,d("seconds")],m:[h,d("minutes")],mm:[h,d("minutes")],H:[h,d("hours")],h:[h,d("hours")],HH:[h,d("hours")],hh:[h,d("hours")],D:[h,d("day")],DD:[a,d("day")],Do:[x,function(s){var o=b.ordinal,m=s.match(/\d+/);if(this.day=m[0],o)for(var l=1;l<=31;l+=1)o(l).replace(/\[|\]/g,"")===s&&(this.day=l)}],M:[h,d("month")],MM:[a,d("month")],MMM:[x,function(s){var o=F("months"),m=(F("monthsShort")||o.map(function(l){return l.slice(0,3)})).indexOf(s)+1;if(m<1)throw new Error;this.month=m%12||m}],MMMM:[x,function(s){var o=F("months").indexOf(s)+1;if(o<1)throw new Error;this.month=o%12||o}],Y:[/[+-]?\d+/,d("year")],YY:[a,function(s){this.year=Z(s)}],YYYY:[/\d{4}/,d("year")],Z:B,ZZ:B};function N(s){var o,m;o=s,m=b&&b.formats;for(var l=(s=o.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(S,T,f){var c=f&&f.toUpperCase();return T||m[f]||n[f]||m[c].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(w,k,M){return k||M.slice(1)})})).match(i),p=l.length,y=0;y<p;y+=1){var C=l[y],I=q[C],v=I&&I[0],g=I&&I[1];l[y]=g?{regex:v,parser:g}:C.replace(/^\[|\]$/g,"")}return function(S){for(var T={},f=0,c=0;f<p;f+=1){var w=l[f];if(typeof w=="string")c+=w.length;else{var k=w.regex,M=w.parser,L=S.slice(c),A=k.exec(L)[0];M.call(T,A),S=S.replace(A,"")}}return function(D){var u=D.afternoon;if(u!==void 0){var Y=D.hours;u?Y<12&&(D.hours+=12):Y===12&&(D.hours=0),delete D.afternoon}}(T),T}}return function(s,o,m){m.p.customParseFormat=!0,s&&s.parseTwoDigitYear&&(Z=s.parseTwoDigitYear);var l=o.prototype,p=l.parse;l.parse=function(y){var C=y.date,I=y.utc,v=y.args;this.$u=I;var g=v[1];if(typeof g=="string"){var S=v[2]===!0,T=v[3]===!0,f=S||T,c=v[2];T&&(c=v[2]),b=this.$locale(),!S&&c&&(b=m.Ls[c]),this.$d=function(L,A,D){try{if(["x","X"].indexOf(A)>-1)return new Date((A==="X"?1e3:1)*L);var u=N(A)(L),Y=u.year,E=u.month,X=u.day,G=u.hours,J=u.minutes,Q=u.seconds,ee=u.milliseconds,W=u.zone,$=new Date,P=X||(Y||E?1:$.getDate()),z=Y||$.getFullYear(),O=0;Y&&!E||(O=E>0?E-1:$.getMonth());var j=G||0,H=J||0,K=Q||0,R=ee||0;return W?new Date(Date.UTC(z,O,P,j,H,K,R+60*W.offset*1e3)):D?new Date(Date.UTC(z,O,P,j,H,K,R)):new Date(z,O,P,j,H,K,R)}catch{return new Date("")}}(C,g,I),this.init(),c&&c!==!0&&(this.$L=this.locale(c).$L),f&&C!=this.format(g)&&(this.$d=new Date("")),b={}}else if(g instanceof Array)for(var w=g.length,k=1;k<=w;k+=1){v[1]=g[k-1];var M=m.apply(this,v);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}k===w&&(this.$d=new Date(""))}else p.call(this,y)}}})})(_);const te=_.exports,ie=':host{display:block;position:relative;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.time-picker{display:inline-block;width:150px;font-family:var(--nylas-font-family);position:relative}@media screen and (max-width: 768px){.time-picker{width:auto}}.time-picker input{width:150px;height:48px;text-align:center;font-size:16px;font-family:inherit;cursor:pointer;background:transparent;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}@media screen and (max-width: 768px){.time-picker input{width:88px}}@media screen and (max-width: 504px){.time-picker input{width:68px;font-size:15px}}.time-picker input.focus{background:transparent}.time-picker input:hover,.time-picker input:active{border:1px solid var(--nylas-primary)}.time-picker input:active{outline:2px solid var(--nylas-primary)}.time-picker input span.open{transform:rotate(90deg)}.time-picker input span.closed{transform:rotate(270deg)}.time-picker input.error{border:1px solid var(--nylas-error)}.time-picker p.error{color:var(--nylas-error);font-size:0.875rem;margin:0}.times{display:block;margin-top:0.5rem;background-color:var(--nylas-base-0);width:100%;max-height:336px;overflow:auto;border:1px solid #ddd;z-index:1;border-radius:4px;position:absolute;box-shadow:0px 4px 6px -2px rgba(0, 0, 0, 0.0509803922);box-shadow:0px 10px 15px -3px rgba(0, 0, 0, 0.1019607843)}.times ul{padding:0;list-style-type:none;color:var(--nylas-base-900);max-height:336px}.times ul li{padding:16px, 12px, 16px, 12px;color:black;padding:12px 16px;text-decoration:none;display:block;font-family:inherit;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0px;text-align:center;cursor:pointer}.times ul li.focused{background-color:var(--nylas-base-100)}.times ul li:hover,.times ul li:focus{background-color:var(--nylas-base-100)}.times ul li label{display:flex;align-items:center;gap:0.5rem}.times ul li label input{margin:0}',se=ie;r.dayjs.extend(te);const U=class{constructor(e){r.registerInstance(this,e),this.timeChange=r.createEvent(this,"timeChange",7),this.formError=r.createEvent(this,"formError",7),this.time=void 0,this.minimumStartTime=null,this.placeholder="hh:mmam/pm",this.name=void 0,this.hasError=!1,this.err="",this.showTimes=!1,this.ariaActivedescendant="",this.times=this.generateTimes(),this.shouldAutoScroll=!1}handleOutsideClick(e){!e.composedPath().includes(this.el)&&this.showTimes&&(this.showTimes=!1)}minimumStartTimeChangedHandler(){if(this.minimumStartTime){let e=r.dayjs().hour(parseInt(this.minimumStartTime)).minute(parseInt(this.minimumStartTime.slice(-4,-2)));this.minimumStartTime.slice(-2).toLowerCase()==="pm"&&parseInt(this.minimumStartTime)!==12?e=e.add(12,"hour"):this.minimumStartTime.slice(-2).toLowerCase()==="am"&&parseInt(this.minimumStartTime)===12&&(e=e.subtract(12,"hour")),this.times=this.generateTimes();const t=r.dayjs(this.times[0].value,"hh:mma");r.dayjs(this.time,"hh:mma").isBefore(t)&&(this.err="Invalid",this.formError.emit({key:this.el.id,message:"Invalid"}))}}componentDidRender(){if(this.showTimes&&this.shouldAutoScroll){const e=r.autocompleteTimeFormat(this.time),t=this.times.findIndex(n=>n.value===e);t>-1&&(this.shouldAutoScroll=!1,this.scrollToViewWithinParent(t));return}}handleTimeChange(e,t){const n=t.split(":");n[0]==="00"&&n[1].slice(-2)=="pm"&&(this.err="Invalid",this.formError.emit({key:this.el.id,message:"Invalid"})),r.validateTimeFormatInput(t)?(this.err="",this.formError.emit({key:this.el.id,message:""})):(this.err="Invalid",this.formError.emit({key:this.el.id,message:"Invalid"})),this.timeChange.emit({key:this.el.id,value:t})}handleTimeAutocomplete(e){var n;const t=(n=e.target)==null?void 0:n.value;if(!r.validateTimeFormatInput(t)){this.err="Invalid",this.formError.emit({key:this.el.id,message:"Invalid"});return}if(t===""){const i=r.roundToNearest15Minutes().format("hh:mma");this.timeChange.emit({key:this.el.id,value:i});return}if(!r.validateExactTimeFormat(t)){const i=r.autocompleteTimeFormat(t);this.timeChange.emit({key:this.el.id,value:i});return}this.timeChange.emit({key:this.el.id,value:t})}handleOnInput(e){var n;const t=(n=e.target)==null?void 0:n.value;if(r.validateTimeFormatInput(t)){if(t===""){const i=r.roundToNearest15Minutes().format("hh:mma"),a=this.times.findIndex(h=>h.value===i);a>-1&&this.scrollToViewWithinParent(a);return}if(!r.validateExactTimeFormat(t)){const i=r.autocompleteTimeFormat(t),a=this.times.findIndex(h=>h.value===i);a>-1&&this.scrollToViewWithinParent(a);return}}}generateTimes(){const e=[];let t=r.dayjs().set("hour",0).set("minute",0).set("second",0);this.minimumStartTime&&(t=r.dayjs(this.minimumStartTime,"hh:mma"));const n=t.endOf("day").diff(t,"minutes"),i=Math.round(n/15);for(let a=0;a<i+1;a++){const h=t.add(a*15,"minute");if(a==i&&h.format("hh:mma").includes("am"))break;e.push({id:a,value:h.format("hh:mma")})}return e}handleComboboxKeyDown(e){if(e.key==="ArrowDown"){if(e.preventDefault(),!this.showTimes){this.showTimes=!0,this.shouldAutoScroll=!0;return}if(this.ariaActivedescendant==="")this.ariaActivedescendant=this.times[0].id.toString(),this.focusOption(0);else{const t=this.times.findIndex(i=>i.id.toString()===this.ariaActivedescendant),n=t+1<this.times.length?t+1:0;this.ariaActivedescendant=this.times[n].id.toString(),this.focusOption(n)}}else if(e.key==="ArrowUp")if(e.preventDefault(),this.ariaActivedescendant==="")this.ariaActivedescendant=this.times[this.times.length-1].id.toString(),this.focusOption(this.times.length-1);else{const t=this.times.findIndex(i=>i.id.toString()===this.ariaActivedescendant),n=t-1>=0?t-1:this.times.length-1;this.ariaActivedescendant=this.times[n].id.toString(),this.focusOption(n)}else e.key==="Escape"&&(this.showTimes=!1,this.timeInput.focus())}handleListboxKeydown(e){const t=this.times,n=t.findIndex(i=>i.id.toString()===this.ariaActivedescendant);if(e.key==="ArrowDown"||e.key==="Tab"&&!e.shiftKey){e.preventDefault();const i=n+1<t.length?n+1:0;this.ariaActivedescendant=t[i].id.toString(),this.focusOption(i)}else if(e.key==="ArrowUp"||e.key==="Tab"&&e.shiftKey){e.preventDefault();const i=n-1>=0?n-1:t.length-1;this.ariaActivedescendant=t[i].id.toString(),this.focusOption(i)}else if(e.key==="Enter"){if(e.preventDefault(),this.ariaActivedescendant){const i=t[n];this.handleTimeChange(e,i.value),this.showTimes=!1,this.ariaActivedescendant="",this.timeInput.focus()}}else e.key==="Escape"&&(this.showTimes=!1,this.timeInput.focus())}scrollToViewWithinParent(e){var x;const t=this.times[e],n=(x=this.el.shadowRoot)==null?void 0:x.getElementById(t.id.toString()),i=this.timeMenu;this.ariaActivedescendant=t.id.toString();const a=n.getBoundingClientRect(),h=i.getBoundingClientRect();a.top<h.top?i.scrollTop-=h.top-a.top:a.bottom>h.bottom&&(i.scrollTop+=a.bottom-h.bottom),a.left<h.left?i.scrollLeft-=h.left-a.left:a.right>h.right&&(i.scrollLeft+=a.right-h.right)}focusOption(e){var a;const t=this.times[e];if(!t)return;const n=t.id.toString(),i=(a=this.el.shadowRoot)==null?void 0:a.getElementById(n);i&&(i.focus(),i.scrollIntoView({behavior:"smooth",block:"nearest"}))}render(){return r.h(r.Host,{key:"e83949b2270706557e5d45aff5958d937c6489c9"},r.h("div",{key:"0cacfe5530a1186ce2ff50ccc3d9328a62d48e2f",class:"time-picker",part:"time-picker"},r.h("input",{key:"8daf647468746997e503883478debf8d335a780d",type:"text",name:this.name,id:this.name,part:"time-input",class:{"time-input":!0,error:!!this.err||this.hasError},ref:e=>this.timeInput=e,value:this.time,onClick:()=>{this.showTimes=!this.showTimes,this.shouldAutoScroll=!0},"aria-haspopup":"listbox","aria-label":this.name,"aria-expanded":this.showTimes?"true":"false",placeholder:this.placeholder,onKeyDown:e=>this.handleComboboxKeyDown(e),onInput:e=>this.handleOnInput(e),onBlur:e=>this.handleTimeAutocomplete(e)}),this.err&&r.h("div",{class:"invalid-time-icon"}),this.showTimes&&r.h("div",{class:"times",part:"times",ref:e=>this.timeMenu=e},r.h("ul",{tabindex:"-1",role:"listbox","aria-label":this.name,"aria-activedescendant":this.ariaActivedescendant,onKeyDown:e=>this.handleListboxKeydown(e)},this.times.map(e=>r.h("li",{tabindex:"0",key:e.id,id:e.id.toString(),class:{focused:this.ariaActivedescendant===e.id.toString()},onClick:t=>{this.handleTimeChange(t,e.value),this.showTimes=!1,this.timeInput.focus()},role:"option"},`${e.value}`)))),!this.showTimes&&this.err&&r.h("p",{class:"error",id:"email-error"},this.err)))}get el(){return r.getElement(this)}static get watchers(){return{minimumStartTime:["minimumStartTimeChangedHandler"]}}};U.style=se;exports.nylas_time_window_picker=U;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-92ba1b80.cjs");require("react");require("react-dom");var _={exports:{}};(function(e,t){(function(n,i){e.exports=i()})(r.commonjsGlobal,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},i=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,a=/\d\d/,h=/\d\d?/,x=/\d*[^-_:/,()\s\d]+/,b={},Z=function(s){return(s=+s)+(s>68?1900:2e3)},d=function(s){return function(o){this[s]=+o}},B=[/[+-]\d\d:?(\d\d)?|Z/,function(s){(this.zone||(this.zone={})).offset=function(o){if(!o||o==="Z")return 0;var m=o.match(/([+-]|\d\d)/g),l=60*m[1]+(+m[2]||0);return l===0?0:m[0]==="+"?-l:l}(s)}],F=function(s){var o=b[s];return o&&(o.indexOf?o:o.s.concat(o.f))},V=function(s,o){var m,l=b.meridiem;if(l){for(var p=1;p<=24;p+=1)if(s.indexOf(l(p,0,o))>-1){m=p>12;break}}else m=s===(o?"pm":"PM");return m},q={A:[x,function(s){this.afternoon=V(s,!1)}],a:[x,function(s){this.afternoon=V(s,!0)}],S:[/\d/,function(s){this.milliseconds=100*+s}],SS:[a,function(s){this.milliseconds=10*+s}],SSS:[/\d{3}/,function(s){this.milliseconds=+s}],s:[h,d("seconds")],ss:[h,d("seconds")],m:[h,d("minutes")],mm:[h,d("minutes")],H:[h,d("hours")],h:[h,d("hours")],HH:[h,d("hours")],hh:[h,d("hours")],D:[h,d("day")],DD:[a,d("day")],Do:[x,function(s){var o=b.ordinal,m=s.match(/\d+/);if(this.day=m[0],o)for(var l=1;l<=31;l+=1)o(l).replace(/\[|\]/g,"")===s&&(this.day=l)}],M:[h,d("month")],MM:[a,d("month")],MMM:[x,function(s){var o=F("months"),m=(F("monthsShort")||o.map(function(l){return l.slice(0,3)})).indexOf(s)+1;if(m<1)throw new Error;this.month=m%12||m}],MMMM:[x,function(s){var o=F("months").indexOf(s)+1;if(o<1)throw new Error;this.month=o%12||o}],Y:[/[+-]?\d+/,d("year")],YY:[a,function(s){this.year=Z(s)}],YYYY:[/\d{4}/,d("year")],Z:B,ZZ:B};function N(s){var o,m;o=s,m=b&&b.formats;for(var l=(s=o.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(S,T,f){var c=f&&f.toUpperCase();return T||m[f]||n[f]||m[c].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(w,k,M){return k||M.slice(1)})})).match(i),p=l.length,y=0;y<p;y+=1){var C=l[y],I=q[C],v=I&&I[0],g=I&&I[1];l[y]=g?{regex:v,parser:g}:C.replace(/^\[|\]$/g,"")}return function(S){for(var T={},f=0,c=0;f<p;f+=1){var w=l[f];if(typeof w=="string")c+=w.length;else{var k=w.regex,M=w.parser,L=S.slice(c),A=k.exec(L)[0];M.call(T,A),S=S.replace(A,"")}}return function(D){var u=D.afternoon;if(u!==void 0){var Y=D.hours;u?Y<12&&(D.hours+=12):Y===12&&(D.hours=0),delete D.afternoon}}(T),T}}return function(s,o,m){m.p.customParseFormat=!0,s&&s.parseTwoDigitYear&&(Z=s.parseTwoDigitYear);var l=o.prototype,p=l.parse;l.parse=function(y){var C=y.date,I=y.utc,v=y.args;this.$u=I;var g=v[1];if(typeof g=="string"){var S=v[2]===!0,T=v[3]===!0,f=S||T,c=v[2];T&&(c=v[2]),b=this.$locale(),!S&&c&&(b=m.Ls[c]),this.$d=function(L,A,D){try{if(["x","X"].indexOf(A)>-1)return new Date((A==="X"?1e3:1)*L);var u=N(A)(L),Y=u.year,E=u.month,X=u.day,G=u.hours,J=u.minutes,Q=u.seconds,ee=u.milliseconds,W=u.zone,$=new Date,P=X||(Y||E?1:$.getDate()),z=Y||$.getFullYear(),O=0;Y&&!E||(O=E>0?E-1:$.getMonth());var j=G||0,H=J||0,K=Q||0,R=ee||0;return W?new Date(Date.UTC(z,O,P,j,H,K,R+60*W.offset*1e3)):D?new Date(Date.UTC(z,O,P,j,H,K,R)):new Date(z,O,P,j,H,K,R)}catch{return new Date("")}}(C,g,I),this.init(),c&&c!==!0&&(this.$L=this.locale(c).$L),f&&C!=this.format(g)&&(this.$d=new Date("")),b={}}else if(g instanceof Array)for(var w=g.length,k=1;k<=w;k+=1){v[1]=g[k-1];var M=m.apply(this,v);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}k===w&&(this.$d=new Date(""))}else p.call(this,y)}}})})(_);const te=_.exports,ie=':host{display:block;position:relative;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.time-picker{display:inline-block;width:150px;font-family:var(--nylas-font-family);position:relative}@media screen and (max-width: 768px){.time-picker{width:auto}}.time-picker input{width:150px;height:48px;text-align:center;font-size:16px;font-family:inherit;cursor:pointer;background:transparent;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}@media screen and (max-width: 768px){.time-picker input{width:88px}}@media screen and (max-width: 504px){.time-picker input{width:68px;font-size:15px}}.time-picker input.focus{background:transparent}.time-picker input:hover,.time-picker input:active{border:1px solid var(--nylas-primary)}.time-picker input:active{outline:2px solid var(--nylas-primary)}.time-picker input span.open{transform:rotate(90deg)}.time-picker input span.closed{transform:rotate(270deg)}.time-picker input.error{border:1px solid var(--nylas-error)}.time-picker p.error{color:var(--nylas-error);font-size:0.875rem;margin:0}.times{display:block;margin-top:0.5rem;background-color:var(--nylas-base-0);width:100%;max-height:336px;overflow:auto;border:1px solid #ddd;z-index:1;border-radius:4px;position:absolute;box-shadow:0px 4px 6px -2px rgba(0, 0, 0, 0.0509803922);box-shadow:0px 10px 15px -3px rgba(0, 0, 0, 0.1019607843)}.times ul{padding:0;list-style-type:none;color:var(--nylas-base-900);max-height:336px}.times ul li{padding:16px, 12px, 16px, 12px;color:black;padding:12px 16px;text-decoration:none;display:block;font-family:inherit;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0px;text-align:center;cursor:pointer}.times ul li.focused{background-color:var(--nylas-base-100)}.times ul li:hover,.times ul li:focus{background-color:var(--nylas-base-100)}.times ul li label{display:flex;align-items:center;gap:0.5rem}.times ul li label input{margin:0}',se=ie;r.dayjs.extend(te);const U=class{constructor(e){r.registerInstance(this,e),this.timeChange=r.createEvent(this,"timeChange",7),this.formError=r.createEvent(this,"formError",7),this.time=void 0,this.minimumStartTime=null,this.placeholder="hh:mmam/pm",this.name=void 0,this.hasError=!1,this.err="",this.showTimes=!1,this.ariaActivedescendant="",this.times=this.generateTimes(),this.shouldAutoScroll=!1}handleOutsideClick(e){!e.composedPath().includes(this.el)&&this.showTimes&&(this.showTimes=!1)}minimumStartTimeChangedHandler(){if(this.minimumStartTime){let e=r.dayjs().hour(parseInt(this.minimumStartTime)).minute(parseInt(this.minimumStartTime.slice(-4,-2)));this.minimumStartTime.slice(-2).toLowerCase()==="pm"&&parseInt(this.minimumStartTime)!==12?e=e.add(12,"hour"):this.minimumStartTime.slice(-2).toLowerCase()==="am"&&parseInt(this.minimumStartTime)===12&&(e=e.subtract(12,"hour")),this.times=this.generateTimes();const t=r.dayjs(this.times[0].value,"hh:mma");r.dayjs(this.time,"hh:mma").isBefore(t)&&(this.err="Invalid",this.formError.emit({key:this.el.id,message:"Invalid"}))}}componentDidRender(){if(this.showTimes&&this.shouldAutoScroll){const e=r.autocompleteTimeFormat(this.time),t=this.times.findIndex(n=>n.value===e);t>-1&&(this.shouldAutoScroll=!1,this.scrollToViewWithinParent(t));return}}handleTimeChange(e,t){const n=t.split(":");n[0]==="00"&&n[1].slice(-2)=="pm"&&(this.err="Invalid",this.formError.emit({key:this.el.id,message:"Invalid"})),r.validateTimeFormatInput(t)?(this.err="",this.formError.emit({key:this.el.id,message:""})):(this.err="Invalid",this.formError.emit({key:this.el.id,message:"Invalid"})),this.timeChange.emit({key:this.el.id,value:t})}handleTimeAutocomplete(e){var n;const t=(n=e.target)==null?void 0:n.value;if(!r.validateTimeFormatInput(t)){this.err="Invalid",this.formError.emit({key:this.el.id,message:"Invalid"});return}if(t===""){const i=r.roundToNearest15Minutes().format("hh:mma");this.timeChange.emit({key:this.el.id,value:i});return}if(!r.validateExactTimeFormat(t)){const i=r.autocompleteTimeFormat(t);this.timeChange.emit({key:this.el.id,value:i});return}this.timeChange.emit({key:this.el.id,value:t})}handleOnInput(e){var n;const t=(n=e.target)==null?void 0:n.value;if(r.validateTimeFormatInput(t)){if(t===""){const i=r.roundToNearest15Minutes().format("hh:mma"),a=this.times.findIndex(h=>h.value===i);a>-1&&this.scrollToViewWithinParent(a);return}if(!r.validateExactTimeFormat(t)){const i=r.autocompleteTimeFormat(t),a=this.times.findIndex(h=>h.value===i);a>-1&&this.scrollToViewWithinParent(a);return}}}generateTimes(){const e=[];let t=r.dayjs().set("hour",0).set("minute",0).set("second",0);this.minimumStartTime&&(t=r.dayjs(this.minimumStartTime,"hh:mma"));const n=t.endOf("day").diff(t,"minutes"),i=Math.round(n/15);for(let a=0;a<i+1;a++){const h=t.add(a*15,"minute");if(a==i&&h.format("hh:mma").includes("am"))break;e.push({id:a,value:h.format("hh:mma")})}return e}handleComboboxKeyDown(e){if(e.key==="ArrowDown"){if(e.preventDefault(),!this.showTimes){this.showTimes=!0,this.shouldAutoScroll=!0;return}if(this.ariaActivedescendant==="")this.ariaActivedescendant=this.times[0].id.toString(),this.focusOption(0);else{const t=this.times.findIndex(i=>i.id.toString()===this.ariaActivedescendant),n=t+1<this.times.length?t+1:0;this.ariaActivedescendant=this.times[n].id.toString(),this.focusOption(n)}}else if(e.key==="ArrowUp")if(e.preventDefault(),this.ariaActivedescendant==="")this.ariaActivedescendant=this.times[this.times.length-1].id.toString(),this.focusOption(this.times.length-1);else{const t=this.times.findIndex(i=>i.id.toString()===this.ariaActivedescendant),n=t-1>=0?t-1:this.times.length-1;this.ariaActivedescendant=this.times[n].id.toString(),this.focusOption(n)}else e.key==="Escape"&&(this.showTimes=!1,this.timeInput.focus())}handleListboxKeydown(e){const t=this.times,n=t.findIndex(i=>i.id.toString()===this.ariaActivedescendant);if(e.key==="ArrowDown"||e.key==="Tab"&&!e.shiftKey){e.preventDefault();const i=n+1<t.length?n+1:0;this.ariaActivedescendant=t[i].id.toString(),this.focusOption(i)}else if(e.key==="ArrowUp"||e.key==="Tab"&&e.shiftKey){e.preventDefault();const i=n-1>=0?n-1:t.length-1;this.ariaActivedescendant=t[i].id.toString(),this.focusOption(i)}else if(e.key==="Enter"){if(e.preventDefault(),this.ariaActivedescendant){const i=t[n];this.handleTimeChange(e,i.value),this.showTimes=!1,this.ariaActivedescendant="",this.timeInput.focus()}}else e.key==="Escape"&&(this.showTimes=!1,this.timeInput.focus())}scrollToViewWithinParent(e){var x;const t=this.times[e],n=(x=this.el.shadowRoot)==null?void 0:x.getElementById(t.id.toString()),i=this.timeMenu;this.ariaActivedescendant=t.id.toString();const a=n.getBoundingClientRect(),h=i.getBoundingClientRect();a.top<h.top?i.scrollTop-=h.top-a.top:a.bottom>h.bottom&&(i.scrollTop+=a.bottom-h.bottom),a.left<h.left?i.scrollLeft-=h.left-a.left:a.right>h.right&&(i.scrollLeft+=a.right-h.right)}focusOption(e){var a;const t=this.times[e];if(!t)return;const n=t.id.toString(),i=(a=this.el.shadowRoot)==null?void 0:a.getElementById(n);i&&(i.focus(),i.scrollIntoView({behavior:"smooth",block:"nearest"}))}render(){return r.h(r.Host,{key:"e83949b2270706557e5d45aff5958d937c6489c9"},r.h("div",{key:"0cacfe5530a1186ce2ff50ccc3d9328a62d48e2f",class:"time-picker",part:"time-picker"},r.h("input",{key:"8daf647468746997e503883478debf8d335a780d",type:"text",name:this.name,id:this.name,part:"time-input",class:{"time-input":!0,error:!!this.err||this.hasError},ref:e=>this.timeInput=e,value:this.time,onClick:()=>{this.showTimes=!this.showTimes,this.shouldAutoScroll=!0},"aria-haspopup":"listbox","aria-label":this.name,"aria-expanded":this.showTimes?"true":"false",placeholder:this.placeholder,onKeyDown:e=>this.handleComboboxKeyDown(e),onInput:e=>this.handleOnInput(e),onBlur:e=>this.handleTimeAutocomplete(e)}),this.err&&r.h("div",{class:"invalid-time-icon"}),this.showTimes&&r.h("div",{class:"times",part:"times",ref:e=>this.timeMenu=e},r.h("ul",{tabindex:"-1",role:"listbox","aria-label":this.name,"aria-activedescendant":this.ariaActivedescendant,onKeyDown:e=>this.handleListboxKeydown(e)},this.times.map(e=>r.h("li",{tabindex:"0",key:e.id,id:e.id.toString(),class:{focused:this.ariaActivedescendant===e.id.toString()},onClick:t=>{this.handleTimeChange(t,e.value),this.showTimes=!1,this.timeInput.focus()},role:"option"},`${e.value}`)))),!this.showTimes&&this.err&&r.h("p",{class:"error",id:"email-error"},this.err)))}get el(){return r.getElement(this)}static get watchers(){return{minimumStartTime:["minimumStartTimeChangedHandler"]}}};U.style=se;exports.nylas_time_window_picker=U;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-bec58f1d.cjs");require("react");require("react-dom");const r=".sc-person-icon-h{display:flex}",i=r,t=class{constructor(s){e.registerInstance(this,s),this.width="14",this.height="16"}render(){return e.h("svg",{key:"bf77344f510a860cf3b05daea1254dbe06465bcf",width:this.width,height:this.height,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"6704d143c071b2de1ce05a823bb98ba59fbffba7",d:"M7 0C4.79086 0 3 1.79086 3 4C3 6.20914 4.79086 8 7 8C9.20914 8 11 6.20914 11 4C11 1.79086 9.20914 0 7 0ZM4 4C4 2.34315 5.34315 1 7 1C8.65685 1 10 2.34315 10 4C10 5.65685 8.65685 7 7 7C5.34315 7 4 5.65685 4 4ZM2.00873 9C0.903151 9 0 9.88687 0 11C0 12.6912 0.83281 13.9663 2.13499 14.7966C3.41697 15.614 5.14526 16 7 16C8.85474 16 10.583 15.614 11.865 14.7966C13.1672 13.9663 14 12.6912 14 11C14 9.89557 13.1045 9.00001 12 9.00001L2.00873 9ZM1 11C1 10.4467 1.44786 10 2.00873 10L12 10C12.5522 10 13 10.4478 13 11C13 12.3088 12.3777 13.2837 11.3274 13.9534C10.2568 14.636 8.73511 15 7 15C5.26489 15 3.74318 14.636 2.67262 13.9534C1.62226 13.2837 1 12.3088 1 11Z",fill:"currentColor"}))}};t.style=i;exports.person_icon=t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-92ba1b80.cjs");require("react");require("react-dom");const r=".sc-person-icon-h{display:flex}",i=r,t=class{constructor(s){e.registerInstance(this,s),this.width="14",this.height="16"}render(){return e.h("svg",{key:"bf77344f510a860cf3b05daea1254dbe06465bcf",width:this.width,height:this.height,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"6704d143c071b2de1ce05a823bb98ba59fbffba7",d:"M7 0C4.79086 0 3 1.79086 3 4C3 6.20914 4.79086 8 7 8C9.20914 8 11 6.20914 11 4C11 1.79086 9.20914 0 7 0ZM4 4C4 2.34315 5.34315 1 7 1C8.65685 1 10 2.34315 10 4C10 5.65685 8.65685 7 7 7C5.34315 7 4 5.65685 4 4ZM2.00873 9C0.903151 9 0 9.88687 0 11C0 12.6912 0.83281 13.9663 2.13499 14.7966C3.41697 15.614 5.14526 16 7 16C8.85474 16 10.583 15.614 11.865 14.7966C13.1672 13.9663 14 12.6912 14 11C14 9.89557 13.1045 9.00001 12 9.00001L2.00873 9ZM1 11C1 10.4467 1.44786 10 2.00873 10L12 10C12.5522 10 13 10.4478 13 11C13 12.3088 12.3777 13.2837 11.3274 13.9534C10.2568 14.636 8.73511 15 7 15C5.26489 15 3.74318 14.636 2.67262 13.9534C1.62226 13.2837 1 12.3088 1 11Z",fill:"currentColor"}))}};t.style=i;exports.person_icon=t;
@@ -1,4 +1,4 @@
1
- import { r as e, h as t } from "./index-9dc1bd32.js";
1
+ import { r as e, h as t } from "./index-72501df0.js";
2
2
  import "react";
3
3
  import "react-dom";
4
4
  const o = ".sc-person-icon-h{display:flex}", r = o, C = class {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-bec58f1d.cjs");require("react");require("react-dom");const s=".sc-play-icon-h{display:flex}",o=s,t=class{constructor(i){e.registerInstance(this,i),this.width="15",this.height="15"}render(){return e.h("svg",{key:"09672d0e495dea5c057e0459bbaf09e05c5f6d92",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"f2d1b1e318670f9dac0c53f4e6bfe209fb6bb073",d:"M21 12L3 21V3L21 12Z",stroke:"auto","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))}};t.style=o;exports.play_icon=t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-92ba1b80.cjs");require("react");require("react-dom");const s=".sc-play-icon-h{display:flex}",o=s,t=class{constructor(i){e.registerInstance(this,i),this.width="15",this.height="15"}render(){return e.h("svg",{key:"09672d0e495dea5c057e0459bbaf09e05c5f6d92",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"f2d1b1e318670f9dac0c53f4e6bfe209fb6bb073",d:"M21 12L3 21V3L21 12Z",stroke:"auto","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))}};t.style=o;exports.play_icon=t;
@@ -1,4 +1,4 @@
1
- import { r as s, h as t } from "./index-9dc1bd32.js";
1
+ import { r as s, h as t } from "./index-72501df0.js";
2
2
  import "react";
3
3
  import "react-dom";
4
4
  const o = ".sc-play-icon-h{display:flex}", i = o, r = class {
package/dist/react.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-bec58f1d.cjs");require("react");require("react-dom");exports.AddCircleIcon=o.AddCircleIcon;exports.ArchiveIcon=o.ArchiveIcon;exports.ArrowIcon=o.ArrowIcon;exports.BoldIcon=o.BoldIcon;exports.ButtonComponent=o.ButtonComponent;exports.CalendarAgendaFillIcon=o.CalendarAgendaFillIcon;exports.CalendarAgendaIcon=o.CalendarAgendaIcon;exports.CalendarCancelIcon=o.CalendarCancelIcon;exports.CalendarCheckIcon=o.CalendarCheckIcon;exports.CalendarIcon=o.CalendarIcon;exports.CalendarInfoIcon=o.CalendarInfoIcon;exports.CalendarPatternsIcon=o.CalendarPatternsIcon;exports.CheckboxComponent=o.CheckboxComponent;exports.CheckmarkCircleIcon=o.CheckmarkCircleIcon;exports.CheckmarkIcon=o.CheckmarkIcon;exports.ChevronIcon=o.ChevronIcon;exports.ClockIcon=o.ClockIcon;exports.CloseIcon=o.CloseIcon;exports.CopyIcon=o.CopyIcon;exports.DeleteIcon=o.DeleteIcon;exports.DocumentRefreshIcon=o.DocumentRefreshIcon;exports.DragableIcon=o.DragableIcon;exports.EditIcon=o.EditIcon;exports.EnvelopeFillIcon=o.EnvelopeFillIcon;exports.EnvelopeIcon=o.EnvelopeIcon;exports.EyeIcon=o.EyeIcon;exports.FeedbackIcon=o.FeedbackIcon;exports.FlowIcon=o.FlowIcon;exports.FolderIcon=o.FolderIcon;exports.ForwardIcon=o.ForwardIcon;exports.GlobeIcon=o.GlobeIcon;exports.GoogleLogoIcon=o.GoogleLogoIcon;exports.GoogleMeetIcon=o.GoogleMeetIcon;exports.InboxIcon=o.InboxIcon;exports.InfoIcon=o.InfoIcon;exports.InputColorPicker=o.InputColorPicker;exports.InputComponent=o.InputComponent;exports.InputDropdown=o.InputDropdown;exports.InputImageUrl=o.InputImageUrl;exports.ItalicIcon=o.ItalicIcon;exports.LoadingIcon=o.LoadingIcon;exports.LocationIcon=o.LocationIcon;exports.LocationOffIcon=o.LocationOffIcon;exports.MicrosoftLogoIcon=o.MicrosoftLogoIcon;exports.MicrosoftTeamsIcon=o.MicrosoftTeamsIcon;exports.MultiSelectDropdown=o.MultiSelectDropdown;exports.NylasAdditionalParticipants=o.NylasAdditionalParticipants;exports.NylasAvailabilityPicker=o.NylasAvailabilityPicker;exports.NylasBookedEventCard=o.NylasBookedEventCard;exports.NylasBookingCalendarPicker=o.NylasBookingCalendarPicker;exports.NylasBookingConfirmationRedirect=o.NylasBookingConfirmationRedirect;exports.NylasBookingConfirmationType=o.NylasBookingConfirmationType;exports.NylasBookingForm=o.NylasBookingForm;exports.NylasBookingFormConfig=o.NylasBookingFormConfig;exports.NylasBufferTime=o.NylasBufferTime;exports.NylasCalendarPicker=o.NylasCalendarPicker;exports.NylasCancelBookingForm=o.NylasCancelBookingForm;exports.NylasCancellationPolicy=o.NylasCancellationPolicy;exports.NylasCancelledEventCard=o.NylasCancelledEventCard;exports.NylasConfirmationEmail=o.NylasConfirmationEmail;exports.NylasConfirmedEventCard=o.NylasConfirmedEventCard;exports.NylasConnectedCalendars=o.NylasConnectedCalendars;exports.NylasCustomBookingFlow=o.NylasCustomBookingFlow;exports.NylasCustomEventSlug=o.NylasCustomEventSlug;exports.NylasCustomizeBookingSettings=o.NylasCustomizeBookingSettings;exports.NylasDatePicker=o.NylasDatePicker;exports.NylasEditorTabs=o.NylasEditorTabs;exports.NylasEventDescription=o.NylasEventDescription;exports.NylasEventDuration=o.NylasEventDuration;exports.NylasEventInfo=o.NylasEventInfo;exports.NylasEventLimits=o.NylasEventLimits;exports.NylasEventLocation=o.NylasEventLocation;exports.NylasEventTitle=o.NylasEventTitle;exports.NylasFeedbackForm=o.NylasFeedbackForm;exports.NylasFormCard=o.NylasFormCard;exports.NylasIdentityRequestWrapper=o.NylasIdentityRequestWrapper;exports.NylasIfState=o.NylasIfState;exports.NylasLimitFutureBookings=o.NylasLimitFutureBookings;exports.NylasListConfigurations=o.NylasListConfigurations;exports.NylasLocaleSwitch=o.NylasLocaleSwitch;exports.NylasLogin=o.NylasLogin;exports.NylasLogo=o.NylasLogo;exports.NylasMinBookingNotice=o.NylasMinBookingNotice;exports.NylasMinCancellationNotice=o.NylasMinCancellationNotice;exports.NylasNotification=o.NylasNotification;exports.NylasOrganizerConfirmationCard=o.NylasOrganizerConfirmationCard;exports.NylasPageName=o.NylasPageName;exports.NylasPageStyling=o.NylasPageStyling;exports.NylasParticipantBookingCalendars=o.NylasParticipantBookingCalendars;exports.NylasParticipantsCustomAvailability=o.NylasParticipantsCustomAvailability;exports.NylasProvider=o.NylasProvider;exports.NylasReminderEmails=o.NylasReminderEmails;exports.NylasReminderTime=o.NylasReminderTime;exports.NylasSchedulerEditor=o.NylasSchedulerEditor;exports.NylasScheduling=o.NylasScheduling;exports.NylasSchedulingMethod=o.NylasSchedulingMethod;exports.NylasSelectedEventCard=o.NylasSelectedEventCard;exports.NylasTimeWindowPicker=o.NylasTimeWindowPicker;exports.NylasTimeslotInterval=o.NylasTimeslotInterval;exports.NylasTimeslotPicker=o.NylasTimeslotPicker;exports.PaintbrushFillIcon=o.PaintbrushFillIcon;exports.PaintbrushIcon=o.PaintbrushIcon;exports.PeopleIcon=o.PeopleIcon;exports.PersonClipboardIcon=o.PersonClipboardIcon;exports.PersonIcon=o.PersonIcon;exports.PlayIcon=o.PlayIcon;exports.PlusIcon=o.PlusIcon;exports.RadioButtonGroup=o.RadioButtonGroup;exports.RefreshIcon=o.RefreshIcon;exports.ReplyAllIcon=o.ReplyAllIcon;exports.ReplyIcon=o.ReplyIcon;exports.SearchIcon=o.SearchIcon;exports.SelectDropdown=o.SelectDropdown;exports.SentIcon=o.SentIcon;exports.SpamIcon=o.SpamIcon;exports.StarIcon=o.StarIcon;exports.StopIcon=o.StopIcon;exports.TextareaComponent=o.TextareaComponent;exports.TimePeriodSelector=o.TimePeriodSelector;exports.ToggleSwitch=o.ToggleSwitch;exports.TooltipComponent=o.TooltipComponent;exports.TranslateIcon=o.TranslateIcon;exports.TrashFillIcon=o.TrashFillIcon;exports.TrashIcon=o.TrashIcon;exports.UnderlineIcon=o.UnderlineIcon;exports.WarningIcon=o.WarningIcon;exports.ZoomIcon=o.ZoomIcon;exports.applyPolyfills=o.applyPolyfills;exports.defineCustomElements=o.defineCustomElements;exports.setNonce=o.setNonce;exports.useNylasMailboxElement=o.useNylasMailboxElement;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-92ba1b80.cjs");require("react");require("react-dom");exports.AddCircleIcon=o.AddCircleIcon;exports.ArchiveIcon=o.ArchiveIcon;exports.ArrowIcon=o.ArrowIcon;exports.BoldIcon=o.BoldIcon;exports.ButtonComponent=o.ButtonComponent;exports.CalendarAgendaFillIcon=o.CalendarAgendaFillIcon;exports.CalendarAgendaIcon=o.CalendarAgendaIcon;exports.CalendarCancelIcon=o.CalendarCancelIcon;exports.CalendarCheckIcon=o.CalendarCheckIcon;exports.CalendarIcon=o.CalendarIcon;exports.CalendarInfoIcon=o.CalendarInfoIcon;exports.CalendarPatternsIcon=o.CalendarPatternsIcon;exports.CheckboxComponent=o.CheckboxComponent;exports.CheckmarkCircleIcon=o.CheckmarkCircleIcon;exports.CheckmarkIcon=o.CheckmarkIcon;exports.ChevronIcon=o.ChevronIcon;exports.ClockIcon=o.ClockIcon;exports.CloseIcon=o.CloseIcon;exports.CopyIcon=o.CopyIcon;exports.DeleteIcon=o.DeleteIcon;exports.DocumentRefreshIcon=o.DocumentRefreshIcon;exports.DragableIcon=o.DragableIcon;exports.EditIcon=o.EditIcon;exports.EnvelopeFillIcon=o.EnvelopeFillIcon;exports.EnvelopeIcon=o.EnvelopeIcon;exports.EyeIcon=o.EyeIcon;exports.FeedbackIcon=o.FeedbackIcon;exports.FlowIcon=o.FlowIcon;exports.FolderIcon=o.FolderIcon;exports.ForwardIcon=o.ForwardIcon;exports.GlobeIcon=o.GlobeIcon;exports.GoogleLogoIcon=o.GoogleLogoIcon;exports.GoogleMeetIcon=o.GoogleMeetIcon;exports.InboxIcon=o.InboxIcon;exports.InfoIcon=o.InfoIcon;exports.InputColorPicker=o.InputColorPicker;exports.InputComponent=o.InputComponent;exports.InputDropdown=o.InputDropdown;exports.InputImageUrl=o.InputImageUrl;exports.ItalicIcon=o.ItalicIcon;exports.LoadingIcon=o.LoadingIcon;exports.LocationIcon=o.LocationIcon;exports.LocationOffIcon=o.LocationOffIcon;exports.MicrosoftLogoIcon=o.MicrosoftLogoIcon;exports.MicrosoftTeamsIcon=o.MicrosoftTeamsIcon;exports.MultiSelectDropdown=o.MultiSelectDropdown;exports.NylasAdditionalParticipants=o.NylasAdditionalParticipants;exports.NylasAvailabilityPicker=o.NylasAvailabilityPicker;exports.NylasBookedEventCard=o.NylasBookedEventCard;exports.NylasBookingCalendarPicker=o.NylasBookingCalendarPicker;exports.NylasBookingConfirmationRedirect=o.NylasBookingConfirmationRedirect;exports.NylasBookingConfirmationType=o.NylasBookingConfirmationType;exports.NylasBookingForm=o.NylasBookingForm;exports.NylasBookingFormConfig=o.NylasBookingFormConfig;exports.NylasBufferTime=o.NylasBufferTime;exports.NylasCalendarPicker=o.NylasCalendarPicker;exports.NylasCancelBookingForm=o.NylasCancelBookingForm;exports.NylasCancellationPolicy=o.NylasCancellationPolicy;exports.NylasCancelledEventCard=o.NylasCancelledEventCard;exports.NylasConfirmationEmail=o.NylasConfirmationEmail;exports.NylasConfirmedEventCard=o.NylasConfirmedEventCard;exports.NylasConnectedCalendars=o.NylasConnectedCalendars;exports.NylasCustomBookingFlow=o.NylasCustomBookingFlow;exports.NylasCustomEventSlug=o.NylasCustomEventSlug;exports.NylasCustomizeBookingSettings=o.NylasCustomizeBookingSettings;exports.NylasDatePicker=o.NylasDatePicker;exports.NylasEditorTabs=o.NylasEditorTabs;exports.NylasEventDescription=o.NylasEventDescription;exports.NylasEventDuration=o.NylasEventDuration;exports.NylasEventInfo=o.NylasEventInfo;exports.NylasEventLimits=o.NylasEventLimits;exports.NylasEventLocation=o.NylasEventLocation;exports.NylasEventTitle=o.NylasEventTitle;exports.NylasFeedbackForm=o.NylasFeedbackForm;exports.NylasFormCard=o.NylasFormCard;exports.NylasIdentityRequestWrapper=o.NylasIdentityRequestWrapper;exports.NylasIfState=o.NylasIfState;exports.NylasLimitFutureBookings=o.NylasLimitFutureBookings;exports.NylasListConfigurations=o.NylasListConfigurations;exports.NylasLocaleSwitch=o.NylasLocaleSwitch;exports.NylasLogin=o.NylasLogin;exports.NylasLogo=o.NylasLogo;exports.NylasMinBookingNotice=o.NylasMinBookingNotice;exports.NylasMinCancellationNotice=o.NylasMinCancellationNotice;exports.NylasNotification=o.NylasNotification;exports.NylasOrganizerConfirmationCard=o.NylasOrganizerConfirmationCard;exports.NylasPageName=o.NylasPageName;exports.NylasPageStyling=o.NylasPageStyling;exports.NylasParticipantBookingCalendars=o.NylasParticipantBookingCalendars;exports.NylasParticipantsCustomAvailability=o.NylasParticipantsCustomAvailability;exports.NylasProvider=o.NylasProvider;exports.NylasReminderEmails=o.NylasReminderEmails;exports.NylasReminderTime=o.NylasReminderTime;exports.NylasSchedulerEditor=o.NylasSchedulerEditor;exports.NylasScheduling=o.NylasScheduling;exports.NylasSchedulingMethod=o.NylasSchedulingMethod;exports.NylasSelectedEventCard=o.NylasSelectedEventCard;exports.NylasTimeWindowPicker=o.NylasTimeWindowPicker;exports.NylasTimeslotInterval=o.NylasTimeslotInterval;exports.NylasTimeslotPicker=o.NylasTimeslotPicker;exports.PaintbrushFillIcon=o.PaintbrushFillIcon;exports.PaintbrushIcon=o.PaintbrushIcon;exports.PeopleIcon=o.PeopleIcon;exports.PersonClipboardIcon=o.PersonClipboardIcon;exports.PersonIcon=o.PersonIcon;exports.PlayIcon=o.PlayIcon;exports.PlusIcon=o.PlusIcon;exports.RadioButtonGroup=o.RadioButtonGroup;exports.RefreshIcon=o.RefreshIcon;exports.ReplyAllIcon=o.ReplyAllIcon;exports.ReplyIcon=o.ReplyIcon;exports.SearchIcon=o.SearchIcon;exports.SelectDropdown=o.SelectDropdown;exports.SentIcon=o.SentIcon;exports.SpamIcon=o.SpamIcon;exports.StarIcon=o.StarIcon;exports.StopIcon=o.StopIcon;exports.TextareaComponent=o.TextareaComponent;exports.TimePeriodSelector=o.TimePeriodSelector;exports.ToggleSwitch=o.ToggleSwitch;exports.TooltipComponent=o.TooltipComponent;exports.TranslateIcon=o.TranslateIcon;exports.TrashFillIcon=o.TrashFillIcon;exports.TrashIcon=o.TrashIcon;exports.UnderlineIcon=o.UnderlineIcon;exports.WarningIcon=o.WarningIcon;exports.ZoomIcon=o.ZoomIcon;exports.applyPolyfills=o.applyPolyfills;exports.defineCustomElements=o.defineCustomElements;exports.setNonce=o.setNonce;exports.useNylasMailboxElement=o.useNylasMailboxElement;
package/dist/react.js CHANGED
@@ -1,4 +1,4 @@
1
- import { Z as e, _ as l, $ as i, a0 as c, a1 as t, a2 as r, a3 as I, a4 as b, a5 as y, a6 as N, a7 as d, a8 as C, a9 as m, aa as g, ab as p, ac as k, ad as u, ae as P, af as f, ag as E, ah as h, ai as v, aj as S, ak as B, al as F, am as T, an as L, ao as w, ap as A, aq as D, ar as R, as as M, at as x, au as G, av as W, aw as z, ax as O, ay as U, az as q, aA as V, aB as Z, aC as j, aD as H, aE as J, aF as K, aG as Q, aH as X, aI as Y, aJ as _, aK as $, aL as aa, aM as sa, aN as oa, aO as na, aP as ea, aQ as la, aR as ia, aS as ca, aT as ta, aU as ra, aV as Ia, aW as ba, aX as ya, aY as Na, aZ as da, a_ as Ca, a$ as ma, b0 as ga, b1 as pa, b2 as ka, b3 as ua, b4 as Pa, b5 as fa, b6 as Ea, b7 as ha, N as va, b8 as Sa, b9 as Ba, ba as Fa, bb as Ta, bc as La, bd as wa, be as Aa, bf as Da, bg as Ra, bh as Ma, bi as xa, bj as Ga, bk as Wa, bl as za, bm as Oa, bn as Ua, bo as qa, bp as Va, bq as Za, br as ja, bs as Ha, bt as Ja, bu as Ka, bv as Qa, bw as Xa, bx as Ya, by as _a, bz as $a, bA as as, bB as ss, bC as os, bD as ns, bE as es, bF as ls, bG as is, bH as cs, bI as ts, bJ as rs, bK as Is, bL as bs, bM as ys, bN as Ns, bO as ds, bP as Cs, bQ as ms, bR as gs, bS as ps, bT as ks, bU as us, bV as Ps, bW as fs, W as Es, X as hs, Y as vs, V as Ss } from "./index-9dc1bd32.js";
1
+ import { Z as e, _ as l, $ as i, a0 as c, a1 as t, a2 as r, a3 as I, a4 as b, a5 as y, a6 as N, a7 as d, a8 as C, a9 as m, aa as g, ab as p, ac as k, ad as u, ae as P, af as f, ag as E, ah as h, ai as v, aj as S, ak as B, al as F, am as T, an as L, ao as w, ap as A, aq as D, ar as R, as as M, at as x, au as G, av as W, aw as z, ax as O, ay as U, az as q, aA as V, aB as Z, aC as j, aD as H, aE as J, aF as K, aG as Q, aH as X, aI as Y, aJ as _, aK as $, aL as aa, aM as sa, aN as oa, aO as na, aP as ea, aQ as la, aR as ia, aS as ca, aT as ta, aU as ra, aV as Ia, aW as ba, aX as ya, aY as Na, aZ as da, a_ as Ca, a$ as ma, b0 as ga, b1 as pa, b2 as ka, b3 as ua, b4 as Pa, b5 as fa, b6 as Ea, b7 as ha, N as va, b8 as Sa, b9 as Ba, ba as Fa, bb as Ta, bc as La, bd as wa, be as Aa, bf as Da, bg as Ra, bh as Ma, bi as xa, bj as Ga, bk as Wa, bl as za, bm as Oa, bn as Ua, bo as qa, bp as Va, bq as Za, br as ja, bs as Ha, bt as Ja, bu as Ka, bv as Qa, bw as Xa, bx as Ya, by as _a, bz as $a, bA as as, bB as ss, bC as os, bD as ns, bE as es, bF as ls, bG as is, bH as cs, bI as ts, bJ as rs, bK as Is, bL as bs, bM as ys, bN as Ns, bO as ds, bP as Cs, bQ as ms, bR as gs, bS as ps, bT as ks, bU as us, bV as Ps, bW as fs, W as Es, X as hs, Y as vs, V as Ss } from "./index-72501df0.js";
2
2
  import "react";
3
3
  import "react-dom";
4
4
  export {
@@ -1,4 +1,4 @@
1
- import { r as s, h as c } from "./index-9dc1bd32.js";
1
+ import { r as s, h as c } from "./index-72501df0.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 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-bec58f1d.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:"2e53f7097cb59c8a341225fdde738395247fe681",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:"6e99de42fd10abc8e6c9f705ea770431ac131d66",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-92ba1b80.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:"2e53f7097cb59c8a341225fdde738395247fe681",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:"6e99de42fd10abc8e6c9f705ea770431ac131d66",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 { d, P as m, g as P } from "./index-9dc1bd32.js";
1
+ import { d, P as m, g as P } from "./index-72501df0.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-bec58f1d.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-92ba1b80.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,4 +1,4 @@
1
- import { r as l, h as t } from "./index-9dc1bd32.js";
1
+ import { r as l, h as t } from "./index-72501df0.js";
2
2
  import "react";
3
3
  import "react-dom";
4
4
  const s = ".sc-reply-all-icon-h{display:flex}", i = s, h = class {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-bec58f1d.cjs");require("react");require("react-dom");const i=".sc-reply-all-icon-h{display:flex}",s=i,t=class{constructor(l){e.registerInstance(this,l),this.width="15",this.height="15"}render(){return e.h("svg",{key:"731c2f8765e8d12717f1e021f6ea9fda06bdd336",fill:"auto",width:this.width,height:this.height,viewBox:"0 0 1920 1920",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"79807cd8dd4aaa49fc2c6be33b18974b9d7874f7",d:"m1030.975 188 81.249 81.249-429.228 429.228h300.747c516.223 0 936.257 420.034 936.257 936.257v98.028h-114.92v-98.028c0-452.901-368.436-821.337-821.337-821.337H682.996l429.228 429.229-81.25 81.248-567.936-567.937L1030.975 188Zm-463.038.011 81.249 81.25-486.688 486.688 486.688 486.688-81.249 81.249L0 755.949 567.937 188.01Z","fill-rule":"evenodd"}))}};t.style=s;exports.reply_all_icon=t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-92ba1b80.cjs");require("react");require("react-dom");const i=".sc-reply-all-icon-h{display:flex}",s=i,t=class{constructor(l){e.registerInstance(this,l),this.width="15",this.height="15"}render(){return e.h("svg",{key:"731c2f8765e8d12717f1e021f6ea9fda06bdd336",fill:"auto",width:this.width,height:this.height,viewBox:"0 0 1920 1920",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"79807cd8dd4aaa49fc2c6be33b18974b9d7874f7",d:"m1030.975 188 81.249 81.249-429.228 429.228h300.747c516.223 0 936.257 420.034 936.257 936.257v98.028h-114.92v-98.028c0-452.901-368.436-821.337-821.337-821.337H682.996l429.228 429.229-81.25 81.248-567.936-567.937L1030.975 188Zm-463.038.011 81.249 81.25-486.688 486.688 486.688 486.688-81.249 81.249L0 755.949 567.937 188.01Z","fill-rule":"evenodd"}))}};t.style=s;exports.reply_all_icon=t;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-bec58f1d.cjs");require("react");require("react-dom");const s=".sc-reply-icon-h{display:flex}",c=s,t=class{constructor(i){e.registerInstance(this,i),this.width="15",this.height="15"}render(){return e.h("svg",{key:"c28f9fd8ada1318b9d8c35dc2361f105ef2daba1",fill:"auto",width:this.width,height:this.height,viewBox:"0 0 1920 1920",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"07d39c83f7b5423b81583d4909d1763877369b8d",d:"M835.942 632.563H244.966l478.08-478.08-90.496-90.496L-.026 696.563 632.55 1329.14l90.496-90.496-478.08-478.08h590.976c504.448 0 914.816 410.368 914.816 914.816v109.184h128V1675.38c0-574.976-467.84-1042.816-1042.816-1042.816","fill-rule":"evenodd"}))}};t.style=c;exports.reply_icon=t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-92ba1b80.cjs");require("react");require("react-dom");const s=".sc-reply-icon-h{display:flex}",c=s,t=class{constructor(i){e.registerInstance(this,i),this.width="15",this.height="15"}render(){return e.h("svg",{key:"c28f9fd8ada1318b9d8c35dc2361f105ef2daba1",fill:"auto",width:this.width,height:this.height,viewBox:"0 0 1920 1920",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"07d39c83f7b5423b81583d4909d1763877369b8d",d:"M835.942 632.563H244.966l478.08-478.08-90.496-90.496L-.026 696.563 632.55 1329.14l90.496-90.496-478.08-478.08h590.976c504.448 0 914.816 410.368 914.816 914.816v109.184h128V1675.38c0-574.976-467.84-1042.816-1042.816-1042.816","fill-rule":"evenodd"}))}};t.style=c;exports.reply_icon=t;
@@ -1,4 +1,4 @@
1
- import { r as s, h as t } from "./index-9dc1bd32.js";
1
+ import { r as s, h as t } from "./index-72501df0.js";
2
2
  import "react";
3
3
  import "react-dom";
4
4
  const i = ".sc-reply-icon-h{display:flex}", h = i, c = class {
@@ -1 +1 @@
1
- "use strict";const o=require("./index-bec58f1d.cjs");function s(n={}){const r={selectedConfiguration:{},configurations:[],listConfigurationsNextCursor:null,calendars:[],currentUser:null,action:null,additionalParticipants:[],requiresSlug:!1,...n},e=o.createStore(r);function t(){e.set("selectedConfiguration",{...n.selectedConfiguration})}return e.onChange("action",async i=>{i||t()}),{...e,resetSelectedConfiguration:t}}exports.CreateNylasSchedulerConfigStore=s;
1
+ "use strict";const o=require("./index-92ba1b80.cjs");function s(n={}){const r={selectedConfiguration:{},configurations:[],listConfigurationsNextCursor:null,calendars:[],currentUser:null,action:null,additionalParticipants:[],requiresSlug:!1,...n},e=o.createStore(r);function t(){e.set("selectedConfiguration",{...n.selectedConfiguration})}return e.onChange("action",async i=>{i||t()}),{...e,resetSelectedConfiguration:t}}exports.CreateNylasSchedulerConfigStore=s;
@@ -1,4 +1,4 @@
1
- import { a as i } from "./index-9dc1bd32.js";
1
+ import { a as i } from "./index-72501df0.js";
2
2
  function s(n = {}) {
3
3
  const o = {
4
4
  selectedConfiguration: {},
@@ -1,4 +1,4 @@
1
- import { d as L, a as F, i as c, j as R } from "./index-9dc1bd32.js";
1
+ import { d as L, a as F, i as c, j as R } from "./index-72501df0.js";
2
2
  var B;
3
3
  (function(a) {
4
4
  a.Component = "component", a.Api = "api", a.Auth = "auth";
@@ -115,7 +115,7 @@ class N {
115
115
  }
116
116
  async makeAPIRequest(e, t, s, i = {}) {
117
117
  try {
118
- const n = new URL(this.schedulerAPIURL), r = "1.2.0";
118
+ const n = new URL(this.schedulerAPIURL), r = "1.3.0";
119
119
  return n.pathname = e, await (await fetch(decodeURIComponent(n.toString()), {
120
120
  method: t,
121
121
  headers: {
@@ -1 +1 @@
1
- "use strict";const l=require("./index-bec58f1d.cjs");exports.ErrorCategory=void 0;(function(a){a.Component="component",a.Api="api",a.Auth="auth"})(exports.ErrorCategory||(exports.ErrorCategory={}));var D;(function(a){a.endtime_not_in_future="endtime_not_in_future",a.no_booking_info="no_booking_info",a.no_timeslot_selected="no_timeslot_selected",a.no_timezone_selected="no_timezone_selected",a.no_booking_id="no_booking_id",a.no_salt="no_salt",a.invalid_start_time="invalid_start_time",a.invalid_end_time="invalid_end_time",a.invalid_timezone="invalid_timezone"})(D||(D={}));var A;(function(a){a.invalid_session="invalid_session",a.general_error="general_error",a.internal_error="internal_error",a.invalid_request_error="invalid_request_error",a.timeslot_not_available="timeslot_not_available",a.provider_error="provider_error",a.not_found_error="not_found_error"})(A||(A={}));class M{constructor(){this.component=e=>{const t=exports.ErrorCategory.Component,s=`${e} Error`;return{endtime_not_in_future:(i='"endtime" can not be in the future')=>({title:s,message:i,category:t}),no_booking_info:(i="No booking info provided")=>({title:s,message:i,category:t}),no_timeslot_selected:(i="No timeslot selected")=>({title:s,message:i,category:t}),no_timezone_selected:(i="No timezone selected")=>({title:s,message:i,category:t}),no_booking_id:(i="No booking id provided")=>({title:s,message:i,category:t}),no_salt:(i="No salt provided")=>({title:s,message:i,category:t}),invalid_start_time:(i="Invalid start time")=>({title:s,message:i,category:t}),invalid_end_time:(i="Invalid end time")=>({title:s,message:i,category:t}),invalid_timezone:(i="Invalid timezone")=>({title:s,message:i,category:t})}},this.api=e=>{const t=exports.ErrorCategory.Api,s=`${e} Error`;return{invalid_session:i=>({title:s,message:i,category:t}),general_error:i=>({title:s,message:i,category:t}),internal_error:i=>({title:s,message:i,category:t}),invalid_request_error:i=>({title:s,message:i,category:t}),timeslot_not_available:i=>({title:s,message:i,category:t}),provider_error:i=>({title:s,message:i,category:t}),not_found_error:i=>({title:s,message:i,category:t})}}}}class z{constructor({schedulerAPIURL:e,schedulerStore:t,sessionId:s,configId:i,slug:n,clientId:r}){this.errors=new M,this.schedulerStore=t,this.schedulerAPIURL=e,this.sessionId=s,this.configId=i,this.slug=n,this.clientId=r}getHeaders(){return this.sessionId?{Authorization:`Bearer ${this.sessionId}`}:{}}async makeAPIRequest(e,t,s,i={}){try{const n=new URL(this.schedulerAPIURL),r="1.2.0";return n.pathname=e,await(await fetch(decodeURIComponent(n.toString()),{method:t,headers:{"Content-Type":"application/json",Origin:window.location.origin,"X-Source":"nylas-scheduling","X-Nylas-Web-Elements-Version":r,...i},body:s})).json()}catch(n){return{error:{message:n.message,title:"API request failed",type:"api"}}}}getErrorMessage(e){var s,i,n,r;let t=(e==null?void 0:e.message)||(e==null?void 0:e.title)||"Something went wrong";return(e==null?void 0:e.type)==="provider_error"&&(t=((i=(s=e==null?void 0:e.provider_error)==null?void 0:s.error)==null?void 0:i.message)||((r=(n=e==null?void 0:e.provider_error)==null?void 0:n.error)==null?void 0:r.title)||"Something went wrong"),t}setConfigId(e){this.configId=e}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)}selectLanguage(e){this.schedulerStore.set("selectedLanguage",e),l.instance.changeLanguage(e)}async toggleAdditionalData(e){e||await this.refetchAvailability(),this.schedulerStore.set("showBookingForm",e)}setParticipantName(e){const{bookingInfo:t}=this.schedulerStore.state;this.schedulerStore.set("bookingInfo",{...t,primaryParticipant:{...t==null?void 0:t.primaryParticipant,name:e}})}setParticipantEmail(e){const{bookingInfo:t}=this.schedulerStore.state;this.schedulerStore.set("bookingInfo",{...t,primaryParticipant:{...t==null?void 0:t.primaryParticipant,email:e}})}async refetchAvailability(){const e=new Date,t=new Date(e.getFullYear(),e.getMonth(),1).getTime()/1e3,s=t<e.getTime()/1e3?Math.floor(e.getTime()/1e3):t,i=new Date(e.getFullYear(),e.getMonth()+1,1).getTime()/1e3;return await this.getAvailability(s,i)}async resetStoreStateAndFetchAvailability(){const e=new Date,t=await this.refetchAvailability(),s=this.schedulerStore.get("availability").find(n=>new Date(n.start_time)>new Date);let i=e;return s&&(i=s.start_time),this.schedulerStore.set("selectedDate",i),this.schedulerStore.set("eventInfo",null),this.schedulerStore.set("showBookingForm",!1),this.schedulerStore.set("selectedTimeslot",null),t}async setReschedule(e){this.schedulerStore.set("isLoading",!0);const t=this.schedulerStore.state.eventInfo;return t&&this.schedulerStore.set("reschedulingEventInfo",t),this.schedulerStore.set("rescheduleBookingId",e),await this.resetStoreStateAndFetchAvailability().finally(()=>{this.schedulerStore.set("isLoading",!1)})}async setCancel(e){this.schedulerStore.set("cancelBookingId",e)}async setReject(e){this.schedulerStore.set("rejectBookingId",e)}async resetCancel(){const e=await this.resetStoreStateAndFetchAvailability();return this.schedulerStore.set("cancelBookingId",""),this.schedulerStore.set("rejectBookingId",""),this.schedulerStore.set("cancelledEventInfo",null),e}async goBack(){this.schedulerStore.set("cancelBookingId","")}async resetConfirm(){const e=await this.resetStoreStateAndFetchAvailability();return this.schedulerStore.set("organizerConfirmationBookingId",""),this.schedulerStore.set("confirmedEventInfo",void 0),e}async bookTimeslot(e){var I;this.schedulerStore.set("isLoading",!0);const{selectedTimeslot:t,selectedTimezone:s,bookingInfo:i,selectedLanguage:n}=this.schedulerStore.state;if(!e&&!i)return{error:this.errors.component(l.instance.t("createBookingErrorTitle")).no_booking_info()};const r=(e==null?void 0:e.timeslot)||t;if(!r)return{error:this.errors.component(l.instance.t("createBookingErrorTitle")).no_timeslot_selected()};const o=e&&(e!=null&&e.timezone)?e==null?void 0:e.timezone:s,g=n||"en-US";if(!o)return{error:this.errors.component(l.instance.t("createBookingErrorTitle")).no_timezone_selected()};const h=this.schedulerStore.get("availabilityOrderEmails");let c="";if(h.length>0){const b=(r==null?void 0:r.emails)||[];for(let f=0;f<h.length;f++)if(b.includes(h[f])){c=h[f];break}}const d={};Object.entries((i==null?void 0:i.additionalFields)||{}).forEach(([b,f])=>{d[b]=f.value});const _=e?e==null?void 0:e.primaryParticipant:i==null?void 0:i.primaryParticipant,S=e?(e==null?void 0:e.guests)||[]:(i==null?void 0:i.guests)||[],p=e?e==null?void 0:e.additionalFields:d,T=this.getHeaders(),v=`/v3/scheduling/bookings${!this.sessionId&&this.configId?`?configuration_id=${this.configId}`:!this.sessionId&&this.slug&&this.clientId?`?slug=${this.slug}&client_id=${this.clientId}`:""}`,u=await this.makeAPIRequest(decodeURIComponent(v),"POST",JSON.stringify({participants:c?[{email:c}]:void 0,additional_fields:p,additional_guests:S,guest:{..._},start_time:r.start_time.getTime()/1e3,end_time:r.end_time.getTime()/1e3,timezone:o,email_language:this.getTwoLetterLanguageCode(g)}),T);if("error"in u){this.schedulerStore.set("isLoading",!1);const b=(I=u.error)==null?void 0:I.type;let f=u.error;if(b&&b in this.errors.api("Create Booking")){const E=this.getErrorMessage(f);f=this.errors.api("Create Booking")[b](E)}return{error:f}}return"data"in u&&this.schedulerStore.set("eventInfo",u==null?void 0:u.data),this.schedulerStore.set("isLoading",!1),u}async getUISettings(){var n;this.schedulerStore.set("isLoading",!0);const e=this.getHeaders(),s=`/v3/scheduling/ui-settings${!this.sessionId&&this.configId?`?configuration_id=${this.configId}`:!this.sessionId&&this.slug&&this.clientId?`?slug=${this.slug}&client_id=${this.clientId}`:""}`,i=await this.makeAPIRequest(s,"GET",void 0,e);if("error"in i){this.schedulerStore.set("isLoading",!1);const r=(n=i.error)==null?void 0:n.type;let o=i.error;return r&&r in this.errors.api(l.instance.t("getUISettingErrorTitle"))&&(o=this.errors.api(l.instance.t("getUISettingErrorTitle"))[r]((o==null?void 0:o.message)||(o==null?void 0:o.title)||"Something went wrong")),{error:o}}return"data"in i&&this.schedulerStore.set("configSettings",i.data),this.schedulerStore.set("isLoading",!1),i}getTwoLetterLanguageCode(e){return e.split("-")[0]}getStartTimeWithMinBookingNotice(e){var n;const t=(n=this.schedulerStore.get("configSettings"))==null?void 0:n.scheduler,s=t==null?void 0:t.min_booking_notice;if(!s)return e;const i=new Date().getTime();return e<(i+s*60*1e3)/1e3?Math.floor((i+s*60*1e3)/1e3):e}getEndTimeForAvailableDaysInFuture(e){var r,o;const t=new Date,s=(o=(r=this.schedulerStore.get("configSettings"))==null?void 0:r.scheduler)==null?void 0:o.available_days_in_future,i=Math.floor(l.addDaysToCurrentDate(t,s).getTime()/1e3);return Math.min(i,e)}async getAvailability(e=0,t=0){var _,S,p,T;this.schedulerStore.set("isLoading",!0);const s=new URLSearchParams,i=new Date,n=i.getTime();if(t&&t<n/1e3)return this.schedulerStore.set("isLoading",!1),{error:this.errors.component(l.instance.t("getAvailabilityErrorTitle")).endtime_not_in_future()};if(!e){const m=new Date(i.getFullYear(),i.getMonth(),1);e=Math.floor(m.getTime()/1e3)}if(!t){const m=new Date(i.getFullYear(),i.getMonth()+1,0);t=Math.floor(m.getTime()/1e3)}t=this.getEndTimeForAvailableDaysInFuture(t);const r=this.getStartTimeWithMinBookingNotice(e);e=r,t=r>t?r+1:t,s.append("start_time",encodeURIComponent(e.toString())),s.append("end_time",encodeURIComponent(t.toString())),this.configId&&!this.sessionId?s.append("configuration_id",encodeURIComponent(this.configId)):this.slug&&this.clientId&&!this.sessionId&&(s.append("slug",encodeURIComponent(this.slug)),s.append("client_id",encodeURIComponent(this.clientId)));const o=this.schedulerStore.get("rescheduleBookingId");o&&s.append("booking_id",encodeURIComponent(o));const g=s.toString(),h=`/v3/scheduling/availability${g?`?${g}`:""}`,c=this.getHeaders(),d=await this.makeAPIRequest(decodeURIComponent(h),"GET",void 0,c);if("error"in d){this.schedulerStore.set("availability",[]),this.schedulerStore.set("isLoading",!1);const m=(_=d.error)==null?void 0:_.type;let v=d.error;if(m&&m in this.errors.api(l.instance.t("getAvailabilityErrorTitle"))){const u=this.getErrorMessage(v);v=this.errors.api(l.instance.t("getAvailabilityErrorTitle"))[m](u)}return{error:v}}if("data"in d){const v=(((p=(S=d.data)==null?void 0:S.time_slots)==null?void 0:p.map(I=>({...I,start_time:new Date(I.start_time*1e3),end_time:new Date(I.end_time*1e3)})))||[]).filter(I=>I.start_time.getTime()>n);this.schedulerStore.set("availability",v);const u=((T=d.data)==null?void 0:T.order)||[];this.schedulerStore.set("availabilityOrderEmails",u)}return this.schedulerStore.set("isLoading",!1),d}async cancelBooking(e,t){var o;if(this.schedulerStore.set("isLoading",!0),!e)return{error:this.errors.component(l.instance.t("cancelBookingErrorTitle")).no_booking_id()};const s=!this.sessionId&&this.configId?`?configuration_id=${this.configId}`:!this.sessionId&&this.slug&&this.clientId?`?slug=${this.slug}&client_id=${this.clientId}`:"",i=`/v3/scheduling/bookings/${e}${s}`,n=this.getHeaders(),r=await this.makeAPIRequest(decodeURIComponent(i),"DELETE",JSON.stringify({action:"cancel",cancellation_reason:t}),n);if("error"in r){this.schedulerStore.set("isLoading",!1);const g=(o=r.error)==null?void 0:o.type;let h=r.error;if(g&&g in this.errors.api(l.instance.t("cancelBookingErrorTitle"))){const c=this.getErrorMessage(h);h=this.errors.api(l.instance.t("cancelBookingErrorTitle"))[g](c)}return{error:h}}return this.schedulerStore.set("cancelledEventInfo",{booking_id:e}),this.schedulerStore.set("rescheduleBookingId",""),this.schedulerStore.set("isLoading",!1),r}async rescheduleBooking(e,t){var B;if(this.schedulerStore.set("isLoading",!0),!e)return{error:this.errors.component(l.instance.t("rescheduleBookingErrorTitle")).no_booking_id()};const s=this.errors.api(l.instance.t("rescheduleBookingErrorTitle")),i=this.errors.component(l.instance.t("rescheduleBookingErrorTitle")),{bookingInfo:n,selectedTimeslot:r,selectedTimezone:o,selectedLanguage:g}=this.schedulerStore.state,{startTime:h,endTime:c,timezone:d}=t,_=h||(r==null?void 0:r.start_time);if(!_)return{error:i.invalid_start_time('Please pass "startTime" in data or set "selectedTimeslot" in the defaultSchedulerState.')};const S=c||(r==null?void 0:r.end_time);if(!S)return{error:i.invalid_end_time('Please pass "endTime" in data or set "selectedTimeslot" in the defaultSchedulerState.')};const p=this.schedulerStore.get("availabilityOrderEmails");let T="";if(p.length>0){const k=(r==null?void 0:r.emails)||[];for(let y=0;y<p.length;y++)if(k.includes(p[y])){T=p[y];break}}const m=d||o;if(!m)return{error:i.invalid_timezone('Please pass "timezone" in data or set "selectedTimezone" in the defaultSchedulerState.')};const v={};Object.entries((n==null?void 0:n.additionalFields)||{}).forEach(([k,y])=>{v[k]=y.value});const u=t?t==null?void 0:t.primaryParticipant:n==null?void 0:n.primaryParticipant,I=t?(t==null?void 0:t.guests)||[]:(n==null?void 0:n.guests)||[],b=t?t==null?void 0:t.additionalFields:v,f=!this.sessionId&&this.configId?`?configuration_id=${this.configId}`:!this.sessionId&&this.slug&&this.clientId?`?slug=${this.slug}&client_id=${this.clientId}`:"",E=`/v3/scheduling/bookings/${e}${f}`,P=this.getHeaders(),w=await this.makeAPIRequest(decodeURIComponent(E),"PATCH",JSON.stringify({start_time:_.getTime()/1e3,end_time:S.getTime()/1e3,timezone:m,additional_fields:b,guest:{...u},additional_guests:I,participants:T?[{email:T}]:void 0,email_language:this.getTwoLetterLanguageCode(g)}),P);if("error"in w){this.schedulerStore.set("isLoading",!1);const k=(B=w.error)==null?void 0:B.type;let y=w.error;if(k&&k in s){const C=this.getErrorMessage(y);y=s[k](C)}return{error:y}}const L=this.schedulerStore.get("reschedulingEventInfo");if("data"in w)this.schedulerStore.set("eventInfo",w==null?void 0:w.data);else if(L)this.schedulerStore.set("eventInfo",L);else{const k={booking_id:e};this.schedulerStore.set("eventInfo",k)}return this.schedulerStore.set("isLoading",!1),w}async updateBooking(e){var d;this.schedulerStore.set("isLoading",!0);const{bookingId:t,status:s,reason:i}=e,n=this.schedulerStore.get("organizerConfirmationSalt"),r=s==="confirmed"?l.instance.t("confirmBookingErrorTitle"):l.instance.t("rejectBookingErrorTitle");if(!t)return{error:this.errors.component(r).no_booking_id()};if(!n)return{error:this.errors.component(r).no_salt()};const o=!this.sessionId&&this.configId?`?configuration_id=${this.configId}`:!this.sessionId&&this.slug&&this.clientId?`?slug=${this.slug}&client_id=${this.clientId}`:"",g=`/v3/scheduling/bookings/${t}${o}`,h=this.getHeaders(),c=await this.makeAPIRequest(decodeURIComponent(g),"PUT",JSON.stringify({status:s,cancellation_reason:i,salt:n}),h);if("error"in c){this.schedulerStore.set("isLoading",!1);const _=(d=c.error)==null?void 0:d.type;let S=c.error;if(_&&_ in this.errors.api(r)){const p=this.getErrorMessage(S);S=this.errors.api(r)[_](p)}return{error:S}}return"data"in c&&s==="confirmed"?this.schedulerStore.set("confirmedEventInfo",c==null?void 0:c.data):"request_id"in c&&s==="cancelled"&&this.schedulerStore.set("cancelledEventInfo",{booking_id:t}),this.schedulerStore.set("organizerConfirmationBookingId",""),this.schedulerStore.set("isLoading",!1),c}}function $(a={}){const e={selectedDate:null,selectedLanguage:navigator.language,selectedTimezone:Intl.DateTimeFormat().resolvedOptions().timeZone,selectedTimeslot:null,showBookingForm:!1,availabilityOrderEmails:[],selectableDates:null,availability:[],eventDuration:0,state:"ready",eventInfo:null,cancelledEventInfo:null,isLoading:!1,nylasBranding:!0,...a};l.debug("[defaultNylasStoreState]: ",e);const t=l.createStore(e);return t.onChange("availability",s=>{l.debug("[availability]: ",s);const i=s.map(o=>o.start_time);l.debug("[selectableDates]: ",i),t.set("selectableDates",i);const n=s[0];if(!n)return;const r=Math.floor((n.end_time.getTime()-n.start_time.getTime())/6e4);l.debug("[durationMinutes]: ",r),t.set("eventDuration",r)}),t.reset=()=>{for(const s in e){const i=e[s];t.set(s,i)}},t}exports.CreateNylasSchedulerStore=$;exports.NylaSchedulerAPIConnector=z;
1
+ "use strict";const l=require("./index-92ba1b80.cjs");exports.ErrorCategory=void 0;(function(a){a.Component="component",a.Api="api",a.Auth="auth"})(exports.ErrorCategory||(exports.ErrorCategory={}));var D;(function(a){a.endtime_not_in_future="endtime_not_in_future",a.no_booking_info="no_booking_info",a.no_timeslot_selected="no_timeslot_selected",a.no_timezone_selected="no_timezone_selected",a.no_booking_id="no_booking_id",a.no_salt="no_salt",a.invalid_start_time="invalid_start_time",a.invalid_end_time="invalid_end_time",a.invalid_timezone="invalid_timezone"})(D||(D={}));var A;(function(a){a.invalid_session="invalid_session",a.general_error="general_error",a.internal_error="internal_error",a.invalid_request_error="invalid_request_error",a.timeslot_not_available="timeslot_not_available",a.provider_error="provider_error",a.not_found_error="not_found_error"})(A||(A={}));class M{constructor(){this.component=e=>{const t=exports.ErrorCategory.Component,s=`${e} Error`;return{endtime_not_in_future:(i='"endtime" can not be in the future')=>({title:s,message:i,category:t}),no_booking_info:(i="No booking info provided")=>({title:s,message:i,category:t}),no_timeslot_selected:(i="No timeslot selected")=>({title:s,message:i,category:t}),no_timezone_selected:(i="No timezone selected")=>({title:s,message:i,category:t}),no_booking_id:(i="No booking id provided")=>({title:s,message:i,category:t}),no_salt:(i="No salt provided")=>({title:s,message:i,category:t}),invalid_start_time:(i="Invalid start time")=>({title:s,message:i,category:t}),invalid_end_time:(i="Invalid end time")=>({title:s,message:i,category:t}),invalid_timezone:(i="Invalid timezone")=>({title:s,message:i,category:t})}},this.api=e=>{const t=exports.ErrorCategory.Api,s=`${e} Error`;return{invalid_session:i=>({title:s,message:i,category:t}),general_error:i=>({title:s,message:i,category:t}),internal_error:i=>({title:s,message:i,category:t}),invalid_request_error:i=>({title:s,message:i,category:t}),timeslot_not_available:i=>({title:s,message:i,category:t}),provider_error:i=>({title:s,message:i,category:t}),not_found_error:i=>({title:s,message:i,category:t})}}}}class z{constructor({schedulerAPIURL:e,schedulerStore:t,sessionId:s,configId:i,slug:n,clientId:r}){this.errors=new M,this.schedulerStore=t,this.schedulerAPIURL=e,this.sessionId=s,this.configId=i,this.slug=n,this.clientId=r}getHeaders(){return this.sessionId?{Authorization:`Bearer ${this.sessionId}`}:{}}async makeAPIRequest(e,t,s,i={}){try{const n=new URL(this.schedulerAPIURL),r="1.3.0";return n.pathname=e,await(await fetch(decodeURIComponent(n.toString()),{method:t,headers:{"Content-Type":"application/json",Origin:window.location.origin,"X-Source":"nylas-scheduling","X-Nylas-Web-Elements-Version":r,...i},body:s})).json()}catch(n){return{error:{message:n.message,title:"API request failed",type:"api"}}}}getErrorMessage(e){var s,i,n,r;let t=(e==null?void 0:e.message)||(e==null?void 0:e.title)||"Something went wrong";return(e==null?void 0:e.type)==="provider_error"&&(t=((i=(s=e==null?void 0:e.provider_error)==null?void 0:s.error)==null?void 0:i.message)||((r=(n=e==null?void 0:e.provider_error)==null?void 0:n.error)==null?void 0:r.title)||"Something went wrong"),t}setConfigId(e){this.configId=e}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)}selectLanguage(e){this.schedulerStore.set("selectedLanguage",e),l.instance.changeLanguage(e)}async toggleAdditionalData(e){e||await this.refetchAvailability(),this.schedulerStore.set("showBookingForm",e)}setParticipantName(e){const{bookingInfo:t}=this.schedulerStore.state;this.schedulerStore.set("bookingInfo",{...t,primaryParticipant:{...t==null?void 0:t.primaryParticipant,name:e}})}setParticipantEmail(e){const{bookingInfo:t}=this.schedulerStore.state;this.schedulerStore.set("bookingInfo",{...t,primaryParticipant:{...t==null?void 0:t.primaryParticipant,email:e}})}async refetchAvailability(){const e=new Date,t=new Date(e.getFullYear(),e.getMonth(),1).getTime()/1e3,s=t<e.getTime()/1e3?Math.floor(e.getTime()/1e3):t,i=new Date(e.getFullYear(),e.getMonth()+1,1).getTime()/1e3;return await this.getAvailability(s,i)}async resetStoreStateAndFetchAvailability(){const e=new Date,t=await this.refetchAvailability(),s=this.schedulerStore.get("availability").find(n=>new Date(n.start_time)>new Date);let i=e;return s&&(i=s.start_time),this.schedulerStore.set("selectedDate",i),this.schedulerStore.set("eventInfo",null),this.schedulerStore.set("showBookingForm",!1),this.schedulerStore.set("selectedTimeslot",null),t}async setReschedule(e){this.schedulerStore.set("isLoading",!0);const t=this.schedulerStore.state.eventInfo;return t&&this.schedulerStore.set("reschedulingEventInfo",t),this.schedulerStore.set("rescheduleBookingId",e),await this.resetStoreStateAndFetchAvailability().finally(()=>{this.schedulerStore.set("isLoading",!1)})}async setCancel(e){this.schedulerStore.set("cancelBookingId",e)}async setReject(e){this.schedulerStore.set("rejectBookingId",e)}async resetCancel(){const e=await this.resetStoreStateAndFetchAvailability();return this.schedulerStore.set("cancelBookingId",""),this.schedulerStore.set("rejectBookingId",""),this.schedulerStore.set("cancelledEventInfo",null),e}async goBack(){this.schedulerStore.set("cancelBookingId","")}async resetConfirm(){const e=await this.resetStoreStateAndFetchAvailability();return this.schedulerStore.set("organizerConfirmationBookingId",""),this.schedulerStore.set("confirmedEventInfo",void 0),e}async bookTimeslot(e){var I;this.schedulerStore.set("isLoading",!0);const{selectedTimeslot:t,selectedTimezone:s,bookingInfo:i,selectedLanguage:n}=this.schedulerStore.state;if(!e&&!i)return{error:this.errors.component(l.instance.t("createBookingErrorTitle")).no_booking_info()};const r=(e==null?void 0:e.timeslot)||t;if(!r)return{error:this.errors.component(l.instance.t("createBookingErrorTitle")).no_timeslot_selected()};const o=e&&(e!=null&&e.timezone)?e==null?void 0:e.timezone:s,g=n||"en-US";if(!o)return{error:this.errors.component(l.instance.t("createBookingErrorTitle")).no_timezone_selected()};const h=this.schedulerStore.get("availabilityOrderEmails");let c="";if(h.length>0){const b=(r==null?void 0:r.emails)||[];for(let f=0;f<h.length;f++)if(b.includes(h[f])){c=h[f];break}}const d={};Object.entries((i==null?void 0:i.additionalFields)||{}).forEach(([b,f])=>{d[b]=f.value});const _=e?e==null?void 0:e.primaryParticipant:i==null?void 0:i.primaryParticipant,S=e?(e==null?void 0:e.guests)||[]:(i==null?void 0:i.guests)||[],p=e?e==null?void 0:e.additionalFields:d,T=this.getHeaders(),v=`/v3/scheduling/bookings${!this.sessionId&&this.configId?`?configuration_id=${this.configId}`:!this.sessionId&&this.slug&&this.clientId?`?slug=${this.slug}&client_id=${this.clientId}`:""}`,u=await this.makeAPIRequest(decodeURIComponent(v),"POST",JSON.stringify({participants:c?[{email:c}]:void 0,additional_fields:p,additional_guests:S,guest:{..._},start_time:r.start_time.getTime()/1e3,end_time:r.end_time.getTime()/1e3,timezone:o,email_language:this.getTwoLetterLanguageCode(g)}),T);if("error"in u){this.schedulerStore.set("isLoading",!1);const b=(I=u.error)==null?void 0:I.type;let f=u.error;if(b&&b in this.errors.api("Create Booking")){const E=this.getErrorMessage(f);f=this.errors.api("Create Booking")[b](E)}return{error:f}}return"data"in u&&this.schedulerStore.set("eventInfo",u==null?void 0:u.data),this.schedulerStore.set("isLoading",!1),u}async getUISettings(){var n;this.schedulerStore.set("isLoading",!0);const e=this.getHeaders(),s=`/v3/scheduling/ui-settings${!this.sessionId&&this.configId?`?configuration_id=${this.configId}`:!this.sessionId&&this.slug&&this.clientId?`?slug=${this.slug}&client_id=${this.clientId}`:""}`,i=await this.makeAPIRequest(s,"GET",void 0,e);if("error"in i){this.schedulerStore.set("isLoading",!1);const r=(n=i.error)==null?void 0:n.type;let o=i.error;return r&&r in this.errors.api(l.instance.t("getUISettingErrorTitle"))&&(o=this.errors.api(l.instance.t("getUISettingErrorTitle"))[r]((o==null?void 0:o.message)||(o==null?void 0:o.title)||"Something went wrong")),{error:o}}return"data"in i&&this.schedulerStore.set("configSettings",i.data),this.schedulerStore.set("isLoading",!1),i}getTwoLetterLanguageCode(e){return e.split("-")[0]}getStartTimeWithMinBookingNotice(e){var n;const t=(n=this.schedulerStore.get("configSettings"))==null?void 0:n.scheduler,s=t==null?void 0:t.min_booking_notice;if(!s)return e;const i=new Date().getTime();return e<(i+s*60*1e3)/1e3?Math.floor((i+s*60*1e3)/1e3):e}getEndTimeForAvailableDaysInFuture(e){var r,o;const t=new Date,s=(o=(r=this.schedulerStore.get("configSettings"))==null?void 0:r.scheduler)==null?void 0:o.available_days_in_future,i=Math.floor(l.addDaysToCurrentDate(t,s).getTime()/1e3);return Math.min(i,e)}async getAvailability(e=0,t=0){var _,S,p,T;this.schedulerStore.set("isLoading",!0);const s=new URLSearchParams,i=new Date,n=i.getTime();if(t&&t<n/1e3)return this.schedulerStore.set("isLoading",!1),{error:this.errors.component(l.instance.t("getAvailabilityErrorTitle")).endtime_not_in_future()};if(!e){const m=new Date(i.getFullYear(),i.getMonth(),1);e=Math.floor(m.getTime()/1e3)}if(!t){const m=new Date(i.getFullYear(),i.getMonth()+1,0);t=Math.floor(m.getTime()/1e3)}t=this.getEndTimeForAvailableDaysInFuture(t);const r=this.getStartTimeWithMinBookingNotice(e);e=r,t=r>t?r+1:t,s.append("start_time",encodeURIComponent(e.toString())),s.append("end_time",encodeURIComponent(t.toString())),this.configId&&!this.sessionId?s.append("configuration_id",encodeURIComponent(this.configId)):this.slug&&this.clientId&&!this.sessionId&&(s.append("slug",encodeURIComponent(this.slug)),s.append("client_id",encodeURIComponent(this.clientId)));const o=this.schedulerStore.get("rescheduleBookingId");o&&s.append("booking_id",encodeURIComponent(o));const g=s.toString(),h=`/v3/scheduling/availability${g?`?${g}`:""}`,c=this.getHeaders(),d=await this.makeAPIRequest(decodeURIComponent(h),"GET",void 0,c);if("error"in d){this.schedulerStore.set("availability",[]),this.schedulerStore.set("isLoading",!1);const m=(_=d.error)==null?void 0:_.type;let v=d.error;if(m&&m in this.errors.api(l.instance.t("getAvailabilityErrorTitle"))){const u=this.getErrorMessage(v);v=this.errors.api(l.instance.t("getAvailabilityErrorTitle"))[m](u)}return{error:v}}if("data"in d){const v=(((p=(S=d.data)==null?void 0:S.time_slots)==null?void 0:p.map(I=>({...I,start_time:new Date(I.start_time*1e3),end_time:new Date(I.end_time*1e3)})))||[]).filter(I=>I.start_time.getTime()>n);this.schedulerStore.set("availability",v);const u=((T=d.data)==null?void 0:T.order)||[];this.schedulerStore.set("availabilityOrderEmails",u)}return this.schedulerStore.set("isLoading",!1),d}async cancelBooking(e,t){var o;if(this.schedulerStore.set("isLoading",!0),!e)return{error:this.errors.component(l.instance.t("cancelBookingErrorTitle")).no_booking_id()};const s=!this.sessionId&&this.configId?`?configuration_id=${this.configId}`:!this.sessionId&&this.slug&&this.clientId?`?slug=${this.slug}&client_id=${this.clientId}`:"",i=`/v3/scheduling/bookings/${e}${s}`,n=this.getHeaders(),r=await this.makeAPIRequest(decodeURIComponent(i),"DELETE",JSON.stringify({action:"cancel",cancellation_reason:t}),n);if("error"in r){this.schedulerStore.set("isLoading",!1);const g=(o=r.error)==null?void 0:o.type;let h=r.error;if(g&&g in this.errors.api(l.instance.t("cancelBookingErrorTitle"))){const c=this.getErrorMessage(h);h=this.errors.api(l.instance.t("cancelBookingErrorTitle"))[g](c)}return{error:h}}return this.schedulerStore.set("cancelledEventInfo",{booking_id:e}),this.schedulerStore.set("rescheduleBookingId",""),this.schedulerStore.set("isLoading",!1),r}async rescheduleBooking(e,t){var B;if(this.schedulerStore.set("isLoading",!0),!e)return{error:this.errors.component(l.instance.t("rescheduleBookingErrorTitle")).no_booking_id()};const s=this.errors.api(l.instance.t("rescheduleBookingErrorTitle")),i=this.errors.component(l.instance.t("rescheduleBookingErrorTitle")),{bookingInfo:n,selectedTimeslot:r,selectedTimezone:o,selectedLanguage:g}=this.schedulerStore.state,{startTime:h,endTime:c,timezone:d}=t,_=h||(r==null?void 0:r.start_time);if(!_)return{error:i.invalid_start_time('Please pass "startTime" in data or set "selectedTimeslot" in the defaultSchedulerState.')};const S=c||(r==null?void 0:r.end_time);if(!S)return{error:i.invalid_end_time('Please pass "endTime" in data or set "selectedTimeslot" in the defaultSchedulerState.')};const p=this.schedulerStore.get("availabilityOrderEmails");let T="";if(p.length>0){const k=(r==null?void 0:r.emails)||[];for(let y=0;y<p.length;y++)if(k.includes(p[y])){T=p[y];break}}const m=d||o;if(!m)return{error:i.invalid_timezone('Please pass "timezone" in data or set "selectedTimezone" in the defaultSchedulerState.')};const v={};Object.entries((n==null?void 0:n.additionalFields)||{}).forEach(([k,y])=>{v[k]=y.value});const u=t?t==null?void 0:t.primaryParticipant:n==null?void 0:n.primaryParticipant,I=t?(t==null?void 0:t.guests)||[]:(n==null?void 0:n.guests)||[],b=t?t==null?void 0:t.additionalFields:v,f=!this.sessionId&&this.configId?`?configuration_id=${this.configId}`:!this.sessionId&&this.slug&&this.clientId?`?slug=${this.slug}&client_id=${this.clientId}`:"",E=`/v3/scheduling/bookings/${e}${f}`,P=this.getHeaders(),w=await this.makeAPIRequest(decodeURIComponent(E),"PATCH",JSON.stringify({start_time:_.getTime()/1e3,end_time:S.getTime()/1e3,timezone:m,additional_fields:b,guest:{...u},additional_guests:I,participants:T?[{email:T}]:void 0,email_language:this.getTwoLetterLanguageCode(g)}),P);if("error"in w){this.schedulerStore.set("isLoading",!1);const k=(B=w.error)==null?void 0:B.type;let y=w.error;if(k&&k in s){const C=this.getErrorMessage(y);y=s[k](C)}return{error:y}}const L=this.schedulerStore.get("reschedulingEventInfo");if("data"in w)this.schedulerStore.set("eventInfo",w==null?void 0:w.data);else if(L)this.schedulerStore.set("eventInfo",L);else{const k={booking_id:e};this.schedulerStore.set("eventInfo",k)}return this.schedulerStore.set("isLoading",!1),w}async updateBooking(e){var d;this.schedulerStore.set("isLoading",!0);const{bookingId:t,status:s,reason:i}=e,n=this.schedulerStore.get("organizerConfirmationSalt"),r=s==="confirmed"?l.instance.t("confirmBookingErrorTitle"):l.instance.t("rejectBookingErrorTitle");if(!t)return{error:this.errors.component(r).no_booking_id()};if(!n)return{error:this.errors.component(r).no_salt()};const o=!this.sessionId&&this.configId?`?configuration_id=${this.configId}`:!this.sessionId&&this.slug&&this.clientId?`?slug=${this.slug}&client_id=${this.clientId}`:"",g=`/v3/scheduling/bookings/${t}${o}`,h=this.getHeaders(),c=await this.makeAPIRequest(decodeURIComponent(g),"PUT",JSON.stringify({status:s,cancellation_reason:i,salt:n}),h);if("error"in c){this.schedulerStore.set("isLoading",!1);const _=(d=c.error)==null?void 0:d.type;let S=c.error;if(_&&_ in this.errors.api(r)){const p=this.getErrorMessage(S);S=this.errors.api(r)[_](p)}return{error:S}}return"data"in c&&s==="confirmed"?this.schedulerStore.set("confirmedEventInfo",c==null?void 0:c.data):"request_id"in c&&s==="cancelled"&&this.schedulerStore.set("cancelledEventInfo",{booking_id:t}),this.schedulerStore.set("organizerConfirmationBookingId",""),this.schedulerStore.set("isLoading",!1),c}}function $(a={}){const e={selectedDate:null,selectedLanguage:navigator.language,selectedTimezone:Intl.DateTimeFormat().resolvedOptions().timeZone,selectedTimeslot:null,showBookingForm:!1,availabilityOrderEmails:[],selectableDates:null,availability:[],eventDuration:0,state:"ready",eventInfo:null,cancelledEventInfo:null,isLoading:!1,nylasBranding:!0,...a};l.debug("[defaultNylasStoreState]: ",e);const t=l.createStore(e);return t.onChange("availability",s=>{l.debug("[availability]: ",s);const i=s.map(o=>o.start_time);l.debug("[selectableDates]: ",i),t.set("selectableDates",i);const n=s[0];if(!n)return;const r=Math.floor((n.end_time.getTime()-n.start_time.getTime())/6e4);l.debug("[durationMinutes]: ",r),t.set("eventDuration",r)}),t.reset=()=>{for(const s in e){const i=e[s];t.set(s,i)}},t}exports.CreateNylasSchedulerStore=$;exports.NylaSchedulerAPIConnector=z;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-bec58f1d.cjs");require("react");require("react-dom");const i=".sc-sent-icon-h{display:flex}",o=i,e=class{constructor(s){t.registerInstance(this,s),this.width="15",this.height="15"}render(){return t.h("svg",{key:"ca3a664814e986f46006171c0fb63441478ef5b8",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},t.h("path",{key:"e4d9309797e02ca60918d49c55854d51f93c1a2b",d:"M21.5 12L3.5 3.5L3.5 20.5L21.5 12Z",stroke:"auto","stroke-width":"1.5"}),t.h("path",{key:"082bf637872a00ba8abe224cc7c8092dc371ea75",d:"M3.5 3.5L12 10.5",stroke:"auto","stroke-width":"1.5"}),t.h("path",{key:"dd3f5647d7cdb9dfbdb480ab332917564969f546",d:"M3.5 20.5L12 13.5",stroke:"auto","stroke-width":"1.5"}))}};e.style=o;exports.sent_icon=e;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-92ba1b80.cjs");require("react");require("react-dom");const i=".sc-sent-icon-h{display:flex}",o=i,e=class{constructor(s){t.registerInstance(this,s),this.width="15",this.height="15"}render(){return t.h("svg",{key:"ca3a664814e986f46006171c0fb63441478ef5b8",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},t.h("path",{key:"e4d9309797e02ca60918d49c55854d51f93c1a2b",d:"M21.5 12L3.5 3.5L3.5 20.5L21.5 12Z",stroke:"auto","stroke-width":"1.5"}),t.h("path",{key:"082bf637872a00ba8abe224cc7c8092dc371ea75",d:"M3.5 3.5L12 10.5",stroke:"auto","stroke-width":"1.5"}),t.h("path",{key:"dd3f5647d7cdb9dfbdb480ab332917564969f546",d:"M3.5 20.5L12 13.5",stroke:"auto","stroke-width":"1.5"}))}};e.style=o;exports.sent_icon=e;
@@ -1,4 +1,4 @@
1
- import { r as s, h as t } from "./index-9dc1bd32.js";
1
+ import { r as s, h as t } from "./index-72501df0.js";
2
2
  import "react";
3
3
  import "react-dom";
4
4
  const o = ".sc-sent-icon-h{display:flex}", i = o, c = class {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-bec58f1d.cjs");require("react");require("react-dom");const c=".sc-spam-icon-h{display:flex}",i=c,t=class{constructor(s){e.registerInstance(this,s),this.width="15",this.height="15"}render(){return e.h("svg",{key:"a8e87346312ed75a47b88790585e07d8c518c3e9",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"5cb3444afa08fc37a8cf2e268c62faf5c97379f5",d:"M20 3H4C2.89543 3 2 3.89543 2 5V19C2 20.1046 2.89543 21 4 21H20C21.1046 21 22 20.1046 22 19V5C22 3.89543 21.1046 3 20 3Z",stroke:"auto","stroke-width":"1.5"}),e.h("path",{key:"b695c0e7aa34cf44da99cce51c17ff98b3ad8906",d:"M2 5L12 12.5L22 5",stroke:"auto","stroke-width":"1.5"}))}};t.style=i;exports.spam_icon=t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-92ba1b80.cjs");require("react");require("react-dom");const c=".sc-spam-icon-h{display:flex}",i=c,t=class{constructor(s){e.registerInstance(this,s),this.width="15",this.height="15"}render(){return e.h("svg",{key:"a8e87346312ed75a47b88790585e07d8c518c3e9",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"5cb3444afa08fc37a8cf2e268c62faf5c97379f5",d:"M20 3H4C2.89543 3 2 3.89543 2 5V19C2 20.1046 2.89543 21 4 21H20C21.1046 21 22 20.1046 22 19V5C22 3.89543 21.1046 3 20 3Z",stroke:"auto","stroke-width":"1.5"}),e.h("path",{key:"b695c0e7aa34cf44da99cce51c17ff98b3ad8906",d:"M2 5L12 12.5L22 5",stroke:"auto","stroke-width":"1.5"}))}};t.style=i;exports.spam_icon=t;
@@ -1,4 +1,4 @@
1
- import { r as e, h as t } from "./index-9dc1bd32.js";
1
+ import { r as e, h as t } from "./index-72501df0.js";
2
2
  import "react";
3
3
  import "react-dom";
4
4
  const c = ".sc-spam-icon-h{display:flex}", a = c, o = class {
@@ -1,4 +1,4 @@
1
- import { r as e, h as t } from "./index-9dc1bd32.js";
1
+ import { r as e, h as t } from "./index-72501df0.js";
2
2
  import "react";
3
3
  import "react-dom";
4
4
  const a = ".sc-star-icon-h{display:flex}", c = a, i = class {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-bec58f1d.cjs");require("react");require("react-dom");const i=".sc-star-icon-h{display:flex}",c=i,e=class{constructor(s){t.registerInstance(this,s),this.width="15",this.height="15"}render(){return t.h("svg",{key:"acc7e88e0901acac79fd0bf4a3a355ea82b46934",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},t.h("path",{key:"a3a8ed61cce35a1f67c5aa22cb0aee42c965474e",d:"M9.15316 5.40838C10.4198 3.13613 11.0531 2 12 2C12.9469 2 13.5802 3.13612 14.8468 5.40837L15.1745 5.99623C15.5345 6.64193 15.7144 6.96479 15.9951 7.17781C16.2757 7.39083 16.6251 7.4699 17.3241 7.62805L17.9605 7.77203C20.4201 8.32856 21.65 8.60682 21.9426 9.54773C22.2352 10.4886 21.3968 11.4691 19.7199 13.4299L19.2861 13.9372C18.8096 14.4944 18.5713 14.773 18.4641 15.1177C18.357 15.4624 18.393 15.8341 18.465 16.5776L18.5306 17.2544C18.7841 19.8706 18.9109 21.1787 18.1449 21.7602C17.3788 22.3417 16.2273 21.8115 13.9243 20.7512L13.3285 20.4768C12.6741 20.1755 12.3469 20.0248 12 20.0248C11.6531 20.0248 11.3259 20.1755 10.6715 20.4768L10.0757 20.7512C7.77268 21.8115 6.62118 22.3417 5.85515 21.7602C5.08912 21.1787 5.21588 19.8706 5.4694 17.2544L5.53498 16.5776C5.60703 15.8341 5.64305 15.4624 5.53586 15.1177C5.42868 14.773 5.19043 14.4944 4.71392 13.9372L4.2801 13.4299C2.60325 11.4691 1.76482 10.4886 2.05742 9.54773C2.35002 8.60682 3.57986 8.32856 6.03954 7.77203L6.67589 7.62805C7.37485 7.4699 7.72433 7.39083 8.00494 7.17781C8.28555 6.96479 8.46553 6.64194 8.82547 5.99623L9.15316 5.40838Z",stroke:"auto","stroke-width":"1.5"}))}};e.style=c;exports.star_icon=e;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-92ba1b80.cjs");require("react");require("react-dom");const i=".sc-star-icon-h{display:flex}",c=i,e=class{constructor(s){t.registerInstance(this,s),this.width="15",this.height="15"}render(){return t.h("svg",{key:"acc7e88e0901acac79fd0bf4a3a355ea82b46934",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},t.h("path",{key:"a3a8ed61cce35a1f67c5aa22cb0aee42c965474e",d:"M9.15316 5.40838C10.4198 3.13613 11.0531 2 12 2C12.9469 2 13.5802 3.13612 14.8468 5.40837L15.1745 5.99623C15.5345 6.64193 15.7144 6.96479 15.9951 7.17781C16.2757 7.39083 16.6251 7.4699 17.3241 7.62805L17.9605 7.77203C20.4201 8.32856 21.65 8.60682 21.9426 9.54773C22.2352 10.4886 21.3968 11.4691 19.7199 13.4299L19.2861 13.9372C18.8096 14.4944 18.5713 14.773 18.4641 15.1177C18.357 15.4624 18.393 15.8341 18.465 16.5776L18.5306 17.2544C18.7841 19.8706 18.9109 21.1787 18.1449 21.7602C17.3788 22.3417 16.2273 21.8115 13.9243 20.7512L13.3285 20.4768C12.6741 20.1755 12.3469 20.0248 12 20.0248C11.6531 20.0248 11.3259 20.1755 10.6715 20.4768L10.0757 20.7512C7.77268 21.8115 6.62118 22.3417 5.85515 21.7602C5.08912 21.1787 5.21588 19.8706 5.4694 17.2544L5.53498 16.5776C5.60703 15.8341 5.64305 15.4624 5.53586 15.1177C5.42868 14.773 5.19043 14.4944 4.71392 13.9372L4.2801 13.4299C2.60325 11.4691 1.76482 10.4886 2.05742 9.54773C2.35002 8.60682 3.57986 8.32856 6.03954 7.77203L6.67589 7.62805C7.37485 7.4699 7.72433 7.39083 8.00494 7.17781C8.28555 6.96479 8.46553 6.64194 8.82547 5.99623L9.15316 5.40838Z",stroke:"auto","stroke-width":"1.5"}))}};e.style=c;exports.star_icon=e;
@@ -1,4 +1,4 @@
1
- import { r as s, h as t } from "./index-9dc1bd32.js";
1
+ import { r as s, h as t } from "./index-72501df0.js";
2
2
  import "react";
3
3
  import "react-dom";
4
4
  const e = ".sc-stop-icon-h{display:flex}", i = e, c = class {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-bec58f1d.cjs");require("react");require("react-dom");const s=".sc-stop-icon-h{display:flex}",i=s,e=class{constructor(o){t.registerInstance(this,o),this.width="15",this.height="15"}render(){return t.h("svg",{key:"f70cc744dde889a32cc0339cf4be41ae38237d0b",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},t.h("path",{key:"f7bd4f78d4e2efc797932d91aac355e0f9d4f309",d:"M4 4H20V20H4V4Z",stroke:"auto","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))}};e.style=i;exports.stop_icon=e;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-92ba1b80.cjs");require("react");require("react-dom");const s=".sc-stop-icon-h{display:flex}",i=s,e=class{constructor(o){t.registerInstance(this,o),this.width="15",this.height="15"}render(){return t.h("svg",{key:"f70cc744dde889a32cc0339cf4be41ae38237d0b",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},t.h("path",{key:"f7bd4f78d4e2efc797932d91aac355e0f9d4f309",d:"M4 4H20V20H4V4Z",stroke:"auto","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))}};e.style=i;exports.stop_icon=e;
@@ -1,4 +1,4 @@
1
- import { r as s, c as l, t as r, h as a } from "./index-9dc1bd32.js";
1
+ import { r as s, c as l, t as r, h as a } from "./index-72501df0.js";
2
2
  import "react";
3
3
  import "react-dom";
4
4
  const i = ':host{display:block;--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;width:100%}label{display:flex;color:var(--nylas-base-800, #293056);font-size:14px;font-style:normal;font-weight:400;line-height:150%;flex-direction:column;gap:4px;font-family:var(--nylas-font-family);font-size:16px;color:var(--nylas-base-800)}label.error{color:var(--nylas-error)}label span.required{color:var(--nylas-error);padding:0 0.25rem}label p{margin:0;display:flex;gap:4px;align-items:center}label .error{color:var(--nylas-error)}textarea{display:flex;height:48px;padding-left:16px;align-items:center;gap:8px;align-self:stretch;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-300);background:var(--nylas-base-0);width:-webkit-fill-available;color:var(--nylas-base-900);font-size:16px;font-style:normal;font-weight:400;line-height:150%;padding:12px 16px;border-width:1;resize:vertical;border-radius:8px;font-family:var(--nylas-font-family);font-size:16px;line-height:24px}textarea:focus{outline-color:var(--nylas-primary)}textarea.error{border-radius:var(--nylas-border-radius-2x);font-weight:600;border-color:var(--nylas-error);border-width:2px}textarea.error::placeholder{font-weight:400}textarea::placeholder{color:var(--nylas-base-300)}textarea::-webkit-resizer{display:none}', n = i, o = class {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-bec58f1d.cjs");require("react");require("react-dom");const s=':host{display:block;--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;width:100%}label{display:flex;color:var(--nylas-base-800, #293056);font-size:14px;font-style:normal;font-weight:400;line-height:150%;flex-direction:column;gap:4px;font-family:var(--nylas-font-family);font-size:16px;color:var(--nylas-base-800)}label.error{color:var(--nylas-error)}label span.required{color:var(--nylas-error);padding:0 0.25rem}label p{margin:0;display:flex;gap:4px;align-items:center}label .error{color:var(--nylas-error)}textarea{display:flex;height:48px;padding-left:16px;align-items:center;gap:8px;align-self:stretch;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-300);background:var(--nylas-base-0);width:-webkit-fill-available;color:var(--nylas-base-900);font-size:16px;font-style:normal;font-weight:400;line-height:150%;padding:12px 16px;border-width:1;resize:vertical;border-radius:8px;font-family:var(--nylas-font-family);font-size:16px;line-height:24px}textarea:focus{outline-color:var(--nylas-primary)}textarea.error{border-radius:var(--nylas-border-radius-2x);font-weight:600;border-color:var(--nylas-error);border-width:2px}textarea.error::placeholder{font-weight:400}textarea::placeholder{color:var(--nylas-base-300)}textarea::-webkit-resizer{display:none}',l=s,r=class{constructor(a){e.registerInstance(this,a),this.nylasFormInputChanged=e.createEvent(this,"nylasFormInputChanged",7),this.name="textarea",this.defaultValue=void 0,this.label="",this.placeholder="",this.required=!1,this.readOnly=!1,this.autoFocus=!1,this.maxLength=255,this.type="multi_line_text",this.tooltip="",this.value="",this.error=""}componentDidLoad(){this.value=e.sanitize(this.defaultValue||"")}handleBookingFormSubmitted(a){this.validate(this.value),this.error&&a.preventDefault()}handletriggerValidation(a){this.validate(this.value),this.error&&a.preventDefault()}handleInput(a){const t=a.target;this.value=e.sanitize(t.value),this.nylasFormInputChanged.emit({value:this.value,name:this.name,error:this.error,label:this.label,type:this.type})}validate(a){this.required&&!a?this.error=`${this.label} is required.`:a.length>this.maxLength?this.error=`${this.label} cannot exceed ${this.maxLength} characters.`:this.error=""}render(){return e.h("label",{key:"503a9e472a4dea351f13d8e430a0ee9ecc20e3fb",part:"tc__label",class:{error:!!this.error}},e.h("p",{key:"7ce9a57c8e2dc9d0c3a88edf93ba09a3b49cf149"},e.h("span",{key:"8feedbb7300d0eb20192b17a0482f9c981bba120",class:"label"},this.label),this.required&&e.h("span",{class:"required"},"*"),this.tooltip&&e.h("tooltip-component",null,e.h("info-icon",{slot:"tooltip-icon"}),e.h("span",{slot:"tooltip-content"},this.tooltip))),e.h("textarea",{key:"79dd6889c5da4797b26504731583db5887c21bcb",name:this.name,placeholder:this.placeholder,readOnly:this.readOnly,autoFocus:this.autoFocus,value:this.value,maxLength:this.maxLength,onInput:a=>this.handleInput(a),class:{error:!!this.error},part:"tc__textarea"}),this.error&&e.h("span",{class:"error help-text"},this.error))}};r.style=l;exports.textarea_component=r;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-92ba1b80.cjs");require("react");require("react-dom");const s=':host{display:block;--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;width:100%}label{display:flex;color:var(--nylas-base-800, #293056);font-size:14px;font-style:normal;font-weight:400;line-height:150%;flex-direction:column;gap:4px;font-family:var(--nylas-font-family);font-size:16px;color:var(--nylas-base-800)}label.error{color:var(--nylas-error)}label span.required{color:var(--nylas-error);padding:0 0.25rem}label p{margin:0;display:flex;gap:4px;align-items:center}label .error{color:var(--nylas-error)}textarea{display:flex;height:48px;padding-left:16px;align-items:center;gap:8px;align-self:stretch;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-300);background:var(--nylas-base-0);width:-webkit-fill-available;color:var(--nylas-base-900);font-size:16px;font-style:normal;font-weight:400;line-height:150%;padding:12px 16px;border-width:1;resize:vertical;border-radius:8px;font-family:var(--nylas-font-family);font-size:16px;line-height:24px}textarea:focus{outline-color:var(--nylas-primary)}textarea.error{border-radius:var(--nylas-border-radius-2x);font-weight:600;border-color:var(--nylas-error);border-width:2px}textarea.error::placeholder{font-weight:400}textarea::placeholder{color:var(--nylas-base-300)}textarea::-webkit-resizer{display:none}',l=s,r=class{constructor(a){e.registerInstance(this,a),this.nylasFormInputChanged=e.createEvent(this,"nylasFormInputChanged",7),this.name="textarea",this.defaultValue=void 0,this.label="",this.placeholder="",this.required=!1,this.readOnly=!1,this.autoFocus=!1,this.maxLength=255,this.type="multi_line_text",this.tooltip="",this.value="",this.error=""}componentDidLoad(){this.value=e.sanitize(this.defaultValue||"")}handleBookingFormSubmitted(a){this.validate(this.value),this.error&&a.preventDefault()}handletriggerValidation(a){this.validate(this.value),this.error&&a.preventDefault()}handleInput(a){const t=a.target;this.value=e.sanitize(t.value),this.nylasFormInputChanged.emit({value:this.value,name:this.name,error:this.error,label:this.label,type:this.type})}validate(a){this.required&&!a?this.error=`${this.label} is required.`:a.length>this.maxLength?this.error=`${this.label} cannot exceed ${this.maxLength} characters.`:this.error=""}render(){return e.h("label",{key:"503a9e472a4dea351f13d8e430a0ee9ecc20e3fb",part:"tc__label",class:{error:!!this.error}},e.h("p",{key:"7ce9a57c8e2dc9d0c3a88edf93ba09a3b49cf149"},e.h("span",{key:"8feedbb7300d0eb20192b17a0482f9c981bba120",class:"label"},this.label),this.required&&e.h("span",{class:"required"},"*"),this.tooltip&&e.h("tooltip-component",null,e.h("info-icon",{slot:"tooltip-icon"}),e.h("span",{slot:"tooltip-content"},this.tooltip))),e.h("textarea",{key:"79dd6889c5da4797b26504731583db5887c21bcb",name:this.name,placeholder:this.placeholder,readOnly:this.readOnly,autoFocus:this.autoFocus,value:this.value,maxLength:this.maxLength,onInput:a=>this.handleInput(a),class:{error:!!this.error},part:"tc__textarea"}),this.error&&e.h("span",{class:"error help-text"},this.error))}};r.style=l;exports.textarea_component=r;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-bec58f1d.cjs");require("react");require("react-dom");const s=".time-period-selector.sc-time-period-selector{display:grid;gap:0.5rem;grid-template-columns:auto 1fr}.time-period-selector.sc-time-period-selector select-dropdown.sc-time-period-selector,.time-period-selector.sc-time-period-selector input-dropdown.sc-time-period-selector{border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}.time-period-selector.sc-time-period-selector select-dropdown.sc-time-period-selector{width:116px}.time-period-selector.sc-time-period-selector input-dropdown.sc-time-period-selector{width:84px;display:flex;align-items:center}.time-period-selector.sc-time-period-selector select-dropdown#time-period.sc-time-period-selector::part(sd_dropdown-button){width:100%}.time-period-selector.sc-time-period-selector input-dropdown.sc-time-period-selector::part(id_dropdown){width:inherit;height:100%}.time-period-selector.sc-time-period-selector input-dropdown#time-number.sc-time-period-selector::part(id_dropdown-input){border:none;border-radius:var(--nylas-border-radius-2x)}.time-period-selector.sc-time-period-selector input-dropdown.sc-time-period-selector::part(id_dropdown-input){padding:17px;gap:1rem}.time-period-selector.sc-time-period-selector input-dropdown.sc-time-period-selector::part(id_dropdown-content){width:100%;max-height:200px}.time-period-selector.sc-time-period-selector select-dropdown.sc-time-period-selector::part(sd_dropdown){width:inherit}.time-period-selector.sc-time-period-selector select-dropdown.sc-time-period-selector::part(sd_dropdown-button){padding:1rem;gap:1rem;justify-content:space-between}.time-period-selector.sc-time-period-selector select-dropdown.sc-time-period-selector::part(sd_dropdown-content){width:100%;max-height:200px}",n=s,p={hours:"hour",days:"day",weeks:"week",months:"month"},d=class{constructor(r){i.registerInstance(this,r),this.timePeriodChanged=i.createEvent(this,"timePeriodChanged",7),this.timePeriods=["hour","day","week","month"],this.defaultSelectedPeriod=void 0,this.defaultSelectedNumber=void 0,this.selectedPeriod=this.defaultSelectedPeriod,this.selectedNumber=this.defaultSelectedNumber,this.numberOptions=this.calculateOptions(this.defaultSelectedPeriod||"hour").map(e=>({label:e.toString(),value:e.toString()})),this.timePeriodOptions=this.timePeriods.map(e=>({label:e,value:e}))}componentDidLoad(){this.selectedNumber=this.defaultSelectedNumber,this.selectedPeriod=this.defaultSelectedPeriod;const r=p[this.selectedPeriod]??this.selectedPeriod,e=this.calculateOptions(r);this.numberOptions=e.map(t=>({label:t.toString(),value:t.toString()}))}calculateOptions(r){switch(r){case"hour":return Array.from({length:23},(e,t)=>t+1);case"minute":return Array.from({length:13},(e,t)=>t*5);case"day":return Array.from({length:30},(e,t)=>t+1);case"week":return Array.from({length:4},(e,t)=>t+1);case"month":return Array.from({length:12},(e,t)=>t+1);default:return[]}}inputOptionChangedHandler(r){i.debug("time-period-selector","inputOptionChangedHandler",r.detail);const{value:e,name:t}=r.detail;t==="time-number"&&(this.selectedNumber=e?parseInt(e):this.defaultSelectedNumber);const o={number:this.selectedNumber,period:this.selectedPeriod};this.timePeriodChanged.emit(o)}nylasFormDropdownChangedHandler(r){i.debug("time-period-selector","nylasFormDropdownChangedHandler",r.detail);const{value:e,name:t}=r.detail;t==="time-period"?(this.selectedPeriod=e,this.updateNumberOptionsAndSelectedNumber(e)):t==="time-number"&&(this.selectedNumber=parseInt(e));const o={number:this.selectedNumber,period:this.selectedPeriod};this.timePeriodChanged.emit(o)}updateNumberOptionsAndSelectedNumber(r){const e=this.calculateOptions(r);this.numberOptions=e.map(t=>({label:t.toString(),value:t.toString()})),this.selectedNumber=parseInt(this.numberOptions[0].value)}render(){return i.h("div",{key:"7202ca7c6b64a08199ec356eb409b247b865683b",class:"time-period-selector"},typeof this.selectedNumber=="number"&&i.h("input-dropdown",{id:"time-number",name:"time-number",inputValue:this.selectedNumber.toString(),exportparts:"id_dropdown: tps__number-dropdown, id_dropdown-input: tps__number-dropdown-button, id_dropdown-content: tps__number-dropdown-content",options:this.numberOptions,defaultInputOption:this.numberOptions.find(r=>r.value==this.selectedNumber.toString())}),typeof this.selectedPeriod=="string"&&i.h("select-dropdown",{id:"time-period",name:"time-period",options:this.timePeriodOptions,exportparts:"sd_dropdown: tps__period-dropdown, sd_dropdown-button: tps__period-dropdown-button, sd_dropdown-content: tps__period-dropdown-content",pluralizedLabel:this.selectedNumber>1?"s":"",defaultSelectedOption:this.timePeriodOptions.find(r=>r.value==this.selectedPeriod),withSearch:!1}))}get host(){return i.getElement(this)}};d.style=n;exports.time_period_selector=d;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-92ba1b80.cjs");require("react");require("react-dom");const s=".time-period-selector.sc-time-period-selector{display:grid;gap:0.5rem;grid-template-columns:auto 1fr}.time-period-selector.sc-time-period-selector select-dropdown.sc-time-period-selector,.time-period-selector.sc-time-period-selector input-dropdown.sc-time-period-selector{border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}.time-period-selector.sc-time-period-selector select-dropdown.sc-time-period-selector{width:116px}.time-period-selector.sc-time-period-selector input-dropdown.sc-time-period-selector{width:84px;display:flex;align-items:center}.time-period-selector.sc-time-period-selector select-dropdown#time-period.sc-time-period-selector::part(sd_dropdown-button){width:100%}.time-period-selector.sc-time-period-selector input-dropdown.sc-time-period-selector::part(id_dropdown){width:inherit;height:100%}.time-period-selector.sc-time-period-selector input-dropdown#time-number.sc-time-period-selector::part(id_dropdown-input){border:none;border-radius:var(--nylas-border-radius-2x)}.time-period-selector.sc-time-period-selector input-dropdown.sc-time-period-selector::part(id_dropdown-input){padding:17px;gap:1rem}.time-period-selector.sc-time-period-selector input-dropdown.sc-time-period-selector::part(id_dropdown-content){width:100%;max-height:200px}.time-period-selector.sc-time-period-selector select-dropdown.sc-time-period-selector::part(sd_dropdown){width:inherit}.time-period-selector.sc-time-period-selector select-dropdown.sc-time-period-selector::part(sd_dropdown-button){padding:1rem;gap:1rem;justify-content:space-between}.time-period-selector.sc-time-period-selector select-dropdown.sc-time-period-selector::part(sd_dropdown-content){width:100%;max-height:200px}",n=s,p={hours:"hour",days:"day",weeks:"week",months:"month"},d=class{constructor(r){i.registerInstance(this,r),this.timePeriodChanged=i.createEvent(this,"timePeriodChanged",7),this.timePeriods=["hour","day","week","month"],this.defaultSelectedPeriod=void 0,this.defaultSelectedNumber=void 0,this.selectedPeriod=this.defaultSelectedPeriod,this.selectedNumber=this.defaultSelectedNumber,this.numberOptions=this.calculateOptions(this.defaultSelectedPeriod||"hour").map(e=>({label:e.toString(),value:e.toString()})),this.timePeriodOptions=this.timePeriods.map(e=>({label:e,value:e}))}componentDidLoad(){this.selectedNumber=this.defaultSelectedNumber,this.selectedPeriod=this.defaultSelectedPeriod;const r=p[this.selectedPeriod]??this.selectedPeriod,e=this.calculateOptions(r);this.numberOptions=e.map(t=>({label:t.toString(),value:t.toString()}))}calculateOptions(r){switch(r){case"hour":return Array.from({length:23},(e,t)=>t+1);case"minute":return Array.from({length:13},(e,t)=>t*5);case"day":return Array.from({length:30},(e,t)=>t+1);case"week":return Array.from({length:4},(e,t)=>t+1);case"month":return Array.from({length:12},(e,t)=>t+1);default:return[]}}inputOptionChangedHandler(r){i.debug("time-period-selector","inputOptionChangedHandler",r.detail);const{value:e,name:t}=r.detail;t==="time-number"&&(this.selectedNumber=e?parseInt(e):this.defaultSelectedNumber);const o={number:this.selectedNumber,period:this.selectedPeriod};this.timePeriodChanged.emit(o)}nylasFormDropdownChangedHandler(r){i.debug("time-period-selector","nylasFormDropdownChangedHandler",r.detail);const{value:e,name:t}=r.detail;t==="time-period"?(this.selectedPeriod=e,this.updateNumberOptionsAndSelectedNumber(e)):t==="time-number"&&(this.selectedNumber=parseInt(e));const o={number:this.selectedNumber,period:this.selectedPeriod};this.timePeriodChanged.emit(o)}updateNumberOptionsAndSelectedNumber(r){const e=this.calculateOptions(r);this.numberOptions=e.map(t=>({label:t.toString(),value:t.toString()})),this.selectedNumber=parseInt(this.numberOptions[0].value)}render(){return i.h("div",{key:"7202ca7c6b64a08199ec356eb409b247b865683b",class:"time-period-selector"},typeof this.selectedNumber=="number"&&i.h("input-dropdown",{id:"time-number",name:"time-number",inputValue:this.selectedNumber.toString(),exportparts:"id_dropdown: tps__number-dropdown, id_dropdown-input: tps__number-dropdown-button, id_dropdown-content: tps__number-dropdown-content",options:this.numberOptions,defaultInputOption:this.numberOptions.find(r=>r.value==this.selectedNumber.toString())}),typeof this.selectedPeriod=="string"&&i.h("select-dropdown",{id:"time-period",name:"time-period",options:this.timePeriodOptions,exportparts:"sd_dropdown: tps__period-dropdown, sd_dropdown-button: tps__period-dropdown-button, sd_dropdown-content: tps__period-dropdown-content",pluralizedLabel:this.selectedNumber>1?"s":"",defaultSelectedOption:this.timePeriodOptions.find(r=>r.value==this.selectedPeriod),withSearch:!1}))}get host(){return i.getElement(this)}};d.style=n;exports.time_period_selector=d;
@@ -1,4 +1,4 @@
1
- import { r as s, c as n, d, h as o, g as p } from "./index-9dc1bd32.js";
1
+ import { r as s, c as n, d, h as o, g as p } from "./index-72501df0.js";
2
2
  import "react";
3
3
  import "react-dom";
4
4
  const l = ".time-period-selector.sc-time-period-selector{display:grid;gap:0.5rem;grid-template-columns:auto 1fr}.time-period-selector.sc-time-period-selector select-dropdown.sc-time-period-selector,.time-period-selector.sc-time-period-selector input-dropdown.sc-time-period-selector{border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}.time-period-selector.sc-time-period-selector select-dropdown.sc-time-period-selector{width:116px}.time-period-selector.sc-time-period-selector input-dropdown.sc-time-period-selector{width:84px;display:flex;align-items:center}.time-period-selector.sc-time-period-selector select-dropdown#time-period.sc-time-period-selector::part(sd_dropdown-button){width:100%}.time-period-selector.sc-time-period-selector input-dropdown.sc-time-period-selector::part(id_dropdown){width:inherit;height:100%}.time-period-selector.sc-time-period-selector input-dropdown#time-number.sc-time-period-selector::part(id_dropdown-input){border:none;border-radius:var(--nylas-border-radius-2x)}.time-period-selector.sc-time-period-selector input-dropdown.sc-time-period-selector::part(id_dropdown-input){padding:17px;gap:1rem}.time-period-selector.sc-time-period-selector input-dropdown.sc-time-period-selector::part(id_dropdown-content){width:100%;max-height:200px}.time-period-selector.sc-time-period-selector select-dropdown.sc-time-period-selector::part(sd_dropdown){width:inherit}.time-period-selector.sc-time-period-selector select-dropdown.sc-time-period-selector::part(sd_dropdown-button){padding:1rem;gap:1rem;justify-content:space-between}.time-period-selector.sc-time-period-selector select-dropdown.sc-time-period-selector::part(sd_dropdown-content){width:100%;max-height:200px}", c = l, m = {
@@ -1,4 +1,4 @@
1
- import { r as e, h as C } from "./index-9dc1bd32.js";
1
+ import { r as e, h as C } from "./index-72501df0.js";
2
2
  import "react";
3
3
  import "react-dom";
4
4
  const s = ".sc-translate-icon-h{display:flex}", i = s, o = class {