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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/dist/add-circle-icon_21.entry-172d31c3.js +6726 -0
  2. package/dist/add-circle-icon_21.entry-71af48f1.cjs +41 -0
  3. package/dist/{archive-icon_7.entry-24f31e46.cjs → archive-icon_7.entry-59d9e24f.cjs} +1 -1
  4. package/dist/{archive-icon_7.entry-3c5e3ccf.js → archive-icon_7.entry-e892a458.js} +1 -1
  5. package/dist/{arrow-icon.entry-813bffe9.js → arrow-icon.entry-060b9b4f.js} +1 -1
  6. package/dist/{arrow-icon.entry-562eb541.cjs → arrow-icon.entry-834b8066.cjs} +1 -1
  7. package/dist/{bold-icon_3.entry-c0e7d524.js → bold-icon_3.entry-0f038db3.js} +1 -1
  8. package/dist/{bold-icon_3.entry-e8b034fe.cjs → bold-icon_3.entry-eb0fcdaa.cjs} +1 -1
  9. package/dist/{calendar-cancel-icon.entry-7d4fdb1b.cjs → calendar-cancel-icon.entry-27a6f628.cjs} +1 -1
  10. package/dist/{calendar-cancel-icon.entry-0b0219cb.js → calendar-cancel-icon.entry-96156441.js} +1 -1
  11. package/dist/{calendar-check-icon_2.entry-88025f63.cjs → calendar-check-icon_2.entry-b6d6d220.cjs} +1 -1
  12. package/dist/{calendar-check-icon_2.entry-6ecd2faa.js → calendar-check-icon_2.entry-c7c13e3e.js} +1 -1
  13. package/dist/{calendar-icon.entry-b753520f.cjs → calendar-icon.entry-e7f6a9a8.cjs} +1 -1
  14. package/dist/{calendar-icon.entry-34d8ef69.js → calendar-icon.entry-f088fb14.js} +1 -1
  15. package/dist/{chevron-icon_3.entry-0aeb4cfa.cjs → chevron-icon_3.entry-8c6e6f74.cjs} +1 -1
  16. package/dist/{chevron-icon_3.entry-ae55fd65.js → chevron-icon_3.entry-90a3e89c.js} +1 -1
  17. package/dist/{close-icon.entry-c80da833.cjs → close-icon.entry-175b9674.cjs} +1 -1
  18. package/dist/{close-icon.entry-ae66c827.js → close-icon.entry-e694948f.js} +1 -1
  19. package/dist/{constants-f34b9c6e-b9f975af.cjs → constants-f34b9c6e-593e21cc.cjs} +1 -1
  20. package/dist/{constants-f34b9c6e-d0f5cd19.js → constants-f34b9c6e-91f6ad05.js} +1 -1
  21. package/dist/{document-refresh-icon.entry-36405467.cjs → document-refresh-icon.entry-a54c74b9.cjs} +1 -1
  22. package/dist/{document-refresh-icon.entry-7d370f85.js → document-refresh-icon.entry-ca98d879.js} +1 -1
  23. package/dist/{elements-dc5b338e-0dbb4f67.cjs → elements-dc5b338e-60f95088.cjs} +1 -1
  24. package/dist/{elements-dc5b338e-524cb111.js → elements-dc5b338e-68eab1e5.js} +1 -1
  25. package/dist/{focus-visible-e8093c16-7e94a4f3.cjs → focus-visible-e8093c16-a0869441.cjs} +1 -1
  26. package/dist/{focus-visible-e8093c16-17ab1557.js → focus-visible-e8093c16-b5d785fc.js} +1 -1
  27. package/dist/{forward-icon_6.entry-a479b39e.cjs → forward-icon_6.entry-4b321b9a.cjs} +1 -1
  28. package/dist/{forward-icon_6.entry-384cc3c5.js → forward-icon_6.entry-84ac76ac.js} +2 -2
  29. package/dist/global-37eeb0cd-6c5934cf.cjs +1 -0
  30. package/dist/global-37eeb0cd-b42e0abc.js +4 -0
  31. package/dist/{globe-icon.entry-58b9f3fc.js → globe-icon.entry-14a60f32.js} +1 -1
  32. package/dist/{globe-icon.entry-0c848856.cjs → globe-icon.entry-ef04c8bf.cjs} +1 -1
  33. package/dist/{google-logo-icon_4.entry-3dce1b83.js → google-logo-icon_4.entry-4fa3cb8e.js} +47 -52
  34. package/dist/google-logo-icon_4.entry-ffeec491.cjs +1 -0
  35. package/dist/{index-33f74306.cjs → index-3a004ec1.cjs} +10 -10
  36. package/dist/{index-20ea5b0c.js → index-4c7e8f2f.js} +161 -158
  37. package/dist/index-92989ac4-69175657.js +902 -0
  38. package/dist/index-92989ac4-6f32ff2a.cjs +6 -0
  39. package/dist/{index.es-be19d2df-f732308a.cjs → index.es-9190f785-60475c4c.cjs} +6 -6
  40. package/dist/{index.es-be19d2df-c2fdca63.js → index.es-9190f785-69269065.js} +12 -13
  41. package/dist/{info-icon_2.entry-98965833.js → info-icon_2.entry-45f6f01f.js} +1 -1
  42. package/dist/{info-icon_2.entry-dd0a0633.cjs → info-icon_2.entry-fb099090.cjs} +1 -1
  43. package/dist/{loading-icon.entry-abd81cea.js → loading-icon.entry-67c8b1fa.js} +1 -1
  44. package/dist/{loading-icon.entry-46821f18.cjs → loading-icon.entry-eaabff41.cjs} +1 -1
  45. package/dist/{mailbox-store-76540d24-7bf14e45.cjs → mailbox-store-29139d89-dd9d3d1b.cjs} +1 -1
  46. package/dist/{mailbox-store-76540d24-dfb53045.js → mailbox-store-29139d89-e3513416.js} +2 -2
  47. package/dist/{nylas-additional-participants.entry-d35d7af5.cjs → nylas-additional-participants.entry-6413fc87.cjs} +1 -1
  48. package/dist/{nylas-additional-participants.entry-f6ed34d6.js → nylas-additional-participants.entry-a1fb4ef4.js} +2 -2
  49. package/dist/{nylas-booked-event-card_10.entry-534e587c.cjs → nylas-booked-event-card_10.entry-ce660783.cjs} +1 -1
  50. package/dist/{nylas-booked-event-card_10.entry-8efe8335.js → nylas-booked-event-card_10.entry-e435ff63.js} +3 -3
  51. package/dist/{nylas-custom-booking-flow.entry-12d09496.cjs → nylas-custom-booking-flow.entry-3e690bb7.cjs} +1 -1
  52. package/dist/{nylas-custom-booking-flow.entry-0e7b605d.js → nylas-custom-booking-flow.entry-56075ecd.js} +2 -2
  53. package/dist/{nylas-form-card.entry-7dd86dde.js → nylas-form-card.entry-33ff95e1.js} +2 -2
  54. package/dist/{nylas-form-card.entry-94579d1d.cjs → nylas-form-card.entry-64d7be4d.cjs} +1 -1
  55. package/dist/{nylas-if-state.entry-32ea90ea.cjs → nylas-if-state.entry-1e4b0a58.cjs} +1 -1
  56. package/dist/{nylas-if-state.entry-92cbc0b9.js → nylas-if-state.entry-3d22bca7.js} +2 -2
  57. package/dist/{nylas-list-folders.entry-8595a9b7.cjs → nylas-list-folders.entry-3da37b1c.cjs} +1 -1
  58. package/dist/{nylas-list-folders.entry-cab222c9.js → nylas-list-folders.entry-e634780d.js} +2 -2
  59. package/dist/{nylas-list-threads.entry-8e9294a3.js → nylas-list-threads.entry-26dbb8ff.js} +2 -2
  60. package/dist/{nylas-list-threads.entry-3fef6316.cjs → nylas-list-threads.entry-ef4743af.cjs} +1 -1
  61. package/dist/{nylas-login.entry-bc885e04.cjs → nylas-login.entry-a76e4aae.cjs} +1 -1
  62. package/dist/{nylas-login.entry-bd1d5b6f.js → nylas-login.entry-ff7d9db5.js} +2 -2
  63. package/dist/{nylas-mailbox-pagination.entry-74d3b376.cjs → nylas-mailbox-pagination.entry-565ee29b.cjs} +1 -1
  64. package/dist/{nylas-mailbox-pagination.entry-58657a09.js → nylas-mailbox-pagination.entry-fcb3cc47.js} +2 -2
  65. package/dist/{nylas-mailbox-toolbar-button.entry-8b73b9f4.cjs → nylas-mailbox-toolbar-button.entry-3a94b1e9.cjs} +1 -1
  66. package/dist/{nylas-mailbox-toolbar-button.entry-d7817b46.js → nylas-mailbox-toolbar-button.entry-ae13c538.js} +2 -2
  67. package/dist/{nylas-mailbox.entry-0bddc2fd.js → nylas-mailbox.entry-6d86abe9.js} +7 -6
  68. package/dist/nylas-mailbox.entry-8f41c35a.cjs +1 -0
  69. package/dist/{nylas-provider.entry-2e24192d.js → nylas-provider.entry-01e0944e.js} +6 -5
  70. package/dist/nylas-provider.entry-65f0f8da.cjs +1 -0
  71. package/dist/nylas-scheduler-editor.entry-7dc20e4d.cjs +2 -0
  72. package/dist/nylas-scheduler-editor.entry-8f62880a.js +1391 -0
  73. package/dist/nylas-scheduling.entry-1b6628a3.cjs +1 -0
  74. package/dist/{nylas-scheduling.entry-3f170361.js → nylas-scheduling.entry-f15b3106.js} +40 -38
  75. package/dist/{nylas-threads-refresh.entry-3b9f57c3.cjs → nylas-threads-refresh.entry-d62d0574.cjs} +1 -1
  76. package/dist/{nylas-threads-refresh.entry-f2967405.js → nylas-threads-refresh.entry-d7727ccb.js} +2 -2
  77. package/dist/{nylas-threads-search.entry-e70bbf70.js → nylas-threads-search.entry-4803d20b.js} +2 -2
  78. package/dist/{nylas-threads-search.entry-3e0b4fdc.cjs → nylas-threads-search.entry-eec50b1b.cjs} +1 -1
  79. package/dist/{nylas-view-thread.entry-4f39f045.js → nylas-view-thread.entry-2b85f8e2.js} +2 -2
  80. package/dist/{nylas-view-thread.entry-b23080b7.cjs → nylas-view-thread.entry-5da789da.cjs} +1 -1
  81. package/dist/{people-icon.entry-7f3b95e9.js → people-icon.entry-63f63064.js} +1 -1
  82. package/dist/{people-icon.entry-15cd7d77.cjs → people-icon.entry-b6426fe6.cjs} +1 -1
  83. package/dist/{play-icon_2.entry-2172886a.cjs → play-icon_2.entry-2b8094d7.cjs} +1 -1
  84. package/dist/{play-icon_2.entry-13065065.js → play-icon_2.entry-a3262db3.js} +1 -1
  85. package/dist/react.cjs +1 -1
  86. package/dist/react.js +1 -1
  87. package/dist/{refresh-icon.entry-61067a7f.cjs → refresh-icon.entry-542f680c.cjs} +1 -1
  88. package/dist/{refresh-icon.entry-fbfa185e.js → refresh-icon.entry-64679ef7.js} +1 -1
  89. package/dist/{register-component-83e24412-b666e56b.js → register-component-83e24412-51af5293.js} +1 -1
  90. package/dist/{register-component-83e24412-445c6ad9.cjs → register-component-83e24412-d76a2962.cjs} +1 -1
  91. package/dist/{scheduler-config-store-ec3b6190-8bde49c6.cjs → scheduler-config-store-ec3b6190-2710b76a.cjs} +1 -1
  92. package/dist/{scheduler-config-store-ec3b6190-fa81c492.js → scheduler-config-store-ec3b6190-df09ddc0.js} +1 -1
  93. package/dist/scheduler-store-dabdbc4f-404dc261.cjs +1 -0
  94. package/dist/{scheduler-store-8ca9003d-8da2c12d.js → scheduler-store-dabdbc4f-6f6096d6.js} +41 -28
  95. package/dist/{time-period-selector.entry-5e083fd3.js → time-period-selector.entry-8e6954f5.js} +1 -1
  96. package/dist/{time-period-selector.entry-febf55eb.cjs → time-period-selector.entry-c5faae46.cjs} +1 -1
  97. package/dist/{translate-icon.entry-8ce0a713.cjs → translate-icon.entry-49a653f0.cjs} +1 -1
  98. package/dist/{translate-icon.entry-10db7d36.js → translate-icon.entry-57dedacf.js} +1 -1
  99. package/dist/{warning-icon.entry-470e449d.js → warning-icon.entry-a7977526.js} +1 -1
  100. package/dist/{warning-icon.entry-b8217553.cjs → warning-icon.entry-bce861bd.cjs} +1 -1
  101. package/package.json +2 -2
  102. package/dist/add-circle-icon_21.entry-71e60262.js +0 -1755
  103. package/dist/add-circle-icon_21.entry-95dda099.cjs +0 -1
  104. package/dist/google-logo-icon_4.entry-e1e63fd0.cjs +0 -1
  105. package/dist/nylas-mailbox.entry-762f5062.cjs +0 -1
  106. package/dist/nylas-provider.entry-f8ba7a6e.cjs +0 -1
  107. package/dist/nylas-scheduler-editor.entry-8189b099.js +0 -2269
  108. package/dist/nylas-scheduler-editor.entry-a642f833.cjs +0 -7
  109. package/dist/nylas-scheduling.entry-13087b5f.cjs +0 -1
  110. package/dist/scheduler-store-8ca9003d-57b3f7a7.cjs +0 -1
@@ -1,20 +1,20 @@
1
- import { d as w, e as z } from "./index-20ea5b0c.js";
2
- var v;
1
+ import { d as I, e as L } from "./index-4c7e8f2f.js";
2
+ var y;
3
3
  (function(o) {
4
4
  o.Component = "component", o.Api = "api", o.Auth = "auth";
5
- })(v || (v = {}));
6
- var P;
5
+ })(y || (y = {}));
6
+ var b;
7
7
  (function(o) {
8
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.invalid_start_time = "invalid_start_time", o.invalid_end_time = "invalid_end_time", o.invalid_timezone = "invalid_timezone";
9
- })(P || (P = {}));
10
- var b;
9
+ })(b || (b = {}));
10
+ var k;
11
11
  (function(o) {
12
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";
13
- })(b || (b = {}));
14
- class L {
13
+ })(k || (k = {}));
14
+ class D {
15
15
  constructor() {
16
16
  this.component = (e) => {
17
- const i = v.Component, s = `${e} error`;
17
+ const i = y.Component, s = `${e} error`;
18
18
  return {
19
19
  endtime_not_in_future: (t = '"endtime" can not be in the future') => ({
20
20
  title: s,
@@ -58,7 +58,7 @@ class L {
58
58
  })
59
59
  };
60
60
  }, this.api = (e) => {
61
- const i = v.Api, s = `${e} error`;
61
+ const i = y.Api, s = `${e} error`;
62
62
  return {
63
63
  invalid_session: (t) => ({
64
64
  title: s,
@@ -89,9 +89,9 @@ class L {
89
89
  };
90
90
  }
91
91
  }
92
- class R {
92
+ class B {
93
93
  constructor({ schedulerAPIURL: e, schedulerStore: i, sessionId: s, configId: t }) {
94
- this.errors = new L(), this.schedulerStore = i, this.schedulerAPIURL = e, this.sessionId = s, this.configId = t;
94
+ this.errors = new D(), this.schedulerStore = i, this.schedulerAPIURL = e, this.sessionId = s, this.configId = t;
95
95
  }
96
96
  getHeaders() {
97
97
  return this.configId ? {} : {
@@ -158,8 +158,10 @@ class R {
158
158
  return n && (r = n.start_time), this.schedulerStore.set("selectedDate", r), this.schedulerStore.set("eventInfo", null), this.schedulerStore.set("showBookingForm", !1), this.schedulerStore.set("selectedTimeslot", null), t;
159
159
  }
160
160
  async setReschedule(e) {
161
- const i = await this.resetStoreStateAndFetchAvailability();
162
- return this.schedulerStore.set("rescheduleBookingId", e), i;
161
+ const i = this.schedulerStore.state.eventInfo;
162
+ i && this.schedulerStore.set("reschedulingEventInfo", i);
163
+ const s = await this.resetStoreStateAndFetchAvailability();
164
+ return this.schedulerStore.set("rescheduleBookingId", e), s;
163
165
  }
164
166
  async setCancel(e) {
165
167
  this.schedulerStore.set("cancelBookingId", e);
@@ -257,7 +259,7 @@ class R {
257
259
  }), this.schedulerStore.set("isLoading", !1), n;
258
260
  }
259
261
  async rescheduleBooking(e, i) {
260
- var I;
262
+ var P;
261
263
  if (this.schedulerStore.set("isLoading", !0), !e)
262
264
  return { error: this.errors.component("Reschedule Booking").no_booking_id() };
263
265
  const s = this.errors.api("Reschedule Booking"), t = this.errors.component("Reschedule Booking"), { bookingInfo: n, selectedTimeslot: r, selectedTimezone: a } = this.schedulerStore.state, { startTime: c, endTime: u, timezone: S } = i, p = c || (r == null ? void 0 : r.start_time);
@@ -269,23 +271,34 @@ class R {
269
271
  const l = S || a;
270
272
  if (!l)
271
273
  return { error: t.invalid_timezone('Please pass "timezone" in data or set "selectedTimezone" in the defaultSchedulerState.') };
272
- const d = i ? i == null ? void 0 : i.primaryParticipant : n == null ? void 0 : n.primaryParticipant, h = i ? (i == null ? void 0 : i.guests) || [] : (n == null ? void 0 : n.guests) || [], g = i ? { ...i == null ? void 0 : i.additionalFields, guests: h } : { ...n == null ? void 0 : n.additionalFields, guests: h }, k = this.configId ? `?configuration_id=${this.configId}` : "", T = `/v3/scheduling/bookings/${e}${k}`, A = this.getHeaders(), m = await this.makeAPIRequest(decodeURIComponent(T), "PATCH", JSON.stringify({
274
+ const d = i ? i == null ? void 0 : i.primaryParticipant : n == null ? void 0 : n.primaryParticipant, h = i ? (i == null ? void 0 : i.guests) || [] : (n == null ? void 0 : n.guests) || [], g = i ? { ...i == null ? void 0 : i.additionalFields, guests: h } : { ...n == null ? void 0 : n.additionalFields, guests: h }, T = this.configId ? `?configuration_id=${this.configId}` : "", A = `/v3/scheduling/bookings/${e}${T}`, z = this.getHeaders(), m = await this.makeAPIRequest(decodeURIComponent(A), "PATCH", JSON.stringify({
273
275
  start_time: p.getTime() / 1e3,
274
276
  end_time: _.getTime() / 1e3,
275
277
  time_zone: l,
276
278
  additional_fields: g,
277
279
  guest: { ...d }
278
- }), A);
280
+ }), z);
279
281
  if ("error" in m) {
280
282
  this.schedulerStore.set("isLoading", !1);
281
- const y = (I = m.error) == null ? void 0 : I.type;
283
+ const v = (P = m.error) == null ? void 0 : P.type;
282
284
  let f = m.error;
283
- y && y in s && (f = s[y]((f == null ? void 0 : f.message) || (f == null ? void 0 : f.title) || "Something went wrong"));
285
+ v && v in s && (f = s[v]((f == null ? void 0 : f.message) || (f == null ? void 0 : f.title) || "Something went wrong"));
286
+ }
287
+ const w = this.schedulerStore.get("reschedulingEventInfo");
288
+ if ("data" in m)
289
+ this.schedulerStore.set("eventInfo", m == null ? void 0 : m.data);
290
+ else if (w)
291
+ this.schedulerStore.set("eventInfo", w);
292
+ else {
293
+ const v = {
294
+ booking_id: e
295
+ };
296
+ this.schedulerStore.set("eventInfo", v);
284
297
  }
285
- return "data" in m && this.schedulerStore.set("eventInfo", m == null ? void 0 : m.data), this.schedulerStore.set("isLoading", !1), m;
298
+ return this.schedulerStore.set("isLoading", !1), m;
286
299
  }
287
300
  }
288
- function B(o = {}) {
301
+ function C(o = {}) {
289
302
  const e = {
290
303
  selectedDate: null,
291
304
  selectedLanguage: navigator.language,
@@ -301,12 +314,12 @@ function B(o = {}) {
301
314
  nylasBranding: !0,
302
315
  ...o
303
316
  };
304
- w("[defaultNylasStoreState]: ", e);
305
- const i = z(e);
317
+ I("[defaultNylasStoreState]: ", e);
318
+ const i = L(e);
306
319
  return i.onChange("availability", (s) => {
307
- w("[availability]: ", s);
320
+ I("[availability]: ", s);
308
321
  const t = s.map((n) => n.start_time);
309
- w("[selectableDates]: ", t), i.set("selectableDates", t);
322
+ I("[selectableDates]: ", t), i.set("selectableDates", t);
310
323
  }), i.reset = () => {
311
324
  for (const s in e) {
312
325
  const t = e[s];
@@ -315,7 +328,7 @@ function B(o = {}) {
315
328
  }, i;
316
329
  }
317
330
  export {
318
- B as C,
319
- v as E,
320
- R as N
331
+ C,
332
+ y as E,
333
+ B as N
321
334
  };
@@ -1,4 +1,4 @@
1
- import { r as i, c as s, d as n, h as d, g as l } from "./index-20ea5b0c.js";
1
+ import { r as i, c as s, d as n, h as d, g as l } from "./index-4c7e8f2f.js";
2
2
  import "react";
3
3
  import "react-dom";
4
4
  const a = ".time-period-selector.sc-time-period-selector{display:flex;gap:0.5rem}.time-period-selector.sc-time-period-selector select-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#time-period.sc-time-period-selector::part(sd_dropdown-button){min-width:108px}.time-period-selector.sc-time-period-selector select-dropdown#time-number.sc-time-period-selector::part(sd_dropdown-button){min-width:84px}.time-period-selector.sc-time-period-selector select-dropdown.sc-time-period-selector::part(sd_dropdown-button){padding:1rem;gap:1rem}.time-period-selector.sc-time-period-selector select-dropdown.sc-time-period-selector::part(sd_dropdown-content){width:100%;max-height:200px}", c = a, p = class {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index-33f74306.cjs");require("react");require("react-dom");const s=".time-period-selector.sc-time-period-selector{display:flex;gap:0.5rem}.time-period-selector.sc-time-period-selector select-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#time-period.sc-time-period-selector::part(sd_dropdown-button){min-width:108px}.time-period-selector.sc-time-period-selector select-dropdown#time-number.sc-time-period-selector::part(sd_dropdown-button){min-width:84px}.time-period-selector.sc-time-period-selector select-dropdown.sc-time-period-selector::part(sd_dropdown-button){padding:1rem;gap:1rem}.time-period-selector.sc-time-period-selector select-dropdown.sc-time-period-selector::part(sd_dropdown-content){width:100%;max-height:200px}",n=s,i=class{constructor(e){d.registerInstance(this,e),this.timePeriodChanged=d.createEvent(this,"timePeriodChanged",7),this.timePeriods=["hour","day","week","month"],this.defaultSelectedPeriod="hour",this.defaultSelectedNumber=1,this.selectedPeriod=this.defaultSelectedPeriod,this.selectedNumber=this.defaultSelectedNumber,this.numberOptions=this.calculateOptions("hour").map(t=>({label:t.toString(),value:t.toString()})),this.timePeriodOptions=this.timePeriods.map(t=>({label:t,value:t}))}defaultSelectedPeriodChangedHandler(e){this.selectedPeriod=e,this.updateNumberOptionsAndSelectedNumber(e)}defaultSelectedNumberChangedHandler(e){this.selectedNumber=e}timePeriodsChangedHandler(e){this.timePeriodOptions=e.map(t=>({label:t,value:t}))}calculateOptions(e){switch(e){case"hour":return Array.from({length:23},(t,r)=>r+1);case"minute":return Array.from({length:60},(t,r)=>r);case"day":return Array.from({length:30},(t,r)=>r+1);case"week":return Array.from({length:4},(t,r)=>r+1);case"month":return Array.from({length:12},(t,r)=>r+1);default:return[]}}selectedOptionChangedHandler(e){d.debug("time-period-selector","selectedOptionChangedHandler",e.detail);const{value:t,name:r}=e.detail;r==="time-period"?(this.selectedPeriod=t,this.updateNumberOptionsAndSelectedNumber(t)):r==="time-number"&&(this.selectedNumber=parseInt(t));const o={number:this.selectedNumber,period:this.selectedPeriod};this.timePeriodChanged.emit(o)}updateNumberOptionsAndSelectedNumber(e){const t=this.calculateOptions(e);this.numberOptions=t.map(r=>({label:r.toString(),value:r.toString()})),this.selectedNumber=parseInt(this.numberOptions[0].value)}render(){return d.h("div",{key:"eaec00db41b0c2410fc4a9ccc341fc4ec4012e10",class:"time-period-selector"},d.h("select-dropdown",{key:"0d53efe90429a05d4f52a8f1b92bf46b14b1e6ad",id:"time-number",name:"time-number",exportparts:"sd__dropdown: tps__number-dropdown, sd__dropdown-button: tps__number-dropdown-button, sd__dropdown-content: tps__number-dropdown-content",options:this.numberOptions,defaultSelectedOption:this.numberOptions.find(e=>e.value==this.selectedNumber.toString())??this.numberOptions[0],withSearch:!1}),d.h("select-dropdown",{key:"bce764e3e959eb4fad73d1e410173d584f243ee5",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(e=>e.value==this.selectedPeriod)??this.timePeriodOptions[0],withSearch:!1}))}get host(){return d.getElement(this)}static get watchers(){return{defaultSelectedPeriod:["defaultSelectedPeriodChangedHandler"],defaultSelectedNumber:["defaultSelectedNumberChangedHandler"],timePeriods:["timePeriodsChangedHandler"]}}};i.style=n;exports.time_period_selector=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index-3a004ec1.cjs");require("react");require("react-dom");const s=".time-period-selector.sc-time-period-selector{display:flex;gap:0.5rem}.time-period-selector.sc-time-period-selector select-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#time-period.sc-time-period-selector::part(sd_dropdown-button){min-width:108px}.time-period-selector.sc-time-period-selector select-dropdown#time-number.sc-time-period-selector::part(sd_dropdown-button){min-width:84px}.time-period-selector.sc-time-period-selector select-dropdown.sc-time-period-selector::part(sd_dropdown-button){padding:1rem;gap:1rem}.time-period-selector.sc-time-period-selector select-dropdown.sc-time-period-selector::part(sd_dropdown-content){width:100%;max-height:200px}",n=s,i=class{constructor(e){d.registerInstance(this,e),this.timePeriodChanged=d.createEvent(this,"timePeriodChanged",7),this.timePeriods=["hour","day","week","month"],this.defaultSelectedPeriod="hour",this.defaultSelectedNumber=1,this.selectedPeriod=this.defaultSelectedPeriod,this.selectedNumber=this.defaultSelectedNumber,this.numberOptions=this.calculateOptions("hour").map(t=>({label:t.toString(),value:t.toString()})),this.timePeriodOptions=this.timePeriods.map(t=>({label:t,value:t}))}defaultSelectedPeriodChangedHandler(e){this.selectedPeriod=e,this.updateNumberOptionsAndSelectedNumber(e)}defaultSelectedNumberChangedHandler(e){this.selectedNumber=e}timePeriodsChangedHandler(e){this.timePeriodOptions=e.map(t=>({label:t,value:t}))}calculateOptions(e){switch(e){case"hour":return Array.from({length:23},(t,r)=>r+1);case"minute":return Array.from({length:60},(t,r)=>r);case"day":return Array.from({length:30},(t,r)=>r+1);case"week":return Array.from({length:4},(t,r)=>r+1);case"month":return Array.from({length:12},(t,r)=>r+1);default:return[]}}selectedOptionChangedHandler(e){d.debug("time-period-selector","selectedOptionChangedHandler",e.detail);const{value:t,name:r}=e.detail;r==="time-period"?(this.selectedPeriod=t,this.updateNumberOptionsAndSelectedNumber(t)):r==="time-number"&&(this.selectedNumber=parseInt(t));const o={number:this.selectedNumber,period:this.selectedPeriod};this.timePeriodChanged.emit(o)}updateNumberOptionsAndSelectedNumber(e){const t=this.calculateOptions(e);this.numberOptions=t.map(r=>({label:r.toString(),value:r.toString()})),this.selectedNumber=parseInt(this.numberOptions[0].value)}render(){return d.h("div",{key:"eaec00db41b0c2410fc4a9ccc341fc4ec4012e10",class:"time-period-selector"},d.h("select-dropdown",{key:"0d53efe90429a05d4f52a8f1b92bf46b14b1e6ad",id:"time-number",name:"time-number",exportparts:"sd__dropdown: tps__number-dropdown, sd__dropdown-button: tps__number-dropdown-button, sd__dropdown-content: tps__number-dropdown-content",options:this.numberOptions,defaultSelectedOption:this.numberOptions.find(e=>e.value==this.selectedNumber.toString())??this.numberOptions[0],withSearch:!1}),d.h("select-dropdown",{key:"bce764e3e959eb4fad73d1e410173d584f243ee5",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(e=>e.value==this.selectedPeriod)??this.timePeriodOptions[0],withSearch:!1}))}get host(){return d.getElement(this)}static get watchers(){return{defaultSelectedPeriod:["defaultSelectedPeriodChangedHandler"],defaultSelectedNumber:["defaultSelectedNumberChangedHandler"],timePeriods:["timePeriodsChangedHandler"]}}};i.style=n;exports.time_period_selector=i;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("./index-33f74306.cjs");require("react");require("react-dom");const s=".sc-translate-icon-h{display:flex}",i=s,e=class{constructor(t){C.registerInstance(this,t),this.width="16",this.height="16"}render(){return C.h("svg",{key:"2196637bc95dbea321941ad3080c130dcea629c1",xmlns:"http://www.w3.org/2000/svg",width:this.width,height:this.height,viewBox:"0 0 20 20",fill:"none"},C.h("path",{key:"2c2a3192f284366cb9d53e8f381e48cdfa546eb2",fill:"currentColor",d:"M14.1663 4.02867C14.4267 4.12081 14.563 4.40654 14.4709 4.66685C14.3501 5.00788 14.2182 5.4771 14.1178 5.86047C14.6877 5.77587 15.2665 5.65653 15.8867 5.51288C16.1557 5.45058 16.4243 5.61815 16.4866 5.88717C16.5489 6.15619 16.3814 6.42479 16.1123 6.4871C15.339 6.66621 14.6101 6.81289 13.8717 6.90283C13.7759 7.35654 13.7014 7.77084 13.6451 8.15021C14.1202 8.04599 14.5738 8.00553 14.9996 8.02075L14.9996 8C14.9996 7.72386 15.2235 7.5 15.4996 7.5C15.7758 7.5 15.9996 7.72386 15.9996 8C15.9996 8.05657 15.9991 8.11281 15.9979 8.16871C17.1392 8.47838 17.9781 9.23987 18.3435 10.2263C18.9579 11.8853 18.1287 13.8787 15.7027 14.9569C15.4504 15.069 15.1549 14.9554 15.0427 14.7031C14.9306 14.4507 15.0442 14.1552 15.2966 14.0431C17.3705 13.1213 17.7913 11.6147 17.4057 10.5737C17.1874 9.984 16.6776 9.44916 15.9129 9.18633C15.6829 10.7237 15.021 11.9466 14.229 12.7925C14.3126 12.9656 14.3958 13.1436 14.4641 13.3151C14.5662 13.5717 14.441 13.8625 14.1844 13.9646C13.9278 14.0667 13.637 13.9415 13.5349 13.6849C13.5066 13.6137 13.4777 13.5463 13.448 13.4802C13.028 13.7794 12.5905 13.9869 12.1705 14.0835C11.5942 14.2161 10.963 14.1517 10.534 13.6942C9.88917 13.0053 9.84361 11.8611 10.2855 10.8412C10.6652 9.96479 11.4186 9.11781 12.5848 8.54034C12.6387 8.07338 12.7199 7.55894 12.8332 6.98891C12.3926 7.00755 11.9403 7.00326 11.4659 6.97127C11.1904 6.95269 10.9821 6.71428 11.0007 6.43876C11.0192 6.16325 11.2577 5.95496 11.5332 5.97353C12.0633 6.00928 12.5641 6.00772 13.0566 5.97553C13.1605 5.55444 13.3512 4.8331 13.5282 4.33317C13.6203 4.07286 13.906 3.93653 14.1663 4.02867ZM12.501 9.74109C11.8436 10.1821 11.427 10.7219 11.2031 11.2387C10.8542 12.0439 10.9881 12.716 11.2638 13.0105C11.2637 13.0104 11.2639 13.0106 11.2638 13.0105C11.3573 13.11 11.5624 13.1973 11.9463 13.109C12.2578 13.0373 12.6311 12.8571 13.0121 12.5576C12.8658 12.22 12.7272 11.8324 12.6313 11.353C12.5405 10.8996 12.4899 10.3743 12.501 9.74109ZM13.7808 11.7797C14.316 11.0956 14.759 10.1665 14.9271 9.01632C14.539 9.00681 14.1111 9.05601 13.6457 9.17854C13.605 9.19274 13.5647 9.20726 13.525 9.22209C13.4663 10.0545 13.5146 10.671 13.6118 11.1568C13.6578 11.3868 13.7156 11.5913 13.7808 11.7797ZM6.92028 5.2159C5.77942 4.88398 4.78409 5.00841 4.07616 5.21575C3.72264 5.3193 3.439 5.44393 3.24121 5.5443C3.14215 5.59457 3.0641 5.63901 3.00903 5.67212C2.98147 5.68868 2.95962 5.70244 2.9437 5.71271L2.92429 5.72542L2.91797 5.72966L2.91566 5.73123L2.91393 5.73241C2.91384 5.73249 2.91436 5.73325 2.94925 5.78397C3.23698 6.20225 3.1703 6.10548 2.91393 5.73241C2.68634 5.88881 2.62863 6.20009 2.78502 6.42767C2.94134 6.65514 3.25207 6.71313 3.47963 6.55703L3.4788 6.5576L3.48576 6.55305C3.49318 6.54826 3.50608 6.5401 3.52423 6.52919C3.56057 6.50735 3.6177 6.47463 3.69373 6.43605C3.84612 6.35872 4.07228 6.2589 4.35724 6.17544C4.92619 6.0088 5.72242 5.90898 6.64043 6.17595C7.35305 6.38517 7.66747 6.76919 7.82692 7.16112C7.98173 7.54163 8.0026 7.95751 8.00531 8.33243C7.46199 8.18407 6.79336 8.03682 6.08385 8.00744C5.04808 7.96456 3.8874 8.17096 2.87738 9.01102C1.98877 9.75011 1.78345 10.8818 2.07014 11.853C2.35713 12.8252 3.14925 13.692 4.31803 13.9348C5.22351 14.123 6.18016 13.8639 6.9599 13.5212C7.3403 13.354 7.69572 13.1594 8.0057 12.9665V13.5C8.0057 13.7761 8.22956 14 8.5057 14C8.78184 14 9.0057 13.7754 9.0057 13.4993L9.0057 8.44586C9.0058 8.05404 9.00595 7.40554 8.7532 6.78428C8.48142 6.11625 7.93342 5.51313 6.92136 5.21622L6.92028 5.2159ZM6.04249 9.00659C6.76366 9.03645 7.44769 9.209 8.0057 9.37205V11.757C7.65814 12.0182 7.13927 12.35 6.55757 12.6057C5.85264 12.9155 5.12729 13.0816 4.52148 12.9557C3.75127 12.7957 3.22322 12.2271 3.02922 11.5699C2.83491 10.9116 2.98777 10.2199 3.51683 9.77985C4.27958 9.14545 5.16917 8.97043 6.04249 9.00659Z"}))}};e.style=i;exports.translate_icon=e;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("./index-3a004ec1.cjs");require("react");require("react-dom");const s=".sc-translate-icon-h{display:flex}",i=s,e=class{constructor(t){C.registerInstance(this,t),this.width="16",this.height="16"}render(){return C.h("svg",{key:"2196637bc95dbea321941ad3080c130dcea629c1",xmlns:"http://www.w3.org/2000/svg",width:this.width,height:this.height,viewBox:"0 0 20 20",fill:"none"},C.h("path",{key:"2c2a3192f284366cb9d53e8f381e48cdfa546eb2",fill:"currentColor",d:"M14.1663 4.02867C14.4267 4.12081 14.563 4.40654 14.4709 4.66685C14.3501 5.00788 14.2182 5.4771 14.1178 5.86047C14.6877 5.77587 15.2665 5.65653 15.8867 5.51288C16.1557 5.45058 16.4243 5.61815 16.4866 5.88717C16.5489 6.15619 16.3814 6.42479 16.1123 6.4871C15.339 6.66621 14.6101 6.81289 13.8717 6.90283C13.7759 7.35654 13.7014 7.77084 13.6451 8.15021C14.1202 8.04599 14.5738 8.00553 14.9996 8.02075L14.9996 8C14.9996 7.72386 15.2235 7.5 15.4996 7.5C15.7758 7.5 15.9996 7.72386 15.9996 8C15.9996 8.05657 15.9991 8.11281 15.9979 8.16871C17.1392 8.47838 17.9781 9.23987 18.3435 10.2263C18.9579 11.8853 18.1287 13.8787 15.7027 14.9569C15.4504 15.069 15.1549 14.9554 15.0427 14.7031C14.9306 14.4507 15.0442 14.1552 15.2966 14.0431C17.3705 13.1213 17.7913 11.6147 17.4057 10.5737C17.1874 9.984 16.6776 9.44916 15.9129 9.18633C15.6829 10.7237 15.021 11.9466 14.229 12.7925C14.3126 12.9656 14.3958 13.1436 14.4641 13.3151C14.5662 13.5717 14.441 13.8625 14.1844 13.9646C13.9278 14.0667 13.637 13.9415 13.5349 13.6849C13.5066 13.6137 13.4777 13.5463 13.448 13.4802C13.028 13.7794 12.5905 13.9869 12.1705 14.0835C11.5942 14.2161 10.963 14.1517 10.534 13.6942C9.88917 13.0053 9.84361 11.8611 10.2855 10.8412C10.6652 9.96479 11.4186 9.11781 12.5848 8.54034C12.6387 8.07338 12.7199 7.55894 12.8332 6.98891C12.3926 7.00755 11.9403 7.00326 11.4659 6.97127C11.1904 6.95269 10.9821 6.71428 11.0007 6.43876C11.0192 6.16325 11.2577 5.95496 11.5332 5.97353C12.0633 6.00928 12.5641 6.00772 13.0566 5.97553C13.1605 5.55444 13.3512 4.8331 13.5282 4.33317C13.6203 4.07286 13.906 3.93653 14.1663 4.02867ZM12.501 9.74109C11.8436 10.1821 11.427 10.7219 11.2031 11.2387C10.8542 12.0439 10.9881 12.716 11.2638 13.0105C11.2637 13.0104 11.2639 13.0106 11.2638 13.0105C11.3573 13.11 11.5624 13.1973 11.9463 13.109C12.2578 13.0373 12.6311 12.8571 13.0121 12.5576C12.8658 12.22 12.7272 11.8324 12.6313 11.353C12.5405 10.8996 12.4899 10.3743 12.501 9.74109ZM13.7808 11.7797C14.316 11.0956 14.759 10.1665 14.9271 9.01632C14.539 9.00681 14.1111 9.05601 13.6457 9.17854C13.605 9.19274 13.5647 9.20726 13.525 9.22209C13.4663 10.0545 13.5146 10.671 13.6118 11.1568C13.6578 11.3868 13.7156 11.5913 13.7808 11.7797ZM6.92028 5.2159C5.77942 4.88398 4.78409 5.00841 4.07616 5.21575C3.72264 5.3193 3.439 5.44393 3.24121 5.5443C3.14215 5.59457 3.0641 5.63901 3.00903 5.67212C2.98147 5.68868 2.95962 5.70244 2.9437 5.71271L2.92429 5.72542L2.91797 5.72966L2.91566 5.73123L2.91393 5.73241C2.91384 5.73249 2.91436 5.73325 2.94925 5.78397C3.23698 6.20225 3.1703 6.10548 2.91393 5.73241C2.68634 5.88881 2.62863 6.20009 2.78502 6.42767C2.94134 6.65514 3.25207 6.71313 3.47963 6.55703L3.4788 6.5576L3.48576 6.55305C3.49318 6.54826 3.50608 6.5401 3.52423 6.52919C3.56057 6.50735 3.6177 6.47463 3.69373 6.43605C3.84612 6.35872 4.07228 6.2589 4.35724 6.17544C4.92619 6.0088 5.72242 5.90898 6.64043 6.17595C7.35305 6.38517 7.66747 6.76919 7.82692 7.16112C7.98173 7.54163 8.0026 7.95751 8.00531 8.33243C7.46199 8.18407 6.79336 8.03682 6.08385 8.00744C5.04808 7.96456 3.8874 8.17096 2.87738 9.01102C1.98877 9.75011 1.78345 10.8818 2.07014 11.853C2.35713 12.8252 3.14925 13.692 4.31803 13.9348C5.22351 14.123 6.18016 13.8639 6.9599 13.5212C7.3403 13.354 7.69572 13.1594 8.0057 12.9665V13.5C8.0057 13.7761 8.22956 14 8.5057 14C8.78184 14 9.0057 13.7754 9.0057 13.4993L9.0057 8.44586C9.0058 8.05404 9.00595 7.40554 8.7532 6.78428C8.48142 6.11625 7.93342 5.51313 6.92136 5.21622L6.92028 5.2159ZM6.04249 9.00659C6.76366 9.03645 7.44769 9.209 8.0057 9.37205V11.757C7.65814 12.0182 7.13927 12.35 6.55757 12.6057C5.85264 12.9155 5.12729 13.0816 4.52148 12.9557C3.75127 12.7957 3.22322 12.2271 3.02922 11.5699C2.83491 10.9116 2.98777 10.2199 3.51683 9.77985C4.27958 9.14545 5.16917 8.97043 6.04249 9.00659Z"}))}};e.style=i;exports.translate_icon=e;
@@ -1,4 +1,4 @@
1
- import { r as e, h as C } from "./index-20ea5b0c.js";
1
+ import { r as e, h as C } from "./index-4c7e8f2f.js";
2
2
  import "react";
3
3
  import "react-dom";
4
4
  const s = ".sc-translate-icon-h{display:flex}", i = s, c = class {
@@ -1,4 +1,4 @@
1
- import { r as a, h as n } from "./index-20ea5b0c.js";
1
+ import { r as a, h as n } from "./index-4c7e8f2f.js";
2
2
  import "react";
3
3
  import "react-dom";
4
4
  const e = ".sc-warning-icon-h{display:flex}", r = e, i = class {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-33f74306.cjs");require("react");require("react-dom");const r=".sc-warning-icon-h{display:flex}",i=r,n=class{constructor(t){e.registerInstance(this,t),this.width="16",this.height="16"}render(){return e.h("svg",{key:"5a655b4440d40d0e22c0e8bb3d9e3f08a947eb32",width:"21",height:"21",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"c3de0f39d8816fcc092f0a4bc6231e9cb91283de",d:"M10.149 7.054a.5.5 0 0 1 .5.5v4a.5.5 0 1 1-1 0v-4a.5.5 0 0 1 .5-.5Zm0 7.5a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5ZM8.834 2.906a1.5 1.5 0 0 1 2.63 0l6.558 11.925a1.5 1.5 0 0 1-1.314 2.223H3.59a1.5 1.5 0 0 1-1.314-2.223L8.834 2.906Zm1.753.482a.5.5 0 0 0-.876 0L3.15 15.313a.5.5 0 0 0 .439.741h13.117a.5.5 0 0 0 .439-.741l-6.56-11.925Z",fill:"currentColor"}))}};n.style=i;exports.warning_icon=n;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-3a004ec1.cjs");require("react");require("react-dom");const r=".sc-warning-icon-h{display:flex}",i=r,n=class{constructor(t){e.registerInstance(this,t),this.width="16",this.height="16"}render(){return e.h("svg",{key:"5a655b4440d40d0e22c0e8bb3d9e3f08a947eb32",width:"21",height:"21",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"c3de0f39d8816fcc092f0a4bc6231e9cb91283de",d:"M10.149 7.054a.5.5 0 0 1 .5.5v4a.5.5 0 1 1-1 0v-4a.5.5 0 0 1 .5-.5Zm0 7.5a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5ZM8.834 2.906a1.5 1.5 0 0 1 2.63 0l6.558 11.925a1.5 1.5 0 0 1-1.314 2.223H3.59a1.5 1.5 0 0 1-1.314-2.223L8.834 2.906Zm1.753.482a.5.5 0 0 0-.876 0L3.15 15.313a.5.5 0 0 0 .439.741h13.117a.5.5 0 0 0 .439-.741l-6.56-11.925Z",fill:"currentColor"}))}};n.style=i;exports.warning_icon=n;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nylas/react",
3
- "version": "1.1.0-canary.11",
3
+ "version": "1.1.0-canary.12",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -22,7 +22,7 @@
22
22
  "dependencies": {
23
23
  "react": "^18.2.0",
24
24
  "react-dom": "^18.2.0",
25
- "@nylas/web-elements": "^1.1.0-canary.11",
25
+ "@nylas/web-elements": "^1.1.0-canary.12",
26
26
  "@nylas/core": "^1.1.0-canary.3"
27
27
  },
28
28
  "devDependencies": {