@nylas/react 1.3.6 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (219) hide show
  1. package/dist/add-circle-icon_2.entry-04909861.cjs +1 -0
  2. package/dist/add-circle-icon_2.entry-0d9ba871.js +26 -0
  3. package/dist/archive-icon.entry-3d6d9d3f.js +16 -0
  4. package/dist/archive-icon.entry-88459432.cjs +1 -0
  5. package/dist/{arrow-icon.entry-9cfd86a1.js → arrow-icon.entry-789ee889.js} +3 -2
  6. package/dist/arrow-icon.entry-c35e1933.cjs +1 -0
  7. package/dist/bold-icon.entry-827e95bf.cjs +1 -0
  8. package/dist/{bold-icon.entry-eab3420d.js → bold-icon.entry-fbb382d2.js} +7 -6
  9. package/dist/{button-component_2.entry-7cd5f9c0.js → button-component_2.entry-6c012ee4.js} +10 -9
  10. package/dist/button-component_2.entry-acd13f45.cjs +1 -0
  11. package/dist/calendar-agenda-fill-icon_36.entry-1bb3b1a8.js +4689 -0
  12. package/dist/calendar-agenda-fill-icon_36.entry-fa8121df.cjs +6 -0
  13. package/dist/calendar-cancel-icon.entry-2e97f7d8.cjs +1 -0
  14. package/dist/{calendar-cancel-icon.entry-299d6fba.js → calendar-cancel-icon.entry-a4d040db.js} +6 -5
  15. package/dist/{calendar-check-icon_2.entry-08ef8d2f.js → calendar-check-icon_2.entry-a48a358d.js} +12 -11
  16. package/dist/calendar-check-icon_2.entry-bca4821d.cjs +1 -0
  17. package/dist/{calendar-icon.entry-53b54115.js → calendar-icon.entry-57727659.js} +6 -5
  18. package/dist/calendar-icon.entry-a289313a.cjs +1 -0
  19. package/dist/checkbox-component.entry-af3e7005.cjs +1 -0
  20. package/dist/checkbox-component.entry-f4f98226.js +43 -0
  21. package/dist/checkmark-icon_15.entry-dace1b62.cjs +5 -0
  22. package/dist/checkmark-icon_15.entry-f43549b3.js +1337 -0
  23. package/dist/chevron-icon_3.entry-219b42e6.cjs +1 -0
  24. package/dist/chevron-icon_3.entry-25533d13.js +148 -0
  25. package/dist/clock-icon_4.entry-3917c667.cjs +1 -0
  26. package/dist/{clock-icon_4.entry-0e809dcb.js → clock-icon_4.entry-76f29f7e.js} +9 -8
  27. package/dist/{constants-6da0ede7-49c32ba7.js → constants-3d8016e3-3c080f00.js} +110 -41
  28. package/dist/constants-3d8016e3-fd6c3848.cjs +1 -0
  29. package/dist/customParseFormat-6c652dbb-8a42d5b0.js +135 -0
  30. package/dist/customParseFormat-6c652dbb-ba81ab97.cjs +1 -0
  31. package/dist/{delete-icon.entry-802084f6.js → delete-icon.entry-3b61864e.js} +8 -7
  32. package/dist/delete-icon.entry-96420b21.cjs +1 -0
  33. package/dist/{document-refresh-icon.entry-d1604f53.js → document-refresh-icon.entry-7333b7c9.js} +6 -5
  34. package/dist/document-refresh-icon.entry-8b5c6b9b.cjs +1 -0
  35. package/dist/elements/index.d.ts +10 -0
  36. package/dist/{feedbackSync-c040f483-2b6476c4.js → feedbackSync-352aaf4a-b2b83cfa.js} +1 -1
  37. package/dist/{feedbackSync-c040f483-d6dd0560.cjs → feedbackSync-352aaf4a-ba1bf452.cjs} +1 -1
  38. package/dist/{folder-icon.entry-6c0c09ed.js → folder-icon.entry-bb5e2452.js} +5 -4
  39. package/dist/folder-icon.entry-d2e46d3a.cjs +1 -0
  40. package/dist/forward-icon.entry-1fcf5a6b.cjs +1 -0
  41. package/dist/forward-icon.entry-af8d2147.js +16 -0
  42. package/dist/globe-icon_2.entry-b4b55760.cjs +1 -0
  43. package/dist/globe-icon_2.entry-cc6d9d67.js +200 -0
  44. package/dist/google-logo-icon_6.entry-aa7b5b42.js +1484 -0
  45. package/dist/google-logo-icon_6.entry-eefdec63.cjs +2 -0
  46. package/dist/google-meet-icon_5.entry-9758e527.js +56 -0
  47. package/dist/google-meet-icon_5.entry-c545537a.cjs +1 -0
  48. package/dist/inbox-icon.entry-b9640d5a.cjs +1 -0
  49. package/dist/inbox-icon.entry-c005ebc5.js +16 -0
  50. package/dist/index-05630f15.cjs +57 -0
  51. package/dist/index-78390f2e.js +17607 -0
  52. package/dist/index.d.ts +1 -3
  53. package/dist/{index.es-2b014ec7-72557487.js → index.es-4a203e8e-cf485db5.js} +818 -804
  54. package/dist/{index.es-2b014ec7-0589e68a.cjs → index.es-4a203e8e-f668b8c2.cjs} +6 -6
  55. package/dist/info-icon_2.entry-b17298b6.js +35 -0
  56. package/dist/info-icon_2.entry-ecbc6605.cjs +1 -0
  57. package/dist/input-component.entry-24366ab8.cjs +1 -0
  58. package/dist/input-component.entry-9da5da6c.js +84 -0
  59. package/dist/input-dropdown_2.entry-0109b06c.cjs +1 -0
  60. package/dist/input-dropdown_2.entry-d65f7152.js +231 -0
  61. package/dist/italic-icon.entry-afa4332a.cjs +1 -0
  62. package/dist/{italic-icon.entry-d610e66f.js → italic-icon.entry-d0a536f2.js} +3 -2
  63. package/dist/multi-select-dropdown_2.entry-2c7a1a06.cjs +1 -0
  64. package/dist/multi-select-dropdown_2.entry-c56b5fd2.js +187 -0
  65. package/dist/notebook-store-b61693cd-0877e7a2.js +14 -0
  66. package/dist/notebook-store-b61693cd-a7b8ae37.cjs +5 -0
  67. package/dist/nylas-booked-event-card_12.entry-827c7fb4.cjs +1 -0
  68. package/dist/nylas-booked-event-card_12.entry-960fdfe2.js +1422 -0
  69. package/dist/nylas-call-summary.entry-1cce1446.js +16 -0
  70. package/dist/nylas-call-summary.entry-f10f3c54.cjs +1 -0
  71. package/dist/nylas-event-calendar_3.entry-8bb08ed3.js +9705 -0
  72. package/dist/nylas-event-calendar_3.entry-b656237b.cjs +6 -0
  73. package/dist/nylas-form-card.entry-62578338.cjs +1 -0
  74. package/dist/nylas-form-card.entry-7455b8f1.js +58 -0
  75. package/dist/nylas-if-state.entry-0897dc70.cjs +1 -0
  76. package/dist/{nylas-if-state.entry-ee7d92b0.js → nylas-if-state.entry-7fa6d392.js} +4 -3
  77. package/dist/nylas-key-points.entry-449e1be0.js +29 -0
  78. package/dist/nylas-key-points.entry-693f33a1.cjs +1 -0
  79. package/dist/nylas-login.entry-36544dc8.cjs +1 -0
  80. package/dist/{nylas-login.entry-265f9d0f.js → nylas-login.entry-d7082306.js} +4 -3
  81. package/dist/{nylas-provider.entry-5605a3e0.js → nylas-provider.entry-a0e7ce4d.js} +6 -5
  82. package/dist/nylas-provider.entry-b93d2a62.cjs +1 -0
  83. package/dist/nylas-scheduler-editor.entry-332d27e0.cjs +2 -0
  84. package/dist/{nylas-scheduler-editor.entry-b3e085b3.js → nylas-scheduler-editor.entry-78fe5abf.js} +524 -266
  85. package/dist/nylas-scheduling.entry-1d80c349.cjs +1 -0
  86. package/dist/nylas-scheduling.entry-fa9ff55b.js +439 -0
  87. package/dist/nylas-transcript.entry-570d3abe.cjs +6 -0
  88. package/dist/nylas-transcript.entry-b129565c.js +128 -0
  89. package/dist/nylas-video-player.entry-9c7c9792.cjs +1 -0
  90. package/dist/nylas-video-player.entry-e208d443.js +39 -0
  91. package/dist/nylas-video-preview.entry-a3f542ad.js +16 -0
  92. package/dist/nylas-video-preview.entry-bd9bdda7.cjs +1 -0
  93. package/dist/{person-icon.entry-85660f98.js → person-icon.entry-82fbc43e.js} +8 -7
  94. package/dist/person-icon.entry-e4d11400.cjs +1 -0
  95. package/dist/play-icon.entry-68bc660a.js +16 -0
  96. package/dist/play-icon.entry-9cab598b.cjs +1 -0
  97. package/dist/radio-button-group.entry-6a2adf11.cjs +1 -0
  98. package/dist/radio-button-group.entry-f7679911.js +47 -0
  99. package/dist/react.cjs +1 -1
  100. package/dist/react.js +134 -125
  101. package/dist/refresh-icon.entry-0f1e5f20.cjs +1 -0
  102. package/dist/{refresh-icon.entry-d8644f5d.js → refresh-icon.entry-394b0814.js} +6 -5
  103. package/dist/{register-component-e9c10e19-80bbc4dd.cjs → register-component-1027b769-62812558.cjs} +1 -1
  104. package/dist/{register-component-e9c10e19-099fb50f.js → register-component-1027b769-dd21b16d.js} +1 -1
  105. package/dist/{reply-all-icon.entry-f209daeb.js → reply-all-icon.entry-0fad8f2f.js} +5 -4
  106. package/dist/reply-all-icon.entry-1680f1e5.cjs +1 -0
  107. package/dist/{reply-icon.entry-d37a129b.js → reply-icon.entry-5f4b7837.js} +5 -4
  108. package/dist/reply-icon.entry-77342442.cjs +1 -0
  109. package/dist/scheduler-config-store-d6729d8d-06a3a314.cjs +1 -0
  110. package/dist/{scheduler-config-store-ed4a8dfd-35ec90c6.js → scheduler-config-store-d6729d8d-854b5da8.js} +4 -1
  111. package/dist/scheduler-store-f3e2a26f-7cee436f.cjs +1 -0
  112. package/dist/scheduler-store-f3e2a26f-85df53f7.js +533 -0
  113. package/dist/sent-icon.entry-20a8945d.cjs +1 -0
  114. package/dist/sent-icon.entry-2d122865.js +16 -0
  115. package/dist/spam-icon.entry-86178cc5.cjs +1 -0
  116. package/dist/spam-icon.entry-9e374d44.js +16 -0
  117. package/dist/star-icon.entry-1b94c861.cjs +1 -0
  118. package/dist/{star-icon.entry-9b22bb32.js → star-icon.entry-bb1b517d.js} +7 -6
  119. package/dist/stop-icon.entry-7b21833b.cjs +1 -0
  120. package/dist/{stop-icon.entry-1f7918b2.js → stop-icon.entry-e4d3526d.js} +3 -2
  121. package/dist/textarea-component.entry-ba3c9311.js +39 -0
  122. package/dist/textarea-component.entry-fdba933d.cjs +1 -0
  123. package/dist/toggle-switch.entry-4a980d1d.js +34 -0
  124. package/dist/toggle-switch.entry-9142a3d3.cjs +1 -0
  125. package/dist/{translate-icon.entry-8cffa646.js → translate-icon.entry-1657aa04.js} +5 -4
  126. package/dist/translate-icon.entry-b4908cf3.cjs +1 -0
  127. package/dist/trash-fill-icon.entry-a6791185.cjs +1 -0
  128. package/dist/trash-fill-icon.entry-c9e1769e.js +16 -0
  129. package/dist/{underline-icon.entry-afd9c78b.js → underline-icon.entry-1ba4d923.js} +5 -4
  130. package/dist/underline-icon.entry-d1f91e63.cjs +1 -0
  131. package/dist/warning-icon.entry-b1480f57.cjs +1 -0
  132. package/dist/{warning-icon.entry-53441175.js → warning-icon.entry-fe155c15.js} +5 -4
  133. package/package.json +12 -4
  134. package/dist/add-circle-icon.entry-25aecb13.js +0 -15
  135. package/dist/add-circle-icon.entry-5c49ba96.cjs +0 -1
  136. package/dist/archive-icon.entry-0a9e8ec3.cjs +0 -1
  137. package/dist/archive-icon.entry-89e31121.js +0 -15
  138. package/dist/arrow-icon.entry-19e5237c.cjs +0 -1
  139. package/dist/bold-icon.entry-d591e701.cjs +0 -1
  140. package/dist/button-component_2.entry-ce4314bf.cjs +0 -1
  141. package/dist/calendar-agenda-fill-icon_54.entry-7099138a.js +0 -5865
  142. package/dist/calendar-agenda-fill-icon_54.entry-9228dbe7.cjs +0 -8
  143. package/dist/calendar-cancel-icon.entry-6e3d20f1.cjs +0 -1
  144. package/dist/calendar-check-icon_2.entry-087dd913.cjs +0 -1
  145. package/dist/calendar-icon.entry-73f9d05b.cjs +0 -1
  146. package/dist/checkbox-component_3.entry-bc9768dd.cjs +0 -1
  147. package/dist/checkbox-component_3.entry-d828eb1d.js +0 -149
  148. package/dist/chevron-icon_3.entry-783588a9.js +0 -147
  149. package/dist/chevron-icon_3.entry-e956d78c.cjs +0 -1
  150. package/dist/clock-icon_4.entry-60d41dfd.cjs +0 -1
  151. package/dist/close-icon.entry-1b5d25c5.cjs +0 -1
  152. package/dist/close-icon.entry-fef4f624.js +0 -15
  153. package/dist/constants-6da0ede7-151395ad.cjs +0 -1
  154. package/dist/copy-icon.entry-25699ab8.js +0 -15
  155. package/dist/copy-icon.entry-ab6530e0.cjs +0 -1
  156. package/dist/core-js-38e53e34.cjs +0 -4
  157. package/dist/core-js-a9d3b6e1.js +0 -3297
  158. package/dist/delete-icon.entry-e99e1f82.cjs +0 -1
  159. package/dist/document-refresh-icon.entry-065a59f5.cjs +0 -1
  160. package/dist/dom-68f08be9.cjs +0 -15
  161. package/dist/dom-86e17616.js +0 -664
  162. package/dist/folder-icon.entry-351e61fc.cjs +0 -1
  163. package/dist/forward-icon.entry-0ccfb600.js +0 -15
  164. package/dist/forward-icon.entry-6b7af9cd.cjs +0 -1
  165. package/dist/globe-icon.entry-2b75b66b.cjs +0 -1
  166. package/dist/globe-icon.entry-5ddcd2cb.js +0 -15
  167. package/dist/google-logo-icon_4.entry-04174684.js +0 -790
  168. package/dist/google-logo-icon_4.entry-a685ff91.cjs +0 -1
  169. package/dist/inbox-icon.entry-0ad18b3f.js +0 -15
  170. package/dist/inbox-icon.entry-425d1ded.cjs +0 -1
  171. package/dist/index-7e7c24f1.js +0 -16837
  172. package/dist/index-81719cc6.cjs +0 -81
  173. package/dist/info-icon_2.entry-7ec02802.cjs +0 -1
  174. package/dist/info-icon_2.entry-a6d0e842.js +0 -34
  175. package/dist/input-color-picker.entry-d98d06ca.js +0 -48
  176. package/dist/input-color-picker.entry-ed9a1c07.cjs +0 -1
  177. package/dist/input-component.entry-2e57b00e.cjs +0 -1
  178. package/dist/input-component.entry-f3aa3419.js +0 -70
  179. package/dist/input-dropdown_2.entry-0d9c8475.js +0 -228
  180. package/dist/input-dropdown_2.entry-6fc7df16.cjs +0 -1
  181. package/dist/italic-icon.entry-7a8712f2.cjs +0 -1
  182. package/dist/multi-select-dropdown.entry-b31d9f11.js +0 -116
  183. package/dist/multi-select-dropdown.entry-eaa268b4.cjs +0 -1
  184. package/dist/nylas-booked-event-card_12.entry-45514813.js +0 -1378
  185. package/dist/nylas-booked-event-card_12.entry-498de30a.cjs +0 -1
  186. package/dist/nylas-form-card.entry-67aec298.js +0 -57
  187. package/dist/nylas-form-card.entry-fdb3c114.cjs +0 -1
  188. package/dist/nylas-if-state.entry-76b38c9c.cjs +0 -1
  189. package/dist/nylas-login.entry-589e45d0.cjs +0 -1
  190. package/dist/nylas-provider.entry-cfb9627c.cjs +0 -1
  191. package/dist/nylas-scheduler-editor.entry-6fdfb9b5.cjs +0 -2
  192. package/dist/nylas-scheduling.entry-8cc5c353.cjs +0 -1
  193. package/dist/nylas-scheduling.entry-bc00beba.js +0 -424
  194. package/dist/nylas-time-window-picker.entry-a77c1d67.cjs +0 -1
  195. package/dist/nylas-time-window-picker.entry-c421303e.js +0 -316
  196. package/dist/person-icon.entry-36b21e95.cjs +0 -1
  197. package/dist/play-icon.entry-953b1bc8.js +0 -15
  198. package/dist/play-icon.entry-c35ade8a.cjs +0 -1
  199. package/dist/refresh-icon.entry-038501ca.cjs +0 -1
  200. package/dist/reply-all-icon.entry-ead9d0ba.cjs +0 -1
  201. package/dist/reply-icon.entry-b7f35ecd.cjs +0 -1
  202. package/dist/scheduler-config-store-ed4a8dfd-0d4408cf.cjs +0 -1
  203. package/dist/scheduler-store-dc3a7958-7c73f5e2.js +0 -487
  204. package/dist/scheduler-store-dc3a7958-99c6bdf6.cjs +0 -1
  205. package/dist/sent-icon.entry-b662ef5b.cjs +0 -1
  206. package/dist/sent-icon.entry-ec433cec.js +0 -15
  207. package/dist/spam-icon.entry-3a553ae4.js +0 -15
  208. package/dist/spam-icon.entry-a79819fd.cjs +0 -1
  209. package/dist/star-icon.entry-47ea44e7.cjs +0 -1
  210. package/dist/stop-icon.entry-26e2e633.cjs +0 -1
  211. package/dist/textarea-component.entry-6939d0fc.js +0 -38
  212. package/dist/textarea-component.entry-da0a861e.cjs +0 -1
  213. package/dist/toggle-switch.entry-5ae5ba46.js +0 -33
  214. package/dist/toggle-switch.entry-c5fd3e33.cjs +0 -1
  215. package/dist/translate-icon.entry-72e0369e.cjs +0 -1
  216. package/dist/trash-fill-icon.entry-815859c6.js +0 -15
  217. package/dist/trash-fill-icon.entry-8620c28f.cjs +0 -1
  218. package/dist/underline-icon.entry-ba1a9e87.cjs +0 -1
  219. package/dist/warning-icon.entry-7cbede6b.cjs +0 -1
@@ -1,790 +0,0 @@
1
- import { r as K, h as t, c as k, d as u, n as Le, i as d, o as te, H as Be, g as Pe, F as Te } from "./index-7e7c24f1.js";
2
- import { R as Ee } from "./register-component-e9c10e19-099fb50f.js";
3
- import { D as Fe } from "./constants-6da0ede7-49c32ba7.js";
4
- import { i as Ae, a as je, c as $e, b as Je, f as Ve } from "./feedbackSync-c040f483-2b6476c4.js";
5
- import "react";
6
- import "react-dom";
7
- const Ze = ".sc-google-logo-icon-h{display:flex}", Ge = Ze, We = class {
8
- constructor(e) {
9
- K(this, e), this.width = "24", this.height = "24";
10
- }
11
- render() {
12
- return t("svg", { key: "de9cae8990d7d127aa9fdd595dec79e80c79a84d", width: this.width, height: this.height, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, t("g", { key: "58338fde3c58a0b0c4d0df6ebb92f387eeba3a29", "clip-path": "url(#clip0_959_12452)" }, t("path", { key: "5eff0b6de57b59c3b3bec455ef60294c135fd001", 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" }), t("path", { key: "136b3c676f5f96bffb54d7ca2487b3c303835787", 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" }), t("path", { key: "d60273905016ff4377bcbc31775b28b39cce2b0e", 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" }), t("path", { key: "e6e1d4406f2b76b934a5d35c9840ad3fb2a1fed0", 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" })), t("defs", { key: "1c29b130c1afb95fec41a1bbb20988423982ee0c" }, t("clipPath", { key: "9aefb74a952ab05e9493b2b5a0b6b838311f066e", id: "clip0_959_12452" }, t("rect", { key: "c3c6ed00b1ef66992016c15520abdd4691ca21bf", width: 24, height: 24, fill: "white" }))));
13
- }
14
- };
15
- We.style = Ge;
16
- const qe = ".sc-microsoft-logo-icon-h{display:flex}", Ke = qe, Qe = class {
17
- constructor(e) {
18
- K(this, e), this.width = "22", this.height = "22";
19
- }
20
- render() {
21
- return t("svg", { key: "20d8f297cf0cc69b7c398b6d0c24ca60a5c67109", width: this.width, height: this.height, viewBox: "0 0 22 22", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "dc420eb9c73909acfc6731606b24d015a600f34e", d: "M0.043457 0.043457H10.4782V10.4782H0.043457V0.043457Z", fill: "#F35325" }), t("path", { key: "d22732be730bc90dcd3b415b9e5bba8de185ad87", d: "M11.5217 0.043457H21.9565V10.4782H11.5217V0.043457Z", fill: "#81BC06" }), t("path", { key: "8c8bff7ba92cad76967ccf67c7b3435d07193091", d: "M0.043457 11.5217H10.4782V21.9565H0.043457V11.5217Z", fill: "#05A6F0" }), t("path", { key: "51d0a3be2495c599aee6062c51fb4bd531fd4b5c", d: "M11.5217 11.5217H21.9565V21.9565H11.5217V11.5217Z", fill: "#FFBA08" }));
22
- }
23
- };
24
- Qe.style = Ke;
25
- var r;
26
- (function(e) {
27
- e.EventInfo = "eventInfo", e.Availability = "availability", e.BookingOptions = "bookingOptions", e.Communications = "communications", e.Participants = "participants", e.BookingForm = "bookingForm", e.PageStyles = "pageStyles";
28
- })(r || (r = {}));
29
- function Xe({ id: e, formState: a, activeTab: n }, s) {
30
- return console.log("formState?.disableEmails", a == null ? void 0 : a.disableEmails), t(
31
- Te,
32
- null,
33
- t(
34
- "div",
35
- { key: `event-info-${e}`, class: { hide: n !== r.EventInfo } },
36
- t(
37
- "nylas-event-info",
38
- null,
39
- t(
40
- "div",
41
- { slot: "inputs" },
42
- t("nylas-event-title", { name: "title", exportparts: "net, net__title, net__dropdown-content" }),
43
- t("nylas-event-duration", { name: "duration", exportparts: "ned, ned__dropdown, ned__dropdown-button, ned__dropdown-content, ned__input_dropdown, ned__input_dropdown-input, ned__input_dropdown-content" }),
44
- t("nylas-event-location", { name: "location", exportparts: "nel, nel__location, nel__dropdown, nel__dropdown-button, nel__dropdown-content" }),
45
- t("nylas-event-description", { name: "description", exportparts: "nedesc, nedesc__textarea" })
46
- )
47
- )
48
- ),
49
- t(
50
- "div",
51
- { key: `availability-${e}`, class: { hide: n !== r.Availability } },
52
- t("nylas-participant-booking-calendars", { participants: a.participants, name: "participant-booking-calendars", exportparts: "npbc, npbc__header, npbc__content, npbc__participant-container, npbc__participant-title" }),
53
- t("nylas-connected-calendars", { participants: a.participants, name: "connected-calendars", exportparts: "nccals, nccals__header, nccals__content, nccals__container, nccals__title, nccals__toggle-container, npbc__participant-toggle-container" }),
54
- t("nylas-availability-picker", { name: "availability", exportparts: "nap, 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" })
55
- ),
56
- t(
57
- "div",
58
- { key: `booking-options-${e}`, class: { hide: n !== r.BookingOptions } },
59
- t("nylas-scheduling-method", { name: "availability-method", readOnly: !0, exportparts: "nsm, nsm__header, nsm__input-label, nsm__dropdown, nsm__dropdown-button, nsm__dropdown-content" }),
60
- t(
61
- "nylas-custom-booking-flow",
62
- { exportparts: "ncbflow, ncbflow__header, ncbflow__title, ncbflow__content" },
63
- t(
64
- "div",
65
- { slot: "inputs" },
66
- t("nylas-booking-confirmation-type", { name: "confirmation-type", exportparts: "nbct, nbct__header, nbct__dropdown, nbct__dropdown-button, nbct__dropdown-content" }),
67
- t("nylas-booking-confirmation-redirect", { name: "confirmation-redirect", exportparts: "nbcr, nbcr__header, nbcr__dropdown, nbcr__dropdown-button, nbcr__dropdown-content, nbcr__input-textfield" })
68
- )
69
- ),
70
- t("nylas-buffer-time", { name: "buffer-time", exportparts: "nbt, nbt__header, nbt__body, nbt__dropdown-before, nbt__dropdown-button-before, nbt__dropdown-content-before, nbt__dropdown-after, nbt__dropdown-button-after, nbt__dropdown-content-after, nbt__preview" }),
71
- t(
72
- "nylas-event-limits",
73
- null,
74
- t(
75
- "div",
76
- { slot: "inputs" },
77
- t("nylas-min-booking-notice", { name: "min-booking-notice", exportparts: "nmbn, nmbn__number-dropdown, nmbn__number-dropdown-button, nmbn__number-dropdown-content, nmbn__period-dropdown, nmbn__period-dropdown-button, nmbn__period-dropdown-content" }),
78
- t("nylas-limit-future-bookings", { name: "limit-future-bookings", exportparts: "nlfb, nlfb__number-dropdown, nlfb__number-dropdown-button, nlfb__number-dropdown-content, nlfb__period-dropdown, nlfb__period-dropdown-button, nlfb__period-dropdown-content" }),
79
- t("nylas-min-cancellation-notice", { name: "min-cancellation-notice", exportparts: "nmcn, nmcn__number-dropdown, nmcn__number-dropdown-button, nmcn__number-dropdown-content, nmcn__period-dropdown, nmcn__period-dropdown-button, nmcn__period-dropdown-content" }),
80
- t("nylas-cancellation-policy", { name: "cancellation-policy", exportparts: "ncpolicy, ncpolicy__textarea" })
81
- )
82
- ),
83
- t("nylas-timeslot-interval", { name: "timeslot-interval", exportparts: "nti, nti__header, nti__input-label, nti__dropdown, nti__dropdown-button, nti__dropdown-content" }),
84
- t("nylas-customize-booking-settings", { name: "customize-booking-settings", exportparts: "ncbs, ncbs__header, ncbs__settings, ncbs__settings-div, ncbs__additional_guests, ncbs__cancellation_options, ncbs__rescheduling_options" })
85
- ),
86
- t(
87
- "div",
88
- { key: `communications-${e}`, class: { hide: n !== r.Communications } },
89
- t("nylas-disable-emails", { name: "disable-emails", exportparts: "nde, nde__toggle-label, nde_toggle-input, nde_toggle-slider" }),
90
- !(a != null && a.disableEmails) && t(
91
- Te,
92
- null,
93
- t("nylas-confirmation-email", { name: "confirmation-email-template", exportparts: "nce, nce__tab-heading, nce__header, nce__body, nce__confirmation-email-toggle--container, nce__summary, nce__reminder-input_dropdown, nce__reminder-input_dropdown-input, nce__reminder-input_dropdown-content" }),
94
- t("nylas-reminder-emails", { name: "reminder-emails", exportparts: "nre, nre__tab-heading, nre__header, nre__body, nre__confirmation-email-toggle--container, nre__summary, nrt, nrt__number-dropdown, nrt__number-dropdown-button, nrt__number-dropdown-content, nrt__period-dropdown, nrt__period-dropdown-button, nrt__period-dropdown-content, nrt__time-period-selector" })
95
- )
96
- ),
97
- t(
98
- "div",
99
- { key: `participants-${e}`, class: { hide: n !== r.Participants } },
100
- t("nylas-additional-participants", { name: "participants", exportparts: "nap, nap__title, nap__subtitle, nap__content, nap__input_group, nap__input_wrapper, nap__input, nap__remove-participant" }),
101
- t("nylas-participants-custom-availability", { participants: a.participants, name: "participant-custom-availability", 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" })
102
- ),
103
- t(
104
- "div",
105
- { key: `page-styles-${e}`, class: { hide: n !== r.PageStyles } },
106
- t("nylas-custom-event-slug", { name: "custom-event-slug", exportparts: "nces, nces__body, nces__header, nces__drawer-toggle--container, nces__input-textfield" }),
107
- t("nylas-page-name", { name: "page-name", exportparts: "npn, npn__body, npn__header, npn__drawer-toggle--container, npn__input-textfield" }),
108
- t("nylas-page-styling", { name: "page-styling", exportparts: "nps, nps__header, nps__drawer-toggle--container, nps__body, nps__title-input-textfield, nps__company-logo-input-textfield, nps__color-picker, nps__color-picker-button, nps__color-picker-button-label, nps__color-picker-selected-label, nps__submit-button-label-input-textfield, nps__message-textarea" }, s)
109
- ),
110
- t(
111
- "div",
112
- { key: `booking-form-${e}`, class: { hide: n !== r.BookingForm } },
113
- t("nylas-booking-form-config", { name: "additional-fields", exportparts: "nbfc, nbfc__header, nbfc__add_field, nbfc__add_field-button, nbfc__add_field-content, nbfc__additional_fields, nbfc__form-field, nbfc__form-field-header, nbfc__form-field-content" })
114
- )
115
- );
116
- }
117
- const Ye = '.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;height:inherit}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs{height:calc(100% - 80px);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)}@media screen and (max-width: 768px){.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs{border-right:none}}.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;text-align:left;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.sc-nylas-editor-tabs:last-of-type{margin-bottom: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;overflow-x:hidden}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs .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 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}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs .tab-header.sc-nylas-editor-tabs{display:flex;flex-direction:column;margin:1rem 1rem 0.5rem;row-gap:4px}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs .tab-header.sc-nylas-editor-tabs h3.sc-nylas-editor-tabs{margin:0;font-size:16px;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs .tab-header.sc-nylas-editor-tabs p.sc-nylas-editor-tabs{margin:0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.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:16px;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}button-component#report-issue.sc-nylas-editor-tabs{width:auto}nylas-feedback-form.sc-nylas-editor-tabs{position:absolute;top:0;height:100%;width:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;background:rgba(0, 0, 0, 0.6);z-index:2;border-radius:inherit}', et = Ye;
118
- var tt = function(e, a, n, s) {
119
- var o = arguments.length, i = o < 3 ? a : s === null ? s = Object.getOwnPropertyDescriptor(a, n) : s, b;
120
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
121
- i = Reflect.decorate(e, a, n, s);
122
- else
123
- for (var l = e.length - 1; l >= 0; l--)
124
- (b = e[l]) && (i = (o < 3 ? b(i) : o > 3 ? b(a, n, i) : b(a, n)) || i);
125
- return o > 3 && i && Object.defineProperty(a, n, i), i;
126
- }, Y = function(e, a) {
127
- if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
128
- return Reflect.metadata(e, a);
129
- };
130
- const He = class {
131
- constructor(e) {
132
- K(this, e), this.schedulerConfigChanged = k(this, "schedulerConfigChanged", 7), this.schedulerConfigCreated = k(this, "schedulerConfigCreated", 7), this.cancelButtonClick = k(this, "cancelButtonClick", 7), this.formSubmitted = k(this, "formSubmitted", 7), this.previewButtonClicked = k(this, "previewButtonClicked", 7), this.schedulerEditorFormUpdated = k(this, "schedulerEditorFormUpdated", 7), this.formSubmissionHandler = async (a) => {
133
- var ae, ne, ie, se, oe, re, le, de, ce, be, he, ue, pe, me, fe, ye, ge;
134
- a.preventDefault();
135
- const n = await this.formSubmitted.emit();
136
- if (u("[nylas-editor-tabs]", "formSubmissionHandler", n), !this.formRef.checkValidity() || n.defaultPrevented) {
137
- this.error = this.formRef.validationMessage || "Please fix the form errors.";
138
- return;
139
- }
140
- this.isLoading = !0, this.hasUnsavedChanges = !1;
141
- const o = this.updateFormState();
142
- u("[nylas-editor-tabs]", "formState", o);
143
- const { title: i, description: b, duration: l, availability: h, bookingCalendar: y, location: L, bookingType: T, buffer: D, availableDaysInFuture: I, minCancellationNotice: N, minBookingNotice: M, cancellationPolicy: z, timeslotInterval: C, additionalGuestsHidden: U, hideCancellationOptions: R, hideReschedulingOptions: A, participants: w, participantOpenHours: m, additionalFields: j, participantCalendars: g, conferencing: $, participantBookingCalendars: f, reminders: J, emailTemplate: V, redirectUrl: Z, availabilityMethod: P, slug: G, appearance: W, name: q, disableEmails: E } = o, p = ((ne = (ae = this.selectedConfiguration) == null ? void 0 : ae.participants) == null ? void 0 : ne.find((c) => c.is_organizer)) || (w == null ? void 0 : w.find((c) => c.is_organizer)), S = g && (p != null && p.email) ? g[p == null ? void 0 : p.email] : [], _ = ((ie = p == null ? void 0 : p.booking) == null ? void 0 : ie.calendar_id) || y, v = l ? parseInt(l) : 30, x = w && (w == null ? void 0 : w.length) > 0 ? w : [
144
- {
145
- name: (p == null ? void 0 : p.name) ?? ((se = this.currentUser) == null ? void 0 : se.name) ?? "",
146
- email: (p == null ? void 0 : p.email) ?? ((oe = this.currentUser) == null ? void 0 : oe.email) ?? "",
147
- is_organizer: !0,
148
- timezone: (h == null ? void 0 : h.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
149
- availability: {
150
- calendar_ids: y && y !== "" ? [y] : ["primary"],
151
- open_hours: []
152
- },
153
- booking: {
154
- calendar_id: y && y !== "" ? y : "primary"
155
- }
156
- }
157
- ], H = {
158
- ...((re = this.selectedConfiguration) == null ? void 0 : re.id) && { id: this.selectedConfiguration.id },
159
- version: ((le = this.selectedConfiguration) == null ? void 0 : le.version) ?? "1.0.0",
160
- slug: G,
161
- name: q,
162
- availability: {
163
- duration_minutes: v,
164
- interval_minutes: (C == null ? void 0 : C.interval) ?? v,
165
- round_to: C == null ? void 0 : C.roundTo,
166
- availability_rules: {
167
- availability_method: P || (((be = (ce = (de = this.selectedConfiguration) == null ? void 0 : de.availability) == null ? void 0 : ce.availability_rules) == null ? void 0 : be.availability_method) ?? "collective"),
168
- buffer: D || { before: 0, after: 0 },
169
- default_open_hours: (h == null ? void 0 : h.openHours) ?? ((pe = (ue = (he = this.selectedConfiguration) == null ? void 0 : he.availability) == null ? void 0 : ue.availability_rules) == null ? void 0 : pe.default_open_hours) ?? Fe,
170
- round_robin_group_id: ((ye = (fe = (me = this.selectedConfiguration) == null ? void 0 : me.availability) == null ? void 0 : fe.availability_rules) == null ? void 0 : ye.round_robin_group_id) ?? ""
171
- }
172
- },
173
- participants: [
174
- ...x ? x.map((c) => {
175
- var _e, ve, we, ke, Ce, xe;
176
- let B = (h == null ? void 0 : h.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone;
177
- if ((_e = m == null ? void 0 : m[c.email]) != null && _e.length && (B = (we = (ve = m == null ? void 0 : m[c.email]) == null ? void 0 : ve[0]) == null ? void 0 : we.timezone), c.is_organizer) {
178
- const Se = f != null && f[c.email] ? f == null ? void 0 : f[c.email] : _ || "primary", X = g != null && g[c.email] ? g == null ? void 0 : g[c.email] : S != null && S.length ? S : ["primary"], Re = X.length === 1 && X[0] === "primary";
179
- return {
180
- name: c.name ?? "",
181
- email: c.email,
182
- is_organizer: !0,
183
- timezone: B,
184
- availability: {
185
- calendar_ids: Re ? [Se] : X,
186
- open_hours: (m == null ? void 0 : m[c.email]) ?? ((ke = c.availability) == null ? void 0 : ke.open_hours) ?? []
187
- },
188
- booking: {
189
- calendar_id: Se
190
- }
191
- };
192
- }
193
- const O = f != null && f[c.email] ? { calendar_id: f == null ? void 0 : f[c.email] } : (c == null ? void 0 : c.booking) ?? void 0, Q = (g == null ? void 0 : g[c.email]) ?? ((Ce = c.availability) == null ? void 0 : Ce.calendar_ids) ?? ["primary"], Ue = Q.length === 1 && Q[0] === "primary";
194
- return {
195
- ...c,
196
- timezone: B,
197
- availability: c.availability ? {
198
- calendar_ids: Ue && typeof O < "u" ? [O == null ? void 0 : O.calendar_id] : Q,
199
- open_hours: (m == null ? void 0 : m[c.email]) ?? ((xe = c.availability) == null ? void 0 : xe.open_hours) ?? []
200
- } : void 0,
201
- booking: O
202
- };
203
- }) : []
204
- ],
205
- event_booking: {
206
- title: (i == null ? void 0 : i.toString()) ?? "",
207
- description: (b == null ? void 0 : b.toString()) ?? "",
208
- location: (L == null ? void 0 : L.toString()) ?? "",
209
- booking_type: (T == null ? void 0 : T.toString()) ?? "booking",
210
- timezone: (h == null ? void 0 : h.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
211
- conferencing: $,
212
- reminders: J,
213
- disable_emails: typeof E == "boolean" ? E : !1
214
- },
215
- scheduler: {
216
- cancellation_policy: z ?? "",
217
- available_days_in_future: I ?? 30,
218
- min_cancellation_notice: N ?? 0,
219
- min_booking_notice: M ?? 60,
220
- hide_additional_guests: U ?? !1,
221
- hide_cancellation_options: R ?? !1,
222
- hide_rescheduling_options: A ?? !1,
223
- additional_fields: j,
224
- email_template: V,
225
- confirmation_redirect_url: Z
226
- },
227
- appearance: W
228
- }, De = Le(this.selectedConfiguration, H || {}), F = this.action === "create" ? De : H;
229
- this.isConfigRoundRobin(F) && (F.participants = F.participants.map((c) => ({ ...c, is_organizer: void 0 })));
230
- const Ie = (c) => {
231
- this.isLoading = !1, this.changesSaved = !0, setTimeout(() => {
232
- this.changesSaved = !1;
233
- }, 5e3);
234
- }, Ne = this.checkForBookingFormErrors(F), Me = ((ge = this.configurations) == null ? void 0 : ge.find((c) => {
235
- var B;
236
- return c.id === ((B = this.selectedConfiguration) == null ? void 0 : B.id);
237
- })) || {}, ze = this.checkForOrganizerConfirmationError(Le(F, Me));
238
- Ne || ze || this.schedulerConfigChanged.emit({ config: F, resetLoadingState: Ie, action: this.action, host: this.host });
239
- }, this.isConfigRoundRobin = (a) => {
240
- var n, s, o, i;
241
- return ((s = (n = a == null ? void 0 : a.availability) == null ? void 0 : n.availability_rules) == null ? void 0 : s.availability_method) === "max-availability" || ((i = (o = a.availability) == null ? void 0 : o.availability_rules) == null ? void 0 : i.availability_method) === "max-fairness";
242
- }, this.checkForOrganizerConfirmationError = (a) => {
243
- var b, l;
244
- let n = !1, s = "";
245
- const o = ((b = a.event_booking) == null ? void 0 : b.booking_type) === "organizer-confirmation", i = (l = a.scheduler) == null ? void 0 : l.organizer_confirmation_url;
246
- return o && !i && (s += "Organizer confirmation URL is required when using organizer confirmation booking type.", n = !0), n && (this.isLoading = !1, this.host.setError(new Error(s))), n;
247
- }, this.checkForBookingFormErrors = (a) => {
248
- var i;
249
- let n = !1, s = "";
250
- const o = (i = a.scheduler) == null ? void 0 : i.additional_fields;
251
- return o && (s = "Booking form error: ", Object.entries(o).forEach((b) => {
252
- const l = b[1];
253
- if (l.label === "") {
254
- s += `Label is required for field of type ${l.type}.`, n = !0;
255
- return;
256
- }
257
- if (l.options) {
258
- for (const h of l.options)
259
- if (h.trim() === "") {
260
- s += `Empty option detected inside ${l.label} of type ${l.type}.`, n = !0;
261
- break;
262
- }
263
- }
264
- })), n && (this.isLoading = !1, this.host.setError(new Error(s))), n;
265
- }, this.calendars = void 0, this.selectedConfiguration = void 0, this.configurations = void 0, this.currentUser = void 0, this.schedulerPreviewLink = "", this.mode = "app", this.hideEditorTabs = [], this.enableUserFeedback = !0, this.selectedLanguage = void 0, this.action = "create", this.showFeedbackModal = !1, this.activeTab = r.EventInfo, this.isLoading = !1, this.hasUnsavedChanges = !1, this.changesSaved = !1, this.formState = {}, this.error = "";
266
- }
267
- configChangedHandler(e) {
268
- u("[nylas-editor-tabs]", "configChangedHandler", e, this.selectedConfiguration), this.formState = {
269
- ...this.getFormStateFromConfig(e)
270
- }, e != null && e.id ? this.action = "edit" : this.action = "create";
271
- }
272
- userChangedHandler(e) {
273
- u("[nylas-editor-tabs]", "userChangedHandler", e), e && (this.formState = {
274
- ...this.getFormStateFromConfig(this.selectedConfiguration)
275
- });
276
- }
277
- selectedLanguageChangedHandler(e, a) {
278
- e !== a && d.changeLanguage(e);
279
- }
280
- async schedulerConfigCreatedEventHandler(e) {
281
- return this.schedulerConfigCreated.emit(e);
282
- }
283
- async setError(e) {
284
- this.error = e.message;
285
- }
286
- connectedCallback() {
287
- u("[nylas-editor-tabs]", "connectedCallback");
288
- }
289
- componentWillLoad() {
290
- u("[nylas-editor-tabs]", "componentWillLoad"), this.formState = this.getFormStateFromConfig(this.selectedConfiguration);
291
- }
292
- componentDidLoad() {
293
- var a, n;
294
- u("[nylas-editor-tabs]", "componentDidLoad"), this.enableUserFeedback && !Ae() && je({
295
- dsn: "https://9d5731f1c77ca84c9ed3fb9b3ccf7ee1@o74852.ingest.us.sentry.io/4507889638178816",
296
- release: "1.3.6",
297
- integrations: (s) => [
298
- ...s.filter((o) => !1),
299
- Ve({
300
- colorScheme: "system",
301
- autoInject: !1
302
- })
303
- ],
304
- autoSessionTracking: !1,
305
- beforeSend: () => null
306
- }), (a = this.selectedConfiguration) != null && a.id && this.configChangedHandler(this.selectedConfiguration);
307
- const e = (n = this.host.querySelector("button.tab:not(.hide)")) == null ? void 0 : n.name;
308
- e && (this.activeTab = e);
309
- }
310
- disconnectedCallback() {
311
- u("[nylas-editor-tabs]", "disconnectedCallback");
312
- }
313
- handleValueChanged(e) {
314
- u("[nylas-editor-tabs]", "handleValueChanged", e);
315
- const { name: a, value: n } = e.detail;
316
- this.setFormState(n, a), this.formState = { ...this.formState }, this.hasUnsavedChanges = !0, this.error = "", this.schedulerEditorFormUpdated.emit({
317
- value: e.detail.value,
318
- name: e.detail.name
319
- });
320
- }
321
- feedbackModalClosedHandler() {
322
- this.showFeedbackModal = !1;
323
- }
324
- feedbackSubmittedHandler(e) {
325
- var s, o, i, b, l, h;
326
- const n = {
327
- eventId: $e("Scheduler Editor User Feedback", {
328
- extra: {
329
- configId: (s = this.selectedConfiguration) == null ? void 0 : s.id,
330
- slug: (o = this.selectedConfiguration) == null ? void 0 : o.slug
331
- }
332
- }),
333
- message: e.detail.feedback
334
- };
335
- Je(n, {
336
- includeReplay: !0,
337
- captureContext: {
338
- tags: {
339
- "nylas-web-element": "nylas-scheduler-editor",
340
- "nylas-web-element-version": "1.3.6",
341
- "nylas-config-id": (i = this.selectedConfiguration) == null ? void 0 : i.id,
342
- "nylas-slug": (b = this.selectedConfiguration) == null ? void 0 : b.slug,
343
- "host-url": window.location.href
344
- },
345
- extra: {
346
- configId: (l = this.selectedConfiguration) == null ? void 0 : l.id,
347
- slug: (h = this.selectedConfiguration) == null ? void 0 : h.slug
348
- }
349
- }
350
- }), this.showFeedbackModal = !1;
351
- }
352
- getFormStateFromConfig(e) {
353
- var n, s, o, i, b, l, h, y, L, T, D, I, N, M, z, C, U, R, A, w, m, j, g, $, f, J, V, Z, P, G, W, q, E, p, S;
354
- let a = (n = e == null ? void 0 : e.participants) == null ? void 0 : n.find((_) => _.is_organizer);
355
- return !a && ((o = (s = e == null ? void 0 : e.availability) == null ? void 0 : s.availability_rules) == null ? void 0 : o.availability_method) !== "collective" && (a = (i = e == null ? void 0 : e.participants) == null ? void 0 : i.find((_) => {
356
- var v;
357
- return _.email === ((v = this.currentUser) == null ? void 0 : v.email);
358
- }), a && (a.is_organizer = !0)), e != null && e.appearance && console.info("Appearance settings have been returned from the given configuration; please remember to grab them from the configSettingsLoaded event and apply them as desired."), {
359
- title: ((b = e == null ? void 0 : e.event_booking) == null ? void 0 : b.title) ?? "",
360
- description: ((l = e == null ? void 0 : e.event_booking) == null ? void 0 : l.description) ?? "",
361
- duration: ((y = (h = e == null ? void 0 : e.availability) == null ? void 0 : h.duration_minutes) == null ? void 0 : y.toString()) ?? "30",
362
- availability: {
363
- timezone: ((L = e == null ? void 0 : e.event_booking) == null ? void 0 : L.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
364
- openHours: ((D = (T = e == null ? void 0 : e.availability) == null ? void 0 : T.availability_rules) == null ? void 0 : D.default_open_hours) ?? Fe
365
- },
366
- additionalFields: ((I = e == null ? void 0 : e.scheduler) == null ? void 0 : I.additional_fields) ?? {},
367
- conferencing: ((N = e == null ? void 0 : e.event_booking) == null ? void 0 : N.conferencing) ?? {},
368
- calendarIds: ((M = a == null ? void 0 : a.availability) == null ? void 0 : M.calendar_ids) ?? [],
369
- participants: (e == null ? void 0 : e.participants) ?? [],
370
- bookingCalendar: ((z = a == null ? void 0 : a.booking) == null ? void 0 : z.calendar_id) ?? (a == null ? void 0 : a.email) ?? "",
371
- location: ((C = e == null ? void 0 : e.event_booking) == null ? void 0 : C.location) ?? "",
372
- bookingType: ((U = e == null ? void 0 : e.event_booking) == null ? void 0 : U.booking_type) ?? "booking",
373
- buffer: ((A = (R = e == null ? void 0 : e.availability) == null ? void 0 : R.availability_rules) == null ? void 0 : A.buffer) ?? { before: 0, after: 0 },
374
- cancellationPolicy: ((w = e == null ? void 0 : e.scheduler) == null ? void 0 : w.cancellation_policy) ?? "",
375
- availableDaysInFuture: ((m = e == null ? void 0 : e.scheduler) == null ? void 0 : m.available_days_in_future) ?? 30,
376
- minCancellationNotice: ((j = e == null ? void 0 : e.scheduler) == null ? void 0 : j.min_cancellation_notice) ?? 0,
377
- minBookingNotice: ((g = e == null ? void 0 : e.scheduler) == null ? void 0 : g.min_booking_notice) ?? 60,
378
- timeslotInterval: {
379
- interval: (($ = e == null ? void 0 : e.availability) == null ? void 0 : $.interval_minutes) ?? ((f = e == null ? void 0 : e.availability) == null ? void 0 : f.duration_minutes),
380
- roundTo: (J = e == null ? void 0 : e.availability) == null ? void 0 : J.round_to
381
- },
382
- additionalGuestsHidden: ((V = e == null ? void 0 : e.scheduler) == null ? void 0 : V.hide_additional_guests) ?? !1,
383
- hideCancellationOptions: ((Z = e == null ? void 0 : e.scheduler) == null ? void 0 : Z.hide_cancellation_options) ?? !1,
384
- hideReschedulingOptions: ((P = e == null ? void 0 : e.scheduler) == null ? void 0 : P.hide_rescheduling_options) ?? !1,
385
- participantBookingCalendars: ((G = e == null ? void 0 : e.participants) == null ? void 0 : G.reduce((_, v) => {
386
- var x, H;
387
- return (x = v.booking) != null && x.calendar_id && (_[v.email] = (H = v.booking) == null ? void 0 : H.calendar_id), _;
388
- })) ?? {},
389
- participantCalendars: ((W = e == null ? void 0 : e.participants) == null ? void 0 : W.reduce((_, v) => {
390
- var x;
391
- return _[v.email] = (x = v.availability) == null ? void 0 : x.calendar_ids, _;
392
- }, {})) ?? {},
393
- reminders: (q = e == null ? void 0 : e.event_booking) == null ? void 0 : q.reminders,
394
- emailTemplate: (E = e == null ? void 0 : e.scheduler) == null ? void 0 : E.email_template,
395
- redirectUrl: (p = e == null ? void 0 : e.scheduler) == null ? void 0 : p.confirmation_redirect_url,
396
- slug: e == null ? void 0 : e.slug,
397
- appearance: e == null ? void 0 : e.appearance,
398
- name: e == null ? void 0 : e.name,
399
- disableEmails: (S = e == null ? void 0 : e.event_booking) == null ? void 0 : S.disable_emails
400
- };
401
- }
402
- setFormState(e, a) {
403
- switch (a) {
404
- case "title":
405
- this.formState.title = e.toString();
406
- break;
407
- case "description":
408
- this.formState.description = e.toString();
409
- break;
410
- case "duration":
411
- this.formState.duration = e.toString();
412
- break;
413
- case "availability":
414
- this.formState.availability = JSON.parse(e.toString());
415
- break;
416
- case "participants":
417
- this.formState.participants = JSON.parse(e.toString());
418
- break;
419
- case "booking-calendar":
420
- this.formState.bookingCalendar = e.toString();
421
- break;
422
- case "participant-booking-calendars":
423
- this.formState.participantBookingCalendars = JSON.parse(e.toString());
424
- break;
425
- case "location":
426
- this.formState.location = e.toString();
427
- break;
428
- case "conference":
429
- this.formState.conferencing = JSON.parse(e.toString());
430
- break;
431
- case "confirmation-type":
432
- this.formState.bookingType = e.toString();
433
- break;
434
- case "buffer-time":
435
- this.formState.buffer = JSON.parse(e.toString());
436
- break;
437
- case "limit-future-bookings":
438
- this.formState.availableDaysInFuture = parseInt(e.toString());
439
- break;
440
- case "min-cancellation-notice":
441
- this.formState.minCancellationNotice = parseInt(e.toString());
442
- break;
443
- case "min-booking-notice":
444
- this.formState.minBookingNotice = parseInt(e.toString());
445
- break;
446
- case "cancellation-policy":
447
- this.formState.cancellationPolicy = e.toString();
448
- break;
449
- case "timeslot-interval":
450
- this.formState.timeslotInterval = JSON.parse(e.toString());
451
- break;
452
- case "customize-booking-settings": {
453
- const n = JSON.parse(e.toString());
454
- this.formState.additionalGuestsHidden = n.additionalGuestsHidden, this.formState.hideCancellationOptions = n.hideCancellationOptions, this.formState.hideReschedulingOptions = n.hideReschedulingOptions;
455
- break;
456
- }
457
- case "participant-custom-availability": {
458
- const n = JSON.parse(e.toString());
459
- this.formState.participantOpenHours = n;
460
- break;
461
- }
462
- case "additional-fields":
463
- this.formState.additionalFields = e;
464
- break;
465
- case "connected-calendars":
466
- this.formState.participantCalendars = JSON.parse(e.toString());
467
- break;
468
- case "confirmation-email-template":
469
- this.formState.emailTemplate = JSON.parse(e.toString());
470
- break;
471
- case "disable-emails":
472
- this.formState.disableEmails = JSON.parse(e.toString());
473
- break;
474
- case "reminder-overrides":
475
- this.formState.reminders = JSON.parse(e.toString());
476
- break;
477
- case "confirmation-redirect":
478
- this.formState.redirectUrl = e.toString();
479
- break;
480
- case "availability-method":
481
- this.formState.availabilityMethod = e.toString();
482
- break;
483
- case "custom-event-slug":
484
- console.debug("custom-event-slug", e), this.formState.slug = JSON.parse(e.toString());
485
- break;
486
- case "page-styling":
487
- this.formState.appearance = JSON.parse(e.toString());
488
- break;
489
- case "page-name":
490
- this.formState.name = JSON.parse(e.toString());
491
- break;
492
- }
493
- this.schedulerEditorFormUpdated.emit({
494
- value: e,
495
- name: a
496
- });
497
- }
498
- updateFormState() {
499
- return new FormData(this.formRef).forEach((a, n) => {
500
- this.setFormState(a, n);
501
- }), this.formState = { ...this.formState }, this.formState;
502
- }
503
- setActiveTab(e, a) {
504
- e.preventDefault(), this.updateFormState(), this.activeTab = a;
505
- }
506
- hideTab(e) {
507
- var a;
508
- return ((a = this.hideEditorTabs) == null ? void 0 : a.includes(e)) || !1;
509
- }
510
- onFeedbackClick(e) {
511
- e.preventDefault(), this.showFeedbackModal = !0;
512
- }
513
- render() {
514
- var e, a;
515
- return u("[nylas-editor-tabs]", "render", this.formState), t(Be, { key: "6b41766e5e726c094aca62e18595796d43b2f298" }, t("form", { key: "24d68e11a81f94792218353822dd77fd7683c9f4", onSubmit: this.formSubmissionHandler, class: "scheduler-editor", ref: (n) => this.formRef = n, noValidate: !0 }, this.mode === "app" ? t("div", { class: "form-contents", part: "editor__form-contents net__form-contents" }, t("div", { class: "tabs", part: "editor__tabs net__tabs" }, t("button", { name: r.EventInfo, class: { tab: !0, active: this.activeTab == r.EventInfo, hide: this.hideTab(r.EventInfo) }, part: "editortab__event-info net__tab-event-info", onClick: (n) => this.setActiveTab(n, r.EventInfo) }, t("calendar-info-icon", { width: "16", height: "16" }), d.t("eventInfoTab")), t("button", { name: r.Availability, class: { tab: !0, active: this.activeTab == r.Availability, hide: this.hideTab(r.Availability) }, part: "editortab__availability net__tab-availability", onClick: (n) => this.setActiveTab(n, r.Availability) }, t("calendar-patterns-icon", { width: "16", height: "16" }), d.t("availabilityTab")), t("button", { name: r.Participants, class: { tab: !0, active: this.activeTab == r.Participants, hide: this.hideTab(r.Participants) }, part: "editortab__participants net__tab-participants", onClick: (n) => this.setActiveTab(n, r.Participants) }, t("people-icon", { width: "16", height: "16" }), d.t("participantsTab")), t("button", { name: r.BookingOptions, class: { tab: !0, active: this.activeTab == r.BookingOptions, hide: this.hideTab(r.BookingOptions) }, part: "editortab__booking-options net__tab-booking-options", onClick: (n) => this.setActiveTab(n, r.BookingOptions) }, t("flow-icon", { width: "16", height: "16" }), d.t("bookingOptionsTab")), t("button", { name: r.BookingForm, class: { tab: !0, active: this.activeTab == "bookingForm", hide: this.hideTab(r.BookingForm) }, part: "editortab__booking-form net__tab-booking-form", onClick: (n) => this.setActiveTab(n, r.BookingForm) }, this.activeTab == r.BookingForm ? t("calendar-agenda-fill-icon", { width: "16", height: "16" }) : t("calendar-agenda-icon", { width: "16", height: "16" }), d.t("bookingFormTab")), t("button", { name: r.Communications, class: { tab: !0, active: this.activeTab == "communications", hide: this.hideTab(r.Communications) }, onClick: (n) => this.setActiveTab(n, r.Communications), part: "editortab__communications net__tab-communications" }, this.activeTab == r.Communications ? t("envelope-fill-icon", { width: "16", height: "16" }) : t("envelope-icon", { width: "16", height: "16" }), d.t("communicationsTab")), t("button", { name: r.PageStyles, class: { tab: !0, active: this.activeTab == "pageStyles", hide: this.hideTab(r.PageStyles) }, onClick: (n) => this.setActiveTab(n, r.PageStyles), part: "editortab__page-styles net__tab-page-styles" }, this.activeTab == r.PageStyles ? t("paintbrush-fill-icon", { width: "16", height: "16" }) : t("paintbrush-icon", { width: "16", height: "16" }), d.t("pageStylesTab"))), t("div", { class: "tab-content", part: "editor__tab-content net__tab-content" }, t(Xe, { formState: this.formState, activeTab: this.activeTab, currentUser: this.currentUser, calendars: this.calendars, id: ((e = this.selectedConfiguration) == null ? void 0 : e.id) ?? "new", i18next: d }))) : t("div", { class: "composable", key: (a = this.selectedConfiguration) == null ? void 0 : a.id }, t("slot", null)), t("div", { key: "ba0dd27bf4d718ad8a62df1f79774f97993a39b5", class: "footer", part: "editor__footer net__footer" }, t("div", { key: "0e2787186678d9fdf18654220bf9b8b2fc430b8f", class: "preview", part: "editor__footer-preview net__footer-preview" }, this.enableUserFeedback && t("button-component", { title: "Share your feedback", id: "report-issue", variant: "basic", onClick: (n) => this.onFeedbackClick(n) }, t("feedback-icon", null))), t("div", { key: "f731ed68b6375274254947df08eacc1c6cc4685a", class: "buttons", part: "editor__footer-buttons net__footer-buttons" }, t("p", { key: "9bcf711385ae6cfc4341c7169f44c7e5e484c6e3", class: {
516
- "unsaved-changes": this.hasUnsavedChanges && !this.changesSaved,
517
- "saved-changes": this.changesSaved,
518
- error: this.error !== "",
519
- "error-full-width": this.error !== "" && this.action === "create"
520
- } }, this.error !== "" ? this.error : "", this.error == "" && this.hasUnsavedChanges && !this.changesSaved ? "Unsaved changes" : this.error == "" && this.changesSaved ? "Changes saved!" : ""), this.schedulerPreviewLink !== "" && this.action === "edit" && t("button-component", { title: "Preview", type: "button", disabled: this.isLoading, clickHandler: (n) => {
521
- n.preventDefault(), this.previewButtonClicked.emit(this.host).defaultPrevented || window.open(te(this.schedulerPreviewLink, this.selectedConfiguration), "_blank");
522
- }, variant: "basic" }, t("eye-icon", null)), t("button-component", { key: "3e4bf8e88e3b7e9d0e9088520dc1c053b0599bc6", type: "button", disabled: this.isLoading, clickHandler: (n) => {
523
- n.preventDefault(), this.cancelButtonClick.emit(), this.error = "";
524
- }, variant: "basic", part: "editor__footer-cancel net__footer-cancel" }, d.t("backButton")), t("button-component", { key: "052505c068878815930d6ed19dda364a609212b8", type: "submit", disabled: this.isLoading, part: "editor__footer-cta, net__footer-cta" }, this.isLoading ? t("span", null, d.t("savingButtonText"), t("loading-icon", null), " ") : this.action === "create" ? `${d.t("createButtonText")}` : `${d.t("saveChangesButtonText")}`)))), this.showFeedbackModal && t("nylas-feedback-form", null));
525
- }
526
- get host() {
527
- return Pe(this);
528
- }
529
- static get watchers() {
530
- return {
531
- selectedConfiguration: ["configChangedHandler"],
532
- currentUser: ["userChangedHandler"],
533
- selectedLanguage: ["selectedLanguageChangedHandler"]
534
- };
535
- }
536
- };
537
- tt([
538
- Ee({
539
- name: "nylas-editor-tabs",
540
- stateToProps: /* @__PURE__ */ new Map([
541
- ["schedulerConfig.calendars", "calendars"],
542
- ["schedulerConfig.selectedConfiguration", "selectedConfiguration"],
543
- ["schedulerConfig.currentUser", "currentUser"],
544
- ["schedulerConfig.configurations", "configurations"],
545
- ["schedulerConfig.selectedLanguage", "selectedLanguage"]
546
- ]),
547
- eventToProps: {
548
- schedulerConfigChanged: async (e, a) => {
549
- const { resetLoadingState: n, host: s, action: o, config: i } = e.detail, b = (l) => {
550
- const [h, y] = l;
551
- !h && y ? s.setError(y) : h && !y && o === "create" && s.schedulerConfigCreatedEventHandler({ config: h }), n && n(e);
552
- };
553
- if (o === "edit") {
554
- const l = await a.schedulerConfig.updateConfiguration(i);
555
- b(l);
556
- } else {
557
- const l = await a.schedulerConfig.createConfiguration(i);
558
- b(l);
559
- }
560
- },
561
- cancelButtonClick: async (e, a) => {
562
- a.schedulerConfigStore.state.action = null;
563
- },
564
- previewButtonClicked: async (e, a) => {
565
- u("[nylas-editor-tabs]", "previewButtonClicked", a);
566
- },
567
- formSubmitted: async (e, a) => {
568
- u("[nylas-editor-tabs]", "formSubmitted", a);
569
- },
570
- schedulerEditorFormUpdated: async (e, a) => {
571
- u("[nylas-editor-tabs]", "schedulerEditorFormUpdated", e);
572
- },
573
- schedulerConfigCreated: async (e, a) => {
574
- u("[nylas-editor-tabs]", "schedulerConfigCreated", e);
575
- }
576
- },
577
- localPropsToProp: /* @__PURE__ */ new Map([
578
- ["schedulerPreviewLink", "schedulerPreviewLink"],
579
- ["enableUserFeedback", "enableUserFeedback"],
580
- ["hideEditorTabs", "hideEditorTabs"]
581
- ]),
582
- fireRegisterEvent: !0
583
- }),
584
- Y("design:type", Function),
585
- Y("design:paramtypes", []),
586
- Y("design:returntype", void 0)
587
- ], He.prototype, "render", null);
588
- He.style = et;
589
- const at = ':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:16px;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:hidden}.configurations .table-container{overflow-y:auto;flex:1}@media screen and (max-width: 768px){.configurations .table-container{min-height:624px}}.configurations .table-container table{width:100%;border-spacing:0;border-collapse:collapse;font-family:inherit;height:max-content}.configurations .table-container table.no-configurations{height:100%}.configurations .table-container table tr{color:var(--nylas-base-800);border-bottom:1px solid var(--nylas-base-200);font-family:inherit}.configurations .table-container table tr.hide{display:none}.configurations .table-container table th{font-weight:600;text-transform:uppercase;font-size:14px;line-height:20px}.configurations .table-container 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-container table tr.no-configurations td>div h3{margin:0 0 1rem 0;color:var(--nylas-base-700)}.configurations .table-container table tr.no-configurations td>div p{margin:0 0 1rem 0;color:var(--nylas-base-600)}.configurations .table-container table tr.no-configurations td>div calendar-icon{margin-bottom:1rem;color:var(--nylas-base-200)}.configurations .table-container table th,.configurations .table-container table td{text-align:left;padding:1rem;font-family:inherit}.configurations .table-container table .actions{display:flex;justify-content:flex-end;gap:1rem;text-align:right}@media screen and (max-width: 768px){.configurations .table-container table .actions{flex-direction:column;gap:0.5rem}}.configurations .table-container table .actions select-dropdown.last::part(sd_dropdown-content){bottom:54px}.configurations .table-container table .title{width:100%;max-width:300px}@media screen and (max-width: 768px){.configurations .table-container table .title{max-width:96px}}.configurations .table-container table .title div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.configurations .table-container table .title div.config-event-title{font-weight:600}.configurations .table-container table .title div.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)}.card-wrapper{position:absolute;top:0;left:0;height:calc(100% + 4rem);width:-webkit-fill-available;width:-moz-available;width:fill-available;display:flex;flex-direction:column;justify-content:center;align-items:center;background:rgba(0, 0, 0, 0.6);z-index:2;border-radius:var(--nylas-border-radius-2x)}@media screen and (max-width: 768px){.card-wrapper{justify-content:start;height:100%}}.card-modal{background:var(--nylas-base-0);display:flex;flex-direction:column;font-family:var(--nylas-font-family);background-color:var(--nylas-base-0);color:var(--nylas-base-900);border-radius:var(--nylas-border-radius-3x);padding:32px;width:562px;box-shadow:0px 1px 4px rgba(0, 0, 0, 0.1), 0px 3px 6px rgba(0, 0, 0, 0.06)}@media screen and (max-width: 768px){.card-modal{width:auto;border-radius:0px}}.description.title-desc{margin-bottom:2rem}.description p{margin:0;font-size:18px;color:var(--nylas-base-600)}.footer{margin-top:1rem;padding-top:1rem;display:flex;justify-content:flex-end;gap:0.5rem;box-sizing:border-box;background-color:var(--nylas-base-25);width:100%;border-radius:0 0 var(--nylas-border-radius-2x) var(--nylas-border-radius-2x)}.close-button{width:100%;display:flex;justify-content:flex-end}.close-button button-component button{padding:0;height:auto}.close-button button-component button:hover{background-color:transparent !important}button-component{--dot-color:var(--nylas-base-700)}', nt = at;
590
- var it = function(e, a, n, s) {
591
- var o = arguments.length, i = o < 3 ? a : s === null ? s = Object.getOwnPropertyDescriptor(a, n) : s, b;
592
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
593
- i = Reflect.decorate(e, a, n, s);
594
- else
595
- for (var l = e.length - 1; l >= 0; l--)
596
- (b = e[l]) && (i = (o < 3 ? b(i) : o > 3 ? b(a, n, i) : b(a, n)) || i);
597
- return o > 3 && i && Object.defineProperty(a, n, i), i;
598
- }, ee = function(e, a) {
599
- if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
600
- return Reflect.metadata(e, a);
601
- };
602
- const Oe = class {
603
- constructor(e) {
604
- K(this, e), 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.selectedLanguage = void 0, this.schedulerPreviewLink = "", this.listConfigurationsNextCursor = void 0, this.state = "loading", this.error = "", this.currentCursor = null, this.previousCursors = [], this.disableNextPageButton = !1, this.deleteConfigurationId = "", this.showDeleteButtonLoading = !1;
605
- }
606
- listConfigurationsNextCursorChangedHandler(e, a) {
607
- if (!e || e === a) {
608
- e === null && (this.disableNextPageButton = !0);
609
- return;
610
- }
611
- this.disableNextPageButton = !1, this.currentCursor = e;
612
- }
613
- selectedLanguageChangedHandler(e, a) {
614
- e !== a && d.changeLanguage(e);
615
- }
616
- connectedCallback() {
617
- u("[nylas-list-configurations]", "connectedCallback");
618
- }
619
- componentWillLoad() {
620
- u("[nylas-list-configurations]", "componentWillLoad"), this.configurations && this.configurations.length > 0 && (this.state = "loaded");
621
- }
622
- componentDidLoad() {
623
- u("[nylas-list-configurations]", "componentDidLoad"), this.initListConfigurations.emit({
624
- host: this.host
625
- });
626
- }
627
- disconnectedCallback() {
628
- u("[nylas-list-configurations]", "disconnectedCallback");
629
- }
630
- async handleNylasFormDropdownChanged(e) {
631
- var o;
632
- u("[nylas-list-configurations]", "handleNylasFormDropdownChanged", e.detail);
633
- const { value: a } = e.detail, [n, s] = a.split("-");
634
- switch (e.preventDefault(), n) {
635
- case "delete":
636
- this.deleteConfigurationId = (o = this.configurations[s]) == null ? void 0 : o.id;
637
- break;
638
- case "preview":
639
- window.open(te(this.schedulerPreviewLink, this.configurations[s]), "_blank");
640
- break;
641
- case "copy":
642
- await navigator.clipboard.writeText(te(this.schedulerPreviewLink, this.configurations[s]));
643
- break;
644
- }
645
- }
646
- async registerCallback() {
647
- this.initListConfigurations.emit({
648
- host: this.host
649
- });
650
- }
651
- async getState() {
652
- return this.state;
653
- }
654
- async setState(e) {
655
- this.state = e;
656
- }
657
- async setError(e) {
658
- this.error = e;
659
- }
660
- async hideDeleteConfirmation() {
661
- this.deleteConfigurationId = "", this.showDeleteButtonLoading = !1;
662
- }
663
- closeModal(e) {
664
- e.preventDefault(), this.deleteConfigurationId = "";
665
- }
666
- handleConfirmDeleteButtonClicked(e) {
667
- e.preventDefault(), this.showDeleteButtonLoading = !0;
668
- const a = this.configurations.find((n) => n.id === this.deleteConfigurationId);
669
- a && (a != null && a.id) && this.deleteButtonClick.emit({ host: this.host, configuration: a });
670
- }
671
- getDurationString(e) {
672
- const a = Math.floor(e / 60), n = e % 60;
673
- return `${a || ""} ${a ? `${a > 1 ? "hours" : "hour"}` : ""} ${n || ""} ${n ? `${n > 1 ? "mins" : "min"}` : ""}`;
674
- }
675
- getActionLabelHTML(e) {
676
- const a = {
677
- display: "inline-flex",
678
- alignItems: "center",
679
- gap: "0.5rem"
680
- }, n = {
681
- color: "var(--nylas-error)"
682
- };
683
- switch (e) {
684
- case "preview":
685
- return t("span", { style: a }, t("eye-icon", { width: "16", height: "16" }), d.t("nylasListConfigurations.previewButtonText"));
686
- case "copy":
687
- return t("span", { style: a }, t("copy-icon", { width: "16", height: "16" }), d.t("nylasListConfigurations.copyLinkButtonText"));
688
- case "delete":
689
- return t("span", { style: { ...a, ...n } }, t("delete-icon", { width: "15", height: "17" }), d.t("nylasListConfigurations.deleteButtonText"));
690
- default:
691
- return "";
692
- }
693
- }
694
- previousPageClickedHandler() {
695
- if (this.previousCursors.length === 0)
696
- return;
697
- this.currentCursor = this.previousCursors.pop() || null;
698
- const e = this.previousCursors[this.previousCursors.length - 1] || void 0;
699
- this.initListConfigurations.emit({
700
- host: this.host,
701
- cursor: e
702
- });
703
- }
704
- nextPageClickedHandler() {
705
- this.currentCursor && (this.previousCursors = [...this.previousCursors, this.currentCursor], this.initListConfigurations.emit({
706
- host: this.host,
707
- cursor: this.currentCursor
708
- }));
709
- }
710
- render() {
711
- var e;
712
- return t(Be, null, t("div", { class: "header" }, t("div", { class: "description" }, t("h2", null, d.t("allSchedulingPages")), t("p", null, d.t("createAndManageSchedulingPages"))), this.configurations && this.configurations.length > 0 && t("div", { class: "actions" }, t("button-component", { part: "nlc__create-new-cta", clickHandler: () => {
713
- this.createButtonClick.emit(this.host);
714
- } }, d.t("createNewSchedulingPageButtonText")))), t("div", { class: "configurations" }, t("div", { class: "table-container" }, t("table", { class: {
715
- "no-configurations": this.state !== "loading" && (!this.configurations || this.configurations.length === 0)
716
- } }, t("tr", { class: {
717
- hide: this.state === "loading" || this.configurations && this.configurations.length === 0
718
- } }, t("th", null, d.t("pageTitle")), t("th", null, d.t("durationTitle")), t("th", null)), this.state === "loading" && t("tr", { class: "no-configurations" }, t("td", { colSpan: 3 }, t("div", null, t("h3", null, d.t("loading"), "..."), t("p", null, d.t("loadingPagesDescription"))))), this.state !== "loading" && (!this.configurations || this.configurations.length === 0) && t("tr", { class: "no-configurations" }, t("td", { colSpan: 3 }, t("div", null, t("calendar-icon", { width: "48", height: "48" }), t("h3", null, d.t("noSchedulingPages")), t("p", null, d.t("createFirstSchedulingPage")), t("button-component", { part: "nlc__create-new-cta", clickHandler: () => {
719
- this.createButtonClick.emit(this.host);
720
- } }, d.t("createNewSchedulingPageButtonText"))))), this.state !== "loading" && ((e = this.configurations) == null ? void 0 : e.map((a, n) => {
721
- var o, i, b, l;
722
- const s = (n === this.configurations.length - 1 || n === this.configurations.length - 2) && this.configurations.length > 3;
723
- return t("tr", { key: a == null ? void 0 : a.id }, t("td", null, t("div", { class: "title" }, t("div", { class: "config-event-title", title: (o = a == null ? void 0 : a.event_booking) == null ? void 0 : o.title }, (i = a == null ? void 0 : a.event_booking) == null ? void 0 : i.title), t("div", { class: "config-event-description" }, (b = a == null ? void 0 : a.event_booking) == null ? void 0 : b.description))), t("td", null, t("div", { class: "duration" }, this.getDurationString((l = a == null ? void 0 : a.availability) == null ? void 0 : l.duration_minutes))), t("td", null, t("div", { class: "actions" }, t("button-component", { variant: "basic", key: `edit-${n}`, clickHandler: (h) => {
724
- h.preventDefault(), this.editButtonClick.emit({ host: this.host, configuration: a });
725
- } }, t("edit-icon", { width: "16", height: "16" }), d.t("editSchedulingPageButtonText")), t("select-dropdown", { class: {
726
- last: s
727
- }, name: "actions", options: [
728
- { value: `preview-${n}`, label: "Preview", labelHTML: this.getActionLabelHTML("preview") },
729
- { value: `copy-${n}`, label: "Copy link", labelHTML: this.getActionLabelHTML("copy") },
730
- { value: `delete-${n}`, label: "Delete", labelHTML: this.getActionLabelHTML("delete") }
731
- ], 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" }))));
732
- })))), t("div", { class: "pagination" }, t("button", { class: "arrow left", onClick: () => this.previousPageClickedHandler(), disabled: this.previousCursors.length <= 0 }, t("chevron-icon", null)), t("button", { class: "arrow right", onClick: () => this.nextPageClickedHandler(), disabled: this.disableNextPageButton }, t("chevron-icon", null)))), this.state === "error" && t("div", { class: "error-container" }, t("p", { class: "error" }, this.error)), !!this.deleteConfigurationId && t("div", { class: "card-wrapper" }, t("div", { class: "card-modal" }, t("div", { class: "close-button" }, t("button-component", { tooltip: "Close", id: "close", variant: "invisible", onClick: (a) => this.closeModal(a), part: "nfbf__close-button" }, t("close-icon", null))), t("div", { class: "header" }, t("h2", { slot: "card-title", part: "nfbf__title" }, d.t("deleteSchedulingPageTitle"))), t("div", { class: "description title-desc" }, t("p", null, d.t("deleteSchedulingPageDescription"))), t("div", { class: {
733
- footer: !0
734
- } }, t("button-component", { variant: "basic", onClick: (a) => this.closeModal(a), part: "nfbf__button-outline nfbf__cancel-cta" }, `${d.t("deleteSchedulingPageCancelButton")}`), t("button-component", { variant: "destructive", onClick: (a) => this.handleConfirmDeleteButtonClicked(a), disabled: this.showDeleteButtonLoading, isLoading: this.showDeleteButtonLoading, part: "nfbf__button-outline nfbf__reschedule-cta" }, `${d.t("deleteSchedulingPageConfirmButton")}`)))));
735
- }
736
- get host() {
737
- return Pe(this);
738
- }
739
- static get watchers() {
740
- return {
741
- listConfigurationsNextCursor: ["listConfigurationsNextCursorChangedHandler"],
742
- selectedLanguage: ["selectedLanguageChangedHandler"]
743
- };
744
- }
745
- };
746
- it([
747
- Ee({
748
- name: "nylas-list-configurations",
749
- stateToProps: /* @__PURE__ */ new Map([
750
- ["schedulerConfig.configurations", "configurations"],
751
- ["schedulerConfig.listConfigurationsNextCursor", "listConfigurationsNextCursor"],
752
- ["schedulerConfig.selectedLanguage", "selectedLanguage"]
753
- ]),
754
- localPropsToProp: /* @__PURE__ */ new Map([["schedulerPreviewLink", "schedulerPreviewLink"]]),
755
- eventToProps: {
756
- initListConfigurations: async (e, a) => {
757
- const { host: n, cursor: s } = e.detail;
758
- await n.setState("loading");
759
- const [o, i] = await a.schedulerConfig.getConfigurations(s);
760
- if (!o && i && i.message) {
761
- await n.setState("error"), await n.setError(i.message);
762
- return;
763
- }
764
- await n.setState("loaded");
765
- },
766
- createButtonClick: async (e, a) => {
767
- a.schedulerConfigStore.resetSelectedConfiguration(), a.schedulerConfigStore.state.action = "create";
768
- },
769
- deleteButtonClick: async (e, a) => {
770
- const { host: n, configuration: s } = e.detail, [o, i] = await a.schedulerConfig.deleteConfiguration(s.id);
771
- !o && i && i.message && (await n.setState("error"), await n.setError(i.message)), await n.hideDeleteConfirmation();
772
- },
773
- editButtonClick: async (e, a) => {
774
- const { configuration: n } = e.detail;
775
- a.schedulerConfigStore.state.selectedConfiguration = n, a.schedulerConfigStore.state.action = "edit";
776
- }
777
- },
778
- fireRegisterEvent: !0
779
- }),
780
- ee("design:type", Function),
781
- ee("design:paramtypes", []),
782
- ee("design:returntype", void 0)
783
- ], Oe.prototype, "render", null);
784
- Oe.style = nt;
785
- export {
786
- We as google_logo_icon,
787
- Qe as microsoft_logo_icon,
788
- He as nylas_editor_tabs,
789
- Oe as nylas_list_configurations
790
- };