bookito-widget 0.43.1 → 1.0.0-beta.2

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 (349) hide show
  1. package/README.md +191 -7
  2. package/dist/bookito-widget.css +3 -0
  3. package/dist/bookito-widget.iife.js +112 -0
  4. package/dist/bookito-widget.js +40173 -0
  5. package/dist/bookito-widget.umd.js +104 -1992
  6. package/dist/bookito-widget.window.js +104 -1992
  7. package/dist/src/app/i18n/index.d.ts +868 -0
  8. package/dist/src/app/i18n/locales/de.d.ts +86 -0
  9. package/dist/src/app/i18n/locales/en.d.ts +86 -0
  10. package/dist/src/app/i18n/locales/fr.d.ts +86 -0
  11. package/dist/src/app/i18n/locales/it.d.ts +86 -0
  12. package/dist/src/app/i18n/locales/pl.d.ts +86 -0
  13. package/dist/src/app/providers/BookitoWidgetRoot.vue.d.ts +8 -0
  14. package/dist/src/app/query/query-client.d.ts +2 -0
  15. package/dist/src/embed/global-api.d.ts +9 -0
  16. package/dist/src/embed/mount-registry.d.ts +10 -0
  17. package/dist/src/embed/mount.d.ts +12 -0
  18. package/dist/src/embed/open-modal.d.ts +11 -0
  19. package/dist/src/embed/shadow-dom.d.ts +5 -0
  20. package/dist/src/embed/vue-plugin.d.ts +14 -0
  21. package/dist/src/embed.d.ts +1 -0
  22. package/dist/src/features/booking-flow/api/bookito-booking.client.d.ts +2 -0
  23. package/dist/src/features/booking-flow/api/bookito-booking.dto.d.ts +25 -0
  24. package/dist/src/features/booking-flow/api/bookito-booking.mutations.d.ts +2 -0
  25. package/dist/src/features/booking-flow/components/AnimatedSuccessCheckmark.vue.d.ts +2 -0
  26. package/dist/src/features/booking-flow/components/BookingCheckbox.vue.d.ts +11 -0
  27. package/dist/src/features/booking-flow/components/BookingDetailsDateOfBirthInput.vue.d.ts +10 -0
  28. package/dist/src/features/booking-flow/components/BookingDetailsDialCodePicker.vue.d.ts +11 -0
  29. package/dist/src/features/booking-flow/components/BookingDetailsDialCodePickerContent.vue.d.ts +9 -0
  30. package/dist/src/features/booking-flow/components/BookingDetailsField.vue.d.ts +20 -0
  31. package/dist/src/features/booking-flow/components/BookingDetailsLanguageSelect.vue.d.ts +9 -0
  32. package/dist/src/features/booking-flow/components/BookingDetailsPhoneInput.vue.d.ts +12 -0
  33. package/dist/src/features/booking-flow/components/BookingDetailsSection.vue.d.ts +30 -0
  34. package/dist/src/features/booking-flow/components/BookingDetailsTextInput.vue.d.ts +13 -0
  35. package/dist/src/features/booking-flow/components/BookingExtras.vue.d.ts +15 -0
  36. package/dist/src/features/booking-flow/components/BookingFlowNextButton.vue.d.ts +10 -0
  37. package/dist/src/features/booking-flow/components/BookingFlowPanel.vue.d.ts +7 -0
  38. package/dist/src/features/booking-flow/components/BookingFlowStepper.vue.d.ts +13 -0
  39. package/dist/src/features/booking-flow/components/BookingFlowSuccess.vue.d.ts +5 -0
  40. package/dist/src/features/booking-flow/components/BookingGuestChips.vue.d.ts +11 -0
  41. package/dist/src/features/booking-flow/components/BookingGuestsStep.vue.d.ts +15 -0
  42. package/dist/src/features/booking-flow/components/BookingParticipantCounter.vue.d.ts +13 -0
  43. package/dist/src/features/booking-flow/components/BookingTimeSection.vue.d.ts +24 -0
  44. package/dist/src/features/booking-flow/components/booking-flow.props.d.ts +31 -0
  45. package/dist/src/features/booking-flow/composables/create-booking-flow-api.d.ts +70 -0
  46. package/dist/src/features/booking-flow/composables/useBookingFlow.d.ts +52 -0
  47. package/dist/src/features/booking-flow/composables/useBookingFlowActions.d.ts +13 -0
  48. package/dist/src/features/booking-flow/composables/useBookingFlowActions.types.d.ts +31 -0
  49. package/dist/src/features/booking-flow/composables/useBookingFlowFormSync.d.ts +12 -0
  50. package/dist/src/features/booking-flow/composables/useBookingFlowWaitlist.d.ts +17 -0
  51. package/dist/src/features/booking-flow/composables/useBookingGuestsStepLabels.d.ts +26 -0
  52. package/dist/src/features/booking-flow/composables/useBookingTimeSectionState.d.ts +19 -0
  53. package/dist/src/features/booking-flow/composables/useBookingTimeSlots.d.ts +18 -0
  54. package/dist/src/features/booking-flow/lib/booking-calendar-bounds.d.ts +9 -0
  55. package/dist/src/features/booking-flow/lib/booking-details-flow.helpers.d.ts +11 -0
  56. package/dist/src/features/booking-flow/lib/booking-details.helpers.d.ts +26 -0
  57. package/dist/src/features/booking-flow/lib/booking-external-participant.helpers.d.ts +10 -0
  58. package/dist/src/features/booking-flow/lib/booking-flow-stepper.helpers.d.ts +17 -0
  59. package/dist/src/features/booking-flow/lib/booking-flow.actions.d.ts +34 -0
  60. package/dist/src/features/booking-flow/lib/booking-flow.helpers.d.ts +32 -0
  61. package/dist/src/features/booking-flow/lib/booking-participants.helpers.d.ts +4 -0
  62. package/dist/src/features/booking-flow/lib/booking-payload-label.helpers.d.ts +14 -0
  63. package/dist/src/features/booking-flow/lib/booking-payload.helpers.d.ts +11 -0
  64. package/dist/src/features/booking-flow/lib/booking-step-completion.helpers.d.ts +2 -0
  65. package/dist/src/features/booking-flow/lib/booking-time-slot-payload.helpers.d.ts +8 -0
  66. package/dist/src/features/booking-flow/lib/filter-phone-dial-codes.d.ts +2 -0
  67. package/dist/src/features/booking-flow/lib/format-booking-time-slot-label.d.ts +13 -0
  68. package/dist/src/features/booking-flow/lib/phone-dial-code-countries.data.d.ts +2 -0
  69. package/dist/src/features/booking-flow/lib/phone-dial-codes.d.ts +6 -0
  70. package/dist/src/features/booking-flow/lib/reset-booking-auth.helpers.d.ts +1 -0
  71. package/dist/src/features/booking-flow/lib/reset-booking-confirm-step.helpers.d.ts +2 -0
  72. package/dist/src/features/booking-flow/lib/resolve-booking-total-price.d.ts +10 -0
  73. package/dist/src/features/booking-flow/lib/resolve-booking-waitlist.d.ts +19 -0
  74. package/dist/src/features/booking-flow/model/booking-display-step.types.d.ts +6 -0
  75. package/dist/src/features/booking-flow/model/booking-form-date.helpers.d.ts +10 -0
  76. package/dist/src/features/booking-flow/model/booking-form-navigation.helpers.d.ts +2 -0
  77. package/dist/src/features/booking-flow/model/booking-form.types.d.ts +27 -0
  78. package/dist/src/features/bookito-settings/api/bookito-settings.client.d.ts +2 -0
  79. package/dist/src/features/bookito-settings/api/bookito-settings.keys.d.ts +4 -0
  80. package/dist/src/features/bookito-settings/api/bookito-settings.queries.d.ts +2 -0
  81. package/dist/src/features/bookito-settings/model/bookito-settings.types.d.ts +27 -0
  82. package/dist/src/features/event-feed/api/bookito-event-category.client.d.ts +4 -0
  83. package/dist/src/features/event-feed/api/bookito-event-category.dto.d.ts +11 -0
  84. package/dist/src/features/event-feed/api/bookito-event-category.queries.d.ts +9 -0
  85. package/dist/src/features/event-feed/api/bookito-event-modal-dates.helpers.d.ts +6 -0
  86. package/dist/src/features/event-feed/api/bookito-event.client.d.ts +5 -0
  87. package/dist/src/features/event-feed/api/bookito-event.dto.d.ts +102 -0
  88. package/dist/src/features/event-feed/api/bookito-event.keys.d.ts +7 -0
  89. package/dist/src/features/event-feed/api/bookito-event.mapper-helpers.d.ts +17 -0
  90. package/dist/src/features/event-feed/api/bookito-event.mapper-image.helpers.d.ts +2 -0
  91. package/dist/src/features/event-feed/api/bookito-event.mapper-variant.helpers.d.ts +3 -0
  92. package/dist/src/features/event-feed/api/bookito-event.mapper.d.ts +6 -0
  93. package/dist/src/features/event-feed/api/bookito-event.queries.d.ts +24 -0
  94. package/dist/src/features/event-feed/api/bookito-time-slots.queries.d.ts +9 -0
  95. package/dist/src/features/event-feed/components/BookitoWidget.vue.d.ts +5 -0
  96. package/dist/src/features/event-feed/components/EventFeed.vue.d.ts +21 -0
  97. package/dist/src/features/event-feed/components/EventFeedScrollControls.vue.d.ts +13 -0
  98. package/dist/src/features/event-feed/components/ExperienceCard.vue.d.ts +13 -0
  99. package/dist/src/features/event-feed/components/PoweredByCarlito.vue.d.ts +2 -0
  100. package/dist/src/features/event-feed/composables/useBookitoWidgetTheme.d.ts +2 -0
  101. package/dist/src/features/event-feed/composables/useEventFeedScroll.d.ts +8 -0
  102. package/dist/src/features/event-feed/lib/event-feed-date.utils.d.ts +15 -0
  103. package/dist/src/features/event-feed/lib/event-feed-item.helpers.d.ts +9 -0
  104. package/dist/src/features/event-feed/lib/event-feed-occurrence.helpers.d.ts +7 -0
  105. package/dist/src/features/event-feed/lib/event-feed.utils.d.ts +8 -0
  106. package/dist/src/features/event-feed/lib/resolve-localized-text.d.ts +2 -0
  107. package/dist/src/features/event-feed/model/widget.types.d.ts +96 -0
  108. package/dist/src/features/experience-detail/components/BookitoEventModal.vue.d.ts +14 -0
  109. package/dist/src/features/experience-detail/components/ExperienceDetailPanel.vue.d.ts +9 -0
  110. package/dist/src/features/experience-detail/components/ExperienceOverlay.vue.d.ts +16 -0
  111. package/dist/src/features/experience-detail/components/ExperienceOverlayContent.vue.d.ts +29 -0
  112. package/dist/src/features/experience-detail/components/ExperienceOverlayHeader.vue.d.ts +15 -0
  113. package/dist/src/features/experience-detail/composables/useExperienceOverlayBooking.d.ts +20 -0
  114. package/dist/src/features/experience-detail/lib/bookito-event-modal.helpers.d.ts +7 -0
  115. package/dist/src/features/experience-detail/lib/experience-booking-cancellation.helpers.d.ts +2 -0
  116. package/dist/src/features/experience-detail/lib/experience-booking-cutoff.helpers.d.ts +3 -0
  117. package/dist/src/features/experience-detail/lib/experience-booking-date.helpers.d.ts +3 -0
  118. package/dist/src/features/experience-detail/lib/experience-overlay.helpers.d.ts +3 -0
  119. package/dist/src/features/experience-detail/lib/resolve-experience-booking-availability.d.ts +39 -0
  120. package/dist/src/features/guest-auth/api/guest-auth.client.d.ts +2 -0
  121. package/dist/src/features/guest-auth/api/guest-auth.dto.d.ts +36 -0
  122. package/dist/src/features/guest-auth/api/guest-auth.mutations.d.ts +2 -0
  123. package/dist/src/features/guest-auth/lib/map-login-guests.d.ts +2 -0
  124. package/dist/src/index.d.ts +8 -0
  125. package/dist/src/shared/api/api-config.d.ts +5 -0
  126. package/dist/src/shared/api/auth-tokens.d.ts +3 -0
  127. package/dist/src/shared/api/federation-client.d.ts +14 -0
  128. package/dist/src/shared/api/federation-errors.d.ts +9 -0
  129. package/dist/src/shared/api/graphql-client.d.ts +22 -0
  130. package/dist/src/shared/api/subdomain-parameter.d.ts +8 -0
  131. package/dist/src/shared/calendar/BookingCalendar.vue.d.ts +15 -0
  132. package/dist/src/shared/calendar/BookingCalendarGrid.vue.d.ts +8 -0
  133. package/dist/src/shared/calendar/BookingCalendarNavigation.vue.d.ts +17 -0
  134. package/dist/src/shared/calendar/calendar-date-key.d.ts +4 -0
  135. package/dist/src/shared/calendar/calendar-date-value.d.ts +11 -0
  136. package/dist/src/shared/calendar/calendar-date.types.d.ts +1 -0
  137. package/dist/src/shared/calendar/hotel-calendar-date.d.ts +10 -0
  138. package/dist/src/shared/calendar/index.d.ts +1 -0
  139. package/dist/src/shared/calendar/useBookingCalendarState.d.ts +29 -0
  140. package/dist/src/shared/config/languages.d.ts +3 -0
  141. package/dist/src/shared/lib/format-booking-price.d.ts +2 -0
  142. package/dist/src/shared/lib/is-ios-platform.d.ts +1 -0
  143. package/dist/src/shared/lib/map-language-to-intl-locale.d.ts +2 -0
  144. package/dist/src/shared/lib/normalize-widget-background-color.d.ts +1 -0
  145. package/dist/src/shared/lib/resolve-widget-title.d.ts +2 -0
  146. package/dist/src/shared/markdown/components/CarlitoMarkdownRenderer.vue.d.ts +8 -0
  147. package/dist/src/shared/markdown/components/PdfEmbed/PdfEmbed.vue.d.ts +6 -0
  148. package/dist/src/shared/markdown/components/PdfEmbed/PdfLoading.vue.d.ts +2 -0
  149. package/dist/src/shared/markdown/components/PdfEmbed/PdfRenderer.vue.d.ts +14 -0
  150. package/dist/src/shared/markdown/components/PdfEmbed/PdfViewer.vue.d.ts +38 -0
  151. package/dist/src/shared/markdown/components/PdfEmbed/PdfViewerError.vue.d.ts +5 -0
  152. package/dist/src/shared/markdown/components/PdfEmbed/composables/usePdfViewerState.d.ts +24 -0
  153. package/dist/src/shared/markdown/components/PdfEmbed/composables/useRenderPdf.d.ts +17 -0
  154. package/dist/src/shared/markdown/components/PdfEmbed/lib/pdf-canvas.d.ts +40 -0
  155. package/dist/src/shared/markdown/components/PdfEmbed/lib/pdf-render-watches.d.ts +15 -0
  156. package/dist/src/shared/markdown/has-meaningful-markdown-content.d.ts +5 -0
  157. package/dist/src/shared/markdown/process-markdown.d.ts +1 -0
  158. package/dist/src/shared/markdown/remark-center.d.ts +3 -0
  159. package/dist/src/shared/markdown/transform-markdown-url.d.ts +1 -0
  160. package/dist/src/shared/pdf/create-pdf-panzoom-session.d.ts +18 -0
  161. package/dist/src/shared/pdf/index.d.ts +5 -0
  162. package/dist/src/shared/pdf/pdf-panzoom.d.ts +14 -0
  163. package/dist/src/shared/pdf/pdfjs.d.ts +2 -0
  164. package/dist/src/shared/pdf/setup-pdf-panzoom-watches.d.ts +14 -0
  165. package/dist/src/shared/pdf/usePdfPanzoom.d.ts +6 -0
  166. package/dist/src/shared/pdf/usePdfPanzoom.types.d.ts +11 -0
  167. package/dist/src/shared/theme/theme-loader.d.ts +19 -0
  168. package/dist/src/shared/utils/cn.d.ts +2 -0
  169. package/dist/src/shared/utils/dom-events.d.ts +4 -0
  170. package/package.json +102 -4
  171. package/.babelrc +0 -12
  172. package/.eslintrc.json +0 -18
  173. package/CHANGELOG.md +0 -1931
  174. package/dist/1219.js +0 -1
  175. package/dist/1229.js +0 -2
  176. package/dist/1229.js.LICENSE.txt +0 -3
  177. package/dist/135.js +0 -2
  178. package/dist/135.js.LICENSE.txt +0 -3
  179. package/dist/1385.js +0 -2
  180. package/dist/1385.js.LICENSE.txt +0 -3
  181. package/dist/1421.js +0 -2
  182. package/dist/1421.js.LICENSE.txt +0 -3
  183. package/dist/1426.js +0 -2
  184. package/dist/1426.js.LICENSE.txt +0 -3
  185. package/dist/1428.js +0 -2
  186. package/dist/1428.js.LICENSE.txt +0 -3
  187. package/dist/1677.js +0 -2
  188. package/dist/1677.js.LICENSE.txt +0 -3
  189. package/dist/173.js +0 -2
  190. package/dist/173.js.LICENSE.txt +0 -3
  191. package/dist/1798.js +0 -2
  192. package/dist/1798.js.LICENSE.txt +0 -3
  193. package/dist/1813.js +0 -2
  194. package/dist/1813.js.LICENSE.txt +0 -3
  195. package/dist/2411.js +0 -2
  196. package/dist/2411.js.LICENSE.txt +0 -3
  197. package/dist/2782.js +0 -2
  198. package/dist/2782.js.LICENSE.txt +0 -3
  199. package/dist/2827.js +0 -2
  200. package/dist/2827.js.LICENSE.txt +0 -3
  201. package/dist/2939.js +0 -2
  202. package/dist/2939.js.LICENSE.txt +0 -3
  203. package/dist/3002.js +0 -2
  204. package/dist/3002.js.LICENSE.txt +0 -3
  205. package/dist/3140.js +0 -1
  206. package/dist/3rdpartylicenses.txt +0 -3609
  207. package/dist/4189.js +0 -2
  208. package/dist/4189.js.LICENSE.txt +0 -3
  209. package/dist/4194.js +0 -2
  210. package/dist/4194.js.LICENSE.txt +0 -3
  211. package/dist/4220.js +0 -2
  212. package/dist/4220.js.LICENSE.txt +0 -3
  213. package/dist/434.js +0 -2
  214. package/dist/434.js.LICENSE.txt +0 -3
  215. package/dist/4606.js +0 -2
  216. package/dist/4606.js.LICENSE.txt +0 -3
  217. package/dist/4614.js +0 -2
  218. package/dist/4614.js.LICENSE.txt +0 -3
  219. package/dist/5065.js +0 -2
  220. package/dist/5065.js.LICENSE.txt +0 -3
  221. package/dist/5090.js +0 -2
  222. package/dist/5090.js.LICENSE.txt +0 -3
  223. package/dist/5143.js +0 -2
  224. package/dist/5143.js.LICENSE.txt +0 -3
  225. package/dist/5309.js +0 -2
  226. package/dist/5309.js.LICENSE.txt +0 -3
  227. package/dist/5397.js +0 -2
  228. package/dist/5397.js.LICENSE.txt +0 -3
  229. package/dist/5427.js +0 -2
  230. package/dist/5427.js.LICENSE.txt +0 -3
  231. package/dist/5941.js +0 -2
  232. package/dist/5941.js.LICENSE.txt +0 -3
  233. package/dist/5956.js +0 -2
  234. package/dist/5956.js.LICENSE.txt +0 -3
  235. package/dist/6016.js +0 -2
  236. package/dist/6016.js.LICENSE.txt +0 -3
  237. package/dist/6250.js +0 -2
  238. package/dist/6250.js.LICENSE.txt +0 -3
  239. package/dist/6290.js +0 -2
  240. package/dist/6290.js.LICENSE.txt +0 -3
  241. package/dist/6335.js +0 -2
  242. package/dist/6335.js.LICENSE.txt +0 -3
  243. package/dist/6462.js +0 -2
  244. package/dist/6462.js.LICENSE.txt +0 -3
  245. package/dist/650.js +0 -2
  246. package/dist/650.js.LICENSE.txt +0 -3
  247. package/dist/6531.js +0 -2
  248. package/dist/6531.js.LICENSE.txt +0 -3
  249. package/dist/6878.js +0 -2
  250. package/dist/6878.js.LICENSE.txt +0 -3
  251. package/dist/6892.js +0 -2
  252. package/dist/6892.js.LICENSE.txt +0 -3
  253. package/dist/6979.js +0 -2
  254. package/dist/6979.js.LICENSE.txt +0 -3
  255. package/dist/7120.js +0 -2
  256. package/dist/7120.js.LICENSE.txt +0 -3
  257. package/dist/7149.js +0 -2
  258. package/dist/7149.js.LICENSE.txt +0 -3
  259. package/dist/7202.js +0 -2
  260. package/dist/7202.js.LICENSE.txt +0 -3
  261. package/dist/7213.js +0 -2
  262. package/dist/7213.js.LICENSE.txt +0 -3
  263. package/dist/7290.js +0 -2
  264. package/dist/7290.js.LICENSE.txt +0 -3
  265. package/dist/7373.js +0 -2
  266. package/dist/7373.js.LICENSE.txt +0 -3
  267. package/dist/7515.js +0 -2
  268. package/dist/7515.js.LICENSE.txt +0 -3
  269. package/dist/7797.js +0 -2
  270. package/dist/7797.js.LICENSE.txt +0 -3
  271. package/dist/7804.js +0 -2
  272. package/dist/7804.js.LICENSE.txt +0 -3
  273. package/dist/7813.js +0 -2
  274. package/dist/7813.js.LICENSE.txt +0 -3
  275. package/dist/7843.js +0 -2
  276. package/dist/7843.js.LICENSE.txt +0 -3
  277. package/dist/8199.js +0 -2
  278. package/dist/8199.js.LICENSE.txt +0 -3
  279. package/dist/821.js +0 -2
  280. package/dist/821.js.LICENSE.txt +0 -3
  281. package/dist/8365.js +0 -2
  282. package/dist/8365.js.LICENSE.txt +0 -3
  283. package/dist/8599.js +0 -2
  284. package/dist/8599.js.LICENSE.txt +0 -3
  285. package/dist/880.js +0 -2
  286. package/dist/880.js.LICENSE.txt +0 -3
  287. package/dist/8831.js +0 -2
  288. package/dist/8831.js.LICENSE.txt +0 -3
  289. package/dist/885.js +0 -2
  290. package/dist/885.js.LICENSE.txt +0 -3
  291. package/dist/9079.js +0 -2
  292. package/dist/9079.js.LICENSE.txt +0 -3
  293. package/dist/9104.js +0 -2
  294. package/dist/9104.js.LICENSE.txt +0 -3
  295. package/dist/9236.js +0 -2
  296. package/dist/9236.js.LICENSE.txt +0 -3
  297. package/dist/942.js +0 -2
  298. package/dist/942.js.LICENSE.txt +0 -3
  299. package/dist/9456.js +0 -2
  300. package/dist/9456.js.LICENSE.txt +0 -3
  301. package/dist/951.js +0 -2
  302. package/dist/951.js.LICENSE.txt +0 -3
  303. package/dist/9636.js +0 -2
  304. package/dist/9636.js.LICENSE.txt +0 -3
  305. package/dist/9742.js +0 -2
  306. package/dist/9742.js.LICENSE.txt +0 -3
  307. package/dist/9792.js +0 -2
  308. package/dist/9792.js.LICENSE.txt +0 -3
  309. package/dist/9875.js +0 -2
  310. package/dist/9875.js.LICENSE.txt +0 -3
  311. package/dist/Carlito.eot +0 -0
  312. package/dist/Carlito.svg +0 -321
  313. package/dist/Carlito.ttf +0 -0
  314. package/dist/Carlito.woff +0 -0
  315. package/dist/Carlito.woff2 +0 -0
  316. package/dist/bookito-widget.umd.js.LICENSE.txt +0 -128
  317. package/dist/bookito-widget.window.js.LICENSE.txt +0 -128
  318. package/dist/layers-2x.png +0 -0
  319. package/dist/layers.png +0 -0
  320. package/dist/marker-icon.png +0 -0
  321. package/e2e-tests/e2e.html +0 -77
  322. package/index.html +0 -92
  323. package/jest.config.ts +0 -9
  324. package/postcss.config.js +0 -3
  325. package/project.json +0 -72
  326. package/src/BookitoEventDetail/index.tsx +0 -101
  327. package/src/BookitoEventModal/ModalLoader.tsx +0 -43
  328. package/src/BookitoEventModal/index.tsx +0 -71
  329. package/src/BookitoForm/EventInfo.tsx +0 -68
  330. package/src/BookitoForm/FormSubmitButton/AnimatedSuccessCheckmark/index.module.css +0 -45
  331. package/src/BookitoForm/FormSubmitButton/AnimatedSuccessCheckmark/index.tsx +0 -24
  332. package/src/BookitoForm/FormSubmitButton/index.tsx +0 -58
  333. package/src/BookitoForm/NewBookingForm.tsx +0 -199
  334. package/src/BookitoWidget/index.tsx +0 -299
  335. package/src/BookitoWidgetProvider/BookitoWidgetProvider.tsx +0 -36
  336. package/src/Card/EmptyCard.tsx +0 -30
  337. package/src/Card/index.tsx +0 -103
  338. package/src/CardHolder/index.tsx +0 -32
  339. package/src/Modal/index.tsx +0 -34
  340. package/src/assets/carlito-logo.svg +0 -10
  341. package/src/calendar-styles.css +0 -22
  342. package/src/index.module.css +0 -27
  343. package/src/index.tsx +0 -166
  344. package/src/types.ts +0 -8
  345. package/src/utils/index.tsx +0 -7
  346. package/tailwind.config.js +0 -13
  347. package/tsconfig.json +0 -26
  348. package/tsconfig.lib.json +0 -23
  349. package/tsconfig.spec.json +0 -20
package/src/index.tsx DELETED
@@ -1,166 +0,0 @@
1
- import { SupportedLanguages } from '@carlito/bookito-client';
2
- import { setupShadowDomStyle } from '@carlito/css';
3
- import '@carlito/react-intl';
4
- import { createRoot } from 'react-dom/client';
5
- import BookitoEventModal, { BookitoEventModalProps } from './BookitoEventModal';
6
- import BookitoWidget, { BookitoWidgetProps } from './BookitoWidget';
7
- import { BookitoWidgetViewMode } from './types';
8
- /**
9
- Ensure that all CSS modules are imported here and included in the "additionalStyles" .This serves as a temporary solution to loading styles in the shadow root.
10
- The alternative approach involves registering the style to global variable, but this method is currently not functioning as expected and requires further investigation.
11
- * */
12
- import AnimatedSuccessCheckmarkStyles from './BookitoForm/FormSubmitButton/AnimatedSuccessCheckmark/index.module.css';
13
- import BookitoWidgetProvider from './BookitoWidgetProvider/BookitoWidgetProvider';
14
- import reactCalendarStyles from './calendar-styles.css';
15
- import styles from './index.module.css';
16
-
17
- // Updated npm token configuration with granular access token (90 days)
18
- console.log('🚀 Bookito Widget initialized! Visit https://carlito-app.com for more details!');
19
-
20
- type InitializeBookitoWidget = {
21
- container: HTMLElement | string;
22
- customCss?: string;
23
- } & BookitoWidgetProps;
24
-
25
- type OpenBookitoEventModalArg = {
26
- container?: HTMLElement | string;
27
- onCloseModal?: () => void;
28
- } & Omit<BookitoEventModalProps, 'openModal'>;
29
-
30
- /**
31
- * This function is used to extract all styles from the shadow doms and insert them into the
32
- * shadow dom of the widget. This is needed because the style-loader does not allow
33
- * to mount styles more than once, which is super annoying and weird.
34
- */
35
- function getStyleLoaderStyles() {
36
- // Get all shadow roots
37
- const shadowRoots = Array.from(document.querySelectorAll('*'))
38
- .map((el) => el.shadowRoot)
39
- .filter((root) => root != null) as ShadowRoot[];
40
-
41
- // Search shadows and extract styles
42
- const allStyles = shadowRoots
43
- .map((root) => Array.from(root.querySelectorAll('style[data-style-loader]')))
44
- .reduce((acc, tags) => {
45
- return [...acc, ...tags.map((tag) => tag.innerHTML)];
46
- }, [] as string[]);
47
-
48
- if (allStyles.length === 0) {
49
- return null;
50
- }
51
-
52
- const styleTag = document.createElement('style');
53
- styleTag.setAttribute('data-style-loader', '');
54
- styleTag.innerHTML = allStyles.join('');
55
-
56
- return styleTag;
57
- }
58
-
59
- if (typeof window !== 'undefined') {
60
- const createRootElement = ({ container, ...props }: InitializeBookitoWidget): HTMLDivElement => {
61
- const elem = typeof container === 'string' ? document.querySelector(container) : container;
62
- if (!elem) {
63
- throw new Error('No container defined!' + container);
64
- }
65
-
66
- if (!props.authId) {
67
- throw new Error('No auth id param defined!');
68
- }
69
- const shadowRoot = elem.shadowRoot ?? elem.attachShadow({ mode: 'open' });
70
- const div = document.createElement('div');
71
- div.style.fontFamily = 'var(--theme-font-family-sans)';
72
- shadowRoot.append(div);
73
-
74
- const stylesToInsert = getStyleLoaderStyles();
75
- if (props.customCss) {
76
- const styleElement = document.createElement('style');
77
- styleElement.innerHTML = props.customCss;
78
- shadowRoot.append(styleElement);
79
- }
80
-
81
- if (stylesToInsert) {
82
- // copy styles from style-loader
83
- shadowRoot.append(stylesToInsert);
84
- setupShadowDomStyle({
85
- shadowRoot,
86
- hotelId: props.authId,
87
- additonalStyles: [reactCalendarStyles, AnimatedSuccessCheckmarkStyles],
88
- }); //Todo: added this line as a temp fix to be able to load theme variables ,
89
- } else {
90
- setupShadowDomStyle({
91
- shadowRoot,
92
- hotelId: props.authId,
93
- additonalStyles: [reactCalendarStyles, AnimatedSuccessCheckmarkStyles],
94
- });
95
- (styles as any).use({ target: shadowRoot });
96
- }
97
-
98
- return div;
99
- };
100
-
101
- const bookitoWidget = {
102
- initialize({ ...props }: InitializeBookitoWidget) {
103
- const rootElement = createRootElement(props);
104
- createRoot(rootElement).render(
105
- <BookitoWidgetProvider hotelId={props.authId} language={props?.language}>
106
- <BookitoWidget {...props} />
107
- </BookitoWidgetProvider>
108
- );
109
- },
110
- openBookitoModal(props: OpenBookitoEventModalArg) {
111
- const rootElement = createRootElement({
112
- container: props.container ?? window.document.body,
113
- ...props,
114
- });
115
- const root = createRoot(rootElement);
116
- root.render(
117
- <BookitoWidgetProvider hotelId={props.authId} language={props?.language}>
118
- <BookitoEventModal
119
- openModal={true}
120
- {...props}
121
- onCloseModal={() => {
122
- root.unmount();
123
- rootElement.parentNode?.removeChild(rootElement);
124
- props.onCloseModal && props.onCloseModal();
125
- }}
126
- />
127
- </BookitoWidgetProvider>
128
- );
129
- },
130
- };
131
-
132
- (window as any).bookitoWidget = bookitoWidget;
133
-
134
- if (!customElements.get('bookito-widget')) {
135
- class BookitoWidgetWebComponent extends HTMLElement {
136
- private _container;
137
- constructor() {
138
- super();
139
-
140
- this._container = this;
141
- }
142
-
143
- connectedCallback() {
144
- bookitoWidget.initialize({
145
- container: this._container,
146
- authId: this.getAttribute('auth-id') || '',
147
- categoryId: this.getAttribute('category-id') || '',
148
- title: this.getAttribute('title') || '',
149
- language: this.getAttribute('language') as SupportedLanguages,
150
- viewMode:
151
- (this.getAttribute('viewMode') as BookitoWidgetViewMode) ||
152
- (this.getAttribute('view-mode') as BookitoWidgetViewMode) ||
153
- 'Date',
154
- customCss: this.getAttribute('custom-css') || this.getAttribute('customCss') || '',
155
- excludeNonBookable: this.getAttribute('exclude-non-bookable') === 'true' || false,
156
- });
157
- }
158
- }
159
-
160
- customElements.define('bookito-widget', BookitoWidgetWebComponent);
161
- }
162
- }
163
-
164
- export { BookitoEventModal, BookitoWidgetProvider };
165
- export type { BookitoWidgetViewMode };
166
- export default BookitoWidget;
package/src/types.ts DELETED
@@ -1,8 +0,0 @@
1
- import { ConditionallyLocalizedListEventsResponse } from '@carlito/bookito-client';
2
-
3
- export type BookitoWidgetViewMode = 'List' | 'Date';
4
-
5
- /** Server-resolved occurrence (resolveOccurrences=true): `dates[].events[].occurrences[]`. */
6
- export type ResolvedOccurrence = NonNullable<
7
- ConditionallyLocalizedListEventsResponse<true>['dates'][string]['events'][number]['occurrences']
8
- >[number];
@@ -1,7 +0,0 @@
1
- export default function formatPrice(cost: number, locale = 'de-DE', currency: string = 'EUR') {
2
- return new Intl.NumberFormat(locale, {
3
- style: 'currency',
4
- currency: currency,
5
- currencyDisplay: 'narrowSymbol',
6
- }).format(cost);
7
- }
@@ -1,13 +0,0 @@
1
- const { createGlobPatternsForDependencies } = require('@nx/react/tailwind');
2
- const { join } = require('path');
3
-
4
- const taildwindBaseConfig = require('../../../tailwind.config');
5
-
6
- /** @type {import('tailwindcss').Config} */
7
- module.exports = {
8
- ...taildwindBaseConfig,
9
- content: [
10
- join(__dirname, '{src,pages,components}/**/*!(*.stories|*.spec).{ts,tsx,html}'),
11
- ...createGlobPatternsForDependencies(__dirname),
12
- ],
13
- };
package/tsconfig.json DELETED
@@ -1,26 +0,0 @@
1
- {
2
- "extends": "../../../tsconfig.base.json",
3
- "compilerOptions": {
4
- "jsx": "react-jsx",
5
- "allowJs": true,
6
- "esModuleInterop": true,
7
- "allowSyntheticDefaultImports": true,
8
- "forceConsistentCasingInFileNames": true,
9
- "strict": true,
10
- "noImplicitOverride": true,
11
- "noPropertyAccessFromIndexSignature": false,
12
- "noImplicitReturns": true,
13
- "noFallthroughCasesInSwitch": true,
14
- "resolveJsonModule": true
15
- },
16
- "files": [],
17
- "include": [],
18
- "references": [
19
- {
20
- "path": "./tsconfig.lib.json"
21
- },
22
- {
23
- "path": "./tsconfig.spec.json"
24
- }
25
- ]
26
- }
package/tsconfig.lib.json DELETED
@@ -1,23 +0,0 @@
1
- {
2
- "extends": "./tsconfig.json",
3
- "compilerOptions": {
4
- "outDir": "../../../dist/out-tsc",
5
- "types": ["node"]
6
- },
7
- "files": [
8
- "../../../node_modules/@nx/react/typings/cssmodule.d.ts",
9
- "../../../node_modules/@nx/react/typings/image.d.ts"
10
- ],
11
- "exclude": [
12
- "jest.config.ts",
13
- "**/*.spec.ts",
14
- "**/*.test.ts",
15
- "**/*.spec.tsx",
16
- "**/*.test.tsx",
17
- "**/*.spec.js",
18
- "**/*.test.js",
19
- "**/*.spec.jsx",
20
- "**/*.test.jsx"
21
- ],
22
- "include": ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx", "../../../global.d.ts"]
23
- }
@@ -1,20 +0,0 @@
1
- {
2
- "extends": "./tsconfig.json",
3
- "compilerOptions": {
4
- "outDir": "../../../dist/out-tsc",
5
- "module": "commonjs",
6
- "types": ["jest", "node"]
7
- },
8
- "include": [
9
- "jest.config.ts",
10
- "**/*.test.ts",
11
- "**/*.spec.ts",
12
- "**/*.test.tsx",
13
- "**/*.spec.tsx",
14
- "**/*.test.js",
15
- "**/*.spec.js",
16
- "**/*.test.jsx",
17
- "**/*.spec.jsx",
18
- "**/*.d.ts"
19
- ]
20
- }