@nylas/react 1.3.0 → 1.3.1

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 (121) hide show
  1. package/dist/{add-circle-icon.entry-0f0cd6d8.cjs → add-circle-icon.entry-606d3096.cjs} +1 -1
  2. package/dist/{add-circle-icon.entry-d2b7178c.js → add-circle-icon.entry-d8358e3f.js} +1 -1
  3. package/dist/{archive-icon.entry-602d3c58.js → archive-icon.entry-8c6d31f2.js} +1 -1
  4. package/dist/{archive-icon.entry-ec25f93a.cjs → archive-icon.entry-e8ce8c7d.cjs} +1 -1
  5. package/dist/{arrow-icon.entry-7bcb6442.cjs → arrow-icon.entry-13d23d01.cjs} +1 -1
  6. package/dist/{arrow-icon.entry-d4dd38b3.js → arrow-icon.entry-d950ddce.js} +1 -1
  7. package/dist/{bold-icon.entry-fc1d34a6.cjs → bold-icon.entry-12072568.cjs} +1 -1
  8. package/dist/{bold-icon.entry-5fc41386.js → bold-icon.entry-5382fea2.js} +1 -1
  9. package/dist/{button-component_2.entry-d62ae520.js → button-component_2.entry-4aa63891.js} +1 -1
  10. package/dist/{button-component_2.entry-d23be43d.cjs → button-component_2.entry-d34ed360.cjs} +1 -1
  11. package/dist/calendar-agenda-fill-icon_54.entry-33d08f1a.cjs +9 -0
  12. package/dist/{calendar-agenda-fill-icon_54.entry-1a42103a.js → calendar-agenda-fill-icon_54.entry-50c9ed7b.js} +21 -10
  13. package/dist/{calendar-cancel-icon.entry-1566c286.js → calendar-cancel-icon.entry-64ea7038.js} +1 -1
  14. package/dist/{calendar-cancel-icon.entry-bf9fc719.cjs → calendar-cancel-icon.entry-b13aa245.cjs} +1 -1
  15. package/dist/{calendar-check-icon_2.entry-82407a92.js → calendar-check-icon_2.entry-935310fc.js} +1 -1
  16. package/dist/{calendar-check-icon_2.entry-4c3e78a6.cjs → calendar-check-icon_2.entry-9cbe60a8.cjs} +1 -1
  17. package/dist/{calendar-icon.entry-359c064c.cjs → calendar-icon.entry-0c560a35.cjs} +1 -1
  18. package/dist/{calendar-icon.entry-c3c23413.js → calendar-icon.entry-2448eea2.js} +1 -1
  19. package/dist/{checkbox-component_2.entry-f974e789.cjs → checkbox-component_2.entry-1e3afb3a.cjs} +1 -1
  20. package/dist/{checkbox-component_2.entry-97e97789.js → checkbox-component_2.entry-ec5e75fb.js} +1 -1
  21. package/dist/{chevron-icon_3.entry-a6189c37.js → chevron-icon_3.entry-1f72ef71.js} +1 -1
  22. package/dist/{chevron-icon_3.entry-2453084c.cjs → chevron-icon_3.entry-da1751d2.cjs} +1 -1
  23. package/dist/{clock-icon_4.entry-ad679142.js → clock-icon_4.entry-4502c9f0.js} +1 -1
  24. package/dist/{clock-icon_4.entry-5162dfec.cjs → clock-icon_4.entry-b87aaaa9.cjs} +1 -1
  25. package/dist/{close-icon.entry-38dc2638.cjs → close-icon.entry-92e93293.cjs} +1 -1
  26. package/dist/{close-icon.entry-2c6cdf35.js → close-icon.entry-e96749ed.js} +1 -1
  27. package/dist/{constants-35df11e7-b37e3406.js → constants-24eca8c9-922dc05c.js} +16 -4
  28. package/dist/{constants-35df11e7-d87ad6d9.cjs → constants-24eca8c9-d0d9f3ec.cjs} +1 -1
  29. package/dist/{copy-icon.entry-79df1d0e.cjs → copy-icon.entry-19bb7d2f.cjs} +1 -1
  30. package/dist/{copy-icon.entry-6630ce5a.js → copy-icon.entry-7c958d7c.js} +1 -1
  31. package/dist/{delete-icon.entry-f9a265b6.cjs → delete-icon.entry-41c7d463.cjs} +1 -1
  32. package/dist/{delete-icon.entry-716f906c.js → delete-icon.entry-59c9ca04.js} +1 -1
  33. package/dist/{document-refresh-icon.entry-bb91822a.cjs → document-refresh-icon.entry-afc75ddb.cjs} +1 -1
  34. package/dist/{document-refresh-icon.entry-fa775295.js → document-refresh-icon.entry-c32cda4f.js} +1 -1
  35. package/dist/{feedbackSync-adc893c2-5965d5ba.js → feedbackSync-b4015b72-0785986b.js} +1 -1
  36. package/dist/{feedbackSync-adc893c2-70d06afc.cjs → feedbackSync-b4015b72-d343d411.cjs} +1 -1
  37. package/dist/{folder-icon.entry-9cf7590f.js → folder-icon.entry-5dcf707b.js} +1 -1
  38. package/dist/{folder-icon.entry-82a02de7.cjs → folder-icon.entry-61ccaddd.cjs} +1 -1
  39. package/dist/{forward-icon.entry-034ec3be.cjs → forward-icon.entry-3d598cb4.cjs} +1 -1
  40. package/dist/{forward-icon.entry-ebd5e108.js → forward-icon.entry-5a156d37.js} +1 -1
  41. package/dist/{globe-icon.entry-48837e22.js → globe-icon.entry-99e8bebf.js} +1 -1
  42. package/dist/{globe-icon.entry-b67c68d5.cjs → globe-icon.entry-a88502ce.cjs} +1 -1
  43. package/dist/{google-logo-icon_4.entry-819d7d0d.js → google-logo-icon_4.entry-531021bd.js} +6 -6
  44. package/dist/{google-logo-icon_4.entry-b637470a.cjs → google-logo-icon_4.entry-9a7790d2.cjs} +1 -1
  45. package/dist/{inbox-icon.entry-7f91d971.cjs → inbox-icon.entry-6eadce9b.cjs} +1 -1
  46. package/dist/{inbox-icon.entry-c611c154.js → inbox-icon.entry-b2a2f48e.js} +1 -1
  47. package/dist/{index-72501df0.js → index-13a43508.js} +51 -50
  48. package/dist/{index-92ba1b80.cjs → index-7dbf0ae7.cjs} +2 -2
  49. package/dist/{index.es-28b1b2ec-5a87db22.js → index.es-aa323594-17c2a3f6.js} +1 -1
  50. package/dist/{index.es-28b1b2ec-595c0513.cjs → index.es-aa323594-84331fa3.cjs} +1 -1
  51. package/dist/{info-icon_2.entry-4ad69286.js → info-icon_2.entry-c6e650c4.js} +1 -1
  52. package/dist/{info-icon_2.entry-4c70ab61.cjs → info-icon_2.entry-f53d81e5.cjs} +1 -1
  53. package/dist/{input-color-picker.entry-46bf04e1.cjs → input-color-picker.entry-16fa8456.cjs} +1 -1
  54. package/dist/{input-color-picker.entry-4e5760ce.js → input-color-picker.entry-cd398537.js} +1 -1
  55. package/dist/{input-component.entry-1019ce99.cjs → input-component.entry-74b63249.cjs} +1 -1
  56. package/dist/{input-component.entry-dca1013f.js → input-component.entry-b471f023.js} +1 -1
  57. package/dist/{input-dropdown.entry-f14c59e7.js → input-dropdown.entry-14e1f6cb.js} +1 -1
  58. package/dist/{input-dropdown.entry-e535fb5e.cjs → input-dropdown.entry-32b4b8be.cjs} +1 -1
  59. package/dist/{italic-icon.entry-2ab53839.js → italic-icon.entry-8a1a7568.js} +1 -1
  60. package/dist/{italic-icon.entry-726cc194.cjs → italic-icon.entry-c9ae0186.cjs} +1 -1
  61. package/dist/{multi-select-dropdown.entry-6820d249.cjs → multi-select-dropdown.entry-58b860a0.cjs} +1 -1
  62. package/dist/{multi-select-dropdown.entry-a097d3cb.js → multi-select-dropdown.entry-bc4901aa.js} +1 -1
  63. package/dist/nylas-booked-event-card_12.entry-f64eecaa.cjs +1 -0
  64. package/dist/{nylas-booked-event-card_12.entry-ccd85ff4.js → nylas-booked-event-card_12.entry-fbdb2f3d.js} +379 -379
  65. package/dist/{nylas-form-card.entry-8eb47f3d.cjs → nylas-form-card.entry-7e9a0cf1.cjs} +1 -1
  66. package/dist/{nylas-form-card.entry-afdfee47.js → nylas-form-card.entry-aa1d5aca.js} +2 -2
  67. package/dist/{nylas-if-state.entry-7caad39f.js → nylas-if-state.entry-5e30f6b3.js} +2 -2
  68. package/dist/{nylas-if-state.entry-be7978de.cjs → nylas-if-state.entry-96914d61.cjs} +1 -1
  69. package/dist/{nylas-login.entry-bce4f689.cjs → nylas-login.entry-e26689b0.cjs} +1 -1
  70. package/dist/{nylas-login.entry-dcf85f93.js → nylas-login.entry-e52648da.js} +2 -2
  71. package/dist/{nylas-provider.entry-f02017da.cjs → nylas-provider.entry-9d43f4f0.cjs} +1 -1
  72. package/dist/{nylas-provider.entry-97882e4b.js → nylas-provider.entry-ac669351.js} +4 -4
  73. package/dist/nylas-scheduler-editor.entry-0f1370d9.cjs +2 -0
  74. package/dist/{nylas-scheduler-editor.entry-dcfdd6bf.js → nylas-scheduler-editor.entry-9655ce2e.js} +12 -12
  75. package/dist/{nylas-scheduling.entry-2b842e93.js → nylas-scheduling.entry-14d4cd69.js} +9 -9
  76. package/dist/{nylas-scheduling.entry-e0e9c8e8.cjs → nylas-scheduling.entry-ab10f8a4.cjs} +1 -1
  77. package/dist/{nylas-time-window-picker.entry-96f5fe9a.js → nylas-time-window-picker.entry-a2f71121.js} +1 -1
  78. package/dist/{nylas-time-window-picker.entry-a8780f2e.cjs → nylas-time-window-picker.entry-dfbd975e.cjs} +1 -1
  79. package/dist/{person-icon.entry-3ec67feb.js → person-icon.entry-40b5a8c5.js} +1 -1
  80. package/dist/{person-icon.entry-2f8e00fd.cjs → person-icon.entry-a45918af.cjs} +1 -1
  81. package/dist/{play-icon.entry-a840bdca.js → play-icon.entry-b2315f8c.js} +1 -1
  82. package/dist/{play-icon.entry-1abf79e9.cjs → play-icon.entry-c5757946.cjs} +1 -1
  83. package/dist/react.cjs +1 -1
  84. package/dist/react.js +1 -1
  85. package/dist/{refresh-icon.entry-11fcb673.js → refresh-icon.entry-37d038f8.js} +1 -1
  86. package/dist/{refresh-icon.entry-af7f54b4.cjs → refresh-icon.entry-b9afd192.cjs} +1 -1
  87. package/dist/{register-component-75f530bc-0e4e3d7a.js → register-component-555477e7-42247763.js} +1 -1
  88. package/dist/{register-component-75f530bc-61b6f2dd.cjs → register-component-555477e7-ecafba1c.cjs} +1 -1
  89. package/dist/{reply-all-icon.entry-cc2ad940.cjs → reply-all-icon.entry-07a6783a.cjs} +1 -1
  90. package/dist/{reply-all-icon.entry-5c8b3356.js → reply-all-icon.entry-89fd0e10.js} +1 -1
  91. package/dist/{reply-icon.entry-840acade.cjs → reply-icon.entry-8cddb112.cjs} +1 -1
  92. package/dist/{reply-icon.entry-d048736f.js → reply-icon.entry-a53a6fc4.js} +1 -1
  93. package/dist/{scheduler-config-store-ed4a8dfd-f74e58ae.js → scheduler-config-store-ed4a8dfd-656579e3.js} +1 -1
  94. package/dist/{scheduler-config-store-ed4a8dfd-161a3efd.cjs → scheduler-config-store-ed4a8dfd-733c6442.cjs} +1 -1
  95. package/dist/scheduler-store-c37aa5ca-0484b074.cjs +1 -0
  96. package/dist/{scheduler-store-d84b82a0-11faba86.js → scheduler-store-c37aa5ca-c9752707.js} +127 -124
  97. package/dist/{sent-icon.entry-fd3b9ad9.js → sent-icon.entry-6ac749b3.js} +1 -1
  98. package/dist/{sent-icon.entry-987760ce.cjs → sent-icon.entry-b740a32d.cjs} +1 -1
  99. package/dist/{spam-icon.entry-3ce4f9fc.cjs → spam-icon.entry-78cec025.cjs} +1 -1
  100. package/dist/{spam-icon.entry-4665415c.js → spam-icon.entry-872ff1e4.js} +1 -1
  101. package/dist/{star-icon.entry-0f446ac7.js → star-icon.entry-57246dc1.js} +1 -1
  102. package/dist/{star-icon.entry-a3ba4703.cjs → star-icon.entry-ab9ad7df.cjs} +1 -1
  103. package/dist/{stop-icon.entry-72c964b2.js → stop-icon.entry-5054fa33.js} +1 -1
  104. package/dist/{stop-icon.entry-9c13e00a.cjs → stop-icon.entry-f79dce49.cjs} +1 -1
  105. package/dist/{textarea-component.entry-d414e219.js → textarea-component.entry-15c9a676.js} +1 -1
  106. package/dist/{textarea-component.entry-ff04b5fa.cjs → textarea-component.entry-2967dd82.cjs} +1 -1
  107. package/dist/{time-period-selector.entry-53edc0ba.js → time-period-selector.entry-9226fd08.js} +1 -1
  108. package/dist/{time-period-selector.entry-2ce3347a.cjs → time-period-selector.entry-a53c94c2.cjs} +1 -1
  109. package/dist/{translate-icon.entry-84a78b9a.js → translate-icon.entry-52939fa4.js} +1 -1
  110. package/dist/{translate-icon.entry-9bab13ad.cjs → translate-icon.entry-f4dcc479.cjs} +1 -1
  111. package/dist/{trash-fill-icon.entry-84f52290.cjs → trash-fill-icon.entry-7f4ddaf5.cjs} +1 -1
  112. package/dist/{trash-fill-icon.entry-2881a44c.js → trash-fill-icon.entry-b9ab3cfc.js} +1 -1
  113. package/dist/{underline-icon.entry-23eca319.js → underline-icon.entry-c8142970.js} +1 -1
  114. package/dist/{underline-icon.entry-5a8410ef.cjs → underline-icon.entry-e9959c5c.cjs} +1 -1
  115. package/dist/{warning-icon.entry-abf9e5dc.js → warning-icon.entry-00426457.js} +1 -1
  116. package/dist/{warning-icon.entry-1966042d.cjs → warning-icon.entry-98c0d003.cjs} +1 -1
  117. package/package.json +3 -3
  118. package/dist/calendar-agenda-fill-icon_54.entry-95ccb99e.cjs +0 -9
  119. package/dist/nylas-booked-event-card_12.entry-c684905b.cjs +0 -1
  120. package/dist/nylas-scheduler-editor.entry-cc6f4060.cjs +0 -2
  121. package/dist/scheduler-store-d84b82a0-7a7fe186.cjs +0 -1
@@ -1,16 +1,16 @@
1
- import { d as L, a as F, i as c, j as R } from "./index-72501df0.js";
1
+ import { d as L, a as F, i as d, j as R } from "./index-13a43508.js";
2
2
  var B;
3
- (function(a) {
4
- a.Component = "component", a.Api = "api", a.Auth = "auth";
3
+ (function(o) {
4
+ o.Component = "component", o.Api = "api", o.Auth = "auth";
5
5
  })(B || (B = {}));
6
6
  var M;
7
- (function(a) {
8
- 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";
7
+ (function(o) {
8
+ o.endtime_not_in_future = "endtime_not_in_future", o.no_booking_info = "no_booking_info", o.no_timeslot_selected = "no_timeslot_selected", o.no_timezone_selected = "no_timezone_selected", o.no_booking_id = "no_booking_id", o.no_salt = "no_salt", o.invalid_start_time = "invalid_start_time", o.invalid_end_time = "invalid_end_time", o.invalid_timezone = "invalid_timezone";
9
9
  })(M || (M = {}));
10
- var P;
11
- (function(a) {
12
- 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";
13
- })(P || (P = {}));
10
+ var $;
11
+ (function(o) {
12
+ o.invalid_session = "invalid_session", o.general_error = "general_error", o.internal_error = "internal_error", o.invalid_request_error = "invalid_request_error", o.timeslot_not_available = "timeslot_not_available", o.provider_error = "provider_error", o.not_found_error = "not_found_error";
13
+ })($ || ($ = {}));
14
14
  class C {
15
15
  constructor() {
16
16
  this.component = (e) => {
@@ -105,8 +105,8 @@ class C {
105
105
  }
106
106
  }
107
107
  class N {
108
- constructor({ schedulerAPIURL: e, schedulerStore: t, sessionId: s, configId: i, slug: n, clientId: r }) {
109
- this.errors = new C(), this.schedulerStore = t, this.schedulerAPIURL = e, this.sessionId = s, this.configId = i, this.slug = n, this.clientId = r;
108
+ constructor({ schedulerAPIURL: e, schedulerStore: t, sessionId: s, configId: i, slug: r, clientId: n }) {
109
+ this.errors = new C(), this.schedulerStore = t, this.schedulerAPIURL = e, this.sessionId = s, this.configId = i, this.slug = r, this.clientId = n;
110
110
  }
111
111
  getHeaders() {
112
112
  return this.sessionId ? {
@@ -115,22 +115,22 @@ class N {
115
115
  }
116
116
  async makeAPIRequest(e, t, s, i = {}) {
117
117
  try {
118
- const n = new URL(this.schedulerAPIURL), r = "1.3.0";
119
- return n.pathname = e, await (await fetch(decodeURIComponent(n.toString()), {
118
+ const r = new URL(this.schedulerAPIURL), n = "1.3.1";
119
+ return r.pathname = e, await (await fetch(decodeURIComponent(r.toString()), {
120
120
  method: t,
121
121
  headers: {
122
122
  "Content-Type": "application/json",
123
123
  Origin: window.location.origin,
124
124
  "X-Source": "nylas-scheduling",
125
- "X-Nylas-Web-Elements-Version": r,
125
+ "X-Nylas-Web-Elements-Version": n,
126
126
  ...i
127
127
  },
128
128
  body: s
129
129
  })).json();
130
- } catch (n) {
130
+ } catch (r) {
131
131
  return {
132
132
  error: {
133
- message: n.message,
133
+ message: r.message,
134
134
  title: "API request failed",
135
135
  type: "api"
136
136
  }
@@ -138,9 +138,9 @@ class N {
138
138
  }
139
139
  }
140
140
  getErrorMessage(e) {
141
- var s, i, n, r;
141
+ var s, i, r, n;
142
142
  let t = (e == null ? void 0 : e.message) || (e == null ? void 0 : e.title) || "Something went wrong";
143
- 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;
143
+ 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) || ((n = (r = e == null ? void 0 : e.provider_error) == null ? void 0 : r.error) == null ? void 0 : n.title) || "Something went wrong"), t;
144
144
  }
145
145
  setConfigId(e) {
146
146
  this.configId = e;
@@ -155,7 +155,7 @@ class N {
155
155
  this.schedulerStore.set("selectedTimezone", e);
156
156
  }
157
157
  selectLanguage(e) {
158
- this.schedulerStore.set("selectedLanguage", e), c.changeLanguage(e);
158
+ this.schedulerStore.set("selectedLanguage", e), d.changeLanguage(e);
159
159
  }
160
160
  async toggleAdditionalData(e) {
161
161
  e || await this.refetchAvailability(), this.schedulerStore.set("showBookingForm", e);
@@ -185,14 +185,14 @@ class N {
185
185
  return await this.getAvailability(s, i);
186
186
  }
187
187
  async resetStoreStateAndFetchAvailability() {
188
- const e = /* @__PURE__ */ new Date(), t = await this.refetchAvailability(), s = this.schedulerStore.get("availability").find((n) => new Date(n.start_time) > /* @__PURE__ */ new Date());
188
+ const e = /* @__PURE__ */ new Date(), t = await this.refetchAvailability(), s = this.schedulerStore.get("availability").find((r) => new Date(r.start_time) > /* @__PURE__ */ new Date());
189
189
  let i = e;
190
190
  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;
191
191
  }
192
192
  async setReschedule(e) {
193
193
  this.schedulerStore.set("isLoading", !0);
194
194
  const t = this.schedulerStore.state.eventInfo;
195
- return t && this.schedulerStore.set("reschedulingEventInfo", t), this.schedulerStore.set("rescheduleBookingId", e), await this.resetStoreStateAndFetchAvailability().finally(() => {
195
+ return t && this.schedulerStore.set("reschedulingEventInfo", t), this.schedulerStore.set("rescheduleBookingId", e), await this.getUISettings(), await this.resetStoreStateAndFetchAvailability().finally(() => {
196
196
  this.schedulerStore.set("isLoading", !1);
197
197
  });
198
198
  }
@@ -216,85 +216,88 @@ class N {
216
216
  async bookTimeslot(e) {
217
217
  var I;
218
218
  this.schedulerStore.set("isLoading", !0);
219
- const { selectedTimeslot: t, selectedTimezone: s, bookingInfo: i, selectedLanguage: n } = this.schedulerStore.state;
219
+ const { selectedTimeslot: t, selectedTimezone: s, bookingInfo: i, selectedLanguage: r } = this.schedulerStore.state;
220
220
  if (!e && !i)
221
- return { error: this.errors.component(c.t("createBookingErrorTitle")).no_booking_info() };
222
- const r = (e == null ? void 0 : e.timeslot) || t;
223
- if (!r)
224
- return { error: this.errors.component(c.t("createBookingErrorTitle")).no_timeslot_selected() };
225
- const o = e && (e != null && e.timezone) ? e == null ? void 0 : e.timezone : s, g = n || "en-US";
226
- if (!o)
227
- return { error: this.errors.component(c.t("createBookingErrorTitle")).no_timezone_selected() };
228
- const h = this.schedulerStore.get("availabilityOrderEmails");
229
- let l = "";
230
- if (h.length > 0) {
231
- const k = (r == null ? void 0 : r.emails) || [];
232
- for (let f = 0; f < h.length; f++)
233
- if (k.includes(h[f])) {
234
- l = h[f];
221
+ return { error: this.errors.component(d.t("createBookingErrorTitle")).no_booking_info() };
222
+ const n = (e == null ? void 0 : e.timeslot) || t;
223
+ if (!n)
224
+ return { error: this.errors.component(d.t("createBookingErrorTitle")).no_timeslot_selected() };
225
+ const a = e && (e != null && e.timezone) ? e == null ? void 0 : e.timezone : s, l = r || "en-US";
226
+ if (!a)
227
+ return { error: this.errors.component(d.t("createBookingErrorTitle")).no_timezone_selected() };
228
+ const u = this.schedulerStore.get("availabilityOrderEmails");
229
+ let c = "";
230
+ if (u.length > 0) {
231
+ const k = (n == null ? void 0 : n.emails) || [];
232
+ for (let f = 0; f < u.length; f++)
233
+ if (k.includes(u[f])) {
234
+ c = u[f];
235
235
  break;
236
236
  }
237
237
  }
238
- const d = {};
238
+ const h = {};
239
239
  Object.entries((i == null ? void 0 : i.additionalFields) || {}).forEach(([k, f]) => {
240
- d[k] = f.value;
240
+ h[k] = f.value;
241
241
  });
242
- 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({
243
- participants: l ? [{ email: l }] : void 0,
242
+ 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 : h, 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}` : ""}`, g = await this.makeAPIRequest(decodeURIComponent(v), "POST", JSON.stringify({
243
+ participants: c ? [{ email: c }] : void 0,
244
244
  additional_fields: p,
245
245
  additional_guests: S,
246
246
  guest: { ..._ },
247
- start_time: r.start_time.getTime() / 1e3,
248
- end_time: r.end_time.getTime() / 1e3,
249
- timezone: o,
250
- email_language: this.getTwoLetterLanguageCode(g)
247
+ start_time: n.start_time.getTime() / 1e3,
248
+ end_time: n.end_time.getTime() / 1e3,
249
+ timezone: a,
250
+ email_language: this.getTwoLetterLanguageCode(l)
251
251
  }), T);
252
- if ("error" in u) {
252
+ if ("error" in g) {
253
253
  this.schedulerStore.set("isLoading", !1);
254
- const k = (I = u.error) == null ? void 0 : I.type;
255
- let f = u.error;
254
+ const k = (I = g.error) == null ? void 0 : I.type;
255
+ let f = g.error;
256
256
  if (k && k in this.errors.api("Create Booking")) {
257
257
  const E = this.getErrorMessage(f);
258
258
  f = this.errors.api("Create Booking")[k](E);
259
259
  }
260
260
  return { error: f };
261
261
  }
262
- return "data" in u && this.schedulerStore.set("eventInfo", u == null ? void 0 : u.data), this.schedulerStore.set("isLoading", !1), u;
262
+ return "data" in g && this.schedulerStore.set("eventInfo", g == null ? void 0 : g.data), this.schedulerStore.set("isLoading", !1), g;
263
263
  }
264
264
  async getUISettings() {
265
265
  var n;
266
266
  this.schedulerStore.set("isLoading", !0);
267
- 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);
268
- if ("error" in i) {
267
+ const e = this.schedulerStore.get("rescheduleBookingId"), t = this.getHeaders();
268
+ let s = !this.sessionId && this.configId ? `?configuration_id=${this.configId}` : !this.sessionId && this.slug && this.clientId ? `?slug=${this.slug}&client_id=${this.clientId}` : "";
269
+ e && s ? s += `&booking_id=${e}` : e && (s += `?booking_id=${e}`);
270
+ const i = `/v3/scheduling/ui-settings${s}`, r = await this.makeAPIRequest(i, "GET", void 0, t);
271
+ if ("error" in r) {
269
272
  this.schedulerStore.set("isLoading", !1);
270
- const r = (n = i.error) == null ? void 0 : n.type;
271
- let o = i.error;
272
- return r && r in this.errors.api(c.t("getUISettingErrorTitle")) && (o = this.errors.api(c.t("getUISettingErrorTitle"))[r]((o == null ? void 0 : o.message) || (o == null ? void 0 : o.title) || "Something went wrong")), { error: o };
273
+ const a = (n = r.error) == null ? void 0 : n.type;
274
+ let l = r.error;
275
+ return a && a in this.errors.api(d.t("getUISettingErrorTitle")) && (l = this.errors.api(d.t("getUISettingErrorTitle"))[a]((l == null ? void 0 : l.message) || (l == null ? void 0 : l.title) || "Something went wrong")), { error: l };
273
276
  }
274
- return "data" in i && this.schedulerStore.set("configSettings", i.data), this.schedulerStore.set("isLoading", !1), i;
277
+ return "data" in r && this.schedulerStore.set("configSettings", r.data), this.schedulerStore.set("isLoading", !1), r;
275
278
  }
276
279
  getTwoLetterLanguageCode(e) {
277
280
  return e.split("-")[0];
278
281
  }
279
282
  getStartTimeWithMinBookingNotice(e) {
280
- var n;
281
- const t = (n = this.schedulerStore.get("configSettings")) == null ? void 0 : n.scheduler, s = t == null ? void 0 : t.min_booking_notice;
283
+ var r;
284
+ const t = (r = this.schedulerStore.get("configSettings")) == null ? void 0 : r.scheduler, s = t == null ? void 0 : t.min_booking_notice;
282
285
  if (!s)
283
286
  return e;
284
287
  const i = (/* @__PURE__ */ new Date()).getTime();
285
288
  return e < (i + s * 60 * 1e3) / 1e3 ? Math.floor((i + s * 60 * 1e3) / 1e3) : e;
286
289
  }
287
290
  getEndTimeForAvailableDaysInFuture(e) {
288
- var r, o;
289
- const t = /* @__PURE__ */ 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(R(t, s).getTime() / 1e3);
291
+ var n, a;
292
+ const t = /* @__PURE__ */ new Date(), s = (a = (n = this.schedulerStore.get("configSettings")) == null ? void 0 : n.scheduler) == null ? void 0 : a.available_days_in_future, i = Math.floor(R(t, s).getTime() / 1e3);
290
293
  return Math.min(i, e);
291
294
  }
292
295
  async getAvailability(e = 0, t = 0) {
293
296
  var _, S, p, T;
294
297
  this.schedulerStore.set("isLoading", !0);
295
- const s = new URLSearchParams(), i = /* @__PURE__ */ new Date(), n = i.getTime();
296
- if (t && t < n / 1e3)
297
- return this.schedulerStore.set("isLoading", !1), { error: this.errors.component(c.t("getAvailabilityErrorTitle")).endtime_not_in_future() };
298
+ const s = new URLSearchParams(), i = /* @__PURE__ */ new Date(), r = i.getTime();
299
+ if (t && t < r / 1e3)
300
+ return this.schedulerStore.set("isLoading", !1), { error: this.errors.component(d.t("getAvailabilityErrorTitle")).endtime_not_in_future() };
298
301
  if (!e) {
299
302
  const m = new Date(i.getFullYear(), i.getMonth(), 1);
300
303
  e = Math.floor(m.getTime() / 1e3);
@@ -304,99 +307,99 @@ class N {
304
307
  t = Math.floor(m.getTime() / 1e3);
305
308
  }
306
309
  t = this.getEndTimeForAvailableDaysInFuture(t);
307
- const r = this.getStartTimeWithMinBookingNotice(e);
308
- 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)));
309
- const o = this.schedulerStore.get("rescheduleBookingId");
310
- o && s.append("booking_id", encodeURIComponent(o));
311
- const g = s.toString(), h = `/v3/scheduling/availability${g ? `?${g}` : ""}`, l = this.getHeaders(), d = await this.makeAPIRequest(decodeURIComponent(h), "GET", void 0, l);
312
- if ("error" in d) {
310
+ const n = this.getStartTimeWithMinBookingNotice(e);
311
+ e = n, t = n > t ? n + 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)));
312
+ const a = this.schedulerStore.get("rescheduleBookingId");
313
+ a && s.append("booking_id", encodeURIComponent(a));
314
+ const l = s.toString(), u = `/v3/scheduling/availability${l ? `?${l}` : ""}`, c = this.getHeaders(), h = await this.makeAPIRequest(decodeURIComponent(u), "GET", void 0, c);
315
+ if ("error" in h) {
313
316
  this.schedulerStore.set("availability", []), this.schedulerStore.set("isLoading", !1);
314
- const m = (_ = d.error) == null ? void 0 : _.type;
315
- let v = d.error;
316
- if (m && m in this.errors.api(c.t("getAvailabilityErrorTitle"))) {
317
- const u = this.getErrorMessage(v);
318
- v = this.errors.api(c.t("getAvailabilityErrorTitle"))[m](u);
317
+ const m = (_ = h.error) == null ? void 0 : _.type;
318
+ let v = h.error;
319
+ if (m && m in this.errors.api(d.t("getAvailabilityErrorTitle"))) {
320
+ const g = this.getErrorMessage(v);
321
+ v = this.errors.api(d.t("getAvailabilityErrorTitle"))[m](g);
319
322
  }
320
323
  return { error: v };
321
324
  }
322
- if ("data" in d) {
323
- const v = (((p = (S = d.data) == null ? void 0 : S.time_slots) == null ? void 0 : p.map((I) => ({
325
+ if ("data" in h) {
326
+ const v = (((p = (S = h.data) == null ? void 0 : S.time_slots) == null ? void 0 : p.map((I) => ({
324
327
  ...I,
325
328
  start_time: new Date(I.start_time * 1e3),
326
329
  end_time: new Date(I.end_time * 1e3)
327
- }))) || []).filter((I) => I.start_time.getTime() > n);
330
+ }))) || []).filter((I) => I.start_time.getTime() > r);
328
331
  this.schedulerStore.set("availability", v);
329
- const u = ((T = d.data) == null ? void 0 : T.order) || [];
330
- this.schedulerStore.set("availabilityOrderEmails", u);
332
+ const g = ((T = h.data) == null ? void 0 : T.order) || [];
333
+ this.schedulerStore.set("availabilityOrderEmails", g);
331
334
  }
332
- return this.schedulerStore.set("isLoading", !1), d;
335
+ return this.schedulerStore.set("isLoading", !1), h;
333
336
  }
334
337
  async cancelBooking(e, t) {
335
- var o;
338
+ var a;
336
339
  if (this.schedulerStore.set("isLoading", !0), !e)
337
- return { error: this.errors.component(c.t("cancelBookingErrorTitle")).no_booking_id() };
338
- 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({
340
+ return { error: this.errors.component(d.t("cancelBookingErrorTitle")).no_booking_id() };
341
+ 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}`, r = this.getHeaders(), n = await this.makeAPIRequest(decodeURIComponent(i), "DELETE", JSON.stringify({
339
342
  action: "cancel",
340
343
  cancellation_reason: t
341
- }), n);
342
- if ("error" in r) {
344
+ }), r);
345
+ if ("error" in n) {
343
346
  this.schedulerStore.set("isLoading", !1);
344
- const g = (o = r.error) == null ? void 0 : o.type;
345
- let h = r.error;
346
- if (g && g in this.errors.api(c.t("cancelBookingErrorTitle"))) {
347
- const l = this.getErrorMessage(h);
348
- h = this.errors.api(c.t("cancelBookingErrorTitle"))[g](l);
347
+ const l = (a = n.error) == null ? void 0 : a.type;
348
+ let u = n.error;
349
+ if (l && l in this.errors.api(d.t("cancelBookingErrorTitle"))) {
350
+ const c = this.getErrorMessage(u);
351
+ u = this.errors.api(d.t("cancelBookingErrorTitle"))[l](c);
349
352
  }
350
- return { error: h };
353
+ return { error: u };
351
354
  }
352
355
  return this.schedulerStore.set("cancelledEventInfo", {
353
356
  booking_id: e
354
- }), this.schedulerStore.set("rescheduleBookingId", ""), this.schedulerStore.set("isLoading", !1), r;
357
+ }), this.schedulerStore.set("rescheduleBookingId", ""), this.schedulerStore.set("isLoading", !1), n;
355
358
  }
356
359
  async rescheduleBooking(e, t) {
357
360
  var A;
358
361
  if (this.schedulerStore.set("isLoading", !0), !e)
359
- return { error: this.errors.component(c.t("rescheduleBookingErrorTitle")).no_booking_id() };
360
- const s = this.errors.api(c.t("rescheduleBookingErrorTitle")), i = this.errors.component(c.t("rescheduleBookingErrorTitle")), { bookingInfo: n, selectedTimeslot: r, selectedTimezone: o, selectedLanguage: g } = this.schedulerStore.state, { startTime: h, endTime: l, timezone: d } = t, _ = h || (r == null ? void 0 : r.start_time);
362
+ return { error: this.errors.component(d.t("rescheduleBookingErrorTitle")).no_booking_id() };
363
+ const s = this.errors.api(d.t("rescheduleBookingErrorTitle")), i = this.errors.component(d.t("rescheduleBookingErrorTitle")), { bookingInfo: r, selectedTimeslot: n, selectedTimezone: a, selectedLanguage: l } = this.schedulerStore.state, { startTime: u, endTime: c, timezone: h } = t, _ = u || (n == null ? void 0 : n.start_time);
361
364
  if (!_)
362
365
  return { error: i.invalid_start_time('Please pass "startTime" in data or set "selectedTimeslot" in the defaultSchedulerState.') };
363
- const S = l || (r == null ? void 0 : r.end_time);
366
+ const S = c || (n == null ? void 0 : n.end_time);
364
367
  if (!S)
365
368
  return { error: i.invalid_end_time('Please pass "endTime" in data or set "selectedTimeslot" in the defaultSchedulerState.') };
366
369
  const p = this.schedulerStore.get("availabilityOrderEmails");
367
370
  let T = "";
368
371
  if (p.length > 0) {
369
- const b = (r == null ? void 0 : r.emails) || [];
372
+ const b = (n == null ? void 0 : n.emails) || [];
370
373
  for (let y = 0; y < p.length; y++)
371
374
  if (b.includes(p[y])) {
372
375
  T = p[y];
373
376
  break;
374
377
  }
375
378
  }
376
- const m = d || o;
379
+ const m = h || a;
377
380
  if (!m)
378
381
  return { error: i.invalid_timezone('Please pass "timezone" in data or set "selectedTimezone" in the defaultSchedulerState.') };
379
382
  const v = {};
380
- Object.entries((n == null ? void 0 : n.additionalFields) || {}).forEach(([b, y]) => {
383
+ Object.entries((r == null ? void 0 : r.additionalFields) || {}).forEach(([b, y]) => {
381
384
  v[b] = y.value;
382
385
  });
383
- 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) || [], k = 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}`, z = this.getHeaders(), w = await this.makeAPIRequest(decodeURIComponent(E), "PATCH", JSON.stringify({
386
+ const g = t ? t == null ? void 0 : t.primaryParticipant : r == null ? void 0 : r.primaryParticipant, I = t ? (t == null ? void 0 : t.guests) || [] : (r == null ? void 0 : r.guests) || [], k = 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({
384
387
  start_time: _.getTime() / 1e3,
385
388
  end_time: S.getTime() / 1e3,
386
389
  timezone: m,
387
390
  additional_fields: k,
388
- guest: { ...u },
391
+ guest: { ...g },
389
392
  additional_guests: I,
390
393
  participants: T ? [{ email: T }] : void 0,
391
- email_language: this.getTwoLetterLanguageCode(g)
392
- }), z);
394
+ email_language: this.getTwoLetterLanguageCode(l)
395
+ }), P);
393
396
  if ("error" in w) {
394
397
  this.schedulerStore.set("isLoading", !1);
395
398
  const b = (A = w.error) == null ? void 0 : A.type;
396
399
  let y = w.error;
397
400
  if (b && b in s) {
398
- const $ = this.getErrorMessage(y);
399
- y = s[b]($);
401
+ const z = this.getErrorMessage(y);
402
+ y = s[b](z);
400
403
  }
401
404
  return { error: y };
402
405
  }
@@ -414,34 +417,34 @@ class N {
414
417
  return this.schedulerStore.set("isLoading", !1), w;
415
418
  }
416
419
  async updateBooking(e) {
417
- var d;
420
+ var h;
418
421
  this.schedulerStore.set("isLoading", !0);
419
- const { bookingId: t, status: s, reason: i } = e, n = this.schedulerStore.get("organizerConfirmationSalt"), r = s === "confirmed" ? c.t("confirmBookingErrorTitle") : c.t("rejectBookingErrorTitle");
422
+ const { bookingId: t, status: s, reason: i } = e, r = this.schedulerStore.get("organizerConfirmationSalt"), n = s === "confirmed" ? d.t("confirmBookingErrorTitle") : d.t("rejectBookingErrorTitle");
420
423
  if (!t)
421
- return { error: this.errors.component(r).no_booking_id() };
422
- if (!n)
423
- return { error: this.errors.component(r).no_salt() };
424
- 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(), l = await this.makeAPIRequest(decodeURIComponent(g), "PUT", JSON.stringify({
424
+ return { error: this.errors.component(n).no_booking_id() };
425
+ if (!r)
426
+ return { error: this.errors.component(n).no_salt() };
427
+ const a = !this.sessionId && this.configId ? `?configuration_id=${this.configId}` : !this.sessionId && this.slug && this.clientId ? `?slug=${this.slug}&client_id=${this.clientId}` : "", l = `/v3/scheduling/bookings/${t}${a}`, u = this.getHeaders(), c = await this.makeAPIRequest(decodeURIComponent(l), "PUT", JSON.stringify({
425
428
  status: s,
426
429
  cancellation_reason: i,
427
- salt: n
428
- }), h);
429
- if ("error" in l) {
430
+ salt: r
431
+ }), u);
432
+ if ("error" in c) {
430
433
  this.schedulerStore.set("isLoading", !1);
431
- const _ = (d = l.error) == null ? void 0 : d.type;
432
- let S = l.error;
433
- if (_ && _ in this.errors.api(r)) {
434
+ const _ = (h = c.error) == null ? void 0 : h.type;
435
+ let S = c.error;
436
+ if (_ && _ in this.errors.api(n)) {
434
437
  const p = this.getErrorMessage(S);
435
- S = this.errors.api(r)[_](p);
438
+ S = this.errors.api(n)[_](p);
436
439
  }
437
440
  return { error: S };
438
441
  }
439
- return "data" in l && s === "confirmed" ? this.schedulerStore.set("confirmedEventInfo", l == null ? void 0 : l.data) : "request_id" in l && s === "cancelled" && this.schedulerStore.set("cancelledEventInfo", {
442
+ 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", {
440
443
  booking_id: t
441
- }), this.schedulerStore.set("organizerConfirmationBookingId", ""), this.schedulerStore.set("isLoading", !1), l;
444
+ }), this.schedulerStore.set("organizerConfirmationBookingId", ""), this.schedulerStore.set("isLoading", !1), c;
442
445
  }
443
446
  }
444
- function O(a = {}) {
447
+ function O(o = {}) {
445
448
  const e = {
446
449
  selectedDate: null,
447
450
  selectedLanguage: navigator.language,
@@ -457,19 +460,19 @@ function O(a = {}) {
457
460
  cancelledEventInfo: null,
458
461
  isLoading: !1,
459
462
  nylasBranding: !0,
460
- ...a
463
+ ...o
461
464
  };
462
465
  L("[defaultNylasStoreState]: ", e);
463
466
  const t = F(e);
464
467
  return t.onChange("availability", (s) => {
465
468
  L("[availability]: ", s);
466
- const i = s.map((o) => o.start_time);
469
+ const i = s.map((a) => a.start_time);
467
470
  L("[selectableDates]: ", i), t.set("selectableDates", i);
468
- const n = s[0];
469
- if (!n)
471
+ const r = s[0];
472
+ if (!r)
470
473
  return;
471
- const r = Math.floor((n.end_time.getTime() - n.start_time.getTime()) / 6e4);
472
- L("[durationMinutes]: ", r), t.set("eventDuration", r);
474
+ const n = Math.floor((r.end_time.getTime() - r.start_time.getTime()) / 6e4);
475
+ L("[durationMinutes]: ", n), t.set("eventDuration", n);
473
476
  }), t.reset = () => {
474
477
  for (const s in e) {
475
478
  const i = e[s];
@@ -1,4 +1,4 @@
1
- import { r as s, h as t } from "./index-72501df0.js";
1
+ import { r as s, h as t } from "./index-13a43508.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 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
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-7dbf0ae7.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 +1 @@
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
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-7dbf0ae7.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-72501df0.js";
1
+ import { r as e, h as t } from "./index-13a43508.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-72501df0.js";
1
+ import { r as e, h as t } from "./index-13a43508.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-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
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-7dbf0ae7.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-72501df0.js";
1
+ import { r as s, h as t } from "./index-13a43508.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-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
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-7dbf0ae7.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-72501df0.js";
1
+ import { r as s, c as l, t as r, h as a } from "./index-13a43508.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-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
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-7dbf0ae7.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,4 +1,4 @@
1
- import { r as s, c as n, d, h as o, g as p } from "./index-72501df0.js";
1
+ import { r as s, c as n, d, h as o, g as p } from "./index-13a43508.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 +1 @@
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
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-7dbf0ae7.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 e, h as C } from "./index-72501df0.js";
1
+ import { r as e, h as C } from "./index-13a43508.js";
2
2
  import "react";
3
3
  import "react-dom";
4
4
  const s = ".sc-translate-icon-h{display:flex}", i = s, o = class {