@nylas/web-elements 1.4.2 → 1.4.4

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 (147) hide show
  1. package/dist/cdn/nylas-scheduler-editor/nylas-scheduler-editor.es.js +56 -27
  2. package/dist/cdn/nylas-scheduling/nylas-scheduling.es.js +4842 -4822
  3. package/dist/cjs/checkmark-icon_15.cjs.entry.js +3 -3
  4. package/dist/cjs/checkmark-icon_15.cjs.entry.js.map +1 -1
  5. package/dist/cjs/google-logo-icon_6.cjs.entry.js +4 -4
  6. package/dist/cjs/input-component.cjs.entry.js +13 -2
  7. package/dist/cjs/input-component.cjs.entry.js.map +1 -1
  8. package/dist/cjs/loader.cjs.js +1 -1
  9. package/dist/cjs/nylas-booked-event-card_12.cjs.entry.js +40 -11
  10. package/dist/cjs/nylas-booked-event-card_12.cjs.entry.js.map +1 -1
  11. package/dist/cjs/nylas-event-calendar_3.cjs.entry.js +53 -24
  12. package/dist/cjs/nylas-event-calendar_3.cjs.entry.js.map +1 -1
  13. package/dist/cjs/nylas-provider.cjs.entry.js +1 -1
  14. package/dist/cjs/nylas-scheduling.cjs.entry.js +3 -3
  15. package/dist/cjs/nylas-web-elements.cjs.js +1 -1
  16. package/dist/cjs/{scheduler-store-d6f5cff3.js → scheduler-store-5dcefe7e.js} +2 -2
  17. package/dist/cjs/{scheduler-store-d6f5cff3.js.map → scheduler-store-5dcefe7e.js.map} +1 -1
  18. package/dist/collection/components/design-system/input-component/input-component.js +13 -2
  19. package/dist/collection/components/design-system/input-component/input-component.js.map +1 -1
  20. package/dist/collection/components/scheduler/nylas-date-picker/nylas-date-picker.js +40 -6
  21. package/dist/collection/components/scheduler/nylas-date-picker/nylas-date-picker.js.map +1 -1
  22. package/dist/collection/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.js +8 -5
  23. package/dist/collection/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.js.map +1 -1
  24. package/dist/collection/components/scheduler-editor/nylas-event-calendar/nylas-event-calendar.js +28 -17
  25. package/dist/collection/components/scheduler-editor/nylas-event-calendar/nylas-event-calendar.js.map +1 -1
  26. package/dist/collection/components/scheduler-editor/nylas-event-capacity/nylas-event-capacity.css +15 -0
  27. package/dist/collection/components/scheduler-editor/nylas-event-capacity/nylas-event-capacity.js +13 -2
  28. package/dist/collection/components/scheduler-editor/nylas-event-capacity/nylas-event-capacity.js.map +1 -1
  29. package/dist/collection/components/scheduler-editor/nylas-event-timeslot/nylas-event-timeslot.css +1 -1
  30. package/dist/collection/components/scheduler-editor/nylas-event-timeslot/nylas-event-timeslot.js +12 -4
  31. package/dist/collection/components/scheduler-editor/nylas-event-timeslot/nylas-event-timeslot.js.map +1 -1
  32. package/dist/collection/components/scheduler-editor/nylas-event-title/nylas-event-title.js +3 -3
  33. package/dist/collection/components/scheduler-editor/nylas-event-title/nylas-event-title.js.map +1 -1
  34. package/dist/components/index.es.js +1 -1
  35. package/dist/components/input-component2.js +13 -2
  36. package/dist/components/input-component2.js.map +1 -1
  37. package/dist/components/nylas-date-picker2.js +38 -8
  38. package/dist/components/nylas-date-picker2.js.map +1 -1
  39. package/dist/components/nylas-editor-tabs-group2.js +2 -2
  40. package/dist/components/nylas-editor-tabs2.js +2 -2
  41. package/dist/components/nylas-event-calendar2.js +29 -18
  42. package/dist/components/nylas-event-calendar2.js.map +1 -1
  43. package/dist/components/nylas-event-capacity2.js +14 -3
  44. package/dist/components/nylas-event-capacity2.js.map +1 -1
  45. package/dist/components/nylas-event-timeslot2.js +14 -6
  46. package/dist/components/nylas-event-timeslot2.js.map +1 -1
  47. package/dist/components/nylas-event-title2.js +3 -3
  48. package/dist/components/nylas-event-title2.js.map +1 -1
  49. package/dist/components/nylas-list-configurations2.js +1 -1
  50. package/dist/components/nylas-locale-switch2.js +1 -1
  51. package/dist/components/nylas-scheduler-editor.js +1 -1
  52. package/dist/components/nylas-scheduling.js +3 -3
  53. package/dist/components/nylas-timeslot-picker2.js +9 -6
  54. package/dist/components/nylas-timeslot-picker2.js.map +1 -1
  55. package/dist/components/scheduler-store.js +2 -2
  56. package/dist/components/utils.js +1 -1
  57. package/dist/esm/calendar-agenda-fill-icon_36.entry.js +2 -2
  58. package/dist/esm/checkmark-icon_15.entry.js +5 -5
  59. package/dist/esm/checkmark-icon_15.entry.js.map +1 -1
  60. package/dist/esm/{feedbackSync-aa8d23d1.js → feedbackSync-57bb471a.js} +2 -2
  61. package/dist/esm/{feedbackSync-aa8d23d1.js.map → feedbackSync-57bb471a.js.map} +1 -1
  62. package/dist/esm/globe-icon_2.entry.js +1 -1
  63. package/dist/esm/google-logo-icon_6.entry.js +7 -7
  64. package/dist/esm/{index.es-6d4b50d5.js → index.es-13ff6710.js} +2 -2
  65. package/dist/esm/{index.es-6d4b50d5.js.map → index.es-13ff6710.js.map} +1 -1
  66. package/dist/esm/index.js +2 -2
  67. package/dist/esm/input-component.entry.js +14 -3
  68. package/dist/esm/input-component.entry.js.map +1 -1
  69. package/dist/esm/input-dropdown_2.entry.js +1 -1
  70. package/dist/esm/loader.js +1 -1
  71. package/dist/esm/multi-select-dropdown_2.entry.js +1 -1
  72. package/dist/esm/{nylas-api-request-c5400df5.js → nylas-api-request-2e5f4c7f.js} +2 -2
  73. package/dist/esm/{nylas-api-request-c5400df5.js.map → nylas-api-request-2e5f4c7f.js.map} +1 -1
  74. package/dist/esm/nylas-booked-event-card_12.entry.js +42 -13
  75. package/dist/esm/nylas-booked-event-card_12.entry.js.map +1 -1
  76. package/dist/esm/nylas-event-calendar_3.entry.js +55 -26
  77. package/dist/esm/nylas-event-calendar_3.entry.js.map +1 -1
  78. package/dist/esm/nylas-form-card.entry.js +2 -2
  79. package/dist/esm/nylas-if-state.entry.js +2 -2
  80. package/dist/esm/nylas-login.entry.js +2 -2
  81. package/dist/esm/nylas-provider.entry.js +3 -3
  82. package/dist/esm/nylas-scheduler-editor.entry.js +3 -3
  83. package/dist/esm/nylas-scheduling.entry.js +6 -6
  84. package/dist/esm/nylas-web-elements.js +1 -1
  85. package/dist/esm/{register-component-238f28de.js → register-component-02a05665.js} +2 -2
  86. package/dist/esm/{register-component-238f28de.js.map → register-component-02a05665.js.map} +1 -1
  87. package/dist/esm/{scheduler-store-82bb212a.js → scheduler-store-fe9e85a4.js} +3 -3
  88. package/dist/esm/{scheduler-store-82bb212a.js.map → scheduler-store-fe9e85a4.js.map} +1 -1
  89. package/dist/esm/textarea-component.entry.js +1 -1
  90. package/dist/esm/{utils-7d962146.js → utils-e27d0e4b.js} +2 -2
  91. package/dist/esm/{utils-7d962146.js.map → utils-e27d0e4b.js.map} +1 -1
  92. package/dist/nylas-web-elements/index.esm.js +1 -1
  93. package/dist/nylas-web-elements/nylas-web-elements.esm.js +1 -1
  94. package/dist/nylas-web-elements/nylas-web-elements.esm.js.map +1 -1
  95. package/dist/nylas-web-elements/{p-12bf5148.js → p-189b24e6.js} +2 -2
  96. package/dist/nylas-web-elements/p-1cbe8a56.entry.js +2 -0
  97. package/dist/nylas-web-elements/{p-d132fbaa.entry.js.map → p-1cbe8a56.entry.js.map} +1 -1
  98. package/dist/nylas-web-elements/{p-fdc35ad8.entry.js → p-23971057.entry.js} +2 -2
  99. package/dist/nylas-web-elements/{p-ba831977.entry.js → p-2dd05606.entry.js} +2 -2
  100. package/dist/nylas-web-elements/{p-797578de.js → p-388c456c.js} +2 -2
  101. package/dist/nylas-web-elements/{p-cf650f4f.js → p-3ea1c7c9.js} +2 -2
  102. package/dist/nylas-web-elements/{p-de9d8218.entry.js → p-5f683e34.entry.js} +2 -2
  103. package/dist/nylas-web-elements/{p-c2b6e0ca.entry.js → p-68ab7563.entry.js} +2 -2
  104. package/dist/nylas-web-elements/p-68ab7563.entry.js.map +1 -0
  105. package/dist/nylas-web-elements/{p-ec2c12a9.js → p-6b7fb948.js} +2 -2
  106. package/dist/nylas-web-elements/{p-cfd42146.js → p-7477410d.js} +2 -2
  107. package/dist/nylas-web-elements/{p-b62ef1be.js → p-7d9cdd23.js} +2 -2
  108. package/dist/nylas-web-elements/{p-00577fba.entry.js → p-8a7a6947.entry.js} +2 -2
  109. package/dist/nylas-web-elements/p-97f87422.entry.js +2 -0
  110. package/dist/nylas-web-elements/p-97f87422.entry.js.map +1 -0
  111. package/dist/nylas-web-elements/{p-9999c233.entry.js → p-aaf12216.entry.js} +2 -2
  112. package/dist/nylas-web-elements/{p-a452d4ea.entry.js → p-b55a87fa.entry.js} +2 -2
  113. package/dist/nylas-web-elements/p-b55a87fa.entry.js.map +1 -0
  114. package/dist/nylas-web-elements/{p-888d0c66.entry.js → p-c5f86111.entry.js} +2 -2
  115. package/dist/nylas-web-elements/{p-dd98c443.entry.js → p-cc6dbd73.entry.js} +2 -2
  116. package/dist/nylas-web-elements/{p-b59288fd.entry.js → p-d5a2cec8.entry.js} +2 -2
  117. package/dist/nylas-web-elements/{p-83216795.entry.js → p-deb33dfb.entry.js} +2 -2
  118. package/dist/nylas-web-elements/{p-83216795.entry.js.map → p-deb33dfb.entry.js.map} +1 -1
  119. package/dist/nylas-web-elements/{p-2531d4fa.entry.js → p-e2dc32d9.entry.js} +2 -2
  120. package/dist/nylas-web-elements/{p-a263330c.entry.js → p-eedabd6a.entry.js} +2 -2
  121. package/dist/nylas-web-elements/{p-355b34cb.entry.js → p-f57e68b1.entry.js} +2 -2
  122. package/dist/types/components/scheduler/nylas-date-picker/nylas-date-picker.d.ts +4 -0
  123. package/dist/types/components/scheduler-editor/nylas-event-capacity/nylas-event-capacity.d.ts +1 -0
  124. package/package.json +4 -5
  125. package/CHANGELOG.md +0 -878
  126. package/dist/nylas-web-elements/p-203beca4.entry.js +0 -2
  127. package/dist/nylas-web-elements/p-203beca4.entry.js.map +0 -1
  128. package/dist/nylas-web-elements/p-a452d4ea.entry.js.map +0 -1
  129. package/dist/nylas-web-elements/p-c2b6e0ca.entry.js.map +0 -1
  130. package/dist/nylas-web-elements/p-d132fbaa.entry.js +0 -2
  131. /package/dist/nylas-web-elements/{p-12bf5148.js.map → p-189b24e6.js.map} +0 -0
  132. /package/dist/nylas-web-elements/{p-fdc35ad8.entry.js.map → p-23971057.entry.js.map} +0 -0
  133. /package/dist/nylas-web-elements/{p-ba831977.entry.js.map → p-2dd05606.entry.js.map} +0 -0
  134. /package/dist/nylas-web-elements/{p-797578de.js.map → p-388c456c.js.map} +0 -0
  135. /package/dist/nylas-web-elements/{p-cf650f4f.js.map → p-3ea1c7c9.js.map} +0 -0
  136. /package/dist/nylas-web-elements/{p-de9d8218.entry.js.map → p-5f683e34.entry.js.map} +0 -0
  137. /package/dist/nylas-web-elements/{p-ec2c12a9.js.map → p-6b7fb948.js.map} +0 -0
  138. /package/dist/nylas-web-elements/{p-cfd42146.js.map → p-7477410d.js.map} +0 -0
  139. /package/dist/nylas-web-elements/{p-b62ef1be.js.map → p-7d9cdd23.js.map} +0 -0
  140. /package/dist/nylas-web-elements/{p-00577fba.entry.js.map → p-8a7a6947.entry.js.map} +0 -0
  141. /package/dist/nylas-web-elements/{p-9999c233.entry.js.map → p-aaf12216.entry.js.map} +0 -0
  142. /package/dist/nylas-web-elements/{p-888d0c66.entry.js.map → p-c5f86111.entry.js.map} +0 -0
  143. /package/dist/nylas-web-elements/{p-dd98c443.entry.js.map → p-cc6dbd73.entry.js.map} +0 -0
  144. /package/dist/nylas-web-elements/{p-b59288fd.entry.js.map → p-d5a2cec8.entry.js.map} +0 -0
  145. /package/dist/nylas-web-elements/{p-2531d4fa.entry.js.map → p-e2dc32d9.entry.js.map} +0 -0
  146. /package/dist/nylas-web-elements/{p-a263330c.entry.js.map → p-eedabd6a.entry.js.map} +0 -0
  147. /package/dist/nylas-web-elements/{p-355b34cb.entry.js.map → p-f57e68b1.entry.js.map} +0 -0
@@ -5,7 +5,7 @@ import { d as defineCustomElement$3 } from './info.js';
5
5
  import { d as defineCustomElement$2 } from './input-component2.js';
6
6
  import { d as defineCustomElement$1 } from './toolitp-component.js';
7
7
 
8
- const nylasEventCapacityCss = ":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-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:\"Inter\", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff;width:inherit}.nylas-event-capacity{display:flex;flex-direction:column;gap:4px}.nylas-event-capacity label{display:flex;align-items:center;gap:4px;color:var(--nylas-base-800);font-size:16px;font-style:normal;font-weight:400;line-height:150%;}.nylas-event-capacity label span.required{color:var(--nylas-error, #cc4841)}.nylas-event-capacity label span.label-icon{margin-left:4px}.nylas-event-capacity label span.label-icon tooltip-component{display:flex}.nylas-event-capacity label tooltip-component::part(tc__content){left:50px}.nylas-event-capacity__wrapper{display:flex;align-items:center;gap:0.5rem}.nylas-event-capacity__wrapper input-component{width:auto}.nylas-event-capacity__wrapper input-component::part(ic__input){border-width:1;border-radius:8px;border:1px solid var(--nylas-base-200);font-family:var(--nylas-font-family);font-size:16px;line-height:24px;width:80px}";
8
+ const nylasEventCapacityCss = ":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-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:\"Inter\", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff;width:inherit}.nylas-event-capacity{display:flex;flex-direction:column;gap:4px}.nylas-event-capacity label{display:flex;align-items:center;gap:4px;color:var(--nylas-base-800);font-size:16px;font-style:normal;font-weight:400;line-height:150%;}.nylas-event-capacity label span.required{color:var(--nylas-error, #cc4841)}.nylas-event-capacity label span.label-icon{margin-left:4px}.nylas-event-capacity label span.label-icon tooltip-component{display:flex}.nylas-event-capacity label tooltip-component::part(tc__content){left:50px}.nylas-event-capacity__wrapper{display:flex;align-items:center;gap:0.5rem}.nylas-event-capacity__wrapper input-component{width:auto}.nylas-event-capacity__wrapper input-component::part(ic__input){border-width:1;border-radius:8px;border:1px solid var(--nylas-base-200);font-family:var(--nylas-font-family);font-size:16px;line-height:24px;width:80px}.nylas-event-capacity__wrapper input-component::part(ic__input--error){border:1px solid var(--nylas-error)}.nylas-event-capacity__wrapper input-component::part(ic__label--error){position:relative;margin-bottom:24px}.nylas-event-capacity__wrapper input-component::part(ic__error_message){position:absolute;top:54px;width:max-content}.nylas-event-capacity__wrapper span.attendees.error{margin-top:-24px}";
9
9
  const NylasEventCapacityStyle0 = nylasEventCapacityCss;
10
10
 
11
11
  var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
@@ -33,6 +33,7 @@ const NylasEventCapacity = proxyCustomElement(class NylasEventCapacity extends H
33
33
  this.capacity = undefined;
34
34
  this.selectedLanguage = undefined;
35
35
  this.selectedEventCapacity = undefined;
36
+ this.error = '';
36
37
  }
37
38
  connectedCallback() {
38
39
  debug('nylas-event-capacity', 'connectedCallback');
@@ -74,6 +75,15 @@ const NylasEventCapacity = proxyCustomElement(class NylasEventCapacity extends H
74
75
  async nylasFormInputChangeHandler(event) {
75
76
  const { name, value } = event.detail;
76
77
  if (name === 'event-capacity') {
78
+ const parsedValue = parseInt(value);
79
+ if (parsedValue < 1 || parsedValue > 500 || isNaN(parsedValue)) {
80
+ this.error = instance.t('fixFormErrors');
81
+ this.internals.setValidity({ customError: true }, this.error);
82
+ this.valueChanged.emit({ value: value.toString(), name: this.name });
83
+ return;
84
+ }
85
+ this.error = '';
86
+ this.internals.setValidity({ customError: false }, '');
77
87
  this.selectedEventCapacity = parseInt(value);
78
88
  this.internals.setFormValue(value.toString(), this.name);
79
89
  this.valueChanged.emit({ value: value.toString(), name: this.name });
@@ -81,7 +91,7 @@ const NylasEventCapacity = proxyCustomElement(class NylasEventCapacity extends H
81
91
  }
82
92
  render() {
83
93
  const isComponentReady = typeof this.selectedEventCapacity !== 'undefined';
84
- return (h(Host, { key: 'e2debc0469569f51e10fd9c0604e7d62c4db6b39' }, h("div", { key: '49c4a101da37906bf5f18446190729e141c7451c', class: "nylas-event-capacity", part: "necapacity" }, h("label", { key: '9d6d299b6d4b6d05d08b24d1ce73f24ea056815c', htmlFor: "event-capacity" }, h("span", { key: '1b81652fd174559d8bcfc4a49193b233a69a967e' }, instance.t('nylasEventCapacity.headerTitle'), h("span", { key: '45a31e0e9e4e771bd36653e375e37acc00fd9895', class: "required" }, "*")), h("tooltip-component", { key: 'b83eeb0255d145363fe49b489908c6e17f091e07' }, h("info-icon", { key: 'd595bc37faa4830dd047d01b69e850d70532b7a0', slot: "tooltip-icon" }), h("span", { key: 'f7d4241b10814b1c6e7d09f54a2da1ce0b7b1d72', slot: "tooltip-content" }, instance.t('nylasEventCapacity.tooltip.desc')))), isComponentReady && (h("div", { class: "nylas-event-capacity__wrapper" }, h("input-component", { name: "event-capacity", id: "event-capacity", type: "number", minValue: 1, required: false, exportparts: "ic_input: necapacity__input-textfield", defaultValue: typeof this.selectedEventCapacity === 'number' ? this.selectedEventCapacity.toString() : '10' }), h("span", null, instance.t('nylasEventCapacity.attendees')))))));
94
+ return (h(Host, { key: 'b0eebdd8854645010038e0e03bfa94c851d5a859' }, h("div", { key: '6d7a7f053c3b7e166480eefbe5ef1df178552180', class: "nylas-event-capacity", part: "necapacity" }, h("label", { key: '05f77a19d88d300aafb73cf6aecf83c4c8e92679', htmlFor: "event-capacity" }, h("span", { key: '18fbc5bf61b42b39f9ad0bacba4fb4cb42392e43' }, instance.t('nylasEventCapacity.headerTitle'), h("span", { key: '1e42bd3df3cbb5f9e0b7a2fac118abed3648a2a5', class: "required" }, "*")), h("tooltip-component", { key: 'e0fa3f3557c575dbaf7e989e7eeeb956fd4ee55b' }, h("info-icon", { key: '952d5cfb9695a0005b06fb8539ae84c38bfe566e', slot: "tooltip-icon" }), h("span", { key: 'aacb7c0d1a2904a9675c75d51cf7d082e3bf1d3e', slot: "tooltip-content" }, instance.t('nylasEventCapacity.tooltip.desc')))), isComponentReady && (h("div", { class: "nylas-event-capacity__wrapper" }, h("input-component", { name: "event-capacity", id: "event-capacity", type: "number", pattern: /^[0-9]*$/, patternError: instance.t('invalidInputFormat', { field: 'Event capacity' }), minValue: 1, maxValue: 500, required: false, exportparts: "ic_input: necapacity__input-textfield", defaultValue: typeof this.selectedEventCapacity === 'number' ? this.selectedEventCapacity.toString() : '10' }), h("span", { class: this.error ? 'attendees error' : 'attendees' }, instance.t('nylasEventCapacity.attendees')))))));
85
95
  }
86
96
  static get formAssociated() { return true; }
87
97
  get host() { return this; }
@@ -94,7 +104,8 @@ const NylasEventCapacity = proxyCustomElement(class NylasEventCapacity extends H
94
104
  "name": [1],
95
105
  "capacity": [2],
96
106
  "selectedLanguage": [1, "selected-language"],
97
- "selectedEventCapacity": [32]
107
+ "selectedEventCapacity": [32],
108
+ "error": [32]
98
109
  }, [[0, "nylasFormInputChanged", "nylasFormInputChangeHandler"]], {
99
110
  "name": ["elementNameChangedHandler"],
100
111
  "selectedLanguage": ["selectedLanguageChangedHandler"]
@@ -1 +1 @@
1
- {"file":"nylas-event-capacity2.js","mappings":";;;;;;;AAAA,MAAM,qBAAqB,GAAG,i9FAAi9F,CAAC;AACh/F,iCAAe,qBAAqB;;;;;;;;;;;;;;;;MCsBvB,kBAAkB;;;;;;;oBAON,gBAAgB;;;;;IAgCvC,iBAAiB;QACf,KAAK,CAAC,sBAAsB,EAAE,mBAAmB,CAAC,CAAC;KACpD;IAED,oBAAoB;QAClB,KAAK,CAAC,sBAAsB,EAAE,sBAAsB,CAAC,CAAC;KACvD;IAED,iBAAiB;QACf,KAAK,CAAC,sBAAsB,EAAE,mBAAmB,CAAC,CAAC;QAEnD,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,E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QACjF,YAAY,EAAE;YACZ,YAAY,EAAE,OACZ,KAAiI,EACjI,8BAA6D;gBAE7D,MAAM,EAAE,YAAY,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC;gBAEtC,IAAI,YAAY,EAAE;oBAChB,YAAY,CAAC,KAAK,CAAC,CAAC;iBACrB;aACF;SACF;QACD,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;gDAiCD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["i18next"],"sources":["src/components/scheduler-editor/nylas-event-capacity/nylas-event-capacity.scss?tag=nylas-event-capacity&encapsulation=shadow","src/components/scheduler-editor/nylas-event-capacity/nylas-event-capacity.tsx"],"sourcesContent":["@import '../../../common/styles/variables.scss';\n@import '../../../common/mixins/inputs.scss';\n\n:host {\n display: block;\n @include default-css-variables;\n width: inherit;\n}\n\n.nylas-event-capacity {\n display: flex;\n flex-direction: column;\n gap: 4px;\n\n label {\n display: flex;\n align-items: center;\n gap: 4px;\n color: var(--nylas-base-800);\n font-size: 16px;\n font-style: normal;\n font-weight: 400;\n line-height: 150%;\n\n /* 21px */\n span.required {\n color: var(--nylas-error, #cc4841);\n }\n\n span.label-icon {\n margin-left: 4px;\n\n tooltip-component {\n display: flex;\n }\n }\n\n tooltip-component {\n &::part(tc__content) {\n left: 50px;\n }\n }\n }\n}\n\n.nylas-event-capacity__wrapper {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n\n input-component {\n width: auto;\n }\n\n input-component::part(ic__input) {\n border-width: 1;\n border-radius: 8px;\n border: 1px solid var(--nylas-base-200);\n font-family: var(--nylas-font-family);\n font-size: 16px;\n line-height: 24px;\n width: 80px;\n }\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug } from '@/utils/utils';\nimport { AttachInternals, Component, Element, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE } from '@/common/constants';\n\n/**\n * The `nylas-event-capacity` component is a UI component that allows users to set the event capacity for the scheduler configuration.\n *\n * @part necapacity - The nylas-event-capacity container\n * @part necapacity__body - The body of the event capacity section\n * @part necapacity__header - The header of the event capacity section\n * @part necapacity__drawer-toggle--container - The card's drawer toggle container\n * @part necapacity__input-numberfield - The event capacity input numberfield\n */\n@Component({\n tag: 'nylas-event-capacity',\n styleUrl: 'nylas-event-capacity.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasEventCapacity {\n @Element() host!: HTMLNylasEventCapacityElement;\n\n /**\n * @standalone\n * The name of the component\n */\n @Prop() name: string = 'event-capacity';\n /**\n * @standalone\n * The default event capacity\n */\n @Prop() capacity?: number;\n\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * The current event capacity state\n */\n @State() selectedEventCapacity!: number;\n\n /**\n * This event is fired when the event capacity value changes\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n valueChanged?: (event: CustomEvent<{ value: string; name: string }>) => void;\n }>;\n\n // Lifecycle methods\n connectedCallback() {\n debug('nylas-event-capacity', 'connectedCallback');\n }\n\n disconnectedCallback() {\n debug('nylas-event-capacity', 'disconnectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-event-capacity', 'componentWillLoad');\n // See comment in the @Watch('name') decorator for more information.\n this.host.setAttribute('name', this.name);\n }\n\n componentDidLoad() {\n debug('nylas-event-capacity', 'componentDidLoad');\n this.selectedEventCapacity = this.capacity || 10;\n console.log('selectedEventCapacity', this.selectedEventCapacity);\n this.internals.setFormValue(this.selectedEventCapacity.toString(), this.name);\n }\n\n componentWillUpdate() {\n debug('nylas-event-capacity', 'componentWillUpdate');\n }\n\n componentDidUpdate() {\n debug('nylas-event-capacity', 'componentDidUpdate');\n }\n\n componentWillRender() {\n debug('nylas-event-capacity', 'componentWillRender');\n }\n\n componentDidRender() {\n debug('nylas-event-capacity', 'componentDidRender');\n }\n\n /**\n * When a name prop is passed, stencil does not automatically set the name attribute on the host element.\n * Since this component is form-associated, the name attribute is required for form submission.\n * This is a workaround to ensure that the name attribute is set on the host element.\n */\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-event-capacity', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('selectedLanguage')\n selectedLanguageChangedHandler(newVal: LANGUAGE_CODE, oldVal: LANGUAGE_CODE) {\n if (newVal === oldVal) return;\n i18next.changeLanguage(newVal);\n }\n\n @Listen('nylasFormInputChanged')\n async nylasFormInputChangeHandler(event: CustomEvent<{ value: string; name: string }>) {\n const { name, value } = event.detail;\n\n if (name === 'event-capacity') {\n this.selectedEventCapacity = parseInt(value);\n this.internals.setFormValue(value.toString(), this.name);\n this.valueChanged.emit({ value: value.toString(), name: this.name });\n }\n }\n\n @RegisterComponent<NylasEventCapacity, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-event-capacity',\n stateToProps: new Map([['schedulerConfig.selectedLanguage', 'selectedLanguage']]),\n eventToProps: {\n valueChanged: async (\n event: CustomEvent<{ value: string; name: string; valueChanged?: (event: CustomEvent<{ value: string; name: string }>) => void }>,\n _nylasSchedulerConfigConnector: NylasSchedulerConfigConnector,\n ) => {\n const { valueChanged } = event.detail;\n // If a handler is passed, call it.\n if (valueChanged) {\n valueChanged(event);\n }\n },\n },\n fireRegisterEvent: true,\n })\n render() {\n const isComponentReady = typeof this.selectedEventCapacity !== 'undefined';\n return (\n <Host>\n <div class=\"nylas-event-capacity\" part=\"necapacity\">\n <label htmlFor=\"event-capacity\">\n <span>\n {i18next.t('nylasEventCapacity.headerTitle')}\n <span class=\"required\">*</span>\n </span>\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">{i18next.t('nylasEventCapacity.tooltip.desc')}</span>\n </tooltip-component>\n </label>\n {isComponentReady && (\n <div class=\"nylas-event-capacity__wrapper\">\n <input-component\n name=\"event-capacity\"\n id=\"event-capacity\"\n type=\"number\"\n minValue={1}\n required={false}\n exportparts=\"ic_input: necapacity__input-textfield\"\n defaultValue={typeof this.selectedEventCapacity === 'number' ? this.selectedEventCapacity.toString() : '10'}\n />\n <span>{i18next.t('nylasEventCapacity.attendees')}</span>\n </div>\n )}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"nylas-event-capacity2.js","mappings":";;;;;;;AAAA,MAAM,qBAAqB,GAAG,k2GAAk2G,CAAC;AACj4G,iCAAe,qBAAqB;;;;;;;;;;;;;;;;MCsBvB,kBAAkB;;;;;;;oBAON,gBAAgB;;;;qBAsBd,EAAE;;IAY3B,iBAAiB;QACf,KAAK,CAAC,sBAAsB,EAAE,mBAAmB,CAAC,CAAC;KACpD;IAED,oBAAoB;QAClB,KAAK,CAAC,sBAAsB,EAAE,sBAAsB,CAAC,CAAC;KACvD;IAED,iBAAiB;QACf,KAAK,CAAC,sBAAsB,EAAE,mBAAmB,CAAC,CAAC;QAEnD,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;KAC3C;IAED,gBAAgB;QACd,KAAK,CAAC,sBAAsB,EAAE,kBAAkB,CAAC,CAAC;QAClD,IAAI,CAAC,qBAAqB,GAAG,IAAI,CAAC,QAAQ,IAAI,EAAE,CAAC;QACjD,OAAO,CAAC,GAAG,CAAC,uBAAuB,EAAE,IAAI,CAAC,qBAAqB,CAAC,CAAC;QACjE,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,qBAAqB,CAAC,QAAQ,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;KAC/E;IAED,mBAAmB;QACjB,KAAK,CAAC,sBAAsB,EAAE,qBAAqB,CAAC,CAAC;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,QAAQ,GAAG,IAAI,CAAC,qBAAqB,CAAC,QAAQ,EAAE,GAAG,IAAI,GAC3G,EACF,YAAM,KAAK,EAAE,IAAI,CAAC,KAAK,GAAG,iBAAiB,GAAG,WAAW,IAAGA,QAAO,CAAC,CAAC,CAAC,8BAA8B,CAAC,CAAQ,CACzG,CACP,CACG,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;AAnCD;IAjBC,iBAAiB,CAAwG;QACxH,IAAI,EAAE,sBAAsB;QAC5B,YAAY,EAAE,IAAI,GAAG,CAAC,CAAC,CAAC,kCAAkC,EAAE,kBAAkB,CAAC,CAAC,CAAC;QACjF,YAAY,EAAE;YACZ,YAAY,EAAE,OACZ,KAAiI,EACjI,8BAA6D;gBAE7D,MAAM,EAAE,YAAY,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC;gBAEtC,IAAI,YAAY,EAAE;oBAChB,YAAY,CAAC,KAAK,CAAC,CAAC;iBACrB;aACF;SACF;QACD,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;gDAoCD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["i18next"],"sources":["src/components/scheduler-editor/nylas-event-capacity/nylas-event-capacity.scss?tag=nylas-event-capacity&encapsulation=shadow","src/components/scheduler-editor/nylas-event-capacity/nylas-event-capacity.tsx"],"sourcesContent":["@import '../../../common/styles/variables.scss';\n@import '../../../common/mixins/inputs.scss';\n\n:host {\n display: block;\n @include default-css-variables;\n width: inherit;\n}\n\n.nylas-event-capacity {\n display: flex;\n flex-direction: column;\n gap: 4px;\n\n label {\n display: flex;\n align-items: center;\n gap: 4px;\n color: var(--nylas-base-800);\n font-size: 16px;\n font-style: normal;\n font-weight: 400;\n line-height: 150%;\n\n /* 21px */\n span.required {\n color: var(--nylas-error, #cc4841);\n }\n\n span.label-icon {\n margin-left: 4px;\n\n tooltip-component {\n display: flex;\n }\n }\n\n tooltip-component {\n &::part(tc__content) {\n left: 50px;\n }\n }\n }\n}\n\n.nylas-event-capacity__wrapper {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n\n input-component {\n width: auto;\n }\n\n input-component::part(ic__input) {\n border-width: 1;\n border-radius: 8px;\n border: 1px solid var(--nylas-base-200);\n font-family: var(--nylas-font-family);\n font-size: 16px;\n line-height: 24px;\n width: 80px;\n }\n\n input-component::part(ic__input--error) {\n border: 1px solid var(--nylas-error);\n }\n\n input-component::part(ic__label--error) {\n position: relative;\n margin-bottom: 24px;\n }\n\n input-component::part(ic__error_message) {\n position: absolute;\n top: 54px;\n width: max-content;\n }\n\n span.attendees {\n &.error {\n margin-top: -24px;\n }\n }\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug } from '@/utils/utils';\nimport { AttachInternals, Component, Element, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE } from '@/common/constants';\n\n/**\n * The `nylas-event-capacity` component is a UI component that allows users to set the event capacity for the scheduler configuration.\n *\n * @part necapacity - The nylas-event-capacity container\n * @part necapacity__body - The body of the event capacity section\n * @part necapacity__header - The header of the event capacity section\n * @part necapacity__drawer-toggle--container - The card's drawer toggle container\n * @part necapacity__input-numberfield - The event capacity input numberfield\n */\n@Component({\n tag: 'nylas-event-capacity',\n styleUrl: 'nylas-event-capacity.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasEventCapacity {\n @Element() host!: HTMLNylasEventCapacityElement;\n\n /**\n * @standalone\n * The name of the component\n */\n @Prop() name: string = 'event-capacity';\n /**\n * @standalone\n * The default event capacity\n */\n @Prop() capacity?: number;\n\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * The current event capacity state\n */\n @State() selectedEventCapacity!: number;\n\n @State() error: string = '';\n\n /**\n * This event is fired when the event capacity value changes\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n valueChanged?: (event: CustomEvent<{ value: string; name: string }>) => void;\n }>;\n\n // Lifecycle methods\n connectedCallback() {\n debug('nylas-event-capacity', 'connectedCallback');\n }\n\n disconnectedCallback() {\n debug('nylas-event-capacity', 'disconnectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-event-capacity', 'componentWillLoad');\n // See comment in the @Watch('name') decorator for more information.\n this.host.setAttribute('name', this.name);\n }\n\n componentDidLoad() {\n debug('nylas-event-capacity', 'componentDidLoad');\n this.selectedEventCapacity = this.capacity || 10;\n console.log('selectedEventCapacity', this.selectedEventCapacity);\n this.internals.setFormValue(this.selectedEventCapacity.toString(), this.name);\n }\n\n componentWillUpdate() {\n debug('nylas-event-capacity', 'componentWillUpdate');\n }\n\n componentDidUpdate() {\n debug('nylas-event-capacity', 'componentDidUpdate');\n }\n\n componentWillRender() {\n debug('nylas-event-capacity', 'componentWillRender');\n }\n\n componentDidRender() {\n debug('nylas-event-capacity', 'componentDidRender');\n }\n\n /**\n * When a name prop is passed, stencil does not automatically set the name attribute on the host element.\n * Since this component is form-associated, the name attribute is required for form submission.\n * This is a workaround to ensure that the name attribute is set on the host element.\n */\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-event-capacity', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('selectedLanguage')\n selectedLanguageChangedHandler(newVal: LANGUAGE_CODE, oldVal: LANGUAGE_CODE) {\n if (newVal === oldVal) return;\n i18next.changeLanguage(newVal);\n }\n\n @Listen('nylasFormInputChanged')\n async nylasFormInputChangeHandler(event: CustomEvent<{ value: string; name: string }>) {\n const { name, value } = event.detail;\n\n if (name === 'event-capacity') {\n const parsedValue = parseInt(value);\n if (parsedValue < 1 || parsedValue > 500 || isNaN(parsedValue)) {\n this.error = i18next.t('fixFormErrors');\n this.internals.setValidity({ customError: true }, this.error);\n this.valueChanged.emit({ value: value.toString(), name: this.name });\n return;\n }\n this.error = '';\n this.internals.setValidity({ customError: false }, '');\n this.selectedEventCapacity = parseInt(value);\n this.internals.setFormValue(value.toString(), this.name);\n this.valueChanged.emit({ value: value.toString(), name: this.name });\n }\n }\n\n @RegisterComponent<NylasEventCapacity, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-event-capacity',\n stateToProps: new Map([['schedulerConfig.selectedLanguage', 'selectedLanguage']]),\n eventToProps: {\n valueChanged: async (\n event: CustomEvent<{ value: string; name: string; valueChanged?: (event: CustomEvent<{ value: string; name: string }>) => void }>,\n _nylasSchedulerConfigConnector: NylasSchedulerConfigConnector,\n ) => {\n const { valueChanged } = event.detail;\n // If a handler is passed, call it.\n if (valueChanged) {\n valueChanged(event);\n }\n },\n },\n fireRegisterEvent: true,\n })\n render() {\n const isComponentReady = typeof this.selectedEventCapacity !== 'undefined';\n return (\n <Host>\n <div class=\"nylas-event-capacity\" part=\"necapacity\">\n <label htmlFor=\"event-capacity\">\n <span>\n {i18next.t('nylasEventCapacity.headerTitle')}\n <span class=\"required\">*</span>\n </span>\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">{i18next.t('nylasEventCapacity.tooltip.desc')}</span>\n </tooltip-component>\n </label>\n {isComponentReady && (\n <div class=\"nylas-event-capacity__wrapper\">\n <input-component\n name=\"event-capacity\"\n id=\"event-capacity\"\n type=\"number\"\n pattern={/^[0-9]*$/}\n patternError={i18next.t('invalidInputFormat', { field: 'Event capacity' })}\n minValue={1}\n maxValue={500}\n required={false}\n exportparts=\"ic_input: necapacity__input-textfield\"\n defaultValue={typeof this.selectedEventCapacity === 'number' ? this.selectedEventCapacity.toString() : '10'}\n />\n <span class={this.error ? 'attendees error' : 'attendees'}>{i18next.t('nylasEventCapacity.attendees')}</span>\n </div>\n )}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1,6 +1,6 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
2
  import { R as RegisterComponent } from './register-component.js';
3
- import { H as timezone, a as debug, I as generateRRule, b as instance, J as getTimezoneOffset } from './utils.js';
3
+ import { p as timezone, a as debug, H as generateRRule, b as instance, I as getTimezoneOffset } from './utils.js';
4
4
  import { T as TIMEZONE_MAP } from './constants.js';
5
5
  import { a as dayjs, u as utc } from './utc.js';
6
6
  import { c as customParseFormat, d as defineCustomElement$4 } from './nylas-time-window-picker2.js';
@@ -13,7 +13,7 @@ import { d as defineCustomElement$3 } from './search.js';
13
13
  import { d as defineCustomElement$2 } from './select-dropdown2.js';
14
14
  import { d as defineCustomElement$1 } from './time-period-selector2.js';
15
15
 
16
- const nylasEventTimeslotCss = ":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-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:\"Inter\", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff;width:inherit}div.nylas-event-timeslot label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:16px;font-style:normal;font-weight:400;line-height:150%}div.nylas-event-timeslot div.date-time-input div.date-time-picker{display:flex;gap:32px}@media screen and (max-width: 768px){div.nylas-event-timeslot div.date-time-input div.date-time-picker{flex-direction:column;gap:16px}}div.nylas-event-timeslot div.date-time-input div.date-time-picker nylas-date-component{width:224px}@media screen and (max-width: 768px){div.nylas-event-timeslot div.date-time-input div.date-time-picker nylas-date-component{width:100%}}div.nylas-event-timeslot div.date-time-input div.date-time-picker nylas-date-component::part(ic__date){height:50px;border-color:var(--nylas-base-200)}div.nylas-event-timeslot div.date-time-input div.date-time-picker div.time-range{display:flex;gap:8px;align-items:flex-start}div.nylas-event-timeslot div.date-time-input div.date-time-picker div.time-range span{margin:12px 0 0 6px;display:inline-flex;align-items:flex-start}@media screen and (max-width: 768px){div.nylas-event-timeslot div.date-time-input div.date-time-picker div.time-range{display:grid;grid-template-columns:1fr 20px 1fr}div.nylas-event-timeslot div.date-time-input div.date-time-picker div.time-range nylas-time-window-picker::part(time-picker){width:-webkit-fill-available}div.nylas-event-timeslot div.date-time-input div.date-time-picker div.time-range nylas-time-window-picker::part(time-input){width:calc(100% - 8px)}}div.nylas-event-timeslot div.date-time-input div.date-time-picker select-dropdown{width:fit-content}div.nylas-event-timeslot div.date-time-input div.date-time-picker select-dropdown::part(sd_dropdown){position:relative}div.nylas-event-timeslot div.date-time-input div.date-time-picker select-dropdown::part(sd_dropdown-button){border:none;padding:14px;justify-content:flex-start}div.nylas-event-timeslot div.date-time-input div.date-time-picker select-dropdown::part(sd_dropdown-button):hover{border:none;outline:none;color:var(--nylas-primary)}@media screen and (max-width: 768px){div.nylas-event-timeslot div.date-time-input div.date-time-picker select-dropdown{width:-webkit-fill-available}div.nylas-event-timeslot div.date-time-input div.date-time-picker select-dropdown::part(sd_dropdown-button-selected-label){max-width:fit-content}div.nylas-event-timeslot div.date-time-input div.date-time-picker select-dropdown::part(sd_dropdown-content){right:unset;width:unset}}div.nylas-event-timeslot div.date-time-input div.recurrence-options{margin:8px 0}div.nylas-event-timeslot div.date-time-input div.recurrence-options select-dropdown::part(sd_dropdown){position:relative}div.nylas-event-timeslot div.date-time-input div.recurrence-options select-dropdown::part(sd_dropdown-button){width:fit-content;padding:14px;border-color:var(--nylas-base-200)}div.nylas-event-timeslot div.date-time-input div.recurrence-options select-dropdown::part(sd_dropdown-button):hover{color:var(--nylas-primary)}div.nylas-event-timeslot div.date-time-input div.recurrence-options select-dropdown::part(sd_dropdown-content){width:fit-content}div.nylas-event-timeslot div.date-time-input div.recurrence-options select-dropdown::part(sd_dropdown-button-selected-label){max-width:100%;width:fit-content;font-size:16px}@media screen and (max-width: 768px){div.nylas-event-timeslot div.date-time-input div.recurrence-options select-dropdown{width:-webkit-fill-available}div.nylas-event-timeslot div.date-time-input div.recurrence-options select-dropdown::part(sd_dropdown-button-selected-label){max-width:254px;width:fit-content}div.nylas-event-timeslot div.date-time-input div.recurrence-options select-dropdown::part(sd_dropdown-content){right:unset;width:unset}}@media screen and (max-width: 412px){div.nylas-event-timeslot div.date-time-input div.recurrence-options select-dropdown::part(sd_dropdown-button-selected-label){max-width:240px}}div.nylas-event-timeslot div.date-time-input div.recurrence-options div.custom-recurrence-time-period,div.nylas-event-timeslot div.date-time-input div.recurrence-options div.recurrence-type,div.nylas-event-timeslot div.date-time-input div.recurrence-options div.recurrence-end{display:grid;align-items:center;gap:16px;grid-template-columns:128px 1fr;margin-bottom:8px}div.nylas-event-timeslot div.date-time-input div.recurrence-options div.custom-recurrence-time-period select-dropdown::part(sd_dropdown-button),div.nylas-event-timeslot div.date-time-input div.recurrence-options div.recurrence-type select-dropdown::part(sd_dropdown-button),div.nylas-event-timeslot div.date-time-input div.recurrence-options div.recurrence-end select-dropdown::part(sd_dropdown-button){border-color:var(--nylas-base-200)}@media screen and (max-width: 768px){div.nylas-event-timeslot div.date-time-input div.recurrence-options div.custom-recurrence-time-period,div.nylas-event-timeslot div.date-time-input div.recurrence-options div.recurrence-type,div.nylas-event-timeslot div.date-time-input div.recurrence-options div.recurrence-end{grid-template-columns:1fr;gap:4px;margin:16px 0}}div.nylas-event-timeslot div.date-time-input div.recurrence-options div.custom-recurrence-time-period time-period-selector::part(id_dropdown-input),div.nylas-event-timeslot div.date-time-input div.recurrence-options div.recurrence-type time-period-selector::part(id_dropdown-input),div.nylas-event-timeslot div.date-time-input div.recurrence-options div.recurrence-end time-period-selector::part(id_dropdown-input){padding:16px}div.nylas-event-timeslot div.date-time-input div.recurrence-options div.custom-recurrence-time-period time-period-selector input-dropdown:hover,div.nylas-event-timeslot div.date-time-input div.recurrence-options div.recurrence-type time-period-selector input-dropdown:hover,div.nylas-event-timeslot div.date-time-input div.recurrence-options div.recurrence-end time-period-selector input-dropdown:hover{border:1px solid var(--nylas-primary);outline:1px solid transparent}div.nylas-event-timeslot div.date-time-input div.recurrence-options div.repeat-on div.days{margin:16px 0;display:flex;gap:16px;align-items:center}div.nylas-event-timeslot div.date-time-input div.recurrence-options div.repeat-on div.days div.buttons{display:flex;gap:8px;margin:8px 0}div.nylas-event-timeslot div.date-time-input div.recurrence-options div.repeat-on div.days div.buttons button{border-radius:50%;border:none;height:24px;width:24px;color:var(--nylas-base-800);cursor:pointer}div.nylas-event-timeslot div.date-time-input div.recurrence-options div.repeat-on div.days div.buttons button.selected{background-color:var(--nylas-primary);color:var(--nylas-base-0)}div.nylas-event-timeslot div.date-time-input div.recurrence-options div.repeat-on div.days div.buttons button:hover{background-color:var(--nylas-base-500);color:var(--nylas-base-0)}div.nylas-event-timeslot div.date-time-input div.recurrence-options div.repeat-on div.days div.buttons button:active{background-color:var(--nylas-base-600);color:var(--nylas-base-0)}div.nylas-event-timeslot div.date-time-input div.recurrence-options div.repeat-on div.days,div.nylas-event-timeslot div.date-time-input div.recurrence-options div.repeat-on div.custom-recurrence-ends,div.nylas-event-timeslot div.date-time-input div.recurrence-options div.repeat-on div.month-recurrence{display:grid;align-items:center;gap:16px;grid-template-columns:128px 1fr}@media screen and (max-width: 768px){div.nylas-event-timeslot div.date-time-input div.recurrence-options div.repeat-on div.days,div.nylas-event-timeslot div.date-time-input div.recurrence-options div.repeat-on div.custom-recurrence-ends,div.nylas-event-timeslot div.date-time-input div.recurrence-options div.repeat-on div.month-recurrence{grid-template-columns:1fr;gap:4px;margin:16px 0}}div.nylas-event-timeslot div.date-time-input div.recurrence-options div.repeat-on div.custom-recurrence{display:flex;gap:16px;align-items:center}@media screen and (max-width: 768px){div.nylas-event-timeslot div.date-time-input div.recurrence-options div.repeat-on div.custom-recurrence{flex-direction:column;align-items:flex-start;gap:0}}div.nylas-event-timeslot div.date-time-input div.recurrence-options div.repeat-on div.custom-recurrence div.custom-recurrence-end-after{display:flex;gap:8px;align-items:center}@media screen and (max-width: 768px){div.nylas-event-timeslot div.date-time-input div.recurrence-options div.repeat-on div.custom-recurrence div.custom-recurrence-end-after{flex-direction:column;align-items:flex-start}}div.nylas-event-timeslot div.date-time-input div.recurrence-options div.repeat-on div.custom-recurrence nylas-date-component::part(ic__date){padding:0 16px;height:52px;border:1px solid var(--nylas-base-200)}";
16
+ const nylasEventTimeslotCss = ":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-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:\"Inter\", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff;width:inherit}div.nylas-event-timeslot label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:16px;font-style:normal;font-weight:400;line-height:150%}div.nylas-event-timeslot div.date-time-input div.date-time-picker{display:flex;gap:32px}@media screen and (max-width: 768px){div.nylas-event-timeslot div.date-time-input div.date-time-picker{flex-direction:column;gap:16px}}div.nylas-event-timeslot div.date-time-input div.date-time-picker nylas-date-component{width:224px}@media screen and (max-width: 768px){div.nylas-event-timeslot div.date-time-input div.date-time-picker nylas-date-component{width:100%}}div.nylas-event-timeslot div.date-time-input div.date-time-picker nylas-date-component::part(ic__date){height:50px;border-color:var(--nylas-base-200)}div.nylas-event-timeslot div.date-time-input div.date-time-picker div.time-range{display:flex;gap:8px;align-items:flex-start}div.nylas-event-timeslot div.date-time-input div.date-time-picker div.time-range span{margin:12px 0 0 6px;display:inline-flex;align-items:flex-start}@media screen and (max-width: 768px){div.nylas-event-timeslot div.date-time-input div.date-time-picker div.time-range{display:grid;grid-template-columns:1fr 20px 1fr}div.nylas-event-timeslot div.date-time-input div.date-time-picker div.time-range nylas-time-window-picker::part(time-picker){width:-webkit-fill-available}div.nylas-event-timeslot div.date-time-input div.date-time-picker div.time-range nylas-time-window-picker::part(time-input){width:calc(100% - 8px)}}div.nylas-event-timeslot div.date-time-input div.date-time-picker select-dropdown{width:fit-content}div.nylas-event-timeslot div.date-time-input div.date-time-picker select-dropdown::part(sd_dropdown){position:relative}div.nylas-event-timeslot div.date-time-input div.date-time-picker select-dropdown::part(sd_dropdown-button){border:none;padding:14px;justify-content:flex-start}div.nylas-event-timeslot div.date-time-input div.date-time-picker select-dropdown::part(sd_dropdown-button):hover{border:none;outline:none;color:var(--nylas-primary)}@media screen and (max-width: 768px){div.nylas-event-timeslot div.date-time-input div.date-time-picker select-dropdown{width:-webkit-fill-available}div.nylas-event-timeslot div.date-time-input div.date-time-picker select-dropdown::part(sd_dropdown-button-selected-label){max-width:fit-content}div.nylas-event-timeslot div.date-time-input div.date-time-picker select-dropdown::part(sd_dropdown-content){right:unset;width:unset}}div.nylas-event-timeslot div.date-time-input div.recurrence-options{margin:8px 0}div.nylas-event-timeslot div.date-time-input div.recurrence-options select-dropdown::part(sd_dropdown){position:relative}div.nylas-event-timeslot div.date-time-input div.recurrence-options select-dropdown::part(sd_dropdown-button){width:fit-content;padding:14px;border-color:var(--nylas-base-200)}div.nylas-event-timeslot div.date-time-input div.recurrence-options select-dropdown::part(sd_dropdown-button):hover{color:var(--nylas-primary)}div.nylas-event-timeslot div.date-time-input div.recurrence-options select-dropdown::part(sd_dropdown-content){width:fit-content}div.nylas-event-timeslot div.date-time-input div.recurrence-options select-dropdown::part(sd_dropdown-button-selected-label){max-width:100%;width:fit-content;font-size:16px}@media screen and (max-width: 768px){div.nylas-event-timeslot div.date-time-input div.recurrence-options select-dropdown{width:-webkit-fill-available}div.nylas-event-timeslot div.date-time-input div.recurrence-options select-dropdown::part(sd_dropdown-button-selected-label){max-width:254px;width:fit-content}div.nylas-event-timeslot div.date-time-input div.recurrence-options select-dropdown::part(sd_dropdown-content){right:unset;width:unset}}@media screen and (max-width: 412px){div.nylas-event-timeslot div.date-time-input div.recurrence-options select-dropdown::part(sd_dropdown-button-selected-label){max-width:240px}}div.nylas-event-timeslot div.date-time-input div.recurrence-options div.custom-recurrence-time-period,div.nylas-event-timeslot div.date-time-input div.recurrence-options div.recurrence-type,div.nylas-event-timeslot div.date-time-input div.recurrence-options div.recurrence-end{display:grid;align-items:center;gap:16px;grid-template-columns:128px 1fr;margin-bottom:8px}div.nylas-event-timeslot div.date-time-input div.recurrence-options div.custom-recurrence-time-period select-dropdown::part(sd_dropdown-button),div.nylas-event-timeslot div.date-time-input div.recurrence-options div.recurrence-type select-dropdown::part(sd_dropdown-button),div.nylas-event-timeslot div.date-time-input div.recurrence-options div.recurrence-end select-dropdown::part(sd_dropdown-button){border-color:var(--nylas-base-200)}@media screen and (max-width: 768px){div.nylas-event-timeslot div.date-time-input div.recurrence-options div.custom-recurrence-time-period,div.nylas-event-timeslot div.date-time-input div.recurrence-options div.recurrence-type,div.nylas-event-timeslot div.date-time-input div.recurrence-options div.recurrence-end{grid-template-columns:1fr;gap:4px;margin:16px 0}}div.nylas-event-timeslot div.date-time-input div.recurrence-options div.custom-recurrence-time-period time-period-selector::part(id_dropdown-input),div.nylas-event-timeslot div.date-time-input div.recurrence-options div.recurrence-type time-period-selector::part(id_dropdown-input),div.nylas-event-timeslot div.date-time-input div.recurrence-options div.recurrence-end time-period-selector::part(id_dropdown-input){padding:16px}div.nylas-event-timeslot div.date-time-input div.recurrence-options div.custom-recurrence-time-period time-period-selector input-dropdown:hover,div.nylas-event-timeslot div.date-time-input div.recurrence-options div.recurrence-type time-period-selector input-dropdown:hover,div.nylas-event-timeslot div.date-time-input div.recurrence-options div.recurrence-end time-period-selector input-dropdown:hover{border:1px solid var(--nylas-primary);outline:1px solid transparent}div.nylas-event-timeslot div.date-time-input div.recurrence-options div.repeat-on div.days{margin:16px 0;display:flex;gap:16px;align-items:center}div.nylas-event-timeslot div.date-time-input div.recurrence-options div.repeat-on div.days div.buttons{display:flex;gap:8px;margin:8px 0}div.nylas-event-timeslot div.date-time-input div.recurrence-options div.repeat-on div.days div.buttons button{border-radius:50%;border:none;height:24px;width:24px;color:var(--nylas-base-800);cursor:pointer}div.nylas-event-timeslot div.date-time-input div.recurrence-options div.repeat-on div.days div.buttons button.selected{background-color:var(--nylas-primary);color:var(--nylas-base-0)}div.nylas-event-timeslot div.date-time-input div.recurrence-options div.repeat-on div.days div.buttons button:hover{background-color:var(--nylas-base-500);color:var(--nylas-base-0)}div.nylas-event-timeslot div.date-time-input div.recurrence-options div.repeat-on div.days div.buttons button:active{background-color:var(--nylas-base-600);color:var(--nylas-base-0)}div.nylas-event-timeslot div.date-time-input div.recurrence-options div.repeat-on div.days,div.nylas-event-timeslot div.date-time-input div.recurrence-options div.repeat-on div.custom-recurrence-ends,div.nylas-event-timeslot div.date-time-input div.recurrence-options div.repeat-on div.month-recurrence{display:grid;align-items:center;gap:16px;grid-template-columns:128px 1fr}@media screen and (max-width: 768px){div.nylas-event-timeslot div.date-time-input div.recurrence-options div.repeat-on div.days,div.nylas-event-timeslot div.date-time-input div.recurrence-options div.repeat-on div.custom-recurrence-ends,div.nylas-event-timeslot div.date-time-input div.recurrence-options div.repeat-on div.month-recurrence{grid-template-columns:1fr;gap:4px;margin:16px 0}}div.nylas-event-timeslot div.date-time-input div.recurrence-options div.repeat-on div.custom-recurrence{display:flex;gap:16px;align-items:baseline}@media screen and (max-width: 768px){div.nylas-event-timeslot div.date-time-input div.recurrence-options div.repeat-on div.custom-recurrence{flex-direction:column;align-items:flex-start;gap:0}}div.nylas-event-timeslot div.date-time-input div.recurrence-options div.repeat-on div.custom-recurrence div.custom-recurrence-end-after{display:flex;gap:8px;align-items:center}@media screen and (max-width: 768px){div.nylas-event-timeslot div.date-time-input div.recurrence-options div.repeat-on div.custom-recurrence div.custom-recurrence-end-after{flex-direction:column;align-items:flex-start}}div.nylas-event-timeslot div.date-time-input div.recurrence-options div.repeat-on div.custom-recurrence nylas-date-component::part(ic__date){padding:0 16px;height:52px;border:1px solid var(--nylas-base-200)}";
17
17
  const NylasEventTimeslotStyle0 = nylasEventTimeslotCss;
18
18
 
19
19
  var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
@@ -325,7 +325,15 @@ const NylasEventTimeslot = proxyCustomElement(class NylasEventTimeslot extends H
325
325
  this.repeatEndOn = value;
326
326
  }
327
327
  else if (name === 'recurrence-end-after') {
328
- this.repeatEndAfter = parseInt(value);
328
+ const parsedValue = parseInt(value);
329
+ if (parsedValue < 1 || isNaN(parsedValue)) {
330
+ this.timeWindowFormError.emit({
331
+ key: this.name,
332
+ message: instance.t('fixFormErrors'),
333
+ });
334
+ return;
335
+ }
336
+ this.repeatEndAfter = parsedValue;
329
337
  }
330
338
  this.handleValueChanged();
331
339
  }
@@ -355,12 +363,12 @@ const NylasEventTimeslot = proxyCustomElement(class NylasEventTimeslot extends H
355
363
  const defaultEndAfter = this.repeatEveryFrequency === 'week' ? 4 : this.repeatEveryFrequency === 'month' ? 12 : 5;
356
364
  this.repeatEndOn = this.repeatEndOn || defaultEndOnDate;
357
365
  this.repeatEndAfter = this.repeatEndAfter || defaultEndAfter;
358
- return (h(Host, { key: '31732a2c9daed8e38e9481d545a43d2093ebf9ae' }, h("div", { key: '122e6f86aa037d3ca33333a48ee01b56a658b9be', class: "nylas-event-timeslot", part: "netimeslot" }, h("label", { key: '6a5e350091395c992a4412b0bbf85847cff9e2aa', htmlFor: "date-time-input" }, instance.t('nylasEventTimeslot.dateTimeLabel')), h("div", { key: 'fde21f23f6e3767f90ef7bfe8ef87fdc2880d53a', class: "date-time-input", part: "netimeslot__date-time-input" }, h("div", { key: '51ff603b675b0fca1e265ddb7cbba058e02b2412', class: "date-time-picker", part: "netimeslot__date-time-picker" }, h("nylas-date-component", { key: 'aaf0a665c49243dc3ea62338b83a54a1ff44922f', name: "date-time-input", defaultValue: this.selectedDate, id: 'date-time-input', required: true }), h("div", { key: '982c20021cf979720d71e19210b7aced7b3d8a32', class: "time-range", part: "netimeslot__time-range" }, h("nylas-time-window-picker", { id: 'start-time', hasError: this.timeRangeError, time: this.selectedStartTime, language: this.selectedLanguage, name: 'start-time', key: 'start-time', exportparts: "time-picker: nap__time-picker-container, time-input: nap__time-picker-input, times: nap__time-picker-times" }), h("span", { key: '00a6b1961ffc500814b00da0a63fe52eb4982cb1' }, "\u2013"), h("nylas-time-window-picker", { id: 'end-time', hasError: this.timeRangeError, time: this.selectedEndTime, language: this.selectedLanguage, name: 'end-time', key: 'end-time', minimumStartTime: this.selectedStartTime, exportparts: "time-picker: nap__time-picker-container, time-input: nap__time-picker-input, times: nap__time-picker-times" })), selectedTimezoneOption?.label && (h("select-dropdown", { name: "timezone", exportparts: "sd_dropdown: nap__timezone-container, sd_dropdown-button: nap__timezone-button, sd_dropdown-content: nap__timezone-dropdown-content", options: timezoneOptions, withChevron: false, defaultSelectedOption: selectedTimezoneOption }, h("span", { slot: "select-icon" }, h("globe-icon", { width: "20", height: "20" }))))), h("div", { key: '69ecad9a4f597e8e8be1c7467ff66f24411a6638', class: "recurrence-options", part: "netimeslot__recurrence-options" }, defaultRecurrenceOption && defaultRecurrenceOption?.label && (h("div", { class: "recurrence-type", part: "netimeslot__recurrence-type" }, h("label", { htmlFor: "recurrence-type" }, instance.t('nylasEventTimeslot.recurrenceLabel')), h("select-dropdown", { withSearch: false, id: "recurrence-type", name: "recurrence-type", options: this.recurrenceOptions, defaultSelectedOption: defaultRecurrenceOption, exportparts: "sd_dropdown: netimeslot__dropdown, sd_dropdown-button: netimeslot__dropdown-button, sd_dropdown-content: netimeslot__dropdown-content" }))), this.selectedRecurrenceType !== 'custom' && this.selectedRecurrenceType !== 'none' && (h("div", { class: "recurrence-end", part: "netimeslot__recurrence-end" }, h("label", null, instance.t('nylasEventTimeslot.endDate')), h("nylas-date-component", { name: "recurrence-end-date", defaultValue: this.repeatEndOn || defaultEndOnDate, id: 'recurrence-end-date', required: true }))), this.selectedRecurrenceType === 'custom' && (h("div", { class: "custom-recurrence-time-period", part: "netimeslot__custom-recurrence" }, h("label", { htmlFor: "" }, instance.t('nylasEventTimeslot.customRecurrence.repeatEvery')), h("time-period-selector", { id: "custom-recurrence-time-period", exportparts: "tps__number-dropdown: netimeslot__number-dropdown, tps__number-dropdown-button: netimeslot__number-dropdown-button, tps__number-dropdown-content: netimeslot__number-dropdown-content, tps__period-dropdown: netimeslot__period-dropdown, tps__period-dropdown-button: netimeslot__period-dropdown-button, tps__period-dropdown-content: netimeslot__period-dropdown-content", timePeriods: [
366
+ return (h(Host, { key: 'a6c2b24369ec32b3488fb597ceb07265f8025b38' }, h("div", { key: '5412e2af0d10c1a232fa61b9ba3d9a327a631f20', class: "nylas-event-timeslot", part: "netimeslot" }, h("label", { key: '5054d504ca18771fb990374ce1859573227661a9', htmlFor: "date-time-input" }, instance.t('nylasEventTimeslot.dateTimeLabel')), h("div", { key: '0dffbcf300744ef1c9ca74c73b3bd87bb0896711', class: "date-time-input", part: "netimeslot__date-time-input" }, h("div", { key: 'd2c73a9cbe77d5a4c65087f4707b0f08c1b404e9', class: "date-time-picker", part: "netimeslot__date-time-picker" }, h("nylas-date-component", { key: '2955d08462d7e4e81079083349b8ce8cc07b1c1a', name: "date-time-input", defaultValue: this.selectedDate, id: 'date-time-input', required: true }), h("div", { key: 'edaab3f01999687c94b0b8a386fe863f211a4ced', class: "time-range", part: "netimeslot__time-range" }, h("nylas-time-window-picker", { id: 'start-time', hasError: this.timeRangeError, time: this.selectedStartTime, language: this.selectedLanguage, name: 'start-time', key: 'start-time', exportparts: "time-picker: nap__time-picker-container, time-input: nap__time-picker-input, times: nap__time-picker-times" }), h("span", { key: '72f7f70ecef78afc7a5a426da2548cc4af12d139' }, "\u2013"), h("nylas-time-window-picker", { id: 'end-time', hasError: this.timeRangeError, time: this.selectedEndTime, language: this.selectedLanguage, name: 'end-time', key: 'end-time', minimumStartTime: this.selectedStartTime, exportparts: "time-picker: nap__time-picker-container, time-input: nap__time-picker-input, times: nap__time-picker-times" })), selectedTimezoneOption?.label && (h("select-dropdown", { name: "timezone", exportparts: "sd_dropdown: nap__timezone-container, sd_dropdown-button: nap__timezone-button, sd_dropdown-content: nap__timezone-dropdown-content", options: timezoneOptions, withChevron: false, defaultSelectedOption: selectedTimezoneOption }, h("span", { slot: "select-icon" }, h("globe-icon", { width: "20", height: "20" }))))), h("div", { key: '69743f032d1c090e65bd6b65cca97154972a7e98', class: "recurrence-options", part: "netimeslot__recurrence-options" }, defaultRecurrenceOption && defaultRecurrenceOption?.label && (h("div", { class: "recurrence-type", part: "netimeslot__recurrence-type" }, h("label", { htmlFor: "recurrence-type" }, instance.t('nylasEventTimeslot.recurrenceLabel')), h("select-dropdown", { withSearch: false, id: "recurrence-type", name: "recurrence-type", options: this.recurrenceOptions, defaultSelectedOption: defaultRecurrenceOption, exportparts: "sd_dropdown: netimeslot__dropdown, sd_dropdown-button: netimeslot__dropdown-button, sd_dropdown-content: netimeslot__dropdown-content" }))), this.selectedRecurrenceType !== 'custom' && this.selectedRecurrenceType !== 'none' && (h("div", { class: "recurrence-end", part: "netimeslot__recurrence-end" }, h("label", null, instance.t('nylasEventTimeslot.endDate')), h("nylas-date-component", { name: "recurrence-end-date", defaultValue: this.repeatEndOn || defaultEndOnDate, id: 'recurrence-end-date', required: true }))), this.selectedRecurrenceType === 'custom' && (h("div", { class: "custom-recurrence-time-period", part: "netimeslot__custom-recurrence" }, h("label", { htmlFor: "" }, instance.t('nylasEventTimeslot.customRecurrence.repeatEvery')), h("time-period-selector", { id: "custom-recurrence-time-period", exportparts: "tps__number-dropdown: netimeslot__number-dropdown, tps__number-dropdown-button: netimeslot__number-dropdown-button, tps__number-dropdown-content: netimeslot__number-dropdown-content, tps__period-dropdown: netimeslot__period-dropdown, tps__period-dropdown-button: netimeslot__period-dropdown-button, tps__period-dropdown-content: netimeslot__period-dropdown-content", timePeriods: [
359
367
  { value: 'day', label: instance.t('timePeriod', { context: 'day' }) },
360
368
  { value: 'week', label: instance.t('timePeriod', { context: 'week' }) },
361
369
  { value: 'month', label: instance.t('timePeriod', { context: 'month' }) },
362
370
  { value: 'year', label: instance.t('timePeriod', { context: 'year' }) },
363
- ], defaultSelectedNumber: this.repeatEveryInterval, defaultSelectedPeriod: this.repeatEveryFrequency }))), h("div", { key: '72e9f15924d7cd50fa1e2200cd5fecf20213fe94', class: "repeat-on" }, this.selectedRecurrenceType === 'custom' && this.repeatEveryFrequency === 'week' && (h("div", { class: "days" }, h("label", null, instance.t('nylasEventTimeslot.customRecurrence.repeatOn')), h("div", { class: "buttons" }, [
371
+ ], defaultSelectedNumber: this.repeatEveryInterval, defaultSelectedPeriod: this.repeatEveryFrequency }))), h("div", { key: '40ea7614b0c862be4adfdf798db12b52277ff6a6', class: "repeat-on" }, this.selectedRecurrenceType === 'custom' && this.repeatEveryFrequency === 'week' && (h("div", { class: "days" }, h("label", null, instance.t('nylasEventTimeslot.customRecurrence.repeatOn')), h("div", { class: "buttons" }, [
364
372
  { label: 'S', value: 'SU', title: 'Sunday' },
365
373
  { label: 'M', value: 'MO', title: 'Monday' },
366
374
  { label: 'T', value: 'TU', title: 'Tuesday' },
@@ -371,7 +379,7 @@ const NylasEventTimeslot = proxyCustomElement(class NylasEventTimeslot extends H
371
379
  ].map(day => (h("button", { class: { selected: this.repeatOnDays.includes(day.value) }, title: day.title, onClick: () => {
372
380
  this.repeatOnDays = this.repeatOnDays.includes(day.value) ? this.repeatOnDays.filter(d => d !== day.value) : [...this.repeatOnDays, day.value];
373
381
  this.handleValueChanged();
374
- } }, day.label)))))), this.selectedRecurrenceType === 'custom' && this.repeatEveryFrequency === 'month' && (h("div", { class: "month-recurrence" }, h("span", null), h("select-dropdown", { withSearch: false, id: "month-recurrence-type", name: "month-recurrence-type", options: this.monthRecurrenceOptions, defaultSelectedOption: this.repeatMonthlySameDate ? this.monthRecurrenceOptions[0] : this.monthRecurrenceOptions[1], exportparts: "sd_dropdown: netimeslot__dropdown, sd_dropdown-button: netimeslot__dropdown-button, sd_dropdown-content: netimeslot__dropdown-content" }))), h("div", { key: '24efc522c8eb8ce3fafeb8964da717228602c14a', class: "custom-recurrence" }, this.selectedRecurrenceType === 'custom' && (h("div", { class: "custom-recurrence-ends" }, h("label", { htmlFor: "recurrence-type" }, instance.t('nylasEventTimeslot.customRecurrence.ends')), h("select-dropdown", { withSearch: false, id: "custom-recurrence-end-type", name: "custom-recurrence-end-type", options: endOptions, defaultSelectedOption: endOptions.find(option => option.value === this.repeatEndType), exportparts: "sd_dropdown: netimeslot__dropdown, sd_dropdown-button: netimeslot__dropdown-button, sd_dropdown-content: netimeslot__dropdown-content" }))), this.selectedRecurrenceType === 'custom' && this.repeatEndType === 'on' && (h("div", null, h("nylas-date-component", { name: "custom-recurrence-end-date", defaultValue: this.repeatEndOn || defaultEndOnDate, id: 'custom-recurrence-end-date', required: true }))), this.selectedRecurrenceType === 'custom' && this.repeatEndType === 'after' && (h("div", { class: "custom-recurrence-end-after" }, h("input-component", { name: "recurrence-end-after", id: "recurrence-end-after", type: "number", minValue: 1, defaultValue: defaultEndAfter.toString(), exportparts: "ic_input: netimeslot__input-textfield" }), h("span", null, instance.t('nylasEventTimeslot.customRecurrence.occurrences')))))))))));
382
+ } }, day.label)))))), this.selectedRecurrenceType === 'custom' && this.repeatEveryFrequency === 'month' && (h("div", { class: "month-recurrence" }, h("span", null), h("select-dropdown", { withSearch: false, id: "month-recurrence-type", name: "month-recurrence-type", options: this.monthRecurrenceOptions, defaultSelectedOption: this.repeatMonthlySameDate ? this.monthRecurrenceOptions[0] : this.monthRecurrenceOptions[1], exportparts: "sd_dropdown: netimeslot__dropdown, sd_dropdown-button: netimeslot__dropdown-button, sd_dropdown-content: netimeslot__dropdown-content" }))), h("div", { key: '5a873ef2a8f3c02856f18fbd99c7092a6c91bd9b', class: "custom-recurrence" }, this.selectedRecurrenceType === 'custom' && (h("div", { class: "custom-recurrence-ends" }, h("label", { htmlFor: "recurrence-type" }, instance.t('nylasEventTimeslot.customRecurrence.ends')), h("select-dropdown", { withSearch: false, id: "custom-recurrence-end-type", name: "custom-recurrence-end-type", options: endOptions, defaultSelectedOption: endOptions.find(option => option.value === this.repeatEndType), exportparts: "sd_dropdown: netimeslot__dropdown, sd_dropdown-button: netimeslot__dropdown-button, sd_dropdown-content: netimeslot__dropdown-content" }))), this.selectedRecurrenceType === 'custom' && this.repeatEndType === 'on' && (h("div", null, h("nylas-date-component", { name: "custom-recurrence-end-date", defaultValue: this.repeatEndOn || defaultEndOnDate, id: 'custom-recurrence-end-date', required: true }))), this.selectedRecurrenceType === 'custom' && this.repeatEndType === 'after' && (h("div", { class: "custom-recurrence-end-after" }, h("input-component", { name: "recurrence-end-after", id: "recurrence-end-after", type: "number", minValue: 1, defaultValue: defaultEndAfter.toString(), exportparts: "ic_input: netimeslot__input-textfield" }), h("span", null, instance.t('nylasEventTimeslot.customRecurrence.occurrences')))))))))));
375
383
  }
376
384
  static get formAssociated() { return true; }
377
385
  get host() { return this; }
@@ -1 +1 @@
1
- {"file":"nylas-event-timeslot2.js","mappings":";;;;;;;;;;;;;;;AAAA,MAAM,qBAAqB,GAAG,ipVAAipV,CAAC;AAChrV,iCAAe,qBAAqB;;;;;;;;;;;;;;;;ACWpC,KAAK,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;AAChC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AAClB,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;AAEvB,MAAM,SAAS,GAAG;IAChB,GAAG,EAAE,OAAO;IACZ,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,SAAS;IAChB,IAAI,EAAE,QAAQ;CACf,CAAC;MAcW,kBAAkB;;;;;;;;oBAON,gBAAgB;;;;;;;;8BA+CJ,KAAK;;iCAUyB,EAAE;mCAI5B,CAAC;oCAIA,MAAM;4BAIZ,EAAE;qCAIM,IAAI;6BAIN,OAAO;8BAIb,CAAC;;sCAQmC,EAAE;;;IA4BxE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AA4B,EACjC,YAAY,EAAE,IAAI,CAAC,WAAW,IAAI,gBAAgB,EAClD,EAAE,EAAE,4BAA4B,EAChC,QAAQ,EAAE,IAAI,GACQ,CACpB,CACP,EACA,IAAI,CAAC,sBAAsB,KAAK,QAAQ,IAAI,IAAI,CAAC,aAAa,KAAK,OAAO,KACzE,WAAK,KAAK,EAAC,6BAA6B,IACtC,uBACE,IAAI,EAAC,sBAAsB,EAC3B,EAAE,EAAC,sBAAsB,EACzB,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,CAAC,EACX,YAAY,EAAE,eAAe,CAAC,QAAQ,EAAE,EACxC,WAAW,EAAC,uCAAuC,GACnD,EACF,gBAAOA,QAAO,CAAC,CAAC,CAAC,iDAAiD,CAAC,CAAQ,CACvE,CACP,CACG,CACF,CACF,CACF,CACF,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA7LD;IAVC,iBAAiB,CAAwG;QACxH,IAAI,EAAE,sBAAsB;QAC5B,YAAY,EAAE,IAAI,GAAG,CAAC,CAAC,CAAC,kCAAkC,EAAE,kBAAkB,CAAC,CAAC,CAAC;QACjF,YAAY,EAAE;YACZ,YAAY,EAAE,OAAO,KAAmD,EAAE,eAA8C;gBACtH,KAAK,CAAC,sBAAsB,EAAE,cAAc,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;aAC7D;SACF;QACD,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;gDA8LD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["i18next"],"sources":["src/components/scheduler-editor/nylas-event-timeslot/nylas-event-timeslot.scss?tag=nylas-event-timeslot&encapsulation=shadow","src/components/scheduler-editor/nylas-event-timeslot/nylas-event-timeslot.tsx"],"sourcesContent":["@import '../../../common/styles/variables.scss';\n@import '../../../common/mixins/buttons.scss';\n\n:host {\n display: block;\n @include default-css-variables;\n width: inherit;\n}\n\ndiv.nylas-event-timeslot {\n label {\n display: flex;\n align-items: center;\n color: var(--nylas-base-800);\n font-size: 16px;\n font-style: normal;\n font-weight: 400;\n line-height: 150%;\n }\n\n div.date-time-input {\n div.date-time-picker {\n display: flex;\n gap: 32px;\n\n @media #{$mobile} {\n flex-direction: column;\n gap: 16px;\n }\n\n nylas-date-component {\n width: 224px;\n\n @media #{$mobile} {\n width: 100%;\n }\n\n &::part(ic__date) {\n height: 50px;\n border-color: var(--nylas-base-200);\n }\n }\n\n div.time-range {\n display: flex;\n gap: 8px;\n align-items: flex-start;\n\n span {\n margin: 12px 0 0 6px;\n display: inline-flex;\n align-items: flex-start;\n }\n\n @media #{$mobile} {\n display: grid;\n grid-template-columns: 1fr 20px 1fr;\n\n nylas-time-window-picker {\n &::part(time-picker) {\n width: -webkit-fill-available;\n }\n\n &::part(time-input) {\n width: calc(100% - 8px);\n }\n }\n }\n }\n\n select-dropdown {\n width: fit-content;\n\n &::part(sd_dropdown) {\n position: relative;\n }\n\n &::part(sd_dropdown-button) {\n border: none;\n padding: 14px;\n justify-content: flex-start;\n\n &:hover {\n border: none;\n outline: none;\n color: var(--nylas-primary);\n }\n }\n\n @media #{$mobile} {\n width: -webkit-fill-available;\n\n &::part(sd_dropdown-button-selected-label) {\n max-width: fit-content;\n }\n\n &::part(sd_dropdown-content) {\n right: unset;\n width: unset;\n }\n }\n }\n }\n\n div.recurrence-options {\n margin: 8px 0;\n\n select-dropdown {\n &::part(sd_dropdown) {\n position: relative;\n }\n\n &::part(sd_dropdown-button) {\n width: fit-content;\n padding: 14px;\n border-color: var(--nylas-base-200);\n\n &:hover {\n color: var(--nylas-primary);\n }\n }\n\n &::part(sd_dropdown-content) {\n width: fit-content;\n }\n\n &::part(sd_dropdown-button-selected-label) {\n max-width: 100%;\n width: fit-content;\n font-size: 16px;\n }\n\n @media #{$mobile} {\n width: -webkit-fill-available;\n\n &::part(sd_dropdown-button-selected-label) {\n max-width: 254px;\n width: fit-content;\n }\n\n &::part(sd_dropdown-content) {\n right: unset;\n width: unset;\n }\n }\n\n @media #{$x-small-mobile} {\n &::part(sd_dropdown-button-selected-label) {\n max-width: 240px;\n }\n }\n }\n\n div.custom-recurrence-time-period,\n div.recurrence-type,\n div.recurrence-end {\n display: grid;\n align-items: center;\n gap: 16px;\n grid-template-columns: 128px 1fr;\n margin-bottom: 8px;\n select-dropdown::part(sd_dropdown-button) {\n border-color: var(--nylas-base-200);\n }\n\n @media #{$mobile} {\n grid-template-columns: 1fr;\n gap: 4px;\n margin: 16px 0;\n }\n\n time-period-selector::part(id_dropdown-input) {\n padding: 16px;\n }\n time-period-selector input-dropdown {\n &:hover {\n border: 1px solid var(--nylas-primary);\n outline: 1px solid transparent;\n }\n }\n }\n\n div.repeat-on {\n div.days {\n margin: 16px 0;\n display: flex;\n gap: 16px;\n align-items: center;\n\n div.buttons {\n display: flex;\n gap: 8px;\n margin: 8px 0;\n\n button {\n border-radius: 50%;\n border: none;\n height: 24px;\n width: 24px;\n color: var(--nylas-base-800);\n cursor: pointer;\n\n &.selected {\n background-color: var(--nylas-primary);\n color: var(--nylas-base-0);\n }\n\n &:hover {\n background-color: var(--nylas-base-500);\n color: var(--nylas-base-0);\n }\n\n &:active {\n background-color: var(--nylas-base-600);\n color: var(--nylas-base-0);\n }\n }\n }\n }\n\n div.days,\n div.custom-recurrence-ends,\n div.month-recurrence {\n display: grid;\n align-items: center;\n gap: 16px;\n grid-template-columns: 128px 1fr;\n\n @media #{$mobile} {\n grid-template-columns: 1fr;\n gap: 4px;\n margin: 16px 0;\n }\n }\n\n div.custom-recurrence {\n display: flex;\n gap: 16px;\n align-items: center;\n\n @media #{$mobile} {\n flex-direction: column;\n align-items: flex-start;\n gap: 0;\n }\n\n div.custom-recurrence-end-after {\n display: flex;\n gap: 8px;\n align-items: center;\n\n @media #{$mobile} {\n flex-direction: column;\n align-items: flex-start;\n }\n }\n\n nylas-date-component::part(ic__date) {\n padding: 0 16px;\n height: 52px;\n border: 1px solid var(--nylas-base-200);\n }\n }\n }\n }\n }\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug, generateRRule, getTimezoneOffset } from '@/utils/utils';\nimport { AttachInternals, Component, Element, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE, TIMEZONE_MAP } from '@/common/constants';\nimport dayjs from 'dayjs';\nimport customParseFormat from 'dayjs/plugin/customParseFormat';\nimport utc from 'dayjs/plugin/utc';\nimport timezone from 'dayjs/plugin/timezone';\n\ndayjs.extend(customParseFormat);\ndayjs.extend(utc);\ndayjs.extend(timezone);\n\nconst periodMap = {\n day: 'daily',\n week: 'weekly',\n month: 'monthly',\n year: 'yearly',\n};\n\ntype RepeatEndType = 'never' | 'on' | 'after';\ntype RecurrenceType = 'none' | 'daily' | 'weekly' | 'monthly' | 'yearly' | 'custom';\n\n/**\n * The `nylas-event-timeslot` component is a UI component that allows users to select the event type for the scheduler configuration.\n */\n@Component({\n tag: 'nylas-event-timeslot',\n styleUrl: 'nylas-event-timeslot.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasEventTimeslot {\n @Element() host!: HTMLNylasEventTimeslotElement;\n\n /**\n * @standalone\n * The name of the component\n */\n @Prop() name: string = 'event-timeslot';\n /**\n * The initial value of the event timeslot.\n */\n @Prop() initialValue?: {\n when: {\n start_time: number;\n end_time: number;\n start_timezone: string;\n end_timezone: string;\n };\n recurrence: string[];\n };\n\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n\n /**\n * The selected date.\n */\n @State() selectedDate!: string;\n\n /**\n * The selected start time.\n */\n @State() selectedStartTime!: string;\n\n /**\n * The selected end time.\n */\n @State() selectedEndTime!: string;\n\n /**\n * The timezone.\n */\n @State() selectedTimezone!: string;\n\n /**\n * The selected recurrence type.\n */\n @State() selectedRecurrenceType!: RecurrenceType;\n\n /**\n * Time range error.\n */\n @State() timeRangeError: boolean = false;\n\n /**\n * The selected rrule.\n */\n @State() selectedRrule!: string | null;\n\n /**\n * Recurrence options.\n */\n @State() recurrenceOptions: { label: string; value: string }[] = [];\n /**\n * Repeat every frequency.\n */\n @State() repeatEveryInterval: number = 1;\n /**\n * Repeat every period.\n */\n @State() repeatEveryFrequency: string = 'week';\n /**\n * Repeat on days.\n */\n @State() repeatOnDays: string[] = [];\n /**\n * Repeat monthly on.\n */\n @State() repeatMonthlySameDate: boolean = true;\n /**\n * Repeat end type.\n */\n @State() repeatEndType: RepeatEndType = 'never';\n /**\n * Repeat end after.\n */\n @State() repeatEndAfter: number = 1;\n /**\n * Repeat end on (custom recurrence).\n */\n @State() repeatEndOn: string | undefined;\n /**\n * Month recurrence options.\n */\n @State() monthRecurrenceOptions: { label: string; value: string }[] = [];\n /**\n * The end date for recurrence (non-custom recurrence).\n */\n @State() endDate: string | undefined;\n\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * This event is fired when the value of the event location changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n /**\n * This event is fired when the value of the event timeslot changes.\n */\n @Event() timeWindowFormError!: EventEmitter<{\n key: string;\n message: string;\n }>;\n\n // Lifecycle methods\n connectedCallback() {\n debug('nylas-event-timeslot', 'connectedCallback');\n }\n\n disconnectedCallback() {\n debug('nylas-event-timeslot', 'disconnectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-event-timeslot', 'componentWillLoad');\n // See comment in the @Watch('name') decorator for more information.\n this.host.setAttribute('name', this.name);\n }\n\n componentDidLoad() {\n debug('nylas-event-timeslot', 'componentDidLoad');\n\n // Set defaults from initialValue or fallback to current values\n if (this.initialValue) {\n const { when, recurrence } = this.initialValue;\n\n if (when) {\n this.selectedDate = dayjs.unix(when.start_time).tz(when.start_timezone).format('YYYY-MM-DD');\n this.selectedStartTime = dayjs.unix(when.start_time).tz(when.start_timezone).format('hh:mma');\n this.selectedEndTime = dayjs.unix(when.end_time).tz(when.end_timezone).format('hh:mma');\n this.selectedTimezone = when.start_timezone;\n } else {\n this.selectedDate = new Date().toISOString().split('T')[0];\n const defaultTimes = this.getSuggestedTime();\n this.selectedStartTime = defaultTimes.startTime;\n this.selectedEndTime = defaultTimes.endTime;\n this.selectedTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone;\n }\n\n if (recurrence && recurrence.length > 0) {\n this.selectedRrule = recurrence[0];\n const repeatEndAfter = recurrence[0]?.split(';')?.find(s => s.includes('COUNT'));\n if (repeatEndAfter) {\n this.repeatEndAfter = parseInt(repeatEndAfter.split('=')[1]);\n }\n const daysString = recurrence[0]?.split(';')?.find(s => s.includes('BYDAY'));\n if (daysString) {\n this.repeatOnDays = daysString.split('=')[1].split(',');\n }\n const until = recurrence[0]?.split(';')?.find(s => s.includes('UNTIL'));\n if (until) {\n const untilDate = dayjs(until.split('=')[1], 'YYYYMMDDTHHmmss').toDate();\n this.repeatEndOn = dayjs(untilDate).toISOString().split('T')[0];\n this.repeatEndType = 'on';\n }\n const recurrenceType = this.getRecurrenceTypeFromRrule(recurrence[0]);\n this.selectedRecurrenceType = recurrenceType || 'none';\n } else {\n this.selectedRecurrenceType = 'none';\n this.selectedRrule = generateRRule(this.selectedDate, this.selectedRecurrenceType, undefined, undefined, this.selectedTimezone);\n }\n } else {\n this.selectedDate = new Date().toISOString().split('T')[0];\n const defaultTimes = this.getSuggestedTime();\n this.selectedStartTime = defaultTimes.startTime;\n this.selectedEndTime = defaultTimes.endTime;\n this.selectedTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone;\n this.selectedRecurrenceType = 'none';\n this.selectedRrule = generateRRule(this.selectedDate, this.selectedRecurrenceType, undefined, undefined, this.selectedTimezone);\n }\n\n this.recurrenceOptions = this.generateRecurrenceOptions(this.selectedDate, this.selectedTimezone);\n this.monthRecurrenceOptions = this.getMonthRecurrenceOptions(this.selectedDate, this.selectedTimezone);\n\n // Trigger initial value change\n this.handleValueChanged(true);\n }\n\n /**\n * When a name prop is passed, stencil does not automatically set the name attribute on the host element.\n * Since this component is form-associated, the name attribute is required for form submission.\n * This is a workaround to ensure that the name attribute is set on the host element.\n */\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-event-timeslot', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('selectedLanguage')\n selectedLanguageChangedHandler(newVal: LANGUAGE_CODE, oldVal: LANGUAGE_CODE) {\n if (newVal === oldVal) return;\n i18next.changeLanguage(newVal);\n }\n\n // Utility function to get the ordinal suffix (e.g., 1st, 2nd, 3rd)\n getOrdinalSuffix(n) {\n const s = ['th', 'st', 'nd', 'rd'];\n const v = n % 100;\n return n + (s[(v - 20) % 10] || s[v] || s[0]);\n }\n\n getRecurrenceTypeFromRrule(rrule: string): RecurrenceType | undefined {\n if (rrule.includes('INTERVAL')) return 'custom';\n if (rrule.includes('FREQ=DAILY')) return 'daily';\n if (rrule.includes('FREQ=WEEKLY')) return 'weekly';\n if (rrule.includes('FREQ=MONTHLY')) return 'monthly';\n if (rrule.includes('FREQ=YEARLY')) return 'yearly';\n return undefined;\n }\n\n // Function to generate dynamic recurrence options\n generateRecurrenceOptions(selectedDate: string, timezoneStr: string) {\n const daysOfWeek = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];\n\n // Parse the date in the given timezone\n const selectedDay = dayjs.tz(selectedDate, timezoneStr);\n\n const dayOfWeek = daysOfWeek[selectedDay.day()]; // Get the day of the week (e.g., Thursday)\n\n // Determine the occurrence of the day in the month (e.g., 1st, 2nd, etc.)\n const date = selectedDay.date();\n const occurrenceInMonth = Math.ceil(date / 7); // e.g., 1st Thursday\n\n // Generate options\n return [\n { label: i18next.t('nylasEventTimeslot.recurrenceOptions.none'), value: 'none' },\n { label: i18next.t('nylasEventTimeslot.recurrenceOptions.daily'), value: 'daily' },\n { label: i18next.t('nylasEventTimeslot.recurrenceOptions.weekly', { dayOfWeek: dayOfWeek }), value: 'weekly' },\n { label: i18next.t('nylasEventTimeslot.recurrenceOptions.monthly', { dayOfMonth: `${this.getOrdinalSuffix(occurrenceInMonth)} ${dayOfWeek}` }), value: 'monthly' },\n {\n label: i18next.t('nylasEventTimeslot.recurrenceOptions.yearly', { dateOfMonth: `${selectedDay.format('MMMM D')}` }),\n value: 'yearly',\n },\n { label: i18next.t('nylasEventTimeslot.recurrenceOptions.custom'), value: 'custom' },\n ];\n }\n\n // Function to generate dynamic month recurrence options\n getMonthRecurrenceOptions(selectedDate: string, timezoneStr: string) {\n const daysOfWeek = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];\n\n const selectedDay = dayjs.tz(selectedDate, timezoneStr);\n const dayOfWeek = daysOfWeek[selectedDay.day()]; // Get the day of the week (e.g., Thursday)\n const date = selectedDay.date();\n const occurrenceInMonth = Math.ceil(date / 7);\n\n return [\n { label: i18next.t('nylasEventTimeslot.recurrenceOptions.monthOnDay', { date: date }), value: 'monthly-same-date' },\n { label: i18next.t('nylasEventTimeslot.recurrenceOptions.monthly', { dayOfMonth: `${this.getOrdinalSuffix(occurrenceInMonth)} ${dayOfWeek}` }), value: 'monthly' },\n ];\n }\n\n // Function to get the default suggested time shown in the time range picker\n getSuggestedTime() {\n const now = dayjs();\n\n // Round current time to the next 30-minute increment\n const minutes = now.minute();\n const roundedMinutes = minutes <= 30 ? 30 : 60;\n const startTime = now.set('minute', roundedMinutes).set('second', 0);\n\n // Calculate end time (30 minutes after start time)\n const endTime = startTime.add(30, 'minute');\n\n // Format the times in \"hh:mma\" format\n return {\n startTime: startTime.format('hh:mma'), // e.g., \"03:00pm\"\n endTime: endTime.format('hh:mma'), // e.g., \"03:30pm\"\n };\n }\n\n getTimezoneLabelHTML(timezone: string) {\n const offset = getTimezoneOffset(timezone);\n return (\n <span\n class=\"timezone-label\"\n style={{\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n width: '-webkit-fill-available',\n }}\n >\n {TIMEZONE_MAP[timezone]}{' '}\n <span\n class=\"timezone-offset\"\n style={{\n fontSize: '14px',\n fontWeight: '400',\n color: 'var(--nylas-base-500)',\n }}\n >\n {offset}\n </span>\n </span>\n );\n }\n\n // Function to check if the start time is after the end time (used for validation)\n isStartTimeAfterEndTime(startTime: string, endTime: string): boolean {\n // Parse the times using Day.js\n const start = dayjs(startTime, 'hh:mma');\n const end = dayjs(endTime, 'hh:mma');\n\n // Compare start and end times\n return start.isAfter(end);\n }\n\n isStartTimeEqualToEndTime(startTime: string, endTime: string): boolean {\n const start = dayjs(startTime, 'hh:mma');\n const end = dayjs(endTime, 'hh:mma');\n return start.isSame(end);\n }\n\n // Function to get the start and end times in Unix timestamp format (used in the valueChanged event)\n getStartAndEndTimes() {\n const start_time = dayjs(`${this.selectedDate} ${this.selectedStartTime}`, 'YYYY-MM-DD hh:mma').toDate();\n const end_time = dayjs(`${this.selectedDate} ${this.selectedEndTime}`, 'YYYY-MM-DD hh:mma').toDate();\n\n return {\n start_time: Math.round(start_time.getTime() / 1000),\n end_time: Math.round(end_time.getTime() / 1000),\n };\n }\n\n // Function to get the custom options for the RRule\n getCustomOptions() {\n if (this.selectedRecurrenceType !== 'custom') {\n return undefined;\n }\n\n const repeatFreq = periodMap[this.repeatEveryFrequency];\n\n return {\n frequency: repeatFreq,\n interval: this.repeatEveryInterval,\n daysOfWeek: this.repeatEveryFrequency === 'week' ? this.repeatOnDays : undefined,\n monthlySameDate: this.repeatEveryFrequency === 'month' ? this.repeatMonthlySameDate : undefined,\n end: {\n type: this.repeatEndType,\n count: this.repeatEndType === 'after' ? this.repeatEndAfter : undefined,\n date: this.repeatEndType === 'on' ? this.repeatEndOn : undefined,\n },\n };\n }\n\n handleValueChanged(noValue: boolean = false) {\n const customOptions = this.getCustomOptions();\n this.selectedRrule = generateRRule(this.selectedDate, this.selectedRecurrenceType, this.repeatEndOn, customOptions, this.selectedTimezone);\n const { start_time, end_time } = this.getStartAndEndTimes();\n const internalsObj = {\n when: {\n start_time: start_time,\n end_time: end_time,\n start_timezone: this.selectedTimezone,\n end_timezone: this.selectedTimezone,\n },\n recurrence: this.selectedRrule ? [this.selectedRrule] : [],\n };\n this.internals.setFormValue(JSON.stringify(internalsObj), this.name);\n if (!noValue) {\n this.valueChanged.emit({\n value: JSON.stringify(internalsObj),\n name: this.name,\n });\n }\n }\n\n // Listeners\n @Listen('timeChange')\n setTime(event: CustomEvent<{ key: string; value: string }>) {\n const { key, value } = event.detail;\n if (key === 'start-time') {\n this.selectedStartTime = value;\n } else if (key === 'end-time') {\n this.selectedEndTime = value;\n }\n const validateStartTimeAfterEndTime = this.isStartTimeAfterEndTime(this.selectedStartTime, this.selectedEndTime);\n const validateStartTimeEqualToEndTime = this.isStartTimeEqualToEndTime(this.selectedStartTime, this.selectedEndTime);\n this.timeRangeError = validateStartTimeAfterEndTime || validateStartTimeEqualToEndTime;\n if (validateStartTimeAfterEndTime) {\n this.timeWindowFormError.emit({\n key: this.name,\n message: 'Invalid time range',\n });\n return;\n } else if (validateStartTimeEqualToEndTime) {\n this.timeWindowFormError.emit({\n key: this.name,\n message: 'Start time and end time cannot be the same',\n });\n return;\n }\n\n this.handleValueChanged();\n }\n\n @Listen('nylasFormDropdownChanged')\n nylasFormDropdownChangedHandler(\n event: CustomEvent<{\n value: RecurrenceType | RepeatEndType | string;\n name: string;\n }>,\n ) {\n const { name, value } = event.detail;\n if (name === 'timezone') {\n this.selectedTimezone = value;\n } else if (name === 'recurrence-type') {\n this.selectedRecurrenceType = value as RecurrenceType;\n } else if (name === 'month-recurrence-type') {\n this.repeatMonthlySameDate = value === 'monthly-same-date';\n } else if (name === 'custom-recurrence-end-type') {\n this.repeatEndType = value as RepeatEndType;\n }\n\n this.handleValueChanged();\n }\n\n @Listen('nylasFormInputChanged')\n nylasFormInputChangedHandler(event: CustomEvent<{ value: string; name: string }>) {\n const { name, value } = event.detail;\n if (name === 'date-time-input') {\n this.selectedDate = value;\n this.recurrenceOptions = this.generateRecurrenceOptions(this.selectedDate, this.selectedTimezone);\n this.monthRecurrenceOptions = this.getMonthRecurrenceOptions(this.selectedDate, this.selectedTimezone);\n } else if (name === 'recurrence-end-date') {\n this.repeatEndOn = value;\n } else if (name === 'custom-recurrence-end-date') {\n this.repeatEndOn = value;\n } else if (name === 'recurrence-end-after') {\n this.repeatEndAfter = parseInt(value);\n }\n\n this.handleValueChanged();\n }\n\n @Listen('timePeriodChanged')\n timePeriodChangedHandler(event: CustomEvent<{ number: number; period: 'day' | 'week' | 'month' | 'year' }>) {\n const { number, period } = event.detail;\n this.repeatEveryInterval = number;\n this.repeatEveryFrequency = period;\n\n if (period === 'month') {\n this.monthRecurrenceOptions = this.getMonthRecurrenceOptions(this.selectedDate, this.selectedTimezone);\n }\n\n this.handleValueChanged();\n }\n\n @RegisterComponent<NylasEventTimeslot, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-event-timeslot',\n stateToProps: new Map([['schedulerConfig.selectedLanguage', 'selectedLanguage']]),\n eventToProps: {\n valueChanged: async (event: CustomEvent<{ value: string; name: string }>, _nylasConnector: NylasSchedulerConfigConnector) => {\n debug('nylas-event-timeslot', 'valueChanged', event.detail);\n },\n },\n fireRegisterEvent: true,\n })\n render() {\n const defaultRecurrenceOption = this.recurrenceOptions.find(option => option.value === this.selectedRecurrenceType);\n const timezoneOptions = Object.keys(TIMEZONE_MAP).map(key => ({\n labelHTML: this.getTimezoneLabelHTML(key),\n label: TIMEZONE_MAP[key],\n value: key,\n }));\n const selectedTimezoneOption = timezoneOptions.find(i => i.value === this.selectedTimezone);\n const endOptions = [\n { label: i18next.t('nylasEventTimeslot.customRecurrence.endsOptions.never'), value: 'never' },\n { label: i18next.t('nylasEventTimeslot.customRecurrence.endsOptions.on'), value: 'on' },\n { label: i18next.t('nylasEventTimeslot.customRecurrence.endsOptions.after'), value: 'after' },\n ];\n const defaultEndOnDate = dayjs(this.selectedDate).add(1, 'year').toISOString().split('T')[0];\n const defaultEndAfter = this.repeatEveryFrequency === 'week' ? 4 : this.repeatEveryFrequency === 'month' ? 12 : 5;\n this.repeatEndOn = this.repeatEndOn || defaultEndOnDate;\n this.repeatEndAfter = this.repeatEndAfter || defaultEndAfter;\n\n return (\n <Host>\n <div class=\"nylas-event-timeslot\" part=\"netimeslot\">\n <label htmlFor=\"date-time-input\">{i18next.t('nylasEventTimeslot.dateTimeLabel')}</label>\n <div class=\"date-time-input\" part=\"netimeslot__date-time-input\">\n <div class=\"date-time-picker\" part=\"netimeslot__date-time-picker\">\n <nylas-date-component name=\"date-time-input\" defaultValue={this.selectedDate} id={'date-time-input'} required={true}></nylas-date-component>\n <div class=\"time-range\" part=\"netimeslot__time-range\">\n <nylas-time-window-picker\n id={'start-time'}\n hasError={this.timeRangeError}\n time={this.selectedStartTime}\n language={this.selectedLanguage}\n name={'start-time'}\n key={'start-time'}\n exportparts=\"time-picker: nap__time-picker-container, time-input: nap__time-picker-input, times: nap__time-picker-times\"\n />\n <span>&ndash;</span>\n <nylas-time-window-picker\n id={'end-time'}\n hasError={this.timeRangeError}\n time={this.selectedEndTime}\n language={this.selectedLanguage}\n name={'end-time'}\n key={'end-time'}\n minimumStartTime={this.selectedStartTime}\n exportparts=\"time-picker: nap__time-picker-container, time-input: nap__time-picker-input, times: nap__time-picker-times\"\n />\n </div>\n {selectedTimezoneOption?.label && (\n <select-dropdown\n name=\"timezone\"\n exportparts=\"sd_dropdown: nap__timezone-container, sd_dropdown-button: nap__timezone-button, sd_dropdown-content: nap__timezone-dropdown-content\"\n options={timezoneOptions}\n withChevron={false}\n defaultSelectedOption={selectedTimezoneOption}\n >\n <span slot=\"select-icon\">\n <globe-icon width=\"20\" height=\"20\" />\n </span>\n </select-dropdown>\n )}\n </div>\n <div class=\"recurrence-options\" part=\"netimeslot__recurrence-options\">\n {defaultRecurrenceOption && defaultRecurrenceOption?.label && (\n <div class=\"recurrence-type\" part=\"netimeslot__recurrence-type\">\n <label htmlFor=\"recurrence-type\">{i18next.t('nylasEventTimeslot.recurrenceLabel')}</label>\n <select-dropdown\n withSearch={false}\n id=\"recurrence-type\"\n name=\"recurrence-type\"\n options={this.recurrenceOptions}\n defaultSelectedOption={defaultRecurrenceOption}\n exportparts=\"sd_dropdown: netimeslot__dropdown, sd_dropdown-button: netimeslot__dropdown-button, sd_dropdown-content: netimeslot__dropdown-content\"\n ></select-dropdown>\n </div>\n )}\n {this.selectedRecurrenceType !== 'custom' && this.selectedRecurrenceType !== 'none' && (\n <div class=\"recurrence-end\" part=\"netimeslot__recurrence-end\">\n <label>{i18next.t('nylasEventTimeslot.endDate')}</label>\n <nylas-date-component\n name=\"recurrence-end-date\"\n defaultValue={this.repeatEndOn || defaultEndOnDate}\n id={'recurrence-end-date'}\n required={true}\n ></nylas-date-component>\n </div>\n )}\n\n {this.selectedRecurrenceType === 'custom' && (\n <div class=\"custom-recurrence-time-period\" part=\"netimeslot__custom-recurrence\">\n <label htmlFor=\"\">{i18next.t('nylasEventTimeslot.customRecurrence.repeatEvery')}</label>\n <time-period-selector\n id=\"custom-recurrence-time-period\"\n exportparts=\"tps__number-dropdown: netimeslot__number-dropdown, tps__number-dropdown-button: netimeslot__number-dropdown-button, tps__number-dropdown-content: netimeslot__number-dropdown-content, tps__period-dropdown: netimeslot__period-dropdown, tps__period-dropdown-button: netimeslot__period-dropdown-button, tps__period-dropdown-content: netimeslot__period-dropdown-content\"\n timePeriods={[\n { value: 'day', label: i18next.t('timePeriod', { context: 'day' }) },\n { value: 'week', label: i18next.t('timePeriod', { context: 'week' }) },\n { value: 'month', label: i18next.t('timePeriod', { context: 'month' }) },\n { value: 'year', label: i18next.t('timePeriod', { context: 'year' }) },\n ]}\n defaultSelectedNumber={this.repeatEveryInterval}\n defaultSelectedPeriod={this.repeatEveryFrequency}\n />\n </div>\n )}\n <div class=\"repeat-on\">\n {this.selectedRecurrenceType === 'custom' && this.repeatEveryFrequency === 'week' && (\n <div class=\"days\">\n <label>{i18next.t('nylasEventTimeslot.customRecurrence.repeatOn')}</label>\n <div class=\"buttons\">\n {[\n { label: 'S', value: 'SU', title: 'Sunday' },\n { label: 'M', value: 'MO', title: 'Monday' },\n { label: 'T', value: 'TU', title: 'Tuesday' },\n { label: 'W', value: 'WE', title: 'Wednesday' },\n { label: 'T', value: 'TH', title: 'Thursday' },\n { label: 'F', value: 'FR', title: 'Friday' },\n { label: 'S', value: 'SA', title: 'Saturday' },\n ].map(day => (\n <button\n class={{ selected: this.repeatOnDays.includes(day.value) }}\n title={day.title}\n onClick={() => {\n this.repeatOnDays = this.repeatOnDays.includes(day.value) ? this.repeatOnDays.filter(d => d !== day.value) : [...this.repeatOnDays, day.value];\n this.handleValueChanged();\n }}\n >\n {day.label}\n </button>\n ))}\n </div>\n </div>\n )}\n {this.selectedRecurrenceType === 'custom' && this.repeatEveryFrequency === 'month' && (\n <div class=\"month-recurrence\">\n <span></span>\n <select-dropdown\n withSearch={false}\n id=\"month-recurrence-type\"\n name=\"month-recurrence-type\"\n options={this.monthRecurrenceOptions}\n defaultSelectedOption={this.repeatMonthlySameDate ? this.monthRecurrenceOptions[0] : this.monthRecurrenceOptions[1]}\n exportparts=\"sd_dropdown: netimeslot__dropdown, sd_dropdown-button: netimeslot__dropdown-button, sd_dropdown-content: netimeslot__dropdown-content\"\n ></select-dropdown>\n </div>\n )}\n <div class=\"custom-recurrence\">\n {this.selectedRecurrenceType === 'custom' && (\n <div class=\"custom-recurrence-ends\">\n <label htmlFor=\"recurrence-type\">{i18next.t('nylasEventTimeslot.customRecurrence.ends')}</label>\n <select-dropdown\n withSearch={false}\n id=\"custom-recurrence-end-type\"\n name=\"custom-recurrence-end-type\"\n options={endOptions}\n defaultSelectedOption={endOptions.find(option => option.value === this.repeatEndType)}\n exportparts=\"sd_dropdown: netimeslot__dropdown, sd_dropdown-button: netimeslot__dropdown-button, sd_dropdown-content: netimeslot__dropdown-content\"\n ></select-dropdown>\n </div>\n )}\n {this.selectedRecurrenceType === 'custom' && this.repeatEndType === 'on' && (\n <div>\n <nylas-date-component\n name=\"custom-recurrence-end-date\"\n defaultValue={this.repeatEndOn || defaultEndOnDate}\n id={'custom-recurrence-end-date'}\n required={true}\n ></nylas-date-component>\n </div>\n )}\n {this.selectedRecurrenceType === 'custom' && this.repeatEndType === 'after' && (\n <div class=\"custom-recurrence-end-after\">\n <input-component\n name=\"recurrence-end-after\"\n id=\"recurrence-end-after\"\n type=\"number\"\n minValue={1}\n defaultValue={defaultEndAfter.toString()}\n exportparts=\"ic_input: netimeslot__input-textfield\"\n />\n <span>{i18next.t('nylasEventTimeslot.customRecurrence.occurrences')}</span>\n </div>\n )}\n </div>\n </div>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"nylas-event-timeslot2.js","mappings":";;;;;;;;;;;;;;;AAAA,MAAM,qBAAqB,GAAG,mpVAAmpV,CAAC;AAClrV,iCAAe,qBAAqB;;;;;;;;;;;;;;;;ACWpC,KAAK,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;AAChC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AAClB,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;AAEvB,MAAM,SAAS,GAAG;IAChB,GAAG,EAAE,OAAO;IACZ,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,SAAS;IAChB,IAAI,EAAE,QAAQ;CACf,CAAC;MAcW,kBAAkB;;;;;;;;oBAON,gBAAgB;;;;;;;;8BA+CJ,KAAK;;iCAUyB,EAAE;mCAI5B,CAAC;oCAIA,MAAM;4BAIZ,EAAE;qCAIM,IAAI;6BAIN,OAAO;8BAIb,CAAC;;sCAQmC,EAAE;;;IA4BxE,iBAAiB;QACf,KAAK,CAAC,sBAAsB,EAAE,mBAAmB,CAAC,CAAC;KACpD;IAED,oBAAoB;QAClB,KAAK,CAAC,sBAAsB,EAAE,sBAA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AAa,CAAC,EACrF,WAAW,EAAC,uIAAuI,GAClI,CACf,CACP,EACA,IAAI,CAAC,sBAAsB,KAAK,QAAQ,IAAI,IAAI,CAAC,aAAa,KAAK,IAAI,KACtE,eACE,4BACE,IAAI,EAAC,4BAA4B,EACjC,YAAY,EAAE,IAAI,CAAC,WAAW,IAAI,gBAAgB,EAClD,EAAE,EAAE,4BAA4B,EAChC,QAAQ,EAAE,IAAI,GACQ,CACpB,CACP,EACA,IAAI,CAAC,sBAAsB,KAAK,QAAQ,IAAI,IAAI,CAAC,aAAa,KAAK,OAAO,KACzE,WAAK,KAAK,EAAC,6BAA6B,IACtC,uBACE,IAAI,EAAC,sBAAsB,EAC3B,EAAE,EAAC,sBAAsB,EACzB,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,CAAC,EACX,YAAY,EAAE,eAAe,CAAC,QAAQ,EAAE,EACxC,WAAW,EAAC,uCAAuC,GACnD,EACF,gBAAOA,QAAO,CAAC,CAAC,CAAC,iDAAiD,CAAC,CAAQ,CACvE,CACP,CACG,CACF,CACF,CACF,CACF,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA7LD;IAVC,iBAAiB,CAAwG;QACxH,IAAI,EAAE,sBAAsB;QAC5B,YAAY,EAAE,IAAI,GAAG,CAAC,CAAC,CAAC,kCAAkC,EAAE,kBAAkB,CAAC,CAAC,CAAC;QACjF,YAAY,EAAE;YACZ,YAAY,EAAE,OAAO,KAAmD,EAAE,eAA8C;gBACtH,KAAK,CAAC,sBAAsB,EAAE,cAAc,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;aAC7D;SACF;QACD,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;gDA8LD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["i18next"],"sources":["src/components/scheduler-editor/nylas-event-timeslot/nylas-event-timeslot.scss?tag=nylas-event-timeslot&encapsulation=shadow","src/components/scheduler-editor/nylas-event-timeslot/nylas-event-timeslot.tsx"],"sourcesContent":["@import '../../../common/styles/variables.scss';\n@import '../../../common/mixins/buttons.scss';\n\n:host {\n display: block;\n @include default-css-variables;\n width: inherit;\n}\n\ndiv.nylas-event-timeslot {\n label {\n display: flex;\n align-items: center;\n color: var(--nylas-base-800);\n font-size: 16px;\n font-style: normal;\n font-weight: 400;\n line-height: 150%;\n }\n\n div.date-time-input {\n div.date-time-picker {\n display: flex;\n gap: 32px;\n\n @media #{$mobile} {\n flex-direction: column;\n gap: 16px;\n }\n\n nylas-date-component {\n width: 224px;\n\n @media #{$mobile} {\n width: 100%;\n }\n\n &::part(ic__date) {\n height: 50px;\n border-color: var(--nylas-base-200);\n }\n }\n\n div.time-range {\n display: flex;\n gap: 8px;\n align-items: flex-start;\n\n span {\n margin: 12px 0 0 6px;\n display: inline-flex;\n align-items: flex-start;\n }\n\n @media #{$mobile} {\n display: grid;\n grid-template-columns: 1fr 20px 1fr;\n\n nylas-time-window-picker {\n &::part(time-picker) {\n width: -webkit-fill-available;\n }\n\n &::part(time-input) {\n width: calc(100% - 8px);\n }\n }\n }\n }\n\n select-dropdown {\n width: fit-content;\n\n &::part(sd_dropdown) {\n position: relative;\n }\n\n &::part(sd_dropdown-button) {\n border: none;\n padding: 14px;\n justify-content: flex-start;\n\n &:hover {\n border: none;\n outline: none;\n color: var(--nylas-primary);\n }\n }\n\n @media #{$mobile} {\n width: -webkit-fill-available;\n\n &::part(sd_dropdown-button-selected-label) {\n max-width: fit-content;\n }\n\n &::part(sd_dropdown-content) {\n right: unset;\n width: unset;\n }\n }\n }\n }\n\n div.recurrence-options {\n margin: 8px 0;\n\n select-dropdown {\n &::part(sd_dropdown) {\n position: relative;\n }\n\n &::part(sd_dropdown-button) {\n width: fit-content;\n padding: 14px;\n border-color: var(--nylas-base-200);\n\n &:hover {\n color: var(--nylas-primary);\n }\n }\n\n &::part(sd_dropdown-content) {\n width: fit-content;\n }\n\n &::part(sd_dropdown-button-selected-label) {\n max-width: 100%;\n width: fit-content;\n font-size: 16px;\n }\n\n @media #{$mobile} {\n width: -webkit-fill-available;\n\n &::part(sd_dropdown-button-selected-label) {\n max-width: 254px;\n width: fit-content;\n }\n\n &::part(sd_dropdown-content) {\n right: unset;\n width: unset;\n }\n }\n\n @media #{$x-small-mobile} {\n &::part(sd_dropdown-button-selected-label) {\n max-width: 240px;\n }\n }\n }\n\n div.custom-recurrence-time-period,\n div.recurrence-type,\n div.recurrence-end {\n display: grid;\n align-items: center;\n gap: 16px;\n grid-template-columns: 128px 1fr;\n margin-bottom: 8px;\n select-dropdown::part(sd_dropdown-button) {\n border-color: var(--nylas-base-200);\n }\n\n @media #{$mobile} {\n grid-template-columns: 1fr;\n gap: 4px;\n margin: 16px 0;\n }\n\n time-period-selector::part(id_dropdown-input) {\n padding: 16px;\n }\n time-period-selector input-dropdown {\n &:hover {\n border: 1px solid var(--nylas-primary);\n outline: 1px solid transparent;\n }\n }\n }\n\n div.repeat-on {\n div.days {\n margin: 16px 0;\n display: flex;\n gap: 16px;\n align-items: center;\n\n div.buttons {\n display: flex;\n gap: 8px;\n margin: 8px 0;\n\n button {\n border-radius: 50%;\n border: none;\n height: 24px;\n width: 24px;\n color: var(--nylas-base-800);\n cursor: pointer;\n\n &.selected {\n background-color: var(--nylas-primary);\n color: var(--nylas-base-0);\n }\n\n &:hover {\n background-color: var(--nylas-base-500);\n color: var(--nylas-base-0);\n }\n\n &:active {\n background-color: var(--nylas-base-600);\n color: var(--nylas-base-0);\n }\n }\n }\n }\n\n div.days,\n div.custom-recurrence-ends,\n div.month-recurrence {\n display: grid;\n align-items: center;\n gap: 16px;\n grid-template-columns: 128px 1fr;\n\n @media #{$mobile} {\n grid-template-columns: 1fr;\n gap: 4px;\n margin: 16px 0;\n }\n }\n\n div.custom-recurrence {\n display: flex;\n gap: 16px;\n align-items: baseline;\n\n @media #{$mobile} {\n flex-direction: column;\n align-items: flex-start;\n gap: 0;\n }\n\n div.custom-recurrence-end-after {\n display: flex;\n gap: 8px;\n align-items: center;\n\n @media #{$mobile} {\n flex-direction: column;\n align-items: flex-start;\n }\n }\n\n nylas-date-component::part(ic__date) {\n padding: 0 16px;\n height: 52px;\n border: 1px solid var(--nylas-base-200);\n }\n }\n }\n }\n }\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug, generateRRule, getTimezoneOffset } from '@/utils/utils';\nimport { AttachInternals, Component, Element, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE, TIMEZONE_MAP } from '@/common/constants';\nimport dayjs from 'dayjs';\nimport customParseFormat from 'dayjs/plugin/customParseFormat';\nimport utc from 'dayjs/plugin/utc';\nimport timezone from 'dayjs/plugin/timezone';\n\ndayjs.extend(customParseFormat);\ndayjs.extend(utc);\ndayjs.extend(timezone);\n\nconst periodMap = {\n day: 'daily',\n week: 'weekly',\n month: 'monthly',\n year: 'yearly',\n};\n\ntype RepeatEndType = 'never' | 'on' | 'after';\ntype RecurrenceType = 'none' | 'daily' | 'weekly' | 'monthly' | 'yearly' | 'custom';\n\n/**\n * The `nylas-event-timeslot` component is a UI component that allows users to select the event type for the scheduler configuration.\n */\n@Component({\n tag: 'nylas-event-timeslot',\n styleUrl: 'nylas-event-timeslot.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasEventTimeslot {\n @Element() host!: HTMLNylasEventTimeslotElement;\n\n /**\n * @standalone\n * The name of the component\n */\n @Prop() name: string = 'event-timeslot';\n /**\n * The initial value of the event timeslot.\n */\n @Prop() initialValue?: {\n when: {\n start_time: number;\n end_time: number;\n start_timezone: string;\n end_timezone: string;\n };\n recurrence: string[];\n };\n\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n\n /**\n * The selected date.\n */\n @State() selectedDate!: string;\n\n /**\n * The selected start time.\n */\n @State() selectedStartTime!: string;\n\n /**\n * The selected end time.\n */\n @State() selectedEndTime!: string;\n\n /**\n * The timezone.\n */\n @State() selectedTimezone!: string;\n\n /**\n * The selected recurrence type.\n */\n @State() selectedRecurrenceType!: RecurrenceType;\n\n /**\n * Time range error.\n */\n @State() timeRangeError: boolean = false;\n\n /**\n * The selected rrule.\n */\n @State() selectedRrule!: string | null;\n\n /**\n * Recurrence options.\n */\n @State() recurrenceOptions: { label: string; value: string }[] = [];\n /**\n * Repeat every frequency.\n */\n @State() repeatEveryInterval: number = 1;\n /**\n * Repeat every period.\n */\n @State() repeatEveryFrequency: string = 'week';\n /**\n * Repeat on days.\n */\n @State() repeatOnDays: string[] = [];\n /**\n * Repeat monthly on.\n */\n @State() repeatMonthlySameDate: boolean = true;\n /**\n * Repeat end type.\n */\n @State() repeatEndType: RepeatEndType = 'never';\n /**\n * Repeat end after.\n */\n @State() repeatEndAfter: number = 1;\n /**\n * Repeat end on (custom recurrence).\n */\n @State() repeatEndOn: string | undefined;\n /**\n * Month recurrence options.\n */\n @State() monthRecurrenceOptions: { label: string; value: string }[] = [];\n /**\n * The end date for recurrence (non-custom recurrence).\n */\n @State() endDate: string | undefined;\n\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * This event is fired when the value of the event location changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n /**\n * This event is fired when the value of the event timeslot changes.\n */\n @Event() timeWindowFormError!: EventEmitter<{\n key: string;\n message: string;\n }>;\n\n // Lifecycle methods\n connectedCallback() {\n debug('nylas-event-timeslot', 'connectedCallback');\n }\n\n disconnectedCallback() {\n debug('nylas-event-timeslot', 'disconnectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-event-timeslot', 'componentWillLoad');\n // See comment in the @Watch('name') decorator for more information.\n this.host.setAttribute('name', this.name);\n }\n\n componentDidLoad() {\n debug('nylas-event-timeslot', 'componentDidLoad');\n\n // Set defaults from initialValue or fallback to current values\n if (this.initialValue) {\n const { when, recurrence } = this.initialValue;\n\n if (when) {\n this.selectedDate = dayjs.unix(when.start_time).tz(when.start_timezone).format('YYYY-MM-DD');\n this.selectedStartTime = dayjs.unix(when.start_time).tz(when.start_timezone).format('hh:mma');\n this.selectedEndTime = dayjs.unix(when.end_time).tz(when.end_timezone).format('hh:mma');\n this.selectedTimezone = when.start_timezone;\n } else {\n this.selectedDate = new Date().toISOString().split('T')[0];\n const defaultTimes = this.getSuggestedTime();\n this.selectedStartTime = defaultTimes.startTime;\n this.selectedEndTime = defaultTimes.endTime;\n this.selectedTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone;\n }\n\n if (recurrence && recurrence.length > 0) {\n this.selectedRrule = recurrence[0];\n const repeatEndAfter = recurrence[0]?.split(';')?.find(s => s.includes('COUNT'));\n if (repeatEndAfter) {\n this.repeatEndAfter = parseInt(repeatEndAfter.split('=')[1]);\n }\n const daysString = recurrence[0]?.split(';')?.find(s => s.includes('BYDAY'));\n if (daysString) {\n this.repeatOnDays = daysString.split('=')[1].split(',');\n }\n const until = recurrence[0]?.split(';')?.find(s => s.includes('UNTIL'));\n if (until) {\n const untilDate = dayjs(until.split('=')[1], 'YYYYMMDDTHHmmss').toDate();\n this.repeatEndOn = dayjs(untilDate).toISOString().split('T')[0];\n this.repeatEndType = 'on';\n }\n const recurrenceType = this.getRecurrenceTypeFromRrule(recurrence[0]);\n this.selectedRecurrenceType = recurrenceType || 'none';\n } else {\n this.selectedRecurrenceType = 'none';\n this.selectedRrule = generateRRule(this.selectedDate, this.selectedRecurrenceType, undefined, undefined, this.selectedTimezone);\n }\n } else {\n this.selectedDate = new Date().toISOString().split('T')[0];\n const defaultTimes = this.getSuggestedTime();\n this.selectedStartTime = defaultTimes.startTime;\n this.selectedEndTime = defaultTimes.endTime;\n this.selectedTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone;\n this.selectedRecurrenceType = 'none';\n this.selectedRrule = generateRRule(this.selectedDate, this.selectedRecurrenceType, undefined, undefined, this.selectedTimezone);\n }\n\n this.recurrenceOptions = this.generateRecurrenceOptions(this.selectedDate, this.selectedTimezone);\n this.monthRecurrenceOptions = this.getMonthRecurrenceOptions(this.selectedDate, this.selectedTimezone);\n\n // Trigger initial value change\n this.handleValueChanged(true);\n }\n\n /**\n * When a name prop is passed, stencil does not automatically set the name attribute on the host element.\n * Since this component is form-associated, the name attribute is required for form submission.\n * This is a workaround to ensure that the name attribute is set on the host element.\n */\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-event-timeslot', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('selectedLanguage')\n selectedLanguageChangedHandler(newVal: LANGUAGE_CODE, oldVal: LANGUAGE_CODE) {\n if (newVal === oldVal) return;\n i18next.changeLanguage(newVal);\n }\n\n // Utility function to get the ordinal suffix (e.g., 1st, 2nd, 3rd)\n getOrdinalSuffix(n) {\n const s = ['th', 'st', 'nd', 'rd'];\n const v = n % 100;\n return n + (s[(v - 20) % 10] || s[v] || s[0]);\n }\n\n getRecurrenceTypeFromRrule(rrule: string): RecurrenceType | undefined {\n if (rrule.includes('INTERVAL')) return 'custom';\n if (rrule.includes('FREQ=DAILY')) return 'daily';\n if (rrule.includes('FREQ=WEEKLY')) return 'weekly';\n if (rrule.includes('FREQ=MONTHLY')) return 'monthly';\n if (rrule.includes('FREQ=YEARLY')) return 'yearly';\n return undefined;\n }\n\n // Function to generate dynamic recurrence options\n generateRecurrenceOptions(selectedDate: string, timezoneStr: string) {\n const daysOfWeek = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];\n\n // Parse the date in the given timezone\n const selectedDay = dayjs.tz(selectedDate, timezoneStr);\n\n const dayOfWeek = daysOfWeek[selectedDay.day()]; // Get the day of the week (e.g., Thursday)\n\n // Determine the occurrence of the day in the month (e.g., 1st, 2nd, etc.)\n const date = selectedDay.date();\n const occurrenceInMonth = Math.ceil(date / 7); // e.g., 1st Thursday\n\n // Generate options\n return [\n { label: i18next.t('nylasEventTimeslot.recurrenceOptions.none'), value: 'none' },\n { label: i18next.t('nylasEventTimeslot.recurrenceOptions.daily'), value: 'daily' },\n { label: i18next.t('nylasEventTimeslot.recurrenceOptions.weekly', { dayOfWeek: dayOfWeek }), value: 'weekly' },\n { label: i18next.t('nylasEventTimeslot.recurrenceOptions.monthly', { dayOfMonth: `${this.getOrdinalSuffix(occurrenceInMonth)} ${dayOfWeek}` }), value: 'monthly' },\n {\n label: i18next.t('nylasEventTimeslot.recurrenceOptions.yearly', { dateOfMonth: `${selectedDay.format('MMMM D')}` }),\n value: 'yearly',\n },\n { label: i18next.t('nylasEventTimeslot.recurrenceOptions.custom'), value: 'custom' },\n ];\n }\n\n // Function to generate dynamic month recurrence options\n getMonthRecurrenceOptions(selectedDate: string, timezoneStr: string) {\n const daysOfWeek = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];\n\n const selectedDay = dayjs.tz(selectedDate, timezoneStr);\n const dayOfWeek = daysOfWeek[selectedDay.day()]; // Get the day of the week (e.g., Thursday)\n const date = selectedDay.date();\n const occurrenceInMonth = Math.ceil(date / 7);\n\n return [\n { label: i18next.t('nylasEventTimeslot.recurrenceOptions.monthOnDay', { date: date }), value: 'monthly-same-date' },\n { label: i18next.t('nylasEventTimeslot.recurrenceOptions.monthly', { dayOfMonth: `${this.getOrdinalSuffix(occurrenceInMonth)} ${dayOfWeek}` }), value: 'monthly' },\n ];\n }\n\n // Function to get the default suggested time shown in the time range picker\n getSuggestedTime() {\n const now = dayjs();\n\n // Round current time to the next 30-minute increment\n const minutes = now.minute();\n const roundedMinutes = minutes <= 30 ? 30 : 60;\n const startTime = now.set('minute', roundedMinutes).set('second', 0);\n\n // Calculate end time (30 minutes after start time)\n const endTime = startTime.add(30, 'minute');\n\n // Format the times in \"hh:mma\" format\n return {\n startTime: startTime.format('hh:mma'), // e.g., \"03:00pm\"\n endTime: endTime.format('hh:mma'), // e.g., \"03:30pm\"\n };\n }\n\n getTimezoneLabelHTML(timezone: string) {\n const offset = getTimezoneOffset(timezone);\n return (\n <span\n class=\"timezone-label\"\n style={{\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n width: '-webkit-fill-available',\n }}\n >\n {TIMEZONE_MAP[timezone]}{' '}\n <span\n class=\"timezone-offset\"\n style={{\n fontSize: '14px',\n fontWeight: '400',\n color: 'var(--nylas-base-500)',\n }}\n >\n {offset}\n </span>\n </span>\n );\n }\n\n // Function to check if the start time is after the end time (used for validation)\n isStartTimeAfterEndTime(startTime: string, endTime: string): boolean {\n // Parse the times using Day.js\n const start = dayjs(startTime, 'hh:mma');\n const end = dayjs(endTime, 'hh:mma');\n\n // Compare start and end times\n return start.isAfter(end);\n }\n\n isStartTimeEqualToEndTime(startTime: string, endTime: string): boolean {\n const start = dayjs(startTime, 'hh:mma');\n const end = dayjs(endTime, 'hh:mma');\n return start.isSame(end);\n }\n\n // Function to get the start and end times in Unix timestamp format (used in the valueChanged event)\n getStartAndEndTimes() {\n const start_time = dayjs(`${this.selectedDate} ${this.selectedStartTime}`, 'YYYY-MM-DD hh:mma').toDate();\n const end_time = dayjs(`${this.selectedDate} ${this.selectedEndTime}`, 'YYYY-MM-DD hh:mma').toDate();\n\n return {\n start_time: Math.round(start_time.getTime() / 1000),\n end_time: Math.round(end_time.getTime() / 1000),\n };\n }\n\n // Function to get the custom options for the RRule\n getCustomOptions() {\n if (this.selectedRecurrenceType !== 'custom') {\n return undefined;\n }\n\n const repeatFreq = periodMap[this.repeatEveryFrequency];\n\n return {\n frequency: repeatFreq,\n interval: this.repeatEveryInterval,\n daysOfWeek: this.repeatEveryFrequency === 'week' ? this.repeatOnDays : undefined,\n monthlySameDate: this.repeatEveryFrequency === 'month' ? this.repeatMonthlySameDate : undefined,\n end: {\n type: this.repeatEndType,\n count: this.repeatEndType === 'after' ? this.repeatEndAfter : undefined,\n date: this.repeatEndType === 'on' ? this.repeatEndOn : undefined,\n },\n };\n }\n\n handleValueChanged(noValue: boolean = false) {\n const customOptions = this.getCustomOptions();\n this.selectedRrule = generateRRule(this.selectedDate, this.selectedRecurrenceType, this.repeatEndOn, customOptions, this.selectedTimezone);\n const { start_time, end_time } = this.getStartAndEndTimes();\n const internalsObj = {\n when: {\n start_time: start_time,\n end_time: end_time,\n start_timezone: this.selectedTimezone,\n end_timezone: this.selectedTimezone,\n },\n recurrence: this.selectedRrule ? [this.selectedRrule] : [],\n };\n this.internals.setFormValue(JSON.stringify(internalsObj), this.name);\n if (!noValue) {\n this.valueChanged.emit({\n value: JSON.stringify(internalsObj),\n name: this.name,\n });\n }\n }\n\n // Listeners\n @Listen('timeChange')\n setTime(event: CustomEvent<{ key: string; value: string }>) {\n const { key, value } = event.detail;\n if (key === 'start-time') {\n this.selectedStartTime = value;\n } else if (key === 'end-time') {\n this.selectedEndTime = value;\n }\n const validateStartTimeAfterEndTime = this.isStartTimeAfterEndTime(this.selectedStartTime, this.selectedEndTime);\n const validateStartTimeEqualToEndTime = this.isStartTimeEqualToEndTime(this.selectedStartTime, this.selectedEndTime);\n this.timeRangeError = validateStartTimeAfterEndTime || validateStartTimeEqualToEndTime;\n if (validateStartTimeAfterEndTime) {\n this.timeWindowFormError.emit({\n key: this.name,\n message: 'Invalid time range',\n });\n return;\n } else if (validateStartTimeEqualToEndTime) {\n this.timeWindowFormError.emit({\n key: this.name,\n message: 'Start time and end time cannot be the same',\n });\n return;\n }\n\n this.handleValueChanged();\n }\n\n @Listen('nylasFormDropdownChanged')\n nylasFormDropdownChangedHandler(\n event: CustomEvent<{\n value: RecurrenceType | RepeatEndType | string;\n name: string;\n }>,\n ) {\n const { name, value } = event.detail;\n if (name === 'timezone') {\n this.selectedTimezone = value;\n } else if (name === 'recurrence-type') {\n this.selectedRecurrenceType = value as RecurrenceType;\n } else if (name === 'month-recurrence-type') {\n this.repeatMonthlySameDate = value === 'monthly-same-date';\n } else if (name === 'custom-recurrence-end-type') {\n this.repeatEndType = value as RepeatEndType;\n }\n\n this.handleValueChanged();\n }\n\n @Listen('nylasFormInputChanged')\n nylasFormInputChangedHandler(event: CustomEvent<{ value: string; name: string }>) {\n const { name, value } = event.detail;\n if (name === 'date-time-input') {\n this.selectedDate = value;\n this.recurrenceOptions = this.generateRecurrenceOptions(this.selectedDate, this.selectedTimezone);\n this.monthRecurrenceOptions = this.getMonthRecurrenceOptions(this.selectedDate, this.selectedTimezone);\n } else if (name === 'recurrence-end-date') {\n this.repeatEndOn = value;\n } else if (name === 'custom-recurrence-end-date') {\n this.repeatEndOn = value;\n } else if (name === 'recurrence-end-after') {\n const parsedValue = parseInt(value);\n if (parsedValue < 1 || isNaN(parsedValue)) {\n this.timeWindowFormError.emit({\n key: this.name,\n message: i18next.t('fixFormErrors'),\n });\n return;\n }\n this.repeatEndAfter = parsedValue;\n }\n\n this.handleValueChanged();\n }\n\n @Listen('timePeriodChanged')\n timePeriodChangedHandler(event: CustomEvent<{ number: number; period: 'day' | 'week' | 'month' | 'year' }>) {\n const { number, period } = event.detail;\n this.repeatEveryInterval = number;\n this.repeatEveryFrequency = period;\n\n if (period === 'month') {\n this.monthRecurrenceOptions = this.getMonthRecurrenceOptions(this.selectedDate, this.selectedTimezone);\n }\n\n this.handleValueChanged();\n }\n\n @RegisterComponent<NylasEventTimeslot, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-event-timeslot',\n stateToProps: new Map([['schedulerConfig.selectedLanguage', 'selectedLanguage']]),\n eventToProps: {\n valueChanged: async (event: CustomEvent<{ value: string; name: string }>, _nylasConnector: NylasSchedulerConfigConnector) => {\n debug('nylas-event-timeslot', 'valueChanged', event.detail);\n },\n },\n fireRegisterEvent: true,\n })\n render() {\n const defaultRecurrenceOption = this.recurrenceOptions.find(option => option.value === this.selectedRecurrenceType);\n const timezoneOptions = Object.keys(TIMEZONE_MAP).map(key => ({\n labelHTML: this.getTimezoneLabelHTML(key),\n label: TIMEZONE_MAP[key],\n value: key,\n }));\n const selectedTimezoneOption = timezoneOptions.find(i => i.value === this.selectedTimezone);\n const endOptions = [\n { label: i18next.t('nylasEventTimeslot.customRecurrence.endsOptions.never'), value: 'never' },\n { label: i18next.t('nylasEventTimeslot.customRecurrence.endsOptions.on'), value: 'on' },\n { label: i18next.t('nylasEventTimeslot.customRecurrence.endsOptions.after'), value: 'after' },\n ];\n const defaultEndOnDate = dayjs(this.selectedDate).add(1, 'year').toISOString().split('T')[0];\n const defaultEndAfter = this.repeatEveryFrequency === 'week' ? 4 : this.repeatEveryFrequency === 'month' ? 12 : 5;\n this.repeatEndOn = this.repeatEndOn || defaultEndOnDate;\n this.repeatEndAfter = this.repeatEndAfter || defaultEndAfter;\n\n return (\n <Host>\n <div class=\"nylas-event-timeslot\" part=\"netimeslot\">\n <label htmlFor=\"date-time-input\">{i18next.t('nylasEventTimeslot.dateTimeLabel')}</label>\n <div class=\"date-time-input\" part=\"netimeslot__date-time-input\">\n <div class=\"date-time-picker\" part=\"netimeslot__date-time-picker\">\n <nylas-date-component name=\"date-time-input\" defaultValue={this.selectedDate} id={'date-time-input'} required={true}></nylas-date-component>\n <div class=\"time-range\" part=\"netimeslot__time-range\">\n <nylas-time-window-picker\n id={'start-time'}\n hasError={this.timeRangeError}\n time={this.selectedStartTime}\n language={this.selectedLanguage}\n name={'start-time'}\n key={'start-time'}\n exportparts=\"time-picker: nap__time-picker-container, time-input: nap__time-picker-input, times: nap__time-picker-times\"\n />\n <span>&ndash;</span>\n <nylas-time-window-picker\n id={'end-time'}\n hasError={this.timeRangeError}\n time={this.selectedEndTime}\n language={this.selectedLanguage}\n name={'end-time'}\n key={'end-time'}\n minimumStartTime={this.selectedStartTime}\n exportparts=\"time-picker: nap__time-picker-container, time-input: nap__time-picker-input, times: nap__time-picker-times\"\n />\n </div>\n {selectedTimezoneOption?.label && (\n <select-dropdown\n name=\"timezone\"\n exportparts=\"sd_dropdown: nap__timezone-container, sd_dropdown-button: nap__timezone-button, sd_dropdown-content: nap__timezone-dropdown-content\"\n options={timezoneOptions}\n withChevron={false}\n defaultSelectedOption={selectedTimezoneOption}\n >\n <span slot=\"select-icon\">\n <globe-icon width=\"20\" height=\"20\" />\n </span>\n </select-dropdown>\n )}\n </div>\n <div class=\"recurrence-options\" part=\"netimeslot__recurrence-options\">\n {defaultRecurrenceOption && defaultRecurrenceOption?.label && (\n <div class=\"recurrence-type\" part=\"netimeslot__recurrence-type\">\n <label htmlFor=\"recurrence-type\">{i18next.t('nylasEventTimeslot.recurrenceLabel')}</label>\n <select-dropdown\n withSearch={false}\n id=\"recurrence-type\"\n name=\"recurrence-type\"\n options={this.recurrenceOptions}\n defaultSelectedOption={defaultRecurrenceOption}\n exportparts=\"sd_dropdown: netimeslot__dropdown, sd_dropdown-button: netimeslot__dropdown-button, sd_dropdown-content: netimeslot__dropdown-content\"\n ></select-dropdown>\n </div>\n )}\n {this.selectedRecurrenceType !== 'custom' && this.selectedRecurrenceType !== 'none' && (\n <div class=\"recurrence-end\" part=\"netimeslot__recurrence-end\">\n <label>{i18next.t('nylasEventTimeslot.endDate')}</label>\n <nylas-date-component\n name=\"recurrence-end-date\"\n defaultValue={this.repeatEndOn || defaultEndOnDate}\n id={'recurrence-end-date'}\n required={true}\n ></nylas-date-component>\n </div>\n )}\n\n {this.selectedRecurrenceType === 'custom' && (\n <div class=\"custom-recurrence-time-period\" part=\"netimeslot__custom-recurrence\">\n <label htmlFor=\"\">{i18next.t('nylasEventTimeslot.customRecurrence.repeatEvery')}</label>\n <time-period-selector\n id=\"custom-recurrence-time-period\"\n exportparts=\"tps__number-dropdown: netimeslot__number-dropdown, tps__number-dropdown-button: netimeslot__number-dropdown-button, tps__number-dropdown-content: netimeslot__number-dropdown-content, tps__period-dropdown: netimeslot__period-dropdown, tps__period-dropdown-button: netimeslot__period-dropdown-button, tps__period-dropdown-content: netimeslot__period-dropdown-content\"\n timePeriods={[\n { value: 'day', label: i18next.t('timePeriod', { context: 'day' }) },\n { value: 'week', label: i18next.t('timePeriod', { context: 'week' }) },\n { value: 'month', label: i18next.t('timePeriod', { context: 'month' }) },\n { value: 'year', label: i18next.t('timePeriod', { context: 'year' }) },\n ]}\n defaultSelectedNumber={this.repeatEveryInterval}\n defaultSelectedPeriod={this.repeatEveryFrequency}\n />\n </div>\n )}\n <div class=\"repeat-on\">\n {this.selectedRecurrenceType === 'custom' && this.repeatEveryFrequency === 'week' && (\n <div class=\"days\">\n <label>{i18next.t('nylasEventTimeslot.customRecurrence.repeatOn')}</label>\n <div class=\"buttons\">\n {[\n { label: 'S', value: 'SU', title: 'Sunday' },\n { label: 'M', value: 'MO', title: 'Monday' },\n { label: 'T', value: 'TU', title: 'Tuesday' },\n { label: 'W', value: 'WE', title: 'Wednesday' },\n { label: 'T', value: 'TH', title: 'Thursday' },\n { label: 'F', value: 'FR', title: 'Friday' },\n { label: 'S', value: 'SA', title: 'Saturday' },\n ].map(day => (\n <button\n class={{ selected: this.repeatOnDays.includes(day.value) }}\n title={day.title}\n onClick={() => {\n this.repeatOnDays = this.repeatOnDays.includes(day.value) ? this.repeatOnDays.filter(d => d !== day.value) : [...this.repeatOnDays, day.value];\n this.handleValueChanged();\n }}\n >\n {day.label}\n </button>\n ))}\n </div>\n </div>\n )}\n {this.selectedRecurrenceType === 'custom' && this.repeatEveryFrequency === 'month' && (\n <div class=\"month-recurrence\">\n <span></span>\n <select-dropdown\n withSearch={false}\n id=\"month-recurrence-type\"\n name=\"month-recurrence-type\"\n options={this.monthRecurrenceOptions}\n defaultSelectedOption={this.repeatMonthlySameDate ? this.monthRecurrenceOptions[0] : this.monthRecurrenceOptions[1]}\n exportparts=\"sd_dropdown: netimeslot__dropdown, sd_dropdown-button: netimeslot__dropdown-button, sd_dropdown-content: netimeslot__dropdown-content\"\n ></select-dropdown>\n </div>\n )}\n <div class=\"custom-recurrence\">\n {this.selectedRecurrenceType === 'custom' && (\n <div class=\"custom-recurrence-ends\">\n <label htmlFor=\"recurrence-type\">{i18next.t('nylasEventTimeslot.customRecurrence.ends')}</label>\n <select-dropdown\n withSearch={false}\n id=\"custom-recurrence-end-type\"\n name=\"custom-recurrence-end-type\"\n options={endOptions}\n defaultSelectedOption={endOptions.find(option => option.value === this.repeatEndType)}\n exportparts=\"sd_dropdown: netimeslot__dropdown, sd_dropdown-button: netimeslot__dropdown-button, sd_dropdown-content: netimeslot__dropdown-content\"\n ></select-dropdown>\n </div>\n )}\n {this.selectedRecurrenceType === 'custom' && this.repeatEndType === 'on' && (\n <div>\n <nylas-date-component\n name=\"custom-recurrence-end-date\"\n defaultValue={this.repeatEndOn || defaultEndOnDate}\n id={'custom-recurrence-end-date'}\n required={true}\n ></nylas-date-component>\n </div>\n )}\n {this.selectedRecurrenceType === 'custom' && this.repeatEndType === 'after' && (\n <div class=\"custom-recurrence-end-after\">\n <input-component\n name=\"recurrence-end-after\"\n id=\"recurrence-end-after\"\n type=\"number\"\n minValue={1}\n defaultValue={defaultEndAfter.toString()}\n exportparts=\"ic_input: netimeslot__input-textfield\"\n />\n <span>{i18next.t('nylasEventTimeslot.customRecurrence.occurrences')}</span>\n </div>\n )}\n </div>\n </div>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -133,8 +133,8 @@ const NylasEventTitle = proxyCustomElement(class NylasEventTitle extends HTMLEle
133
133
  }
134
134
  valueChangedHandler(event) {
135
135
  const { name, value } = event.detail;
136
- const additionalFields = value || {};
137
136
  if (name === 'additional-fields') {
137
+ const additionalFields = JSON.parse(value.toString());
138
138
  const newKeys = Object.keys(additionalFields) || [];
139
139
  const newTokens = newKeys.map(key => {
140
140
  return {
@@ -396,10 +396,10 @@ const NylasEventTitle = proxyCustomElement(class NylasEventTitle extends HTMLEle
396
396
  return (h("div", { class: "token-label" }, h("span", { class: "token" }, token.token), h("span", { class: "description" }, token.description)));
397
397
  }
398
398
  render() {
399
- return (h(Host, { key: '77727ef052ef96fd01f44629fef5529637ab9512' }, h("div", { key: 'c155a7c80a37361d3764c87307603c9224a1acf3', class: "nylas-event-title", part: "net" }, h("label", { key: '167ce5894b815c0ba0af599c4d25567a65e7fe6a', htmlFor: "title" }, instance.t('nylasEventTitle.headerTitle'), h("span", { key: 'f6ef51b14e683622ad43979bcea199c58d78fd29', class: "required" }, "*")), h("div", { key: '2f4039d517d45b52422197766ba9db0b09a5f903', class: {
399
+ return (h(Host, { key: 'be5c644520aa3a3a32699d33a74a53be4a874f6c' }, h("div", { key: '3ccaeb04b75c6e7e15ebeda6b0f6c02f3b9c0869', class: "nylas-event-title", part: "net" }, h("label", { key: '4cd1348b60a56dca4a8092aecfe51103c53f048e', htmlFor: "title" }, instance.t('nylasEventTitle.headerTitle'), h("span", { key: '5d18db7ede458a9ab2d1b5bb19319d072ff2b70e', class: "required" }, "*")), h("div", { key: 'e4c00b94be0a861696d81526c26703fef888f536', class: {
400
400
  title: true,
401
401
  error: this.validationError !== '',
402
- }, part: "net__title", ref: el => (this.titleRef = el), contentEditable: "true", onInput: e => this.handleChange(e), onKeyDown: event => this.handleInputKeyDown(event) }), this.showTokens && this.filteredTokens?.length > 0 && (h("div", { class: "token-options", part: "net__dropdown-content" }, h("ul", { tabindex: "-1", role: "listbox", "aria-label": this.name, "aria-activedescendant": this.ariaActivedescendant }, this.filteredTokens.map(option => (h("li", { tabindex: "0", key: option.label, id: option.label, class: { active: this.ariaActivedescendant === option.label }, onClick: e => this.selectOption(e, option), role: "option" }, this.getLabelHTML(option.labelHTML))))))), h("span", { key: '336b58f03f6f13957ab0b62f2f98e95e2980bc13', class: "help-text" }, instance.t('nylasEventTitle.helpText', { context: 'start', field: instance.t('nylasEventTitle.title') }), " ", h("code", { key: '7069beaf38ab7a2a67f6de371b2544d45b26146b' }, "$"), ' ', instance.t('nylasEventTitle.helpText', { context: 'end' }), h("span", { key: '6b588508b38540c7d072f9e3c01c8e555669af2c', class: "label-icon" }, h("tooltip-component", { key: 'bbd2bcff01569fb91c87d78d36eb3c5b0163d73a' }, h("info-icon", { key: '0cbf47b89468838847282e729db536f8df63098c', slot: "tooltip-icon" }), h("span", { key: 'cb5a50ecd92b837fead8d1e08ceff2387173ea60', slot: "tooltip-content" }, instance.t('nylasEventTitle.tooltip.desc'), " ", h("code", { key: '22c5e150dfe201cc0d7bd3dd995db94ebd759f31' }, '${invitee}'))))), this.validationError != '' && h("span", { class: "error-message" }, instance.t(`nylasEventTitle.${this.validationError}`)))));
402
+ }, part: "net__title", ref: el => (this.titleRef = el), contentEditable: "true", onInput: e => this.handleChange(e), onKeyDown: event => this.handleInputKeyDown(event) }), this.showTokens && this.filteredTokens?.length > 0 && (h("div", { class: "token-options", part: "net__dropdown-content" }, h("ul", { tabindex: "-1", role: "listbox", "aria-label": this.name, "aria-activedescendant": this.ariaActivedescendant }, this.filteredTokens.map(option => (h("li", { tabindex: "0", key: option.label, id: option.label, class: { active: this.ariaActivedescendant === option.label }, onClick: e => this.selectOption(e, option), role: "option" }, this.getLabelHTML(option.labelHTML))))))), h("span", { key: '287386dc6cfafe56e01f6a51e3538da909cbd2db', class: "help-text" }, instance.t('nylasEventTitle.helpText', { context: 'start', field: instance.t('nylasEventTitle.title') }), " ", h("code", { key: '0a12678367abd26be60e14253837dfb8648f00b4' }, "$"), ' ', instance.t('nylasEventTitle.helpText', { context: 'end' }), h("span", { key: '18102bdb2013e451ece515ae09acf18a529e8f78', class: "label-icon" }, h("tooltip-component", { key: 'b79fccb2ca7864ae7446546be6d255c11ba4eced' }, h("info-icon", { key: 'ff624259a594a5ff192ab0e24ebd6f621d99cf63', slot: "tooltip-icon" }), h("span", { key: 'd406f605a1b2f7c503cb16c16b9205a4fa6e8c03', slot: "tooltip-content" }, instance.t('nylasEventTitle.tooltip.desc'), " ", h("code", { key: 'a4cf09de868ab908598a6d96a08b3880d76ff89d' }, '${invitee}'))))), this.validationError != '' && h("span", { class: "error-message" }, instance.t(`nylasEventTitle.${this.validationError}`)))));
403
403
  }
404
404
  static get formAssociated() { return true; }
405
405
  get host() { return this; }