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.
- package/README.md +191 -7
- package/dist/bookito-widget.css +3 -0
- package/dist/bookito-widget.iife.js +112 -0
- package/dist/bookito-widget.js +40173 -0
- package/dist/bookito-widget.umd.js +104 -1992
- package/dist/bookito-widget.window.js +104 -1992
- package/dist/src/app/i18n/index.d.ts +868 -0
- package/dist/src/app/i18n/locales/de.d.ts +86 -0
- package/dist/src/app/i18n/locales/en.d.ts +86 -0
- package/dist/src/app/i18n/locales/fr.d.ts +86 -0
- package/dist/src/app/i18n/locales/it.d.ts +86 -0
- package/dist/src/app/i18n/locales/pl.d.ts +86 -0
- package/dist/src/app/providers/BookitoWidgetRoot.vue.d.ts +8 -0
- package/dist/src/app/query/query-client.d.ts +2 -0
- package/dist/src/embed/global-api.d.ts +9 -0
- package/dist/src/embed/mount-registry.d.ts +10 -0
- package/dist/src/embed/mount.d.ts +12 -0
- package/dist/src/embed/open-modal.d.ts +11 -0
- package/dist/src/embed/shadow-dom.d.ts +5 -0
- package/dist/src/embed/vue-plugin.d.ts +14 -0
- package/dist/src/embed.d.ts +1 -0
- package/dist/src/features/booking-flow/api/bookito-booking.client.d.ts +2 -0
- package/dist/src/features/booking-flow/api/bookito-booking.dto.d.ts +25 -0
- package/dist/src/features/booking-flow/api/bookito-booking.mutations.d.ts +2 -0
- package/dist/src/features/booking-flow/components/AnimatedSuccessCheckmark.vue.d.ts +2 -0
- package/dist/src/features/booking-flow/components/BookingCheckbox.vue.d.ts +11 -0
- package/dist/src/features/booking-flow/components/BookingDetailsDateOfBirthInput.vue.d.ts +10 -0
- package/dist/src/features/booking-flow/components/BookingDetailsDialCodePicker.vue.d.ts +11 -0
- package/dist/src/features/booking-flow/components/BookingDetailsDialCodePickerContent.vue.d.ts +9 -0
- package/dist/src/features/booking-flow/components/BookingDetailsField.vue.d.ts +20 -0
- package/dist/src/features/booking-flow/components/BookingDetailsLanguageSelect.vue.d.ts +9 -0
- package/dist/src/features/booking-flow/components/BookingDetailsPhoneInput.vue.d.ts +12 -0
- package/dist/src/features/booking-flow/components/BookingDetailsSection.vue.d.ts +30 -0
- package/dist/src/features/booking-flow/components/BookingDetailsTextInput.vue.d.ts +13 -0
- package/dist/src/features/booking-flow/components/BookingExtras.vue.d.ts +15 -0
- package/dist/src/features/booking-flow/components/BookingFlowNextButton.vue.d.ts +10 -0
- package/dist/src/features/booking-flow/components/BookingFlowPanel.vue.d.ts +7 -0
- package/dist/src/features/booking-flow/components/BookingFlowStepper.vue.d.ts +13 -0
- package/dist/src/features/booking-flow/components/BookingFlowSuccess.vue.d.ts +5 -0
- package/dist/src/features/booking-flow/components/BookingGuestChips.vue.d.ts +11 -0
- package/dist/src/features/booking-flow/components/BookingGuestsStep.vue.d.ts +15 -0
- package/dist/src/features/booking-flow/components/BookingParticipantCounter.vue.d.ts +13 -0
- package/dist/src/features/booking-flow/components/BookingTimeSection.vue.d.ts +24 -0
- package/dist/src/features/booking-flow/components/booking-flow.props.d.ts +31 -0
- package/dist/src/features/booking-flow/composables/create-booking-flow-api.d.ts +70 -0
- package/dist/src/features/booking-flow/composables/useBookingFlow.d.ts +52 -0
- package/dist/src/features/booking-flow/composables/useBookingFlowActions.d.ts +13 -0
- package/dist/src/features/booking-flow/composables/useBookingFlowActions.types.d.ts +31 -0
- package/dist/src/features/booking-flow/composables/useBookingFlowFormSync.d.ts +12 -0
- package/dist/src/features/booking-flow/composables/useBookingFlowWaitlist.d.ts +17 -0
- package/dist/src/features/booking-flow/composables/useBookingGuestsStepLabels.d.ts +26 -0
- package/dist/src/features/booking-flow/composables/useBookingTimeSectionState.d.ts +19 -0
- package/dist/src/features/booking-flow/composables/useBookingTimeSlots.d.ts +18 -0
- package/dist/src/features/booking-flow/lib/booking-calendar-bounds.d.ts +9 -0
- package/dist/src/features/booking-flow/lib/booking-details-flow.helpers.d.ts +11 -0
- package/dist/src/features/booking-flow/lib/booking-details.helpers.d.ts +26 -0
- package/dist/src/features/booking-flow/lib/booking-external-participant.helpers.d.ts +10 -0
- package/dist/src/features/booking-flow/lib/booking-flow-stepper.helpers.d.ts +17 -0
- package/dist/src/features/booking-flow/lib/booking-flow.actions.d.ts +34 -0
- package/dist/src/features/booking-flow/lib/booking-flow.helpers.d.ts +32 -0
- package/dist/src/features/booking-flow/lib/booking-participants.helpers.d.ts +4 -0
- package/dist/src/features/booking-flow/lib/booking-payload-label.helpers.d.ts +14 -0
- package/dist/src/features/booking-flow/lib/booking-payload.helpers.d.ts +11 -0
- package/dist/src/features/booking-flow/lib/booking-step-completion.helpers.d.ts +2 -0
- package/dist/src/features/booking-flow/lib/booking-time-slot-payload.helpers.d.ts +8 -0
- package/dist/src/features/booking-flow/lib/filter-phone-dial-codes.d.ts +2 -0
- package/dist/src/features/booking-flow/lib/format-booking-time-slot-label.d.ts +13 -0
- package/dist/src/features/booking-flow/lib/phone-dial-code-countries.data.d.ts +2 -0
- package/dist/src/features/booking-flow/lib/phone-dial-codes.d.ts +6 -0
- package/dist/src/features/booking-flow/lib/reset-booking-auth.helpers.d.ts +1 -0
- package/dist/src/features/booking-flow/lib/reset-booking-confirm-step.helpers.d.ts +2 -0
- package/dist/src/features/booking-flow/lib/resolve-booking-total-price.d.ts +10 -0
- package/dist/src/features/booking-flow/lib/resolve-booking-waitlist.d.ts +19 -0
- package/dist/src/features/booking-flow/model/booking-display-step.types.d.ts +6 -0
- package/dist/src/features/booking-flow/model/booking-form-date.helpers.d.ts +10 -0
- package/dist/src/features/booking-flow/model/booking-form-navigation.helpers.d.ts +2 -0
- package/dist/src/features/booking-flow/model/booking-form.types.d.ts +27 -0
- package/dist/src/features/bookito-settings/api/bookito-settings.client.d.ts +2 -0
- package/dist/src/features/bookito-settings/api/bookito-settings.keys.d.ts +4 -0
- package/dist/src/features/bookito-settings/api/bookito-settings.queries.d.ts +2 -0
- package/dist/src/features/bookito-settings/model/bookito-settings.types.d.ts +27 -0
- package/dist/src/features/event-feed/api/bookito-event-category.client.d.ts +4 -0
- package/dist/src/features/event-feed/api/bookito-event-category.dto.d.ts +11 -0
- package/dist/src/features/event-feed/api/bookito-event-category.queries.d.ts +9 -0
- package/dist/src/features/event-feed/api/bookito-event-modal-dates.helpers.d.ts +6 -0
- package/dist/src/features/event-feed/api/bookito-event.client.d.ts +5 -0
- package/dist/src/features/event-feed/api/bookito-event.dto.d.ts +102 -0
- package/dist/src/features/event-feed/api/bookito-event.keys.d.ts +7 -0
- package/dist/src/features/event-feed/api/bookito-event.mapper-helpers.d.ts +17 -0
- package/dist/src/features/event-feed/api/bookito-event.mapper-image.helpers.d.ts +2 -0
- package/dist/src/features/event-feed/api/bookito-event.mapper-variant.helpers.d.ts +3 -0
- package/dist/src/features/event-feed/api/bookito-event.mapper.d.ts +6 -0
- package/dist/src/features/event-feed/api/bookito-event.queries.d.ts +24 -0
- package/dist/src/features/event-feed/api/bookito-time-slots.queries.d.ts +9 -0
- package/dist/src/features/event-feed/components/BookitoWidget.vue.d.ts +5 -0
- package/dist/src/features/event-feed/components/EventFeed.vue.d.ts +21 -0
- package/dist/src/features/event-feed/components/EventFeedScrollControls.vue.d.ts +13 -0
- package/dist/src/features/event-feed/components/ExperienceCard.vue.d.ts +13 -0
- package/dist/src/features/event-feed/components/PoweredByCarlito.vue.d.ts +2 -0
- package/dist/src/features/event-feed/composables/useBookitoWidgetTheme.d.ts +2 -0
- package/dist/src/features/event-feed/composables/useEventFeedScroll.d.ts +8 -0
- package/dist/src/features/event-feed/lib/event-feed-date.utils.d.ts +15 -0
- package/dist/src/features/event-feed/lib/event-feed-item.helpers.d.ts +9 -0
- package/dist/src/features/event-feed/lib/event-feed-occurrence.helpers.d.ts +7 -0
- package/dist/src/features/event-feed/lib/event-feed.utils.d.ts +8 -0
- package/dist/src/features/event-feed/lib/resolve-localized-text.d.ts +2 -0
- package/dist/src/features/event-feed/model/widget.types.d.ts +96 -0
- package/dist/src/features/experience-detail/components/BookitoEventModal.vue.d.ts +14 -0
- package/dist/src/features/experience-detail/components/ExperienceDetailPanel.vue.d.ts +9 -0
- package/dist/src/features/experience-detail/components/ExperienceOverlay.vue.d.ts +16 -0
- package/dist/src/features/experience-detail/components/ExperienceOverlayContent.vue.d.ts +29 -0
- package/dist/src/features/experience-detail/components/ExperienceOverlayHeader.vue.d.ts +15 -0
- package/dist/src/features/experience-detail/composables/useExperienceOverlayBooking.d.ts +20 -0
- package/dist/src/features/experience-detail/lib/bookito-event-modal.helpers.d.ts +7 -0
- package/dist/src/features/experience-detail/lib/experience-booking-cancellation.helpers.d.ts +2 -0
- package/dist/src/features/experience-detail/lib/experience-booking-cutoff.helpers.d.ts +3 -0
- package/dist/src/features/experience-detail/lib/experience-booking-date.helpers.d.ts +3 -0
- package/dist/src/features/experience-detail/lib/experience-overlay.helpers.d.ts +3 -0
- package/dist/src/features/experience-detail/lib/resolve-experience-booking-availability.d.ts +39 -0
- package/dist/src/features/guest-auth/api/guest-auth.client.d.ts +2 -0
- package/dist/src/features/guest-auth/api/guest-auth.dto.d.ts +36 -0
- package/dist/src/features/guest-auth/api/guest-auth.mutations.d.ts +2 -0
- package/dist/src/features/guest-auth/lib/map-login-guests.d.ts +2 -0
- package/dist/src/index.d.ts +8 -0
- package/dist/src/shared/api/api-config.d.ts +5 -0
- package/dist/src/shared/api/auth-tokens.d.ts +3 -0
- package/dist/src/shared/api/federation-client.d.ts +14 -0
- package/dist/src/shared/api/federation-errors.d.ts +9 -0
- package/dist/src/shared/api/graphql-client.d.ts +22 -0
- package/dist/src/shared/api/subdomain-parameter.d.ts +8 -0
- package/dist/src/shared/calendar/BookingCalendar.vue.d.ts +15 -0
- package/dist/src/shared/calendar/BookingCalendarGrid.vue.d.ts +8 -0
- package/dist/src/shared/calendar/BookingCalendarNavigation.vue.d.ts +17 -0
- package/dist/src/shared/calendar/calendar-date-key.d.ts +4 -0
- package/dist/src/shared/calendar/calendar-date-value.d.ts +11 -0
- package/dist/src/shared/calendar/calendar-date.types.d.ts +1 -0
- package/dist/src/shared/calendar/hotel-calendar-date.d.ts +10 -0
- package/dist/src/shared/calendar/index.d.ts +1 -0
- package/dist/src/shared/calendar/useBookingCalendarState.d.ts +29 -0
- package/dist/src/shared/config/languages.d.ts +3 -0
- package/dist/src/shared/lib/format-booking-price.d.ts +2 -0
- package/dist/src/shared/lib/is-ios-platform.d.ts +1 -0
- package/dist/src/shared/lib/map-language-to-intl-locale.d.ts +2 -0
- package/dist/src/shared/lib/normalize-widget-background-color.d.ts +1 -0
- package/dist/src/shared/lib/resolve-widget-title.d.ts +2 -0
- package/dist/src/shared/markdown/components/CarlitoMarkdownRenderer.vue.d.ts +8 -0
- package/dist/src/shared/markdown/components/PdfEmbed/PdfEmbed.vue.d.ts +6 -0
- package/dist/src/shared/markdown/components/PdfEmbed/PdfLoading.vue.d.ts +2 -0
- package/dist/src/shared/markdown/components/PdfEmbed/PdfRenderer.vue.d.ts +14 -0
- package/dist/src/shared/markdown/components/PdfEmbed/PdfViewer.vue.d.ts +38 -0
- package/dist/src/shared/markdown/components/PdfEmbed/PdfViewerError.vue.d.ts +5 -0
- package/dist/src/shared/markdown/components/PdfEmbed/composables/usePdfViewerState.d.ts +24 -0
- package/dist/src/shared/markdown/components/PdfEmbed/composables/useRenderPdf.d.ts +17 -0
- package/dist/src/shared/markdown/components/PdfEmbed/lib/pdf-canvas.d.ts +40 -0
- package/dist/src/shared/markdown/components/PdfEmbed/lib/pdf-render-watches.d.ts +15 -0
- package/dist/src/shared/markdown/has-meaningful-markdown-content.d.ts +5 -0
- package/dist/src/shared/markdown/process-markdown.d.ts +1 -0
- package/dist/src/shared/markdown/remark-center.d.ts +3 -0
- package/dist/src/shared/markdown/transform-markdown-url.d.ts +1 -0
- package/dist/src/shared/pdf/create-pdf-panzoom-session.d.ts +18 -0
- package/dist/src/shared/pdf/index.d.ts +5 -0
- package/dist/src/shared/pdf/pdf-panzoom.d.ts +14 -0
- package/dist/src/shared/pdf/pdfjs.d.ts +2 -0
- package/dist/src/shared/pdf/setup-pdf-panzoom-watches.d.ts +14 -0
- package/dist/src/shared/pdf/usePdfPanzoom.d.ts +6 -0
- package/dist/src/shared/pdf/usePdfPanzoom.types.d.ts +11 -0
- package/dist/src/shared/theme/theme-loader.d.ts +19 -0
- package/dist/src/shared/utils/cn.d.ts +2 -0
- package/dist/src/shared/utils/dom-events.d.ts +4 -0
- package/package.json +102 -4
- package/.babelrc +0 -12
- package/.eslintrc.json +0 -18
- package/CHANGELOG.md +0 -1931
- package/dist/1219.js +0 -1
- package/dist/1229.js +0 -2
- package/dist/1229.js.LICENSE.txt +0 -3
- package/dist/135.js +0 -2
- package/dist/135.js.LICENSE.txt +0 -3
- package/dist/1385.js +0 -2
- package/dist/1385.js.LICENSE.txt +0 -3
- package/dist/1421.js +0 -2
- package/dist/1421.js.LICENSE.txt +0 -3
- package/dist/1426.js +0 -2
- package/dist/1426.js.LICENSE.txt +0 -3
- package/dist/1428.js +0 -2
- package/dist/1428.js.LICENSE.txt +0 -3
- package/dist/1677.js +0 -2
- package/dist/1677.js.LICENSE.txt +0 -3
- package/dist/173.js +0 -2
- package/dist/173.js.LICENSE.txt +0 -3
- package/dist/1798.js +0 -2
- package/dist/1798.js.LICENSE.txt +0 -3
- package/dist/1813.js +0 -2
- package/dist/1813.js.LICENSE.txt +0 -3
- package/dist/2411.js +0 -2
- package/dist/2411.js.LICENSE.txt +0 -3
- package/dist/2782.js +0 -2
- package/dist/2782.js.LICENSE.txt +0 -3
- package/dist/2827.js +0 -2
- package/dist/2827.js.LICENSE.txt +0 -3
- package/dist/2939.js +0 -2
- package/dist/2939.js.LICENSE.txt +0 -3
- package/dist/3002.js +0 -2
- package/dist/3002.js.LICENSE.txt +0 -3
- package/dist/3140.js +0 -1
- package/dist/3rdpartylicenses.txt +0 -3609
- package/dist/4189.js +0 -2
- package/dist/4189.js.LICENSE.txt +0 -3
- package/dist/4194.js +0 -2
- package/dist/4194.js.LICENSE.txt +0 -3
- package/dist/4220.js +0 -2
- package/dist/4220.js.LICENSE.txt +0 -3
- package/dist/434.js +0 -2
- package/dist/434.js.LICENSE.txt +0 -3
- package/dist/4606.js +0 -2
- package/dist/4606.js.LICENSE.txt +0 -3
- package/dist/4614.js +0 -2
- package/dist/4614.js.LICENSE.txt +0 -3
- package/dist/5065.js +0 -2
- package/dist/5065.js.LICENSE.txt +0 -3
- package/dist/5090.js +0 -2
- package/dist/5090.js.LICENSE.txt +0 -3
- package/dist/5143.js +0 -2
- package/dist/5143.js.LICENSE.txt +0 -3
- package/dist/5309.js +0 -2
- package/dist/5309.js.LICENSE.txt +0 -3
- package/dist/5397.js +0 -2
- package/dist/5397.js.LICENSE.txt +0 -3
- package/dist/5427.js +0 -2
- package/dist/5427.js.LICENSE.txt +0 -3
- package/dist/5941.js +0 -2
- package/dist/5941.js.LICENSE.txt +0 -3
- package/dist/5956.js +0 -2
- package/dist/5956.js.LICENSE.txt +0 -3
- package/dist/6016.js +0 -2
- package/dist/6016.js.LICENSE.txt +0 -3
- package/dist/6250.js +0 -2
- package/dist/6250.js.LICENSE.txt +0 -3
- package/dist/6290.js +0 -2
- package/dist/6290.js.LICENSE.txt +0 -3
- package/dist/6335.js +0 -2
- package/dist/6335.js.LICENSE.txt +0 -3
- package/dist/6462.js +0 -2
- package/dist/6462.js.LICENSE.txt +0 -3
- package/dist/650.js +0 -2
- package/dist/650.js.LICENSE.txt +0 -3
- package/dist/6531.js +0 -2
- package/dist/6531.js.LICENSE.txt +0 -3
- package/dist/6878.js +0 -2
- package/dist/6878.js.LICENSE.txt +0 -3
- package/dist/6892.js +0 -2
- package/dist/6892.js.LICENSE.txt +0 -3
- package/dist/6979.js +0 -2
- package/dist/6979.js.LICENSE.txt +0 -3
- package/dist/7120.js +0 -2
- package/dist/7120.js.LICENSE.txt +0 -3
- package/dist/7149.js +0 -2
- package/dist/7149.js.LICENSE.txt +0 -3
- package/dist/7202.js +0 -2
- package/dist/7202.js.LICENSE.txt +0 -3
- package/dist/7213.js +0 -2
- package/dist/7213.js.LICENSE.txt +0 -3
- package/dist/7290.js +0 -2
- package/dist/7290.js.LICENSE.txt +0 -3
- package/dist/7373.js +0 -2
- package/dist/7373.js.LICENSE.txt +0 -3
- package/dist/7515.js +0 -2
- package/dist/7515.js.LICENSE.txt +0 -3
- package/dist/7797.js +0 -2
- package/dist/7797.js.LICENSE.txt +0 -3
- package/dist/7804.js +0 -2
- package/dist/7804.js.LICENSE.txt +0 -3
- package/dist/7813.js +0 -2
- package/dist/7813.js.LICENSE.txt +0 -3
- package/dist/7843.js +0 -2
- package/dist/7843.js.LICENSE.txt +0 -3
- package/dist/8199.js +0 -2
- package/dist/8199.js.LICENSE.txt +0 -3
- package/dist/821.js +0 -2
- package/dist/821.js.LICENSE.txt +0 -3
- package/dist/8365.js +0 -2
- package/dist/8365.js.LICENSE.txt +0 -3
- package/dist/8599.js +0 -2
- package/dist/8599.js.LICENSE.txt +0 -3
- package/dist/880.js +0 -2
- package/dist/880.js.LICENSE.txt +0 -3
- package/dist/8831.js +0 -2
- package/dist/8831.js.LICENSE.txt +0 -3
- package/dist/885.js +0 -2
- package/dist/885.js.LICENSE.txt +0 -3
- package/dist/9079.js +0 -2
- package/dist/9079.js.LICENSE.txt +0 -3
- package/dist/9104.js +0 -2
- package/dist/9104.js.LICENSE.txt +0 -3
- package/dist/9236.js +0 -2
- package/dist/9236.js.LICENSE.txt +0 -3
- package/dist/942.js +0 -2
- package/dist/942.js.LICENSE.txt +0 -3
- package/dist/9456.js +0 -2
- package/dist/9456.js.LICENSE.txt +0 -3
- package/dist/951.js +0 -2
- package/dist/951.js.LICENSE.txt +0 -3
- package/dist/9636.js +0 -2
- package/dist/9636.js.LICENSE.txt +0 -3
- package/dist/9742.js +0 -2
- package/dist/9742.js.LICENSE.txt +0 -3
- package/dist/9792.js +0 -2
- package/dist/9792.js.LICENSE.txt +0 -3
- package/dist/9875.js +0 -2
- package/dist/9875.js.LICENSE.txt +0 -3
- package/dist/Carlito.eot +0 -0
- package/dist/Carlito.svg +0 -321
- package/dist/Carlito.ttf +0 -0
- package/dist/Carlito.woff +0 -0
- package/dist/Carlito.woff2 +0 -0
- package/dist/bookito-widget.umd.js.LICENSE.txt +0 -128
- package/dist/bookito-widget.window.js.LICENSE.txt +0 -128
- package/dist/layers-2x.png +0 -0
- package/dist/layers.png +0 -0
- package/dist/marker-icon.png +0 -0
- package/e2e-tests/e2e.html +0 -77
- package/index.html +0 -92
- package/jest.config.ts +0 -9
- package/postcss.config.js +0 -3
- package/project.json +0 -72
- package/src/BookitoEventDetail/index.tsx +0 -101
- package/src/BookitoEventModal/ModalLoader.tsx +0 -43
- package/src/BookitoEventModal/index.tsx +0 -71
- package/src/BookitoForm/EventInfo.tsx +0 -68
- package/src/BookitoForm/FormSubmitButton/AnimatedSuccessCheckmark/index.module.css +0 -45
- package/src/BookitoForm/FormSubmitButton/AnimatedSuccessCheckmark/index.tsx +0 -24
- package/src/BookitoForm/FormSubmitButton/index.tsx +0 -58
- package/src/BookitoForm/NewBookingForm.tsx +0 -199
- package/src/BookitoWidget/index.tsx +0 -299
- package/src/BookitoWidgetProvider/BookitoWidgetProvider.tsx +0 -36
- package/src/Card/EmptyCard.tsx +0 -30
- package/src/Card/index.tsx +0 -103
- package/src/CardHolder/index.tsx +0 -32
- package/src/Modal/index.tsx +0 -34
- package/src/assets/carlito-logo.svg +0 -10
- package/src/calendar-styles.css +0 -22
- package/src/index.module.css +0 -27
- package/src/index.tsx +0 -166
- package/src/types.ts +0 -8
- package/src/utils/index.tsx +0 -7
- package/tailwind.config.js +0 -13
- package/tsconfig.json +0 -26
- package/tsconfig.lib.json +0 -23
- package/tsconfig.spec.json +0 -20
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
description: string;
|
|
3
|
+
};
|
|
4
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
5
|
+
export default _default;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare function usePdfViewerState(open: () => boolean, pdfUrl: () => string, onClose: () => void): {
|
|
2
|
+
closeViewer: () => void;
|
|
3
|
+
currentPage: import('vue').Ref<number, number>;
|
|
4
|
+
documentInfo: import('vue').Ref<{
|
|
5
|
+
numPages: number;
|
|
6
|
+
title: string;
|
|
7
|
+
}, {
|
|
8
|
+
numPages: number;
|
|
9
|
+
title: string;
|
|
10
|
+
} | {
|
|
11
|
+
numPages: number;
|
|
12
|
+
title: string;
|
|
13
|
+
}>;
|
|
14
|
+
errorDescription: import('vue').ComputedRef<string>;
|
|
15
|
+
goToNextPage: () => void;
|
|
16
|
+
goToPreviousPage: () => void;
|
|
17
|
+
handleDocumentLoadError: () => void;
|
|
18
|
+
handleDocumentLoaded: (nextDocumentInfo: {
|
|
19
|
+
numPages: number;
|
|
20
|
+
title: string;
|
|
21
|
+
}) => void;
|
|
22
|
+
hasLoadError: import('vue').Ref<boolean, boolean>;
|
|
23
|
+
isLoading: import('vue').ComputedRef<boolean>;
|
|
24
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { IDisplayStateType } from '../lib/pdf-canvas';
|
|
3
|
+
export type IUseRenderPdfParametersType = {
|
|
4
|
+
canvasContainer: Ref<HTMLDivElement | null>;
|
|
5
|
+
fileUrl: Ref<string>;
|
|
6
|
+
onDocumentLoaded?: (documentInfo: {
|
|
7
|
+
numPages: number;
|
|
8
|
+
title: string;
|
|
9
|
+
}) => void;
|
|
10
|
+
onDocumentLoadError?: () => void;
|
|
11
|
+
pageNumber: Ref<number>;
|
|
12
|
+
};
|
|
13
|
+
export declare function useRenderPdf({ canvasContainer, fileUrl, onDocumentLoaded, onDocumentLoadError, pageNumber, }: IUseRenderPdfParametersType): {
|
|
14
|
+
displayState: Ref<IDisplayStateType, IDisplayStateType>;
|
|
15
|
+
lastHeight: Ref<number | undefined, number | undefined>;
|
|
16
|
+
rerender: () => void;
|
|
17
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { PDFDocumentProxy, PDFPageProxy } from 'pdfjs-dist';
|
|
2
|
+
import { Ref } from 'vue';
|
|
3
|
+
export type ILoadPdfResultType = {
|
|
4
|
+
page: PDFPageProxy;
|
|
5
|
+
pdfDocument: PDFDocumentProxy;
|
|
6
|
+
};
|
|
7
|
+
export type IDisplayStateType = 'idle' | 'loading' | 'loaded' | 'error' | 'rendered';
|
|
8
|
+
export type ILoadedPdfStateType = ILoadPdfResultType & {
|
|
9
|
+
pageNumber: number;
|
|
10
|
+
};
|
|
11
|
+
export declare const PDF_RENDER_DELAY = 100;
|
|
12
|
+
type ILoadPageParametersType = {
|
|
13
|
+
fileUrl: string;
|
|
14
|
+
pageNumber?: number;
|
|
15
|
+
pdfDocument?: PDFDocumentProxy;
|
|
16
|
+
};
|
|
17
|
+
export declare function createPdfRenderLogger(fileUrl: Ref<string>): (...messages: unknown[]) => void;
|
|
18
|
+
export declare function loadPdfPage({ fileUrl, pageNumber, pdfDocument, }: ILoadPageParametersType): Promise<ILoadPdfResultType>;
|
|
19
|
+
type IRenderPageParametersType = {
|
|
20
|
+
canvasContainer: HTMLDivElement;
|
|
21
|
+
page: PDFPageProxy;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* https://pqina.nl/blog/total-canvas-memory-use-exceeds-the-maximum-limit/
|
|
25
|
+
*/
|
|
26
|
+
export declare function releasePdfCanvas(canvas: HTMLCanvasElement): void;
|
|
27
|
+
type IDestroyLoadedPdfParametersType = {
|
|
28
|
+
canvasElement?: HTMLCanvasElement;
|
|
29
|
+
loadedPdf?: ILoadPdfResultType & {
|
|
30
|
+
pageNumber: number;
|
|
31
|
+
};
|
|
32
|
+
log?: (...messages: unknown[]) => void;
|
|
33
|
+
};
|
|
34
|
+
export declare function destroyLoadedPdf({ canvasElement, loadedPdf, log, }: IDestroyLoadedPdfParametersType): void;
|
|
35
|
+
export declare function renderPdfPage({ canvasContainer, page }: IRenderPageParametersType): Promise<{
|
|
36
|
+
canvas: HTMLCanvasElement;
|
|
37
|
+
}>;
|
|
38
|
+
export declare function getPdfDocumentTitle(info: unknown, fallback: string): string;
|
|
39
|
+
export declare function getPdfPreviewThumbnailUrl(pdfUrl: string): string;
|
|
40
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Ref, ShallowRef } from 'vue';
|
|
2
|
+
import { IDisplayStateType, ILoadedPdfStateType } from './pdf-canvas';
|
|
3
|
+
type IRenderPdfWatchContextType = {
|
|
4
|
+
canvasContainer: Ref<HTMLDivElement | null>;
|
|
5
|
+
canvasElement: Ref<HTMLCanvasElement | undefined>;
|
|
6
|
+
displayState: Ref<IDisplayStateType>;
|
|
7
|
+
fileUrl: Ref<string>;
|
|
8
|
+
lastHeight: Ref<number | undefined>;
|
|
9
|
+
loadedPdf: ShallowRef<ILoadedPdfStateType | undefined>;
|
|
10
|
+
log: (...messages: unknown[]) => void;
|
|
11
|
+
pageNumber: Ref<number>;
|
|
12
|
+
};
|
|
13
|
+
export declare function setupRenderPdfLoadWatch({ displayState, fileUrl, loadedPdf, log, pageNumber, }: Pick<IRenderPdfWatchContextType, 'displayState' | 'fileUrl' | 'loadedPdf' | 'log' | 'pageNumber'>): void;
|
|
14
|
+
export declare function setupRenderPdfRenderWatch({ canvasContainer, canvasElement, displayState, lastHeight, loadedPdf, log, pageNumber, }: Pick<IRenderPdfWatchContextType, 'canvasContainer' | 'canvasElement' | 'displayState' | 'lastHeight' | 'loadedPdf' | 'log' | 'pageNumber'>): void;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function processMarkdown(markdown: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function transformMarkdownUrl(url: string): string;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { PanzoomObject } from '@panzoom/panzoom';
|
|
2
|
+
import { MaybeRefOrGetter, ShallowRef } from 'vue';
|
|
3
|
+
import { IPdfPanzoomInteractionModeType } from './pdf-panzoom';
|
|
4
|
+
export declare function resolvePdfPanzoomStageElement(contentElement: HTMLElement, stageElement?: HTMLElement | null): HTMLElement;
|
|
5
|
+
export declare function canResetPdfPanzoom(enabled: MaybeRefOrGetter<boolean>, isLoading?: MaybeRefOrGetter<boolean>): boolean;
|
|
6
|
+
type CreatePdfPanzoomSessionOptionsType = {
|
|
7
|
+
enabled: MaybeRefOrGetter<boolean>;
|
|
8
|
+
interactionMode: MaybeRefOrGetter<IPdfPanzoomInteractionModeType>;
|
|
9
|
+
isLoading?: MaybeRefOrGetter<boolean>;
|
|
10
|
+
};
|
|
11
|
+
export type PdfPanzoomSessionType = {
|
|
12
|
+
destroyPanzoom: () => void;
|
|
13
|
+
initPanzoom: (contentElement: HTMLElement, stageElement: HTMLElement) => void;
|
|
14
|
+
panzoomInstance: ShallowRef<PanzoomObject | null>;
|
|
15
|
+
resetPdfPanzoom: () => void;
|
|
16
|
+
};
|
|
17
|
+
export declare function createPdfPanzoomSession({ enabled, interactionMode, isLoading, }: CreatePdfPanzoomSessionOptionsType): PdfPanzoomSessionType;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { bindPdfPanzoomInteractions, createPdfPanzoomInstance, type IPdfPanzoomInteractionModeType, } from './pdf-panzoom';
|
|
2
|
+
export { createPdfPanzoomSession, type PdfPanzoomSessionType } from './create-pdf-panzoom-session';
|
|
3
|
+
export { setupPdfPanzoomCommonWatches } from './setup-pdf-panzoom-watches';
|
|
4
|
+
export { usePdfPanzoom } from './usePdfPanzoom';
|
|
5
|
+
export type { PdfPanzoomInteractionModeType, UsePdfPanzoomOptionsType } from './usePdfPanzoom.types';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PanzoomObject } from '@panzoom/panzoom';
|
|
2
|
+
export type IPdfPanzoomInteractionModeType = 'modal' | 'scroll-friendly';
|
|
3
|
+
export declare function createPdfPanzoomInstance({ contentElement, interactionMode, maxScale, minScale, }: {
|
|
4
|
+
contentElement: HTMLElement;
|
|
5
|
+
interactionMode: IPdfPanzoomInteractionModeType;
|
|
6
|
+
maxScale?: number;
|
|
7
|
+
minScale?: number;
|
|
8
|
+
}): PanzoomObject;
|
|
9
|
+
export declare function bindPdfPanzoomInteractions({ contentElement, interactionMode, panzoom, stageElement, }: {
|
|
10
|
+
contentElement: HTMLElement;
|
|
11
|
+
interactionMode: IPdfPanzoomInteractionModeType;
|
|
12
|
+
panzoom: PanzoomObject;
|
|
13
|
+
stageElement: HTMLElement;
|
|
14
|
+
}): () => void;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { MaybeRefOrGetter, Ref } from 'vue';
|
|
2
|
+
import { PdfPanzoomSessionType } from './create-pdf-panzoom-session';
|
|
3
|
+
import { PdfPanzoomInteractionModeType } from './usePdfPanzoom.types';
|
|
4
|
+
type SetupPdfPanzoomCommonWatchesOptionsType = {
|
|
5
|
+
contentRef: Ref<HTMLElement | null | undefined>;
|
|
6
|
+
enabled: MaybeRefOrGetter<boolean>;
|
|
7
|
+
interactionMode: MaybeRefOrGetter<PdfPanzoomInteractionModeType>;
|
|
8
|
+
isLoading?: MaybeRefOrGetter<boolean>;
|
|
9
|
+
currentPage?: MaybeRefOrGetter<number | undefined>;
|
|
10
|
+
session: PdfPanzoomSessionType;
|
|
11
|
+
stageRef?: Ref<HTMLElement | null | undefined>;
|
|
12
|
+
};
|
|
13
|
+
export declare function setupPdfPanzoomCommonWatches({ contentRef, enabled, interactionMode, isLoading, currentPage, session, stageRef, }: SetupPdfPanzoomCommonWatchesOptionsType): void;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { UsePdfPanzoomOptionsType } from './usePdfPanzoom.types';
|
|
2
|
+
export type { PdfPanzoomInteractionModeType, UsePdfPanzoomOptionsType } from './usePdfPanzoom.types';
|
|
3
|
+
export declare function usePdfPanzoom({ contentRef, stageRef, interactionMode, enabled, currentPage, isLoading, }: UsePdfPanzoomOptionsType): {
|
|
4
|
+
panzoomInstance: import('vue').ShallowRef<import('@panzoom/panzoom').PanzoomObject | null>;
|
|
5
|
+
resetPdfPanzoom: () => void;
|
|
6
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { MaybeRefOrGetter, Ref } from 'vue';
|
|
2
|
+
import { IPdfPanzoomInteractionModeType } from './pdf-panzoom';
|
|
3
|
+
export type PdfPanzoomInteractionModeType = IPdfPanzoomInteractionModeType;
|
|
4
|
+
export type UsePdfPanzoomOptionsType = {
|
|
5
|
+
contentRef: Ref<HTMLElement | null | undefined>;
|
|
6
|
+
stageRef?: Ref<HTMLElement | null | undefined>;
|
|
7
|
+
interactionMode?: MaybeRefOrGetter<PdfPanzoomInteractionModeType>;
|
|
8
|
+
enabled?: MaybeRefOrGetter<boolean>;
|
|
9
|
+
currentPage?: MaybeRefOrGetter<number | undefined>;
|
|
10
|
+
isLoading?: MaybeRefOrGetter<boolean>;
|
|
11
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type LoadHotelThemeOptionsType = {
|
|
2
|
+
hotelId?: string | null;
|
|
3
|
+
hotelSubdomain?: string | null;
|
|
4
|
+
/**
|
|
5
|
+
* Strapi wraps hotel colors in `:host` when `resource=widget`. That only applies inside a
|
|
6
|
+
* shadow tree; `:root` (default) is required for document.head loads (playground) and still
|
|
7
|
+
* inherits into shadow DOM embeds.
|
|
8
|
+
*/
|
|
9
|
+
resource?: 'widget';
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Loads CMS hotel theme CSS into `document.head` (playground / non-shadow mounts).
|
|
13
|
+
*/
|
|
14
|
+
export declare function loadHotelTheme(options?: LoadHotelThemeOptionsType): void;
|
|
15
|
+
/**
|
|
16
|
+
* Loads CMS hotel theme CSS into a ShadowRoot (embed / custom element mounts).
|
|
17
|
+
*/
|
|
18
|
+
export declare function loadHotelThemeIntoShadowRoot(shadowRoot: ShadowRoot, options?: LoadHotelThemeOptionsType): void;
|
|
19
|
+
export declare function removeHotelTheme(): void;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare function readInputValue(event: Event): string;
|
|
2
|
+
export declare function sanitizeNumericInputValue(value: string): string;
|
|
3
|
+
export declare function syncInputElementValue(event: Event, value: string): void;
|
|
4
|
+
export declare function readSelectValue(event: Event): string;
|
package/package.json
CHANGED
|
@@ -1,8 +1,106 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bookito-widget",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
3
|
+
"version": "1.0.0-beta.2",
|
|
4
|
+
"description": "Embeddable Bookito booking widget for hotel websites",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"
|
|
7
|
-
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/Carlito-GmbH/carlito-web-widget.git"
|
|
9
|
+
},
|
|
10
|
+
"type": "module",
|
|
11
|
+
"main": "./dist/bookito-widget.umd.js",
|
|
12
|
+
"module": "./dist/bookito-widget.js",
|
|
13
|
+
"types": "./dist/src/index.d.ts",
|
|
14
|
+
"unpkg": "./dist/bookito-widget.iife.js",
|
|
15
|
+
"jsdelivr": "./dist/bookito-widget.iife.js",
|
|
16
|
+
"exports": {
|
|
17
|
+
".": {
|
|
18
|
+
"types": "./dist/src/index.d.ts",
|
|
19
|
+
"import": "./dist/bookito-widget.js"
|
|
20
|
+
},
|
|
21
|
+
"./embed": "./dist/bookito-widget.iife.js",
|
|
22
|
+
"./style.css": "./dist/bookito-widget.css"
|
|
23
|
+
},
|
|
24
|
+
"files": [
|
|
25
|
+
"dist"
|
|
26
|
+
],
|
|
27
|
+
"scripts": {
|
|
28
|
+
"dev": "vite",
|
|
29
|
+
"build": "run-p type-check \"build-only {@}\" --",
|
|
30
|
+
"build:lib": "vite build --config vite.library.config.ts && vite build --config vite.embed.config.ts",
|
|
31
|
+
"preview:embed": "VITE_STAGE=prerelease npm run build:lib && vite preview --config vite.embed.config.ts --outDir . --port 5175 --strictPort --open /embed-test/",
|
|
32
|
+
"build-only": "vite build",
|
|
33
|
+
"preview": "vite preview",
|
|
34
|
+
"test:unit": "vitest --project unit",
|
|
35
|
+
"test:unit:run": "vitest run --project unit",
|
|
36
|
+
"test:browser": "vitest --project browser",
|
|
37
|
+
"test:browser:run": "vitest run --project browser",
|
|
38
|
+
"type-check": "vue-tsc --build",
|
|
39
|
+
"lint": "eslint .",
|
|
40
|
+
"lint:fix": "eslint . --fix --cache",
|
|
41
|
+
"format": "prettier . --check",
|
|
42
|
+
"format:fix": "prettier --write --experimental-cli src/ playground/",
|
|
43
|
+
"prepare": "husky",
|
|
44
|
+
"release:dry": "semantic-release --dry-run --no-ci -r git@github.com:Carlito-GmbH/carlito-web-widget.git --plugins @semantic-release/commit-analyzer,@semantic-release/release-notes-generator"
|
|
45
|
+
},
|
|
46
|
+
"dependencies": {
|
|
47
|
+
"@crazydos/vue-markdown": "^1.1.4",
|
|
48
|
+
"@internationalized/date": "^3.12.2",
|
|
49
|
+
"@lucide/vue": "^1.21.0",
|
|
50
|
+
"@panzoom/panzoom": "^4.6.2",
|
|
51
|
+
"@tailwindcss/typography": "^0.5.20",
|
|
52
|
+
"@tailwindcss/vite": "^4.3.0",
|
|
53
|
+
"@tanstack/vue-query": "^5.100.11",
|
|
54
|
+
"@vueuse/core": "^14.3.0",
|
|
55
|
+
"class-variance-authority": "^0.7.1",
|
|
56
|
+
"clsx": "^2.1.1",
|
|
57
|
+
"mdast-util-find-and-replace": "^3.0.2",
|
|
58
|
+
"pdfjs-dist": "^6.2.108",
|
|
59
|
+
"reka-ui": "^2.10.1",
|
|
60
|
+
"remark-gfm": "^4.0.1",
|
|
61
|
+
"tailwind-merge": "^3.6.0",
|
|
62
|
+
"tailwindcss": "^4.3.0",
|
|
63
|
+
"vue": "^3.5.32",
|
|
64
|
+
"vue-i18n": "^11.4.4"
|
|
65
|
+
},
|
|
66
|
+
"devDependencies": {
|
|
67
|
+
"@commitlint/cli": "^21.2.3",
|
|
68
|
+
"@commitlint/config-conventional": "^21.2.3",
|
|
69
|
+
"@eslint/js": "^10.0.1",
|
|
70
|
+
"@tsconfig/node24": "^24.0.4",
|
|
71
|
+
"@types/jsdom": "^28.0.1",
|
|
72
|
+
"@types/node": "^24.12.4",
|
|
73
|
+
"@vitejs/plugin-vue": "^6.0.6",
|
|
74
|
+
"@vitest/browser": "^4.1.8",
|
|
75
|
+
"@vitest/browser-playwright": "^4.1.8",
|
|
76
|
+
"@vue/eslint-config-prettier": "^10.2.0",
|
|
77
|
+
"@vue/eslint-config-typescript": "^14.7.0",
|
|
78
|
+
"@vue/test-utils": "^2.4.6",
|
|
79
|
+
"@vue/tsconfig": "^0.9.1",
|
|
80
|
+
"eslint": "^10.4.0",
|
|
81
|
+
"eslint-config-prettier": "^10.1.8",
|
|
82
|
+
"eslint-plugin-opinionated-vue-ts": "^2.20.0",
|
|
83
|
+
"eslint-plugin-unicorn": "^64.0.0",
|
|
84
|
+
"eslint-plugin-vue": "~10.8.0",
|
|
85
|
+
"globals": "^17.6.0",
|
|
86
|
+
"husky": "^9.1.7",
|
|
87
|
+
"jiti": "^2.6.1",
|
|
88
|
+
"jsdom": "^29.0.2",
|
|
89
|
+
"lint-staged": "^17.1.1",
|
|
90
|
+
"npm-run-all2": "^8.0.4",
|
|
91
|
+
"playwright": "^1.60.0",
|
|
92
|
+
"prettier": "3.8.3",
|
|
93
|
+
"semantic-release": "^25.0.9",
|
|
94
|
+
"tw-animate-css": "^1.4.0",
|
|
95
|
+
"typescript": "~6.0.0",
|
|
96
|
+
"typescript-eslint": "^8.59.4",
|
|
97
|
+
"vite": "^8.0.8",
|
|
98
|
+
"vite-plugin-dts": "^4.5.4",
|
|
99
|
+
"vitest": "^4.1.8",
|
|
100
|
+
"vitest-browser-vue": "^2.1.0",
|
|
101
|
+
"vue-tsc": "^3.2.6"
|
|
102
|
+
},
|
|
103
|
+
"engines": {
|
|
104
|
+
"node": "^24.14.0"
|
|
105
|
+
}
|
|
8
106
|
}
|
package/.babelrc
DELETED
package/.eslintrc.json
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": ["plugin:@nx/nx/react", "../../../.eslintrc.json"],
|
|
3
|
-
"ignorePatterns": ["!**/*"],
|
|
4
|
-
"overrides": [
|
|
5
|
-
{
|
|
6
|
-
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
|
|
7
|
-
"rules": {}
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
"files": ["*.ts", "*.tsx"],
|
|
11
|
-
"rules": {}
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
"files": ["*.js", "*.jsx"],
|
|
15
|
-
"rules": {}
|
|
16
|
-
}
|
|
17
|
-
]
|
|
18
|
-
}
|