@nylas/react 1.1.0-canary.19 → 1.1.0-canary.20

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 (112) hide show
  1. package/dist/{add-circle-icon_2.entry-3ca337a6.js → add-circle-icon_2.entry-5cefae99.js} +1 -1
  2. package/dist/{add-circle-icon_2.entry-adde5fdf.cjs → add-circle-icon_2.entry-85523420.cjs} +1 -1
  3. package/dist/{archive-icon_7.entry-896a1054.js → archive-icon_7.entry-2f418a3e.js} +1 -1
  4. package/dist/{archive-icon_7.entry-2b56ef80.cjs → archive-icon_7.entry-eb90a353.cjs} +1 -1
  5. package/dist/{arrow-icon.entry-9aaa93fd.js → arrow-icon.entry-753eb942.js} +1 -1
  6. package/dist/{arrow-icon.entry-0288f3fc.cjs → arrow-icon.entry-ac5e1a47.cjs} +1 -1
  7. package/dist/{bold-icon_3.entry-0061cf1f.js → bold-icon_3.entry-18507c82.js} +1 -1
  8. package/dist/{bold-icon_3.entry-e7810620.cjs → bold-icon_3.entry-4fff7400.cjs} +1 -1
  9. package/dist/{button-component_4.entry-276606e6.js → button-component_4.entry-3c508e3b.js} +3 -3
  10. package/dist/{button-component_4.entry-e53a8f37.cjs → button-component_4.entry-f8ab53dc.cjs} +1 -1
  11. package/dist/{calendar-agenda-fill-icon_35.entry-fa968081.cjs → calendar-agenda-fill-icon_35.entry-b56841a0.cjs} +2 -2
  12. package/dist/{calendar-agenda-fill-icon_35.entry-a19cae9c.js → calendar-agenda-fill-icon_35.entry-db989ce0.js} +11 -7
  13. package/dist/{calendar-cancel-icon.entry-71eae711.js → calendar-cancel-icon.entry-31caeae1.js} +1 -1
  14. package/dist/{calendar-cancel-icon.entry-8e8b25b6.cjs → calendar-cancel-icon.entry-d2e10dfc.cjs} +1 -1
  15. package/dist/{calendar-check-icon_2.entry-6f971ca2.js → calendar-check-icon_2.entry-7f67c003.js} +1 -1
  16. package/dist/{calendar-check-icon_2.entry-562e98cf.cjs → calendar-check-icon_2.entry-d32551e9.cjs} +1 -1
  17. package/dist/{calendar-icon.entry-3e496896.js → calendar-icon.entry-6e89816b.js} +1 -1
  18. package/dist/{calendar-icon.entry-3a59af30.cjs → calendar-icon.entry-f3f1c623.cjs} +1 -1
  19. package/dist/{chevron-icon_3.entry-7eac0ed5.js → chevron-icon_3.entry-2e20a83e.js} +1 -1
  20. package/dist/{chevron-icon_3.entry-7ff10540.cjs → chevron-icon_3.entry-3be68846.cjs} +1 -1
  21. package/dist/{clock-icon_2.entry-43873262.cjs → clock-icon_2.entry-074eb053.cjs} +1 -1
  22. package/dist/{clock-icon_2.entry-120d672e.js → clock-icon_2.entry-bc938936.js} +1 -1
  23. package/dist/{constants-7ce66b44-e7ca66c2.js → constants-7ce66b44-3952e81c.js} +1 -1
  24. package/dist/{constants-7ce66b44-a951d78c.cjs → constants-7ce66b44-a6b777d4.cjs} +1 -1
  25. package/dist/{copy-icon_4.entry-9a949d24.js → copy-icon_4.entry-187edab9.js} +1 -1
  26. package/dist/{copy-icon_4.entry-57874c4f.cjs → copy-icon_4.entry-f704b2f1.cjs} +1 -1
  27. package/dist/{document-refresh-icon.entry-f0d95ac8.js → document-refresh-icon.entry-9d7900d7.js} +1 -1
  28. package/dist/{document-refresh-icon.entry-f1d3f32d.cjs → document-refresh-icon.entry-ea0e1ab9.cjs} +1 -1
  29. package/dist/{elements-dc5b338e-974e2077.js → elements-dc5b338e-e6271e48.js} +1 -1
  30. package/dist/{elements-dc5b338e-62b53496.cjs → elements-dc5b338e-edf63aa6.cjs} +1 -1
  31. package/dist/{focus-visible-e8093c16-7a512fc0.js → focus-visible-e8093c16-4c45967c.js} +1 -1
  32. package/dist/{focus-visible-e8093c16-923e1041.cjs → focus-visible-e8093c16-84e41b3b.cjs} +1 -1
  33. package/dist/{forward-icon_6.entry-45b70066.cjs → forward-icon_6.entry-4cb6eb63.cjs} +1 -1
  34. package/dist/{forward-icon_6.entry-675c0b73.js → forward-icon_6.entry-949d0cfb.js} +2 -2
  35. package/dist/{globe-icon.entry-3296e427.js → globe-icon.entry-04b35395.js} +1 -1
  36. package/dist/{globe-icon.entry-7ecd6221.cjs → globe-icon.entry-741f8ad4.cjs} +1 -1
  37. package/dist/google-logo-icon_4.entry-8e87cf66.cjs +1 -0
  38. package/dist/{google-logo-icon_4.entry-aa9f8b35.js → google-logo-icon_4.entry-f50de25f.js} +185 -171
  39. package/dist/index-53420959-507f0a27.js +5 -0
  40. package/dist/index-53420959-e6c2e510.cjs +1 -0
  41. package/dist/{index-6d9eeb53-aa1dfa96.cjs → index-6d9eeb53-8b16e3b5.cjs} +1 -1
  42. package/dist/{index-6d9eeb53-4e2a7f9f.js → index-6d9eeb53-b15263de.js} +2 -2
  43. package/dist/{index-d36b8fb8.cjs → index-a4831dfe.cjs} +2 -2
  44. package/dist/{index-5efb84b8.js → index-a68236be.js} +218 -218
  45. package/dist/{index.es-9cc0eb3c-8eefd4fc.cjs → index.es-9cc0eb3c-2e0f7d11.cjs} +1 -1
  46. package/dist/{index.es-9cc0eb3c-65f8af0c.js → index.es-9cc0eb3c-e6c5dd2d.js} +1 -1
  47. package/dist/{info-icon_2.entry-e612f1d6.cjs → info-icon_2.entry-c3468951.cjs} +1 -1
  48. package/dist/{info-icon_2.entry-f06c8dd0.js → info-icon_2.entry-d0270899.js} +1 -1
  49. package/dist/{input-dropdown_2.entry-ad380260.cjs → input-dropdown_2.entry-2485dcc3.cjs} +1 -1
  50. package/dist/{input-dropdown_2.entry-ccd95678.js → input-dropdown_2.entry-2cd6cfc7.js} +1 -1
  51. package/dist/{loading-icon.entry-678a6b3f.cjs → loading-icon.entry-5ed52afe.cjs} +1 -1
  52. package/dist/{loading-icon.entry-9e6670d5.js → loading-icon.entry-96d9d1be.js} +1 -1
  53. package/dist/{mailbox-store-64b4ef7c-b56d5e78.js → mailbox-store-64b4ef7c-7c793d9a.js} +2 -2
  54. package/dist/{mailbox-store-64b4ef7c-9bd02ffd.cjs → mailbox-store-64b4ef7c-c609ac6d.cjs} +1 -1
  55. package/dist/{multi-select-dropdown.entry-edf10867.js → multi-select-dropdown.entry-2ca73c71.js} +1 -1
  56. package/dist/{multi-select-dropdown.entry-5bb80d89.cjs → multi-select-dropdown.entry-f298ca2c.cjs} +1 -1
  57. package/dist/{nylas-booked-event-card_10.entry-92f6e85d.js → nylas-booked-event-card_10.entry-2b01df7e.js} +5 -5
  58. package/dist/{nylas-booked-event-card_10.entry-ad4671b2.cjs → nylas-booked-event-card_10.entry-97977ac7.cjs} +1 -1
  59. package/dist/{nylas-custom-booking-flow.entry-cef0041a.cjs → nylas-custom-booking-flow.entry-05b9522a.cjs} +1 -1
  60. package/dist/{nylas-custom-booking-flow.entry-b39a2bf2.js → nylas-custom-booking-flow.entry-66beff43.js} +2 -2
  61. package/dist/{nylas-form-card.entry-bf4545e2.js → nylas-form-card.entry-3de9f477.js} +2 -2
  62. package/dist/{nylas-form-card.entry-fba5d623.cjs → nylas-form-card.entry-3e1331c9.cjs} +1 -1
  63. package/dist/{nylas-if-state.entry-2739dc10.js → nylas-if-state.entry-a0689083.js} +2 -2
  64. package/dist/{nylas-if-state.entry-d7b818a6.cjs → nylas-if-state.entry-a734df46.cjs} +1 -1
  65. package/dist/{nylas-list-folders.entry-3197e390.js → nylas-list-folders.entry-4fb9d4c2.js} +2 -2
  66. package/dist/{nylas-list-folders.entry-0ec6ba20.cjs → nylas-list-folders.entry-74a56187.cjs} +1 -1
  67. package/dist/{nylas-list-threads.entry-2a7e1e84.cjs → nylas-list-threads.entry-0addc621.cjs} +1 -1
  68. package/dist/{nylas-list-threads.entry-9004c490.js → nylas-list-threads.entry-9a6d4c33.js} +2 -2
  69. package/dist/{nylas-login.entry-c2ffd6a5.cjs → nylas-login.entry-bdac29c0.cjs} +1 -1
  70. package/dist/{nylas-login.entry-f2927406.js → nylas-login.entry-beb6e0d9.js} +2 -2
  71. package/dist/{nylas-mailbox-pagination.entry-e9356835.js → nylas-mailbox-pagination.entry-1d71850a.js} +2 -2
  72. package/dist/{nylas-mailbox-pagination.entry-839c9ad3.cjs → nylas-mailbox-pagination.entry-c5d07bbe.cjs} +1 -1
  73. package/dist/{nylas-mailbox-toolbar-button.entry-43812d51.cjs → nylas-mailbox-toolbar-button.entry-7d9d6293.cjs} +1 -1
  74. package/dist/{nylas-mailbox-toolbar-button.entry-298a3c47.js → nylas-mailbox-toolbar-button.entry-882c97a0.js} +2 -2
  75. package/dist/{nylas-mailbox.entry-cf13ddf5.cjs → nylas-mailbox.entry-94eb97ec.cjs} +1 -1
  76. package/dist/{nylas-mailbox.entry-aa42f6c4.js → nylas-mailbox.entry-d810adba.js} +3 -3
  77. package/dist/{nylas-provider.entry-843b5593.cjs → nylas-provider.entry-5a4bb86e.cjs} +1 -1
  78. package/dist/{nylas-provider.entry-1a3a195f.js → nylas-provider.entry-fcaf9e1c.js} +5 -5
  79. package/dist/{nylas-scheduler-editor.entry-d56d6d2a.js → nylas-scheduler-editor.entry-1ca566d3.js} +4 -4
  80. package/dist/{nylas-scheduler-editor.entry-048e7a8f.cjs → nylas-scheduler-editor.entry-30597812.cjs} +1 -1
  81. package/dist/{nylas-scheduling.entry-0ad9b1d0.cjs → nylas-scheduling.entry-00c418c8.cjs} +1 -1
  82. package/dist/{nylas-scheduling.entry-7039a890.js → nylas-scheduling.entry-aefefe3d.js} +3 -3
  83. package/dist/{nylas-threads-refresh.entry-d951050a.js → nylas-threads-refresh.entry-a85222e2.js} +2 -2
  84. package/dist/{nylas-threads-refresh.entry-9cae6ac8.cjs → nylas-threads-refresh.entry-f3b9fdf2.cjs} +1 -1
  85. package/dist/{nylas-threads-search.entry-0d34c5a8.cjs → nylas-threads-search.entry-2c8ac7dc.cjs} +1 -1
  86. package/dist/{nylas-threads-search.entry-7a4bbc75.js → nylas-threads-search.entry-b1bf455b.js} +2 -2
  87. package/dist/{nylas-time-window-picker.entry-062bc8c1.cjs → nylas-time-window-picker.entry-3a34b29b.cjs} +1 -1
  88. package/dist/{nylas-time-window-picker.entry-210c3f1a.js → nylas-time-window-picker.entry-6d664a05.js} +1 -1
  89. package/dist/{nylas-view-thread.entry-db78ed9c.cjs → nylas-view-thread.entry-bf6cab2a.cjs} +1 -1
  90. package/dist/{nylas-view-thread.entry-8b39a997.js → nylas-view-thread.entry-ddcb042f.js} +2 -2
  91. package/dist/{play-icon_2.entry-19271982.cjs → play-icon_2.entry-4f316c3d.cjs} +1 -1
  92. package/dist/{play-icon_2.entry-c53f3cac.js → play-icon_2.entry-d55a018a.js} +1 -1
  93. package/dist/react.cjs +1 -1
  94. package/dist/react.js +1 -1
  95. package/dist/{refresh-icon.entry-75139a0c.js → refresh-icon.entry-0fdcb7af.js} +1 -1
  96. package/dist/{refresh-icon.entry-e695cf7f.cjs → refresh-icon.entry-99761cb6.cjs} +1 -1
  97. package/dist/{register-component-a5a9ca5d-eebf89e7.cjs → register-component-a5a9ca5d-4439e573.cjs} +1 -1
  98. package/dist/{register-component-a5a9ca5d-d69a7a05.js → register-component-a5a9ca5d-ddae10b3.js} +1 -1
  99. package/dist/{scheduler-config-store-9ccfba4d-fd62a421.js → scheduler-config-store-9ccfba4d-84025740.js} +1 -1
  100. package/dist/{scheduler-config-store-9ccfba4d-22a58b7d.cjs → scheduler-config-store-9ccfba4d-b774bfee.cjs} +1 -1
  101. package/dist/{scheduler-store-8a400448-3b007d4d.js → scheduler-store-8a400448-8ab7b63e.js} +1 -1
  102. package/dist/{scheduler-store-8a400448-44e0edad.cjs → scheduler-store-8a400448-eaa566fa.cjs} +1 -1
  103. package/dist/{textarea-component.entry-ead5ab00.js → textarea-component.entry-193d29fd.js} +3 -3
  104. package/dist/{textarea-component.entry-48feabb3.cjs → textarea-component.entry-359e4665.cjs} +1 -1
  105. package/dist/{translate-icon.entry-55043beb.js → translate-icon.entry-22a3e72e.js} +1 -1
  106. package/dist/{translate-icon.entry-5f62bc61.cjs → translate-icon.entry-32ec36de.cjs} +1 -1
  107. package/dist/{warning-icon.entry-fa644462.js → warning-icon.entry-8d9b59c0.js} +1 -1
  108. package/dist/{warning-icon.entry-2e0a80da.cjs → warning-icon.entry-b8d483e1.cjs} +1 -1
  109. package/package.json +3 -3
  110. package/dist/google-logo-icon_4.entry-fd734a59.cjs +0 -1
  111. package/dist/index-53420959-1c0d390d.js +0 -5
  112. package/dist/index-53420959-8e7b10db.cjs +0 -1
@@ -1,30 +1,30 @@
1
- import { r as R, h as i, c as k, x as xt, d as h, y as A, H as gt, g as _t } from "./index-5efb84b8.js";
2
- import { R as vt } from "./register-component-a5a9ca5d-d69a7a05.js";
3
- import { D as mt } from "./constants-7ce66b44-e7ca66c2.js";
1
+ import { r as A, h as i, c as C, x as St, d as u, y as Z, H as vt, g as wt } from "./index-a68236be.js";
2
+ import { R as Ct } from "./register-component-a5a9ca5d-ddae10b3.js";
3
+ import { D as _t } from "./constants-7ce66b44-3952e81c.js";
4
4
  import "react";
5
5
  import "react-dom";
6
- const St = ".sc-google-logo-icon-h{display:flex}", Lt = St, Tt = class {
6
+ const Lt = ".sc-google-logo-icon-h{display:flex}", Tt = Lt, Ft = class {
7
7
  constructor(t) {
8
- R(this, t), this.width = "24", this.height = "24";
8
+ A(this, t), this.width = "24", this.height = "24";
9
9
  }
10
10
  render() {
11
11
  return i("svg", { key: "555521f048f2f287de7572071b43a53efeae7a10", width: this.width, height: this.height, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, i("g", { key: "2613493e10c2c2bd60da54b6c5ec674ae56d4bb0", "clip-path": "url(#clip0_959_12452)" }, i("path", { key: "8467e8ba5977837e472bec1d8a2bec6ed08bbb8f", d: "M23.745 12.27C23.745 11.48 23.675 10.73 23.555 10H12.255V14.51H18.725C18.435 15.99 17.585 17.24 16.325 18.09V21.09H20.185C22.445 19 23.745 15.92 23.745 12.27Z", fill: "#4285F4" }), i("path", { key: "0a575c6bc170567883e793eebca58942de623a13", d: "M12.255 24C15.495 24 18.205 22.92 20.185 21.09L16.325 18.09C15.245 18.81 13.875 19.25 12.255 19.25C9.12504 19.25 6.47505 17.14 5.52505 14.29H1.54504V17.38C3.51504 21.3 7.56504 24 12.255 24Z", fill: "#34A853" }), i("path", { key: "4c4e6d0e4d8555fd3f7dedc24ccc27a5ac3209ea", d: "M5.52501 14.2901C5.27501 13.5701 5.145 12.8001 5.145 12.0001C5.145 11.2001 5.28501 10.4301 5.52501 9.71012V6.62012H1.545C0.725004 8.24012 0.255005 10.0601 0.255005 12.0001C0.255005 13.9401 0.725004 15.7601 1.545 17.3801L5.52501 14.2901Z", fill: "#FBBC05" }), i("path", { key: "d6dca8d2887f09a6d7a95b84238ec7615e3530c3", d: "M12.255 4.75C14.025 4.75 15.605 5.36 16.855 6.55L20.275 3.13C18.205 1.19 15.495 0 12.255 0C7.56504 0 3.51504 2.7 1.54504 6.62L5.52505 9.71C6.47505 6.86 9.12504 4.75 12.255 4.75Z", fill: "#EA4335" })), i("defs", { key: "5ea0838d988413517f09c07e413d97db3b942375" }, i("clipPath", { key: "dd0a31b400e699406e194711fcbc949d5f3c8304", id: "clip0_959_12452" }, i("rect", { key: "86cb4fe6ed9cada88e94516cf76ddaa3a2d62311", width: 24, height: 24, fill: "white" }))));
12
12
  }
13
13
  };
14
- Tt.style = Lt;
15
- const Ft = ".sc-microsoft-logo-icon-h{display:flex}", Ht = Ft, Bt = class {
14
+ Ft.style = Tt;
15
+ const Ht = ".sc-microsoft-logo-icon-h{display:flex}", Bt = Ht, Dt = class {
16
16
  constructor(t) {
17
- R(this, t), this.width = "22", this.height = "22";
17
+ A(this, t), this.width = "22", this.height = "22";
18
18
  }
19
19
  render() {
20
20
  return i("svg", { key: "da59f9b8e18c52e2ca12e97ce694b7abc30aea0d", width: this.width, height: this.height, viewBox: "0 0 22 22", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, i("path", { key: "ef4d02c0f11fd9df3a3e1a781d2379526404c469", d: "M0.043457 0.043457H10.4782V10.4782H0.043457V0.043457Z", fill: "#F35325" }), i("path", { key: "9799ab150bbdee2cf4ec6275b2388fe2c00dd85e", d: "M11.5217 0.043457H21.9565V10.4782H11.5217V0.043457Z", fill: "#81BC06" }), i("path", { key: "65f7ee7dedd27844e342d2f1e7065814c6012c46", d: "M0.043457 11.5217H10.4782V21.9565H0.043457V11.5217Z", fill: "#05A6F0" }), i("path", { key: "a21de9dcc8252feec5b07059371eba058b2d071c", d: "M11.5217 11.5217H21.9565V21.9565H11.5217V11.5217Z", fill: "#FFBA08" }));
21
21
  }
22
22
  };
23
- Bt.style = Ht;
24
- function Dt({ id: t, formState: e, activeTab: a, calendars: o, currentUser: r }) {
23
+ Dt.style = Bt;
24
+ function Pt({ id: t, formState: e, activeTab: a, calendars: s, currentUser: r }) {
25
25
  switch (a) {
26
26
  case "eventInfo":
27
- const n = e.title, l = e.description, s = parseInt(e.duration), u = e.location, p = e.conferencing;
27
+ const n = e.title, l = e.description, o = parseInt(e.duration), p = e.location, y = e.conferencing;
28
28
  return i(
29
29
  "div",
30
30
  { key: t },
@@ -35,20 +35,20 @@ function Dt({ id: t, formState: e, activeTab: a, calendars: o, currentUser: r })
35
35
  "div",
36
36
  { slot: "inputs" },
37
37
  i("nylas-event-title", { name: "title", eventTitle: n, exportparts: "net, net__title, net__dropdown-content" }),
38
- i("nylas-event-duration", { name: "duration", eventDurationMinutes: s, exportparts: "ned, ned__dropdown, ned__dropdown-button, ned__dropdown-content, ned__input_dropdown, ned__input_dropdown-input, ned__input_dropdown-content" }),
39
- i("nylas-event-location", { name: "location", eventLocation: u, eventConferencing: p, userProvider: r.provider, exportparts: "nel, nel__location, nel__dropdown, nel__dropdown-button, nel__dropdown-content" }),
38
+ i("nylas-event-duration", { name: "duration", eventDurationMinutes: o, exportparts: "ned, ned__dropdown, ned__dropdown-button, ned__dropdown-content, ned__input_dropdown, ned__input_dropdown-input, ned__input_dropdown-content" }),
39
+ i("nylas-event-location", { name: "location", eventLocation: p, eventConferencing: y, userProvider: r.provider, exportparts: "nel, nel__location, nel__dropdown, nel__dropdown-button, nel__dropdown-content" }),
40
40
  i("nylas-event-description", { name: "description", eventDescription: l, exportparts: "nedesc, nedesc__textarea" })
41
41
  )
42
42
  )
43
43
  );
44
44
  case "availability":
45
- const _ = e.availability.openHours, S = e.availability.timezone ? e.availability.timezone : Intl.DateTimeFormat().resolvedOptions().timeZone;
45
+ const _ = e.availability.openHours, x = e.availability.timezone ? e.availability.timezone : Intl.DateTimeFormat().resolvedOptions().timeZone;
46
46
  return i(
47
47
  "div",
48
48
  { key: t },
49
- i("nylas-participant-booking-calendars", { name: "participant-booking-calendars", participants: e.participants, calendars: o }),
49
+ i("nylas-participant-booking-calendars", { name: "participant-booking-calendars", participants: e.participants, calendars: s }),
50
50
  i("nylas-connected-calendars", { name: "connected-calendars", participants: e.participants }),
51
- i("nylas-availability-picker", { name: "availability", openHours: _, defaultTimezone: S, exportparts: "nap__header, nap__select-timezone, nap__select-timezone-button, nap__select-timezone-dropdown-content, nap__availability, nap__day, nap__time-ranges, nap__time-range, nap__add-time-range, nap__time-picker-container, nap__time-picker-input, nap__time-picker-times" })
51
+ i("nylas-availability-picker", { name: "availability", openHours: _, defaultTimezone: x, exportparts: "nap__header, nap__select-timezone, nap__select-timezone-button, nap__select-timezone-dropdown-content, nap__availability, nap__day, nap__time-ranges, nap__time-range, nap__add-time-range, nap__time-picker-container, nap__time-picker-input, nap__time-picker-times" })
52
52
  );
53
53
  case "bookingOptions":
54
54
  return i(
@@ -78,195 +78,208 @@ function Dt({ id: t, formState: e, activeTab: a, calendars: o, currentUser: r })
78
78
  i("nylas-participants-custom-availability", { name: "participant-custom-availability", participants: e.participants, exportparts: "npca, npca__header, npca__content, npca__participant-container, npca__participant-title, npca__participant-toggle--container, npca__toggle-label, npca__toggle-input, npca__toggle-slider" })
79
79
  );
80
80
  case "bookingForm":
81
- const L = Object.entries(e.additionalFields).map(([T, F]) => ({ key: T, ...F }));
81
+ const S = Object.entries(e.additionalFields).map(([L, T]) => ({ key: L, ...T }));
82
82
  return i(
83
83
  "div",
84
84
  { key: t },
85
- i("nylas-booking-form-config", { name: "additional-fields", additonalFields: L })
85
+ i("nylas-booking-form-config", { name: "additional-fields", additonalFields: S })
86
86
  );
87
87
  }
88
88
  }
89
- const Pt = '.sc-nylas-editor-tabs-h{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.scheduler-editor.sc-nylas-editor-tabs{display:flex;flex-direction:column}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs{height:554px;display:grid;grid-template-columns:minmax(224px, 25%) 1fr}@media screen and (max-width: 768px){.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs{display:table-column-group;height:auto}}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs{display:flex;flex-direction:column;border-right:1px solid var(--nylas-base-200);background-color:var(--nylas-base-25)}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.sc-nylas-editor-tabs{display:flex;align-items:center;gap:0.5rem;padding:0.5rem 1rem;color:var(--nylas-base-900);background:var(--nylas-base-0);border:none;height:56px;font-family:var(--nylas-font-family);font-size:16px;font-weight:500;line-height:24px;cursor:pointer}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.sc-nylas-editor-tabs:not(:first-of-type){margin-top:0.25rem}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.active.sc-nylas-editor-tabs{font-weight:600;background:var(--nylas-base-0);color:var(--nylas-primary);border-left:4px solid var(--nylas-primary);box-shadow:0px 1px 2px 0px rgba(0, 0, 0, 0.0588235294);box-shadow:0px 1px 3px 0px rgba(0, 0, 0, 0.1019607843)}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.hide.sc-nylas-editor-tabs{display:none}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs{max-width:692px;overflow-y:auto}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-info.sc-nylas-editor-tabs,.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-limits.sc-nylas-editor-tabs{width:inherit}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-info.sc-nylas-editor-tabs div[slot=inputs].sc-nylas-editor-tabs,.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-limits.sc-nylas-editor-tabs div[slot=inputs].sc-nylas-editor-tabs{display:flex;flex-direction:column;gap:1rem}.footer.sc-nylas-editor-tabs{display:flex;justify-content:space-between;align-items:center;gap:1rem;min-height:80px;padding:0 1rem;border-top:1px solid var(--nylas-base-200)}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs{flex-direction:column;height:auto}}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs .preview.sc-nylas-editor-tabs{margin-top:1rem;width:100%}}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs{display:flex;justify-content:flex-end;align-items:center;justify-self:flex-end;gap:1rem}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs{flex-direction:column-reverse;width:100%}}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.sc-nylas-editor-tabs{max-width:524px}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.unsaved-changes.sc-nylas-editor-tabs{color:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.saved-changes.sc-nylas-editor-tabs{color:var(--nylas-success)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.error.sc-nylas-editor-tabs{color:var(--nylas-error)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.error-full-width.sc-nylas-editor-tabs{max-width:660px}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button-component.sc-nylas-editor-tabs{width:100%}}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs{background:var(--nylas-primary);color:var(--nylas-base-0);height:48px;border:none;border-radius:var(--nylas-border-radius-2x);font-size:1rem;line-height:24px;padding:0 1rem;cursor:pointer;width:148px}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:hover{background:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:active{background:var(--nylas-base-800)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:disabled{background:var(--nylas-base-300);cursor:not-allowed}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs span.sc-nylas-editor-tabs{display:flex;align-items:center;justify-content:center;gap:0.5rem}', Nt = Pt;
90
- var Et = function(t, e, a, o) {
91
- var r = arguments.length, n = r < 3 ? e : o === null ? o = Object.getOwnPropertyDescriptor(e, a) : o, l;
89
+ const Nt = '.sc-nylas-editor-tabs-h{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.scheduler-editor.sc-nylas-editor-tabs{display:flex;flex-direction:column}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs{height:554px;display:grid;grid-template-columns:minmax(224px, 25%) 1fr}@media screen and (max-width: 768px){.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs{display:table-column-group;height:auto}}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs{display:flex;flex-direction:column;border-right:1px solid var(--nylas-base-200);background-color:var(--nylas-base-25)}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.sc-nylas-editor-tabs{display:flex;align-items:center;gap:0.5rem;padding:0.5rem 1rem;color:var(--nylas-base-900);background:var(--nylas-base-0);border:none;height:56px;font-family:var(--nylas-font-family);font-size:16px;font-weight:500;line-height:24px;cursor:pointer}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.sc-nylas-editor-tabs:not(:first-of-type){margin-top:0.25rem}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.active.sc-nylas-editor-tabs{font-weight:600;background:var(--nylas-base-0);color:var(--nylas-primary);border-left:4px solid var(--nylas-primary);box-shadow:0px 1px 2px 0px rgba(0, 0, 0, 0.0588235294);box-shadow:0px 1px 3px 0px rgba(0, 0, 0, 0.1019607843)}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.hide.sc-nylas-editor-tabs{display:none}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs{max-width:692px;overflow-y:auto}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-info.sc-nylas-editor-tabs,.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-limits.sc-nylas-editor-tabs{width:inherit}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-info.sc-nylas-editor-tabs div[slot=inputs].sc-nylas-editor-tabs,.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-limits.sc-nylas-editor-tabs div[slot=inputs].sc-nylas-editor-tabs{display:flex;flex-direction:column;gap:1rem}.footer.sc-nylas-editor-tabs{display:flex;justify-content:space-between;align-items:center;gap:1rem;min-height:80px;padding:0 1rem;border-top:1px solid var(--nylas-base-200)}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs{flex-direction:column;height:auto}}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs .preview.sc-nylas-editor-tabs{margin-top:1rem;width:100%}}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs{display:flex;justify-content:flex-end;align-items:center;justify-self:flex-end;gap:1rem}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs{flex-direction:column-reverse;width:100%}}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.sc-nylas-editor-tabs{max-width:524px}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.unsaved-changes.sc-nylas-editor-tabs{color:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.saved-changes.sc-nylas-editor-tabs{color:var(--nylas-success)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.error.sc-nylas-editor-tabs{color:var(--nylas-error)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.error-full-width.sc-nylas-editor-tabs{max-width:660px}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button-component.sc-nylas-editor-tabs{width:100%}}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs{background:var(--nylas-primary);color:var(--nylas-base-0);height:48px;border:none;border-radius:var(--nylas-border-radius-2x);font-size:1rem;line-height:24px;padding:0 1rem;cursor:pointer;width:148px}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:hover{background:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:active{background:var(--nylas-base-800)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:disabled{background:var(--nylas-base-300);cursor:not-allowed}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs span.sc-nylas-editor-tabs{display:flex;align-items:center;justify-content:center;gap:0.5rem}', Et = Nt;
90
+ var Ot = function(t, e, a, s) {
91
+ var r = arguments.length, n = r < 3 ? e : s === null ? s = Object.getOwnPropertyDescriptor(e, a) : s, l;
92
92
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
93
- n = Reflect.decorate(t, e, a, o);
93
+ n = Reflect.decorate(t, e, a, s);
94
94
  else
95
- for (var s = t.length - 1; s >= 0; s--)
96
- (l = t[s]) && (n = (r < 3 ? l(n) : r > 3 ? l(e, a, n) : l(e, a)) || n);
95
+ for (var o = t.length - 1; o >= 0; o--)
96
+ (l = t[o]) && (n = (r < 3 ? l(n) : r > 3 ? l(e, a, n) : l(e, a)) || n);
97
97
  return r > 3 && n && Object.defineProperty(e, a, n), n;
98
- }, j = function(t, e) {
98
+ }, U = function(t, e) {
99
99
  if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
100
100
  return Reflect.metadata(t, e);
101
101
  };
102
- const wt = class {
102
+ const kt = class {
103
103
  constructor(t) {
104
- R(this, t), this.schedulerConfigChanged = k(this, "schedulerConfigChanged", 7), this.cancelButtonClick = k(this, "cancelButtonClick", 7), this.formSubmitted = k(this, "formSubmitted", 7), this.previewButtonClicked = k(this, "previewButtonClicked", 7), this.setError = (e) => {
104
+ A(this, t), this.schedulerConfigChanged = C(this, "schedulerConfigChanged", 7), this.cancelButtonClick = C(this, "cancelButtonClick", 7), this.formSubmitted = C(this, "formSubmitted", 7), this.previewButtonClicked = C(this, "previewButtonClicked", 7), this.setError = (e) => {
105
105
  this.error = e.message;
106
106
  }, this.formSubmissionHandler = async (e) => {
107
- var $, U, Z, V, J, G, W, q, K, Q, X, Y, tt, et, it, at;
107
+ var N, V, J, G, W, q, K, Q, X, Y, tt, et, it, at, nt, st;
108
108
  if (e.preventDefault(), this.formSubmitted.emit(), !this.formRef.checkValidity()) {
109
109
  this.error = this.formRef.validationMessage || "Please fix the form errors.";
110
110
  return;
111
111
  }
112
112
  this.isLoading = !0, this.hasUnsavedChanges = !1;
113
- const o = this.updateFormState(), { title: r, description: n, duration: l, availability: s, bookingCalendar: u, location: p, bookingType: _, buffer: S, availableDaysInFuture: L, minCancellationNotice: T, minBookingNotice: F, cancellationPolicy: P, timeslotInterval: y, additionalGuestsHidden: N, hideCancellationOptions: E, hideReschedulingOptions: O, participants: v, participantOpenHours: b, additionalFields: I, participantCalendars: w, conferencing: M, participantBookingCalendars: m } = o, c = (U = ($ = this.selectedConfiguration) == null ? void 0 : $.participants) == null ? void 0 : U.find((d) => d.is_organizer), C = w && (c != null && c.email) ? w[c == null ? void 0 : c.email] : [], H = ((Z = c == null ? void 0 : c.booking) == null ? void 0 : Z.calendar_id) || u, B = l ? parseInt(l) : 30, f = v && (v == null ? void 0 : v.length) > 0 ? v : [
113
+ const s = this.updateFormState(), { title: r, description: n, duration: l, availability: o, bookingCalendar: p, location: y, bookingType: _, buffer: x, availableDaysInFuture: S, minCancellationNotice: L, minBookingNotice: T, cancellationPolicy: E, timeslotInterval: m, additionalGuestsHidden: O, hideCancellationOptions: I, hideReschedulingOptions: R, participants: v, participantOpenHours: b, additionalFields: M, participantCalendars: w, conferencing: z, participantBookingCalendars: g } = s, c = (V = (N = this.selectedConfiguration) == null ? void 0 : N.participants) == null ? void 0 : V.find((d) => d.is_organizer), k = w && (c != null && c.email) ? w[c == null ? void 0 : c.email] : [], B = ((J = c == null ? void 0 : c.booking) == null ? void 0 : J.calendar_id) || p, D = l ? parseInt(l) : 30, F = v && (v == null ? void 0 : v.length) > 0 ? v : [
114
114
  {
115
- name: (c == null ? void 0 : c.name) ?? ((V = this.currentUser) == null ? void 0 : V.name) ?? "",
116
- email: (c == null ? void 0 : c.email) ?? ((J = this.currentUser) == null ? void 0 : J.email) ?? "",
115
+ name: (c == null ? void 0 : c.name) ?? ((G = this.currentUser) == null ? void 0 : G.name) ?? "",
116
+ email: (c == null ? void 0 : c.email) ?? ((W = this.currentUser) == null ? void 0 : W.email) ?? "",
117
117
  is_organizer: !0,
118
- timezone: (s == null ? void 0 : s.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
118
+ timezone: (o == null ? void 0 : o.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
119
119
  availability: {
120
- calendar_ids: C.length ? C : ["primary"],
120
+ calendar_ids: k.length ? k : ["primary"],
121
121
  open_hours: []
122
122
  },
123
123
  booking: {
124
- calendar_id: u && u !== "" ? u : "primary"
124
+ calendar_id: p && p !== "" ? p : "primary"
125
125
  }
126
126
  }
127
- ], g = {
128
- ...((G = this.selectedConfiguration) == null ? void 0 : G.id) && { id: this.selectedConfiguration.id },
129
- version: ((W = this.selectedConfiguration) == null ? void 0 : W.version) ?? "1.0.0",
127
+ ], P = {
128
+ ...((q = this.selectedConfiguration) == null ? void 0 : q.id) && { id: this.selectedConfiguration.id },
129
+ version: ((K = this.selectedConfiguration) == null ? void 0 : K.version) ?? "1.0.0",
130
130
  availability: {
131
- duration_minutes: B,
132
- interval_minutes: (y == null ? void 0 : y.interval) ?? B,
133
- round_to: y == null ? void 0 : y.roundTo,
131
+ duration_minutes: D,
132
+ interval_minutes: (m == null ? void 0 : m.interval) ?? D,
133
+ round_to: m == null ? void 0 : m.roundTo,
134
134
  availability_rules: {
135
- availability_method: ((Q = (K = (q = this.selectedConfiguration) == null ? void 0 : q.availability) == null ? void 0 : K.availability_rules) == null ? void 0 : Q.availability_method) ?? "collective",
136
- buffer: S || { before: 0, after: 0 },
137
- default_open_hours: (s == null ? void 0 : s.openHours) ?? ((tt = (Y = (X = this.selectedConfiguration) == null ? void 0 : X.availability) == null ? void 0 : Y.availability_rules) == null ? void 0 : tt.default_open_hours) ?? mt,
138
- round_robin_group_id: ((at = (it = (et = this.selectedConfiguration) == null ? void 0 : et.availability) == null ? void 0 : it.availability_rules) == null ? void 0 : at.round_robin_group_id) ?? ""
135
+ availability_method: ((Y = (X = (Q = this.selectedConfiguration) == null ? void 0 : Q.availability) == null ? void 0 : X.availability_rules) == null ? void 0 : Y.availability_method) ?? "collective",
136
+ buffer: x || { before: 0, after: 0 },
137
+ default_open_hours: (o == null ? void 0 : o.openHours) ?? ((it = (et = (tt = this.selectedConfiguration) == null ? void 0 : tt.availability) == null ? void 0 : et.availability_rules) == null ? void 0 : it.default_open_hours) ?? _t,
138
+ round_robin_group_id: ((st = (nt = (at = this.selectedConfiguration) == null ? void 0 : at.availability) == null ? void 0 : nt.availability_rules) == null ? void 0 : st.round_robin_group_id) ?? ""
139
139
  }
140
140
  },
141
141
  participants: [
142
- ...f == null ? void 0 : f.map((d) => {
143
- var nt, st, ot, rt, lt, dt, ct, bt, ht, ut, pt, ft, yt;
142
+ ...F == null ? void 0 : F.map((d) => {
143
+ var ot, rt, lt, dt, ct, bt, ht, ut, pt, yt, ft, mt, gt;
144
144
  return d.is_organizer ? {
145
145
  name: d.name ?? "",
146
146
  email: d.email,
147
147
  is_organizer: !0,
148
- timezone: ((st = (nt = b == null ? void 0 : b[d.email]) == null ? void 0 : nt[0]) == null ? void 0 : st.timezone) ?? ((lt = (rt = (ot = d.availability) == null ? void 0 : ot.open_hours) == null ? void 0 : rt[0]) == null ? void 0 : lt.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
148
+ timezone: ((rt = (ot = b == null ? void 0 : b[d.email]) == null ? void 0 : ot[0]) == null ? void 0 : rt.timezone) ?? ((ct = (dt = (lt = d.availability) == null ? void 0 : lt.open_hours) == null ? void 0 : dt[0]) == null ? void 0 : ct.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
149
149
  availability: {
150
- calendar_ids: C.length ? C : ["primary"],
151
- open_hours: (b == null ? void 0 : b[d.email]) ?? ((dt = d.availability) == null ? void 0 : dt.open_hours) ?? []
150
+ calendar_ids: k.length ? k : ["primary"],
151
+ open_hours: (b == null ? void 0 : b[d.email]) ?? ((bt = d.availability) == null ? void 0 : bt.open_hours) ?? []
152
152
  },
153
153
  booking: {
154
- calendar_id: H || "primary"
154
+ calendar_id: B || "primary"
155
155
  }
156
156
  } : {
157
157
  ...d,
158
- timezone: ((bt = (ct = b == null ? void 0 : b[d.email]) == null ? void 0 : ct[0]) == null ? void 0 : bt.timezone) ?? ((pt = (ut = (ht = d.availability) == null ? void 0 : ht.open_hours) == null ? void 0 : ut[0]) == null ? void 0 : pt.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
158
+ timezone: ((ut = (ht = b == null ? void 0 : b[d.email]) == null ? void 0 : ht[0]) == null ? void 0 : ut.timezone) ?? ((ft = (yt = (pt = d.availability) == null ? void 0 : pt.open_hours) == null ? void 0 : yt[0]) == null ? void 0 : ft.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
159
159
  availability: d.availability ? {
160
- calendar_ids: (w == null ? void 0 : w[d.email]) ?? ((ft = d.availability) == null ? void 0 : ft.calendar_ids) ?? ["primary"],
161
- open_hours: (b == null ? void 0 : b[d.email]) ?? ((yt = d.availability) == null ? void 0 : yt.open_hours) ?? []
160
+ calendar_ids: (w == null ? void 0 : w[d.email]) ?? ((mt = d.availability) == null ? void 0 : mt.calendar_ids) ?? ["primary"],
161
+ open_hours: (b == null ? void 0 : b[d.email]) ?? ((gt = d.availability) == null ? void 0 : gt.open_hours) ?? []
162
162
  } : void 0,
163
- booking: m != null && m[d.email] ? { calendar_id: m == null ? void 0 : m[d.email] } : void 0
163
+ booking: g != null && g[d.email] ? { calendar_id: g == null ? void 0 : g[d.email] } : void 0
164
164
  };
165
165
  })
166
166
  ],
167
167
  event_booking: {
168
168
  title: (r == null ? void 0 : r.toString()) ?? "",
169
169
  description: (n == null ? void 0 : n.toString()) ?? "",
170
- location: (p == null ? void 0 : p.toString()) ?? "",
170
+ location: (y == null ? void 0 : y.toString()) ?? "",
171
171
  booking_type: (_ == null ? void 0 : _.toString()) ?? "booking",
172
- timezone: (s == null ? void 0 : s.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
173
- conferencing: M
172
+ timezone: (o == null ? void 0 : o.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
173
+ conferencing: z
174
174
  },
175
175
  scheduler: {
176
- cancellation_policy: P ?? "",
177
- available_days_in_future: L ?? 30,
178
- min_cancellation_notice: T ?? 0,
179
- min_booking_notice: F ?? 60,
180
- hide_additional_guests: N ?? !1,
181
- hide_cancellation_options: E ?? !1,
182
- hide_rescheduling_options: O ?? !1,
183
- additional_fields: I
176
+ cancellation_policy: E ?? "",
177
+ available_days_in_future: S ?? 30,
178
+ min_cancellation_notice: L ?? 0,
179
+ min_booking_notice: T ?? 60,
180
+ hide_additional_guests: O ?? !1,
181
+ hide_cancellation_options: I ?? !1,
182
+ hide_rescheduling_options: R ?? !1,
183
+ additional_fields: M
184
184
  }
185
- }, x = xt(g, this.selectedConfiguration), D = this.action === "create" ? x : g, Ct = (d) => {
185
+ }, j = St(P, this.selectedConfiguration), h = this.action === "create" ? j : P;
186
+ this.isConfigRoundRobin(h) && (h.participants = h.participants.map((d) => ({ ...d, is_organizer: void 0 })));
187
+ const f = (d) => {
186
188
  this.isLoading = !1, this.changesSaved = !0, setTimeout(() => {
187
189
  this.changesSaved = !1;
188
190
  }, 5e3);
189
191
  };
190
- this.checkForClientSideErrors(D) || this.schedulerConfigChanged.emit({ config: D, resetLoadingState: Ct, setError: this.setError, action: this.action });
192
+ this.checkForClientSideErrors(h) || this.schedulerConfigChanged.emit({ config: h, resetLoadingState: f, setError: this.setError, action: this.action });
193
+ }, this.isConfigRoundRobin = (e) => {
194
+ var a, s, r, n;
195
+ return ((s = (a = e.availability) == null ? void 0 : a.availability_rules) == null ? void 0 : s.availability_method) === "max-availability" || ((n = (r = e.availability) == null ? void 0 : r.availability_rules) == null ? void 0 : n.availability_method) === "max-fairness";
191
196
  }, this.checkForClientSideErrors = (e) => {
192
197
  var n;
193
- let a = !1, o = "";
198
+ let a = !1, s = "";
194
199
  const r = (n = e.scheduler) == null ? void 0 : n.additional_fields;
195
- return r && (o = "Booking form error: ", Object.entries(r).forEach((l) => {
196
- const s = l[1];
197
- if (s.label === "") {
198
- o += `Label is required for field of type ${s.type}.`, a = !0;
200
+ return r && (s = "Booking form error: ", Object.entries(r).forEach((l) => {
201
+ const o = l[1];
202
+ if (o.label === "") {
203
+ s += `Label is required for field of type ${o.type}.`, a = !0;
199
204
  return;
200
205
  }
201
- if (s.options) {
202
- for (const u of s.options)
203
- if (u === "") {
204
- o += `Empty option detected inside ${s.label} of type ${s.type}.`, a = !0;
206
+ if (o.options) {
207
+ for (const p of o.options)
208
+ if (p === "") {
209
+ s += `Empty option detected inside ${o.label} of type ${o.type}.`, a = !0;
205
210
  break;
206
211
  }
207
212
  }
208
- })), a && (this.isLoading = !1, this.setError(new Error(o))), a;
213
+ })), a && (this.isLoading = !1, this.setError(new Error(s))), a;
209
214
  }, this.calendars = void 0, this.selectedConfiguration = void 0, this.currentUser = void 0, this.schedulerPreviewLink = "", this.mode = "app", this.hideEditorTabs = [], this.action = "create", this.activeTab = "eventInfo", this.isLoading = !1, this.hasUnsavedChanges = !1, this.changesSaved = !1, this.formState = {}, this.error = "";
210
215
  }
211
216
  configChangedHandler(t) {
212
- h("[nylas-editor-tabs]", "configChangedHandler", t, this.selectedConfiguration), this.formState = {
217
+ u("[nylas-editor-tabs]", "configChangedHandler", t, this.selectedConfiguration), this.formState = {
213
218
  ...this.getFormStateFromConfig(t)
214
219
  }, t.id ? this.action = "edit" : this.action = "create";
215
220
  }
221
+ userChangedHandler(t) {
222
+ u("[nylas-editor-tabs]", "userChangedHandler", t), t && (this.formState = {
223
+ ...this.getFormStateFromConfig(this.selectedConfiguration)
224
+ });
225
+ }
216
226
  connectedCallback() {
217
- h("[nylas-editor-tabs]", "connectedCallback");
227
+ u("[nylas-editor-tabs]", "connectedCallback");
218
228
  }
219
229
  componentWillLoad() {
220
- h("[nylas-editor-tabs]", "componentWillLoad"), this.formState = this.getFormStateFromConfig(this.selectedConfiguration);
230
+ u("[nylas-editor-tabs]", "componentWillLoad"), this.formState = this.getFormStateFromConfig(this.selectedConfiguration);
221
231
  }
222
232
  componentDidLoad() {
223
- h("[nylas-editor-tabs]", "componentDidLoad");
233
+ u("[nylas-editor-tabs]", "componentDidLoad");
224
234
  }
225
235
  disconnectedCallback() {
226
- h("[nylas-editor-tabs]", "disconnectedCallback");
236
+ u("[nylas-editor-tabs]", "disconnectedCallback");
227
237
  }
228
238
  handleValueChanged(t) {
229
- h("[nylas-editor-tabs]", "handleValueChanged", t);
239
+ u("[nylas-editor-tabs]", "handleValueChanged", t);
230
240
  const { name: e, value: a } = t.detail;
231
241
  this.setFormState(a, e), this.formState = { ...this.formState }, this.hasUnsavedChanges = !0, this.error = "";
232
242
  }
233
243
  getFormStateFromConfig(t) {
234
- var a, o, r, n, l, s, u, p, _, S, L, T, F, P, y, N, E, O, v, b, I, w, M, m, c, C, H, B;
235
- const e = (a = t == null ? void 0 : t.participants) == null ? void 0 : a.find((f) => f.is_organizer);
236
- return {
237
- title: ((o = t == null ? void 0 : t.event_booking) == null ? void 0 : o.title) ?? "",
238
- description: ((r = t == null ? void 0 : t.event_booking) == null ? void 0 : r.description) ?? "",
239
- duration: ((l = (n = t == null ? void 0 : t.availability) == null ? void 0 : n.duration_minutes) == null ? void 0 : l.toString()) ?? "30",
244
+ var a, s, r, n, l, o, p, y, _, x, S, L, T, E, m, O, I, R, v, b, M, w, z, g, c, k, B, D, F, P, j;
245
+ let e = (a = t == null ? void 0 : t.participants) == null ? void 0 : a.find((h) => h.is_organizer);
246
+ return !e && ((r = (s = t == null ? void 0 : t.availability) == null ? void 0 : s.availability_rules) == null ? void 0 : r.availability_method) !== "collective" && (e = (n = t == null ? void 0 : t.participants) == null ? void 0 : n.find((h) => {
247
+ var f;
248
+ return h.email === ((f = this.currentUser) == null ? void 0 : f.email);
249
+ }), e && (e.is_organizer = !0)), {
250
+ title: ((l = t == null ? void 0 : t.event_booking) == null ? void 0 : l.title) ?? "",
251
+ description: ((o = t == null ? void 0 : t.event_booking) == null ? void 0 : o.description) ?? "",
252
+ duration: ((y = (p = t == null ? void 0 : t.availability) == null ? void 0 : p.duration_minutes) == null ? void 0 : y.toString()) ?? "30",
240
253
  availability: {
241
- timezone: ((s = t == null ? void 0 : t.event_booking) == null ? void 0 : s.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
242
- openHours: ((p = (u = t == null ? void 0 : t.availability) == null ? void 0 : u.availability_rules) == null ? void 0 : p.default_open_hours) ?? mt
254
+ timezone: ((_ = t == null ? void 0 : t.event_booking) == null ? void 0 : _.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
255
+ openHours: ((S = (x = t == null ? void 0 : t.availability) == null ? void 0 : x.availability_rules) == null ? void 0 : S.default_open_hours) ?? _t
243
256
  },
244
- additionalFields: ((_ = t == null ? void 0 : t.scheduler) == null ? void 0 : _.additional_fields) ?? {},
245
- conferencing: ((S = t == null ? void 0 : t.event_booking) == null ? void 0 : S.conferencing) ?? {},
246
- calendarIds: ((L = e == null ? void 0 : e.availability) == null ? void 0 : L.calendar_ids) ?? [],
257
+ additionalFields: ((L = t == null ? void 0 : t.scheduler) == null ? void 0 : L.additional_fields) ?? {},
258
+ conferencing: ((T = t == null ? void 0 : t.event_booking) == null ? void 0 : T.conferencing) ?? {},
259
+ calendarIds: ((E = e == null ? void 0 : e.availability) == null ? void 0 : E.calendar_ids) ?? [],
247
260
  participants: (t == null ? void 0 : t.participants) ?? [],
248
- bookingCalendar: ((T = e == null ? void 0 : e.booking) == null ? void 0 : T.calendar_id) ?? (e == null ? void 0 : e.email) ?? "",
249
- location: ((F = t == null ? void 0 : t.event_booking) == null ? void 0 : F.location) ?? "",
250
- bookingType: ((P = t == null ? void 0 : t.event_booking) == null ? void 0 : P.booking_type) ?? "booking",
251
- buffer: ((N = (y = t == null ? void 0 : t.availability) == null ? void 0 : y.availability_rules) == null ? void 0 : N.buffer) ?? { before: 0, after: 0 },
252
- cancellationPolicy: ((E = t == null ? void 0 : t.scheduler) == null ? void 0 : E.cancellation_policy) ?? "",
253
- availableDaysInFuture: ((O = t == null ? void 0 : t.scheduler) == null ? void 0 : O.available_days_in_future) ?? 30,
254
- minCancellationNotice: ((v = t == null ? void 0 : t.scheduler) == null ? void 0 : v.min_cancellation_notice) ?? 0,
255
- minBookingNotice: ((b = t == null ? void 0 : t.scheduler) == null ? void 0 : b.min_booking_notice) ?? 60,
261
+ bookingCalendar: ((m = e == null ? void 0 : e.booking) == null ? void 0 : m.calendar_id) ?? (e == null ? void 0 : e.email) ?? "",
262
+ location: ((O = t == null ? void 0 : t.event_booking) == null ? void 0 : O.location) ?? "",
263
+ bookingType: ((I = t == null ? void 0 : t.event_booking) == null ? void 0 : I.booking_type) ?? "booking",
264
+ buffer: ((v = (R = t == null ? void 0 : t.availability) == null ? void 0 : R.availability_rules) == null ? void 0 : v.buffer) ?? { before: 0, after: 0 },
265
+ cancellationPolicy: ((b = t == null ? void 0 : t.scheduler) == null ? void 0 : b.cancellation_policy) ?? "",
266
+ availableDaysInFuture: ((M = t == null ? void 0 : t.scheduler) == null ? void 0 : M.available_days_in_future) ?? 30,
267
+ minCancellationNotice: ((w = t == null ? void 0 : t.scheduler) == null ? void 0 : w.min_cancellation_notice) ?? 0,
268
+ minBookingNotice: ((z = t == null ? void 0 : t.scheduler) == null ? void 0 : z.min_booking_notice) ?? 60,
256
269
  timeslotInterval: {
257
- interval: ((I = t == null ? void 0 : t.availability) == null ? void 0 : I.interval_minutes) ?? ((w = t == null ? void 0 : t.availability) == null ? void 0 : w.duration_minutes),
258
- roundTo: (M = t == null ? void 0 : t.availability) == null ? void 0 : M.round_to
270
+ interval: ((g = t == null ? void 0 : t.availability) == null ? void 0 : g.interval_minutes) ?? ((c = t == null ? void 0 : t.availability) == null ? void 0 : c.duration_minutes),
271
+ roundTo: (k = t == null ? void 0 : t.availability) == null ? void 0 : k.round_to
259
272
  },
260
- additionalGuestsHidden: ((m = t == null ? void 0 : t.scheduler) == null ? void 0 : m.hide_additional_guests) ?? !1,
261
- hideCancellationOptions: ((c = t == null ? void 0 : t.scheduler) == null ? void 0 : c.hide_cancellation_options) ?? !1,
262
- hideReschedulingOptions: ((C = t == null ? void 0 : t.scheduler) == null ? void 0 : C.hide_rescheduling_options) ?? !1,
263
- participantBookingCalendars: ((H = t == null ? void 0 : t.participants) == null ? void 0 : H.reduce((f, g) => {
264
- var x, D;
265
- return (x = g.booking) != null && x.calendar_id && (f[g.email] = (D = g.booking) == null ? void 0 : D.calendar_id), f;
273
+ additionalGuestsHidden: ((B = t == null ? void 0 : t.scheduler) == null ? void 0 : B.hide_additional_guests) ?? !1,
274
+ hideCancellationOptions: ((D = t == null ? void 0 : t.scheduler) == null ? void 0 : D.hide_cancellation_options) ?? !1,
275
+ hideReschedulingOptions: ((F = t == null ? void 0 : t.scheduler) == null ? void 0 : F.hide_rescheduling_options) ?? !1,
276
+ participantBookingCalendars: ((P = t == null ? void 0 : t.participants) == null ? void 0 : P.reduce((h, f) => {
277
+ var H, N;
278
+ return (H = f.booking) != null && H.calendar_id && (h[f.email] = (N = f.booking) == null ? void 0 : N.calendar_id), h;
266
279
  })) ?? {},
267
- participantCalendars: ((B = t == null ? void 0 : t.participants) == null ? void 0 : B.reduce((f, g) => {
268
- var x;
269
- return f[g.email] = (x = g.availability) == null ? void 0 : x.calendar_ids, f;
280
+ participantCalendars: ((j = t == null ? void 0 : t.participants) == null ? void 0 : j.reduce((h, f) => {
281
+ var H;
282
+ return h[f.email] = (H = f.availability) == null ? void 0 : H.calendar_ids, h;
270
283
  }, {})) ?? {}
271
284
  };
272
285
  }
@@ -325,8 +338,8 @@ const wt = class {
325
338
  this.formState.additionalGuestsHidden = a.additionalGuestsHidden, this.formState.hideCancellationOptions = a.hideCancellationOptions, this.formState.hideReschedulingOptions = a.hideReschedulingOptions;
326
339
  break;
327
340
  case "participant-custom-availability":
328
- const o = JSON.parse(t.toString());
329
- this.formState.participantOpenHours = o;
341
+ const s = JSON.parse(t.toString());
342
+ this.formState.participantOpenHours = s;
330
343
  break;
331
344
  case "additional-fields":
332
345
  this.formState.additionalFields = t;
@@ -350,28 +363,29 @@ const wt = class {
350
363
  }
351
364
  render() {
352
365
  var t;
353
- return h("[nylas-editor-tabs]", "render", this.formState), i(gt, { key: "6636487c6ce64dddbcb5b393c9240fae3dacab62" }, i("form", { key: "10a616e5d8c6b19d650bbbaa26bdcb178b050161", onSubmit: this.formSubmissionHandler, class: "scheduler-editor", ref: (e) => this.formRef = e, noValidate: !0 }, this.mode === "app" ? i("div", { class: "form-contents" }, i("div", { class: "tabs" }, i("button", { class: { tab: !0, active: this.activeTab == "eventInfo", hide: this.hideTab("eventInfo") }, part: "editortab__event-info", onClick: (e) => this.setActiveTab(e, "eventInfo") }, i("calendar-info-icon", { width: "16", height: "16" }), "Event info"), i("button", { class: { tab: !0, active: this.activeTab == "availability", hide: this.hideTab("availability") }, part: "editortab__availability", onClick: (e) => this.setActiveTab(e, "availability") }, i("calendar-patterns-icon", { width: "16", height: "16" }), "Availability"), i("button", { class: { tab: !0, active: this.activeTab == "participants", hide: this.hideTab("participants") }, part: "editortab__participants", onClick: (e) => this.setActiveTab(e, "participants") }, i("people-icon", { width: "16", height: "16" }), "Participants"), i("button", { class: { tab: !0, active: this.activeTab == "bookingOptions", hide: this.hideTab("bookingOptions") }, part: "editortab__booking-options", onClick: (e) => this.setActiveTab(e, "bookingOptions") }, i("flow-icon", { width: "16", height: "16" }), "Booking options"), i("button", { class: { tab: !0, active: this.activeTab == "bookingForm", hide: this.hideTab("bookingForm") }, part: "editortab__booking-form", onClick: (e) => this.setActiveTab(e, "bookingForm") }, this.activeTab == "bookingForm" ? i("calendar-agenda-fill-icon", { width: "16", height: "16" }) : i("calendar-agenda-icon", { width: "16", height: "16" }), "Booking form")), i("div", { class: "tab-content" }, i(Dt, { formState: this.formState, activeTab: this.activeTab, currentUser: this.currentUser, calendars: this.calendars, id: ((t = this.selectedConfiguration) == null ? void 0 : t.id) ?? "new" }))) : i("slot", null), i("div", { key: "280c0c7aeb9199c53586cc211ae473bbe23efc88", class: "footer" }, i("div", { key: "8ae601f7812e3a0ad346dea9d79bde817c477fcd", class: "preview" }, this.schedulerPreviewLink !== "" && this.action === "edit" && i("button-component", { type: "button", disabled: this.isLoading, clickHandler: (e) => {
354
- e.preventDefault(), this.previewButtonClicked.emit(this.host).defaultPrevented || window.open(A(this.schedulerPreviewLink, this.selectedConfiguration), "_blank");
355
- }, variant: "basic" }, "Preview")), i("div", { key: "9442375eebbac6e0edf76ccd81be5607c3427120", class: "buttons" }, i("p", { key: "3bac06ac6145e732ee05ed8b953a4bac8dc123d3", class: {
366
+ return u("[nylas-editor-tabs]", "render", this.formState), i(vt, { key: "8910be39d85bb9f663d86272d170927489970d83" }, i("form", { key: "51a1bc5e0d186aed0a3b24b5285a86dcfc06ff23", onSubmit: this.formSubmissionHandler, class: "scheduler-editor", ref: (e) => this.formRef = e, noValidate: !0 }, this.mode === "app" ? i("div", { class: "form-contents" }, i("div", { class: "tabs" }, i("button", { class: { tab: !0, active: this.activeTab == "eventInfo", hide: this.hideTab("eventInfo") }, part: "editortab__event-info", onClick: (e) => this.setActiveTab(e, "eventInfo") }, i("calendar-info-icon", { width: "16", height: "16" }), "Event info"), i("button", { class: { tab: !0, active: this.activeTab == "availability", hide: this.hideTab("availability") }, part: "editortab__availability", onClick: (e) => this.setActiveTab(e, "availability") }, i("calendar-patterns-icon", { width: "16", height: "16" }), "Availability"), i("button", { class: { tab: !0, active: this.activeTab == "participants", hide: this.hideTab("participants") }, part: "editortab__participants", onClick: (e) => this.setActiveTab(e, "participants") }, i("people-icon", { width: "16", height: "16" }), "Participants"), i("button", { class: { tab: !0, active: this.activeTab == "bookingOptions", hide: this.hideTab("bookingOptions") }, part: "editortab__booking-options", onClick: (e) => this.setActiveTab(e, "bookingOptions") }, i("flow-icon", { width: "16", height: "16" }), "Booking options"), i("button", { class: { tab: !0, active: this.activeTab == "bookingForm", hide: this.hideTab("bookingForm") }, part: "editortab__booking-form", onClick: (e) => this.setActiveTab(e, "bookingForm") }, this.activeTab == "bookingForm" ? i("calendar-agenda-fill-icon", { width: "16", height: "16" }) : i("calendar-agenda-icon", { width: "16", height: "16" }), "Booking form")), i("div", { class: "tab-content" }, i(Pt, { formState: this.formState, activeTab: this.activeTab, currentUser: this.currentUser, calendars: this.calendars, id: ((t = this.selectedConfiguration) == null ? void 0 : t.id) ?? "new" }))) : i("slot", null), i("div", { key: "ba21b8b6dd0da3d2e7770693428771da98ae12b7", class: "footer" }, i("div", { key: "a6ba70fe5a29ebc4565c3483cfdb9451c8feb45b", class: "preview" }, this.schedulerPreviewLink !== "" && this.action === "edit" && i("button-component", { type: "button", disabled: this.isLoading, clickHandler: (e) => {
367
+ e.preventDefault(), this.previewButtonClicked.emit(this.host).defaultPrevented || window.open(Z(this.schedulerPreviewLink, this.selectedConfiguration), "_blank");
368
+ }, variant: "basic" }, "Preview")), i("div", { key: "f3c639c62c31b9717bca42f67ea8d11cead03c15", class: "buttons" }, i("p", { key: "a45a7d9c0d473b81d792547a1fe819686d7a93f3", class: {
356
369
  "unsaved-changes": this.hasUnsavedChanges && !this.changesSaved,
357
370
  "saved-changes": this.changesSaved,
358
371
  error: this.error !== "",
359
372
  "error-full-width": this.error !== "" && this.action === "create"
360
- } }, this.error !== "" ? this.error : "", this.error == "" && this.hasUnsavedChanges && !this.changesSaved ? "Unsaved changes" : this.error == "" && this.changesSaved ? "Changes saved!" : ""), i("button-component", { key: "b6347b69d1a624d9dd65e2831a0a7ae92bfd95b6", type: "button", disabled: this.isLoading, clickHandler: (e) => {
373
+ } }, this.error !== "" ? this.error : "", this.error == "" && this.hasUnsavedChanges && !this.changesSaved ? "Unsaved changes" : this.error == "" && this.changesSaved ? "Changes saved!" : ""), i("button-component", { key: "61f8b4845edc4c84fb1fa11c00c2b798b543d86c", type: "button", disabled: this.isLoading, clickHandler: (e) => {
361
374
  e.preventDefault(), this.cancelButtonClick.emit(), this.error = "";
362
- }, variant: "basic" }, "Back"), i("button-component", { key: "28222fdd8258c009690d25ccbf05ad86abcc1cd3", type: "submit", disabled: this.isLoading }, this.isLoading ? i("span", null, "Saving", i("loading-icon", null), " ") : this.action == "create" ? "Create" : "Save changes")))));
375
+ }, variant: "basic" }, "Back"), i("button-component", { key: "cc1d668a38e6823cb63c2a127d6c51688c285a35", type: "submit", disabled: this.isLoading }, this.isLoading ? i("span", null, "Saving", i("loading-icon", null), " ") : this.action == "create" ? "Create" : "Save changes")))));
363
376
  }
364
377
  get host() {
365
- return _t(this);
378
+ return wt(this);
366
379
  }
367
380
  static get watchers() {
368
381
  return {
369
- selectedConfiguration: ["configChangedHandler"]
382
+ selectedConfiguration: ["configChangedHandler"],
383
+ currentUser: ["userChangedHandler"]
370
384
  };
371
385
  }
372
386
  };
373
- Et([
374
- vt({
387
+ Ot([
388
+ Ct({
375
389
  name: "nylas-editor-tabs",
376
390
  stateToProps: /* @__PURE__ */ new Map([
377
391
  ["schedulerConfig.calendars", "calendars"],
@@ -381,52 +395,52 @@ Et([
381
395
  ]),
382
396
  eventToProps: {
383
397
  schedulerConfigChanged: async (t, e) => {
384
- const { resetLoadingState: a, setError: o, action: r, config: n } = t.detail, l = (s) => {
385
- const [u, p] = s;
386
- !u && p && o && o(p), a && a(t);
398
+ const { resetLoadingState: a, setError: s, action: r, config: n } = t.detail, l = (o) => {
399
+ const [p, y] = o;
400
+ !p && y && s && s(y), a && a(t);
387
401
  };
388
402
  if (r === "edit") {
389
- const s = await e.schedulerConfig.updateConfiguration(n);
390
- l(s);
403
+ const o = await e.schedulerConfig.updateConfiguration(n);
404
+ l(o);
391
405
  } else {
392
- const s = await e.schedulerConfig.createConfiguration(n);
393
- l(s);
406
+ const o = await e.schedulerConfig.createConfiguration(n);
407
+ l(o);
394
408
  }
395
409
  },
396
410
  cancelButtonClick: async (t, e) => {
397
411
  e.schedulerConfigStore.state.action = null;
398
412
  },
399
413
  previewButtonClicked: async (t, e) => {
400
- h("[nylas-editor-tabs]", "previewButtonClicked", e);
414
+ u("[nylas-editor-tabs]", "previewButtonClicked", e);
401
415
  },
402
416
  formSubmitted: async (t, e) => {
403
- h("[nylas-editor-tabs]", "formSubmitted", e);
417
+ u("[nylas-editor-tabs]", "formSubmitted", e);
404
418
  }
405
419
  },
406
420
  localPropsToProp: /* @__PURE__ */ new Map([["schedulerPreviewLink", "schedulerPreviewLink"]]),
407
421
  fireRegisterEvent: !0
408
422
  }),
409
- j("design:type", Function),
410
- j("design:paramtypes", []),
411
- j("design:returntype", void 0)
412
- ], wt.prototype, "render", null);
413
- wt.style = Nt;
414
- const Ot = ':host{display:grid;grid-auto-flow:row;width:100%;font-family:inherit;font-optical-sizing:auto;--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}.header{display:flex;align-items:center;justify-content:space-between;margin-bottom:1rem;gap:1rem}@media screen and (max-width: 768px){.header{flex-direction:column;gap:0.5rem;align-items:unset}}.header h2{margin:0;font-size:1.25rem;color:var(--nylas-base-900);font-weight:600}.header p{margin:0;font-size:1rem;color:var(--nylas-base-700)}.header .actions{justify-self:end}@media screen and (max-width: 768px){.header .actions{width:100%}}.configurations{border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);background:var(--nylas-base-0);height:100%;display:flex;flex-direction:column;position:relative;overflow-y:auto}.configurations table{width:100%;border-spacing:0;border-collapse:collapse;font-family:inherit;height:max-content}.configurations table.no-configurations{height:100%}.configurations table tr{color:var(--nylas-base-800);border-bottom:1px solid var(--nylas-base-200);font-family:inherit}.configurations table tr.hide{display:none}.configurations table th{font-weight:600;text-transform:uppercase;font-size:14px;line-height:20px}.configurations table th.actions-header{text-align:right}.configurations table tr.no-configurations td>div{display:flex;height:100%;justify-content:center;align-items:center;flex-direction:column;padding:var(--nylas-border-radius-3x)}.configurations table tr.no-configurations td>div h3{margin:0 0 1rem 0;color:var(--nylas-base-700)}.configurations table tr.no-configurations td>div p{margin:0 0 1rem 0;color:var(--nylas-base-600)}.configurations table tr.no-configurations td>div calendar-icon{margin-bottom:1rem;color:var(--nylas-base-200)}.configurations table th,.configurations table td{text-align:left;padding:1rem;font-family:inherit}.configurations table .actions{text-align:right}.configurations table .actions{display:flex;justify-content:flex-end;gap:1rem}@media screen and (max-width: 768px){.configurations table .actions{flex-direction:column;gap:0.5rem}}.configurations table .title{display:flex;flex-direction:column}.configurations table .title .config-event-title{font-weight:600}.configurations table .title .config-event-description{font-size:0.75rem}.configurations .pagination{padding:1rem;position:sticky;top:100%;display:flex;justify-content:flex-end;gap:0.5rem;background:white;width:calc(100% - 2rem);z-index:2}.configurations .pagination td.arrows{display:flex;justify-content:flex-end;gap:0.5rem}.configurations .pagination button{display:flex;flex-direction:row;justify-content:center;align-items:center;height:3vh;width:3vh;min-width:3em;min-height:3em;cursor:pointer;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-300);background-color:transparent;color:var(--nylas-base-800);cursor:pointer}.configurations .pagination button:hover:not(:disabled){border:1px solid var(--nylas-primary)}.configurations .pagination button:active{border:1px solid var(--nylas-base-800)}.configurations .pagination button:disabled{border:1px solid var(--nylas-base-100);background-color:transparent;color:var(--nylas-base-300);cursor:not-allowed}.configurations .pagination button.right{transform:rotate(180deg)}.error-container{margin-top:1.5rem}.error-container .error{color:var(--nylas-error);padding:0.5rem 0;margin:1rem 0 0}button-component#copy button{width:108px}select-dropdown{width:auto}select-dropdown::part(sd_dropdown-button){display:block;height:48px;padding:0px 16px 8px}@media screen and (max-width: 768px){select-dropdown::part(sd_dropdown-button){width:92px}}select-dropdown::part(sd_dropdown-content){width:120px;right:0}select-dropdown::part(sd_dropdown-labelhtml){display:flex;gap:0.5rem;align-items:center;color:var(--nylas-base-900)}select-dropdown::part(sd_dropdown-labelhtml):hover{color:var(--nylas-primary)}', It = Ot;
415
- var Mt = function(t, e, a, o) {
416
- var r = arguments.length, n = r < 3 ? e : o === null ? o = Object.getOwnPropertyDescriptor(e, a) : o, l;
423
+ U("design:type", Function),
424
+ U("design:paramtypes", []),
425
+ U("design:returntype", void 0)
426
+ ], kt.prototype, "render", null);
427
+ kt.style = Et;
428
+ const It = ':host{display:grid;grid-auto-flow:row;width:100%;font-family:inherit;font-optical-sizing:auto;--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}.header{display:flex;align-items:center;justify-content:space-between;margin-bottom:1rem;gap:1rem}@media screen and (max-width: 768px){.header{flex-direction:column;gap:0.5rem;align-items:unset}}.header h2{margin:0;font-size:1.25rem;color:var(--nylas-base-900);font-weight:600}.header p{margin:0;font-size:1rem;color:var(--nylas-base-700)}.header .actions{justify-self:end}@media screen and (max-width: 768px){.header .actions{width:100%}}.configurations{border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);background:var(--nylas-base-0);height:100%;display:flex;flex-direction:column;position:relative;overflow-y:auto}.configurations table{width:100%;border-spacing:0;border-collapse:collapse;font-family:inherit;height:max-content}.configurations table.no-configurations{height:100%}.configurations table tr{color:var(--nylas-base-800);border-bottom:1px solid var(--nylas-base-200);font-family:inherit}.configurations table tr.hide{display:none}.configurations table th{font-weight:600;text-transform:uppercase;font-size:14px;line-height:20px}.configurations table th.actions-header{text-align:right}.configurations table tr.no-configurations td>div{display:flex;height:100%;justify-content:center;align-items:center;flex-direction:column;padding:var(--nylas-border-radius-3x)}.configurations table tr.no-configurations td>div h3{margin:0 0 1rem 0;color:var(--nylas-base-700)}.configurations table tr.no-configurations td>div p{margin:0 0 1rem 0;color:var(--nylas-base-600)}.configurations table tr.no-configurations td>div calendar-icon{margin-bottom:1rem;color:var(--nylas-base-200)}.configurations table th,.configurations table td{text-align:left;padding:1rem;font-family:inherit}.configurations table .actions{text-align:right}.configurations table .actions{display:flex;justify-content:flex-end;gap:1rem}@media screen and (max-width: 768px){.configurations table .actions{flex-direction:column;gap:0.5rem}}.configurations table .title{display:flex;flex-direction:column}.configurations table .title .config-event-title{font-weight:600}.configurations table .title .config-event-description{font-size:0.75rem}.configurations .pagination{padding:1rem;position:sticky;top:100%;display:flex;justify-content:flex-end;gap:0.5rem;background:white;width:calc(100% - 2rem);z-index:2}.configurations .pagination td.arrows{display:flex;justify-content:flex-end;gap:0.5rem}.configurations .pagination button{display:flex;flex-direction:row;justify-content:center;align-items:center;height:3vh;width:3vh;min-width:3em;min-height:3em;cursor:pointer;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-300);background-color:transparent;color:var(--nylas-base-800);cursor:pointer}.configurations .pagination button:hover:not(:disabled){border:1px solid var(--nylas-primary)}.configurations .pagination button:active{border:1px solid var(--nylas-base-800)}.configurations .pagination button:disabled{border:1px solid var(--nylas-base-100);background-color:transparent;color:var(--nylas-base-300);cursor:not-allowed}.configurations .pagination button.right{transform:rotate(180deg)}.error-container{margin-top:1.5rem}.error-container .error{color:var(--nylas-error);padding:0.5rem 0;margin:1rem 0 0}button-component#copy button{width:108px}select-dropdown{width:auto}select-dropdown::part(sd_dropdown-button){display:block;height:48px;padding:0px 16px 8px}@media screen and (max-width: 768px){select-dropdown::part(sd_dropdown-button){width:92px}}select-dropdown::part(sd_dropdown-content){width:120px;right:0}select-dropdown::part(sd_dropdown-labelhtml){display:flex;gap:0.5rem;align-items:center;color:var(--nylas-base-900)}select-dropdown::part(sd_dropdown-labelhtml):hover{color:var(--nylas-primary)}', Rt = It;
429
+ var Mt = function(t, e, a, s) {
430
+ var r = arguments.length, n = r < 3 ? e : s === null ? s = Object.getOwnPropertyDescriptor(e, a) : s, l;
417
431
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
418
- n = Reflect.decorate(t, e, a, o);
432
+ n = Reflect.decorate(t, e, a, s);
419
433
  else
420
- for (var s = t.length - 1; s >= 0; s--)
421
- (l = t[s]) && (n = (r < 3 ? l(n) : r > 3 ? l(e, a, n) : l(e, a)) || n);
434
+ for (var o = t.length - 1; o >= 0; o--)
435
+ (l = t[o]) && (n = (r < 3 ? l(n) : r > 3 ? l(e, a, n) : l(e, a)) || n);
422
436
  return r > 3 && n && Object.defineProperty(e, a, n), n;
423
- }, z = function(t, e) {
437
+ }, $ = function(t, e) {
424
438
  if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
425
439
  return Reflect.metadata(t, e);
426
440
  };
427
- const kt = class {
441
+ const xt = class {
428
442
  constructor(t) {
429
- R(this, t), this.initListConfigurations = k(this, "initListConfigurations", 7), this.createButtonClick = k(this, "createButtonClick", 7), this.editButtonClick = k(this, "editButtonClick", 7), this.deleteButtonClick = k(this, "deleteButtonClick", 7), this.configurations = [], this.schedulerPreviewLink = "", this.listConfigurationsNextCursor = void 0, this.state = "loading", this.error = "", this.currentCursor = null, this.previousCursors = [], this.disableNextPageButton = !1;
443
+ A(this, t), this.initListConfigurations = C(this, "initListConfigurations", 7), this.createButtonClick = C(this, "createButtonClick", 7), this.editButtonClick = C(this, "editButtonClick", 7), this.deleteButtonClick = C(this, "deleteButtonClick", 7), this.configurations = [], this.schedulerPreviewLink = "", this.listConfigurationsNextCursor = void 0, this.state = "loading", this.error = "", this.currentCursor = null, this.previousCursors = [], this.disableNextPageButton = !1;
430
444
  }
431
445
  listConfigurationsNextCursorChangedHandler(t, e) {
432
446
  if (!t || t === e) {
@@ -436,31 +450,31 @@ const kt = class {
436
450
  this.disableNextPageButton = !1, this.currentCursor = t;
437
451
  }
438
452
  connectedCallback() {
439
- h("[nylas-list-configurations]", "connectedCallback");
453
+ u("[nylas-list-configurations]", "connectedCallback");
440
454
  }
441
455
  componentWillLoad() {
442
- h("[nylas-list-configurations]", "componentWillLoad"), this.configurations && this.configurations.length > 0 && (this.state = "loaded");
456
+ u("[nylas-list-configurations]", "componentWillLoad"), this.configurations && this.configurations.length > 0 && (this.state = "loaded");
443
457
  }
444
458
  componentDidLoad() {
445
- h("[nylas-list-configurations]", "componentDidLoad"), this.initListConfigurations.emit({
459
+ u("[nylas-list-configurations]", "componentDidLoad"), this.initListConfigurations.emit({
446
460
  host: this.host
447
461
  });
448
462
  }
449
463
  disconnectedCallback() {
450
- h("[nylas-list-configurations]", "disconnectedCallback");
464
+ u("[nylas-list-configurations]", "disconnectedCallback");
451
465
  }
452
466
  async handleNylasFormDropdownChanged(t) {
453
- h("[nylas-list-configurations]", "handleNylasFormDropdownChanged", t.detail);
454
- const { value: e } = t.detail, [a, o] = e.split("-");
467
+ u("[nylas-list-configurations]", "handleNylasFormDropdownChanged", t.detail);
468
+ const { value: e } = t.detail, [a, s] = e.split("-");
455
469
  switch (t.preventDefault(), a) {
456
470
  case "delete":
457
- this.deleteButtonClick.emit({ host: this.host, configuration: this.configurations[o] });
471
+ this.deleteButtonClick.emit({ host: this.host, configuration: this.configurations[s] });
458
472
  break;
459
473
  case "preview":
460
- window.open(A(this.schedulerPreviewLink, this.configurations[o]), "_blank");
474
+ window.open(Z(this.schedulerPreviewLink, this.configurations[s]), "_blank");
461
475
  break;
462
476
  case "copy":
463
- await navigator.clipboard.writeText(A(this.schedulerPreviewLink, this.configurations[o]));
477
+ await navigator.clipboard.writeText(Z(this.schedulerPreviewLink, this.configurations[s]));
464
478
  break;
465
479
  }
466
480
  }
@@ -513,7 +527,7 @@ const kt = class {
513
527
  }));
514
528
  }
515
529
  render() {
516
- return i(gt, null, i("div", { class: "header" }, i("div", { class: "description" }, i("h2", null, "All scheduling pages"), i("p", null, "Create, edit and manage all your scheduling pages.")), this.configurations && this.configurations.length > 0 && i("div", { class: "actions" }, i("button-component", { clickHandler: () => {
530
+ return i(vt, null, i("div", { class: "header" }, i("div", { class: "description" }, i("h2", null, "All scheduling pages"), i("p", null, "Create, edit and manage all your scheduling pages.")), this.configurations && this.configurations.length > 0 && i("div", { class: "actions" }, i("button-component", { clickHandler: () => {
517
531
  this.createButtonClick.emit(this.host);
518
532
  } }, "Create new"))), i("div", { class: "configurations" }, i("table", { class: {
519
533
  "no-configurations": this.state !== "loading" && (!this.configurations || this.configurations.length === 0)
@@ -530,7 +544,7 @@ const kt = class {
530
544
  ], defaultSelectedOption: { value: "", label: "" }, dropdownButtonText: "...", withSearch: !1, withChevron: !1, exportparts: "sd_dropdown: actions__dropdown, sd_dropdown-button: actions__dropdown-button, sd_dropdown-content: actions__dropdown-content" })))))), i("div", { class: "pagination" }, i("button", { class: "arrow left", onClick: () => this.previousPageClickedHandler(), disabled: this.previousCursors.length <= 0 }, i("chevron-icon", null)), i("button", { class: "arrow right", onClick: () => this.nextPageClickedHandler(), disabled: this.disableNextPageButton }, i("chevron-icon", null)))), this.state === "error" && i("div", { class: "error-container" }, i("p", { class: "error" }, this.error)));
531
545
  }
532
546
  get host() {
533
- return _t(this);
547
+ return wt(this);
534
548
  }
535
549
  static get watchers() {
536
550
  return {
@@ -539,7 +553,7 @@ const kt = class {
539
553
  }
540
554
  };
541
555
  Mt([
542
- vt({
556
+ Ct({
543
557
  name: "nylas-list-configurations",
544
558
  stateToProps: /* @__PURE__ */ new Map([
545
559
  ["schedulerConfig.configurations", "configurations"],
@@ -548,9 +562,9 @@ Mt([
548
562
  localPropsToProp: /* @__PURE__ */ new Map([["schedulerPreviewLink", "schedulerPreviewLink"]]),
549
563
  eventToProps: {
550
564
  initListConfigurations: async (t, e) => {
551
- const { host: a, cursor: o } = t.detail;
565
+ const { host: a, cursor: s } = t.detail;
552
566
  await a.setState("loading");
553
- const [r, n] = await e.schedulerConfig.getConfigurations(o);
567
+ const [r, n] = await e.schedulerConfig.getConfigurations(s);
554
568
  if (!r && n && n.message) {
555
569
  await a.setState("error"), await a.setError(n.message);
556
570
  return;
@@ -561,7 +575,7 @@ Mt([
561
575
  e.schedulerConfigStore.resetSelectedConfiguration(), e.schedulerConfigStore.state.action = "create";
562
576
  },
563
577
  deleteButtonClick: async (t, e) => {
564
- const { host: a, configuration: o } = t.detail, [r, n] = await e.schedulerConfig.deleteConfiguration(o.id);
578
+ const { host: a, configuration: s } = t.detail, [r, n] = await e.schedulerConfig.deleteConfiguration(s.id);
565
579
  !r && n && n.message && (await a.setState("error"), await a.setError(n.message));
566
580
  },
567
581
  editButtonClick: async (t, e) => {
@@ -571,14 +585,14 @@ Mt([
571
585
  },
572
586
  fireRegisterEvent: !0
573
587
  }),
574
- z("design:type", Function),
575
- z("design:paramtypes", []),
576
- z("design:returntype", void 0)
577
- ], kt.prototype, "render", null);
578
- kt.style = It;
588
+ $("design:type", Function),
589
+ $("design:paramtypes", []),
590
+ $("design:returntype", void 0)
591
+ ], xt.prototype, "render", null);
592
+ xt.style = Rt;
579
593
  export {
580
- Tt as google_logo_icon,
581
- Bt as microsoft_logo_icon,
582
- wt as nylas_editor_tabs,
583
- kt as nylas_list_configurations
594
+ Ft as google_logo_icon,
595
+ Dt as microsoft_logo_icon,
596
+ kt as nylas_editor_tabs,
597
+ xt as nylas_list_configurations
584
598
  };