@nylas/web-elements 1.1.5 → 1.1.6

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 (201) hide show
  1. package/dist/cdn/nylas-booked-event-card/nylas-booked-event-card.es.js +155 -145
  2. package/dist/cdn/nylas-booking-form/nylas-booking-form.es.js +80 -70
  3. package/dist/cdn/nylas-cancel-booking-form/nylas-cancel-booking-form.es.js +14 -4
  4. package/dist/cdn/nylas-cancelled-event-card/nylas-cancelled-event-card.es.js +14 -4
  5. package/dist/cdn/nylas-confirmed-event-card/nylas-confirmed-event-card.es.js +14 -4
  6. package/dist/cdn/nylas-date-picker/nylas-date-picker.es.js +86 -73
  7. package/dist/cdn/nylas-editor-tabs/nylas-editor-tabs.es.js +19 -12
  8. package/dist/cdn/nylas-feedback-form/nylas-feedback-form.es.js +1226 -1219
  9. package/dist/cdn/nylas-locale-switch/nylas-locale-switch.es.js +1233 -1220
  10. package/dist/cdn/nylas-organizer-confirmation-card/nylas-organizer-confirmation-card.es.js +11 -4
  11. package/dist/cdn/nylas-scheduler-editor/nylas-scheduler-editor.es.js +19 -12
  12. package/dist/cdn/nylas-scheduling/nylas-scheduling.es.js +1694 -1584
  13. package/dist/cdn/nylas-selected-event-card/nylas-selected-event-card.es.js +14 -4
  14. package/dist/cdn/nylas-timeslot-picker/nylas-timeslot-picker.es.js +13 -3
  15. package/dist/cjs/calendar-agenda-fill-icon_54.cjs.entry.js +13 -3
  16. package/dist/cjs/calendar-agenda-fill-icon_54.cjs.entry.js.map +1 -1
  17. package/dist/cjs/google-logo-icon_4.cjs.entry.js +7 -6
  18. package/dist/cjs/google-logo-icon_4.cjs.entry.js.map +1 -1
  19. package/dist/cjs/loader.cjs.js +1 -1
  20. package/dist/cjs/nylas-booked-event-card.cjs.entry.js +15 -4
  21. package/dist/cjs/nylas-booked-event-card.cjs.entry.js.map +1 -1
  22. package/dist/cjs/nylas-booked-event-card_12.cjs.entry.js +142 -25
  23. package/dist/cjs/nylas-booked-event-card_12.cjs.entry.js.map +1 -1
  24. package/dist/cjs/nylas-booking-form.cjs.entry.js +16 -3
  25. package/dist/cjs/nylas-booking-form.cjs.entry.js.map +1 -1
  26. package/dist/cjs/nylas-cancel-booking-form.cjs.entry.js +13 -2
  27. package/dist/cjs/nylas-cancel-booking-form.cjs.entry.js.map +1 -1
  28. package/dist/cjs/nylas-cancelled-event-card.cjs.entry.js +13 -2
  29. package/dist/cjs/nylas-cancelled-event-card.cjs.entry.js.map +1 -1
  30. package/dist/cjs/nylas-confirmed-event-card.cjs.entry.js +13 -2
  31. package/dist/cjs/nylas-confirmed-event-card.cjs.entry.js.map +1 -1
  32. package/dist/cjs/nylas-date-picker.cjs.entry.js +16 -2
  33. package/dist/cjs/nylas-date-picker.cjs.entry.js.map +1 -1
  34. package/dist/cjs/nylas-editor-tabs.cjs.entry.js +7 -6
  35. package/dist/cjs/nylas-editor-tabs.cjs.entry.js.map +1 -1
  36. package/dist/cjs/nylas-feedback-form.cjs.entry.js +13 -3
  37. package/dist/cjs/nylas-feedback-form.cjs.entry.js.map +1 -1
  38. package/dist/cjs/nylas-locale-switch.cjs.entry.js +18 -4
  39. package/dist/cjs/nylas-locale-switch.cjs.entry.js.map +1 -1
  40. package/dist/cjs/nylas-organizer-confirmation-card.cjs.entry.js +12 -2
  41. package/dist/cjs/nylas-organizer-confirmation-card.cjs.entry.js.map +1 -1
  42. package/dist/cjs/nylas-scheduling.cjs.entry.js +11 -10
  43. package/dist/cjs/nylas-scheduling.cjs.entry.js.map +1 -1
  44. package/dist/cjs/nylas-selected-event-card.cjs.entry.js +14 -3
  45. package/dist/cjs/nylas-selected-event-card.cjs.entry.js.map +1 -1
  46. package/dist/cjs/nylas-timeslot-picker.cjs.entry.js +12 -1
  47. package/dist/cjs/nylas-timeslot-picker.cjs.entry.js.map +1 -1
  48. package/dist/cjs/nylas-web-elements.cjs.js +1 -1
  49. package/dist/collection/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.css +0 -23
  50. package/dist/collection/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.js +34 -3
  51. package/dist/collection/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.js.map +1 -1
  52. package/dist/collection/components/scheduler/nylas-booking-form/nylas-booking-form.css +0 -23
  53. package/dist/collection/components/scheduler/nylas-booking-form/nylas-booking-form.js +35 -2
  54. package/dist/collection/components/scheduler/nylas-booking-form/nylas-booking-form.js.map +1 -1
  55. package/dist/collection/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.css +0 -23
  56. package/dist/collection/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.js +32 -1
  57. package/dist/collection/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.js.map +1 -1
  58. package/dist/collection/components/scheduler/nylas-cancelled-event-card/nylas-cancelled-event-card.css +0 -23
  59. package/dist/collection/components/scheduler/nylas-cancelled-event-card/nylas-cancelled-event-card.js +32 -1
  60. package/dist/collection/components/scheduler/nylas-cancelled-event-card/nylas-cancelled-event-card.js.map +1 -1
  61. package/dist/collection/components/scheduler/nylas-confirmed-event-card/nylas-confirmed-event-card.css +0 -23
  62. package/dist/collection/components/scheduler/nylas-confirmed-event-card/nylas-confirmed-event-card.js +32 -1
  63. package/dist/collection/components/scheduler/nylas-confirmed-event-card/nylas-confirmed-event-card.js.map +1 -1
  64. package/dist/collection/components/scheduler/nylas-date-picker/nylas-date-picker.css +0 -23
  65. package/dist/collection/components/scheduler/nylas-date-picker/nylas-date-picker.js +35 -1
  66. package/dist/collection/components/scheduler/nylas-date-picker/nylas-date-picker.js.map +1 -1
  67. package/dist/collection/components/scheduler/nylas-feedback-form/nylas-feedback-form.css +0 -23
  68. package/dist/collection/components/scheduler/nylas-feedback-form/nylas-feedback-form.js +36 -2
  69. package/dist/collection/components/scheduler/nylas-feedback-form/nylas-feedback-form.js.map +1 -1
  70. package/dist/collection/components/scheduler/nylas-locale-switch/nylas-locale-switch.css +0 -23
  71. package/dist/collection/components/scheduler/nylas-locale-switch/nylas-locale-switch.js +37 -3
  72. package/dist/collection/components/scheduler/nylas-locale-switch/nylas-locale-switch.js.map +1 -1
  73. package/dist/collection/components/scheduler/nylas-organizer-confirmation-card/nylas-organizer-confirmation-card.css +0 -23
  74. package/dist/collection/components/scheduler/nylas-organizer-confirmation-card/nylas-organizer-confirmation-card.js +31 -1
  75. package/dist/collection/components/scheduler/nylas-organizer-confirmation-card/nylas-organizer-confirmation-card.js.map +1 -1
  76. package/dist/collection/components/scheduler/nylas-scheduling/nylas-scheduling.js +10 -9
  77. package/dist/collection/components/scheduler/nylas-scheduling/nylas-scheduling.js.map +1 -1
  78. package/dist/collection/components/scheduler/nylas-selected-event-card/nylas-selected-event-card.css +0 -23
  79. package/dist/collection/components/scheduler/nylas-selected-event-card/nylas-selected-event-card.js +33 -2
  80. package/dist/collection/components/scheduler/nylas-selected-event-card/nylas-selected-event-card.js.map +1 -1
  81. package/dist/collection/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.css +0 -23
  82. package/dist/collection/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.js +31 -0
  83. package/dist/collection/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.js.map +1 -1
  84. package/dist/collection/components/scheduler/nylas-timeslot-picker/test/nylas-timeslot-picker.spec.js +7 -1
  85. package/dist/collection/components/scheduler/nylas-timeslot-picker/test/nylas-timeslot-picker.spec.js.map +1 -1
  86. package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.js +5 -4
  87. package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.js.map +1 -1
  88. package/dist/components/nylas-booked-event-card2.js +16 -4
  89. package/dist/components/nylas-booked-event-card2.js.map +1 -1
  90. package/dist/components/nylas-booking-form2.js +17 -3
  91. package/dist/components/nylas-booking-form2.js.map +1 -1
  92. package/dist/components/nylas-cancel-booking-form2.js +14 -2
  93. package/dist/components/nylas-cancel-booking-form2.js.map +1 -1
  94. package/dist/components/nylas-cancelled-event-card2.js +14 -2
  95. package/dist/components/nylas-cancelled-event-card2.js.map +1 -1
  96. package/dist/components/nylas-confirmed-event-card2.js +14 -2
  97. package/dist/components/nylas-confirmed-event-card2.js.map +1 -1
  98. package/dist/components/nylas-date-picker2.js +18 -3
  99. package/dist/components/nylas-date-picker2.js.map +1 -1
  100. package/dist/components/nylas-editor-tabs2.js +7 -6
  101. package/dist/components/nylas-editor-tabs2.js.map +1 -1
  102. package/dist/components/nylas-feedback-form2.js +14 -3
  103. package/dist/components/nylas-feedback-form2.js.map +1 -1
  104. package/dist/components/nylas-locale-switch2.js +20 -5
  105. package/dist/components/nylas-locale-switch2.js.map +1 -1
  106. package/dist/components/nylas-organizer-confirmation-card2.js +13 -2
  107. package/dist/components/nylas-organizer-confirmation-card2.js.map +1 -1
  108. package/dist/components/nylas-scheduling.js +11 -10
  109. package/dist/components/nylas-scheduling.js.map +1 -1
  110. package/dist/components/nylas-selected-event-card2.js +15 -3
  111. package/dist/components/nylas-selected-event-card2.js.map +1 -1
  112. package/dist/components/nylas-timeslot-picker2.js +13 -1
  113. package/dist/components/nylas-timeslot-picker2.js.map +1 -1
  114. package/dist/esm/calendar-agenda-fill-icon_54.entry.js +13 -3
  115. package/dist/esm/calendar-agenda-fill-icon_54.entry.js.map +1 -1
  116. package/dist/esm/google-logo-icon_4.entry.js +7 -6
  117. package/dist/esm/google-logo-icon_4.entry.js.map +1 -1
  118. package/dist/esm/loader.js +1 -1
  119. package/dist/esm/nylas-booked-event-card.entry.js +16 -5
  120. package/dist/esm/nylas-booked-event-card.entry.js.map +1 -1
  121. package/dist/esm/nylas-booked-event-card_12.entry.js +142 -25
  122. package/dist/esm/nylas-booked-event-card_12.entry.js.map +1 -1
  123. package/dist/esm/nylas-booking-form.entry.js +16 -3
  124. package/dist/esm/nylas-booking-form.entry.js.map +1 -1
  125. package/dist/esm/nylas-cancel-booking-form.entry.js +14 -3
  126. package/dist/esm/nylas-cancel-booking-form.entry.js.map +1 -1
  127. package/dist/esm/nylas-cancelled-event-card.entry.js +14 -3
  128. package/dist/esm/nylas-cancelled-event-card.entry.js.map +1 -1
  129. package/dist/esm/nylas-confirmed-event-card.entry.js +14 -3
  130. package/dist/esm/nylas-confirmed-event-card.entry.js.map +1 -1
  131. package/dist/esm/nylas-date-picker.entry.js +18 -4
  132. package/dist/esm/nylas-date-picker.entry.js.map +1 -1
  133. package/dist/esm/nylas-editor-tabs.entry.js +7 -6
  134. package/dist/esm/nylas-editor-tabs.entry.js.map +1 -1
  135. package/dist/esm/nylas-feedback-form.entry.js +13 -3
  136. package/dist/esm/nylas-feedback-form.entry.js.map +1 -1
  137. package/dist/esm/nylas-locale-switch.entry.js +20 -6
  138. package/dist/esm/nylas-locale-switch.entry.js.map +1 -1
  139. package/dist/esm/nylas-organizer-confirmation-card.entry.js +12 -2
  140. package/dist/esm/nylas-organizer-confirmation-card.entry.js.map +1 -1
  141. package/dist/esm/nylas-scheduling.entry.js +11 -10
  142. package/dist/esm/nylas-scheduling.entry.js.map +1 -1
  143. package/dist/esm/nylas-selected-event-card.entry.js +15 -4
  144. package/dist/esm/nylas-selected-event-card.entry.js.map +1 -1
  145. package/dist/esm/nylas-timeslot-picker.entry.js +13 -2
  146. package/dist/esm/nylas-timeslot-picker.entry.js.map +1 -1
  147. package/dist/esm/nylas-web-elements.js +1 -1
  148. package/dist/nylas-web-elements/nylas-booked-event-card.entry.js +16 -5
  149. package/dist/nylas-web-elements/nylas-booked-event-card.entry.js.map +1 -1
  150. package/dist/nylas-web-elements/nylas-booking-form.entry.js +16 -3
  151. package/dist/nylas-web-elements/nylas-booking-form.entry.js.map +1 -1
  152. package/dist/nylas-web-elements/nylas-cancel-booking-form.entry.js +14 -3
  153. package/dist/nylas-web-elements/nylas-cancel-booking-form.entry.js.map +1 -1
  154. package/dist/nylas-web-elements/nylas-cancelled-event-card.entry.js +14 -3
  155. package/dist/nylas-web-elements/nylas-cancelled-event-card.entry.js.map +1 -1
  156. package/dist/nylas-web-elements/nylas-confirmed-event-card.entry.js +14 -3
  157. package/dist/nylas-web-elements/nylas-confirmed-event-card.entry.js.map +1 -1
  158. package/dist/nylas-web-elements/nylas-date-picker.entry.js +18 -4
  159. package/dist/nylas-web-elements/nylas-date-picker.entry.js.map +1 -1
  160. package/dist/nylas-web-elements/nylas-editor-tabs.entry.js +7 -6
  161. package/dist/nylas-web-elements/nylas-editor-tabs.entry.js.map +1 -1
  162. package/dist/nylas-web-elements/nylas-feedback-form.entry.js +13 -3
  163. package/dist/nylas-web-elements/nylas-feedback-form.entry.js.map +1 -1
  164. package/dist/nylas-web-elements/nylas-locale-switch.entry.js +20 -6
  165. package/dist/nylas-web-elements/nylas-locale-switch.entry.js.map +1 -1
  166. package/dist/nylas-web-elements/nylas-organizer-confirmation-card.entry.js +12 -2
  167. package/dist/nylas-web-elements/nylas-organizer-confirmation-card.entry.js.map +1 -1
  168. package/dist/nylas-web-elements/nylas-scheduling.entry.js +11 -10
  169. package/dist/nylas-web-elements/nylas-scheduling.entry.js.map +1 -1
  170. package/dist/nylas-web-elements/nylas-selected-event-card.entry.js +15 -4
  171. package/dist/nylas-web-elements/nylas-selected-event-card.entry.js.map +1 -1
  172. package/dist/nylas-web-elements/nylas-timeslot-picker.entry.js +13 -2
  173. package/dist/nylas-web-elements/nylas-timeslot-picker.entry.js.map +1 -1
  174. package/dist/nylas-web-elements/nylas-web-elements.esm.js +1 -1
  175. package/dist/nylas-web-elements/p-2e7f0f20.entry.js +2 -0
  176. package/dist/nylas-web-elements/p-2e7f0f20.entry.js.map +1 -0
  177. package/dist/nylas-web-elements/{p-b5b568cf.entry.js → p-368190e9.entry.js} +2 -2
  178. package/dist/nylas-web-elements/p-368190e9.entry.js.map +1 -0
  179. package/dist/nylas-web-elements/{p-e790c71f.entry.js → p-9a8047b9.entry.js} +2 -2
  180. package/dist/nylas-web-elements/{p-e790c71f.entry.js.map → p-9a8047b9.entry.js.map} +1 -1
  181. package/dist/nylas-web-elements/{p-d586ff14.entry.js → p-eba3d197.entry.js} +3 -3
  182. package/dist/nylas-web-elements/p-eba3d197.entry.js.map +1 -0
  183. package/dist/types/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.d.ts +4 -1
  184. package/dist/types/components/scheduler/nylas-booking-form/nylas-booking-form.d.ts +5 -2
  185. package/dist/types/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.d.ts +4 -1
  186. package/dist/types/components/scheduler/nylas-cancelled-event-card/nylas-cancelled-event-card.d.ts +4 -0
  187. package/dist/types/components/scheduler/nylas-confirmed-event-card/nylas-confirmed-event-card.d.ts +4 -0
  188. package/dist/types/components/scheduler/nylas-date-picker/nylas-date-picker.d.ts +5 -0
  189. package/dist/types/components/scheduler/nylas-feedback-form/nylas-feedback-form.d.ts +3 -0
  190. package/dist/types/components/scheduler/nylas-locale-switch/nylas-locale-switch.d.ts +5 -0
  191. package/dist/types/components/scheduler/nylas-organizer-confirmation-card/nylas-organizer-confirmation-card.d.ts +3 -1
  192. package/dist/types/components/scheduler/nylas-scheduling/nylas-scheduling.d.ts +1 -1
  193. package/dist/types/components/scheduler/nylas-selected-event-card/nylas-selected-event-card.d.ts +4 -1
  194. package/dist/types/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.d.ts +4 -1
  195. package/dist/types/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.d.ts +1 -1
  196. package/dist/types/components.d.ts +88 -0
  197. package/package.json +1 -1
  198. package/dist/nylas-web-elements/p-7a1d51ab.entry.js +0 -2
  199. package/dist/nylas-web-elements/p-7a1d51ab.entry.js.map +0 -1
  200. package/dist/nylas-web-elements/p-b5b568cf.entry.js.map +0 -1
  201. package/dist/nylas-web-elements/p-d586ff14.entry.js.map +0 -1
@@ -1 +1 @@
1
- {"file":"nylas-cancel-booking-form2.js","mappings":";;;;;;;;;;AAAA,MAAM,yBAAyB,GAAG,otDAAotD;;;;;;;;;;;;;;;;MC4BzuD,sBAAsB;;;;;;;;;;QAgGzB,wB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K,CAAC,MAAM,CAAC,SAAS;wBACjC,MAAM,EAAE,WAAW;wBACnB,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM;qBAC5B,CAAC,CAAC;oBACH,IAAI,YAAY,KAAK,CAAC,MAAM,IAAI,OAAO,IAAI,MAAM,CAAC,EAAE;wBAClD,YAAY,CAAC,MAAM,CAAC,CAAC;qBACtB;iBACF;aACF;YACD,mBAAmB,EAAE,OAAO,KAAwB,EAAE,uBAAgD;gBACpG,KAAK,CAAC,2BAA2B,EAAE,qBAAqB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;gBACxE,uBAAuB,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC;aAC5C;YACD,sBAAsB,EAAE,OAAO,KAA+C,EAAE,wBAAiD;gBAC/H,KAAK,CAAC,2BAA2B,EAAE,wBAAwB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;aAC5E;YACD,sBAAsB,EAAE,OAAO,KAAyC,EAAE,wBAAiD;gBACzH,KAAK,CAAC,2BAA2B,EAAE,wBAAwB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;aAC5E;SACF;QACD,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;oDAsCD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["i18next"],"sources":["src/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.scss?tag=nylas-cancel-booking-form&encapsulation=shadow","src/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.tsx"],"sourcesContent":["@import '../../../common/styles/variables.scss';\n\n:host {\n @include default-css-variables;\n display: block;\n width: 400px;\n font-family: var(--nylas-font-family);\n}\n\n.nylas-cancel-booking-form {\n form {\n width: 100%;\n }\n\n display: flex;\n align-items: center;\n flex-direction: column;\n background-color: var(--nylas-base-0);\n color: var(--nylas-base-800);\n border-radius: var(--nylas-border-radius-2x);\n padding: 1.5rem;\n position: relative;\n box-shadow:\n 0px 1px 4px rgba(0, 0, 0, 0.1),\n 0px 3px 6px rgba(0, 0, 0, 0.06);\n}\n\n.nylas-cancel-booking-form__title {\n font-size: 18px;\n font-weight: 600;\n margin-bottom: 0;\n color: var(--nylas-base-900);\n}\n\n.nylas-cancel-booking-form__description {\n font-size: 1rem;\n font-style: normal;\n font-weight: 400;\n line-height: 140%;\n color: var(--nylas-base-600);\n padding-bottom: 1.25rem;\n}\n\n.nylas-cancel-booking-form__calendar-icon {\n width: 3rem;\n height: 3rem;\n border-radius: 50%;\n position: absolute;\n top: -1.25rem;\n left: 50%;\n transform: translateX(-50%);\n background-color: var(--nylas-base-0);\n border: 1px solid var(--nylas-base-200);\n}\n\ncalendar-cancel-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n}\n\n.footer {\n display: grid;\n grid-template-columns: 1fr 1fr;\n width: 100%;\n padding-top: 1.25rem;\n gap: 1rem;\n border-top: 1px solid var(--nylas-base-200);\n margin-top: 1.25rem;\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { Component, Event, EventEmitter, h, Host, Listen, Prop, State, Watch } from '@stencil/core';\nimport { NylasSchedulerConnector } from '../../..';\nimport { NylasScheduling } from '../nylas-scheduling/nylas-scheduling';\nimport { debug } from '@/utils/utils';\nimport { Notification, NylasSchedulerErrorResponse, Timeslot } from '@nylas/core';\nimport { ConfigSettings } from '@/stores/scheduler-store';\nimport i18next from '@/utils/i18n';\nimport { NylasEvent } from '@/common/types';\n\n/**\n * The `nylas-cancel-booking-form` component is a UI component that allows users to cancel a booking (DELETE request).\n * This component is also used to reject a booking (PUT request) by the organizer, if the prop `rejectBookingId` is provided.\n *\n * @part ncbf - The cancel booking form container.\n * @part ncbf__icon - The calendar icon.\n * @part ncbf__title - The title of the cancel booking form.\n * @part ncbf__description - The description of the cancel booking form.\n * @part ncbf__reason-textarea - The reason textarea.\n * @part ncbf__button-cta - The cancel booking form CTA button.\n * @part ncbf__button-outline - The cancel booking form outline button.\n * @part ncbf__card - The cancel booking form card.\n */\n@Component({\n tag: 'nylas-cancel-booking-form',\n styleUrl: 'nylas-cancel-booking-form.scss',\n shadow: true,\n})\nexport class NylasCancelBookingForm {\n /**\n * The booking ID to cancel.\n */\n @Prop() readonly cancelBookingId?: string;\n\n /**\n * The booking ID to reject.\n */\n @Prop() readonly rejectBookingId?: string;\n\n /**\n * The selected timeslot.\n */\n @Prop() readonly selectedTimeslot!: Timeslot;\n\n /**\n * @standalone\n * The config settings.\n */\n @Prop() readonly configSettings?: ConfigSettings;\n\n /**\n * @standalone\n * The event info.\n */\n @Prop() readonly eventInfo?: NylasEvent;\n\n /**\n * @standalone\n * The loading state.\n */\n @Prop() readonly isLoading?: boolean;\n\n /**\n * This event is fired when the Go back button is clicked on the cancel booking form.\n */\n @Event() readonly goBackButtonClicked!: EventEmitter<void>;\n\n /**\n * This event is fired when the cancel booking form is submitted.\n */\n @Event() readonly cancelBookingFormSubmitted!: EventEmitter<{\n bookingId: string;\n action: 'reject' | 'cancel';\n reason: string;\n errorHandler?: (error: NylasSchedulerErrorResponse) => void;\n }>;\n\n /**\n * This event is only for triggering the validation on the text area for cancellation reason. This is for internal purposes only.\n */\n @Event() readonly triggerValidation!: EventEmitter<{}>;\n /**\n * This event is fired when an error occurs while cancelling the booking.\n */\n @Event() readonly cancelBookedEventError!: EventEmitter<NylasSchedulerErrorResponse>;\n\n /**\n * This event is fired when an error occurs in the booking form.\n */\n @Event() cancelBookingFormError!: EventEmitter<Partial<Notification>>;\n\n /**\n * The reason for cancellation.\n */\n @State() cancellationReason: string = '';\n\n @State() cancellationError: string = '';\n\n @State() cancellationPolicy: string = this.configSettings?.scheduler?.cancellation_policy || 'Your current timeslot will become available to others.';\n\n @Watch('configSettings')\n configSettingsChangedHandler(newValue: ConfigSettings) {\n this.cancellationPolicy = newValue?.scheduler?.cancellation_policy || 'Your current timeslot will become available to others.';\n }\n\n connectedCallback() {\n debug(`[nylas-cancel-booking-form] Component connected`);\n }\n\n async componentWillLoad() {\n debug(`[nylas-cancel-booking-form] Component will load`);\n }\n\n async componentDidLoad() {\n debug(`[nylas-cancel-booking-form] Component did load`);\n if (!this.cancelBookingId) {\n console.warn(`[nylas-cancel-booking-form] No booking ID provided, \"cancelBookingId\" prop is required.`);\n }\n }\n\n disconnectedCallback() {\n debug(`[nylas-cancel-booking-form] Component disconnected`);\n }\n\n private handleGoBackClicked = () => {\n this.goBackButtonClicked.emit();\n };\n\n private handleSubmitCancelBooking = (event: Event) => {\n this.triggerValidation.emit({});\n event.preventDefault();\n if (!this.cancellationReason) {\n this.cancellationError = i18next.t('cancellationErrorMessage');\n this.cancelBookingFormError.emit({ title: i18next.t('cancelBokingFormError'), description: i18next.t('cancellationErrorMessage') });\n return;\n }\n\n const minCancellationNotice = this.configSettings?.scheduler?.min_cancellation_notice;\n if (this.selectedTimeslot && minCancellationNotice) {\n const startTime = new Date(this.selectedTimeslot?.start_time);\n const dateTillCancellation = startTime.getTime() - minCancellationNotice * 60 * 1000;\n\n if (dateTillCancellation < new Date().getTime()) {\n this.cancelBookedEventError.emit({\n error: {\n title: i18next.t('cancellationErrorTitle'),\n message: i18next.t('minimumCancellationNoticeErrorMessage', { minCancellationNotice }),\n },\n });\n return;\n }\n }\n\n debug(`[nylas-cancel-booking-form] Cancel booking form submitted with reason: ${this.cancellationReason}`);\n const errorHandler = (error: NylasSchedulerErrorResponse) => {\n this.cancelBookedEventError.emit(error);\n };\n if (this.cancelBookingId) {\n this.cancelBookingFormSubmitted.emit({ bookingId: this.cancelBookingId, action: 'cancel', reason: this.cancellationReason, errorHandler });\n } else if (this.rejectBookingId) {\n this.cancelBookingFormSubmitted.emit({ bookingId: this.rejectBookingId, action: 'reject', reason: this.cancellationReason, errorHandler });\n }\n };\n\n @Listen('nylasFormInputChanged')\n handleNylasFormInputChanged(event: CustomEvent<{ value: string; name: string; error: string; label: string; type: string }>) {\n this.triggerValidation.emit({});\n if (event.detail.name === 'cancel-reason') {\n this.cancellationReason = event.detail.value;\n this.cancellationError = event.detail.error;\n }\n }\n\n @RegisterComponent<NylasCancelBookingForm, NylasSchedulerConnector, Exclude<NylasScheduling['stores'], undefined>>({\n name: 'nylas-cancel-booking-form',\n stateToProps: new Map([\n ['scheduler.configSettings', 'configSettings'],\n ['scheduler.selectedTimeslot', 'selectedTimeslot'],\n ['scheduler.eventInfo', 'eventInfo'],\n ['scheduler.isLoading', 'isLoading'],\n ['scheduler.cancelBookingId', 'cancelBookingId'],\n ['scheduler.rejectBookingId', 'rejectBookingId'],\n ]),\n eventToProps: {\n cancelBookingFormSubmitted: async (\n event: CustomEvent<{ bookingId: string; action: 'reject' | 'cancel'; reason: string; errorHandler?: (error: NylasSchedulerErrorResponse) => void }>,\n nylasSchedulerConnector: NylasSchedulerConnector,\n ) => {\n const { action, errorHandler } = event.detail;\n if (action === 'cancel') {\n const result = await nylasSchedulerConnector.scheduler.cancelBooking(event.detail.bookingId, event.detail.reason);\n if (errorHandler && (!result || 'error' in result)) {\n errorHandler(result);\n }\n } else if (action === 'reject') {\n const result = await nylasSchedulerConnector.scheduler.updateBooking({\n bookingId: event.detail.bookingId,\n status: 'cancelled',\n reason: event.detail.reason,\n });\n if (errorHandler && (!result || 'error' in result)) {\n errorHandler(result);\n }\n }\n },\n goBackButtonClicked: async (event: CustomEvent<void>, nylasSchedulerConnector: NylasSchedulerConnector) => {\n debug('nylas-cancel-booking-form', 'goBackButtonClicked', event.detail);\n nylasSchedulerConnector.scheduler.goBack();\n },\n cancelBookedEventError: async (event: CustomEvent<NylasSchedulerErrorResponse>, _nylasSchedulerConnector: NylasSchedulerConnector) => {\n debug('nylas-cancel-booking-form', 'cancelBookedEventError', event.detail);\n },\n cancelBookingFormError: async (event: CustomEvent<Partial<Notification>>, _nylasSchedulerConnector: NylasSchedulerConnector) => {\n debug('nylas-cancel-booking-form', 'cancelBookingFormError', event.detail);\n },\n },\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host part=\"ncbf\">\n <div class=\"nylas-cancel-booking-form\" part=\"ncbf__card\">\n <div class=\"nylas-cancel-booking-form__calendar-icon\" part=\"ncbf__icon\">\n <calendar-cancel-icon />\n </div>\n <h3 class=\"nylas-cancel-booking-form__title\" part=\"ncbf__title\">\n {i18next.t('cancelBookingTitle')}\n </h3>\n <div class=\"nylas-cancel-booking-form__description\" part=\"ncbf__description\">\n {!this.configSettings?.scheduler?.cancellation_policy ? `${i18next.t('cancelBookingMessage')}` : this.cancellationPolicy}\n </div>\n <form onSubmit={this.handleSubmitCancelBooking}>\n <textarea-component\n id=\"cancel-reason\"\n name=\"cancel-reason\"\n required={true}\n label={i18next.t('reasonForCancellation')}\n class={this.cancellationError ? 'error' : ''}\n part=\"ncbf__reason-textarea\"\n defaultValue={this.cancellationReason}\n ></textarea-component>\n <div class=\"footer\">\n <button-component variant={'destructive'} class=\"cancel\" type=\"submit\" part=\"ncbf__button-cta\" disabled={this.isLoading}>\n {i18next.t('cancelBookingButton')}\n </button-component>\n {!!this.eventInfo && (\n <button-component variant={'basic'} class=\"back\" part=\"ncbf__button-outline\" onClick={this.handleGoBackClicked}>\n {i18next.t('goBackButton')}\n </button-component>\n )}\n </div>\n </form>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"nylas-cancel-booking-form2.js","mappings":";;;;;;;;;;AAAA,MAAM,yBAAyB,GAAG,ynCAAynC;;;;;;;;;;;;;;;;MC4B9oC,sBAAsB;;;;;;;;;;QAqHzB,wBAAmB,GAAG;YAC5B,IAAI,CAAC,mBAAmB,CAAC,IAAI,EAAE,CAAC;SACjC,CAAC;QAEM,8BAAyB,GAAG,CAAC,KAAY;YAC/C,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YAChC,KAAK,CAAC,cAAc,EAAE,CAAC;YACvB,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE;gBAC5B,IAAI,CAAC,iBAAiB,GAAGA,QAAO,CAAC,CAAC,CAAC,0BAA0B,CAAC,CAAC;gBAC/D,IAAI,CAAC,sBAAsB,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AAM,EAAE,WAAW;wBACnB,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM;qBAC5B,CAAC,CAAC;oBACH,IAAI,YAAY,KAAK,CAAC,MAAM,IAAI,OAAO,IAAI,MAAM,CAAC,EAAE;wBAClD,YAAY,CAAC,MAAM,CAAC,CAAC;qBACtB;iBACF;aACF;YACD,mBAAmB,EAAE,OAAO,KAAwB,EAAE,uBAAgD;gBACpG,KAAK,CAAC,2BAA2B,EAAE,qBAAqB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;gBACxE,uBAAuB,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC;aAC5C;YACD,sBAAsB,EAAE,OAAO,KAA+C,EAAE,wBAAiD;gBAC/H,KAAK,CAAC,2BAA2B,EAAE,wBAAwB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;aAC5E;YACD,sBAAsB,EAAE,OAAO,KAAyC,EAAE,wBAAiD;gBACzH,KAAK,CAAC,2BAA2B,EAAE,wBAAwB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;aAC5E;SACF;QACD,gBAAgB,EAAE,IAAI,GAAG,CAAC,CAAC,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC,CAAC;QAC3D,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;oDAsCD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["i18next"],"sources":["src/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.scss?tag=nylas-cancel-booking-form&encapsulation=shadow","src/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.tsx"],"sourcesContent":["@import '../../../common/styles/variables.scss';\n\n:host {\n display: block;\n width: 400px;\n font-family: var(--nylas-font-family);\n}\n\n.nylas-cancel-booking-form {\n form {\n width: 100%;\n }\n\n display: flex;\n align-items: center;\n flex-direction: column;\n background-color: var(--nylas-base-0);\n color: var(--nylas-base-800);\n border-radius: var(--nylas-border-radius-2x);\n padding: 1.5rem;\n position: relative;\n box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.1),\n 0px 3px 6px rgba(0, 0, 0, 0.06);\n}\n\n.nylas-cancel-booking-form__title {\n font-size: 18px;\n font-weight: 600;\n margin-bottom: 0;\n color: var(--nylas-base-900);\n}\n\n.nylas-cancel-booking-form__description {\n font-size: 1rem;\n font-style: normal;\n font-weight: 400;\n line-height: 140%;\n color: var(--nylas-base-600);\n padding-bottom: 1.25rem;\n}\n\n.nylas-cancel-booking-form__calendar-icon {\n width: 3rem;\n height: 3rem;\n border-radius: 50%;\n position: absolute;\n top: -1.25rem;\n left: 50%;\n transform: translateX(-50%);\n background-color: var(--nylas-base-0);\n border: 1px solid var(--nylas-base-200);\n}\n\ncalendar-cancel-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n}\n\n.footer {\n display: grid;\n grid-template-columns: 1fr 1fr;\n width: 100%;\n padding-top: 1.25rem;\n gap: 1rem;\n border-top: 1px solid var(--nylas-base-200);\n margin-top: 1.25rem;\n}","import { RegisterComponent } from '@/common/register-component';\nimport { Component, Element, Event, EventEmitter, h, Host, Listen, Prop, State, Watch } from '@stencil/core';\nimport { NylasSchedulerConnector } from '../../..';\nimport { NylasScheduling } from '../nylas-scheduling/nylas-scheduling';\nimport { debug } from '@/utils/utils';\nimport { Notification, NylasSchedulerErrorResponse, ThemeConfig, Timeslot } from '@nylas/core';\nimport { ConfigSettings } from '@/stores/scheduler-store';\nimport i18next from '@/utils/i18n';\nimport { NylasEvent } from '@/common/types';\n\n/**\n * The `nylas-cancel-booking-form` component is a UI component that allows users to cancel a booking (DELETE request).\n * This component is also used to reject a booking (PUT request) by the organizer, if the prop `rejectBookingId` is provided.\n *\n * @part ncbf - The cancel booking form container.\n * @part ncbf__icon - The calendar icon.\n * @part ncbf__title - The title of the cancel booking form.\n * @part ncbf__description - The description of the cancel booking form.\n * @part ncbf__reason-textarea - The reason textarea.\n * @part ncbf__button-cta - The cancel booking form CTA button.\n * @part ncbf__button-outline - The cancel booking form outline button.\n * @part ncbf__card - The cancel booking form card.\n */\n@Component({\n tag: 'nylas-cancel-booking-form',\n styleUrl: 'nylas-cancel-booking-form.scss',\n shadow: true,\n})\nexport class NylasCancelBookingForm {\n /**\n * The host element.\n * Used to manage the host element of the provider.\n */\n @Element() private host!: HTMLNylasCancelBookingFormElement;\n\n /**\n * The booking ID to cancel.\n */\n @Prop() readonly cancelBookingId?: string;\n\n /**\n * The booking ID to reject.\n */\n @Prop() readonly rejectBookingId?: string;\n\n /**\n * The selected timeslot.\n */\n @Prop() readonly selectedTimeslot!: Timeslot;\n\n /**\n * @standalone\n * The config settings.\n */\n @Prop() readonly configSettings?: ConfigSettings;\n\n /**\n * @standalone\n * The event info.\n */\n @Prop() readonly eventInfo?: NylasEvent;\n\n /**\n * @standalone\n * The loading state.\n */\n @Prop() readonly isLoading?: boolean;\n\n /**\n * @standalone\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: any;\n\n /**\n * This event is fired when the Go back button is clicked on the cancel booking form.\n */\n @Event() readonly goBackButtonClicked!: EventEmitter<void>;\n\n /**\n * This event is fired when the cancel booking form is submitted.\n */\n @Event() readonly cancelBookingFormSubmitted!: EventEmitter<{\n bookingId: string;\n action: 'reject' | 'cancel';\n reason: string;\n errorHandler?: (error: NylasSchedulerErrorResponse) => void;\n }>;\n\n /**\n * This event is only for triggering the validation on the text area for cancellation reason. This is for internal purposes only.\n */\n @Event() readonly triggerValidation!: EventEmitter<{}>;\n /**\n * This event is fired when an error occurs while cancelling the booking.\n */\n @Event() readonly cancelBookedEventError!: EventEmitter<NylasSchedulerErrorResponse>;\n\n /**\n * This event is fired when an error occurs in the booking form.\n */\n @Event() cancelBookingFormError!: EventEmitter<Partial<Notification>>;\n\n /**\n * The reason for cancellation.\n */\n @State() cancellationReason: string = '';\n\n @State() cancellationError: string = '';\n\n @State() cancellationPolicy: string = this.configSettings?.scheduler?.cancellation_policy || 'Your current timeslot will become available to others.';\n\n @Watch('configSettings')\n configSettingsChangedHandler(newValue: ConfigSettings) {\n this.cancellationPolicy = newValue?.scheduler?.cancellation_policy || 'Your current timeslot will become available to others.';\n }\n\n connectedCallback() {\n debug(`[nylas-cancel-booking-form] Component connected`);\n }\n\n async componentWillLoad() {\n debug(`[nylas-cancel-booking-form] Component will load`);\n }\n\n async componentDidLoad() {\n debug(`[nylas-cancel-booking-form] Component did load`);\n if (!this.cancelBookingId) {\n console.warn(`[nylas-cancel-booking-form] No booking ID provided, \"cancelBookingId\" prop is required.`);\n }\n this.applyThemeConfig(this.themeConfig);\n }\n\n disconnectedCallback() {\n debug(`[nylas-cancel-booking-form] Component disconnected`);\n }\n\n applyThemeConfig(themeConfig?: ThemeConfig) {\n if (themeConfig) {\n for (const [key, value] of Object.entries(themeConfig)) {\n this.host.style.setProperty(`${key}`, value);\n }\n }\n }\n\n private handleGoBackClicked = () => {\n this.goBackButtonClicked.emit();\n };\n\n private handleSubmitCancelBooking = (event: Event) => {\n this.triggerValidation.emit({});\n event.preventDefault();\n if (!this.cancellationReason) {\n this.cancellationError = i18next.t('cancellationErrorMessage');\n this.cancelBookingFormError.emit({ title: i18next.t('cancelBokingFormError'), description: i18next.t('cancellationErrorMessage') });\n return;\n }\n\n const minCancellationNotice = this.configSettings?.scheduler?.min_cancellation_notice;\n if (this.selectedTimeslot && minCancellationNotice) {\n const startTime = new Date(this.selectedTimeslot?.start_time);\n const dateTillCancellation = startTime.getTime() - minCancellationNotice * 60 * 1000;\n\n if (dateTillCancellation < new Date().getTime()) {\n this.cancelBookedEventError.emit({\n error: {\n title: i18next.t('cancellationErrorTitle'),\n message: i18next.t('minimumCancellationNoticeErrorMessage', { minCancellationNotice }),\n },\n });\n return;\n }\n }\n\n debug(`[nylas-cancel-booking-form] Cancel booking form submitted with reason: ${this.cancellationReason}`);\n const errorHandler = (error: NylasSchedulerErrorResponse) => {\n this.cancelBookedEventError.emit(error);\n };\n if (this.cancelBookingId) {\n this.cancelBookingFormSubmitted.emit({ bookingId: this.cancelBookingId, action: 'cancel', reason: this.cancellationReason, errorHandler });\n } else if (this.rejectBookingId) {\n this.cancelBookingFormSubmitted.emit({ bookingId: this.rejectBookingId, action: 'reject', reason: this.cancellationReason, errorHandler });\n }\n };\n\n @Listen('nylasFormInputChanged')\n handleNylasFormInputChanged(event: CustomEvent<{ value: string; name: string; error: string; label: string; type: string }>) {\n this.triggerValidation.emit({});\n if (event.detail.name === 'cancel-reason') {\n this.cancellationReason = event.detail.value;\n this.cancellationError = event.detail.error;\n }\n }\n\n @RegisterComponent<NylasCancelBookingForm, NylasSchedulerConnector, Exclude<NylasScheduling['stores'], undefined>>({\n name: 'nylas-cancel-booking-form',\n stateToProps: new Map([\n ['scheduler.configSettings', 'configSettings'],\n ['scheduler.selectedTimeslot', 'selectedTimeslot'],\n ['scheduler.eventInfo', 'eventInfo'],\n ['scheduler.isLoading', 'isLoading'],\n ['scheduler.cancelBookingId', 'cancelBookingId'],\n ['scheduler.rejectBookingId', 'rejectBookingId'],\n ]),\n eventToProps: {\n cancelBookingFormSubmitted: async (\n event: CustomEvent<{ bookingId: string; action: 'reject' | 'cancel'; reason: string; errorHandler?: (error: NylasSchedulerErrorResponse) => void }>,\n nylasSchedulerConnector: NylasSchedulerConnector,\n ) => {\n const { action, errorHandler } = event.detail;\n if (action === 'cancel') {\n const result = await nylasSchedulerConnector.scheduler.cancelBooking(event.detail.bookingId, event.detail.reason);\n if (errorHandler && (!result || 'error' in result)) {\n errorHandler(result);\n }\n } else if (action === 'reject') {\n const result = await nylasSchedulerConnector.scheduler.updateBooking({\n bookingId: event.detail.bookingId,\n status: 'cancelled',\n reason: event.detail.reason,\n });\n if (errorHandler && (!result || 'error' in result)) {\n errorHandler(result);\n }\n }\n },\n goBackButtonClicked: async (event: CustomEvent<void>, nylasSchedulerConnector: NylasSchedulerConnector) => {\n debug('nylas-cancel-booking-form', 'goBackButtonClicked', event.detail);\n nylasSchedulerConnector.scheduler.goBack();\n },\n cancelBookedEventError: async (event: CustomEvent<NylasSchedulerErrorResponse>, _nylasSchedulerConnector: NylasSchedulerConnector) => {\n debug('nylas-cancel-booking-form', 'cancelBookedEventError', event.detail);\n },\n cancelBookingFormError: async (event: CustomEvent<Partial<Notification>>, _nylasSchedulerConnector: NylasSchedulerConnector) => {\n debug('nylas-cancel-booking-form', 'cancelBookingFormError', event.detail);\n },\n },\n localPropsToProp: new Map([['themeConfig', 'themeConfig']]),\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host part=\"ncbf\">\n <div class=\"nylas-cancel-booking-form\" part=\"ncbf__card\">\n <div class=\"nylas-cancel-booking-form__calendar-icon\" part=\"ncbf__icon\">\n <calendar-cancel-icon />\n </div>\n <h3 class=\"nylas-cancel-booking-form__title\" part=\"ncbf__title\">\n {i18next.t('cancelBookingTitle')}\n </h3>\n <div class=\"nylas-cancel-booking-form__description\" part=\"ncbf__description\">\n {!this.configSettings?.scheduler?.cancellation_policy ? `${i18next.t('cancelBookingMessage')}` : this.cancellationPolicy}\n </div>\n <form onSubmit={this.handleSubmitCancelBooking}>\n <textarea-component\n id=\"cancel-reason\"\n name=\"cancel-reason\"\n required={true}\n label={i18next.t('reasonForCancellation')}\n class={this.cancellationError ? 'error' : ''}\n part=\"ncbf__reason-textarea\"\n defaultValue={this.cancellationReason}\n ></textarea-component>\n <div class=\"footer\">\n <button-component variant={'destructive'} class=\"cancel\" type=\"submit\" part=\"ncbf__button-cta\" disabled={this.isLoading}>\n {i18next.t('cancelBookingButton')}\n </button-component>\n {!!this.eventInfo && (\n <button-component variant={'basic'} class=\"back\" part=\"ncbf__button-outline\" onClick={this.handleGoBackClicked}>\n {i18next.t('goBackButton')}\n </button-component>\n )}\n </div>\n </form>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -5,7 +5,7 @@ import { d as defineCustomElement$3 } from './button-component2.js';
5
5
  import { d as defineCustomElement$2 } from './calendar-cancel.js';
6
6
  import { d as defineCustomElement$1 } from './loading.js';
7
7
 
8
- const nylasCancelledEventCardCss = ":host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:\"Inter\", sans-serif}.nylas-cancelled-event-card{height:inherit;display:flex;flex-direction:column;justify-content:space-between;align-items:center;font-family:var(--nylas-font-family);width:400px;background-color:var(--nylas-base-0);color:var(--nylas-base-800);border-radius:var(--nylas-border-radius-2x);padding:1.5rem;position:relative;box-shadow:0px 1px 4px rgba(0, 0, 0, 0.1), 0px 3px 6px rgba(0, 0, 0, 0.06)}@media screen and (max-width: 768px){.nylas-cancelled-event-card{width:inherit}}.nylas-cancelled-event-card__title{font-size:18px;font-weight:600;line-height:24px;color:var(--nylas-base-900);text-align:center}.nylas-cancelled-event-description{font-size:16px;font-weight:500;color:var(--nylas-base-600)}.nylas-cancelled-event-card__calendar-icon{width:3rem;height:3rem;border-radius:50%;position:absolute;top:-1.25rem;left:50%;transform:translateX(-50%);background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200)}.nylas-cancelled-event-card__cta{width:100%;display:flex;flex-direction:row;align-items:flex-start;margin-top:1rem}calendar-cancel-icon{display:flex;align-items:center;justify-content:center;height:100%}button-component{width:100%}";
8
+ const nylasCancelledEventCardCss = ":host{display:block}.nylas-cancelled-event-card{height:inherit;display:flex;flex-direction:column;justify-content:space-between;align-items:center;font-family:var(--nylas-font-family);width:400px;background-color:var(--nylas-base-0);color:var(--nylas-base-800);border-radius:var(--nylas-border-radius-2x);padding:1.5rem;position:relative;box-shadow:0px 1px 4px rgba(0, 0, 0, 0.1), 0px 3px 6px rgba(0, 0, 0, 0.06)}@media screen and (max-width: 768px){.nylas-cancelled-event-card{width:inherit}}.nylas-cancelled-event-card__title{font-size:18px;font-weight:600;line-height:24px;color:var(--nylas-base-900);text-align:center}.nylas-cancelled-event-description{font-size:16px;font-weight:500;color:var(--nylas-base-600)}.nylas-cancelled-event-card__calendar-icon{width:3rem;height:3rem;border-radius:50%;position:absolute;top:-1.25rem;left:50%;transform:translateX(-50%);background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200)}.nylas-cancelled-event-card__cta{width:100%;display:flex;flex-direction:row;align-items:flex-start;margin-top:1rem}calendar-cancel-icon{display:flex;align-items:center;justify-content:center;height:100%}button-component{width:100%}";
9
9
 
10
10
  var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
11
11
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -37,6 +37,7 @@ const NylasCancelledEventCard = proxyCustomElement(class NylasCancelledEventCard
37
37
  this.closeCancelEventCardClicked.emit({ errorHandler });
38
38
  };
39
39
  this.configSettings = undefined;
40
+ this.themeConfig = undefined;
40
41
  this.cancelledEventInfo = undefined;
41
42
  this.isClosing = false;
42
43
  }
@@ -51,16 +52,26 @@ const NylasCancelledEventCard = proxyCustomElement(class NylasCancelledEventCard
51
52
  if (!this.cancelledEventInfo) {
52
53
  console.warn(`[nylas-cancelled-event-card] No cancelled event info provided, "cancelledEventInfo" prop is required.`);
53
54
  }
55
+ this.applyThemeConfig(this.themeConfig);
54
56
  }
55
57
  disconnectedCallback() {
56
58
  debug(`[nylas-cancelled-event-card] Component disconnected`);
57
59
  }
60
+ applyThemeConfig(themeConfig) {
61
+ if (themeConfig) {
62
+ for (const [key, value] of Object.entries(themeConfig)) {
63
+ this.host.style.setProperty(`${key}`, value);
64
+ }
65
+ }
66
+ }
58
67
  render() {
59
- return (h(Host, { key: 'e5e3ac32d965a7d9e9bc0bb8bbd774625ff07d7b', part: "ncec" }, h("div", { key: 'e4ef634f512035b0e36012009a49d4e3e9845973', class: "nylas-cancelled-event-card", part: "ncec__card" }, h("div", { key: '8a739422bcf542b9b8c97c0a56032b4393755d5d', class: "nylas-cancelled-event-card__calendar-icon", part: "ncec__icon" }, h("calendar-cancel-icon", { key: 'cd4aa557789c4487f6ce7ef70337a4af83e4d3be' })), h("h3", { key: '48aff2d9672f9d7e24b61ec5fa3b21ec63345f54', class: "nylas-cancelled-event-card__title", part: "ncec__title" }, instance.t('bookingCancelledTitle'), "!"), h("div", { key: '0c861a46988ad3071850dbe61f8344b5da6cd6d6', class: "nylas-cancelled-event-card__description", part: "ncec__description" }, instance.t('bookingCancelledMessage'), " ", this.configSettings?.organizer?.name || 'the participants', "."), h("div", { key: 'd9801695af5953536439a188c7e1d8d324a2fdbd', class: "nylas-cancelled-event-card__cta" }, h("button-component", { key: 'b8c463a0ef0c36a4c28b46a3ad0aaa7f5b8f2efc', variant: "basic", disabled: this.isClosing, part: "ncec__button-outline", onClick: this.handleCloseClicked }, this.isClosing ? `${instance.t('closingButton')}...` : `${instance.t('closeButton')}`)))));
68
+ return (h(Host, { key: '4f1f7bf3b9d6376f5112b5f71b33bdce9bf59a19', part: "ncec" }, h("div", { key: 'f485f11c84c501c1d56cac844ccc39fe09b758fb', class: "nylas-cancelled-event-card", part: "ncec__card" }, h("div", { key: '3ac26f67a660d1075b3d5f674b745db0c59125a2', class: "nylas-cancelled-event-card__calendar-icon", part: "ncec__icon" }, h("calendar-cancel-icon", { key: '4dc83661715f1525b3a5a45d69e336d7f0f9dbf1' })), h("h3", { key: '59446c3be2e213ca71124be2d33cae8c077b451d', class: "nylas-cancelled-event-card__title", part: "ncec__title" }, instance.t('bookingCancelledTitle'), "!"), h("div", { key: '6486085d435d558816573e6d2aa3840030707af2', class: "nylas-cancelled-event-card__description", part: "ncec__description" }, instance.t('bookingCancelledMessage'), " ", this.configSettings?.organizer?.name || 'the participants', "."), h("div", { key: 'e7ebffeb313b39f860df4776fe802beddc9eb86b', class: "nylas-cancelled-event-card__cta" }, h("button-component", { key: '35593203c58b837db2b7ce98d8cf214658b2e8a0', variant: "basic", disabled: this.isClosing, part: "ncec__button-outline", onClick: this.handleCloseClicked }, this.isClosing ? `${instance.t('closingButton')}...` : `${instance.t('closeButton')}`)))));
60
69
  }
70
+ get host() { return this; }
61
71
  static get style() { return nylasCancelledEventCardCss; }
62
72
  }, [1, "nylas-cancelled-event-card", {
63
73
  "configSettings": [16],
74
+ "themeConfig": [8, "theme-config"],
64
75
  "cancelledEventInfo": [16],
65
76
  "isClosing": [32]
66
77
  }]);
@@ -80,6 +91,7 @@ __decorate([
80
91
  debug('nylas-cancelled-event-card', 'cancelledEventCardError', event.detail);
81
92
  },
82
93
  },
94
+ localPropsToProp: new Map([['themeConfig', 'themeConfig']]),
83
95
  fireRegisterEvent: true,
84
96
  }),
85
97
  __metadata("design:type", Function),
@@ -1 +1 @@
1
- {"file":"nylas-cancelled-event-card2.js","mappings":";;;;;;;AAAA,MAAM,0BAA0B,GAAG,mvDAAmvD;;;;;;;;;;;;;;;;MCuBzwD,uBAAuB;;;;;;;QA8C1B,uBAAkB,GAAG;YAC3B,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;YACtB,MAAM,YAAY,GAAG,CAAC,KAAkC;gBACtD,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACzC,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;aACxB,CAAC;YACF,IAAI,CAAC,2BAA2B,CAAC,IAAI,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;SACzD,CAAC;;;yBAtC4B,KAAK;;IAYnC,iBAAiB;QACf,KAAK,CAAC,kDAAkD,CAAC,CAAC;KAC3D;IAED,MAAM,iBAAiB;QACrB,KAAK,CAAC,kDAAkD,CAAC,CAAC;KAC3D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AO,CAA+E,EAAE,uBAAgD;gBACnK,MAAM,MAAM,GAAG,MAAM,uBAAuB,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC;gBAErE,MAAM,EAAE,YAAY,EAAE,GAAG,CAAC,CAAC,MAAM,CAAC;gBAClC,IAAI,YAAY,KAAK,CAAC,MAAM,IAAI,OAAO,IAAI,MAAM,CAAC,EAAE;oBAClD,YAAY,CAAC,MAAM,CAAC,CAAC;iBACtB;aACF;YACD,uBAAuB,EAAE,OAAO,KAA+C,EAAE,wBAAiD;gBAChI,KAAK,CAAC,4BAA4B,EAAE,yBAAyB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;aAC9E;SACF;QACD,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;qDAsBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["i18next"],"sources":["src/components/scheduler/nylas-cancelled-event-card/nylas-cancelled-event-card.scss?tag=nylas-cancelled-event-card&encapsulation=shadow","src/components/scheduler/nylas-cancelled-event-card/nylas-cancelled-event-card.tsx"],"sourcesContent":["@import '../../../common/styles/variables.scss';\n\n:host {\n display: block;\n @include default-css-variables;\n}\n\n.nylas-cancelled-event-card {\n height: inherit;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n align-items: center;\n font-family: var(--nylas-font-family);\n width: 400px;\n\n @media #{$mobile} {\n width: inherit;\n }\n\n background-color: var(--nylas-base-0);\n color: var(--nylas-base-800);\n border-radius: var(--nylas-border-radius-2x);\n padding: 1.5rem;\n position: relative;\n box-shadow:\n 0px 1px 4px rgba(0, 0, 0, 0.1),\n 0px 3px 6px rgba(0, 0, 0, 0.06);\n}\n\n.nylas-cancelled-event-card__title {\n font-size: 18px;\n font-weight: 600;\n line-height: 24px;\n color: var(--nylas-base-900);\n text-align: center;\n}\n\n.nylas-cancelled-event-description {\n font-size: 16px;\n font-weight: 500;\n color: var(--nylas-base-600);\n}\n\n.nylas-cancelled-event-card__calendar-icon {\n width: 3rem;\n height: 3rem;\n border-radius: 50%;\n position: absolute;\n top: -1.25rem;\n left: 50%;\n transform: translateX(-50%);\n background-color: var(--nylas-base-0);\n border: 1px solid var(--nylas-base-200);\n}\n\n.nylas-cancelled-event-card__cta {\n width: 100%;\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n margin-top: 1rem;\n}\n\ncalendar-cancel-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n}\n\nbutton-component {\n width: 100%;\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { Component, Event, EventEmitter, h, Host, Prop, State } from '@stencil/core';\nimport { NylasEvent, NylasSchedulerConnector, NylasSchedulerErrorResponse } from '../../..';\nimport { NylasScheduling } from '../nylas-scheduling/nylas-scheduling';\nimport { debug } from '@/utils/utils';\nimport { ConfigSettings } from '@/stores/scheduler-store';\nimport i18next from '@/utils/i18n';\n\n/**\n * The `nylas-cancelled-event-card` component is a UI component that displays the cancelled event card.\n *\n * @part ncec - The cancelled event card host.\n * @part ncec__icon - The calendar icon.\n * @part ncec__title - The title of the cancelled event card.\n * @part ncec__description - The description of the cancelled event card.\n * @part ncec__button-outline - The close button CTA.\n * @part ncec__card - The cancelled event card.\n */\n@Component({\n tag: 'nylas-cancelled-event-card',\n styleUrl: 'nylas-cancelled-event-card.scss',\n shadow: true,\n})\nexport class NylasCancelledEventCard {\n /**\n * @standalone\n * The config settings for the scheduler.\n */\n @Prop() readonly configSettings?: ConfigSettings;\n\n /**\n * The participant's name who booked the event / is logged in.\n */\n @Prop() readonly cancelledEventInfo!: Partial<NylasEvent>;\n\n /**\n * Closing state of the cancelled event card button.\n */\n @State() isClosing: boolean = false;\n\n /**\n * This event is fired when the close button is clicked on the cancelled event card.\n */\n @Event() readonly closeCancelEventCardClicked!: EventEmitter<{ errorHandler?: (error: NylasSchedulerErrorResponse) => void }>;\n\n /**\n * This event is fired when an error occurs.\n */\n @Event() readonly cancelledEventCardError!: EventEmitter<NylasSchedulerErrorResponse>;\n\n connectedCallback() {\n debug(`[nylas-cancelled-event-card] Component connected`);\n }\n\n async componentWillLoad() {\n debug(`[nylas-cancelled-event-card] Component will load`);\n }\n\n async componentDidLoad() {\n debug(`[nylas-cancelled-event-card] Component did load`);\n if (!this.cancelledEventInfo) {\n console.warn(`[nylas-cancelled-event-card] No cancelled event info provided, \"cancelledEventInfo\" prop is required.`);\n }\n }\n\n disconnectedCallback() {\n debug(`[nylas-cancelled-event-card] Component disconnected`);\n }\n\n private handleCloseClicked = () => {\n this.isClosing = true;\n const errorHandler = (error: NylasSchedulerErrorResponse) => {\n this.cancelledEventCardError.emit(error);\n this.isClosing = false;\n };\n this.closeCancelEventCardClicked.emit({ errorHandler });\n };\n\n @RegisterComponent<NylasCancelledEventCard, NylasSchedulerConnector, Exclude<NylasScheduling['stores'], undefined>>({\n name: 'nylas-cancelled-event-card',\n stateToProps: new Map([['scheduler.configSettings', 'configSettings']]),\n eventToProps: {\n closeCancelEventCardClicked: async (_: CustomEvent<{ errorHandler?: (error: NylasSchedulerErrorResponse) => void }>, nylasschedulerconnector: NylasSchedulerConnector) => {\n const result = await nylasschedulerconnector.scheduler.resetCancel();\n\n const { errorHandler } = _.detail;\n if (errorHandler && (!result || 'error' in result)) {\n errorHandler(result);\n }\n },\n cancelledEventCardError: async (event: CustomEvent<NylasSchedulerErrorResponse>, _nylasschedulerconnector: NylasSchedulerConnector) => {\n debug('nylas-cancelled-event-card', 'cancelledEventCardError', event.detail);\n },\n },\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host part=\"ncec\">\n <div class=\"nylas-cancelled-event-card\" part=\"ncec__card\">\n <div class=\"nylas-cancelled-event-card__calendar-icon\" part=\"ncec__icon\">\n <calendar-cancel-icon />\n </div>\n <h3 class=\"nylas-cancelled-event-card__title\" part=\"ncec__title\">\n {i18next.t('bookingCancelledTitle')}!\n </h3>\n <div class=\"nylas-cancelled-event-card__description\" part=\"ncec__description\">\n {i18next.t('bookingCancelledMessage')} {this.configSettings?.organizer?.name || 'the participants'}.\n </div>\n <div class=\"nylas-cancelled-event-card__cta\">\n <button-component variant=\"basic\" disabled={this.isClosing} part=\"ncec__button-outline\" onClick={this.handleCloseClicked}>\n {this.isClosing ? `${i18next.t('closingButton')}...` : `${i18next.t('closeButton')}`}\n </button-component>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"nylas-cancelled-event-card2.js","mappings":";;;;;;;AAAA,MAAM,0BAA0B,GAAG,wpCAAwpC;;;;;;;;;;;;;;;;MCwB9qC,uBAAuB;;;;;;;QAmE1B,uBAAkB,GAAG;YAC3B,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;YACtB,MAAM,YAAY,GAAG,CAAC,KAAkC;gBACtD,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACzC,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;aACxB,CAAC;YACF,IAAI,CAAC,2BAA2B,CAAC,IAAI,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;SACzD,CAAC;;;;yBA/C4B,KAAK;;IAYnC,iBAAiB;QACf,KAAK,CAAC,kDAAkD,CAAC,CAAC;KAC3D;IAED,MAAM,iBAAiB;QACrB,KAAK,CAAC,kDAAkD,CAAC,CAAC;KAC3D;IAED,MAAM,gBAAgB;QACpB,KAAK,CAAC,iDAAiD,CAAC,CAAC;QACzD,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE;YAC5B,OAAO,CAAC,IAAI,CAAC,uGAAuG,CAAC,CAAC;SACvH;QACD,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;KACzC;IAED,oBAAoB;QAClB,KAAK,CAAC,qDAAqD,CAAC,CAAC;KAC9D;IAED,gBAAgB,CAAC,WAAyB;QACxC,IAAI,WAAW,EAAE;YACf,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE;gBACtD,IAAI,CAAC,IAAI,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AAG,CAAC,CAAC,MAAM,CAAC;gBAClC,IAAI,YAAY,KAAK,CAAC,MAAM,IAAI,OAAO,IAAI,MAAM,CAAC,EAAE;oBAClD,YAAY,CAAC,MAAM,CAAC,CAAC;iBACtB;aACF;YACD,uBAAuB,EAAE,OAAO,KAA+C,EAAE,wBAAiD;gBAChI,KAAK,CAAC,4BAA4B,EAAE,yBAAyB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;aAC9E;SACF;QACD,gBAAgB,EAAE,IAAI,GAAG,CAAC,CAAC,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC,CAAC;QAC3D,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;qDAsBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["i18next"],"sources":["src/components/scheduler/nylas-cancelled-event-card/nylas-cancelled-event-card.scss?tag=nylas-cancelled-event-card&encapsulation=shadow","src/components/scheduler/nylas-cancelled-event-card/nylas-cancelled-event-card.tsx"],"sourcesContent":["@import '../../../common/styles/variables.scss';\n\n:host {\n display: block;\n}\n\n.nylas-cancelled-event-card {\n height: inherit;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n align-items: center;\n font-family: var(--nylas-font-family);\n width: 400px;\n\n @media #{$mobile} {\n width: inherit;\n }\n\n background-color: var(--nylas-base-0);\n color: var(--nylas-base-800);\n border-radius: var(--nylas-border-radius-2x);\n padding: 1.5rem;\n position: relative;\n box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.1),\n 0px 3px 6px rgba(0, 0, 0, 0.06);\n}\n\n.nylas-cancelled-event-card__title {\n font-size: 18px;\n font-weight: 600;\n line-height: 24px;\n color: var(--nylas-base-900);\n text-align: center;\n}\n\n.nylas-cancelled-event-description {\n font-size: 16px;\n font-weight: 500;\n color: var(--nylas-base-600);\n}\n\n.nylas-cancelled-event-card__calendar-icon {\n width: 3rem;\n height: 3rem;\n border-radius: 50%;\n position: absolute;\n top: -1.25rem;\n left: 50%;\n transform: translateX(-50%);\n background-color: var(--nylas-base-0);\n border: 1px solid var(--nylas-base-200);\n}\n\n.nylas-cancelled-event-card__cta {\n width: 100%;\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n margin-top: 1rem;\n}\n\ncalendar-cancel-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n}\n\nbutton-component {\n width: 100%;\n}","import { RegisterComponent } from '@/common/register-component';\nimport { Component, Element, Event, EventEmitter, h, Host, Prop, State } from '@stencil/core';\nimport { NylasEvent, NylasSchedulerConnector, NylasSchedulerErrorResponse } from '../../..';\nimport { NylasScheduling } from '../nylas-scheduling/nylas-scheduling';\nimport { debug } from '@/utils/utils';\nimport { ConfigSettings } from '@/stores/scheduler-store';\nimport i18next from '@/utils/i18n';\nimport { ThemeConfig } from '@nylas/core';\n\n/**\n * The `nylas-cancelled-event-card` component is a UI component that displays the cancelled event card.\n *\n * @part ncec - The cancelled event card host.\n * @part ncec__icon - The calendar icon.\n * @part ncec__title - The title of the cancelled event card.\n * @part ncec__description - The description of the cancelled event card.\n * @part ncec__button-outline - The close button CTA.\n * @part ncec__card - The cancelled event card.\n */\n@Component({\n tag: 'nylas-cancelled-event-card',\n styleUrl: 'nylas-cancelled-event-card.scss',\n shadow: true,\n})\nexport class NylasCancelledEventCard {\n /**\n * The host element.\n * Used to manage the host element of the provider.\n */\n @Element() private host!: HTMLNylasCancelledEventCardElement;\n\n /**\n * @standalone\n * The config settings for the scheduler.\n */\n @Prop() readonly configSettings?: ConfigSettings;\n\n /**\n * @standalone\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: any;\n\n /**\n * The participant's name who booked the event / is logged in.\n */\n @Prop() readonly cancelledEventInfo!: Partial<NylasEvent>;\n\n /**\n * Closing state of the cancelled event card button.\n */\n @State() isClosing: boolean = false;\n\n /**\n * This event is fired when the close button is clicked on the cancelled event card.\n */\n @Event() readonly closeCancelEventCardClicked!: EventEmitter<{ errorHandler?: (error: NylasSchedulerErrorResponse) => void }>;\n\n /**\n * This event is fired when an error occurs.\n */\n @Event() readonly cancelledEventCardError!: EventEmitter<NylasSchedulerErrorResponse>;\n\n connectedCallback() {\n debug(`[nylas-cancelled-event-card] Component connected`);\n }\n\n async componentWillLoad() {\n debug(`[nylas-cancelled-event-card] Component will load`);\n }\n\n async componentDidLoad() {\n debug(`[nylas-cancelled-event-card] Component did load`);\n if (!this.cancelledEventInfo) {\n console.warn(`[nylas-cancelled-event-card] No cancelled event info provided, \"cancelledEventInfo\" prop is required.`);\n }\n this.applyThemeConfig(this.themeConfig);\n }\n\n disconnectedCallback() {\n debug(`[nylas-cancelled-event-card] Component disconnected`);\n }\n\n applyThemeConfig(themeConfig?: ThemeConfig) {\n if (themeConfig) {\n for (const [key, value] of Object.entries(themeConfig)) {\n this.host.style.setProperty(`${key}`, value);\n }\n }\n }\n\n private handleCloseClicked = () => {\n this.isClosing = true;\n const errorHandler = (error: NylasSchedulerErrorResponse) => {\n this.cancelledEventCardError.emit(error);\n this.isClosing = false;\n };\n this.closeCancelEventCardClicked.emit({ errorHandler });\n };\n\n @RegisterComponent<NylasCancelledEventCard, NylasSchedulerConnector, Exclude<NylasScheduling['stores'], undefined>>({\n name: 'nylas-cancelled-event-card',\n stateToProps: new Map([['scheduler.configSettings', 'configSettings']]),\n eventToProps: {\n closeCancelEventCardClicked: async (_: CustomEvent<{ errorHandler?: (error: NylasSchedulerErrorResponse) => void }>, nylasschedulerconnector: NylasSchedulerConnector) => {\n const result = await nylasschedulerconnector.scheduler.resetCancel();\n\n const { errorHandler } = _.detail;\n if (errorHandler && (!result || 'error' in result)) {\n errorHandler(result);\n }\n },\n cancelledEventCardError: async (event: CustomEvent<NylasSchedulerErrorResponse>, _nylasschedulerconnector: NylasSchedulerConnector) => {\n debug('nylas-cancelled-event-card', 'cancelledEventCardError', event.detail);\n },\n },\n localPropsToProp: new Map([['themeConfig', 'themeConfig']]),\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host part=\"ncec\">\n <div class=\"nylas-cancelled-event-card\" part=\"ncec__card\">\n <div class=\"nylas-cancelled-event-card__calendar-icon\" part=\"ncec__icon\">\n <calendar-cancel-icon />\n </div>\n <h3 class=\"nylas-cancelled-event-card__title\" part=\"ncec__title\">\n {i18next.t('bookingCancelledTitle')}!\n </h3>\n <div class=\"nylas-cancelled-event-card__description\" part=\"ncec__description\">\n {i18next.t('bookingCancelledMessage')} {this.configSettings?.organizer?.name || 'the participants'}.\n </div>\n <div class=\"nylas-cancelled-event-card__cta\">\n <button-component variant=\"basic\" disabled={this.isClosing} part=\"ncec__button-outline\" onClick={this.handleCloseClicked}>\n {this.isClosing ? `${i18next.t('closingButton')}...` : `${i18next.t('closeButton')}`}\n </button-component>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -5,7 +5,7 @@ import { d as defineCustomElement$3 } from './button-component2.js';
5
5
  import { d as defineCustomElement$2 } from './calendar-cancel.js';
6
6
  import { d as defineCustomElement$1 } from './loading.js';
7
7
 
8
- const nylasConfirmedEventCardCss = ":host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:\"Inter\", sans-serif}.nylas-confirmed-event-card{height:inherit;display:flex;flex-direction:column;justify-content:space-between;align-items:center;font-family:var(--nylas-font-family);width:400px;background-color:var(--nylas-base-0);color:var(--nylas-base-800);border-radius:var(--nylas-border-radius-2x);padding:1.5rem;position:relative;box-shadow:0px 1px 4px rgba(0, 0, 0, 0.1), 0px 3px 6px rgba(0, 0, 0, 0.06)}@media screen and (max-width: 768px){.nylas-confirmed-event-card{width:inherit}}.nylas-confirmed-event-card__title{font-size:18px;font-weight:600;line-height:24px;color:var(--nylas-base-900);text-align:center}.nylas-confirmed-event-description{font-size:16px;font-weight:500;color:var(--nylas-base-600)}.nylas-confirmed-event-card__calendar-icon{width:3rem;height:3rem;border-radius:50%;position:absolute;top:-1.25rem;left:50%;transform:translateX(-50%);background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200)}.nylas-confirmed-event-card__cta{width:100%;display:flex;flex-direction:row;align-items:flex-start;margin-top:1rem}calendar-cancel-icon{display:flex;align-items:center;justify-content:center;height:100%}button-component{width:100%}";
8
+ const nylasConfirmedEventCardCss = ":host{display:block}.nylas-confirmed-event-card{height:inherit;display:flex;flex-direction:column;justify-content:space-between;align-items:center;font-family:var(--nylas-font-family);width:400px;background-color:var(--nylas-base-0);color:var(--nylas-base-800);border-radius:var(--nylas-border-radius-2x);padding:1.5rem;position:relative;box-shadow:0px 1px 4px rgba(0, 0, 0, 0.1), 0px 3px 6px rgba(0, 0, 0, 0.06)}@media screen and (max-width: 768px){.nylas-confirmed-event-card{width:inherit}}.nylas-confirmed-event-card__title{font-size:18px;font-weight:600;line-height:24px;color:var(--nylas-base-900);text-align:center}.nylas-confirmed-event-description{font-size:16px;font-weight:500;color:var(--nylas-base-600)}.nylas-confirmed-event-card__calendar-icon{width:3rem;height:3rem;border-radius:50%;position:absolute;top:-1.25rem;left:50%;transform:translateX(-50%);background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200)}.nylas-confirmed-event-card__cta{width:100%;display:flex;flex-direction:row;align-items:flex-start;margin-top:1rem}calendar-cancel-icon{display:flex;align-items:center;justify-content:center;height:100%}button-component{width:100%}";
9
9
 
10
10
  var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
11
11
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -37,6 +37,7 @@ const NylasConfirmedEventCard = proxyCustomElement(class NylasConfirmedEventCard
37
37
  this.closeConfirmEventCardClicked.emit({ errorHandler });
38
38
  };
39
39
  this.configSettings = undefined;
40
+ this.themeConfig = undefined;
40
41
  this.confirmedEventInfo = undefined;
41
42
  this.isClosing = false;
42
43
  }
@@ -51,16 +52,26 @@ const NylasConfirmedEventCard = proxyCustomElement(class NylasConfirmedEventCard
51
52
  if (!this.confirmedEventInfo) {
52
53
  console.warn(`[nylas-confirmed-event-card] No confirmed event info provided, "confirmedEventInfo" prop is required.`);
53
54
  }
55
+ this.applyThemeConfig(this.themeConfig);
54
56
  }
55
57
  disconnectedCallback() {
56
58
  debug(`[nylas-confirmed-event-card] Component disconnected`);
57
59
  }
60
+ applyThemeConfig(themeConfig) {
61
+ if (themeConfig) {
62
+ for (const [key, value] of Object.entries(themeConfig)) {
63
+ this.host.style.setProperty(`${key}`, value);
64
+ }
65
+ }
66
+ }
58
67
  render() {
59
- return (h(Host, { key: 'a5fbf79c6b7f27046b599c16d231226ff9c88f84', part: "ncec" }, h("div", { key: '06c6f5fa4e75d9ce01dc9145259bf4bfddf33624', class: "nylas-confirmed-event-card", part: "ncec__card" }, h("div", { key: '11a58aa7dba6da706cd35791c58442b022f97939', class: "nylas-confirmed-event-card__calendar-icon", part: "ncec__icon" }, h("calendar-cancel-icon", { key: '752da0991cdcfa12dc9c7dc1020ea9388f11c30e' })), h("h3", { key: '238934bc1f8bcb137e6e33eb66afb5bee01749b7', class: "nylas-confirmed-event-card__title", part: "ncec__title" }, instance.t('confirmedEventCardTitle'), "!"), h("div", { key: '3a3d8ad8302ad54b528c37f0eb25d12590bb4f0d', class: "nylas-confirmed-event-card__description", part: "ncec__description" }, instance.t('confirmedEventCardDescription'), " ", this.configSettings?.organizer?.name || 'the participants', "."), h("div", { key: '49c69f2f9c01e4e775cb8caadbca213424e0a952', class: "nylas-confirmed-event-card__cta" }, h("button-component", { key: 'e6e75c57f294d688a108df09ffc9daf849ef6319', variant: "basic", disabled: this.isClosing, part: "ncec__button-outline", onClick: this.handleCloseClicked }, this.isClosing ? `${instance.t('closingButton')}...` : `${instance.t('closeButton')}`)))));
68
+ return (h(Host, { key: '089de1c1ba1b2319674b97aad4946fb8306ab4fe', part: "ncec" }, h("div", { key: '83c9b3f7904b7b74d38202c7d62891813754be93', class: "nylas-confirmed-event-card", part: "ncec__card" }, h("div", { key: 'e6ebbc07f8ea697f4e1f794bb8ddddc5166db33d', class: "nylas-confirmed-event-card__calendar-icon", part: "ncec__icon" }, h("calendar-cancel-icon", { key: 'eb0eb353b63bc5a8b55644a17f16c8566f3a7b36' })), h("h3", { key: 'c05937028fd84a55b3b0b1de4cd36fb0b0c6b563', class: "nylas-confirmed-event-card__title", part: "ncec__title" }, instance.t('confirmedEventCardTitle'), "!"), h("div", { key: 'e9ca9f67f46785d40e769ff96695001d56386dad', class: "nylas-confirmed-event-card__description", part: "ncec__description" }, instance.t('confirmedEventCardDescription'), " ", this.configSettings?.organizer?.name || 'the participants', "."), h("div", { key: 'bea8adea56d3dcdb2ce578ad25f08bc562b67ede', class: "nylas-confirmed-event-card__cta" }, h("button-component", { key: '6bed94150369d92e129fe62c4b6c292e37e26a34', variant: "basic", disabled: this.isClosing, part: "ncec__button-outline", onClick: this.handleCloseClicked }, this.isClosing ? `${instance.t('closingButton')}...` : `${instance.t('closeButton')}`)))));
60
69
  }
70
+ get host() { return this; }
61
71
  static get style() { return nylasConfirmedEventCardCss; }
62
72
  }, [1, "nylas-confirmed-event-card", {
63
73
  "configSettings": [16],
74
+ "themeConfig": [8, "theme-config"],
64
75
  "confirmedEventInfo": [16],
65
76
  "isClosing": [32]
66
77
  }]);
@@ -77,6 +88,7 @@ __decorate([
77
88
  }
78
89
  },
79
90
  },
91
+ localPropsToProp: new Map([['themeConfig', 'themeConfig']]),
80
92
  fireRegisterEvent: true,
81
93
  }),
82
94
  __metadata("design:type", Function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G,IAAI,CAAC,cAAc,EAAE,SAAS,EAAE,IAAI,IAAI,kBAAkB,MACpG,EACN,4DAAK,KAAK,EAAC,iCAAiC,IAC1C,yEAAkB,OAAO,EAAC,OAAO,EAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,EAAC,sBAAsB,EAAC,OAAO,EAAE,IAAI,CAAC,kBAAkB,IACrH,IAAI,CAAC,SAAS,GAAG,GAAGA,QAAO,CAAC,CAAC,CAAC,eAAe,CAAC,KAAK,GAAG,GAAGA,QAAO,CAAC,CAAC,CAAC,aAAa,CAAC,EAAE,CACnE,CACf,CACF,CACD,EACP;KACH;;;;;;;AArBD;IAfC,iBAAiB,CAAkG;QAClH,IAAI,EAAE,4BAA4B;QAClC,YAAY,EAAE,IAAI,GAAG,CAAC,CAAC,CAAC,0BAA0B,EAAE,gBAAgB,CAAC,CAAC,CAAC;QACvE,YAAY,EAAE;YACZ,4BAA4B,EAAE,OAAO,CAA+E,EAAE,uBAAgD;gBACpK,MAAM,MAAM,GAAG,MAAM,uBAAuB,CAAC,SAAS,CAAC,YAAY,EAAE,CAAC;gBAEtE,MAAM,EAAE,YAAY,EAAE,GAAG,CAAC,CAAC,MAAM,CAAC;gBAClC,IAAI,YAAY,KAAK,CAAC,MAAM,IAAI,OAAO,IAAI,MAAM,CAAC,EAAE;oBAClD,YAAY,CAAC,MAAM,CAAC,CAAC;iBACtB;aACF;SACF;QACD,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;qDAsBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["i18next"],"sources":["src/components/scheduler/nylas-confirmed-event-card/nylas-confirmed-event-card.scss?tag=nylas-confirmed-event-card&encapsulation=shadow","src/components/scheduler/nylas-confirmed-event-card/nylas-confirmed-event-card.tsx"],"sourcesContent":["@import '../../../common/styles/variables.scss';\n\n:host {\n display: block;\n @include default-css-variables;\n}\n\n.nylas-confirmed-event-card {\n height: inherit;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n align-items: center;\n font-family: var(--nylas-font-family);\n width: 400px;\n\n @media #{$mobile} {\n width: inherit;\n }\n\n background-color: var(--nylas-base-0);\n color: var(--nylas-base-800);\n border-radius: var(--nylas-border-radius-2x);\n padding: 1.5rem;\n position: relative;\n box-shadow:\n 0px 1px 4px rgba(0, 0, 0, 0.1),\n 0px 3px 6px rgba(0, 0, 0, 0.06);\n}\n\n.nylas-confirmed-event-card__title {\n font-size: 18px;\n font-weight: 600;\n line-height: 24px;\n color: var(--nylas-base-900);\n text-align: center;\n}\n\n.nylas-confirmed-event-description {\n font-size: 16px;\n font-weight: 500;\n color: var(--nylas-base-600);\n}\n\n.nylas-confirmed-event-card__calendar-icon {\n width: 3rem;\n height: 3rem;\n border-radius: 50%;\n position: absolute;\n top: -1.25rem;\n left: 50%;\n transform: translateX(-50%);\n background-color: var(--nylas-base-0);\n border: 1px solid var(--nylas-base-200);\n}\n\n.nylas-confirmed-event-card__cta {\n width: 100%;\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n margin-top: 1rem;\n}\n\ncalendar-cancel-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n}\n\nbutton-component {\n width: 100%;\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { Component, Event, EventEmitter, h, Host, Prop, State } from '@stencil/core';\nimport { NylasEvent, NylasSchedulerConnector, NylasSchedulerErrorResponse } from '../../..';\nimport { NylasScheduling } from '../nylas-scheduling/nylas-scheduling';\nimport { debug } from '@/utils/utils';\nimport { ConfigSettings } from '@/stores/scheduler-store';\nimport i18next from '@/utils/i18n';\n\n/**\n * The `nylas-confirmed-event-card` component is a UI component that displays the confirmed event card.\n *\n * @part ncec - The confirmed event card host.\n * @part ncec__icon - The calendar icon.\n * @part ncec__title - The title of the confirmed event card.\n * @part ncec__description - The description of the confirmed event card.\n * @part ncec__button-outline - The close button CTA.\n * @part ncec__card - The confirmed event card.\n */\n@Component({\n tag: 'nylas-confirmed-event-card',\n styleUrl: 'nylas-confirmed-event-card.scss',\n shadow: true,\n})\nexport class NylasConfirmedEventCard {\n /**\n * @standalone\n * The config settings for the scheduler.\n */\n @Prop() readonly configSettings?: ConfigSettings;\n\n /**\n * The participant's name who booked the event / is logged in.\n */\n @Prop() readonly confirmedEventInfo!: Partial<NylasEvent>;\n\n /**\n * Closing state of the confirmed event card button.\n */\n @State() isClosing: boolean = false;\n\n /**\n * This event is fired when the close button is clicked on the confirmed event card.\n */\n @Event() readonly closeConfirmEventCardClicked!: EventEmitter<{ errorHandler?: (error: NylasSchedulerErrorResponse) => void }>;\n\n /**\n * This event is fired when an error occurs.\n */\n @Event() readonly confirmedEventCardError!: EventEmitter<NylasSchedulerErrorResponse>;\n\n connectedCallback() {\n debug(`[nylas-confirmed-event-card] Component connected`);\n }\n\n async componentWillLoad() {\n debug(`[nylas-confirmed-event-card] Component will load`);\n }\n\n async componentDidLoad() {\n debug(`[nylas-confirmed-event-card] Component did load`);\n if (!this.confirmedEventInfo) {\n console.warn(`[nylas-confirmed-event-card] No confirmed event info provided, \"confirmedEventInfo\" prop is required.`);\n }\n }\n\n disconnectedCallback() {\n debug(`[nylas-confirmed-event-card] Component disconnected`);\n }\n\n private handleCloseClicked = () => {\n this.isClosing = true;\n const errorHandler = (error: NylasSchedulerErrorResponse) => {\n this.confirmedEventCardError.emit(error);\n this.isClosing = false;\n };\n this.closeConfirmEventCardClicked.emit({ errorHandler });\n };\n\n @RegisterComponent<NylasConfirmedEventCard, NylasSchedulerConnector, Exclude<NylasScheduling['stores'], undefined>>({\n name: 'nylas-confirmed-event-card',\n stateToProps: new Map([['scheduler.configSettings', 'configSettings']]),\n eventToProps: {\n closeConfirmEventCardClicked: async (_: CustomEvent<{ errorHandler?: (error: NylasSchedulerErrorResponse) => void }>, nylasschedulerconnector: NylasSchedulerConnector) => {\n const result = await nylasschedulerconnector.scheduler.resetConfirm();\n\n const { errorHandler } = _.detail;\n if (errorHandler && (!result || 'error' in result)) {\n errorHandler(result);\n }\n },\n },\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host part=\"ncec\">\n <div class=\"nylas-confirmed-event-card\" part=\"ncec__card\">\n <div class=\"nylas-confirmed-event-card__calendar-icon\" part=\"ncec__icon\">\n <calendar-cancel-icon />\n </div>\n <h3 class=\"nylas-confirmed-event-card__title\" part=\"ncec__title\">\n {i18next.t('confirmedEventCardTitle')}!\n </h3>\n <div class=\"nylas-confirmed-event-card__description\" part=\"ncec__description\">\n {i18next.t('confirmedEventCardDescription')} {this.configSettings?.organizer?.name || 'the participants'}.\n </div>\n <div class=\"nylas-confirmed-event-card__cta\">\n <button-component variant=\"basic\" disabled={this.isClosing} part=\"ncec__button-outline\" onClick={this.handleCloseClicked}>\n {this.isClosing ? `${i18next.t('closingButton')}...` : `${i18next.t('closeButton')}`}\n </button-component>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"nylas-confirmed-event-card2.js","mappings":";;;;;;;AAAA,MAAM,0BAA0B,GAAG,wpCAAwpC;;;;;;;;;;;;;;;;MCwB9qC,uBAAuB;;;;;;;QAmE1B,uBAAkB,GAAG;YAC3B,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;YACtB,MAAM,YAAY,GAAG,CAAC,KAAkC;gBACtD,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACzC,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;aACxB,CAAC;YACF,IAAI,CAAC,4BAA4B,CAAC,IAAI,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;SAC1D,CAAC;;;;yBA/C4B,KAAK;;IAYnC,iBAAiB;QACf,KAAK,CAAC,kDAAkD,CAAC,CAAC;KAC3D;IAED,MAAM,iBAAiB;QACrB,KAAK,CAAC,kDAAkD,CAAC,CAAC;KAC3D;IAED,MAAM,gBAAgB;QACpB,KAAK,CAAC,iDAAiD,CAAC,CAAC;QACzD,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE;YAC5B,OA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,CACD,EACP;KACH;;;;;;;;;AArBD;IAhBC,iBAAiB,CAAkG;QAClH,IAAI,EAAE,4BAA4B;QAClC,YAAY,EAAE,IAAI,GAAG,CAAC,CAAC,CAAC,0BAA0B,EAAE,gBAAgB,CAAC,CAAC,CAAC;QACvE,YAAY,EAAE;YACZ,4BAA4B,EAAE,OAAO,CAA+E,EAAE,uBAAgD;gBACpK,MAAM,MAAM,GAAG,MAAM,uBAAuB,CAAC,SAAS,CAAC,YAAY,EAAE,CAAC;gBAEtE,MAAM,EAAE,YAAY,EAAE,GAAG,CAAC,CAAC,MAAM,CAAC;gBAClC,IAAI,YAAY,KAAK,CAAC,MAAM,IAAI,OAAO,IAAI,MAAM,CAAC,EAAE;oBAClD,YAAY,CAAC,MAAM,CAAC,CAAC;iBACtB;aACF;SACF;QACD,gBAAgB,EAAE,IAAI,GAAG,CAAC,CAAC,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC,CAAC;QAC3D,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;qDAsBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["i18next"],"sources":["src/components/scheduler/nylas-confirmed-event-card/nylas-confirmed-event-card.scss?tag=nylas-confirmed-event-card&encapsulation=shadow","src/components/scheduler/nylas-confirmed-event-card/nylas-confirmed-event-card.tsx"],"sourcesContent":["@import '../../../common/styles/variables.scss';\n\n:host {\n display: block;\n}\n\n.nylas-confirmed-event-card {\n height: inherit;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n align-items: center;\n font-family: var(--nylas-font-family);\n width: 400px;\n\n @media #{$mobile} {\n width: inherit;\n }\n\n background-color: var(--nylas-base-0);\n color: var(--nylas-base-800);\n border-radius: var(--nylas-border-radius-2x);\n padding: 1.5rem;\n position: relative;\n box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.1),\n 0px 3px 6px rgba(0, 0, 0, 0.06);\n}\n\n.nylas-confirmed-event-card__title {\n font-size: 18px;\n font-weight: 600;\n line-height: 24px;\n color: var(--nylas-base-900);\n text-align: center;\n}\n\n.nylas-confirmed-event-description {\n font-size: 16px;\n font-weight: 500;\n color: var(--nylas-base-600);\n}\n\n.nylas-confirmed-event-card__calendar-icon {\n width: 3rem;\n height: 3rem;\n border-radius: 50%;\n position: absolute;\n top: -1.25rem;\n left: 50%;\n transform: translateX(-50%);\n background-color: var(--nylas-base-0);\n border: 1px solid var(--nylas-base-200);\n}\n\n.nylas-confirmed-event-card__cta {\n width: 100%;\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n margin-top: 1rem;\n}\n\ncalendar-cancel-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n}\n\nbutton-component {\n width: 100%;\n}","import { RegisterComponent } from '@/common/register-component';\nimport { Component, Element, Event, EventEmitter, h, Host, Prop, State } from '@stencil/core';\nimport { NylasEvent, NylasSchedulerConnector, NylasSchedulerErrorResponse } from '../../..';\nimport { NylasScheduling } from '../nylas-scheduling/nylas-scheduling';\nimport { debug } from '@/utils/utils';\nimport { ConfigSettings } from '@/stores/scheduler-store';\nimport i18next from '@/utils/i18n';\nimport { ThemeConfig } from '@nylas/core';\n\n/**\n * The `nylas-confirmed-event-card` component is a UI component that displays the confirmed event card.\n *\n * @part ncec - The confirmed event card host.\n * @part ncec__icon - The calendar icon.\n * @part ncec__title - The title of the confirmed event card.\n * @part ncec__description - The description of the confirmed event card.\n * @part ncec__button-outline - The close button CTA.\n * @part ncec__card - The confirmed event card.\n */\n@Component({\n tag: 'nylas-confirmed-event-card',\n styleUrl: 'nylas-confirmed-event-card.scss',\n shadow: true,\n})\nexport class NylasConfirmedEventCard {\n /**\n * The host element.\n * Used to manage the host element of the provider.\n */\n @Element() private host!: HTMLNylasConfirmedEventCardElement;\n\n /**\n * @standalone\n * The config settings for the scheduler.\n */\n @Prop() readonly configSettings?: ConfigSettings;\n\n /**\n * @standalone\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: any;\n\n /**\n * The participant's name who booked the event / is logged in.\n */\n @Prop() readonly confirmedEventInfo!: Partial<NylasEvent>;\n\n /**\n * Closing state of the confirmed event card button.\n */\n @State() isClosing: boolean = false;\n\n /**\n * This event is fired when the close button is clicked on the confirmed event card.\n */\n @Event() readonly closeConfirmEventCardClicked!: EventEmitter<{ errorHandler?: (error: NylasSchedulerErrorResponse) => void }>;\n\n /**\n * This event is fired when an error occurs.\n */\n @Event() readonly confirmedEventCardError!: EventEmitter<NylasSchedulerErrorResponse>;\n\n connectedCallback() {\n debug(`[nylas-confirmed-event-card] Component connected`);\n }\n\n async componentWillLoad() {\n debug(`[nylas-confirmed-event-card] Component will load`);\n }\n\n async componentDidLoad() {\n debug(`[nylas-confirmed-event-card] Component did load`);\n if (!this.confirmedEventInfo) {\n console.warn(`[nylas-confirmed-event-card] No confirmed event info provided, \"confirmedEventInfo\" prop is required.`);\n }\n this.applyThemeConfig(this.themeConfig);\n }\n\n disconnectedCallback() {\n debug(`[nylas-confirmed-event-card] Component disconnected`);\n }\n\n applyThemeConfig(themeConfig?: ThemeConfig) {\n if (themeConfig) {\n for (const [key, value] of Object.entries(themeConfig)) {\n this.host.style.setProperty(`${key}`, value);\n }\n }\n }\n\n private handleCloseClicked = () => {\n this.isClosing = true;\n const errorHandler = (error: NylasSchedulerErrorResponse) => {\n this.confirmedEventCardError.emit(error);\n this.isClosing = false;\n };\n this.closeConfirmEventCardClicked.emit({ errorHandler });\n };\n\n @RegisterComponent<NylasConfirmedEventCard, NylasSchedulerConnector, Exclude<NylasScheduling['stores'], undefined>>({\n name: 'nylas-confirmed-event-card',\n stateToProps: new Map([['scheduler.configSettings', 'configSettings']]),\n eventToProps: {\n closeConfirmEventCardClicked: async (_: CustomEvent<{ errorHandler?: (error: NylasSchedulerErrorResponse) => void }>, nylasschedulerconnector: NylasSchedulerConnector) => {\n const result = await nylasschedulerconnector.scheduler.resetConfirm();\n\n const { errorHandler } = _.detail;\n if (errorHandler && (!result || 'error' in result)) {\n errorHandler(result);\n }\n },\n },\n localPropsToProp: new Map([['themeConfig', 'themeConfig']]),\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host part=\"ncec\">\n <div class=\"nylas-confirmed-event-card\" part=\"ncec__card\">\n <div class=\"nylas-confirmed-event-card__calendar-icon\" part=\"ncec__icon\">\n <calendar-cancel-icon />\n </div>\n <h3 class=\"nylas-confirmed-event-card__title\" part=\"ncec__title\">\n {i18next.t('confirmedEventCardTitle')}!\n </h3>\n <div class=\"nylas-confirmed-event-card__description\" part=\"ncec__description\">\n {i18next.t('confirmedEventCardDescription')} {this.configSettings?.organizer?.name || 'the participants'}.\n </div>\n <div class=\"nylas-confirmed-event-card__cta\">\n <button-component variant=\"basic\" disabled={this.isClosing} part=\"ncec__button-outline\" onClick={this.handleCloseClicked}>\n {this.isClosing ? `${i18next.t('closingButton')}...` : `${i18next.t('closeButton')}`}\n </button-component>\n </div>\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 { u as addDaysToCurrentDate, n as instance, w as getLastDayOfMonth, x as getFirstDayOfMonth, y as isSameDay, z as convertMinutesToHoursAndMinutes, A as translateMonth, B as isSameMonth, a as debug } from './utils.js';
3
+ import { u as addDaysToCurrentDate, n as instance, a as debug, w as getLastDayOfMonth, x as getFirstDayOfMonth, y as isSameDay, z as convertMinutesToHoursAndMinutes, A as translateMonth, B as isSameMonth } from './utils.js';
4
4
  import { d as defineCustomElement$3 } from './chevron.js';
5
5
  import { d as defineCustomElement$2 } from './clock.js';
6
6
  import { d as defineCustomElement$1 } from './person.js';
@@ -1741,7 +1741,7 @@ function ticker(year, month, week, day, hour, minute) {
1741
1741
  const [utcTicks, utcTickInterval] = ticker(utcYear, utcMonth, utcSunday, unixDay, utcHour, utcMinute);
1742
1742
  const [timeTicks, timeTickInterval] = ticker(timeYear, timeMonth, timeSunday, timeDay, timeHour, timeMinute);
1743
1743
 
1744
- const nylasDatePickerCss = ":host{display:block;min-height:444px;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:\"Inter\", sans-serif}@media screen and (max-width: 768px){:host{min-height:auto}}.nylas-date-picker{display:flex;gap:1rem;flex-direction:column}.header{margin:0 0.5rem;height:48px}.header h2{font-size:1.3125rem;font-weight:400;line-height:1rem;color:var(--nylas-base-800)}.header h2 strong{font-weight:600}.title{margin:0 -1.25rem;display:flex;flex-direction:column;padding:0 1.5rem;gap:0.5rem;border-bottom:1px solid var(--nylas-base-200);font-family:var(--nylas-font-family)}.title h1{margin-bottom:0;font-size:18px;line-height:20px;font-weight:600;display:flex;gap:0.5rem;align-items:center}.title p{margin-top:0;font-size:16px;display:flex;gap:0.5rem;align-items:center}@keyframes pulsate{0%{background-color:var(--nylas-base-50)}50%{background-color:var(--nylas-base-100)}100%{background-color:var(--nylas-base-50)}}.dates{display:grid;justify-items:center;grid-template-columns:repeat(7, 1fr);gap:0.5rem;margin-bottom:24px}.dates .date{position:relative;display:flex;flex-direction:row;justify-content:center;align-items:center;height:48px;width:48px;min-width:2rem;min-height:2rem;cursor:pointer;border-radius:var(--nylas-border-radius-2x);font-size:16px;font-weight:600;font-family:inherit;color:var(--nylas-base-text);background-color:var(--nylas-base-100);cursor:pointer;border:none}@media screen and (max-width: 412px){.dates .date{width:38px;height:38px;min-width:none}}.dates .date:hover:not(:disabled){box-shadow:0 0 0 2px var(--nylas-base-500) inset}.dates .date.date.current-month{color:var(--nylas-base-800)}.dates .date.date.selected{background-color:var(--nylas-primary);color:var(--nylas-base-0);font-weight:700}.dates .date.date.day-skeleton{color:var(--nylas-base-300)}.dates .date:disabled{color:var(--nylas-base-300);background-color:transparent;font-weight:400;cursor:not-allowed}.dates .day{font-size:12px;color:var(--nylas-base-800);font-weight:600;letter-spacing:0.5px;height:32px;display:flex;align-items:center}@media screen and (max-width: 768px){.dates .day{font-size:14px}}.dates .date.day-skeleton{height:48px;width:48px;border-radius:var(--nylas-border-radius-2x);animation:pulsate 1.5s infinite ease-in-out;background-color:var(--nylas-base-50)}@media screen and (max-width: 412px){.dates .date.day-skeleton{width:38px;height:38px;min-width:none}}.dates .date.current-day::after{content:\"\";position:absolute;bottom:6px;left:50%;transform:translateX(-50%);width:6px;height:6px;border-radius:50%;background-color:var(--nylas-base-500)}.dates .date.current-day.selected::after{background-color:var(--nylas-base-100)}.pagination{display:flex;flex-direction:row;justify-content:space-between;align-items:center;min-width:92px}.pagination .chevron-right{transform:rotate(180deg)}.pagination .button{display:flex;flex-direction:row;justify-content:center;align-items:center;height:3vh;width:3vh;min-width:3em;min-height:3em;cursor:pointer;border-radius:var(--nylas-border-radius-2x);background-color:transparent;color:var(--nylas-base-800);cursor:pointer;border:none}.pagination .button:hover{background-color:var(--nylas-base-50)}.pagination .button:active{background-color:var(--nylas-base-100)}.pagination .button:disabled{background-color:transparent;color:var(--nylas-base-300);cursor:not-allowed}.flex-row{display:flex;flex-direction:row;justify-content:space-between;align-items:center;color:var(--nylas-base-500)}";
1744
+ const nylasDatePickerCss = ":host{display:block;min-height:444px}@media screen and (max-width: 768px){:host{min-height:auto}}.nylas-date-picker{display:flex;gap:1rem;flex-direction:column}.header{margin:0 0.5rem;height:48px}.header h2{font-size:1.3125rem;font-weight:400;line-height:1rem;color:var(--nylas-base-800)}.header h2 strong{font-weight:600}.title{margin:0 -1.25rem;display:flex;flex-direction:column;padding:0 1.5rem;gap:0.5rem;border-bottom:1px solid var(--nylas-base-200);font-family:var(--nylas-font-family)}.title h1{margin-bottom:0;font-size:18px;line-height:20px;font-weight:600;display:flex;gap:0.5rem;align-items:center}.title p{margin-top:0;font-size:16px;display:flex;gap:0.5rem;align-items:center}@keyframes pulsate{0%{background-color:var(--nylas-base-50)}50%{background-color:var(--nylas-base-100)}100%{background-color:var(--nylas-base-50)}}.dates{display:grid;justify-items:center;grid-template-columns:repeat(7, 1fr);gap:0.5rem;margin-bottom:24px}.dates .date{position:relative;display:flex;flex-direction:row;justify-content:center;align-items:center;height:48px;width:48px;min-width:2rem;min-height:2rem;cursor:pointer;border-radius:var(--nylas-border-radius-2x);font-size:16px;font-weight:600;font-family:inherit;color:var(--nylas-base-text);background-color:var(--nylas-base-100);cursor:pointer;border:none}@media screen and (max-width: 412px){.dates .date{width:38px;height:38px;min-width:none}}.dates .date:hover:not(:disabled){box-shadow:0 0 0 2px var(--nylas-base-500) inset}.dates .date.date.current-month{color:var(--nylas-base-800)}.dates .date.date.selected{background-color:var(--nylas-primary);color:var(--nylas-base-0);font-weight:700}.dates .date.date.day-skeleton{color:var(--nylas-base-300)}.dates .date:disabled{color:var(--nylas-base-300);background-color:transparent;font-weight:400;cursor:not-allowed}.dates .day{font-size:12px;color:var(--nylas-base-800);font-weight:600;letter-spacing:0.5px;height:32px;display:flex;align-items:center}@media screen and (max-width: 768px){.dates .day{font-size:14px}}.dates .date.day-skeleton{height:48px;width:48px;border-radius:var(--nylas-border-radius-2x);animation:pulsate 1.5s infinite ease-in-out;background-color:var(--nylas-base-50)}@media screen and (max-width: 412px){.dates .date.day-skeleton{width:38px;height:38px;min-width:none}}.dates .date.current-day::after{content:\"\";position:absolute;bottom:6px;left:50%;transform:translateX(-50%);width:6px;height:6px;border-radius:50%;background-color:var(--nylas-base-500)}.dates .date.current-day.selected::after{background-color:var(--nylas-base-100)}.pagination{display:flex;flex-direction:row;justify-content:space-between;align-items:center;min-width:92px}.pagination .chevron-right{transform:rotate(180deg)}.pagination .button{display:flex;flex-direction:row;justify-content:center;align-items:center;height:3vh;width:3vh;min-width:3em;min-height:3em;cursor:pointer;border-radius:var(--nylas-border-radius-2x);background-color:transparent;color:var(--nylas-base-800);cursor:pointer;border:none}.pagination .button:hover{background-color:var(--nylas-base-50)}.pagination .button:active{background-color:var(--nylas-base-100)}.pagination .button:disabled{background-color:transparent;color:var(--nylas-base-300);cursor:not-allowed}.flex-row{display:flex;flex-direction:row;justify-content:space-between;align-items:center;color:var(--nylas-base-500)}";
1745
1745
 
1746
1746
  var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
1747
1747
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -1766,6 +1766,7 @@ const NylasDatePicker = proxyCustomElement(class NylasDatePicker extends HTMLEle
1766
1766
  this.monthChanged = createEvent(this, "monthChanged", 7);
1767
1767
  this.selectableDates = undefined;
1768
1768
  this.configSettings = undefined;
1769
+ this.themeConfig = undefined;
1769
1770
  this.selectedDate = undefined;
1770
1771
  this.selectedLanguage = undefined;
1771
1772
  this.isLoading = undefined;
@@ -1794,6 +1795,17 @@ const NylasDatePicker = proxyCustomElement(class NylasDatePicker extends HTMLEle
1794
1795
  connectedCallback() { }
1795
1796
  disconnectedCallback() { }
1796
1797
  componentWillLoad() { }
1798
+ componentDidLoad() {
1799
+ debug(`[nylas-date-picker] Component did load`);
1800
+ this.applyThemeConfig(this.themeConfig);
1801
+ }
1802
+ applyThemeConfig(themeConfig) {
1803
+ if (themeConfig) {
1804
+ for (const [key, value] of Object.entries(themeConfig)) {
1805
+ this.host.style.setProperty(`${key}`, value);
1806
+ }
1807
+ }
1808
+ }
1797
1809
  getDates() {
1798
1810
  const lastDayOfMonth = getLastDayOfMonth(this.month);
1799
1811
  const firstDayOfMonth = getFirstDayOfMonth(this.month);
@@ -1823,7 +1835,7 @@ const NylasDatePicker = proxyCustomElement(class NylasDatePicker extends HTMLEle
1823
1835
  return date && selectableDates?.find(d => isSameDay(d, date)) === undefined;
1824
1836
  }
1825
1837
  render() {
1826
- return (h(Host, { key: '06638094c3e21b094641e5adbf08762b346fc10e', part: "ndp" }, h("div", { key: '370143e471513ab59c49dc369208365e5dcd1865', class: "nylas-date-picker" }, h("div", { key: '9b84a00eada140f2f142dec17a8418854160be87', class: "title", part: "ndp__title" }, this.configSettings?.name ? (h("h1", null, this.configSettings?.name)) : (this.configSettings?.organizer?.name && (h("h1", null, h("person-icon", null), this.configSettings?.organizer?.name || 'Organizer'))), h("p", { key: 'a64fee4f4c6886b31620cdc62de0769e3908b634' }, h("clock-icon", { key: 'e6c4d1cf6fd0b45e9824f26cb4f1a9fd828347d3' }), this.eventDuration ? convertMinutesToHoursAndMinutes(this.eventDuration) : `- ${instance.t('time.minutes')}`)), h("div", { key: '7568638d6af0fa03f84cf4b32b418c6b4f4df0de', class: 'header flex-row' }, h("h2", { key: '7b656957b240be95038151d5ca2089967b3704cd', part: 'ndp__month-header' }, h("strong", { key: 'cea1b1a9fc986885cb1425075364bb6b97b0d0e2' }, translateMonth(this.month.toLocaleDateString(undefined, { month: 'long' }).toLocaleLowerCase())), "\u00A0", this.month.toLocaleDateString(undefined, { year: 'numeric' })), h("div", { key: 'daf2f52ae4ca9e381fefadf53b9bf9f7a2c47987', class: 'pagination' }, h("button", { key: 'e182f6af777a122aaaa323fbada73258fd8bcf90', title: "Previous month", onClick: () => this.changeMonth(-1), class: { 'chevron-left': true, 'button': true }, disabled: !this.selectableDates?.length || this.month <= new Date(), part: "ndp__month-button" }, h("chevron-icon", { key: 'a9703cc9a0cbfc72e800f72a56233467bff2e5f9' })), h("button", { key: 'bcafc749f794352746d64974e8e564a5db1125a4', title: "Next month", onClick: () => this.changeMonth(1), class: { 'chevron-right': true, 'button': true }, disabled: this.disableNextMonthButton, part: "ndp__month-button" }, h("chevron-icon", { key: '5fc036471ed8f1caabe79e8489321070d9b6eae3' })))), h("div", { key: '701d99cc45475a8b9217893bfa56c0fa80f61520', class: 'dates' }, [
1838
+ return (h(Host, { key: 'ffb13b5ab2b96a23232a0e4fce0166cc4e471bc3', part: "ndp" }, h("div", { key: 'd617e1e85082cda56f123b915460161003fba8ad', class: "nylas-date-picker" }, h("div", { key: '8b966e5cfa60ec08da307e7537170adcfc04944b', class: "title", part: "ndp__title" }, this.configSettings?.name ? (h("h1", null, this.configSettings?.name)) : (this.configSettings?.organizer?.name && (h("h1", null, h("person-icon", null), this.configSettings?.organizer?.name || 'Organizer'))), h("p", { key: 'ec8dd18ff022b61ac574c1a0bb4c94c4bd51b643' }, h("clock-icon", { key: '8c0685800081b17f4b118938b106af1e291ded09' }), this.eventDuration ? convertMinutesToHoursAndMinutes(this.eventDuration) : `- ${instance.t('time.minutes')}`)), h("div", { key: '9c4e5f5aed7d3350f149115236b1be17ee1b77e7', class: 'header flex-row' }, h("h2", { key: 'b30d034da321b0e34e93f41fdeddcd5c6890fc9c', part: 'ndp__month-header' }, h("strong", { key: '2c45a29ba2d99856262c706e626c7dc43b05380b' }, translateMonth(this.month.toLocaleDateString(undefined, { month: 'long' }).toLocaleLowerCase())), "\u00A0", this.month.toLocaleDateString(undefined, { year: 'numeric' })), h("div", { key: 'eb086cc81c029c3f2dc12a5c796f4e20e60fef2e', class: 'pagination' }, h("button", { key: 'aefca223118d1e0c4f908ab325743730a5633d0f', title: "Previous month", onClick: () => this.changeMonth(-1), class: { 'chevron-left': true, 'button': true }, disabled: !this.selectableDates?.length || this.month <= new Date(), part: "ndp__month-button" }, h("chevron-icon", { key: '04e6c8e8dd6fa33805e19a97cc56aff0355bacd1' })), h("button", { key: '912568ecbc76504f9e917042edc7dd41ccfb51fa', title: "Next month", onClick: () => this.changeMonth(1), class: { 'chevron-right': true, 'button': true }, disabled: this.disableNextMonthButton, part: "ndp__month-button" }, h("chevron-icon", { key: '25efda159f4cd761012ee2143690c37cf9247f66' })))), h("div", { key: '4c0d4d94cce9d758e8dd52d4e29ec27f21410772', class: 'dates' }, [
1827
1839
  instance.t('days.sunday'),
1828
1840
  instance.t('days.monday'),
1829
1841
  instance.t('days.tuesday'),
@@ -1849,6 +1861,7 @@ const NylasDatePicker = proxyCustomElement(class NylasDatePicker extends HTMLEle
1849
1861
  }, "aria-lang": date.toLocaleDateString(undefined, { dateStyle: 'full' }), disabled: isDisabled, onClick: () => this.selectDate(date), part: `ndp__date ${this.isSelected(date, this.selectedDate, this.selectableDates) ? 'ndp__date--selected' : ''} ${isSameDay(date, new Date()) ? 'ndp__date--current-day' : ''} ${isSameMonth(date, this.month) ? 'ndp__date--current-month' : ''}` }, date.getDate()));
1850
1862
  })))));
1851
1863
  }
1864
+ get host() { return this; }
1852
1865
  static get watchers() { return {
1853
1866
  "configSettings": ["configSettingsChanged"],
1854
1867
  "selectedLanguage": ["selectedLanguageChanged"]
@@ -1857,6 +1870,7 @@ const NylasDatePicker = proxyCustomElement(class NylasDatePicker extends HTMLEle
1857
1870
  }, [1, "nylas-date-picker", {
1858
1871
  "selectableDates": [16],
1859
1872
  "configSettings": [16],
1873
+ "themeConfig": [8, "theme-config"],
1860
1874
  "selectedDate": [16],
1861
1875
  "selectedLanguage": [1, "selected-language"],
1862
1876
  "isLoading": [4, "is-loading"],
@@ -1888,6 +1902,7 @@ __decorate([
1888
1902
  debug('nylas-date-picker', 'monthChanged', event.detail);
1889
1903
  },
1890
1904
  },
1905
+ localPropsToProp: new Map([['themeConfig', 'themeConfig']]),
1891
1906
  fireRegisterEvent: true,
1892
1907
  }),
1893
1908
  __metadata("design:type", Function),