@nylas/react 1.3.5 → 1.4.0

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 (221) hide show
  1. package/dist/add-circle-icon_2.entry-6e8e4e1e.cjs +1 -0
  2. package/dist/add-circle-icon_2.entry-dbad9a3b.js +26 -0
  3. package/dist/archive-icon.entry-21f532af.cjs +1 -0
  4. package/dist/archive-icon.entry-802f7877.js +16 -0
  5. package/dist/{arrow-icon.entry-fa9584cf.js → arrow-icon.entry-e3dec626.js} +3 -2
  6. package/dist/arrow-icon.entry-e9af732a.cjs +1 -0
  7. package/dist/{bold-icon.entry-ac6a4956.js → bold-icon.entry-0492ff02.js} +3 -2
  8. package/dist/bold-icon.entry-1a2be28a.cjs +1 -0
  9. package/dist/button-component_2.entry-f0c7f894.cjs +1 -0
  10. package/dist/{button-component_2.entry-caf33abf.js → button-component_2.entry-fea9bd3d.js} +10 -9
  11. package/dist/calendar-agenda-fill-icon_36.entry-70681da2.cjs +6 -0
  12. package/dist/calendar-agenda-fill-icon_36.entry-c85d6a79.js +4642 -0
  13. package/dist/calendar-cancel-icon.entry-237b8c9e.cjs +1 -0
  14. package/dist/{calendar-cancel-icon.entry-02015d74.js → calendar-cancel-icon.entry-e7dd5b8f.js} +6 -5
  15. package/dist/calendar-check-icon_2.entry-a868e0bc.cjs +1 -0
  16. package/dist/{calendar-check-icon_2.entry-2f7dc236.js → calendar-check-icon_2.entry-c7f47fc8.js} +10 -9
  17. package/dist/calendar-icon.entry-071eb30d.cjs +1 -0
  18. package/dist/{calendar-icon.entry-70ac9bd6.js → calendar-icon.entry-324de624.js} +6 -5
  19. package/dist/checkbox-component.entry-0f9970cc.js +43 -0
  20. package/dist/checkbox-component.entry-5bcf4b08.cjs +1 -0
  21. package/dist/checkmark-icon_15.entry-7776e533.cjs +5 -0
  22. package/dist/checkmark-icon_15.entry-98377585.js +1337 -0
  23. package/dist/chevron-icon_3.entry-526b4b85.cjs +1 -0
  24. package/dist/chevron-icon_3.entry-ec66260c.js +148 -0
  25. package/dist/{clock-icon_4.entry-af5301d7.js → clock-icon_4.entry-4fa47996.js} +19 -18
  26. package/dist/clock-icon_4.entry-66d15f7c.cjs +1 -0
  27. package/dist/{constants-f6e79ab7-24392f9e.js → constants-f5ba52b9-40ab2ded.js} +121 -30
  28. package/dist/constants-f5ba52b9-a0866d2f.cjs +1 -0
  29. package/dist/customParseFormat-39eacb44-45ade322.cjs +1 -0
  30. package/dist/customParseFormat-39eacb44-eeffe2bb.js +135 -0
  31. package/dist/delete-icon.entry-540aa2bb.cjs +1 -0
  32. package/dist/{delete-icon.entry-00cb3ee8.js → delete-icon.entry-95d01eb8.js} +7 -6
  33. package/dist/document-refresh-icon.entry-b82d5da8.js +16 -0
  34. package/dist/document-refresh-icon.entry-c467f082.cjs +1 -0
  35. package/dist/elements/index.d.ts +11 -0
  36. package/dist/{feedbackSync-547e51ee-bcaf691c.js → feedbackSync-47d13bb0-5608d680.js} +1 -1
  37. package/dist/{feedbackSync-547e51ee-9b572309.cjs → feedbackSync-47d13bb0-9f249f33.cjs} +1 -1
  38. package/dist/folder-icon.entry-4d48c2ee.cjs +1 -0
  39. package/dist/{folder-icon.entry-60b3eda5.js → folder-icon.entry-cb0dc63d.js} +5 -4
  40. package/dist/forward-icon.entry-5aa01f53.js +16 -0
  41. package/dist/forward-icon.entry-d04aaf6d.cjs +1 -0
  42. package/dist/globe-icon_2.entry-87e29cdf.cjs +1 -0
  43. package/dist/globe-icon_2.entry-c7ae78cc.js +200 -0
  44. package/dist/google-logo-icon_6.entry-80a6bfa3.js +1457 -0
  45. package/dist/google-logo-icon_6.entry-a8b6efc0.cjs +2 -0
  46. package/dist/google-meet-icon_5.entry-26d667b6.cjs +1 -0
  47. package/dist/google-meet-icon_5.entry-4e71c83b.js +56 -0
  48. package/dist/inbox-icon.entry-60a82bfc.cjs +1 -0
  49. package/dist/inbox-icon.entry-77e4e17b.js +16 -0
  50. package/dist/index-04630615.js +17580 -0
  51. package/dist/index-3d1f13d6.cjs +57 -0
  52. package/dist/index.d.ts +1 -3
  53. package/dist/{index.es-2d849a15-2d84f7a5.cjs → index.es-1fdb1e36-830a422f.cjs} +6 -6
  54. package/dist/{index.es-2d849a15-4eb8e180.js → index.es-1fdb1e36-fbdb04fa.js} +818 -804
  55. package/dist/info-icon_2.entry-34800b66.cjs +1 -0
  56. package/dist/info-icon_2.entry-3c483f61.js +35 -0
  57. package/dist/input-component.entry-ea4016fe.js +84 -0
  58. package/dist/input-component.entry-f7ccf3d6.cjs +1 -0
  59. package/dist/input-dropdown_2.entry-c7730cf8.js +231 -0
  60. package/dist/input-dropdown_2.entry-d4024d2f.cjs +1 -0
  61. package/dist/italic-icon.entry-6e0805ab.js +16 -0
  62. package/dist/italic-icon.entry-8127c2ee.cjs +1 -0
  63. package/dist/multi-select-dropdown_2.entry-49d6f0e7.cjs +1 -0
  64. package/dist/multi-select-dropdown_2.entry-d749999d.js +187 -0
  65. package/dist/notebook-store-b61693cd-7a5576e7.js +14 -0
  66. package/dist/notebook-store-b61693cd-84de36d2.cjs +5 -0
  67. package/dist/nylas-booked-event-card_12.entry-29337b10.cjs +1 -0
  68. package/dist/nylas-booked-event-card_12.entry-3fcfd6f9.js +1418 -0
  69. package/dist/nylas-call-summary.entry-38aed89a.js +16 -0
  70. package/dist/nylas-call-summary.entry-e9adcb93.cjs +1 -0
  71. package/dist/nylas-event-calendar_3.entry-48f656e5.cjs +6 -0
  72. package/dist/nylas-event-calendar_3.entry-62d1f1f5.js +9693 -0
  73. package/dist/nylas-form-card.entry-3828ccb1.js +58 -0
  74. package/dist/nylas-form-card.entry-b900b46e.cjs +1 -0
  75. package/dist/{nylas-if-state.entry-beef8af6.js → nylas-if-state.entry-2810dcf5.js} +4 -3
  76. package/dist/nylas-if-state.entry-92af0a51.cjs +1 -0
  77. package/dist/nylas-key-points.entry-977a6fae.js +29 -0
  78. package/dist/nylas-key-points.entry-de658637.cjs +1 -0
  79. package/dist/nylas-login.entry-4a6c11e6.cjs +1 -0
  80. package/dist/{nylas-login.entry-1661cbd4.js → nylas-login.entry-8101d3d0.js} +4 -3
  81. package/dist/nylas-provider.entry-b7ac25f5.cjs +1 -0
  82. package/dist/{nylas-provider.entry-1f140378.js → nylas-provider.entry-c054d68a.js} +6 -5
  83. package/dist/nylas-scheduler-editor.entry-1538950d.cjs +2 -0
  84. package/dist/{nylas-scheduler-editor.entry-f184f72e.js → nylas-scheduler-editor.entry-e35fad5c.js} +530 -272
  85. package/dist/nylas-scheduling.entry-360b978c.js +439 -0
  86. package/dist/nylas-scheduling.entry-92351cd2.cjs +1 -0
  87. package/dist/nylas-transcript.entry-4d973027.cjs +6 -0
  88. package/dist/nylas-transcript.entry-81e2c821.js +128 -0
  89. package/dist/nylas-video-player.entry-60268c07.js +39 -0
  90. package/dist/nylas-video-player.entry-f3c2b073.cjs +1 -0
  91. package/dist/nylas-video-preview.entry-12e05e4d.cjs +1 -0
  92. package/dist/nylas-video-preview.entry-320421b6.js +16 -0
  93. package/dist/{person-icon.entry-f9ca9147.js → person-icon.entry-8533209c.js} +8 -7
  94. package/dist/person-icon.entry-967ad730.cjs +1 -0
  95. package/dist/play-icon.entry-15ee8568.js +16 -0
  96. package/dist/play-icon.entry-7b1fd79d.cjs +1 -0
  97. package/dist/radio-button-group.entry-24cb342f.cjs +1 -0
  98. package/dist/radio-button-group.entry-53dcf16c.js +47 -0
  99. package/dist/react.cjs +1 -1
  100. package/dist/react.js +133 -123
  101. package/dist/refresh-icon.entry-0486ae54.cjs +1 -0
  102. package/dist/{refresh-icon.entry-7886041f.js → refresh-icon.entry-f3320971.js} +7 -6
  103. package/dist/{register-component-677d8d2b-0113766e.js → register-component-504a1cbb-5f986d7f.js} +1 -1
  104. package/dist/{register-component-677d8d2b-4738af1d.cjs → register-component-504a1cbb-89124fd8.cjs} +1 -1
  105. package/dist/{reply-all-icon.entry-fdd0058e.js → reply-all-icon.entry-006fd1fb.js} +6 -5
  106. package/dist/reply-all-icon.entry-2cea1a40.cjs +1 -0
  107. package/dist/reply-icon.entry-bd252aed.cjs +1 -0
  108. package/dist/reply-icon.entry-d27166a1.js +16 -0
  109. package/dist/scheduler-config-store-d6729d8d-4a2defea.cjs +1 -0
  110. package/dist/{scheduler-config-store-ed4a8dfd-012dcf85.js → scheduler-config-store-d6729d8d-63e34849.js} +4 -1
  111. package/dist/scheduler-store-baf100ed-5c5d3aa5.cjs +1 -0
  112. package/dist/scheduler-store-baf100ed-81b183dc.js +533 -0
  113. package/dist/sent-icon.entry-bf101068.js +16 -0
  114. package/dist/sent-icon.entry-ee434395.cjs +1 -0
  115. package/dist/spam-icon.entry-11016b63.cjs +1 -0
  116. package/dist/spam-icon.entry-5193f9c6.js +16 -0
  117. package/dist/star-icon.entry-0e269252.cjs +1 -0
  118. package/dist/{star-icon.entry-501083c1.js → star-icon.entry-9c7449f3.js} +6 -5
  119. package/dist/stop-icon.entry-2ac11166.js +16 -0
  120. package/dist/stop-icon.entry-86412c9f.cjs +1 -0
  121. package/dist/textarea-component.entry-27717409.cjs +1 -0
  122. package/dist/textarea-component.entry-9df3fa96.js +39 -0
  123. package/dist/toggle-switch.entry-9623e2b2.cjs +1 -0
  124. package/dist/toggle-switch.entry-a5ddfad9.js +34 -0
  125. package/dist/translate-icon.entry-e0617680.cjs +1 -0
  126. package/dist/{translate-icon.entry-676a4150.js → translate-icon.entry-f22293e6.js} +5 -4
  127. package/dist/trash-fill-icon.entry-0275f657.cjs +1 -0
  128. package/dist/trash-fill-icon.entry-2616c5df.js +16 -0
  129. package/dist/{underline-icon.entry-3513c5ef.js → underline-icon.entry-1110dcb1.js} +5 -4
  130. package/dist/underline-icon.entry-d54b06ab.cjs +1 -0
  131. package/dist/warning-icon.entry-6d390ab7.cjs +1 -0
  132. package/dist/{warning-icon.entry-6e723597.js → warning-icon.entry-9a6e7913.js} +8 -7
  133. package/package.json +11 -3
  134. package/dist/add-circle-icon.entry-00c87903.js +0 -15
  135. package/dist/add-circle-icon.entry-640d2b46.cjs +0 -1
  136. package/dist/archive-icon.entry-5b209336.cjs +0 -1
  137. package/dist/archive-icon.entry-e8a39eda.js +0 -15
  138. package/dist/arrow-icon.entry-a25b7b7e.cjs +0 -1
  139. package/dist/bold-icon.entry-d837c73d.cjs +0 -1
  140. package/dist/button-component_2.entry-1471422a.cjs +0 -1
  141. package/dist/calendar-agenda-fill-icon_53.entry-094bd4b9.cjs +0 -6
  142. package/dist/calendar-agenda-fill-icon_53.entry-6d7f9c79.js +0 -5757
  143. package/dist/calendar-cancel-icon.entry-42d3d226.cjs +0 -1
  144. package/dist/calendar-check-icon_2.entry-45aacd91.cjs +0 -1
  145. package/dist/calendar-icon.entry-90d67b03.cjs +0 -1
  146. package/dist/checkbox-component_3.entry-231b2254.cjs +0 -1
  147. package/dist/checkbox-component_3.entry-7270533c.js +0 -153
  148. package/dist/chevron-icon_3.entry-3c95cc88.js +0 -147
  149. package/dist/chevron-icon_3.entry-ead3d4c8.cjs +0 -1
  150. package/dist/clock-icon_4.entry-b50cce70.cjs +0 -1
  151. package/dist/close-icon.entry-04008446.cjs +0 -1
  152. package/dist/close-icon.entry-0a4105c9.js +0 -15
  153. package/dist/constants-f6e79ab7-23d7236b.cjs +0 -1
  154. package/dist/copy-icon.entry-312ff230.js +0 -15
  155. package/dist/copy-icon.entry-74f8ebcd.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-b61a6706.cjs +0 -1
  159. package/dist/document-refresh-icon.entry-1c985b1e.js +0 -15
  160. package/dist/document-refresh-icon.entry-27ff5cb2.cjs +0 -1
  161. package/dist/dom-68f08be9.cjs +0 -15
  162. package/dist/dom-86e17616.js +0 -664
  163. package/dist/folder-icon.entry-c32a6e15.cjs +0 -1
  164. package/dist/forward-icon.entry-5f9a7639.js +0 -15
  165. package/dist/forward-icon.entry-8cd805dc.cjs +0 -1
  166. package/dist/globe-icon.entry-21a80591.cjs +0 -1
  167. package/dist/globe-icon.entry-397727e1.js +0 -15
  168. package/dist/google-logo-icon_4.entry-42e87368.cjs +0 -1
  169. package/dist/google-logo-icon_4.entry-6ccf8379.js +0 -778
  170. package/dist/inbox-icon.entry-1e448b4b.js +0 -15
  171. package/dist/inbox-icon.entry-50605b1d.cjs +0 -1
  172. package/dist/index-594c8e7b.js +0 -16763
  173. package/dist/index-cfb93df6.cjs +0 -81
  174. package/dist/info-icon_2.entry-65e0023f.js +0 -34
  175. package/dist/info-icon_2.entry-e7b86847.cjs +0 -1
  176. package/dist/input-color-picker.entry-37d2fb66.js +0 -48
  177. package/dist/input-color-picker.entry-aabfe638.cjs +0 -1
  178. package/dist/input-component.entry-51f6da14.cjs +0 -1
  179. package/dist/input-component.entry-c07d92b1.js +0 -70
  180. package/dist/input-dropdown_2.entry-20fb0552.cjs +0 -1
  181. package/dist/input-dropdown_2.entry-90c08f10.js +0 -228
  182. package/dist/italic-icon.entry-8e5599ff.js +0 -15
  183. package/dist/italic-icon.entry-ee10a040.cjs +0 -1
  184. package/dist/multi-select-dropdown.entry-656d2791.cjs +0 -1
  185. package/dist/multi-select-dropdown.entry-c143becc.js +0 -116
  186. package/dist/nylas-booked-event-card_12.entry-4974ffe6.js +0 -1332
  187. package/dist/nylas-booked-event-card_12.entry-669bb872.cjs +0 -1
  188. package/dist/nylas-form-card.entry-42e718e2.js +0 -57
  189. package/dist/nylas-form-card.entry-55d3909c.cjs +0 -1
  190. package/dist/nylas-if-state.entry-4de782b7.cjs +0 -1
  191. package/dist/nylas-login.entry-d6b80abe.cjs +0 -1
  192. package/dist/nylas-provider.entry-d5495e1a.cjs +0 -1
  193. package/dist/nylas-scheduler-editor.entry-bebe4e7d.cjs +0 -2
  194. package/dist/nylas-scheduling.entry-21c04831.cjs +0 -1
  195. package/dist/nylas-scheduling.entry-c335ad21.js +0 -415
  196. package/dist/nylas-time-window-picker_2.entry-9e0dd470.js +0 -336
  197. package/dist/nylas-time-window-picker_2.entry-a2651ee7.cjs +0 -1
  198. package/dist/person-icon.entry-21946944.cjs +0 -1
  199. package/dist/play-icon.entry-b27fcb18.cjs +0 -1
  200. package/dist/play-icon.entry-dbfed5e8.js +0 -15
  201. package/dist/refresh-icon.entry-9d94a60b.cjs +0 -1
  202. package/dist/reply-all-icon.entry-f0e0a5c4.cjs +0 -1
  203. package/dist/reply-icon.entry-0a42fb2c.cjs +0 -1
  204. package/dist/reply-icon.entry-a8d2b0f8.js +0 -15
  205. package/dist/scheduler-config-store-ed4a8dfd-a16d5c62.cjs +0 -1
  206. package/dist/scheduler-store-92eb8804-bc68a43a.js +0 -487
  207. package/dist/scheduler-store-92eb8804-c3deee73.cjs +0 -1
  208. package/dist/sent-icon.entry-c3f84a59.cjs +0 -1
  209. package/dist/sent-icon.entry-e047f087.js +0 -15
  210. package/dist/spam-icon.entry-55d01416.js +0 -15
  211. package/dist/spam-icon.entry-671eb165.cjs +0 -1
  212. package/dist/star-icon.entry-4dcae472.cjs +0 -1
  213. package/dist/stop-icon.entry-130a28b2.js +0 -15
  214. package/dist/stop-icon.entry-ed949255.cjs +0 -1
  215. package/dist/textarea-component.entry-65dd740a.cjs +0 -1
  216. package/dist/textarea-component.entry-efae9031.js +0 -37
  217. package/dist/translate-icon.entry-2591baf8.cjs +0 -1
  218. package/dist/trash-fill-icon.entry-5b373be7.js +0 -15
  219. package/dist/trash-fill-icon.entry-c411d0e0.cjs +0 -1
  220. package/dist/underline-icon.entry-6bf14476.cjs +0 -1
  221. package/dist/warning-icon.entry-719a094d.cjs +0 -1
@@ -1,778 +0,0 @@
1
- import { r as q, h as e, c as k, d as u, n as St, i as d, o as tt, H as Tt, g as Ft, F as Ut } from "./index-594c8e7b.js";
2
- import { R as Bt } from "./register-component-677d8d2b-0113766e.js";
3
- import { D as Lt } from "./constants-f6e79ab7-24392f9e.js";
4
- import { i as Rt, a as At, c as jt, b as $t, f as Jt } from "./feedbackSync-547e51ee-bcaf691c.js";
5
- import "react";
6
- import "react-dom";
7
- const Vt = ".sc-google-logo-icon-h{display:flex}", Zt = Vt, Gt = class {
8
- constructor(t) {
9
- q(this, t), this.width = "24", this.height = "24";
10
- }
11
- render() {
12
- return e("svg", { key: "3ca599e18ce6095779ded84b497b5296f17c10d2", width: this.width, height: this.height, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, e("g", { key: "88b3f5f83ede3ed85a770467f48ad836405b990a", "clip-path": "url(#clip0_959_12452)" }, e("path", { key: "4e15a1ff9fd5ed8752a01653cc0313519c3979ca", 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" }), e("path", { key: "1d5b9ac448e9067003693fc996d84e4a6a6fb424", 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" }), e("path", { key: "60c45db031014875d1f0c51e4d96d233ff4d739e", 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" }), e("path", { key: "c11e6c275b10368721e0d520d98a8f57bc38acc5", 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" })), e("defs", { key: "9ed8d3df0e31854c32fe754fc79877ca48ea5ab9" }, e("clipPath", { key: "7b54dd3d596dc38980237b59f21184a00316760f", id: "clip0_959_12452" }, e("rect", { key: "6632bab4f2645c9a5dc9f3f000a7b537d5b09f22", width: 24, height: 24, fill: "white" }))));
13
- }
14
- };
15
- Gt.style = Zt;
16
- const Wt = ".sc-microsoft-logo-icon-h{display:flex}", qt = Wt, Kt = class {
17
- constructor(t) {
18
- q(this, t), this.width = "22", this.height = "22";
19
- }
20
- render() {
21
- return e("svg", { key: "970afb49d36b25194c649b69ca0f136a588c20a4", width: this.width, height: this.height, viewBox: "0 0 22 22", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, e("path", { key: "b3f4f95ead19fff86c4026bcf226a31a22b9c09a", d: "M0.043457 0.043457H10.4782V10.4782H0.043457V0.043457Z", fill: "#F35325" }), e("path", { key: "425e0c099da7b5e3637665f2b9240aab9dd43589", d: "M11.5217 0.043457H21.9565V10.4782H11.5217V0.043457Z", fill: "#81BC06" }), e("path", { key: "2f531126f18dd92603d2caaa31dfaf8a3dac3c9f", d: "M0.043457 11.5217H10.4782V21.9565H0.043457V11.5217Z", fill: "#05A6F0" }), e("path", { key: "b500f059a84c5223d1688410bc8378e02fc87156", d: "M11.5217 11.5217H21.9565V21.9565H11.5217V11.5217Z", fill: "#FFBA08" }));
22
- }
23
- };
24
- Kt.style = qt;
25
- var r;
26
- (function(t) {
27
- t.EventInfo = "eventInfo", t.Availability = "availability", t.BookingOptions = "bookingOptions", t.Communications = "communications", t.Participants = "participants", t.BookingForm = "bookingForm", t.PageStyles = "pageStyles";
28
- })(r || (r = {}));
29
- function Qt({ id: t, formState: a, activeTab: n, i18next: i }, o) {
30
- return e(
31
- Ut,
32
- null,
33
- e(
34
- "div",
35
- { key: `event-info-${t}`, class: { hide: n !== r.EventInfo } },
36
- e(
37
- "nylas-event-info",
38
- null,
39
- e(
40
- "div",
41
- { slot: "inputs" },
42
- e("nylas-event-title", { name: "title", exportparts: "net, net__title, net__dropdown-content" }),
43
- e("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
- e("nylas-event-location", { name: "location", exportparts: "nel, nel__location, nel__dropdown, nel__dropdown-button, nel__dropdown-content" }),
45
- e("nylas-event-description", { name: "description", exportparts: "nedesc, nedesc__textarea" })
46
- )
47
- )
48
- ),
49
- e(
50
- "div",
51
- { key: `availability-${t}`, class: { hide: n !== r.Availability } },
52
- e("nylas-participant-booking-calendars", { participants: a.participants, name: "participant-booking-calendars", exportparts: "npbc, npbc__header, npbc__content, npbc__participant-container, npbc__participant-title" }),
53
- e("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
- e("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
- e(
57
- "div",
58
- { key: `booking-options-${t}`, class: { hide: n !== r.BookingOptions } },
59
- e("nylas-scheduling-method", { name: "availability-method", readOnly: !0, exportparts: "nsm, nsm__header, nsm__input-label, nsm__dropdown, nsm__dropdown-button, nsm__dropdown-content" }),
60
- e(
61
- "nylas-custom-booking-flow",
62
- { exportparts: "ncbflow, ncbflow__header, ncbflow__title, ncbflow__content" },
63
- e(
64
- "div",
65
- { slot: "inputs" },
66
- e("nylas-booking-confirmation-type", { name: "confirmation-type", exportparts: "nbct, nbct__header, nbct__dropdown, nbct__dropdown-button, nbct__dropdown-content" }),
67
- e("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
- e("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
- e(
72
- "nylas-event-limits",
73
- null,
74
- e(
75
- "div",
76
- { slot: "inputs" },
77
- e("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
- e("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
- e("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
- e("nylas-cancellation-policy", { name: "cancellation-policy", exportparts: "ncpolicy, ncpolicy__textarea" })
81
- )
82
- ),
83
- e("nylas-timeslot-interval", { name: "timeslot-interval", exportparts: "nti, nti__header, nti__input-label, nti__dropdown, nti__dropdown-button, nti__dropdown-content" }),
84
- e("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
- e(
87
- "div",
88
- { key: `communications-${t}`, class: { hide: n !== r.Communications } },
89
- e(
90
- "div",
91
- { class: "tab-header" },
92
- e("h3", null, i.t("eventCommunicationsTitle")),
93
- e("p", null, i.t("eventCommunicationsDescription"))
94
- ),
95
- e("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" }),
96
- e("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" })
97
- ),
98
- e(
99
- "div",
100
- { key: `participants-${t}`, class: { hide: n !== r.Participants } },
101
- e("nylas-additional-participants", { name: "participants", exportparts: "nap, nap__title, nap__subtitle, nap__content, nap__input_group, nap__input_wrapper, nap__input, nap__remove-participant" }),
102
- e("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" })
103
- ),
104
- e(
105
- "div",
106
- { key: `page-styles-${t}`, class: { hide: n !== r.PageStyles } },
107
- e("nylas-custom-event-slug", { name: "custom-event-slug", exportparts: "nces, nces__body, nces__header, nces__drawer-toggle--container, nces__input-textfield" }),
108
- e("nylas-page-name", { name: "page-name", exportparts: "npn, npn__body, npn__header, npn__drawer-toggle--container, npn__input-textfield" }),
109
- e("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" }, o)
110
- ),
111
- e(
112
- "div",
113
- { key: `booking-form-${t}`, class: { hide: n !== r.BookingForm } },
114
- e("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" })
115
- )
116
- );
117
- }
118
- const Xt = '.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}', Yt = Xt;
119
- var te = function(t, a, n, i) {
120
- var o = arguments.length, s = o < 3 ? a : i === null ? i = Object.getOwnPropertyDescriptor(a, n) : i, b;
121
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
122
- s = Reflect.decorate(t, a, n, i);
123
- else
124
- for (var l = t.length - 1; l >= 0; l--)
125
- (b = t[l]) && (s = (o < 3 ? b(s) : o > 3 ? b(a, n, s) : b(a, n)) || s);
126
- return o > 3 && s && Object.defineProperty(a, n, s), s;
127
- }, X = function(t, a) {
128
- if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
129
- return Reflect.metadata(t, a);
130
- };
131
- const Pt = class {
132
- constructor(t) {
133
- q(this, t), 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) => {
134
- var et, at, nt, it, st, ot, rt, lt, dt, ct, bt, ht, ut, pt, mt, ft, yt;
135
- a.preventDefault();
136
- const n = await this.formSubmitted.emit();
137
- if (u("[nylas-editor-tabs]", "formSubmissionHandler", n), !this.formRef.checkValidity() || n.defaultPrevented) {
138
- this.error = this.formRef.validationMessage || "Please fix the form errors.";
139
- return;
140
- }
141
- this.isLoading = !0, this.hasUnsavedChanges = !1;
142
- const o = this.updateFormState();
143
- u("[nylas-editor-tabs]", "formState", o);
144
- const { title: s, description: b, duration: l, availability: h, bookingCalendar: y, location: L, bookingType: T, buffer: O, availableDaysInFuture: D, minCancellationNotice: I, minBookingNotice: M, cancellationPolicy: N, timeslotInterval: C, additionalGuestsHidden: z, hideCancellationOptions: U, hideReschedulingOptions: R, participants: w, participantOpenHours: m, additionalFields: A, participantCalendars: g, conferencing: j, participantBookingCalendars: f, reminders: $, emailTemplate: J, redirectUrl: V, availabilityMethod: P, slug: Z, appearance: G, name: W } = o, p = ((at = (et = this.selectedConfiguration) == null ? void 0 : et.participants) == null ? void 0 : at.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] : [], _ = ((nt = p == null ? void 0 : p.booking) == null ? void 0 : nt.calendar_id) || y, v = l ? parseInt(l) : 30, x = w && (w == null ? void 0 : w.length) > 0 ? w : [
145
- {
146
- name: (p == null ? void 0 : p.name) ?? ((it = this.currentUser) == null ? void 0 : it.name) ?? "",
147
- email: (p == null ? void 0 : p.email) ?? ((st = this.currentUser) == null ? void 0 : st.email) ?? "",
148
- is_organizer: !0,
149
- timezone: (h == null ? void 0 : h.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
150
- availability: {
151
- calendar_ids: y && y !== "" ? [y] : ["primary"],
152
- open_hours: []
153
- },
154
- booking: {
155
- calendar_id: y && y !== "" ? y : "primary"
156
- }
157
- }
158
- ], E = {
159
- ...((ot = this.selectedConfiguration) == null ? void 0 : ot.id) && { id: this.selectedConfiguration.id },
160
- version: ((rt = this.selectedConfiguration) == null ? void 0 : rt.version) ?? "1.0.0",
161
- slug: Z,
162
- name: W,
163
- availability: {
164
- duration_minutes: v,
165
- interval_minutes: (C == null ? void 0 : C.interval) ?? v,
166
- round_to: C == null ? void 0 : C.roundTo,
167
- availability_rules: {
168
- availability_method: P || (((ct = (dt = (lt = this.selectedConfiguration) == null ? void 0 : lt.availability) == null ? void 0 : dt.availability_rules) == null ? void 0 : ct.availability_method) ?? "collective"),
169
- buffer: O || { before: 0, after: 0 },
170
- default_open_hours: (h == null ? void 0 : h.openHours) ?? ((ut = (ht = (bt = this.selectedConfiguration) == null ? void 0 : bt.availability) == null ? void 0 : ht.availability_rules) == null ? void 0 : ut.default_open_hours) ?? Lt,
171
- round_robin_group_id: ((ft = (mt = (pt = this.selectedConfiguration) == null ? void 0 : pt.availability) == null ? void 0 : mt.availability_rules) == null ? void 0 : ft.round_robin_group_id) ?? ""
172
- }
173
- },
174
- participants: [
175
- ...x ? x.map((c) => {
176
- var gt, _t, vt, wt, kt, Ct;
177
- let B = (h == null ? void 0 : h.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone;
178
- if ((gt = m == null ? void 0 : m[c.email]) != null && gt.length && (B = (vt = (_t = m == null ? void 0 : m[c.email]) == null ? void 0 : _t[0]) == null ? void 0 : vt.timezone), c.is_organizer) {
179
- const xt = f != null && f[c.email] ? f == null ? void 0 : f[c.email] : _ || "primary", Q = g != null && g[c.email] ? g == null ? void 0 : g[c.email] : S != null && S.length ? S : ["primary"], zt = Q.length === 1 && Q[0] === "primary";
180
- return {
181
- name: c.name ?? "",
182
- email: c.email,
183
- is_organizer: !0,
184
- timezone: B,
185
- availability: {
186
- calendar_ids: zt ? [xt] : Q,
187
- open_hours: (m == null ? void 0 : m[c.email]) ?? ((wt = c.availability) == null ? void 0 : wt.open_hours) ?? []
188
- },
189
- booking: {
190
- calendar_id: xt
191
- }
192
- };
193
- }
194
- const H = f != null && f[c.email] ? { calendar_id: f == null ? void 0 : f[c.email] } : (c == null ? void 0 : c.booking) ?? void 0, K = (g == null ? void 0 : g[c.email]) ?? ((kt = c.availability) == null ? void 0 : kt.calendar_ids) ?? ["primary"], Nt = K.length === 1 && K[0] === "primary";
195
- return {
196
- ...c,
197
- timezone: B,
198
- availability: c.availability ? {
199
- calendar_ids: Nt && typeof H < "u" ? [H == null ? void 0 : H.calendar_id] : K,
200
- open_hours: (m == null ? void 0 : m[c.email]) ?? ((Ct = c.availability) == null ? void 0 : Ct.open_hours) ?? []
201
- } : void 0,
202
- booking: H
203
- };
204
- }) : []
205
- ],
206
- event_booking: {
207
- title: (s == null ? void 0 : s.toString()) ?? "",
208
- description: (b == null ? void 0 : b.toString()) ?? "",
209
- location: (L == null ? void 0 : L.toString()) ?? "",
210
- booking_type: (T == null ? void 0 : T.toString()) ?? "booking",
211
- timezone: (h == null ? void 0 : h.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
212
- conferencing: j,
213
- reminders: $
214
- },
215
- scheduler: {
216
- cancellation_policy: N ?? "",
217
- available_days_in_future: D ?? 30,
218
- min_cancellation_notice: I ?? 0,
219
- min_booking_notice: M ?? 60,
220
- hide_additional_guests: z ?? !1,
221
- hide_cancellation_options: U ?? !1,
222
- hide_rescheduling_options: R ?? !1,
223
- additional_fields: A,
224
- email_template: J,
225
- confirmation_redirect_url: V
226
- },
227
- appearance: G
228
- }, Ht = St(this.selectedConfiguration, E || {}), F = this.action === "create" ? Ht : E;
229
- this.isConfigRoundRobin(F) && (F.participants = F.participants.map((c) => ({ ...c, is_organizer: void 0 })));
230
- const Ot = (c) => {
231
- this.isLoading = !1, this.changesSaved = !0, setTimeout(() => {
232
- this.changesSaved = !1;
233
- }, 5e3);
234
- }, Dt = this.checkForBookingFormErrors(F), It = ((yt = this.configurations) == null ? void 0 : yt.find((c) => {
235
- var B;
236
- return c.id === ((B = this.selectedConfiguration) == null ? void 0 : B.id);
237
- })) || {}, Mt = this.checkForOrganizerConfirmationError(St(F, It));
238
- Dt || Mt || this.schedulerConfigChanged.emit({ config: F, resetLoadingState: Ot, action: this.action, host: this.host });
239
- }, this.isConfigRoundRobin = (a) => {
240
- var n, i, o, s;
241
- return ((i = (n = a == null ? void 0 : a.availability) == null ? void 0 : n.availability_rules) == null ? void 0 : i.availability_method) === "max-availability" || ((s = (o = a.availability) == null ? void 0 : o.availability_rules) == null ? void 0 : s.availability_method) === "max-fairness";
242
- }, this.checkForOrganizerConfirmationError = (a) => {
243
- var b, l;
244
- let n = !1, i = "";
245
- const o = ((b = a.event_booking) == null ? void 0 : b.booking_type) === "organizer-confirmation", s = (l = a.scheduler) == null ? void 0 : l.organizer_confirmation_url;
246
- return o && !s && (i += "Organizer confirmation URL is required when using organizer confirmation booking type.", n = !0), n && (this.isLoading = !1, this.host.setError(new Error(i))), n;
247
- }, this.checkForBookingFormErrors = (a) => {
248
- var s;
249
- let n = !1, i = "";
250
- const o = (s = a.scheduler) == null ? void 0 : s.additional_fields;
251
- return o && (i = "Booking form error: ", Object.entries(o).forEach((b) => {
252
- const l = b[1];
253
- if (l.label === "") {
254
- i += `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
- i += `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(i))), 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(t) {
268
- u("[nylas-editor-tabs]", "configChangedHandler", t, this.selectedConfiguration), this.formState = {
269
- ...this.getFormStateFromConfig(t)
270
- }, t != null && t.id ? this.action = "edit" : this.action = "create";
271
- }
272
- userChangedHandler(t) {
273
- u("[nylas-editor-tabs]", "userChangedHandler", t), t && (this.formState = {
274
- ...this.getFormStateFromConfig(this.selectedConfiguration)
275
- });
276
- }
277
- selectedLanguageChangedHandler(t, a) {
278
- t !== a && d.changeLanguage(t);
279
- }
280
- async schedulerConfigCreatedEventHandler(t) {
281
- return this.schedulerConfigCreated.emit(t);
282
- }
283
- async setError(t) {
284
- this.error = t.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 && !Rt() && At({
295
- dsn: "https://9d5731f1c77ca84c9ed3fb9b3ccf7ee1@o74852.ingest.us.sentry.io/4507889638178816",
296
- release: "1.3.5",
297
- integrations: (i) => [
298
- ...i.filter((o) => !1),
299
- Jt({
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 t = (n = this.host.querySelector("button.tab:not(.hide)")) == null ? void 0 : n.name;
308
- t && (this.activeTab = t);
309
- }
310
- disconnectedCallback() {
311
- u("[nylas-editor-tabs]", "disconnectedCallback");
312
- }
313
- handleValueChanged(t) {
314
- u("[nylas-editor-tabs]", "handleValueChanged", t);
315
- const { name: a, value: n } = t.detail;
316
- this.setFormState(n, a), this.formState = { ...this.formState }, this.hasUnsavedChanges = !0, this.error = "", this.schedulerEditorFormUpdated.emit({
317
- value: t.detail.value,
318
- name: t.detail.name
319
- });
320
- }
321
- feedbackModalClosedHandler() {
322
- this.showFeedbackModal = !1;
323
- }
324
- feedbackSubmittedHandler(t) {
325
- var i, o;
326
- const n = {
327
- eventId: jt("Scheduler Editor User Feedback"),
328
- message: t.detail.feedback
329
- };
330
- $t(n, {
331
- includeReplay: !0,
332
- captureContext: {
333
- tags: {
334
- "nylas-web-element": "nylas-scheduler-editor",
335
- "nylas-web-element-version": "1.3.5"
336
- },
337
- extra: {
338
- configId: (i = this.selectedConfiguration) == null ? void 0 : i.id,
339
- slug: (o = this.selectedConfiguration) == null ? void 0 : o.slug
340
- }
341
- }
342
- }), this.showFeedbackModal = !1;
343
- }
344
- getFormStateFromConfig(t) {
345
- var n, i, o, s, b, l, h, y, L, T, O, D, I, M, N, C, z, U, R, w, m, A, g, j, f, $, J, V, P, Z, G, W, p, S;
346
- let a = (n = t == null ? void 0 : t.participants) == null ? void 0 : n.find((_) => _.is_organizer);
347
- return !a && ((o = (i = t == null ? void 0 : t.availability) == null ? void 0 : i.availability_rules) == null ? void 0 : o.availability_method) !== "collective" && (a = (s = t == null ? void 0 : t.participants) == null ? void 0 : s.find((_) => {
348
- var v;
349
- return _.email === ((v = this.currentUser) == null ? void 0 : v.email);
350
- }), a && (a.is_organizer = !0)), t != null && t.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."), {
351
- title: ((b = t == null ? void 0 : t.event_booking) == null ? void 0 : b.title) ?? "",
352
- description: ((l = t == null ? void 0 : t.event_booking) == null ? void 0 : l.description) ?? "",
353
- duration: ((y = (h = t == null ? void 0 : t.availability) == null ? void 0 : h.duration_minutes) == null ? void 0 : y.toString()) ?? "30",
354
- availability: {
355
- timezone: ((L = t == null ? void 0 : t.event_booking) == null ? void 0 : L.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
356
- openHours: ((O = (T = t == null ? void 0 : t.availability) == null ? void 0 : T.availability_rules) == null ? void 0 : O.default_open_hours) ?? Lt
357
- },
358
- additionalFields: ((D = t == null ? void 0 : t.scheduler) == null ? void 0 : D.additional_fields) ?? {},
359
- conferencing: ((I = t == null ? void 0 : t.event_booking) == null ? void 0 : I.conferencing) ?? {},
360
- calendarIds: ((M = a == null ? void 0 : a.availability) == null ? void 0 : M.calendar_ids) ?? [],
361
- participants: (t == null ? void 0 : t.participants) ?? [],
362
- bookingCalendar: ((N = a == null ? void 0 : a.booking) == null ? void 0 : N.calendar_id) ?? (a == null ? void 0 : a.email) ?? "",
363
- location: ((C = t == null ? void 0 : t.event_booking) == null ? void 0 : C.location) ?? "",
364
- bookingType: ((z = t == null ? void 0 : t.event_booking) == null ? void 0 : z.booking_type) ?? "booking",
365
- buffer: ((R = (U = t == null ? void 0 : t.availability) == null ? void 0 : U.availability_rules) == null ? void 0 : R.buffer) ?? { before: 0, after: 0 },
366
- cancellationPolicy: ((w = t == null ? void 0 : t.scheduler) == null ? void 0 : w.cancellation_policy) ?? "",
367
- availableDaysInFuture: ((m = t == null ? void 0 : t.scheduler) == null ? void 0 : m.available_days_in_future) ?? 30,
368
- minCancellationNotice: ((A = t == null ? void 0 : t.scheduler) == null ? void 0 : A.min_cancellation_notice) ?? 0,
369
- minBookingNotice: ((g = t == null ? void 0 : t.scheduler) == null ? void 0 : g.min_booking_notice) ?? 60,
370
- timeslotInterval: {
371
- interval: ((j = t == null ? void 0 : t.availability) == null ? void 0 : j.interval_minutes) ?? ((f = t == null ? void 0 : t.availability) == null ? void 0 : f.duration_minutes),
372
- roundTo: ($ = t == null ? void 0 : t.availability) == null ? void 0 : $.round_to
373
- },
374
- additionalGuestsHidden: ((J = t == null ? void 0 : t.scheduler) == null ? void 0 : J.hide_additional_guests) ?? !1,
375
- hideCancellationOptions: ((V = t == null ? void 0 : t.scheduler) == null ? void 0 : V.hide_cancellation_options) ?? !1,
376
- hideReschedulingOptions: ((P = t == null ? void 0 : t.scheduler) == null ? void 0 : P.hide_rescheduling_options) ?? !1,
377
- participantBookingCalendars: ((Z = t == null ? void 0 : t.participants) == null ? void 0 : Z.reduce((_, v) => {
378
- var x, E;
379
- return (x = v.booking) != null && x.calendar_id && (_[v.email] = (E = v.booking) == null ? void 0 : E.calendar_id), _;
380
- })) ?? {},
381
- participantCalendars: ((G = t == null ? void 0 : t.participants) == null ? void 0 : G.reduce((_, v) => {
382
- var x;
383
- return _[v.email] = (x = v.availability) == null ? void 0 : x.calendar_ids, _;
384
- }, {})) ?? {},
385
- reminders: (W = t == null ? void 0 : t.event_booking) == null ? void 0 : W.reminders,
386
- emailTemplate: (p = t == null ? void 0 : t.scheduler) == null ? void 0 : p.email_template,
387
- redirectUrl: (S = t == null ? void 0 : t.scheduler) == null ? void 0 : S.confirmation_redirect_url,
388
- slug: t == null ? void 0 : t.slug,
389
- appearance: t == null ? void 0 : t.appearance,
390
- name: t == null ? void 0 : t.name
391
- };
392
- }
393
- setFormState(t, a) {
394
- switch (a) {
395
- case "title":
396
- this.formState.title = t.toString();
397
- break;
398
- case "description":
399
- this.formState.description = t.toString();
400
- break;
401
- case "duration":
402
- this.formState.duration = t.toString();
403
- break;
404
- case "availability":
405
- this.formState.availability = JSON.parse(t.toString());
406
- break;
407
- case "participants":
408
- this.formState.participants = JSON.parse(t.toString());
409
- break;
410
- case "booking-calendar":
411
- this.formState.bookingCalendar = t.toString();
412
- break;
413
- case "participant-booking-calendars":
414
- this.formState.participantBookingCalendars = JSON.parse(t.toString());
415
- break;
416
- case "location":
417
- this.formState.location = t.toString();
418
- break;
419
- case "conference":
420
- this.formState.conferencing = JSON.parse(t.toString());
421
- break;
422
- case "confirmation-type":
423
- this.formState.bookingType = t.toString();
424
- break;
425
- case "buffer-time":
426
- this.formState.buffer = JSON.parse(t.toString());
427
- break;
428
- case "limit-future-bookings":
429
- this.formState.availableDaysInFuture = parseInt(t.toString());
430
- break;
431
- case "min-cancellation-notice":
432
- this.formState.minCancellationNotice = parseInt(t.toString());
433
- break;
434
- case "min-booking-notice":
435
- this.formState.minBookingNotice = parseInt(t.toString());
436
- break;
437
- case "cancellation-policy":
438
- this.formState.cancellationPolicy = t.toString();
439
- break;
440
- case "timeslot-interval":
441
- this.formState.timeslotInterval = JSON.parse(t.toString());
442
- break;
443
- case "customize-booking-settings": {
444
- const n = JSON.parse(t.toString());
445
- this.formState.additionalGuestsHidden = n.additionalGuestsHidden, this.formState.hideCancellationOptions = n.hideCancellationOptions, this.formState.hideReschedulingOptions = n.hideReschedulingOptions;
446
- break;
447
- }
448
- case "participant-custom-availability": {
449
- const n = JSON.parse(t.toString());
450
- this.formState.participantOpenHours = n;
451
- break;
452
- }
453
- case "additional-fields":
454
- this.formState.additionalFields = t;
455
- break;
456
- case "connected-calendars":
457
- this.formState.participantCalendars = JSON.parse(t.toString());
458
- break;
459
- case "confirmation-email-template":
460
- this.formState.emailTemplate = JSON.parse(t.toString());
461
- break;
462
- case "reminder-overrides":
463
- this.formState.reminders = JSON.parse(t.toString());
464
- break;
465
- case "confirmation-redirect":
466
- this.formState.redirectUrl = t.toString();
467
- break;
468
- case "availability-method":
469
- this.formState.availabilityMethod = t.toString();
470
- break;
471
- case "custom-event-slug":
472
- console.debug("custom-event-slug", t), this.formState.slug = JSON.parse(t.toString());
473
- break;
474
- case "page-styling":
475
- this.formState.appearance = JSON.parse(t.toString());
476
- break;
477
- case "page-name":
478
- this.formState.name = JSON.parse(t.toString());
479
- break;
480
- }
481
- this.schedulerEditorFormUpdated.emit({
482
- value: t,
483
- name: a
484
- });
485
- }
486
- updateFormState() {
487
- return new FormData(this.formRef).forEach((a, n) => {
488
- this.setFormState(a, n);
489
- }), this.formState = { ...this.formState }, this.formState;
490
- }
491
- setActiveTab(t, a) {
492
- t.preventDefault(), this.updateFormState(), this.activeTab = a;
493
- }
494
- hideTab(t) {
495
- var a;
496
- return ((a = this.hideEditorTabs) == null ? void 0 : a.includes(t)) || !1;
497
- }
498
- onFeedbackClick(t) {
499
- t.preventDefault(), this.showFeedbackModal = !0;
500
- }
501
- render() {
502
- var t, a;
503
- return u("[nylas-editor-tabs]", "render", this.formState), e(Tt, { key: "afd735b73e35d8abfa9c83d21ab8307b07df48e6" }, e("form", { key: "7d7093deb88e6ec8e636092e4bcbadf03916a994", onSubmit: this.formSubmissionHandler, class: "scheduler-editor", ref: (n) => this.formRef = n, noValidate: !0 }, this.mode === "app" ? e("div", { class: "form-contents", part: "editor__form-contents net__form-contents" }, e("div", { class: "tabs", part: "editor__tabs net__tabs" }, e("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) }, e("calendar-info-icon", { width: "16", height: "16" }), d.t("eventInfoTab")), e("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) }, e("calendar-patterns-icon", { width: "16", height: "16" }), d.t("availabilityTab")), e("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) }, e("people-icon", { width: "16", height: "16" }), d.t("participantsTab")), e("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) }, e("flow-icon", { width: "16", height: "16" }), d.t("bookingOptionsTab")), e("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 ? e("calendar-agenda-fill-icon", { width: "16", height: "16" }) : e("calendar-agenda-icon", { width: "16", height: "16" }), d.t("bookingFormTab")), e("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 ? e("envelope-fill-icon", { width: "16", height: "16" }) : e("envelope-icon", { width: "16", height: "16" }), d.t("communicationsTab")), e("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 ? e("paintbrush-fill-icon", { width: "16", height: "16" }) : e("paintbrush-icon", { width: "16", height: "16" }), d.t("pageStylesTab"))), e("div", { class: "tab-content", part: "editor__tab-content net__tab-content" }, e(Qt, { formState: this.formState, activeTab: this.activeTab, currentUser: this.currentUser, calendars: this.calendars, id: ((t = this.selectedConfiguration) == null ? void 0 : t.id) ?? "new", i18next: d }))) : e("div", { class: "composable", key: (a = this.selectedConfiguration) == null ? void 0 : a.id }, e("slot", null)), e("div", { key: "d2d76b6b587c13a32dfc749f4fea4b47102923f0", class: "footer", part: "editor__footer net__footer" }, e("div", { key: "7714cacce55f8b8e06e60f289ef02fe8e336419c", class: "preview", part: "editor__footer-preview net__footer-preview" }, this.enableUserFeedback && e("button-component", { title: "Share your feedback", id: "report-issue", variant: "basic", onClick: (n) => this.onFeedbackClick(n) }, e("feedback-icon", null))), e("div", { key: "54d1b26ae9e1ffc22fbe679e40ad0ec40f4df3fb", class: "buttons", part: "editor__footer-buttons net__footer-buttons" }, e("p", { key: "e443a0cc63281f971bbdf7349e1adbb88abb42a9", class: {
504
- "unsaved-changes": this.hasUnsavedChanges && !this.changesSaved,
505
- "saved-changes": this.changesSaved,
506
- error: this.error !== "",
507
- "error-full-width": this.error !== "" && this.action === "create"
508
- } }, this.error !== "" ? this.error : "", this.error == "" && this.hasUnsavedChanges && !this.changesSaved ? "Unsaved changes" : this.error == "" && this.changesSaved ? "Changes saved!" : ""), this.schedulerPreviewLink !== "" && this.action === "edit" && e("button-component", { title: "Preview", type: "button", disabled: this.isLoading, clickHandler: (n) => {
509
- n.preventDefault(), this.previewButtonClicked.emit(this.host).defaultPrevented || window.open(tt(this.schedulerPreviewLink, this.selectedConfiguration), "_blank");
510
- }, variant: "basic" }, e("eye-icon", null)), e("button-component", { key: "057295595f302e2090a0136981a09546f6994c1c", type: "button", disabled: this.isLoading, clickHandler: (n) => {
511
- n.preventDefault(), this.cancelButtonClick.emit(), this.error = "";
512
- }, variant: "basic", part: "editor__footer-cancel net__footer-cancel" }, d.t("backButton")), e("button-component", { key: "18ba294735d5754526a3634f5c7dc7dfd87d1679", type: "submit", disabled: this.isLoading, part: "editor__footer-cta, net__footer-cta" }, this.isLoading ? e("span", null, d.t("savingButtonText"), e("loading-icon", null), " ") : this.action === "create" ? `${d.t("createButtonText")}` : `${d.t("saveChangesButtonText")}`)))), this.showFeedbackModal && e("nylas-feedback-form", null));
513
- }
514
- get host() {
515
- return Ft(this);
516
- }
517
- static get watchers() {
518
- return {
519
- selectedConfiguration: ["configChangedHandler"],
520
- currentUser: ["userChangedHandler"],
521
- selectedLanguage: ["selectedLanguageChangedHandler"]
522
- };
523
- }
524
- };
525
- te([
526
- Bt({
527
- name: "nylas-editor-tabs",
528
- stateToProps: /* @__PURE__ */ new Map([
529
- ["schedulerConfig.calendars", "calendars"],
530
- ["schedulerConfig.selectedConfiguration", "selectedConfiguration"],
531
- ["schedulerConfig.currentUser", "currentUser"],
532
- ["schedulerConfig.configurations", "configurations"],
533
- ["schedulerConfig.selectedLanguage", "selectedLanguage"]
534
- ]),
535
- eventToProps: {
536
- schedulerConfigChanged: async (t, a) => {
537
- const { resetLoadingState: n, host: i, action: o, config: s } = t.detail, b = (l) => {
538
- const [h, y] = l;
539
- !h && y ? i.setError(y) : h && !y && o === "create" && i.schedulerConfigCreatedEventHandler({ config: h }), n && n(t);
540
- };
541
- if (o === "edit") {
542
- const l = await a.schedulerConfig.updateConfiguration(s);
543
- b(l);
544
- } else {
545
- const l = await a.schedulerConfig.createConfiguration(s);
546
- b(l);
547
- }
548
- },
549
- cancelButtonClick: async (t, a) => {
550
- a.schedulerConfigStore.state.action = null;
551
- },
552
- previewButtonClicked: async (t, a) => {
553
- u("[nylas-editor-tabs]", "previewButtonClicked", a);
554
- },
555
- formSubmitted: async (t, a) => {
556
- u("[nylas-editor-tabs]", "formSubmitted", a);
557
- },
558
- schedulerEditorFormUpdated: async (t, a) => {
559
- u("[nylas-editor-tabs]", "schedulerEditorFormUpdated", t);
560
- },
561
- schedulerConfigCreated: async (t, a) => {
562
- u("[nylas-editor-tabs]", "schedulerConfigCreated", t);
563
- }
564
- },
565
- localPropsToProp: /* @__PURE__ */ new Map([
566
- ["schedulerPreviewLink", "schedulerPreviewLink"],
567
- ["enableUserFeedback", "enableUserFeedback"],
568
- ["hideEditorTabs", "hideEditorTabs"]
569
- ]),
570
- fireRegisterEvent: !0
571
- }),
572
- X("design:type", Function),
573
- X("design:paramtypes", []),
574
- X("design:returntype", void 0)
575
- ], Pt.prototype, "render", null);
576
- Pt.style = Yt;
577
- const ee = ':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)}', ae = ee;
578
- var ne = function(t, a, n, i) {
579
- var o = arguments.length, s = o < 3 ? a : i === null ? i = Object.getOwnPropertyDescriptor(a, n) : i, b;
580
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
581
- s = Reflect.decorate(t, a, n, i);
582
- else
583
- for (var l = t.length - 1; l >= 0; l--)
584
- (b = t[l]) && (s = (o < 3 ? b(s) : o > 3 ? b(a, n, s) : b(a, n)) || s);
585
- return o > 3 && s && Object.defineProperty(a, n, s), s;
586
- }, Y = function(t, a) {
587
- if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
588
- return Reflect.metadata(t, a);
589
- };
590
- const Et = class {
591
- constructor(t) {
592
- q(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.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;
593
- }
594
- listConfigurationsNextCursorChangedHandler(t, a) {
595
- if (!t || t === a) {
596
- t === null && (this.disableNextPageButton = !0);
597
- return;
598
- }
599
- this.disableNextPageButton = !1, this.currentCursor = t;
600
- }
601
- selectedLanguageChangedHandler(t, a) {
602
- t !== a && d.changeLanguage(t);
603
- }
604
- connectedCallback() {
605
- u("[nylas-list-configurations]", "connectedCallback");
606
- }
607
- componentWillLoad() {
608
- u("[nylas-list-configurations]", "componentWillLoad"), this.configurations && this.configurations.length > 0 && (this.state = "loaded");
609
- }
610
- componentDidLoad() {
611
- u("[nylas-list-configurations]", "componentDidLoad"), this.initListConfigurations.emit({
612
- host: this.host
613
- });
614
- }
615
- disconnectedCallback() {
616
- u("[nylas-list-configurations]", "disconnectedCallback");
617
- }
618
- async handleNylasFormDropdownChanged(t) {
619
- var o;
620
- u("[nylas-list-configurations]", "handleNylasFormDropdownChanged", t.detail);
621
- const { value: a } = t.detail, [n, i] = a.split("-");
622
- switch (t.preventDefault(), n) {
623
- case "delete":
624
- this.deleteConfigurationId = (o = this.configurations[i]) == null ? void 0 : o.id;
625
- break;
626
- case "preview":
627
- window.open(tt(this.schedulerPreviewLink, this.configurations[i]), "_blank");
628
- break;
629
- case "copy":
630
- await navigator.clipboard.writeText(tt(this.schedulerPreviewLink, this.configurations[i]));
631
- break;
632
- }
633
- }
634
- async registerCallback() {
635
- this.initListConfigurations.emit({
636
- host: this.host
637
- });
638
- }
639
- async getState() {
640
- return this.state;
641
- }
642
- async setState(t) {
643
- this.state = t;
644
- }
645
- async setError(t) {
646
- this.error = t;
647
- }
648
- async hideDeleteConfirmation() {
649
- this.deleteConfigurationId = "", this.showDeleteButtonLoading = !1;
650
- }
651
- closeModal(t) {
652
- t.preventDefault(), this.deleteConfigurationId = "";
653
- }
654
- handleConfirmDeleteButtonClicked(t) {
655
- t.preventDefault(), this.showDeleteButtonLoading = !0;
656
- const a = this.configurations.find((n) => n.id === this.deleteConfigurationId);
657
- a && (a != null && a.id) && this.deleteButtonClick.emit({ host: this.host, configuration: a });
658
- }
659
- getDurationString(t) {
660
- const a = Math.floor(t / 60), n = t % 60;
661
- return `${a || ""} ${a ? `${a > 1 ? "hours" : "hour"}` : ""} ${n || ""} ${n ? `${n > 1 ? "mins" : "min"}` : ""}`;
662
- }
663
- getActionLabelHTML(t) {
664
- const a = {
665
- display: "inline-flex",
666
- alignItems: "center",
667
- gap: "0.5rem"
668
- }, n = {
669
- color: "var(--nylas-error)"
670
- };
671
- switch (t) {
672
- case "preview":
673
- return e("span", { style: a }, e("eye-icon", { width: "16", height: "16" }), d.t("nylasListConfigurations.previewButtonText"));
674
- case "copy":
675
- return e("span", { style: a }, e("copy-icon", { width: "16", height: "16" }), d.t("nylasListConfigurations.copyLinkButtonText"));
676
- case "delete":
677
- return e("span", { style: { ...a, ...n } }, e("delete-icon", { width: "15", height: "17" }), d.t("nylasListConfigurations.deleteButtonText"));
678
- default:
679
- return "";
680
- }
681
- }
682
- previousPageClickedHandler() {
683
- if (this.previousCursors.length === 0)
684
- return;
685
- this.currentCursor = this.previousCursors.pop() || null;
686
- const t = this.previousCursors[this.previousCursors.length - 1] || void 0;
687
- this.initListConfigurations.emit({
688
- host: this.host,
689
- cursor: t
690
- });
691
- }
692
- nextPageClickedHandler() {
693
- this.currentCursor && (this.previousCursors = [...this.previousCursors, this.currentCursor], this.initListConfigurations.emit({
694
- host: this.host,
695
- cursor: this.currentCursor
696
- }));
697
- }
698
- render() {
699
- var t;
700
- return e(Tt, null, e("div", { class: "header" }, e("div", { class: "description" }, e("h2", null, d.t("allSchedulingPages")), e("p", null, d.t("createAndManageSchedulingPages"))), this.configurations && this.configurations.length > 0 && e("div", { class: "actions" }, e("button-component", { part: "nlc__create-new-cta", clickHandler: () => {
701
- this.createButtonClick.emit(this.host);
702
- } }, d.t("createNewSchedulingPageButtonText")))), e("div", { class: "configurations" }, e("div", { class: "table-container" }, e("table", { class: {
703
- "no-configurations": this.state !== "loading" && (!this.configurations || this.configurations.length === 0)
704
- } }, e("tr", { class: {
705
- hide: this.state === "loading" || this.configurations && this.configurations.length === 0
706
- } }, e("th", null, d.t("pageTitle")), e("th", null, d.t("durationTitle")), e("th", null)), this.state === "loading" && e("tr", { class: "no-configurations" }, e("td", { colSpan: 3 }, e("div", null, e("h3", null, d.t("loading"), "..."), e("p", null, d.t("loadingPagesDescription"))))), this.state !== "loading" && (!this.configurations || this.configurations.length === 0) && e("tr", { class: "no-configurations" }, e("td", { colSpan: 3 }, e("div", null, e("calendar-icon", { width: "48", height: "48" }), e("h3", null, d.t("noSchedulingPages")), e("p", null, d.t("createFirstSchedulingPage")), e("button-component", { part: "nlc__create-new-cta", clickHandler: () => {
707
- this.createButtonClick.emit(this.host);
708
- } }, d.t("createNewSchedulingPageButtonText"))))), this.state !== "loading" && ((t = this.configurations) == null ? void 0 : t.map((a, n) => {
709
- var o, s, b, l;
710
- const i = (n === this.configurations.length - 1 || n === this.configurations.length - 2) && this.configurations.length > 3;
711
- return e("tr", { key: a == null ? void 0 : a.id }, e("td", null, e("div", { class: "title" }, e("div", { class: "config-event-title", title: (o = a == null ? void 0 : a.event_booking) == null ? void 0 : o.title }, (s = a == null ? void 0 : a.event_booking) == null ? void 0 : s.title), e("div", { class: "config-event-description" }, (b = a == null ? void 0 : a.event_booking) == null ? void 0 : b.description))), e("td", null, e("div", { class: "duration" }, this.getDurationString((l = a == null ? void 0 : a.availability) == null ? void 0 : l.duration_minutes))), e("td", null, e("div", { class: "actions" }, e("button-component", { variant: "basic", key: `edit-${n}`, clickHandler: (h) => {
712
- h.preventDefault(), this.editButtonClick.emit({ host: this.host, configuration: a });
713
- } }, e("edit-icon", { width: "16", height: "16" }), d.t("editSchedulingPageButtonText")), e("select-dropdown", { class: {
714
- last: i
715
- }, name: "actions", options: [
716
- { value: `preview-${n}`, label: "Preview", labelHTML: this.getActionLabelHTML("preview") },
717
- { value: `copy-${n}`, label: "Copy link", labelHTML: this.getActionLabelHTML("copy") },
718
- { value: `delete-${n}`, label: "Delete", labelHTML: this.getActionLabelHTML("delete") }
719
- ], 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" }))));
720
- })))), e("div", { class: "pagination" }, e("button", { class: "arrow left", onClick: () => this.previousPageClickedHandler(), disabled: this.previousCursors.length <= 0 }, e("chevron-icon", null)), e("button", { class: "arrow right", onClick: () => this.nextPageClickedHandler(), disabled: this.disableNextPageButton }, e("chevron-icon", null)))), this.state === "error" && e("div", { class: "error-container" }, e("p", { class: "error" }, this.error)), !!this.deleteConfigurationId && e("div", { class: "card-wrapper" }, e("div", { class: "card-modal" }, e("div", { class: "close-button" }, e("button-component", { tooltip: "Close", id: "close", variant: "invisible", onClick: (a) => this.closeModal(a), part: "nfbf__close-button" }, e("close-icon", null))), e("div", { class: "header" }, e("h2", { slot: "card-title", part: "nfbf__title" }, d.t("deleteSchedulingPageTitle"))), e("div", { class: "description title-desc" }, e("p", null, d.t("deleteSchedulingPageDescription"))), e("div", { class: {
721
- footer: !0
722
- } }, e("button-component", { variant: "basic", onClick: (a) => this.closeModal(a), part: "nfbf__button-outline nfbf__cancel-cta" }, `${d.t("deleteSchedulingPageCancelButton")}`), e("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")}`)))));
723
- }
724
- get host() {
725
- return Ft(this);
726
- }
727
- static get watchers() {
728
- return {
729
- listConfigurationsNextCursor: ["listConfigurationsNextCursorChangedHandler"],
730
- selectedLanguage: ["selectedLanguageChangedHandler"]
731
- };
732
- }
733
- };
734
- ne([
735
- Bt({
736
- name: "nylas-list-configurations",
737
- stateToProps: /* @__PURE__ */ new Map([
738
- ["schedulerConfig.configurations", "configurations"],
739
- ["schedulerConfig.listConfigurationsNextCursor", "listConfigurationsNextCursor"],
740
- ["schedulerConfig.selectedLanguage", "selectedLanguage"]
741
- ]),
742
- localPropsToProp: /* @__PURE__ */ new Map([["schedulerPreviewLink", "schedulerPreviewLink"]]),
743
- eventToProps: {
744
- initListConfigurations: async (t, a) => {
745
- const { host: n, cursor: i } = t.detail;
746
- await n.setState("loading");
747
- const [o, s] = await a.schedulerConfig.getConfigurations(i);
748
- if (!o && s && s.message) {
749
- await n.setState("error"), await n.setError(s.message);
750
- return;
751
- }
752
- await n.setState("loaded");
753
- },
754
- createButtonClick: async (t, a) => {
755
- a.schedulerConfigStore.resetSelectedConfiguration(), a.schedulerConfigStore.state.action = "create";
756
- },
757
- deleteButtonClick: async (t, a) => {
758
- const { host: n, configuration: i } = t.detail, [o, s] = await a.schedulerConfig.deleteConfiguration(i.id);
759
- !o && s && s.message && (await n.setState("error"), await n.setError(s.message)), await n.hideDeleteConfirmation();
760
- },
761
- editButtonClick: async (t, a) => {
762
- const { configuration: n } = t.detail;
763
- a.schedulerConfigStore.state.selectedConfiguration = n, a.schedulerConfigStore.state.action = "edit";
764
- }
765
- },
766
- fireRegisterEvent: !0
767
- }),
768
- Y("design:type", Function),
769
- Y("design:paramtypes", []),
770
- Y("design:returntype", void 0)
771
- ], Et.prototype, "render", null);
772
- Et.style = ae;
773
- export {
774
- Gt as google_logo_icon,
775
- Kt as microsoft_logo_icon,
776
- Pt as nylas_editor_tabs,
777
- Et as nylas_list_configurations
778
- };