@nylas/react 1.1.0-canary.23 → 1.1.0-canary.25

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 (155) hide show
  1. package/README.md +110 -2
  2. package/dist/add-circle-icon_2.entry-7165bd0e.js +25 -0
  3. package/dist/add-circle-icon_2.entry-f1ddca18.cjs +1 -0
  4. package/dist/{archive-icon_7.entry-3dcc4a66.js → archive-icon_7.entry-7411c224.js} +18 -18
  5. package/dist/{archive-icon_7.entry-2ec9b077.cjs → archive-icon_7.entry-e3df60ed.cjs} +1 -1
  6. package/dist/{arrow-icon.entry-175e8181.cjs → arrow-icon.entry-280e18b0.cjs} +1 -1
  7. package/dist/arrow-icon.entry-38949317.js +15 -0
  8. package/dist/{bold-icon_3.entry-9fc74a39.js → bold-icon_3.entry-5963945c.js} +4 -4
  9. package/dist/{bold-icon_3.entry-a3e61ad8.cjs → bold-icon_3.entry-5dffbedd.cjs} +1 -1
  10. package/dist/button-component_2.entry-237733b4.js +26 -0
  11. package/dist/button-component_2.entry-b29d2873.cjs +1 -0
  12. package/dist/{calendar-agenda-fill-icon_39.entry-493e91f6.js → calendar-agenda-fill-icon_48.entry-9afba869.js} +1982 -1420
  13. package/dist/calendar-agenda-fill-icon_48.entry-d3830dbb.cjs +7 -0
  14. package/dist/{calendar-cancel-icon.entry-c9c7e3b3.cjs → calendar-cancel-icon.entry-77ccf227.cjs} +1 -1
  15. package/dist/{calendar-cancel-icon.entry-3ca731f9.js → calendar-cancel-icon.entry-780723a6.js} +5 -5
  16. package/dist/{calendar-check-icon_2.entry-7c409a91.js → calendar-check-icon_2.entry-2c89c230.js} +5 -5
  17. package/dist/{calendar-check-icon_2.entry-5b8f8a75.cjs → calendar-check-icon_2.entry-b37ac7f0.cjs} +1 -1
  18. package/dist/{calendar-icon.entry-0589697f.js → calendar-icon.entry-02dd3990.js} +5 -5
  19. package/dist/{calendar-icon.entry-acd00f6f.cjs → calendar-icon.entry-ffc93569.cjs} +1 -1
  20. package/dist/{checkbox-component_2.entry-0aa252b9.cjs → checkbox-component_2.entry-00b6a1e9.cjs} +1 -1
  21. package/dist/{checkbox-component_2.entry-538fd8ec.js → checkbox-component_2.entry-ee9d0e6c.js} +3 -3
  22. package/dist/{chevron-icon_3.entry-7076e105.cjs → chevron-icon_3.entry-468abc26.cjs} +1 -1
  23. package/dist/{chevron-icon_3.entry-80e03257.js → chevron-icon_3.entry-f62e9ef1.js} +8 -8
  24. package/dist/{clock-icon_4.entry-db3fbda1.js → clock-icon_4.entry-766a1b23.js} +17 -17
  25. package/dist/{clock-icon_4.entry-d6901afd.cjs → clock-icon_4.entry-7dc2cc4a.cjs} +1 -1
  26. package/dist/{constants-12bd3c98-26c75011.js → constants-50c3e067-8a40a5fe.js} +618 -605
  27. package/dist/{constants-12bd3c98-22fd56f2.cjs → constants-50c3e067-9f2a6372.cjs} +5 -5
  28. package/dist/copy-icon.entry-2a841508.js +15 -0
  29. package/dist/copy-icon.entry-e5251410.cjs +1 -0
  30. package/dist/delete-icon_2.entry-1a5c39dc.cjs +1 -0
  31. package/dist/delete-icon_2.entry-64555a2f.js +25 -0
  32. package/dist/document-refresh-icon.entry-4bf6398b.js +15 -0
  33. package/dist/document-refresh-icon.entry-fdc7ddda.cjs +1 -0
  34. package/dist/elements/index.d.ts +9 -1
  35. package/dist/{elements-dc5b338e-e07600d4.js → elements-dc5b338e-2da1fe61.js} +1 -1
  36. package/dist/{elements-dc5b338e-211879a3.cjs → elements-dc5b338e-c8016c3d.cjs} +1 -1
  37. package/dist/{focus-visible-e8093c16-cb97634f.cjs → focus-visible-e8093c16-0a38a184.cjs} +1 -1
  38. package/dist/{focus-visible-e8093c16-284cefe0.js → focus-visible-e8093c16-9d0c98c0.js} +1 -1
  39. package/dist/{forward-icon_6.entry-554b0722.js → forward-icon_6.entry-390ef70a.js} +9 -9
  40. package/dist/{forward-icon_6.entry-751fdd4e.cjs → forward-icon_6.entry-7238ef38.cjs} +3 -3
  41. package/dist/{globe-icon.entry-63eb510d.cjs → globe-icon.entry-81f42f89.cjs} +1 -1
  42. package/dist/{globe-icon.entry-e3dd58bc.js → globe-icon.entry-8d106260.js} +5 -5
  43. package/dist/google-logo-icon_4.entry-aabd3886.js +680 -0
  44. package/dist/google-logo-icon_4.entry-fa2b8999.cjs +1 -0
  45. package/dist/index-53420959-5fc8ad2b.js +5 -0
  46. package/dist/index-53420959-fcf45780.cjs +1 -0
  47. package/dist/index-5ccfd9df.js +7859 -0
  48. package/dist/{index-6d9eeb53-cc42c6f1.js → index-6d9eeb53-58c8980a.js} +2 -2
  49. package/dist/{index-6d9eeb53-81e5b798.cjs → index-6d9eeb53-b2a6d09f.cjs} +1 -1
  50. package/dist/index-eb33703c.cjs +42 -0
  51. package/dist/{index.es-5355a265-f8853ce4.js → index.es-c9454237-00ccd1e6.js} +1 -1
  52. package/dist/{index.es-5355a265-e701a627.cjs → index.es-c9454237-b64161d1.cjs} +1 -1
  53. package/dist/{info-icon_2.entry-9559cf3b.cjs → info-icon_2.entry-b2e11336.cjs} +1 -1
  54. package/dist/{info-icon_2.entry-3b349f01.js → info-icon_2.entry-bb8ed71c.js} +7 -7
  55. package/dist/input-component.entry-378b1ccc.cjs +1 -0
  56. package/dist/{add-circle-icon_3.entry-37a88ff3.js → input-component.entry-cb86170f.js} +19 -33
  57. package/dist/input-dropdown.entry-98954c93.cjs +1 -0
  58. package/dist/{input-dropdown.entry-9bc68630.js → input-dropdown.entry-a76c339e.js} +8 -6
  59. package/dist/{mailbox-store-31d55036-c8618c0b.cjs → mailbox-store-edc386fc-156b7236.cjs} +1 -1
  60. package/dist/{mailbox-store-31d55036-1106efe2.js → mailbox-store-edc386fc-8bc7558b.js} +2 -2
  61. package/dist/{multi-select-dropdown.entry-e5ed9285.cjs → multi-select-dropdown.entry-40b855e1.cjs} +1 -1
  62. package/dist/{multi-select-dropdown.entry-36074a81.js → multi-select-dropdown.entry-6b686695.js} +2 -2
  63. package/dist/nylas-booked-event-card_12.entry-9d693125.cjs +1 -0
  64. package/dist/nylas-booked-event-card_12.entry-e861bb16.js +1134 -0
  65. package/dist/{nylas-form-card.entry-6e45c873.js → nylas-form-card.entry-b158d789.js} +19 -19
  66. package/dist/{nylas-form-card.entry-03a31218.cjs → nylas-form-card.entry-ca4a8746.cjs} +1 -1
  67. package/dist/{nylas-if-state.entry-092f4e1a.js → nylas-if-state.entry-8e4d922c.js} +8 -8
  68. package/dist/{nylas-if-state.entry-61d7ebc5.cjs → nylas-if-state.entry-95fac42d.cjs} +1 -1
  69. package/dist/{nylas-list-folders.entry-ab9e1c2c.js → nylas-list-folders.entry-83c39684.js} +3 -3
  70. package/dist/{nylas-list-folders.entry-1abbb401.cjs → nylas-list-folders.entry-8a22e0c8.cjs} +1 -1
  71. package/dist/{nylas-list-threads.entry-dfc87aca.cjs → nylas-list-threads.entry-54c582af.cjs} +1 -1
  72. package/dist/{nylas-list-threads.entry-2faaa2bb.js → nylas-list-threads.entry-7ea370e1.js} +3 -3
  73. package/dist/{nylas-login.entry-243ae09e.js → nylas-login.entry-9115fd81.js} +3 -3
  74. package/dist/{nylas-login.entry-d1cac0a1.cjs → nylas-login.entry-fb627e40.cjs} +1 -1
  75. package/dist/{nylas-mailbox-pagination.entry-c27af71c.cjs → nylas-mailbox-pagination.entry-04626d27.cjs} +1 -1
  76. package/dist/{nylas-mailbox-pagination.entry-b8225a3e.js → nylas-mailbox-pagination.entry-3ff02cf9.js} +2 -2
  77. package/dist/{nylas-mailbox-toolbar-button.entry-b66d597d.cjs → nylas-mailbox-toolbar-button.entry-8d00c789.cjs} +1 -1
  78. package/dist/{nylas-mailbox-toolbar-button.entry-22347d22.js → nylas-mailbox-toolbar-button.entry-f752e925.js} +7 -7
  79. package/dist/{nylas-mailbox.entry-9e6e1b4d.js → nylas-mailbox.entry-99c27b6c.js} +4 -4
  80. package/dist/{nylas-mailbox.entry-cb80f58c.cjs → nylas-mailbox.entry-b3974f4e.cjs} +1 -1
  81. package/dist/{nylas-provider.entry-28c12448.cjs → nylas-provider.entry-a3ad02a5.cjs} +1 -1
  82. package/dist/{nylas-provider.entry-196dd5da.js → nylas-provider.entry-c206aa32.js} +39 -39
  83. package/dist/{nylas-reminder-emails.entry-b655d888.js → nylas-reminder-emails.entry-414ce6fe.js} +6 -6
  84. package/dist/nylas-reminder-emails.entry-59c07bfe.cjs +4 -0
  85. package/dist/{nylas-reminder-time_2.entry-9d8f7436.js → nylas-reminder-time_2.entry-197d83a0.js} +5 -5
  86. package/dist/{nylas-reminder-time_2.entry-0f3747fb.cjs → nylas-reminder-time_2.entry-d79dcd85.cjs} +1 -1
  87. package/dist/{nylas-scheduler-editor.entry-feb7a7db.js → nylas-scheduler-editor.entry-7f389982.js} +49 -31
  88. package/dist/{nylas-scheduler-editor.entry-504e8ed3.cjs → nylas-scheduler-editor.entry-f1c6964a.cjs} +2 -2
  89. package/dist/nylas-scheduling.entry-1a8bd6fc.cjs +1 -0
  90. package/dist/nylas-scheduling.entry-4fa5381d.js +345 -0
  91. package/dist/{nylas-threads-refresh.entry-91af9af3.js → nylas-threads-refresh.entry-20602e7b.js} +4 -4
  92. package/dist/{nylas-threads-refresh.entry-e637161b.cjs → nylas-threads-refresh.entry-56b53449.cjs} +1 -1
  93. package/dist/{nylas-threads-search.entry-5457dcec.js → nylas-threads-search.entry-8872473c.js} +8 -8
  94. package/dist/{nylas-threads-search.entry-b944f95a.cjs → nylas-threads-search.entry-8e0ec3ae.cjs} +1 -1
  95. package/dist/{nylas-time-window-picker.entry-a6fd216b.js → nylas-time-window-picker.entry-9ac542b7.js} +10 -10
  96. package/dist/{nylas-time-window-picker.entry-134ef726.cjs → nylas-time-window-picker.entry-ca47f721.cjs} +1 -1
  97. package/dist/{nylas-view-thread.entry-9296a505.cjs → nylas-view-thread.entry-1f758e43.cjs} +1 -1
  98. package/dist/{nylas-view-thread.entry-6fdd6cb1.js → nylas-view-thread.entry-dcd3d5be.js} +3 -3
  99. package/dist/{person-icon.entry-1cdb4dc2.cjs → person-icon.entry-63b28ace.cjs} +1 -1
  100. package/dist/{person-icon.entry-4a695727.js → person-icon.entry-93130c05.js} +2 -2
  101. package/dist/play-icon_2.entry-6a99c32d.js +25 -0
  102. package/dist/play-icon_2.entry-b67fb649.cjs +1 -0
  103. package/dist/react.cjs +1 -1
  104. package/dist/react.js +108 -100
  105. package/dist/{refresh-icon.entry-46c92605.js → refresh-icon.entry-84783c91.js} +4 -4
  106. package/dist/{refresh-icon.entry-9dbb04ba.cjs → refresh-icon.entry-b49792fc.cjs} +1 -1
  107. package/dist/{register-component-592986c5-5edf5835.cjs → register-component-887199a9-003f96c5.cjs} +1 -1
  108. package/dist/{register-component-592986c5-d5d210a8.js → register-component-887199a9-b41dfa7a.js} +1 -1
  109. package/dist/{scheduler-config-store-9ccfba4d-b08031b5.js → scheduler-config-store-2a3b403d-73610089.js} +5 -4
  110. package/dist/scheduler-config-store-2a3b403d-a5e3433a.cjs +1 -0
  111. package/dist/{scheduler-store-fd0d11a5-313e8592.js → scheduler-store-fe281404-bddb1b6a.js} +179 -132
  112. package/dist/scheduler-store-fe281404-c3e477f6.cjs +1 -0
  113. package/dist/textarea-component.entry-28c4bc05.cjs +1 -0
  114. package/dist/textarea-component.entry-40e959e5.js +36 -0
  115. package/dist/time-period-selector.entry-af71523a.cjs +1 -0
  116. package/dist/{time-period-selector.entry-112c0b64.js → time-period-selector.entry-da5d8652.js} +41 -41
  117. package/dist/{translate-icon.entry-a4df3c16.js → translate-icon.entry-92b83635.js} +4 -4
  118. package/dist/{translate-icon.entry-c701b391.cjs → translate-icon.entry-a2ed4f76.cjs} +1 -1
  119. package/dist/{warning-icon.entry-d1703715.js → warning-icon.entry-19f721c3.js} +5 -5
  120. package/dist/{warning-icon.entry-bda0aafa.cjs → warning-icon.entry-3ab9a59e.cjs} +1 -1
  121. package/package.json +3 -3
  122. package/dist/add-circle-icon_3.entry-4f8f1cbf.cjs +0 -1
  123. package/dist/arrow-icon.entry-2cf3e94d.js +0 -15
  124. package/dist/button-component.entry-7fdb3bca.cjs +0 -1
  125. package/dist/button-component.entry-861637f2.js +0 -16
  126. package/dist/calendar-agenda-fill-icon_39.entry-3c21a3ec.cjs +0 -7
  127. package/dist/checkmark-icon.entry-0a184b31.cjs +0 -1
  128. package/dist/checkmark-icon.entry-56302db0.js +0 -15
  129. package/dist/copy-icon_3.entry-33e89a37.cjs +0 -1
  130. package/dist/copy-icon_3.entry-9670b9f9.js +0 -35
  131. package/dist/document-refresh-icon.entry-149f2a3b.js +0 -15
  132. package/dist/document-refresh-icon.entry-a3326831.cjs +0 -1
  133. package/dist/google-logo-icon_5.entry-bccce7f4.cjs +0 -1
  134. package/dist/google-logo-icon_5.entry-e462e091.js +0 -748
  135. package/dist/index-53420959-02fe58ef.js +0 -5
  136. package/dist/index-53420959-0b9c205e.cjs +0 -1
  137. package/dist/index-8a536089.cjs +0 -42
  138. package/dist/index-a15916e5.js +0 -7653
  139. package/dist/input-dropdown.entry-d454f6bc.cjs +0 -1
  140. package/dist/loading-icon.entry-1d49e471.js +0 -15
  141. package/dist/loading-icon.entry-a68da48b.cjs +0 -1
  142. package/dist/nylas-booked-event-card_10.entry-38d2fd2e.js +0 -954
  143. package/dist/nylas-booked-event-card_10.entry-e530a8db.cjs +0 -1
  144. package/dist/nylas-booking-confirmation-type.entry-2fea82f9.js +0 -106
  145. package/dist/nylas-booking-confirmation-type.entry-5857a863.cjs +0 -1
  146. package/dist/nylas-reminder-emails.entry-47ef5a9d.cjs +0 -4
  147. package/dist/nylas-scheduling.entry-8c8f8e35.cjs +0 -1
  148. package/dist/nylas-scheduling.entry-d35efa9a.js +0 -286
  149. package/dist/play-icon_2.entry-10fd617e.cjs +0 -1
  150. package/dist/play-icon_2.entry-fb013b17.js +0 -25
  151. package/dist/scheduler-config-store-9ccfba4d-3ec35859.cjs +0 -1
  152. package/dist/scheduler-store-fd0d11a5-b180b3b7.cjs +0 -1
  153. package/dist/textarea-component.entry-0cd3b57f.js +0 -36
  154. package/dist/textarea-component.entry-788eb37a.cjs +0 -1
  155. package/dist/time-period-selector.entry-1e0b720b.cjs +0 -1
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-8a536089.cjs");require("react");require("react-dom");const i=".sc-checkmark-icon-h{display:flex}",s=i,t=class{constructor(c){e.registerInstance(this,c),this.width="18",this.height="14"}render(){return e.h("svg",{key:"9291f18f1fe2313240356f7aa0ea21bd98a464dc",width:this.width,height:this.height,viewBox:"0 0 18 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"0f9dc73afb3c3a642c47b27db83397289917ce3c",d:"M1.53033 7.46967C1.23744 7.17678 0.762563 7.17678 0.46967 7.46967C0.176777 7.76256 0.176777 8.23744 0.46967 8.53033L4.96967 13.0303C5.26256 13.3232 5.73744 13.3232 6.03033 13.0303L17.0303 2.03033C17.3232 1.73744 17.3232 1.26256 17.0303 0.96967C16.7374 0.676777 16.2626 0.676777 15.9697 0.96967L5.5 11.4393L1.53033 7.46967Z",fill:"#293056"}))}};t.style=s;exports.checkmark_icon=t;
@@ -1,15 +0,0 @@
1
- import { r as e, h as t } from "./index-a15916e5.js";
2
- import "react";
3
- import "react-dom";
4
- const s = ".sc-checkmark-icon-h{display:flex}", h = s, i = class {
5
- constructor(c) {
6
- e(this, c), this.width = "18", this.height = "14";
7
- }
8
- render() {
9
- return t("svg", { key: "9291f18f1fe2313240356f7aa0ea21bd98a464dc", width: this.width, height: this.height, viewBox: "0 0 18 14", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "0f9dc73afb3c3a642c47b27db83397289917ce3c", d: "M1.53033 7.46967C1.23744 7.17678 0.762563 7.17678 0.46967 7.46967C0.176777 7.76256 0.176777 8.23744 0.46967 8.53033L4.96967 13.0303C5.26256 13.3232 5.73744 13.3232 6.03033 13.0303L17.0303 2.03033C17.3232 1.73744 17.3232 1.26256 17.0303 0.96967C16.7374 0.676777 16.2626 0.676777 15.9697 0.96967L5.5 11.4393L1.53033 7.46967Z", fill: "#293056" }));
10
- }
11
- };
12
- i.style = h;
13
- export {
14
- i as checkmark_icon
15
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-8a536089.cjs");require("react");require("react-dom");const h=".sc-copy-icon-h{display:flex}",n=h,s=class{constructor(t){e.registerInstance(this,t),this.width="16",this.height="16"}render(){return e.h("svg",{key:"a188ab4dfd0fb7806507293f06e20323aaf85c74",width:this.width,height:this.height,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"0cd61836b0a5317a83f5fabdc90b3d10effaf93c",d:"M4 0.75C2.89543 0.75 2 1.64543 2 2.75V12.75C2 13.8546 2.89543 14.75 4 14.75H10C11.1046 14.75 12 13.8546 12 12.75V2.75C12 1.64543 11.1046 0.75 10 0.75H4ZM3 2.75C3 2.19772 3.44772 1.75 4 1.75H10C10.5523 1.75 11 2.19772 11 2.75V12.75C11 13.3023 10.5523 13.75 10 13.75H4C3.44772 13.75 3 13.3023 3 12.75V2.75ZM0 4.75001C0 4.00973 0.402199 3.36339 1 3.01758V13.25C1 14.6307 2.11929 15.75 3.5 15.75H9.73244C9.38663 16.3478 8.74028 16.75 8 16.75H3.5C1.567 16.75 0 15.183 0 13.25V4.75001Z",fill:"currentColor"}))}};s.style=n;const C=".sc-delete-icon-h{display:flex}",o=C,c=class{constructor(t){e.registerInstance(this,t),this.width="15",this.height="17"}render(){return e.h("svg",{key:"62c86abc3d9ae6b9b98d4db70b5066860b82d5d9",width:this.width,height:this.height,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"ecb04ee569a53f32b970118c16f0be12c8b22670",d:"M9.5 2.75C9.5 1.92157 8.82843 1.25 8 1.25C7.17157 1.25 6.5 1.92157 6.5 2.75H5.5C5.5 1.36929 6.61929 0.25 8 0.25C9.38071 0.25 10.5 1.36929 10.5 2.75H15C15.2761 2.75 15.5 2.97386 15.5 3.25C15.5 3.52614 15.2761 3.75 15 3.75H14.446L13.1499 14.9792C13.0335 15.9884 12.179 16.75 11.1631 16.75H4.83688C3.821 16.75 2.9665 15.9884 2.85006 14.9792L1.553 3.75H1C0.75454 3.75 0.550392 3.57312 0.508056 3.33988L0.5 3.25C0.5 2.97386 0.723858 2.75 1 2.75H9.5ZM13.438 3.75H2.561L3.84347 14.8646C3.90169 15.3692 4.32894 15.75 4.83688 15.75H11.1631C11.6711 15.75 12.0983 15.3692 12.1565 14.8646L13.438 3.75ZM6.5 6.25C6.74546 6.25 6.94961 6.40477 6.99194 6.60886L7 6.6875V12.8125C7 13.0541 6.77614 13.25 6.5 13.25C6.25454 13.25 6.05039 13.0952 6.00806 12.8911L6 12.8125V6.6875C6 6.44588 6.22386 6.25 6.5 6.25ZM9.5 6.25C9.74546 6.25 9.94961 6.40477 9.99194 6.60886L10 6.6875V12.8125C10 13.0541 9.77614 13.25 9.5 13.25C9.25454 13.25 9.05039 13.0952 9.00806 12.8911L9 12.8125V6.6875C9 6.44588 9.22386 6.25 9.5 6.25Z",fill:"currentColor"}))}};c.style=o;const r=".sc-eye-icon-h{display:flex}",l=r,i=class{constructor(t){e.registerInstance(this,t),this.width="16",this.height="16"}render(){return e.h("svg",{key:"17b03fcceb464451087d76eddb903abe217c541e",width:this.width,height:this.height,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"39afeac67d9019408d4bf42141b09bbc5093122b",d:"M1.25909 7.35214C1.94254 4.07689 4.79437 1.75 8.00002 1.75C11.2057 1.75 14.0574 4.07688 14.7409 7.35215C14.7974 7.62246 15.0622 7.79587 15.3325 7.73946C15.6029 7.68304 15.7763 7.41817 15.7199 7.14785C14.9425 3.42312 11.6934 0.75 8.00002 0.75C4.3066 0.75 1.05742 3.42311 0.280175 7.14786C0.223767 7.41818 0.397177 7.68305 0.667497 7.73946C0.937817 7.79587 1.20268 7.62246 1.25909 7.35214ZM7.98953 3.75C9.92253 3.75 11.4895 5.317 11.4895 7.25C11.4895 9.18299 9.92253 10.75 7.98953 10.75C6.05653 10.75 4.48953 9.18299 4.48953 7.25C4.48953 5.317 6.05653 3.75 7.98953 3.75Z",fill:"currentColor"}))}};i.style=l;exports.copy_icon=s;exports.delete_icon=c;exports.eye_icon=i;
@@ -1,35 +0,0 @@
1
- import { r as s, h as t } from "./index-a15916e5.js";
2
- import "react";
3
- import "react-dom";
4
- const c = ".sc-copy-icon-h{display:flex}", i = c, h = class {
5
- constructor(e) {
6
- s(this, e), this.width = "16", this.height = "16";
7
- }
8
- render() {
9
- return t("svg", { key: "a188ab4dfd0fb7806507293f06e20323aaf85c74", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "0cd61836b0a5317a83f5fabdc90b3d10effaf93c", d: "M4 0.75C2.89543 0.75 2 1.64543 2 2.75V12.75C2 13.8546 2.89543 14.75 4 14.75H10C11.1046 14.75 12 13.8546 12 12.75V2.75C12 1.64543 11.1046 0.75 10 0.75H4ZM3 2.75C3 2.19772 3.44772 1.75 4 1.75H10C10.5523 1.75 11 2.19772 11 2.75V12.75C11 13.3023 10.5523 13.75 10 13.75H4C3.44772 13.75 3 13.3023 3 12.75V2.75ZM0 4.75001C0 4.00973 0.402199 3.36339 1 3.01758V13.25C1 14.6307 2.11929 15.75 3.5 15.75H9.73244C9.38663 16.3478 8.74028 16.75 8 16.75H3.5C1.567 16.75 0 15.183 0 13.25V4.75001Z", fill: "currentColor" }));
10
- }
11
- };
12
- h.style = i;
13
- const C = ".sc-delete-icon-h{display:flex}", o = C, n = class {
14
- constructor(e) {
15
- s(this, e), this.width = "15", this.height = "17";
16
- }
17
- render() {
18
- return t("svg", { key: "62c86abc3d9ae6b9b98d4db70b5066860b82d5d9", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "ecb04ee569a53f32b970118c16f0be12c8b22670", d: "M9.5 2.75C9.5 1.92157 8.82843 1.25 8 1.25C7.17157 1.25 6.5 1.92157 6.5 2.75H5.5C5.5 1.36929 6.61929 0.25 8 0.25C9.38071 0.25 10.5 1.36929 10.5 2.75H15C15.2761 2.75 15.5 2.97386 15.5 3.25C15.5 3.52614 15.2761 3.75 15 3.75H14.446L13.1499 14.9792C13.0335 15.9884 12.179 16.75 11.1631 16.75H4.83688C3.821 16.75 2.9665 15.9884 2.85006 14.9792L1.553 3.75H1C0.75454 3.75 0.550392 3.57312 0.508056 3.33988L0.5 3.25C0.5 2.97386 0.723858 2.75 1 2.75H9.5ZM13.438 3.75H2.561L3.84347 14.8646C3.90169 15.3692 4.32894 15.75 4.83688 15.75H11.1631C11.6711 15.75 12.0983 15.3692 12.1565 14.8646L13.438 3.75ZM6.5 6.25C6.74546 6.25 6.94961 6.40477 6.99194 6.60886L7 6.6875V12.8125C7 13.0541 6.77614 13.25 6.5 13.25C6.25454 13.25 6.05039 13.0952 6.00806 12.8911L6 12.8125V6.6875C6 6.44588 6.22386 6.25 6.5 6.25ZM9.5 6.25C9.74546 6.25 9.94961 6.40477 9.99194 6.60886L10 6.6875V12.8125C10 13.0541 9.77614 13.25 9.5 13.25C9.25454 13.25 9.05039 13.0952 9.00806 12.8911L9 12.8125V6.6875C9 6.44588 9.22386 6.25 9.5 6.25Z", fill: "currentColor" }));
19
- }
20
- };
21
- n.style = o;
22
- const r = ".sc-eye-icon-h{display:flex}", l = r, d = class {
23
- constructor(e) {
24
- s(this, e), this.width = "16", this.height = "16";
25
- }
26
- render() {
27
- return t("svg", { key: "17b03fcceb464451087d76eddb903abe217c541e", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "39afeac67d9019408d4bf42141b09bbc5093122b", d: "M1.25909 7.35214C1.94254 4.07689 4.79437 1.75 8.00002 1.75C11.2057 1.75 14.0574 4.07688 14.7409 7.35215C14.7974 7.62246 15.0622 7.79587 15.3325 7.73946C15.6029 7.68304 15.7763 7.41817 15.7199 7.14785C14.9425 3.42312 11.6934 0.75 8.00002 0.75C4.3066 0.75 1.05742 3.42311 0.280175 7.14786C0.223767 7.41818 0.397177 7.68305 0.667497 7.73946C0.937817 7.79587 1.20268 7.62246 1.25909 7.35214ZM7.98953 3.75C9.92253 3.75 11.4895 5.317 11.4895 7.25C11.4895 9.18299 9.92253 10.75 7.98953 10.75C6.05653 10.75 4.48953 9.18299 4.48953 7.25C4.48953 5.317 6.05653 3.75 7.98953 3.75Z", fill: "currentColor" }));
28
- }
29
- };
30
- d.style = l;
31
- export {
32
- h as copy_icon,
33
- n as delete_icon,
34
- d as eye_icon
35
- };
@@ -1,15 +0,0 @@
1
- import { r as t, h as e } from "./index-a15916e5.js";
2
- import "react";
3
- import "react-dom";
4
- const c = ".sc-document-refresh-icon-h{display:flex}", s = c, h = class {
5
- constructor(a) {
6
- t(this, a), this.width = "18", this.height = "18";
7
- }
8
- render() {
9
- return e("svg", { key: "6abbae134b46b6e50a2cb24282b52a6ba408ba1f", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 18 18", width: this.width, height: this.height }, e("rect", { key: "64df5047db1d39380bf97e8744efc3f3c0f5a1b7", id: "Canvas", fill: "#ff13dc", opacity: "0" }), e("path", { key: "cb01c8315961830b97a39031b94f56ab9371ad5c", d: "M9.19763,12.26283A4.44131,4.44131,0,0,1,16.948,10.71741l.62524-.62524a.24433.24433,0,0,1,.1748-.07373.25035.25035,0,0,1,.252.24875v2.50143a.25.25,0,0,1-.25.25l-2.4995-.00016A.25088.25088,0,0,1,15,12.76721v-.00054a.24436.24436,0,0,1,.07373-.175l.86988-.86987a3.02827,3.02827,0,0,0-5.29847.71808.48835.48835,0,0,1-.46081.30981H9.55908a.37949.37949,0,0,1-.36145-.48686Z" }), e("path", { key: "8d7c5608d3adf066d4487f3a6e41937b32edc35c", d: "M17.80237,14.77441A4.4413,4.4413,0,0,1,10.052,16.31982l-.62524.62524a.24429.24429,0,0,1-.1748.07373A.25036.25036,0,0,1,9,16.77V14.26863a.25.25,0,0,1,.25-.25l2.4995.00016A.25087.25087,0,0,1,12,14.27v.00052a.24434.24434,0,0,1-.07373.175l-.86988.86988a3.02828,3.02828,0,0,0,5.29847-.71808.48836.48836,0,0,1,.46081-.30982h.62525a.3795.3795,0,0,1,.36145.48687Z" }), e("path", { key: "3567306a935ef0e19c25534e2688dfae08bda770", d: "M7,13.5A6.5,6.5,0,0,1,13.5,7c.16883,0,.33447.01264.5.02527V5H9.5A.5.5,0,0,1,9,4.5V0H2.5A.5.5,0,0,0,2,.5v15a.5.5,0,0,0,.5.5H7.49981A6.4779,6.4779,0,0,1,7,13.5Z" }), e("path", { key: "5e99392793c239585ee01d5b308ec647772857da", d: "M10,0h.043a.5.5,0,0,1,.353.146L13.854,3.6A.5.5,0,0,1,14,3.957V4H10Z" }));
10
- }
11
- };
12
- h.style = s;
13
- export {
14
- h as document_refresh_icon
15
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-8a536089.cjs");require("react");require("react-dom");const c=".sc-document-refresh-icon-h{display:flex}",h=c,a=class{constructor(t){e.registerInstance(this,t),this.width="18",this.height="18"}render(){return e.h("svg",{key:"6abbae134b46b6e50a2cb24282b52a6ba408ba1f",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18",width:this.width,height:this.height},e.h("rect",{key:"64df5047db1d39380bf97e8744efc3f3c0f5a1b7",id:"Canvas",fill:"#ff13dc",opacity:"0"}),e.h("path",{key:"cb01c8315961830b97a39031b94f56ab9371ad5c",d:"M9.19763,12.26283A4.44131,4.44131,0,0,1,16.948,10.71741l.62524-.62524a.24433.24433,0,0,1,.1748-.07373.25035.25035,0,0,1,.252.24875v2.50143a.25.25,0,0,1-.25.25l-2.4995-.00016A.25088.25088,0,0,1,15,12.76721v-.00054a.24436.24436,0,0,1,.07373-.175l.86988-.86987a3.02827,3.02827,0,0,0-5.29847.71808.48835.48835,0,0,1-.46081.30981H9.55908a.37949.37949,0,0,1-.36145-.48686Z"}),e.h("path",{key:"8d7c5608d3adf066d4487f3a6e41937b32edc35c",d:"M17.80237,14.77441A4.4413,4.4413,0,0,1,10.052,16.31982l-.62524.62524a.24429.24429,0,0,1-.1748.07373A.25036.25036,0,0,1,9,16.77V14.26863a.25.25,0,0,1,.25-.25l2.4995.00016A.25087.25087,0,0,1,12,14.27v.00052a.24434.24434,0,0,1-.07373.175l-.86988.86988a3.02828,3.02828,0,0,0,5.29847-.71808.48836.48836,0,0,1,.46081-.30982h.62525a.3795.3795,0,0,1,.36145.48687Z"}),e.h("path",{key:"3567306a935ef0e19c25534e2688dfae08bda770",d:"M7,13.5A6.5,6.5,0,0,1,13.5,7c.16883,0,.33447.01264.5.02527V5H9.5A.5.5,0,0,1,9,4.5V0H2.5A.5.5,0,0,0,2,.5v15a.5.5,0,0,0,.5.5H7.49981A6.4779,6.4779,0,0,1,7,13.5Z"}),e.h("path",{key:"5e99392793c239585ee01d5b308ec647772857da",d:"M10,0h.043a.5.5,0,0,1,.353.146L13.854,3.6A.5.5,0,0,1,14,3.957V4H10Z"}))}};a.style=h;exports.document_refresh_icon=a;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-8a536089.cjs"),Z=require("./register-component-592986c5-5edf5835.cjs"),xe=require("./constants-12bd3c98-22fd56f2.cjs");require("react");require("react-dom");const Fe=".sc-google-logo-icon-h{display:flex}",Le=Fe,Se=class{constructor(e){t.registerInstance(this,e),this.width="24",this.height="24"}render(){return t.h("svg",{key:"1d8c7ecd21b0ed36e49e1054f58d3ca7fed9a349",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.h("g",{key:"40cbdd9176ef43ba0612b091b18a085681fc64a9","clip-path":"url(#clip0_959_12452)"},t.h("path",{key:"a2dd6514041e159035e79a3a07920dec65bf33b5",d:"M23.745 12.27C23.745 11.48 23.675 10.73 23.555 10H12.255V14.51H18.725C18.435 15.99 17.585 17.24 16.325 18.09V21.09H20.185C22.445 19 23.745 15.92 23.745 12.27Z",fill:"#4285F4"}),t.h("path",{key:"4a5413075eee0849afb689ae7d13b64ea08523d1",d:"M12.255 24C15.495 24 18.205 22.92 20.185 21.09L16.325 18.09C15.245 18.81 13.875 19.25 12.255 19.25C9.12504 19.25 6.47505 17.14 5.52505 14.29H1.54504V17.38C3.51504 21.3 7.56504 24 12.255 24Z",fill:"#34A853"}),t.h("path",{key:"c944b7612fdc201c7199095911dd077a8a401d85",d:"M5.52501 14.2901C5.27501 13.5701 5.145 12.8001 5.145 12.0001C5.145 11.2001 5.28501 10.4301 5.52501 9.71012V6.62012H1.545C0.725004 8.24012 0.255005 10.0601 0.255005 12.0001C0.255005 13.9401 0.725004 15.7601 1.545 17.3801L5.52501 14.2901Z",fill:"#FBBC05"}),t.h("path",{key:"46ed9d774d7dcb2694bb44226f9b136bfd38ff74",d:"M12.255 4.75C14.025 4.75 15.605 5.36 16.855 6.55L20.275 3.13C18.205 1.19 15.495 0 12.255 0C7.56504 0 3.51504 2.7 1.54504 6.62L5.52505 9.71C6.47505 6.86 9.12504 4.75 12.255 4.75Z",fill:"#EA4335"})),t.h("defs",{key:"4d531967607e72490963d525edc750d3a11ba468"},t.h("clipPath",{key:"f9935de12e3add4b525d1e19878852df6fae82f9",id:"clip0_959_12452"},t.h("rect",{key:"5a609aab9388969074380dd660e5f6736e322be7",width:24,height:24,fill:"white"}))))}};Se.style=Le;const Ee=".sc-microsoft-logo-icon-h{display:flex}",Oe=Ee,Te=class{constructor(e){t.registerInstance(this,e),this.width="22",this.height="22"}render(){return t.h("svg",{key:"485f75133b08cb6657f14baf540721c4f22c1c6c",width:this.width,height:this.height,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.h("path",{key:"3a0292b4518ace2c62fb8d27de67df3a31386124",d:"M0.043457 0.043457H10.4782V10.4782H0.043457V0.043457Z",fill:"#F35325"}),t.h("path",{key:"cd9f1cca76e2ce12ebfb79ca575996da7f87400c",d:"M11.5217 0.043457H21.9565V10.4782H11.5217V0.043457Z",fill:"#81BC06"}),t.h("path",{key:"ad7a106422f8a774cc3e1c3b290d32e7e9e690b5",d:"M0.043457 11.5217H10.4782V21.9565H0.043457V11.5217Z",fill:"#05A6F0"}),t.h("path",{key:"f7f84eac1bedf74460b744d3d2ce57dcc1943e06",d:"M11.5217 11.5217H21.9565V21.9565H11.5217V11.5217Z",fill:"#FFBA08"}))}};Te.style=Oe;const He=':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-type{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-type .header{padding:1rem;border-bottom:1px solid var(--nylas-base-200)}.nylas-booking-type .header h3{margin:0;font-size:1rem;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-booking-type .nylas-booking-type__dropdown{padding:1rem;display:flex;flex-direction:column;gap:4px}.nylas-booking-type .nylas-booking-type__dropdown span.nylas-booking-type__dropdown-label{display:flex;align-items:center;gap:4px;color:var(--nylas-base-800);margin:0.25rem 0 0 0;font-size:14px;font-weight:400;line-height:20px;text-align:left}.nylas-booking-type .nylas-booking-type__dropdown span.nylas-booking-type__dropdown-label tooltip-component{display:flex}.nylas-booking-type .nylas-booking-type__dropdown select-dropdown::part(sd_dropdown){width:100%}.nylas-booking-type .nylas-booking-type__dropdown select-dropdown::part(sd_dropdown-content){width:100%;max-width:unset}.nylas-booking-type .nylas-booking-type__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-type .nylas-booking-type__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}',Pe=He;var De=function(e,n,i,o){var r=arguments.length,a=r<3?n:o===null?o=Object.getOwnPropertyDescriptor(n,i):o,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,n,i,o);else for(var s=e.length-1;s>=0;s--)(l=e[s])&&(a=(r<3?l(a):r>3?l(n,i,a):l(n,i))||a);return r>3&&a&&Object.defineProperty(n,i,a),a},$=function(e,n){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,n)};const J=class{constructor(e){t.registerInstance(this,e),this.valueChanged=t.createEvent(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="availability-method",this.selectedConfiguration=void 0,this.participantOptions=void 0,this.selectedBookingType=""}connectedCallback(){t.debug("nylas-booking-type","connectedCallback")}disconnectedCallback(){t.debug("nylas-booking-type","disconnectedCallback")}componentWillLoad(){t.debug("nylas-booking-type","componentWillLoad"),this.host.setAttribute("name",this.name)}componentDidLoad(){var n,i,o,r;t.debug("nylas-booking-type","componentDidLoad");const e=(r=(o=(i=(n=this.selectedConfiguration)==null?void 0:n.availability)==null?void 0:i.availability_rules)==null?void 0:o.availability_method)==null?void 0:r.toString();e&&typeof this.internals.setFormValue=="function"&&this.internals.setFormValue(e,"booking-calendar"),this.selectedBookingType=e||"collective",this.valueChanged.emit({value:this.selectedBookingType,name:this.name})}componentWillUpdate(){t.debug("nylas-booking-type","componentWillUpdate")}componentDidUpdate(){t.debug("nylas-booking-type","componentDidUpdate")}componentWillRender(){t.debug("nylas-booking-type","componentWillRender")}componentDidRender(){t.debug("nylas-booking-type","componentDidRender")}elementNameChangedHandler(e){t.debug("nylas-booking-type","elementNameChangedHandler",e),this.host.setAttribute("name",e)}nylasFormDropdownChangedHandler(e){t.debug("nylas-booking-type","nylasFormDropdownChangedHandler",e.detail);const n=i=>{const{value:o}=i.detail;o&&(this.selectedBookingType=o,this.internals.setFormValue(o,this.name))};this.valueChanged.emit({value:e.detail.value,name:this.name,valueChanged:n})}render(){var o,r,a,l,s;const e=[{label:"Standard booking",value:"collective"},{label:"Round-robin maximize fairness",value:"max-fairness"},{label:"Round-robin maximize availability",value:"max-availability"}],n=(l=(a=(r=(o=this.selectedConfiguration)==null?void 0:o.availability)==null?void 0:r.availability_rules)==null?void 0:a.availability_method)==null?void 0:l.toString(),i=this.participantOptions&&((s=this.participantOptions)==null?void 0:s.length)>0&&!!this.participantOptions[0].email&&!!this.participantOptions[0].name&&!!this.participantOptions[0].calendars&&this.participantOptions[0].calendars.length>0;return n||!i?null:t.h(t.Host,null,t.h("div",{class:"nylas-booking-type",part:"nbcp"},t.h("div",{class:"header",part:"nbcp__header"},t.h("h3",null,"Booking type")),t.h("div",{class:"nylas-booking-type__dropdown"},t.h("span",{class:"nylas-booking-type__dropdown-label"},"Choose what type of booking is used for this scheduler page.",t.h("tooltip-component",null,t.h("info-icon",{slot:"tooltip-icon"}),t.h("span",{slot:"tooltip-content"},t.h("strong",null,"Standard Booking"),t.h("br",null),"- Allows for 1:1 bookings, or n:1 bookings with additional or collective participants.",t.h("br",null),t.h("br",null),t.h("strong",null,"Round-Robin Maximize Fairness"),t.h("br",null),"- Rotates through the list of participants you select, displaying the participant with the least bookings.",t.h("br",null),t.h("br",null),t.h("strong",null,"Round-Robin Maximize Availability"),t.h("br",null),"- Rotates through the list of participants you select, prioritizing participants with the least bookings, but filling up as many time-slots as possible.",t.h("br",null)))),t.h("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(h=>h.value==n)??e[0]}))))}static get formAssociated(){return!0}get host(){return t.getElement(this)}static get watchers(){return{name:["elementNameChangedHandler"]}}};De([Z.RegisterComponent({name:"nylas-booking-type",stateToProps:new Map([["schedulerConfig.selectedConfiguration","selectedConfiguration"],["schedulerConfig.additionalParticipants","participantOptions"]]),eventToProps:{valueChanged:async(e,n)=>{const{valueChanged:i}=e.detail;i&&i(e)}},fireRegisterEvent:!0}),$("design:type",Function),$("design:paramtypes",[]),$("design:returntype",void 0)],J.prototype,"render",null);J.style=Pe;function Be({id:e,formState:n,activeTab:i,calendars:o,currentUser:r}){var a,l;switch(i){case"eventInfo":const s=n.title,h=n.description,m=parseInt(n.duration),w=n.location,C=n.conferencing;return t.h("div",{key:e},t.h("nylas-event-info",null,t.h("div",{slot:"inputs"},t.h("nylas-event-title",{name:"title",eventTitle:s,exportparts:"net, net__title, net__dropdown-content"}),t.h("nylas-event-duration",{name:"duration",eventDurationMinutes:m,exportparts:"ned, ned__dropdown, ned__dropdown-button, ned__dropdown-content, ned__input_dropdown, ned__input_dropdown-input, ned__input_dropdown-content"}),t.h("nylas-event-location",{name:"location",eventLocation:w,eventConferencing:C,userProvider:r.provider,exportparts:"nel, nel__location, nel__dropdown, nel__dropdown-button, nel__dropdown-content"}),t.h("nylas-event-description",{name:"description",eventDescription:h,exportparts:"nedesc, nedesc__textarea"}))));case"availability":const x=n.availability.openHours,S=n.availability.timezone?n.availability.timezone:Intl.DateTimeFormat().resolvedOptions().timeZone;return t.h("div",{key:e},t.h("nylas-participant-booking-calendars",{name:"participant-booking-calendars",participants:n.participants,calendars:o}),t.h("nylas-connected-calendars",{name:"connected-calendars",participants:n.participants}),t.h("nylas-availability-picker",{name:"availability",openHours:x,defaultTimezone:S,exportparts:"nap__header, nap__select-timezone, nap__select-timezone-button, nap__select-timezone-dropdown-content, nap__availability, nap__day, nap__time-ranges, nap__time-range, nap__add-time-range, nap__time-picker-container, nap__time-picker-input, nap__time-picker-times"}));case"bookingOptions":return t.h("div",{key:e},t.h("nylas-custom-booking-flow",null,t.h("div",{slot:"inputs"},t.h("nylas-booking-confirmation-redirect",{name:"confirmation-redirect",redirectUrl:n.redirectUrl,exportparts:"nbcr, nbcr__header, nbcr__dropdown, nbcr__dropdown-button, nbcr__dropdown-content, nbcr__input-textfield"}))),t.h("nylas-buffer-time",{name:"buffer-time",buffer:n.buffer,exportparts:"nbt, nbt__header, nbt__body, nbt__dropdown-before, nbt__dropdown-button-before, nbt__dropdown-content-before, nbt__dropdown-after, nbt__dropdown-button-after, nbt__dropdown-content-after, nbt__preview"}),t.h("nylas-event-limits",null,t.h("div",{slot:"inputs"},t.h("nylas-min-booking-notice",{name:"min-booking-notice",minBookingNotice:n.minBookingNotice,exportparts:"nmbn, nmbn__number-dropdown, nmbn__number-dropdown-button, nmbn__number-dropdown-content, nmbn__period-dropdown, nmbn__period-dropdown-button, nmbn__period-dropdown-content"}),t.h("nylas-limit-future-bookings",{name:"limit-future-bookings",availableDaysInFuture:n.availableDaysInFuture,exportparts:"nlfb, nlfb__number-dropdown, nlfb__number-dropdown-button, nlfb__number-dropdown-content, nlfb__period-dropdown, nlfb__period-dropdown-button, nlfb__period-dropdown-content"}),t.h("nylas-min-cancellation-notice",{name:"min-cancellation-notice",minCancellationNotice:n.minCancellationNotice,exportparts:"nmcn, nmcn__number-dropdown, nmcn__number-dropdown-button, nmcn__number-dropdown-content, nmcn__period-dropdown, nmcn__period-dropdown-button, nmcn__period-dropdown-content"}),t.h("nylas-cancellation-policy",{name:"cancellation-policy",cancellationPolicy:n.cancellationPolicy,exportparts:"ncpolicy, ncpolicy__textarea"}))),t.h("nylas-timeslot-interval",{name:"timeslot-interval",eventDurationMinutes:parseInt(n.duration),exportparts:"nti, nti__header, nti__input-label, nti__dropdown, nti__dropdown-button, nti__dropdown-content"}),t.h("nylas-customize-booking-settings",{name:"customize-booking-settings",exportparts:"ncbs, ncbs__header, ncbs__settings, ncbs__settings-div, ncbs__additional_guests, ncbs__cancellation_options, ncbs__rescheduling_options"}));case"communications":return t.h("div",{key:e},t.h("div",{class:"tab-header"},t.h("h3",null,"Event communications"),t.h("p",null,"Set up automatic communications for your events.")),t.h("nylas-confirmation-email",{name:"confirmation-email-template",confirmationEmailTemplate:n.emailTemplate,isOpen:!((l=(a=n.reminders)==null?void 0:a.overrides)!=null&&l.length),participants:n.participants,exportparts:"nce, nce__tab-heading, nce__header, nce__body, nce__confirmation-email-toggle--container, nce__summary, nce__reminder-input_dropdown, nce__reminder-input_dropdown-input, nce__reminder-input_dropdown-content"}));case"participants":return t.h("div",{key:e},t.h("nylas-additional-participants",{name:"participants",eventParticipants:n.participants,exportparts:"nap__title, nap__subtitle, nap__content, nap__input_group, nap__input_wrapper, nap__input, nap__remove-participant"}),t.h("nylas-participants-custom-availability",{name:"participant-custom-availability",participants:n.participants,exportparts:"npca, npca__header, npca__content, npca__participant-container, npca__participant-title, npca__participant-toggle--container, npca__toggle-label, npca__toggle-input, npca__toggle-slider"}));case"bookingForm":const T=Object.entries(n.additionalFields).map(([F,f])=>({key:F,...f}));return t.h("div",{key:e},t.h("nylas-booking-form-config",{name:"additional-fields",additonalFields:T}))}}const Re='.sc-nylas-editor-tabs-h{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.scheduler-editor.sc-nylas-editor-tabs{display:flex;flex-direction:column}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs{height:554px;display:grid;grid-template-columns:minmax(224px, 25%) 1fr}@media screen and (max-width: 768px){.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs{display:table-column-group;height:auto}}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs{display:flex;flex-direction:column;border-right:1px solid var(--nylas-base-200);background-color:var(--nylas-base-25)}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.sc-nylas-editor-tabs{display:flex;align-items:center;gap:0.5rem;padding:0.5rem 1rem;color:var(--nylas-base-900);background:var(--nylas-base-0);border:none;height:56px;font-family:var(--nylas-font-family);font-size:16px;font-weight:500;line-height:24px;cursor:pointer}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.sc-nylas-editor-tabs:not(:first-of-type){margin-top:0.25rem}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.active.sc-nylas-editor-tabs{font-weight:600;background:var(--nylas-base-0);color:var(--nylas-primary);border-left:4px solid var(--nylas-primary);box-shadow:0px 1px 2px 0px rgba(0, 0, 0, 0.0588235294);box-shadow:0px 1px 3px 0px rgba(0, 0, 0, 0.1019607843)}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.hide.sc-nylas-editor-tabs{display:none}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs{max-width:692px;overflow-y:auto}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-info.sc-nylas-editor-tabs,.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-limits.sc-nylas-editor-tabs{width:inherit}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-info.sc-nylas-editor-tabs div[slot=inputs].sc-nylas-editor-tabs,.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-limits.sc-nylas-editor-tabs div[slot=inputs].sc-nylas-editor-tabs{display:flex;flex-direction:column;gap:1rem}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs .tab-header.sc-nylas-editor-tabs{display:flex;flex-direction:column;margin:1rem 1rem 0.5rem;row-gap:4px}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs .tab-header.sc-nylas-editor-tabs h3.sc-nylas-editor-tabs{margin:0;font-size:1rem;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs .tab-header.sc-nylas-editor-tabs p.sc-nylas-editor-tabs{margin:0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.footer.sc-nylas-editor-tabs{display:flex;justify-content:space-between;align-items:center;gap:1rem;min-height:80px;padding:0 1rem;border-top:1px solid var(--nylas-base-200)}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs{flex-direction:column;height:auto}}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs .preview.sc-nylas-editor-tabs{margin-top:1rem;width:100%}}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs{display:flex;justify-content:flex-end;align-items:center;justify-self:flex-end;gap:1rem}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs{flex-direction:column-reverse;width:100%}}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.sc-nylas-editor-tabs{max-width:524px}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.unsaved-changes.sc-nylas-editor-tabs{color:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.saved-changes.sc-nylas-editor-tabs{color:var(--nylas-success)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.error.sc-nylas-editor-tabs{color:var(--nylas-error)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.error-full-width.sc-nylas-editor-tabs{max-width:660px}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button-component.sc-nylas-editor-tabs{width:100%}}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs{background:var(--nylas-primary);color:var(--nylas-base-0);height:48px;border:none;border-radius:var(--nylas-border-radius-2x);font-size:1rem;line-height:24px;padding:0 1rem;cursor:pointer;width:148px}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:hover{background:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:active{background:var(--nylas-base-800)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:disabled{background:var(--nylas-base-300);cursor:not-allowed}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs span.sc-nylas-editor-tabs{display:flex;align-items:center;justify-content:center;gap:0.5rem}',Ne=Re;var Ie=function(e,n,i,o){var r=arguments.length,a=r<3?n:o===null?o=Object.getOwnPropertyDescriptor(n,i):o,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,n,i,o);else for(var s=e.length-1;s>=0;s--)(l=e[s])&&(a=(r<3?l(a):r>3?l(n,i,a):l(n,i))||a);return r>3&&a&&Object.defineProperty(n,i,a),a},A=function(e,n){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,n)};const W=class{constructor(e){t.registerInstance(this,e),this.schedulerConfigChanged=t.createEvent(this,"schedulerConfigChanged",7),this.cancelButtonClick=t.createEvent(this,"cancelButtonClick",7),this.formSubmitted=t.createEvent(this,"formSubmitted",7),this.previewButtonClicked=t.createEvent(this,"previewButtonClicked",7),this.schedulerEditorFormUpdated=t.createEvent(this,"schedulerEditorFormUpdated",7),this.setError=n=>{this.error=n.message},this.formSubmissionHandler=async n=>{var G,K,Q,X,Y,ee,te,ne,ie,ae,oe,se,re,le,de,ce;if(n.preventDefault(),this.formSubmitted.emit(),!this.formRef.checkValidity()){this.error=this.formRef.validationMessage||"Please fix the form errors.";return}this.isLoading=!0,this.hasUnsavedChanges=!1;const o=this.updateFormState(),{title:r,description:a,duration:l,availability:s,bookingCalendar:h,location:m,bookingType:w,buffer:C,availableDaysInFuture:x,minCancellationNotice:S,minBookingNotice:T,cancellationPolicy:F,timeslotInterval:f,additionalGuestsHidden:D,hideCancellationOptions:B,hideReschedulingOptions:R,participants:g,participantOpenHours:b,additionalFields:N,participantCalendars:y,conferencing:I,participantBookingCalendars:p,reminders:z,emailTemplate:M,redirectUrl:U,availabilityMethod:E}=o,c=((K=(G=this.selectedConfiguration)==null?void 0:G.participants)==null?void 0:K.find(d=>d.is_organizer))||(g==null?void 0:g.find(d=>d.is_organizer)),v=y&&(c!=null&&c.email)?y[c==null?void 0:c.email]:[],O=((Q=c==null?void 0:c.booking)==null?void 0:Q.calendar_id)||h,H=l?parseInt(l):30,L=g&&(g==null?void 0:g.length)>0?g:[{name:(c==null?void 0:c.name)??((X=this.currentUser)==null?void 0:X.name)??"",email:(c==null?void 0:c.email)??((Y=this.currentUser)==null?void 0:Y.email)??"",is_organizer:!0,timezone:(s==null?void 0:s.timezone)??Intl.DateTimeFormat().resolvedOptions().timeZone,availability:{calendar_ids:v.length?v:["primary"],open_hours:[]},booking:{calendar_id:h&&h!==""?h:"primary"}}],P={...((ee=this.selectedConfiguration)==null?void 0:ee.id)&&{id:this.selectedConfiguration.id},version:((te=this.selectedConfiguration)==null?void 0:te.version)??"1.0.0",availability:{duration_minutes:H,interval_minutes:(f==null?void 0:f.interval)??H,round_to:f==null?void 0:f.roundTo,availability_rules:{availability_method:E||(((ae=(ie=(ne=this.selectedConfiguration)==null?void 0:ne.availability)==null?void 0:ie.availability_rules)==null?void 0:ae.availability_method)??"collective"),buffer:C||{before:0,after:0},default_open_hours:(s==null?void 0:s.openHours)??((re=(se=(oe=this.selectedConfiguration)==null?void 0:oe.availability)==null?void 0:se.availability_rules)==null?void 0:re.default_open_hours)??xe.DEFAULT_OPEN_HOURS,round_robin_group_id:((ce=(de=(le=this.selectedConfiguration)==null?void 0:le.availability)==null?void 0:de.availability_rules)==null?void 0:ce.round_robin_group_id)??""}},participants:[...L==null?void 0:L.map(d=>{var he,be,pe,ue,ye,me,fe,ge,_e,ve,we,ke,Ce;return d.is_organizer?{name:d.name??"",email:d.email,is_organizer:!0,timezone:((be=(he=b==null?void 0:b[d.email])==null?void 0:he[0])==null?void 0:be.timezone)??((ye=(ue=(pe=d.availability)==null?void 0:pe.open_hours)==null?void 0:ue[0])==null?void 0:ye.timezone)??Intl.DateTimeFormat().resolvedOptions().timeZone,availability:{calendar_ids:y!=null&&y[d.email]?y==null?void 0:y[d.email]:v!=null&&v.length?v:["primary"],open_hours:(b==null?void 0:b[d.email])??((me=d.availability)==null?void 0:me.open_hours)??[]},booking:{calendar_id:p!=null&&p[d.email]?p==null?void 0:p[d.email]:O||"primary"}}:{...d,timezone:((ge=(fe=b==null?void 0:b[d.email])==null?void 0:fe[0])==null?void 0:ge.timezone)??((we=(ve=(_e=d.availability)==null?void 0:_e.open_hours)==null?void 0:ve[0])==null?void 0:we.timezone)??Intl.DateTimeFormat().resolvedOptions().timeZone,availability:d.availability?{calendar_ids:(y==null?void 0:y[d.email])??((ke=d.availability)==null?void 0:ke.calendar_ids)??["primary"],open_hours:(b==null?void 0:b[d.email])??((Ce=d.availability)==null?void 0:Ce.open_hours)??[]}:void 0,booking:p!=null&&p[d.email]?{calendar_id:p==null?void 0:p[d.email]}:(d==null?void 0:d.booking)??void 0}})],event_booking:{title:(r==null?void 0:r.toString())??"",description:(a==null?void 0:a.toString())??"",location:(m==null?void 0:m.toString())??"",booking_type:(w==null?void 0:w.toString())??"booking",timezone:(s==null?void 0:s.timezone)??Intl.DateTimeFormat().resolvedOptions().timeZone,conferencing:I,reminders:z},scheduler:{cancellation_policy:F??"",available_days_in_future:x??30,min_cancellation_notice:S??0,min_booking_notice:T??60,hide_additional_guests:D??!1,hide_cancellation_options:B??!1,hide_rescheduling_options:R??!1,additional_fields:N,email_template:M,confirmation_redirect_url:U}},_=t.mergeDeep(P,this.selectedConfiguration),u=this.action==="create"?_:P;this.isConfigRoundRobin(u)&&(u.participants=u.participants.map(d=>({...d,is_organizer:void 0})));const k=d=>{this.isLoading=!1,this.changesSaved=!0,setTimeout(()=>{this.changesSaved=!1},5e3)};this.checkForClientSideErrors(u)||this.schedulerConfigChanged.emit({config:u,resetLoadingState:k,setError:this.setError,action:this.action})},this.isConfigRoundRobin=n=>{var i,o,r,a;return((o=(i=n.availability)==null?void 0:i.availability_rules)==null?void 0:o.availability_method)==="max-availability"||((a=(r=n.availability)==null?void 0:r.availability_rules)==null?void 0:a.availability_method)==="max-fairness"},this.checkForClientSideErrors=n=>{var a;let i=!1,o="";const r=(a=n.scheduler)==null?void 0:a.additional_fields;return r&&(o="Booking form error: ",Object.entries(r).forEach(l=>{const s=l[1];if(s.label===""){o+=`Label is required for field of type ${s.type}.`,i=!0;return}if(s.options){for(const h of s.options)if(h===""){o+=`Empty option detected inside ${s.label} of type ${s.type}.`,i=!0;break}}})),i&&(this.isLoading=!1,this.setError(new Error(o))),i},this.calendars=void 0,this.selectedConfiguration=void 0,this.currentUser=void 0,this.schedulerPreviewLink="",this.mode="app",this.hideEditorTabs=[],this.action="create",this.activeTab="eventInfo",this.isLoading=!1,this.hasUnsavedChanges=!1,this.changesSaved=!1,this.formState={},this.error=""}configChangedHandler(e){t.debug("[nylas-editor-tabs]","configChangedHandler",e,this.selectedConfiguration),this.formState={...this.getFormStateFromConfig(e)},e.id?this.action="edit":this.action="create"}userChangedHandler(e){t.debug("[nylas-editor-tabs]","userChangedHandler",e),e&&(this.formState={...this.getFormStateFromConfig(this.selectedConfiguration)})}connectedCallback(){t.debug("[nylas-editor-tabs]","connectedCallback")}componentWillLoad(){t.debug("[nylas-editor-tabs]","componentWillLoad"),this.formState=this.getFormStateFromConfig(this.selectedConfiguration)}componentDidLoad(){var n;t.debug("[nylas-editor-tabs]","componentDidLoad");const e=(n=this.host.querySelector("button.tab:not(.hide)"))==null?void 0:n.name;e&&(this.activeTab=e)}disconnectedCallback(){t.debug("[nylas-editor-tabs]","disconnectedCallback")}handleValueChanged(e){t.debug("[nylas-editor-tabs]","handleValueChanged",e);const{name:n,value:i}=e.detail;this.setFormState(i,n),this.formState={...this.formState},this.hasUnsavedChanges=!0,this.error="",this.schedulerEditorFormUpdated.emit({value:e.detail.value,name:e.detail.name})}getFormStateFromConfig(e){var i,o,r,a,l,s,h,m,w,C,x,S,T,F,f,D,B,R,g,b,N,y,I,p,z,M,U,E,c,v,O,H,L,P;let n=(i=e==null?void 0:e.participants)==null?void 0:i.find(_=>_.is_organizer);return!n&&((r=(o=e==null?void 0:e.availability)==null?void 0:o.availability_rules)==null?void 0:r.availability_method)!=="collective"&&(n=(a=e==null?void 0:e.participants)==null?void 0:a.find(_=>{var u;return _.email===((u=this.currentUser)==null?void 0:u.email)}),n&&(n.is_organizer=!0)),{title:((l=e==null?void 0:e.event_booking)==null?void 0:l.title)??"",description:((s=e==null?void 0:e.event_booking)==null?void 0:s.description)??"",duration:((m=(h=e==null?void 0:e.availability)==null?void 0:h.duration_minutes)==null?void 0:m.toString())??"30",availability:{timezone:((w=e==null?void 0:e.event_booking)==null?void 0:w.timezone)??Intl.DateTimeFormat().resolvedOptions().timeZone,openHours:((x=(C=e==null?void 0:e.availability)==null?void 0:C.availability_rules)==null?void 0:x.default_open_hours)??xe.DEFAULT_OPEN_HOURS},additionalFields:((S=e==null?void 0:e.scheduler)==null?void 0:S.additional_fields)??{},conferencing:((T=e==null?void 0:e.event_booking)==null?void 0:T.conferencing)??{},calendarIds:((F=n==null?void 0:n.availability)==null?void 0:F.calendar_ids)??[],participants:(e==null?void 0:e.participants)??[],bookingCalendar:((f=n==null?void 0:n.booking)==null?void 0:f.calendar_id)??(n==null?void 0:n.email)??"",location:((D=e==null?void 0:e.event_booking)==null?void 0:D.location)??"",bookingType:((B=e==null?void 0:e.event_booking)==null?void 0:B.booking_type)??"booking",buffer:((g=(R=e==null?void 0:e.availability)==null?void 0:R.availability_rules)==null?void 0:g.buffer)??{before:0,after:0},cancellationPolicy:((b=e==null?void 0:e.scheduler)==null?void 0:b.cancellation_policy)??"",availableDaysInFuture:((N=e==null?void 0:e.scheduler)==null?void 0:N.available_days_in_future)??30,minCancellationNotice:((y=e==null?void 0:e.scheduler)==null?void 0:y.min_cancellation_notice)??0,minBookingNotice:((I=e==null?void 0:e.scheduler)==null?void 0:I.min_booking_notice)??60,timeslotInterval:{interval:((p=e==null?void 0:e.availability)==null?void 0:p.interval_minutes)??((z=e==null?void 0:e.availability)==null?void 0:z.duration_minutes),roundTo:(M=e==null?void 0:e.availability)==null?void 0:M.round_to},additionalGuestsHidden:((U=e==null?void 0:e.scheduler)==null?void 0:U.hide_additional_guests)??!1,hideCancellationOptions:((E=e==null?void 0:e.scheduler)==null?void 0:E.hide_cancellation_options)??!1,hideReschedulingOptions:((c=e==null?void 0:e.scheduler)==null?void 0:c.hide_rescheduling_options)??!1,participantBookingCalendars:((v=e==null?void 0:e.participants)==null?void 0:v.reduce((_,u)=>{var k,j;return(k=u.booking)!=null&&k.calendar_id&&(_[u.email]=(j=u.booking)==null?void 0:j.calendar_id),_}))??{},participantCalendars:((O=e==null?void 0:e.participants)==null?void 0:O.reduce((_,u)=>{var k;return _[u.email]=(k=u.availability)==null?void 0:k.calendar_ids,_},{}))??{},reminders:(H=e==null?void 0:e.event_booking)==null?void 0:H.reminders,emailTemplate:(L=e==null?void 0:e.scheduler)==null?void 0:L.email_template,redirectUrl:(P=e==null?void 0:e.scheduler)==null?void 0:P.confirmation_redirect_url}}setFormState(e,n){switch(n){case"title":this.formState.title=e.toString();break;case"description":this.formState.description=e.toString();break;case"duration":this.formState.duration=e.toString();break;case"availability":this.formState.availability=JSON.parse(e.toString());break;case"participants":this.formState.participants=JSON.parse(e.toString());break;case"booking-calendar":this.formState.bookingCalendar=e.toString();break;case"participant-booking-calendars":this.formState.participantBookingCalendars=JSON.parse(e.toString());break;case"location":this.formState.location=e.toString();break;case"conference":this.formState.conferencing=JSON.parse(e.toString());break;case"booking-type":this.formState.bookingType=e.toString();break;case"buffer-time":this.formState.buffer=JSON.parse(e.toString());break;case"limit-future-bookings":this.formState.availableDaysInFuture=parseInt(e.toString());break;case"min-cancellation-notice":this.formState.minCancellationNotice=parseInt(e.toString());break;case"min-booking-notice":this.formState.minBookingNotice=parseInt(e.toString());break;case"cancellation-policy":this.formState.cancellationPolicy=e.toString();break;case"timeslot-interval":this.formState.timeslotInterval=JSON.parse(e.toString());break;case"customize-booking-settings":const i=JSON.parse(e.toString());this.formState.additionalGuestsHidden=i.additionalGuestsHidden,this.formState.hideCancellationOptions=i.hideCancellationOptions,this.formState.hideReschedulingOptions=i.hideReschedulingOptions;break;case"participant-custom-availability":const o=JSON.parse(e.toString());this.formState.participantOpenHours=o;break;case"additional-fields":this.formState.additionalFields=e;break;case"connected-calendars":this.formState.participantCalendars=JSON.parse(e.toString());break;case"confirmation-email-template":this.formState.emailTemplate=JSON.parse(e.toString());break;case"reminder-overrides":this.formState.reminders={overrides:JSON.parse(e.toString())};break;case"confirmation-redirect":this.formState.redirectUrl=e.toString();break;case"availability-method":this.formState.availabilityMethod=e.toString();break}this.schedulerEditorFormUpdated.emit({value:e,name:n})}updateFormState(){return new FormData(this.formRef).forEach((n,i)=>{this.setFormState(n,i)}),this.formState={...this.formState},this.formState}setActiveTab(e,n){e.preventDefault(),this.updateFormState(),this.activeTab=n}hideTab(e){var n;return((n=this.hideEditorTabs)==null?void 0:n.includes(e))||!1}render(){var e,n;return t.debug("[nylas-editor-tabs]","render",this.formState),t.h(t.Host,{key:"5f7372d88ae1d3dacfffbb620a9de2e79adda2b6"},t.h("form",{key:"8be826e8178f6667455bece8f950613c0456fc12",onSubmit:this.formSubmissionHandler,class:"scheduler-editor",ref:i=>this.formRef=i,noValidate:!0},this.mode==="app"?t.h("div",{class:"form-contents"},t.h("div",{class:"tabs"},t.h("button",{name:"eventInfo",class:{tab:!0,active:this.activeTab=="eventInfo",hide:this.hideTab("eventInfo")},part:"editortab__event-info",onClick:i=>this.setActiveTab(i,"eventInfo")},t.h("calendar-info-icon",{width:"16",height:"16"}),"Event info"),t.h("button",{name:"availability",class:{tab:!0,active:this.activeTab=="availability",hide:this.hideTab("availability")},part:"editortab__availability",onClick:i=>this.setActiveTab(i,"availability")},t.h("calendar-patterns-icon",{width:"16",height:"16"}),"Availability"),t.h("button",{name:"participants",class:{tab:!0,active:this.activeTab=="participants",hide:this.hideTab("participants")},part:"editortab__participants",onClick:i=>this.setActiveTab(i,"participants")},t.h("people-icon",{width:"16",height:"16"}),"Participants"),t.h("button",{name:"bookingOptions",class:{tab:!0,active:this.activeTab=="bookingOptions",hide:this.hideTab("bookingOptions")},part:"editortab__booking-options",onClick:i=>this.setActiveTab(i,"bookingOptions")},t.h("flow-icon",{width:"16",height:"16"}),"Booking options"),t.h("button",{name:"bookingForm",class:{tab:!0,active:this.activeTab=="bookingForm",hide:this.hideTab("bookingForm")},part:"editortab__booking-form",onClick:i=>this.setActiveTab(i,"bookingForm")},this.activeTab=="bookingForm"?t.h("calendar-agenda-fill-icon",{width:"16",height:"16"}):t.h("calendar-agenda-icon",{width:"16",height:"16"}),"Booking form"),t.h("button",{name:"communications",class:{tab:!0,active:this.activeTab=="communications"},onClick:i=>this.setActiveTab(i,"communications")},this.activeTab=="communications"?t.h("envelope-fill-icon",{width:"16",height:"16"}):t.h("envelope-icon",{width:"16",height:"16"}),"Communications")),t.h("div",{class:"tab-content"},t.h(Be,{formState:this.formState,activeTab:this.activeTab,currentUser:this.currentUser,calendars:this.calendars,id:((e=this.selectedConfiguration)==null?void 0:e.id)??"new"}))):t.h("div",{key:(n=this.selectedConfiguration)==null?void 0:n.id},t.h("slot",null)),t.h("div",{key:"6cf0a5f270552a0fb91b9ead274c93b1bfc086a3",class:"footer",part:"editor__footer"},t.h("div",{key:"73c5f3708e16589f8546692a1b7df791cc53363b",class:"preview",part:"editor__footer-preview"},this.schedulerPreviewLink!==""&&this.action==="edit"&&t.h("button-component",{type:"button",disabled:this.isLoading,clickHandler:i=>{i.preventDefault(),this.previewButtonClicked.emit(this.host).defaultPrevented||window.open(t.parsePreviewLink(this.schedulerPreviewLink,this.selectedConfiguration),"_blank")},variant:"basic"},"Preview")),t.h("div",{key:"8a4ef95bc9779438601c853d117b588a586606f5",class:"buttons",part:"editor__footer-buttons"},t.h("p",{key:"5e09184856da0e5eb851e34d673addc921c6bc85",class:{"unsaved-changes":this.hasUnsavedChanges&&!this.changesSaved,"saved-changes":this.changesSaved,error:this.error!=="","error-full-width":this.error!==""&&this.action==="create"}},this.error!==""?this.error:"",this.error==""&&this.hasUnsavedChanges&&!this.changesSaved?"Unsaved changes":this.error==""&&this.changesSaved?"Changes saved!":""),t.h("button-component",{key:"f1e201a19bef90ff09cd274d4cee79457b7dfd81",type:"button",disabled:this.isLoading,clickHandler:i=>{i.preventDefault(),this.cancelButtonClick.emit(),this.error=""},variant:"basic",part:"editor__footer-cancel"},"Back"),t.h("button-component",{key:"7f37733c28d27f9f202a917ec155d2b3b0b53b2a",type:"submit",disabled:this.isLoading,part:"editor__footer-cta"},this.isLoading?t.h("span",null,"Saving",t.h("loading-icon",null)," "):this.action=="create"?"Create":"Save changes")))))}get host(){return t.getElement(this)}static get watchers(){return{selectedConfiguration:["configChangedHandler"],currentUser:["userChangedHandler"]}}};Ie([Z.RegisterComponent({name:"nylas-editor-tabs",stateToProps:new Map([["schedulerConfig.calendars","calendars"],["schedulerConfig.selectedConfiguration","selectedConfiguration"],["schedulerConfig.currentUser","currentUser"],["schedulerConfig.hideEditorTabs","hideEditorTabs"]]),eventToProps:{schedulerConfigChanged:async(e,n)=>{const{resetLoadingState:i,setError:o,action:r,config:a}=e.detail,l=s=>{const[h,m]=s;!h&&m&&o&&o(m),i&&i(e)};if(r==="edit"){const s=await n.schedulerConfig.updateConfiguration(a);l(s)}else{const s=await n.schedulerConfig.createConfiguration(a);l(s)}},cancelButtonClick:async(e,n)=>{n.schedulerConfigStore.state.action=null},previewButtonClicked:async(e,n)=>{t.debug("[nylas-editor-tabs]","previewButtonClicked",n)},formSubmitted:async(e,n)=>{t.debug("[nylas-editor-tabs]","formSubmitted",n)},schedulerEditorFormUpdated:async(e,n)=>{t.debug("[nylas-editor-tabs]","schedulerEditorFormUpdated",e)}},localPropsToProp:new Map([["schedulerPreviewLink","schedulerPreviewLink"]]),fireRegisterEvent:!0}),A("design:type",Function),A("design:paramtypes",[]),A("design:returntype",void 0)],W.prototype,"render",null);W.style=Ne;const ze=':host{display:grid;grid-auto-flow:row;width:100%;font-family:inherit;font-optical-sizing:auto;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.header{display:flex;align-items:center;justify-content:space-between;margin-bottom:1rem;gap:1rem}@media screen and (max-width: 768px){.header{flex-direction:column;gap:0.5rem;align-items:unset}}.header h2{margin:0;font-size:1.25rem;color:var(--nylas-base-900);font-weight:600}.header p{margin:0;font-size:1rem;color:var(--nylas-base-700)}.header .actions{justify-self:end}@media screen and (max-width: 768px){.header .actions{width:100%}}.configurations{border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);background:var(--nylas-base-0);height:100%;display:flex;flex-direction:column;position:relative;overflow-y:auto}.configurations table{width:100%;border-spacing:0;border-collapse:collapse;font-family:inherit;height:max-content}.configurations table.no-configurations{height:100%}.configurations table tr{color:var(--nylas-base-800);border-bottom:1px solid var(--nylas-base-200);font-family:inherit}.configurations table tr.hide{display:none}.configurations table th{font-weight:600;text-transform:uppercase;font-size:14px;line-height:20px}.configurations table th.actions-header{text-align:right}.configurations table tr.no-configurations td>div{display:flex;height:100%;justify-content:center;align-items:center;flex-direction:column;padding:var(--nylas-border-radius-3x)}.configurations table tr.no-configurations td>div h3{margin:0 0 1rem 0;color:var(--nylas-base-700)}.configurations table tr.no-configurations td>div p{margin:0 0 1rem 0;color:var(--nylas-base-600)}.configurations table tr.no-configurations td>div calendar-icon{margin-bottom:1rem;color:var(--nylas-base-200)}.configurations table th,.configurations table td{text-align:left;padding:1rem;font-family:inherit}.configurations table .actions{text-align:right}.configurations table .actions{display:flex;justify-content:flex-end;gap:1rem}@media screen and (max-width: 768px){.configurations table .actions{flex-direction:column;gap:0.5rem}}.configurations table .title{width:100%;max-width:300px}@media screen and (max-width: 768px){.configurations table .title{max-width:96px}}.configurations table .title div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.configurations table .title div.config-event-title{font-weight:600}.configurations table .title div.config-event-description{font-size:0.75rem}.configurations .pagination{padding:1rem;position:sticky;top:100%;display:flex;justify-content:flex-end;gap:0.5rem;background:white;width:calc(100% - 2rem);z-index:2}.configurations .pagination td.arrows{display:flex;justify-content:flex-end;gap:0.5rem}.configurations .pagination button{display:flex;flex-direction:row;justify-content:center;align-items:center;height:3vh;width:3vh;min-width:3em;min-height:3em;cursor:pointer;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-300);background-color:transparent;color:var(--nylas-base-800);cursor:pointer}.configurations .pagination button:hover:not(:disabled){border:1px solid var(--nylas-primary)}.configurations .pagination button:active{border:1px solid var(--nylas-base-800)}.configurations .pagination button:disabled{border:1px solid var(--nylas-base-100);background-color:transparent;color:var(--nylas-base-300);cursor:not-allowed}.configurations .pagination button.right{transform:rotate(180deg)}.error-container{margin-top:1.5rem}.error-container .error{color:var(--nylas-error);padding:0.5rem 0;margin:1rem 0 0}button-component#copy button{width:108px}select-dropdown{width:auto}select-dropdown::part(sd_dropdown-button){display:block;height:48px;padding:0px 16px 8px}@media screen and (max-width: 768px){select-dropdown::part(sd_dropdown-button){width:92px}}select-dropdown::part(sd_dropdown-content){width:120px;right:0}select-dropdown::part(sd_dropdown-labelhtml){display:flex;gap:0.5rem;align-items:center;color:var(--nylas-base-900)}select-dropdown::part(sd_dropdown-labelhtml):hover{color:var(--nylas-primary)}',Me=ze;var Ue=function(e,n,i,o){var r=arguments.length,a=r<3?n:o===null?o=Object.getOwnPropertyDescriptor(n,i):o,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,n,i,o);else for(var s=e.length-1;s>=0;s--)(l=e[s])&&(a=(r<3?l(a):r>3?l(n,i,a):l(n,i))||a);return r>3&&a&&Object.defineProperty(n,i,a),a},V=function(e,n){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,n)};const q=class{constructor(e){t.registerInstance(this,e),this.initListConfigurations=t.createEvent(this,"initListConfigurations",7),this.createButtonClick=t.createEvent(this,"createButtonClick",7),this.editButtonClick=t.createEvent(this,"editButtonClick",7),this.deleteButtonClick=t.createEvent(this,"deleteButtonClick",7),this.configurations=[],this.schedulerPreviewLink="",this.listConfigurationsNextCursor=void 0,this.state="loading",this.error="",this.currentCursor=null,this.previousCursors=[],this.disableNextPageButton=!1}listConfigurationsNextCursorChangedHandler(e,n){if(!e||e===n){e===null&&(this.disableNextPageButton=!0);return}this.disableNextPageButton=!1,this.currentCursor=e}connectedCallback(){t.debug("[nylas-list-configurations]","connectedCallback")}componentWillLoad(){t.debug("[nylas-list-configurations]","componentWillLoad"),this.configurations&&this.configurations.length>0&&(this.state="loaded")}componentDidLoad(){t.debug("[nylas-list-configurations]","componentDidLoad"),this.initListConfigurations.emit({host:this.host})}disconnectedCallback(){t.debug("[nylas-list-configurations]","disconnectedCallback")}async handleNylasFormDropdownChanged(e){t.debug("[nylas-list-configurations]","handleNylasFormDropdownChanged",e.detail);const{value:n}=e.detail,[i,o]=n.split("-");switch(e.preventDefault(),i){case"delete":this.deleteButtonClick.emit({host:this.host,configuration:this.configurations[o]});break;case"preview":window.open(t.parsePreviewLink(this.schedulerPreviewLink,this.configurations[o]),"_blank");break;case"copy":await navigator.clipboard.writeText(t.parsePreviewLink(this.schedulerPreviewLink,this.configurations[o]));break}}async getState(){return this.state}async setState(e){this.state=e}async setError(e){this.error=e}getDurationString(e){const n=Math.floor(e/60),i=e%60;return`${n||""} ${n?`${n>1?"hours":"hour"}`:""} ${i||""} ${i?`${i>1?"mins":"min"}`:""}`}getActionLabelHTML(e){const n={display:"inline-flex",alignItems:"center",gap:"0.5rem"},i={color:"var(--nylas-error)"};switch(e){case"preview":return t.h("span",{style:n},t.h("eye-icon",{width:"16",height:"16"}),"Preview");case"copy":return t.h("span",{style:n},t.h("copy-icon",{width:"16",height:"16"}),"Copy");case"delete":return t.h("span",{style:{...n,...i}},t.h("delete-icon",{width:"15",height:"17"}),"Delete");default:return""}}previousPageClickedHandler(){if(this.previousCursors.length===0)return;this.currentCursor=this.previousCursors.pop()||null;const e=this.previousCursors[this.previousCursors.length-1]||void 0;this.initListConfigurations.emit({host:this.host,cursor:e})}nextPageClickedHandler(){this.currentCursor&&(this.previousCursors=[...this.previousCursors,this.currentCursor],this.initListConfigurations.emit({host:this.host,cursor:this.currentCursor}))}render(){return t.h(t.Host,null,t.h("div",{class:"header"},t.h("div",{class:"description"},t.h("h2",null,"All scheduling pages"),t.h("p",null,"Create, edit and manage all your scheduling pages.")),this.configurations&&this.configurations.length>0&&t.h("div",{class:"actions"},t.h("button-component",{clickHandler:()=>{this.createButtonClick.emit(this.host)}},"Create new"))),t.h("div",{class:"configurations"},t.h("table",{class:{"no-configurations":this.state!=="loading"&&(!this.configurations||this.configurations.length===0)}},t.h("tr",{class:{hide:this.state==="loading"||this.configurations&&this.configurations.length===0}},t.h("th",null,"Scheduling page title"),t.h("th",null,"Duration"),t.h("th",{class:"actions-header"},"Actions")),this.state==="loading"&&t.h("tr",{class:"no-configurations"},t.h("td",{colSpan:3},t.h("div",null,t.h("h3",null,"Loading..."),t.h("p",null,"Please wait while we fetch the scheduling pages")))),this.state!=="loading"&&(!this.configurations||this.configurations.length===0)&&t.h("tr",{class:"no-configurations"},t.h("td",{colSpan:3},t.h("div",null,t.h("calendar-icon",{width:"48",height:"48"}),t.h("h3",null,"No scheduling pages found"),t.h("p",null,"Get started with creating your first scheduling page"),t.h("button-component",{clickHandler:()=>{this.createButtonClick.emit(this.host)}},"Create new")))),this.state!=="loading"&&this.configurations.map((e,n)=>t.h("tr",{key:e.id},t.h("td",null,t.h("div",{class:"title"},t.h("div",{class:"config-event-title",title:e.event_booking.title},e.event_booking.title),t.h("div",{class:"config-event-description"},e.event_booking.description))),t.h("td",null,t.h("div",{class:"duration"},this.getDurationString(e.availability.duration_minutes))),t.h("td",null,t.h("div",{class:"actions"},t.h("button-component",{variant:"basic",key:`edit-${n}`,clickHandler:i=>{i.preventDefault(),this.editButtonClick.emit({host:this.host,configuration:e})}},t.h("edit-icon",{width:"16",height:"16"}),"Edit"),t.h("select-dropdown",{name:"actions",options:[{value:`preview-${n}`,label:"Preview",labelHTML:this.getActionLabelHTML("preview")},{value:`copy-${n}`,label:"Copy link",labelHTML:this.getActionLabelHTML("copy")},{value:`delete-${n}`,label:"Delete",labelHTML:this.getActionLabelHTML("delete")}],defaultSelectedOption:{value:"",label:""},dropdownButtonText:"...",withSearch:!1,withChevron:!1,exportparts:"sd_dropdown: actions__dropdown, sd_dropdown-button: actions__dropdown-button, sd_dropdown-content: actions__dropdown-content"})))))),t.h("div",{class:"pagination"},t.h("button",{class:"arrow left",onClick:()=>this.previousPageClickedHandler(),disabled:this.previousCursors.length<=0},t.h("chevron-icon",null)),t.h("button",{class:"arrow right",onClick:()=>this.nextPageClickedHandler(),disabled:this.disableNextPageButton},t.h("chevron-icon",null)))),this.state==="error"&&t.h("div",{class:"error-container"},t.h("p",{class:"error"},this.error)))}get host(){return t.getElement(this)}static get watchers(){return{listConfigurationsNextCursor:["listConfigurationsNextCursorChangedHandler"]}}};Ue([Z.RegisterComponent({name:"nylas-list-configurations",stateToProps:new Map([["schedulerConfig.configurations","configurations"],["schedulerConfig.listConfigurationsNextCursor","listConfigurationsNextCursor"]]),localPropsToProp:new Map([["schedulerPreviewLink","schedulerPreviewLink"]]),eventToProps:{initListConfigurations:async(e,n)=>{const{host:i,cursor:o}=e.detail;await i.setState("loading");const[r,a]=await n.schedulerConfig.getConfigurations(o);if(!r&&a&&a.message){await i.setState("error"),await i.setError(a.message);return}await i.setState("loaded")},createButtonClick:async(e,n)=>{n.schedulerConfigStore.resetSelectedConfiguration(),n.schedulerConfigStore.state.action="create"},deleteButtonClick:async(e,n)=>{const{host:i,configuration:o}=e.detail,[r,a]=await n.schedulerConfig.deleteConfiguration(o.id);!r&&a&&a.message&&(await i.setState("error"),await i.setError(a.message))},editButtonClick:async(e,n)=>{const{configuration:i}=e.detail;n.schedulerConfigStore.state.selectedConfiguration=i,n.schedulerConfigStore.state.action="edit"}},fireRegisterEvent:!0}),V("design:type",Function),V("design:paramtypes",[]),V("design:returntype",void 0)],q.prototype,"render",null);q.style=Me;exports.google_logo_icon=Se;exports.microsoft_logo_icon=Te;exports.nylas_booking_type=J;exports.nylas_editor_tabs=W;exports.nylas_list_configurations=q;