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

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 (133) hide show
  1. package/dist/{add-circle-icon_2.entry-3b13ee64.js → add-circle-icon_2.entry-3ca337a6.js} +5 -5
  2. package/dist/{add-circle-icon_2.entry-3091976b.cjs → add-circle-icon_2.entry-adde5fdf.cjs} +1 -1
  3. package/dist/{archive-icon_7.entry-c2b6d860.cjs → archive-icon_7.entry-2b56ef80.cjs} +1 -1
  4. package/dist/{archive-icon_7.entry-8932618a.js → archive-icon_7.entry-896a1054.js} +13 -13
  5. package/dist/{arrow-icon.entry-a159bee8.cjs → arrow-icon.entry-0288f3fc.cjs} +1 -1
  6. package/dist/arrow-icon.entry-9aaa93fd.js +15 -0
  7. package/dist/{bold-icon_3.entry-447d0537.js → bold-icon_3.entry-0061cf1f.js} +4 -4
  8. package/dist/{bold-icon_3.entry-c51e1af3.cjs → bold-icon_3.entry-e7810620.cjs} +1 -1
  9. package/dist/button-component_4.entry-276606e6.js +115 -0
  10. package/dist/button-component_4.entry-e53a8f37.cjs +1 -0
  11. package/dist/calendar-agenda-fill-icon_35.entry-a19cae9c.js +4178 -0
  12. package/dist/calendar-agenda-fill-icon_35.entry-fa968081.cjs +7 -0
  13. package/dist/{calendar-cancel-icon.entry-a78f27bc.js → calendar-cancel-icon.entry-71eae711.js} +1 -1
  14. package/dist/{calendar-cancel-icon.entry-805febcc.cjs → calendar-cancel-icon.entry-8e8b25b6.cjs} +1 -1
  15. package/dist/{calendar-check-icon_2.entry-4a0fd7bd.cjs → calendar-check-icon_2.entry-562e98cf.cjs} +1 -1
  16. package/dist/{calendar-check-icon_2.entry-7c8b6c92.js → calendar-check-icon_2.entry-6f971ca2.js} +1 -1
  17. package/dist/{calendar-icon.entry-1fc018b4.cjs → calendar-icon.entry-3a59af30.cjs} +1 -1
  18. package/dist/{calendar-icon.entry-96f9727f.js → calendar-icon.entry-3e496896.js} +1 -1
  19. package/dist/{chevron-icon_3.entry-25d90239.js → chevron-icon_3.entry-7eac0ed5.js} +37 -34
  20. package/dist/chevron-icon_3.entry-7ff10540.cjs +1 -0
  21. package/dist/{clock-icon_2.entry-c1b22ed4.js → clock-icon_2.entry-120d672e.js} +5 -5
  22. package/dist/{clock-icon_2.entry-2406c3d0.cjs → clock-icon_2.entry-43873262.cjs} +1 -1
  23. package/dist/{constants-f34b9c6e-b774916c.cjs → constants-7ce66b44-a951d78c.cjs} +5 -5
  24. package/dist/{constants-f34b9c6e-f1c4dd0d.js → constants-7ce66b44-e7ca66c2.js} +484 -383
  25. package/dist/copy-icon_4.entry-57874c4f.cjs +1 -0
  26. package/dist/copy-icon_4.entry-9a949d24.js +45 -0
  27. package/dist/{document-refresh-icon.entry-570f9c9d.js → document-refresh-icon.entry-f0d95ac8.js} +5 -5
  28. package/dist/document-refresh-icon.entry-f1d3f32d.cjs +1 -0
  29. package/dist/elements/index.d.ts +14 -0
  30. package/dist/{elements-dc5b338e-550a6cb1.cjs → elements-dc5b338e-62b53496.cjs} +1 -1
  31. package/dist/{elements-dc5b338e-cafa7a55.js → elements-dc5b338e-974e2077.js} +1 -1
  32. package/dist/{focus-visible-e8093c16-022799ce.js → focus-visible-e8093c16-7a512fc0.js} +1 -1
  33. package/dist/{focus-visible-e8093c16-c14162e8.cjs → focus-visible-e8093c16-923e1041.cjs} +1 -1
  34. package/dist/{forward-icon_6.entry-55752b23.cjs → forward-icon_6.entry-45b70066.cjs} +3 -3
  35. package/dist/{forward-icon_6.entry-9b832146.js → forward-icon_6.entry-675c0b73.js} +9 -9
  36. package/dist/{globe-icon.entry-2b61820e.js → globe-icon.entry-3296e427.js} +2 -2
  37. package/dist/{globe-icon.entry-dabe7b8b.cjs → globe-icon.entry-7ecd6221.cjs} +1 -1
  38. package/dist/google-logo-icon_4.entry-aa9f8b35.js +584 -0
  39. package/dist/google-logo-icon_4.entry-fd734a59.cjs +1 -0
  40. package/dist/index-53420959-1c0d390d.js +5 -0
  41. package/dist/index-53420959-8e7b10db.cjs +1 -0
  42. package/dist/{index-812162da.js → index-5efb84b8.js} +813 -793
  43. package/dist/{index-6d9eeb53-3edef246.js → index-6d9eeb53-4e2a7f9f.js} +2 -2
  44. package/dist/{index-6d9eeb53-3049fc04.cjs → index-6d9eeb53-aa1dfa96.cjs} +1 -1
  45. package/dist/index-d36b8fb8.cjs +42 -0
  46. package/dist/{index.es-9cc0eb3c-52226859.js → index.es-9cc0eb3c-65f8af0c.js} +1 -1
  47. package/dist/{index.es-9cc0eb3c-0c99c055.cjs → index.es-9cc0eb3c-8eefd4fc.cjs} +1 -1
  48. package/dist/{info-icon_2.entry-5f6b9af8.cjs → info-icon_2.entry-e612f1d6.cjs} +1 -1
  49. package/dist/{info-icon_2.entry-2fe6c16c.js → info-icon_2.entry-f06c8dd0.js} +8 -8
  50. package/dist/{input-dropdown_2.entry-dbdb5aa3.cjs → input-dropdown_2.entry-ad380260.cjs} +1 -1
  51. package/dist/{input-dropdown_2.entry-dbd0d6f4.js → input-dropdown_2.entry-ccd95678.js} +3 -3
  52. package/dist/{loading-icon.entry-e179f122.cjs → loading-icon.entry-678a6b3f.cjs} +1 -1
  53. package/dist/loading-icon.entry-9e6670d5.js +15 -0
  54. package/dist/{mailbox-store-64b4ef7c-0eac526c.cjs → mailbox-store-64b4ef7c-9bd02ffd.cjs} +1 -1
  55. package/dist/{mailbox-store-64b4ef7c-22a6c565.js → mailbox-store-64b4ef7c-b56d5e78.js} +2 -2
  56. package/dist/multi-select-dropdown.entry-5bb80d89.cjs +1 -0
  57. package/dist/multi-select-dropdown.entry-edf10867.js +91 -0
  58. package/dist/{nylas-booked-event-card_10.entry-e0990f5b.js → nylas-booked-event-card_10.entry-92f6e85d.js} +267 -235
  59. package/dist/nylas-booked-event-card_10.entry-ad4671b2.cjs +1 -0
  60. package/dist/{nylas-custom-booking-flow.entry-bc64af5f.js → nylas-custom-booking-flow.entry-b39a2bf2.js} +3 -3
  61. package/dist/{nylas-custom-booking-flow.entry-898c8cc9.cjs → nylas-custom-booking-flow.entry-cef0041a.cjs} +1 -1
  62. package/dist/{nylas-form-card.entry-c564b52e.js → nylas-form-card.entry-bf4545e2.js} +11 -11
  63. package/dist/{nylas-form-card.entry-0c71f4fc.cjs → nylas-form-card.entry-fba5d623.cjs} +1 -1
  64. package/dist/{nylas-if-state.entry-e9486e12.js → nylas-if-state.entry-2739dc10.js} +3 -3
  65. package/dist/{nylas-if-state.entry-ff6a2046.cjs → nylas-if-state.entry-d7b818a6.cjs} +1 -1
  66. package/dist/{nylas-list-folders.entry-90716d2b.cjs → nylas-list-folders.entry-0ec6ba20.cjs} +1 -1
  67. package/dist/{nylas-list-folders.entry-0258af1e.js → nylas-list-folders.entry-3197e390.js} +7 -7
  68. package/dist/{nylas-list-threads.entry-21edf012.cjs → nylas-list-threads.entry-2a7e1e84.cjs} +1 -1
  69. package/dist/{nylas-list-threads.entry-1abcdd30.js → nylas-list-threads.entry-9004c490.js} +3 -3
  70. package/dist/{nylas-login.entry-2e0ce95e.cjs → nylas-login.entry-c2ffd6a5.cjs} +1 -1
  71. package/dist/{nylas-login.entry-ba7383ac.js → nylas-login.entry-f2927406.js} +3 -3
  72. package/dist/{nylas-mailbox-pagination.entry-ba6beb08.cjs → nylas-mailbox-pagination.entry-839c9ad3.cjs} +1 -1
  73. package/dist/{nylas-mailbox-pagination.entry-f6186560.js → nylas-mailbox-pagination.entry-e9356835.js} +2 -2
  74. package/dist/{nylas-mailbox-toolbar-button.entry-e18059b0.js → nylas-mailbox-toolbar-button.entry-298a3c47.js} +10 -10
  75. package/dist/{nylas-mailbox-toolbar-button.entry-0875aadb.cjs → nylas-mailbox-toolbar-button.entry-43812d51.cjs} +1 -1
  76. package/dist/{nylas-mailbox.entry-2e3815ed.js → nylas-mailbox.entry-aa42f6c4.js} +4 -4
  77. package/dist/{nylas-mailbox.entry-bb2905bf.cjs → nylas-mailbox.entry-cf13ddf5.cjs} +1 -1
  78. package/dist/{nylas-provider.entry-69ee5061.js → nylas-provider.entry-1a3a195f.js} +39 -39
  79. package/dist/{nylas-provider.entry-51c5cdbf.cjs → nylas-provider.entry-843b5593.cjs} +1 -1
  80. package/dist/nylas-scheduler-editor.entry-048e7a8f.cjs +2 -0
  81. package/dist/{nylas-scheduler-editor.entry-d4a9afb1.js → nylas-scheduler-editor.entry-d56d6d2a.js} +138 -119
  82. package/dist/nylas-scheduling.entry-0ad9b1d0.cjs +1 -0
  83. package/dist/{nylas-scheduling.entry-f82a2822.js → nylas-scheduling.entry-7039a890.js} +52 -52
  84. package/dist/{nylas-threads-refresh.entry-99001756.cjs → nylas-threads-refresh.entry-9cae6ac8.cjs} +1 -1
  85. package/dist/{nylas-threads-refresh.entry-72482d2f.js → nylas-threads-refresh.entry-d951050a.js} +10 -10
  86. package/dist/nylas-threads-search.entry-0d34c5a8.cjs +1 -0
  87. package/dist/{nylas-threads-search.entry-c5fe50e5.js → nylas-threads-search.entry-7a4bbc75.js} +17 -17
  88. package/dist/{nylas-time-window-picker.entry-ccffcf2b.cjs → nylas-time-window-picker.entry-062bc8c1.cjs} +1 -1
  89. package/dist/{nylas-time-window-picker.entry-0d93e7cc.js → nylas-time-window-picker.entry-210c3f1a.js} +2 -2
  90. package/dist/{nylas-view-thread.entry-2d34b41c.js → nylas-view-thread.entry-8b39a997.js} +6 -6
  91. package/dist/{nylas-view-thread.entry-58432a52.cjs → nylas-view-thread.entry-db78ed9c.cjs} +1 -1
  92. package/dist/play-icon_2.entry-19271982.cjs +1 -0
  93. package/dist/play-icon_2.entry-c53f3cac.js +25 -0
  94. package/dist/react.cjs +1 -1
  95. package/dist/react.js +115 -101
  96. package/dist/{refresh-icon.entry-a041136d.js → refresh-icon.entry-75139a0c.js} +4 -4
  97. package/dist/{refresh-icon.entry-1e670732.cjs → refresh-icon.entry-e695cf7f.cjs} +1 -1
  98. package/dist/{register-component-a5a9ca5d-a5c01c35.js → register-component-a5a9ca5d-d69a7a05.js} +1 -1
  99. package/dist/{register-component-a5a9ca5d-b68b6039.cjs → register-component-a5a9ca5d-eebf89e7.cjs} +1 -1
  100. package/dist/scheduler-config-store-9ccfba4d-22a58b7d.cjs +1 -0
  101. package/dist/{scheduler-config-store-4a50a03d-ee42ff96.js → scheduler-config-store-9ccfba4d-fd62a421.js} +8 -6
  102. package/dist/{scheduler-store-f02ce045-23a14e3f.js → scheduler-store-8a400448-3b007d4d.js} +125 -96
  103. package/dist/scheduler-store-8a400448-44e0edad.cjs +1 -0
  104. package/dist/{textarea-component.entry-24a830c1.cjs → textarea-component.entry-48feabb3.cjs} +1 -1
  105. package/dist/{textarea-component.entry-1b4c771b.js → textarea-component.entry-ead5ab00.js} +7 -6
  106. package/dist/{translate-icon.entry-44bde57b.js → translate-icon.entry-55043beb.js} +2 -2
  107. package/dist/{translate-icon.entry-0c0add25.cjs → translate-icon.entry-5f62bc61.cjs} +1 -1
  108. package/dist/{warning-icon.entry-9a77ab01.cjs → warning-icon.entry-2e0a80da.cjs} +1 -1
  109. package/dist/{warning-icon.entry-8956cba2.js → warning-icon.entry-fa644462.js} +5 -5
  110. package/package.json +3 -3
  111. package/dist/arrow-icon.entry-1f54c377.js +0 -15
  112. package/dist/button-component.entry-52ccb6d9.js +0 -16
  113. package/dist/button-component.entry-e79b2d08.cjs +0 -1
  114. package/dist/calendar-info-icon_28.entry-2054703c.cjs +0 -1
  115. package/dist/calendar-info-icon_28.entry-e7bebd13.js +0 -2083
  116. package/dist/chevron-icon_3.entry-7bd4a4b5.cjs +0 -1
  117. package/dist/document-refresh-icon.entry-a0293858.cjs +0 -1
  118. package/dist/google-logo-icon_4.entry-60c0d39a.cjs +0 -1
  119. package/dist/google-logo-icon_4.entry-a0dc33da.js +0 -467
  120. package/dist/index-53420959-67beefed.js +0 -5
  121. package/dist/index-53420959-d3254a34.cjs +0 -1
  122. package/dist/index-e3e9b594.cjs +0 -42
  123. package/dist/input-component.entry-1195d579.js +0 -45
  124. package/dist/input-component.entry-2b6e44c4.cjs +0 -1
  125. package/dist/loading-icon.entry-027a2ad1.js +0 -15
  126. package/dist/nylas-booked-event-card_10.entry-84f64ba5.cjs +0 -1
  127. package/dist/nylas-scheduler-editor.entry-923b8566.cjs +0 -2
  128. package/dist/nylas-scheduling.entry-54f1a5e9.cjs +0 -1
  129. package/dist/nylas-threads-search.entry-462527fd.cjs +0 -1
  130. package/dist/play-icon_2.entry-1ea3fd6b.cjs +0 -1
  131. package/dist/play-icon_2.entry-d08adf17.js +0 -25
  132. package/dist/scheduler-config-store-4a50a03d-884e6df8.cjs +0 -1
  133. package/dist/scheduler-store-f02ce045-42e3647c.cjs +0 -1
@@ -1,2083 +0,0 @@
1
- import { r as p, h as a, c as u, d as r, H as y, g as h, G as w, I as x, J as V, K as q, L as he, M as O, O as me } from "./index-812162da.js";
2
- import { R as m } from "./register-component-a5a9ca5d-a5c01c35.js";
3
- import { T as J, E as K } from "./constants-f34b9c6e-f1c4dd0d.js";
4
- import { s as H } from "./index-6d9eeb53-3edef246.js";
5
- import "./index-53420959-67beefed.js";
6
- import "react";
7
- import "react-dom";
8
- const ge = ".sc-calendar-info-icon-h{display:flex}", ve = ge, _e = class {
9
- constructor(e) {
10
- p(this, e), this.width = "20", this.height = "20";
11
- }
12
- render() {
13
- return a("svg", { key: "9012ae7b873d35927c299ed62d247b77757bb679", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, a("path", { key: "0a3a11d84c99d05ad964d3b5606c072dd31872a7", d: "M12 0C13.3807 0 14.5 1.11929 14.5 2.5V6.59971C14.1832 6.43777 13.8486 6.30564 13.5 6.20703V4H1.5V11.5C1.5 12.3284 2.17157 13 3 13H6.70703C6.80564 13.3486 6.93777 13.6832 7.09971 14H3C1.61929 14 0.5 12.8807 0.5 11.5V2.5C0.5 1.11929 1.61929 0 3 0H12ZM12 1H3C2.17157 1 1.5 1.67157 1.5 2.5V3H13.5V2.5C13.5 1.67157 12.8284 1 12 1ZM11.375 9.5C11.375 9.15482 11.6548 8.875 12 8.875C12.3452 8.875 12.625 9.15482 12.625 9.5C12.625 9.84518 12.3452 10.125 12 10.125C11.6548 10.125 11.375 9.84518 11.375 9.5ZM12.5 13.5C12.5 13.7761 12.2761 14 12 14C11.7239 14 11.5 13.7761 11.5 13.5V11.5C11.5 11.2239 11.7239 11 12 11C12.2761 11 12.5 11.2239 12.5 11.5V13.5ZM7.5 11.5C7.5 9.01472 9.51472 7 12 7C14.4853 7 16.5 9.01472 16.5 11.5C16.5 13.9853 14.4853 16 12 16C9.51472 16 7.5 13.9853 7.5 11.5ZM8.5 11.5C8.5 13.433 10.067 15 12 15C13.933 15 15.5 13.433 15.5 11.5C15.5 9.567 13.933 8 12 8C10.067 8 8.5 9.567 8.5 11.5Z", fill: "currentColor" }));
14
- }
15
- };
16
- _e.style = ve;
17
- const ke = ".sc-calendar-patterns-icon-h{display:flex}", xe = ke, Ce = class {
18
- constructor(e) {
19
- p(this, e), this.width = "20", this.height = "20";
20
- }
21
- render() {
22
- return a("svg", { key: "ca6df3db90bbbffc29dfdc6ee5a440266eaa153d", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, a("path", { key: "ab45118ff407127ca1673159e1b78c93c7c97bed", d: "M3.25 0H11.75C13.2688 0 14.5 1.23122 14.5 2.75V11.25C14.5 12.7688 13.2688 14 11.75 14H3.25C1.73122 14 0.5 12.7688 0.5 11.25V2.75C0.5 1.23122 1.73122 0 3.25 0ZM2 2.75V4H13V2.75C13 2.05964 12.4404 1.5 11.75 1.5H3.25C2.55964 1.5 2 2.05964 2 2.75ZM12.2071 5L8.20711 9H10.7929L13 6.79289V5H12.2071ZM10.7929 5H8.20711L4.20711 9H6.79289L10.7929 5ZM2.79289 9L6.79289 5H4.20711L2 7.20711V9H2.79289ZM2 5.79289L2.79289 5H2V5.79289ZM12.2071 9H13V8.20711L12.2071 9Z", fill: "currentColor" }));
23
- }
24
- };
25
- Ce.style = xe;
26
- const we = 'label{--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;display:flex;align-items:center;font-family:var(--nylas-font-family);cursor:pointer;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}label input[type=checkbox]{position:absolute;opacity:0;cursor:pointer}label input[type=checkbox]:focus~.checkmark,label input[type=checkbox]:hover~.checkmark{border-color:var(--nylas-primary)}label input[type=checkbox]:checked~.checkmark{color:var(--nylas-base-0);background:var(--nylas-primary) url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8c3ZnIHdpZHRoPSIxMiIgaGVpZ2h0PSI5IiB2aWV3Qm94PSIwIDAgMTIgOSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCiAgPHBhdGggZD0iTTQuNTc1IDguOTc3cy0uNDA0LS4wMDctLjUzNi0uMTY1TC4wNTcgNS42NGwuODI5LTEuMjI3TDQuNDcgNy4yNjggMTAuOTIxLjA4NmwuOTIzIDEuMTAzLTYuODYzIDcuNjRjLS4xMzQtLjAwMy0uNDA2LjE0OC0uNDA2LjE0OHoiIGZpbGw9IiNGRkYiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPg0KPC9zdmc+) 50% 40% no-repeat;border:2px solid var(--nylas-primary)}label .checkmark{border-radius:var(--nylas-border-radius);border:2px solid var(--nylas-base-800);position:absolute;left:0;top:2px;width:18px;height:18px;cursor:pointer;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}label .label{margin-left:32px;font-size:16px;font-weight:400;color:var(--nylas-base-800);line-height:24px}', Oe = we, Ie = class {
27
- constructor(e) {
28
- p(this, e), this.nylasFormCheckboxToggled = u(this, "nylasFormCheckboxToggled", 7), this.name = "checkbox", this.checked = !1, this.label = "", this.isChecked = this.checked;
29
- }
30
- componentWillLoad() {
31
- this.isChecked = this.checked;
32
- }
33
- toggleCheck() {
34
- this.isChecked = !this.isChecked, this.nylasFormCheckboxToggled.emit({
35
- checked: this.isChecked,
36
- name: this.name,
37
- label: this.label
38
- });
39
- }
40
- render() {
41
- return a("label", { key: "ff418217723b6044270dc691f7d0e11aea5fb204" }, a("input", { key: "c45008c89d147534ba6b4a70120b7c5159a25ce6", type: "checkbox", name: this.name, checked: this.isChecked, onChange: () => this.toggleCheck() }), a("span", { key: "a785e711233dab04bb19bcf1f1c6f665d7460015", class: "checkmark" }), a("slot", { key: "05e7f91a9e038bf9a467d63c9c004f7b90454b6f", name: "label" }, a("span", { key: "35a5c8bef4f998f993fbdcf2b752b83432218422", class: "label" }, this.label)));
42
- }
43
- };
44
- Ie.style = Oe;
45
- const Te = ".sc-flow-icon-h{display:flex}", He = Te, $e = class {
46
- constructor(e) {
47
- p(this, e), this.width = "16", this.height = "12";
48
- }
49
- render() {
50
- return a("svg", { key: "18bdb1e3a2d6d1f4b9f9e1983c1ad7156e83e489", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, a("path", { key: "a291353c08dfca6bb961e83386a3bfe71a840299", d: "M13 1.66211C11.8954 1.66211 11 2.55754 11 3.66211C11 4.76668 11.8954 5.66211 13 5.66211C14.1046 5.66211 15 4.76668 15 3.66211C15 2.55754 14.1046 1.66211 13 1.66211ZM10.0407 3.16678C10.2768 1.74563 11.5119 0.662109 13 0.662109C14.6569 0.662109 16 2.00526 16 3.66211C16 5.31896 14.6569 6.66211 13 6.66211C11.5162 6.66211 10.2839 5.58482 10.0428 4.16971C9.37629 4.23688 8.82682 4.7426 8.71466 5.41551L8.27173 8.07311C8.07929 9.22776 7.11428 10.087 5.9593 10.1574C5.72319 11.5786 4.48813 12.6621 3 12.6621C1.34315 12.6621 0 11.319 0 9.66211C0 8.00526 1.34315 6.66211 3 6.66211C4.48384 6.66211 5.71607 7.73939 5.95724 9.15451C6.62371 9.08734 7.17318 8.58162 7.28534 7.90871L7.72827 5.25111C7.92071 4.09646 8.88571 3.23718 10.0407 3.16678ZM3 7.66211C1.89543 7.66211 1 8.55754 1 9.66211C1 10.7667 1.89543 11.6621 3 11.6621C4.10457 11.6621 5 10.7667 5 9.66211C5 8.55754 4.10457 7.66211 3 7.66211Z", fill: "currentColor" }));
51
- }
52
- };
53
- $e.style = He;
54
- const De = ".sc-location-icon-h{display:flex}", Se = De, Ee = class {
55
- constructor(e) {
56
- p(this, e), this.width = "16", this.height = "18";
57
- }
58
- render() {
59
- return a("svg", { key: "c4b6ed753f7c3c3e26ae2fe2e92b429abe4eceb4", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, a("path", { key: "cff1afc5e511a814bfc16fc7c8fdaef6356a7952", d: "M10 7.66211C10 9.31896 8.65685 10.6621 7 10.6621C5.34315 10.6621 4 9.31896 4 7.66211C4 6.00526 5.34315 4.66211 7 4.66211C8.65685 4.66211 10 6.00526 10 7.66211ZM9 7.66211C9 6.55754 8.10457 5.66211 7 5.66211C5.89543 5.66211 5 6.55754 5 7.66211C5 8.76668 5.89543 9.66211 7 9.66211C8.10457 9.66211 9 8.76668 9 7.66211ZM11.9497 12.6171C14.6834 9.88221 14.6834 5.44812 11.9497 2.71326C9.21608 -0.0216067 4.78392 -0.0216067 2.05025 2.71326C-0.683418 5.44812 -0.683418 9.88221 2.05025 12.6171L3.57128 14.1159L5.61408 16.101L5.74691 16.2188C6.52168 16.8468 7.65623 16.8076 8.38611 16.1012L10.8223 13.7312L11.9497 12.6171ZM2.75499 3.4183C5.09944 1.07282 8.90055 1.07282 11.245 3.4183C13.5294 5.70364 13.5879 9.3725 11.4207 11.7288L11.245 11.912L9.92371 13.216L7.69315 15.3846L7.60016 15.4642C7.24594 15.732 6.7543 15.732 6.40012 15.4642L6.30713 15.3845L3.3263 12.4791L2.75499 11.912L2.57927 11.7288C0.412077 9.3725 0.47065 5.70364 2.75499 3.4183Z", fill: "currentColor" }));
60
- }
61
- };
62
- Ee.style = Se;
63
- const Le = ".sc-location-off-icon-h{display:flex}", Ne = Le, Pe = class {
64
- constructor(e) {
65
- p(this, e), this.width = "16", this.height = "18";
66
- }
67
- render() {
68
- return a("svg", { key: "b7eb987c802beac155700ccbd2c51189708f3422", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, a("path", { key: "91e1d8458400d7d502def34ce86611fc17110cb4", d: "M0.146447 0.808556C0.341709 0.613294 0.658291 0.613294 0.853553 0.808556L15.8536 15.8086C16.0488 16.0038 16.0488 16.3204 15.8536 16.5157C15.6583 16.7109 15.3417 16.7109 15.1464 16.5157L12.0938 13.463L11.8223 13.7312L9.38611 16.1012C8.65623 16.8076 7.52168 16.8468 6.74691 16.2188L6.61408 16.101L4.57128 14.1159L3.05025 12.6171C0.607421 10.1732 0.347525 6.37239 2.27056 3.63976L0.146447 1.51566C-0.0488155 1.3204 -0.0488155 1.00382 0.146447 0.808556ZM9.07768 10.4469C8.74346 10.576 8.38024 10.6468 8.0005 10.6468C6.34839 10.6468 5.00909 9.30689 5.00909 7.65406C5.00909 7.27461 5.07967 6.91166 5.20843 6.57763L2.98793 4.35713C1.49206 6.62038 1.68917 9.67377 3.57927 11.7288L3.75499 11.912L4.3263 12.4791L7.30713 15.3845L7.40012 15.4642C7.7543 15.732 8.24594 15.732 8.60016 15.4642L8.69315 15.3846L10.9237 13.216L11.3883 12.7575L9.07768 10.4469ZM9.85409 8.39486L10.5983 9.13904C10.8487 8.70143 10.9919 8.19447 10.9919 7.65406C10.9919 6.00122 9.65261 4.66134 8.0005 4.66134C7.45986 4.66134 6.95271 4.80482 6.51504 5.05581L7.25921 5.79998C7.48839 5.70819 7.73855 5.6577 8.0005 5.6577C9.10258 5.6577 9.99599 6.5515 9.99599 7.65406C9.99599 7.91581 9.94564 8.16581 9.85409 8.39486ZM4.35291 2.89368C6.70671 1.08827 10.0908 1.26314 12.245 3.4183C14.3986 5.57283 14.5739 8.95702 12.771 11.3118L13.4812 12.022C15.6702 9.27273 15.493 5.25762 12.9497 2.71326C10.4058 0.168159 6.39081 -0.00843871 3.64269 2.18347L4.35291 2.89368Z", fill: "currentColor" }));
69
- }
70
- };
71
- Pe.style = Ne;
72
- const Fe = ':host{display:block;width:inherit;--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}.dropdown{display:inline-block;width:100%;position:relative}.dropdown .dropdown-label{display:flex;align-items:center;gap:0.25rem;color:var(--nylas-base-800)}.dropbtn{width:inherit;height:48px;color:black;padding:0.5rem;font-size:1rem;cursor:pointer;display:flex;gap:0.5rem;justify-content:space-between;align-items:center;background:transparent;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}.dropbtn.focus{background:transparent}.dropbtn:hover,.dropbtn:active{border:1px solid var(--nylas-primary)}.dropbtn:active{outline:2px solid var(--nylas-primary)}.dropbtn span.open{transform:rotate(90deg)}.dropbtn span.closed{transform:rotate(270deg)}.dropdown-content{display:block;margin-top:0.5rem;background-color:var(--nylas-base-0);width:100%;max-height:336px;overflow:auto;border:1px solid #ddd;z-index:1;border-radius:4px;position:absolute;box-shadow:0px 4px 6px -2px rgba(0, 0, 0, 0.0509803922);box-shadow:0px 10px 15px -3px rgba(0, 0, 0, 0.1019607843)}.dropdown-content ul{padding:0;list-style-type:none;color:var(--nylas-base-900);max-height:336px}.dropdown-content ul li{padding:16px, 12px, 16px, 12px;color:black;padding:12px 16px;text-decoration:none;display:block;font-family:inherit;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0px;text-align:left;cursor:pointer}.dropdown-content ul li:hover,.dropdown-content ul li:focus{background-color:var(--nylas-base-100)}.dropdown-content ul li label{display:flex;align-items:center;gap:0.5rem}.dropdown-content ul li label input{margin:0}.selected-options{display:flex;flex-wrap:wrap;gap:0.5rem;padding:0.5rem 0;margin-top:0.25rem;background:var(--nylas-base-0)}.selected-options .selected-option{display:flex;align-items:center;gap:0.5rem;padding:4px 8px;border-radius:var(--nylas-border-radius-2x);background:var(--nylas-base-100);color:var(--nylas-base-800);font-size:16px;font-weight:500;line-height:1.5rem;letter-spacing:0.5px}.selected-options .selected-option button{background:transparent;border:none;cursor:pointer;padding:0}.selected-options .selected-option button:hover{color:var(--nylas-primary)}', Ae = Fe, Re = class {
73
- constructor(e) {
74
- p(this, e), this.selectedOptionsChanged = u(this, "selectedOptionsChanged", 7), this.name = void 0, this.label = void 0, this.options = [], this.availableOptions = this.options, this.isOpen = !1, this.ariaActivedescendant = "", this.shouldFocusFirstOption = !1;
75
- }
76
- componentDidRender() {
77
- r("multi-select-dropdown", "componentDidRender"), this.isOpen && this.shouldFocusFirstOption && (this.ariaActivedescendant = this.availableOptions[0].value, this.focusOption(0), this.shouldFocusFirstOption = !1);
78
- }
79
- handleOutsideClick(e) {
80
- !e.composedPath().includes(this.el) && this.isOpen && (this.isOpen = !1);
81
- }
82
- selectOption(e) {
83
- this.availableOptions = this.availableOptions.map((n) => (n.value === e.value && (n.selected = !e.selected), n));
84
- const t = this.availableOptions.filter((n) => n.selected).map((n) => n.value);
85
- this.selectedOptionsChanged.emit({
86
- value: t,
87
- name: this.name
88
- });
89
- }
90
- toggleDropdown() {
91
- this.isOpen = !this.isOpen, this.isOpen ? this.shouldFocusFirstOption = !0 : this.ariaActivedescendant = "";
92
- }
93
- handleSelectButtonKeyDown(e) {
94
- switch (e.key) {
95
- case "ArrowDown":
96
- case "Enter":
97
- e.preventDefault(), this.isOpen || this.toggleDropdown();
98
- break;
99
- case "Escape":
100
- this.isOpen = !1;
101
- break;
102
- }
103
- }
104
- handleListboxKeydown(e) {
105
- const t = this.availableOptions, n = t.findIndex((i) => i.value === this.ariaActivedescendant);
106
- switch (e.key) {
107
- case "ArrowDown":
108
- case "Tab":
109
- if (e.shiftKey) {
110
- e.preventDefault();
111
- const l = n - 1 >= 0 ? n - 1 : t.length - 1;
112
- this.ariaActivedescendant = t[l].value, this.focusOption(l);
113
- } else {
114
- e.preventDefault();
115
- const l = n + 1 < t.length ? n + 1 : 0;
116
- this.ariaActivedescendant = t[l].value, this.focusOption(l);
117
- }
118
- break;
119
- case "ArrowUp":
120
- e.preventDefault();
121
- const i = n - 1 >= 0 ? n - 1 : t.length - 1;
122
- this.ariaActivedescendant = t[i].value, this.focusOption(i);
123
- break;
124
- case "Enter":
125
- e.preventDefault(), this.ariaActivedescendant && this.selectOption(t[n]);
126
- break;
127
- case "Escape":
128
- this.isOpen = !1;
129
- break;
130
- }
131
- }
132
- focusOption(e) {
133
- var l;
134
- const t = this.availableOptions[e];
135
- if (!t)
136
- return;
137
- const n = t.value, i = (l = this.el.shadowRoot) == null ? void 0 : l.getElementById(n);
138
- i && (i.focus(), i.scrollIntoView({ behavior: "smooth", block: "nearest" }));
139
- }
140
- getSelectedOptions() {
141
- return this.availableOptions.filter((e) => e.selected);
142
- }
143
- renderOption(e) {
144
- return a("li", { key: e.value, id: e.value, role: "option", tabindex: "0", "aria-selected": e.selected ? "true" : "false", onClick: (t) => {
145
- t.stopImmediatePropagation(), this.selectOption(e);
146
- }, class: { selected: !!e.selected } }, a("label", { htmlFor: e.value }, a("input", { "aria-hidden": "true", id: e.value, type: "checkbox", checked: e.selected }), a("span", null, e.label)));
147
- }
148
- render() {
149
- var e, t;
150
- return a(y, { key: "af0befb6c6c059e41a99ebe56c9632e6445e897b" }, a("div", { key: "e93abae0184670a75caa02b4f687a374fce9a055", class: "dropdown", part: "msd_dropdown" }, a("label", { key: "cb7ab81e0c7e23934dfc814a4c5281470e2ad510", class: "dropdown-label" }, this.label, a("slot", { key: "88fdcec62b47bf2b7da977c06b36300722789373", name: "label-icon", "aria-hidden": "true" })), a("button", { key: "17e03081353c32b5f571e7655fbe7b0c2ea87a35", part: "msd_dropdown-button", class: { dropbtn: !0, open: this.isOpen }, onClick: () => this.toggleDropdown(), "aria-haspopup": "listbox", "aria-expanded": this.isOpen ? "true" : "false", "aria-label": this.name, onKeyDown: (n) => this.handleSelectButtonKeyDown(n) }, a("slot", { key: "f1925d4d315c6be091a07f18261e574792883fd7", name: "select-icon", "aria-hidden": "true" }), a("span", { key: "02c03946856eed3b6207ec84abbba0d16554af9f", class: "selected-option", part: "msd_dropdown-button-selected-label" }, this.getSelectedOptions().length > 1 ? `Multiple ${this.name}s selected` : ((e = this.availableOptions.filter((n) => n.selected)[0]) == null ? void 0 : e.label) ?? ((t = this.availableOptions[0]) == null ? void 0 : t.label)), a("span", { key: "bbd36a37a7ee28e299da6b22612206e4bbbcf8db", class: this.isOpen ? "open" : "closed", "aria-hidden": "true" }, a("chevron-icon", { key: "4e6f9c3dfd33c8d87b9584648487783e417961c6", width: "16", height: "16" }))), this.isOpen ? null : a("div", { class: "selected-options" }, this.getSelectedOptions().map((n) => a("span", { class: "selected-option" }, n.label, a("button", { key: n.label, onClick: () => this.selectOption(n) }, a("close-icon", null))))), this.isOpen ? a("div", { class: "dropdown-content", part: "msd_dropdown-content" }, a("ul", { tabindex: "-1", role: "listbox", "aria-label": this.name, "aria-multiselectable": !0, "aria-activedescendant": this.ariaActivedescendant, onKeyDown: (n) => this.handleListboxKeydown(n) }, this.availableOptions.map((n) => this.renderOption(n)))) : null));
151
- }
152
- get el() {
153
- return h(this);
154
- }
155
- };
156
- Re.style = Ae;
157
- const Me = ':host{display:block;margin:1rem;--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}.nylas-additional-participants__title{color:var(--nylas-base-nylas-base-900-aaa, #101323);font-size:16px;font-style:normal;font-weight:600;line-height:20px;margin:0;text-align:left}.nylas-additional-participants__subtitle{color:var(--nylas-base-600);font-size:14px;font-style:normal;font-weight:400;line-height:20px;margin:0.25rem 0px 0px;text-align:left}.nylas-additional-participants__content{padding:1rem;display:flex;flex-direction:column;gap:1rem}.nylas-additional-participants__input_group{padding-top:8px;display:flex;flex-direction:column;gap:4px}.nylas-additional-participants__input_group label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:14px;font-style:normal;font-weight:400;line-height:150%}.nylas-additional-participants__input_wrapper{display:flex;border-width:1;border-radius:8px;border:1px solid var(--nylas-base-300)}.nylas-additional-participants__input_wrapper button{padding:12px;border:none;border-left:1px solid var(--nylas-base-300);background:none;cursor:pointer}.nylas-additional-participants__input_wrapper button:hover,.nylas-additional-participants__input_wrapper button:active{color:var(--nylas-primary)}.nylas-additional-participants__input_wrapper_organizer{background:var(--nylas-base-50)}.nylas-additional-participants__input{flex:1;display:flex;justify-content:space-between}.nylas-additional-participants__input.organizer{padding:12px 16px}.nylas-additional-participants__input input{border:none;outline:none;background:none;width:100%}.nylas-additional-participants__input input-dropdown{width:100%}.nylas-additional-participants__input input-dropdown::part(id_dropdown){width:100%;height:100%}.nylas-additional-participants__input input-dropdown::part(id_dropdown-input){height:100%;border-radius:var(--nylas-border-radius-2x);border:none;border-top-right-radius:initial;border-bottom-right-radius:initial;padding-left:16px}.nylas-additional-participants__add{padding:12px;display:flex;align-items:center;border:none;background:none;cursor:pointer}.nylas-additional-participants__add span{padding:0 8px;font-size:16px;font-style:normal;font-weight:500}.nylas-additional-participants__add:hover,.nylas-additional-participants__add:active{color:var(--nylas-primary)}', ze = Me;
158
- var je = function(e, t, n, i) {
159
- var l = arguments.length, s = l < 3 ? t : i === null ? i = Object.getOwnPropertyDescriptor(t, n) : i, o;
160
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
161
- s = Reflect.decorate(e, t, n, i);
162
- else
163
- for (var d = e.length - 1; d >= 0; d--)
164
- (o = e[d]) && (s = (l < 3 ? o(s) : l > 3 ? o(t, n, s) : o(t, n)) || s);
165
- return l > 3 && s && Object.defineProperty(t, n, s), s;
166
- }, $ = function(e, t) {
167
- if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
168
- return Reflect.metadata(e, t);
169
- };
170
- const Y = class {
171
- constructor(e) {
172
- p(this, e), this.valueChanged = u(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.name = "participants", this.eventParticipants = void 0, this.participantOptions = void 0, this.participants = this.eventParticipants ?? [], this.participantsValid = !0;
173
- }
174
- elementNameChangedHandler(e) {
175
- r("nylas-additional-participants", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
176
- }
177
- connectedCallback() {
178
- r("nylas-additional-participants", "connectedCallback");
179
- }
180
- componentWillLoad() {
181
- r("nylas-additional-participants", "componentWillLoad"), this.host.setAttribute("name", this.name);
182
- }
183
- componentDidLoad() {
184
- r("nylas-additional-participants", "componentDidLoad"), this.updateFormValue();
185
- }
186
- disconnectedCallback() {
187
- r("nylas-additional-participants", "disconnectedCallback");
188
- }
189
- onInputOptionChanged(e) {
190
- var i;
191
- r("nylas-additional-participants", "onInputOptionChanged");
192
- const t = e.detail.name;
193
- this.participants[t].email = e.detail.value;
194
- const n = (i = this.participantOptions) == null ? void 0 : i.find((l) => l.email === e.detail.value);
195
- this.participants[t].availability = n ? { calendar_ids: ["primary"] } : void 0, this.participants[t].name = (n == null ? void 0 : n.name) || e.detail.value, this.participants = [...this.participants], this.updateFormValue();
196
- }
197
- onParticipantChange(e, t) {
198
- r("nylas-additional-participants", "onParticipantChange"), this.participants[t].email = e.target.value, this.updateFormValue();
199
- }
200
- addParticipant() {
201
- r("nylas-additional-participants", "addParticipant"), this.participants = [...this.participants, { name: "", email: "", is_organizer: !1 }], this.updateFormValue();
202
- }
203
- removeParticipant(e) {
204
- r("nylas-additional-participants", "removeParticipant"), this.participants = this.participants.filter((t, n) => n !== e), this.updateFormValue();
205
- }
206
- validate(e, t) {
207
- r("nylas-additional-participants", "validate");
208
- const i = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(String(e).toLowerCase());
209
- this.participants[t].is_valid = i, this.updateFormValue();
210
- }
211
- updateFormValue() {
212
- r("nylas-additional-participants", "updateFormValue"), this.internals.setFormValue(JSON.stringify(this.participants), this.name), this.valueChanged.emit({ value: JSON.stringify(this.participants), name: this.name });
213
- }
214
- getArrayDifference(e, t) {
215
- return e.filter((i) => !t.some((l) => i.email === l.email)).map((i) => ({ value: i.email, label: i.email }));
216
- }
217
- render() {
218
- return a(y, { key: "30915e4727e68b0652fc265ced20a3fce93f94d7" }, a("nylas-form-card", { key: "e652c77a0e382aeaab234593ad1cd8fa6cc1b858" }, a("h3", { key: "ee6d3ac07461ef43976e32069cd978a2dc32ba96", slot: "header-title", class: "nylas-additional-participants__title", part: "nap__title" }, "Additional participants"), a("p", { key: "72d712c00b839ad8220ea23cce11cfc233cf14b5", slot: "header-subtitle", class: "nylas-additional-participants__subtitle", part: "nap__subtitle" }, "Add anyone else who would be joining for this event."), a("div", { key: "87b08e14dc5a16b2381728263e079c46545284f4", slot: "content", class: "nylas-additional-participants__content" }, a("div", { key: "da67ac11f9c977007ce885531bcdcbf9c59aca0c" }, this.participants.map((e, t) => a("div", { class: "nylas-additional-participants__input_group", part: "nap__input_group" }, a("label", null, e.is_organizer ? "Organizer" : `Participant ${t}`), a("div", { part: "nap__input_wrapper", class: `nylas-additional-participants__input_wrapper ${e.is_organizer && "nylas-additional-participants__input_wrapper_organizer"} ${e.is_valid === !1 && "nylas-additional-participants__input_wrapper_invalid"}` }, a("div", { class: { "nylas-additional-participants__input": !0, organizer: e.is_organizer }, part: "nap__input" }, e.is_organizer ? a("input", { type: "text", value: e.email, onInput: (n) => {
219
- this.onParticipantChange(n, t);
220
- }, readOnly: e.is_organizer, onBlur: () => this.validate(e.email, t) }) : a("input-dropdown", { name: `${t}`, filterable: !0, inputValue: e.email, options: this.getArrayDifference(this.participantOptions || [], this.participants) }), !e.is_organizer && a("button", { onClick: () => this.removeParticipant(t), part: "nap__remove-participant" }, a("close-icon", null))))))), a("button", { key: "dd0f412f9affa5cf2b3ab5a331365d5b217e1ade", class: "nylas-additional-participants__add", part: "nap__add-participant", onClick: () => this.addParticipant() }, a("add-circle-icon", { key: "089167b221913ef3e0393efa23db2698a93b3e73" }), " ", a("span", { key: "70860b8258a871e714f2f33890d35ec46835f349" }, "Add ", this.participants.length > 1 ? "another" : "a", " participant")))));
221
- }
222
- static get formAssociated() {
223
- return !0;
224
- }
225
- get host() {
226
- return h(this);
227
- }
228
- static get watchers() {
229
- return {
230
- name: ["elementNameChangedHandler"]
231
- };
232
- }
233
- };
234
- je([
235
- m({
236
- name: "nylas-additional-participants",
237
- stateToProps: /* @__PURE__ */ new Map([["schedulerConfig.additionalParticipants", "participantOptions"]]),
238
- eventToProps: {},
239
- fireRegisterEvent: !0
240
- }),
241
- $("design:type", Function),
242
- $("design:paramtypes", []),
243
- $("design:returntype", void 0)
244
- ], Y.prototype, "render", null);
245
- Y.style = ze;
246
- const We = ':host{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;width:inherit}.nylas-availability-picker{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200)}.nylas-availability-picker .header{padding:1rem}.nylas-availability-picker .header h3{margin:0;font-size:16px;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-availability-picker .header p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.nylas-availability-picker .content{padding:1rem;color:var(--nylas-base-900);font-size:16px;font-family:var(--nylas-font-family);border-top:1px solid var(--nylas-base-200)}@media screen and (max-width: 504px){.nylas-availability-picker .content{font-size:15px}}.nylas-availability-picker .content .select-timezone{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--nylas-base-200);padding-bottom:1rem;gap:1rem}.nylas-availability-picker .content .select-timezone h4{display:flex;gap:0.5rem;align-items:center;margin:0;font-size:16px;font-weight:500;line-height:20px}@media screen and (max-width: 504px){.nylas-availability-picker .content .select-timezone h4{font-size:15px}}.nylas-availability-picker .content .availability{display:flex;flex-direction:column;gap:1rem;padding:0 0.5rem;margin:1rem 0}@media screen and (max-width: 504px){.nylas-availability-picker .content .availability{gap:0.5rem;padding:0}}.nylas-availability-picker .content .availability .availability-day{display:grid;grid-template-columns:minmax(auto, 65px) 1fr minmax(auto, 40px);gap:1rem;align-items:baseline}@media screen and (max-width: 768px){.nylas-availability-picker .content .availability .availability-day{grid-template-columns:78px 1fr auto}}@media screen and (max-width: 504px){.nylas-availability-picker .content .availability .availability-day{display:inline-grid;gap:8px;grid-template-columns:60px 1fr auto}}.nylas-availability-picker .content .availability .availability-day .day{display:flex;gap:0.5rem;align-items:center}@media screen and (max-width: 504px){.nylas-availability-picker .content .availability .availability-day .day{gap:0.25rem}}.nylas-availability-picker .content .availability .availability-day .day input[type=checkbox]{transform:scale(1.3)}.nylas-availability-picker .content .availability .availability-day .time-ranges span.unavailable{height:48px;display:flex;align-items:center;justify-content:center}.nylas-availability-picker .content .availability .availability-day .time-ranges .time-range{display:flex;gap:1.5rem;justify-content:space-between;align-items:baseline}@media screen and (max-width: 504px){.nylas-availability-picker .content .availability .availability-day .time-ranges .time-range{justify-content:unset;gap:0.5rem}}.nylas-availability-picker .content .availability .availability-day .time-ranges .time-range .pickers{display:flex;gap:1rem}@media screen and (max-width: 504px){.nylas-availability-picker .content .availability .availability-day .time-ranges .time-range .pickers{gap:0.5rem}}.nylas-availability-picker .content .availability .availability-day .time-ranges .time-range .pickers span{margin-top:0.75rem}.nylas-availability-picker .content .availability .availability-day .time-ranges .time-range:not(:last-of-type){margin-bottom:1rem}.nylas-availability-picker .content .availability .availability-day .time-ranges p.error{color:var(--nylas-error)}.nylas-availability-picker .content .availability .availability-day button{border:none;background:transparent;height:40px;cursor:pointer;color:var(--nylas-base-800)}.nylas-availability-picker .content .availability .availability-day button:hover,.nylas-availability-picker .content .availability .availability-day button:active{color:var(--nylas-primary)}select-dropdown{width:auto}select-dropdown::part(sd_dropdown-button){justify-content:initial}', Be = We;
247
- var Ze = function(e, t, n, i) {
248
- var l = arguments.length, s = l < 3 ? t : i === null ? i = Object.getOwnPropertyDescriptor(t, n) : i, o;
249
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
250
- s = Reflect.decorate(e, t, n, i);
251
- else
252
- for (var d = e.length - 1; d >= 0; d--)
253
- (o = e[d]) && (s = (l < 3 ? o(s) : l > 3 ? o(t, n, s) : o(t, n)) || s);
254
- return l > 3 && s && Object.defineProperty(t, n, s), s;
255
- }, D = function(e, t) {
256
- if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
257
- return Reflect.metadata(e, t);
258
- };
259
- const Q = class {
260
- constructor(e) {
261
- p(this, e), this.valueChanged = u(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.selectedConfiguration = void 0, this.openHours = void 0, this.name = "availability", this.defaultTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone, this.hideHeader = !1, this.schedule = {
262
- SUN: [],
263
- MON: [{ start: "09:00am", end: "05:00pm" }],
264
- TUE: [{ start: "09:00am", end: "05:00pm" }],
265
- WED: [{ start: "09:00am", end: "05:00pm" }],
266
- THU: [{ start: "09:00am", end: "05:00pm" }],
267
- FRI: [{ start: "09:00am", end: "05:00pm" }],
268
- SAT: []
269
- }, this.timezone = Intl.DateTimeFormat().resolvedOptions().timeZone, this.overlapDays = {};
270
- }
271
- elementNameChangedHandler(e) {
272
- r("nylas-calendar-picker", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
273
- }
274
- configChangedHandler(e) {
275
- var n, i;
276
- const t = (i = (n = e == null ? void 0 : e.availability) == null ? void 0 : n.availability_rules) == null ? void 0 : i.default_open_hours;
277
- t && this.openHoursToSchedule(t);
278
- }
279
- scheduleChanged(e, t) {
280
- var n;
281
- if (e !== t) {
282
- let i = {};
283
- if (Object.keys(e).forEach((l) => {
284
- const s = e[l];
285
- if (s.length > 0) {
286
- const o = this.getOverlaps(s);
287
- o.length > 0 && (i[l] = o);
288
- }
289
- }), this.overlapDays = i, typeof this.internals.setFormValue != "function")
290
- return;
291
- if (Object.keys(i).length > 0) {
292
- const l = (n = this.host.shadowRoot) == null ? void 0 : n.getElementById(Object.keys(i)[0]);
293
- l && (r("nylas-availability-picker", "The time ranges are overlapping. Overlap: ", i), this.internals.setValidity({ customError: !0 }, "Overlapping time ranges found", l));
294
- } else
295
- this.internals.setValidity({ customError: !1 }), this.internals.setFormValue(JSON.stringify({
296
- openHours: this.scheduleToOpenHours(this.schedule),
297
- timezone: this.timezone
298
- }));
299
- this.valueChanged.emit({
300
- value: JSON.stringify({
301
- openHours: this.scheduleToOpenHours(e),
302
- timezone: this.timezone
303
- }),
304
- name: this.name
305
- });
306
- }
307
- }
308
- nylasFormDropdownChangedHandler(e) {
309
- const { name: t, value: n } = e.detail;
310
- if (t === "timezone") {
311
- if (this.timezone = n, typeof this.internals.setFormValue != "function")
312
- return;
313
- const i = {
314
- openHours: this.scheduleToOpenHours(this.schedule),
315
- timezone: this.timezone
316
- };
317
- this.internals.setFormValue(JSON.stringify(i)), this.valueChanged.emit({
318
- value: JSON.stringify(i),
319
- name: this.name
320
- });
321
- }
322
- }
323
- connectedCallback() {
324
- r("nylas-availability-picker", "connectedCallback");
325
- }
326
- disconnectedCallback() {
327
- r("nylas-availability-picker", "disconnectedCallback");
328
- }
329
- componentWillLoad() {
330
- r("nylas-availability-picker", "componentWillLoad"), this.host.setAttribute("name", this.name);
331
- }
332
- componentDidLoad() {
333
- if (r("nylas-availability-picker", "componentDidLoad"), this.openHours && this.openHours.length > 0 && this.openHoursToSchedule(this.openHours), typeof this.internals.setFormValue != "function")
334
- return;
335
- const e = {
336
- openHours: this.scheduleToOpenHours(this.schedule),
337
- timezone: this.timezone
338
- };
339
- this.internals.setFormValue(JSON.stringify(e)), this.valueChanged.emit({
340
- value: JSON.stringify(e),
341
- name: this.name
342
- });
343
- }
344
- getOverlaps(e) {
345
- let t = e.map((i, l) => ({
346
- start: w(i.start),
347
- end: w(i.end),
348
- originalIndex: l
349
- }));
350
- t.sort((i, l) => i.start - l.start);
351
- let n = [];
352
- for (let i = 1; i < t.length; i++)
353
- t[i].start < t[i - 1].end && (n.includes(t[i].originalIndex) || n.push(t[i].originalIndex), n.includes(t[i - 1].originalIndex) || n.push(t[i - 1].originalIndex));
354
- return n.sort((i, l) => i - l);
355
- }
356
- addTimeRange(e) {
357
- const t = this.schedule[e], n = 0, i = 1425;
358
- if (t.length === 0)
359
- this.schedule[e] = [{ start: "09:00am", end: "05:00pm" }];
360
- else {
361
- const l = t.map((o) => ({
362
- start: w(o.start),
363
- end: w(o.end)
364
- })).sort((o, d) => o.start - d.start), s = l[l.length - 1].end;
365
- if (s + 60 <= i)
366
- this.schedule[e].push({
367
- start: x(O(s)),
368
- end: x(O(s + 60))
369
- });
370
- else {
371
- let o = !1;
372
- if (l[0].start > n + 60 && (this.schedule[e].push({
373
- start: x(O(n)),
374
- end: x(O(n + 60))
375
- }), o = !0), !o)
376
- for (let d = 0; d < l.length - 1; d++) {
377
- const b = l[d].end;
378
- if (l[d + 1].start - b >= 60) {
379
- this.schedule[e].push({
380
- start: x(O(b)),
381
- end: x(O(b + 60))
382
- });
383
- break;
384
- }
385
- }
386
- }
387
- }
388
- this.schedule[e].sort((l, s) => w(l.start) - w(s.start)), this.schedule = { ...this.schedule };
389
- }
390
- removeTimeRange(e, t) {
391
- this.schedule[e].splice(t, 1), this.schedule = { ...this.schedule };
392
- }
393
- setTime(e) {
394
- const { key: t, value: n } = e.detail, [i, l] = t.split("_"), [s, o] = i.split(":");
395
- l === "start" ? this.schedule[s][o].start = n : l === "end" && (this.schedule[s][o].end = n), this.internals.setValidity({ customError: !1 }), this.schedule = { ...this.schedule };
396
- }
397
- setFormError(e) {
398
- var s;
399
- const { key: t } = e.detail, [n, i] = t.split("_"), l = (s = this.host.shadowRoot) == null ? void 0 : s.getElementById(t);
400
- l && this.internals.setValidity({ customError: !0 }, `Invalid ${i} time`, l);
401
- }
402
- openHoursToSchedule(e) {
403
- const t = {
404
- SUN: [],
405
- MON: [],
406
- TUE: [],
407
- WED: [],
408
- THU: [],
409
- FRI: [],
410
- SAT: []
411
- };
412
- e.forEach((n) => {
413
- n.days.forEach((i) => {
414
- const l = this.getDayKey(i), s = x(n.start), o = x(n.end), d = { start: s, end: o };
415
- let b = !1;
416
- t[l] && (b = t[l].some((f) => f.start === d.start && f.end === d.end)), b || (t[l] ? t[l].push(d) : t[l] = [d]);
417
- });
418
- }), this.timezone = this.defaultTimezone, this.schedule = t;
419
- }
420
- getDayKey(e) {
421
- return ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"][e];
422
- }
423
- scheduleToOpenHours(e) {
424
- const t = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"];
425
- let n = /* @__PURE__ */ new Map();
426
- t.forEach((l, s) => {
427
- e[l] && e[l].forEach((o) => {
428
- const d = V(o.start), b = V(o.end), f = `${d}-${b}`;
429
- if (!n.has(f))
430
- n.set(f, { days: [s], start: d, end: b });
431
- else {
432
- let c = n.get(f);
433
- c && (c.days.push(s), n.set(f, c));
434
- }
435
- });
436
- });
437
- let i = [];
438
- return n.forEach((l, s) => {
439
- i.push({
440
- days: l.days,
441
- start: l.start,
442
- end: l.end,
443
- timezone: this.timezone
444
- });
445
- }), i;
446
- }
447
- render() {
448
- const e = Object.keys(J).map((t) => ({
449
- label: J[t],
450
- value: t
451
- }));
452
- return a(y, { key: "bb0a4148b2d9728d7a2a9fdab8359382dd1ae5d5" }, a("div", { key: "27c5e85931d318e6ec66a155faa78e021b570f70", class: "nylas-availability-picker", part: "nap" }, !this.hideHeader && a("div", { class: "header", part: "nap__header" }, a("h3", null, "General availability"), a("p", null, "Set your availability for scheduling meetings.")), a("div", { key: "f2b3434dc127fc19fe6fe915cdc5f4a9d12ba6e7", class: "content" }, a("div", { key: "bd75cb0749168b32c6366aea6f4df5920d098ec7", class: "select-timezone", part: "nap__select-timezone" }, a("h4", { key: "0c74924a291afaa07ff5b06781720a8cbadeea4d", class: "sub-header" }, "Select timezone", a("span", { key: "64933b3f6623f2d0b13559406db3d14afa99e0b6", class: "icon" }, a("tooltip-component", { key: "09c42633826e0ad358b4877f7d48bb70ce7ca518" }, a("info-icon", { key: "9ea9340b193710d759e71081e59ad6ccf762e4a8", slot: "tooltip-icon" }), a("span", { key: "83e596171dc8fb74543b21e957855f9cd32423b1", slot: "tooltip-content" }, "Select your timezone for displaying availability.")))), a("select-dropdown", { key: "d65b32234b1669a5e7bef4b88024f50548011b98", name: "timezone", exportparts: "sd_dropdown: nap__timezone-container, sd_dropdown-button: nap__timezone-button, sd_dropdown-content: nap__timezone-dropdown-content", options: e, defaultSelectedOption: e.find((t) => t.value === this.defaultTimezone) }, a("span", { key: "3387e2d39b7a052557d7668d5a7822fda1440da7", slot: "select-icon" }, a("globe-icon", { key: "e92459b2ce063e199d8685f5a422a88e7a50fbd6", width: "20", height: "20" })))), a("div", { key: "d510d9538189898f52e56388d661158e243fc8dd", class: "availability", part: "nap__availability" }, Object.keys(this.schedule).map((t) => {
453
- const n = t, i = this.schedule[t];
454
- return a("div", { class: "availability-day" }, a("div", { class: "day", part: "nap__day" }, a("input", { type: "checkbox", name: n, id: n, checked: i.length > 0, onClick: () => {
455
- i.length > 0 ? this.schedule[n] = [] : this.schedule[n] = [{ start: "09:00am", end: "05:00pm" }], this.schedule = { ...this.schedule };
456
- } }), a("label", { htmlFor: n, "aria-label": "Select day" }, n)), a("div", { class: "time-ranges", part: "nap__time-ranges" }, i.length ? null : a("span", { class: "unavailable" }, "Unavailable"), i.length > 0 && i.map((l, s) => {
457
- var b, f;
458
- const o = `${t}:${s}_start`, d = `${t}:${s}_end`;
459
- return a("div", { class: "time-range", part: "nap__time-range" }, a("div", { class: "pickers" }, a("nylas-time-window-picker", { id: o, hasError: (b = this.overlapDays[n]) == null ? void 0 : b.includes(s), time: l.start, name: o, key: o, exportparts: "time-picker: nap__time-picker-container, time-input: nap__time-picker-input, times: nap__time-picker-times" }), a("span", null, " - "), a("nylas-time-window-picker", { id: d, hasError: (f = this.overlapDays[n]) == null ? void 0 : f.includes(s), time: l.end, name: d, key: d, minimumStartTime: l.start, exportparts: "time-picker: nap__time-picker-container, time-input: nap__time-picker-input, times: nap__time-picker-times" })), a("button", { onClick: () => this.removeTimeRange(n, s) }, a("close-icon", null)));
460
- }), a("p", { class: "error" }, this.overlapDays[n] ? "Overlapping time ranges" : "")), a("div", null, i.length > 0 ? a("button", { onClick: () => this.addTimeRange(n), part: "nap__add-time-range" }, a("add-circle-icon", null)) : null));
461
- })))));
462
- }
463
- static get formAssociated() {
464
- return !0;
465
- }
466
- get host() {
467
- return h(this);
468
- }
469
- static get watchers() {
470
- return {
471
- name: ["elementNameChangedHandler"],
472
- selectedConfiguration: ["configChangedHandler"],
473
- schedule: ["scheduleChanged"]
474
- };
475
- }
476
- };
477
- Ze([
478
- m({
479
- name: "nylas-availability-picker",
480
- stateToProps: /* @__PURE__ */ new Map([["schedulerConfig.selectedConfiguration", "selectedConfiguration"]]),
481
- fireRegisterEvent: !0
482
- }),
483
- D("design:type", Function),
484
- D("design:paramtypes", []),
485
- D("design:returntype", void 0)
486
- ], Q.prototype, "render", null);
487
- Q.style = Be;
488
- const Ue = ':host{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;width:inherit}.nylas-booking-calendar-picker{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200)}.nylas-booking-calendar-picker .header{padding:1rem;border-bottom:1px solid var(--nylas-base-200)}.nylas-booking-calendar-picker .header h3{margin:0;font-size:1rem;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-booking-calendar-picker .header p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__loading{padding-bottom:1rem;display:flex;flex-direction:column;gap:4px}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__loading .label{display:flex;align-items:center;gap:0.5rem;margin:1rem 1rem 0;color:var(--nylas-base-800)}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__loading .loading-button{margin:0 1rem;padding:0;width:inherit;height:48px;color:black;font-size:1rem;cursor:not-allowed;display:flex;gap:0.5rem;justify-content:space-between;align-items:center;background:transparent;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__loading .loading-button span{padding:0 1rem}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__dropdown{padding:1rem;display:flex;flex-direction:column;gap:4px}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__dropdown span.label{display:flex;align-items:center;gap:4px;color:var(--nylas-base-800)}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__dropdown span.label tooltip-component{display:flex}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__dropdown select-dropdown::part(sd_dropdown){width:100%}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__dropdown select-dropdown::part(sd_dropdown-content){width:100%;max-width:unset}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__dropdown select-dropdown::part(sd_dropdown-button){width:100%;display:flex;justify-content:space-between;align-items:center;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__dropdown select-dropdown::part(sd_dropdown-button-selected-label){max-width:calc(100% - 2rem);font-family:var(--nylas-font-family);font-size:16px;line-height:24px}', Ge = Ue;
489
- var Ve = function(e, t, n, i) {
490
- var l = arguments.length, s = l < 3 ? t : i === null ? i = Object.getOwnPropertyDescriptor(t, n) : i, o;
491
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
492
- s = Reflect.decorate(e, t, n, i);
493
- else
494
- for (var d = e.length - 1; d >= 0; d--)
495
- (o = e[d]) && (s = (l < 3 ? o(s) : l > 3 ? o(t, n, s) : o(t, n)) || s);
496
- return l > 3 && s && Object.defineProperty(t, n, s), s;
497
- }, S = function(e, t) {
498
- if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
499
- return Reflect.metadata(e, t);
500
- };
501
- const X = class {
502
- constructor(e) {
503
- p(this, e), this.valueChanged = u(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.calendars = void 0, this.currentUser = void 0, this.name = "booking-calendar", this.defaultBookingCalendar = "", this.selectedCalendar = "";
504
- }
505
- connectedCallback() {
506
- r("nylas-booking-calendar-picker", "connectedCallback");
507
- }
508
- disconnectedCallback() {
509
- r("nylas-booking-calendar-picker", "disconnectedCallback");
510
- }
511
- componentWillLoad() {
512
- r("nylas-booking-calendar-picker", "componentWillLoad"), this.host.setAttribute("name", this.name);
513
- }
514
- componentDidLoad() {
515
- var e, t;
516
- r("nylas-booking-calendar-picker", "componentDidLoad"), this.defaultBookingCalendar = this.defaultBookingCalendar || ((e = this.currentUser) == null ? void 0 : e.email) || "", typeof this.internals.setFormValue == "function" && this.internals.setFormValue(this.defaultBookingCalendar.toString(), "booking-calendar"), this.selectedCalendar = this.defaultBookingCalendar || ((t = this.currentUser) == null ? void 0 : t.email) || "";
517
- }
518
- componentWillUpdate() {
519
- r("nylas-booking-calendar-picker", "componentWillUpdate");
520
- }
521
- componentDidUpdate() {
522
- r("nylas-booking-calendar-picker", "componentDidUpdate");
523
- }
524
- componentWillRender() {
525
- r("nylas-booking-calendar-picker", "componentWillRender");
526
- }
527
- componentDidRender() {
528
- r("nylas-booking-calendar-picker", "componentDidRender");
529
- }
530
- elementNameChangedHandler(e) {
531
- r("nylas-booking-calendar-picker", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
532
- }
533
- nylasFormDropdownChangedHandler(e) {
534
- r("nylas-booking-calendar-picker", "nylasFormDropdownChangedHandler", e.detail);
535
- const t = (n) => {
536
- const { value: i } = n.detail;
537
- this.selectedCalendar = i, this.internals.setFormValue(i.toString(), this.name);
538
- };
539
- this.valueChanged.emit({ value: e.detail.value, name: this.name, valueChanged: t });
540
- }
541
- render() {
542
- var t;
543
- const e = ((t = this.calendars) == null ? void 0 : t.map((n) => ({
544
- value: n.id,
545
- label: n.name
546
- }))) ?? [];
547
- return a(y, null, a("div", { class: "nylas-booking-calendar-picker", part: "nbcp" }, a("div", { class: "header", part: "nbcp__header" }, a("h3", null, "Calendar booking"), a("p", null, "Choose calendar where you’d like the event bookings to show up.")), e.length > 0 ? a("div", { class: "nylas-booking-calendar-picker__dropdown" }, a("span", { class: "label", part: "nbcp__input-label" }, "Select a calendar to book meetings on", a("tooltip-component", null, a("info-icon", { slot: "tooltip-icon" }), a("span", { slot: "tooltip-content" }, "Check availability across one or multiple calendars. If multiple calendars are selected, you must be available across all of them to be considered available."))), a("select-dropdown", { name: "booking-calendar", options: e, withSearch: !1, exportparts: "sd_dropdown: nbcp__dropdown, sd_dropdown-button: nbcp__dropdown-button, sd_dropdown-content: nbcp__dropdown-content", defaultSelectedOption: e.find((n) => n.value == this.defaultBookingCalendar) ?? e[0] })) : a("div", { class: "nylas-booking-calendar-picker__loading" }, a("span", { class: "label" }, "Select a calendar to book meetings on ", a("info-icon", null)), a("div", { class: "loading-button" }, a("span", null, "Loading...")))));
548
- }
549
- static get formAssociated() {
550
- return !0;
551
- }
552
- get host() {
553
- return h(this);
554
- }
555
- static get watchers() {
556
- return {
557
- name: ["elementNameChangedHandler"]
558
- };
559
- }
560
- };
561
- Ve([
562
- m({
563
- name: "nylas-booking-calendar-picker",
564
- stateToProps: /* @__PURE__ */ new Map([
565
- ["schedulerConfig.calendars", "calendars"],
566
- ["schedulerConfig.currentUser", "currentUser"]
567
- ]),
568
- eventToProps: {
569
- valueChanged: async (e, t) => {
570
- const { valueChanged: n } = e.detail;
571
- n && n(e);
572
- }
573
- },
574
- fireRegisterEvent: !0
575
- }),
576
- S("design:type", Function),
577
- S("design:paramtypes", []),
578
- S("design:returntype", void 0)
579
- ], X.prototype, "render", null);
580
- X.style = Ge;
581
- const Je = ':host{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;width:inherit}.nylas-buffer-time{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200);text-align:left}.nylas-buffer-time .header{padding:1rem;border-bottom:1px solid var(--nylas-base-200)}.nylas-buffer-time .header h3{margin:0;font-size:1rem;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-buffer-time .header p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.nylas-buffer-time .nylas-buffer-time__body{display:grid;grid-template-columns:1fr auto}@media screen and (max-width: 768px){.nylas-buffer-time .nylas-buffer-time__body{grid-template-columns:1fr}}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__dropdown{padding:1rem;display:flex;flex-direction:column;gap:1rem;border-right:1px solid var(--nylas-base-200);color:var(--nylas-base-800)}@media screen and (max-width: 768px){.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__dropdown{border:none}}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__dropdown .nylas-buffer-time__row{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:1rem}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__dropdown .nylas-buffer-time__row label{width:200px}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__dropdown .nylas-buffer-time__row .dropdown-container{display:flex;gap:1rem;align-items:center;justify-content:flex-end}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview{width:208px;background:var(--nylas-base-25);border-bottom-right-radius:var(--nylas-border-radius-2x)}@media screen and (max-width: 768px){.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview{width:inherit;border-bottom-left-radius:var(--nylas-border-radius-2x)}}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview h4{font-size:14px;line-height:24px;color:var(--nylas-base-600);font-family:var(--nylas-font-family);font-weight:500;text-align:center;margin:0.75rem 0}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview .preview-container{padding:0 2rem 1rem}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview .preview-container .slot{background-color:transparent;border-top:1px solid var(--nylas-base-300)}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview .preview-container .slot.active{background-color:var(--nylas-base-100)}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview .preview-container .slot:last-of-type{border-bottom:1px solid var(--nylas-base-300)}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview .preview-container .event-slot{background-color:var(--nylas-base-600);border-top:1px solid var(--nylas-base-300)}.nylas-buffer-time .nylas-buffer-time__dropdown select-dropdown::part(sd_dropdown-button){width:104px;display:flex;justify-content:space-between;align-items:center;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);padding:1rem}.nylas-buffer-time .nylas-buffer-time__dropdown select-dropdown::part(sd_dropdown-content){width:100%}.nylas-buffer-time .nylas-buffer-time__dropdown select-dropdown::part(sd_dropdown-button-selected-label){max-width:calc(100% - 2rem);font-family:var(--nylas-font-family);font-size:16px;line-height:24px}', Ke = Je;
582
- var qe = function(e, t, n, i) {
583
- var l = arguments.length, s = l < 3 ? t : i === null ? i = Object.getOwnPropertyDescriptor(t, n) : i, o;
584
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
585
- s = Reflect.decorate(e, t, n, i);
586
- else
587
- for (var d = e.length - 1; d >= 0; d--)
588
- (o = e[d]) && (s = (l < 3 ? o(s) : l > 3 ? o(t, n, s) : o(t, n)) || s);
589
- return l > 3 && s && Object.defineProperty(t, n, s), s;
590
- }, E = function(e, t) {
591
- if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
592
- return Reflect.metadata(e, t);
593
- };
594
- const ee = class {
595
- constructor(e) {
596
- p(this, e), this.valueChanged = u(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.name = "buffer-time", this.buffer = { before: 0, after: 0 }, this.selectedBeforeBufferTime = this.buffer.before, this.selectedAfterBufferTime = this.buffer.after;
597
- }
598
- connectedCallback() {
599
- r("nylas-buffer-time", "connectedCallback");
600
- }
601
- disconnectedCallback() {
602
- r("nylas-buffer-time", "disconnectedCallback");
603
- }
604
- componentWillLoad() {
605
- r("nylas-buffer-time", "componentWillLoad"), this.host.setAttribute("name", this.name);
606
- }
607
- componentDidLoad() {
608
- if (r("nylas-buffer-time", "componentDidLoad"), typeof this.internals.setFormValue == "function") {
609
- const e = {
610
- before: this.selectedBeforeBufferTime,
611
- after: this.selectedAfterBufferTime
612
- };
613
- this.internals.setFormValue(JSON.stringify(e), this.name);
614
- }
615
- this.selectedAfterBufferTime = this.buffer.after, this.selectedBeforeBufferTime = this.buffer.before;
616
- }
617
- componentWillUpdate() {
618
- r("nylas-buffer-time", "componentWillUpdate");
619
- }
620
- componentDidUpdate() {
621
- r("nylas-buffer-time", "componentDidUpdate");
622
- }
623
- componentWillRender() {
624
- r("nylas-buffer-time", "componentWillRender");
625
- }
626
- componentDidRender() {
627
- r("nylas-buffer-time", "componentDidRender");
628
- }
629
- elementNameChangedHandler(e) {
630
- r("nylas-buffer-time", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
631
- }
632
- nylasFormDropdownChangedHandler(e) {
633
- r("nylas-buffer-time", "nylasFormDropdownChangedHandler", e.detail);
634
- const t = (n) => {
635
- const { value: i, name: l } = n.detail;
636
- l === "before-buffer-time" ? this.selectedBeforeBufferTime = parseInt(i) : l === "after-buffer-time" && (this.selectedAfterBufferTime = parseInt(i));
637
- const s = {
638
- before: this.selectedBeforeBufferTime,
639
- after: this.selectedAfterBufferTime
640
- };
641
- this.internals.setFormValue(JSON.stringify(s), "booking-calendar");
642
- };
643
- this.valueChanged.emit({ ...e.detail, valueChanged: t });
644
- }
645
- renderPreview() {
646
- const i = (o) => {
647
- const d = Math.floor(o / 30), b = o % 30 / 30 * 10;
648
- return {
649
- fullSlots: d,
650
- partialFillHeight: b
651
- };
652
- }, l = () => {
653
- const { fullSlots: o, partialFillHeight: d } = i(this.selectedBeforeBufferTime);
654
- return Array.from({ length: 4 }, (b, f) => {
655
- const c = this.selectedBeforeBufferTime > 0 && f > 4 - o - 1, _ = this.selectedBeforeBufferTime > 0 && f === 4 - o - 1 && d > 0;
656
- let g = {};
657
- return c && !_ ? g.backgroundColor = "var(--nylas-base-100)" : _ && (g.background = `linear-gradient(to top, var(--nylas-base-100) ${d}px, transparent 0)`), a("div", { key: f, class: `slot ${c ? "active" : ""}`, style: {
658
- height: "10px",
659
- ...g
660
- } });
661
- });
662
- }, s = () => {
663
- const { fullSlots: o, partialFillHeight: d } = i(this.selectedAfterBufferTime);
664
- return Array.from({ length: 4 }, (b, f) => {
665
- const c = this.selectedAfterBufferTime > 0 && f < o, _ = f === o && d > 0;
666
- let g = {};
667
- return c && !_ ? g.backgroundColor = "var(--nylas-base-100)" : _ && (g.background = `linear-gradient(to bottom, var(--nylas-base-100) ${d}px, transparent 0)`), a("div", { key: f, class: `slot ${c ? "active" : ""}`, style: {
668
- height: "10px",
669
- ...g
670
- } });
671
- });
672
- };
673
- return a("div", { class: "preview-container" }, l(), a("div", { class: "event-slot", style: { height: "20px" } }), s());
674
- }
675
- render() {
676
- const e = Array.from({ length: 25 }, (t, n) => {
677
- const i = n * 5;
678
- return {
679
- label: i.toString(),
680
- value: i
681
- };
682
- });
683
- return a(y, null, a("div", { class: "nylas-buffer-time", part: "nbt" }, a("div", { class: "header", part: "nbt__header" }, a("h3", null, "Buffer time"), a("p", null, "Add buffer time before and after the event.")), a("div", { class: "nylas-buffer-time__body", part: "nbt__body" }, a("div", { class: "nylas-buffer-time__dropdown" }, a("div", { class: "nylas-buffer-time__row" }, a("label", null, "Before the event"), a("div", { class: "dropdown-container" }, a("select-dropdown", { id: "before-buffer-time", withSearch: !1, name: "before-buffer-time", exportparts: "sd_dropdown: nbt__dropdown-before, sd_dropdown-button: nbt__dropdown-button-before, sd_dropdown-content: nbt__dropdown-content-before", options: e, defaultSelectedOption: e.find((t) => t.value == this.selectedBeforeBufferTime) ?? e[0] }), a("span", null, "mins"))), a("div", { class: "nylas-buffer-time__row" }, a("label", null, "After the event"), a("div", { class: "dropdown-container" }, a("select-dropdown", { id: "after-buffer-time", withSearch: !1, name: "after-buffer-time", exportparts: "sd_dropdown: nbt__dropdown-after, sd_dropdown-button: nbt__dropdown-button-after, sd_dropdown-content: nbt__dropdown-content-after", options: e, defaultSelectedOption: e.find((t) => t.value == this.selectedAfterBufferTime) ?? e[0] }), a("span", null, "mins")))), a("div", { class: "nylas-buffer-time__preview", part: "nbt__preview" }, a("h4", null, "PREVIEW"), this.renderPreview()))));
684
- }
685
- static get formAssociated() {
686
- return !0;
687
- }
688
- get host() {
689
- return h(this);
690
- }
691
- static get watchers() {
692
- return {
693
- name: ["elementNameChangedHandler"]
694
- };
695
- }
696
- };
697
- qe([
698
- m({
699
- name: "nylas-buffer-time",
700
- eventToProps: {
701
- valueChanged: async (e, t) => {
702
- const { valueChanged: n } = e.detail;
703
- n && n(e);
704
- }
705
- },
706
- fireRegisterEvent: !0
707
- }),
708
- E("design:type", Function),
709
- E("design:paramtypes", []),
710
- E("design:returntype", void 0)
711
- ], ee.prototype, "render", null);
712
- ee.style = Ke;
713
- const Ye = ':host{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;width:inherit}.nylas-calendar-picker{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200)}.nylas-calendar-picker .header{padding:1rem;border-bottom:1px solid var(--nylas-base-200)}.nylas-calendar-picker .header h3{margin:0;font-size:1rem;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-calendar-picker .header p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.nylas-calendar-picker .nylas-calendar-picker__loading{padding-bottom:1rem;display:flex;flex-direction:column;gap:4px}.nylas-calendar-picker .nylas-calendar-picker__loading .label{display:flex;align-items:center;gap:0.5rem;margin:1rem 1rem 0;color:var(--nylas-base-800)}.nylas-calendar-picker .nylas-calendar-picker__loading .label tooltip-component{display:flex}.nylas-calendar-picker .nylas-calendar-picker__loading .loading-button{margin:0 1rem;padding:0;width:inherit;height:48px;color:black;font-size:1rem;cursor:not-allowed;display:flex;gap:0.5rem;justify-content:space-between;align-items:center;background:transparent;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}.nylas-calendar-picker .nylas-calendar-picker__loading .loading-button span{padding:0 1rem}.nylas-calendar-picker .nylas-calendar-picker__dropdown{padding:1rem}.nylas-calendar-picker .nylas-calendar-picker__dropdown multi-select-dropdown::part(msd_dropdown){width:100%;display:flex;flex-direction:column;gap:4px}.nylas-calendar-picker .nylas-calendar-picker__dropdown multi-select-dropdown::part(msd_dropdown-button){width:100%;display:flex;justify-content:space-between;align-items:center;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);padding:1rem}.nylas-calendar-picker .nylas-calendar-picker__dropdown multi-select-dropdown::part(msd_dropdown-content){width:100%;max-width:unset}.nylas-calendar-picker .nylas-calendar-picker__dropdown multi-select-dropdown::part(msd_dropdown-button-selected-label){max-width:calc(100% - 2rem);font-family:var(--nylas-font-family);font-size:16px;line-height:24px}', Qe = Ye;
714
- var Xe = function(e, t, n, i) {
715
- var l = arguments.length, s = l < 3 ? t : i === null ? i = Object.getOwnPropertyDescriptor(t, n) : i, o;
716
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
717
- s = Reflect.decorate(e, t, n, i);
718
- else
719
- for (var d = e.length - 1; d >= 0; d--)
720
- (o = e[d]) && (s = (l < 3 ? o(s) : l > 3 ? o(t, n, s) : o(t, n)) || s);
721
- return l > 3 && s && Object.defineProperty(t, n, s), s;
722
- }, L = function(e, t) {
723
- if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
724
- return Reflect.metadata(e, t);
725
- };
726
- const te = class {
727
- constructor(e) {
728
- p(this, e), this.valueChanged = u(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.calendars = void 0, this.currentUser = void 0, this.name = "calendar", this.defaultSelectedCalendars = [], this.selectedCalendars = [];
729
- }
730
- elementNameChangedHandler(e) {
731
- r("nylas-calendar-picker", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
732
- }
733
- connectedCallback() {
734
- r("nylas-calendar-picker", "connectedCallback");
735
- }
736
- disconnectedCallback() {
737
- r("nylas-calendar-picker", "disconnectedCallback");
738
- }
739
- componentWillLoad() {
740
- r("nylas-calendar-picker", "componentWillLoad"), this.host.setAttribute("name", this.name);
741
- }
742
- componentDidLoad() {
743
- r("nylas-calendar-picker", "componentDidLoad"), typeof this.internals.setFormValue == "function" && this.internals.setFormValue(this.defaultSelectedCalendars.toString(), "calendar");
744
- }
745
- componentWillUpdate() {
746
- r("nylas-calendar-picker", "componentWillUpdate");
747
- }
748
- componentDidUpdate() {
749
- r("nylas-calendar-picker", "componentDidUpdate");
750
- }
751
- componentWillRender() {
752
- r("nylas-calendar-picker", "componentWillRender");
753
- }
754
- componentDidRender() {
755
- r("nylas-calendar-picker", "componentDidRender");
756
- }
757
- selectedOptionsChangedHandler(e) {
758
- r("nylas-calendar-picker", "nylasFormDropdownChangedHandler", e.detail);
759
- const t = (n) => {
760
- const { value: i } = n.detail;
761
- this.selectedCalendars = [...i], this.internals.setFormValue(i.toString(), "calendar");
762
- };
763
- this.valueChanged.emit({ ...e.detail, name: this.name, valueChangedHandler: t });
764
- }
765
- render() {
766
- var t;
767
- const e = ((t = this.calendars) == null ? void 0 : t.map((n) => {
768
- var i, l, s, o;
769
- return {
770
- value: n.id,
771
- label: n.name,
772
- selected: ((i = this.defaultSelectedCalendars) == null ? void 0 : i.includes(n.id)) || ((l = this.defaultSelectedCalendars) != null && l.includes("primary") || ((s = this.defaultSelectedCalendars) == null ? void 0 : s.length) === 0 ? n.id === ((o = this.currentUser) == null ? void 0 : o.email) : !1)
773
- };
774
- })) ?? [];
775
- return a(y, null, a("div", { class: "nylas-calendar-picker", part: "ncp" }, a("div", { class: "header", part: "ncp__header" }, a("h3", null, "Calendar availability"), a("p", null, "Select calendars that you’d like to use for checking your availability.")), e.length > 0 ? a("div", { class: "nylas-calendar-picker__dropdown" }, a("multi-select-dropdown", { name: "calendar", label: "Select calendars that will be checked for availability", options: e, exportparts: "msd_dropdown: ncp__dropdown, msd_dropdown-button: ncp__dropdown-button, msd_dropdown-content: ncp__dropdown-content" }, a("span", { slot: "label-icon" }, a("tooltip-component", null, a("info-icon", { slot: "tooltip-icon" }), a("span", { slot: "tooltip-content" }, "Check availability across one or multiple calendars. If multiple calendars are selected, you must be available across all of them to be considered available. The default is your primary calendar if none are selected."))))) : a("div", { class: "nylas-calendar-picker__loading" }, a("span", { class: "label" }, "Select calendars that will be checked for availability ", a("info-icon", null)), a("div", { class: "loading-button" }, a("span", null, "Loading...")))));
776
- }
777
- static get formAssociated() {
778
- return !0;
779
- }
780
- get host() {
781
- return h(this);
782
- }
783
- static get watchers() {
784
- return {
785
- name: ["elementNameChangedHandler"]
786
- };
787
- }
788
- };
789
- Xe([
790
- m({
791
- name: "nylas-calendar-picker",
792
- stateToProps: /* @__PURE__ */ new Map([
793
- ["schedulerConfig.calendars", "calendars"],
794
- ["schedulerConfig.currentUser", "currentUser"]
795
- ]),
796
- eventToProps: {
797
- valueChanged: async (e, t) => {
798
- const { valueChangedHandler: n } = e.detail;
799
- n && n(e);
800
- }
801
- },
802
- fireRegisterEvent: !0
803
- }),
804
- L("design:type", Function),
805
- L("design:paramtypes", []),
806
- L("design:returntype", void 0)
807
- ], te.prototype, "render", null);
808
- te.style = Qe;
809
- const et = ':host{--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}.nylas-cancellation-policy{display:flex;flex-direction:column;gap:4px}.nylas-cancellation-policy label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:16px;font-style:normal;font-weight:400;line-height:150%;}.nylas-cancellation-policy label span.label-icon{margin-left:4px}.nylas-cancellation-policy label span.label-icon tooltip-component{display:flex}.nylas-cancellation-policy textarea{padding:12px 16px;border-width:1;resize:vertical;border-radius:8px;font-family:var(--nylas-font-family);font-size:16px;line-height:24px;border:1px solid var(--nylas-base-200)}.nylas-cancellation-policy textarea::-webkit-resizer{display:none}', tt = et;
810
- var nt = function(e, t, n, i) {
811
- var l = arguments.length, s = l < 3 ? t : i === null ? i = Object.getOwnPropertyDescriptor(t, n) : i, o;
812
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
813
- s = Reflect.decorate(e, t, n, i);
814
- else
815
- for (var d = e.length - 1; d >= 0; d--)
816
- (o = e[d]) && (s = (l < 3 ? o(s) : l > 3 ? o(t, n, s) : o(t, n)) || s);
817
- return l > 3 && s && Object.defineProperty(t, n, s), s;
818
- }, N = function(e, t) {
819
- if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
820
- return Reflect.metadata(e, t);
821
- };
822
- const ne = class {
823
- constructor(e) {
824
- var t, n;
825
- p(this, e), this.valueChanged = u(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.selectedConfiguration = void 0, this.cancellationPolicy = void 0, this.name = "cancelation-policy", this.message = this.cancellationPolicy || ((n = (t = this.selectedConfiguration) == null ? void 0 : t.scheduler) == null ? void 0 : n.cancellation_policy) || "";
826
- }
827
- elementNameChangedHandler(e) {
828
- r("nylas-cancellation-policy", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
829
- }
830
- selectedConfigurationChangedHandler(e, t) {
831
- var n, i;
832
- r("nylas-custom-booking-flow", "selectedConfigurationChangedHandler", e, t), (n = e == null ? void 0 : e.scheduler) != null && n.cancellation_policy && (this.message = (i = e == null ? void 0 : e.scheduler) == null ? void 0 : i.cancellation_policy);
833
- }
834
- connectedCallback() {
835
- r("nylas-cancellation-policy", "connectedCallback");
836
- }
837
- componentWillLoad() {
838
- r("nylas-cancellation-policy", "componentWillLoad"), this.host.setAttribute("name", this.name);
839
- }
840
- componentDidLoad() {
841
- r("nylas-cancellation-policy", "componentDidLoad");
842
- }
843
- disconnectedCallback() {
844
- r("nylas-cancellation-policy", "disconnectedCallback");
845
- }
846
- handleChange(e) {
847
- const t = H(e.target.value);
848
- this.message = t, this.internals.setFormValue(t, this.name), this.valueChanged.emit({ value: t, name: this.name });
849
- }
850
- render() {
851
- return a(y, { key: "7a57476ea21860b39103ab43f8b86a5804ddc055" }, a("div", { key: "67d7d2c00b2b658778dabe316a4512472bddf435", class: "nylas-cancellation-policy", part: "ncpolicy" }, a("label", { key: "2f0abff08c2485c93efaf6202a5c9720107f11d1", htmlFor: this.name }, "Cancellation policy message", a("span", { key: "2c16d52ce3b6fea15f23e57d50afe55872f920d6", class: "label-icon" }, a("tooltip-component", { key: "8bde2b6a884e8d180ef7296bbf29322df14128ef" }, a("info-icon", { key: "cffadcf00bc6c3b07dffeb633bf87b423d6f4c59", slot: "tooltip-icon" }), a("span", { key: "5c37fbce026bb6f5a37f7867236fc27284323c42", slot: "tooltip-content" }, "Attendees receive this message if trying to cancel the event. Attendees are asked to provide a reason for cancellation.")))), a("textarea", { key: "0f492885372a90650104bbb4679cde1374296504", id: this.name, part: "ncpolicy__textarea", name: this.name, value: this.message, maxlength: "250", onInput: (e) => this.handleChange(e) })));
852
- }
853
- static get formAssociated() {
854
- return !0;
855
- }
856
- get host() {
857
- return h(this);
858
- }
859
- static get watchers() {
860
- return {
861
- name: ["elementNameChangedHandler"],
862
- selectedConfiguration: ["selectedConfigurationChangedHandler"]
863
- };
864
- }
865
- };
866
- nt([
867
- m({
868
- name: "nylas-cancellation-policy",
869
- stateToProps: /* @__PURE__ */ new Map([["schedulerConfig.selectedConfiguration", "selectedConfiguration"]]),
870
- eventToProps: {},
871
- fireRegisterEvent: !0
872
- }),
873
- N("design:type", Function),
874
- N("design:paramtypes", []),
875
- N("design:returntype", void 0)
876
- ], ne.prototype, "render", null);
877
- ne.style = tt;
878
- const at = ':host{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;width:inherit}.nylas-customize-booking-settings{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200)}.nylas-customize-booking-settings .header{padding:1rem;border-bottom:1px solid var(--nylas-base-200)}.nylas-customize-booking-settings .header h3{margin:0;font-size:1rem;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-customize-booking-settings .header p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.nylas-customize-booking-settings .nylas-customize-booking-settings__settings{display:flex;flex-direction:column;gap:1.5rem;padding:1rem;margin:1rem 0}.nylas-customize-booking-settings .nylas-customize-booking-settings__settings .nylas-customize-booking-settings__settings-div{display:flex;align-items:center;gap:4px}.label{margin-left:32px;font-size:16px;font-weight:400;color:var(--nylas-base-800);line-height:24px}.label .label-contents{margin:0;display:inline-block}@media screen and (max-width: 768px){.label .label-contents{display:block}}.label tooltip-component{display:inline-block}@media screen and (max-width: 768px){tooltip-component#guests::part(tc__content){left:58px}}tooltip-component#reschedule::part(tc__content){left:58px}@media screen and (max-width: 768px){tooltip-component#reschedule::part(tc__content){left:58px}}tooltip-component#cancel::part(tc__content){left:-58px}@media screen and (max-width: 768px){tooltip-component#cancel::part(tc__content){left:58px}}', it = at;
879
- var st = function(e, t, n, i) {
880
- var l = arguments.length, s = l < 3 ? t : i === null ? i = Object.getOwnPropertyDescriptor(t, n) : i, o;
881
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
882
- s = Reflect.decorate(e, t, n, i);
883
- else
884
- for (var d = e.length - 1; d >= 0; d--)
885
- (o = e[d]) && (s = (l < 3 ? o(s) : l > 3 ? o(t, n, s) : o(t, n)) || s);
886
- return l > 3 && s && Object.defineProperty(t, n, s), s;
887
- }, P = function(e, t) {
888
- if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
889
- return Reflect.metadata(e, t);
890
- };
891
- const ae = class {
892
- constructor(e) {
893
- var t, n, i, l, s, o;
894
- p(this, e), this.valueChanged = u(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.selectedConfiguration = void 0, this.defaultAdditionalGuestsHidden = ((n = (t = this.selectedConfiguration) == null ? void 0 : t.scheduler) == null ? void 0 : n.hide_additional_guests) ?? !1, this.defaultHideCancellationOptions = ((l = (i = this.selectedConfiguration) == null ? void 0 : i.scheduler) == null ? void 0 : l.hide_cancellation_options) ?? !1, this.defaultHideReschedulingOptions = ((o = (s = this.selectedConfiguration) == null ? void 0 : s.scheduler) == null ? void 0 : o.hide_rescheduling_options) ?? !1, this.name = "customize-booking-settings", this.allowGuestsToInvite = this.defaultAdditionalGuestsHidden, this.hideCancellationOptions = this.defaultHideCancellationOptions, this.hideReschedulingOptions = this.defaultHideReschedulingOptions;
895
- }
896
- elementNameChangedHandler(e) {
897
- r("nylas-customize-booking-settings", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
898
- }
899
- selectedConfigurationChangedHandler(e) {
900
- var t, n, i;
901
- r("nylas-customize-booking-settings", "selectedConfigurationChangedHandler", e), this.allowGuestsToInvite = !((t = e == null ? void 0 : e.scheduler) != null && t.hide_additional_guests), this.hideCancellationOptions = ((n = e == null ? void 0 : e.scheduler) == null ? void 0 : n.hide_cancellation_options) ?? !1, this.hideReschedulingOptions = ((i = e == null ? void 0 : e.scheduler) == null ? void 0 : i.hide_rescheduling_options) ?? !1;
902
- }
903
- connectedCallback() {
904
- r("nylas-customize-booking-settings", "connectedCallback");
905
- }
906
- disconnectedCallback() {
907
- r("nylas-customize-booking-settings", "disconnectedCallback");
908
- }
909
- componentWillLoad() {
910
- r("nylas-customize-booking-settings", "componentWillLoad"), this.host.setAttribute("name", this.name);
911
- }
912
- componentDidLoad() {
913
- r("nylas-customize-booking-settings", "componentDidLoad");
914
- }
915
- componentWillUpdate() {
916
- r("nylas-customize-booking-settings", "componentWillUpdate");
917
- }
918
- componentDidUpdate() {
919
- r("nylas-customize-booking-settings", "componentDidUpdate");
920
- }
921
- componentWillRender() {
922
- r("nylas-customize-booking-settings", "componentWillRender");
923
- }
924
- componentDidRender() {
925
- r("nylas-customize-booking-settings", "componentDidRender");
926
- }
927
- checkboxToggledHandler(e) {
928
- const { name: t, checked: n } = e.detail;
929
- switch (t) {
930
- case "hide_additional_guests":
931
- this.allowGuestsToInvite = n;
932
- break;
933
- case "hide_cancellation_options":
934
- this.hideCancellationOptions = n;
935
- break;
936
- case "hide_rescheduling_options":
937
- this.hideReschedulingOptions = n;
938
- break;
939
- }
940
- this.valueChanged.emit({
941
- value: JSON.stringify({
942
- additionalGuestsHidden: !this.allowGuestsToInvite,
943
- hideCancellationOptions: this.hideCancellationOptions,
944
- hideReschedulingOptions: this.hideReschedulingOptions
945
- }),
946
- name: this.name
947
- }), this.internals.setFormValue(JSON.stringify({
948
- additionalGuestsHidden: !this.allowGuestsToInvite,
949
- hideCancellationOptions: this.hideCancellationOptions,
950
- hideReschedulingOptions: this.hideReschedulingOptions
951
- }), this.name);
952
- }
953
- render() {
954
- return a(y, { key: "543f4fc64d9dab03c528c5738cd4c1b1bb9cfd2a" }, a("div", { key: "e3f153847ad5256327952d4be0aace03543b1d40", class: "nylas-customize-booking-settings", part: "ncbs" }, a("div", { key: "5b35f27785f6f6bc8e8848d94857869b73108df0", class: "header", part: "ncbs__header" }, a("h3", { key: "d50a9614e3b0b5227a196356a43f12aab4acb158" }, "Additional settings"), a("p", { key: "f29bbb165479e276cf87087582e9c60eb21c37d1" }, "Booking settings for the event.")), a("div", { key: "d091485f983d0cc3ff86e7ca89df8d75526d3cef", class: "nylas-customize-booking-settings__settings", part: "ncbs__settings" }, a("div", { key: "7f7888a718a70a681795e599075c92cfbc16853a", class: "nylas-customize-booking-settings__settings-div", part: "ncbs__settings-div , ncbs__additional_guests" }, a("checkbox-component", { key: "e37474d77812d96fe264d26c329078502c074dbe", name: "hide_additional_guests", label: "Allow guests to invite additional guests.", checked: this.allowGuestsToInvite }, a("span", { key: "00b45833c0223e373edf0b42669e4a154938b1eb", slot: "label", class: "label" }, a("p", { key: "e66de8b9f53230347417a8ec0a7ae7a19af9db31", class: "label-contents" }, "Allow guests to invite additional guests to the booking."), a("tooltip-component", { key: "1ba5558e1991235c21f57ca1968220ea7bf43fcb", id: "guests" }, a("info-icon", { key: "3e62cc64cc55eb3dd4d0a73cef80a64c8dc9c38f", slot: "tooltip-icon" }), a("span", { key: "3853d0d575be29420ea012c90b0a2c07913a86a7", slot: "tooltip-content" }, "Allow guests to invite additional guests to the event. If enabled, the guest will be able to add additional guests' email addresses."))))), a("div", { key: "92e209a924673d8b1dee03475ffabfea5d9bf09b", class: "nylas-customize-booking-settings__settings-div", part: "ncbs__settings-div , ncbs__rescheduling_options" }, a("checkbox-component", { key: "f7b522c07700938d25b17e14d236edb2aae12b21", name: "hide_rescheduling_options", label: "Hide 'Reschedule' option on booking page and emails.", checked: this.hideReschedulingOptions }, a("span", { key: "590cb5d983ff6eef95ebb370b845e1cc8e3080e4", slot: "label", class: "label" }, a("p", { key: "8f2d2742976e21a81268c793ae1c6c9dafdcecc3", class: "label-contents" }, "Hide the ", a("strong", { key: "4b01f75e4067d7c8d26ca785d5c6ad841633130c" }, "Reschedule"), " button on the Scheduling Page and in the email notifications."), a("tooltip-component", { key: "8a157115569a4413143779c9e09c8389394973f9", id: "reschedule" }, a("info-icon", { key: "b3a2c734d2d7a303d1d4d2622b51113aa7d3dfaf", slot: "tooltip-icon" }), a("span", { key: "2d08ceb49e744787da6863d72cf2c6df50f1a7cc", slot: "tooltip-content" }, "Hide the 'Reschedule' button on the Scheduling page and in the email notifications. If enabled, the guest will not be able to reschedule the booking."))))), a("div", { key: "6bc7f1a30a750ba85453d852f6f7e05c0513673d", class: "nylas-customize-booking-settings__settings-div", part: "ncbs__settings-div , ncbs__cancellation_options" }, a("checkbox-component", { key: "089ca174d8aabb26d87f5bb8cb871b9e82b7c04f", name: "hide_cancellation_options", label: "Hide 'Cancel' option on booking page and emails.", checked: this.hideCancellationOptions }, a("span", { key: "9ec50185d728baddbe0805eaeff057686b153bea", slot: "label", class: "label" }, a("p", { key: "118c1c3cc06dba90f451711aba0dde3efeeec9f0", class: "label-contents" }, "Hide the ", a("strong", { key: "c1a26aa5c832fba488d60fc3af5a3c000ada144d" }, "Cancel"), " button on the Scheduling Page and in the email notifications."), a("tooltip-component", { key: "b70473d1e93c11d9b05a9dcec67d77795638bbeb", id: "cancel" }, a("info-icon", { key: "2f0d812ac9fb7a52260b601c590b7a629036ea7c", slot: "tooltip-icon" }), a("span", { key: "4c5b3b51b57761a377ccfa7f66d6d69486d8cb11", slot: "tooltip-content" }, "Hide the 'Cancel' button on the Scheduling page and in the email notifications. If enabled, the guest will not be able to cancel the booking."))))))));
955
- }
956
- static get formAssociated() {
957
- return !0;
958
- }
959
- get host() {
960
- return h(this);
961
- }
962
- static get watchers() {
963
- return {
964
- name: ["elementNameChangedHandler"],
965
- selectedConfiguration: ["selectedConfigurationChangedHandler"]
966
- };
967
- }
968
- };
969
- st([
970
- m({
971
- name: "nylas-customize-booking-settings",
972
- stateToProps: /* @__PURE__ */ new Map([["schedulerConfig.selectedConfiguration", "selectedConfiguration"]]),
973
- fireRegisterEvent: !0
974
- }),
975
- P("design:type", Function),
976
- P("design:paramtypes", []),
977
- P("design:returntype", void 0)
978
- ], ae.prototype, "render", null);
979
- ae.style = it;
980
- const lt = ':host{--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}.nylas-event-description{display:flex;flex-direction:column;gap:4px}.nylas-event-description label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:16px;font-style:normal;font-weight:400;line-height:150%;}.nylas-event-description label span.label-icon{margin-left:4px}.nylas-event-description label span.label-icon tooltip-component{display:flex}.nylas-event-description textarea{padding:12px 16px;border-width:1;resize:vertical;border-radius:8px;font-family:var(--nylas-font-family);font-size:16px;line-height:24px;border:1px solid var(--nylas-base-200)}.nylas-event-description textarea::-webkit-resizer{display:none}', ot = lt;
981
- var rt = function(e, t, n, i) {
982
- var l = arguments.length, s = l < 3 ? t : i === null ? i = Object.getOwnPropertyDescriptor(t, n) : i, o;
983
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
984
- s = Reflect.decorate(e, t, n, i);
985
- else
986
- for (var d = e.length - 1; d >= 0; d--)
987
- (o = e[d]) && (s = (l < 3 ? o(s) : l > 3 ? o(t, n, s) : o(t, n)) || s);
988
- return l > 3 && s && Object.defineProperty(t, n, s), s;
989
- }, F = function(e, t) {
990
- if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
991
- return Reflect.metadata(e, t);
992
- };
993
- const ie = class {
994
- constructor(e) {
995
- var t, n;
996
- p(this, e), this.valueChanged = u(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.selectedConfiguration = void 0, this.eventDescription = void 0, this.name = "description", this.description = this.eventDescription || ((n = (t = this.selectedConfiguration) == null ? void 0 : t.event_booking) == null ? void 0 : n.description) || "";
997
- }
998
- elementNameChangedHandler(e) {
999
- r("nylas-event-description", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
1000
- }
1001
- selectedConfigurationChangedHandler(e, t) {
1002
- var n, i;
1003
- r("nylas-custom-booking-flow", "selectedConfigurationChangedHandler", e, t), (n = e == null ? void 0 : e.event_booking) != null && n.description && (this.description = (i = e == null ? void 0 : e.event_booking) == null ? void 0 : i.description);
1004
- }
1005
- connectedCallback() {
1006
- r("nylas-event-description", "connectedCallback");
1007
- }
1008
- componentWillLoad() {
1009
- r("nylas-event-description", "componentWillLoad"), this.host.setAttribute("name", this.name);
1010
- }
1011
- componentDidLoad() {
1012
- r("nylas-event-description", "componentDidLoad");
1013
- }
1014
- disconnectedCallback() {
1015
- r("nylas-event-description", "disconnectedCallback");
1016
- }
1017
- handleChange(e) {
1018
- const t = H(e.target.value);
1019
- this.description = t, this.internals.setFormValue(t, "description"), this.valueChanged.emit({ value: t, name: this.name });
1020
- }
1021
- render() {
1022
- return a(y, { key: "ac483c56982373fb625c6d1af54eed749ce820e2" }, a("div", { key: "3924853ea2c94d72bf2a04a319bee5fc61eb7642", class: "nylas-event-description", part: "nedesc" }, a("label", { key: "e8f9990a4f0766de9691080ef02b823c4cd6beb4", htmlFor: "description" }, "Event description", a("span", { key: "dc7fa731cc60ed6e59032cdb35d0b410de300750", class: "label-icon" }, a("tooltip-component", { key: "1c0b1a5a547227bf7d4f499cc7c319349ec26e2d" }, a("info-icon", { key: "e74034f5a5d8ab86c0d497b15c9cb8016d22f38e", slot: "tooltip-icon" }), a("span", { key: "c5efa1fc3adc9290e39d40f1f7998e0c6bdd3bf4", slot: "tooltip-content" }, "Provide any additional details for your event.")))), a("textarea", { key: "45d8cc241ab90a24ec437499234b02cc401fa720", id: "description", part: "nedesc__textarea", name: "description", value: this.description, maxlength: "8192", onInput: (e) => this.handleChange(e) })));
1023
- }
1024
- static get formAssociated() {
1025
- return !0;
1026
- }
1027
- get host() {
1028
- return h(this);
1029
- }
1030
- static get watchers() {
1031
- return {
1032
- name: ["elementNameChangedHandler"],
1033
- selectedConfiguration: ["selectedConfigurationChangedHandler"]
1034
- };
1035
- }
1036
- };
1037
- rt([
1038
- m({
1039
- name: "nylas-event-description",
1040
- stateToProps: /* @__PURE__ */ new Map([["schedulerConfig.selectedConfiguration", "selectedConfiguration"]]),
1041
- eventToProps: {},
1042
- fireRegisterEvent: !0
1043
- }),
1044
- F("design:type", Function),
1045
- F("design:paramtypes", []),
1046
- F("design:returntype", void 0)
1047
- ], ie.prototype, "render", null);
1048
- ie.style = ot;
1049
- const dt = ':host{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}.nylas-event-duration{display:flex;flex-direction:column;gap:4px}.nylas-event-duration label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:16px;font-style:normal;font-weight:400;line-height:150%;}.nylas-event-duration label span.required{color:var(--nylas-error, #cc4841)}.nylas-event-duration label span.label-icon{margin-left:4px}.nylas-event-duration label span.label-icon tooltip-component{display:flex}.nylas-event-duration__wrapper{display:flex;align-items:center;gap:0.5rem}.nylas-event-duration__wrapper input{padding:12px 16px;border-width:1;border-radius:8px;border:1px solid var(--nylas-base-200);font-family:var(--nylas-font-family);font-size:16px;line-height:24px;width:48px}.nylas-event-duration__wrapper input-dropdown::part(id_dropdown-input){border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);padding:14px 16px;width:50px}.nylas-event-duration__wrapper input-dropdown::part(id_dropdown-content){width:100%;min-width:unset;height:200px}.nylas-event-duration__wrapper select-dropdown{width:120px}@media screen and (max-width: 768px){.nylas-event-duration__wrapper select-dropdown{width:100%}}.nylas-event-duration__wrapper select-dropdown::part(sd_dropdown-button){border:1px solid var(--nylas-base-200)}', ct = dt;
1050
- var pt = function(e, t, n, i) {
1051
- var l = arguments.length, s = l < 3 ? t : i === null ? i = Object.getOwnPropertyDescriptor(t, n) : i, o;
1052
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
1053
- s = Reflect.decorate(e, t, n, i);
1054
- else
1055
- for (var d = e.length - 1; d >= 0; d--)
1056
- (o = e[d]) && (s = (l < 3 ? o(s) : l > 3 ? o(t, n, s) : o(t, n)) || s);
1057
- return l > 3 && s && Object.defineProperty(t, n, s), s;
1058
- }, A = function(e, t) {
1059
- if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
1060
- return Reflect.metadata(e, t);
1061
- };
1062
- const se = class {
1063
- constructor(e) {
1064
- p(this, e), this.valueChanged = u(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.selectedConfiguration = void 0, this.name = "duration", this.eventDurationMinutes = void 0, this.duration = this.eventDurationMinutes ? this.eventDurationMinutes >= 60 ? this.eventDurationMinutes / 60 : this.eventDurationMinutes : 30, this.durationMinutes = this.eventDurationMinutes ?? 30, this.durationIncrement = this.eventDurationMinutes && this.eventDurationMinutes >= 60 ? 60 : 1, this.durationMinutesOptions = [
1065
- { value: 15, label: "15" },
1066
- { value: 30, label: "30" },
1067
- { value: 45, label: "45" },
1068
- { value: 60, label: "60" }
1069
- ];
1070
- }
1071
- elementNameChangedHandler(e) {
1072
- r("nylas-event-duration", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
1073
- }
1074
- selectedConfigurationChangedHandler(e) {
1075
- var n;
1076
- const t = (n = e == null ? void 0 : e.availability) == null ? void 0 : n.duration_minutes;
1077
- t && (this.duration = t >= 60 ? t / 60 : t, this.durationMinutes = t ?? 30, this.durationIncrement = t >= 60 ? 60 : 1);
1078
- }
1079
- durationMinutesChangedHandler(e, t) {
1080
- r("nylas-event-duration", "durationMinutesChangedHandler", e), e !== t && this.valueChanged.emit({ value: e.toString(), name: this.name });
1081
- }
1082
- connectedCallback() {
1083
- r("nylas-event-duration", "connectedCallback");
1084
- }
1085
- componentWillLoad() {
1086
- r("nylas-event-duration", "componentWillLoad"), this.host.setAttribute("name", this.name), this.setDurationMintueOptions();
1087
- }
1088
- componentDidLoad() {
1089
- r("nylas-event-duration", "componentDidLoad"), this.internals.setFormValue(this.durationMinutes.toString(), "duration");
1090
- }
1091
- disconnectedCallback() {
1092
- r("nylas-event-duration", "disconnectedCallback");
1093
- }
1094
- setDurationMintueOptions() {
1095
- return this.durationIncrement === 1 ? this.durationMinutesOptions = [
1096
- { value: 15, label: "15" },
1097
- { value: 30, label: "30" },
1098
- { value: 45, label: "45" },
1099
- { value: 60, label: "60" }
1100
- ] : this.durationMinutesOptions = Array.from({ length: 23 }, (e, t) => ({ value: t + 1, label: (t + 1).toString() })), this.durationMinutesOptions;
1101
- }
1102
- handleChange(e) {
1103
- this.duration = e.target.value, this.durationMinutes = this.duration * this.durationIncrement, this.internals.setFormValue(this.durationMinutes.toString(), this.name);
1104
- }
1105
- nylasFormDropdownChangedHandler(e) {
1106
- r("nylas-calendar-picker", "nylasFormDropdownChangedHandler", e.detail);
1107
- const { value: t } = e.detail;
1108
- this.durationIncrement = parseInt(t), this.durationIncrement === 1 ? this.duration = 60 : this.duration = 1, this.setDurationMintueOptions(), this.durationMinutes = this.duration * this.durationIncrement, this.internals.setFormValue(this.durationMinutes.toString(), "duration");
1109
- }
1110
- inputOptionChangedHandler(e) {
1111
- r("nylas-calendar-picker", "inputOptionChangedHandler", e.detail);
1112
- const { value: t } = e.detail;
1113
- this.duration = t, this.durationMinutes = this.duration * this.durationIncrement, this.internals.setFormValue(this.durationMinutes.toString(), this.name);
1114
- }
1115
- render() {
1116
- const e = [
1117
- { value: 1, label: "minute" },
1118
- { value: 60, label: "hour" }
1119
- ];
1120
- return a(y, { key: "c8ab90c7a45ce6a5379552af0a9059b9d829e82c" }, a("div", { key: "d957e610bd31a55430235b0ca903905c8bf3706b", class: "nylas-event-duration", part: "ned" }, a("label", { key: "39324d77ad9da4bc0c1f36d15c28384f423c1976", htmlFor: "duration" }, "Event duration", a("span", { key: "8f222a8a5d03899ff06790133434028dd1a62cd4", class: "required" }, "*"), a("span", { key: "6b83c675faa33db229ded711eac8c1f565bc9a61", class: "label-icon" }, a("tooltip-component", { key: "01b7ba340e2883e5a22d4559f67feda4bc745109" }, a("info-icon", { key: "acbfa3dcbc994dec0e502ea9ded00612bf24b315", slot: "tooltip-icon" }), a("span", { key: "e691c2a8ce4953e448cb6850ab2648645ae688c0", slot: "tooltip-content" }, "Set the duration of your event.")))), a("div", { key: "294766a022ba73042705050bc2fbc294cd1433b4", class: "nylas-event-duration__wrapper" }, a("input-dropdown", { key: "9a61a9527ae4c9991dc1f1596fbed85a5dd57966", name: "event-duration", options: this.durationMinutesOptions, inputValue: this.duration.toString(), exportparts: "id_dropdown: ned__input_dropdown, id_dropdown-input: ned__input_dropdown-input, id_dropdown-content: ned__input_dropdown-content", defaultInputOption: this.durationMinutesOptions.find((t) => t.value == this.duration) ?? e[0] }), a("select-dropdown", { key: "edcda0700a80961b9a8b9f325288d70a1aa4e6f0", name: "event-duration", options: e, pluralizedLabel: this.duration > 1 ? "s" : "", exportparts: "sd_dropdown: ned__dropdown, sd_dropdown-button: ned__dropdown-button, sd_dropdown-content: ned__dropdown-content", defaultSelectedOption: e.find((t) => t.value == this.durationIncrement) ?? e[0], withSearch: !1 }))));
1121
- }
1122
- static get formAssociated() {
1123
- return !0;
1124
- }
1125
- get host() {
1126
- return h(this);
1127
- }
1128
- static get watchers() {
1129
- return {
1130
- name: ["elementNameChangedHandler"],
1131
- selectedConfiguration: ["selectedConfigurationChangedHandler"],
1132
- durationMinutes: ["durationMinutesChangedHandler"]
1133
- };
1134
- }
1135
- };
1136
- pt([
1137
- m({
1138
- name: "nylas-event-duration",
1139
- stateToProps: /* @__PURE__ */ new Map([["schedulerConfig.selectedConfiguration", "selectedConfiguration"]]),
1140
- eventToProps: {},
1141
- fireRegisterEvent: !0
1142
- }),
1143
- A("design:type", Function),
1144
- A("design:paramtypes", []),
1145
- A("design:returntype", void 0)
1146
- ], se.prototype, "render", null);
1147
- se.style = ct;
1148
- const ft = ':host{display:block;margin:1rem;--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}.nylas-event-info__title{color:var(--nylas-base-900);font-size:16px;font-style:normal;font-weight:600;line-height:20px;margin:0;text-align:left}.nylas-event-info__subtitle{color:var(--nylas-base-600);font-size:14px;font-style:normal;font-weight:400;line-height:20px;margin:0.25rem 0px 0px;text-align:left}.nylas-event-info__content{padding:1rem;display:flex;flex-direction:column;gap:1rem}.nylas-event-info__block{display:flex;justify-content:space-between;gap:0.5rem}', bt = ft;
1149
- var ut = function(e, t, n, i) {
1150
- var l = arguments.length, s = l < 3 ? t : i === null ? i = Object.getOwnPropertyDescriptor(t, n) : i, o;
1151
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
1152
- s = Reflect.decorate(e, t, n, i);
1153
- else
1154
- for (var d = e.length - 1; d >= 0; d--)
1155
- (o = e[d]) && (s = (l < 3 ? o(s) : l > 3 ? o(t, n, s) : o(t, n)) || s);
1156
- return l > 3 && s && Object.defineProperty(t, n, s), s;
1157
- }, R = function(e, t) {
1158
- if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
1159
- return Reflect.metadata(e, t);
1160
- };
1161
- const le = class {
1162
- constructor(e) {
1163
- p(this, e), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals);
1164
- }
1165
- connectedCallback() {
1166
- r("nylas-event-info", "connectedCallback");
1167
- }
1168
- componentWillLoad() {
1169
- r("nylas-event-info", "componentWillLoad");
1170
- }
1171
- componentDidLoad() {
1172
- r("nylas-event-info", "componentDidLoad"), q(["inputs"], this.el);
1173
- }
1174
- disconnectedCallback() {
1175
- r("nylas-event-info", "disconnectedCallback");
1176
- }
1177
- render() {
1178
- return a(y, { key: "adf72357920be8fadb32c683735719e5dbf76883" }, a("nylas-form-card", { key: "33823a1bbd57716f9b056f5addba8a5fb316ac93" }, a("h1", { key: "eb14a7f95322992e24dad4e9ff612ffcb7c7634a", slot: "header-title", class: "nylas-event-info__title" }, "Event information"), a("h3", { key: "366d9ed654b03ea7bfe9d902240fcd4ad3c2b177", slot: "header-subtitle", class: "nylas-event-info__subtitle" }, "Enter all event information."), a("div", { key: "a6abc2c53dbce1d8d0ad444033d1361171bc5720", slot: "content", class: "nylas-event-info__content" }, a("slot", { key: "c814d4c24582dc76ee96f8e87c9b610a06205273", name: "inputs" }))));
1179
- }
1180
- static get formAssociated() {
1181
- return !0;
1182
- }
1183
- get el() {
1184
- return h(this);
1185
- }
1186
- };
1187
- ut([
1188
- m({
1189
- name: "nylas-event-info",
1190
- eventToProps: {},
1191
- fireRegisterEvent: !0
1192
- }),
1193
- R("design:type", Function),
1194
- R("design:paramtypes", []),
1195
- R("design:returntype", void 0)
1196
- ], le.prototype, "render", null);
1197
- le.style = bt;
1198
- const yt = ':host{display:block;margin:1rem;--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}.nylas-event-limits__title{color:var(--nylas-base-900);font-size:16px;font-style:normal;font-weight:600;line-height:20px;margin:0;text-align:left}.nylas-event-limits__subtitle{color:var(--nylas-base-600);font-size:14px;font-style:normal;font-weight:400;line-height:20px;margin:0.25rem 0px 0px;text-align:left}.nylas-event-limits__content{padding:1rem;display:flex;flex-direction:column;gap:1rem}.nylas-event-limits__block{display:flex;justify-content:space-between;gap:0.5rem}', ht = yt;
1199
- var mt = function(e, t, n, i) {
1200
- var l = arguments.length, s = l < 3 ? t : i === null ? i = Object.getOwnPropertyDescriptor(t, n) : i, o;
1201
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
1202
- s = Reflect.decorate(e, t, n, i);
1203
- else
1204
- for (var d = e.length - 1; d >= 0; d--)
1205
- (o = e[d]) && (s = (l < 3 ? o(s) : l > 3 ? o(t, n, s) : o(t, n)) || s);
1206
- return l > 3 && s && Object.defineProperty(t, n, s), s;
1207
- }, M = function(e, t) {
1208
- if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
1209
- return Reflect.metadata(e, t);
1210
- };
1211
- const oe = class {
1212
- constructor(e) {
1213
- p(this, e), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals);
1214
- }
1215
- connectedCallback() {
1216
- r("nylas-event-limits", "connectedCallback");
1217
- }
1218
- componentWillLoad() {
1219
- r("nylas-event-limits", "componentWillLoad");
1220
- }
1221
- componentDidLoad() {
1222
- r("nylas-event-limits", "componentDidLoad"), q(["inputs"], this.el);
1223
- }
1224
- disconnectedCallback() {
1225
- r("nylas-event-limits", "disconnectedCallback");
1226
- }
1227
- render() {
1228
- return a(y, { key: "4afbe82f9887a84579e5a16fa628a8785927e19f" }, a("nylas-form-card", { key: "b092de56ed7f3902ed5de970963697e19f47b5ea" }, a("h1", { key: "c1a940f48d1e8daeaa719cfcefc7b5948960ea5c", slot: "header-title", class: "nylas-event-limits__title" }, "Set event limits"), a("h3", { key: "68c6426b83df6c15a85f6bae5bc0fd47aa17e8b4", slot: "header-subtitle", class: "nylas-event-limits__subtitle" }, "Customize event limits for the event."), a("div", { key: "e70ed6be6d75a69b9405c38c0ab68accbc799670", slot: "content", class: "nylas-event-limits__content" }, a("slot", { key: "7220956029fa2ae7f8ab7f05342ab2ee8d15c15f", name: "inputs" }))));
1229
- }
1230
- static get formAssociated() {
1231
- return !0;
1232
- }
1233
- get el() {
1234
- return h(this);
1235
- }
1236
- };
1237
- mt([
1238
- m({
1239
- name: "nylas-event-limits",
1240
- eventToProps: {},
1241
- fireRegisterEvent: !0
1242
- }),
1243
- M("design:type", Function),
1244
- M("design:paramtypes", []),
1245
- M("design:returntype", void 0)
1246
- ], oe.prototype, "render", null);
1247
- oe.style = ht;
1248
- const gt = ':host{--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}.nylas-event-location{display:flex;flex-direction:column;gap:4px;font-family:var(--nylas-font-family)}.nylas-event-location label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:16px;font-style:normal;font-weight:400;line-height:150%;}.nylas-event-location label span.label-icon{margin-left:4px}.nylas-event-location label span.label-icon tooltip-component{display:flex}.nylas-event-location span[slot=select-icon]{border-right:1px solid var(--nylas-base-200);padding:16px 0.75rem 16px 0.5rem;border-radius:var(--nylas-border-radius-2x);border-bottom-right-radius:0;border-top-right-radius:0;height:20px}.nylas-event-location div.location-input{display:grid;grid-template-columns:auto 1fr;width:100%;gap:0.5rem}@media screen and (max-width: 768px){.nylas-event-location div.location-input{grid-template-columns:1fr}}.nylas-event-location div.location-input input{border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);padding:12px 16px;font-family:var(--nylas-font-family);font-size:16px;line-height:24px}.nylas-event-location select-dropdown{width:208px}@media screen and (max-width: 768px){.nylas-event-location select-dropdown{width:100%}}.nylas-event-location select-dropdown::part(sd_dropdown){width:100%}.nylas-event-location select-dropdown::part(sd_dropdown-content){left:calc(35px + 0.5rem)}.nylas-event-location select-dropdown::part(sd_dropdown-button){display:flex;justify-content:space-between;width:100%;border:1px solid var(--nylas-base-200);padding:0 0.5rem}.nylas-event-location select-dropdown::part(sd_dropdown-button-selected-label){display:inline-flex;align-self:center;padding:14px 0;font-family:var(--nylas-font-family);font-size:16px;line-height:24px}', vt = gt;
1249
- var _t = function(e, t, n, i) {
1250
- var l = arguments.length, s = l < 3 ? t : i === null ? i = Object.getOwnPropertyDescriptor(t, n) : i, o;
1251
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
1252
- s = Reflect.decorate(e, t, n, i);
1253
- else
1254
- for (var d = e.length - 1; d >= 0; d--)
1255
- (o = e[d]) && (s = (l < 3 ? o(s) : l > 3 ? o(t, n, s) : o(t, n)) || s);
1256
- return l > 3 && s && Object.defineProperty(t, n, s), s;
1257
- }, z = function(e, t) {
1258
- if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
1259
- return Reflect.metadata(e, t);
1260
- };
1261
- const re = class {
1262
- constructor(e) {
1263
- p(this, e), this.valueChanged = u(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.name = "location", this.selectedConfiguration = void 0, this.eventLocation = void 0, this.location = this.eventLocation ?? "", this.selectedLocationOption = this.eventLocation ? "custom" : "none";
1264
- }
1265
- elementNameChangedHandler(e) {
1266
- r("nylas-event-location", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
1267
- }
1268
- selectedConfigurationChangedHandler(e, t) {
1269
- var i;
1270
- r("nylas-custom-booking-flow", "selectedConfigurationChangedHandler", e, t);
1271
- const n = (i = e == null ? void 0 : e.event_booking) == null ? void 0 : i.location;
1272
- n && (this.selectedLocationOption = n ? "custom" : "none", this.location = n);
1273
- }
1274
- eventLocationChangedHandler(e, t) {
1275
- r("nylas-event-location", "eventLocationChangedHandler", e), e !== t && (this.selectedLocationOption = e ? "custom" : "none");
1276
- }
1277
- connectedCallback() {
1278
- r("nylas-event-location", "connectedCallback");
1279
- }
1280
- componentWillLoad() {
1281
- r("nylas-event-location", "componentWillLoad"), this.host.setAttribute("name", this.name);
1282
- }
1283
- componentDidLoad() {
1284
- r("nylas-event-location", "componentDidLoad");
1285
- }
1286
- disconnectedCallback() {
1287
- r("nylas-event-location", "disconnectedCallback");
1288
- }
1289
- nylasFormDropdownChangedHandler(e) {
1290
- this.selectedLocationOption = e.detail.value, this.selectedLocationOption === "none" && (this.location = "", this.setFormValue("", "location"), this.valueChanged.emit({ value: "", name: this.name }));
1291
- }
1292
- setFormValue(e, t) {
1293
- typeof this.internals.setFormValue == "function" && this.internals.setFormValue(e, t);
1294
- }
1295
- handleChange(e) {
1296
- const t = H(e.target.value);
1297
- this.location = t, this.setFormValue(t, "location"), this.valueChanged.emit({ value: t, name: this.name });
1298
- }
1299
- render() {
1300
- const e = [
1301
- { value: "none", label: "None" },
1302
- { value: "custom", label: "Custom location" }
1303
- ], t = {
1304
- none: a("location-off-icon", { key: "b83e4c1ee5292f3261fca8489ec10a6ded3378dc" }),
1305
- custom: a("location-icon", { key: "6ba8c483b7e242b0accf8a55ccb11efc8b4e19a5" })
1306
- };
1307
- return a(y, { key: "f65e817196207fa0397fb599bc89a8cb72b7e8e1" }, a("div", { key: "7410dde44d2b93d0aa655feb0c9dede3b14f3f1e", class: "nylas-event-location", part: "nel" }, a("label", { key: "4d158faf262e76e325e1dc35792bc36800a3df6f", htmlFor: "location" }, "Location type", a("span", { key: "28b4287f14b80b9a1db726470bf27dd017b3ba37", class: "label-icon" }, a("tooltip-component", { key: "65a2db2bdf57377beb1b5b4801a89f5a74320205" }, a("info-icon", { key: "350b0f6f2c7f442cc4fb3fdee838c600d271d667", slot: "tooltip-icon" }), a("span", { key: "31027673d5cd518b6cbc847c0010f482b0540de6", slot: "tooltip-content" }, "Choose how you’ll meet with the participants at the scheduled time. Pick from available conferencing options or add a custom location.")))), a("div", { key: "a902e62a97f181dcb6b0e0e4daea1ec4c817fe58", class: "location-input" }, a("select-dropdown", { key: "5f271d86549b8fa286b630f169e191d4c1d73e3d", withSearch: !1, name: "location", options: e, defaultSelectedOption: e.find((n) => n.value == this.selectedLocationOption), exportparts: "sd_dropdown: nel__dropdown, sd_dropdown-button: nel__dropdown-button, sd_dropdown-content: nel__dropdown-content" }, a("span", { key: "cdc3f3fcdf971ffe3495f085b39cac2a1e77df11", slot: "select-icon" }, t[this.selectedLocationOption])), this.selectedLocationOption === "custom" && a("input", { type: "text", part: "nel__location", id: "location", name: "location", maxlength: "1024", value: this.location, onInput: (n) => this.handleChange(n) }))));
1308
- }
1309
- static get formAssociated() {
1310
- return !0;
1311
- }
1312
- get host() {
1313
- return h(this);
1314
- }
1315
- static get watchers() {
1316
- return {
1317
- name: ["elementNameChangedHandler"],
1318
- selectedConfiguration: ["selectedConfigurationChangedHandler"],
1319
- eventLocation: ["eventLocationChangedHandler"]
1320
- };
1321
- }
1322
- };
1323
- _t([
1324
- m({
1325
- name: "nylas-event-location",
1326
- stateToProps: /* @__PURE__ */ new Map([["schedulerConfig.selectedConfiguration", "selectedConfiguration"]]),
1327
- eventToProps: {},
1328
- fireRegisterEvent: !0
1329
- }),
1330
- z("design:type", Function),
1331
- z("design:paramtypes", []),
1332
- z("design:returntype", void 0)
1333
- ], re.prototype, "render", null);
1334
- re.style = vt;
1335
- const kt = ':host{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}.nylas-event-title{display:flex;flex-direction:column;gap:4px;position:relative;text-align:left}.nylas-event-title div.title{padding:12px 16px;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);overflow:scroll;white-space:nowrap;scrollbar-width:thin}.nylas-event-title div.title::-webkit-scrollbar{width:6px;height:6px}.nylas-event-title div.title.error{border-color:var(--nylas-error);outline:none}.nylas-event-title input{padding:12px 16px;border-width:1;border-radius:8px;border:1px solid var(--nylas-base-200)}.nylas-event-title span.help-text{color:var(--nylas-base-800);font-size:14px;font-style:normal;font-weight:400;line-height:21px}.nylas-event-title span.error-message{color:var(--nylas-error)}.nylas-event-title label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:16px;font-style:normal;font-weight:400;line-height:150%;}.nylas-event-title label span.required{color:var(--nylas-error, #cc4841)}.nylas-event-title label span.label-icon{margin-left:4px}.nylas-event-title label span.label-icon tooltip-component{display:flex}.highlighted-tag{background-color:var(--nylas-base-200);border-radius:var(--nylas-border-radius);padding:5px;margin-left:4px}.token-options{display:block;background-color:var(--nylas-base-0);width:100%;max-height:336px;overflow:auto;z-index:1;border-radius:4px;position:absolute;top:80px;box-shadow:0px 4px 6px -2px rgba(0, 0, 0, 0.0509803922);box-shadow:0px 10px 15px -3px rgba(0, 0, 0, 0.1019607843)}@media screen and (max-width: 768px){.token-options{right:0;width:325px;max-width:unset}}.token-options ul{padding:0;list-style-type:none;color:var(--nylas-base-900);max-height:336px;margin:0}.token-options ul li{padding:16px, 12px, 16px, 12px;color:black;padding:12px 16px;text-decoration:none;display:block;font-family:inherit;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0px;text-align:left;cursor:pointer}.token-options ul li .token-label{display:flex;flex-direction:column;font-weight:400}.token-options ul li .token-label .token{color:var(--nylas-abse-900);font-size:16px;line-height:24px}.token-options ul li .token-label .description{color:var(--nylas-base-600);font-size:14px;line-height:21px}.token-options ul li:hover,.token-options ul li:focus,.token-options ul li:active,.token-options ul li.active{background-color:var(--nylas-base-100)}.token-options ul li:hover .token-label .token,.token-options ul li:focus .token-label .token,.token-options ul li:active .token-label .token,.token-options ul li.active .token-label .token{color:var(--nylas-primary)}.token-options .selected{background-color:var(--nylas-base-100)}', xt = kt;
1336
- var Ct = function(e, t, n, i) {
1337
- var l = arguments.length, s = l < 3 ? t : i === null ? i = Object.getOwnPropertyDescriptor(t, n) : i, o;
1338
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
1339
- s = Reflect.decorate(e, t, n, i);
1340
- else
1341
- for (var d = e.length - 1; d >= 0; d--)
1342
- (o = e[d]) && (s = (l < 3 ? o(s) : l > 3 ? o(t, n, s) : o(t, n)) || s);
1343
- return l > 3 && s && Object.defineProperty(t, n, s), s;
1344
- }, j = function(e, t) {
1345
- if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
1346
- return Reflect.metadata(e, t);
1347
- };
1348
- const de = class {
1349
- constructor(e) {
1350
- var t, n;
1351
- p(this, e), this.valueChanged = u(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.selectedConfiguration = void 0, this.eventTitle = (n = (t = this.selectedConfiguration) == null ? void 0 : t.event_booking) == null ? void 0 : n.title, this.name = "title", this.showTokens = !1, this.availableTokens = K.map((i) => ({
1352
- label: i.token,
1353
- value: i.value,
1354
- labelHTML: i
1355
- })), this.filteredTokens = this.availableTokens, this.ariaActivedescendant = "", this.currentWord = { $value: "", fullText: "", index: -1, focusOffset: -1 }, this.validationError = "";
1356
- }
1357
- elementNameChangedHandler(e) {
1358
- r("nylas-event-title", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
1359
- }
1360
- ariaActivedescendantChangedHandler(e) {
1361
- var t, n;
1362
- if (r("nylas-event-title", "ariaActivedescendantChangedHandler", e), e !== "") {
1363
- const i = (t = this.host.shadowRoot) == null ? void 0 : t.getElementById(e);
1364
- i == null || i.classList.add("active");
1365
- } else {
1366
- const i = (n = this.host.shadowRoot) == null ? void 0 : n.querySelectorAll(".token-options li.active");
1367
- i == null || i.forEach((l) => l.classList.remove("active"));
1368
- }
1369
- }
1370
- configChangedHandler(e) {
1371
- var n;
1372
- const t = (n = e == null ? void 0 : e.event_booking) == null ? void 0 : n.title;
1373
- t && this.updateEventTitleFromProp(t);
1374
- }
1375
- connectedCallback() {
1376
- r("nylas-event-title", "connectedCallback");
1377
- }
1378
- componentWillLoad() {
1379
- r("nylas-event-title", "componentWillLoad"), this.host.setAttribute("name", this.name);
1380
- }
1381
- componentDidLoad() {
1382
- r("nylas-event-title", "componentDidLoad"), this.updateEventTitleFromProp(this.eventTitle || "");
1383
- }
1384
- disconnectedCallback() {
1385
- r("nylas-event-title", "disconnectedCallback");
1386
- }
1387
- formSubmittedHandler(e) {
1388
- var t, n;
1389
- r("nylas-event-title", "formSubmittedHandler", e), (n = (t = this.internals) == null ? void 0 : t.validity) != null && n.valid ? this.validationError = "" : this.validationError = "Event title is required";
1390
- }
1391
- updateEventTitleFromProp(e) {
1392
- var t, n;
1393
- r("nylas-event-title", "eventTitleChangedHandler", e), this.titleRef && (this.titleRef.innerHTML = this.highlightTokens(e), this.titleRef.focus(), typeof this.internals.setValidity == "function" && (e === "" ? (t = this.internals) == null || t.setValidity({ customError: !0 }, "Event title is required", this.titleRef) : (n = this.internals) == null || n.setValidity({ customError: !1 })));
1394
- }
1395
- highlightTokens(e) {
1396
- let t = e;
1397
- return K.forEach((n) => {
1398
- const i = n.value, l = new RegExp(`(\\${i})(?!\\w)`, "g");
1399
- t = t.replace(l, '<span class="highlighted-tag">$1</span>');
1400
- }), t;
1401
- }
1402
- getCurrentSelectionForBrowser() {
1403
- var i, l, s;
1404
- const e = (o, d, b, f) => {
1405
- const c = o.replace(/[\u200B-\u200D\uFEFF]/g, ""), _ = c.lastIndexOf("$"), g = c.substring(_).split(" ")[0];
1406
- return {
1407
- focusOffset: d,
1408
- dollarIndex: _,
1409
- lastWord: g,
1410
- currentText: c,
1411
- node: b,
1412
- allSelected: f
1413
- };
1414
- }, t = (o) => {
1415
- var d, b;
1416
- return o.anchorOffset === 0 && o.focusOffset === ((b = (d = o.focusNode) == null ? void 0 : d.nodeValue) == null ? void 0 : b.length);
1417
- };
1418
- switch (me()) {
1419
- case "Chrome":
1420
- const o = (i = this.host.shadowRoot) == null ? void 0 : i.getSelection(), d = o == null ? void 0 : o.focusNode, b = (d == null ? void 0 : d.nodeValue) || "", f = o && t(o);
1421
- return e(b, (o == null ? void 0 : o.focusOffset) || -1, d, f);
1422
- case "Firefox":
1423
- const c = document.getSelection(), _ = ((l = c == null ? void 0 : c.anchorNode) == null ? void 0 : l.nodeValue) || "", g = c && t(c);
1424
- return e(_, (c == null ? void 0 : c.focusOffset) || -1, c == null ? void 0 : c.anchorNode, g);
1425
- case "Safari":
1426
- const k = window.getSelection(), v = k == null ? void 0 : k.getComposedRanges(this.host.shadowRoot)[0], I = ((s = v == null ? void 0 : v.startContainer) == null ? void 0 : s.nodeValue) || "", C = k && t(k);
1427
- return e(I, (v == null ? void 0 : v.endOffset) || -1, v == null ? void 0 : v.startContainer, C);
1428
- default:
1429
- return console.warn("Browser not supported"), null;
1430
- }
1431
- }
1432
- handleChange(e) {
1433
- let t = e.target.textContent || "";
1434
- t = H(t);
1435
- const n = this.getCurrentSelectionForBrowser();
1436
- if (!n) {
1437
- this.updateEventTitle(t), this.resetDropdown();
1438
- return;
1439
- }
1440
- const { focusOffset: i, dollarIndex: l, lastWord: s, currentText: o } = n;
1441
- if (l === -1 || i < l) {
1442
- this.updateEventTitle(t), this.resetDropdown();
1443
- return;
1444
- }
1445
- s.startsWith("$") ? (this.showTokens = !0, this.currentWord = {
1446
- $value: s,
1447
- fullText: o,
1448
- index: l,
1449
- focusOffset: i
1450
- }, this.populateSuggestionsDropdown(s)) : this.resetDropdown(), this.updateEventTitle(t);
1451
- }
1452
- handleInputKeyDown(e) {
1453
- var n, i, l, s;
1454
- const t = this.getCurrentSelectionForBrowser();
1455
- if (t != null && t.allSelected && !he(e) && (this.titleRef.innerHTML = ""), e.key === "Enter") {
1456
- e.preventDefault();
1457
- const o = (n = this.host.shadowRoot) == null ? void 0 : n.getElementById(this.ariaActivedescendant);
1458
- o && (o.click(), this.ariaActivedescendant = "");
1459
- } else if (e.key === "ArrowDown") {
1460
- e.preventDefault();
1461
- const o = (i = this.host.shadowRoot) == null ? void 0 : i.getElementById(this.ariaActivedescendant);
1462
- if (o) {
1463
- const d = o.nextElementSibling;
1464
- d ? this.ariaActivedescendant = d.id : this.ariaActivedescendant = this.filteredTokens[0].label;
1465
- } else
1466
- this.ariaActivedescendant = this.filteredTokens[0].label;
1467
- } else if (e.key === "ArrowUp") {
1468
- e.preventDefault();
1469
- const o = (l = this.host.shadowRoot) == null ? void 0 : l.getElementById(this.ariaActivedescendant);
1470
- if (o) {
1471
- const d = o.previousElementSibling;
1472
- d ? this.ariaActivedescendant = d.id : this.ariaActivedescendant = this.filteredTokens[this.filteredTokens.length - 1].label;
1473
- } else
1474
- this.ariaActivedescendant = this.filteredTokens[this.filteredTokens.length - 1].label;
1475
- } else
1476
- e.key === "Escape" ? (e.preventDefault(), this.resetDropdown()) : (e.key === "Backspace" || e.key === "Delete") && (t != null && t.currentText.startsWith("${") && (s = t == null ? void 0 : t.node) != null && s.parentNode && t.node.parentNode.removeChild(t.node), (this.titleRef.textContent === "" || (t == null ? void 0 : t.currentText) === "" || t != null && t.allSelected) && (this.titleRef.innerHTML = ""));
1477
- }
1478
- selectOption(e, t) {
1479
- var I;
1480
- e.preventDefault();
1481
- const n = this.currentWord.fullText, i = this.currentWord.$value;
1482
- let l = this.titleRef.firstChild, s = null;
1483
- for (; l; ) {
1484
- if (l.nodeType === 3) {
1485
- const C = ((I = l.textContent) == null ? void 0 : I.replace(/[\u200B-\u200D\uFEFF]/g, "")) || "", ye = n.replace(/[\u200B-\u200D\uFEFF]/g, "");
1486
- if (C.includes(ye)) {
1487
- s = l;
1488
- break;
1489
- }
1490
- }
1491
- l = l.nextSibling;
1492
- }
1493
- if (!s)
1494
- return;
1495
- const o = s.textContent || "", d = o.indexOf(i), b = o.substring(0, d), f = o.substring(d + i.length), c = document.createTextNode(b), _ = document.createRange(), g = document.createElement("span");
1496
- g.classList.add("highlighted-tag"), g.textContent = `${t.value}`;
1497
- const k = document.createTextNode(f);
1498
- if (f !== "")
1499
- s.replaceWith(c, g, k), _.setStart(k, 1);
1500
- else {
1501
- const C = document.createTextNode("​");
1502
- s.replaceWith(c, g, C), _.setStart(C, 1);
1503
- }
1504
- this.resetDropdown(), this.titleRef.focus();
1505
- const v = window.getSelection();
1506
- _.collapse(!0), v == null || v.removeAllRanges(), v == null || v.addRange(_), this.updateEventTitle(this.titleRef.textContent || "");
1507
- }
1508
- populateSuggestionsDropdown(e = "") {
1509
- this.filteredTokens = this.availableTokens.filter((t) => t.label.startsWith(e.toString()) || t.value.startsWith(e.toString())), this.filteredTokens.length > 0 && (this.ariaActivedescendant = this.filteredTokens[0].label);
1510
- }
1511
- updateEventTitle(e) {
1512
- var n, i, l;
1513
- const t = e.replace(/ +/g, " ");
1514
- t === "" ? ((n = this.internals) == null || n.setValidity({ customError: !0 }, "Event title is required", this.titleRef), this.validationError = "Event title is required") : ((i = this.internals) == null || i.setValidity({ customError: !1 }), this.validationError = ""), (l = this.internals) == null || l.setFormValue(t, this.name), this.valueChanged.emit({ value: t, name: this.name });
1515
- }
1516
- resetDropdown() {
1517
- this.showTokens = !1, this.ariaActivedescendant = "";
1518
- }
1519
- getLabelHTML(e) {
1520
- return a("div", { class: "token-label" }, a("span", { class: "token" }, e.token), a("span", { class: "description" }, e.description));
1521
- }
1522
- render() {
1523
- var e;
1524
- return a(y, { key: "ec414f2f4c738230078bed7b7c5477ba5fdbcb70" }, a("div", { key: "17f665e5f307c1b6510891e76daa765449958c3e", class: "nylas-event-title", part: "net" }, a("label", { key: "e4beac83e857bab219ec4276238f7953645c4711", htmlFor: "title" }, "Event title", a("span", { key: "3033d6ef407f2a3df94dc1f80be2f5e3c378abd0", class: "required" }, "*"), a("span", { key: "29dba11e88726329513ef15078eba34f103914de", class: "label-icon" }, a("tooltip-component", { key: "29a373fc979f15eb3527b9e5a446bd7518ee4562" }, a("info-icon", { key: "12f9a0190185b96a2090cdb0ca7a43f6342cc016", slot: "tooltip-icon" }), a("span", { key: "dd6e505591f9cded5bc70a812e448b44f1faa4e1", slot: "tooltip-content" }, "Enter a title for your event.")))), a("div", { key: "87807255004e909850b93d600b636d2d2e1d8ed1", class: {
1525
- title: !0,
1526
- error: this.validationError !== ""
1527
- }, part: "net__title", ref: (t) => this.titleRef = t, contentEditable: "true", onInput: (t) => this.handleChange(t), onKeyDown: (t) => this.handleInputKeyDown(t) }), this.showTokens && ((e = this.filteredTokens) == null ? void 0 : e.length) > 0 && a("div", { class: "token-options", part: "net__dropdown-content" }, a("ul", { tabindex: "-1", role: "listbox", "aria-label": this.name, "aria-activedescendant": this.ariaActivedescendant }, this.filteredTokens.map((t) => a("li", { tabindex: "0", key: t.label, id: t.label, class: { active: this.ariaActivedescendant === t.label }, onClick: (n) => this.selectOption(n, t), role: "option" }, this.getLabelHTML(t.labelHTML))))), a("span", { key: "3ba87900ffbc4b69c5f9fac01a8f9f577dd034c5", class: "help-text" }, "Create a dynamic templated event title by typing $. Learn more"), this.validationError != "" && a("span", { class: "error-message" }, this.validationError)));
1528
- }
1529
- static get formAssociated() {
1530
- return !0;
1531
- }
1532
- get host() {
1533
- return h(this);
1534
- }
1535
- static get watchers() {
1536
- return {
1537
- name: ["elementNameChangedHandler"],
1538
- ariaActivedescendant: ["ariaActivedescendantChangedHandler"],
1539
- selectedConfiguration: ["configChangedHandler"]
1540
- };
1541
- }
1542
- };
1543
- Ct([
1544
- m({
1545
- name: "nylas-event-title",
1546
- stateToProps: /* @__PURE__ */ new Map([["schedulerConfig.selectedConfiguration", "selectedConfiguration"]]),
1547
- eventToProps: {},
1548
- fireRegisterEvent: !0
1549
- }),
1550
- j("design:type", Function),
1551
- j("design:paramtypes", []),
1552
- j("design:returntype", void 0)
1553
- ], de.prototype, "render", null);
1554
- de.style = xt;
1555
- const wt = ':host{--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}.nylas-limit-future-bookings{display:flex;justify-content:space-between;font-family:var(--nylas-font-family)}@media screen and (max-width: 768px){.nylas-limit-future-bookings{flex-direction:column;gap:0.5rem}}.nylas-limit-future-bookings label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:16px;font-style:normal;font-weight:400;line-height:150%;}.nylas-limit-future-bookings label span.label-icon{margin-left:4px}.nylas-limit-future-bookings label span.label-icon tooltip-component{display:flex}select-dropdown::part(sd_dropdown-button){border:none}', Ot = wt;
1556
- var It = function(e, t, n, i) {
1557
- var l = arguments.length, s = l < 3 ? t : i === null ? i = Object.getOwnPropertyDescriptor(t, n) : i, o;
1558
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
1559
- s = Reflect.decorate(e, t, n, i);
1560
- else
1561
- for (var d = e.length - 1; d >= 0; d--)
1562
- (o = e[d]) && (s = (l < 3 ? o(s) : l > 3 ? o(t, n, s) : o(t, n)) || s);
1563
- return l > 3 && s && Object.defineProperty(t, n, s), s;
1564
- }, W = function(e, t) {
1565
- if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
1566
- return Reflect.metadata(e, t);
1567
- };
1568
- const ce = class {
1569
- constructor(e) {
1570
- p(this, e), this.valueChanged = u(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.selectedConfiguration = void 0, this.availableDaysInFuture = void 0, this.name = "limit-future-bookings", this.selectedNumber = 1, this.selectedPeriod = "day";
1571
- }
1572
- elementNameChangedHandler(e) {
1573
- r("nylas-limit-future-bookings", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
1574
- }
1575
- selectedConfigurationChangedHandler(e) {
1576
- var n;
1577
- const t = (n = e == null ? void 0 : e.scheduler) == null ? void 0 : n.available_days_in_future;
1578
- t && this.updateNumberAndPeriodFromDays(t);
1579
- }
1580
- availableDaysInFutureChanged(e) {
1581
- this.updateNumberAndPeriodFromDays(e);
1582
- }
1583
- connectedCallback() {
1584
- r("nylas-limit-future-bookings", "connectedCallback");
1585
- }
1586
- componentWillLoad() {
1587
- r("nylas-limit-future-bookings", "componentWillLoad"), this.host.setAttribute("name", this.name);
1588
- }
1589
- componentDidLoad() {
1590
- var e;
1591
- r("nylas-limit-future-bookings", "componentDidLoad"), this.availableDaysInFutureChanged(this.availableDaysInFuture ?? 1), typeof this.internals.setFormValue == "function" && this.internals.setFormValue(((e = this.availableDaysInFuture) == null ? void 0 : e.toString()) ?? "1", this.name);
1592
- }
1593
- disconnectedCallback() {
1594
- r("nylas-limit-future-bookings", "disconnectedCallback");
1595
- }
1596
- timePeriodChangedHandler(e) {
1597
- const { number: t, period: n } = e.detail;
1598
- let i;
1599
- n === "day" ? i = t : n === "week" ? i = t * 7 : i = t * 30, this.valueChanged.emit({ value: i, name: "availableDaysInFuture" }), typeof this.internals.setFormValue == "function" && this.internals.setFormValue(i.toString(), this.name);
1600
- }
1601
- updateNumberAndPeriodFromDays(e) {
1602
- let t, n;
1603
- e >= 30 && e % 30 === 0 ? (t = e / 30, n = "month") : e >= 7 && e % 7 === 0 ? (t = e / 7, n = "week") : (t = e, n = "day"), this.selectedNumber = t, this.selectedPeriod = n;
1604
- }
1605
- render() {
1606
- return a(y, { key: "9efaf822025f476c80f4c5124f226e45ef9047f9" }, a("div", { key: "acb0ed9bb24d9e789c01127b2343194d47c37c5f", class: "nylas-limit-future-bookings", part: "nlfb" }, a("label", { key: "b4bbe14a0870451be5c7754dbbd3adb029b1d24c" }, "Limit future bookings", a("span", { key: "e1e671d334ec20347852549c4b4d63fa626a2186", class: "label-icon" }, a("tooltip-component", { key: "378c5a41fe7920cebd1f9de4ea16873e951584cf" }, a("info-icon", { key: "dee6d8d027c746b19b4de42a7e57754a6dcf0a34", slot: "tooltip-icon" }), a("span", { key: "f128781fb212013489d7db03e7b5fb1a02681b5a", slot: "tooltip-content" }, "Set a limit on how far in the future bookings can be made.")))), a("time-period-selector", { key: "fb00fd64c7dec2beb976132a397bb067e72c0cc3", id: "limit-future-bookings", timePeriods: ["day", "week", "month"], exportparts: "tps__number-dropdown: nlfb__number-dropdown, tps__number-dropdown-button: nlfb__number-dropdown-button, tps__number-dropdown-content: nlfb__number-dropdown-content, tps__period-dropdown: nlfb__period-dropdown, tps__period-dropdown-button: nlfb__period-dropdown-button, tps__period-dropdown-content: nlfb__period-dropdown-content", defaultSelectedNumber: this.selectedNumber, defaultSelectedPeriod: this.selectedPeriod })));
1607
- }
1608
- static get formAssociated() {
1609
- return !0;
1610
- }
1611
- get host() {
1612
- return h(this);
1613
- }
1614
- static get watchers() {
1615
- return {
1616
- name: ["elementNameChangedHandler"],
1617
- selectedConfiguration: ["selectedConfigurationChangedHandler"],
1618
- availableDaysInFuture: ["availableDaysInFutureChanged"]
1619
- };
1620
- }
1621
- };
1622
- It([
1623
- m({
1624
- name: "nylas-limit-future-bookings",
1625
- stateToProps: /* @__PURE__ */ new Map([["schedulerConfig.selectedConfiguration", "selectedConfiguration"]]),
1626
- eventToProps: {},
1627
- fireRegisterEvent: !0
1628
- }),
1629
- W("design:type", Function),
1630
- W("design:paramtypes", []),
1631
- W("design:returntype", void 0)
1632
- ], ce.prototype, "render", null);
1633
- ce.style = Ot;
1634
- const Tt = ':host{--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}.nylas-min-booking-notice{display:flex;justify-content:space-between;font-family:var(--nylas-font-family)}@media screen and (max-width: 768px){.nylas-min-booking-notice{flex-direction:column;gap:0.5rem}}.nylas-min-booking-notice label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:16px;font-style:normal;font-weight:400;line-height:150%;}.nylas-min-booking-notice label span.label-icon{margin-left:4px}.nylas-min-booking-notice label span.label-icon tooltip-component{display:flex}select-dropdown::part(sd_dropdown-button){border:none}', Ht = Tt;
1635
- var $t = function(e, t, n, i) {
1636
- var l = arguments.length, s = l < 3 ? t : i === null ? i = Object.getOwnPropertyDescriptor(t, n) : i, o;
1637
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
1638
- s = Reflect.decorate(e, t, n, i);
1639
- else
1640
- for (var d = e.length - 1; d >= 0; d--)
1641
- (o = e[d]) && (s = (l < 3 ? o(s) : l > 3 ? o(t, n, s) : o(t, n)) || s);
1642
- return l > 3 && s && Object.defineProperty(t, n, s), s;
1643
- }, B = function(e, t) {
1644
- if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
1645
- return Reflect.metadata(e, t);
1646
- };
1647
- const pe = class {
1648
- constructor(e) {
1649
- p(this, e), this.valueChanged = u(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.selectedConfiguration = void 0, this.minBookingNotice = void 0, this.name = "min-booking-notice", this.selectedNumber = 1, this.selectedPeriod = "hour";
1650
- }
1651
- elementNameChangedHandler(e) {
1652
- r("nylas-min-booking-notice", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
1653
- }
1654
- selectedConfigurationChangedHandler(e) {
1655
- var n;
1656
- const t = (n = e == null ? void 0 : e.scheduler) == null ? void 0 : n.min_booking_notice;
1657
- t && this.updateNumberAndPeriodFromMinutes(t);
1658
- }
1659
- availableDaysInFutureChanged(e) {
1660
- this.updateNumberAndPeriodFromMinutes(e);
1661
- }
1662
- connectedCallback() {
1663
- r("nylas-min-booking-notice", "connectedCallback");
1664
- }
1665
- componentWillLoad() {
1666
- r("nylas-min-booking-notice", "componentWillLoad"), this.host.setAttribute("name", this.name);
1667
- }
1668
- componentDidLoad() {
1669
- var e;
1670
- r("nylas-min-booking-notice", "componentDidLoad"), this.availableDaysInFutureChanged(this.minBookingNotice ?? 1), typeof this.internals.setFormValue == "function" && this.internals.setFormValue(((e = this.minBookingNotice) == null ? void 0 : e.toString()) ?? "1", this.name);
1671
- }
1672
- disconnectedCallback() {
1673
- r("nylas-min-booking-notice", "disconnectedCallback");
1674
- }
1675
- timePeriodChangedHandler(e) {
1676
- const { number: t, period: n } = e.detail;
1677
- let i;
1678
- const l = 60, s = l * 24, o = s * 7, d = s * 30;
1679
- n === "minute" ? i = t : n === "hour" ? i = t * l : n === "day" ? i = t * s : n === "week" ? i = t * o : n === "month" ? i = t * d : i = 0, this.valueChanged.emit({ value: i, name: "minBookingNotice" }), typeof this.internals.setFormValue == "function" && this.internals.setFormValue(i.toString(), this.name);
1680
- }
1681
- updateNumberAndPeriodFromMinutes(e) {
1682
- let s, o;
1683
- e >= 43200 ? (s = Math.floor(e / 43200), o = "month") : e >= 10080 ? (s = Math.floor(e / 10080), o = "week") : e >= 1440 ? (s = Math.floor(e / 1440), o = "day") : e >= 60 ? (s = Math.floor(e / 60), o = "hour") : (s = e, o = "minute"), this.selectedNumber = s, this.selectedPeriod = o;
1684
- }
1685
- render() {
1686
- return a(y, { key: "b00e1ce3adc1082c819774df6888d86fd93b06b6" }, a("div", { key: "0cd17759b7e1d3790904fe868addfa02065a3115", class: "nylas-min-booking-notice", part: "nmbn" }, a("label", { key: "c27bc50a60686fb925904c5f86c9f19a7ab8079c" }, "Minimum booking notice", a("span", { key: "67b1a1351adbe6265d549501609af036d993920b", class: "label-icon" }, a("tooltip-component", { key: "4e64d044707c9fe94aa84caa242a0e034c0a89f7" }, a("info-icon", { key: "bf64b04e4d308449249dae8a19a6c4043f26c1dd", slot: "tooltip-icon" }), a("span", { key: "434e31ddf539c4fcb287b198d780b6593808a607", slot: "tooltip-content" }, "The minimum amount of time in the future for planning the event.")))), a("time-period-selector", { key: "efd40f4731319bd7da2aed6995279c8068e505ac", id: "min-booking-notice", exportparts: "tps__number-dropdown: nmbn__number-dropdown, tps__number-dropdown-button: nmbn__number-dropdown-button, tps__number-dropdown-content: nmbn__number-dropdown-content, tps__period-dropdown: nmbn__period-dropdown, tps__period-dropdown-button: nmbn__period-dropdown-button, tps__period-dropdown-content: nmbn__period-dropdown-content", timePeriods: ["minute", "hour", "day", "week"], defaultSelectedNumber: this.selectedNumber, defaultSelectedPeriod: this.selectedPeriod })));
1687
- }
1688
- static get formAssociated() {
1689
- return !0;
1690
- }
1691
- get host() {
1692
- return h(this);
1693
- }
1694
- static get watchers() {
1695
- return {
1696
- name: ["elementNameChangedHandler"],
1697
- selectedConfiguration: ["selectedConfigurationChangedHandler"],
1698
- availableDaysInFuture: ["availableDaysInFutureChanged"]
1699
- };
1700
- }
1701
- };
1702
- $t([
1703
- m({
1704
- name: "nylas-min-booking-notice",
1705
- stateToProps: /* @__PURE__ */ new Map([["schedulerConfig.selectedConfiguration", "selectedConfiguration"]]),
1706
- eventToProps: {},
1707
- fireRegisterEvent: !0
1708
- }),
1709
- B("design:type", Function),
1710
- B("design:paramtypes", []),
1711
- B("design:returntype", void 0)
1712
- ], pe.prototype, "render", null);
1713
- pe.style = Ht;
1714
- const Dt = ':host{--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}.nylas-min-cancellation-notice{display:flex;justify-content:space-between;font-family:var(--nylas-font-family)}@media screen and (max-width: 768px){.nylas-min-cancellation-notice{flex-direction:column;gap:0.5rem}}.nylas-min-cancellation-notice label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:16px;font-style:normal;font-weight:400;line-height:150%;}.nylas-min-cancellation-notice label span.label-icon{margin-left:4px}.nylas-min-cancellation-notice label span.label-icon tooltip-component{display:flex}select-dropdown::part(sd_dropdown-button){border:none}', St = Dt;
1715
- var Et = function(e, t, n, i) {
1716
- var l = arguments.length, s = l < 3 ? t : i === null ? i = Object.getOwnPropertyDescriptor(t, n) : i, o;
1717
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
1718
- s = Reflect.decorate(e, t, n, i);
1719
- else
1720
- for (var d = e.length - 1; d >= 0; d--)
1721
- (o = e[d]) && (s = (l < 3 ? o(s) : l > 3 ? o(t, n, s) : o(t, n)) || s);
1722
- return l > 3 && s && Object.defineProperty(t, n, s), s;
1723
- }, Z = function(e, t) {
1724
- if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
1725
- return Reflect.metadata(e, t);
1726
- };
1727
- const fe = class {
1728
- constructor(e) {
1729
- p(this, e), this.valueChanged = u(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.selectedConfiguration = void 0, this.minCancellationNotice = void 0, this.name = "min-cancellation-notice", this.selectedNumber = 1, this.selectedPeriod = "day";
1730
- }
1731
- elementNameChangedHandler(e) {
1732
- r("nylas-min-cancellation-notice", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
1733
- }
1734
- selectedConfigurationChangedHandler(e) {
1735
- var n;
1736
- const t = (n = e == null ? void 0 : e.scheduler) == null ? void 0 : n.min_cancellation_notice;
1737
- t && this.updateNumberAndPeriodFromMinutes(t);
1738
- }
1739
- availableDaysInFutureChanged(e) {
1740
- this.updateNumberAndPeriodFromMinutes(e);
1741
- }
1742
- connectedCallback() {
1743
- r("nylas-min-cancellation-notice", "connectedCallback");
1744
- }
1745
- componentWillLoad() {
1746
- r("nylas-min-cancellation-notice", "componentWillLoad"), this.host.setAttribute("name", this.name);
1747
- }
1748
- componentDidLoad() {
1749
- var e;
1750
- r("nylas-min-cancellation-notice", "componentDidLoad"), this.availableDaysInFutureChanged(this.minCancellationNotice ?? 1), typeof this.internals.setFormValue == "function" && this.internals.setFormValue(((e = this.minCancellationNotice) == null ? void 0 : e.toString()) ?? "1", this.name);
1751
- }
1752
- disconnectedCallback() {
1753
- r("nylas-min-cancellation-notice", "disconnectedCallback");
1754
- }
1755
- timePeriodChangedHandler(e) {
1756
- const { number: t, period: n } = e.detail;
1757
- let i;
1758
- const l = 60, s = l * 24, o = s * 7, d = s * 30;
1759
- n === "minute" ? i = t : n === "hour" ? i = t * l : n === "day" ? i = t * s : n === "week" ? i = t * o : n === "month" ? i = t * d : i = 0, this.valueChanged.emit({ value: i, name: "minCancellationNotice" }), typeof this.internals.setFormValue == "function" && this.internals.setFormValue(i.toString(), this.name);
1760
- }
1761
- updateNumberAndPeriodFromMinutes(e) {
1762
- let s, o;
1763
- e >= 43200 ? (s = Math.floor(e / 43200), o = "month") : e >= 10080 ? (s = Math.floor(e / 10080), o = "week") : e >= 1440 ? (s = Math.floor(e / 1440), o = "day") : e >= 60 ? (s = Math.floor(e / 60), o = "hour") : (s = e, o = "minute"), this.selectedNumber = s, this.selectedPeriod = o;
1764
- }
1765
- render() {
1766
- return a(y, { key: "6c14649f767cebe544dd5fc3039e4bace051f759" }, a("div", { key: "e6b0965bb6bc49b6e7ede7a4c2b2c2056a212c96", class: "nylas-min-cancellation-notice", part: "nmcn" }, a("label", { key: "1998d897f882c0783e2012ca85b651c43517ba64" }, "Minimum cancellation notice", a("span", { key: "eccae26b18bd269648d1bce2affae5d3e469ea02", class: "label-icon" }, a("tooltip-component", { key: "50caa33903115b0da9da25ed3a18cbbf8a4df353" }, a("info-icon", { key: "8b466b236668439cbca8e250d60524b69ce4f7f3", slot: "tooltip-icon" }), a("span", { key: "c4c9d73798c85d317aa1f89a2b0f1c66c9ca41d2", slot: "tooltip-content" }, "Set the minimum amount of time required to cancel an event.")))), a("time-period-selector", { key: "bb4c0a9ecfb9bc9ebf88b229c871abd4b8427385", id: "min-cancellation-notice", exportparts: "tps__number-dropdown: nmcn__number-dropdown, tps__number-dropdown-button: nmcn__number-dropdown-button, tps__number-dropdown-content: nmcn__number-dropdown-content, tps__period-dropdown: nmcn__period-dropdown, tps__period-dropdown-button: nmcn__period-dropdown-button, tps__period-dropdown-content: nmcn__period-dropdown-content", timePeriods: ["minute", "hour", "day", "week"], defaultSelectedNumber: this.selectedNumber, defaultSelectedPeriod: this.selectedPeriod })));
1767
- }
1768
- static get formAssociated() {
1769
- return !0;
1770
- }
1771
- get host() {
1772
- return h(this);
1773
- }
1774
- static get watchers() {
1775
- return {
1776
- name: ["elementNameChangedHandler"],
1777
- selectedConfiguration: ["selectedConfigurationChangedHandler"],
1778
- availableDaysInFuture: ["availableDaysInFutureChanged"]
1779
- };
1780
- }
1781
- };
1782
- Et([
1783
- m({
1784
- name: "nylas-min-cancellation-notice",
1785
- stateToProps: /* @__PURE__ */ new Map([["schedulerConfig.selectedConfiguration", "selectedConfiguration"]]),
1786
- eventToProps: {},
1787
- fireRegisterEvent: !0
1788
- }),
1789
- Z("design:type", Function),
1790
- Z("design:paramtypes", []),
1791
- Z("design:returntype", void 0)
1792
- ], fe.prototype, "render", null);
1793
- fe.style = St;
1794
- const Lt = ':host{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;width:inherit}.nylas-participants-custom-availability{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200)}.nylas-participants-custom-availability .header{padding:1rem}.nylas-participants-custom-availability .header h3{margin:0;font-size:16px;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-participants-custom-availability .header p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.nylas-participants-custom-availability .content .participant-container{padding-top:8px;border-top:1px solid var(--nylas-base-200)}.nylas-participants-custom-availability .content .participant-container .participant-title{display:flex;justify-content:space-between;align-items:center;padding:4px 16px 12px}.nylas-participants-custom-availability .content .participant-container .participant-title p{margin:0}.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle{display:flex;gap:24px;align-items:center}.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle .chevron{display:flex;align-self:center;cursor:pointer}.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle .chevron:hover,.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle .chevron:active{color:var(--nylas-primary)}.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle .chevron.open{transform:rotate(90deg)}.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle .chevron.closed{transform:rotate(270deg)}.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle .chevron.disabled{cursor:not-allowed;color:var(--nylas-base-300)}.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle .chevron.disabled:hover{color:var(--nylas-base-300)}.nylas-participants-custom-availability .content .participant-container nylas-availability-picker::part(nap){margin:0;border:none}', Nt = Lt;
1795
- var Pt = function(e, t, n, i) {
1796
- var l = arguments.length, s = l < 3 ? t : i === null ? i = Object.getOwnPropertyDescriptor(t, n) : i, o;
1797
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
1798
- s = Reflect.decorate(e, t, n, i);
1799
- else
1800
- for (var d = e.length - 1; d >= 0; d--)
1801
- (o = e[d]) && (s = (l < 3 ? o(s) : l > 3 ? o(t, n, s) : o(t, n)) || s);
1802
- return l > 3 && s && Object.defineProperty(t, n, s), s;
1803
- }, U = function(e, t) {
1804
- if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
1805
- return Reflect.metadata(e, t);
1806
- };
1807
- const be = class {
1808
- constructor(e) {
1809
- p(this, e), this.valueChanged = u(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.name = "participant-custom-availability", this.participants = void 0, this.selectedParticipants = this.setParticipants(this.participants);
1810
- }
1811
- elementNameChangedHandler(e) {
1812
- r("nylas-participants-custom-availability", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
1813
- }
1814
- participantsChangedHandler(e) {
1815
- r("nylas-participants-custom-availability", "participantsChangedHandler", e), this.selectedParticipants = this.setParticipants(e);
1816
- }
1817
- connectedCallback() {
1818
- r("nylas-participants-custom-availability", "connectedCallback");
1819
- }
1820
- disconnectedCallback() {
1821
- r("nylas-participants-custom-availability", "disconnectedCallback");
1822
- }
1823
- componentWillLoad() {
1824
- r("nylas-participants-custom-availability", "componentWillLoad");
1825
- }
1826
- componentDidLoad() {
1827
- r("nylas-participants-custom-availability", "componentDidLoad");
1828
- }
1829
- nylasFormSwitchToggledHandler(e) {
1830
- r("nylas-participants-custom-availability", "nylasFormSwitchToggledHandler", e.detail), this.selectedParticipants[e.detail.name].isOpen = e.detail.checked, this.selectedParticipants[e.detail.name].setCustom = e.detail.checked, this.selectedParticipants = { ...this.selectedParticipants };
1831
- }
1832
- handleValueChanged(e) {
1833
- r("[nylas-editor-tabs]", "handleValueChanged", e);
1834
- const { name: t, value: n } = e.detail;
1835
- if (!t.startsWith("participant-"))
1836
- return;
1837
- if (this.participantFormRef.checkValidity())
1838
- this.internals.setValidity({});
1839
- else {
1840
- this.internals.setValidity({ customError: !0 }, "Please fix the overlapping time ranges.");
1841
- return;
1842
- }
1843
- const i = JSON.parse(n), l = t.split("-")[2];
1844
- if (!this.selectedParticipants[l])
1845
- return;
1846
- this.selectedParticipants[l].openHours = i.openHours, this.selectedParticipants = { ...this.selectedParticipants };
1847
- const s = {};
1848
- this.participants.forEach((o) => {
1849
- s[o.email] = this.selectedParticipants[o.email].openHours;
1850
- }), this.internals.setFormValue(JSON.stringify(s), this.name), this.valueChanged.emit({ value: JSON.stringify(s), name: this.name });
1851
- }
1852
- setParticipants(e) {
1853
- const t = {};
1854
- return e.forEach((n) => {
1855
- var l, s;
1856
- const i = !!n.is_organizer;
1857
- t[n.email] = {
1858
- isOpen: i,
1859
- setCustom: !!((l = n.availability) != null && l.open_hours),
1860
- openHours: ((s = n.availability) == null ? void 0 : s.open_hours) || [],
1861
- name: n.name || n.email,
1862
- availability: n.availability
1863
- };
1864
- }), t;
1865
- }
1866
- render() {
1867
- return a(y, { key: "051df44e8bf6bab14cfbccb0a3c5f920993cbae9" }, a("div", { key: "128d044cb2bbee76d695d6f5d4bc38a211d06360", class: "nylas-participants-custom-availability", part: "npca" }, a("div", { key: "ed326c442f9663b0613e5cf62a31aabf5fa1034d", class: "header", part: "npca__header" }, a("h3", { key: "10994aace54d17110ab2e70fc82a5c11231b5a23" }, "Set Custom Availability for Participants"), a("p", { key: "6df3bc37aec02f5a4468f6c6515c6de2c696e817" }, "Set custom availability for scheduling meetings, or default to general availability.")), a("div", { key: "e1e67385b15430e8a7eb6d8411f9b87742621969", class: "content", part: "npca__content" }, a("form", { key: "589df249c050b132dc8da5b3ef7e58fa829ae300", ref: (e) => this.participantFormRef = e }, Object.keys(this.selectedParticipants).map((e, t) => {
1868
- var i, l;
1869
- const n = this.selectedParticipants[e];
1870
- if (!(!n || !n.name || !n.availability))
1871
- return a("div", { class: "participant-container", part: "npca__participant-container", key: `participant-conatiner-${t}` }, a("div", { class: "participant-title", part: "npca__participant-title" }, a("p", null, "Set ", n.name, "'s custom availability"), a("div", { class: "participant-toggle", part: "npca__participant-toggle--container" }, a("toggle-switch", { exportparts: "ts_label: npca__toggle-label, ts_input: npca_toggle-input, ts_slider: npca_toggle-slider", name: e, checked: !!n.openHours && n.openHours.length > 0 }), a("span", { class: `chevron ${n.isOpen ? "open" : "closed"} ${n.setCustom ? "" : "disabled"}`, onClick: () => {
1872
- n.setCustom && (this.selectedParticipants[e].isOpen = !n.isOpen, this.selectedParticipants = { ...this.selectedParticipants });
1873
- } }, a("chevron-icon", { width: "24", height: "24" })))), n.isOpen && a("nylas-availability-picker", { key: t, name: `participant-${t}-${e}`, openHours: n.openHours, defaultTimezone: (l = (i = n.openHours) == null ? void 0 : i[0]) == null ? void 0 : l.timezone, hideHeader: !0 }));
1874
- })))));
1875
- }
1876
- static get formAssociated() {
1877
- return !0;
1878
- }
1879
- get host() {
1880
- return h(this);
1881
- }
1882
- static get watchers() {
1883
- return {
1884
- name: ["elementNameChangedHandler"],
1885
- participants: ["participantsChangedHandler"]
1886
- };
1887
- }
1888
- };
1889
- Pt([
1890
- m({
1891
- name: "nylas-participants-custom-availability",
1892
- eventToProps: {},
1893
- fireRegisterEvent: !0
1894
- }),
1895
- U("design:type", Function),
1896
- U("design:paramtypes", []),
1897
- U("design:returntype", void 0)
1898
- ], be.prototype, "render", null);
1899
- be.style = Nt;
1900
- const Ft = ':host{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;width:inherit}.nylas-timeslot-interval{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200)}.nylas-timeslot-interval .header{padding:1rem;border-bottom:1px solid var(--nylas-base-200)}.nylas-timeslot-interval .header h3{margin:0;font-size:1rem;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-timeslot-interval .header p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.nylas-timeslot-interval .nylas-timeslot-interval__dropdown{padding:1rem;display:flex;flex-direction:column;gap:4px}.nylas-timeslot-interval .nylas-timeslot-interval__dropdown span.label{display:flex;align-items:center;gap:4px;color:var(--nylas-base-800)}.nylas-timeslot-interval .nylas-timeslot-interval__dropdown span.label tooltip-component{display:flex}.nylas-timeslot-interval .nylas-timeslot-interval__dropdown select-dropdown{margin-bottom:1.5rem}.nylas-timeslot-interval .nylas-timeslot-interval__dropdown select-dropdown::part(sd_dropdown){width:100%}.nylas-timeslot-interval .nylas-timeslot-interval__dropdown select-dropdown::part(sd_dropdown-content){width:100%;max-width:unset}.nylas-timeslot-interval .nylas-timeslot-interval__dropdown select-dropdown::part(sd_dropdown-button){width:100%;display:flex;justify-content:space-between;align-items:center;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);padding:1rem}.nylas-timeslot-interval .nylas-timeslot-interval__dropdown select-dropdown::part(sd_dropdown-button-selected-label){max-width:calc(100% - 2rem);font-family:var(--nylas-font-family);font-size:16px;line-height:24px}', At = Ft;
1901
- var Rt = function(e, t, n, i) {
1902
- var l = arguments.length, s = l < 3 ? t : i === null ? i = Object.getOwnPropertyDescriptor(t, n) : i, o;
1903
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
1904
- s = Reflect.decorate(e, t, n, i);
1905
- else
1906
- for (var d = e.length - 1; d >= 0; d--)
1907
- (o = e[d]) && (s = (l < 3 ? o(s) : l > 3 ? o(t, n, s) : o(t, n)) || s);
1908
- return l > 3 && s && Object.defineProperty(t, n, s), s;
1909
- }, G = function(e, t) {
1910
- if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
1911
- return Reflect.metadata(e, t);
1912
- };
1913
- const T = 15, ue = class {
1914
- constructor(e) {
1915
- var t, n, i, l, s, o;
1916
- p(this, e), this.valueChanged = u(this, "valueChanged", 7), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.selectedConfiguration = void 0, this.name = "timeslot-picker", this.eventDurationMinutes = ((n = (t = this.selectedConfiguration) == null ? void 0 : t.availability) == null ? void 0 : n.duration_minutes) ?? 5, this.defaultIntervalMinutes = ((l = (i = this.selectedConfiguration) == null ? void 0 : i.availability) == null ? void 0 : l.interval_minutes) ?? this.eventDurationMinutes, this.defaultRoundTo = ((o = (s = this.selectedConfiguration) == null ? void 0 : s.availability) == null ? void 0 : o.round_to) ?? void 0, this.selectedInterval = this.defaultIntervalMinutes, this.selectedRoundTo = !!(this.defaultRoundTo && this.defaultRoundTo === this.defaultIntervalMinutes);
1917
- }
1918
- elementNameChangedHandler(e) {
1919
- r("nylas-timeslot-interval", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
1920
- }
1921
- selectedConfigurationChangedHandler(e) {
1922
- var t, n;
1923
- r("nylas-timeslot-interval", "selectedConfigurationChangedHandler", e), this.defaultIntervalMinutes = ((t = e.availability) == null ? void 0 : t.interval_minutes) ?? this.eventDurationMinutes, this.defaultRoundTo = ((n = e.availability) == null ? void 0 : n.round_to) ?? void 0, this.selectedInterval = this.defaultIntervalMinutes, this.selectedRoundTo = !!(this.defaultRoundTo && this.defaultRoundTo === this.defaultIntervalMinutes);
1924
- }
1925
- connectedCallback() {
1926
- r("nylas-timeslot-interval", "connectedCallback");
1927
- }
1928
- disconnectedCallback() {
1929
- r("nylas-timeslot-interval", "disconnectedCallback");
1930
- }
1931
- componentWillLoad() {
1932
- r("nylas-timeslot-interval", "componentWillLoad"), this.host.setAttribute("name", this.name);
1933
- }
1934
- componentDidLoad() {
1935
- r("nylas-timeslot-interval", "componentDidLoad");
1936
- }
1937
- componentWillUpdate() {
1938
- r("nylas-timeslot-interval", "componentWillUpdate");
1939
- }
1940
- componentDidUpdate() {
1941
- r("nylas-timeslot-interval", "componentDidUpdate");
1942
- }
1943
- componentWillRender() {
1944
- r("nylas-timeslot-interval", "componentWillRender");
1945
- }
1946
- componentDidRender() {
1947
- r("nylas-timeslot-interval", "componentDidRender");
1948
- }
1949
- nylasFormDropdownChangedHandler(e) {
1950
- r("nylas-timeslot-interval", "nylasFormDropdownChangedHandler", e.detail), e.detail.value === "duration" ? this.selectedInterval = this.eventDurationMinutes : this.selectedInterval = parseInt(e.detail.value), console.log("nylasFormDropdownChanged selectedRoundTo", this.selectedRoundTo), this.valueChanged.emit({
1951
- value: JSON.stringify({
1952
- interval: this.selectedInterval,
1953
- roundTo: this.selectedRoundTo ? this.selectedInterval : T
1954
- }),
1955
- name: this.name
1956
- }), typeof this.internals.setFormValue == "function" && this.internals.setFormValue(JSON.stringify({ interval: this.selectedInterval, roundTo: this.selectedRoundTo ? this.selectedInterval : T }), this.name);
1957
- }
1958
- radioSelectionChangedHandler(e) {
1959
- r("nylas-timeslot-interval", "radioSelectionChangedHandler", e.detail), e.detail.value === "no-rounding" ? this.selectedRoundTo = !1 : this.selectedRoundTo = !0, console.log("selectedRoundTo", this.selectedRoundTo), this.valueChanged.emit({
1960
- value: JSON.stringify({
1961
- interval: this.selectedInterval,
1962
- roundTo: this.selectedRoundTo ? this.selectedInterval : T
1963
- }),
1964
- name: this.name
1965
- }), typeof this.internals.setFormValue == "function" && this.internals.setFormValue(JSON.stringify({ interval: this.selectedInterval, roundTo: this.selectedRoundTo ? this.selectedInterval : T }), this.name);
1966
- }
1967
- render() {
1968
- const e = [
1969
- { value: "duration", label: "Length of the booking" },
1970
- { value: "5", label: "5 mins" },
1971
- { value: "10", label: "10 mins" },
1972
- { value: "15", label: "15 mins" },
1973
- { value: "20", label: "20 mins" },
1974
- { value: "30", label: "30 mins" },
1975
- { value: "45", label: "45 mins" },
1976
- { value: "60", label: "60 mins" }
1977
- ];
1978
- return a(y, { key: "ebad4dc8f82dc565f4608c262d54f06495a69144" }, a("div", { key: "46641f5cd23afc527d14c57fa62fe2627d1a92f5", class: "nylas-timeslot-interval", part: "nti" }, a("div", { key: "729c8356b955ba357bd00f3cdf28c51bb42b741d", class: "header", part: "nti__header" }, a("h3", { key: "348543e170e107ea65c74a6154739627e7c4a271" }, "Time-slot interval preferences"), a("p", { key: "1cf34b79990edef1950d6c970932e5e0805e6d0a" }, "Choose your interval preference for time-slots.")), a("div", { key: "965fe8f8e235f9696bc237bc7774ca6fdea2cd42", class: "nylas-timeslot-interval__dropdown" }, a("span", { key: "6346e2f31c9322cc3264885f362ce2b29c4a4c2e", class: "label", part: "nti__input-label" }, "Select interval preference", a("tooltip-component", { key: "27901960cae97d4809153aac5d427c8c2ff7bf1e" }, a("info-icon", { key: "94c81d2c169da3714d2a1955da0fbe542b688fb6", slot: "tooltip-icon" }), a("span", { key: "6e8660e7696c16d81214d97e5e2087579f9fa1bd", slot: "tooltip-content" }, "Set the interval preference for the time-slots."))), a("select-dropdown", { key: "49b886894bb4d405ed13578809609511830389f1", name: "booking-calendar", options: e, withSearch: !1, exportparts: "sd_dropdown: nti__dropdown, sd_dropdown-button: nti__dropdown-button, sd_dropdown-content: nti__dropdown-content", defaultSelectedOption: this.defaultIntervalMinutes == this.eventDurationMinutes ? e[0] : e.find((t) => t.value == this.defaultIntervalMinutes.toString()) ?? e[0] }), a("span", { key: "40079758106c1e7075b247f81a3bc30e11eb1138", class: "label", part: "nti__input-label" }, "Select the type of time-slot rounding", a("tooltip-component", { key: "c1a1b86a732439b5474be36a1eb67d0a1fabe52c" }, a("info-icon", { key: "9e185781f8def48475c5f65cff916e5be6423b72", slot: "tooltip-icon" }), a("span", { key: "df108083daab268e8980194ebff8485c945aab1c", slot: "tooltip-content" }, "Select if you want to round the time slots to the nearest interval."))), a("radio-button-group", { key: "eb4c58b028ac0e2dd0468c30c1839558ae57178a", name: "interval-preference", defaultSelectedValue: this.defaultRoundTo && this.defaultRoundTo === this.defaultIntervalMinutes ? "rounding" : "no-rounding", options: [
1979
- { value: "no-rounding", label: "Default", description: "Time-slots will be rounded to the nearest quarter-hour." },
1980
- {
1981
- value: "rounding",
1982
- label: "Interval rounding",
1983
- description: "Time-slots will begin at times rounded to the interval value."
1984
- }
1985
- ] }))));
1986
- }
1987
- static get formAssociated() {
1988
- return !0;
1989
- }
1990
- get host() {
1991
- return h(this);
1992
- }
1993
- static get watchers() {
1994
- return {
1995
- name: ["elementNameChangedHandler"],
1996
- selectedConfiguration: ["selectedConfigurationChangedHandler"]
1997
- };
1998
- }
1999
- };
2000
- Rt([
2001
- m({
2002
- name: "nylas-timeslot-interval",
2003
- stateToProps: /* @__PURE__ */ new Map([["schedulerConfig.selectedConfiguration", "selectedConfiguration"]]),
2004
- fireRegisterEvent: !0
2005
- }),
2006
- G("design:type", Function),
2007
- G("design:paramtypes", []),
2008
- G("design:returntype", void 0)
2009
- ], ue.prototype, "render", null);
2010
- ue.style = At;
2011
- const Mt = ".sc-people-icon-h{display:flex}", zt = Mt, jt = class {
2012
- constructor(e) {
2013
- p(this, e), this.width = "20", this.height = "20";
2014
- }
2015
- render() {
2016
- return a("svg", { key: "4a54f616162baf613895348e27cafd2088f5fd16", xmlns: "http://www.w3.org/2000/svg", width: this.width, height: this.height, fill: "none", viewBox: "0 0 20 20" }, a("path", { key: "80e1ca7240235b635a08369ba836e727825b7be4", fill: "currentColor", d: "M11 10a2 2 0 0 1 2 2v1.5c0 2.054-2.088 3.5-5.5 3.5S2 15.554 2 13.5V12a2 2 0 0 1 2-2h7Zm0 1H4a1 1 0 0 0-1 1v1.5C3 14.907 4.579 16 7.5 16c2.921 0 4.5-1.093 4.5-2.5V12a1 1 0 0 0-1-1Zm5-1a2 2 0 0 1 2 2v.5c0 2.089-1.568 3.5-4.5 3.5-.141 0-.28-.003-.414-.01.208-.242.382-.502.522-.781l.097-.213h.039C15.976 14.931 17 13.96 17 12.5V12a1 1 0 0 0-1-1h-2.171a3 3 0 0 0-.594-1H16ZM7.5 2a3.5 3.5 0 1 1 0 7 3.5 3.5 0 0 1 0-7Zm7 2a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5Zm-7-1a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5Zm7 2a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Z" }));
2017
- }
2018
- };
2019
- jt.style = zt;
2020
- const Wt = ".radio-group{display:flex;flex-direction:column}.radio-group label{display:flex;font-family:var(--nylas-font-family);cursor:pointer}.radio-group label .radio-option{display:flex;align-items:flex-start;gap:0.5rem}.radio-group label .radio-option input[type=radio]{cursor:pointer}.radio-group label .radio-option input[type=radio i]{width:20px;height:20px;color:var(--nylas-primary);margin-top:16px}.radio-group label .radio-option p{display:flex;flex-direction:column;gap:0.5rem}.radio-group label .radio-option p .title{font-size:16px;font-weight:500;line-height:20px;color:var(--nylas-base-800)}.radio-group label .radio-option p .description{font-size:14px;font-weight:400;line-height:20px;color:var(--nylas-base-600)}", Bt = Wt, Zt = class {
2021
- constructor(e) {
2022
- p(this, e), this.radioSelectionChanged = u(this, "radioSelectionChanged", 7), this.name = "radio-group", this.options = [], this.defaultSelectedValue = "", this.selectedValue = this.defaultSelectedValue;
2023
- }
2024
- handleChange(e) {
2025
- this.selectedValue = e, this.radioSelectionChanged.emit({
2026
- value: e,
2027
- name: this.name
2028
- });
2029
- }
2030
- render() {
2031
- return a("div", { key: "82c0a38507193f6e941c820c38f9e5c477dc14dc", class: "radio-group" }, this.options.map((e) => a("label", null, a("div", { class: "radio-option" }, a("input", { type: "radio", name: this.name, value: e.value, checked: this.selectedValue === e.value, onChange: () => this.handleChange(e.value) }), a("p", null, a("span", { class: "title" }, e.label), a("span", { class: "description" }, e.description))))));
2032
- }
2033
- };
2034
- Zt.style = Bt;
2035
- const Ut = '.switch{--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;display:inline-block;height:34px;position:relative;width:60px}.switch input{display:none}.slider{background-color:var(--nylas-base-400);bottom:0;cursor:pointer;left:0;position:absolute;right:0;top:0;transition:0.4s}.slider:before{background-color:var(--nylas-base-0);bottom:4px;content:"";height:32px;left:4px;position:absolute;transition:0.4s;width:32px}input:checked+.slider{background-color:var(--nylas-success)}input:checked+.slider:before{transform:translateX(32px)}.slider.round{border-radius:35px;width:72px;height:40px}.slider.round:before{border-radius:50%}', Gt = Ut, Vt = class {
2036
- constructor(e) {
2037
- p(this, e), this.nylasFormSwitchToggled = u(this, "nylasFormSwitchToggled", 7), this.name = "toggle-switch", this.checked = !1, this.label = "", this.isChecked = this.checked;
2038
- }
2039
- componentWillLoad() {
2040
- this.isChecked = this.checked;
2041
- }
2042
- toggleCheck() {
2043
- this.isChecked = !this.isChecked, this.nylasFormSwitchToggled.emit({
2044
- checked: this.isChecked,
2045
- name: this.name,
2046
- label: this.label
2047
- });
2048
- }
2049
- render() {
2050
- return a("label", { key: "a0da5f3c6cac6310e9368ec4a5ed737decd04b5b", class: "switch", part: "ts_label" }, a("input", { key: "89e844d8135eadd471b960910794143ab1699afb", type: "checkbox", part: "ts_input", name: this.name, checked: this.isChecked, onChange: () => this.toggleCheck() }), a("div", { key: "19e8cea0befc42520c775555c8de96ac83d1612d", class: "slider round", part: "ts_slider" }));
2051
- }
2052
- };
2053
- Vt.style = Gt;
2054
- export {
2055
- _e as calendar_info_icon,
2056
- Ce as calendar_patterns_icon,
2057
- Ie as checkbox_component,
2058
- $e as flow_icon,
2059
- Ee as location_icon,
2060
- Pe as location_off_icon,
2061
- Re as multi_select_dropdown,
2062
- Y as nylas_additional_participants,
2063
- Q as nylas_availability_picker,
2064
- X as nylas_booking_calendar_picker,
2065
- ee as nylas_buffer_time,
2066
- te as nylas_calendar_picker,
2067
- ne as nylas_cancellation_policy,
2068
- ae as nylas_customize_booking_settings,
2069
- ie as nylas_event_description,
2070
- se as nylas_event_duration,
2071
- le as nylas_event_info,
2072
- oe as nylas_event_limits,
2073
- re as nylas_event_location,
2074
- de as nylas_event_title,
2075
- ce as nylas_limit_future_bookings,
2076
- pe as nylas_min_booking_notice,
2077
- fe as nylas_min_cancellation_notice,
2078
- be as nylas_participants_custom_availability,
2079
- ue as nylas_timeslot_interval,
2080
- jt as people_icon,
2081
- Zt as radio_button_group,
2082
- Vt as toggle_switch
2083
- };