@nylas/react 0.0.0-canary-20240925163706

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 (135) hide show
  1. package/LICENSE.md +22 -0
  2. package/README.md +111 -0
  3. package/dist/add-circle-icon_2.entry-19a0fe6b.js +25 -0
  4. package/dist/add-circle-icon_2.entry-6f0ef50b.cjs +1 -0
  5. package/dist/archive-icon.entry-7caa062b.js +15 -0
  6. package/dist/archive-icon.entry-d9a39415.cjs +1 -0
  7. package/dist/arrow-icon.entry-29ce2105.cjs +1 -0
  8. package/dist/arrow-icon.entry-ab601786.js +15 -0
  9. package/dist/bold-icon.entry-6ff126e7.cjs +1 -0
  10. package/dist/bold-icon.entry-e389dd6a.js +15 -0
  11. package/dist/button-component_2.entry-06af034d.js +26 -0
  12. package/dist/button-component_2.entry-837792bd.cjs +1 -0
  13. package/dist/calendar-agenda-fill-icon_51.entry-6c5c6fd4.js +5336 -0
  14. package/dist/calendar-agenda-fill-icon_51.entry-aaa927bb.cjs +7 -0
  15. package/dist/calendar-cancel-icon.entry-bf97fa74.js +15 -0
  16. package/dist/calendar-cancel-icon.entry-da33711a.cjs +1 -0
  17. package/dist/calendar-check-icon_2.entry-0fcc2bd1.cjs +1 -0
  18. package/dist/calendar-check-icon_2.entry-e9709591.js +25 -0
  19. package/dist/calendar-icon.entry-056c8caf.cjs +1 -0
  20. package/dist/calendar-icon.entry-70cca97a.js +15 -0
  21. package/dist/checkbox-component_2.entry-88af9f01.js +79 -0
  22. package/dist/checkbox-component_2.entry-cf19cd62.cjs +1 -0
  23. package/dist/chevron-icon_3.entry-1c22f6d3.js +143 -0
  24. package/dist/chevron-icon_3.entry-85d098ed.cjs +1 -0
  25. package/dist/clock-icon_4.entry-5edf8fcd.js +45 -0
  26. package/dist/clock-icon_4.entry-7b892d79.cjs +1 -0
  27. package/dist/constants-c31dccfe-54f255f4.cjs +15 -0
  28. package/dist/constants-c31dccfe-93b0694c.js +3883 -0
  29. package/dist/copy-icon.entry-b3b8e543.js +15 -0
  30. package/dist/copy-icon.entry-fcd2c006.cjs +1 -0
  31. package/dist/core-js-38e53e34.cjs +4 -0
  32. package/dist/core-js-a9d3b6e1.js +3297 -0
  33. package/dist/delete-icon.entry-9745ae8b.cjs +1 -0
  34. package/dist/delete-icon.entry-f982c1a7.js +15 -0
  35. package/dist/document-refresh-icon.entry-5a30a275.cjs +1 -0
  36. package/dist/document-refresh-icon.entry-defaaba2.js +15 -0
  37. package/dist/dom-68f08be9.cjs +15 -0
  38. package/dist/dom-86e17616.js +664 -0
  39. package/dist/elements/index.d.ts +128 -0
  40. package/dist/elements/react-component-lib/createComponent.d.ts +10 -0
  41. package/dist/elements/react-component-lib/createOverlayComponent.d.ts +21 -0
  42. package/dist/elements/react-component-lib/index.d.ts +2 -0
  43. package/dist/elements/react-component-lib/interfaces.d.ts +29 -0
  44. package/dist/elements/react-component-lib/utils/attachProps.d.ts +9 -0
  45. package/dist/elements/react-component-lib/utils/case.d.ts +2 -0
  46. package/dist/elements/react-component-lib/utils/dev.d.ts +2 -0
  47. package/dist/elements/react-component-lib/utils/index.d.ts +10 -0
  48. package/dist/feedbackSync-ab657d65-b98458dc.cjs +448 -0
  49. package/dist/feedbackSync-ab657d65-d6521095.js +6035 -0
  50. package/dist/folder-icon.entry-08cf370b.js +15 -0
  51. package/dist/folder-icon.entry-425f61ef.cjs +1 -0
  52. package/dist/forward-icon.entry-4acbada4.js +15 -0
  53. package/dist/forward-icon.entry-7062edbf.cjs +1 -0
  54. package/dist/globe-icon.entry-51e847a3.js +15 -0
  55. package/dist/globe-icon.entry-b779a059.cjs +1 -0
  56. package/dist/google-logo-icon_4.entry-96a8caee.cjs +1 -0
  57. package/dist/google-logo-icon_4.entry-c44f16cc.js +715 -0
  58. package/dist/inbox-icon.entry-04d81697.cjs +1 -0
  59. package/dist/inbox-icon.entry-6e3a9428.js +15 -0
  60. package/dist/index-87381561.cjs +81 -0
  61. package/dist/index-995dd3b3.js +12865 -0
  62. package/dist/index.d.ts +6 -0
  63. package/dist/index.es-b475d61f-f250d992.cjs +7 -0
  64. package/dist/index.es-b475d61f-f52875ad.js +3129 -0
  65. package/dist/info-icon_2.entry-c3f4b245.js +34 -0
  66. package/dist/info-icon_2.entry-d733f421.cjs +1 -0
  67. package/dist/input-color-picker.entry-02e48131.js +48 -0
  68. package/dist/input-color-picker.entry-516445b9.cjs +1 -0
  69. package/dist/input-component.entry-5bb8197a.cjs +1 -0
  70. package/dist/input-component.entry-dbff4e12.js +70 -0
  71. package/dist/input-dropdown.entry-7b40f8a7.cjs +1 -0
  72. package/dist/input-dropdown.entry-cc4182c4.js +134 -0
  73. package/dist/italic-icon.entry-494a04f1.js +15 -0
  74. package/dist/italic-icon.entry-bd268b46.cjs +1 -0
  75. package/dist/multi-select-dropdown.entry-55f7dd99.cjs +1 -0
  76. package/dist/multi-select-dropdown.entry-b9ac9a80.js +95 -0
  77. package/dist/nylas-booked-event-card_12.entry-a1048d4e.cjs +1 -0
  78. package/dist/nylas-booked-event-card_12.entry-ac8f1a11.js +1139 -0
  79. package/dist/nylas-form-card.entry-9957f25c.cjs +1 -0
  80. package/dist/nylas-form-card.entry-9ec44108.js +57 -0
  81. package/dist/nylas-if-state.entry-934980c1.js +94 -0
  82. package/dist/nylas-if-state.entry-f7087bb0.cjs +1 -0
  83. package/dist/nylas-login.entry-074778e6.cjs +1 -0
  84. package/dist/nylas-login.entry-17a6788a.js +73 -0
  85. package/dist/nylas-provider.entry-0edfffb0.cjs +1 -0
  86. package/dist/nylas-provider.entry-58e44ef6.js +264 -0
  87. package/dist/nylas-reminder-emails.entry-0129ea1f.cjs +4 -0
  88. package/dist/nylas-reminder-emails.entry-dec904fb.js +168 -0
  89. package/dist/nylas-reminder-time_2.entry-48b85638.js +108 -0
  90. package/dist/nylas-reminder-time_2.entry-6d8982d9.cjs +1 -0
  91. package/dist/nylas-scheduler-editor.entry-a913f2b3.js +1447 -0
  92. package/dist/nylas-scheduler-editor.entry-b293366d.cjs +2 -0
  93. package/dist/nylas-scheduling.entry-29b473ef.js +400 -0
  94. package/dist/nylas-scheduling.entry-5d751778.cjs +1 -0
  95. package/dist/nylas-time-window-picker.entry-aa613b4d.cjs +1 -0
  96. package/dist/nylas-time-window-picker.entry-d2e2210e.js +316 -0
  97. package/dist/person-icon.entry-11852b43.cjs +1 -0
  98. package/dist/person-icon.entry-767695db.js +15 -0
  99. package/dist/play-icon.entry-125d062f.cjs +1 -0
  100. package/dist/play-icon.entry-9e385af9.js +15 -0
  101. package/dist/react.cjs +1 -0
  102. package/dist/react.js +136 -0
  103. package/dist/refresh-icon.entry-13e06ddd.cjs +1 -0
  104. package/dist/refresh-icon.entry-339c1223.js +15 -0
  105. package/dist/register-component-679c1308-0b6682e1.cjs +1 -0
  106. package/dist/register-component-679c1308-3b561946.js +109 -0
  107. package/dist/reply-all-icon.entry-e56e8608.cjs +1 -0
  108. package/dist/reply-all-icon.entry-f82e7b24.js +15 -0
  109. package/dist/reply-icon.entry-319e75df.js +15 -0
  110. package/dist/reply-icon.entry-ebb08667.cjs +1 -0
  111. package/dist/scheduler-config-store-2a3b403d-aed2458a.cjs +1 -0
  112. package/dist/scheduler-config-store-2a3b403d-f5b7b06f.js +27 -0
  113. package/dist/scheduler-store-908886c8-75b1f2d8.js +474 -0
  114. package/dist/scheduler-store-908886c8-9c388312.cjs +1 -0
  115. package/dist/sent-icon.entry-2f7a8e18.js +15 -0
  116. package/dist/sent-icon.entry-393a90a3.cjs +1 -0
  117. package/dist/spam-icon.entry-d7853085.cjs +1 -0
  118. package/dist/spam-icon.entry-de7c7233.js +15 -0
  119. package/dist/star-icon.entry-c8fa29e1.cjs +1 -0
  120. package/dist/star-icon.entry-cfb5c8e5.js +15 -0
  121. package/dist/stop-icon.entry-c6e9fd7f.js +15 -0
  122. package/dist/stop-icon.entry-e5415d24.cjs +1 -0
  123. package/dist/textarea-component.entry-6f80f914.js +37 -0
  124. package/dist/textarea-component.entry-d46ad4ac.cjs +1 -0
  125. package/dist/time-period-selector.entry-2eaf3ddb.cjs +1 -0
  126. package/dist/time-period-selector.entry-f8be5854.js +80 -0
  127. package/dist/translate-icon.entry-dc151da3.cjs +1 -0
  128. package/dist/translate-icon.entry-ffb6d5bf.js +15 -0
  129. package/dist/trash-fill-icon.entry-063b2e26.cjs +1 -0
  130. package/dist/trash-fill-icon.entry-a9966957.js +15 -0
  131. package/dist/underline-icon.entry-b992a0fc.js +15 -0
  132. package/dist/underline-icon.entry-c77e97df.cjs +1 -0
  133. package/dist/warning-icon.entry-0cae2440.cjs +1 -0
  134. package/dist/warning-icon.entry-28c1b03b.js +15 -0
  135. package/package.json +50 -0
@@ -0,0 +1,715 @@
1
+ import { r as Z, h as t, c as S, d as u, n as Oe, o as q, H as Fe, g as Le, F as Ne } from "./index-995dd3b3.js";
2
+ import { R as Te } from "./register-component-679c1308-3b561946.js";
3
+ import { D as Se } from "./constants-c31dccfe-93b0694c.js";
4
+ import { i as Ie, a as De, c as Me, b as Ue, f as Re } from "./feedbackSync-ab657d65-d6521095.js";
5
+ import "react";
6
+ import "react-dom";
7
+ const ze = ".sc-google-logo-icon-h{display:flex}", Ae = ze, je = class {
8
+ constructor(e) {
9
+ Z(this, e), this.width = "24", this.height = "24";
10
+ }
11
+ render() {
12
+ return t("svg", { key: "a06d22f0d67de58b6ca0d31c9980400c819e607b", width: this.width, height: this.height, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, t("g", { key: "22c2b23c17153179d6f6bbda7a520787f644d585", "clip-path": "url(#clip0_959_12452)" }, t("path", { key: "4385f7c75d0489150392bdda360f7ca6290afd90", d: "M23.745 12.27C23.745 11.48 23.675 10.73 23.555 10H12.255V14.51H18.725C18.435 15.99 17.585 17.24 16.325 18.09V21.09H20.185C22.445 19 23.745 15.92 23.745 12.27Z", fill: "#4285F4" }), t("path", { key: "87bea699e7c730fce86f76d7f37e190e4af19bb9", d: "M12.255 24C15.495 24 18.205 22.92 20.185 21.09L16.325 18.09C15.245 18.81 13.875 19.25 12.255 19.25C9.12504 19.25 6.47505 17.14 5.52505 14.29H1.54504V17.38C3.51504 21.3 7.56504 24 12.255 24Z", fill: "#34A853" }), t("path", { key: "2e1a5bdde759449669a12d31800897d84e8fc068", d: "M5.52501 14.2901C5.27501 13.5701 5.145 12.8001 5.145 12.0001C5.145 11.2001 5.28501 10.4301 5.52501 9.71012V6.62012H1.545C0.725004 8.24012 0.255005 10.0601 0.255005 12.0001C0.255005 13.9401 0.725004 15.7601 1.545 17.3801L5.52501 14.2901Z", fill: "#FBBC05" }), t("path", { key: "0e050d40bb7769401c05296a9f4ec6e9142622ad", d: "M12.255 4.75C14.025 4.75 15.605 5.36 16.855 6.55L20.275 3.13C18.205 1.19 15.495 0 12.255 0C7.56504 0 3.51504 2.7 1.54504 6.62L5.52505 9.71C6.47505 6.86 9.12504 4.75 12.255 4.75Z", fill: "#EA4335" })), t("defs", { key: "860be485d0474ca8a1e46aacb8fc4fd26eda68ee" }, t("clipPath", { key: "200a000106a3593f6aece253719fd0702f8466c7", id: "clip0_959_12452" }, t("rect", { key: "b6a76840c1916471734a0e85b647d6ab971c077d", width: 24, height: 24, fill: "white" }))));
13
+ }
14
+ };
15
+ je.style = Ae;
16
+ const $e = ".sc-microsoft-logo-icon-h{display:flex}", Je = $e, Ve = class {
17
+ constructor(e) {
18
+ Z(this, e), this.width = "22", this.height = "22";
19
+ }
20
+ render() {
21
+ return t("svg", { key: "fc33f77dfa00d5005e0c8f13d983785e20173c6c", width: this.width, height: this.height, viewBox: "0 0 22 22", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "31122d1cf5f3d8e18ff7e84296b53f7b1ecdb495", d: "M0.043457 0.043457H10.4782V10.4782H0.043457V0.043457Z", fill: "#F35325" }), t("path", { key: "04f012e97f8a8b58940517e3a53c33025400c577", d: "M11.5217 0.043457H21.9565V10.4782H11.5217V0.043457Z", fill: "#81BC06" }), t("path", { key: "b116a8a944b943a9d39d4679b640965d53b3e5a6", d: "M0.043457 11.5217H10.4782V21.9565H0.043457V11.5217Z", fill: "#05A6F0" }), t("path", { key: "abf74fe1e2b7afc3cb8bc2d024e00560a100daee", d: "M11.5217 11.5217H21.9565V21.9565H11.5217V11.5217Z", fill: "#FFBA08" }));
22
+ }
23
+ };
24
+ Ve.style = Je;
25
+ var o;
26
+ (function(e) {
27
+ e.EventInfo = "eventInfo", e.Availability = "availability", e.BookingOptions = "bookingOptions", e.Communications = "communications", e.Participants = "participants", e.BookingForm = "bookingForm", e.PageStyles = "pageStyles";
28
+ })(o || (o = {}));
29
+ function Ze({ id: e, formState: a, activeTab: i }, n) {
30
+ return t(
31
+ Ne,
32
+ null,
33
+ t(
34
+ "div",
35
+ { key: `event-info-${e}`, class: { hide: i !== o.EventInfo } },
36
+ t(
37
+ "nylas-event-info",
38
+ null,
39
+ t(
40
+ "div",
41
+ { slot: "inputs" },
42
+ t("nylas-event-title", { name: "title", exportparts: "net, net__title, net__dropdown-content" }),
43
+ t("nylas-event-duration", { name: "duration", exportparts: "ned, ned__dropdown, ned__dropdown-button, ned__dropdown-content, ned__input_dropdown, ned__input_dropdown-input, ned__input_dropdown-content" }),
44
+ t("nylas-event-location", { name: "location", exportparts: "nel, nel__location, nel__dropdown, nel__dropdown-button, nel__dropdown-content" }),
45
+ t("nylas-event-description", { name: "description", exportparts: "nedesc, nedesc__textarea" })
46
+ )
47
+ )
48
+ ),
49
+ t(
50
+ "div",
51
+ { key: `availability-${e}`, class: { hide: i !== o.Availability } },
52
+ t("nylas-participant-booking-calendars", { participants: a.participants, name: "participant-booking-calendars" }),
53
+ t("nylas-connected-calendars", { participants: a.participants, name: "connected-calendars" }),
54
+ t("nylas-availability-picker", { name: "availability", 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" })
55
+ ),
56
+ t(
57
+ "div",
58
+ { key: `booking-options-${e}`, class: { hide: i !== o.BookingOptions } },
59
+ t("nylas-scheduling-method", { name: "availability-method", readOnly: !0, exportparts: "nsm, nsm__header, nsm__input-label, nsm__dropdown, nsm__dropdown-button, nsm__dropdown-content" }),
60
+ t(
61
+ "nylas-custom-booking-flow",
62
+ null,
63
+ t(
64
+ "div",
65
+ { slot: "inputs" },
66
+ t("nylas-booking-confirmation-type", { name: "confirmation-type", exportparts: "nbct, nbct__header, nbct__dropdown, nbct__dropdown-button, nbct__dropdown-content" }),
67
+ t("nylas-booking-confirmation-redirect", { name: "confirmation-redirect", exportparts: "nbcr, nbcr__header, nbcr__dropdown, nbcr__dropdown-button, nbcr__dropdown-content, nbcr__input-textfield" })
68
+ )
69
+ ),
70
+ t("nylas-buffer-time", { name: "buffer-time", exportparts: "nbt, nbt__header, nbt__body, nbt__dropdown-before, nbt__dropdown-button-before, nbt__dropdown-content-before, nbt__dropdown-after, nbt__dropdown-button-after, nbt__dropdown-content-after, nbt__preview" }),
71
+ t(
72
+ "nylas-event-limits",
73
+ null,
74
+ t(
75
+ "div",
76
+ { slot: "inputs" },
77
+ t("nylas-min-booking-notice", { name: "min-booking-notice", exportparts: "nmbn, nmbn__number-dropdown, nmbn__number-dropdown-button, nmbn__number-dropdown-content, nmbn__period-dropdown, nmbn__period-dropdown-button, nmbn__period-dropdown-content" }),
78
+ t("nylas-limit-future-bookings", { name: "limit-future-bookings", exportparts: "nlfb, nlfb__number-dropdown, nlfb__number-dropdown-button, nlfb__number-dropdown-content, nlfb__period-dropdown, nlfb__period-dropdown-button, nlfb__period-dropdown-content" }),
79
+ t("nylas-min-cancellation-notice", { name: "min-cancellation-notice", exportparts: "nmcn, nmcn__number-dropdown, nmcn__number-dropdown-button, nmcn__number-dropdown-content, nmcn__period-dropdown, nmcn__period-dropdown-button, nmcn__period-dropdown-content" }),
80
+ t("nylas-cancellation-policy", { name: "cancellation-policy", exportparts: "ncpolicy, ncpolicy__textarea" })
81
+ )
82
+ ),
83
+ t("nylas-timeslot-interval", { name: "timeslot-interval", exportparts: "nti, nti__header, nti__input-label, nti__dropdown, nti__dropdown-button, nti__dropdown-content" }),
84
+ t("nylas-customize-booking-settings", { name: "customize-booking-settings", exportparts: "ncbs, ncbs__header, ncbs__settings, ncbs__settings-div, ncbs__additional_guests, ncbs__cancellation_options, ncbs__rescheduling_options" })
85
+ ),
86
+ t(
87
+ "div",
88
+ { key: `communications-${e}`, class: { hide: i !== o.Communications } },
89
+ t(
90
+ "div",
91
+ { class: "tab-header" },
92
+ t("h3", null, "Event communications"),
93
+ t("p", null, "Set up automatic confirmation emails.")
94
+ ),
95
+ t("nylas-confirmation-email", { name: "confirmation-email-template", exportparts: "nce, nce__tab-heading, nce__header, nce__body, nce__confirmation-email-toggle--container, nce__summary, nce__reminder-input_dropdown, nce__reminder-input_dropdown-input, nce__reminder-input_dropdown-content" })
96
+ ),
97
+ t(
98
+ "div",
99
+ { key: `participants-${e}`, class: { hide: i !== o.Participants } },
100
+ t("nylas-additional-participants", { name: "participants", exportparts: "nap__title, nap__subtitle, nap__content, nap__input_group, nap__input_wrapper, nap__input, nap__remove-participant" }),
101
+ t("nylas-participants-custom-availability", { participants: a.participants, name: "participant-custom-availability", exportparts: "npca, npca__header, npca__content, npca__participant-container, npca__participant-title, npca__participant-toggle--container, npca__toggle-label, npca__toggle-input, npca__toggle-slider" })
102
+ ),
103
+ t(
104
+ "div",
105
+ { key: `page-styles-${e}`, class: { hide: i !== o.PageStyles } },
106
+ t("nylas-custom-event-slug", { name: "custom-event-slug", exportparts: "nces, nces__body, nces__header, nces__drawer-toggle--container, nces__input-textfield" }),
107
+ t("nylas-page-name", { name: "page-name", exportparts: "npn, npn__body, npn__header, npn__drawer-toggle--container, npn__input-textfield" }),
108
+ t("nylas-page-styling", { name: "page-styling", exportparts: "nps, nps__header, nps__drawer-toggle--container, nps__body, nps__title-input-textfield, nps__company-logo-input-textfield, nps__color-picker, nps__color-picker-button, nps__color-picker-button-label, nps__color-picker-selected-label, nps__submit-button-label-input-textfield, nps__message-textarea" }, n)
109
+ ),
110
+ t(
111
+ "div",
112
+ { key: `booking-form-${e}`, class: { hide: i !== o.BookingForm } },
113
+ t("nylas-booking-form-config", { name: "additional-fields" })
114
+ )
115
+ );
116
+ }
117
+ const Ge = '.sc-nylas-editor-tabs-h{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.scheduler-editor.sc-nylas-editor-tabs{display:flex;flex-direction:column;height:inherit}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs{height:calc(100% - 80px);display:grid;grid-template-columns:minmax(224px, 25%) 1fr}@media screen and (max-width: 768px){.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs{display:table-column-group;height:auto}}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs{display:flex;flex-direction:column;border-right:1px solid var(--nylas-base-200);background-color:var(--nylas-base-25)}@media screen and (max-width: 768px){.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs{border-right:none}}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.sc-nylas-editor-tabs{display:flex;align-items:center;gap:0.5rem;padding:0.5rem 1rem;color:var(--nylas-base-900);background:var(--nylas-base-0);border:none;height:56px;font-family:var(--nylas-font-family);font-size:16px;font-weight:500;line-height:24px;cursor:pointer}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.sc-nylas-editor-tabs:not(:first-of-type){margin-top:0.25rem}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.sc-nylas-editor-tabs:last-of-type{margin-bottom:0.25rem}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.active.sc-nylas-editor-tabs{font-weight:600;background:var(--nylas-base-0);color:var(--nylas-primary);border-left:4px solid var(--nylas-primary);box-shadow:0px 1px 2px 0px rgba(0, 0, 0, 0.0588235294);box-shadow:0px 1px 3px 0px rgba(0, 0, 0, 0.1019607843)}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.hide.sc-nylas-editor-tabs{display:none}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs{max-width:692px;overflow-y:auto;overflow-x:hidden}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs .hide.sc-nylas-editor-tabs{display:none}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-info.sc-nylas-editor-tabs,.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-limits.sc-nylas-editor-tabs{width:inherit}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-info.sc-nylas-editor-tabs div[slot=inputs].sc-nylas-editor-tabs,.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-limits.sc-nylas-editor-tabs div[slot=inputs].sc-nylas-editor-tabs{display:flex;flex-direction:column;gap:1rem}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs .tab-header.sc-nylas-editor-tabs{display:flex;flex-direction:column;margin:1rem 1rem 0.5rem;row-gap:4px}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs .tab-header.sc-nylas-editor-tabs h3.sc-nylas-editor-tabs{margin:0;font-size: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}button-component#report-issue.sc-nylas-editor-tabs{width:auto}nylas-feedback-form.sc-nylas-editor-tabs{position:absolute;top:0;height:100%;width:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;background:rgba(0, 0, 0, 0.6);z-index:2;border-radius:inherit}', We = Ge;
118
+ var qe = function(e, a, i, n) {
119
+ var l = arguments.length, s = l < 3 ? a : n === null ? n = Object.getOwnPropertyDescriptor(a, i) : n, c;
120
+ if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
121
+ s = Reflect.decorate(e, a, i, n);
122
+ else
123
+ for (var d = e.length - 1; d >= 0; d--)
124
+ (c = e[d]) && (s = (l < 3 ? c(s) : l > 3 ? c(a, i, s) : c(a, i)) || s);
125
+ return l > 3 && s && Object.defineProperty(a, i, s), s;
126
+ }, G = function(e, a) {
127
+ if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
128
+ return Reflect.metadata(e, a);
129
+ };
130
+ const Pe = class {
131
+ constructor(e) {
132
+ Z(this, e), this.schedulerConfigChanged = S(this, "schedulerConfigChanged", 7), this.cancelButtonClick = S(this, "cancelButtonClick", 7), this.formSubmitted = S(this, "formSubmitted", 7), this.previewButtonClicked = S(this, "previewButtonClicked", 7), this.schedulerEditorFormUpdated = S(this, "schedulerEditorFormUpdated", 7), this.setError = (a) => {
133
+ this.error = a.message;
134
+ }, this.formSubmissionHandler = async (a) => {
135
+ var K, Q, X, Y, ee, te, ae, ie, ne, se, oe, re, le, de, ce, be;
136
+ a.preventDefault();
137
+ const i = await this.formSubmitted.emit();
138
+ if (u("[nylas-editor-tabs]", "formSubmissionHandler", i), !this.formRef.checkValidity() || i.defaultPrevented) {
139
+ this.error = this.formRef.validationMessage || "Please fix the form errors.";
140
+ return;
141
+ }
142
+ this.isLoading = !0, this.hasUnsavedChanges = !1;
143
+ const l = this.updateFormState(), { title: s, description: c, duration: d, availability: h, bookingCalendar: y, location: F, bookingType: g, buffer: L, availableDaysInFuture: B, minCancellationNotice: H, minBookingNotice: O, cancellationPolicy: N, timeslotInterval: k, additionalGuestsHidden: I, hideCancellationOptions: D, hideReschedulingOptions: M, participants: w, participantOpenHours: p, additionalFields: U, participantCalendars: f, conferencing: R, participantBookingCalendars: m, reminders: z, emailTemplate: A, redirectUrl: j, availabilityMethod: T, slug: $, appearance: J, name: V } = l, b = ((Q = (K = this.selectedConfiguration) == null ? void 0 : K.participants) == null ? void 0 : Q.find((r) => r.is_organizer)) || (w == null ? void 0 : w.find((r) => r.is_organizer)), C = f && (b != null && b.email) ? f[b == null ? void 0 : b.email] : [], _ = ((X = b == null ? void 0 : b.booking) == null ? void 0 : X.calendar_id) || y, v = d ? parseInt(d) : 30, x = w && (w == null ? void 0 : w.length) > 0 ? w : [
144
+ {
145
+ name: (b == null ? void 0 : b.name) ?? ((Y = this.currentUser) == null ? void 0 : Y.name) ?? "",
146
+ email: (b == null ? void 0 : b.email) ?? ((ee = this.currentUser) == null ? void 0 : ee.email) ?? "",
147
+ is_organizer: !0,
148
+ timezone: (h == null ? void 0 : h.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
149
+ availability: {
150
+ calendar_ids: C.length ? C : ["primary"],
151
+ open_hours: []
152
+ },
153
+ booking: {
154
+ calendar_id: y && y !== "" ? y : "primary"
155
+ }
156
+ }
157
+ ], P = {
158
+ ...((te = this.selectedConfiguration) == null ? void 0 : te.id) && { id: this.selectedConfiguration.id },
159
+ version: ((ae = this.selectedConfiguration) == null ? void 0 : ae.version) ?? "1.0.0",
160
+ slug: $,
161
+ name: V,
162
+ availability: {
163
+ duration_minutes: v,
164
+ interval_minutes: (k == null ? void 0 : k.interval) ?? v,
165
+ round_to: k == null ? void 0 : k.roundTo,
166
+ availability_rules: {
167
+ availability_method: T || (((se = (ne = (ie = this.selectedConfiguration) == null ? void 0 : ie.availability) == null ? void 0 : ne.availability_rules) == null ? void 0 : se.availability_method) ?? "collective"),
168
+ buffer: L || { before: 0, after: 0 },
169
+ default_open_hours: (h == null ? void 0 : h.openHours) ?? ((le = (re = (oe = this.selectedConfiguration) == null ? void 0 : oe.availability) == null ? void 0 : re.availability_rules) == null ? void 0 : le.default_open_hours) ?? Se,
170
+ round_robin_group_id: ((be = (ce = (de = this.selectedConfiguration) == null ? void 0 : de.availability) == null ? void 0 : ce.availability_rules) == null ? void 0 : be.round_robin_group_id) ?? ""
171
+ }
172
+ },
173
+ participants: [
174
+ ...x == null ? void 0 : x.map((r) => {
175
+ var he, ue, pe, me, fe, ye, ge, _e, ve, we, ke, Ce, xe;
176
+ return r.is_organizer ? {
177
+ name: r.name ?? "",
178
+ email: r.email,
179
+ is_organizer: !0,
180
+ timezone: ((ue = (he = p == null ? void 0 : p[r.email]) == null ? void 0 : he[0]) == null ? void 0 : ue.timezone) ?? ((fe = (me = (pe = r.availability) == null ? void 0 : pe.open_hours) == null ? void 0 : me[0]) == null ? void 0 : fe.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
181
+ availability: {
182
+ calendar_ids: f != null && f[r.email] ? f == null ? void 0 : f[r.email] : C != null && C.length ? C : ["primary"],
183
+ open_hours: (p == null ? void 0 : p[r.email]) ?? ((ye = r.availability) == null ? void 0 : ye.open_hours) ?? []
184
+ },
185
+ booking: {
186
+ calendar_id: m != null && m[r.email] ? m == null ? void 0 : m[r.email] : _ || "primary"
187
+ }
188
+ } : {
189
+ ...r,
190
+ timezone: ((_e = (ge = p == null ? void 0 : p[r.email]) == null ? void 0 : ge[0]) == null ? void 0 : _e.timezone) ?? ((ke = (we = (ve = r.availability) == null ? void 0 : ve.open_hours) == null ? void 0 : we[0]) == null ? void 0 : ke.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
191
+ availability: r.availability ? {
192
+ calendar_ids: (f == null ? void 0 : f[r.email]) ?? ((Ce = r.availability) == null ? void 0 : Ce.calendar_ids) ?? ["primary"],
193
+ open_hours: (p == null ? void 0 : p[r.email]) ?? ((xe = r.availability) == null ? void 0 : xe.open_hours) ?? []
194
+ } : void 0,
195
+ booking: m != null && m[r.email] ? { calendar_id: m == null ? void 0 : m[r.email] } : (r == null ? void 0 : r.booking) ?? void 0
196
+ };
197
+ })
198
+ ],
199
+ event_booking: {
200
+ title: (s == null ? void 0 : s.toString()) ?? "",
201
+ description: (c == null ? void 0 : c.toString()) ?? "",
202
+ location: (F == null ? void 0 : F.toString()) ?? "",
203
+ booking_type: (g == null ? void 0 : g.toString()) ?? "booking",
204
+ timezone: (h == null ? void 0 : h.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
205
+ conferencing: R,
206
+ reminders: z
207
+ },
208
+ scheduler: {
209
+ cancellation_policy: N ?? "",
210
+ available_days_in_future: B ?? 30,
211
+ min_cancellation_notice: H ?? 0,
212
+ min_booking_notice: O ?? 60,
213
+ hide_additional_guests: I ?? !1,
214
+ hide_cancellation_options: D ?? !1,
215
+ hide_rescheduling_options: M ?? !1,
216
+ additional_fields: U,
217
+ email_template: A,
218
+ confirmation_redirect_url: j
219
+ },
220
+ appearance: J
221
+ }, Be = Oe(P, this.selectedConfiguration), E = this.action === "create" ? Be : P;
222
+ this.isConfigRoundRobin(E) && (E.participants = E.participants.map((r) => ({ ...r, is_organizer: void 0 })));
223
+ const He = (r) => {
224
+ this.isLoading = !1, this.changesSaved = !0, setTimeout(() => {
225
+ this.changesSaved = !1;
226
+ }, 5e3);
227
+ };
228
+ this.checkForClientSideErrors(E) || this.schedulerConfigChanged.emit({ config: E, resetLoadingState: He, setError: this.setError, action: this.action });
229
+ }, this.isConfigRoundRobin = (a) => {
230
+ var i, n, l, s;
231
+ return ((n = (i = a.availability) == null ? void 0 : i.availability_rules) == null ? void 0 : n.availability_method) === "max-availability" || ((s = (l = a.availability) == null ? void 0 : l.availability_rules) == null ? void 0 : s.availability_method) === "max-fairness";
232
+ }, this.checkForClientSideErrors = (a) => {
233
+ var d, h, y;
234
+ let i = !1, n = "";
235
+ const l = (d = a.scheduler) == null ? void 0 : d.additional_fields, s = ((h = a.event_booking) == null ? void 0 : h.booking_type) === "organizer-confirmation", c = (y = a.scheduler) == null ? void 0 : y.organizer_confirmation_url;
236
+ return l && (n = "Booking form error: ", Object.entries(l).forEach((F) => {
237
+ const g = F[1];
238
+ if (g.label === "") {
239
+ n += `Label is required for field of type ${g.type}.`, i = !0;
240
+ return;
241
+ }
242
+ if (g.options) {
243
+ for (const L of g.options)
244
+ if (L === "") {
245
+ n += `Empty option detected inside ${g.label} of type ${g.type}.`, i = !0;
246
+ break;
247
+ }
248
+ }
249
+ })), s && !c && (n += "Organizer confirmation URL is required when using organizer confirmation booking type.", i = !0), i && (this.isLoading = !1, this.setError(new Error(n))), i;
250
+ }, this.calendars = void 0, this.selectedConfiguration = void 0, this.currentUser = void 0, this.schedulerPreviewLink = "", this.mode = "app", this.hideEditorTabs = [], this.enableUserFeedback = !0, this.action = "create", this.showFeedbackModal = !1, this.activeTab = o.EventInfo, this.isLoading = !1, this.hasUnsavedChanges = !1, this.changesSaved = !1, this.formState = {}, this.error = "";
251
+ }
252
+ configChangedHandler(e) {
253
+ u("[nylas-editor-tabs]", "configChangedHandler", e, this.selectedConfiguration), this.formState = {
254
+ ...this.getFormStateFromConfig(e)
255
+ }, e != null && e.id ? this.action = "edit" : this.action = "create";
256
+ }
257
+ userChangedHandler(e) {
258
+ u("[nylas-editor-tabs]", "userChangedHandler", e), e && (this.formState = {
259
+ ...this.getFormStateFromConfig(this.selectedConfiguration)
260
+ });
261
+ }
262
+ connectedCallback() {
263
+ u("[nylas-editor-tabs]", "connectedCallback");
264
+ }
265
+ componentWillLoad() {
266
+ u("[nylas-editor-tabs]", "componentWillLoad"), this.formState = this.getFormStateFromConfig(this.selectedConfiguration);
267
+ }
268
+ componentDidLoad() {
269
+ var a, i;
270
+ u("[nylas-editor-tabs]", "componentDidLoad"), this.enableUserFeedback && !Ie() && De({
271
+ dsn: "https://9d5731f1c77ca84c9ed3fb9b3ccf7ee1@o74852.ingest.us.sentry.io/4507889638178816",
272
+ release: "1.1.3",
273
+ integrations: (n) => [
274
+ ...n.filter((l) => !1),
275
+ Re({
276
+ colorScheme: "system",
277
+ autoInject: !1
278
+ })
279
+ ],
280
+ autoSessionTracking: !1,
281
+ beforeSend: () => null
282
+ }), (a = this.selectedConfiguration) != null && a.id && this.configChangedHandler(this.selectedConfiguration);
283
+ const e = (i = this.host.querySelector("button.tab:not(.hide)")) == null ? void 0 : i.name;
284
+ e && (this.activeTab = e);
285
+ }
286
+ disconnectedCallback() {
287
+ u("[nylas-editor-tabs]", "disconnectedCallback");
288
+ }
289
+ handleValueChanged(e) {
290
+ u("[nylas-editor-tabs]", "handleValueChanged", e);
291
+ const { name: a, value: i } = e.detail;
292
+ this.setFormState(i, a), this.formState = { ...this.formState }, this.hasUnsavedChanges = !0, this.error = "", this.schedulerEditorFormUpdated.emit({
293
+ value: e.detail.value,
294
+ name: e.detail.name
295
+ });
296
+ }
297
+ feedbackModalClosedHandler() {
298
+ this.showFeedbackModal = !1;
299
+ }
300
+ feedbackSubmittedHandler(e) {
301
+ var n, l;
302
+ const i = {
303
+ eventId: Me("Scheduler Editor User Feedback"),
304
+ message: e.detail.feedback
305
+ };
306
+ Ue(i, {
307
+ includeReplay: !0,
308
+ captureContext: {
309
+ tags: {
310
+ "nylas-web-element": "nylas-scheduler-editor",
311
+ "nylas-web-element-version": "1.1.3"
312
+ },
313
+ extra: {
314
+ configId: (n = this.selectedConfiguration) == null ? void 0 : n.id,
315
+ slug: (l = this.selectedConfiguration) == null ? void 0 : l.slug
316
+ }
317
+ }
318
+ }), this.showFeedbackModal = !1;
319
+ }
320
+ getFormStateFromConfig(e) {
321
+ var i, n, l, s, c, d, h, y, F, g, L, B, H, O, N, k, I, D, M, w, p, U, f, R, m, z, A, j, T, $, J, V, b, C;
322
+ let a = (i = e == null ? void 0 : e.participants) == null ? void 0 : i.find((_) => _.is_organizer);
323
+ return !a && ((l = (n = e == null ? void 0 : e.availability) == null ? void 0 : n.availability_rules) == null ? void 0 : l.availability_method) !== "collective" && (a = (s = e == null ? void 0 : e.participants) == null ? void 0 : s.find((_) => {
324
+ var v;
325
+ return _.email === ((v = this.currentUser) == null ? void 0 : v.email);
326
+ }), a && (a.is_organizer = !0)), e != null && e.appearance && console.info("Appearance settings have been returned from the given configuration; please remember to grab them from the configSettingsLoaded event and apply them as desired."), {
327
+ title: ((c = e == null ? void 0 : e.event_booking) == null ? void 0 : c.title) ?? "",
328
+ description: ((d = e == null ? void 0 : e.event_booking) == null ? void 0 : d.description) ?? "",
329
+ duration: ((y = (h = e == null ? void 0 : e.availability) == null ? void 0 : h.duration_minutes) == null ? void 0 : y.toString()) ?? "30",
330
+ availability: {
331
+ timezone: ((F = e == null ? void 0 : e.event_booking) == null ? void 0 : F.timezone) ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
332
+ openHours: ((L = (g = e == null ? void 0 : e.availability) == null ? void 0 : g.availability_rules) == null ? void 0 : L.default_open_hours) ?? Se
333
+ },
334
+ additionalFields: ((B = e == null ? void 0 : e.scheduler) == null ? void 0 : B.additional_fields) ?? {},
335
+ conferencing: ((H = e == null ? void 0 : e.event_booking) == null ? void 0 : H.conferencing) ?? {},
336
+ calendarIds: ((O = a == null ? void 0 : a.availability) == null ? void 0 : O.calendar_ids) ?? [],
337
+ participants: (e == null ? void 0 : e.participants) ?? [],
338
+ bookingCalendar: ((N = a == null ? void 0 : a.booking) == null ? void 0 : N.calendar_id) ?? (a == null ? void 0 : a.email) ?? "",
339
+ location: ((k = e == null ? void 0 : e.event_booking) == null ? void 0 : k.location) ?? "",
340
+ bookingType: ((I = e == null ? void 0 : e.event_booking) == null ? void 0 : I.booking_type) ?? "booking",
341
+ buffer: ((M = (D = e == null ? void 0 : e.availability) == null ? void 0 : D.availability_rules) == null ? void 0 : M.buffer) ?? { before: 0, after: 0 },
342
+ cancellationPolicy: ((w = e == null ? void 0 : e.scheduler) == null ? void 0 : w.cancellation_policy) ?? "",
343
+ availableDaysInFuture: ((p = e == null ? void 0 : e.scheduler) == null ? void 0 : p.available_days_in_future) ?? 30,
344
+ minCancellationNotice: ((U = e == null ? void 0 : e.scheduler) == null ? void 0 : U.min_cancellation_notice) ?? 0,
345
+ minBookingNotice: ((f = e == null ? void 0 : e.scheduler) == null ? void 0 : f.min_booking_notice) ?? 60,
346
+ timeslotInterval: {
347
+ interval: ((R = e == null ? void 0 : e.availability) == null ? void 0 : R.interval_minutes) ?? ((m = e == null ? void 0 : e.availability) == null ? void 0 : m.duration_minutes),
348
+ roundTo: (z = e == null ? void 0 : e.availability) == null ? void 0 : z.round_to
349
+ },
350
+ additionalGuestsHidden: ((A = e == null ? void 0 : e.scheduler) == null ? void 0 : A.hide_additional_guests) ?? !1,
351
+ hideCancellationOptions: ((j = e == null ? void 0 : e.scheduler) == null ? void 0 : j.hide_cancellation_options) ?? !1,
352
+ hideReschedulingOptions: ((T = e == null ? void 0 : e.scheduler) == null ? void 0 : T.hide_rescheduling_options) ?? !1,
353
+ participantBookingCalendars: (($ = e == null ? void 0 : e.participants) == null ? void 0 : $.reduce((_, v) => {
354
+ var x, P;
355
+ return (x = v.booking) != null && x.calendar_id && (_[v.email] = (P = v.booking) == null ? void 0 : P.calendar_id), _;
356
+ })) ?? {},
357
+ participantCalendars: ((J = e == null ? void 0 : e.participants) == null ? void 0 : J.reduce((_, v) => {
358
+ var x;
359
+ return _[v.email] = (x = v.availability) == null ? void 0 : x.calendar_ids, _;
360
+ }, {})) ?? {},
361
+ reminders: (V = e == null ? void 0 : e.event_booking) == null ? void 0 : V.reminders,
362
+ emailTemplate: (b = e == null ? void 0 : e.scheduler) == null ? void 0 : b.email_template,
363
+ redirectUrl: (C = e == null ? void 0 : e.scheduler) == null ? void 0 : C.confirmation_redirect_url,
364
+ slug: e == null ? void 0 : e.slug,
365
+ appearance: e == null ? void 0 : e.appearance,
366
+ name: e == null ? void 0 : e.name
367
+ };
368
+ }
369
+ setFormState(e, a) {
370
+ switch (a) {
371
+ case "title":
372
+ this.formState.title = e.toString();
373
+ break;
374
+ case "description":
375
+ this.formState.description = e.toString();
376
+ break;
377
+ case "duration":
378
+ this.formState.duration = e.toString();
379
+ break;
380
+ case "availability":
381
+ this.formState.availability = JSON.parse(e.toString());
382
+ break;
383
+ case "participants":
384
+ this.formState.participants = JSON.parse(e.toString());
385
+ break;
386
+ case "booking-calendar":
387
+ this.formState.bookingCalendar = e.toString();
388
+ break;
389
+ case "participant-booking-calendars":
390
+ this.formState.participantBookingCalendars = JSON.parse(e.toString());
391
+ break;
392
+ case "location":
393
+ this.formState.location = e.toString();
394
+ break;
395
+ case "conference":
396
+ this.formState.conferencing = JSON.parse(e.toString());
397
+ break;
398
+ case "confirmation-type":
399
+ this.formState.bookingType = e.toString();
400
+ break;
401
+ case "buffer-time":
402
+ this.formState.buffer = JSON.parse(e.toString());
403
+ break;
404
+ case "limit-future-bookings":
405
+ this.formState.availableDaysInFuture = parseInt(e.toString());
406
+ break;
407
+ case "min-cancellation-notice":
408
+ this.formState.minCancellationNotice = parseInt(e.toString());
409
+ break;
410
+ case "min-booking-notice":
411
+ this.formState.minBookingNotice = parseInt(e.toString());
412
+ break;
413
+ case "cancellation-policy":
414
+ this.formState.cancellationPolicy = e.toString();
415
+ break;
416
+ case "timeslot-interval":
417
+ this.formState.timeslotInterval = JSON.parse(e.toString());
418
+ break;
419
+ case "customize-booking-settings":
420
+ const i = JSON.parse(e.toString());
421
+ this.formState.additionalGuestsHidden = i.additionalGuestsHidden, this.formState.hideCancellationOptions = i.hideCancellationOptions, this.formState.hideReschedulingOptions = i.hideReschedulingOptions;
422
+ break;
423
+ case "participant-custom-availability":
424
+ const n = JSON.parse(e.toString());
425
+ this.formState.participantOpenHours = n;
426
+ break;
427
+ case "additional-fields":
428
+ this.formState.additionalFields = e;
429
+ break;
430
+ case "connected-calendars":
431
+ this.formState.participantCalendars = JSON.parse(e.toString());
432
+ break;
433
+ case "confirmation-email-template":
434
+ this.formState.emailTemplate = JSON.parse(e.toString());
435
+ break;
436
+ case "reminder-overrides":
437
+ this.formState.reminders = JSON.parse(e.toString());
438
+ break;
439
+ case "confirmation-redirect":
440
+ this.formState.redirectUrl = e.toString();
441
+ break;
442
+ case "availability-method":
443
+ this.formState.availabilityMethod = e.toString();
444
+ break;
445
+ case "custom-event-slug":
446
+ this.formState.slug = JSON.parse(e.toString());
447
+ break;
448
+ case "page-styling":
449
+ this.formState.appearance = JSON.parse(e.toString());
450
+ break;
451
+ case "page-name":
452
+ this.formState.name = JSON.parse(e.toString());
453
+ break;
454
+ }
455
+ this.schedulerEditorFormUpdated.emit({
456
+ value: e,
457
+ name: a
458
+ });
459
+ }
460
+ updateFormState() {
461
+ return new FormData(this.formRef).forEach((a, i) => {
462
+ this.setFormState(a, i);
463
+ }), this.formState = { ...this.formState }, this.formState;
464
+ }
465
+ setActiveTab(e, a) {
466
+ e.preventDefault(), this.updateFormState(), this.activeTab = a;
467
+ }
468
+ hideTab(e) {
469
+ var a;
470
+ return ((a = this.hideEditorTabs) == null ? void 0 : a.includes(e)) || !1;
471
+ }
472
+ onFeedbackClick() {
473
+ this.showFeedbackModal = !0;
474
+ }
475
+ render() {
476
+ var e, a;
477
+ return u("[nylas-editor-tabs]", "render", this.formState), t(Fe, { key: "b3440301e04060e3a7295486242651155c5ed70d" }, t("form", { key: "ef973a29f92732c5bf088d0c448ee2dedc4c5f20", onSubmit: this.formSubmissionHandler, class: "scheduler-editor", ref: (i) => this.formRef = i, noValidate: !0 }, this.mode === "app" ? t("div", { class: "form-contents" }, t("div", { class: "tabs" }, t("button", { name: o.EventInfo, class: { tab: !0, active: this.activeTab == o.EventInfo, hide: this.hideTab(o.EventInfo) }, part: "editortab__event-info", onClick: (i) => this.setActiveTab(i, o.EventInfo) }, t("calendar-info-icon", { width: "16", height: "16" }), "Event info"), t("button", { name: o.Availability, class: { tab: !0, active: this.activeTab == o.Availability, hide: this.hideTab(o.Availability) }, part: "editortab__availability", onClick: (i) => this.setActiveTab(i, o.Availability) }, t("calendar-patterns-icon", { width: "16", height: "16" }), "Availability"), t("button", { name: o.Participants, class: { tab: !0, active: this.activeTab == o.Participants, hide: this.hideTab(o.Participants) }, part: "editortab__participants", onClick: (i) => this.setActiveTab(i, o.Participants) }, t("people-icon", { width: "16", height: "16" }), "Participants"), t("button", { name: o.BookingOptions, class: { tab: !0, active: this.activeTab == o.BookingOptions, hide: this.hideTab(o.BookingOptions) }, part: "editortab__booking-options", onClick: (i) => this.setActiveTab(i, o.BookingOptions) }, t("flow-icon", { width: "16", height: "16" }), "Booking options"), t("button", { name: o.BookingForm, class: { tab: !0, active: this.activeTab == "bookingForm", hide: this.hideTab(o.BookingForm) }, part: "editortab__booking-form", onClick: (i) => this.setActiveTab(i, o.BookingForm) }, this.activeTab == o.BookingForm ? t("calendar-agenda-fill-icon", { width: "16", height: "16" }) : t("calendar-agenda-icon", { width: "16", height: "16" }), "Booking form"), t("button", { name: o.Communications, class: { tab: !0, active: this.activeTab == "communications", hide: this.hideTab(o.Communications) }, onClick: (i) => this.setActiveTab(i, o.Communications) }, this.activeTab == o.Communications ? t("envelope-fill-icon", { width: "16", height: "16" }) : t("envelope-icon", { width: "16", height: "16" }), "Communications"), t("button", { name: o.PageStyles, class: { tab: !0, active: this.activeTab == "pageStyles", hide: this.hideTab(o.PageStyles) }, onClick: (i) => this.setActiveTab(i, o.PageStyles) }, this.activeTab == o.PageStyles ? t("paintbrush-fill-icon", { width: "16", height: "16" }) : t("paintbrush-icon", { width: "16", height: "16" }), "Page styles")), t("div", { class: "tab-content" }, t(Ze, { formState: this.formState, activeTab: this.activeTab, currentUser: this.currentUser, calendars: this.calendars, id: ((e = this.selectedConfiguration) == null ? void 0 : e.id) ?? "new" }))) : t("div", { class: "composable", key: (a = this.selectedConfiguration) == null ? void 0 : a.id }, t("slot", null)), t("div", { key: "41723a253c2f3e62fe974905ccbc5b8c8d0d9994", class: "footer", part: "editor__footer" }, t("div", { key: "8b24038d8afffa273286bf28ecc939c774f68e42", class: "preview", part: "editor__footer-preview" }, this.enableUserFeedback && t("button-component", { title: "Share your feedback", id: "report-issue", variant: "basic", onClick: () => this.onFeedbackClick() }, t("feedback-icon", null))), t("div", { key: "1e2eeb76fd29e2699e3f82a3000a950371efe84e", class: "buttons", part: "editor__footer-buttons" }, t("p", { key: "a8e9d8d800f67297ff3da9e04f3e5f2f64fb7604", class: {
478
+ "unsaved-changes": this.hasUnsavedChanges && !this.changesSaved,
479
+ "saved-changes": this.changesSaved,
480
+ error: this.error !== "",
481
+ "error-full-width": this.error !== "" && this.action === "create"
482
+ } }, this.error !== "" ? this.error : "", this.error == "" && this.hasUnsavedChanges && !this.changesSaved ? "Unsaved changes" : this.error == "" && this.changesSaved ? "Changes saved!" : ""), this.schedulerPreviewLink !== "" && this.action === "edit" && t("button-component", { title: "Preview", type: "button", disabled: this.isLoading, clickHandler: (i) => {
483
+ i.preventDefault(), this.previewButtonClicked.emit(this.host).defaultPrevented || window.open(q(this.schedulerPreviewLink, this.selectedConfiguration), "_blank");
484
+ }, variant: "basic" }, t("eye-icon", null)), t("button-component", { key: "a380ec01e41aadade090b0010917be86d07d8c01", type: "button", disabled: this.isLoading, clickHandler: (i) => {
485
+ i.preventDefault(), this.cancelButtonClick.emit(), this.error = "";
486
+ }, variant: "basic", part: "editor__footer-cancel" }, "Back"), t("button-component", { key: "4b2ea6512ae56b849fee8b8596ebdc58e7126d43", type: "submit", disabled: this.isLoading, part: "editor__footer-cta" }, this.isLoading ? t("span", null, "Saving", t("loading-icon", null), " ") : this.action === "create" ? "Create" : "Save changes")))), this.showFeedbackModal && t("nylas-feedback-form", null));
487
+ }
488
+ get host() {
489
+ return Le(this);
490
+ }
491
+ static get watchers() {
492
+ return {
493
+ selectedConfiguration: ["configChangedHandler"],
494
+ currentUser: ["userChangedHandler"]
495
+ };
496
+ }
497
+ };
498
+ qe([
499
+ Te({
500
+ name: "nylas-editor-tabs",
501
+ stateToProps: /* @__PURE__ */ new Map([
502
+ ["schedulerConfig.calendars", "calendars"],
503
+ ["schedulerConfig.selectedConfiguration", "selectedConfiguration"],
504
+ ["schedulerConfig.currentUser", "currentUser"],
505
+ ["schedulerConfig.hideEditorTabs", "hideEditorTabs"]
506
+ ]),
507
+ eventToProps: {
508
+ schedulerConfigChanged: async (e, a) => {
509
+ const { resetLoadingState: i, setError: n, action: l, config: s } = e.detail, c = (d) => {
510
+ const [h, y] = d;
511
+ !h && y && n && n(y), i && i(e);
512
+ };
513
+ if (l === "edit") {
514
+ const d = await a.schedulerConfig.updateConfiguration(s);
515
+ c(d);
516
+ } else {
517
+ const d = await a.schedulerConfig.createConfiguration(s);
518
+ c(d);
519
+ }
520
+ },
521
+ cancelButtonClick: async (e, a) => {
522
+ a.schedulerConfigStore.state.action = null;
523
+ },
524
+ previewButtonClicked: async (e, a) => {
525
+ u("[nylas-editor-tabs]", "previewButtonClicked", a);
526
+ },
527
+ formSubmitted: async (e, a) => {
528
+ u("[nylas-editor-tabs]", "formSubmitted", a);
529
+ },
530
+ schedulerEditorFormUpdated: async (e, a) => {
531
+ u("[nylas-editor-tabs]", "schedulerEditorFormUpdated", e);
532
+ }
533
+ },
534
+ localPropsToProp: /* @__PURE__ */ new Map([
535
+ ["schedulerPreviewLink", "schedulerPreviewLink"],
536
+ ["enableUserFeedback", "enableUserFeedback"]
537
+ ]),
538
+ fireRegisterEvent: !0
539
+ }),
540
+ G("design:type", Function),
541
+ G("design:paramtypes", []),
542
+ G("design:returntype", void 0)
543
+ ], Pe.prototype, "render", null);
544
+ Pe.style = We;
545
+ const Ke = ':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:hidden}.configurations .table-container{overflow-y:auto;flex:1}.configurations .table-container table{width:100%;border-spacing:0;border-collapse:collapse;font-family:inherit;height:max-content}.configurations .table-container table.no-configurations{height:100%}.configurations .table-container table tr{color:var(--nylas-base-800);border-bottom:1px solid var(--nylas-base-200);font-family:inherit}.configurations .table-container table tr.hide{display:none}.configurations .table-container table th{font-weight:600;text-transform:uppercase;font-size:14px;line-height:20px}.configurations .table-container table tr.no-configurations td>div{display:flex;height:100%;justify-content:center;align-items:center;flex-direction:column;padding:var(--nylas-border-radius-3x)}.configurations .table-container table tr.no-configurations td>div h3{margin:0 0 1rem 0;color:var(--nylas-base-700)}.configurations .table-container table tr.no-configurations td>div p{margin:0 0 1rem 0;color:var(--nylas-base-600)}.configurations .table-container table tr.no-configurations td>div calendar-icon{margin-bottom:1rem;color:var(--nylas-base-200)}.configurations .table-container table th,.configurations .table-container table td{text-align:left;padding:1rem;font-family:inherit}.configurations .table-container table .actions{text-align:right}.configurations .table-container table .actions{display:flex;justify-content:flex-end;gap:1rem}@media screen and (max-width: 768px){.configurations .table-container table .actions{flex-direction:column;gap:0.5rem}}.configurations .table-container table .title{width:100%;max-width:300px}@media screen and (max-width: 768px){.configurations .table-container table .title{max-width:96px}}.configurations .table-container table .title div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.configurations .table-container table .title div.config-event-title{font-weight:600}.configurations .table-container table .title div.config-event-description{font-size:0.75rem}.configurations .pagination{padding:1rem;position:sticky;top:100%;display:flex;justify-content:flex-end;gap:0.5rem;background:white;width:calc(100% - 2rem);z-index:2}.configurations .pagination td.arrows{display:flex;justify-content:flex-end;gap:0.5rem}.configurations .pagination button{display:flex;flex-direction:row;justify-content:center;align-items:center;height:3vh;width:3vh;min-width:3em;min-height:3em;cursor:pointer;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-300);background-color:transparent;color:var(--nylas-base-800);cursor:pointer}.configurations .pagination button:hover:not(:disabled){border:1px solid var(--nylas-primary)}.configurations .pagination button:active{border:1px solid var(--nylas-base-800)}.configurations .pagination button:disabled{border:1px solid var(--nylas-base-100);background-color:transparent;color:var(--nylas-base-300);cursor:not-allowed}.configurations .pagination button.right{transform:rotate(180deg)}.error-container{margin-top:1.5rem}.error-container .error{color:var(--nylas-error);padding:0.5rem 0;margin:1rem 0 0}button-component#copy button{width:108px}select-dropdown{width:auto}select-dropdown::part(sd_dropdown-button){display:block;height:48px;padding:0px 16px 8px}@media screen and (max-width: 768px){select-dropdown::part(sd_dropdown-button){width:92px}}select-dropdown::part(sd_dropdown-content){width:120px;right:0}select-dropdown::part(sd_dropdown-labelhtml){display:flex;gap:0.5rem;align-items:center;color:var(--nylas-base-900)}select-dropdown::part(sd_dropdown-labelhtml):hover{color:var(--nylas-primary)}', Qe = Ke;
546
+ var Xe = function(e, a, i, n) {
547
+ var l = arguments.length, s = l < 3 ? a : n === null ? n = Object.getOwnPropertyDescriptor(a, i) : n, c;
548
+ if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
549
+ s = Reflect.decorate(e, a, i, n);
550
+ else
551
+ for (var d = e.length - 1; d >= 0; d--)
552
+ (c = e[d]) && (s = (l < 3 ? c(s) : l > 3 ? c(a, i, s) : c(a, i)) || s);
553
+ return l > 3 && s && Object.defineProperty(a, i, s), s;
554
+ }, W = function(e, a) {
555
+ if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
556
+ return Reflect.metadata(e, a);
557
+ };
558
+ const Ee = class {
559
+ constructor(e) {
560
+ Z(this, e), this.initListConfigurations = S(this, "initListConfigurations", 7), this.createButtonClick = S(this, "createButtonClick", 7), this.editButtonClick = S(this, "editButtonClick", 7), this.deleteButtonClick = S(this, "deleteButtonClick", 7), this.configurations = [], this.schedulerPreviewLink = "", this.listConfigurationsNextCursor = void 0, this.state = "loading", this.error = "", this.currentCursor = null, this.previousCursors = [], this.disableNextPageButton = !1;
561
+ }
562
+ listConfigurationsNextCursorChangedHandler(e, a) {
563
+ if (!e || e === a) {
564
+ e === null && (this.disableNextPageButton = !0);
565
+ return;
566
+ }
567
+ this.disableNextPageButton = !1, this.currentCursor = e;
568
+ }
569
+ connectedCallback() {
570
+ u("[nylas-list-configurations]", "connectedCallback");
571
+ }
572
+ componentWillLoad() {
573
+ u("[nylas-list-configurations]", "componentWillLoad"), this.configurations && this.configurations.length > 0 && (this.state = "loaded");
574
+ }
575
+ componentDidLoad() {
576
+ u("[nylas-list-configurations]", "componentDidLoad"), this.initListConfigurations.emit({
577
+ host: this.host
578
+ });
579
+ }
580
+ disconnectedCallback() {
581
+ u("[nylas-list-configurations]", "disconnectedCallback");
582
+ }
583
+ async handleNylasFormDropdownChanged(e) {
584
+ u("[nylas-list-configurations]", "handleNylasFormDropdownChanged", e.detail);
585
+ const { value: a } = e.detail, [i, n] = a.split("-");
586
+ switch (e.preventDefault(), i) {
587
+ case "delete":
588
+ this.deleteButtonClick.emit({ host: this.host, configuration: this.configurations[n] });
589
+ break;
590
+ case "preview":
591
+ window.open(q(this.schedulerPreviewLink, this.configurations[n]), "_blank");
592
+ break;
593
+ case "copy":
594
+ await navigator.clipboard.writeText(q(this.schedulerPreviewLink, this.configurations[n]));
595
+ break;
596
+ }
597
+ }
598
+ async getState() {
599
+ return this.state;
600
+ }
601
+ async setState(e) {
602
+ this.state = e;
603
+ }
604
+ async setError(e) {
605
+ this.error = e;
606
+ }
607
+ getDurationString(e) {
608
+ const a = Math.floor(e / 60), i = e % 60;
609
+ return `${a || ""} ${a ? `${a > 1 ? "hours" : "hour"}` : ""} ${i || ""} ${i ? `${i > 1 ? "mins" : "min"}` : ""}`;
610
+ }
611
+ getActionLabelHTML(e) {
612
+ const a = {
613
+ display: "inline-flex",
614
+ alignItems: "center",
615
+ gap: "0.5rem"
616
+ }, i = {
617
+ color: "var(--nylas-error)"
618
+ };
619
+ switch (e) {
620
+ case "preview":
621
+ return t("span", { style: a }, t("eye-icon", { width: "16", height: "16" }), "Preview");
622
+ case "copy":
623
+ return t("span", { style: a }, t("copy-icon", { width: "16", height: "16" }), "Copy");
624
+ case "delete":
625
+ return t("span", { style: { ...a, ...i } }, t("delete-icon", { width: "15", height: "17" }), "Delete");
626
+ default:
627
+ return "";
628
+ }
629
+ }
630
+ previousPageClickedHandler() {
631
+ if (this.previousCursors.length === 0)
632
+ return;
633
+ this.currentCursor = this.previousCursors.pop() || null;
634
+ const e = this.previousCursors[this.previousCursors.length - 1] || void 0;
635
+ this.initListConfigurations.emit({
636
+ host: this.host,
637
+ cursor: e
638
+ });
639
+ }
640
+ nextPageClickedHandler() {
641
+ this.currentCursor && (this.previousCursors = [...this.previousCursors, this.currentCursor], this.initListConfigurations.emit({
642
+ host: this.host,
643
+ cursor: this.currentCursor
644
+ }));
645
+ }
646
+ render() {
647
+ return t(Fe, null, t("div", { class: "header" }, t("div", { class: "description" }, t("h2", null, "All Scheduling Pages"), t("p", null, "Create and manage your Scheduling Pages.")), this.configurations && this.configurations.length > 0 && t("div", { class: "actions" }, t("button-component", { part: "nlc__create-new-cta", clickHandler: () => {
648
+ this.createButtonClick.emit(this.host);
649
+ } }, "Create new"))), t("div", { class: "configurations" }, t("div", { class: "table-container" }, t("table", { class: {
650
+ "no-configurations": this.state !== "loading" && (!this.configurations || this.configurations.length === 0)
651
+ } }, t("tr", { class: {
652
+ hide: this.state === "loading" || this.configurations && this.configurations.length === 0
653
+ } }, t("th", null, "Page title"), t("th", null, "Duration"), t("th", null)), this.state === "loading" && t("tr", { class: "no-configurations" }, t("td", { colSpan: 3 }, t("div", null, t("h3", null, "Loading..."), t("p", null, "Please wait while we fetch the scheduling pages")))), this.state !== "loading" && (!this.configurations || this.configurations.length === 0) && t("tr", { class: "no-configurations" }, t("td", { colSpan: 3 }, t("div", null, t("calendar-icon", { width: "48", height: "48" }), t("h3", null, "No scheduling pages found"), t("p", null, "Get started with creating your first scheduling page"), t("button-component", { part: "nlc__create-new-cta", clickHandler: () => {
654
+ this.createButtonClick.emit(this.host);
655
+ } }, "Create new")))), this.state !== "loading" && this.configurations.map((e, a) => t("tr", { key: e.id }, t("td", null, t("div", { class: "title" }, t("div", { class: "config-event-title", title: e.event_booking.title }, e.event_booking.title), t("div", { class: "config-event-description" }, e.event_booking.description))), t("td", null, t("div", { class: "duration" }, this.getDurationString(e.availability.duration_minutes))), t("td", null, t("div", { class: "actions" }, t("button-component", { variant: "basic", key: `edit-${a}`, clickHandler: (i) => {
656
+ i.preventDefault(), this.editButtonClick.emit({ host: this.host, configuration: e });
657
+ } }, t("edit-icon", { width: "16", height: "16" }), "Edit"), t("select-dropdown", { name: "actions", options: [
658
+ { value: `preview-${a}`, label: "Preview", labelHTML: this.getActionLabelHTML("preview") },
659
+ { value: `copy-${a}`, label: "Copy link", labelHTML: this.getActionLabelHTML("copy") },
660
+ { value: `delete-${a}`, label: "Delete", labelHTML: this.getActionLabelHTML("delete") }
661
+ ], 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("div", { class: "pagination" }, t("button", { class: "arrow left", onClick: () => this.previousPageClickedHandler(), disabled: this.previousCursors.length <= 0 }, t("chevron-icon", null)), t("button", { class: "arrow right", onClick: () => this.nextPageClickedHandler(), disabled: this.disableNextPageButton }, t("chevron-icon", null)))), this.state === "error" && t("div", { class: "error-container" }, t("p", { class: "error" }, this.error)));
662
+ }
663
+ get host() {
664
+ return Le(this);
665
+ }
666
+ static get watchers() {
667
+ return {
668
+ listConfigurationsNextCursor: ["listConfigurationsNextCursorChangedHandler"]
669
+ };
670
+ }
671
+ };
672
+ Xe([
673
+ Te({
674
+ name: "nylas-list-configurations",
675
+ stateToProps: /* @__PURE__ */ new Map([
676
+ ["schedulerConfig.configurations", "configurations"],
677
+ ["schedulerConfig.listConfigurationsNextCursor", "listConfigurationsNextCursor"]
678
+ ]),
679
+ localPropsToProp: /* @__PURE__ */ new Map([["schedulerPreviewLink", "schedulerPreviewLink"]]),
680
+ eventToProps: {
681
+ initListConfigurations: async (e, a) => {
682
+ const { host: i, cursor: n } = e.detail;
683
+ await i.setState("loading");
684
+ const [l, s] = await a.schedulerConfig.getConfigurations(n);
685
+ if (!l && s && s.message) {
686
+ await i.setState("error"), await i.setError(s.message);
687
+ return;
688
+ }
689
+ await i.setState("loaded");
690
+ },
691
+ createButtonClick: async (e, a) => {
692
+ a.schedulerConfigStore.resetSelectedConfiguration(), a.schedulerConfigStore.state.action = "create";
693
+ },
694
+ deleteButtonClick: async (e, a) => {
695
+ const { host: i, configuration: n } = e.detail, [l, s] = await a.schedulerConfig.deleteConfiguration(n.id);
696
+ !l && s && s.message && (await i.setState("error"), await i.setError(s.message));
697
+ },
698
+ editButtonClick: async (e, a) => {
699
+ const { configuration: i } = e.detail;
700
+ a.schedulerConfigStore.state.selectedConfiguration = i, a.schedulerConfigStore.state.action = "edit";
701
+ }
702
+ },
703
+ fireRegisterEvent: !0
704
+ }),
705
+ W("design:type", Function),
706
+ W("design:paramtypes", []),
707
+ W("design:returntype", void 0)
708
+ ], Ee.prototype, "render", null);
709
+ Ee.style = Qe;
710
+ export {
711
+ je as google_logo_icon,
712
+ Ve as microsoft_logo_icon,
713
+ Pe as nylas_editor_tabs,
714
+ Ee as nylas_list_configurations
715
+ };