@nylas/react 1.3.3 → 1.3.4

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 (148) hide show
  1. package/dist/add-circle-icon.entry-321c1dd1.js +15 -0
  2. package/dist/{add-circle-icon.entry-89060fe6.cjs → add-circle-icon.entry-dcc45961.cjs} +1 -1
  3. package/dist/archive-icon.entry-715e139b.js +15 -0
  4. package/dist/archive-icon.entry-c4da9f4f.cjs +1 -0
  5. package/dist/{arrow-icon.entry-7c38f4ad.js → arrow-icon.entry-9311463c.js} +2 -2
  6. package/dist/{arrow-icon.entry-e8dbe365.cjs → arrow-icon.entry-bdccce8a.cjs} +1 -1
  7. package/dist/{bold-icon.entry-665901ce.cjs → bold-icon.entry-06fa4738.cjs} +1 -1
  8. package/dist/{bold-icon.entry-4ce7cfee.js → bold-icon.entry-c531dff1.js} +4 -4
  9. package/dist/{button-component_2.entry-89ea010b.js → button-component_2.entry-5aad0ec4.js} +9 -9
  10. package/dist/{button-component_2.entry-ca263036.cjs → button-component_2.entry-db911efe.cjs} +1 -1
  11. package/dist/{calendar-agenda-fill-icon_53.entry-347662f3.js → calendar-agenda-fill-icon_53.entry-6f1aa42c.js} +1846 -1433
  12. package/dist/calendar-agenda-fill-icon_53.entry-affead77.cjs +6 -0
  13. package/dist/{calendar-cancel-icon.entry-6b7836c9.cjs → calendar-cancel-icon.entry-3bd1c8e9.cjs} +1 -1
  14. package/dist/{calendar-cancel-icon.entry-c1d33f90.js → calendar-cancel-icon.entry-59375bc4.js} +4 -4
  15. package/dist/{calendar-check-icon_2.entry-222e3c0b.js → calendar-check-icon_2.entry-1ca369b6.js} +7 -7
  16. package/dist/{calendar-check-icon_2.entry-67024cd6.cjs → calendar-check-icon_2.entry-540dde9d.cjs} +1 -1
  17. package/dist/{calendar-icon.entry-380048b0.cjs → calendar-icon.entry-1d9773d5.cjs} +1 -1
  18. package/dist/{calendar-icon.entry-c08a8f21.js → calendar-icon.entry-66517be4.js} +5 -5
  19. package/dist/{checkbox-component_3.entry-52b27cb9.cjs → checkbox-component_3.entry-3918885e.cjs} +1 -1
  20. package/dist/{checkbox-component_3.entry-dab3c3c8.js → checkbox-component_3.entry-cf9507ac.js} +5 -5
  21. package/dist/{chevron-icon_3.entry-17bb7d23.cjs → chevron-icon_3.entry-27b71bd6.cjs} +1 -1
  22. package/dist/{chevron-icon_3.entry-7be40d99.js → chevron-icon_3.entry-afc62aa5.js} +13 -13
  23. package/dist/{clock-icon_4.entry-89e0dd55.js → clock-icon_4.entry-ab2c2eaf.js} +18 -18
  24. package/dist/{clock-icon_4.entry-875db481.cjs → clock-icon_4.entry-f46a42fc.cjs} +1 -1
  25. package/dist/close-icon.entry-791cb99c.js +15 -0
  26. package/dist/close-icon.entry-be2b5f87.cjs +1 -0
  27. package/dist/{constants-54af2051-a3596673.cjs → constants-91d76d21-0f7c85cc.cjs} +1 -1
  28. package/dist/{constants-54af2051-767e8462.js → constants-91d76d21-1638ead6.js} +23 -11
  29. package/dist/copy-icon.entry-16835c5d.cjs +1 -0
  30. package/dist/{copy-icon.entry-eecc7301.js → copy-icon.entry-c009a659.js} +6 -6
  31. package/dist/{delete-icon.entry-1e6c99ee.cjs → delete-icon.entry-3c295200.cjs} +1 -1
  32. package/dist/{delete-icon.entry-4b341b41.js → delete-icon.entry-e8815e15.js} +2 -2
  33. package/dist/document-refresh-icon.entry-1628d0dd.js +15 -0
  34. package/dist/{document-refresh-icon.entry-612c5d4f.cjs → document-refresh-icon.entry-7d84ace4.cjs} +1 -1
  35. package/dist/{feedbackSync-e5cb0245-013ce5ec.cjs → feedbackSync-b5d35a5b-1343e33b.cjs} +1 -1
  36. package/dist/{feedbackSync-e5cb0245-f8e4575c.js → feedbackSync-b5d35a5b-20032e5d.js} +1 -1
  37. package/dist/{folder-icon.entry-5bc752d4.cjs → folder-icon.entry-1837e7eb.cjs} +1 -1
  38. package/dist/{folder-icon.entry-8d91bc75.js → folder-icon.entry-1a70f499.js} +2 -2
  39. package/dist/forward-icon.entry-7a9952fe.cjs +1 -0
  40. package/dist/forward-icon.entry-92fa4f95.js +15 -0
  41. package/dist/{globe-icon.entry-c2ddabb6.js → globe-icon.entry-2886c103.js} +4 -4
  42. package/dist/{globe-icon.entry-13f5dd98.cjs → globe-icon.entry-5ea64e36.cjs} +1 -1
  43. package/dist/{google-logo-icon_4.entry-b58af39b.js → google-logo-icon_4.entry-c0413818.js} +168 -148
  44. package/dist/google-logo-icon_4.entry-ff5ebfd9.cjs +1 -0
  45. package/dist/inbox-icon.entry-893a70b6.js +15 -0
  46. package/dist/inbox-icon.entry-ad864253.cjs +1 -0
  47. package/dist/index-94416062.cjs +81 -0
  48. package/dist/index-cd93b584.js +16202 -0
  49. package/dist/{index.es-e9d66a9b-fa36c085.cjs → index.es-ef72cd61-0860521c.cjs} +1 -1
  50. package/dist/{index.es-e9d66a9b-a07a895d.js → index.es-ef72cd61-3075f564.js} +1 -1
  51. package/dist/{info-icon_2.entry-14cad09c.js → info-icon_2.entry-891619f7.js} +5 -5
  52. package/dist/{info-icon_2.entry-fce3a1ce.cjs → info-icon_2.entry-cfa2954a.cjs} +1 -1
  53. package/dist/{input-color-picker.entry-2079f40e.js → input-color-picker.entry-58c5f4d3.js} +4 -4
  54. package/dist/{input-color-picker.entry-785e80b1.cjs → input-color-picker.entry-5c3e8407.cjs} +1 -1
  55. package/dist/{input-component.entry-cee3fa04.js → input-component.entry-a45cff7f.js} +3 -3
  56. package/dist/{input-component.entry-0edf62cf.cjs → input-component.entry-f6f257b9.cjs} +1 -1
  57. package/dist/input-dropdown_2.entry-0518caac.js +228 -0
  58. package/dist/input-dropdown_2.entry-85077fff.cjs +1 -0
  59. package/dist/italic-icon.entry-7f971c72.cjs +1 -0
  60. package/dist/italic-icon.entry-a9a0be67.js +15 -0
  61. package/dist/multi-select-dropdown.entry-0b7e26c0.js +116 -0
  62. package/dist/multi-select-dropdown.entry-2c5b3f8d.cjs +1 -0
  63. package/dist/{nylas-booked-event-card_12.entry-56068565.js → nylas-booked-event-card_12.entry-8eed168c.js} +211 -190
  64. package/dist/nylas-booked-event-card_12.entry-d416f896.cjs +1 -0
  65. package/dist/{nylas-form-card.entry-77485e1d.cjs → nylas-form-card.entry-2c336c14.cjs} +1 -1
  66. package/dist/{nylas-form-card.entry-df1c70ff.js → nylas-form-card.entry-8842785d.js} +8 -8
  67. package/dist/{nylas-if-state.entry-0271bf92.cjs → nylas-if-state.entry-e6c90919.cjs} +1 -1
  68. package/dist/{nylas-if-state.entry-74c342ef.js → nylas-if-state.entry-fdc20d01.js} +3 -3
  69. package/dist/{nylas-login.entry-6a308ac9.js → nylas-login.entry-16f39c90.js} +3 -3
  70. package/dist/{nylas-login.entry-2483aa51.cjs → nylas-login.entry-dcdc4d06.cjs} +1 -1
  71. package/dist/{nylas-provider.entry-df790de3.cjs → nylas-provider.entry-0cc093e4.cjs} +1 -1
  72. package/dist/{nylas-provider.entry-5cbbd312.js → nylas-provider.entry-d51de210.js} +5 -5
  73. package/dist/nylas-scheduler-editor.entry-af211f07.cjs +2 -0
  74. package/dist/{nylas-scheduler-editor.entry-b6793c45.js → nylas-scheduler-editor.entry-d0214565.js} +48 -30
  75. package/dist/{nylas-scheduling.entry-fea8dca0.js → nylas-scheduling.entry-3d3a4eb4.js} +7 -7
  76. package/dist/{nylas-scheduling.entry-2a9aed18.cjs → nylas-scheduling.entry-ce1ef505.cjs} +1 -1
  77. package/dist/{nylas-time-window-picker_2.entry-fc5aa4be.js → nylas-time-window-picker_2.entry-24672606.js} +30 -30
  78. package/dist/{nylas-time-window-picker_2.entry-32f657a2.cjs → nylas-time-window-picker_2.entry-52a54abb.cjs} +1 -1
  79. package/dist/{person-icon.entry-c853f6b5.cjs → person-icon.entry-954d4c10.cjs} +1 -1
  80. package/dist/{person-icon.entry-fae1d972.js → person-icon.entry-dcdc2118.js} +4 -4
  81. package/dist/{play-icon.entry-b07a4311.cjs → play-icon.entry-7e17d583.cjs} +1 -1
  82. package/dist/{play-icon.entry-6ccd7cb6.js → play-icon.entry-e727a1d6.js} +4 -4
  83. package/dist/react.cjs +1 -1
  84. package/dist/react.js +1 -1
  85. package/dist/{refresh-icon.entry-b717e4fe.js → refresh-icon.entry-d5e50180.js} +4 -4
  86. package/dist/{refresh-icon.entry-a218275f.cjs → refresh-icon.entry-f735be78.cjs} +1 -1
  87. package/dist/{register-component-5d7bcc15-bb9405d1.cjs → register-component-a169494c-3d95c4fd.cjs} +1 -1
  88. package/dist/{register-component-5d7bcc15-43981253.js → register-component-a169494c-62768a00.js} +1 -1
  89. package/dist/{reply-all-icon.entry-f20c4a10.js → reply-all-icon.entry-848cd16f.js} +5 -5
  90. package/dist/{reply-all-icon.entry-cd2bafd1.cjs → reply-all-icon.entry-c847636d.cjs} +1 -1
  91. package/dist/reply-icon.entry-028435a1.cjs +1 -0
  92. package/dist/reply-icon.entry-9e3e5122.js +15 -0
  93. package/dist/{scheduler-config-store-ed4a8dfd-96520080.cjs → scheduler-config-store-ed4a8dfd-0e3f540f.cjs} +1 -1
  94. package/dist/{scheduler-config-store-ed4a8dfd-2619e757.js → scheduler-config-store-ed4a8dfd-622802c7.js} +1 -1
  95. package/dist/{scheduler-store-3acf4d70-53282ac4.cjs → scheduler-store-8e74959b-c8514d9a.cjs} +1 -1
  96. package/dist/{scheduler-store-3acf4d70-68aacbea.js → scheduler-store-8e74959b-ffa0b3c6.js} +2 -2
  97. package/dist/sent-icon.entry-eef67c1a.cjs +1 -0
  98. package/dist/sent-icon.entry-f8fda6ff.js +15 -0
  99. package/dist/spam-icon.entry-22437325.cjs +1 -0
  100. package/dist/spam-icon.entry-ec4f3144.js +15 -0
  101. package/dist/{star-icon.entry-6fc95071.js → star-icon.entry-d7cd7608.js} +5 -5
  102. package/dist/{star-icon.entry-a6e85c82.cjs → star-icon.entry-f275321a.cjs} +1 -1
  103. package/dist/{stop-icon.entry-8b041eda.js → stop-icon.entry-55779283.js} +2 -2
  104. package/dist/{stop-icon.entry-eee61c96.cjs → stop-icon.entry-89c2bae7.cjs} +1 -1
  105. package/dist/{textarea-component.entry-dc92a53f.js → textarea-component.entry-02360e34.js} +2 -2
  106. package/dist/{textarea-component.entry-cbe424d4.cjs → textarea-component.entry-5e8cb080.cjs} +1 -1
  107. package/dist/{translate-icon.entry-7307d3f1.cjs → translate-icon.entry-a7915e82.cjs} +1 -1
  108. package/dist/{translate-icon.entry-447f1502.js → translate-icon.entry-b0b36e4c.js} +4 -4
  109. package/dist/trash-fill-icon.entry-1fd28f47.js +15 -0
  110. package/dist/trash-fill-icon.entry-e933f219.cjs +1 -0
  111. package/dist/{underline-icon.entry-6acfca57.js → underline-icon.entry-1636f401.js} +2 -2
  112. package/dist/{underline-icon.entry-c636ca0e.cjs → underline-icon.entry-8bf17177.cjs} +1 -1
  113. package/dist/{warning-icon.entry-03615141.cjs → warning-icon.entry-27c0cdd6.cjs} +1 -1
  114. package/dist/{warning-icon.entry-290eb052.js → warning-icon.entry-cef2e7c1.js} +7 -7
  115. package/package.json +3 -3
  116. package/dist/add-circle-icon.entry-8b883ae4.js +0 -15
  117. package/dist/archive-icon.entry-62c7e06e.js +0 -15
  118. package/dist/archive-icon.entry-e9038aeb.cjs +0 -1
  119. package/dist/calendar-agenda-fill-icon_53.entry-da0fac2a.cjs +0 -9
  120. package/dist/close-icon.entry-4b2a2974.js +0 -15
  121. package/dist/close-icon.entry-e52d8440.cjs +0 -1
  122. package/dist/copy-icon.entry-f3370220.cjs +0 -1
  123. package/dist/document-refresh-icon.entry-653dc173.js +0 -15
  124. package/dist/forward-icon.entry-1d14a631.js +0 -15
  125. package/dist/forward-icon.entry-fe0f2a3a.cjs +0 -1
  126. package/dist/google-logo-icon_4.entry-59423b91.cjs +0 -1
  127. package/dist/inbox-icon.entry-2e8c1cf5.cjs +0 -1
  128. package/dist/inbox-icon.entry-5a452db1.js +0 -15
  129. package/dist/index-5611d3d5.cjs +0 -81
  130. package/dist/index-589f8eee.js +0 -13086
  131. package/dist/input-dropdown.entry-63cf88c1.cjs +0 -1
  132. package/dist/input-dropdown.entry-a1bac5bf.js +0 -134
  133. package/dist/italic-icon.entry-85a90ace.js +0 -15
  134. package/dist/italic-icon.entry-9ced8045.cjs +0 -1
  135. package/dist/multi-select-dropdown.entry-dd699cdf.js +0 -112
  136. package/dist/multi-select-dropdown.entry-f6ac5ae9.cjs +0 -1
  137. package/dist/nylas-booked-event-card_12.entry-89bcf205.cjs +0 -1
  138. package/dist/nylas-scheduler-editor.entry-c23fd4d8.cjs +0 -2
  139. package/dist/reply-icon.entry-30b5222b.cjs +0 -1
  140. package/dist/reply-icon.entry-abfbde42.js +0 -15
  141. package/dist/sent-icon.entry-2b183210.cjs +0 -1
  142. package/dist/sent-icon.entry-77bb678e.js +0 -15
  143. package/dist/spam-icon.entry-42f9c9e7.js +0 -15
  144. package/dist/spam-icon.entry-cbeaca0c.cjs +0 -1
  145. package/dist/time-period-selector.entry-45ca7b1a.js +0 -99
  146. package/dist/time-period-selector.entry-60718809.cjs +0 -1
  147. package/dist/trash-fill-icon.entry-1138f73e.cjs +0 -1
  148. package/dist/trash-fill-icon.entry-7d11144b.js +0 -15
@@ -1,4 +1,4 @@
1
- import { b as oe, Q as Y, r as q, c as U, R as Z, S as B, T as G, U as Q, h as f, H as le, g as he } from "./index-589f8eee.js";
1
+ import { b as oe, Q as Y, r as q, c as U, R as Z, S as B, T as G, U as Q, h as f, H as le, g as he } from "./index-cd93b584.js";
2
2
  import "react";
3
3
  import "react-dom";
4
4
  var J = { exports: {} };
@@ -8,7 +8,7 @@ var J = { exports: {} };
8
8
  })(oe, function() {
9
9
  var n = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, i = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, a = /\d\d/, o = /\d\d?/, x = /\d*[^-_:/,()\s\d]+/, v = {}, V = function(s) {
10
10
  return (s = +s) + (s > 68 ? 1900 : 2e3);
11
- }, d = function(s) {
11
+ }, c = function(s) {
12
12
  return function(r) {
13
13
  this[s] = +r;
14
14
  };
@@ -43,12 +43,12 @@ var J = { exports: {} };
43
43
  this.milliseconds = 10 * +s;
44
44
  }], SSS: [/\d{3}/, function(s) {
45
45
  this.milliseconds = +s;
46
- }], s: [o, d("seconds")], ss: [o, d("seconds")], m: [o, d("minutes")], mm: [o, d("minutes")], H: [o, d("hours")], h: [o, d("hours")], HH: [o, d("hours")], hh: [o, d("hours")], D: [o, d("day")], DD: [a, d("day")], Do: [x, function(s) {
46
+ }], s: [o, c("seconds")], ss: [o, c("seconds")], m: [o, c("minutes")], mm: [o, c("minutes")], H: [o, c("hours")], h: [o, c("hours")], HH: [o, c("hours")], hh: [o, c("hours")], D: [o, c("day")], DD: [a, c("day")], Do: [x, function(s) {
47
47
  var r = v.ordinal, l = s.match(/\d+/);
48
48
  if (this.day = l[0], r)
49
49
  for (var h = 1; h <= 31; h += 1)
50
50
  r(h).replace(/\[|\]/g, "") === s && (this.day = h);
51
- }], M: [o, d("month")], MM: [a, d("month")], MMM: [x, function(s) {
51
+ }], M: [o, c("month")], MM: [a, c("month")], MMM: [x, function(s) {
52
52
  var r = F("months"), l = (F("monthsShort") || r.map(function(h) {
53
53
  return h.slice(0, 3);
54
54
  })).indexOf(s) + 1;
@@ -60,28 +60,28 @@ var J = { exports: {} };
60
60
  if (r < 1)
61
61
  throw new Error();
62
62
  this.month = r % 12 || r;
63
- }], Y: [/[+-]?\d+/, d("year")], YY: [a, function(s) {
63
+ }], Y: [/[+-]?\d+/, c("year")], YY: [a, function(s) {
64
64
  this.year = V(s);
65
- }], YYYY: [/\d{4}/, d("year")], Z: X, ZZ: X };
65
+ }], YYYY: [/\d{4}/, c("year")], Z: X, ZZ: X };
66
66
  function te(s) {
67
67
  var r, l;
68
68
  r = s, l = v && v.formats;
69
69
  for (var h = (s = r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(I, w, u) {
70
- var c = u && u.toUpperCase();
71
- return w || l[u] || n[u] || l[c].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(k, T, C) {
70
+ var d = u && u.toUpperCase();
71
+ return w || l[u] || n[u] || l[d].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(k, T, C) {
72
72
  return T || C.slice(1);
73
73
  });
74
- })).match(i), p = h.length, b = 0; b < p; b += 1) {
75
- var L = h[b], S = ee[L], y = S && S[0], g = S && S[1];
76
- h[b] = g ? { regex: y, parser: g } : L.replace(/^\[|\]$/g, "");
74
+ })).match(i), p = h.length, y = 0; y < p; y += 1) {
75
+ var L = h[y], S = ee[L], b = S && S[0], g = S && S[1];
76
+ h[y] = g ? { regex: b, parser: g } : L.replace(/^\[|\]$/g, "");
77
77
  }
78
78
  return function(I) {
79
- for (var w = {}, u = 0, c = 0; u < p; u += 1) {
79
+ for (var w = {}, u = 0, d = 0; u < p; u += 1) {
80
80
  var k = h[u];
81
81
  if (typeof k == "string")
82
- c += k.length;
82
+ d += k.length;
83
83
  else {
84
- var T = k.regex, C = k.parser, E = I.slice(c), M = T.exec(E)[0];
84
+ var T = k.regex, C = k.parser, E = I.slice(d), M = T.exec(E)[0];
85
85
  C.call(w, M), I = I.replace(M, "");
86
86
  }
87
87
  }
@@ -97,13 +97,13 @@ var J = { exports: {} };
97
97
  return function(s, r, l) {
98
98
  l.p.customParseFormat = !0, s && s.parseTwoDigitYear && (V = s.parseTwoDigitYear);
99
99
  var h = r.prototype, p = h.parse;
100
- h.parse = function(b) {
101
- var L = b.date, S = b.utc, y = b.args;
100
+ h.parse = function(y) {
101
+ var L = y.date, S = y.utc, b = y.args;
102
102
  this.$u = S;
103
- var g = y[1];
103
+ var g = b[1];
104
104
  if (typeof g == "string") {
105
- var I = y[2] === !0, w = y[3] === !0, u = I || w, c = y[2];
106
- w && (c = y[2]), v = this.$locale(), !I && c && (v = l.Ls[c]), this.$d = function(E, M, D) {
105
+ var I = b[2] === !0, w = b[3] === !0, u = I || w, d = b[2];
106
+ w && (d = b[2]), v = this.$locale(), !I && d && (v = l.Ls[d]), this.$d = function(E, M, D) {
107
107
  try {
108
108
  if (["x", "X"].indexOf(M) > -1)
109
109
  return new Date((M === "X" ? 1e3 : 1) * E);
@@ -114,11 +114,11 @@ var J = { exports: {} };
114
114
  } catch {
115
115
  return /* @__PURE__ */ new Date("");
116
116
  }
117
- }(L, g, S), this.init(), c && c !== !0 && (this.$L = this.locale(c).$L), u && L != this.format(g) && (this.$d = /* @__PURE__ */ new Date("")), v = {};
117
+ }(L, g, S), this.init(), d && d !== !0 && (this.$L = this.locale(d).$L), u && L != this.format(g) && (this.$d = /* @__PURE__ */ new Date("")), v = {};
118
118
  } else if (g instanceof Array)
119
119
  for (var k = g.length, T = 1; T <= k; T += 1) {
120
- y[1] = g[T - 1];
121
- var C = l.apply(this, y);
120
+ b[1] = g[T - 1];
121
+ var C = l.apply(this, b);
122
122
  if (C.isValid()) {
123
123
  this.$d = C.$d, this.$L = C.$L, this.init();
124
124
  break;
@@ -126,13 +126,13 @@ var J = { exports: {} };
126
126
  T === k && (this.$d = /* @__PURE__ */ new Date(""));
127
127
  }
128
128
  else
129
- p.call(this, b);
129
+ p.call(this, y);
130
130
  };
131
131
  };
132
132
  });
133
133
  })(J);
134
- const de = J.exports, ce = ':host{display:block;position:relative;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.time-picker{display:inline-block;width:150px;font-family:var(--nylas-font-family);position:relative}@media screen and (max-width: 768px){.time-picker{width:auto}}.time-picker input{width:150px;height:48px;text-align:center;font-size:16px;font-family:inherit;cursor:pointer;background:transparent;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}@media screen and (max-width: 768px){.time-picker input{width:88px}}@media screen and (max-width: 504px){.time-picker input{width:68px;font-size:15px}}.time-picker input.focus{background:transparent}.time-picker input:hover,.time-picker input:active{border:1px solid var(--nylas-primary)}.time-picker input:active{outline:2px solid var(--nylas-primary)}.time-picker input span.open{transform:rotate(90deg)}.time-picker input span.closed{transform:rotate(270deg)}.time-picker input.error{border:1px solid var(--nylas-error)}.time-picker p.error{color:var(--nylas-error);font-size:0.875rem;margin:0}.times{display:block;margin-top:0.5rem;background-color:var(--nylas-base-0);width:100%;max-height:336px;overflow:auto;border:1px solid #ddd;z-index:1;border-radius:4px;position:absolute;box-shadow:0px 4px 6px -2px rgba(0, 0, 0, 0.0509803922);box-shadow:0px 10px 15px -3px rgba(0, 0, 0, 0.1019607843)}.times ul{padding:0;list-style-type:none;color:var(--nylas-base-900);max-height:336px}.times ul li{padding:16px, 12px, 16px, 12px;color:black;padding:12px 16px;text-decoration:none;display:block;font-family:inherit;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0px;text-align:center;cursor:pointer}.times ul li.focused{background-color:var(--nylas-base-100)}.times ul li:hover,.times ul li:focus{background-color:var(--nylas-base-100)}.times ul li label{display:flex;align-items:center;gap:0.5rem}.times ul li label input{margin:0}', me = ce;
135
- Y.extend(de);
134
+ const ce = J.exports, de = ':host{display:block;position:relative;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.time-picker{display:inline-block;width:150px;font-family:var(--nylas-font-family);position:relative}@media screen and (max-width: 768px){.time-picker{width:auto}}.time-picker input{width:150px;height:48px;text-align:center;font-size:16px;font-family:inherit;cursor:pointer;background:transparent;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}@media screen and (max-width: 768px){.time-picker input{width:88px}}@media screen and (max-width: 504px){.time-picker input{width:68px;font-size:15px}}.time-picker input.focus{background:transparent}.time-picker input:hover,.time-picker input:active{border:1px solid var(--nylas-primary)}.time-picker input:active{outline:2px solid var(--nylas-primary)}.time-picker input span.open{transform:rotate(90deg)}.time-picker input span.closed{transform:rotate(270deg)}.time-picker input.error{border:1px solid var(--nylas-error)}.time-picker p.error{color:var(--nylas-error);font-size:0.875rem;margin:0}.times{display:block;margin-top:0.5rem;background-color:var(--nylas-base-0);width:100%;max-height:336px;overflow:auto;border:1px solid #ddd;z-index:1;border-radius:4px;position:absolute;box-shadow:0px 4px 6px -2px rgba(0, 0, 0, 0.0509803922);box-shadow:0px 10px 15px -3px rgba(0, 0, 0, 0.1019607843)}.times ul{padding:0;list-style-type:none;color:var(--nylas-base-900);max-height:336px}.times ul li{padding:16px, 12px, 16px, 12px;color:black;padding:12px 16px;text-decoration:none;display:block;font-family:inherit;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0px;text-align:center;cursor:pointer}.times ul li.focused{background-color:var(--nylas-base-100)}.times ul li:hover,.times ul li:focus{background-color:var(--nylas-base-100)}.times ul li label{display:flex;align-items:center;gap:0.5rem}.times ul li label input{margin:0}', me = de;
135
+ Y.extend(ce);
136
136
  const fe = class {
137
137
  constructor(e) {
138
138
  q(this, e), this.timeChange = U(this, "timeChange", 7), this.formError = U(this, "formError", 7), this.time = void 0, this.minimumStartTime = null, this.placeholder = "hh:mmam/pm", this.name = void 0, this.hasError = !1, this.err = "", this.showTimes = !1, this.ariaActivedescendant = "", this.times = this.generateTimes(), this.shouldAutoScroll = !1;
@@ -290,7 +290,7 @@ const fe = class {
290
290
  i && (i.focus(), i.scrollIntoView({ behavior: "smooth", block: "nearest" }));
291
291
  }
292
292
  render() {
293
- return f(le, { key: "c0d6314d7f4b6c2fea1697756554364145440dd2" }, f("div", { key: "d6d729bdab1bdafaced55b31dfdfdefbbe77b698", class: "time-picker", part: "time-picker" }, f("input", { key: "6923f9f6948a59e94ea202bb5bcefb8b1cbba9f6", type: "text", name: this.name, id: this.name, part: "time-input", class: {
293
+ return f(le, { key: "08c910b64f1990194d69892923e03e8cf2967853" }, f("div", { key: "8580adca9096558b400d9fc1ceaac1807345a4bf", class: "time-picker", part: "time-picker" }, f("input", { key: "922200c3ba40d880f368f06dba3a2c2549cfa9d6", type: "text", name: this.name, id: this.name, part: "time-input", class: {
294
294
  "time-input": !0,
295
295
  error: !!this.err || this.hasError
296
296
  }, ref: (e) => this.timeInput = e, value: this.time, onClick: () => {
@@ -311,7 +311,7 @@ const fe = class {
311
311
  }
312
312
  };
313
313
  fe.style = me;
314
- const ue = '.switch{--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;display:inline-block;height:34px;position:relative;width:60px}.switch input{display:none}.slider{background-color:var(--nylas-base-300);bottom:0;cursor:pointer;left:0;position:absolute;right:0;top:0;transition:0.4s}.slider:before{background-color:var(--nylas-base-0);bottom:4px;content:"";height:32px;left:4px;position:absolute;transition:0.4s;width:32px}input:checked+.slider{background-color:var(--nylas-success)}input:checked+.slider:before{transform:translateX(32px)}.slider.round{border-radius:35px;width:72px;height:40px}.slider.round:before{border-radius:50%}', pe = ue, be = class {
314
+ const ue = '.switch{--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;display:inline-block;height:34px;position:relative;width:60px}.switch input{display:none}.slider{background-color:var(--nylas-base-300);bottom:0;cursor:pointer;left:0;position:absolute;right:0;top:0;transition:0.4s}.slider:before{background-color:var(--nylas-base-0);bottom:4px;content:"";height:32px;left:4px;position:absolute;transition:0.4s;width:32px}input:checked+.slider{background-color:var(--nylas-success)}input:checked+.slider:before{transform:translateX(32px)}.slider.round{border-radius:35px;width:72px;height:40px}.slider.round:before{border-radius:50%}', pe = ue, ye = class {
315
315
  constructor(e) {
316
316
  q(this, e), this.nylasFormSwitchToggled = U(this, "nylasFormSwitchToggled", 7), this.name = "toggle-switch", this.checked = !1, this.label = "", this.isChecked = this.checked;
317
317
  }
@@ -326,11 +326,11 @@ const ue = '.switch{--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-
326
326
  });
327
327
  }
328
328
  render() {
329
- return f("label", { key: "58015f47a5e227e8d9274761d317eaa7e95a9e1c", class: "switch", part: "ts_label" }, f("input", { key: "db6158a12d8fee36fcbbf3ee356768f9995971ed", type: "checkbox", part: "ts_input", name: this.name, checked: this.isChecked, onChange: () => this.toggleCheck() }), f("div", { key: "8e8b0eb635db66afb7e41b1ef312c3769edbf8b7", class: "slider round", part: "ts_slider" }));
329
+ return f("label", { key: "1586b4b0484716254ad8befbd9f99f7956e9c129", class: "switch", part: "ts_label" }, f("input", { key: "c7e9432dfe88d4c27bb146c3816f750fb7dc6851", type: "checkbox", part: "ts_input", name: this.name, checked: this.isChecked, onChange: () => this.toggleCheck() }), f("div", { key: "08980c1db3849f197b1780caa55bfe8e84ce0a92", class: "slider round", part: "ts_slider" }));
330
330
  }
331
331
  };
332
- be.style = pe;
332
+ ye.style = pe;
333
333
  export {
334
334
  fe as nylas_time_window_picker,
335
- be as toggle_switch
335
+ ye as toggle_switch
336
336
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-5611d3d5.cjs");require("react");require("react-dom");var V={exports:{}};(function(e,t){(function(a,i){e.exports=i()})(n.commonjsGlobal,function(){var a={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},i=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d\d/,l=/\d\d?/,v=/\d*[^-_:/,()\s\d]+/,x={},R=function(s){return(s=+s)+(s>68?1900:2e3)},c=function(s){return function(o){this[s]=+o}},W=[/[+-]\d\d:?(\d\d)?|Z/,function(s){(this.zone||(this.zone={})).offset=function(o){if(!o||o==="Z")return 0;var h=o.match(/([+-]|\d\d)/g),d=60*h[1]+(+h[2]||0);return d===0?0:h[0]==="+"?-d:d}(s)}],O=function(s){var o=x[s];return o&&(o.indexOf?o:o.s.concat(o.f))},Z=function(s,o){var h,d=x.meridiem;if(d){for(var p=1;p<=24;p+=1)if(s.indexOf(d(p,0,o))>-1){h=p>12;break}}else h=s===(o?"pm":"PM");return h},N={A:[v,function(s){this.afternoon=Z(s,!1)}],a:[v,function(s){this.afternoon=Z(s,!0)}],S:[/\d/,function(s){this.milliseconds=100*+s}],SS:[r,function(s){this.milliseconds=10*+s}],SSS:[/\d{3}/,function(s){this.milliseconds=+s}],s:[l,c("seconds")],ss:[l,c("seconds")],m:[l,c("minutes")],mm:[l,c("minutes")],H:[l,c("hours")],h:[l,c("hours")],HH:[l,c("hours")],hh:[l,c("hours")],D:[l,c("day")],DD:[r,c("day")],Do:[v,function(s){var o=x.ordinal,h=s.match(/\d+/);if(this.day=h[0],o)for(var d=1;d<=31;d+=1)o(d).replace(/\[|\]/g,"")===s&&(this.day=d)}],M:[l,c("month")],MM:[r,c("month")],MMM:[v,function(s){var o=O("months"),h=(O("monthsShort")||o.map(function(d){return d.slice(0,3)})).indexOf(s)+1;if(h<1)throw new Error;this.month=h%12||h}],MMMM:[v,function(s){var o=O("months").indexOf(s)+1;if(o<1)throw new Error;this.month=o%12||o}],Y:[/[+-]?\d+/,c("year")],YY:[r,function(s){this.year=R(s)}],YYYY:[/\d{4}/,c("year")],Z:W,ZZ:W};function X(s){var o,h;o=s,h=x&&x.formats;for(var d=(s=o.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(I,w,f){var m=f&&f.toUpperCase();return w||h[f]||a[f]||h[m].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(k,T,M){return T||M.slice(1)})})).match(i),p=d.length,b=0;b<p;b+=1){var Y=d[b],S=N[Y],y=S&&S[0],g=S&&S[1];d[b]=g?{regex:y,parser:g}:Y.replace(/^\[|\]$/g,"")}return function(I){for(var w={},f=0,m=0;f<p;f+=1){var k=d[f];if(typeof k=="string")m+=k.length;else{var T=k.regex,M=k.parser,L=I.slice(m),D=T.exec(L)[0];M.call(w,D),I=I.replace(D,"")}}return function(C){var u=C.afternoon;if(u!==void 0){var A=C.hours;u?A<12&&(C.hours+=12):A===12&&(C.hours=0),delete C.afternoon}}(w),w}}return function(s,o,h){h.p.customParseFormat=!0,s&&s.parseTwoDigitYear&&(R=s.parseTwoDigitYear);var d=o.prototype,p=d.parse;d.parse=function(b){var Y=b.date,S=b.utc,y=b.args;this.$u=S;var g=y[1];if(typeof g=="string"){var I=y[2]===!0,w=y[3]===!0,f=I||w,m=y[2];w&&(m=y[2]),x=this.$locale(),!I&&m&&(x=h.Ls[m]),this.$d=function(L,D,C){try{if(["x","X"].indexOf(D)>-1)return new Date((D==="X"?1e3:1)*L);var u=X(D)(L),A=u.year,E=u.month,G=u.day,J=u.hours,Q=u.minutes,ee=u.seconds,te=u.milliseconds,B=u.zone,$=new Date,P=G||(A||E?1:$.getDate()),_=A||$.getFullYear(),F=0;A&&!E||(F=E>0?E-1:$.getMonth());var z=J||0,j=Q||0,H=ee||0,K=te||0;return B?new Date(Date.UTC(_,F,P,z,j,H,K+60*B.offset*1e3)):C?new Date(Date.UTC(_,F,P,z,j,H,K)):new Date(_,F,P,z,j,H,K)}catch{return new Date("")}}(Y,g,S),this.init(),m&&m!==!0&&(this.$L=this.locale(m).$L),f&&Y!=this.format(g)&&(this.$d=new Date("")),x={}}else if(g instanceof Array)for(var k=g.length,T=1;T<=k;T+=1){y[1]=g[T-1];var M=h.apply(this,y);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}T===k&&(this.$d=new Date(""))}else p.call(this,b)}}})})(V);const ie=V.exports,se=':host{display:block;position:relative;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.time-picker{display:inline-block;width:150px;font-family:var(--nylas-font-family);position:relative}@media screen and (max-width: 768px){.time-picker{width:auto}}.time-picker input{width:150px;height:48px;text-align:center;font-size:16px;font-family:inherit;cursor:pointer;background:transparent;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}@media screen and (max-width: 768px){.time-picker input{width:88px}}@media screen and (max-width: 504px){.time-picker input{width:68px;font-size:15px}}.time-picker input.focus{background:transparent}.time-picker input:hover,.time-picker input:active{border:1px solid var(--nylas-primary)}.time-picker input:active{outline:2px solid var(--nylas-primary)}.time-picker input span.open{transform:rotate(90deg)}.time-picker input span.closed{transform:rotate(270deg)}.time-picker input.error{border:1px solid var(--nylas-error)}.time-picker p.error{color:var(--nylas-error);font-size:0.875rem;margin:0}.times{display:block;margin-top:0.5rem;background-color:var(--nylas-base-0);width:100%;max-height:336px;overflow:auto;border:1px solid #ddd;z-index:1;border-radius:4px;position:absolute;box-shadow:0px 4px 6px -2px rgba(0, 0, 0, 0.0509803922);box-shadow:0px 10px 15px -3px rgba(0, 0, 0, 0.1019607843)}.times ul{padding:0;list-style-type:none;color:var(--nylas-base-900);max-height:336px}.times ul li{padding:16px, 12px, 16px, 12px;color:black;padding:12px 16px;text-decoration:none;display:block;font-family:inherit;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0px;text-align:center;cursor:pointer}.times ul li.focused{background-color:var(--nylas-base-100)}.times ul li:hover,.times ul li:focus{background-color:var(--nylas-base-100)}.times ul li label{display:flex;align-items:center;gap:0.5rem}.times ul li label input{margin:0}',ne=se;n.dayjs.extend(ie);const U=class{constructor(e){n.registerInstance(this,e),this.timeChange=n.createEvent(this,"timeChange",7),this.formError=n.createEvent(this,"formError",7),this.time=void 0,this.minimumStartTime=null,this.placeholder="hh:mmam/pm",this.name=void 0,this.hasError=!1,this.err="",this.showTimes=!1,this.ariaActivedescendant="",this.times=this.generateTimes(),this.shouldAutoScroll=!1}handleOutsideClick(e){!e.composedPath().includes(this.el)&&this.showTimes&&(this.showTimes=!1)}minimumStartTimeChangedHandler(){if(this.minimumStartTime){let e=n.dayjs().hour(parseInt(this.minimumStartTime)).minute(parseInt(this.minimumStartTime.slice(-4,-2)));this.minimumStartTime.slice(-2).toLowerCase()==="pm"&&parseInt(this.minimumStartTime)!==12?e=e.add(12,"hour"):this.minimumStartTime.slice(-2).toLowerCase()==="am"&&parseInt(this.minimumStartTime)===12&&(e=e.subtract(12,"hour")),this.times=this.generateTimes();const t=n.dayjs(this.times[0].value,"hh:mma");n.dayjs(this.time,"hh:mma").isBefore(t)&&(this.err="Invalid",this.formError.emit({key:this.el.id,message:"Invalid"}))}}componentDidRender(){if(this.showTimes&&this.shouldAutoScroll){const e=n.autocompleteTimeFormat(this.time),t=this.times.findIndex(a=>a.value===e);t>-1&&(this.shouldAutoScroll=!1,this.scrollToViewWithinParent(t));return}}handleTimeChange(e,t){const a=t.split(":");a[0]==="00"&&a[1].slice(-2)=="pm"&&(this.err="Invalid",this.formError.emit({key:this.el.id,message:"Invalid"})),n.validateTimeFormatInput(t)?(this.err="",this.formError.emit({key:this.el.id,message:""})):(this.err="Invalid",this.formError.emit({key:this.el.id,message:"Invalid"})),this.timeChange.emit({key:this.el.id,value:t})}handleTimeAutocomplete(e){var a;const t=(a=e.target)==null?void 0:a.value;if(!n.validateTimeFormatInput(t)){this.err="Invalid",this.formError.emit({key:this.el.id,message:"Invalid"});return}if(t===""){const i=n.roundToNearest15Minutes().format("hh:mma");this.timeChange.emit({key:this.el.id,value:i});return}if(!n.validateExactTimeFormat(t)){const i=n.autocompleteTimeFormat(t);this.timeChange.emit({key:this.el.id,value:i});return}this.timeChange.emit({key:this.el.id,value:t})}handleOnInput(e){var a;const t=(a=e.target)==null?void 0:a.value;if(n.validateTimeFormatInput(t)){if(t===""){const i=n.roundToNearest15Minutes().format("hh:mma"),r=this.times.findIndex(l=>l.value===i);r>-1&&this.scrollToViewWithinParent(r);return}if(!n.validateExactTimeFormat(t)){const i=n.autocompleteTimeFormat(t),r=this.times.findIndex(l=>l.value===i);r>-1&&this.scrollToViewWithinParent(r);return}}}generateTimes(){const e=[];let t=n.dayjs().set("hour",0).set("minute",0).set("second",0);this.minimumStartTime&&(t=n.dayjs(this.minimumStartTime,"hh:mma"));const a=t.endOf("day").diff(t,"minutes"),i=Math.round(a/15);for(let r=0;r<i+1;r++){const l=t.add(r*15,"minute");if(r==i&&l.format("hh:mma").includes("am"))break;e.push({id:r,value:l.format("hh:mma")})}return e}handleComboboxKeyDown(e){if(e.key==="ArrowDown"){if(e.preventDefault(),!this.showTimes){this.showTimes=!0,this.shouldAutoScroll=!0;return}if(this.ariaActivedescendant==="")this.ariaActivedescendant=this.times[0].id.toString(),this.focusOption(0);else{const t=this.times.findIndex(i=>i.id.toString()===this.ariaActivedescendant),a=t+1<this.times.length?t+1:0;this.ariaActivedescendant=this.times[a].id.toString(),this.focusOption(a)}}else if(e.key==="ArrowUp")if(e.preventDefault(),this.ariaActivedescendant==="")this.ariaActivedescendant=this.times[this.times.length-1].id.toString(),this.focusOption(this.times.length-1);else{const t=this.times.findIndex(i=>i.id.toString()===this.ariaActivedescendant),a=t-1>=0?t-1:this.times.length-1;this.ariaActivedescendant=this.times[a].id.toString(),this.focusOption(a)}else e.key==="Escape"&&(this.showTimes=!1,this.timeInput.focus())}handleListboxKeydown(e){const t=this.times,a=t.findIndex(i=>i.id.toString()===this.ariaActivedescendant);if(e.key==="ArrowDown"||e.key==="Tab"&&!e.shiftKey){e.preventDefault();const i=a+1<t.length?a+1:0;this.ariaActivedescendant=t[i].id.toString(),this.focusOption(i)}else if(e.key==="ArrowUp"||e.key==="Tab"&&e.shiftKey){e.preventDefault();const i=a-1>=0?a-1:t.length-1;this.ariaActivedescendant=t[i].id.toString(),this.focusOption(i)}else if(e.key==="Enter"){if(e.preventDefault(),this.ariaActivedescendant){const i=t[a];this.handleTimeChange(e,i.value),this.showTimes=!1,this.ariaActivedescendant="",this.timeInput.focus()}}else e.key==="Escape"&&(this.showTimes=!1,this.timeInput.focus())}scrollToViewWithinParent(e){var v;const t=this.times[e],a=(v=this.el.shadowRoot)==null?void 0:v.getElementById(t.id.toString()),i=this.timeMenu;this.ariaActivedescendant=t.id.toString();const r=a.getBoundingClientRect(),l=i.getBoundingClientRect();r.top<l.top?i.scrollTop-=l.top-r.top:r.bottom>l.bottom&&(i.scrollTop+=r.bottom-l.bottom),r.left<l.left?i.scrollLeft-=l.left-r.left:r.right>l.right&&(i.scrollLeft+=r.right-l.right)}focusOption(e){var r;const t=this.times[e];if(!t)return;const a=t.id.toString(),i=(r=this.el.shadowRoot)==null?void 0:r.getElementById(a);i&&(i.focus(),i.scrollIntoView({behavior:"smooth",block:"nearest"}))}render(){return n.h(n.Host,{key:"c0d6314d7f4b6c2fea1697756554364145440dd2"},n.h("div",{key:"d6d729bdab1bdafaced55b31dfdfdefbbe77b698",class:"time-picker",part:"time-picker"},n.h("input",{key:"6923f9f6948a59e94ea202bb5bcefb8b1cbba9f6",type:"text",name:this.name,id:this.name,part:"time-input",class:{"time-input":!0,error:!!this.err||this.hasError},ref:e=>this.timeInput=e,value:this.time,onClick:()=>{this.showTimes=!this.showTimes,this.shouldAutoScroll=!0},"aria-haspopup":"listbox","aria-label":this.name,"aria-expanded":this.showTimes?"true":"false",placeholder:this.placeholder,onKeyDown:e=>this.handleComboboxKeyDown(e),onInput:e=>this.handleOnInput(e),onBlur:e=>this.handleTimeAutocomplete(e)}),this.err&&n.h("div",{class:"invalid-time-icon"}),this.showTimes&&n.h("div",{class:"times",part:"times",ref:e=>this.timeMenu=e},n.h("ul",{tabindex:"-1",role:"listbox","aria-label":this.name,"aria-activedescendant":this.ariaActivedescendant,onKeyDown:e=>this.handleListboxKeydown(e)},this.times.map(e=>n.h("li",{tabindex:"0",key:e.id,id:e.id.toString(),class:{focused:this.ariaActivedescendant===e.id.toString()},onClick:t=>{this.handleTimeChange(t,e.value),this.showTimes=!1,this.timeInput.focus()},role:"option"},`${e.value}`)))),!this.showTimes&&this.err&&n.h("p",{class:"error",id:"email-error"},this.err)))}get el(){return n.getElement(this)}static get watchers(){return{minimumStartTime:["minimumStartTimeChangedHandler"]}}};U.style=ne;const ae='.switch{--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;display:inline-block;height:34px;position:relative;width:60px}.switch input{display:none}.slider{background-color:var(--nylas-base-300);bottom:0;cursor:pointer;left:0;position:absolute;right:0;top:0;transition:0.4s}.slider:before{background-color:var(--nylas-base-0);bottom:4px;content:"";height:32px;left:4px;position:absolute;transition:0.4s;width:32px}input:checked+.slider{background-color:var(--nylas-success)}input:checked+.slider:before{transform:translateX(32px)}.slider.round{border-radius:35px;width:72px;height:40px}.slider.round:before{border-radius:50%}',re=ae,q=class{constructor(e){n.registerInstance(this,e),this.nylasFormSwitchToggled=n.createEvent(this,"nylasFormSwitchToggled",7),this.name="toggle-switch",this.checked=!1,this.label="",this.isChecked=this.checked}componentWillLoad(){this.isChecked=this.checked}toggleCheck(){this.isChecked=!this.isChecked,this.nylasFormSwitchToggled.emit({checked:this.isChecked,name:this.name,label:this.label})}render(){return n.h("label",{key:"58015f47a5e227e8d9274761d317eaa7e95a9e1c",class:"switch",part:"ts_label"},n.h("input",{key:"db6158a12d8fee36fcbbf3ee356768f9995971ed",type:"checkbox",part:"ts_input",name:this.name,checked:this.isChecked,onChange:()=>this.toggleCheck()}),n.h("div",{key:"8e8b0eb635db66afb7e41b1ef312c3769edbf8b7",class:"slider round",part:"ts_slider"}))}};q.style=re;exports.nylas_time_window_picker=U;exports.toggle_switch=q;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-94416062.cjs");require("react");require("react-dom");var V={exports:{}};(function(e,t){(function(a,i){e.exports=i()})(n.commonjsGlobal,function(){var a={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},i=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d\d/,l=/\d\d?/,v=/\d*[^-_:/,()\s\d]+/,x={},R=function(s){return(s=+s)+(s>68?1900:2e3)},d=function(s){return function(o){this[s]=+o}},W=[/[+-]\d\d:?(\d\d)?|Z/,function(s){(this.zone||(this.zone={})).offset=function(o){if(!o||o==="Z")return 0;var h=o.match(/([+-]|\d\d)/g),c=60*h[1]+(+h[2]||0);return c===0?0:h[0]==="+"?-c:c}(s)}],O=function(s){var o=x[s];return o&&(o.indexOf?o:o.s.concat(o.f))},Z=function(s,o){var h,c=x.meridiem;if(c){for(var p=1;p<=24;p+=1)if(s.indexOf(c(p,0,o))>-1){h=p>12;break}}else h=s===(o?"pm":"PM");return h},N={A:[v,function(s){this.afternoon=Z(s,!1)}],a:[v,function(s){this.afternoon=Z(s,!0)}],S:[/\d/,function(s){this.milliseconds=100*+s}],SS:[r,function(s){this.milliseconds=10*+s}],SSS:[/\d{3}/,function(s){this.milliseconds=+s}],s:[l,d("seconds")],ss:[l,d("seconds")],m:[l,d("minutes")],mm:[l,d("minutes")],H:[l,d("hours")],h:[l,d("hours")],HH:[l,d("hours")],hh:[l,d("hours")],D:[l,d("day")],DD:[r,d("day")],Do:[v,function(s){var o=x.ordinal,h=s.match(/\d+/);if(this.day=h[0],o)for(var c=1;c<=31;c+=1)o(c).replace(/\[|\]/g,"")===s&&(this.day=c)}],M:[l,d("month")],MM:[r,d("month")],MMM:[v,function(s){var o=O("months"),h=(O("monthsShort")||o.map(function(c){return c.slice(0,3)})).indexOf(s)+1;if(h<1)throw new Error;this.month=h%12||h}],MMMM:[v,function(s){var o=O("months").indexOf(s)+1;if(o<1)throw new Error;this.month=o%12||o}],Y:[/[+-]?\d+/,d("year")],YY:[r,function(s){this.year=R(s)}],YYYY:[/\d{4}/,d("year")],Z:W,ZZ:W};function X(s){var o,h;o=s,h=x&&x.formats;for(var c=(s=o.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(I,w,f){var m=f&&f.toUpperCase();return w||h[f]||a[f]||h[m].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(k,T,M){return T||M.slice(1)})})).match(i),p=c.length,y=0;y<p;y+=1){var Y=c[y],S=N[Y],b=S&&S[0],g=S&&S[1];c[y]=g?{regex:b,parser:g}:Y.replace(/^\[|\]$/g,"")}return function(I){for(var w={},f=0,m=0;f<p;f+=1){var k=c[f];if(typeof k=="string")m+=k.length;else{var T=k.regex,M=k.parser,L=I.slice(m),D=T.exec(L)[0];M.call(w,D),I=I.replace(D,"")}}return function(C){var u=C.afternoon;if(u!==void 0){var A=C.hours;u?A<12&&(C.hours+=12):A===12&&(C.hours=0),delete C.afternoon}}(w),w}}return function(s,o,h){h.p.customParseFormat=!0,s&&s.parseTwoDigitYear&&(R=s.parseTwoDigitYear);var c=o.prototype,p=c.parse;c.parse=function(y){var Y=y.date,S=y.utc,b=y.args;this.$u=S;var g=b[1];if(typeof g=="string"){var I=b[2]===!0,w=b[3]===!0,f=I||w,m=b[2];w&&(m=b[2]),x=this.$locale(),!I&&m&&(x=h.Ls[m]),this.$d=function(L,D,C){try{if(["x","X"].indexOf(D)>-1)return new Date((D==="X"?1e3:1)*L);var u=X(D)(L),A=u.year,E=u.month,G=u.day,J=u.hours,Q=u.minutes,ee=u.seconds,te=u.milliseconds,B=u.zone,$=new Date,P=G||(A||E?1:$.getDate()),_=A||$.getFullYear(),F=0;A&&!E||(F=E>0?E-1:$.getMonth());var z=J||0,j=Q||0,H=ee||0,K=te||0;return B?new Date(Date.UTC(_,F,P,z,j,H,K+60*B.offset*1e3)):C?new Date(Date.UTC(_,F,P,z,j,H,K)):new Date(_,F,P,z,j,H,K)}catch{return new Date("")}}(Y,g,S),this.init(),m&&m!==!0&&(this.$L=this.locale(m).$L),f&&Y!=this.format(g)&&(this.$d=new Date("")),x={}}else if(g instanceof Array)for(var k=g.length,T=1;T<=k;T+=1){b[1]=g[T-1];var M=h.apply(this,b);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}T===k&&(this.$d=new Date(""))}else p.call(this,y)}}})})(V);const ie=V.exports,se=':host{display:block;position:relative;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.time-picker{display:inline-block;width:150px;font-family:var(--nylas-font-family);position:relative}@media screen and (max-width: 768px){.time-picker{width:auto}}.time-picker input{width:150px;height:48px;text-align:center;font-size:16px;font-family:inherit;cursor:pointer;background:transparent;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}@media screen and (max-width: 768px){.time-picker input{width:88px}}@media screen and (max-width: 504px){.time-picker input{width:68px;font-size:15px}}.time-picker input.focus{background:transparent}.time-picker input:hover,.time-picker input:active{border:1px solid var(--nylas-primary)}.time-picker input:active{outline:2px solid var(--nylas-primary)}.time-picker input span.open{transform:rotate(90deg)}.time-picker input span.closed{transform:rotate(270deg)}.time-picker input.error{border:1px solid var(--nylas-error)}.time-picker p.error{color:var(--nylas-error);font-size:0.875rem;margin:0}.times{display:block;margin-top:0.5rem;background-color:var(--nylas-base-0);width:100%;max-height:336px;overflow:auto;border:1px solid #ddd;z-index:1;border-radius:4px;position:absolute;box-shadow:0px 4px 6px -2px rgba(0, 0, 0, 0.0509803922);box-shadow:0px 10px 15px -3px rgba(0, 0, 0, 0.1019607843)}.times ul{padding:0;list-style-type:none;color:var(--nylas-base-900);max-height:336px}.times ul li{padding:16px, 12px, 16px, 12px;color:black;padding:12px 16px;text-decoration:none;display:block;font-family:inherit;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0px;text-align:center;cursor:pointer}.times ul li.focused{background-color:var(--nylas-base-100)}.times ul li:hover,.times ul li:focus{background-color:var(--nylas-base-100)}.times ul li label{display:flex;align-items:center;gap:0.5rem}.times ul li label input{margin:0}',ne=se;n.dayjs.extend(ie);const U=class{constructor(e){n.registerInstance(this,e),this.timeChange=n.createEvent(this,"timeChange",7),this.formError=n.createEvent(this,"formError",7),this.time=void 0,this.minimumStartTime=null,this.placeholder="hh:mmam/pm",this.name=void 0,this.hasError=!1,this.err="",this.showTimes=!1,this.ariaActivedescendant="",this.times=this.generateTimes(),this.shouldAutoScroll=!1}handleOutsideClick(e){!e.composedPath().includes(this.el)&&this.showTimes&&(this.showTimes=!1)}minimumStartTimeChangedHandler(){if(this.minimumStartTime){let e=n.dayjs().hour(parseInt(this.minimumStartTime)).minute(parseInt(this.minimumStartTime.slice(-4,-2)));this.minimumStartTime.slice(-2).toLowerCase()==="pm"&&parseInt(this.minimumStartTime)!==12?e=e.add(12,"hour"):this.minimumStartTime.slice(-2).toLowerCase()==="am"&&parseInt(this.minimumStartTime)===12&&(e=e.subtract(12,"hour")),this.times=this.generateTimes();const t=n.dayjs(this.times[0].value,"hh:mma");n.dayjs(this.time,"hh:mma").isBefore(t)&&(this.err="Invalid",this.formError.emit({key:this.el.id,message:"Invalid"}))}}componentDidRender(){if(this.showTimes&&this.shouldAutoScroll){const e=n.autocompleteTimeFormat(this.time),t=this.times.findIndex(a=>a.value===e);t>-1&&(this.shouldAutoScroll=!1,this.scrollToViewWithinParent(t));return}}handleTimeChange(e,t){const a=t.split(":");a[0]==="00"&&a[1].slice(-2)=="pm"&&(this.err="Invalid",this.formError.emit({key:this.el.id,message:"Invalid"})),n.validateTimeFormatInput(t)?(this.err="",this.formError.emit({key:this.el.id,message:""})):(this.err="Invalid",this.formError.emit({key:this.el.id,message:"Invalid"})),this.timeChange.emit({key:this.el.id,value:t})}handleTimeAutocomplete(e){var a;const t=(a=e.target)==null?void 0:a.value;if(!n.validateTimeFormatInput(t)){this.err="Invalid",this.formError.emit({key:this.el.id,message:"Invalid"});return}if(t===""){const i=n.roundToNearest15Minutes().format("hh:mma");this.timeChange.emit({key:this.el.id,value:i});return}if(!n.validateExactTimeFormat(t)){const i=n.autocompleteTimeFormat(t);this.timeChange.emit({key:this.el.id,value:i});return}this.timeChange.emit({key:this.el.id,value:t})}handleOnInput(e){var a;const t=(a=e.target)==null?void 0:a.value;if(n.validateTimeFormatInput(t)){if(t===""){const i=n.roundToNearest15Minutes().format("hh:mma"),r=this.times.findIndex(l=>l.value===i);r>-1&&this.scrollToViewWithinParent(r);return}if(!n.validateExactTimeFormat(t)){const i=n.autocompleteTimeFormat(t),r=this.times.findIndex(l=>l.value===i);r>-1&&this.scrollToViewWithinParent(r);return}}}generateTimes(){const e=[];let t=n.dayjs().set("hour",0).set("minute",0).set("second",0);this.minimumStartTime&&(t=n.dayjs(this.minimumStartTime,"hh:mma"));const a=t.endOf("day").diff(t,"minutes"),i=Math.round(a/15);for(let r=0;r<i+1;r++){const l=t.add(r*15,"minute");if(r==i&&l.format("hh:mma").includes("am"))break;e.push({id:r,value:l.format("hh:mma")})}return e}handleComboboxKeyDown(e){if(e.key==="ArrowDown"){if(e.preventDefault(),!this.showTimes){this.showTimes=!0,this.shouldAutoScroll=!0;return}if(this.ariaActivedescendant==="")this.ariaActivedescendant=this.times[0].id.toString(),this.focusOption(0);else{const t=this.times.findIndex(i=>i.id.toString()===this.ariaActivedescendant),a=t+1<this.times.length?t+1:0;this.ariaActivedescendant=this.times[a].id.toString(),this.focusOption(a)}}else if(e.key==="ArrowUp")if(e.preventDefault(),this.ariaActivedescendant==="")this.ariaActivedescendant=this.times[this.times.length-1].id.toString(),this.focusOption(this.times.length-1);else{const t=this.times.findIndex(i=>i.id.toString()===this.ariaActivedescendant),a=t-1>=0?t-1:this.times.length-1;this.ariaActivedescendant=this.times[a].id.toString(),this.focusOption(a)}else e.key==="Escape"&&(this.showTimes=!1,this.timeInput.focus())}handleListboxKeydown(e){const t=this.times,a=t.findIndex(i=>i.id.toString()===this.ariaActivedescendant);if(e.key==="ArrowDown"||e.key==="Tab"&&!e.shiftKey){e.preventDefault();const i=a+1<t.length?a+1:0;this.ariaActivedescendant=t[i].id.toString(),this.focusOption(i)}else if(e.key==="ArrowUp"||e.key==="Tab"&&e.shiftKey){e.preventDefault();const i=a-1>=0?a-1:t.length-1;this.ariaActivedescendant=t[i].id.toString(),this.focusOption(i)}else if(e.key==="Enter"){if(e.preventDefault(),this.ariaActivedescendant){const i=t[a];this.handleTimeChange(e,i.value),this.showTimes=!1,this.ariaActivedescendant="",this.timeInput.focus()}}else e.key==="Escape"&&(this.showTimes=!1,this.timeInput.focus())}scrollToViewWithinParent(e){var v;const t=this.times[e],a=(v=this.el.shadowRoot)==null?void 0:v.getElementById(t.id.toString()),i=this.timeMenu;this.ariaActivedescendant=t.id.toString();const r=a.getBoundingClientRect(),l=i.getBoundingClientRect();r.top<l.top?i.scrollTop-=l.top-r.top:r.bottom>l.bottom&&(i.scrollTop+=r.bottom-l.bottom),r.left<l.left?i.scrollLeft-=l.left-r.left:r.right>l.right&&(i.scrollLeft+=r.right-l.right)}focusOption(e){var r;const t=this.times[e];if(!t)return;const a=t.id.toString(),i=(r=this.el.shadowRoot)==null?void 0:r.getElementById(a);i&&(i.focus(),i.scrollIntoView({behavior:"smooth",block:"nearest"}))}render(){return n.h(n.Host,{key:"08c910b64f1990194d69892923e03e8cf2967853"},n.h("div",{key:"8580adca9096558b400d9fc1ceaac1807345a4bf",class:"time-picker",part:"time-picker"},n.h("input",{key:"922200c3ba40d880f368f06dba3a2c2549cfa9d6",type:"text",name:this.name,id:this.name,part:"time-input",class:{"time-input":!0,error:!!this.err||this.hasError},ref:e=>this.timeInput=e,value:this.time,onClick:()=>{this.showTimes=!this.showTimes,this.shouldAutoScroll=!0},"aria-haspopup":"listbox","aria-label":this.name,"aria-expanded":this.showTimes?"true":"false",placeholder:this.placeholder,onKeyDown:e=>this.handleComboboxKeyDown(e),onInput:e=>this.handleOnInput(e),onBlur:e=>this.handleTimeAutocomplete(e)}),this.err&&n.h("div",{class:"invalid-time-icon"}),this.showTimes&&n.h("div",{class:"times",part:"times",ref:e=>this.timeMenu=e},n.h("ul",{tabindex:"-1",role:"listbox","aria-label":this.name,"aria-activedescendant":this.ariaActivedescendant,onKeyDown:e=>this.handleListboxKeydown(e)},this.times.map(e=>n.h("li",{tabindex:"0",key:e.id,id:e.id.toString(),class:{focused:this.ariaActivedescendant===e.id.toString()},onClick:t=>{this.handleTimeChange(t,e.value),this.showTimes=!1,this.timeInput.focus()},role:"option"},`${e.value}`)))),!this.showTimes&&this.err&&n.h("p",{class:"error",id:"email-error"},this.err)))}get el(){return n.getElement(this)}static get watchers(){return{minimumStartTime:["minimumStartTimeChangedHandler"]}}};U.style=ne;const ae='.switch{--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;display:inline-block;height:34px;position:relative;width:60px}.switch input{display:none}.slider{background-color:var(--nylas-base-300);bottom:0;cursor:pointer;left:0;position:absolute;right:0;top:0;transition:0.4s}.slider:before{background-color:var(--nylas-base-0);bottom:4px;content:"";height:32px;left:4px;position:absolute;transition:0.4s;width:32px}input:checked+.slider{background-color:var(--nylas-success)}input:checked+.slider:before{transform:translateX(32px)}.slider.round{border-radius:35px;width:72px;height:40px}.slider.round:before{border-radius:50%}',re=ae,q=class{constructor(e){n.registerInstance(this,e),this.nylasFormSwitchToggled=n.createEvent(this,"nylasFormSwitchToggled",7),this.name="toggle-switch",this.checked=!1,this.label="",this.isChecked=this.checked}componentWillLoad(){this.isChecked=this.checked}toggleCheck(){this.isChecked=!this.isChecked,this.nylasFormSwitchToggled.emit({checked:this.isChecked,name:this.name,label:this.label})}render(){return n.h("label",{key:"1586b4b0484716254ad8befbd9f99f7956e9c129",class:"switch",part:"ts_label"},n.h("input",{key:"c7e9432dfe88d4c27bb146c3816f750fb7dc6851",type:"checkbox",part:"ts_input",name:this.name,checked:this.isChecked,onChange:()=>this.toggleCheck()}),n.h("div",{key:"08980c1db3849f197b1780caa55bfe8e84ce0a92",class:"slider round",part:"ts_slider"}))}};q.style=re;exports.nylas_time_window_picker=U;exports.toggle_switch=q;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-5611d3d5.cjs");require("react");require("react-dom");const r=".sc-person-icon-h{display:flex}",i=r,t=class{constructor(s){e.registerInstance(this,s),this.width="14",this.height="16"}render(){return e.h("svg",{key:"bf77344f510a860cf3b05daea1254dbe06465bcf",width:this.width,height:this.height,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"6704d143c071b2de1ce05a823bb98ba59fbffba7",d:"M7 0C4.79086 0 3 1.79086 3 4C3 6.20914 4.79086 8 7 8C9.20914 8 11 6.20914 11 4C11 1.79086 9.20914 0 7 0ZM4 4C4 2.34315 5.34315 1 7 1C8.65685 1 10 2.34315 10 4C10 5.65685 8.65685 7 7 7C5.34315 7 4 5.65685 4 4ZM2.00873 9C0.903151 9 0 9.88687 0 11C0 12.6912 0.83281 13.9663 2.13499 14.7966C3.41697 15.614 5.14526 16 7 16C8.85474 16 10.583 15.614 11.865 14.7966C13.1672 13.9663 14 12.6912 14 11C14 9.89557 13.1045 9.00001 12 9.00001L2.00873 9ZM1 11C1 10.4467 1.44786 10 2.00873 10L12 10C12.5522 10 13 10.4478 13 11C13 12.3088 12.3777 13.2837 11.3274 13.9534C10.2568 14.636 8.73511 15 7 15C5.26489 15 3.74318 14.636 2.67262 13.9534C1.62226 13.2837 1 12.3088 1 11Z",fill:"currentColor"}))}};t.style=i;exports.person_icon=t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-94416062.cjs");require("react");require("react-dom");const r=".sc-person-icon-h{display:flex}",i=r,t=class{constructor(s){e.registerInstance(this,s),this.width="14",this.height="16"}render(){return e.h("svg",{key:"03176594a4eacc29adc4453969f78696a9603eb2",width:this.width,height:this.height,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"b366e4e299850744e1e60c856f4e2dc264acf6a3",d:"M7 0C4.79086 0 3 1.79086 3 4C3 6.20914 4.79086 8 7 8C9.20914 8 11 6.20914 11 4C11 1.79086 9.20914 0 7 0ZM4 4C4 2.34315 5.34315 1 7 1C8.65685 1 10 2.34315 10 4C10 5.65685 8.65685 7 7 7C5.34315 7 4 5.65685 4 4ZM2.00873 9C0.903151 9 0 9.88687 0 11C0 12.6912 0.83281 13.9663 2.13499 14.7966C3.41697 15.614 5.14526 16 7 16C8.85474 16 10.583 15.614 11.865 14.7966C13.1672 13.9663 14 12.6912 14 11C14 9.89557 13.1045 9.00001 12 9.00001L2.00873 9ZM1 11C1 10.4467 1.44786 10 2.00873 10L12 10C12.5522 10 13 10.4478 13 11C13 12.3088 12.3777 13.2837 11.3274 13.9534C10.2568 14.636 8.73511 15 7 15C5.26489 15 3.74318 14.636 2.67262 13.9534C1.62226 13.2837 1 12.3088 1 11Z",fill:"currentColor"}))}};t.style=i;exports.person_icon=t;
@@ -1,12 +1,12 @@
1
- import { r as e, h as t } from "./index-589f8eee.js";
1
+ import { r as s, h as t } from "./index-cd93b584.js";
2
2
  import "react";
3
3
  import "react-dom";
4
4
  const o = ".sc-person-icon-h{display:flex}", r = o, C = class {
5
- constructor(s) {
6
- e(this, s), this.width = "14", this.height = "16";
5
+ constructor(e) {
6
+ s(this, e), this.width = "14", this.height = "16";
7
7
  }
8
8
  render() {
9
- return t("svg", { key: "bf77344f510a860cf3b05daea1254dbe06465bcf", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "6704d143c071b2de1ce05a823bb98ba59fbffba7", d: "M7 0C4.79086 0 3 1.79086 3 4C3 6.20914 4.79086 8 7 8C9.20914 8 11 6.20914 11 4C11 1.79086 9.20914 0 7 0ZM4 4C4 2.34315 5.34315 1 7 1C8.65685 1 10 2.34315 10 4C10 5.65685 8.65685 7 7 7C5.34315 7 4 5.65685 4 4ZM2.00873 9C0.903151 9 0 9.88687 0 11C0 12.6912 0.83281 13.9663 2.13499 14.7966C3.41697 15.614 5.14526 16 7 16C8.85474 16 10.583 15.614 11.865 14.7966C13.1672 13.9663 14 12.6912 14 11C14 9.89557 13.1045 9.00001 12 9.00001L2.00873 9ZM1 11C1 10.4467 1.44786 10 2.00873 10L12 10C12.5522 10 13 10.4478 13 11C13 12.3088 12.3777 13.2837 11.3274 13.9534C10.2568 14.636 8.73511 15 7 15C5.26489 15 3.74318 14.636 2.67262 13.9534C1.62226 13.2837 1 12.3088 1 11Z", fill: "currentColor" }));
9
+ return t("svg", { key: "03176594a4eacc29adc4453969f78696a9603eb2", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "b366e4e299850744e1e60c856f4e2dc264acf6a3", d: "M7 0C4.79086 0 3 1.79086 3 4C3 6.20914 4.79086 8 7 8C9.20914 8 11 6.20914 11 4C11 1.79086 9.20914 0 7 0ZM4 4C4 2.34315 5.34315 1 7 1C8.65685 1 10 2.34315 10 4C10 5.65685 8.65685 7 7 7C5.34315 7 4 5.65685 4 4ZM2.00873 9C0.903151 9 0 9.88687 0 11C0 12.6912 0.83281 13.9663 2.13499 14.7966C3.41697 15.614 5.14526 16 7 16C8.85474 16 10.583 15.614 11.865 14.7966C13.1672 13.9663 14 12.6912 14 11C14 9.89557 13.1045 9.00001 12 9.00001L2.00873 9ZM1 11C1 10.4467 1.44786 10 2.00873 10L12 10C12.5522 10 13 10.4478 13 11C13 12.3088 12.3777 13.2837 11.3274 13.9534C10.2568 14.636 8.73511 15 7 15C5.26489 15 3.74318 14.636 2.67262 13.9534C1.62226 13.2837 1 12.3088 1 11Z", fill: "currentColor" }));
10
10
  }
11
11
  };
12
12
  C.style = r;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-5611d3d5.cjs");require("react");require("react-dom");const s=".sc-play-icon-h{display:flex}",o=s,t=class{constructor(i){e.registerInstance(this,i),this.width="15",this.height="15"}render(){return e.h("svg",{key:"09672d0e495dea5c057e0459bbaf09e05c5f6d92",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"f2d1b1e318670f9dac0c53f4e6bfe209fb6bb073",d:"M21 12L3 21V3L21 12Z",stroke:"auto","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))}};t.style=o;exports.play_icon=t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-94416062.cjs");require("react");require("react-dom");const s=".sc-play-icon-h{display:flex}",o=s,t=class{constructor(i){e.registerInstance(this,i),this.width="15",this.height="15"}render(){return e.h("svg",{key:"89505d8724aa9db256428426ecdf5876ec037dcd",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"6b53e880ecd128514c431f2590365aa40f4a59f1",d:"M21 12L3 21V3L21 12Z",stroke:"auto","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))}};t.style=o;exports.play_icon=t;
@@ -1,12 +1,12 @@
1
- import { r as s, h as t } from "./index-589f8eee.js";
1
+ import { r as e, h as t } from "./index-cd93b584.js";
2
2
  import "react";
3
3
  import "react-dom";
4
4
  const o = ".sc-play-icon-h{display:flex}", i = o, r = class {
5
- constructor(e) {
6
- s(this, e), this.width = "15", this.height = "15";
5
+ constructor(s) {
6
+ e(this, s), this.width = "15", this.height = "15";
7
7
  }
8
8
  render() {
9
- return t("svg", { key: "09672d0e495dea5c057e0459bbaf09e05c5f6d92", width: this.width, height: this.height, viewBox: "0 0 24 24", fill: "auto", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "f2d1b1e318670f9dac0c53f4e6bfe209fb6bb073", d: "M21 12L3 21V3L21 12Z", stroke: "auto", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }));
9
+ return t("svg", { key: "89505d8724aa9db256428426ecdf5876ec037dcd", width: this.width, height: this.height, viewBox: "0 0 24 24", fill: "auto", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "6b53e880ecd128514c431f2590365aa40f4a59f1", d: "M21 12L3 21V3L21 12Z", stroke: "auto", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }));
10
10
  }
11
11
  };
12
12
  r.style = i;
package/dist/react.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-5611d3d5.cjs");require("react");require("react-dom");exports.AddCircleIcon=o.AddCircleIcon;exports.ArchiveIcon=o.ArchiveIcon;exports.ArrowIcon=o.ArrowIcon;exports.BoldIcon=o.BoldIcon;exports.ButtonComponent=o.ButtonComponent;exports.CalendarAgendaFillIcon=o.CalendarAgendaFillIcon;exports.CalendarAgendaIcon=o.CalendarAgendaIcon;exports.CalendarCancelIcon=o.CalendarCancelIcon;exports.CalendarCheckIcon=o.CalendarCheckIcon;exports.CalendarIcon=o.CalendarIcon;exports.CalendarInfoIcon=o.CalendarInfoIcon;exports.CalendarPatternsIcon=o.CalendarPatternsIcon;exports.CheckboxComponent=o.CheckboxComponent;exports.CheckmarkCircleIcon=o.CheckmarkCircleIcon;exports.CheckmarkIcon=o.CheckmarkIcon;exports.ChevronIcon=o.ChevronIcon;exports.ClockIcon=o.ClockIcon;exports.CloseIcon=o.CloseIcon;exports.CopyIcon=o.CopyIcon;exports.DeleteIcon=o.DeleteIcon;exports.DocumentRefreshIcon=o.DocumentRefreshIcon;exports.DragableIcon=o.DragableIcon;exports.EditIcon=o.EditIcon;exports.EnvelopeFillIcon=o.EnvelopeFillIcon;exports.EnvelopeIcon=o.EnvelopeIcon;exports.EyeIcon=o.EyeIcon;exports.FeedbackIcon=o.FeedbackIcon;exports.FlowIcon=o.FlowIcon;exports.FolderIcon=o.FolderIcon;exports.ForwardIcon=o.ForwardIcon;exports.GlobeIcon=o.GlobeIcon;exports.GoogleLogoIcon=o.GoogleLogoIcon;exports.GoogleMeetIcon=o.GoogleMeetIcon;exports.InboxIcon=o.InboxIcon;exports.InfoIcon=o.InfoIcon;exports.InputColorPicker=o.InputColorPicker;exports.InputComponent=o.InputComponent;exports.InputDropdown=o.InputDropdown;exports.InputImageUrl=o.InputImageUrl;exports.ItalicIcon=o.ItalicIcon;exports.LoadingIcon=o.LoadingIcon;exports.LocationIcon=o.LocationIcon;exports.LocationOffIcon=o.LocationOffIcon;exports.MicrosoftLogoIcon=o.MicrosoftLogoIcon;exports.MicrosoftTeamsIcon=o.MicrosoftTeamsIcon;exports.MultiSelectDropdown=o.MultiSelectDropdown;exports.NylasAdditionalParticipants=o.NylasAdditionalParticipants;exports.NylasAvailabilityPicker=o.NylasAvailabilityPicker;exports.NylasBookedEventCard=o.NylasBookedEventCard;exports.NylasBookingCalendarPicker=o.NylasBookingCalendarPicker;exports.NylasBookingConfirmationRedirect=o.NylasBookingConfirmationRedirect;exports.NylasBookingConfirmationType=o.NylasBookingConfirmationType;exports.NylasBookingForm=o.NylasBookingForm;exports.NylasBookingFormConfig=o.NylasBookingFormConfig;exports.NylasBufferTime=o.NylasBufferTime;exports.NylasCalendarPicker=o.NylasCalendarPicker;exports.NylasCancelBookingForm=o.NylasCancelBookingForm;exports.NylasCancellationPolicy=o.NylasCancellationPolicy;exports.NylasCancelledEventCard=o.NylasCancelledEventCard;exports.NylasConfirmationEmail=o.NylasConfirmationEmail;exports.NylasConfirmedEventCard=o.NylasConfirmedEventCard;exports.NylasConnectedCalendars=o.NylasConnectedCalendars;exports.NylasCustomBookingFlow=o.NylasCustomBookingFlow;exports.NylasCustomEventSlug=o.NylasCustomEventSlug;exports.NylasCustomizeBookingSettings=o.NylasCustomizeBookingSettings;exports.NylasDateComponent=o.NylasDateComponent;exports.NylasDatePicker=o.NylasDatePicker;exports.NylasEditorTabs=o.NylasEditorTabs;exports.NylasEventDescription=o.NylasEventDescription;exports.NylasEventDuration=o.NylasEventDuration;exports.NylasEventInfo=o.NylasEventInfo;exports.NylasEventLimits=o.NylasEventLimits;exports.NylasEventLocation=o.NylasEventLocation;exports.NylasEventTitle=o.NylasEventTitle;exports.NylasFeedbackForm=o.NylasFeedbackForm;exports.NylasFormCard=o.NylasFormCard;exports.NylasIdentityRequestWrapper=o.NylasIdentityRequestWrapper;exports.NylasIfState=o.NylasIfState;exports.NylasLimitFutureBookings=o.NylasLimitFutureBookings;exports.NylasListConfigurations=o.NylasListConfigurations;exports.NylasLocaleSwitch=o.NylasLocaleSwitch;exports.NylasLogin=o.NylasLogin;exports.NylasLogo=o.NylasLogo;exports.NylasMinBookingNotice=o.NylasMinBookingNotice;exports.NylasMinCancellationNotice=o.NylasMinCancellationNotice;exports.NylasNotification=o.NylasNotification;exports.NylasOrganizerConfirmationCard=o.NylasOrganizerConfirmationCard;exports.NylasPageName=o.NylasPageName;exports.NylasPageStyling=o.NylasPageStyling;exports.NylasParticipantBookingCalendars=o.NylasParticipantBookingCalendars;exports.NylasParticipantsCustomAvailability=o.NylasParticipantsCustomAvailability;exports.NylasProvider=o.NylasProvider;exports.NylasReminderEmails=o.NylasReminderEmails;exports.NylasReminderTime=o.NylasReminderTime;exports.NylasSchedulerEditor=o.NylasSchedulerEditor;exports.NylasScheduling=o.NylasScheduling;exports.NylasSchedulingMethod=o.NylasSchedulingMethod;exports.NylasSelectedEventCard=o.NylasSelectedEventCard;exports.NylasTimeWindowPicker=o.NylasTimeWindowPicker;exports.NylasTimeslotInterval=o.NylasTimeslotInterval;exports.NylasTimeslotPicker=o.NylasTimeslotPicker;exports.PaintbrushFillIcon=o.PaintbrushFillIcon;exports.PaintbrushIcon=o.PaintbrushIcon;exports.PeopleIcon=o.PeopleIcon;exports.PersonClipboardIcon=o.PersonClipboardIcon;exports.PersonIcon=o.PersonIcon;exports.PlayIcon=o.PlayIcon;exports.PlusIcon=o.PlusIcon;exports.RadioButtonGroup=o.RadioButtonGroup;exports.RefreshIcon=o.RefreshIcon;exports.ReplyAllIcon=o.ReplyAllIcon;exports.ReplyIcon=o.ReplyIcon;exports.SearchIcon=o.SearchIcon;exports.SelectDropdown=o.SelectDropdown;exports.SentIcon=o.SentIcon;exports.SpamIcon=o.SpamIcon;exports.StarIcon=o.StarIcon;exports.StopIcon=o.StopIcon;exports.TextareaComponent=o.TextareaComponent;exports.TimePeriodSelector=o.TimePeriodSelector;exports.ToggleSwitch=o.ToggleSwitch;exports.TooltipComponent=o.TooltipComponent;exports.TranslateIcon=o.TranslateIcon;exports.TrashFillIcon=o.TrashFillIcon;exports.TrashIcon=o.TrashIcon;exports.UnderlineIcon=o.UnderlineIcon;exports.WarningIcon=o.WarningIcon;exports.ZoomIcon=o.ZoomIcon;exports.applyPolyfills=o.applyPolyfills;exports.defineCustomElements=o.defineCustomElements;exports.setNonce=o.setNonce;exports.useNylasMailboxElement=o.useNylasMailboxElement;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-94416062.cjs");require("react");require("react-dom");exports.AddCircleIcon=o.AddCircleIcon;exports.ArchiveIcon=o.ArchiveIcon;exports.ArrowIcon=o.ArrowIcon;exports.BoldIcon=o.BoldIcon;exports.ButtonComponent=o.ButtonComponent;exports.CalendarAgendaFillIcon=o.CalendarAgendaFillIcon;exports.CalendarAgendaIcon=o.CalendarAgendaIcon;exports.CalendarCancelIcon=o.CalendarCancelIcon;exports.CalendarCheckIcon=o.CalendarCheckIcon;exports.CalendarIcon=o.CalendarIcon;exports.CalendarInfoIcon=o.CalendarInfoIcon;exports.CalendarPatternsIcon=o.CalendarPatternsIcon;exports.CheckboxComponent=o.CheckboxComponent;exports.CheckmarkCircleIcon=o.CheckmarkCircleIcon;exports.CheckmarkIcon=o.CheckmarkIcon;exports.ChevronIcon=o.ChevronIcon;exports.ClockIcon=o.ClockIcon;exports.CloseIcon=o.CloseIcon;exports.CopyIcon=o.CopyIcon;exports.DeleteIcon=o.DeleteIcon;exports.DocumentRefreshIcon=o.DocumentRefreshIcon;exports.DragableIcon=o.DragableIcon;exports.EditIcon=o.EditIcon;exports.EnvelopeFillIcon=o.EnvelopeFillIcon;exports.EnvelopeIcon=o.EnvelopeIcon;exports.EyeIcon=o.EyeIcon;exports.FeedbackIcon=o.FeedbackIcon;exports.FlowIcon=o.FlowIcon;exports.FolderIcon=o.FolderIcon;exports.ForwardIcon=o.ForwardIcon;exports.GlobeIcon=o.GlobeIcon;exports.GoogleLogoIcon=o.GoogleLogoIcon;exports.GoogleMeetIcon=o.GoogleMeetIcon;exports.InboxIcon=o.InboxIcon;exports.InfoIcon=o.InfoIcon;exports.InputColorPicker=o.InputColorPicker;exports.InputComponent=o.InputComponent;exports.InputDropdown=o.InputDropdown;exports.InputImageUrl=o.InputImageUrl;exports.ItalicIcon=o.ItalicIcon;exports.LoadingIcon=o.LoadingIcon;exports.LocationIcon=o.LocationIcon;exports.LocationOffIcon=o.LocationOffIcon;exports.MicrosoftLogoIcon=o.MicrosoftLogoIcon;exports.MicrosoftTeamsIcon=o.MicrosoftTeamsIcon;exports.MultiSelectDropdown=o.MultiSelectDropdown;exports.NylasAdditionalParticipants=o.NylasAdditionalParticipants;exports.NylasAvailabilityPicker=o.NylasAvailabilityPicker;exports.NylasBookedEventCard=o.NylasBookedEventCard;exports.NylasBookingCalendarPicker=o.NylasBookingCalendarPicker;exports.NylasBookingConfirmationRedirect=o.NylasBookingConfirmationRedirect;exports.NylasBookingConfirmationType=o.NylasBookingConfirmationType;exports.NylasBookingForm=o.NylasBookingForm;exports.NylasBookingFormConfig=o.NylasBookingFormConfig;exports.NylasBufferTime=o.NylasBufferTime;exports.NylasCalendarPicker=o.NylasCalendarPicker;exports.NylasCancelBookingForm=o.NylasCancelBookingForm;exports.NylasCancellationPolicy=o.NylasCancellationPolicy;exports.NylasCancelledEventCard=o.NylasCancelledEventCard;exports.NylasConfirmationEmail=o.NylasConfirmationEmail;exports.NylasConfirmedEventCard=o.NylasConfirmedEventCard;exports.NylasConnectedCalendars=o.NylasConnectedCalendars;exports.NylasCustomBookingFlow=o.NylasCustomBookingFlow;exports.NylasCustomEventSlug=o.NylasCustomEventSlug;exports.NylasCustomizeBookingSettings=o.NylasCustomizeBookingSettings;exports.NylasDateComponent=o.NylasDateComponent;exports.NylasDatePicker=o.NylasDatePicker;exports.NylasEditorTabs=o.NylasEditorTabs;exports.NylasEventDescription=o.NylasEventDescription;exports.NylasEventDuration=o.NylasEventDuration;exports.NylasEventInfo=o.NylasEventInfo;exports.NylasEventLimits=o.NylasEventLimits;exports.NylasEventLocation=o.NylasEventLocation;exports.NylasEventTitle=o.NylasEventTitle;exports.NylasFeedbackForm=o.NylasFeedbackForm;exports.NylasFormCard=o.NylasFormCard;exports.NylasIdentityRequestWrapper=o.NylasIdentityRequestWrapper;exports.NylasIfState=o.NylasIfState;exports.NylasLimitFutureBookings=o.NylasLimitFutureBookings;exports.NylasListConfigurations=o.NylasListConfigurations;exports.NylasLocaleSwitch=o.NylasLocaleSwitch;exports.NylasLogin=o.NylasLogin;exports.NylasLogo=o.NylasLogo;exports.NylasMinBookingNotice=o.NylasMinBookingNotice;exports.NylasMinCancellationNotice=o.NylasMinCancellationNotice;exports.NylasNotification=o.NylasNotification;exports.NylasOrganizerConfirmationCard=o.NylasOrganizerConfirmationCard;exports.NylasPageName=o.NylasPageName;exports.NylasPageStyling=o.NylasPageStyling;exports.NylasParticipantBookingCalendars=o.NylasParticipantBookingCalendars;exports.NylasParticipantsCustomAvailability=o.NylasParticipantsCustomAvailability;exports.NylasProvider=o.NylasProvider;exports.NylasReminderEmails=o.NylasReminderEmails;exports.NylasReminderTime=o.NylasReminderTime;exports.NylasSchedulerEditor=o.NylasSchedulerEditor;exports.NylasScheduling=o.NylasScheduling;exports.NylasSchedulingMethod=o.NylasSchedulingMethod;exports.NylasSelectedEventCard=o.NylasSelectedEventCard;exports.NylasTimeWindowPicker=o.NylasTimeWindowPicker;exports.NylasTimeslotInterval=o.NylasTimeslotInterval;exports.NylasTimeslotPicker=o.NylasTimeslotPicker;exports.PaintbrushFillIcon=o.PaintbrushFillIcon;exports.PaintbrushIcon=o.PaintbrushIcon;exports.PeopleIcon=o.PeopleIcon;exports.PersonClipboardIcon=o.PersonClipboardIcon;exports.PersonIcon=o.PersonIcon;exports.PlayIcon=o.PlayIcon;exports.PlusIcon=o.PlusIcon;exports.RadioButtonGroup=o.RadioButtonGroup;exports.RefreshIcon=o.RefreshIcon;exports.ReplyAllIcon=o.ReplyAllIcon;exports.ReplyIcon=o.ReplyIcon;exports.SearchIcon=o.SearchIcon;exports.SelectDropdown=o.SelectDropdown;exports.SentIcon=o.SentIcon;exports.SpamIcon=o.SpamIcon;exports.StarIcon=o.StarIcon;exports.StopIcon=o.StopIcon;exports.TextareaComponent=o.TextareaComponent;exports.TimePeriodSelector=o.TimePeriodSelector;exports.ToggleSwitch=o.ToggleSwitch;exports.TooltipComponent=o.TooltipComponent;exports.TranslateIcon=o.TranslateIcon;exports.TrashFillIcon=o.TrashFillIcon;exports.TrashIcon=o.TrashIcon;exports.UnderlineIcon=o.UnderlineIcon;exports.WarningIcon=o.WarningIcon;exports.ZoomIcon=o.ZoomIcon;exports.applyPolyfills=o.applyPolyfills;exports.defineCustomElements=o.defineCustomElements;exports.setNonce=o.setNonce;exports.useNylasMailboxElement=o.useNylasMailboxElement;
package/dist/react.js CHANGED
@@ -1,4 +1,4 @@
1
- import { Z as e, _ as l, $ as i, a0 as c, a1 as t, a2 as r, a3 as b, a4 as I, a5 as y, a6 as N, a7 as d, a8 as C, a9 as m, aa as p, ab as g, ac as k, ad as u, ae as P, af as f, ag as E, ah as h, ai as v, aj as S, ak as B, al as F, am as T, an as L, ao as w, ap as D, aq as A, ar as R, as as M, at as x, au as G, av as W, aw as z, ax as O, ay as U, az as q, aA as V, aB as X, aC as Z, aD as j, aE as H, aF as J, aG as K, aH as Q, aI as Y, aJ as _, aK as $, aL as aa, aM as sa, aN as oa, aO as na, aP as ea, aQ as la, aR as ia, aS as ca, aT as ta, aU as ra, aV as ba, aW as Ia, aX as ya, aY as Na, aZ as da, a_ as Ca, a$ as ma, b0 as pa, b1 as ga, b2 as ka, b3 as ua, b4 as Pa, b5 as fa, b6 as Ea, b7 as ha, b8 as va, N as Sa, b9 as Ba, ba as Fa, bb as Ta, bc as La, bd as wa, be as Da, bf as Aa, bg as Ra, bh as Ma, bi as xa, bj as Ga, bk as Wa, bl as za, bm as Oa, bn as Ua, bo as qa, bp as Va, bq as Xa, br as Za, bs as ja, bt as Ha, bu as Ja, bv as Ka, bw as Qa, bx as Ya, by as _a, bz as $a, bA as as, bB as ss, bC as os, bD as ns, bE as es, bF as ls, bG as is, bH as cs, bI as ts, bJ as rs, bK as bs, bL as Is, bM as ys, bN as Ns, bO as ds, bP as Cs, bQ as ms, bR as ps, bS as gs, bT as ks, bU as us, bV as Ps, bW as fs, bX as Es, W as hs, X as vs, Y as Ss, V as Bs } from "./index-589f8eee.js";
1
+ import { Z as e, _ as l, $ as i, a0 as c, a1 as t, a2 as r, a3 as b, a4 as I, a5 as y, a6 as N, a7 as d, a8 as C, a9 as m, aa as p, ab as g, ac as k, ad as u, ae as P, af as f, ag as E, ah as h, ai as v, aj as S, ak as B, al as F, am as T, an as L, ao as w, ap as D, aq as A, ar as R, as as M, at as x, au as G, av as W, aw as z, ax as O, ay as U, az as q, aA as V, aB as X, aC as Z, aD as j, aE as H, aF as J, aG as K, aH as Q, aI as Y, aJ as _, aK as $, aL as aa, aM as sa, aN as oa, aO as na, aP as ea, aQ as la, aR as ia, aS as ca, aT as ta, aU as ra, aV as ba, aW as Ia, aX as ya, aY as Na, aZ as da, a_ as Ca, a$ as ma, b0 as pa, b1 as ga, b2 as ka, b3 as ua, b4 as Pa, b5 as fa, b6 as Ea, b7 as ha, b8 as va, N as Sa, b9 as Ba, ba as Fa, bb as Ta, bc as La, bd as wa, be as Da, bf as Aa, bg as Ra, bh as Ma, bi as xa, bj as Ga, bk as Wa, bl as za, bm as Oa, bn as Ua, bo as qa, bp as Va, bq as Xa, br as Za, bs as ja, bt as Ha, bu as Ja, bv as Ka, bw as Qa, bx as Ya, by as _a, bz as $a, bA as as, bB as ss, bC as os, bD as ns, bE as es, bF as ls, bG as is, bH as cs, bI as ts, bJ as rs, bK as bs, bL as Is, bM as ys, bN as Ns, bO as ds, bP as Cs, bQ as ms, bR as ps, bS as gs, bT as ks, bU as us, bV as Ps, bW as fs, bX as Es, W as hs, X as vs, Y as Ss, V as Bs } from "./index-cd93b584.js";
2
2
  import "react";
3
3
  import "react-dom";
4
4
  export {
@@ -1,12 +1,12 @@
1
- import { r as s, h as c } from "./index-589f8eee.js";
1
+ import { r as e, h as c } from "./index-cd93b584.js";
2
2
  import "react";
3
3
  import "react-dom";
4
4
  const t = ".sc-refresh-icon-h{display:flex}", l = t, h = class {
5
- constructor(e) {
6
- s(this, e), this.width = "15", this.height = "15";
5
+ constructor(s) {
6
+ e(this, s), this.width = "15", this.height = "15";
7
7
  }
8
8
  render() {
9
- return c("svg", { key: "2e53f7097cb59c8a341225fdde738395247fe681", fill: "auto", width: this.width, height: this.height, viewBox: "0 0 32 32", version: "1.1", xmlns: "http://www.w3.org/2000/svg" }, c("path", { key: "6e99de42fd10abc8e6c9f705ea770431ac131d66", d: "M15.544 28.080c-0.002-0.006-0.008-0.010-0.012-0.015l-2.873-4.489c-0.204-0.335-0.646-0.454-0.992-0.266l-0.256 0.157c-0.344 0.188-0.337 0.673-0.133 1.008l1.841 2.857c-0.157-0.035-0.316-0.063-0.471-0.103-3.224-0.843-5.953-3.026-7.485-5.988-1.448-2.797-1.72-5.99-0.766-8.992s3.118-5.452 5.915-6.899c0.476-0.247 0.662-0.832 0.416-1.308-0.246-0.477-0.832-0.663-1.308-0.416-3.258 1.686-5.763 4.54-6.874 8.036s-0.794 7.215 0.892 10.473c1.786 3.448 4.963 5.989 8.72 6.973 0.043 0.011 0.087 0.017 0.13 0.028l-2.541 1.288c-0.344 0.189-0.458 0.613-0.254 0.948l0.098 0.256c0.205 0.335 0.557 0.454 0.9 0.266l4.651-2.381c0.006-0.004 0.012-0.003 0.018-0.007l0.312-0.171c0.172-0.095 0.287-0.249 0.332-0.422 0.047-0.172 0.025-0.364-0.076-0.531zM28.559 10.025c-1.783-3.447-4.862-5.988-8.618-6.972-0.267-0.070-0.541-0.124-0.814-0.179l2.494-1.265c0.344-0.189 0.549-0.614 0.345-0.949l-0.099-0.255c-0.205-0.336-0.648-0.454-0.991-0.267l-4.651 2.381c-0.006 0.003-0.012 0.002-0.018 0.006l-0.312 0.171c-0.173 0.095-0.287 0.249-0.332 0.422-0.047 0.172-0.025 0.364 0.077 0.53l0.185 0.304c0.003 0.006 0.008 0.010 0.012 0.016l2.873 4.489c0.203 0.335 0.646 0.454 0.991 0.266l0.226-0.157c0.344-0.188 0.366-0.673 0.163-1.008l-1.85-2.87c0.407 0.063 0.811 0.138 1.207 0.242 3.226 0.845 5.856 3.027 7.387 5.986 1.448 2.797 1.72 5.99 0.765 8.991s-3.020 5.451-5.818 6.901c-0.476 0.247-0.662 0.831-0.415 1.308 0.172 0.332 0.511 0.524 0.863 0.524 0.15 0 0.302-0.035 0.446-0.109 3.259-1.686 5.664-4.54 6.776-8.035 1.111-3.497 0.794-7.217-0.893-10.473z" }));
9
+ return c("svg", { key: "cfec35240f7dc7c9d7ac1241c99518a814174035", fill: "auto", width: this.width, height: this.height, viewBox: "0 0 32 32", version: "1.1", xmlns: "http://www.w3.org/2000/svg" }, c("path", { key: "7fca012bb8209183efdcde86684c69d3de67b50f", d: "M15.544 28.080c-0.002-0.006-0.008-0.010-0.012-0.015l-2.873-4.489c-0.204-0.335-0.646-0.454-0.992-0.266l-0.256 0.157c-0.344 0.188-0.337 0.673-0.133 1.008l1.841 2.857c-0.157-0.035-0.316-0.063-0.471-0.103-3.224-0.843-5.953-3.026-7.485-5.988-1.448-2.797-1.72-5.99-0.766-8.992s3.118-5.452 5.915-6.899c0.476-0.247 0.662-0.832 0.416-1.308-0.246-0.477-0.832-0.663-1.308-0.416-3.258 1.686-5.763 4.54-6.874 8.036s-0.794 7.215 0.892 10.473c1.786 3.448 4.963 5.989 8.72 6.973 0.043 0.011 0.087 0.017 0.13 0.028l-2.541 1.288c-0.344 0.189-0.458 0.613-0.254 0.948l0.098 0.256c0.205 0.335 0.557 0.454 0.9 0.266l4.651-2.381c0.006-0.004 0.012-0.003 0.018-0.007l0.312-0.171c0.172-0.095 0.287-0.249 0.332-0.422 0.047-0.172 0.025-0.364-0.076-0.531zM28.559 10.025c-1.783-3.447-4.862-5.988-8.618-6.972-0.267-0.070-0.541-0.124-0.814-0.179l2.494-1.265c0.344-0.189 0.549-0.614 0.345-0.949l-0.099-0.255c-0.205-0.336-0.648-0.454-0.991-0.267l-4.651 2.381c-0.006 0.003-0.012 0.002-0.018 0.006l-0.312 0.171c-0.173 0.095-0.287 0.249-0.332 0.422-0.047 0.172-0.025 0.364 0.077 0.53l0.185 0.304c0.003 0.006 0.008 0.010 0.012 0.016l2.873 4.489c0.203 0.335 0.646 0.454 0.991 0.266l0.226-0.157c0.344-0.188 0.366-0.673 0.163-1.008l-1.85-2.87c0.407 0.063 0.811 0.138 1.207 0.242 3.226 0.845 5.856 3.027 7.387 5.986 1.448 2.797 1.72 5.99 0.765 8.991s-3.020 5.451-5.818 6.901c-0.476 0.247-0.662 0.831-0.415 1.308 0.172 0.332 0.511 0.524 0.863 0.524 0.15 0 0.302-0.035 0.446-0.109 3.259-1.686 5.664-4.54 6.776-8.035 1.111-3.497 0.794-7.217-0.893-10.473z" }));
10
10
  }
11
11
  };
12
12
  h.style = l;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-5611d3d5.cjs");require("react");require("react-dom");const t=".sc-refresh-icon-h{display:flex}",i=t,c=class{constructor(s){e.registerInstance(this,s),this.width="15",this.height="15"}render(){return e.h("svg",{key:"2e53f7097cb59c8a341225fdde738395247fe681",fill:"auto",width:this.width,height:this.height,viewBox:"0 0 32 32",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"6e99de42fd10abc8e6c9f705ea770431ac131d66",d:"M15.544 28.080c-0.002-0.006-0.008-0.010-0.012-0.015l-2.873-4.489c-0.204-0.335-0.646-0.454-0.992-0.266l-0.256 0.157c-0.344 0.188-0.337 0.673-0.133 1.008l1.841 2.857c-0.157-0.035-0.316-0.063-0.471-0.103-3.224-0.843-5.953-3.026-7.485-5.988-1.448-2.797-1.72-5.99-0.766-8.992s3.118-5.452 5.915-6.899c0.476-0.247 0.662-0.832 0.416-1.308-0.246-0.477-0.832-0.663-1.308-0.416-3.258 1.686-5.763 4.54-6.874 8.036s-0.794 7.215 0.892 10.473c1.786 3.448 4.963 5.989 8.72 6.973 0.043 0.011 0.087 0.017 0.13 0.028l-2.541 1.288c-0.344 0.189-0.458 0.613-0.254 0.948l0.098 0.256c0.205 0.335 0.557 0.454 0.9 0.266l4.651-2.381c0.006-0.004 0.012-0.003 0.018-0.007l0.312-0.171c0.172-0.095 0.287-0.249 0.332-0.422 0.047-0.172 0.025-0.364-0.076-0.531zM28.559 10.025c-1.783-3.447-4.862-5.988-8.618-6.972-0.267-0.070-0.541-0.124-0.814-0.179l2.494-1.265c0.344-0.189 0.549-0.614 0.345-0.949l-0.099-0.255c-0.205-0.336-0.648-0.454-0.991-0.267l-4.651 2.381c-0.006 0.003-0.012 0.002-0.018 0.006l-0.312 0.171c-0.173 0.095-0.287 0.249-0.332 0.422-0.047 0.172-0.025 0.364 0.077 0.53l0.185 0.304c0.003 0.006 0.008 0.010 0.012 0.016l2.873 4.489c0.203 0.335 0.646 0.454 0.991 0.266l0.226-0.157c0.344-0.188 0.366-0.673 0.163-1.008l-1.85-2.87c0.407 0.063 0.811 0.138 1.207 0.242 3.226 0.845 5.856 3.027 7.387 5.986 1.448 2.797 1.72 5.99 0.765 8.991s-3.020 5.451-5.818 6.901c-0.476 0.247-0.662 0.831-0.415 1.308 0.172 0.332 0.511 0.524 0.863 0.524 0.15 0 0.302-0.035 0.446-0.109 3.259-1.686 5.664-4.54 6.776-8.035 1.111-3.497 0.794-7.217-0.893-10.473z"}))}};c.style=i;exports.refresh_icon=c;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index-94416062.cjs");require("react");require("react-dom");const t=".sc-refresh-icon-h{display:flex}",i=t,e=class{constructor(s){c.registerInstance(this,s),this.width="15",this.height="15"}render(){return c.h("svg",{key:"cfec35240f7dc7c9d7ac1241c99518a814174035",fill:"auto",width:this.width,height:this.height,viewBox:"0 0 32 32",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},c.h("path",{key:"7fca012bb8209183efdcde86684c69d3de67b50f",d:"M15.544 28.080c-0.002-0.006-0.008-0.010-0.012-0.015l-2.873-4.489c-0.204-0.335-0.646-0.454-0.992-0.266l-0.256 0.157c-0.344 0.188-0.337 0.673-0.133 1.008l1.841 2.857c-0.157-0.035-0.316-0.063-0.471-0.103-3.224-0.843-5.953-3.026-7.485-5.988-1.448-2.797-1.72-5.99-0.766-8.992s3.118-5.452 5.915-6.899c0.476-0.247 0.662-0.832 0.416-1.308-0.246-0.477-0.832-0.663-1.308-0.416-3.258 1.686-5.763 4.54-6.874 8.036s-0.794 7.215 0.892 10.473c1.786 3.448 4.963 5.989 8.72 6.973 0.043 0.011 0.087 0.017 0.13 0.028l-2.541 1.288c-0.344 0.189-0.458 0.613-0.254 0.948l0.098 0.256c0.205 0.335 0.557 0.454 0.9 0.266l4.651-2.381c0.006-0.004 0.012-0.003 0.018-0.007l0.312-0.171c0.172-0.095 0.287-0.249 0.332-0.422 0.047-0.172 0.025-0.364-0.076-0.531zM28.559 10.025c-1.783-3.447-4.862-5.988-8.618-6.972-0.267-0.070-0.541-0.124-0.814-0.179l2.494-1.265c0.344-0.189 0.549-0.614 0.345-0.949l-0.099-0.255c-0.205-0.336-0.648-0.454-0.991-0.267l-4.651 2.381c-0.006 0.003-0.012 0.002-0.018 0.006l-0.312 0.171c-0.173 0.095-0.287 0.249-0.332 0.422-0.047 0.172-0.025 0.364 0.077 0.53l0.185 0.304c0.003 0.006 0.008 0.010 0.012 0.016l2.873 4.489c0.203 0.335 0.646 0.454 0.991 0.266l0.226-0.157c0.344-0.188 0.366-0.673 0.163-1.008l-1.85-2.87c0.407 0.063 0.811 0.138 1.207 0.242 3.226 0.845 5.856 3.027 7.387 5.986 1.448 2.797 1.72 5.99 0.765 8.991s-3.020 5.451-5.818 6.901c-0.476 0.247-0.662 0.831-0.415 1.308 0.172 0.332 0.511 0.524 0.863 0.524 0.15 0 0.302-0.035 0.446-0.109 3.259-1.686 5.664-4.54 6.776-8.035 1.111-3.497 0.794-7.217-0.893-10.473z"}))}};e.style=i;exports.refresh_icon=e;
@@ -1 +1 @@
1
- "use strict";const s=require("./index-5611d3d5.cjs");function m(e,o,i="registerComponent"){return new CustomEvent(i,{bubbles:!0,composed:!0,detail:o})}function P(e,o,i="unregisterComponent"){return new CustomEvent(i,{bubbles:!0,composed:!0,detail:o})}function b(e){return(o,i)=>{const r=e.name;s.debug(`[${r}] Registering component ${r} being called on ${i}`);const l=o.componentWillLoad;if(!l){s.error(`[${r}] componentWillLoad lifecycle method in ${r} missing. Required for RegisterComponent decorator.`);return}const p=o.connectedCallback;if(!p){s.error(`[${r}] connectedCallback lifecycle method in ${r} missing. Required for RegisterComponent decorator.`);return}const a=o.disconnectedCallback;if(!a){s.error(`[${r}] disconnectedCallback lifecycle method in ${r} missing. Required for RegisterComponent decorator.`);return}if(e.storeToProps&&e.stateToProps){const n=Array.from(e.storeToProps.values()),t=Array.from(e.stateToProps.values()),u=n.filter(c=>t.includes(c));if(u.length>0){s.error(`[${r}] Overlapping prop keys detected in ${r} for storeToProps and stateToProps. Make sure to only define them once. Overlapping keys: ${u.join(", ")}`);return}}const d=new Map;e.eventToProps&&Object.keys(e.eventToProps).forEach(n=>{var t;d.set(n,(t=e.eventToProps)==null?void 0:t[n])}),o.connectedCallback=function(){s.debug(`[~${r}] connectedCallback called`);const n=p==null?void 0:p.call(this),t=s.getElement(this);return t.dataset.nylasId||(Object.defineProperty(t,"registerNylasComponent",{get(){return!0},enumerable:!0}),Object.defineProperty(t,"stateToProps",{get(){return e.stateToProps},enumerable:!0}),Object.defineProperty(t,"getStoresToProp",{get(){return e.getStoresToProp},enumerable:!0}),Object.defineProperty(t,"storeToProps",{get(){return e.storeToProps},enumerable:!0}),Object.defineProperty(t,"eventToProps",{get(){return d},enumerable:!0}),Object.defineProperty(t,"authToProp",{get(){return e.authToProp},enumerable:!0}),Object.defineProperty(t,"connectorToProp",{get(){return e.connectorToProp},enumerable:!0}),Object.defineProperty(t,"localPropsToProp",{get(){return e.localPropsToProp},enumerable:!0})),n},e.fireRegisterEvent&&(o.componentWillLoad=function(){const n=l==null?void 0:l.call(this),t=s.getElement(this),u={element:t,...e,eventToProps:d},c=m(o,u,e.registrationEventName);return t.dispatchEvent(c)&&s.debug(`[${r}] Component ${r} successfully fired registration event`),n},o.disconnectedCallback=function(){const n=a==null?void 0:a.call(this),t=s.getElement(this),u={element:t,...e,eventToProps:d},c=P(o,u,e.unregistrationEventName);return t.dispatchEvent(c)&&s.debug(`[${r}] Component ${r} successfully fired unregistration event`),n})}}exports.RegisterComponent=b;
1
+ "use strict";const s=require("./index-94416062.cjs");function m(e,o,i="registerComponent"){return new CustomEvent(i,{bubbles:!0,composed:!0,detail:o})}function P(e,o,i="unregisterComponent"){return new CustomEvent(i,{bubbles:!0,composed:!0,detail:o})}function b(e){return(o,i)=>{const r=e.name;s.debug(`[${r}] Registering component ${r} being called on ${i}`);const l=o.componentWillLoad;if(!l){s.error(`[${r}] componentWillLoad lifecycle method in ${r} missing. Required for RegisterComponent decorator.`);return}const p=o.connectedCallback;if(!p){s.error(`[${r}] connectedCallback lifecycle method in ${r} missing. Required for RegisterComponent decorator.`);return}const a=o.disconnectedCallback;if(!a){s.error(`[${r}] disconnectedCallback lifecycle method in ${r} missing. Required for RegisterComponent decorator.`);return}if(e.storeToProps&&e.stateToProps){const n=Array.from(e.storeToProps.values()),t=Array.from(e.stateToProps.values()),u=n.filter(c=>t.includes(c));if(u.length>0){s.error(`[${r}] Overlapping prop keys detected in ${r} for storeToProps and stateToProps. Make sure to only define them once. Overlapping keys: ${u.join(", ")}`);return}}const d=new Map;e.eventToProps&&Object.keys(e.eventToProps).forEach(n=>{var t;d.set(n,(t=e.eventToProps)==null?void 0:t[n])}),o.connectedCallback=function(){s.debug(`[~${r}] connectedCallback called`);const n=p==null?void 0:p.call(this),t=s.getElement(this);return t.dataset.nylasId||(Object.defineProperty(t,"registerNylasComponent",{get(){return!0},enumerable:!0}),Object.defineProperty(t,"stateToProps",{get(){return e.stateToProps},enumerable:!0}),Object.defineProperty(t,"getStoresToProp",{get(){return e.getStoresToProp},enumerable:!0}),Object.defineProperty(t,"storeToProps",{get(){return e.storeToProps},enumerable:!0}),Object.defineProperty(t,"eventToProps",{get(){return d},enumerable:!0}),Object.defineProperty(t,"authToProp",{get(){return e.authToProp},enumerable:!0}),Object.defineProperty(t,"connectorToProp",{get(){return e.connectorToProp},enumerable:!0}),Object.defineProperty(t,"localPropsToProp",{get(){return e.localPropsToProp},enumerable:!0})),n},e.fireRegisterEvent&&(o.componentWillLoad=function(){const n=l==null?void 0:l.call(this),t=s.getElement(this),u={element:t,...e,eventToProps:d},c=m(o,u,e.registrationEventName);return t.dispatchEvent(c)&&s.debug(`[${r}] Component ${r} successfully fired registration event`),n},o.disconnectedCallback=function(){const n=a==null?void 0:a.call(this),t=s.getElement(this),u={element:t,...e,eventToProps:d},c=P(o,u,e.unregistrationEventName);return t.dispatchEvent(c)&&s.debug(`[${r}] Component ${r} successfully fired unregistration event`),n})}}exports.RegisterComponent=b;
@@ -1,4 +1,4 @@
1
- import { d, P as m, g as P } from "./index-589f8eee.js";
1
+ import { d, P as m, g as P } from "./index-cd93b584.js";
2
2
  function b(e, o, c = "registerComponent") {
3
3
  return new CustomEvent(c, {
4
4
  bubbles: !0,
@@ -1,15 +1,15 @@
1
- import { r as l, h as t } from "./index-589f8eee.js";
1
+ import { r as l, h as t } from "./index-cd93b584.js";
2
2
  import "react";
3
3
  import "react-dom";
4
- const s = ".sc-reply-all-icon-h{display:flex}", i = s, h = class {
4
+ const s = ".sc-reply-all-icon-h{display:flex}", i = s, c = class {
5
5
  constructor(e) {
6
6
  l(this, e), this.width = "15", this.height = "15";
7
7
  }
8
8
  render() {
9
- return t("svg", { key: "731c2f8765e8d12717f1e021f6ea9fda06bdd336", fill: "auto", width: this.width, height: this.height, viewBox: "0 0 1920 1920", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "79807cd8dd4aaa49fc2c6be33b18974b9d7874f7", d: "m1030.975 188 81.249 81.249-429.228 429.228h300.747c516.223 0 936.257 420.034 936.257 936.257v98.028h-114.92v-98.028c0-452.901-368.436-821.337-821.337-821.337H682.996l429.228 429.229-81.25 81.248-567.936-567.937L1030.975 188Zm-463.038.011 81.249 81.25-486.688 486.688 486.688 486.688-81.249 81.249L0 755.949 567.937 188.01Z", "fill-rule": "evenodd" }));
9
+ return t("svg", { key: "6758c13e87a248f0b4fd59f6760b87277d26d1d0", fill: "auto", width: this.width, height: this.height, viewBox: "0 0 1920 1920", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "063ac866425fc57eb4cb0d1d90ca4215080f6160", d: "m1030.975 188 81.249 81.249-429.228 429.228h300.747c516.223 0 936.257 420.034 936.257 936.257v98.028h-114.92v-98.028c0-452.901-368.436-821.337-821.337-821.337H682.996l429.228 429.229-81.25 81.248-567.936-567.937L1030.975 188Zm-463.038.011 81.249 81.25-486.688 486.688 486.688 486.688-81.249 81.249L0 755.949 567.937 188.01Z", "fill-rule": "evenodd" }));
10
10
  }
11
11
  };
12
- h.style = i;
12
+ c.style = i;
13
13
  export {
14
- h as reply_all_icon
14
+ c as reply_all_icon
15
15
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-5611d3d5.cjs");require("react");require("react-dom");const i=".sc-reply-all-icon-h{display:flex}",s=i,t=class{constructor(l){e.registerInstance(this,l),this.width="15",this.height="15"}render(){return e.h("svg",{key:"731c2f8765e8d12717f1e021f6ea9fda06bdd336",fill:"auto",width:this.width,height:this.height,viewBox:"0 0 1920 1920",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"79807cd8dd4aaa49fc2c6be33b18974b9d7874f7",d:"m1030.975 188 81.249 81.249-429.228 429.228h300.747c516.223 0 936.257 420.034 936.257 936.257v98.028h-114.92v-98.028c0-452.901-368.436-821.337-821.337-821.337H682.996l429.228 429.229-81.25 81.248-567.936-567.937L1030.975 188Zm-463.038.011 81.249 81.25-486.688 486.688 486.688 486.688-81.249 81.249L0 755.949 567.937 188.01Z","fill-rule":"evenodd"}))}};t.style=s;exports.reply_all_icon=t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-94416062.cjs");require("react");require("react-dom");const i=".sc-reply-all-icon-h{display:flex}",s=i,t=class{constructor(l){e.registerInstance(this,l),this.width="15",this.height="15"}render(){return e.h("svg",{key:"6758c13e87a248f0b4fd59f6760b87277d26d1d0",fill:"auto",width:this.width,height:this.height,viewBox:"0 0 1920 1920",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"063ac866425fc57eb4cb0d1d90ca4215080f6160",d:"m1030.975 188 81.249 81.249-429.228 429.228h300.747c516.223 0 936.257 420.034 936.257 936.257v98.028h-114.92v-98.028c0-452.901-368.436-821.337-821.337-821.337H682.996l429.228 429.229-81.25 81.248-567.936-567.937L1030.975 188Zm-463.038.011 81.249 81.25-486.688 486.688 486.688 486.688-81.249 81.249L0 755.949 567.937 188.01Z","fill-rule":"evenodd"}))}};t.style=s;exports.reply_all_icon=t;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-94416062.cjs");require("react");require("react-dom");const s=".sc-reply-icon-h{display:flex}",r=s,t=class{constructor(i){e.registerInstance(this,i),this.width="15",this.height="15"}render(){return e.h("svg",{key:"18be7bd8957b2b4e5531ac731dc5368d8189bed5",fill:"auto",width:this.width,height:this.height,viewBox:"0 0 1920 1920",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"a420fae211dab532a422e6c9521f4a104275d4ed",d:"M835.942 632.563H244.966l478.08-478.08-90.496-90.496L-.026 696.563 632.55 1329.14l90.496-90.496-478.08-478.08h590.976c504.448 0 914.816 410.368 914.816 914.816v109.184h128V1675.38c0-574.976-467.84-1042.816-1042.816-1042.816","fill-rule":"evenodd"}))}};t.style=r;exports.reply_icon=t;
@@ -0,0 +1,15 @@
1
+ import { r as s, h as e } from "./index-cd93b584.js";
2
+ import "react";
3
+ import "react-dom";
4
+ const i = ".sc-reply-icon-h{display:flex}", h = i, o = class {
5
+ constructor(t) {
6
+ s(this, t), this.width = "15", this.height = "15";
7
+ }
8
+ render() {
9
+ return e("svg", { key: "18be7bd8957b2b4e5531ac731dc5368d8189bed5", fill: "auto", width: this.width, height: this.height, viewBox: "0 0 1920 1920", xmlns: "http://www.w3.org/2000/svg" }, e("path", { key: "a420fae211dab532a422e6c9521f4a104275d4ed", d: "M835.942 632.563H244.966l478.08-478.08-90.496-90.496L-.026 696.563 632.55 1329.14l90.496-90.496-478.08-478.08h590.976c504.448 0 914.816 410.368 914.816 914.816v109.184h128V1675.38c0-574.976-467.84-1042.816-1042.816-1042.816", "fill-rule": "evenodd" }));
10
+ }
11
+ };
12
+ o.style = h;
13
+ export {
14
+ o as reply_icon
15
+ };
@@ -1 +1 @@
1
- "use strict";const o=require("./index-5611d3d5.cjs");function s(n={}){const r={selectedConfiguration:{},configurations:[],listConfigurationsNextCursor:null,calendars:[],currentUser:null,action:null,additionalParticipants:[],requiresSlug:!1,...n},e=o.createStore(r);function t(){e.set("selectedConfiguration",{...n.selectedConfiguration})}return e.onChange("action",async i=>{i||t()}),{...e,resetSelectedConfiguration:t}}exports.CreateNylasSchedulerConfigStore=s;
1
+ "use strict";const o=require("./index-94416062.cjs");function s(n={}){const r={selectedConfiguration:{},configurations:[],listConfigurationsNextCursor:null,calendars:[],currentUser:null,action:null,additionalParticipants:[],requiresSlug:!1,...n},e=o.createStore(r);function t(){e.set("selectedConfiguration",{...n.selectedConfiguration})}return e.onChange("action",async i=>{i||t()}),{...e,resetSelectedConfiguration:t}}exports.CreateNylasSchedulerConfigStore=s;
@@ -1,4 +1,4 @@
1
- import { a as i } from "./index-589f8eee.js";
1
+ import { a as i } from "./index-cd93b584.js";
2
2
  function s(n = {}) {
3
3
  const o = {
4
4
  selectedConfiguration: {},
@@ -1 +1 @@
1
- "use strict";const a=require("./index-5611d3d5.cjs");exports.ErrorCategory=void 0;(function(o){o.Component="component",o.Api="api",o.Auth="auth"})(exports.ErrorCategory||(exports.ErrorCategory={}));var D;(function(o){o.endtime_not_in_future="endtime_not_in_future",o.no_booking_info="no_booking_info",o.no_timeslot_selected="no_timeslot_selected",o.no_timezone_selected="no_timezone_selected",o.no_booking_id="no_booking_id",o.no_salt="no_salt",o.invalid_start_time="invalid_start_time",o.invalid_end_time="invalid_end_time",o.invalid_timezone="invalid_timezone"})(D||(D={}));var A;(function(o){o.invalid_session="invalid_session",o.general_error="general_error",o.internal_error="internal_error",o.invalid_request_error="invalid_request_error",o.timeslot_not_available="timeslot_not_available",o.provider_error="provider_error",o.not_found_error="not_found_error"})(A||(A={}));class P{constructor(){this.component=e=>{const t=exports.ErrorCategory.Component,s=`${e} Error`;return{endtime_not_in_future:(i='"endtime" can not be in the future')=>({title:s,message:i,category:t}),no_booking_info:(i="No booking info provided")=>({title:s,message:i,category:t}),no_timeslot_selected:(i="No timeslot selected")=>({title:s,message:i,category:t}),no_timezone_selected:(i="No timezone selected")=>({title:s,message:i,category:t}),no_booking_id:(i="No booking id provided")=>({title:s,message:i,category:t}),no_salt:(i="No salt provided")=>({title:s,message:i,category:t}),invalid_start_time:(i="Invalid start time")=>({title:s,message:i,category:t}),invalid_end_time:(i="Invalid end time")=>({title:s,message:i,category:t}),invalid_timezone:(i="Invalid timezone")=>({title:s,message:i,category:t})}},this.api=e=>{const t=exports.ErrorCategory.Api,s=`${e} Error`;return{invalid_session:i=>({title:s,message:i,category:t}),general_error:i=>({title:s,message:i,category:t}),internal_error:i=>({title:s,message:i,category:t}),invalid_request_error:i=>({title:s,message:i,category:t}),timeslot_not_available:i=>({title:s,message:i,category:t}),provider_error:i=>({title:s,message:i,category:t}),not_found_error:i=>({title:s,message:i,category:t})}}}}class ${constructor({schedulerAPIURL:e,schedulerStore:t,sessionId:s,configId:i,slug:r,clientId:n}){this.errors=new P,this.schedulerStore=t,this.schedulerAPIURL=e,this.sessionId=s,this.configId=i,this.slug=r,this.clientId=n}getHeaders(){return this.sessionId?{Authorization:`Bearer ${this.sessionId}`}:{}}async makeAPIRequest(e,t,s,i={}){try{const r=new URL(this.schedulerAPIURL),n="1.3.3";return r.pathname=e,await(await fetch(decodeURIComponent(r.toString()),{method:t,headers:{"Content-Type":"application/json",Origin:window.location.origin,"X-Source":"nylas-scheduling","X-Nylas-Web-Elements-Version":n,...i},body:s})).json()}catch(r){return{error:{message:r.message,title:"API request failed",type:"api"}}}}getErrorMessage(e){var s,i,r,n;let t=(e==null?void 0:e.message)||(e==null?void 0:e.title)||"Something went wrong";return(e==null?void 0:e.type)==="provider_error"&&(t=((i=(s=e==null?void 0:e.provider_error)==null?void 0:s.error)==null?void 0:i.message)||((n=(r=e==null?void 0:e.provider_error)==null?void 0:r.error)==null?void 0:n.title)||"Something went wrong"),t}setConfigId(e){this.configId=e}selectDate(e){this.schedulerStore.set("selectedDate",e),this.schedulerStore.set("selectedTimeslot",null)}selectTime(e){this.schedulerStore.set("selectedTimeslot",e)}selectTimezone(e){this.schedulerStore.set("selectedTimezone",e)}selectLanguage(e){this.schedulerStore.set("selectedLanguage",e),a.instance.changeLanguage(e)}async toggleAdditionalData(e){e||await this.refetchAvailability(),this.schedulerStore.set("showBookingForm",e)}setParticipantName(e){const{bookingInfo:t}=this.schedulerStore.state;this.schedulerStore.set("bookingInfo",{...t,primaryParticipant:{...t==null?void 0:t.primaryParticipant,name:e}})}setParticipantEmail(e){const{bookingInfo:t}=this.schedulerStore.state;this.schedulerStore.set("bookingInfo",{...t,primaryParticipant:{...t==null?void 0:t.primaryParticipant,email:e}})}async refetchAvailability(){const e=new Date,t=new Date(e.getFullYear(),e.getMonth(),1).getTime()/1e3,s=t<e.getTime()/1e3?Math.floor(e.getTime()/1e3):t,i=new Date(e.getFullYear(),e.getMonth()+1,1).getTime()/1e3;return await this.getAvailability(s,i)}async resetStoreStateAndFetchAvailability(){const e=new Date,t=await this.refetchAvailability(),s=this.schedulerStore.get("availability").find(r=>new Date(r.start_time)>new Date);let i=e;return s&&(i=s.start_time),this.schedulerStore.set("selectedDate",i),this.schedulerStore.set("eventInfo",null),this.schedulerStore.set("showBookingForm",!1),this.schedulerStore.set("selectedTimeslot",null),t}async setReschedule(e){this.schedulerStore.set("isLoading",!0);const t=this.schedulerStore.state.eventInfo;return t&&this.schedulerStore.set("reschedulingEventInfo",t),this.schedulerStore.set("rescheduleBookingId",e),await this.getUISettings(),await this.resetStoreStateAndFetchAvailability().finally(()=>{this.schedulerStore.set("isLoading",!1)})}async setCancel(e){this.schedulerStore.set("cancelBookingId",e)}async setReject(e){this.schedulerStore.set("rejectBookingId",e)}async resetCancel(){const e=await this.resetStoreStateAndFetchAvailability();return this.schedulerStore.set("cancelBookingId",""),this.schedulerStore.set("rejectBookingId",""),this.schedulerStore.set("cancelledEventInfo",null),e}async goBack(){this.schedulerStore.set("cancelBookingId","")}async resetConfirm(){const e=await this.resetStoreStateAndFetchAvailability();return this.schedulerStore.set("organizerConfirmationBookingId",""),this.schedulerStore.set("confirmedEventInfo",void 0),e}async bookTimeslot(e){var I;this.schedulerStore.set("isLoading",!0);const{selectedTimeslot:t,selectedTimezone:s,bookingInfo:i,selectedLanguage:r}=this.schedulerStore.state;if(!e&&!i)return{error:this.errors.component(a.instance.t("createBookingErrorTitle")).no_booking_info()};const n=(e==null?void 0:e.timeslot)||t;if(!n)return{error:this.errors.component(a.instance.t("createBookingErrorTitle")).no_timeslot_selected()};const l=e&&(e!=null&&e.timezone)?e==null?void 0:e.timezone:s,c=r||"en-US";if(!l)return{error:this.errors.component(a.instance.t("createBookingErrorTitle")).no_timezone_selected()};const u=this.schedulerStore.get("availabilityOrderEmails");let d="";if(u.length>0){const b=(n==null?void 0:n.emails)||[];for(let f=0;f<u.length;f++)if(b.includes(u[f])){d=u[f];break}}const h={};Object.entries((i==null?void 0:i.additionalFields)||{}).forEach(([b,f])=>{h[b]=f.value});const _=e?e==null?void 0:e.primaryParticipant:i==null?void 0:i.primaryParticipant,S=e?(e==null?void 0:e.guests)||[]:(i==null?void 0:i.guests)||[],p=e?e==null?void 0:e.additionalFields: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({participants:d?[{email:d}]:void 0,additional_fields:p,additional_guests:S,guest:{..._},start_time:n.start_time.getTime()/1e3,end_time:n.end_time.getTime()/1e3,timezone:l,email_language:this.getTwoLetterLanguageCode(c)}),T);if("error"in g){this.schedulerStore.set("isLoading",!1);const b=(I=g.error)==null?void 0:I.type;let f=g.error;if(b&&b in this.errors.api("Create Booking")){const E=this.getErrorMessage(f);f=this.errors.api("Create Booking")[b](E)}return{error:f}}return"data"in g&&this.schedulerStore.set("eventInfo",g==null?void 0:g.data),this.schedulerStore.set("isLoading",!1),g}async getUISettings(){var n;this.schedulerStore.set("isLoading",!0);const e=this.schedulerStore.get("rescheduleBookingId"),t=this.getHeaders();let s=!this.sessionId&&this.configId?`?configuration_id=${this.configId}`:!this.sessionId&&this.slug&&this.clientId?`?slug=${this.slug}&client_id=${this.clientId}`:"";e&&s?s+=`&booking_id=${e}`:e&&(s+=`?booking_id=${e}`);const i=`/v3/scheduling/ui-settings${s}`,r=await this.makeAPIRequest(i,"GET",void 0,t);if("error"in r){this.schedulerStore.set("isLoading",!1);const l=(n=r.error)==null?void 0:n.type;let c=r.error;return l&&l in this.errors.api(a.instance.t("getUISettingErrorTitle"))&&(c=this.errors.api(a.instance.t("getUISettingErrorTitle"))[l]((c==null?void 0:c.message)||(c==null?void 0:c.title)||"Something went wrong")),{error:c}}return"data"in r&&this.schedulerStore.set("configSettings",r.data),this.schedulerStore.set("isLoading",!1),r}getTwoLetterLanguageCode(e){return e.split("-")[0]}getStartTimeWithMinBookingNotice(e){var r;const t=(r=this.schedulerStore.get("configSettings"))==null?void 0:r.scheduler,s=t==null?void 0:t.min_booking_notice;if(!s)return e;const i=new Date().getTime();return e<(i+s*60*1e3)/1e3?Math.floor((i+s*60*1e3)/1e3):e}getEndTimeForAvailableDaysInFuture(e){var n,l;const t=new Date,s=(l=(n=this.schedulerStore.get("configSettings"))==null?void 0:n.scheduler)==null?void 0:l.available_days_in_future,i=Math.floor(a.addDaysToCurrentDate(t,s).getTime()/1e3);return Math.min(i,e)}async getAvailability(e=0,t=0){var _,S,p,T;this.schedulerStore.set("isLoading",!0);const s=new URLSearchParams,i=new Date,r=i.getTime();if(t&&t<r/1e3)return this.schedulerStore.set("isLoading",!1),{error:this.errors.component(a.instance.t("getAvailabilityErrorTitle")).endtime_not_in_future()};if(!e){const m=new Date(i.getFullYear(),i.getMonth(),1);e=Math.floor(m.getTime()/1e3)}if(!t){const m=new Date(i.getFullYear(),i.getMonth()+1,0);t=Math.floor(m.getTime()/1e3)}t=this.getEndTimeForAvailableDaysInFuture(t);const n=this.getStartTimeWithMinBookingNotice(e);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)));const l=this.schedulerStore.get("rescheduleBookingId");l&&s.append("booking_id",encodeURIComponent(l));const c=s.toString(),u=`/v3/scheduling/availability${c?`?${c}`:""}`,d=this.getHeaders(),h=await this.makeAPIRequest(decodeURIComponent(u),"GET",void 0,d);if("error"in h){this.schedulerStore.set("availability",[]),this.schedulerStore.set("isLoading",!1);const m=(_=h.error)==null?void 0:_.type;let v=h.error;if(m&&m in this.errors.api(a.instance.t("getAvailabilityErrorTitle"))){const g=this.getErrorMessage(v);v=this.errors.api(a.instance.t("getAvailabilityErrorTitle"))[m](g)}return{error:v}}if("data"in h){const v=(((p=(S=h.data)==null?void 0:S.time_slots)==null?void 0:p.map(I=>({...I,start_time:new Date(I.start_time*1e3),end_time:new Date(I.end_time*1e3)})))||[]).filter(I=>I.start_time.getTime()>r);this.schedulerStore.set("availability",v);const g=((T=h.data)==null?void 0:T.order)||[];this.schedulerStore.set("availabilityOrderEmails",g)}return this.schedulerStore.set("isLoading",!1),h}async cancelBooking(e,t){var l;if(this.schedulerStore.set("isLoading",!0),!e)return{error:this.errors.component(a.instance.t("cancelBookingErrorTitle")).no_booking_id()};const s=!this.sessionId&&this.configId?`?configuration_id=${this.configId}`:!this.sessionId&&this.slug&&this.clientId?`?slug=${this.slug}&client_id=${this.clientId}`:"",i=`/v3/scheduling/bookings/${e}${s}`,r=this.getHeaders(),n=await this.makeAPIRequest(decodeURIComponent(i),"DELETE",JSON.stringify({action:"cancel",cancellation_reason:t}),r);if("error"in n){this.schedulerStore.set("isLoading",!1);const c=(l=n.error)==null?void 0:l.type;let u=n.error;if(c&&c in this.errors.api(a.instance.t("cancelBookingErrorTitle"))){const d=this.getErrorMessage(u);u=this.errors.api(a.instance.t("cancelBookingErrorTitle"))[c](d)}return{error:u}}return this.schedulerStore.set("cancelledEventInfo",{booking_id:e}),this.schedulerStore.set("rescheduleBookingId",""),this.schedulerStore.set("isLoading",!1),n}async rescheduleBooking(e,t){var B;if(this.schedulerStore.set("isLoading",!0),!e)return{error:this.errors.component(a.instance.t("rescheduleBookingErrorTitle")).no_booking_id()};const s=this.errors.api(a.instance.t("rescheduleBookingErrorTitle")),i=this.errors.component(a.instance.t("rescheduleBookingErrorTitle")),{bookingInfo:r,selectedTimeslot:n,selectedTimezone:l,selectedLanguage:c}=this.schedulerStore.state,{startTime:u,endTime:d,timezone:h}=t,_=u||(n==null?void 0:n.start_time);if(!_)return{error:i.invalid_start_time('Please pass "startTime" in data or set "selectedTimeslot" in the defaultSchedulerState.')};const S=d||(n==null?void 0:n.end_time);if(!S)return{error:i.invalid_end_time('Please pass "endTime" in data or set "selectedTimeslot" in the defaultSchedulerState.')};const p=this.schedulerStore.get("availabilityOrderEmails");let T="";if(p.length>0){const k=(n==null?void 0:n.emails)||[];for(let y=0;y<p.length;y++)if(k.includes(p[y])){T=p[y];break}}const m=h||l;if(!m)return{error:i.invalid_timezone('Please pass "timezone" in data or set "selectedTimezone" in the defaultSchedulerState.')};const v={};Object.entries((r==null?void 0:r.additionalFields)||{}).forEach(([k,y])=>{v[k]=y.value});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)||[],b=t?t==null?void 0:t.additionalFields:v,f=!this.sessionId&&this.configId?`?configuration_id=${this.configId}`:!this.sessionId&&this.slug&&this.clientId?`?slug=${this.slug}&client_id=${this.clientId}`:"",E=`/v3/scheduling/bookings/${e}${f}`,C=this.getHeaders(),w=await this.makeAPIRequest(decodeURIComponent(E),"PATCH",JSON.stringify({start_time:_.getTime()/1e3,end_time:S.getTime()/1e3,timezone:m,additional_fields:b,guest:{...g},additional_guests:I,participants:T?[{email:T}]:void 0,email_language:this.getTwoLetterLanguageCode(c)}),C);if("error"in w){this.schedulerStore.set("isLoading",!1);const k=(B=w.error)==null?void 0:B.type;let y=w.error;if(k&&k in s){const M=this.getErrorMessage(y);y=s[k](M)}return{error:y}}const L=this.schedulerStore.get("reschedulingEventInfo");if("data"in w)this.schedulerStore.set("eventInfo",w==null?void 0:w.data);else if(L)this.schedulerStore.set("eventInfo",L);else{const k={booking_id:e};this.schedulerStore.set("eventInfo",k)}return this.schedulerStore.set("isLoading",!1),w}async updateBooking(e){var h;this.schedulerStore.set("isLoading",!0);const{bookingId:t,status:s,reason:i}=e,r=this.schedulerStore.get("organizerConfirmationSalt"),n=s==="confirmed"?a.instance.t("confirmBookingErrorTitle"):a.instance.t("rejectBookingErrorTitle");if(!t)return{error:this.errors.component(n).no_booking_id()};if(!r)return{error:this.errors.component(n).no_salt()};const l=!this.sessionId&&this.configId?`?configuration_id=${this.configId}`:!this.sessionId&&this.slug&&this.clientId?`?slug=${this.slug}&client_id=${this.clientId}`:"",c=`/v3/scheduling/bookings/${t}${l}`,u=this.getHeaders(),d=await this.makeAPIRequest(decodeURIComponent(c),"PUT",JSON.stringify({status:s,cancellation_reason:i,salt:r}),u);if("error"in d){this.schedulerStore.set("isLoading",!1);const _=(h=d.error)==null?void 0:h.type;let S=d.error;if(_&&_ in this.errors.api(n)){const p=this.getErrorMessage(S);S=this.errors.api(n)[_](p)}return{error:S}}return"data"in d&&s==="confirmed"?this.schedulerStore.set("confirmedEventInfo",d==null?void 0:d.data):"request_id"in d&&s==="cancelled"&&this.schedulerStore.set("cancelledEventInfo",{booking_id:t}),this.schedulerStore.set("organizerConfirmationBookingId",""),this.schedulerStore.set("isLoading",!1),d}}function z(o={}){const e={selectedDate:null,selectedLanguage:navigator.language,selectedTimezone:Intl.DateTimeFormat().resolvedOptions().timeZone,selectedTimeslot:null,showBookingForm:!1,availabilityOrderEmails:[],selectableDates:null,availability:[],eventDuration:0,state:"ready",eventInfo:null,cancelledEventInfo:null,isLoading:!1,nylasBranding:!0,...o};a.debug("[defaultNylasStoreState]: ",e);const t=a.createStore(e);return t.onChange("availability",s=>{a.debug("[availability]: ",s);const i=s.map(l=>l.start_time);a.debug("[selectableDates]: ",i),t.set("selectableDates",i);const r=s[0];if(!r)return;const n=Math.floor((r.end_time.getTime()-r.start_time.getTime())/6e4);a.debug("[durationMinutes]: ",n),t.set("eventDuration",n)}),t.reset=()=>{for(const s in e){const i=e[s];t.set(s,i)}},t}exports.CreateNylasSchedulerStore=z;exports.NylaSchedulerAPIConnector=$;
1
+ "use strict";const a=require("./index-94416062.cjs");exports.ErrorCategory=void 0;(function(o){o.Component="component",o.Api="api",o.Auth="auth"})(exports.ErrorCategory||(exports.ErrorCategory={}));var D;(function(o){o.endtime_not_in_future="endtime_not_in_future",o.no_booking_info="no_booking_info",o.no_timeslot_selected="no_timeslot_selected",o.no_timezone_selected="no_timezone_selected",o.no_booking_id="no_booking_id",o.no_salt="no_salt",o.invalid_start_time="invalid_start_time",o.invalid_end_time="invalid_end_time",o.invalid_timezone="invalid_timezone"})(D||(D={}));var A;(function(o){o.invalid_session="invalid_session",o.general_error="general_error",o.internal_error="internal_error",o.invalid_request_error="invalid_request_error",o.timeslot_not_available="timeslot_not_available",o.provider_error="provider_error",o.not_found_error="not_found_error"})(A||(A={}));class P{constructor(){this.component=e=>{const t=exports.ErrorCategory.Component,s=`${e} Error`;return{endtime_not_in_future:(i='"endtime" can not be in the future')=>({title:s,message:i,category:t}),no_booking_info:(i="No booking info provided")=>({title:s,message:i,category:t}),no_timeslot_selected:(i="No timeslot selected")=>({title:s,message:i,category:t}),no_timezone_selected:(i="No timezone selected")=>({title:s,message:i,category:t}),no_booking_id:(i="No booking id provided")=>({title:s,message:i,category:t}),no_salt:(i="No salt provided")=>({title:s,message:i,category:t}),invalid_start_time:(i="Invalid start time")=>({title:s,message:i,category:t}),invalid_end_time:(i="Invalid end time")=>({title:s,message:i,category:t}),invalid_timezone:(i="Invalid timezone")=>({title:s,message:i,category:t})}},this.api=e=>{const t=exports.ErrorCategory.Api,s=`${e} Error`;return{invalid_session:i=>({title:s,message:i,category:t}),general_error:i=>({title:s,message:i,category:t}),internal_error:i=>({title:s,message:i,category:t}),invalid_request_error:i=>({title:s,message:i,category:t}),timeslot_not_available:i=>({title:s,message:i,category:t}),provider_error:i=>({title:s,message:i,category:t}),not_found_error:i=>({title:s,message:i,category:t})}}}}class ${constructor({schedulerAPIURL:e,schedulerStore:t,sessionId:s,configId:i,slug:r,clientId:n}){this.errors=new P,this.schedulerStore=t,this.schedulerAPIURL=e,this.sessionId=s,this.configId=i,this.slug=r,this.clientId=n}getHeaders(){return this.sessionId?{Authorization:`Bearer ${this.sessionId}`}:{}}async makeAPIRequest(e,t,s,i={}){try{const r=new URL(this.schedulerAPIURL),n="1.3.4";return r.pathname=e,await(await fetch(decodeURIComponent(r.toString()),{method:t,headers:{"Content-Type":"application/json",Origin:window.location.origin,"X-Source":"nylas-scheduling","X-Nylas-Web-Elements-Version":n,...i},body:s})).json()}catch(r){return{error:{message:r.message,title:"API request failed",type:"api"}}}}getErrorMessage(e){var s,i,r,n;let t=(e==null?void 0:e.message)||(e==null?void 0:e.title)||"Something went wrong";return(e==null?void 0:e.type)==="provider_error"&&(t=((i=(s=e==null?void 0:e.provider_error)==null?void 0:s.error)==null?void 0:i.message)||((n=(r=e==null?void 0:e.provider_error)==null?void 0:r.error)==null?void 0:n.title)||"Something went wrong"),t}setConfigId(e){this.configId=e}selectDate(e){this.schedulerStore.set("selectedDate",e),this.schedulerStore.set("selectedTimeslot",null)}selectTime(e){this.schedulerStore.set("selectedTimeslot",e)}selectTimezone(e){this.schedulerStore.set("selectedTimezone",e)}selectLanguage(e){this.schedulerStore.set("selectedLanguage",e),a.instance.changeLanguage(e)}async toggleAdditionalData(e){e||await this.refetchAvailability(),this.schedulerStore.set("showBookingForm",e)}setParticipantName(e){const{bookingInfo:t}=this.schedulerStore.state;this.schedulerStore.set("bookingInfo",{...t,primaryParticipant:{...t==null?void 0:t.primaryParticipant,name:e}})}setParticipantEmail(e){const{bookingInfo:t}=this.schedulerStore.state;this.schedulerStore.set("bookingInfo",{...t,primaryParticipant:{...t==null?void 0:t.primaryParticipant,email:e}})}async refetchAvailability(){const e=new Date,t=new Date(e.getFullYear(),e.getMonth(),1).getTime()/1e3,s=t<e.getTime()/1e3?Math.floor(e.getTime()/1e3):t,i=new Date(e.getFullYear(),e.getMonth()+1,1).getTime()/1e3;return await this.getAvailability(s,i)}async resetStoreStateAndFetchAvailability(){const e=new Date,t=await this.refetchAvailability(),s=this.schedulerStore.get("availability").find(r=>new Date(r.start_time)>new Date);let i=e;return s&&(i=s.start_time),this.schedulerStore.set("selectedDate",i),this.schedulerStore.set("eventInfo",null),this.schedulerStore.set("showBookingForm",!1),this.schedulerStore.set("selectedTimeslot",null),t}async setReschedule(e){this.schedulerStore.set("isLoading",!0);const t=this.schedulerStore.state.eventInfo;return t&&this.schedulerStore.set("reschedulingEventInfo",t),this.schedulerStore.set("rescheduleBookingId",e),await this.getUISettings(),await this.resetStoreStateAndFetchAvailability().finally(()=>{this.schedulerStore.set("isLoading",!1)})}async setCancel(e){this.schedulerStore.set("cancelBookingId",e)}async setReject(e){this.schedulerStore.set("rejectBookingId",e)}async resetCancel(){const e=await this.resetStoreStateAndFetchAvailability();return this.schedulerStore.set("cancelBookingId",""),this.schedulerStore.set("rejectBookingId",""),this.schedulerStore.set("cancelledEventInfo",null),e}async goBack(){this.schedulerStore.set("cancelBookingId","")}async resetConfirm(){const e=await this.resetStoreStateAndFetchAvailability();return this.schedulerStore.set("organizerConfirmationBookingId",""),this.schedulerStore.set("confirmedEventInfo",void 0),e}async bookTimeslot(e){var I;this.schedulerStore.set("isLoading",!0);const{selectedTimeslot:t,selectedTimezone:s,bookingInfo:i,selectedLanguage:r}=this.schedulerStore.state;if(!e&&!i)return{error:this.errors.component(a.instance.t("createBookingErrorTitle")).no_booking_info()};const n=(e==null?void 0:e.timeslot)||t;if(!n)return{error:this.errors.component(a.instance.t("createBookingErrorTitle")).no_timeslot_selected()};const l=e&&(e!=null&&e.timezone)?e==null?void 0:e.timezone:s,c=r||"en-US";if(!l)return{error:this.errors.component(a.instance.t("createBookingErrorTitle")).no_timezone_selected()};const u=this.schedulerStore.get("availabilityOrderEmails");let d="";if(u.length>0){const b=(n==null?void 0:n.emails)||[];for(let f=0;f<u.length;f++)if(b.includes(u[f])){d=u[f];break}}const h={};Object.entries((i==null?void 0:i.additionalFields)||{}).forEach(([b,f])=>{h[b]=f.value});const _=e?e==null?void 0:e.primaryParticipant:i==null?void 0:i.primaryParticipant,S=e?(e==null?void 0:e.guests)||[]:(i==null?void 0:i.guests)||[],p=e?e==null?void 0:e.additionalFields: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({participants:d?[{email:d}]:void 0,additional_fields:p,additional_guests:S,guest:{..._},start_time:n.start_time.getTime()/1e3,end_time:n.end_time.getTime()/1e3,timezone:l,email_language:this.getTwoLetterLanguageCode(c)}),T);if("error"in g){this.schedulerStore.set("isLoading",!1);const b=(I=g.error)==null?void 0:I.type;let f=g.error;if(b&&b in this.errors.api("Create Booking")){const E=this.getErrorMessage(f);f=this.errors.api("Create Booking")[b](E)}return{error:f}}return"data"in g&&this.schedulerStore.set("eventInfo",g==null?void 0:g.data),this.schedulerStore.set("isLoading",!1),g}async getUISettings(){var n;this.schedulerStore.set("isLoading",!0);const e=this.schedulerStore.get("rescheduleBookingId"),t=this.getHeaders();let s=!this.sessionId&&this.configId?`?configuration_id=${this.configId}`:!this.sessionId&&this.slug&&this.clientId?`?slug=${this.slug}&client_id=${this.clientId}`:"";e&&s?s+=`&booking_id=${e}`:e&&(s+=`?booking_id=${e}`);const i=`/v3/scheduling/ui-settings${s}`,r=await this.makeAPIRequest(i,"GET",void 0,t);if("error"in r){this.schedulerStore.set("isLoading",!1);const l=(n=r.error)==null?void 0:n.type;let c=r.error;return l&&l in this.errors.api(a.instance.t("getUISettingErrorTitle"))&&(c=this.errors.api(a.instance.t("getUISettingErrorTitle"))[l]((c==null?void 0:c.message)||(c==null?void 0:c.title)||"Something went wrong")),{error:c}}return"data"in r&&this.schedulerStore.set("configSettings",r.data),this.schedulerStore.set("isLoading",!1),r}getTwoLetterLanguageCode(e){return e.split("-")[0]}getStartTimeWithMinBookingNotice(e){var r;const t=(r=this.schedulerStore.get("configSettings"))==null?void 0:r.scheduler,s=t==null?void 0:t.min_booking_notice;if(!s)return e;const i=new Date().getTime();return e<(i+s*60*1e3)/1e3?Math.floor((i+s*60*1e3)/1e3):e}getEndTimeForAvailableDaysInFuture(e){var n,l;const t=new Date,s=(l=(n=this.schedulerStore.get("configSettings"))==null?void 0:n.scheduler)==null?void 0:l.available_days_in_future,i=Math.floor(a.addDaysToCurrentDate(t,s).getTime()/1e3);return Math.min(i,e)}async getAvailability(e=0,t=0){var _,S,p,T;this.schedulerStore.set("isLoading",!0);const s=new URLSearchParams,i=new Date,r=i.getTime();if(t&&t<r/1e3)return this.schedulerStore.set("isLoading",!1),{error:this.errors.component(a.instance.t("getAvailabilityErrorTitle")).endtime_not_in_future()};if(!e){const m=new Date(i.getFullYear(),i.getMonth(),1);e=Math.floor(m.getTime()/1e3)}if(!t){const m=new Date(i.getFullYear(),i.getMonth()+1,0);t=Math.floor(m.getTime()/1e3)}t=this.getEndTimeForAvailableDaysInFuture(t);const n=this.getStartTimeWithMinBookingNotice(e);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)));const l=this.schedulerStore.get("rescheduleBookingId");l&&s.append("booking_id",encodeURIComponent(l));const c=s.toString(),u=`/v3/scheduling/availability${c?`?${c}`:""}`,d=this.getHeaders(),h=await this.makeAPIRequest(decodeURIComponent(u),"GET",void 0,d);if("error"in h){this.schedulerStore.set("availability",[]),this.schedulerStore.set("isLoading",!1);const m=(_=h.error)==null?void 0:_.type;let v=h.error;if(m&&m in this.errors.api(a.instance.t("getAvailabilityErrorTitle"))){const g=this.getErrorMessage(v);v=this.errors.api(a.instance.t("getAvailabilityErrorTitle"))[m](g)}return{error:v}}if("data"in h){const v=(((p=(S=h.data)==null?void 0:S.time_slots)==null?void 0:p.map(I=>({...I,start_time:new Date(I.start_time*1e3),end_time:new Date(I.end_time*1e3)})))||[]).filter(I=>I.start_time.getTime()>r);this.schedulerStore.set("availability",v);const g=((T=h.data)==null?void 0:T.order)||[];this.schedulerStore.set("availabilityOrderEmails",g)}return this.schedulerStore.set("isLoading",!1),h}async cancelBooking(e,t){var l;if(this.schedulerStore.set("isLoading",!0),!e)return{error:this.errors.component(a.instance.t("cancelBookingErrorTitle")).no_booking_id()};const s=!this.sessionId&&this.configId?`?configuration_id=${this.configId}`:!this.sessionId&&this.slug&&this.clientId?`?slug=${this.slug}&client_id=${this.clientId}`:"",i=`/v3/scheduling/bookings/${e}${s}`,r=this.getHeaders(),n=await this.makeAPIRequest(decodeURIComponent(i),"DELETE",JSON.stringify({action:"cancel",cancellation_reason:t}),r);if("error"in n){this.schedulerStore.set("isLoading",!1);const c=(l=n.error)==null?void 0:l.type;let u=n.error;if(c&&c in this.errors.api(a.instance.t("cancelBookingErrorTitle"))){const d=this.getErrorMessage(u);u=this.errors.api(a.instance.t("cancelBookingErrorTitle"))[c](d)}return{error:u}}return this.schedulerStore.set("cancelledEventInfo",{booking_id:e}),this.schedulerStore.set("rescheduleBookingId",""),this.schedulerStore.set("isLoading",!1),n}async rescheduleBooking(e,t){var B;if(this.schedulerStore.set("isLoading",!0),!e)return{error:this.errors.component(a.instance.t("rescheduleBookingErrorTitle")).no_booking_id()};const s=this.errors.api(a.instance.t("rescheduleBookingErrorTitle")),i=this.errors.component(a.instance.t("rescheduleBookingErrorTitle")),{bookingInfo:r,selectedTimeslot:n,selectedTimezone:l,selectedLanguage:c}=this.schedulerStore.state,{startTime:u,endTime:d,timezone:h}=t,_=u||(n==null?void 0:n.start_time);if(!_)return{error:i.invalid_start_time('Please pass "startTime" in data or set "selectedTimeslot" in the defaultSchedulerState.')};const S=d||(n==null?void 0:n.end_time);if(!S)return{error:i.invalid_end_time('Please pass "endTime" in data or set "selectedTimeslot" in the defaultSchedulerState.')};const p=this.schedulerStore.get("availabilityOrderEmails");let T="";if(p.length>0){const k=(n==null?void 0:n.emails)||[];for(let y=0;y<p.length;y++)if(k.includes(p[y])){T=p[y];break}}const m=h||l;if(!m)return{error:i.invalid_timezone('Please pass "timezone" in data or set "selectedTimezone" in the defaultSchedulerState.')};const v={};Object.entries((r==null?void 0:r.additionalFields)||{}).forEach(([k,y])=>{v[k]=y.value});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)||[],b=t?t==null?void 0:t.additionalFields:v,f=!this.sessionId&&this.configId?`?configuration_id=${this.configId}`:!this.sessionId&&this.slug&&this.clientId?`?slug=${this.slug}&client_id=${this.clientId}`:"",E=`/v3/scheduling/bookings/${e}${f}`,C=this.getHeaders(),w=await this.makeAPIRequest(decodeURIComponent(E),"PATCH",JSON.stringify({start_time:_.getTime()/1e3,end_time:S.getTime()/1e3,timezone:m,additional_fields:b,guest:{...g},additional_guests:I,participants:T?[{email:T}]:void 0,email_language:this.getTwoLetterLanguageCode(c)}),C);if("error"in w){this.schedulerStore.set("isLoading",!1);const k=(B=w.error)==null?void 0:B.type;let y=w.error;if(k&&k in s){const M=this.getErrorMessage(y);y=s[k](M)}return{error:y}}const L=this.schedulerStore.get("reschedulingEventInfo");if("data"in w)this.schedulerStore.set("eventInfo",w==null?void 0:w.data);else if(L)this.schedulerStore.set("eventInfo",L);else{const k={booking_id:e};this.schedulerStore.set("eventInfo",k)}return this.schedulerStore.set("isLoading",!1),w}async updateBooking(e){var h;this.schedulerStore.set("isLoading",!0);const{bookingId:t,status:s,reason:i}=e,r=this.schedulerStore.get("organizerConfirmationSalt"),n=s==="confirmed"?a.instance.t("confirmBookingErrorTitle"):a.instance.t("rejectBookingErrorTitle");if(!t)return{error:this.errors.component(n).no_booking_id()};if(!r)return{error:this.errors.component(n).no_salt()};const l=!this.sessionId&&this.configId?`?configuration_id=${this.configId}`:!this.sessionId&&this.slug&&this.clientId?`?slug=${this.slug}&client_id=${this.clientId}`:"",c=`/v3/scheduling/bookings/${t}${l}`,u=this.getHeaders(),d=await this.makeAPIRequest(decodeURIComponent(c),"PUT",JSON.stringify({status:s,cancellation_reason:i,salt:r}),u);if("error"in d){this.schedulerStore.set("isLoading",!1);const _=(h=d.error)==null?void 0:h.type;let S=d.error;if(_&&_ in this.errors.api(n)){const p=this.getErrorMessage(S);S=this.errors.api(n)[_](p)}return{error:S}}return"data"in d&&s==="confirmed"?this.schedulerStore.set("confirmedEventInfo",d==null?void 0:d.data):"request_id"in d&&s==="cancelled"&&this.schedulerStore.set("cancelledEventInfo",{booking_id:t}),this.schedulerStore.set("organizerConfirmationBookingId",""),this.schedulerStore.set("isLoading",!1),d}}function z(o={}){const e={selectedDate:null,selectedLanguage:navigator.language,selectedTimezone:Intl.DateTimeFormat().resolvedOptions().timeZone,selectedTimeslot:null,showBookingForm:!1,availabilityOrderEmails:[],selectableDates:null,availability:[],eventDuration:0,state:"ready",eventInfo:null,cancelledEventInfo:null,isLoading:!1,nylasBranding:!0,...o};a.debug("[defaultNylasStoreState]: ",e);const t=a.createStore(e);return t.onChange("availability",s=>{a.debug("[availability]: ",s);const i=s.map(l=>l.start_time);a.debug("[selectableDates]: ",i),t.set("selectableDates",i);const r=s[0];if(!r)return;const n=Math.floor((r.end_time.getTime()-r.start_time.getTime())/6e4);a.debug("[durationMinutes]: ",n),t.set("eventDuration",n)}),t.reset=()=>{for(const s in e){const i=e[s];t.set(s,i)}},t}exports.CreateNylasSchedulerStore=z;exports.NylaSchedulerAPIConnector=$;
@@ -1,4 +1,4 @@
1
- import { d as L, a as F, i as d, j as R } from "./index-589f8eee.js";
1
+ import { d as L, a as F, i as d, j as R } from "./index-cd93b584.js";
2
2
  var B;
3
3
  (function(o) {
4
4
  o.Component = "component", o.Api = "api", o.Auth = "auth";
@@ -115,7 +115,7 @@ class N {
115
115
  }
116
116
  async makeAPIRequest(e, t, s, i = {}) {
117
117
  try {
118
- const r = new URL(this.schedulerAPIURL), n = "1.3.3";
118
+ const r = new URL(this.schedulerAPIURL), n = "1.3.4";
119
119
  return r.pathname = e, await (await fetch(decodeURIComponent(r.toString()), {
120
120
  method: t,
121
121
  headers: {
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-94416062.cjs");require("react");require("react-dom");const c=".sc-sent-icon-h{display:flex}",a=c,e=class{constructor(s){t.registerInstance(this,s),this.width="15",this.height="15"}render(){return t.h("svg",{key:"0ad41e7b85d22b3be57d03090dfb7e39bcc46c40",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},t.h("path",{key:"d941ffc63a46e3fa2ccdca64b66c6faf2f5f3a4c",d:"M21.5 12L3.5 3.5L3.5 20.5L21.5 12Z",stroke:"auto","stroke-width":"1.5"}),t.h("path",{key:"0098af5d7a9432a2782cd06ad25614f97d766869",d:"M3.5 3.5L12 10.5",stroke:"auto","stroke-width":"1.5"}),t.h("path",{key:"1aaba59cbef1f759f899cecd2a24349a10061dba",d:"M3.5 20.5L12 13.5",stroke:"auto","stroke-width":"1.5"}))}};e.style=a;exports.sent_icon=e;